:root {
  --forest: #274c40;
  --forest-2: #315e4f;
  --sage: #8da694;
  --sage-soft: #dfe9e2;
  --sand: #f4efe6;
  --cream: #fbfaf6;
  --caramel: #bc8059;
  --ink: #24312d;
  --muted: #68756f;
  --line: #dfe3dd;
  --white: #fff;
  --danger: #a64848;
  --success: #2e7256;
  --shadow: 0 18px 50px rgba(35, 57, 49, .09);
  --serif: "Playfair Display", Georgia, serif;
  --sans: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--cream); font-family: var(--sans); line-height: 1.55; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button { cursor: pointer; }
h1, h2, h3, p { margin-top: 0; }
h1, h2 { font-family: var(--serif); line-height: 1.08; }
em { color: var(--caramel); font-weight: 600; }

.app-shell { display: flex; min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 20; display: flex; width: 250px; flex-direction: column; padding: 32px 22px 20px; color: rgba(255,255,255,.82); background: var(--forest); }
.brand { display: flex; align-items: center; gap: 12px; color: var(--forest); }
.sidebar .brand { color: white; margin: 0 10px 52px; }
.brand-mark { display: grid; width: 42px; height: 42px; place-items: center; border: 1px solid currentColor; border-radius: 50% 50% 45% 55%; font-family: var(--serif); font-size: 24px; font-style: italic; }
.brand strong, .brand small { display: block; line-height: 1; }
.brand strong { font-family: var(--serif); font-size: 19px; }
.brand small { margin-top: 5px; letter-spacing: .25em; font-size: 8px; }
.sidebar nav { display: flex; flex: 1; flex-direction: column; gap: 7px; }
.nav-item { display: flex; align-items: center; gap: 13px; padding: 12px 13px; border-radius: 10px; font-size: 13px; font-weight: 600; transition: .2s ease; }
.nav-item:hover, .nav-item.active { color: white; background: rgba(255,255,255,.11); }
.nav-item span { width: 18px; font-size: 18px; text-align: center; }
.nav-label { margin: 30px 13px 4px; color: rgba(255,255,255,.4); font-size: 9px; font-weight: 700; letter-spacing: .18em; }
.sidebar-footer { display: grid; grid-template-columns: 36px 1fr auto; align-items: center; gap: 10px; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.13); }
.sidebar-footer strong, .sidebar-footer small { display: block; }
.sidebar-footer strong { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-footer small { color: rgba(255,255,255,.5); font-size: 9px; }
.avatar { display: inline-grid; width: 36px; height: 36px; place-items: center; flex: none; border-radius: 50%; color: white; background: var(--caramel); font-style: normal; font-weight: 700; }
.page-shell { display: flex; width: calc(100% - 250px); min-height: 100vh; margin-left: 250px; flex-direction: column; }
.topbar { display: flex; height: 76px; align-items: center; justify-content: space-between; padding: 0 clamp(25px, 5vw, 72px); border-bottom: 1px solid var(--line); background: rgba(251,250,246,.92); backdrop-filter: blur(12px); }
.topbar div span, .topbar div strong { display: block; }
.topbar div span { color: var(--caramel); font-size: 8px; font-weight: 700; letter-spacing: .2em; }
.topbar div strong { font-family: var(--serif); font-size: 14px; }
.help-link { color: var(--forest); font-size: 11px; font-weight: 700; }
.menu-button { display: none; border: 0; background: transparent; font-size: 22px; }
.content { width: min(1180px, calc(100% - 48px)); margin: 0 auto; padding: 44px 0 70px; }
.site-footer { margin-top: auto; padding: 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: 10px; text-align: center; }

.eyebrow, .section-heading span, .continue-copy > span, .module-hero > div > span, .lesson-content > header span, .login-card > span, .story-copy .kicker { color: var(--caramel); font-size: 9px; font-weight: 700; letter-spacing: .2em; }
.button { display: inline-flex; min-height: 44px; align-items: center; justify-content: center; gap: 20px; padding: 0 22px; border: 1px solid transparent; border-radius: 6px; font-size: 12px; font-weight: 700; transition: .2s ease; }
.button:hover { transform: translateY(-1px); box-shadow: 0 9px 25px rgba(39,76,64,.16); }
.button-primary { color: white; background: var(--forest); }
.button-secondary { border-color: var(--forest); color: var(--forest); background: transparent; }
.button-wide { width: 100%; }
.button:disabled { cursor: wait; opacity: .65; }
.flash { max-width: 1100px; margin: 0 auto 18px; padding: 13px 16px; border-radius: 8px; font-size: 12px; }
.flash-success { color: #20583e; background: #dfeee5; }
.flash-error { color: #793838; background: #f6e3e1; }
.progress { overflow: hidden; height: 5px; border-radius: 10px; background: #dce2dd; }
.progress i { display: block; height: 100%; border-radius: inherit; background: var(--caramel); }

.hero-dashboard { display: grid; grid-template-columns: 1fr 250px; align-items: end; gap: 60px; padding: 48px 54px; border-radius: 3px 3px 38px 3px; color: white; background: radial-gradient(circle at 83% 10%, rgba(180,206,188,.16), transparent 31%), linear-gradient(135deg, #24483d, #315e4f); box-shadow: var(--shadow); }
.hero-dashboard h1 { max-width: 650px; margin: 15px 0 16px; font-size: clamp(34px, 4vw, 55px); font-weight: 600; }
.hero-dashboard p { max-width: 560px; margin: 0; color: rgba(255,255,255,.7); font-size: 13px; }
.hero-score { padding: 22px; border: 1px solid rgba(255,255,255,.16); border-radius: 14px; background: rgba(255,255,255,.06); }
.hero-score > span { font-size: 8px; letter-spacing: .18em; }
.hero-score strong { display: block; margin: 5px 0 9px; font-family: var(--serif); font-size: 38px; }
.hero-score .progress { background: rgba(255,255,255,.2); }
.hero-score small { display: block; margin-top: 10px; color: rgba(255,255,255,.62); font-size: 9px; }
.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 20px 0 50px; }
.stat-grid article { display: flex; align-items: center; gap: 16px; padding: 19px 22px; border: 1px solid var(--line); border-radius: 9px; background: white; }
.stat-icon { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 50%; color: var(--forest); background: var(--sage-soft); font-size: 18px; }
.stat-grid small, .stat-grid strong { display: block; }
.stat-grid small { color: var(--muted); font-size: 8px; font-weight: 700; letter-spacing: .13em; }
.stat-grid strong { font-family: var(--serif); font-size: 24px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; margin: 38px 0 17px; }
.section-heading h2 { margin: 5px 0 0; font-size: 25px; }
.section-heading a { color: var(--forest); font-size: 11px; font-weight: 700; }
.continue-card { display: grid; grid-template-columns: 74px 1fr auto; align-items: center; gap: 24px; padding: 29px 32px; border: 1px solid var(--line); border-left: 4px solid var(--caramel); border-radius: 8px; background: white; box-shadow: 0 10px 30px rgba(39,76,64,.05); }
.module-number { color: var(--sage); font-family: var(--serif); font-size: 43px; }
.continue-copy h3 { margin: 5px 0; font-family: var(--serif); font-size: 22px; }
.continue-copy p { margin: 0; color: var(--muted); font-size: 11px; }
.mini-module-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 11px; }
.mini-module { display: flex; min-height: 150px; flex-direction: column; padding: 18px; border: 1px solid var(--line); border-radius: 8px; background: white; }
.mini-module > span { color: var(--forest); font-size: 20px; }
.mini-module small { margin-top: 18px; color: var(--caramel); font-size: 7px; letter-spacing: .15em; }
.mini-module strong { margin-top: 3px; font-family: var(--serif); font-size: 14px; line-height: 1.25; }
.mini-module i { margin-top: auto; color: var(--forest); font-size: 9px; font-style: normal; font-weight: 700; }
.mini-module.locked { color: #98a09c; background: #f1f1ed; pointer-events: none; }

.page-intro { display: flex; align-items: center; justify-content: space-between; gap: 30px; margin-bottom: 34px; }
.page-intro h1 { margin: 8px 0; font-size: 42px; }
.page-intro p { max-width: 650px; margin: 0; color: var(--muted); font-size: 13px; }
.ring { display: grid; width: 100px; height: 100px; place-content: center; flex: none; border-radius: 50%; background: radial-gradient(closest-side, var(--cream) 79%, transparent 80% 100%), conic-gradient(var(--caramel) calc(var(--value) * 1%), #dde3de 0); text-align: center; }
.ring strong, .ring small { display: block; }
.ring strong { font-family: var(--serif); font-size: 22px; }
.ring small { color: var(--muted); font-size: 8px; }
.module-list { display: grid; gap: 13px; }
.module-row { display: grid; grid-template-columns: 54px 1fr 150px; align-items: center; gap: 22px; padding: 24px 27px; border: 1px solid var(--line); border-radius: 10px; background: white; transition: .2s; }
.module-row:hover { border-color: #bdc9c1; transform: translateY(-1px); box-shadow: 0 10px 25px rgba(39,76,64,.05); }
.module-row.locked { background: #f2f2ee; opacity: .75; }
.module-icon { display: grid; width: 50px; height: 50px; place-items: center; border-radius: 50%; color: var(--forest); background: var(--sage-soft); font-size: 22px; }
.module-copy small { color: var(--caramel); font-size: 8px; font-weight: 700; letter-spacing: .13em; }
.module-copy h2 { margin: 4px 0; font-size: 20px; }
.module-copy p { margin: 0 0 7px; color: var(--muted); font-size: 11px; }
.module-copy > span { color: #8b948f; font-size: 9px; }
.module-state { text-align: right; }
.module-state > * { display: block; margin-left: auto; }
.module-state a { margin-top: 15px; color: var(--forest); font-size: 10px; font-weight: 700; }
.module-state > span { margin-top: 10px; color: var(--muted); font-size: 8px; }
.pill { display: inline-flex; width: max-content; padding: 4px 8px; border-radius: 20px; color: #747c78; background: #e7e9e6; font-size: 7px; font-style: normal; letter-spacing: .1em; }
.pill.success { color: #286447; background: #dceee3; }
.pill.current { color: #865333; background: #f2dfd1; }

.breadcrumbs { display: flex; gap: 10px; margin-bottom: 17px; color: var(--muted); font-size: 10px; }
.breadcrumbs a { color: var(--forest); font-weight: 700; }
.module-hero { display: flex; align-items: end; justify-content: space-between; gap: 30px; margin-bottom: 24px; padding: 29px 34px; border-radius: 8px; color: white; background: linear-gradient(135deg, #274c40, #3a6858); }
.module-hero h1 { margin: 7px 0; font-size: 34px; }
.module-hero p { max-width: 730px; margin: 0; color: rgba(255,255,255,.68); font-size: 11px; }
.module-hero > div:last-child { min-width: 100px; text-align: right; }
.module-hero > div:last-child strong, .module-hero > div:last-child small { display: block; }
.module-hero > div:last-child strong { font-family: var(--serif); font-size: 27px; }
.module-hero > div:last-child small { color: rgba(255,255,255,.6); font-size: 8px; }
.learning-layout { display: grid; grid-template-columns: 260px 1fr; gap: 20px; align-items: start; }
.lesson-nav { position: sticky; top: 20px; overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: white; }
.lesson-nav > span { display: block; padding: 16px 18px 10px; color: var(--muted); font-size: 8px; font-weight: 700; letter-spacing: .13em; }
.lesson-nav a { display: flex; align-items: center; gap: 12px; padding: 13px 16px; border-top: 1px solid #edf0ec; }
.lesson-nav a.active { background: var(--sage-soft); }
.lesson-nav a i { display: grid; width: 26px; height: 26px; place-items: center; flex: none; border-radius: 50%; color: var(--forest); background: #edf2ee; font-size: 9px; font-style: normal; font-weight: 700; }
.lesson-nav a.active i { color: white; background: var(--forest); }
.lesson-nav a strong, .lesson-nav a small { display: block; }
.lesson-nav a strong { font-size: 10px; line-height: 1.3; }
.lesson-nav a small { margin-top: 3px; color: var(--muted); font-size: 8px; }
.lesson-nav .quiz-link { border-top: 3px solid var(--sand); }
.lesson-nav .quiz-link.disabled { opacity: .48; pointer-events: none; }
.lesson-content { overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: white; }
.lesson-content > header { padding: 31px 42px 25px; border-bottom: 1px solid var(--line); }
.lesson-content > header h2 { margin: 7px 0 0; font-size: 31px; }
.rich-copy { padding: 36px 42px; font-size: 13px; line-height: 1.75; }
.rich-copy h3 { margin: 35px 0 10px; color: var(--forest); font-family: var(--serif); font-size: 20px; }
.rich-copy h3:first-child { margin-top: 0; }
.lead-copy { color: #43524c; font-family: var(--serif); font-size: 18px; line-height: 1.55; }
.content-list { padding-left: 0; list-style: none; }
.content-list li { position: relative; margin: 8px 0; padding-left: 24px; }
.content-list li::before { position: absolute; left: 2px; content: "✓"; color: var(--caramel); font-weight: 700; }
.steps-list { padding: 0; counter-reset: steps; list-style: none; }
.steps-list li { display: grid; grid-template-columns: 28px 1fr; align-items: center; gap: 12px; margin: 10px 0; counter-increment: steps; }
.steps-list li::before { display: grid; width: 28px; height: 28px; place-items: center; border-radius: 50%; color: var(--forest); background: var(--sage-soft); content: counter(steps); font-size: 10px; font-weight: 700; }
.callout { margin: 24px 0; padding: 18px 20px; border-left: 3px solid var(--sage); border-radius: 3px 8px 8px 3px; background: #edf3ee; }
.callout strong { color: var(--forest); font-family: var(--serif); }
.callout p { margin: 5px 0 0; font-size: 11px; }
.callout.warning { border-color: var(--caramel); background: #faf0e9; }
.callout.danger { border-color: var(--danger); background: #f8e9e7; }
.callout.success { border-color: var(--success); background: #e8f2eb; }
.callout.neutral { border-color: #8d9993; background: #f0f2ef; }
.script-box { position: relative; margin: 26px 0; padding: 27px 25px 20px; border: 1px solid #d5dfd8; border-radius: 7px; background: #f7faf7; }
.script-box span { position: absolute; top: -9px; left: 18px; padding: 2px 8px; color: white; background: var(--forest); font-size: 7px; font-weight: 700; letter-spacing: .13em; }
.script-box p { margin: 0; color: var(--forest); font-family: var(--serif); font-size: 16px; font-style: italic; }
.table-wrap { overflow-x: auto; margin: 22px 0; }
table { width: 100%; border-collapse: collapse; font-size: 11px; }
th, td { padding: 13px 14px; border: 1px solid var(--line); text-align: left; vertical-align: top; }
th { color: white; background: var(--forest); font-size: 9px; letter-spacing: .08em; }
td:first-child { width: 28%; font-weight: 700; }
.lesson-footer { display: flex; justify-content: flex-end; padding: 22px 42px; border-top: 1px solid var(--line); background: #fbfbf8; }
.completed-label { color: var(--success); font-size: 11px; font-weight: 700; }

.quiz-intro { max-width: 760px; margin: 0 auto 30px; text-align: center; }
.quiz-intro h1 { margin: 10px 0; font-size: 40px; }
.quiz-intro p { color: var(--muted); font-size: 12px; }
.quiz-intro > div { display: flex; justify-content: center; gap: 25px; color: var(--forest); font-size: 9px; font-weight: 700; }
.quiz-form { display: grid; max-width: 820px; gap: 15px; margin: auto; }
.question-card { margin: 0; padding: 25px 28px; border: 1px solid var(--line); border-radius: 9px; background: white; }
.question-card legend { width: 100%; padding: 0 0 15px; font-family: var(--serif); font-size: 18px; }
.question-card legend small { display: block; margin-bottom: 5px; color: var(--caramel); font-family: var(--sans); font-size: 7px; letter-spacing: .15em; }
.question-card label { display: flex; align-items: center; gap: 11px; margin: 8px 0; padding: 11px 13px; border: 1px solid var(--line); border-radius: 7px; cursor: pointer; font-size: 11px; }
.question-card label:has(input:checked) { border-color: var(--forest); background: var(--sage-soft); }
.question-card input { position: absolute; opacity: 0; }
.question-card label > span { display: grid; width: 25px; height: 25px; place-items: center; flex: none; border-radius: 50%; color: var(--forest); background: #edf1ed; font-size: 9px; font-weight: 700; }
.question-card label:has(input:checked) > span { color: white; background: var(--forest); }
.result-hero { margin-bottom: 25px; padding: 38px; border-radius: 12px; text-align: center; }
.result-hero.passed { color: #20593e; background: #dfeee5; }
.result-hero.failed { color: #793838; background: #f6e3e1; }
.result-hero span, .result-hero strong, .result-hero p { display: block; }
.result-hero span { font-size: 9px; font-weight: 700; letter-spacing: .18em; }
.result-hero strong { font-family: var(--serif); font-size: 58px; }
.result-hero p { margin: 0; font-size: 12px; }
.review-list { display: grid; gap: 10px; }
.review-item { display: grid; grid-template-columns: 35px 1fr; gap: 15px; padding: 20px; border: 1px solid var(--line); border-radius: 8px; background: white; }
.review-item > span { display: grid; width: 30px; height: 30px; place-items: center; border-radius: 50%; color: white; font-weight: 700; }
.review-item.correct > span { background: var(--success); }
.review-item.wrong > span { background: var(--danger); }
.review-item small { color: var(--caramel); font-size: 7px; letter-spacing: .12em; }
.review-item h3 { margin: 3px 0 7px; font-family: var(--serif); font-size: 16px; }
.review-item p { margin: 3px 0; font-size: 10px; }
.review-item em { display: block; margin-top: 8px; color: var(--muted); font-size: 10px; font-style: normal; }
.actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 25px; }

.score-seal { display: grid; width: 110px; height: 110px; place-content: center; flex: none; border: 1px solid var(--caramel); border-radius: 50%; text-align: center; }
.score-seal strong, .score-seal small { display: block; }
.score-seal strong { color: var(--forest); font-family: var(--serif); font-size: 28px; }
.score-seal small { color: var(--muted); font-size: 8px; text-transform: uppercase; }
.score-table, .student-table { overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: white; }
.score-head, .score-row { display: grid; grid-template-columns: 1.8fr .7fr .7fr .8fr; align-items: center; gap: 15px; padding: 15px 20px; }
.score-head, .student-head { color: var(--muted); background: #f0f2ee; font-size: 8px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.score-row { border-top: 1px solid var(--line); font-size: 11px; }
.score-row > span:first-child { display: flex; align-items: center; gap: 14px; font-weight: 700; }
.score-row > span:first-child b { color: var(--caramel); font-family: var(--serif); font-size: 18px; }
.certificate-callout { display: flex; align-items: center; justify-content: space-between; margin-top: 25px; padding: 25px 30px; border-radius: 10px; color: white; background: var(--forest); }
.certificate-callout > div { display: grid; grid-template-columns: 40px 1fr; align-items: center; column-gap: 15px; }
.certificate-callout > div > span { grid-row: span 2; font-size: 30px; }
.certificate-callout h2, .certificate-callout p { margin: 0; }
.certificate-callout h2 { font-size: 20px; }
.certificate-callout p { color: rgba(255,255,255,.6); font-size: 10px; }
.certificate-callout .button { color: var(--forest); background: white; }

.admin-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; margin-bottom: 28px; }
.admin-summary article { padding: 22px; border: 1px solid var(--line); border-radius: 8px; background: white; }
.admin-summary small, .admin-summary strong { display: block; }
.admin-summary small { color: var(--muted); font-size: 8px; letter-spacing: .1em; }
.admin-summary strong { font-family: var(--serif); font-size: 29px; }
.student-head, .student-row { display: grid; grid-template-columns: 1.6fr 1.2fr .5fr .5fr .5fr; align-items: center; gap: 18px; padding: 15px 20px; }
.student-row { border-top: 1px solid var(--line); font-size: 11px; }
.student-row > span:first-child { display: flex; align-items: center; gap: 10px; }
.student-row > span:first-child strong, .student-row > span:first-child small { display: block; }
.student-row > span:first-child small { color: var(--muted); font-size: 8px; }
.student-row > span:nth-child(2) small { color: var(--muted); font-size: 8px; }
.student-row .progress { width: 100%; margin-bottom: 5px; }
.text-button { padding: 4px 9px; border: 0; border-radius: 20px; color: #7b4848; background: #f3dddd; font-size: 8px; font-weight: 700; }
.text-button.active { color: #255d42; background: #dceee3; }
.empty-state { padding: 50px; color: var(--muted); text-align: center; }
dialog { width: min(460px, calc(100% - 30px)); padding: 0; border: 0; border-radius: 12px; box-shadow: 0 30px 80px rgba(0,0,0,.24); }
dialog::backdrop { background: rgba(28,45,39,.7); backdrop-filter: blur(3px); }
.dialog-card { position: relative; padding: 34px; }
.dialog-card h2 { margin: 8px 0; font-size: 28px; }
.dialog-card p { color: var(--muted); font-size: 11px; }
.dialog-close { position: absolute; top: 15px; right: 17px; border: 0; color: var(--muted); background: none; font-size: 25px; }
.dialog-card label { display: block; margin: 15px 0; font-size: 10px; font-weight: 700; }
.dialog-card label small { color: var(--muted); font-size: 8px; font-weight: 400; }
.dialog-card input, .form-stack input { width: 100%; height: 45px; margin-top: 5px; padding: 0 13px; border: 1px solid var(--line); border-radius: 6px; outline: none; background: white; }
.dialog-card input:focus, .form-stack input:focus { border-color: var(--forest); box-shadow: 0 0 0 3px var(--sage-soft); }

.narrow-card { max-width: 550px; margin: 40px auto; padding: 38px; border: 1px solid var(--line); border-radius: 12px; background: white; box-shadow: var(--shadow); }
.narrow-card h1 { margin: 8px 0; font-size: 35px; }
.narrow-card > p { color: var(--muted); font-size: 12px; }
.form-stack { display: grid; gap: 18px; }
.form-stack label { font-size: 10px; font-weight: 700; }

.auth-shell { min-height: 100vh; background: var(--sand); }
.login-page { display: grid; min-height: 100vh; grid-template-columns: 1.15fr .85fr; }
.login-story { position: relative; display: flex; overflow: hidden; min-height: 680px; flex-direction: column; justify-content: space-between; padding: clamp(35px, 6vw, 80px); color: white; background: radial-gradient(circle at 10% 90%, rgba(194,143,103,.25), transparent 30%), radial-gradient(circle at 85% 12%, rgba(171,201,181,.14), transparent 27%), linear-gradient(145deg, #1f4036, #315e4f); }
.login-story::after { position: absolute; right: -140px; bottom: -120px; width: 500px; height: 500px; border: 1px solid rgba(255,255,255,.1); border-radius: 48% 52% 45% 55%; content: ""; transform: rotate(25deg); }
.brand-light { position: relative; z-index: 1; color: white; }
.story-copy { position: relative; z-index: 1; max-width: 690px; }
.story-copy h1 { margin: 16px 0 24px; font-size: clamp(45px, 6vw, 76px); font-weight: 600; }
.story-copy p { max-width: 530px; color: rgba(255,255,255,.68); font-size: 14px; }
.login-story blockquote { position: relative; z-index: 1; max-width: 520px; margin: 0; padding-left: 18px; border-left: 2px solid var(--caramel); color: rgba(255,255,255,.75); font-family: var(--serif); font-size: 14px; font-style: italic; }
.login-panel { display: grid; place-items: center; padding: 40px; background: var(--sand); }
.login-card { width: min(390px, 100%); }
.login-card h2 { margin: 9px 0; font-size: 39px; }
.login-card > p { margin-bottom: 34px; color: var(--muted); font-size: 12px; }
.login-card .form-stack input { height: 50px; background: rgba(255,255,255,.75); }
.login-card .button { margin-top: 8px; }
.privacy-note { display: block; margin-top: 26px; color: #8a948f; font-size: 8px; text-align: center; }

.certificate-page { display: grid; min-height: 100vh; place-items: center; gap: 20px; padding: 40px; background: #e8e4da; }
.certificate { position: relative; width: min(1050px, 100%); min-height: 700px; padding: 75px 100px; border: 12px solid white; outline: 1px solid var(--caramel); outline-offset: -27px; background: radial-gradient(circle at 50% -20%, #fff 0, #fbf8f0 48%, #f1ecdf 100%); text-align: center; box-shadow: 0 30px 70px rgba(0,0,0,.15); }
.certificate-logo { display: grid; width: 70px; height: 70px; margin: 0 auto 10px; place-items: center; border: 1px solid var(--forest); border-radius: 50%; color: var(--forest); font-family: var(--serif); font-size: 38px; font-style: italic; }
.certificate > small { color: var(--caramel); font-weight: 700; letter-spacing: .25em; }
.certificate h1 { margin: 38px 0; color: var(--forest); font-size: 55px; }
.certificate h2 { margin: 12px 0 22px; color: var(--caramel); font-size: 43px; }
.certificate h3 { color: var(--forest); font-family: var(--serif); font-size: 24px; }
.certificate p { max-width: 650px; margin: 10px auto; color: var(--muted); font-size: 13px; }
.certificate-meta { position: absolute; right: 80px; bottom: 60px; left: 80px; display: flex; justify-content: space-between; padding-top: 15px; border-top: 1px solid #c9c3b6; color: var(--muted); font-size: 10px; text-align: left; }
.certificate-meta span:last-child { text-align: right; }
.certificate-meta b { color: var(--forest); }

@media (max-width: 1050px) {
  .mini-module-grid { grid-template-columns: repeat(3, 1fr); }
  .student-head, .student-row { grid-template-columns: 1.5fr 1fr .5fr .5fr; }
  .student-head span:nth-child(4), .student-row > span:nth-child(4) { display: none; }
}

@media (max-width: 820px) {
  .sidebar { transform: translateX(-100%); transition: transform .25s; }
  .sidebar.open { transform: translateX(0); box-shadow: 20px 0 50px rgba(0,0,0,.2); }
  .page-shell { width: 100%; margin-left: 0; }
  .menu-button { display: block; }
  .topbar { justify-content: flex-start; gap: 17px; padding: 0 20px; }
  .topbar .help-link { margin-left: auto; }
  .content { width: min(100% - 30px, 700px); padding-top: 25px; }
  .hero-dashboard { grid-template-columns: 1fr; gap: 25px; padding: 35px 28px; }
  .hero-score { max-width: 320px; }
  .stat-grid { grid-template-columns: 1fr; }
  .continue-card { grid-template-columns: 60px 1fr; }
  .continue-card .button { grid-column: 1 / -1; }
  .mini-module-grid { grid-template-columns: repeat(2, 1fr); }
  .module-row { grid-template-columns: 45px 1fr; }
  .module-state { grid-column: 2; text-align: left; }
  .module-state > * { margin-left: 0; }
  .learning-layout { grid-template-columns: 1fr; }
  .lesson-nav { position: static; }
  .page-intro { align-items: flex-start; }
  .login-page { grid-template-columns: 1fr; }
  .login-story { min-height: 480px; }
  .login-panel { min-height: 560px; }
  .certificate { min-height: 620px; padding: 55px 50px; }
  .certificate-meta { right: 45px; bottom: 45px; left: 45px; }
}

@media (max-width: 580px) {
  .help-link { display: none; }
  .hero-dashboard h1, .page-intro h1, .quiz-intro h1 { font-size: 33px; }
  .stat-grid { margin-bottom: 35px; }
  .section-heading { align-items: flex-start; }
  .continue-card { grid-template-columns: 1fr; padding: 23px; }
  .continue-card .button { grid-column: auto; }
  .mini-module-grid { grid-template-columns: 1fr; }
  .module-row { grid-template-columns: 1fr; padding: 22px; }
  .module-state { grid-column: 1; }
  .page-intro { display: block; }
  .page-intro .ring, .score-seal { margin-top: 20px; }
  .module-hero { align-items: flex-start; flex-direction: column; }
  .module-hero > div:last-child { text-align: left; }
  .lesson-content > header, .rich-copy, .lesson-footer { padding-right: 22px; padding-left: 22px; }
  .question-card { padding: 20px; }
  .quiz-intro > div { align-items: center; flex-direction: column; gap: 5px; }
  .score-head { display: none; }
  .score-row { grid-template-columns: 1fr 1fr; }
  .score-row > span:first-child { grid-column: 1 / -1; }
  .admin-summary { grid-template-columns: 1fr; }
  .student-head { display: none; }
  .student-row { grid-template-columns: 1fr 1fr; }
  .student-row > span:first-child, .student-row > span:nth-child(2) { grid-column: 1 / -1; }
  .certificate-callout { align-items: flex-start; flex-direction: column; gap: 20px; }
  .login-story { min-height: 520px; padding: 35px 25px; }
  .story-copy h1 { font-size: 44px; }
  .login-panel { padding: 55px 25px; }
  .certificate-page { padding: 15px; }
  .certificate { min-height: 650px; padding: 50px 25px; border-width: 6px; }
  .certificate h1 { font-size: 38px; }
  .certificate h2 { font-size: 30px; }
  .certificate-meta { right: 30px; bottom: 35px; left: 30px; }
}

@media print {
  .no-print { display: none !important; }
  .certificate-page { padding: 0; background: white; }
  .certificate { width: 100%; min-height: 100vh; box-shadow: none; }
}
