/* Shared flat interface: tokens, controls, and page compositions. */
:root {
  --font: 'DM Sans', sans-serif;
  --font-display: 'Manrope', sans-serif;
  --ink: #182b2b;
  --navy: #182b2b;
  --teal: #08766b;
  --bright: #08766b;
  --slate: #425958;
  --muted: #60716f;
  --ink-soft: #60716f;
  --line: #dce4df;
  --paper: #f6f7f3;
  --cream: #f6f7f3;
  --white: #fff;
  --nav: #fff;
  --shadow: none;
  --accent-soft: #e2f1e9;
  --accent-hover: #065e55;
  --pink: #fcebee; --pink-ink: #a52b4b;
  --peach: #fbefe6; --peach-ink: #995023;
  --blue: #e9f1fc; --blue-ink: #285b97;
  --yellow: #fbf4d9; --yellow-ink: #7b6011;
  --green: #e5f3e7; --green-ink: #276b40;
  --purple: #f0eafa; --purple-ink: #69459a;
  --mint: #e2f1e9; --mint-ink: #07685d;
  --nav-w: 272px;
  --nav-rail-w: 76px;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { scroll-padding-top: 24px; }
body, body.ai-page {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
body { accent-color: var(--teal); caret-color: var(--teal); }
::selection { background: #bde5d4; color: #123d34; }
* { scrollbar-width: thin; scrollbar-color: #a9bbb3 transparent; }
:where(a, button, summary, input, select, textarea):focus-visible { outline: 2px solid var(--teal); outline-offset: 4px; }
a { text-underline-offset: 4px; }
button, input, select, textarea { font-family: var(--font); }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .5; }
input::placeholder, textarea::placeholder { color: #647471; opacity: 1; }
h1, h2, h3, h4 { font-family: var(--font-display); }
h1, h2 { text-wrap: balance; letter-spacing: -.035em; }
h1 { font-weight: 750; }
img { max-width: 100%; }
[hidden] { display: none !important; }
.skip-link { position: fixed; left: 16px; top: -120px; padding: 12px 20px; background: var(--ink); color: white; z-index: 100; border-radius: 6px; }
.skip-link:focus { top: 16px; }
.sr-only { position: absolute; left: 0; top: 0; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.wrap { max-width: 1280px; padding: 0 clamp(24px, 4vw, 64px) 32px; }
.hand { font-family: var(--font-display); font-size: 20px; font-weight: 650; line-height: 1.4; }
.btn, .button, .account-page .btn {
  display: inline-flex; justify-content: center; align-items: center; gap: 12px;
  min-height: 46px; padding: 11px 20px; border: 1px solid var(--teal); border-radius: 6px;
  background: var(--teal); color: white; box-shadow: none;
  font: 600 14px/1.5 var(--font); text-decoration: none;
  transition: background .15s ease, border-color .15s ease;
}
.btn:hover, .button.primary:hover, .account-page .btn:hover { background: var(--accent-hover); color: white; border-color: var(--accent-hover); opacity: 1; }
.btn.ghost, .button:not(.primary), .account-page .btn.ghost { background: white; border-color: #c7d3cd; color: var(--ink); }
.btn.ghost:hover, .button:not(.primary):hover { background: var(--accent-soft); color: var(--teal); border-color: var(--teal); }
.button.danger { color: #a52b3b; border-color: #e3bfc6; background: #fff; }
:where(input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=hidden]), select, textarea) {
  min-height: 46px; padding: 11px 13px; border: 1px solid #bacbc1; border-radius: 6px;
  color: var(--ink); background: white; font-size: 14px; box-shadow: none;
}
:where(input, select, textarea):focus { border-color: var(--teal); outline: 2px solid var(--teal); outline-offset: 2px; }
input[type=checkbox], input[type=radio] { accent-color: var(--teal); }
.school-symbol { flex: none; width: 40px; height: 40px; display: grid; place-items: center; background: var(--teal); color: white; border-radius: 6px; }
.school-wordmark { display: block; color: var(--ink); font: 750 16px/1.3 var(--font-display); letter-spacing: -.025em; }
.school-wordmark > span { display: block; font-weight: 550; color: var(--slate); font-size: 13px; letter-spacing: 0; margin-top: 3px; }

/* Course navigation */
.course-nav { width: var(--nav-w); background: #fff; border-right: 1px solid var(--line); }
.nav-head { background: white; border-bottom: 1px solid var(--line); }
.nav-brand { flex-direction: row; align-items: center; gap: 12px; padding: 28px 22px 30px; }
.nav-icons { margin: 0 14px 20px; gap: 5px; }
.nav-icon { min-height: 46px; gap: 12px; border-radius: 6px; padding: 12px; font-size: 14px; font-weight: 500; }
.nav-icon svg { color: currentColor; }
.nav-icon.on { background: var(--ink); color: white; box-shadow: none; }
.nav-icon:hover { background: var(--accent-soft); color: var(--teal); }
.nav-mods { padding: 16px 14px 40px; gap: 3px; }
.nav-categories-heading { display: block; padding: 4px 12px 12px; font-size: 12px; font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--ink-soft); }
.nav-mod summary { font-size: 13px; line-height: 1.5; font-weight: 500; padding: 12px 10px; border-radius: 5px; gap: 8px; }
.nav-num { font-size: 11px; color: var(--ink-soft); }
.nav-mod[open] > summary { background: var(--accent-soft); color: var(--teal); }
.nav-lessons { padding: 6px 0 12px 12px; }
.nav-lesson { font-size: 12px; padding: 9px 10px; border-radius: 4px; }
.nav-lesson.on { background: var(--accent-soft); color: var(--teal); box-shadow: none; }
.nav-ln { width: 34px; font-size: 10px; }
.nav-collapse { width: 32px; height: 32px; border-radius: 5px; border: 1px solid var(--line); box-shadow: none; }
.nav-close { border-width: 1px; border-radius: 5px; }
.mobile-brand { margin-left: auto; color: var(--ink); font-size: 14px; font-weight: 700; text-decoration: none; }
body.nav-collapsed .nav-brand { padding-inline: 16px; }
body.nav-collapsed .school-wordmark { display: none; }
body.nav-collapsed .nav-brand .school-symbol { width: 40px; height: 40px; }
body.nav-collapsed .nav-categories-toggle { border-radius: 6px; }
body.nav-collapsed .nav-mods { border: 1px solid var(--line); border-radius: 6px; box-shadow: none; }
body.nav-collapsed .nav-mod.is-active > summary { box-shadow: none; background: var(--accent-soft); }

/* Course library */
.library-topbar { min-height: 88px; display: flex; justify-content: space-between; align-items: center; gap: 20px; border-bottom: 1px solid var(--line); font-size: 13px; }
.library-topbar > span { color: var(--ink-soft); }
.library-topbar a { display: flex; align-items: center; gap: 24px; color: var(--ink); text-decoration: none; font-weight: 600; }
.hero { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(250px, 1fr); align-items: center; gap: clamp(28px, 4vw, 72px); padding: 52px 0 40px; }
.hero h1 { font-size: clamp(42px, 4.5vw, 64px); line-height: 1.08; font-weight: 750; max-width: 15ch; margin: 0 0 24px; }
.hero .lede { font-size: 19px; font-weight: 500; color: var(--ink); line-height: 1.5; margin: 0 0 12px; }
.hero-description { max-width: 45ch; margin: 0; color: var(--slate); font-size: 15px; line-height: 1.8; }
.cta { gap: 18px; margin: 28px 0 0; }
.hero .btn { font-size: 13px; padding-inline: 18px; }
.hero-browse { font-size: 13px; font-weight: 600; color: var(--ink); display: inline-flex; align-items: center; gap: 14px; text-decoration: none; min-height: 44px; }
.hero-toolkit { background: #dfede5; padding: 28px; border-radius: 8px; align-self: stretch; display: flex; flex-direction: column; justify-content: center; }
.hero-toolkit h2 { margin: 0 0 24px; font-size: 25px; line-height: 1.35; font-weight: 650; }
.hero-toolkit > div { display: flex; gap: 16px; align-items: center; padding: 16px 0; border-top: 1px solid #bfd4c7; }
.hero-toolkit svg { flex: none; color: var(--teal); }
.hero-toolkit p { margin: 0; color: #3f5e52; font-size: 12px; line-height: 1.6; }
.hero-toolkit strong { display: block; font-size: 14px; font-weight: 650; margin-bottom: 3px; color: #1f3c30; }
.course-facts { display: flex; gap: 36px; flex-wrap: wrap; padding: 22px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); color: var(--ink-soft); font-size: 13px; }
.course-facts strong { color: var(--ink); font-weight: 650; font-size: 17px; margin-right: 5px; font-variant-numeric: tabular-nums; }
.course-access { display: flex; align-items: flex-start; gap: 10px; padding: 18px 0 0; color: var(--ink-soft); font-size: 12px; line-height: 1.7; }
.course-access svg { flex: none; margin-top: 2px; }
.course-access p { margin: 0; }
.secthead { display: flex; align-items: baseline; justify-content: space-between; margin: 46px 0 20px; gap: 12px; }
.secthead h2 { font-size: 27px; font-weight: 700; }
.secthead p { font-size: 12px; color: var(--ink-soft); }
.search { margin-bottom: 22px; }
.search input { min-height: 52px; padding-left: 46px; border-radius: 6px; box-shadow: none; font-size: 14px; }
.search svg { left: 18px; opacity: 1; stroke: var(--ink-soft); }
.mods { gap: 0; border-top: 1px solid var(--line); }
.mod { border: 0; border-bottom: 1px solid var(--line); border-radius: 0; box-shadow: none; background: transparent; overflow: visible; }
.mod[open] { border-color: var(--line); }
.mh { padding: 24px 8px; gap: 22px; }
.mh:hover { background: #edf2eb; }
.module-index { width: 44px; font-family: var(--font-display); font-size: 27px; font-weight: 500; color: #698174; font-variant-numeric: tabular-nums; flex: none; }
.mnum { font-size: 11px; font-weight: 500; text-transform: none; letter-spacing: 0; color: var(--teal); margin-bottom: 5px; }
.mt { font-family: var(--font-display); font-size: 19px; line-height: 1.4; font-weight: 700; }
.mp { font-size: 13px; line-height: 1.6; margin-top: 5px; max-width: 65ch; color: var(--ink-soft); }
.mcount { padding: 4px 0; border-radius: 0; font-size: 12px; color: var(--ink-soft); background: transparent; font-weight: 500; text-transform: none; letter-spacing: 0; }
.rows { border-top: 1px solid var(--line); background: white; padding: 8px 20px 8px 64px; }
.row { padding: 14px 8px; border-top: 1px solid #e9eeea; gap: 16px; min-height: 52px; }
.row:hover { background: #edf5ef; }
.rid { width: 28px; height: auto; background: none; border: 0; border-radius: 0; color: var(--ink-soft); font-size: 12px; font-weight: 500; }
.row:hover .rid { background: none; color: var(--teal); }
.rt { font-size: 14px; font-weight: 450; }
.rgo { opacity: 1; }
.pack { margin-top: 36px; padding: 28px 0; background: transparent; border-top: 1px solid var(--line); border-radius: 0; }
.pack h3 { font-size: 18px; margin-bottom: 10px; }
.pack p { font-size: 13px; max-width: 78ch; }

/* Authentication and billing */
.auth-split { padding-left: 0; grid-template-columns: minmax(320px, .9fr) minmax(0, 1.1fr); background: white; }
.auth-story { background: #e1eee5; padding: 40px clamp(28px, 5vw, 80px); }
.auth-brand { display: flex; align-items: center; gap: 12px; width: auto; text-decoration: none; }
.story-content { padding: 68px 0 48px; max-width: 450px; }
.story-content h2 { font-size: clamp(32px, 3.1vw, 46px); letter-spacing: -.035em; line-height: 1.2; font-weight: 700; margin: 0 0 24px; }
.story-content h2 em { color: var(--teal); }
.story-content > p { font-size: 15px; color: #3f5d50; line-height: 1.8; }
.study-methods { margin-top: 40px; }
.study-methods > div { border-top: 1px solid #bdd3c4; padding: 20px 0; display: flex; gap: 20px; }
.study-methods > div > span { font-size: 12px; font-variant-numeric: tabular-nums; color: #4c6e5b; padding-top: 3px; }
.study-methods p { color: #3f5d50; font-size: 13px; margin: 0; }
.study-methods strong { display: block; color: #193b2b; font-weight: 600; font-size: 15px; margin-bottom: 4px; }
.story-footer { color: #456653; font-size: 12px; }
.auth-main { padding: 40px clamp(24px, 5vw, 80px) 24px; }
.auth-top { font-size: 13px; }
.auth-top a { color: var(--slate); }
.auth-form-wrap { padding: 60px 0; max-width: 480px; }
.auth-head, .auth-split .auth-head { margin-bottom: 30px; }
.auth-head h1, .auth-split .auth-head h1 { font-size: clamp(30px, 3vw, 40px); line-height: 1.2; letter-spacing: -.035em; margin: 0 0 14px; font-weight: 700; }
.auth-head p, .auth-split .auth-head p { font-size: 14px; color: var(--ink-soft); line-height: 1.8; }
.auth-card { border: 1px solid var(--line); border-radius: 8px; box-shadow: none; padding: 28px; gap: 8px; }
.auth-split .auth-card { padding: 0; background: transparent; border: 0; box-shadow: none; }
.auth-card label, .auth-split .auth-card label { font-size: 13px; color: var(--ink); font-weight: 600; margin-top: 14px; }
.auth-card input[type=text], .auth-card input[type=email], .auth-card input[type=password], .auth-split .auth-card input { border: 1px solid #bacbc1; border-radius: 6px; min-height: 48px; padding: 12px 14px; background: white; font-size: 15px; }
.auth-card input:focus, .account-page .auth-card input:focus { border-color: var(--teal); outline: 2px solid var(--teal); outline-offset: 2px; }
.auth-split .btn { margin-top: 20px; border-radius: 6px; min-height: 48px; font-size: 14px; }
.auth-switch, .auth-alt { font-size: 13px; line-height: 1.8; }
.auth-alt { color: var(--teal); }
.field-hint, .secure-note, .checkout-note { font-size: 12px; color: var(--ink-soft); line-height: 1.8; }
.field-error { color: #a52b3b; font-size: 13px; }
.auth-status { background: var(--accent-soft); border-radius: 6px; color: #1f5946; padding: 16px; font-size: 14px; }
.signup-steps { padding: 0 0 24px; margin: 0 0 30px; border-bottom: 1px solid var(--line); gap: 16px; }
.signup-steps li { font-size: 12px; color: var(--ink-soft); gap: 8px; }
.step-number { border-radius: 4px; border: 1px solid #bfcec5; width: 26px; height: 26px; font-size: 11px; }
.signup-steps .is-current .step-number, .signup-steps .is-complete .step-number { background: var(--teal); color: white; border-color: var(--teal); }
.plan-card { padding: 20px; border: 1px solid #c9d7cd; border-radius: 6px; background: white; box-shadow: none; }
.plan-card:has(input:checked) { background: #edf7f0; border: 1px solid var(--teal); box-shadow: none; outline: none; }
.plan-card:focus-within { outline: 2px solid var(--teal); outline-offset: 3px; }
.plan-badge { font-size: 11px; letter-spacing: .02em; font-weight: 600; color: var(--teal); background: transparent; }
.plan-price strong { font-family: var(--font-display); font-size: 29px; font-weight: 700; letter-spacing: -.03em; }
.plan-description, .plan-terms { font-size: 12px; color: var(--slate); line-height: 1.8; }
.plan-inclusions { background: var(--paper); padding: 20px; border-radius: 6px; }
.plan-feature { font-size: 13px; }
.checkout-summary { padding: 24px; background: var(--paper); border: 1px solid var(--line); border-radius: 8px; box-shadow: none; }
.summary-row { font-size: 14px; gap: 16px; }
.summary-total { border-top: 1px solid var(--line); }
.summary-total strong { font-family: var(--font-display); font-size: 28px; }
.checkout-summary > p { font-size: 13px; color: var(--slate); line-height: 1.8; }
.checkout-identity { border: 1px solid var(--line); border-radius: 6px; background: white; padding: 18px; font-size: 13px; }

/* Account */
.account-wrap { max-width: 1280px; padding-top: 30px; }
.page-topline { font-size: 13px; margin-bottom: 40px; padding-bottom: 24px; border-bottom: 1px solid var(--line); }
.account-page .auth-head { margin-bottom: 28px; align-items: flex-start; }
.account-page h1 { font-size: clamp(32px, 4vw, 46px); font-weight: 700; }
.account-page .auth-head p { font-size: 14px; }
.account-identity { padding: 24px 0; gap: 16px; }
.account-avatar { border: 0; border-radius: 6px; background: var(--accent-soft); font: 600 24px var(--font-display); }
.account-identity strong { font-size: 16px; }
.account-identity > div span, .account-identity-label { font-size: 13px; }
.account-sections { margin-bottom: 32px; gap: 28px; }
.account-sections a { font-size: 13px; padding: 16px 0; }
.account-page .auth-card { padding: 28px; border-radius: 8px; box-shadow: none; }
.account-page .auth-card h2 { font-size: 22px; margin: 0 0 12px; font-weight: 650; }
.account-page .membership-card { background: #e5efe7; border: 0; gap: 28px; padding: 32px; }
.membership-details p { font-size: 14px; line-height: 1.8; }
.membership-inclusions { border-left: 1px solid #bed2c3; padding-left: 28px; }
.membership-inclusions ul { font-size: 13px; line-height: 1.7; }
.membership-details .auth-alt { font-size: 13px; }
.account-forms { gap: 24px; margin-top: 28px; }
.account-page .card-description { font-size: 13px; }
.account-page .auth-card label { font-size: 13px; }
.account-page .auth-card input { background: white; font-size: 15px; }
.account-bottom { margin-top: 32px; font-size: 14px; }
.account-bottom p { font-size: 13px; }

/* Policies and contact */
.information-wrap { max-width: 1280px; padding-top: 30px; }
.information-topline { border-bottom: 1px solid var(--line); padding-bottom: 24px; margin-bottom: 42px; }
.information-back { font-size: 13px; }
.information-wrap .auth-head { max-width: 760px; margin-bottom: 32px; }
.information-wrap .auth-head h1 { font-size: clamp(36px, 4vw, 48px); }
.information-wrap .auth-head p { font-size: 15px; line-height: 1.8; }
.information-nav { padding-bottom: 0; margin-bottom: 36px; gap: 20px; }
.information-nav a { padding: 14px 0; font-size: 13px; border: 0; border-bottom: 2px solid transparent; border-radius: 0; gap: 16px; }
.information-nav a[aria-current=page] { color: var(--teal); background: transparent; border: 0; border-bottom: 2px solid var(--teal); }
.information-nav a[aria-current=page] > span { color: var(--teal); }
.information-nav a:hover { background: transparent; color: var(--teal); }
.information-grid { grid-template-columns: 180px minmax(0, 1fr); gap: 40px; }
.information-label { font-size: 12px; letter-spacing: 0; }
.information-sidebar nav > a { font-size: 13px; padding: 9px 0; }
.information-sidebar nav > a > span { display: none; }
.information-help p, .information-help > a { font-size: 13px; }
.information-content { padding: 0 0 0 32px; background: transparent; border: 0; border-left: 1px solid var(--line); border-radius: 0; box-shadow: none; font-size: 15px; line-height: 1.9; }
.information-content h2 { font-size: 21px; font-weight: 650; margin-bottom: 14px; }
.information-content h2::before { display: none; }
.information-content section + section { margin-top: 36px; padding-top: 32px; border-color: var(--line); }
.contact-details { border: 0; background: var(--accent-soft); border-radius: 6px; padding: 24px; }
.contact-details dt { font-size: 12px; text-transform: none; letter-spacing: 0; }
.contact-details dd { font-size: 19px; }

/* Study tutor */
.ai-layout { max-width: 1600px; padding: 0; }
.ai-threads { width: 214px; padding: 28px 16px; background: var(--paper); border-right: 1px solid var(--line); }
.ai-sidebar-label { font-size: 11px; letter-spacing: 0; }
.ai-threads > .ai-sidebar-label:first-child { display: none; }
.ai-new { font-size: 13px; border-radius: 6px; }
.ai-thread-item, .ai-thread-item a { border-radius: 5px; }
.ai-thread-item a { font-size: 13px; padding: 12px 10px; }
.ai-thread-item.is-current { background: var(--accent-soft); }
.ai-thread-item.is-current a { color: var(--teal); }
.ai-threads-empty { font-size: 13px; line-height: 1.8; }
.ai-sidebar-note { padding: 24px 4px 0; }
.ai-sidebar-note p, .ai-sidebar-note a { font-size: 12px; }
.ai-shell { border: 0; border-radius: 0; background: white; box-shadow: none; }
.ai-head { padding: 24px 32px; min-height: 88px; border-bottom: 1px solid var(--line); }
.ai-mark { border-radius: 6px; background: var(--accent-soft); }
.ai-head h1 { font: 650 19px/1.4 var(--font-display); letter-spacing: -.025em; }
.ai-thread { padding: 32px clamp(20px, 4vw, 56px); gap: 28px; }
.ai-welcome { text-align: left; padding: 36px 0; max-width: 720px; width: 100%; margin: auto; }
.ai-welcome-mark { width: 50px; height: 50px; border: 0; background: var(--accent-soft); border-radius: 8px; margin: 0 0 24px; transform: none; }
.ai-welcome-mark svg { transform: none; width: 28px; height: 28px; }
.ai-welcome h2 { font-size: clamp(30px, 3.4vw, 46px); font-weight: 650; line-height: 1.2; letter-spacing: -.035em; }
.ai-welcome > p { font-size: 14px; line-height: 1.8; margin: 0; max-width: 55ch; }
.ai-prompts { margin-top: 32px; }
.ai-prompts > .lbl { display: none; }
.chips { display: flex; flex-direction: column; gap: 0; border-top: 1px solid var(--line); }
.ai-chip { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 8px; padding: 18px 4px; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: transparent; }
.ai-chip:hover { background: var(--paper); border-color: var(--line); }
.ai-chip-category { grid-column: 2; grid-row: 1; width: auto; font-size: 0; }
.ai-chip-category > span { font-size: 20px; }
.ai-chip strong { grid-column: 1; grid-row: 1; font-size: 14px; font-weight: 550; }
.ai-chip > span:last-child { display: none; }
.msg-avatar { border-radius: 6px; background: var(--accent-soft); }
.bubble { background: var(--paper); border: 0; border-radius: 6px; padding: 18px 20px; }
.msg.user .bubble { background: var(--accent-soft); border: 0; border-radius: 6px; }
.who { font-size: 11px; letter-spacing: 0; text-transform: none; }
.bubble p:last-child, .msg-body { font-size: 14px; line-height: 1.9; }
.msg.error .bubble { background: #fcebee; color: #a52b3b; }
.ai-compose-area { padding: 0 32px; background: white; }
.ai-composer { border: 1px solid #bacbc1; border-radius: 8px; box-shadow: none; padding: 8px; }
.ai-composer textarea { font-size: 15px; border: 0; border-radius: 0; background: transparent; padding: 10px; }
.ai-composer:focus-within { box-shadow: none; border-color: var(--teal); outline: 2px solid var(--teal); outline-offset: 2px; }
.ai-send { border-radius: 5px; }
.ai-note { font-size: 11px; margin-top: 12px; }
.ai-page .site-footer { font-size: 11px; padding: 14px 0; }

/* Interactive lesson components retain their distinct content and states. */
[data-page=lesson] .wrap { max-width: 1280px; gap: 24px; padding-top: 36px; }
[data-page=lesson] .wrap > header { padding: 0 0 28px; border-bottom: 1px solid var(--line); }
[data-page=lesson] h1 { font-size: clamp(30px, 3.4vw, 46px); line-height: 1.2; margin: 16px 0 12px; letter-spacing: -.035em; }
[data-page=lesson] .sub { font-size: 15px; line-height: 1.8; }
[data-page=lesson] .pill { border-radius: 4px; font-size: 11px; padding: 5px 10px; letter-spacing: .025em; }
[data-page=lesson] .stack { gap: 24px; }
[data-page=lesson] :is(.side, .cd, .tabpanel, .tblwrap, .drugs, .step, .callout, .quiz, .split, .figrow, .calc, .interp, .recall, .ordering, .sorter, .scenario) { border-radius: 8px; box-shadow: none; border-width: 1px; }
[data-page=lesson] :is(.side, .cd) { padding: 24px; }
[data-page=lesson] :is(.side h3, .cd h4, .split h4) { font-size: 19px; line-height: 1.4; }
[data-page=lesson] :is(.side .lead, .cd p, ul.cl li, .step p, .callout p) { font-size: 14px; line-height: 1.8; }
[data-page=lesson] .grp h4 { font-size: 11px; opacity: 1; letter-spacing: .035em; }
[data-page=lesson] .figs { background: #ffffffb3; border-radius: 6px; padding: 18px; }
[data-page=lesson] .mnem { border: 1px solid var(--line); border-radius: 6px; padding: 18px; }
[data-page=lesson] .mnem .hand { font-family: var(--font-display); font-size: 22px; }
[data-page=lesson] :is(.tab, .dchip, .dockbtn, .overlay-x, .audio-speed, .audio-captions, .audio-field select) { border-radius: 6px; border-width: 1px; box-shadow: none; }
[data-page=lesson] .tab { min-height: 44px; font-size: 13px; }
[data-page=lesson] .tab:hover { transform: none; background: var(--accent-soft); }
[data-page=lesson] .tab[aria-pressed=true] { background: var(--accent-soft); box-shadow: none; }
[data-page=lesson] table.tbl th { background: var(--ink); padding: 14px 18px; font-size: 11px; letter-spacing: .025em; }
[data-page=lesson] table.tbl td { padding: 14px 18px; font-size: 14px; }
[data-page=lesson] table.tbl tr:nth-child(even) td { background: var(--paper); }
[data-page=lesson] :is(.quiz, .drugs, .tabpanel, .split) { padding: 24px; }
[data-page=lesson] .drow { background: var(--paper); border-radius: 5px; border-width: 1px; }
[data-page=lesson] .stem { font-size: 19px; line-height: 1.6; }
[data-page=lesson] .opt { border-radius: 6px; border-width: 1px; min-height: 48px; font-size: 14px; }
[data-page=lesson] :is(.qbar, .qbar i) { border-radius: 2px; }
[data-page=lesson] .dock { bottom: 24px; right: 24px; flex-direction: row; gap: 4px; background: white; border: 1px solid #b9cbc0; padding: 5px; border-radius: 7px; }
[data-page=lesson] .dockbtn { border: 0; padding: 5px 10px 5px 5px; background: white; font-size: 13px; }
[data-page=lesson] .dockbtn:hover { background: var(--accent-soft); }
[data-page=lesson] .dockic { border-radius: 5px; }
[data-page=lesson] .overlay { background: var(--paper); }
[data-page=lesson] .overlay-bar { border-bottom-width: 1px; }
[data-page=lesson] .overlay-bar h2 { font-size: 21px; }
[data-page=lesson].lesson-locked .wrap { filter: none; opacity: .16; }
[data-page=lesson] .ghost-card { background-image: none; background-color: #e1e8e0; border: 0; border-radius: 6px; }
.lesson-gate { overflow-y: auto; }
.lesson-gate-card { width: min(520px, 100%); border: 1px solid var(--line); border-radius: 8px; padding: 36px; background: white; box-shadow: none; }
.gate-icon { color: var(--teal); margin-bottom: 20px; }
.lesson-gate-card h2 { font-size: 28px; line-height: 1.3; margin-bottom: 16px; }
.lesson-gate-card p { font-size: 14px; line-height: 1.8; }

/* Administration */
.admin-page { background: var(--paper); }
.admin-page .sidebar { background: white; color: var(--slate); width: 248px; padding: 28px 16px; border-right: 1px solid var(--line); }
.admin-page .brand { flex-direction: row; align-items: center; color: var(--ink); padding: 0 10px 30px; gap: 10px; }
.admin-page .brand-mark { color: var(--ink); font-size: 40px; }
.admin-page .brand-mark > span:not(.brand-dot), .admin-page .brand-dot { color: var(--teal); }
.admin-page .brand > .school-wordmark { font-size: 15px; letter-spacing: -.025em; }
.admin-page .brand .school-wordmark > span { font-size: 11px; letter-spacing: 0; }
.admin-page .brand small { color: var(--ink-soft); font-size: 12px; }
.admin-page .nav-label { color: var(--ink-soft); font-size: 11px; letter-spacing: .035em; }
.admin-page .nav-item { font-size: 14px; min-height: 46px; padding: 12px; border-radius: 6px; }
.admin-page .nav-item:hover { color: var(--teal); background: var(--accent-soft); }
.admin-page .nav-item.active { color: white; background: var(--ink); }
.admin-page .nav-item.active i { display: none; }
.admin-page .site-link { color: var(--teal); font-size: 13px; }
.admin-page .profile { border-color: var(--line); padding: 20px 8px 8px; }
.admin-page .profile strong { color: var(--ink); font-size: 13px; }
.admin-page .profile small { font-size: 12px; }
.admin-page .avatar { background: var(--accent-soft); color: var(--teal); border-radius: 6px; }
.admin-page .signout { color: var(--ink-soft); font-size: 12px; }
.admin-page .workspace { margin-left: 248px; }
.admin-page .topbar { min-height: 80px; padding: 0 36px; font-size: 13px; border-color: var(--line); }
.admin-page .topbar-meta { font-size: 12px; color: var(--ink-soft); }
.admin-page main { max-width: 1640px; padding: 36px 36px 0; }
.admin-page h1 { font-size: 36px; letter-spacing: -.035em; font-weight: 750; }
.admin-page h2 { font-size: 18px; letter-spacing: -.02em; font-weight: 700; }
.admin-page .subtitle { font-size: 14px; line-height: 1.8; color: var(--ink-soft); }
.admin-page .page-heading { margin-bottom: 32px; align-items: flex-start; }
.admin-page .button { font-size: 13px; min-height: 42px; border-radius: 5px; padding: 10px 16px; }
.admin-page .button.primary { box-shadow: none; }
.admin-page .welcome-strip { background: var(--accent-soft); border: 0; border-radius: 6px; padding: 20px 24px; margin-bottom: 28px; }
.admin-page .welcome-strip strong { font-size: 15px; }
.admin-page .welcome-strip p { font-size: 13px; color: #3a6250; }
.admin-page .welcome-icon { background: transparent; border: 0; color: var(--teal); }
.admin-page .strip-tag { display: none; }
.admin-page .metrics { gap: 0; border: 1px solid var(--line); background: white; border-radius: 8px; margin-bottom: 28px; overflow: hidden; }
.admin-page .metric { border: 0; border-right: 1px solid var(--line); border-radius: 0; padding: 24px; }
.admin-page .metric:last-child { border-right: 0; }
.admin-page .metric-label { color: var(--ink-soft); font-size: 12px; gap: 12px; }
.admin-page .metric .metric-icon { background: transparent; color: var(--teal); width: 24px; height: 24px; }
.admin-page .metric > strong { font-family: var(--font-display); font-size: clamp(22px, 2vw, 32px); font-weight: 700; margin-top: 16px; white-space: normal; overflow-wrap: anywhere; letter-spacing: -.03em; }
.admin-page .metric > small { font-size: 12px; color: var(--ink-soft); }
.admin-page .dashboard-grid { gap: 24px; margin-bottom: 28px; }
.admin-page .panel { border: 1px solid var(--line); border-radius: 8px; box-shadow: none; margin-bottom: 28px; }
.admin-page .dashboard-grid > .panel { margin-bottom: 0; }
.admin-page .panel-heading { padding: 24px; }
.admin-page .panel-heading p, .admin-page .legend { font-size: 12px; color: var(--ink-soft); }
.admin-page .chart-scale, .admin-page .chart-labels { font-size: 11px; color: var(--ink-soft); }
.admin-page .chart-bar { background: var(--teal); border-radius: 2px 2px 0 0; }
.admin-page .chart-details { font-size: 13px; }
.admin-page .status-list a { font-size: 14px; padding: 16px 0; }
.admin-page .panel-note { background: var(--paper); color: var(--slate); font-size: 12px; border-radius: 5px; }
.admin-page .panel-link, .admin-page .text-link { font-size: 13px; }
.admin-page .table-scroll { position: relative; min-width: 0; max-width: 100%; }
.admin-page .dashboard-grid > * { min-width: 0; }
.admin-page table { font-size: 13px; }
.admin-page th { background: var(--paper); color: var(--slate); font-size: 11px; letter-spacing: .025em; text-transform: none; padding: 14px 22px; }
.admin-page td { padding: 18px 22px; border-color: var(--line); }
.admin-page td small { font-size: 12px; color: var(--ink-soft); }
.admin-page tbody tr:hover { background: #f7faf6; }
.admin-page .badge { font-size: 11px; font-weight: 550; padding: 4px 8px; border-radius: 4px; }
.admin-page .blue { background: var(--blue); color: var(--blue-ink); }
.admin-page :is(.green, .teal) { background: var(--mint); color: var(--mint-ink); }
.admin-page .purple { background: var(--purple); color: var(--purple-ink); }
.admin-page .amber { background: var(--yellow); color: var(--yellow-ink); }
.admin-page .red { background: var(--pink); color: var(--pink-ink); }
.admin-page .student-list strong { font-size: 14px; }
.admin-page .student-list small, .admin-page .student-list time { font-size: 12px; color: var(--ink-soft); }
.admin-page .module-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 28px; }
.admin-page .module-card { border: 0; border-bottom: 1px solid var(--line); border-radius: 0; padding: 20px 0; }
.admin-page .module-card > span:first-child { font-size: 22px; color: var(--teal); }
.admin-page .module-card strong { font-size: 14px; }
.admin-page .module-card small { font-size: 12px; }
.admin-page .filters { padding: 22px 24px; background: white; }
.admin-page .filter-date { font-size: 12px; }
.admin-page select { font-size: 13px; }
.admin-page .form-panel { padding: 28px; }
.admin-page .field > label { font-size: 13px; }
.admin-page .field small { font-size: 12px; line-height: 1.7; }
.admin-page .field small.field-error { color: #a52b3b; }
.admin-page .form-grid { gap: 0 28px; }
.admin-page .sticky-actions { background: white; backdrop-filter: none; box-shadow: none; border-radius: 6px; padding: 18px 24px; }
.admin-page .notice { border-radius: 6px; font-size: 14px; background: var(--blue); color: var(--blue-ink); }
.admin-page .notice.success { background: var(--green); color: var(--green-ink); }
.admin-page .notice.error { background: var(--pink); color: var(--pink-ink); }
.admin-page .empty { font-size: 14px; color: var(--ink-soft); }
.admin-page .pagination { font-size: 13px; padding: 20px 24px; }
.admin-page .detail-list { font-size: 14px; }
.admin-page .detail-strip small, .admin-page .detail-strip p { font-size: 13px; }
.admin-page .detail-strip strong { font-size: 15px; }
.admin-page .section-heading p { font-size: 13px; }
.admin-page .block-card { border-radius: 6px; background: var(--paper); }
.admin-page .danger-zone { border-radius: 6px; background: #fff5f5; }
.admin-page .danger-zone p { color: #8c4651; font-size: 13px; }
.admin-page .danger-zone strong { font-size: 14px; }
.admin-page .media-card { border-radius: 6px; }
.admin-page .media-card strong { font-size: 14px; }
.admin-page .media-card small, .admin-page .media-card code { font-size: 12px; }
.admin-page .code-input { font-family: ui-monospace, monospace; font-size: 13px; }

[data-page=lesson] :is(.hotwrap, .rank, .prac, .flip, .fb, .ilab, .iout, .ires, .iok, .srow, .hotcard, .ritem, .cout, .pfinal, .ptip) { border-radius: 6px; border-width: 1px; box-shadow: none; }
[data-page=lesson] :is(.hotwrap, .rank, .prac, .calc, .interp, .sorter) { padding: 24px; }
[data-page=lesson] :is(.sbtn, .pset, .ichip, .opt .ltr, .rpos, .pn, .cd .cn) { border-radius: 4px; border-width: 1px; }
[data-page=lesson] :is(.sbtn, .pset) { min-height: 40px; font-size: 13px; }
[data-page=lesson] :is(.formula, .score .hand) { font-family: var(--font-display); font-size: 24px; font-weight: 650; line-height: 1.4; }
[data-page=lesson] .opt:hover:not(:disabled) { background: var(--accent-soft); transform: none; }
[data-page=lesson] .opt.picked:hover:not(:disabled) { background: var(--blue); }
[data-page=lesson] .flip:hover { transform: none; }
[data-page=lesson] :is(.fback, .fb p, .ires p, .stext, .rtext, .pqt) { font-size: 14px; line-height: 1.8; }
[data-page=lesson] :is(.iref, .fl) { font-size: 11px; letter-spacing: .025em; }
[data-page=lesson] :is(.ilab input, .fi input) { padding: 8px 0; font-size: 20px; }
[data-page=lesson] :is(.ilab input, .fi input):focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; }
[data-page=lesson] .rmove button { width: 40px; height: 40px; border-radius: 4px; border-width: 1px; }
[data-page=lesson] .hpt { box-shadow: none; }
body.nav-open { overflow: hidden; }

/* Shared footer */
.site-footer, .admin-page .site-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin-top: 40px; padding: 26px 0; border-top: 1px solid var(--line); color: var(--ink-soft); font-family: var(--font); font-size: 12px; line-height: 1.8; }
.site-footer a { color: var(--slate); text-decoration: none; }
.site-footer a:hover { color: var(--teal); text-decoration: underline; }
.site-footer-brand { font-weight: 650; color: var(--ink); }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 10px; }
.site-footer nav > span { display: none; }

@media (min-width: 961px) and (max-width: 1200px) {
  .hero { grid-template-columns: 1fr; gap: 28px; }
  .hero h1 br { display: none; }
  .hero h1 { max-width: 18ch; }
  .hero-toolkit { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; padding: 24px; }
  .hero-toolkit h2 { grid-column: 1 / -1; margin: 0; font-size: 22px; }
  .hero-toolkit h2 br { display: none; }
  .hero-toolkit > div { align-items: flex-start; gap: 10px; }
  .hero-toolkit p { font-size: 12px; }
  .information-grid { grid-template-columns: 1fr; }
  .information-content { border: 0; padding: 0; }
  .account-page .membership-card { grid-template-columns: 1fr; }
  .membership-inclusions { border-left: 0; border-top: 1px solid #bed2c3; padding: 22px 0 0; }
  .account-forms { grid-template-columns: 1fr; }
  .admin-page .dashboard-grid { grid-template-columns: 1fr; }
}
@media (max-width: 1100px) {
  .ai-threads { width: 180px; padding-inline: 12px; }
  .ai-head { padding-inline: 24px; }
  .ai-welcome h2 { font-size: 34px; }
  .admin-page .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-page .metric { border-bottom: 1px solid var(--line); }
  .admin-page .metric:nth-child(2) { border-right: 0; }
  .admin-page .metric:nth-last-child(-n+2) { border-bottom: 0; }
}
@media (max-width: 960px) {
  body { padding-left: 0; }
  .nav-bar { background: white; border-bottom: 1px solid var(--line); min-height: 64px; align-items: center; }
  .nav-toggle { border: 0; border-radius: 5px; background: var(--paper); padding: 10px 12px; min-height: 44px; }
  .course-nav { width: min(320px, 88vw); }
  .course-nav.is-open { box-shadow: none; }
  .nav-brand { padding-right: 48px; }
  .nav-close { top: 32px; }
  .nav-backdrop { background: #182b2b66; }
  .library-topbar { min-height: 68px; }
  .hero { padding-top: 36px; }
  .hero h1 { font-size: 48px; }
  .auth-split { grid-template-columns: minmax(280px, .85fr) minmax(0, 1.15fr); }
  .auth-story { padding-inline: 28px; }
  .story-content h2 { font-size: 34px; }
  .ai-layout { flex-direction: column; gap: 0; padding: 0; }
  .ai-threads { width: 100%; padding: 12px 20px; min-height: 68px; max-height: 68px; border-right: 0; border-bottom: 1px solid var(--line); }
  .ai-new { font-size: 13px; min-height: 42px; }
  .ai-shell { border-radius: 0; }
  .ai-thread-list { min-height: 44px; }
  .ai-threads-empty { font-size: 12px; }
  .ai-head { min-height: 76px; padding: 16px 24px; }
  .ai-thread { padding: 24px; }
  .ai-compose-area { padding-inline: 24px; }
  .ai-sidebar-note { display: none; }
  .information-grid { gap: 28px; }
}
@media (max-width: 760px) {
  .wrap { padding-inline: 22px; }
  .hero { grid-template-columns: 1fr; gap: 28px; padding: 32px 0; }
  .hero h1 { font-size: 48px; margin-bottom: 20px; }
  .hero h1 br { display: none; }
  .hero-toolkit { padding: 24px; }
  .hero-toolkit h2 { font-size: 24px; margin-bottom: 18px; }
  .hero-toolkit h2 br { display: none; }
  .hero-toolkit > div { padding: 14px 0; }
  .hero-toolkit > div:last-child { padding-bottom: 0; }
  .course-facts { gap: 12px 22px; }
  .course-facts span { font-size: 12px; }
  .course-facts strong { font-size: 16px; }
  .secthead { margin-top: 34px; }
  .secthead h2 { font-size: 25px; }
  .secthead p { flex-basis: 100%; }
  .mh { padding: 22px 0; gap: 14px; align-items: flex-start; }
  .module-index { font-size: 24px; width: 34px; padding-top: 18px; }
  .mt { font-size: 17px; }
  .mp { font-size: 12px; }
  .mcount { display: none; }
  .chev { margin-top: 23px; }
  .rows { padding: 4px 8px 4px 20px; }
  .row { gap: 8px; }
  .rt { font-size: 13px; }
  .auth-split { display: flex; flex-direction: column; }
  .auth-story { padding: 24px; background: #e1eee5; }
  .auth-brand .school-symbol { width: 36px; height: 36px; }
  .auth-brand .school-wordmark { font-size: 15px; }
  .auth-brand .school-wordmark > span { display: inline; margin-left: 4px; font-size: 15px; color: var(--ink); font-weight: 650; }
  .story-content { padding: 28px 0 4px; margin: 0; max-width: 560px; }
  .story-content h2 { font-size: 30px; margin: 0; }
  .story-content > p, .study-methods, .story-footer { display: none; }
  .auth-main { padding: 24px; flex: 1; }
  .auth-form-wrap { padding: 36px 0; }
  .auth-head h1, .auth-split .auth-head h1 { font-size: 30px; }
  .signup-steps { gap: 14px; }
  .signup-steps li { font-size: 11px; gap: 6px; }
  .account-wrap, .information-wrap { padding-top: 24px; }
  .account-page .auth-head { display: block; }
  .account-page .auth-head .btn { margin-top: 20px; }
  .account-page .membership-card, .account-forms { grid-template-columns: 1fr; }
  .account-page .membership-card { padding: 24px; }
  .membership-inclusions { border-left: 0; border-top: 1px solid #bed2c3; padding: 22px 0 0; }
  .account-page .auth-card { padding: 24px; }
  .account-page .auth-card input { font-size: 16px; }
  .account-identity-label { display: none; }
  .account-sections { gap: 20px; }
  .account-sections a { font-size: 12px; }
  .account-bottom { align-items: flex-start; }
  .information-grid { grid-template-columns: 1fr; }
  .information-content { padding: 0; border: 0; }
  .information-topline { margin-bottom: 32px; }
  .information-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 0 22px; }
  .information-sidebar { position: static; }
  .information-sidebar nav { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; }
  .information-help { display: none; }
  [data-page=lesson] .wrap { padding-top: 28px; gap: 20px; }
  [data-page=lesson] :is(.side, .cd, .quiz, .tabpanel, .drugs, .split) { padding: 20px; }
  [data-page=lesson] .cmp, [data-page=lesson] .split, [data-page=lesson] .split.rev { grid-template-columns: 1fr; }
  [data-page=lesson] .cardgrid { grid-template-columns: 1fr !important; }
  [data-page=lesson] .dock { bottom: 16px; right: 16px; }
  [data-page=lesson] .dockbtn { min-height: 44px; }
  .lesson-gate-card { padding: 28px 24px; }
  .lesson-gate-card h2 { font-size: 25px; }
  .admin-page .sidebar { top: 65px; width: 248px; padding: 20px 16px; }
  .admin-page .sidebar.open { box-shadow: none; }
  .admin-page .workspace { margin-left: 0; }
  .admin-page .topbar { min-height: 65px; padding: 0 20px; }
  .admin-page main { padding: 28px 20px 0; }
  .admin-page h1 { font-size: 30px; }
  .admin-page .page-heading { gap: 20px; }
  .admin-page .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-page .metric { padding: 18px; }
  .admin-page .metric > strong { font-size: 23px; }
  .admin-page .metric-label { font-size: 11px; }
  .admin-page .metric > small { font-size: 11px; }
  .admin-page .dashboard-grid { grid-template-columns: 1fr; }
  .admin-page .panel-heading { padding: 20px; }
  .admin-page .panel-heading h2 { font-size: 17px; }
  .admin-page .panel-heading p { font-size: 12px; }
  .admin-page .module-grid { grid-template-columns: 1fr; padding-inline: 20px; }
  .admin-page .form-panel { padding: 22px; }
  .admin-page .form-grid { grid-template-columns: 1fr; }
  .admin-page :is(input:not([type=checkbox]):not([type=radio]), select, textarea) { font-size: 16px; }
  .admin-page .filters { padding: 20px; }
  .admin-page .filters > input { min-width: 0; }
  .admin-page .filter-date { flex-wrap: wrap; width: 100%; }
  .admin-page .filter-date input { flex: 1; min-width: 120px; }
  .admin-page .sticky-actions { padding: 16px; gap: 12px; }
  .admin-page .sticky-actions > span { font-size: 11px; }
  .admin-page .detail-list { grid-template-columns: 1fr; }
  .site-footer, .admin-page .site-footer { gap: 12px; font-size: 11px; margin-top: 32px; padding: 24px 0; }
}
@media (max-width: 600px) {
  .ai-head h1 { font-size: 17px; }
  .ai-head { padding: 14px 20px; }
  .ai-thread { padding: 24px 20px; }
  .ai-welcome { padding: 16px 0; }
  .ai-welcome h2 { font-size: 32px; margin-bottom: 18px; }
  .ai-welcome > p { font-size: 14px; line-height: 1.8; }
  .ai-prompts { margin-top: 28px; }
  .ai-chip { grid-template-columns: 1fr auto; padding: 16px 0; min-height: 52px; }
  .ai-chip-category > span { display: inline; }
  .ai-chip strong { font-size: 14px; }
  .ai-compose-area { padding: 0 16px; }
  .ai-composer textarea { font-size: 16px; }
  .ai-note { font-size: 10px; }
  .ai-page .site-footer { font-size: 10px; padding: 10px 0; margin-top: 8px; }
  .ai-threads { padding-inline: 16px; }
  .bubble { padding: 14px; }
  .msg-body, .bubble p:last-child { font-size: 14px; }
  .mobile-brand { font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
