:root {
  --bg: #f6f4ee; --surface: #fffefb; --surface-2: #efece3; --ink: #1d2a2a; --ink-2: #4d5c5b; --ink-3: #6b7877;
  --line: #dcd8cb; --brand: #0f6b63; --brand-ink: #ffffff; --brand-soft: #d9efeb; --accent: #b4540a; --accent-soft: #fbe9d7;
  --good: #1f7a3d; --good-soft: #dff2e4; --warn: #94640a; --warn-soft: #f9eecb; --bad: #b3261e; --bad-soft: #fae3e1;
  --chart: #0f6b63; --grid: #e6e2d6; --radius: 12px; --shadow: 0 1px 2px rgba(29,42,42,.06), 0 2px 10px rgba(29,42,42,.05);
  --font: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --display: Georgia, "Iowan Old Style", "Times New Roman", serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #141b1b; --surface: #1c2525; --surface-2: #263131; --ink: #e9eeec; --ink-2: #b4c0be; --ink-3: #93a19f;
    --line: #334040; --brand: #58c7b9; --brand-ink: #08201d; --brand-soft: #1b3a37; --accent: #f0a763; --accent-soft: #3d2c1b;
    --good: #6fd08e; --good-soft: #1a3524; --warn: #e6c15c; --warn-soft: #3a3115; --bad: #f28b82; --bad-soft: #421f1c;
    --chart: #58c7b9; --grid: #2c3838; --shadow: none;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #141b1b; --surface: #1c2525; --surface-2: #263131; --ink: #e9eeec; --ink-2: #b4c0be; --ink-3: #93a19f;
    --line: #334040; --brand: #58c7b9; --brand-ink: #08201d; --brand-soft: #1b3a37; --accent: #f0a763; --accent-soft: #3d2c1b;
    --good: #6fd08e; --good-soft: #1a3524; --warn: #e6c15c; --warn-soft: #3a3115; --bad: #f28b82; --bad-soft: #421f1c;
    --chart: #58c7b9; --grid: #2c3838; --shadow: none;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.55 var(--font); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .4em; }
h1 { font: 700 1.75rem/1.2 var(--display); letter-spacing: -.01em; }
h2 { font-size: 1.1rem; font-weight: 650; }
h3 { font-size: 1rem; font-weight: 650; }
p { margin: 0 0 .75em; }
a { color: var(--brand); }
.skip { position: absolute; left: -999px; } .skip:focus { left: 8px; top: 8px; background: var(--surface); padding: 8px; z-index: 50; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.muted { color: var(--ink-2); } .small { font-size: .875rem; } .right { text-align: right; } .nowrap { white-space: nowrap; }
.loading { padding: 40px; text-align: center; color: var(--ink-2); }

/* shell: side menu, top bar, page tabs */
.shell { display: grid; grid-template-columns: 240px minmax(0, 1fr); min-height: 100vh; }
.shell.collapsed { grid-template-columns: minmax(0, 1fr); }
.shell.collapsed .side { display: none; }
.side { background: var(--surface); border-right: 1px solid var(--line); padding: 12px 10px 24px; display: flex; flex-direction: column; gap: 4px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.side-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 2px 2px 10px; }
.logo { display: flex; align-items: center; gap: 9px; color: var(--ink); text-decoration: none; padding: 0 6px; }
.logo .brand-mark { flex: none; border-radius: 7px; }
.logo .wordmark { height: 19px; width: auto; }
.icon-btn { background: none; border: 1px solid transparent; color: var(--ink-2); border-radius: 8px; min-width: 34px; height: 34px; padding: 0 8px; font-size: 1rem; cursor: pointer; }
.icon-btn:hover { background: var(--surface-2); color: var(--ink); }
.nav-group { display: flex; flex-direction: column; gap: 2px; margin-bottom: 4px; }
.nav-head { display: flex; align-items: center; gap: 8px; width: 100%; background: none; border: 0; padding: 8px 10px 4px; color: var(--ink-2);
  font: 700 .72rem/1.2 var(--font); letter-spacing: .08em; text-transform: uppercase; text-align: left; cursor: pointer; border-radius: 6px; }
.nav-head:hover { color: var(--ink); background: var(--surface-2); }
.nav-head::after { content: "▾"; margin-left: auto; transition: transform .15s; }
.nav-head[aria-expanded="false"]::after { transform: rotate(-90deg); }
.nav-head .count { background: var(--accent); color: var(--brand-ink); border-radius: 999px; padding: 1px 7px; font-size: .7rem; letter-spacing: 0; }
.nav-items { display: flex; flex-direction: column; gap: 2px; }
.nav-items[hidden] { display: none; }
.side a.nav.nav-home { margin: 2px 0 8px; font-weight: 600; }
.nav-ico { width: 17px; height: 17px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; opacity: .75; }
.side a.nav.on .nav-ico { opacity: 1; color: var(--brand); }
.nav-head.has-active { color: var(--brand); }
.nav-head .group-ico { width: 15px; height: 15px; opacity: .85; }
.nav-head > span:first-of-type { display: inline-flex; align-items: center; white-space: nowrap; }
.nav-head.has-active[aria-expanded="false"] > span:first-of-type::after { content: ""; display: inline-block; width: 6px; height: 6px; margin-left: 7px; border-radius: 50%; background: var(--brand); vertical-align: middle; }
.side a.nav { display: flex; align-items: center; gap: 9px; padding: 7px 10px; border-radius: 8px; color: var(--ink); text-decoration: none; font-size: .95rem; }
.side a.nav:hover { background: var(--surface-2); }
.side a.nav.on { background: var(--brand-soft); font-weight: 650; box-shadow: inset 3px 0 0 var(--brand); }
#in-progress { background: var(--accent-soft); border-radius: 10px; padding: 2px 4px 6px; margin-bottom: 8px; }
#in-progress[hidden] { display: none; }
#in-progress .nav-head { color: var(--accent); }
.side a.nav.resume { display: flex; gap: 9px; align-items: flex-start; padding: 6px 8px; }
.side a.nav.resume:hover { background: var(--surface); }
.resume-icon { color: var(--accent); width: 1.1em; text-align: center; flex: none; }
.resume-text { display: flex; flex-direction: column; min-width: 0; }
.resume-label { font-weight: 600; font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.resume-sub { font-size: .78rem; color: var(--ink-2); }
.page { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 10px; height: 56px; padding: 0 clamp(12px, 2.5vw, 28px);
  background: var(--surface); border-bottom: 1px solid var(--line); }
.menu-btn, .topbar-logo { display: none; }
.shell.collapsed .menu-btn { display: block; }
.shell.collapsed .topbar-logo { display: flex; }
.me-wrap { position: relative; margin-left: auto; }
.me-button { display: flex; align-items: center; gap: 8px; background: var(--surface-2); border: 1px solid var(--line); color: var(--ink); border-radius: 999px; padding: 4px 12px 4px 4px; cursor: pointer; font: inherit; }
.me-button:hover { border-color: var(--brand); }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--brand); color: var(--brand-ink); display: grid; place-items: center; font-weight: 700; text-transform: uppercase; }
.me-name { max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me-menu { position: absolute; right: 0; top: 46px; width: 290px; padding: 8px; z-index: 40; display: flex; flex-direction: column; gap: 4px; box-shadow: 0 10px 28px rgba(0,0,0,.18); }
.me-menu[hidden] { display: none; }
.me-who { display: flex; flex-direction: column; padding: 6px 10px 8px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.me-item { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 0; text-align: left; background: none; border: 0; color: var(--ink); padding: 8px 10px; border-radius: 8px; text-decoration: none; font: inherit; font-weight: 500; cursor: pointer; }
.me-icon { width: 1.4em; text-align: center; flex: none; }
.me-text { flex: 1; }
.me-menu hr { border: 0; border-top: 1px solid var(--line); margin: 4px 0; width: 100%; }
.me-head { display: flex; gap: 10px; align-items: center; padding: 6px 8px; }
.me-head .me-who { display: flex; flex-direction: column; gap: 2px; min-width: 0; padding: 0; border: 0; margin: 0; }
.me-head .me-who strong, .me-head .me-who .muted { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me-item:hover { background: var(--surface-2); }
.me-item.me-logout { color: var(--bad); }
.me-role { align-self: flex-start; margin-top: 2px; padding: 1px 8px; border-radius: 999px; background: var(--brand-soft); color: var(--ink); font-size: .72rem; font-weight: 650; }
.me-section { padding: 6px 10px; display: flex; flex-direction: column; gap: 6px; }
.me-row { flex-direction: row; align-items: center; justify-content: space-between; }
.me-label { font-size: .75rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); }
.me-note { margin: 0; padding: 0 10px 6px; }
.segmented { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.segmented button { background: var(--surface); border: 0; border-right: 1px solid var(--line); padding: 6px 4px; color: var(--ink); font: inherit; font-size: .88rem; cursor: pointer; border-radius: 0; }
.segmented button:last-child { border-right: 0; }
.segmented button[aria-checked="true"] { background: var(--brand); color: var(--brand-ink); font-weight: 650; }
.switch { display: flex; align-items: center; gap: 8px; margin: 0; cursor: pointer; font-weight: 500; }
.switch input { width: auto; margin: 0; accent-color: var(--brand); }
.page-tabs { position: sticky; top: 56px; z-index: 19; display: flex; align-items: flex-end; gap: 4px; overflow-x: auto; overflow-y: hidden; padding: 6px clamp(12px, 2.5vw, 28px) 0;
  background: var(--bg); border-bottom: 1px solid var(--line); scrollbar-width: thin; }
.page-tabs:empty { display: none; }
.page-tab { display: flex; align-items: center; flex: none; max-width: 240px; margin-bottom: -1px; border: 1px solid transparent; border-bottom: 0; border-radius: 8px 8px 0 0; color: var(--ink-2); }
.page-tab:hover:not(.active) { background: var(--surface-2); color: var(--ink); }
.page-tab.active { background: var(--surface); color: var(--brand); border-color: var(--line); box-shadow: inset 0 2px 0 var(--brand); font-weight: 650; }
.page-tab-open { padding: 7px 6px 7px 12px; color: inherit; text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: .92rem; }
.page-tab-close { width: 22px; height: 22px; margin-right: 6px; padding: 0; border: 0; border-radius: 50%; background: none; color: inherit; font-size: 1rem; line-height: 1; cursor: pointer; flex: none; }
.page-tab-close:hover { background: var(--line); color: var(--ink); }
main { padding: 22px clamp(16px, 3vw, 36px) 60px; width: 100%; min-width: 0; }  /* fills the space, menu open or hidden */
main.exam-main { max-width: 820px; margin: 0 auto; }
.head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 12px; margin-bottom: 18px; }
.head p { margin: 0; }
@media (max-width: 860px) {
  .shell, .shell.collapsed { grid-template-columns: minmax(0, 1fr); }
  .side, .shell.collapsed .side { display: flex; position: fixed; inset: 0 auto 0 0; width: 272px; z-index: 30; transform: translateX(-100%); transition: transform .18s; }
  .side.open { transform: none; box-shadow: 0 0 30px rgba(0,0,0,.3); }
  .menu-btn { display: block; }
  .topbar-logo { display: flex; }
  .me-name { display: none; }
  .me-button { padding-right: 8px; }
  main { padding-top: 16px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* paging */
.pager { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); }

/* the question a tutor conversation is about */
.qref { margin-bottom: 12px; border-left: 4px solid var(--brand); }
.qref .stem { margin: 6px 0 8px; font-size: 1.02rem; }
.qref ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.qref li { display: flex; gap: 8px; padding: 5px 8px; border-radius: 6px; border: 1px solid var(--line); font-size: .93rem; }
.qref li .letter { font-weight: 700; color: var(--ink-2); }
.qref li.mine { border-color: var(--brand); background: var(--brand-soft); }
.qref li.key { border-color: var(--good); background: var(--good-soft); }
.qref li .mark { margin-left: auto; font-size: .8rem; color: var(--ink-2); white-space: nowrap; }

/* blocks */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); min-width: 0; }
.card > h2:first-child { margin-bottom: .6em; }
.grid { display: grid; gap: 16px; margin-bottom: 16px; }
.g2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.g3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.wide { grid-template-columns: minmax(0, 1.7fr) minmax(280px, 1fr); }
@media (max-width: 960px) { .wide { grid-template-columns: minmax(0, 1fr); } }
.cur-grade { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 16px; margin-top: 16px; align-items: start; }
.cur-area .list li { gap: 12px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(104px, 1fr)); gap: 12px; margin-bottom: 16px; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; min-width: 0; overflow-wrap: anywhere; }
.tile b { display: block; font: 700 1.6rem/1.15 var(--font); font-variant-numeric: tabular-nums; }
.tile span { color: var(--ink-2); font-size: .85rem; }
.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.between { justify-content: space-between; }
.stack > * + * { margin-top: 10px; }
.list { list-style: none; margin: 0; padding: 0; }
.list > li { padding: 10px 0; border-top: 1px solid var(--line); } .list > li:first-child { border-top: 0; padding-top: 0; } .list > li:last-child { padding-bottom: 0; }
.empty { color: var(--ink-2); padding: 14px; border: 1px dashed var(--line); border-radius: 10px; text-align: center; }
hr { border: 0; border-top: 1px solid var(--line); margin: 14px 0; }

/* controls */
button, .btn { font: inherit; font-weight: 600; font-size: .92rem; border-radius: 9px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); padding: 7px 13px; cursor: pointer; text-decoration: none; display: inline-block; min-height: 38px; }
button:hover, .btn:hover { background: var(--surface-2); }
button:disabled { opacity: .55; cursor: not-allowed; }
.primary { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); } .primary:hover { background: var(--brand); filter: brightness(1.08); }
.danger { color: var(--bad); border-color: var(--bad); }
.link { border: 0; background: none; padding: 0; color: var(--brand); text-decoration: underline; min-height: 0; font-weight: 500; }
.icon { min-width: 40px; }
label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 12px; }
label .hint { font-weight: 400; color: var(--ink-2); display: block; }
input, select, textarea { display: block; width: 100%; margin-top: 4px; font: inherit; font-weight: 400; color: var(--ink); background: var(--surface); border: 1px solid #8d9a98; border-radius: 8px; padding: 8px 10px; min-height: 40px; }
input[type=checkbox], input[type=radio] { width: 18px; height: 18px; min-height: 0; display: inline-block; margin: 0 8px 0 0; vertical-align: -3px; accent-color: var(--brand); }
label.check { font-weight: 400; display: flex; align-items: flex-start; }
.formgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0 14px; }
.error { color: var(--bad); background: var(--bad-soft); padding: 8px 12px; border-radius: 8px; margin: 0 0 12px; }
.tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.tabs button.on { background: var(--brand-soft); border-color: var(--brand); }

/* tags */
.tag { display: inline-block; font-size: .75rem; font-weight: 650; padding: 1px 8px; border-radius: 99px; background: var(--surface-2); color: var(--ink-2); white-space: nowrap; }
.tag.official { background: var(--brand-soft); color: var(--ink); }
.tag.ai { background: var(--accent-soft); color: var(--ink); }
.tag.good { background: var(--good-soft); color: var(--ink); } .tag.warn { background: var(--warn-soft); color: var(--ink); } .tag.bad { background: var(--bad-soft); color: var(--ink); }
.notice { background: var(--accent-soft); padding: 10px 14px; border-radius: 10px; margin-bottom: 14px; }
.meter { height: 8px; background: var(--surface-2); border-radius: 99px; overflow: hidden; min-width: 80px; }
.meter i { display: block; height: 100%; background: var(--chart); border-radius: 99px; }
.prog { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; margin-bottom: 12px; }
.prog .meter { grid-column: 1 / -1; }

/* plan */
.plan-item { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 10px; padding: 12px 0; border-top: 1px solid var(--line); }
.plan-item:first-child { border-top: 0; padding-top: 2px; }
.tick { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; font-size: .8rem; color: transparent; margin-top: 2px; }
.done .tick { background: var(--good); border-color: var(--good); color: var(--surface); }
.done .title { text-decoration: line-through; color: var(--ink-2); }
.lede { font: 1.05rem/1.5 var(--display); margin-bottom: 8px; }

/* tree */
details.unit { border-top: 1px solid var(--line); padding: 8px 0; } details.unit:first-of-type { border-top: 0; }
summary { cursor: pointer; font-weight: 650; padding: 4px 0; }
.chapter { margin: 8px 0 12px 8px; padding-left: 12px; border-left: 2px solid var(--line); }
.topic-row { display: flex; gap: 10px; align-items: baseline; justify-content: space-between; padding: 6px 0; }
.code { font-size: .8rem; color: var(--ink-2); font-variant-numeric: tabular-nums; white-space: nowrap; }

/* exam */
.exam-wrap { max-width: 760px; margin: 0 auto; padding: 20px 16px 60px; }
.exam-top { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; margin-bottom: 8px; }
.option { display: flex; width: 100%; text-align: left; font-weight: 400; padding: 12px 14px; margin-bottom: 8px; border-radius: 10px; border: 1.5px solid var(--line); background: var(--surface); gap: 10px; align-items: flex-start; font-size: 1rem; }
.option:hover:not(:disabled) { border-color: var(--brand); background: var(--surface); }
.option.sel { border-color: var(--brand); background: var(--brand-soft); font-weight: 600; }
.option.right { border-color: var(--good); background: var(--good-soft); }
.option.wrong { border-color: var(--bad); background: var(--bad-soft); }
.option:disabled { opacity: 1; cursor: default; }
.letter { font-weight: 700; color: var(--ink-2); }
.stem { font-size: 1.15rem; margin: 14px 0 16px; white-space: pre-wrap; overflow-wrap: anywhere; }
.feedback { padding: 12px 14px; border-radius: 10px; margin: 10px 0; }
.feedback.ok { background: var(--good-soft); } .feedback.no { background: var(--bad-soft); }
.dots { display: flex; flex-wrap: wrap; gap: 4px; margin: 10px 0; }
.dots button { min-width: 32px; min-height: 32px; padding: 0; font-size: .8rem; }
.dots button.ans { background: var(--brand-soft); } .dots button.cur { border-color: var(--brand); border-width: 2px; }
.score { font: 700 3rem/1 var(--font); font-variant-numeric: tabular-nums; }

/* tutorial + chat */
.prose { max-width: 70ch; overflow-wrap: anywhere; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 .75em; }
.section { margin-bottom: 22px; }
.diagram { max-width: 420px; width: 100%; background: #fff; border-radius: 8px; border: 1px solid var(--line); display: block; }
.source-note { font-size: .85rem; color: var(--ink-2); border-left: 3px solid var(--line); padding-left: 10px; margin-top: 8px; }
.chat { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 16px; }
@media (max-width: 820px) { .chat { grid-template-columns: minmax(0, 1fr); } }
.chat-log { min-height: 340px; max-height: 58vh; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; padding: 4px; margin-bottom: 10px; }
.msg { padding: 10px 14px; border-radius: 14px; max-width: 86%; overflow-wrap: anywhere; }
.msg p:last-child { margin-bottom: 0; }
.msg.user { background: var(--brand); color: var(--brand-ink); align-self: flex-end; border-bottom-right-radius: 4px; }
.msg.assistant { background: var(--surface-2); align-self: flex-start; border-bottom-left-radius: 4px; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; padding: 0; width: 38px; min-width: 38px; height: 38px; border-radius: 50%; }
.icon-btn .nav-ico { opacity: .85; }
.icon-btn.on { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.icon-btn.on .nav-ico { opacity: 1; color: inherit; }
.msg .speak { float: right; width: 30px; min-width: 30px; height: 30px; margin: -4px -8px 4px 8px; background: transparent; border-color: transparent; }
.msg .speak:hover { background: var(--surface); }
.msg .speak.on { background: var(--brand); }
.icon-btn.mic.on { animation: mic-pulse 1.2s ease-in-out infinite; }
@keyframes mic-pulse { 50% { box-shadow: 0 0 0 6px color-mix(in srgb, var(--brand) 25%, transparent); } }
@media (prefers-reduced-motion: reduce) { .icon-btn.mic.on { animation: none; } }
.quick { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.quick button { font-weight: 500; font-size: .85rem; min-height: 32px; padding: 3px 10px; border-radius: 99px; }
.chart-box { position: relative; height: 230px; }
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: .92rem; }
th { text-align: left; font-weight: 650; color: var(--ink-2); border-bottom: 1px solid var(--line); padding: 6px 8px; white-space: nowrap; }
td { border-bottom: 1px solid var(--line); padding: 7px 8px; vertical-align: top; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
pre.log { white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-word; max-height: 220px; overflow: auto; font-size: .8rem; color: var(--ink-2); margin: 6px 0 0; }

.tagline { margin: 8px 0 0; font-size: .82rem; font-weight: 650; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); }
.eyebrow { margin: 0 0 4px; font-size: .78rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); }
#toast { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 9px 16px; border-radius: 10px; opacity: 0; pointer-events: none; transition: opacity .2s; max-width: 90vw; z-index: 60; }
#toast.show { opacity: 1; }
#say label { min-width: 0; }
.chat > * { min-width: 0; }
.quick button { white-space: normal; text-align: left; }
.tag { max-width: 100%; overflow: hidden; text-overflow: ellipsis; vertical-align: bottom; }
@media (max-width: 820px) { .chat-log { min-height: 200px; max-height: 50vh; } }

/* AI settings: company cards, connection banner, model for each tier */
.section-title { font-size: 1.05rem; margin: 22px 0 10px; }
.conn-banner { display: flex; gap: 12px; align-items: center; padding: 14px 16px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface-2); }
.conn-banner div { display: flex; flex-direction: column; gap: 2px; }
.conn-banner.ok { background: var(--good-soft); border-color: var(--good); }
.conn-banner.bad { background: var(--bad-soft); border-color: var(--bad); }
.conn-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--ink-3); flex: none; }
.conn-banner.ok .conn-dot { background: var(--good); box-shadow: 0 0 0 4px rgba(31,122,61,.18); }
.conn-banner.bad .conn-dot { background: var(--bad); }
.conn-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.conn-card.in-use { border-color: var(--brand); box-shadow: inset 0 3px 0 var(--brand), var(--shadow); }
.conn-name { display: flex; align-items: center; gap: 10px; font-size: 1.05rem; }
.provider-badge { width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); font-weight: 800; }
.error-text { color: var(--bad); }
.danger-link { color: var(--bad); }
.tier-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 8px 18px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.tier-row:last-of-type { border-bottom: 0; }
.tier-label { display: flex; flex-direction: column; gap: 2px; }
.tier-pick { display: flex; flex-direction: column; gap: 4px; }
.tier-pick select { margin: 0; }
@media (max-width: 640px) { .tier-row { grid-template-columns: minmax(0, 1fr); } }

/* Coverage: region and board toolbar, grade tabs, subject tabs */
.cov-toolbar { display: grid; grid-template-columns: minmax(0, 220px) minmax(0, 360px) minmax(0, 1fr); gap: 12px 16px; align-items: end; margin-bottom: 14px; }
.cov-toolbar label { margin: 0; }
.cov-toolbar select { margin-bottom: 0; }
.cov-action { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
@media (max-width: 860px) { .cov-toolbar { grid-template-columns: minmax(0, 1fr); } }
.cov-report { margin-bottom: 14px; }
.cov-report ul { margin: 10px 0; padding-left: 1.2em; display: grid; gap: 6px; }
.tabbar { display: flex; gap: 4px; overflow-x: auto; overflow-y: hidden; box-shadow: inset 0 -1px 0 var(--line); scrollbar-width: thin; }
.tabbar.sub { margin: -4px 0 14px; flex-wrap: wrap; box-shadow: none; gap: 6px; }
.tabbar-tab { display: flex; align-items: center; gap: 6px; flex: none; padding: 8px 12px; color: var(--ink-2); text-decoration: none; border: 1px solid transparent; border-bottom: 0; border-radius: 8px 8px 0 0; white-space: nowrap; }
.tabbar-tab:hover { background: var(--surface-2); color: var(--ink); }
.tabbar-tab.active { background: var(--surface); color: var(--brand); border-color: var(--line); box-shadow: inset 0 2px 0 var(--brand); font-weight: 650; }
.tabbar.sub .tabbar-tab { border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px; font-size: .9rem; }
.tabbar.sub .tabbar-tab.active { background: var(--brand-soft); color: var(--ink); box-shadow: none; margin: 0; border-color: var(--brand); }
.tab-count { font-size: .75rem; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.tab-count.warn { color: var(--bad); font-weight: 700; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--line); flex: none; }
.dot.dot-full { background: var(--good); } .dot.dot-part { background: var(--warn); } .dot.dot-none { background: var(--line); }
.cov-panel { border-top-left-radius: 0; }
.doc-list li { padding: 8px 0; }

/* AI Tasks */
.tile-link { text-decoration: none; color: inherit; }
.tile-link:hover { border-color: var(--brand); }
.approve-list li { padding: 0; }
.approve-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 4px; margin: 0; cursor: pointer; font-weight: 400; }
.approve-row input { width: auto; margin: 0; accent-color: var(--brand); }
.approve-text, .task-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.task-row { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 12px; align-items: start; padding: 10px 0; }
.task-row .tag { justify-self: start; }
.card.attention { border-color: var(--accent); }
.nav-badge { margin-left: 6px; background: var(--accent); color: var(--brand-ink); border-radius: 999px; padding: 0 7px; font-size: .75rem; font-weight: 700; }
@media (max-width: 640px) { .task-row { grid-template-columns: minmax(0, 1fr); } }

/* Accent colours (Theme > Colour). Teal is the default, defined on :root above. */
:root[data-accent="blue"] { --brand: #1f5fbf; --brand-soft: #dde8fa; --chart: #1f5fbf; }
:root[data-accent="purple"] { --brand: #6a3fb5; --brand-soft: #ece4f9; --chart: #6a3fb5; }
:root[data-accent="rose"] { --brand: #b23a6b; --brand-soft: #f8e1ea; --chart: #b23a6b; }
:root[data-accent="orange"] { --brand: #a8500b; --brand-soft: #fbe9d7; --chart: #a8500b; }
:root[data-accent="green"] { --brand: #2e7d32; --brand-soft: #e1f1e2; --chart: #2e7d32; }
@media (prefers-color-scheme: dark) { :root[data-accent="blue"]:not([data-theme="light"]) { --brand: #7fb0ff; --brand-soft: #1c2c47; --chart: #7fb0ff; } }
:root[data-theme="dark"][data-accent="blue"] { --brand: #7fb0ff; --brand-soft: #1c2c47; --chart: #7fb0ff; }
@media (prefers-color-scheme: dark) { :root[data-accent="purple"]:not([data-theme="light"]) { --brand: #b79cf2; --brand-soft: #2d2342; --chart: #b79cf2; } }
:root[data-theme="dark"][data-accent="purple"] { --brand: #b79cf2; --brand-soft: #2d2342; --chart: #b79cf2; }
@media (prefers-color-scheme: dark) { :root[data-accent="rose"]:not([data-theme="light"]) { --brand: #f095b8; --brand-soft: #3d1f2c; --chart: #f095b8; } }
:root[data-theme="dark"][data-accent="rose"] { --brand: #f095b8; --brand-soft: #3d1f2c; --chart: #f095b8; }
@media (prefers-color-scheme: dark) { :root[data-accent="orange"]:not([data-theme="light"]) { --brand: #f0a763; --brand-soft: #3d2c1b; --chart: #f0a763; } }
:root[data-theme="dark"][data-accent="orange"] { --brand: #f0a763; --brand-soft: #3d2c1b; --chart: #f0a763; }
@media (prefers-color-scheme: dark) { :root[data-accent="green"]:not([data-theme="light"]) { --brand: #7fd18a; --brand-soft: #1c3420; --chart: #7fd18a; } }
:root[data-theme="dark"][data-accent="green"] { --brand: #7fd18a; --brand-soft: #1c3420; --chart: #7fd18a; }
.swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.swatch { flex: none; width: 28px; height: 28px; min-height: 0; border-radius: 50%; border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--line); padding: 0; cursor: pointer; }
.swatch[aria-checked="true"] { box-shadow: 0 0 0 2px var(--ink); }
.swatch:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.usage-table td.usage-name { overflow-wrap: anywhere; min-width: 80px; }
.usage-table th, .usage-table td { padding-left: 6px; padding-right: 6px; }
.usage-table th, .usage-table td.num { white-space: nowrap; }
.grid > .card { min-width: 0; }

/* Avatars and the avatar picker */
.avatar-img { object-fit: cover; background: var(--surface-2); padding: 0; }
.avatar-lg { width: 44px; height: 44px; font-size: 1.2rem; flex: none; }
.avatar-dialog { width: min(760px, calc(100vw - 32px)); max-height: calc(100vh - 48px); overflow: auto; padding: 20px; border: 1px solid var(--line); color: var(--ink); }
.avatar-dialog::backdrop { background: rgba(10, 20, 20, .45); }
.avatar-dialog h3 { margin: 14px 0 8px; }
.avatar-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; }
.avatar-choice { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 6px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); cursor: pointer; font: inherit; text-align: center; }
.avatar-choice:hover { border-color: var(--brand); }
.avatar-choice.on { border-color: var(--brand); background: var(--brand-soft); box-shadow: inset 0 0 0 1px var(--brand); }
.avatar-choice img { width: 72px; height: 72px; border-radius: 50%; margin-bottom: 4px; }
.avatar-choice strong { font-size: .85rem; line-height: 1.2; }
.avatar-choice span { font-size: .72rem; color: var(--ink-2); line-height: 1.2; }

/* Menu search */
.menu-search { padding: 0 2px 8px; }
.menu-search input { margin: 0; padding: 7px 10px; font-size: .9rem; }
.menu-empty { padding: 0 10px; margin: 0 0 6px; }
.side a.nav[hidden], .nav-group[hidden] { display: none; }
.usage-grid { grid-template-columns: repeat(auto-fit, minmax(min(440px, 100%), 1fr)); }

/* ===================== Modern refresh ===================== */
:root { --radius: 14px; --shadow: 0 1px 2px rgba(16,32,32,.05), 0 4px 16px rgba(16,32,32,.06); --shadow-lg: 0 18px 50px rgba(16,32,32,.18); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --shadow-lg: 0 18px 50px rgba(0,0,0,.55); } }
:root[data-theme="dark"] { --shadow-lg: 0 18px 50px rgba(0,0,0,.55); }
body { background:
  radial-gradient(1100px 560px at 105% -10%, color-mix(in srgb, var(--brand) 10%, transparent), transparent 62%),
  radial-gradient(900px 520px at -12% 112%, color-mix(in srgb, var(--accent) 8%, transparent), transparent 60%),
  var(--bg); background-attachment: fixed; }
h1 { font: 760 1.85rem/1.15 var(--font); letter-spacing: -.022em; }
h2 { letter-spacing: -.01em; }
.topbar { background: color-mix(in srgb, var(--surface) 80%, transparent); backdrop-filter: saturate(1.5) blur(14px); -webkit-backdrop-filter: saturate(1.5) blur(14px); }
.page-tabs { background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.card { border-color: color-mix(in srgb, var(--line) 85%, transparent); transition: box-shadow .2s ease, transform .2s ease, border-color .2s ease; }
a.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: color-mix(in srgb, var(--brand) 40%, var(--line)); }
button, .btn { border-radius: 10px; transition: background .15s, box-shadow .15s, transform .08s, border-color .15s, filter .15s; }
button:active:not(:disabled), .btn:active { transform: scale(.98); }
.primary { background: linear-gradient(180deg, color-mix(in srgb, var(--brand) 86%, #fff), var(--brand)); border-color: var(--brand);
  box-shadow: 0 1px 2px rgba(0,0,0,.08), 0 6px 16px color-mix(in srgb, var(--brand) 26%, transparent); }
.primary:hover { filter: brightness(1.06); background: linear-gradient(180deg, color-mix(in srgb, var(--brand) 86%, #fff), var(--brand)); }
input, select, textarea { border-radius: 10px; transition: border-color .15s, box-shadow .15s; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 18%, transparent); }
.tile { position: relative; overflow: hidden; box-shadow: var(--shadow); }
.tile::before { content: ""; position: absolute; inset: 0 0 auto; height: 3px; background: linear-gradient(90deg, var(--brand), var(--accent)); opacity: .75; }
.msg.user { background: linear-gradient(160deg, color-mix(in srgb, var(--brand) 82%, #fff), var(--brand)); box-shadow: 0 4px 14px color-mix(in srgb, var(--brand) 22%, transparent); }
.msg.assistant { border: 1px solid var(--line); }
main > * { animation: rise .32s cubic-bezier(.2,.7,.2,1) both; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
#toast { transform: translate(-50%, 8px); border-radius: 12px; box-shadow: var(--shadow-lg); transition: opacity .2s, transform .2s; }
#toast.show { transform: translate(-50%, 0); }
mark { background: color-mix(in srgb, var(--accent) 28%, transparent); color: inherit; border-radius: 4px; padding: 0 2px; }

/* ===================== Search ===================== */
.searchbox { position: relative; display: flex; align-items: center; }
.searchbox > .nav-ico { position: absolute; left: 12px; color: var(--ink-3); pointer-events: none; }
.searchbox input { margin: 0; padding-left: 38px; padding-right: 36px; background: var(--surface); }
.searchbox input::-webkit-search-cancel-button { display: none; }
.searchbox-clear { position: absolute; right: 6px; width: 28px; min-height: 28px; height: 28px; padding: 0; border: 0; border-radius: 50%; background: var(--surface-2); color: var(--ink-2); font-size: 1.1rem; line-height: 1; }
.searchbox-clear[hidden] { display: none; }
.searchbox.big input { min-height: 54px; font-size: 1.05rem; border-radius: 14px; box-shadow: var(--shadow); padding-left: 46px; }
.searchbox.big > .nav-ico { left: 16px; width: 20px; height: 20px; }
.hero-search { padding: clamp(18px, 3vw, 30px); margin-bottom: 18px; border-radius: 22px; border: 1px solid color-mix(in srgb, var(--brand) 18%, var(--line));
  background: linear-gradient(135deg, color-mix(in srgb, var(--brand-soft) 85%, transparent), color-mix(in srgb, var(--surface) 70%, transparent) 70%); }
.hero-search h1 { margin-bottom: 4px; }
.hero-search p { margin-bottom: 14px; }
.head-actions { gap: 10px; }
.dash-search { width: min(320px, 100%); }
.search-loading { display: flex; align-items: center; gap: 10px; padding: 18px; color: var(--ink-2); }
.result-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(340px, 100%), 1fr)); gap: 14px; }
.result-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 6px;
  animation: rise .35s cubic-bezier(.2,.7,.2,1) both; animation-delay: calc(min(var(--i), 10) * 35ms); }
.result-card h3 { margin: 2px 0 0; font-size: 1.05rem; }
.result-card h3 a { color: var(--ink); text-decoration: none; }
.result-card h3 a:hover { color: var(--brand); text-decoration: underline; }
.result-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: .8rem; color: var(--ink-2); }
.result-snippet { margin: 0; color: var(--ink-2); font-size: .92rem; }
.result-path { margin: 0 0 6px; }
.search-empty { padding: 26px; }

/* ===================== Subjects ===================== */
.subject-card { display: flex; flex-direction: column; gap: 10px; text-decoration: none; color: inherit; }
.subject-card h2 { margin: 4px 0 0; }
.subject-badge { --sb: #5a6b6a; width: 46px; height: 46px; flex: none; border-radius: 14px; display: grid; place-items: center;
  background: color-mix(in srgb, var(--sb) 15%, var(--surface)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--sb) 25%, transparent); }
.subject-badge svg { width: 24px; height: 24px; fill: none; stroke: var(--sb); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.subject-badge.sm { width: 26px; height: 26px; border-radius: 8px; }
.subject-badge.sm svg { width: 15px; height: 15px; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .subject-badge svg { stroke: color-mix(in srgb, var(--sb) 55%, #fff); } }
:root[data-theme="dark"] .subject-badge svg { stroke: color-mix(in srgb, var(--sb) 55%, #fff); }
.ring { --p: 0; position: relative; width: 48px; height: 48px; flex: none; border-radius: 50%; background: conic-gradient(var(--brand) calc(var(--p) * 1%), var(--surface-2) 0); }
.ring > span { position: absolute; inset: 5px; border-radius: 50%; background: var(--surface); display: grid; place-items: center; font: 700 .72rem/1 var(--font); font-variant-numeric: tabular-nums; }
.ring.empty { background: none; border: 2px dashed var(--line); }
.ring.empty > span { inset: 2px; color: var(--ink-3); font-weight: 600; }
.topic-row[hidden], .chapter[hidden], details.unit[hidden] { display: none; }

/* ===================== Typing dots and skeletons ===================== */
.typing { display: inline-flex; gap: 4px; align-items: center; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--brand); opacity: .35; animation: typing 1.1s infinite ease-in-out; }
.typing i:nth-child(2) { animation-delay: .15s; } .typing i:nth-child(3) { animation-delay: .3s; }
@keyframes typing { 0%, 80%, 100% { transform: translateY(0); opacity: .35; } 40% { transform: translateY(-5px); opacity: 1; } }
.msg.thinking { padding: 14px 16px; }
.chat-hello { display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: 16px; background: color-mix(in srgb, var(--brand-soft) 70%, transparent); }
.chat-hello-face { width: 56px; height: 56px; flex: none; border-radius: 50%; background: var(--surface); box-shadow: var(--shadow); display: grid; place-items: center; overflow: hidden; }
.chat-hello-face svg { width: 52px; height: 52px; }
.skeleton-exam { display: grid; gap: 12px; padding: 20px 0; }
.skeleton-exam i { display: block; height: 18px; border-radius: 9px; background: linear-gradient(90deg, var(--surface-2) 25%, color-mix(in srgb, var(--surface-2) 40%, var(--surface)) 50%, var(--surface-2) 75%); background-size: 200% 100%; animation: shimmer 1.4s infinite linear; }
.skeleton-exam i:nth-child(1) { width: 40%; } .skeleton-exam i:nth-child(2) { width: 90%; height: 26px; } .skeleton-exam i:nth-child(n+3) { height: 48px; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ===================== The floating "working on it" card ===================== */
.agent-card { position: fixed; left: 50%; top: 70px; z-index: 55; width: min(460px, calc(100vw - 24px)); display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 14px; align-items: start;
  padding: 14px 14px 14px 16px; border-radius: 20px; border: 1px solid color-mix(in srgb, var(--brand) 22%, var(--line));
  background: color-mix(in srgb, var(--surface) 86%, transparent); backdrop-filter: saturate(1.6) blur(16px); -webkit-backdrop-filter: saturate(1.6) blur(16px);
  box-shadow: var(--shadow-lg); opacity: 0; transform: translate(-50%, -24px) scale(.97); transition: opacity .25s ease, transform .3s cubic-bezier(.2,.8,.2,1); }
.agent-card.in { opacity: 1; transform: translate(-50%, 0) scale(1); }
.agent-orb { position: relative; width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; }
.agent-orb::before { content: ""; position: absolute; inset: -3px; border-radius: 50%; background: conic-gradient(from 0deg, var(--brand), var(--accent), color-mix(in srgb, var(--brand) 30%, transparent), var(--brand)); animation: spin 2.4s linear infinite; }
.agent-orb::after { content: ""; position: absolute; inset: 1px; border-radius: 50%; background: var(--surface); }
.agent-face { position: relative; z-index: 1; width: 52px; height: 52px; border-radius: 50%; overflow: hidden; background: var(--brand-soft); display: grid; place-items: center; animation: breathe 2.4s ease-in-out infinite; }
.agent-face svg { width: 50px; height: 50px; }
.agent-orbit { position: absolute; inset: -9px; z-index: 2; animation: spin 1.8s linear infinite; }
.agent-orbit i { position: absolute; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); top: 50%; left: 0; margin-top: -3.5px; box-shadow: 0 0 8px var(--accent); }
.agent-orbit i:nth-child(2) { left: auto; right: 0; background: var(--brand); box-shadow: 0 0 8px var(--brand); }
.agent-orbit i:nth-child(3) { top: 0; left: 50%; margin: 0 0 0 -3px; width: 6px; height: 6px; }
.agent-title { font-weight: 700; font-size: 1rem; line-height: 1.25; }
.agent-status { display: flex; justify-content: space-between; gap: 10px; font-size: .88rem; color: var(--ink-2); margin-top: 3px; }
.agent-step { animation: fade-in .3s ease; }
.agent-time { font-variant-numeric: tabular-nums; color: var(--ink-3); white-space: nowrap; }
.agent-steps { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 3px; font-size: .82rem; color: var(--ink-3); }
.agent-steps li { display: flex; align-items: center; gap: 8px; }
.agent-steps li::before { content: ""; width: 9px; height: 9px; border-radius: 50%; border: 1.5px solid var(--line); flex: none; }
.agent-steps li.now { color: var(--ink); font-weight: 600; }
.agent-steps li.now::before { border-color: var(--brand); background: var(--brand); animation: pulse 1.2s ease-in-out infinite; }
.agent-steps li.done { color: var(--ink-2); }
.agent-steps li.done::before { border-color: var(--good); background: var(--good); }
.agent-note { margin: 8px 0 0; font-size: .8rem; color: var(--ink-3); }
.agent-bar { margin-top: 10px; height: 4px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.agent-bar i { display: block; height: 100%; width: 40%; border-radius: 99px; background: linear-gradient(90deg, var(--brand), var(--accent)); animation: slide 1.4s ease-in-out infinite; }
.agent-hide { min-height: 0; width: 28px; height: 28px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--ink-3); font-size: 1.1rem; }
.agent-hide:hover { background: var(--surface-2); }
.agent-card.mini { width: auto; grid-template-columns: 44px auto auto; align-items: center; padding: 8px 10px 8px 12px; }
.agent-card.mini .agent-orb { width: 44px; height: 44px; }
.agent-card.mini .agent-face { width: 36px; height: 36px; } .agent-card.mini .agent-face svg { width: 34px; height: 34px; }
.agent-card.mini .agent-steps, .agent-card.mini .agent-note, .agent-card.mini .agent-bar, .agent-card.mini .agent-step { display: none; }
.agent-card.finished .agent-orb::before { animation: none; background: var(--good); }
.agent-card.finished .agent-orbit, .agent-card.finished .agent-bar { display: none; }
.agent-card.finished .agent-step { color: var(--good); font-weight: 700; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes breathe { 50% { transform: scale(1.05); } }
@keyframes pulse { 50% { box-shadow: 0 0 0 5px color-mix(in srgb, var(--brand) 22%, transparent); } }
@keyframes slide { 0% { transform: translateX(-110%); } 100% { transform: translateX(260%); } }
@keyframes fade-in { from { opacity: 0; } }

/* ===================== Nova, the tutor figure ===================== */
.nova { position: fixed; right: 14px; bottom: 10px; z-index: 56; display: flex; align-items: flex-end; gap: 4px; pointer-events: none;
  opacity: 0; transform: translateY(24px) scale(.96); transition: opacity .25s ease, transform .35s cubic-bezier(.2,.8,.2,1); }
.nova.in { opacity: 1; transform: none; }
.nova[hidden] { display: none; }
.nova > * { pointer-events: auto; }
.nova-bubble { max-width: min(320px, calc(100vw - 150px)); margin-bottom: 92px; padding: 12px 14px; border-radius: 18px 18px 4px 18px;
  background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border: 1px solid color-mix(in srgb, var(--brand) 25%, var(--line)); box-shadow: var(--shadow-lg); animation: fade-in .25s ease; }
.nova.bubble-off .nova-bubble { display: none; }
.nova-name { display: flex; align-items: baseline; gap: 6px; margin-bottom: 4px; }
.nova-name strong { color: var(--brand); }
.nova-name span { font-size: .75rem; color: var(--ink-3); }
.nova-text { margin: 0; font-size: .95rem; line-height: 1.45; max-height: 9.5em; overflow-y: auto; }
.nova-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.nova-actions:not(:empty) { margin-top: 10px; }
.nova-actions button { min-height: 32px; padding: 4px 12px; font-size: .85rem; }
.nova-figure { width: 132px; height: 165px; padding: 0; border: 0; background: none; cursor: pointer; min-height: 0; filter: drop-shadow(0 10px 18px rgba(0,0,0,.18)); }
.nova-figure:hover { background: none; }
.nova-close { position: absolute; right: 2px; top: -6px; width: 26px; height: 26px; min-height: 0; padding: 0; border-radius: 50%; font-size: 1rem; line-height: 1; background: var(--surface); box-shadow: var(--shadow); }
.nova-svg { width: 100%; height: 100%; overflow: visible; }
.nova-skin { fill: var(--skin, #e8b48d); } .nova-hair { fill: var(--hair, #3b2a20); } .nova-cheek { fill: #ef8a78; opacity: .35; }
.nova-sweater, .nova-sleeve { fill: var(--top, var(--brand)); } .nova-sleeve { filter: brightness(.88); }
.nova-wrap { fill: var(--wrap, #d97706); } .nova-wrap-line { fill: none; stroke: rgba(255,255,255,.45); stroke-width: 3; stroke-linecap: round; }
.nova-beard { opacity: .92; }
.nova-collar { fill: #fff; } .nova-eye { fill: #1f2b2b; } .nova-shadow { fill: rgba(0,0,0,.14); }
.nova-glasses { fill: none; stroke: #263333; stroke-width: 2.4; }
.nova-smile { fill: none; stroke: #7b3a2c; stroke-width: 2.6; stroke-linecap: round; transition: opacity .15s; }
.nova-mouth { fill: #6e2626; opacity: 0; transform-box: fill-box; transform-origin: center; transition: opacity .15s; }
.nova-pointer { stroke: #8a5a2b; stroke-width: 3; stroke-linecap: round; }
.nova-book rect { fill: var(--accent); } .nova-book path { stroke: rgba(255,255,255,.75); stroke-width: 1.5; }
.nova-body { animation: bob 3.2s ease-in-out infinite; transform-box: view-box; }
.nova-eye { transform-box: fill-box; transform-origin: center; animation: blink 4.6s infinite; }
.nova-arm { transform-box: view-box; transform-origin: 118px 152px; }
.nova-head { transform-box: view-box; transform-origin: 80px 110px; }
.nova.speaking .nova-mouth { opacity: 1; animation: talk .26s ease-in-out infinite alternate; }
.nova.speaking .nova-smile { opacity: 0; }
.nova.speaking .nova-arm { animation: point 1.7s ease-in-out infinite; }
.nova.speaking .nova-head { animation: nod 2.6s ease-in-out infinite; }
.nova-eyes.think { animation: glance 2.4s ease-in-out infinite; transform-box: view-box; }
@keyframes bob { 50% { transform: translateY(-3px); } }
@keyframes blink { 0%, 93%, 100% { transform: scaleY(1); } 96% { transform: scaleY(.1); } }
@keyframes talk { from { transform: scaleY(.25) scaleX(.9); } to { transform: scaleY(1.05) scaleX(1); } }
@keyframes point { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(-16deg); } }
@keyframes nod { 0%, 100% { transform: rotate(0); } 30% { transform: rotate(-3deg); } 70% { transform: rotate(2.5deg); } }
@keyframes glance { 0%, 100% { transform: translate(0, -2px); } 40% { transform: translate(-2px, -3px); } 70% { transform: translate(2px, -3px); } }
@media (max-width: 640px) {
  .nova-figure { width: 86px; height: 108px; }
  .nova-bubble { margin-bottom: 60px; max-width: calc(100vw - 110px); }
  .agent-card { top: 62px; }
}

/* ===================== Choose your tutor ===================== */
.tutor-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr)); gap: 16px; }
.tutor-card { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; padding-top: 22px;
  animation: rise .35s cubic-bezier(.2,.7,.2,1) both; animation-delay: calc(var(--i) * 50ms); }
.tutor-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.tutor-card.chosen { border-color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand), var(--shadow); }
.tutor-card h2 { margin: 6px 0 0; font-size: 1.25rem; }
.tutor-card p { margin: 0 0 10px; min-height: 2.9em; }
.tutor-card .row { justify-content: center; margin-top: auto; }
.tutor-figure { width: 120px; height: 150px; }
.tutor-card:hover .nova-arm { animation: point 1.7s ease-in-out infinite; }
.tutor-mine { position: absolute; top: 12px; right: 12px; }
.tutor-switch { display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px 4px 4px; border-radius: 999px; }
.tutor-switch-face { width: 30px; height: 30px; border-radius: 50%; overflow: hidden; background: var(--brand-soft); display: grid; place-items: center; }
.tutor-switch-face svg { width: 30px; height: 30px; }
.plan-refining { display: flex; align-items: center; gap: 10px; margin: 0 0 8px; padding: 8px 12px; border-radius: 10px; background: color-mix(in srgb, var(--brand-soft) 70%, transparent); font-size: .9rem; color: var(--ink-2); }
#plan-card.plan-updated { animation: plan-glow 1.2s ease; }
@keyframes plan-glow { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--brand) 35%, transparent), var(--shadow); } 100% { box-shadow: 0 0 0 14px transparent, var(--shadow); } }

/* AI cost by student */
.cost-table td { vertical-align: middle; }
.cost-bar-cell { width: 120px; }
.cost-bar { display: block; height: 8px; border-radius: 99px; background: var(--surface-2); overflow: hidden; min-width: 80px; }
.cost-bar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--brand), var(--accent)); }
.agent-chip { display: inline-block; white-space: nowrap; padding: 1px 8px; margin: 1px 0; border-radius: 99px; background: var(--surface-2); font-size: .78rem; }

/* ===================== Plans and sales ===================== */
.plan-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(250px, 100%), 1fr)); gap: 14px; }
.plan-card.off { opacity: .65; }
.plan-price { font: 760 1.7rem/1.1 var(--font); margin: 8px 0 4px; font-variant-numeric: tabular-nums; }
.plan-price span { font-size: .85rem; font-weight: 500; color: var(--ink-2); margin-left: 2px; }
.plan-price s { font-size: 1rem; color: var(--ink-3); font-weight: 500; }
.plan-limits, .plan-features { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 3px; font-size: .86rem; }
.plan-limits li::before { content: "•"; color: var(--brand); margin-right: 6px; }
.plan-features li::before { content: "✓"; color: var(--good); font-weight: 700; margin-right: 6px; }
.plan-features li.no { color: var(--ink-3); }
.plan-features li.no::before { content: "–"; color: var(--ink-3); }
.plan-form { margin-top: 10px; }
.feature-picks { border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; margin: 0 0 12px; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0 12px; }
.feature-picks legend { font-weight: 600; font-size: .9rem; padding: 0 4px; }
.feature-picks label { margin: 4px 0; }
.billing-switch { max-width: 260px; grid-template-columns: repeat(2, 1fr); margin-bottom: 12px; }
.plan-choice { display: flex; flex-direction: column; align-items: stretch; text-align: left; gap: 2px; padding: 14px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--surface); font-weight: 400; min-height: 0; }
.plan-choice:hover { border-color: var(--brand); background: var(--surface); }
.plan-choice.on { border-color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand), 0 8px 24px color-mix(in srgb, var(--brand) 18%, transparent); background: color-mix(in srgb, var(--brand-soft) 45%, var(--surface)); }
.plan-choice.mine { border-style: dashed; }
.plan-confirm { margin-top: 14px; padding: 14px; border-radius: 14px; background: var(--surface-2); max-width: 560px; }
.quote { display: grid; grid-template-columns: 1fr auto; gap: 4px 16px; margin-top: 10px; font-size: .92rem; font-variant-numeric: tabular-nums; }
.quote strong { font-size: 1.05rem; border-top: 1px solid var(--line); padding-top: 6px; }
.good-text { color: var(--good); font-weight: 600; }
.school-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(340px, 100%), 1fr)); gap: 14px; }
.school-card.off { opacity: .65; }
.coupon-box { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 2px 12px; padding: 12px 14px; border-radius: 12px;
  border: 1.5px dashed color-mix(in srgb, var(--brand) 55%, var(--line)); background: color-mix(in srgb, var(--brand-soft) 50%, transparent); }
.coupon-box strong { font: 760 1.35rem/1.2 ui-monospace, "Cascadia Code", Consolas, monospace; letter-spacing: .04em; grid-column: 1; }
.coupon-box > span:first-child { grid-column: 1; }
.coupon-box .small:not(.muted) { grid-column: 1; }
.coupon-box button { grid-column: 2; grid-row: 1 / span 3; }
.big-code { font-size: 1rem; font-weight: 700; color: var(--ink); background: var(--surface-2); padding: 2px 8px; border-radius: 6px; }
tr.muted td { color: var(--ink-3); }

tr.edit-row > td { background: var(--surface-2); padding: 14px; }
tr.edit-row[hidden] { display: none; }
.school-edit-box { margin-top: 10px; border-top: 1px solid var(--line); padding-top: 8px; }
.school-edit-box summary { font-size: .9rem; }
.school-edit-box form { margin-top: 10px; }

/* Several units, chapters or topics at once: a dropdown that holds checkboxes (Practice Exams). */
.field { margin-bottom: 12px; }
.field-label { display: block; font-weight: 600; font-size: .9rem; }
.multi { position: relative; margin-top: 4px; }
.multi-sum { list-style: none; cursor: pointer; display: flex; align-items: center; min-height: 40px; padding: 8px 32px 8px 10px; border: 1px solid #8d9a98; border-radius: 10px; background: var(--surface); color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; position: relative; }
.multi-sum::-webkit-details-marker { display: none; }
.multi-sum::after { content: ""; position: absolute; right: 12px; top: 50%; width: 7px; height: 7px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: translateY(-70%) rotate(45deg); }
.multi[open] .multi-sum { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.multi.off .multi-sum { opacity: .55; cursor: not-allowed; }
.multi-panel { position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 4px); max-height: 300px; overflow: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 10px 28px rgba(0, 0, 0, .14); padding: 6px 8px; min-width: 260px; }
.multi-tools { padding: 4px 4px 6px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.multi-head { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: var(--ink-2); padding: 8px 4px 2px; }
.multi-item { display: flex; align-items: flex-start; font-weight: 400; margin: 0; padding: 6px 4px; border-radius: 6px; cursor: pointer; }
.multi-item:hover { background: var(--surface-2); }
.multi-item input { margin-top: 2px; flex: none; }

/* "You are here" path: a row of button-style steps */
.pathbar { margin: 0 0 14px; }
.pathbar ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.pathbar li { display: flex; min-width: 0; }
.pathbar .sep { color: var(--ink-3); font-size: 1.1rem; padding: 0 1px; }
.pathbar .step { display: flex; flex-direction: column; gap: 1px; padding: 5px 11px; border: 1px solid var(--line); border-radius: 9px;
  background: var(--surface); color: var(--ink); text-decoration: none; line-height: 1.25; max-width: 260px; min-width: 0; }
.pathbar a.step:hover { border-color: var(--brand); background: var(--brand-soft); }
.pathbar .step-k { font-size: .7rem; font-weight: 600; letter-spacing: .03em; text-transform: uppercase; color: var(--ink-3); }
.pathbar .step-v { font-size: .875rem; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pathbar a.step .step-v { color: var(--brand); }
.pathbar .step.here { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.pathbar .step.here .step-k { color: var(--brand-ink); opacity: .8; }
@media (max-width: 600px) { .pathbar .step { max-width: 100%; } }
.chapter.flash { animation: flash 2s ease-out; border-radius: 8px; }
@keyframes flash { 0%, 40% { background: var(--brand-soft); } 100% { background: transparent; } }

/* MyAura's own confirm / input dialog */
.nx-dialog { width: min(460px, calc(100vw - 32px)); padding: 20px; border: 1px solid var(--line); color: var(--ink); background: var(--surface); }
.nx-dialog::backdrop { background: rgba(10, 20, 20, .45); }
.nx-dialog h2 { font-size: 1.2rem; }
.nx-dialog-msg { margin: 0; color: var(--ink-2); white-space: pre-line; }
.nx-dialog label { display: flex; flex-direction: column; gap: 4px; font-weight: 500; }
.nx-dialog-actions { justify-content: flex-end; gap: 8px; margin-top: 4px; }

/* ---------- Public pages (sign in, sign up, password help) in the MyAura website's "Deep Teal Night" look ---------- */
.pub { --band: #083b37; --band-2: #0e4d47; --band-line: #1b6a62; --band-ink: #e9f4f2; --band-muted: #bcd9d4;
  --amber: #f29a2e; --amber-hover: #ffad4a; --amber-ink: #2a1600; --mint: #58c7b9;
  --bg: #f4f8f7; --surface: #ffffff; --surface-2: #e9f2f0; --line: #d6e5e2; --ink: #102a28; --ink-2: #4a6461; --brand: #0f6b63;
  min-height: 100vh; display: flex; flex-direction: column; background: var(--bg); color: var(--ink); font-size: 16px; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .pub { --bg: #062d2a; --surface: #0b3e3a; --surface-2: #0e4d47; --line: #1b6a62; --ink: #e9f4f2; --ink-2: #a9cbc6; --brand: #58c7b9; } }
:root[data-theme="dark"] .pub { --bg: #062d2a; --surface: #0b3e3a; --surface-2: #0e4d47; --line: #1b6a62; --ink: #e9f4f2; --ink-2: #a9cbc6; --brand: #58c7b9; }
.pub :focus-visible { outline-color: var(--amber); }
.pub-wrap { width: min(1160px, 100% - 40px); margin: 0 auto; }
.pub-head { background: var(--band); color: var(--band-ink); position: sticky; top: 0; z-index: 40; border-bottom: 1px solid var(--band-line); }
.pub-head .pub-wrap { display: flex; align-items: center; gap: 20px; min-height: 72px; position: relative; }
.pub-brand img { height: 44px; width: auto; display: block; }
.pub-nav { display: flex; align-items: center; gap: 22px; flex: 1; }
.pub-nav > a:not(.pub-btn) { color: var(--band-muted); text-decoration: none; font-size: 15px; font-weight: 500; white-space: nowrap; }
.pub-nav > a:not(.pub-btn):hover { color: #fff; }
.pub-nav .sp { flex: 1; }
.pub-nav .pub-btn { margin-left: -8px; }
.pub-theme { background: transparent; border: 1px solid var(--band-line); color: var(--band-ink); width: 38px; height: 38px; min-height: 0; border-radius: 50%; padding: 0; display: grid; place-items: center; }
.pub-theme:hover { background: transparent; border-color: var(--mint); }
.pub-theme .i-sun { display: none; }
:root[data-theme="dark"] .pub-theme .i-sun { display: block; } :root[data-theme="dark"] .pub-theme .i-moon { display: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .pub-theme .i-sun { display: block; } :root:not([data-theme="light"]) .pub-theme .i-moon { display: none; } }
.pub-menu { display: none; background: transparent; border: 0; padding: 8px; margin-left: auto; min-height: 0; }
.pub-menu:hover { background: transparent; }
.pub-menu span { display: block; width: 24px; height: 2px; background: var(--band-ink); margin: 5px 0; border-radius: 2px; }
@media (max-width: 1100px) {
  .pub-menu { display: block; }
  .pub-nav { display: none; position: absolute; left: -20px; right: -20px; top: 100%; background: var(--band); flex-direction: column; align-items: stretch; gap: 4px; padding: 12px 20px 22px; border-bottom: 1px solid var(--band-line); }
  .pub-nav.open { display: flex; }
  .pub-nav > a:not(.pub-btn) { padding: 10px 0; font-size: 17px; border-bottom: 1px solid var(--band-line); }
  .pub-nav .sp { display: none; }
  .pub-nav .pub-btn { margin: 8px 0 0; }
  .pub-theme { margin-top: 8px; }
}
.pub-btn, .pub button.pub-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 24px; min-height: 0; border-radius: 999px;
  background: var(--amber); color: var(--amber-ink); font: 700 16px/1.2 var(--font); text-decoration: none; border: 2px solid var(--amber); cursor: pointer; }
.pub-btn:hover, .pub button.pub-btn:hover { background: var(--amber-hover); border-color: var(--amber-hover); filter: none; }
.pub-btn.sm { padding: 8px 18px; font-size: 15px; }
.pub-btn.ghost { background: transparent; color: var(--band-ink); border-color: var(--mint); }
.pub-btn.ghost:hover { background: rgba(88,199,185,.15); border-color: var(--mint); }
.pub-btn.wide { width: 100%; margin-top: 4px; }
.pub-main { flex: 1; padding: 48px 0 64px; }
.pub-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 40px; align-items: start; }
.pub-side { background: var(--band); color: var(--band-ink); border: 1px solid var(--band-line); border-radius: 22px; padding: 36px 34px; position: sticky; top: 104px;
  background-image: radial-gradient(circle at 100% 0, rgba(88,199,185,.18), transparent 55%); }
.pub-side h2 { font: 700 clamp(28px, 3.2vw, 38px)/1.15 var(--display); color: #fff; margin: 0 0 14px; }
.pub-side h2 em { font-style: normal; color: var(--amber); }
.pub-side p { color: var(--band-muted); }
.pub-eyebrow { margin: 0 0 10px; font-size: 13px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--mint) !important; }
.pub-ticks { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 8px; color: var(--band-muted); }
.pub-ticks li::before { content: "✓"; color: var(--mint); font-weight: 700; margin-right: 10px; }
.pub-steps { list-style: none; counter-reset: s; padding: 0; margin: 18px 0 0; display: grid; gap: 16px; }
.pub-steps li { counter-increment: s; position: relative; padding-left: 46px; color: var(--band-muted); }
.pub-steps li strong { color: #fff; }
.pub-steps li::before { content: counter(s); position: absolute; left: 0; top: -2px; width: 32px; height: 32px; border-radius: 50%; background: var(--amber); color: var(--amber-ink); font-weight: 700; display: grid; place-items: center; }
.pub-card { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 32px; box-shadow: 0 1px 2px rgba(8,59,55,.06), 0 8px 24px rgba(8,59,55,.08); }
.pub-card h1 { font: 700 clamp(28px, 3vw, 36px)/1.15 var(--display); color: var(--ink); margin: 0 0 8px; }
.pub-card input, .pub-card select { background: var(--bg); border-color: var(--line); min-height: 46px; }
.pub-card input:focus, .pub-card select:focus { border-color: var(--brand); }
.pub-under { margin: 18px 4px 0; text-align: center; color: var(--ink-2); }
.pub-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; background: var(--surface-2); border-radius: 999px; margin: 0 0 22px; }
.pub-switch a { text-align: center; padding: 9px 12px; border-radius: 999px; text-decoration: none; color: var(--ink-2); font-weight: 600; font-size: 15px; }
.pub-switch a[aria-current="page"] { background: var(--band); color: #fff; }
.pub-plan { background: var(--surface-2); border-left: 4px solid var(--amber); border-radius: 12px; padding: 12px 16px; margin: 6px 0 18px; font-size: 15px; }
.pub-plan span:last-child { display: block; color: var(--ink-2); font-size: 14px; margin-top: 4px; }
.pub-plan-tag { font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); margin-right: 4px; }
.pub-foot { background: var(--band); color: var(--band-muted); padding: 28px 0 32px; font-size: 14px; }
.pub-foot a { color: var(--mint); }
.pub-foot p { margin: 6px 0 0; }
.pub-foot-links { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-bottom: 14px; }
.pub-foot-links a { color: var(--band-ink); text-decoration: none; }
.pub-foot-links a:hover { text-decoration: underline; }
@media (max-width: 860px) {
  .pub-main { padding: 24px 0 40px; }
  .pub-grid { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .pub-body { order: -1; }
  .pub-side { position: static; padding: 26px 22px; }
  .pub-card { padding: 24px 20px; }
}

/* ---------- Parent area in the website's look (core.js shell() adds .site-look for parents) ---------- */
:root.site-look { --band: #083b37; --band-2: #0e4d47; --band-line: #1b6a62; --band-ink: #e9f4f2; --band-muted: #bcd9d4;
  --amber: #f29a2e; --amber-hover: #ffad4a; --amber-ink: #2a1600; --mint: #58c7b9;
  --bg: #f4f8f7; --surface: #ffffff; --surface-2: #e9f2f0; --line: #d6e5e2; --ink: #102a28; --ink-2: #4a6461; --ink-3: #5d7774;
  --brand: #0f6b63; --brand-ink: #ffffff; --brand-soft: #d9efeb; --chart: #0f6b63; --grid: #e3eeec; }
@media (prefers-color-scheme: dark) { :root.site-look:not([data-theme="light"]) { --bg: #062d2a; --surface: #0b3e3a; --surface-2: #0e4d47; --line: #1b6a62;
  --ink: #e9f4f2; --ink-2: #a9cbc6; --ink-3: #8fb5af; --brand: #58c7b9; --brand-ink: #08201d; --brand-soft: #124a45; --chart: #58c7b9; --grid: #14504a; } }
:root.site-look[data-theme="dark"] { --bg: #062d2a; --surface: #0b3e3a; --surface-2: #0e4d47; --line: #1b6a62;
  --ink: #e9f4f2; --ink-2: #a9cbc6; --ink-3: #8fb5af; --brand: #58c7b9; --brand-ink: #08201d; --brand-soft: #124a45; --chart: #58c7b9; --grid: #14504a; }
.shell.site-look, .shell.site-look.collapsed { grid-template-columns: minmax(0, 1fr); }
.shell.site-look .side, .shell.site-look .page-tabs { display: none; }
.shell.site-look .page { min-height: 100vh; }
.shell.site-look .topbar { background: var(--band); backdrop-filter: none; -webkit-backdrop-filter: none; border-bottom: 1px solid var(--band-line);
  height: 72px; gap: 22px; padding: 0 max(20px, calc((100% - 1160px) / 2)); }
.shell.site-look .topbar-logo { display: flex; padding: 0; }
.site-logo { height: 40px; width: auto; display: block; }
.shell.site-look .menu-btn { display: none; color: var(--band-ink); font-size: 1.3rem; }
.site-nav { display: flex; align-items: center; gap: 22px; flex: 1; height: 100%; }
.site-link { color: var(--band-muted); text-decoration: none; font-size: 15px; font-weight: 500; white-space: nowrap; display: flex; align-items: center; height: 100%; }
.site-link:hover { color: #fff; }
.site-link.on { color: #fff; box-shadow: inset 0 -3px 0 var(--amber); }
.site-nav .sp { flex: 1; }
.site-theme { background: transparent; border: 1px solid var(--band-line); color: var(--band-ink); width: 38px; height: 38px; min-height: 0; border-radius: 50%; padding: 0; display: grid; place-items: center; }
.site-theme:hover { background: transparent; border-color: var(--mint); }
.site-theme .i-sun { display: none; }
:root[data-theme="dark"] .site-theme .i-sun { display: block; } :root[data-theme="dark"] .site-theme .i-moon { display: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .site-theme .i-sun { display: block; } :root:not([data-theme="light"]) .site-theme .i-moon { display: none; } }
.shell.site-look .me-wrap { margin-left: 0; }
.shell.site-look .me-button { background: transparent; border-color: var(--band-line); color: var(--band-ink); }
.shell.site-look .me-button:hover { border-color: var(--mint); background: transparent; }
.shell.site-look main { width: min(1160px, 100% - 40px); margin: 0 auto; padding: 32px 0 64px; flex: 1; }
.shell.site-look main h1 { font-size: clamp(28px, 3.4vw, 40px); }
.shell.site-look .card { border-radius: 16px; }
.shell.site-look .primary, .site-look .nx-dialog .primary { background: var(--amber); color: var(--amber-ink); border-color: var(--amber); border-radius: 999px; padding-left: 20px; padding-right: 20px; }
.shell.site-look .primary:hover, .site-look .nx-dialog .primary:hover { background: var(--amber-hover); border-color: var(--amber-hover); filter: none; }
.shell.site-look .pub-foot { margin-top: auto; }
@media (max-width: 860px) {
  .shell.site-look .topbar { gap: 12px; }
  .shell.site-look .menu-btn { display: block; order: 3; }
  .shell.site-look .me-wrap { margin-left: auto; }
  .shell.site-look .me-name { display: none; }
  .site-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; height: auto; background: var(--band); flex-direction: column; align-items: stretch;
    gap: 0; padding: 8px 20px 18px; border-bottom: 1px solid var(--band-line); }
  .site-nav.open { display: flex; }
  .site-link { padding: 12px 0; font-size: 17px; border-bottom: 1px solid var(--band-line); height: auto; }
  .site-link.on { box-shadow: none; color: var(--amber); }
  .site-nav .sp { display: none; }
  .site-theme { margin-top: 12px; }
  .shell.site-look main { padding: 20px 0 40px; }
}

/* ---------- Checkout (website cart) and Set up your children ---------- */
.pub-h2 { font: 700 22px/1.2 var(--display); margin: 0 0 6px; }
.checkout-wrap { max-width: 640px; }
.checkout-wrap .pub-card { background: var(--surface); }
.cart-lines { list-style: none; padding: 0; margin: 8px 0 16px; }
.cart-line { display: grid; grid-template-columns: minmax(0, 1fr) auto 90px; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.qty button { min-height: 0; width: 34px; height: 34px; padding: 0; border: 0; border-radius: 0; background: var(--surface-2); font-size: 18px; }
.qty span { min-width: 34px; text-align: center; font-weight: 700; }
.cart-coupon { margin-top: 8px; }
.cart-coupon label { margin-bottom: 4px; }
.cart-total { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; border-top: 2px solid var(--ink); margin-top: 14px; padding-top: 12px; font-size: 1.05rem; }
.cart-total strong { font-size: 1.4rem; }
.setup-new { border-top: 1px dashed var(--line); margin-top: 6px; padding-top: 12px; }
.setup-new[hidden] { display: none; }
@media (max-width: 520px) { .cart-line { grid-template-columns: minmax(0, 1fr) auto; } .cart-line > strong { grid-column: 2; } }

/* School coupon form */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.coupon-big { font: 700 32px/1.2 ui-monospace, Consolas, monospace; letter-spacing: .06em; background: var(--surface-2); border: 2px dashed var(--amber, #f29a2e);
  border-radius: 14px; padding: 16px; text-align: center; margin: 12px 0 16px; }

.family-prices { width: 100%; border-collapse: collapse; }
.family-prices th, .family-prices td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.family-prices thead th { font-size: 13px; color: var(--ink-2); }

/* Unfinished exams on Practice Exams */
.unfinished-list { list-style: none; padding: 0; margin: 0 0 6px; }
.unfinished-row { display: flex; align-items: center; gap: 14px; padding: 10px 0; border-top: 1px solid var(--line); }
.unfinished-row[hidden] { display: none; }
.unfinished-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.unfinished-topic { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-2); }
.unfinished-row .btn { flex: none; }
