@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@400;500;600;700;800&display=swap');

:root {
  --bg: #f5f3ee;
  --paper: #fffefa;
  --paper-alt: #f0eee7;
  --ink: #242722;
  --muted: #777a70;
  --line: #e5e1d7;
  --accent: #315f4d;
  --accent-dark: #254a3c;
  --accent-soft: #e4ece5;
  --gold: #c58c42;
  --shadow: 0 14px 42px rgba(35, 39, 33, .045);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: 'DM Sans', sans-serif; line-height: 1.6; transition: background .25s, color .25s; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
.topbar { height: 76px; display: flex; align-items: center; justify-content: space-between; padding: 0 max(28px, calc((100vw - 1320px) / 2)); border-bottom: 1px solid var(--line); background: rgba(255,254,250,.78); backdrop-filter: blur(16px); position: sticky; top: 0; z-index: 20; }
.wordmark { display: flex; align-items: center; gap: 11px; }
.logo-mark { width: 39px; height: 39px; display: grid; place-items: center; border-radius: 12px; background: var(--accent); color: white; font: 800 24px 'Manrope', sans-serif; }
.wordmark-text { display: flex; flex-direction: column; line-height: 1.2; }
.wordmark-text strong { font: 800 17px 'Manrope', sans-serif; letter-spacing: -.5px; }
.wordmark-text small { color: var(--muted); font-size: 11px; margin-top: 4px; letter-spacing: .4px; }
.topnav { display: flex; align-items: center; gap: 34px; height: 100%; color: var(--muted); font-size: 13px; }
.topnav a { height: 100%; display: flex; align-items: center; position: relative; }
.topnav a:hover, .topnav a.current { color: var(--accent); }
.topnav a.current::after { content: ''; position: absolute; bottom: 0; height: 2px; background: var(--accent); left: 0; right: 0; }
.theme-toggle { width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 50%; background: var(--paper); color: var(--ink); font-size: 20px; }
.page { max-width: 1220px; padding: 40px 28px 50px; margin: auto; }
.intro { min-height: 230px; padding: 34px 42px; background: #e9e9df; border: 1px solid #ddded3; border-radius: 8px; display: flex; align-items: center; justify-content: space-between; position: relative; overflow: hidden; }
.intro::after { content: ''; position: absolute; width: 340px; height: 340px; border-radius: 50%; border: 1px solid rgba(49,95,77,.12); right: 45px; top: -90px; }
.intro-copy { position: relative; z-index: 2; }
.overline { font-size: 10px; font-weight: 700; letter-spacing: 1.65px; color: var(--accent); margin: 0 0 13px; }
.overline span { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--gold); margin-right: 7px; vertical-align: 1px; }
h1, h2, h3, p { margin-top: 0; }
h1 { font: 800 clamp(38px, 5vw, 56px)/1.08 'Manrope', sans-serif; letter-spacing: -2.8px; margin-bottom: 11px; }
h1 span { color: var(--accent); }
.intro-text { color: #60675e; font-size: 15px; margin-bottom: 19px; }
.meta-row { display: flex; gap: 13px; align-items: center; font-size: 11px; color: #6e756b; }
.intro-illustration { width: 245px; height: 165px; position: relative; margin-right: 50px; z-index: 1; }
.orbit { border: 1px solid rgba(49,95,77,.22); border-radius: 50%; position: absolute; left: 30px; top: 8px; width: 175px; height: 130px; transform: rotate(-26deg); }
.orbit-two { transform: rotate(50deg); border-color: rgba(197,140,66,.36); }
.molecule { position: absolute; left: 93px; top: 49px; width: 54px; height: 54px; border: 1px solid #5e8773; transform: rotate(45deg); background: rgba(255,254,250,.45); }
.molecule::before, .molecule::after { content: ''; position: absolute; background: #7b9a84; }
.molecule::before { width: 1px; height: 76px; left: 26px; top: -12px; }
.molecule::after { height: 1px; width: 76px; top: 26px; left: -12px; }
.molecule i { width: 7px; height: 7px; border-radius: 50%; background: var(--gold); position: absolute; z-index: 2; }
.molecule i:nth-child(1) { left: -4px; top: -4px; }.molecule i:nth-child(2) { right: -4px; top: -4px; }.molecule i:nth-child(3) { left: -4px; bottom: -4px; }.molecule i:nth-child(4) { right: -4px; bottom: -4px; }
.molecule b { position: absolute; width: 12px; height: 12px; border-radius: 50%; background: var(--accent); left: 20px; top: 20px; z-index: 3; }
.illustration-label { position: absolute; bottom: 0; left: 72px; font-size: 8px; letter-spacing: 2px; color: #7c8578; }
.layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 22px; align-items: start; margin-top: 24px; }
.panel { background: var(--paper); border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow); }
.contents { padding: 23px 17px; position: sticky; top: 96px; }
.side-heading { font-size: 9px; font-weight: 700; letter-spacing: 1.4px; color: #8a8b80; margin: 0 0 15px 10px; }
.contents-link { display: flex; gap: 12px; align-items: center; padding: 11px 10px; border-radius: 5px; font-size: 12px; color: #6c7067; margin-bottom: 3px; }
.contents-link span { color: #a5a69b; font-size: 10px; font-weight: 700; }
.contents-link:hover, .contents-link.active { background: var(--accent-soft); color: var(--accent-dark); }
.contents-link.active span { color: var(--accent); }
.reading-progress { border-top: 1px solid var(--line); margin-top: 23px; padding: 20px 6px 0; }
.progress-label { display: flex; justify-content: space-between; font-size: 10px; color: var(--muted); }
.progress-label strong { color: var(--accent); }
.progress-track { height: 4px; background: var(--paper-alt); border-radius: 8px; overflow: hidden; margin: 10px 0 12px; }
.progress-track span { display: block; width: 0; height: 100%; background: var(--accent); transition: width .35s; }
.reading-progress p { font-size: 10px; line-height: 1.5; color: var(--muted); margin-bottom: 12px; }
.text-button { border: 0; background: none; padding: 0; color: var(--accent); font-size: 11px; font-weight: 700; }
.main-column { min-width: 0; }
.lesson-card, .recap-card, .quiz-card { padding: 30px 34px; margin-bottom: 20px; }
.article-head { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 18px; }
.article-head .overline { margin-bottom: 6px; color: #888b7f; }
h2 { font: 700 23px/1.25 'Manrope', sans-serif; letter-spacing: -.7px; margin-bottom: 0; }
.original-badge { display: inline-flex; align-items: center; gap: 7px; background: #edf2eb; color: #45644e; border-radius: 4px; padding: 7px 9px; font-size: 10px; white-space: nowrap; }
.original-badge span { width: 6px; height: 6px; border-radius: 50%; background: #658b68; }
.notice { display: flex; align-items: flex-start; gap: 9px; font-size: 11px; line-height: 1.55; color: #77796f; background: #f7f6f1; border: 1px solid #eeece3; border-radius: 5px; padding: 11px 13px; margin-bottom: 24px; }
.notice span { display: grid; place-items: center; width: 16px; height: 16px; flex: 0 0 16px; border: 1px solid #b9b9a8; border-radius: 50%; font: 700 10px Georgia; }
.lesson-text { font-size: 14px; line-height: 1.9; color: #383c35; overflow-wrap: anywhere; }
.lesson-text p { margin: 0 0 14px; }
.lesson-text p:first-child { font-weight: 700; font-size: 16px; margin-bottom: 21px; }
.lesson-text ul { padding-left: 25px; margin: -5px 0 17px; list-style-type: disc; }
.lesson-text li { padding-left: 3px; margin: 2px 0; }
.article-footer { display: flex; justify-content: space-between; align-items: center; border-top: 1px solid var(--line); margin-top: 24px; padding-top: 17px; font-size: 9px; letter-spacing: 1px; color: #999a8f; }
.article-footer a { color: var(--accent); letter-spacing: 0; font-size: 11px; font-weight: 700; }
.subtle-label { color: #929387; font-size: 11px; }
.recap-disclaimer { font-size: 11px; color: var(--muted); margin: 12px 0 18px; }
.recap-list { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.recap-item { display: flex; gap: 12px; padding: 15px; background: #f8f7f2; border: 1px solid #eeece4; border-radius: 5px; }
.recap-number { width: 28px; height: 28px; display: grid; place-items: center; flex: 0 0 28px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-size: 10px; font-weight: 700; }
.recap-item strong { display: block; font-size: 12px; margin: 2px 0 5px; }
.recap-item p { font-size: 11px; line-height: 1.6; color: #74776d; margin: 0; }
.question-count { color: var(--muted); font-size: 11px; }
.question { font: 600 16px/1.55 'Manrope', sans-serif; margin: 22px 0 17px; max-width: 680px; }
.answers { display: grid; gap: 8px; }
.answer-option { width: 100%; display: flex; gap: 12px; align-items: center; padding: 11px 13px; border: 1px solid var(--line); background: var(--paper); border-radius: 5px; text-align: left; color: var(--ink); font-size: 12px; transition: border-color .15s, background .15s; }
.answer-option:hover { border-color: #9eb6a4; }
.answer-option.selected { border-color: var(--accent); background: var(--accent-soft); }
.answer-letter { display: grid; place-items: center; width: 25px; height: 25px; border: 1px solid var(--line); border-radius: 4px; color: var(--muted); font-size: 10px; font-weight: 700; flex: 0 0 25px; }
.answer-option.selected .answer-letter { color: white; border-color: var(--accent); background: var(--accent); }
.quiz-actions { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-top: 19px; }
.feedback { color: var(--muted); font-size: 11px; margin: 0; }
.feedback.correct { color: var(--accent); }.feedback.incorrect { color: #a44f3c; }
.primary-button { border: 0; background: var(--accent); color: #fff; padding: 12px 16px; border-radius: 5px; font-size: 11px; font-weight: 700; display: inline-flex; gap: 18px; align-items: center; justify-content: center; transition: background .2s, transform .2s; }
.primary-button:hover { background: var(--accent-dark); transform: translateY(-1px); }
.primary-button:disabled { opacity: .4; cursor: not-allowed; transform: none; }
.quiz-result { text-align: center; padding: 24px 0 10px; }
.result-icon { margin: 0 auto 12px; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); font-size: 22px; }
.quiz-result h3 { font: 700 21px 'Manrope', sans-serif; margin-bottom: 8px; }
.quiz-result p { font-size: 12px; color: var(--muted); margin-bottom: 18px; }
.hidden { display: none; }
.page-footer { display: flex; justify-content: space-between; padding: 5px 3px 20px; color: #96978c; font-size: 10px; }
.page-footer a { color: var(--accent); font-weight: 700; }
.focus-mode .contents, .focus-mode .intro, .focus-mode .recap-card, .focus-mode .quiz-card { display: none; }
.focus-mode .layout { display: block; max-width: 820px; margin-left: auto; margin-right: auto; }
.focus-mode .lesson-card { padding: 44px 54px; }
.focus-mode .lesson-text { font-size: 16px; line-height: 2; }
.focus-mode .topbar { position: relative; }
body.dark {
  --bg: #171b18; --paper: #202621; --paper-alt: #2a302b; --ink: #e8e9df; --muted: #a2a99e;
  --line: #343c35; --accent: #91b89e; --accent-dark: #b0d0b8; --accent-soft: #2c3b30; --shadow: 0 14px 42px rgba(0,0,0,.12);
}
body.dark .topbar { background: rgba(32,38,33,.9); }
body.dark .intro { background: #29342b; border-color: #3b4a3d; }
body.dark .intro-text, body.dark .meta-row { color: #b8c3b7; }
body.dark .lesson-text { color: #e0e4da; }
body.dark .notice, body.dark .recap-item { background: #262d27; border-color: #363e37; color: #b8c0b5; }
body.dark .original-badge { background: #2d3b30; color: #b3d0b7; }
body.dark .answer-option { background: #202621; color: var(--ink); }
body.dark .answer-option.selected { background: #2c3b30; }
body.dark .theme-toggle { background: #202621; color: var(--ink); }
@media (max-width: 900px) {
  .page { padding: 26px 18px 35px; }
  .layout { grid-template-columns: 1fr; }
  .contents { position: static; display: flex; flex-wrap: wrap; gap: 5px; align-items: center; padding: 12px; }
  .side-heading { width: 100%; margin: 0 8px 5px; }
  .contents-link { margin: 0; flex: 1; justify-content: center; padding: 9px 6px; }
  .reading-progress { width: 100%; border-top: 1px solid var(--line); margin-top: 10px; padding: 13px 8px 0; }
  .reading-progress p { margin-bottom: 7px; }
  .intro-illustration { margin-right: 5px; transform: scale(.85); }
}
@media (max-width: 620px) {
  .topbar { padding: 0 16px; height: 66px; }
  .topnav { gap: 13px; font-size: 11px; }
  .topnav a:nth-child(2) { display: none; }
  .wordmark-text strong { font-size: 15px; }
  .logo-mark { width: 34px; height: 34px; }
  .page { padding: 18px 12px 28px; }
  .intro { padding: 27px 23px; min-height: 195px; }
  .intro-illustration { position: absolute; right: -80px; opacity: .42; }
  h1 { font-size: 43px; }
  .lesson-card, .recap-card, .quiz-card { padding: 22px 19px; }
  .article-head { align-items: flex-start; }
  .original-badge { font-size: 9px; padding: 6px; white-space: normal; max-width: 120px; }
  h2 { font-size: 21px; }
  .recap-list { grid-template-columns: 1fr; }
  .quiz-actions { align-items: stretch; flex-direction: column; }
  .quiz-actions .primary-button { width: 100%; }
  .focus-mode .lesson-card { padding: 25px 20px; }
  .focus-mode .lesson-text { font-size: 15px; }
}
