/* The Campus's styles, taken from the clickable mockup (mockups/campus.html, v0.09), which is the design to follow.
   Brand colours are overridden by brand.css, made from campus.config.json. Additions for the app are at the end. */
[hidden] { display: none !important; }
/* Layout: a phone app shell (screen + bottom tab bar). Classes and sheets open over it. System font, so it feels native. */
:root {
  --bg: #F2F3F7; --surface: #FFFFFF; --fill: #ECEEF2; --line: #E2E5EB;
  --ink: #0F1524; --ink-2: #5A6475; --ink-3: #8C94A3;
  --brand: #14213D; --brand-ink: #FFFFFF; --accent: #B9851F; --accent-soft: #FBF2DF;
  --ai: #2D6BD8; --ai-soft: #EAF1FD; --good: #1C9361; --good-soft: #E4F5EC; --bad: #D4433A; --bad-soft: #FCEAE8;
  --bull: #BE552F; --bear: #3D6A9A; --scrim: rgba(10, 14, 24, .4); --on-solid: #FFFFFF;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", "Roboto Mono", Menlo, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #0B0D12; --surface: #161A22; --fill: #222834; --line: #272D39;
  --ink: #EEF1F6; --ink-2: #A3ABBA; --ink-3: #737C8D;
  --brand: #EEF1F6; --brand-ink: #0F1524; --accent: #E2B04D; --accent-soft: #2A2313;
  --ai: #7CA9F6; --ai-soft: #172236; --good: #3DC48A; --good-soft: #12291F; --bad: #F06B5F; --bad-soft: #331816;
  --bull: #E58A68; --bear: #8DB0DA; --scrim: rgba(0, 0, 0, .6); color-scheme: dark; } }
:root[data-theme="dark"] {
  --bg: #0B0D12; --surface: #161A22; --fill: #222834; --line: #272D39;
  --ink: #EEF1F6; --ink-2: #A3ABBA; --ink-3: #737C8D;
  --brand: #EEF1F6; --brand-ink: #0F1524; --accent: #E2B04D; --accent-soft: #2A2313;
  --ai: #7CA9F6; --ai-soft: #172236; --good: #3DC48A; --good-soft: #12291F; --bad: #F06B5F; --bad-soft: #331816;
  --bull: #E58A68; --bear: #8DB0DA; --scrim: rgba(0, 0, 0, .6); color-scheme: dark; }

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
body { background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 16px; line-height: 1.45; -webkit-font-smoothing: antialiased; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
:focus-visible { outline: 2px solid var(--ai); outline-offset: 2px; border-radius: 10px; }
p { margin: 0; }
h1, h2, h3 { margin: 0; text-wrap: balance; }
.num { font-variant-numeric: tabular-nums; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--ink-2); }
.faint { color: var(--ink-3); }
.small { font-size: 14px; }
.tiny { font-size: 12.5px; }
svg.i { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* Shell */
.shell { position: relative; height: 100%; max-width: 430px; margin: 0 auto; display: flex; flex-direction: column; background: var(--bg); overflow: hidden; }
@media (min-width: 640px) and (max-width: 899px) { body { background: var(--fill); } .shell { max-width: 600px; border-left: 1px solid var(--line); border-right: 1px solid var(--line); } }
.cols, .col { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.navbrand { display: none; }
.screen { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain;
  padding-block: 8px 24px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px));
  display: flex; flex-direction: column; gap: 20px; }
.topline { display: flex; align-items: center; justify-content: space-between; min-height: 36px; }
.large { font-size: 32px; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; }
.section { display: grid; gap: 8px; }
.section > h2 { font-size: 20px; font-weight: 700; letter-spacing: -.01em; padding: 0 2px; }
.pills { display: flex; gap: 6px; }
.pill { display: inline-flex; align-items: center; gap: 5px; height: 32px; padding: 0 11px; border-radius: 99px; background: var(--surface); font-weight: 700; font-size: 14px; }
.pill svg { width: 16px; height: 16px; }

/* Tab bar */
.tabbar { display: grid; grid-template-columns: repeat(5, 1fr); background: var(--surface); border-top: 1px solid var(--line);
  padding-left: max(8px, env(safe-area-inset-left, 0px)); padding-right: max(8px, env(safe-area-inset-right, 0px)); }
.tab { display: grid; justify-items: center; gap: 2px; padding: 8px 0 10px; min-height: 56px; font-size: 11px; font-weight: 600; color: var(--ink-3); }
.tab[aria-current="page"] { color: var(--ink); }
.tab[aria-current="page"] svg.i { stroke-width: 2.2; }

/* Groups (native-style lists) */
.group { background: var(--surface); border-radius: 14px; overflow: hidden; }
.row { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 13px 14px; min-height: 56px; width: 100%; text-align: left; }
.row + .row { border-top: 1px solid var(--line); }
.row .t { font-weight: 600; }
.row .s { font-size: 13.5px; color: var(--ink-2); }
.row .r { font-size: 14px; color: var(--ink-3); display: flex; align-items: center; gap: 4px; }
.row.locked .t { color: var(--ink-2); }
.ico { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--fill); color: var(--ink-2); }
.ico.ai { background: var(--ai-soft); color: var(--ai); }
.ico.ok { background: var(--good-soft); color: var(--good); }
.ico.acc { background: var(--accent-soft); color: var(--accent); }
.chev { width: 16px; height: 16px; color: var(--ink-3); }
.aimark { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 700; color: var(--ai); }
.aimark svg { width: 13px; height: 13px; }

/* Hero card */
.hero { background: var(--surface); border-radius: 18px; padding: 18px; display: grid; gap: 14px; }
.hero .kicker { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.hero h3 { font-size: 24px; font-weight: 800; letter-spacing: -.015em; line-height: 1.15; margin-top: 2px; }
.dots { display: flex; gap: 5px; }
.dots i { flex: 1; height: 5px; border-radius: 99px; background: var(--fill); }
.dots i.on { background: var(--accent); }
.btn { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 52px; border-radius: 14px;
  background: var(--brand); color: var(--brand-ink); font-weight: 700; font-size: 17px; transition: transform .08s, opacity .15s; }
.btn:active { transform: scale(.98); }
.btn:disabled { background: var(--fill); color: var(--ink-3); }
.btn.secondary { background: var(--fill); color: var(--ink); }
.btn.good { background: var(--good); color: var(--on-solid); }
.btn.bad { background: var(--bad); color: var(--on-solid); }
.link { color: var(--ai); font-weight: 600; font-size: 15px; display: inline-flex; align-items: center; gap: 6px; min-height: 40px; }

/* Campus grid */
.campus { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.bld { background: var(--surface); border-radius: 14px; padding: 12px 10px; min-height: 92px; display: grid; gap: 6px; align-content: start; text-align: left; position: relative; }
.bld .t { font-size: 13.5px; font-weight: 700; line-height: 1.2; }
.bld .s { font-size: 12px; color: var(--ink-3); }
.bld.locked { background: transparent; border: 1px dashed var(--line); }
.bld.locked .t { color: var(--ink-2); }
.bld .lock { position: absolute; top: 10px; right: 10px; width: 14px; height: 14px; color: var(--ink-3); }
.bld .next { position: absolute; top: 9px; right: 9px; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }

.meter { height: 8px; border-radius: 99px; background: var(--fill); overflow: hidden; }
.meter i { display: block; height: 100%; border-radius: 99px; background: var(--accent); transition: width .2s, background .2s; }
.risk { font-size: 12px; color: var(--ink-3); text-align: center; padding: 0 8px; }
.stats4 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.stat { background: var(--surface); border-radius: 14px; padding: 14px; display: grid; gap: 2px; }
.stat b { font-size: 24px; font-weight: 800; font-variant-numeric: tabular-nums; }
.week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; text-align: center; font-size: 12px; color: var(--ink-3); }
.week i { display: block; width: 32px; height: 32px; margin: 4px auto 0; border-radius: 50%; background: var(--fill); }
.week i.on { background: var(--accent); }
.week i.today { box-shadow: inset 0 0 0 2px var(--accent); background: transparent; }
.badges { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 2px; }
.badge { flex: none; width: 84px; display: grid; justify-items: center; gap: 6px; font-size: 12px; text-align: center; color: var(--ink-2); }
.badge span { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.badge.off span { background: var(--fill); color: var(--ink-3); }
.switch { width: 51px; height: 31px; border-radius: 99px; background: var(--good); position: relative; }
.switch::after { content: ""; position: absolute; top: 2px; right: 2px; width: 27px; height: 27px; border-radius: 50%; background: var(--on-solid); box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: right .15s; }
.switch[aria-checked="false"] { background: var(--fill); }
.switch[aria-checked="false"]::after { right: 22px; }
.empty { display: grid; justify-items: center; text-align: center; gap: 10px; padding: 26px 18px; background: var(--surface); border-radius: 18px; }
.empty .ico { width: 56px; height: 56px; border-radius: 16px; }
.empty .ico svg { width: 28px; height: 28px; }
.seg { display: grid; grid-template-columns: 1fr 1fr; background: var(--fill); border-radius: 10px; padding: 3px; }
.seg button { min-height: 34px; border-radius: 8px; font-size: 14px; font-weight: 600; color: var(--ink-2); }
.seg button[aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(0, 0, 0, .08); }

/* Tutor */
.chat { display: grid; gap: 10px; align-content: start; }
.msg { padding: 10px 13px; border-radius: 18px; font-size: 15.5px; max-width: 86%; }
.msg.me { background: var(--brand); color: var(--brand-ink); justify-self: end; border-bottom-right-radius: 5px; }
.msg.ai { background: var(--surface); border-bottom-left-radius: 5px; }
.msg.ai .aimark { display: flex; margin-bottom: 3px; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; }
.chips button { flex: none; background: var(--surface); border: 1px solid var(--line); border-radius: 99px; padding: 8px 13px; font-size: 14px; min-height: 40px; }
.composer { display: grid; grid-template-columns: 1fr 44px; gap: 8px; align-items: end; padding-block: 8px; background: var(--bg); border-top: 1px solid var(--line);
  padding-left: max(12px, env(safe-area-inset-left, 0px)); padding-right: max(12px, env(safe-area-inset-right, 0px)); }
.composer input { min-height: 44px; border-radius: 22px; border: 1px solid var(--line); background: var(--surface); padding: 0 16px; font-size: 16px; width: 100%; }
.composer input:focus { outline: none; border-color: var(--ai); }
.send { width: 44px; height: 44px; border-radius: 50%; background: var(--brand); color: var(--brand-ink); display: grid; place-items: center; }
textarea { width: 100%; min-height: 120px; resize: vertical; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; font-size: 16px; line-height: 1.45; }
textarea:focus { outline: none; border-color: var(--ai); }
.flags { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.flags li { display: grid; grid-template-columns: 10px 1fr; gap: 10px; font-size: 15px; }
.flags li::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--bad); margin-top: 8px; }
.flags li.ok::before { background: var(--ink-3); }
.note { font-size: 12.5px; color: var(--ink-3); }
.msg .link { display: flex; min-height: 36px; font-size: 14.5px; margin-top: 4px; text-align: left; }
.msg .muted { color: var(--ink-3); }
#scamPane { display: grid; gap: 10px; }
#scamOut .panel { display: grid; gap: 10px; }
.sheet .chat { margin-top: 10px; }
.sheet .msg.ai { background: var(--fill); }
.sheet .composer { grid-template-columns: 1fr 44px; }

/* Overlays: class, results, sheet */
.overlay { position: absolute; inset: 0; z-index: 10; background: var(--bg); display: flex; flex-direction: column; }
.ctop { display: flex; align-items: center; gap: 12px; min-height: 52px; padding-left: max(8px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.xbtn { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; color: var(--ink-2); }
.cprog { flex: 1; height: 8px; border-radius: 99px; background: var(--fill); overflow: hidden; }
.cprog i { display: block; height: 100%; background: var(--accent); border-radius: 99px; transition: width .25s; }
.combo { font-size: 13px; font-weight: 700; color: var(--accent); min-width: 54px; text-align: right; font-variant-numeric: tabular-nums; }
.cbody { flex: 1; overflow-y: auto; padding-block: 6px 20px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); display: flex; flex-direction: column; gap: 18px; }
.persona { display: grid; grid-template-columns: 44px 1fr; gap: 12px; align-items: start; }
.avatar { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 17px; }
.avatar.bull { background: var(--bad-soft); color: var(--bull); }
.avatar.bear { background: var(--ai-soft); color: var(--bear); }
.persona .who { font-size: 13px; font-weight: 700; color: var(--ink-2); }
.bubble { background: var(--surface); border-radius: 4px 18px 18px 18px; padding: 10px 13px; margin-top: 4px; font-size: 15.5px; }
.q { font-size: 22px; font-weight: 800; letter-spacing: -.015em; line-height: 1.22; }
.hint { font-size: 15px; color: var(--ink-2); margin-top: -10px; }
.opts { display: grid; gap: 10px; }
.opt { width: 100%; text-align: left; background: var(--surface); border: 2px solid var(--line); border-radius: 14px; padding: 14px 16px; min-height: 56px; font-size: 16px; line-height: 1.35; }
.opt[aria-pressed="true"] { border-color: var(--ai); background: var(--ai-soft); }
.opt:disabled { opacity: 1; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.two .opt { text-align: center; font-weight: 700; font-size: 18px; min-height: 64px; }
.statement { font-size: 19px; font-weight: 600; line-height: 1.4; padding: 16px; background: var(--surface); border-radius: 14px; }
.panel { background: var(--surface); border-radius: 16px; padding: 16px; display: grid; gap: 12px; }
.kv { display: flex; justify-content: space-between; gap: 10px; font-size: 15px; color: var(--ink-2); }
.kv span:last-child { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.readout { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; flex-wrap: wrap; font-size: 15px; color: var(--ink-2); }
.readout b { font-size: 26px; color: var(--ink); font-variant-numeric: tabular-nums; }
.lots { display: flex; justify-content: space-between; align-items: baseline; font-size: 15px; color: var(--ink-2); }
.lots b { color: var(--ink); font-size: 17px; font-variant-numeric: tabular-nums; }
input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 44px; background: transparent; }
input[type=range]::-webkit-slider-runnable-track { height: 8px; border-radius: 99px; background: var(--fill); }
input[type=range]::-moz-range-track { height: 8px; border-radius: 99px; background: var(--fill); }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 30px; height: 30px; margin-top: -11px; border-radius: 50%; background: var(--brand); border: 3px solid var(--surface); box-shadow: 0 2px 6px rgba(0, 0, 0, .2); }
input[type=range]::-moz-range-thumb { width: 24px; height: 24px; border-radius: 50%; background: var(--brand); border: 3px solid var(--surface); box-shadow: 0 2px 6px rgba(0, 0, 0, .2); }
.chart { width: 100%; height: auto; display: block; touch-action: none; user-select: none; -webkit-user-select: none; }
.chart text { font-family: var(--mono); font-size: 9px; fill: var(--ink-3); }
.ad { background: var(--surface); border-radius: 16px; overflow: hidden; }
.ad .h { display: flex; align-items: center; gap: 10px; padding: 12px 14px; font-size: 14px; }
.ad .h i { width: 32px; height: 32px; border-radius: 50%; background: var(--fill); }
.ad .h small { display: block; color: var(--ink-3); font-size: 12px; }
.ad .b { padding: 0 14px 14px; display: flex; flex-wrap: wrap; gap: 8px; }
.claim { border: 2px solid var(--line); background: var(--bg); border-radius: 12px; padding: 10px 12px; min-height: 44px; font-size: 15px; font-weight: 600; }
.claim[aria-pressed="true"] { border-color: var(--bad); background: var(--bad-soft); color: var(--bad); }
.claim.missed { border-color: var(--bad); border-style: dashed; }
.example { font-size: 12.5px; color: var(--ink-3); }

.actionbar { display: grid; gap: 12px; background: var(--surface); border-top: 1px solid var(--line); padding-block: 12px 14px;
  padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); transition: background .2s; }
.actionbar.good { background: var(--good-soft); border-top-color: transparent; }
.actionbar.bad { background: var(--bad-soft); border-top-color: transparent; }
.fb { display: grid; gap: 6px; }
.fb h3 { font-size: 18px; font-weight: 800; display: flex; align-items: center; gap: 8px; }
.actionbar.good .fb h3 { color: var(--good); }
.actionbar.bad .fb h3 { color: var(--bad); }
.fb p { font-size: 15px; }
.fb .link { min-height: 36px; }

.done { justify-content: flex-start; }
.donehead { display: grid; justify-items: center; text-align: center; gap: 8px; padding-top: 18px; }
.medal { width: 96px; height: 96px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.medal svg { width: 48px; height: 48px; stroke-width: 2.2; }
.donehead h1 { font-size: 28px; font-weight: 800; letter-spacing: -.02em; }
.three { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.three .stat { text-align: center; padding: 12px 8px; }
.three .stat b { font-size: 22px; }
.coach { background: var(--surface); border-radius: 16px; padding: 16px; display: grid; gap: 10px; }
.coach ul { margin: 0; padding-left: 18px; display: grid; gap: 8px; font-size: 15px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tags span { font-size: 13px; padding: 5px 10px; border-radius: 99px; background: var(--ai-soft); color: var(--ai); font-weight: 600; }

.scrim { position: absolute; inset: 0; z-index: 30; background: var(--scrim); }
.sheet { position: absolute; left: 0; right: 0; bottom: 0; z-index: 31; background: var(--surface); border-radius: 20px 20px 0 0; max-height: 88%; overflow-y: auto;
  display: grid; gap: 14px; padding-block: 8px 20px; padding-left: max(18px, env(safe-area-inset-left, 0px)); padding-right: max(18px, env(safe-area-inset-right, 0px));
  animation: up .22s ease-out; }
@keyframes up { from { transform: translateY(30%); opacity: .4; } to { transform: none; opacity: 1; } }
.grab { width: 36px; height: 5px; border-radius: 99px; background: var(--line); justify-self: center; margin-bottom: 4px; }
.sheet h2 { font-size: 22px; font-weight: 800; letter-spacing: -.015em; }
.sheet .group { background: var(--bg); }
.tagline { display: inline-flex; width: fit-content; font-size: 12.5px; font-weight: 700; padding: 4px 10px; border-radius: 99px; }
.tagline.open { background: var(--good-soft); color: var(--good); }
.tagline.locked { background: var(--fill); color: var(--ink-2); }
/* Onboarding assessment */
.ob { z-index: 20; }
.obtop { display: flex; align-items: center; gap: 12px; min-height: 52px; padding-left: max(8px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.obtop [hidden] { display: block !important; visibility: hidden; }
.obq { font-size: 26px; font-weight: 800; letter-spacing: -.02em; line-height: 1.15; }
.obsub { color: var(--ink-2); font-size: 15.5px; margin-top: -8px; }
.optc { display: grid; grid-template-columns: 1fr 24px; gap: 10px; align-items: center; }
.optc .ck { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; color: var(--on-solid); }
.optc .ck svg { width: 14px; height: 14px; stroke-width: 3; }
.multi .ck { border-radius: 7px; }
.opt[aria-pressed="true"] .ck { background: var(--ai); border-color: var(--ai); }
.opt .sub2 { display: block; font-size: 13.5px; color: var(--ink-2); margin-top: 2px; }
.select { width: 100%; min-height: 60px; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 10px; text-align: left;
  background: var(--surface); border: 2px solid var(--line); border-radius: 14px; padding: 8px 14px; font-size: 17px; font-weight: 600; }
.select:active { border-color: var(--ai); }
.chev.down { transform: rotate(90deg); }
.search { min-height: 50px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); padding: 0 14px; font-size: 16px; width: 100%; }
.search:focus { outline: none; border-color: var(--ai); }
.benefit { display: grid; grid-template-columns: 36px 1fr; gap: 12px; align-items: start; background: var(--ai-soft); border-radius: 14px; padding: 12px 14px; font-size: 14.5px; }
.welcome { flex: 1; display: grid; align-content: center; justify-items: center; text-align: center; gap: 16px; padding: 24px max(24px, env(safe-area-inset-right, 0px)) 24px max(24px, env(safe-area-inset-left, 0px)); }
.welcome .logo { width: 72px; height: 72px; border-radius: 20px; background: var(--brand); color: var(--brand-ink); display: grid; place-items: center; }
.welcome .logo svg { width: 40px; height: 40px; }
.welcome h1 { font-size: 30px; font-weight: 800; letter-spacing: -.02em; line-height: 1.12; }
.welcome ul { list-style: none; padding: 0; margin: 4px 0 0; display: grid; gap: 10px; text-align: left; }
.welcome li { display: grid; grid-template-columns: 28px 1fr; gap: 10px; align-items: center; font-size: 15.5px; }
.welcome li svg { color: var(--ai); }
.place { background: var(--surface); border-radius: 18px; padding: 18px; display: grid; gap: 8px; }
.place .lvl { font-size: 22px; font-weight: 800; letter-spacing: -.015em; }
/* Lesson cards */
.phase { display: flex; justify-content: space-between; align-items: center; min-height: 32px; font-size: 13px; font-weight: 700; color: var(--accent); }
.phase.learn { color: var(--ai); }
.listen { min-height: 32px; font-size: 14px; }
.listen svg { width: 18px; height: 18px; }
.lt { font-size: 26px; font-weight: 800; letter-spacing: -.02em; line-height: 1.15; }
.lp { font-size: 17px; line-height: 1.55; }
.vrow { display: flex; justify-content: space-between; gap: 10px; font-size: 15px; color: var(--ink-2); }
.vrow b { color: var(--ink); font-variant-numeric: tabular-nums; }
.vbar { height: 14px; border-radius: 99px; background: var(--fill); overflow: hidden; margin-top: -6px; }
.vbar i { display: block; height: 100%; border-radius: 99px; background: var(--ai); transition: width .25s, background .2s; }
/* Pictures: the app shows the result, the learner never does the sum (docs/class-template.md, "Pictures"). */
.pic { display: grid; gap: 6px; }
.pic svg { width: 100%; height: auto; display: block; }
.pic svg text { font-family: var(--font); font-size: 11px; fill: var(--ink-2); }
.pic-ruler svg { max-width: 420px; }
.pic .grow { transform-box: fill-box; transition: transform .35s cubic-bezier(.3, 1.3, .5, 1); }
.pic-lens svg { max-width: 360px; margin: 0 auto; }
.pic-jar svg { max-width: 300px; margin: 0 auto; }
.pic-box svg { max-width: 300px; }
.meter.big { height: 14px; }
.mword { display: flex; align-items: center; gap: 7px; font-size: 14px; color: var(--ink-2); }
.mword .dot { width: 11px; height: 11px; border-radius: 50%; background: var(--accent); transition: background .2s; }
.mword b { color: var(--ink); }
.stackpic { display: flex; align-items: flex-end; gap: 18px; }
.stackpic .col { width: 88px; height: 170px; flex: none; display: flex; flex-direction: column-reverse; gap: 3px; padding: 0 6px; border-bottom: 3px solid var(--ink-3); }
.stackpic .col i { display: block; border-radius: 6px; min-height: 3px; transition: height .25s; animation: drop .35s cubic-bezier(.3, 1.3, .5, 1); }
@keyframes drop { from { transform: translateY(-40px); opacity: 0; } }
.legend { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 14px; color: var(--ink-2); flex: 1; min-width: 0; }
.legend li { display: grid; grid-template-columns: 12px 1fr auto; gap: 8px; align-items: center; }
.legend i { width: 12px; height: 12px; border-radius: 3px; }
.legend b { color: var(--ink); font-variant-numeric: tabular-nums; }
details.maths { background: var(--fill); border-radius: 12px; padding: 0 14px; font-size: 15px; }
details.maths summary { color: var(--ai); font-weight: 600; min-height: 42px; display: flex; align-items: center; gap: 6px; cursor: pointer; list-style: none; }
details.maths summary::-webkit-details-marker { display: none; }
details.maths summary::before { content: "+"; font-weight: 800; width: 14px; }
details.maths[open] summary::before { content: "−"; }
details.maths p { margin: 0 0 10px; font-variant-numeric: tabular-nums; color: var(--ink-2); }
details.maths p + p { color: var(--ink); }
@media (prefers-reduced-motion: reduce) { .pic .grow, .stackpic .col i, .mword .dot { transition: none; animation: none; } }
.steps { margin: 0; padding-left: 22px; display: grid; gap: 12px; font-size: 16.5px; line-height: 1.5; }
.steps li::marker { color: var(--ai); font-weight: 800; }
.dtable { width: 100%; border-collapse: collapse; font-size: 15px; }
.dtable th, .dtable td { text-align: left; padding: 7px 6px; border-bottom: 1px solid var(--line); }
.dtable th { color: var(--ink-2); font-weight: 600; }
.flow { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.flow li { background: var(--fill); border-radius: 12px; padding: 10px 12px; display: grid; gap: 2px; }
.flow li + li::before { content: "↓"; color: var(--ai); font-weight: 800; margin: -6px 0 2px; }
.flow span { font-size: 14px; color: var(--ink-2); }
.web .lt { font-size: 30px; }
/* Whole-Academy progress: one segment per part of the course, the done part filled, a dot where the learner is */
.pathcard { padding: 16px; display: grid; gap: 12px; }
.pathhead { display: flex; justify-content: space-between; align-items: baseline; font-size: 15px; color: var(--ink-2); }
.pathhead b { color: var(--ink); font-size: 17px; }
.pbar { display: flex; gap: 3px; height: 10px; margin-top: 4px; }
.pbar.big { height: 14px; }
.pseg { position: relative; min-width: 8px; border-radius: 99px; background: var(--fill); }
.pseg > i { display: block; height: 100%; border-radius: 99px; background: var(--accent); }
.pseg.cap { background: transparent; box-shadow: inset 0 0 0 1.5px var(--line); }
.pseg.ready::after { content: ""; position: absolute; right: -3px; top: -5px; bottom: -5px; width: 3px; border-radius: 2px; background: var(--ink-2); }
.pseg .here { position: absolute; top: 50%; width: 16px; height: 16px; border-radius: 50%; background: var(--surface); border: 3.5px solid var(--accent); transform: translate(-50%, -50%); box-sizing: border-box; }
.pbar.big .here { width: 20px; height: 20px; }
.pmarks { display: flex; gap: 3px; margin-top: -6px; font-size: 12px; color: var(--ink-3); }
.pmarks span { min-width: 8px; display: flex; justify-content: flex-end; white-space: nowrap; }
.pmarks em { font-style: normal; font-weight: 700; color: var(--ink-2); }
.miles { display: grid; gap: 6px; }
.miles .kv span:last-child { text-align: right; }
.pace { display: grid; gap: 6px; }
.mini { height: 5px; border-radius: 99px; background: var(--fill); overflow: hidden; margin-top: 6px; max-width: 220px; }
.mini i { display: block; height: 100%; background: var(--accent); border-radius: 99px; }
.prows { display: grid; margin: 0 -16px -16px; border-top: 1px solid var(--line); }
.prow { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 10px 16px; }
.prow + .prow { border-top: 1px solid var(--line); }
.prow .t { font-weight: 600; font-size: 15px; }
.prow .s { font-size: 13px; color: var(--ink-2); }
.prow .r { font-size: 14px; color: var(--ink-3); }
.prow.mile { background: var(--accent-soft); }
.prow.mile .t, .prow.mile .r { color: var(--accent); font-weight: 700; }
.prow.mile .ico { background: transparent; color: var(--accent); }
@media (prefers-reduced-motion: reduce) { .vbar i { transition: none; } }

/* Pointer devices: hover states */
@media (hover: hover) {
  button.row:hover, .bld:not(.locked):hover { background: color-mix(in srgb, var(--fill) 55%, var(--surface)); }
  .opt:not(:disabled):hover, .claim:hover, .select:hover { border-color: var(--ink-3); }
  .btn:not(:disabled):hover { filter: brightness(1.08); }
  .chips button:hover { border-color: var(--ai); color: var(--ai); }
}

/* Web layout (set by script: wide screens, or the preview switch): sidebar, two-column screens, focused class in the centre */
.web body { background: var(--bg); }
.web .shell { max-width: none; display: grid; grid-template-columns: 252px minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto; border: 0; }
.web .shell > .screen { grid-column: 2; grid-row: 1; padding-block: 28px 40px; gap: 24px;
padding-left: max(40px, env(safe-area-inset-left, 0px), calc((100% - 1080px) / 2)); padding-right: max(40px, env(safe-area-inset-right, 0px), calc((100% - 1080px) / 2)); }
.web #composerWrap { grid-column: 2; grid-row: 2; }
.web .composer { padding-left: max(40px, calc((100% - 760px) / 2)); padding-right: max(40px, calc((100% - 760px) / 2)); padding-block: 14px; }
.web #tab-tutor { padding-left: max(40px, calc((100% - 760px) / 2)); padding-right: max(40px, calc((100% - 760px) / 2)); }
.web .large { font-size: 36px; }
.web .cols { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 28px; align-items: start; }
.web #tab-lab .cols, .web #tab-learn .cols { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.web .hero { padding: 24px; }
.web .hero h3 { font-size: 30px; }
.web .hero .btn { width: auto; justify-self: start; padding: 0 28px; }
.web .stats4 { grid-template-columns: repeat(4, 1fr); }
.web .msg { max-width: 76%; }
.web .tabbar { grid-column: 1; grid-row: 1 / span 2; display: flex; flex-direction: column; gap: 4px; border-top: 0; border-right: 1px solid var(--line); padding: 22px 14px; }
.web .navbrand { display: flex; align-items: center; gap: 10px; padding: 0 8px 22px; font-size: 16px; letter-spacing: -.01em; }
.web .navlogo { width: 34px; height: 34px; border-radius: 10px; background: var(--brand); color: var(--brand-ink); display: grid; place-items: center; }
.web .navlogo svg { width: 20px; height: 20px; }
.web .tab { display: grid; grid-template-columns: 22px 1fr; justify-items: start; align-items: center; gap: 12px; min-height: 44px; padding: 0 12px; border-radius: 10px; font-size: 15px; color: var(--ink-2); }
.web .tab[aria-current="page"] { background: var(--fill); color: var(--ink); }
.web .tab:hover { background: var(--fill); color: var(--ink); }
.web .ctop, .web .cbody, .web .actionbar, .web .obtop { padding-left: max(32px, calc((100% - 700px) / 2)); padding-right: max(32px, calc((100% - 700px) / 2)); }
.web .cbody { padding-block: 16px 32px; }
.web .actionbar { padding-block: 16px 20px; }
.web .actionbar .btn { width: auto; min-width: 200px; justify-self: end; padding: 0 28px; }
.web .q { font-size: 26px; }
.web .obq { font-size: 30px; }
.web .welcome .btn { width: auto; }
.web .sheet { left: 50%; right: auto; top: 50%; bottom: auto; width: min(540px, calc(100% - 48px)); max-height: 82%; border-radius: 20px;
transform: translate(-50%, -50%); padding: 24px 26px; animation: pop .18s ease-out; box-shadow: 0 24px 60px rgba(0, 0, 0, .25); }
.web .sheet .btn { width: auto; justify-self: end; min-width: 140px; padding: 0 22px; }
.web .grab { display: none; }
/* Mobile preview on a big screen: the phone layout inside a phone-sized frame */
.phone body { background: var(--fill); display: grid; place-items: center; }
.phone .shell { width: 390px; max-width: 390px; height: min(844px, calc(100% - 40px)); border: 1px solid var(--line); border-radius: 36px; box-shadow: 0 30px 80px rgba(0, 0, 0, .22); }
.viewswitch { position: fixed; left: 16px; bottom: 16px; z-index: 50; display: grid; grid-template-columns: 1fr 1fr; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 3px; box-shadow: 0 6px 20px rgba(0, 0, 0, .12); }
.viewswitch button { min-height: 34px; padding: 0 14px; border-radius: 9px; font-size: 13.5px; font-weight: 600; color: var(--ink-2); display: inline-flex; align-items: center; gap: 6px; }
.viewswitch button svg { width: 16px; height: 16px; }
.viewswitch button[aria-pressed="true"] { background: var(--brand); color: var(--brand-ink); }
@media (max-width: 899px) { .viewswitch { display: none; } }
@keyframes pop { from { opacity: 0; transform: translate(-50%, -47%) scale(.98); } to { opacity: 1; transform: translate(-50%, -50%); } }
@media (prefers-reduced-motion: reduce) { .sheet { animation: none; } .btn, .meter i, .cprog i, .actionbar { transition: none; } }

/* ---------- Added for the app (v0.10) ---------- */
.soon { display: inline-flex; width: fit-content; align-items: center; gap: 5px; font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 99px; background: var(--fill); color: var(--ink-2); }
.draft { display: inline-flex; width: fit-content; font-size: 11.5px; font-weight: 700; padding: 2px 8px; border-radius: 99px; background: var(--accent-soft); color: var(--accent); }
.privacy { display: grid; gap: 6px; text-align: left; background: var(--surface); border-radius: 14px; padding: 12px 14px; font-size: 14px; color: var(--ink-2); max-width: 420px; }
.privacy b { color: var(--ink); }
.privacy .link { min-height: 32px; font-size: 14px; }
.why { background: var(--fill); border-radius: 12px; padding: 12px 14px; display: grid; gap: 6px; font-size: 15px; }
.why .q2 { font-weight: 700; }
.offline { position: absolute; top: 8px; left: 50%; transform: translateX(-50%); z-index: 40; background: var(--ink); color: var(--bg); font-size: 13px; font-weight: 600; padding: 6px 12px; border-radius: 99px; }
.row .s .draft { margin-left: 6px; vertical-align: 1px; }
.idline { font-family: var(--mono); font-size: 12.5px; color: var(--ink-3); word-break: break-all; }
.btn.danger { background: var(--bad-soft); color: var(--bad); }
.unitlist { display: grid; gap: 14px; }
.unitlist h3 { font-size: 15px; font-weight: 700; color: var(--ink-2); padding: 0 2px; margin-bottom: 6px; }
.loading { display: grid; place-items: center; height: 100%; color: var(--ink-3); font-size: 15px; }
/* The tick shows only on a chosen answer (the mockup's white tick showed on every answer in dark mode). */
.optc .ck svg { opacity: 0; }
.opt[aria-pressed="true"] .ck svg { opacity: 1; }
.select .sub2 { display: block; font-size: 13px; font-weight: 500; color: var(--ink-2); }
.btn:disabled, .btn.secondary:disabled { color: var(--ink-3); cursor: default; }
a.row { text-decoration: none; color: inherit; }
