:root {
  --bg: #faf6ee; --surface: #ffffff; --surface-2: #f3ede1; --ink: #14213d; --ink-2: #47526b; --muted: #7a8296;
  --line: #e6dfd0; --brand: #14213d; --on-brand: #fdf8ec; --accent: #e09f1f; --accent-ink: #7a5200; --accent-soft: #fdf0cf;
  --good: #1f8a5b; --good-soft: #dff3e8; --bad: #c6423a; --bad-soft: #fbe3e0; --info: #2f6fb3; --info-soft: #e2eefa;
  --shadow: 0 1px 2px rgba(20,33,61,.06), 0 8px 24px rgba(20,33,61,.07);
  --r: 16px; --serif: 'Fraunces', Georgia, serif; --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1524; --surface: #172033; --surface-2: #1e2940; --ink: #f1ecdf; --ink-2: #c2c8d6; --muted: #8e97ab;
    --line: #2a3650; --brand: #f2b441; --on-brand: #14213d; --accent: #f2b441; --accent-ink: #f6cd7c; --accent-soft: #3a2f14;
    --good: #4cc38a; --good-soft: #15382a; --bad: #f0776d; --bad-soft: #43201d; --info: #7fb4ea; --info-soft: #172d47;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.25);
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.55 var(--sans); -webkit-font-smoothing: antialiased; }
h1, h2, h3 { font-family: var(--serif); line-height: 1.15; margin: 0; font-weight: 600; letter-spacing: -.01em; text-wrap: balance; }
h1 { font-size: clamp(1.9rem, 6vw, 3.2rem); } h2 { font-size: 1.45rem; } h3 { font-size: 1.1rem; }
p { margin: 0; } a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.boot { padding: 30vh 0; text-align: center; color: var(--muted); }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 720px; }
.muted { color: var(--muted); } .small { font-size: .86rem; } .center { text-align: center; }
.row { display: flex; align-items: center; gap: 12px; } .row.wrapx { flex-wrap: wrap; } .spread { justify-content: space-between; }
.stack > * + * { margin-top: 14px; } .stack-lg > * + * { margin-top: 28px; }
.grow { flex: 1; min-width: 0; }
.eyebrow { font-size: .74rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 700; color: var(--accent-ink); }

/* top bar + nav */
.top { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; height: 58px; gap: 14px; }
.logo { display: flex; align-items: center; gap: 9px; font-family: var(--serif); font-weight: 700; font-size: 1.15rem; text-decoration: none; }
.logo img { width: 30px; height: 30px; }
.top nav { margin-left: auto; display: flex; gap: 4px; align-items: center; }
.top nav a { text-decoration: none; padding: 8px 12px; border-radius: 10px; font-weight: 600; font-size: .93rem; color: var(--ink-2); }
.top nav a.on, .top nav a:hover { background: var(--surface-2); color: var(--ink); }
.tabbar { display: none; }
@media (max-width: 700px) {
  .top nav.app-nav { display: none; }
  .tabbar { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; position: fixed; bottom: 0; left: 0; right: 0; z-index: 20; background: var(--surface); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
  .tabbar a { text-decoration: none; text-align: center; padding: 8px 0 7px; font-size: .7rem; font-weight: 600; color: var(--muted); }
  .tabbar a svg { display: block; margin: 0 auto 2px; width: 22px; height: 22px; }
  .tabbar a.on { color: var(--ink); } .tabbar a.on svg { color: var(--accent); }
  main.has-tabs { padding-bottom: 84px; }
}
main { padding: 22px 0 60px; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent; border-radius: 12px; padding: 12px 18px; font-weight: 650; text-decoration: none; background: var(--brand); color: var(--on-brand); min-height: 46px; transition: transform .08s, filter .15s; }
.btn:hover { filter: brightness(1.08); } .btn:active { transform: translateY(1px); }
.btn.gold { background: var(--accent); color: #2a1c00; }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn.soft { background: var(--surface-2); color: var(--ink); }
.btn.danger { background: var(--bad); color: #fff; }
.btn.sm { padding: 7px 12px; min-height: 36px; font-size: .88rem; border-radius: 10px; }
.btn.block { display: flex; width: 100%; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.link { background: none; border: 0; padding: 0; color: var(--info); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

/* cards */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; box-shadow: var(--shadow); }
.card.flat { box-shadow: none; }
a.card { display: block; text-decoration: none; transition: transform .12s, border-color .12s; }
a.card:hover { transform: translateY(-2px); border-color: var(--accent); }
.grid { display: grid; gap: 14px; } .g2 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); } .g3 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); } .g4 { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
.pill { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 99px; font-size: .74rem; font-weight: 700; background: var(--surface-2); color: var(--ink-2); white-space: nowrap; }
.pill.gold { background: var(--accent-soft); color: var(--accent-ink); } .pill.good { background: var(--good-soft); color: var(--good); } .pill.bad { background: var(--bad-soft); color: var(--bad); } .pill.info { background: var(--info-soft); color: var(--info); }
.stat { padding: 14px 16px; } .stat b { display: block; font-family: var(--serif); font-size: 1.7rem; line-height: 1.1; font-variant-numeric: tabular-nums; } .stat span { font-size: .8rem; color: var(--muted); font-weight: 600; }
.bar { height: 8px; border-radius: 99px; background: var(--surface-2); overflow: hidden; } .bar i { display: block; height: 100%; background: var(--accent); border-radius: 99px; transition: width .4s; }
.bar.good i { background: var(--good); }

/* landing */
.hero { padding: 36px 0 26px; display: grid; gap: 28px; align-items: center; }
@media (min-width: 860px) { .hero { grid-template-columns: 1.1fr .9fr; padding: 64px 0 44px; } }
.hero p.lead { font-size: 1.12rem; color: var(--ink-2); max-width: 34em; margin-top: 14px; }
.hero h1 em { font-style: normal; color: var(--accent-ink); background: linear-gradient(transparent 62%, var(--accent-soft) 62%); }
.phone { background: var(--brand); color: var(--on-brand); border-radius: 28px; padding: 18px; box-shadow: var(--shadow); max-width: 360px; margin: 0 auto; width: 100%; }
.phone .q { background: color-mix(in srgb, var(--on-brand) 10%, transparent); border-radius: 14px; padding: 14px; font-size: .92rem; }
.phone .o { border: 1px solid color-mix(in srgb, var(--on-brand) 25%, transparent); border-radius: 10px; padding: 9px 12px; margin-top: 8px; font-size: .88rem; }
.phone .o.ok { background: #1f8a5b; border-color: #1f8a5b; color: #fff; }
.feature h3 { margin: 10px 0 4px; } .feature .ico { width: 40px; height: 40px; border-radius: 12px; background: var(--accent-soft); color: var(--accent-ink); display: grid; place-items: center; font-size: 1.2rem; }
.price { font-family: var(--serif); font-size: 2.2rem; font-weight: 700; } .price s { font-size: 1.1rem; color: var(--muted); font-weight: 500; margin-left: 8px; }
.section { padding: 34px 0; }

/* forms */
.field { display: block; } .field span { display: block; font-size: .85rem; font-weight: 600; margin-bottom: 5px; color: var(--ink-2); }
.input, select.input, textarea.input { width: 100%; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; min-height: 46px; }
textarea.input { min-height: 120px; resize: vertical; line-height: 1.5; }
textarea.code { font: 13px/1.5 ui-monospace, Consolas, monospace; min-height: 380px; white-space: pre; }
.err { background: var(--bad-soft); color: var(--bad); border-radius: 10px; padding: 10px 12px; font-size: .9rem; font-weight: 600; }
.note { background: var(--info-soft); color: var(--info); border-radius: 10px; padding: 10px 12px; font-size: .9rem; }
.auth { max-width: 420px; margin: 4vh auto; }

/* chapter list */
.chap { display: flex; gap: 14px; align-items: center; padding: 14px 16px; }
.chap .num { width: 40px; height: 40px; flex: none; border-radius: 12px; background: var(--surface-2); display: grid; place-items: center; font-family: var(--serif); font-weight: 700; }
.chap.done .num { background: var(--good-soft); color: var(--good); }
.chap.locked { opacity: .78; } .chap.locked .num { background: transparent; border: 1px dashed var(--line); }
.chap h3 { font-family: var(--sans); font-size: 1rem; font-weight: 650; }
.part-h { margin: 26px 0 10px; display: flex; align-items: baseline; gap: 10px; }

/* tabs */
.tabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.tabs button { flex: none; border: 1px solid var(--line); background: var(--surface); border-radius: 99px; padding: 8px 15px; font-weight: 650; font-size: .9rem; color: var(--ink-2); }
.tabs button.on { background: var(--brand); color: var(--on-brand); border-color: var(--brand); }

/* lesson content */
.lesson { font-size: 1.04rem; line-height: 1.7; }
.lesson > * + * { margin-top: 16px; }
.lesson h3 { font-size: 1.25rem; margin-top: 28px; }
.lesson ul { margin: 0; padding-left: 1.2em; } .lesson li + li { margin-top: 6px; }
.callout { border-radius: 14px; padding: 14px 16px; border: 1px solid var(--line); background: var(--surface); }
.callout .lab { font-size: .72rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; display: block; margin-bottom: 4px; }
.callout.section { border-left: 4px solid var(--brand); } .callout.section .lab { color: var(--ink-2); }
.callout.example { background: var(--accent-soft); border-color: transparent; } .callout.example .lab { color: var(--accent-ink); }
.callout.tip { background: var(--good-soft); border-color: transparent; } .callout.tip .lab { color: var(--good); }
.callout.warn { background: var(--bad-soft); border-color: transparent; } .callout.warn .lab { color: var(--bad); }
.callout.formula { background: var(--surface-2); border-color: transparent; } .callout.formula .lab { color: var(--ink-2); }
.callout.formula .f { font: 600 1.02rem/1.6 ui-monospace, Consolas, monospace; overflow-x: auto; }
.callout.worked { border-left: 4px solid var(--accent); } .callout.worked .lab { color: var(--accent-ink); }
.callout details { margin-top: 10px; border-top: 1px solid var(--line); padding-top: 8px; }
.callout summary { cursor: pointer; font-weight: 650; }
.callout details > * + * { margin-top: 8px; }
.tablewrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
table { border-collapse: collapse; width: 100%; font-size: .93rem; }
th, td { padding: 10px 12px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
th { background: var(--surface-2); font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-2); }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }

/* flashcards */
.flash { perspective: 1200px; height: min(56vh, 380px); cursor: pointer; border: 0; background: none; padding: 0; width: 100%; display: block; }
.flash .inner { position: relative; width: 100%; height: 100%; transition: transform .45s; transform-style: preserve-3d; }
.flash.flip .inner { transform: rotateY(180deg); }
.flash .face { position: absolute; inset: 0; backface-visibility: hidden; border-radius: 22px; padding: 26px; display: flex; flex-direction: column; justify-content: center; text-align: center; overflow: auto; box-shadow: var(--shadow); border: 1px solid var(--line); background: var(--surface); font-size: 1.15rem; }
.flash .back { transform: rotateY(180deg); background: var(--brand); color: var(--on-brand); border-color: var(--brand); font-size: 1.05rem; }
.flash .face small { position: absolute; top: 14px; left: 0; right: 0; font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; opacity: .6; font-weight: 700; }
@media (prefers-reduced-motion: reduce) { .flash .inner { transition: none; } }

/* quiz */
.qhead { position: sticky; top: 58px; z-index: 5; background: var(--bg); padding: 10px 0; }
.timer { font-variant-numeric: tabular-nums; font-weight: 700; } .timer.low { color: var(--bad); }
.qstem { font-size: 1.1rem; line-height: 1.6; font-weight: 500; white-space: pre-line; }
.opt { display: flex; gap: 12px; align-items: flex-start; width: 100%; text-align: left; background: var(--surface); border: 1.5px solid var(--line); border-radius: 14px; padding: 13px 14px; line-height: 1.45; }
.opt .k { flex: none; width: 28px; height: 28px; border-radius: 50%; border: 1.5px solid var(--line); display: grid; place-items: center; font-weight: 700; font-size: .82rem; }
.opt:hover { border-color: var(--ink-2); }
.opt.sel { border-color: var(--brand); background: var(--surface-2); } .opt.sel .k { background: var(--brand); color: var(--on-brand); border-color: var(--brand); }
.opt.right { border-color: var(--good); background: var(--good-soft); } .opt.right .k { background: var(--good); color: #fff; border-color: var(--good); }
.opt.wrong { border-color: var(--bad); background: var(--bad-soft); } .opt.wrong .k { background: var(--bad); color: #fff; border-color: var(--bad); }
.opt[disabled] { cursor: default; }
.dots { display: flex; flex-wrap: wrap; gap: 6px; }
.dots button { width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); font-weight: 700; font-size: .82rem; }
.dots button.ans { background: var(--brand); color: var(--on-brand); border-color: var(--brand); } .dots button.cur { outline: 2px solid var(--accent); outline-offset: 1px; }
.dots button.ok { background: var(--good-soft); color: var(--good); border-color: transparent; } .dots button.no { background: var(--bad-soft); color: var(--bad); border-color: transparent; }

/* score ring */
.ring { --p: 0; width: 148px; height: 148px; border-radius: 50%; margin: 0 auto; display: grid; place-items: center; background: conic-gradient(var(--c, var(--accent)) calc(var(--p) * 1%), var(--surface-2) 0); }
.ring > div { width: 118px; height: 118px; border-radius: 50%; background: var(--surface); display: grid; place-items: center; text-align: center; }
.ring b { font-family: var(--serif); font-size: 2.1rem; line-height: 1; } .ring span { font-size: .78rem; color: var(--muted); font-weight: 600; }
.spark { display: flex; align-items: flex-end; gap: 4px; height: 70px; }
.spark i { flex: 1; min-width: 6px; max-width: 26px; border-radius: 5px 5px 2px 2px; background: var(--accent); }
.spark i.low { background: var(--bad); } .spark i.hi { background: var(--good); }

#toast { position: fixed; left: 50%; bottom: 96px; transform: translate(-50%, 20px); background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 12px; font-weight: 600; font-size: .9rem; opacity: 0; pointer-events: none; transition: .25s; z-index: 50; max-width: 90vw; }
#toast.show { opacity: 1; transform: translate(-50%, 0); }
.back { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; font-weight: 600; color: var(--ink-2); font-size: .92rem; margin-bottom: 12px; }
.lockbox { border: 1.5px dashed var(--accent); background: var(--accent-soft); border-radius: var(--r); padding: 18px; }
footer.site { border-top: 1px solid var(--line); padding: 22px 0 90px; color: var(--muted); font-size: .85rem; }

/* admin */
.admin { display: grid; gap: 20px; } @media (min-width: 860px) { .admin { grid-template-columns: 200px 1fr; align-items: start; } }
.side { display: flex; gap: 6px; overflow-x: auto; } @media (min-width: 860px) { .side { flex-direction: column; position: sticky; top: 78px; } }
.side a { flex: none; text-decoration: none; padding: 9px 12px; border-radius: 10px; font-weight: 600; font-size: .92rem; color: var(--ink-2); }
.side a.on { background: var(--brand); color: var(--on-brand); }
dialog { border: 1px solid var(--line); border-radius: 18px; background: var(--surface); color: var(--ink); padding: 20px; width: min(560px, 94vw); box-shadow: var(--shadow); }
dialog.wide { width: min(900px, 96vw); }
dialog::backdrop { background: rgba(10,15,28,.55); }

/* Nila, the study companion */
.nila-ask { align-self: flex-start; width: fit-content; }
.nila-ask svg, .nila-ctx svg { width: 16px; height: 16px; color: var(--accent-ink); flex: none; }
.nila-head { gap: 14px; margin: 18px 0 6px; }
.nila-av { width: 50px; height: 50px; border-radius: 50%; display: grid; place-items: center; flex: none; color: var(--accent-ink);
  background: radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--accent) 12%, var(--surface)), var(--accent-soft));
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 16%, transparent); }
.nila-av svg { width: 26px; height: 26px; }
.nila-log { display: flex; flex-direction: column; gap: 12px; padding: 12px 0 16px; }
.msg { max-width: 86%; padding: 11px 15px; border-radius: 18px; overflow-wrap: anywhere; }
.msg.me { align-self: flex-end; background: var(--brand); color: var(--on-brand); border-bottom-right-radius: 6px; white-space: pre-wrap; }
.msg.nila { align-self: flex-start; background: var(--surface); border: 1px solid var(--line); border-bottom-left-radius: 6px; box-shadow: var(--shadow); }
.msg.nila > * + * { margin-top: 8px; }
.msg.nila ul, .msg.nila ol { margin-bottom: 0; padding-left: 20px; } .msg.nila li + li { margin-top: 3px; }
.msg.nila li > ul, .msg.nila li > ol { margin-top: 3px; padding-left: 18px; } .msg.nila li > ul { list-style: circle; }
.msg.err { background: var(--bad-soft); border-color: color-mix(in srgb, var(--bad) 40%, var(--line)); }
.msg.err .btn { margin-left: 6px; }
.typing { display: inline-flex; gap: 4px; padding: 4px 0; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: nila-dot 1.2s infinite ease-in-out; }
.typing i:nth-child(2) { animation-delay: .15s; } .typing i:nth-child(3) { animation-delay: .3s; }
@keyframes nila-dot { 0%, 80%, 100% { opacity: .25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
@media (prefers-reduced-motion: reduce) { .typing i { animation: none; opacity: .6; } }
.nila-sugg { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.nila-sugg button { border: 1px solid var(--line); background: var(--surface); border-radius: 99px; padding: 8px 14px; font-size: .88rem; font-weight: 600; color: var(--ink-2); }
.nila-sugg button:hover { border-color: var(--accent); color: var(--ink); }
.nila-compose { position: sticky; bottom: 0; z-index: 5; background: var(--bg); padding: 10px 0 12px; border-top: 1px solid var(--line); }
.nila-compose .row { align-items: flex-end; }
.nila-compose textarea { flex: 1; min-width: 0; resize: none; min-height: 46px; max-height: 160px; border: 1px solid var(--line); border-radius: 14px; padding: 11px 14px; background: var(--surface); line-height: 1.45; }
.nila-ctx { display: flex; align-items: center; gap: 8px; font-size: .84rem; color: var(--ink-2); background: var(--accent-soft); border-radius: 10px; padding: 6px 6px 6px 10px; margin-bottom: 8px; }
.nila-ctx button { border: 0; background: none; font-size: 1.15rem; line-height: 1; padding: 2px 8px; color: var(--ink-2); }
.nila-left { margin-top: 6px; text-align: right; min-height: 1em; }
@media (max-width: 700px) { .nila-compose { bottom: calc(56px + env(safe-area-inset-bottom)); } .msg { max-width: 92%; } }

/* ---- site: prices, checkout, account, about, policies ---- */
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .92rem; line-height: 1.45; }
.check input { width: 18px; height: 18px; margin-top: 2px; flex: none; accent-color: var(--accent); }
.check a, .doc a, footer.site a, .small a { color: var(--info); }
.accent { color: var(--accent-ink); font-weight: 600; }
.lead-2 { font-family: var(--serif); font-size: clamp(1.15rem, 3.4vw, 1.45rem); line-height: 1.4; color: var(--ink); max-width: 34em; }
.ctitle { font-size: 1.3rem; }
.plan { display: flex; flex-direction: column; gap: 8px; } .plan h4 { margin: 0; font: 600 1.08rem var(--serif); } .plan .price { font-size: 2rem; margin-top: 2px; } .plan .btn, .plan > .pill { margin-top: auto; align-self: flex-start; } .plan .btn.block { align-self: stretch; }
.plan.best, .choice.best { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 16%, transparent), var(--shadow); }
.promises .card { padding: 14px 16px; } .promises b { display: block; margin-bottom: 2px; }
a.choice, a.passbar { display: flex; align-items: center; gap: 14px; text-decoration: none; } .choice .price { font-size: 1.6rem; white-space: nowrap; }
.passbar { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); box-shadow: none; padding: 12px 16px; }
.nila-band { display: flex; gap: 18px; align-items: center; } .nila-band .nila-av { width: 64px; height: 64px; } .nila-band .nila-av svg { width: 32px; height: 32px; }
@media (max-width: 560px) { .nila-band { flex-direction: column; align-items: flex-start; } }
.founder { display: flex; gap: 14px; align-items: flex-start; }
.avatar { width: 52px; height: 52px; border-radius: 50%; flex: none; display: grid; place-items: center; font: 700 1.05rem var(--serif); color: var(--accent-ink); background: var(--accent-soft); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
details.inside > summary { cursor: pointer; display: flex; justify-content: space-between; gap: 12px; align-items: center; list-style: none; } details.inside > summary::-webkit-details-marker { display: none; }
details.inside > summary::after { content: '+'; font-size: 1.3rem; color: var(--muted); } details.inside[open] > summary::after { content: '–'; }
details.card > summary { cursor: pointer; }
.foot-links { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-bottom: 12px; } .foot-links a { text-decoration: none; font-weight: 600; color: var(--ink-2); } .foot-links a:hover { color: var(--ink); text-decoration: underline; }
.doc h3 { font-size: 1.2rem; margin-top: 30px; } .doc h4 { font: 600 1.02rem var(--sans); margin: 20px 0 0; } .doc p, .doc ul, .doc ol { margin-top: 10px; } .doc li + li { margin-top: 5px; }
.licence { margin-top: 26px; text-align: center; font-size: .78rem; color: var(--muted); letter-spacing: .02em; }
.device + .device, .sugg + .sugg { border-top: 1px solid var(--line); padding-top: 12px; }
.reply { background: var(--surface-2); border-radius: 10px; padding: 8px 10px; margin-top: 6px; }
.quote { border-left: 3px solid var(--accent); padding: 2px 0 2px 12px; white-space: pre-wrap; }
.empty { text-align: center; padding: 34px 18px; box-shadow: none; }
@media print {
  body:not(.can-print) main, .tabbar, header.top, #toast, .noprint { display: none !important; }
  body:not(.can-print)::after { content: 'CA Ladder lessons are for studying in the app and cannot be printed.'; display: block; padding: 40px; }
  body.can-print { background: #fff; color: #111; } body.can-print .card { box-shadow: none; border-color: #bbb; break-inside: avoid; }
}

/* ---- company console ---- */
.console { display: grid; gap: 22px; padding-top: 6px; }
@media (min-width: 900px) { .console { grid-template-columns: 216px minmax(0, 1fr); align-items: start; } }
.cnav { display: flex; gap: 4px; overflow-x: auto; padding-bottom: 6px; }
.cnav a { flex: none; display: flex; align-items: center; gap: 9px; text-decoration: none; padding: 8px 11px; border-radius: 10px; font-weight: 600; font-size: .9rem; color: var(--ink-2); }
.cnav a svg { width: 17px; height: 17px; flex: none; opacity: .8; }
.cnav a:hover { background: var(--surface-2); color: var(--ink); } .cnav a.on { background: var(--brand); color: var(--on-brand); } .cnav a.on svg { opacity: 1; }
.cnav .badge { margin-left: auto; font-style: normal; font-size: .72rem; font-weight: 700; min-width: 20px; text-align: center; padding: 1px 6px; border-radius: 99px; background: var(--accent); color: #2a1c00; }
.cbrand, .cgroup { display: none; }
@media (min-width: 900px) {
  .cnav { flex-direction: column; position: sticky; top: 76px; overflow: visible; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 10px; box-shadow: var(--shadow); }
  .cbrand { display: block; font: 700 .98rem var(--serif); padding: 2px 10px 8px; }
  .cgroup { display: block; font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 700; color: var(--muted); padding: 12px 11px 4px; }
}
.chead { display: flex; justify-content: space-between; align-items: flex-end; gap: 14px; flex-wrap: wrap; margin-bottom: 20px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.chead h2 { font-size: 1.7rem; } .chead p { margin-top: 4px; max-width: 46em; }
.stat em { display: block; font-style: normal; font-size: .78rem; color: var(--muted); margin-top: 3px; }
.todo { text-decoration: none; padding: 8px 0; } .todo + .todo { border-top: 1px solid var(--line); }
.checkrow { display: flex; gap: 12px; align-items: flex-start; padding: 9px 0; } .checkrow + .checkrow { border-top: 1px solid var(--line); }
.tick { width: 24px; height: 24px; flex: none; border-radius: 7px; border: 2px solid var(--line); background: var(--surface); color: #fff; font-weight: 800; font-size: .85rem; line-height: 1; display: grid; place-items: center; padding: 0; }
.tick:disabled { cursor: default; } .checkrow.ok .tick { background: var(--good); border-color: var(--good); } .checkrow.ok b { color: var(--muted); font-weight: 600; }
fieldset.checks { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin: 0; display: grid; gap: 9px; } fieldset.checks legend { font-size: .85rem; font-weight: 600; color: var(--ink-2); padding: 0 6px; }
textarea.long { min-height: 420px; font-size: .93rem; line-height: 1.55; }
dialog form { max-height: 86vh; overflow-y: auto; }
.console .tablewrap td .row { flex-wrap: nowrap; gap: 6px; }
.console table td:first-child { min-width: 190px; } .console table td.num .small { white-space: nowrap; }

/* ---- Nila's feedback on a written answer ---- */
.callout.fb { border-left: 4px solid var(--accent); display: flex; flex-direction: column; gap: 10px; }
.callout.fb .lab { color: var(--accent-ink); margin-bottom: 0; } .callout.fb .lab svg { width: 14px; height: 14px; vertical-align: -2px; }
.callout.fb p, .callout.fb ul { margin: 0; } .callout.fb ul:not(.fbpoints) { padding-left: 1.2em; margin-top: 4px; }
.fbpoints { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.fbpoints li { display: grid; grid-template-columns: 76px 1fr; gap: 10px; align-items: start; }
.fbpoints .pill { justify-content: center; margin-top: 2px; }

/* ---- "explain this lesson again" under a lesson ---- */
.explain { margin-top: 28px; padding: 14px 16px; border-radius: 14px; background: var(--surface-2); display: flex; flex-direction: column; gap: 10px; }
.explain svg { width: 15px; height: 15px; vertical-align: -2px; margin-right: 6px; color: var(--accent-ink); }
@media print { .explain { display: none; } }

/* ---- email codes, console email page ---- */
.input.codebox { font: 700 1.5rem/1.2 ui-monospace, Consolas, monospace; letter-spacing: .35em; text-align: center; }
.note.warnbar { margin-bottom: 18px; border-left: 4px solid var(--bad); }
pre.mailtext { white-space: pre-wrap; font: .86rem/1.5 ui-monospace, Consolas, monospace; margin: 10px 0 0; }

/* ---- planner, saved lessons, notes, report ---- */
.plancard { display: flex; flex-direction: column; gap: 12px; border-left: 4px solid var(--accent); }
.plancard .big { font: 600 1.5rem var(--serif); } .plancard .big b { font-size: 2rem; }
.tasks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.tasks a { display: flex; gap: 12px; align-items: center; text-decoration: none; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: inherit; }
.tasks a:hover { border-color: var(--accent); } .tasks .mins { flex: none; min-width: 52px; text-align: center; font-weight: 700; font-size: .8rem; color: var(--accent-ink); background: var(--accent-soft); border-radius: 99px; padding: 3px 8px; }
.tasks b { display: block; } .tasks .grow span { font-size: .84rem; color: var(--muted); }
.quick { display: flex; gap: 8px; flex-wrap: wrap; }
.lessontools { margin: 10px 0 4px; } .mynote { margin-top: 24px; } .mynote summary { cursor: pointer; }
button.report { color: var(--muted); } p.licence button.report { font-size: inherit; }
.rankline { max-width: 34em; margin: 0 auto; }
.savednote { white-space: pre-wrap; border-left: 3px solid var(--accent); padding: 2px 0 2px 10px; margin-top: 6px; }
.papers { display: grid; gap: 6px; } @media (min-width: 640px) { .papers { grid-template-columns: 1fr 1fr; } }
.reportdoc h3 { margin: 0; } .reportdoc table td, .reportdoc table th { padding: 6px 8px; }
.daybars { display: flex; align-items: flex-end; gap: 4px; height: 56px; } .daybars i { flex: 1; background: var(--accent); border-radius: 3px 3px 0 0; min-height: 2px; opacity: .85; }

/* ---- two-step sign-in set-up ---- */
.setupkey { font: 700 1.05rem/1.7 ui-monospace, Consolas, monospace; letter-spacing: .08em; background: var(--surface-2); border-radius: 10px; padding: 10px 14px; word-break: break-word; user-select: all; }
