/* Impera's colors. Light first, then the dark versions. */
:root {
  --sand: #EDE9E2; --paper: #F7F5F1; --field: #FFFFFF; --line: #DDD7CD; --edge: #CFC8BC;
  --soft: #E0DBD2; --card: #E8E3DA; --ink: #2B2926; --quiet: #6B665C; --muted: #8A847A;
  --stone: #6F7C78; --clay: #B85C42; --danger: #A94F36; --gray-stone: #D9D3C9;
  --scale: 1;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --sand: #161514; --paper: #22201E; --field: #2C2A27; --line: #3A3733; --edge: #4A4641;
  --soft: #34312D; --card: #302D2A; --ink: #EDEAE4; --quiet: #B3ADA3; --muted: #8E887E;
  --stone: #9FB0AA; --clay: #C4674C; --danger: #E08A70; --gray-stone: #3A3733;
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --sand: #161514; --paper: #22201E; --field: #2C2A27; --line: #3A3733; --edge: #4A4641;
    --soft: #34312D; --card: #302D2A; --ink: #EDEAE4; --quiet: #B3ADA3; --muted: #8E887E;
    --stone: #9FB0AA; --clay: #C4674C; --danger: #E08A70; --gray-stone: #3A3733;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  background: var(--sand); color: var(--ink);
  font: 14px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased; overflow: hidden;
}
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
input, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--stone); outline-offset: 2px; }
.rounded { font-family: ui-rounded, "SF Pro Rounded", -apple-system, "Segoe UI", sans-serif; }
svg { display: block; }

/* A stone: Impera's logo and the marker beside its replies */
.stone { display: inline-block; flex: none; width: 14px; height: 11px; border-radius: 50%; background: var(--stone); transform: rotate(-12deg); }
.stone.breathe { animation: breathe 1.8s ease-in-out infinite; }
@keyframes breathe { 50% { transform: rotate(-12deg) scale(1.2); } }
@media (prefers-reduced-motion: reduce) { .stone.breathe { animation: none; opacity: .6; } }

/* ---- Layout: rail, chat list, floating card ---- */
#app { display: flex; height: 100dvh; padding: 10px 10px 10px 0; }
.rail { width: 68px; flex: none; display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 14px 0 6px; }
.rail .logo { width: 24px; height: 19px; margin-bottom: 6px; }
.rail .spacer { flex: 1; }
.icon-btn { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; color: var(--muted); }
.icon-btn:hover, .icon-btn.on { background: var(--soft); color: var(--ink); }
.icon-btn.new { background: var(--ink); color: var(--paper); }
.icon-btn.new:hover { opacity: .85; background: var(--ink); color: var(--paper); }
.profile { width: 34px; height: 31px; border-radius: 50%; transform: rotate(-8deg); display: grid; place-items: center; color: #fff; font-weight: 600; font-size: 13px; }
.profile span { transform: rotate(8deg); }

.list { width: 224px; flex: none; display: flex; flex-direction: column; padding: 14px 6px 0 0; min-height: 0; }
.list .scroll { overflow-y: auto; flex: 1; scrollbar-width: none; padding-bottom: 12px; }
.list h2 { font-size: 11px; font-weight: 500; color: var(--muted); margin: 12px 10px 4px; }
.list .empty { font-size: 12px; color: var(--muted); padding: 10px; }
.search { display: flex; align-items: center; gap: 6px; background: var(--paper); border-radius: 9px; padding: 7px 10px; margin-bottom: 6px; color: var(--muted); }
.search input { border: 0; background: none; outline: none; flex: 1; min-width: 0; font-size: 13px; }
.row { display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; padding: 7px 8px; border-radius: 8px; color: var(--quiet); font-size: 13px; }
.row:hover { background: color-mix(in srgb, var(--soft) 60%, transparent); }
.row .mark { width: 10px; display: grid; place-items: center; flex: none; }
.row .mark .stone { width: 8px; height: 6px; }
.row .title { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row.on { color: var(--ink); font-weight: 500; }
.row .dots { opacity: 0; color: var(--muted); border-radius: 6px; padding: 2px; }
.row:hover .dots, .row .dots:focus-visible { opacity: 1; }
.back { display: flex; align-items: center; gap: 6px; color: var(--quiet); font-size: 13px; padding: 2px 10px 16px; }
.who { display: flex; align-items: center; gap: 10px; padding: 0 10px 14px; }
.who b { font-weight: 500; font-size: 13px; display: block; }
.who small { color: var(--muted); font-size: 11px; }

.card { flex: 1; min-width: 0; background: var(--paper); border-radius: 16px; display: flex; flex-direction: column; position: relative; overflow: hidden; }
.column { width: 100%; max-width: 720px; margin: 0 auto; padding: 0 40px; }
.menu-btn { display: none; position: absolute; top: 10px; left: 10px; z-index: 2; }

/* ---- Welcome screen ---- */
.welcome { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 20px 24px 12vh; }
.welcome > .stone { width: 44px; height: 34px; margin-bottom: 16px; }
.welcome .hi { color: var(--muted); font-size: 14px; }
.welcome h1 { font-size: 28px; font-weight: 600; margin: 4px 0 22px; letter-spacing: -.01em; }
.welcome .box { width: 100%; max-width: 620px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 14px; }
.chip { border: 1px solid var(--line); border-radius: 99px; padding: 6px 12px; font-size: 13px; color: var(--quiet); }
.chip:hover { background: var(--soft); color: var(--ink); }

/* ---- Message box ---- */
.box { position: relative; background: var(--field); border: 1px solid var(--edge); border-radius: 18px; padding: 14px 10px 10px 18px; text-align: left; }
.box textarea { display: block; width: 100%; border: 0; outline: 0; background: none; resize: none; font-size: 16px; line-height: 1.45; max-height: 180px; padding: 0 8px 0 0; }
.box textarea::placeholder { color: var(--muted); }
.box .bar { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.box .hint { font-size: 11px; color: var(--muted); flex: 1; }
.pill { height: 28px; border-radius: 99px; background: var(--soft); display: inline-flex; align-items: center; gap: 6px; padding: 0 10px; font-size: 12px; }
.pill:hover { background: var(--line); }
.pill.on { background: var(--stone); color: var(--paper); }
.send { width: 36px; height: 28px; border-radius: 99px; background: var(--soft); color: var(--muted); display: grid; place-items: center; }
.send.ready { background: var(--ink); color: var(--paper); }
.dock { padding: 6px 0 20px; }

.pill.round { width: 30px; padding: 0; justify-content: center; }
.attached { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.thumb { position: relative; display: inline-block; }
.thumb img { display: block; width: 64px; height: 64px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); }
.filechip { display: inline-flex; align-items: center; gap: 6px; max-width: 220px; background: var(--soft); border-radius: 9px; padding: 6px 9px; font-size: 12px; }
.filechip span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.thumb button, .filechip button { color: var(--muted); border-radius: 50%; }
.thumb button { position: absolute; top: -6px; right: -6px; background: var(--ink); color: var(--paper); padding: 2px; }
.thumb button svg, .filechip button svg { width: 11px; height: 11px; }
.mine .attached { margin-bottom: 6px; }
.mine .attached:last-child { margin-bottom: 0; }
.mine .filechip { background: var(--paper); }
.sums { font-size: 12px; color: var(--quiet); margin-top: 8px; display: grid; gap: 2px; }
.sums code { font: 11px ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--soft); padding: 1px 5px; border-radius: 5px; }
.sources { margin: 10px 0 0; padding-left: 20px; font-size: 12px; color: var(--muted); display: grid; gap: 3px; }
.sources a, .reply .body a { color: var(--quiet); text-underline-offset: 2px; }
.sources a:hover, .reply .body a:hover { color: var(--ink); }

/* ---- Conversation ---- */
.chat-title { text-align: center; font-size: 12px; font-weight: 500; color: var(--muted); padding: 14px 56px 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.messages { flex: 1; overflow-y: auto; scrollbar-width: none; padding: 20px 0; }
.messages .column { display: flex; flex-direction: column; gap: 24px; }
.mine { align-self: flex-end; max-width: 80%; background: var(--card); border-radius: 12px; padding: 10px 14px; font-size: calc(14px * var(--scale)); white-space: pre-wrap; overflow-wrap: anywhere; }
.reply { display: flex; gap: 10px; align-items: flex-start; max-width: 92%; }
.reply > .stone { width: 12px; height: 9px; margin-top: calc(7px * var(--scale)); }
.reply .body { min-width: 0; font-size: calc(15px * var(--scale)); line-height: 1.65; overflow-wrap: anywhere; }
.reply .body > :first-child { margin-top: 0; }
.reply .body > :last-child { margin-bottom: 0; }
.reply .body p { margin: 0 0 .7em; }
.reply .body ul, .reply .body ol { margin: 0 0 .7em; padding-left: 1.3em; }
.reply .body h3 { font-size: 1.05em; margin: 1em 0 .4em; }
.reply .body code { font: .88em ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--soft); padding: .1em .35em; border-radius: 5px; }
.reply .body pre { background: var(--soft); padding: 12px 14px; border-radius: 10px; overflow-x: auto; margin: 0 0 .7em; }
.reply .body pre code { background: none; padding: 0; }
.reply .body img { display: block; max-width: min(340px, 100%); border-radius: 14px; border: 1px solid var(--line); margin-bottom: 8px; }
.reply .by { font-size: 10px; color: var(--muted); margin-top: 4px; }
.thinking { color: var(--muted); font-size: 13px; }
.problem { color: var(--muted); font-size: 13px; padding-left: 22px; }
.problem button { color: var(--ink); font-weight: 500; text-decoration: underline; margin-left: 8px; }

/* ---- Notes ---- */
.rail .divider { width: 24px; height: 1px; background: var(--edge); }
.row.new-note { color: var(--ink); margin-bottom: 4px; }
.row.new-note .mark svg { width: 12px; height: 12px; }
.welcome .lead { color: var(--quiet); max-width: 420px; margin: -10px 0 20px; }
.notes { flex: 1; overflow-y: auto; scrollbar-width: none; padding: 26px 0 40px; }
.note-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.note-bar .spacer { flex: 1; }
.note-bar .subject { width: 150px; height: 28px; border-radius: 99px; border: 1px solid var(--line); background: none; padding: 0 12px; font-size: 12px; outline: none; }
.note-bar .subject:focus { border-color: var(--stone); }
.note-bar .last { font-size: 11px; color: var(--muted); }
.note-bar .pill svg { width: 13px; height: 13px; }
.note-title { display: block; width: 100%; border: 0; outline: 0; background: none; font-size: 26px; font-weight: 600; padding: 0; margin-bottom: 10px; }
.note-title::placeholder, .note-body::placeholder { color: var(--muted); }
.note-body { display: block; width: 100%; min-height: 220px; border: 0; outline: 0; background: none; resize: none; padding: 0; font-size: calc(15px * var(--scale)); line-height: 1.7; overflow: hidden; }
.study-card { margin-top: 22px; background: var(--field); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; }
.study-card header { display: flex; align-items: center; gap: 9px; font-size: 13px; }
.study-card header b { flex: 1; font-weight: 600; }
.study-card .summary { color: var(--quiet); margin: 10px 0 0; }
.finding { margin-top: 14px; }
.finding h3 { font-size: 12px; font-weight: 600; margin: 0 0 4px; color: var(--quiet); }
.finding.warn h3 { color: var(--danger); }
.finding ul { margin: 0; padding-left: 18px; display: grid; gap: 4px; font-size: 13px; }
.checked { font-size: 11px; color: var(--muted); margin: 12px 0 0; }
.checked a { color: var(--quiet); }
.question { font-size: 16px; font-weight: 500; margin: 12px 0 10px; }
#quiz-answer { display: block; width: 100%; background: var(--paper); border: 1px solid var(--edge); border-radius: 10px; padding: 9px 12px; outline: none; resize: vertical; }
.marked { margin-top: 12px; border-radius: 10px; padding: 10px 12px; font-size: 13px; background: var(--soft); }
.marked.wrong { background: color-mix(in srgb, var(--clay) 13%, transparent); }
.marked.right b { color: var(--stone); }
.marked.wrong b { color: var(--danger); }
.marked p { margin: 4px 0 0; }
.marked span { color: var(--muted); }
.study-card .actions { display: flex; gap: 8px; margin-top: 14px; }
.btn[disabled] { opacity: .6; cursor: default; }
.score { font-size: 30px; font-weight: 600; margin: 12px 0 0; }

/* ---- Past papers ---- */
.papers-home { text-align: center; padding-top: 6vh; }
.papers-home .stone.big { width: 44px; height: 34px; margin-bottom: 16px; }
.papers-home h1 { font-size: 28px; font-weight: 600; margin: 0 0 10px; }
.papers-home .lead { color: var(--quiet); max-width: 460px; margin: 0 auto 20px; }
.papers-home .links { text-align: left; max-width: 520px; margin: 36px auto 0; }
a.set { color: inherit; text-decoration: none; }
a.set:hover { background: color-mix(in srgb, var(--soft) 50%, transparent); }
a.set small { display: block; font-size: 11px; color: var(--muted); }
a.set svg { color: var(--muted); flex: none; }
.field { display: block; margin-top: 12px; }
.field span { display: block; font-size: 12px; color: var(--quiet); margin-bottom: 5px; }
.field textarea { display: block; width: 100%; background: var(--paper); border: 1px solid var(--edge); border-radius: 10px; padding: 9px 12px; outline: none; resize: vertical; line-height: 1.5; }
.field textarea:focus, #quiz-answer:focus { border-color: var(--stone); }
.reader { margin-top: 18px; border: 1px solid var(--line); border-radius: 12px; }
.reader summary { cursor: pointer; padding: 10px 14px; font-size: 13px; color: var(--quiet); }
.reader pre { margin: 0; padding: 4px 14px 14px; max-height: 420px; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; font: 12.5px/1.6 ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--ink); }

/* ---- Menus and dialogs (Impera's own, not the browser's) ---- */
#layer:empty { display: none; }
.shade { position: fixed; inset: 0; z-index: 20; }
.shade.dim { background: rgba(0, 0, 0, .32); display: grid; place-items: center; padding: 16px; }
.menu { position: fixed; z-index: 21; background: var(--field); border: 1px solid var(--line); border-radius: 13px; padding: 5px; box-shadow: 0 6px 24px rgba(0, 0, 0, .16); }
.menu button { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 8px 10px; border-radius: 9px; font-size: 13px; }
.menu button:hover, .menu button.on { background: var(--soft); }
.menu button.danger { color: var(--danger); }
.menu button.danger:hover { background: color-mix(in srgb, var(--clay) 15%, transparent); }
.menu .tier { width: 22px; display: grid; place-items: center; flex: none; }
.menu .tier .stone { background: var(--muted); }
.menu .on .tier .stone { background: var(--stone); }
.menu small { display: block; color: var(--muted); font-size: 11px; }
.menu .check { margin-left: auto; color: var(--stone); }
.dialog { width: 100%; max-width: 360px; background: var(--paper); border: 1px solid var(--line); border-radius: 18px; padding: 20px; box-shadow: 0 12px 40px rgba(0, 0, 0, .22); }
.dialog header { display: flex; align-items: center; gap: 12px; }
.dialog .badge { width: 34px; height: 34px; border-radius: 10px; background: var(--soft); display: grid; place-items: center; flex: none; }
.dialog.danger .badge { background: color-mix(in srgb, var(--clay) 16%, transparent); color: var(--danger); }
.dialog h2 { font-size: 17px; font-weight: 600; margin: 0; }
.dialog p { color: var(--quiet); font-size: 13px; margin: 12px 0 0; }
.dialog input { width: 100%; margin-top: 14px; background: var(--field); border: 1px solid var(--edge); border-radius: 10px; padding: 9px 12px; outline: none; }
.dialog footer { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }
.btn { border-radius: 10px; padding: 8px 16px; font-size: 13px; font-weight: 500; background: var(--soft); }
.btn:hover { opacity: .85; }
.btn.primary { background: var(--ink); color: var(--paper); }
.btn.clay { background: var(--clay); color: #fff; }

/* ---- Settings ---- */
.settings { flex: 1; overflow-y: auto; scrollbar-width: none; padding: 40px 0 30px; }
.settings .column { max-width: 640px; display: flex; flex-direction: column; gap: 24px; }
.settings h1 { font-size: 26px; font-weight: 600; margin: 0; }
.settings .sub { color: var(--muted); font-size: 13px; margin: 4px 0 0; }
.hero { display: flex; align-items: center; gap: 16px; }
.hero .profile { width: 64px; height: 58px; font-size: 24px; }
.group h3 { font-size: 11px; font-weight: 500; color: var(--muted); margin: 0 4px 7px; }
.group .rows { background: var(--field); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.group .note { font-size: 11px; color: var(--muted); margin: 7px 4px 0; }
.set { display: flex; align-items: center; gap: 16px; min-height: 44px; padding: 6px 14px; font-size: 13px; }
.set + .set { border-top: 1px solid var(--line); }
.set > span:first-child { flex: 1; min-width: 0; }
.set input[type="text"] { border: 0; outline: 0; background: none; text-align: right; flex: 1; min-width: 0; }
.set.tall { flex-direction: column; align-items: stretch; gap: 6px; padding: 11px 14px; }
.set.tall textarea { border: 0; outline: 0; background: none; resize: vertical; min-height: 48px; padding: 0; }
button.set { width: 100%; text-align: left; }
button.set:hover { background: color-mix(in srgb, var(--soft) 50%, transparent); }
button.set.danger { color: var(--danger); }
.seg { display: inline-flex; background: var(--soft); border-radius: 8px; padding: 2px; gap: 2px; }
.seg button { padding: 4px 10px; border-radius: 6px; font-size: 12px; color: var(--quiet); }
.seg button.on { background: var(--field); color: var(--ink); font-weight: 500; }
.swatches { display: flex; gap: 9px; }
.swatches button { width: 19px; height: 16px; border-radius: 50%; transform: rotate(-10deg); }
.swatches button.on { outline: 1.5px solid var(--ink); outline-offset: 3px; }
.switch { width: 34px; height: 20px; border-radius: 99px; background: var(--edge); position: relative; flex: none; }
.switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s; }
.switch.on { background: var(--stone); }
.switch.on::after { transform: translateX(14px); }
.forget { color: var(--muted); padding: 4px; border-radius: 6px; }
.forget:hover { background: var(--soft); color: var(--ink); }

/* ---- Phones and narrow windows: the chat list slides in over the card ---- */
@media (max-width: 760px) {
  .column { padding: 0 16px; }
  .welcome { padding: 20px 16px 8vh; }
  .welcome h1 { font-size: 24px; }
  .box .hint { visibility: hidden; }
  .pill .label { display: none; }
  .pill:has(.label) { width: 30px; padding: 0; justify-content: center; }
  .settings { padding-top: 56px; }
  .row .dots { opacity: 1; }
}


/* ================= Study platform layout: labelled sidebar, top bar, home and subject pages ================= */
#app { padding: 0; }
.side { width: 216px; flex: none; display: flex; flex-direction: column; gap: 2px; padding: 14px 10px 12px; overflow-y: auto; scrollbar-width: none; }
.side .brand { display: flex; align-items: center; gap: 9px; padding: 2px 8px 14px; font-size: 19px; }
.side .brand .logo { width: 22px; height: 17px; }
.side .program { padding: 0 2px 12px; }
.side .program .seg { display: flex; }
.side .program .seg button { flex: 1; padding: 5px 4px; }
.side h2 { font-size: 11px; font-weight: 500; color: var(--muted); margin: 16px 10px 4px; }
.side .spacer { flex: 1; min-height: 12px; }
.nav-item { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 8px 10px; border-radius: 9px; color: var(--quiet); font-size: 14px; }
.nav-item span { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-item:hover { background: color-mix(in srgb, var(--soft) 60%, transparent); color: var(--ink); }
.nav-item.on { background: var(--soft); color: var(--ink); font-weight: 500; }
.nav-item.small { font-size: 13px; padding: 6px 10px; }
.nav-item.small i { width: 9px; height: 8px; border-radius: 50%; transform: rotate(-12deg); flex: none; margin: 0 3px; }
.nav-item.quiet { color: var(--muted); }
.nav-item.quiet svg { width: 14px; height: 14px; }

.stage { flex: 1; min-width: 0; display: flex; flex-direction: column; padding: 0 10px 10px 0; }
.top { display: flex; align-items: center; gap: 10px; height: 56px; flex: none; position: relative; }
.top .spacer { flex: 1; }
.top-search { width: min(360px, 46vw); margin: 0; background: var(--paper); border-radius: 99px; padding: 8px 14px; }
.results { top: 50px; left: 46px; width: min(400px, 80vw); position: absolute; }
.results[hidden] { display: none; }
.results .empty { font-size: 12px; color: var(--muted); padding: 8px 10px; margin: 0; }
.results button svg { color: var(--muted); flex: none; }
.countdown { font-size: 12px; color: var(--quiet); background: var(--paper); border-radius: 99px; padding: 6px 12px; white-space: nowrap; }
.countdown b { color: var(--ink); font-weight: 600; }
.work { flex: 1; min-height: 0; display: flex; }
.work .list { padding-top: 10px; }
.list[hidden] { display: none; }
.back-mobile { display: none; }

.page { flex: 1; overflow-y: auto; scrollbar-width: none; padding: 22px 0 44px; }
.column.wide { max-width: 980px; }
.banner { position: relative; overflow: hidden; display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; min-height: 150px; border-radius: 16px; padding: 22px 26px; background: var(--sand); }
.banner .hi { margin: 0; color: var(--muted); font-size: 15px; }
.banner h1 { margin: 2px 0 6px; font-size: 30px; font-weight: 600; letter-spacing: -.01em; }
.banner .sub { margin: 0; color: var(--quiet); font-size: 13px; }
.banner.subject { color: #fff; align-items: center; min-height: 120px; }
.banner.subject .hi, .banner.subject .sub { color: rgba(255, 255, 255, .82); }
.banner.subject .btn { background: #fff; color: #2B2926; flex: none; }
.scene { position: relative; width: 190px; height: 104px; flex: none; margin: 0 4px -22px 0; }
.scene span { position: absolute; border-radius: 50%; transform: rotate(-10deg); }
.scene span:nth-child(1) { width: 120px; height: 84px; left: 6px; bottom: 0; background: var(--stone); }
.scene span:nth-child(2) { width: 84px; height: 58px; right: 0; bottom: 2px; background: var(--gray-stone); }
.scene span:nth-child(3) { width: 58px; height: 40px; left: 62px; bottom: 76px; background: var(--edge); }
.scene span:nth-child(4) { width: 30px; height: 21px; left: 84px; bottom: 114px; background: var(--clay); }
.section-head { display: flex; align-items: center; justify-content: space-between; margin: 28px 2px 12px; }
.section-head h2 { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 15px; font-weight: 600; }
.section-head h2 svg { color: var(--muted); }
.link { display: inline-flex; align-items: center; gap: 6px; color: var(--quiet); font-size: 13px; }
.link:hover { color: var(--ink); }
.link svg { width: 14px; height: 14px; }
.quiet-box { margin: 0; padding: 16px 18px; border: 1px dashed var(--edge); border-radius: 12px; color: var(--quiet); font-size: 13px; }
.quiet-box .link { text-decoration: underline; margin-left: 4px; }
.subject-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
.subject-card { position: relative; overflow: hidden; display: flex; flex-direction: column; align-items: flex-start; gap: 3px; text-align: left; min-height: 124px; border-radius: 14px; padding: 16px; color: #fff; }
.subject-card b { font-size: 16px; font-weight: 600; position: relative; }
.subject-card small { color: rgba(255, 255, 255, .82); font-size: 12px; position: relative; }
.subject-card .open { position: relative; margin-top: auto; display: inline-flex; align-items: center; gap: 2px; background: #fff; color: #2B2926; border-radius: 99px; padding: 5px 8px 5px 12px; font-size: 12px; font-weight: 500; }
.subject-card .open svg { width: 13px; height: 13px; }
.subject-card .deco { position: absolute; right: -26px; bottom: -22px; width: 120px; height: 90px; border-radius: 50%; transform: rotate(-12deg); background: rgba(255, 255, 255, .14); }
.subject-card:hover { filter: brightness(1.06); }
.rows.tasks { background: var(--field); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.tasks .set > span:nth-child(2), .tasks .set > span:first-child { flex: 1; min-width: 0; }
.tasks .set b { display: block; font-weight: 500; }
.tasks .set small { display: block; color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tasks .set > svg { color: var(--muted); flex: none; }
.tasks .badge { width: 30px; height: 30px; flex: none !important; border-radius: 9px; background: var(--soft); display: grid; place-items: center; color: var(--quiet); }
.starts { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.start { display: grid; gap: 3px; text-align: left; background: var(--field); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.start:hover, .item-card:hover { border-color: var(--stone); }
.start svg { color: var(--stone); margin-bottom: 6px; }
.start b { font-weight: 600; }
.start small { color: var(--muted); font-size: 12px; }
.item-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.item-card { display: grid; gap: 3px; align-content: start; text-align: left; min-height: 74px; background: var(--field); border: 1px solid var(--line); border-radius: 12px; padding: 13px 15px; }
.item-card b { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item-card small { color: var(--muted); font-size: 12px; }
.item-card.add { display: flex; align-items: center; gap: 8px; border-style: dashed; color: var(--quiet); background: none; }

.dialog.wide { max-width: 640px; display: flex; flex-direction: column; max-height: min(680px, 90dvh); }
.dialog.wide > h2 { font-size: 20px; }
.pick-scroll { overflow-y: auto; margin: 12px -6px 0; padding: 0 6px; }
.pick-scroll h3 { font-size: 12px; font-weight: 500; color: var(--muted); margin: 16px 0 8px; }
.choices { display: flex; flex-wrap: wrap; gap: 8px; }
.choice { border-radius: 99px; background: var(--soft); padding: 7px 13px; font-size: 13px; }
.choice:hover { background: var(--line); }
.choice.on { background: var(--ink); color: var(--paper); }
.pick-scroll input { width: auto; margin: 0; background: var(--field); border: 1px solid var(--edge); border-radius: 99px; padding: 6px 13px; font-size: 13px; outline: none; }
#custom-subject { min-width: 230px; }
.set input[type="date"] { border: 0; background: none; outline: 0; }

@media (max-width: 860px) {
  .side { position: fixed; top: 0; bottom: 0; left: 0; z-index: 10; background: var(--sand); width: 250px; transform: translateX(-270px); transition: transform .2s; box-shadow: 8px 0 30px rgba(0, 0, 0, .15); padding-top: max(14px, env(safe-area-inset-top)); }
  body.open .side { transform: none; }
  .stage { padding: 0; }
  .top { padding: 0 10px; }
  .work { flex-direction: column; }
  .work .list { position: static; transform: none; box-shadow: none; width: auto; max-height: 36vh; padding: 0 12px 6px; background: none; }
  #app[data-item="open"] .list { display: none; }
  .card { border-radius: 16px 16px 0 0; }
  .back-mobile { display: inline-flex; align-items: center; gap: 4px; align-self: flex-start; margin: 10px 0 0 10px; color: var(--quiet); font-size: 13px; }
  .countdown { display: none; }
  .banner { padding: 18px; min-height: 120px; }
  .banner h1 { font-size: 24px; }
  .scene { display: none; }
  .column.wide { padding: 0 14px; }
  .row .dots { opacity: 1; }
}
@media (min-width: 861px) {
  body.open .side { display: none; }
}


/* ================= Study planner ================= */
.planner-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.planner-head h1 { margin: 0; font-size: 28px; font-weight: 600; }
.planner-head .sub { margin: 4px 0 0; color: var(--quiet); font-size: 13px; }
.planner-head .actions { display: flex; gap: 8px; }
.add-task { display: flex; gap: 8px; flex-wrap: wrap; margin: 20px 0 6px; }
.add-task input, .add-task select { background: var(--field); border: 1px solid var(--edge); border-radius: 10px; padding: 8px 12px; outline: none; font: inherit; color: inherit; }
.add-task input:focus, .add-task select:focus { border-color: var(--stone); }
.add-task #task-title { flex: 1; min-width: 200px; }
.week-nav { display: flex; align-items: center; gap: 6px; margin: 18px 0 10px; }
.week-nav b { font-weight: 600; min-width: 150px; text-align: center; }
.week-nav .link { margin-left: 8px; }
.week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.day { background: var(--field); border: 1px solid var(--line); border-radius: 12px; padding: 8px; min-height: 220px; display: flex; flex-direction: column; gap: 6px; }
.day header { display: flex; justify-content: space-between; align-items: baseline; padding: 2px 4px 4px; color: var(--muted); font-size: 12px; }
.day header b { font-size: 15px; color: var(--ink); font-weight: 600; }
.day.today { border-color: var(--stone); }
.day.today header b { background: var(--ink); color: var(--paper); border-radius: 99px; min-width: 24px; height: 24px; display: grid; place-items: center; font-size: 13px; }
.exam-mark { background: var(--clay); color: #fff; border-radius: 8px; padding: 5px 8px; font-size: 12px; font-weight: 500; }
.task { display: flex; align-items: flex-start; gap: 7px; border-radius: 8px; padding: 6px 7px; font-size: 12px; line-height: 1.35; background: color-mix(in srgb, var(--c) 16%, var(--field)); border-left: 3px solid var(--c); }
.task > span { flex: 1; min-width: 0; overflow-wrap: break-word; }
.task small { display: block; color: var(--muted); font-size: 11px; }
.task .tick { width: 16px; height: 16px; flex: none; margin-top: 1px; border-radius: 5px; border: 1.5px solid var(--c); display: grid; place-items: center; color: #fff; }
.task .tick svg { width: 11px; height: 11px; }
.task.done .tick { background: var(--c); }
.task.done > span { text-decoration: line-through; color: var(--muted); }
.task .x { color: var(--muted); opacity: 0; flex: none; }
.task .x svg { width: 12px; height: 12px; }
.task:hover .x, .task .x:focus-visible { opacity: 1; }
.planner-box { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 16px; background: var(--field); border: 1px solid var(--line); border-radius: 14px; padding: 16px; }
.mini-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; align-content: start; }
.mini-day { display: grid; justify-items: center; gap: 2px; padding: 8px 2px; border-radius: 10px; background: var(--paper); min-height: 78px; align-content: start; }
.mini-day span { font-size: 11px; color: var(--muted); }
.mini-day b { font-size: 16px; font-weight: 600; }
.mini-day i { font-style: normal; font-size: 10px; color: var(--quiet); text-align: center; }
.mini-day.today { background: var(--ink); color: var(--paper); }
.mini-day.today span, .mini-day.today i { color: color-mix(in srgb, var(--paper) 75%, transparent); }
.today-tasks { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.today-tasks h3 { margin: 0 0 2px; font-size: 12px; font-weight: 600; color: var(--quiet); }
.today-tasks .quiet { margin: 0; color: var(--muted); font-size: 13px; }
.today-tasks .link { text-decoration: underline; }

/* ================= A livelier banner and subject cards ================= */
.banner { min-height: 172px; background: linear-gradient(180deg, color-mix(in srgb, #7FB2D0 38%, var(--paper)), color-mix(in srgb, #E2C08C 34%, var(--paper))); }
.banner > div:first-child { position: relative; z-index: 1; }
.banner .hi { color: var(--quiet); }
.scene { position: absolute; inset: 0; width: auto; height: auto; margin: 0; pointer-events: none; }
.scene span { position: absolute; left: auto; border-radius: 50%; transform: none; }
.scene span:nth-child(1) { left: auto; width: 64px; height: 64px; right: 210px; top: 22px; bottom: auto; background: color-mix(in srgb, #EDB65E 85%, var(--paper)); }
.scene span:nth-child(2) { left: auto; width: 520px; height: 210px; right: -120px; bottom: -130px; top: auto; background: color-mix(in srgb, #7FA58F 60%, var(--paper)); }
.scene span:nth-child(3) { left: auto; width: 420px; height: 180px; right: 190px; bottom: -128px; top: auto; background: color-mix(in srgb, var(--stone) 62%, var(--paper)); }
.scene span:nth-child(4) { left: auto; width: 70px; height: 48px; right: 74px; bottom: 30px; top: auto; background: var(--stone); transform: rotate(-8deg); }
.scene span:nth-child(5) { left: auto; width: 48px; height: 32px; right: 84px; bottom: 70px; top: auto; background: var(--clay); transform: rotate(6deg); }
.scene span:nth-child(6) { left: auto; width: 28px; height: 19px; right: 94px; bottom: 97px; top: auto; background: color-mix(in srgb, #F2E9D8 90%, var(--paper)); transform: rotate(-10deg); }
.banner.subject .scene { display: none; }
.subject-grid { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.subject-card { min-height: 152px; border-radius: 16px; padding: 18px; }
.subject-card b { font-size: 18px; }
.subject-card .deco { right: -16px; bottom: -34px; width: 112px; height: 82px; background: rgba(255, 255, 255, .16); transform: rotate(-8deg); }
.subject-card .deco::before, .subject-card .deco::after { content: ""; position: absolute; border-radius: 50%; }
.subject-card .deco::before { width: 54px; height: 36px; right: 28px; bottom: 74px; background: rgba(255, 255, 255, .22); transform: rotate(14deg); }
.subject-card .deco::after { width: 28px; height: 19px; right: 41px; bottom: 105px; background: rgba(255, 255, 255, .3); }

@media (max-width: 860px) {
  .week { grid-template-columns: 1fr; }
  .day { min-height: 0; }
  .planner-box { grid-template-columns: 1fr; }
  .scene span:nth-child(1), .scene span:nth-child(4), .scene span:nth-child(5), .scene span:nth-child(6) { display: none; }
  .scene { display: block; opacity: .55; }
  .task .x { opacity: 1; }
}

/* When there isn't room for seven columns, show the week as a list of days */
.page .column.wide { container-type: inline-size; }
@container (max-width: 840px) {
  .week { grid-template-columns: 1fr; }
  .day { min-height: 0; flex-direction: row; flex-wrap: wrap; align-items: flex-start; padding: 10px; }
  .day header { width: 58px; flex: none; flex-direction: column; align-items: flex-start; gap: 2px; padding: 2px; }
  .day .task, .day .exam-mark { flex: 1 1 240px; }
  .planner-box { grid-template-columns: 1fr; }
}

/* Maths */
.math { overflow-wrap: normal; }
.reply .body .katex-display { margin: .6em 0; overflow-x: auto; overflow-y: hidden; padding: 2px 0; }
.reply .body .katex { font-size: 1.08em; }

/* Flashcards */
.pill .count { background: var(--stone); color: var(--paper); border-radius: 99px; font-size: 10px; font-weight: 600; padding: 1px 6px; }
.flashcard { display: grid; place-content: center; gap: 8px; width: 100%; min-height: 170px; margin-top: 14px; padding: 22px; text-align: center; background: var(--paper); border: 1px solid var(--edge); border-radius: 14px; font-size: 17px; line-height: 1.5; }
.flashcard small { color: var(--muted); font-size: 11px; }
.flashcard p { margin: 0; }
.flashcard.flipped { background: color-mix(in srgb, var(--stone) 12%, var(--paper)); border-color: var(--stone); }
.card-list { margin-top: 14px; display: grid; gap: 6px; max-height: 320px; overflow-y: auto; }
.card-row { display: flex; align-items: flex-start; gap: 10px; background: var(--paper); border-radius: 10px; padding: 9px 12px; font-size: 13px; }
.card-row > div { flex: 1; min-width: 0; }
.card-row b { display: block; font-weight: 500; }
.card-row span { display: block; color: var(--quiet); }
.card-row p { margin: 0; }
.card-add { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.card-add input { flex: 1; min-width: 150px; background: var(--paper); border: 1px solid var(--edge); border-radius: 10px; padding: 8px 12px; outline: none; }
.card-add input:focus { border-color: var(--stone); }

/* Stones, levels, and streaks */
.stats { display: inline-flex; align-items: center; gap: 12px; background: var(--paper); border-radius: 99px; padding: 6px 13px; font-size: 13px; }
.stats span { display: inline-flex; align-items: center; gap: 5px; }
.stats b { font-weight: 600; }
.stats svg { width: 15px; height: 15px; color: var(--clay); }
.stats .stone { width: 12px; height: 9px; }
.game-strip { display: grid; grid-template-columns: auto minmax(120px, 1fr) auto auto; align-items: center; gap: 22px; margin-top: 14px; background: var(--field); border: 1px solid var(--line); border-radius: 14px; padding: 14px 20px; }
.game-strip small { display: block; color: var(--muted); font-size: 11px; }
.game-strip b { font-size: 19px; font-weight: 600; }
.level { display: flex; align-items: center; gap: 12px; }
.cairn { display: flex; flex-direction: column-reverse; align-items: center; gap: 1px; width: 34px; }
.cairn i { display: block; height: 7px; border-radius: 50%; background: var(--stone); }
.cairn i:nth-child(1) { width: 32px; height: 10px; }
.cairn i:nth-child(2) { width: 25px; height: 9px; background: var(--clay); }
.cairn i:nth-child(3) { width: 19px; height: 8px; }
.cairn i:nth-child(4) { width: 14px; background: var(--edge); }
.cairn i:nth-child(5) { width: 9px; height: 6px; background: var(--clay); }
.track { height: 8px; border-radius: 99px; background: var(--soft); overflow: hidden; margin-bottom: 5px; }
.track i { display: block; height: 100%; border-radius: 99px; background: var(--stone); transition: width .4s; }
.game-strip .stat { text-align: center; }
.toast { position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%); z-index: 40; display: flex; align-items: center; gap: 9px; background: var(--ink); color: var(--paper); border-radius: 99px; padding: 10px 18px; font-size: 13px; font-weight: 500; box-shadow: 0 8px 26px rgba(0, 0, 0, .25); animation: toast-in .25s ease-out; }
.toast .stone { background: var(--paper); width: 12px; height: 9px; }
.toast.leaving { opacity: 0; transition: opacity .45s; }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 12px); } }
@media (prefers-reduced-motion: reduce) { .toast { animation: none; } }
@media (max-width: 860px) {
  .game-strip { grid-template-columns: 1fr auto auto; gap: 14px 20px; }
  .game-strip .to-next { grid-column: 1 / -1; order: 3; }
}
@container (max-width: 620px) {
  .game-strip { grid-template-columns: 1fr auto auto; gap: 14px 20px; }
  .game-strip .to-next { grid-column: 1 / -1; order: 3; }
}

/* Program button in the sidebar */
.program-pick { display: grid; grid-template-columns: 1fr auto; align-items: center; text-align: left; margin: 0 2px 12px; padding: 8px 12px; border-radius: 10px; background: var(--soft); }
.program-pick small { grid-column: 1 / -1; color: var(--muted); font-size: 10px; }
.program-pick b { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.program-pick svg { color: var(--muted); width: 14px; height: 14px; }
.program-pick:hover { background: var(--line); }

/* Handwriting */
.mode-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 4px 0 12px; }
.ink-tools { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.ink-tools .icon-btn { width: 32px; height: 32px; border-radius: 9px; }
.ink-tools .swatches { gap: 8px; margin: 0 6px; }
.ink-tools .swatches button { width: 18px; height: 18px; transform: none; }
.widths { display: inline-flex; align-items: center; gap: 2px; margin-right: 4px; }
.widths button { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; }
.widths button i { display: block; border-radius: 50%; background: var(--quiet); }
.widths button.on { background: var(--soft); }
.widths button.on i { background: var(--ink); }
.ink-wrap { background: var(--field); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
#ink { display: block; width: 100%; touch-action: none; cursor: crosshair; }
.ink-foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.ink-foot .spacer { flex: 1; }

/* Subject levels */
.level-rows { display: grid; gap: 6px; }
.level-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 13px; }
.subject-card em { position: relative; font-style: normal; font-size: 11px; font-weight: 600; background: rgba(255, 255, 255, .24); border-radius: 99px; padding: 1px 8px; margin: 2px 0; }
.nav-item em { font-style: normal; font-size: 10px; color: var(--muted); flex: none; }


/* ================= Brighter looks ================= */
:root { --grad: linear-gradient(135deg, #12A594, #2F7BF0); --s1: #A9DDF6; --s2: #D9F3E6; --hill1: #6FCFAE; --hill2: #2FB3A3; --sun: #FFD45E; }
body { transition: background-color .25s; }
.stone { background: var(--grad); }
.toast .stone { background: var(--paper); }
.card { box-shadow: 0 10px 34px color-mix(in srgb, var(--ink) 7%, transparent); }
.btn { border-radius: 12px; font-weight: 600; transition: transform .12s, opacity .12s; }
.btn:active, .subject-card:active, .start:active { transform: scale(.97); }
.btn.primary, .send.ready, .icon-btn.new, .choice.on, .mini-day.today, .day.today header b { background: var(--grad); color: #fff; }
.mini-day.today span, .mini-day.today i { color: rgba(255, 255, 255, .86); }
.side .brand b { font-weight: 700; }
.nav-item { font-weight: 500; }
.nav-item.on { background: var(--paper); box-shadow: 0 2px 10px color-mix(in srgb, var(--ink) 8%, transparent); }
.nav-item > svg { padding: 4px; width: 25px; height: 25px; border-radius: 8px; color: #fff; flex: none; background: var(--muted); }
.nav-item[data-act="home"] > svg { background: #12A594; }
.nav-item[data-act="chats"] > svg { background: #7C5CFF; }
.nav-item[data-act="planner"] > svg { background: #F0623F; }
.nav-item[data-act="notes"] > svg { background: #2F7BF0; }
.nav-item[data-act="papers"] > svg { background: #E8770C; }
.nav-item[data-act="play"] > svg { background: #E5488A; }
.nav-item.quiet > svg { padding: 0; width: 14px; height: 14px; background: none; color: var(--muted); }
.program-pick { background: var(--paper); box-shadow: 0 2px 10px color-mix(in srgb, var(--ink) 7%, transparent); }
.top-search, .countdown, .stats { box-shadow: 0 1px 6px color-mix(in srgb, var(--ink) 6%, transparent); }
.stats svg { color: #FF8A00; }

.banner { min-height: 190px; background: linear-gradient(180deg, var(--s1), var(--s2)); }
.banner h1 { font-size: 34px; font-weight: 700; }
.banner .hi, .banner .sub { color: color-mix(in srgb, var(--ink) 74%, transparent); }
.scene span:nth-child(1) { background: var(--sun); box-shadow: 0 0 0 12px color-mix(in srgb, var(--sun) 28%, transparent); }
.scene span:nth-child(2) { background: var(--hill1); }
.scene span:nth-child(3) { background: var(--hill2); }
.scene span:nth-child(4) { background: var(--clay); }
.scene span:nth-child(5) { background: var(--g2); }
.scene span:nth-child(6) { background: #fff; }
.banner.subject { background: linear-gradient(135deg, color-mix(in srgb, var(--c) 76%, #fff), var(--c)); }
.banner.subject h1 { color: #fff; }
.subject-card { background: linear-gradient(135deg, color-mix(in srgb, var(--c) 74%, #fff), var(--c)); box-shadow: 0 8px 20px color-mix(in srgb, var(--c) 32%, transparent); transition: transform .15s, box-shadow .15s; }
.subject-card:hover { transform: translateY(-3px); filter: none; box-shadow: 0 12px 26px color-mix(in srgb, var(--c) 40%, transparent); }
.subject-card b { font-weight: 700; }
.section-head h2 { font-weight: 700; }
.section-head h2 svg { color: var(--stone); }
.game-strip, .planner-box, .rows.tasks, .start, .item-card, .study-card, .group .rows, .day { border-color: transparent; box-shadow: 0 2px 12px color-mix(in srgb, var(--ink) 7%, transparent); }
.day.today { border-color: var(--stone); }
.track { height: 10px; }
.track i { background: var(--grad); }
.game-strip .level b { color: var(--stone); }
.game-strip .stat b { color: var(--clay); }
.cairn i:nth-child(odd) { background: var(--stone); }
.cairn i:nth-child(even) { background: var(--clay); }
.start, .item-card { transition: transform .15s, box-shadow .15s; }
.start:hover, .item-card:hover { transform: translateY(-2px); border-color: transparent; box-shadow: 0 8px 22px color-mix(in srgb, var(--ink) 11%, transparent); }
.start svg { color: #fff; background: var(--grad); padding: 7px; width: 32px; height: 32px; border-radius: 10px; }
.item-card.add { box-shadow: none; border-color: var(--edge); }
.tasks .badge { background: color-mix(in srgb, var(--stone) 16%, var(--paper)); color: var(--stone); }
.mine { background: color-mix(in srgb, var(--stone) 15%, var(--paper)); }
.welcome h1, .planner-head h1, .settings h1, .note-title, .papers-home h1, .dialog h2 { font-weight: 700; }
.flashcard.flipped { background: color-mix(in srgb, var(--stone) 14%, var(--paper)); }

/* Choosing a look */
.looks { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px; }
.look { display: grid; gap: 6px; text-align: center; border-radius: 12px; padding: 6px 6px 8px; border: 2px solid transparent; background: var(--soft); font-size: 12px; }
.look b { font-weight: 600; }
.look.on { border-color: var(--stone); background: var(--paper); }
.look .preview { position: relative; display: block; height: 58px; border-radius: 8px; overflow: hidden; }
.look .preview i { position: absolute; border-radius: 50%; }
.look .preview i:nth-child(1) { width: 16px; height: 16px; right: 12px; top: 8px; }
.look .preview i:nth-child(2) { width: 120px; height: 46px; right: -34px; bottom: -28px; }
.look .preview i:nth-child(3) { width: 96px; height: 40px; left: -22px; bottom: -26px; }
.look .preview u { position: absolute; top: 8px; width: 12px; height: 9px; border-radius: 50%; }
.look .preview u:nth-of-type(1) { left: 8px; }
.look .preview u:nth-of-type(2) { left: 24px; }
.look .preview u:nth-of-type(3) { left: 40px; }
.set.tall .looks { margin-top: 4px; }

.pill, .countdown { white-space: nowrap; }


/* ================= Motion: stone drop and pop ================= */
.drop-in { animation: drop-in .5s cubic-bezier(.3, 1.5, .6, 1); }
@keyframes drop-in { 0% { transform: translateY(-70px) rotate(-5deg); opacity: 0; } 60% { transform: translateY(5px) rotate(1deg); opacity: 1; } }
.drop-out { overflow: hidden; pointer-events: none; transform: translateY(46px) rotate(7deg); opacity: 0; transition: transform .3s ease-in, opacity .3s, height .2s .2s, min-height .2s .2s, margin .2s .2s, padding .2s .2s; }
.drop-out.gone { height: 0 !important; min-height: 0 !important; margin-top: 0 !important; margin-bottom: 0 !important; padding-top: 0 !important; padding-bottom: 0 !important; }
.menu, .dialog.opening, .results:not([hidden]) { animation: pop-in .24s cubic-bezier(.3, 1.6, .5, 1); transform-origin: top center; }
.dialog.opening { transform-origin: center; }
.toast { animation: toast-pop .34s cubic-bezier(.3, 1.7, .5, 1); }
@keyframes pop-in { from { transform: scale(.82); opacity: 0; } }
@keyframes toast-pop { from { transform: translate(-50%, 16px) scale(.7); opacity: 0; } }
.shade.dim { animation: fade-in .18s ease-out; }
@keyframes fade-in { from { opacity: 0; } }
.card.entering > * { animation: page-in .3s ease-out; }
@keyframes page-in { from { opacity: 0; transform: translateY(10px); } }
.choice, .look, .pill, .icon-btn, .nav-item, .seg button, .send, .tick, .chip { transition: transform .18s cubic-bezier(.3, 1.8, .5, 1), background-color .15s, color .15s; }
.choice:active, .look:active, .pill:active, .icon-btn:active, .nav-item:active, .seg button:active, .send:active, .chip:active { transform: scale(.92); }
.task.done .tick { animation: pop-in .3s cubic-bezier(.3, 1.9, .5, 1); }
.flashcard { transition: transform .2s cubic-bezier(.3, 1.6, .5, 1), background-color .2s; }
.flashcard:active { transform: scale(.98); }
@media (prefers-reduced-motion: reduce) {
  .drop-in, .menu, .dialog.opening, .toast, .card.entering > *, .task.done .tick, .results:not([hidden]) { animation: none; }
  .drop-out { transition: none; }
}


/* ================= Stone Stack ================= */
.stack-canvas { display: block; width: 100%; aspect-ratio: 680 / 380; border-radius: 16px; margin-top: 16px; background: #9fd8f5; box-shadow: 0 10px 30px color-mix(in srgb, var(--ink) 16%, transparent); }
#stack-panel { margin-top: 16px; }
#stack-panel .lead { color: var(--quiet); margin: 0 0 14px; }
.stack-hud { display: flex; align-items: center; gap: 12px; font-size: 14px; color: var(--quiet); }
.stack-hud .track { flex: 1; margin: 0; }
.stack-hud .track i { transition: width .1s linear; }
.stack-hud .track i.low { background: var(--clay); }
.stack-hud b { color: var(--ink); font-size: 18px; font-weight: 700; }
.stack-question { font-size: 19px; font-weight: 600; margin: 14px 2px 12px; min-height: 28px; }
.stack-question p { margin: 0; }
.stack-answers { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stack-answer { border-radius: 14px; padding: 14px 16px; color: #fff; font-size: 16px; font-weight: 600; text-align: left; box-shadow: 0 4px 0 rgba(0, 0, 0, .18); transition: transform .08s, box-shadow .08s; }
.stack-answer p { margin: 0; }
.stack-answer:hover { filter: brightness(1.07); }
.stack-answer:active { transform: translateY(3px); box-shadow: 0 1px 0 rgba(0, 0, 0, .18); }
.stack-result { background: var(--field); border-radius: 14px; padding: 18px 20px; box-shadow: 0 2px 12px color-mix(in srgb, var(--ink) 7%, transparent); }
.stack-result .score { margin: 0; color: var(--stone); }
.stack-result .summary { color: var(--quiet); margin: 6px 0 0; }
.stack-result .actions { display: flex; gap: 8px; margin-top: 14px; }
.start[disabled] { opacity: .55; cursor: default; transform: none; }
@container (max-width: 520px) { .stack-answers { grid-template-columns: 1fr; } }

/* Games page */
.game-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; margin-top: 20px; }
.game-card { min-height: 168px; }
.game-card em { position: absolute; top: 16px; right: 16px; margin: 0; }


/* ================= Leaderboard ================= */
.nav-item[data-act="board"] > svg { background: #E0A100; }
.board-tabs { margin-top: 16px; }
.podium { display: flex; justify-content: center; align-items: flex-end; gap: 14px; margin: 26px 0 16px; padding: 24px 16px 0; border-radius: 16px; background: linear-gradient(180deg, var(--s1), var(--s2)); overflow: hidden; }
.place { display: grid; justify-items: center; gap: 6px; width: min(150px, 30%); text-align: center; animation: drop-in .6s cubic-bezier(.3, 1.5, .6, 1) backwards; }
.place.p1 { animation-delay: .12s; } .place.p3 { animation-delay: .24s; }
.place b { font-weight: 700; font-size: 14px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); }
.place .profile { width: 54px; height: 49px; font-size: 21px; box-shadow: 0 6px 14px rgba(20, 40, 58, .25); }
.place.p1 .profile { width: 68px; height: 62px; font-size: 26px; }
.place .nobody { width: 54px; height: 49px; border-radius: 50%; border: 2px dashed var(--muted); display: grid; place-items: center; color: var(--muted); font-weight: 700; font-size: 20px; }
.place.empty b { color: var(--quiet); font-weight: 500; }
.place .block { width: 100%; border-radius: 14px 14px 0 0; display: grid; justify-items: center; align-content: start; gap: 2px; padding-top: 10px; color: #14283A; box-shadow: inset 0 3px 0 rgba(255, 255, 255, .5); }
.place.p1 .block { height: 132px; background: linear-gradient(180deg, #FFE27A, #F5B81A); }
.place.p2 .block { height: 96px; background: linear-gradient(180deg, #EEF3F7, #B9C6D2); }
.place.p3 .block { height: 70px; background: linear-gradient(180deg, #F7C9A3, #D98E55); }
.place .rank { font-size: 30px; font-weight: 700; line-height: 1; }
.place .pts { font-size: 15px; font-weight: 700; }
.score-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; margin-top: 14px; }
.score-card { background: var(--field); border-radius: 14px; padding: 14px 16px; display: grid; gap: 6px; border-top: 5px solid var(--c); box-shadow: 0 2px 12px color-mix(in srgb, var(--ink) 7%, transparent); }
.score-card b { font-weight: 700; }
.score-card div { display: flex; justify-content: space-between; align-items: baseline; font-size: 13px; color: var(--quiet); }
.score-card strong { font-size: 18px; color: var(--ink); }
.score-card .link { color: var(--stone); font-weight: 600; margin-top: 2px; }
@media (prefers-reduced-motion: reduce) { .place { animation: none; } }


/* ================= Accounts ================= */
.dialog.auth { display: grid; gap: 10px; max-width: 380px; text-align: left; }
.dialog.auth .logo { width: 34px; height: 26px; justify-self: center; }
.dialog.auth h2 { text-align: center; font-size: 21px; }
.dialog.auth > p { text-align: center; margin: -4px 0 4px; }
.dialog.auth label { display: grid; gap: 5px; font-size: 12px; font-weight: 600; color: var(--quiet); }
.dialog.auth label input:not([type="checkbox"]) { margin: 0; font-weight: 400; font-size: 14px; }
.dialog.auth label input:focus { border-color: var(--stone); }
.dialog.auth .tick { display: flex; align-items: flex-start; gap: 8px; font-weight: 400; line-height: 1.4; }
.dialog.auth .tick input { width: auto; margin: 2px 0 0; flex: none; accent-color: var(--stone); }
.dialog.auth .btn { padding: 11px; margin-top: 4px; }
.auth-error { color: var(--danger) !important; font-size: 13px; text-align: left !important; margin: 0 !important; }
.auth-notice { color: var(--stone) !important; font-size: 13px; font-weight: 600; text-align: left !important; margin: 0 !important; }
.auth-links { display: grid; gap: 6px; justify-items: center; margin-top: 2px; }
.quiet-box .link { font-weight: 600; color: var(--stone); }
.board-list .set { gap: 10px; }
.board-list .set > span:nth-of-type(3) { flex: 1; }
.board-list .rank-n { width: 22px; flex: none !important; color: var(--muted); font-weight: 700; }
.board-list .profile { width: 26px; height: 24px; font-size: 11px; }
.board-list small { color: var(--muted); font-size: 12px; }
.board-list strong { font-size: 16px; min-width: 44px; text-align: right; }
.board-list .set.me { background: color-mix(in srgb, var(--stone) 14%, var(--field)); }

/* ---------- Welcome page (first open): "Midnight glass" ---------- */
/* It keeps its own colours whichever look the student uses afterwards. */
.home-join { margin-top: 14px; }
.hello-page {
  --ink: #fff; --quiet: #b9c0e6; --muted: #8e97c9; --stone: #ff9ab0; --danger: #ff9a9a;
  position: fixed; inset: 0; z-index: 40; overflow: hidden auto; color: #fff;
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  background:
    radial-gradient(90% 70% at 12% 108%, #4a2f95 0%, transparent 60%),
    radial-gradient(70% 60% at 100% 0%, #1d2f6b 0%, transparent 62%),
    linear-gradient(160deg, #0d1230 0%, #0a0d1f 60%, #090b19 100%);
}
.hello-sky { position: absolute; inset: 0; pointer-events: none; opacity: .7;
  background-image:
    radial-gradient(1.5px 1.5px at 12% 18%, #fff 50%, transparent 51%), radial-gradient(1px 1px at 28% 42%, #cfd6ff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 41% 12%, #fff 50%, transparent 51%), radial-gradient(1px 1px at 55% 30%, #cfd6ff 50%, transparent 51%),
    radial-gradient(1px 1px at 67% 8%, #fff 50%, transparent 51%), radial-gradient(1.5px 1.5px at 78% 36%, #cfd6ff 50%, transparent 51%),
    radial-gradient(1px 1px at 88% 16%, #fff 50%, transparent 51%), radial-gradient(1px 1px at 20% 66%, #cfd6ff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 94% 58%, #fff 50%, transparent 51%), radial-gradient(1px 1px at 48% 58%, #cfd6ff 50%, transparent 51%);
  animation: hello-twinkle 6s ease-in-out infinite alternate; }
.hello-art { position: relative; display: flex; flex-direction: column; justify-content: flex-start; gap: 28px; padding: clamp(28px, 5vw, 64px); min-height: 100%; }
.hello-brand { display: flex; align-items: center; gap: 10px; font-size: 20px; font-weight: 700; letter-spacing: -.01em; }
.hello-dot { width: 30px; height: 21px; border-radius: 50%; background: linear-gradient(135deg, #ffb38a, #ff5f8f); box-shadow: 0 4px 16px rgba(255, 95, 143, .5); }
.hello-kicker { margin: 0 0 14px; font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: #9aa3d6; }
.hello-words h1 { margin: 0; font-size: clamp(40px, 6.2vw, 78px); line-height: 1.02; letter-spacing: -.03em; font-weight: 700;
  background: linear-gradient(180deg, #fff 30%, #c7ccf5 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hello-sub { margin: 18px 0 0; max-width: 420px; font-size: clamp(15px, 1.4vw, 18px); line-height: 1.55; color: #aab1d8; }
.hello-brand { margin-bottom: auto; }
.hello-stage { position: relative; flex: none; height: 300px; margin-bottom: auto; }
.hello-scene { position: absolute; left: 0; bottom: 0; width: 340px; height: 300px; transform-origin: 0 100%; }
.hello-scene::before { content: ''; position: absolute; left: 50%; bottom: -8%; width: 150%; height: 120%; translate: -50% 0; border-radius: 50%; pointer-events: none;
  background: radial-gradient(closest-side, rgba(150, 110, 255, .36), rgba(255, 110, 160, .13) 55%, transparent 76%); animation: hello-halo 5s ease-in-out infinite alternate; }
.hello-scene::after { content: ''; position: absolute; left: 12%; bottom: -6px; width: 76%; height: 26px; border-radius: 50%; background: rgba(0, 0, 0, .55); filter: blur(12px); z-index: 0; }
.hello-otter { --lx: 0; position: absolute; z-index: 1; left: 16px; bottom: 0; height: 296px; margin-left: calc(var(--lx) * 22px); transition: margin-left .6s cubic-bezier(.2, .8, .2, 1);
  transform-origin: 50% 100%; filter: drop-shadow(0 14px 18px rgba(0, 0, 0, .4)); animation: otter-rock 1.3s ease-in-out infinite alternate; -webkit-user-drag: none; user-select: none; }
@keyframes otter-bob { 0%, 100% { translate: 0 0; rotate: -1deg; } 50% { translate: 0 -5px; rotate: 1.2deg; } }
.hello-stack { --lx: 0; --ly: 0; scale: .76; transform-origin: 0 100%; position: absolute; left: 4px; bottom: 4px; width: 320px; display: flex; flex-direction: column; align-items: center; animation: hello-float 7s ease-in-out infinite; }
.hello-stack::before { content: ''; position: absolute; left: 50%; bottom: -6%; width: 170%; height: 125%; transform: translateX(-50%); border-radius: 50%; pointer-events: none;
  background: radial-gradient(closest-side, rgba(150, 110, 255, .32), rgba(255, 110, 160, .12) 55%, transparent 76%); animation: hello-halo 5s ease-in-out infinite alternate; }
.hello-stack span { display: block; position: relative; margin-top: -8px; transform-origin: 50% 100%;
  translate: calc(var(--lx) * var(--drift)) calc(var(--ly) * var(--drift) * .35); transition: translate .6s cubic-bezier(.2, .8, .2, 1);
  animation: hello-sway var(--pace) ease-in-out infinite alternate; }
.hello-stack span::before { content: ''; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 2px 3px rgba(255, 255, 255, .5), inset 0 0 0 1px rgba(255, 255, 255, .1); }
.hello-stack span::after { content: ''; position: absolute; left: 15%; top: 13%; width: 31%; height: 19%; border-radius: 50%; rotate: -9deg; filter: blur(1.2px);
  background: radial-gradient(ellipse at 38% 42%, rgba(255, 255, 255, .92), rgba(255, 255, 255, .3) 58%, transparent 74%); }
.hello-stack .s1 { z-index: 4; --drift: 46px; --pace: 5.2s; width: 70px; height: 38px; border-radius: 54% 46% 50% 50% / 60% 56% 44% 40%;
  background: linear-gradient(135deg, #fff 8%, #e2e6ff 52%, #b3baf4); box-shadow: 0 0 30px rgba(190, 200, 255, .6), inset 0 -11px 14px rgba(105, 108, 214, .58); }
.hello-stack .s2 { z-index: 3; --drift: 32px; --pace: 6.1s; width: 124px; height: 60px; border-radius: 48% 52% 46% 54% / 56% 60% 40% 44%;
  background: linear-gradient(135deg, #ffa8cc, #c85cff); box-shadow: 0 14px 46px rgba(200, 92, 255, .55), inset 0 -12px 18px rgba(110, 30, 170, .42); }
.hello-stack .s3 { z-index: 2; --drift: 20px; --pace: 7s; width: 196px; height: 82px; border-radius: 52% 48% 54% 46% / 58% 54% 46% 42%;
  background: linear-gradient(135deg, #ffb38a, #ff5f8f); box-shadow: 0 20px 58px rgba(255, 95, 143, .5), inset 0 -15px 24px rgba(170, 30, 80, .42); }
.hello-stack .s4 { z-index: 1; --drift: 10px; --pace: 8s; width: 284px; height: 98px; border-radius: 47% 53% 50% 50% / 55% 58% 42% 45%;
  background: linear-gradient(135deg, #7f8cff, #4a3fc4); box-shadow: 0 26px 66px rgba(90, 80, 230, .55), inset 0 -18px 28px rgba(30, 20, 120, .52); }
.hello-stack i { display: block; width: 330px; height: 30px; margin-top: 2px; border-radius: 50%; background: rgba(0, 0, 0, .6); filter: blur(14px); }
@keyframes hello-sway { from { rotate: -1.3deg; } to { rotate: 1.3deg; } }
@keyframes hello-halo { from { opacity: .55; } to { opacity: 1; } }
.hello-side { position: relative; display: grid; align-content: center; justify-items: center; gap: 14px; padding: clamp(20px, 4vw, 56px); }
.hello-side::before { content: ''; position: absolute; left: 50%; top: 50%; width: min(680px, 120%); aspect-ratio: 1; translate: -50% -50%; border-radius: 50%; pointer-events: none;
  background: radial-gradient(closest-side, rgba(255, 115, 165, .17), rgba(125, 112, 255, .13) 48%, transparent 72%); animation: hello-halo 6s ease-in-out infinite alternate; }
.hello-side > * { position: relative; z-index: 1; }
.hello-card, .hello-page .dialog.auth.glass {
  width: 100%; max-width: 400px; border-radius: 26px; padding: 32px 30px 26px;
  background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .17);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .5), inset 0 1px 0 rgba(255, 255, 255, .16);
  -webkit-backdrop-filter: blur(22px) saturate(140%); backdrop-filter: blur(22px) saturate(140%); color: #fff; }
.hello-card { display: grid; gap: 12px; }
.hello-card h2 { margin: 0; font-size: 30px; letter-spacing: -.02em; }
.hello-card p { margin: 0 0 10px; color: #b9c0e6; font-size: 15px; line-height: 1.55; }
.hello-btn, .hello-page .dialog.auth .btn.primary {
  height: 52px; border-radius: 99px; font-size: 16px; font-weight: 700; color: #fff; padding: 0 22px;
  border: 1px solid rgba(255, 255, 255, .28); background: rgba(255, 255, 255, .04);
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease; }
.hello-btn:hover { background: rgba(255, 255, 255, .12); transform: translateY(-1px); }
.hello-btn.main, .hello-page .dialog.auth .btn.primary { border: 0; color: #2a0d1c; background: linear-gradient(135deg, #ffb38a, #ff5f8f); box-shadow: 0 12px 30px rgba(255, 95, 143, .42), inset 0 1px 0 rgba(255, 255, 255, .5); }
.hello-btn.main:hover, .hello-page .dialog.auth .btn.primary:hover { transform: translateY(-2px); box-shadow: 0 18px 40px rgba(255, 95, 143, .55), inset 0 1px 0 rgba(255, 255, 255, .5); background: linear-gradient(135deg, #ffb38a, #ff5f8f); }
.hello-btn:active, .hello-page .dialog.auth .btn.primary:active { transform: scale(.98); }
.hello-skip, .hello-back { justify-self: center; margin-top: 4px; padding: 8px 12px; font-size: 14px; color: #9aa3d6; text-decoration: underline; text-underline-offset: 3px; }
.hello-skip:hover, .hello-back:hover { color: #fff; }
.hello-page .dialog.auth.glass h2 { font-size: 26px; }
.hello-page .dialog.auth.glass > p { color: #b9c0e6; }
.hello-page .dialog.auth.glass .logo { background: linear-gradient(135deg, #ffb38a, #ff5f8f); }
.hello-page .dialog.auth.glass label { color: #b9c0e6; }
.hello-page .dialog.auth.glass input:not([type="checkbox"]) { height: 46px; border-radius: 14px; padding: 0 14px; color: #fff; background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .18); outline: none; }
.hello-page .dialog.auth.glass input::placeholder { color: #7f88bb; }
.hello-page .dialog.auth.glass input:not([type="checkbox"]):focus { border-color: #ff9ab0; box-shadow: 0 0 0 4px rgba(255, 127, 160, .2); }
.hello-page .dialog.auth.glass .tick { color: #c9cfee; }
.hello-page .dialog.auth.glass .tick input { accent-color: #ff7fa0; }
.hello-page .dialog.auth.glass .link { color: #c9cfee; text-decoration: underline; text-underline-offset: 3px; }
.hello-page .dialog.auth.glass .btn.primary { margin-top: 8px; padding: 0 22px; }
.hello-page .dialog.auth.glass .btn.primary:disabled { opacity: .6; }
.hello-page.entering { animation: hello-in .5s ease both; }
.hello-page.entering .hello-brand { animation: hello-in .8s ease both; }
.hello-page.entering .hello-kicker, .hello-page.entering .hello-words h1, .hello-page.entering .hello-sub { animation: hello-rise .9s cubic-bezier(.16, 1, .3, 1) both; }
.hello-page.entering .hello-words h1 { animation-delay: .12s; }
.hello-page.entering .hello-sub { animation-delay: .26s; }
.hello-page.entering .hello-card { animation: hello-card 1s cubic-bezier(.16, 1, .3, 1) .95s both; }
.hello-side.swap > * { animation: hello-swap .4s cubic-bezier(.16, 1, .3, 1) both; }
@keyframes hello-card { from { opacity: 0; transform: translateX(56px) scale(.97); filter: blur(8px); } to { opacity: 1; transform: none; filter: blur(0); } }
@keyframes hello-swap { from { opacity: 0; transform: translateY(14px) scale(.985); } to { opacity: 1; transform: none; } }
.hello-page.leaving { animation: hello-out .32s ease both; pointer-events: none; }
@keyframes hello-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes hello-out { to { opacity: 0; transform: scale(1.03); } }
@keyframes hello-rise { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }
@keyframes hello-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes hello-twinkle { from { opacity: .35; } to { opacity: .8; } }
@media (max-width: 820px) {
  .hello-page { grid-template-columns: 1fr; align-content: start; }
  .hello-art { min-height: 0; padding-bottom: 8px; gap: 22px; }
  .hello-stage { flex: none; height: 200px; min-height: 0; }
  .hello-scene { left: 50%; margin-left: -170px; transform: scale(.62); transform-origin: 50% 100%; }
  .hello-side { padding-top: 12px; align-content: start; }
}
@media (prefers-reduced-motion: reduce) {
  .hello-page, .hello-page * { animation: none !important; transition: none !important; }
}

/* ---------- Continue with Google / Microsoft ---------- */
.social { display: grid; gap: 10px; }
.social-btn { display: flex; align-items: center; justify-content: center; gap: 10px; height: 46px; border-radius: 12px; font-size: 14px; font-weight: 600;
  background: #fff; color: #1f1f1f; border: 1px solid var(--edge); transition: transform .18s ease, box-shadow .18s ease; }
.social-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(0, 0, 0, .14); }
.social-btn:active { transform: scale(.98); }
.social-note { margin: 0 !important; font-size: 11.5px !important; line-height: 1.45; color: var(--muted) !important; text-align: center !important; }
.or { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12px; margin: 2px 0; }
.or::before, .or::after { content: ''; flex: 1; height: 1px; background: var(--edge); }
.hello-page .social-btn { height: 52px; border-radius: 99px; font-size: 16px; font-weight: 700; border: 0; box-shadow: 0 10px 26px rgba(0, 0, 0, .35); }
.hello-page .social-btn:hover { transform: translateY(-2px); box-shadow: 0 16px 34px rgba(0, 0, 0, .45); }
.hello-page .dialog.auth.glass .social-btn { height: 46px; font-size: 15px; }
.hello-page .social-note { color: #8e97c9 !important; }
.hello-page .or { color: #9aa3d6; }
.hello-page .or::before, .hello-page .or::after { background: rgba(255, 255, 255, .18); }

/* ---------- The otter mascot around the app ---------- */
@media (max-width: 1120px) and (min-width: 821px) { .hello-scene { transform: scale(.8); } }
.banner-otter { position: absolute; right: 40px; bottom: -18px; height: 172px; z-index: 1; pointer-events: none; transform-origin: 50% 100%;
  filter: drop-shadow(0 8px 12px rgba(0, 0, 0, .2)); animation: otter-rock 1.3s ease-in-out infinite alternate; -webkit-user-drag: none; user-select: none; }
.banner:has(.banner-otter) .scene span:nth-child(n+4) { display: none; }
@media (max-width: 760px) { .banner-otter { height: 104px; right: 4px; bottom: -12px; } }
.toast.cheer { padding-left: 8px; }
.toast-otter { height: 44px; margin: -9px 2px -9px 0; flex: none; transform-origin: 50% 100%; animation: otter-hop .7s cubic-bezier(.3, 1.6, .5, 1) both; }
@keyframes otter-hop { 0% { transform: translateY(10px) scale(.4); } 60% { transform: translateY(-7px) scale(1.08); } 100% { transform: none; } }
.toast.level { left: 50%; top: 50%; bottom: auto; transform: translate(-50%, -50%); flex-direction: column; gap: 2px; padding: 24px 40px 26px; border-radius: 28px; text-align: center;
  background: var(--paper); color: var(--ink); border: 1px solid var(--line); box-shadow: 0 30px 80px rgba(0, 0, 0, .35); animation: level-pop .55s cubic-bezier(.3, 1.5, .5, 1) both; }
.toast.level .toast-otter { height: 150px; margin: 0 0 6px; animation: otter-hop .8s cubic-bezier(.3, 1.6, .5, 1) .1s both, otter-bob 2.4s ease-in-out .9s infinite; }
.toast.level b { font-size: 26px; letter-spacing: -.01em; }
.toast.level span { font-size: 14px; color: var(--quiet); }
@keyframes level-pop { from { opacity: 0; transform: translate(-50%, -42%) scale(.8); } to { opacity: 1; transform: translate(-50%, -50%) scale(1); } }
@media (prefers-reduced-motion: reduce) { .banner-otter, .hello-otter, .toast-otter, .toast.level { animation: none !important; } }

/* ---------- The otter's moods, each with its own movement ---------- */
.otter { --h: 48px; position: relative; display: inline-block; flex: none; height: var(--h); aspect-ratio: 9 / 10; transform-origin: 50% 100%; }
.otter img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; object-position: 50% 100%; -webkit-user-drag: none; user-select: none; }
.otter i { position: absolute; font-style: normal; pointer-events: none; }
@keyframes otter-rock { from { rotate: -3.5deg; } to { rotate: 3.5deg; } }
/* party: clap, cheer, clap, cheer, hopping each time, with sparkles popping around its head */
.otter.party { animation: otter-jump .64s ease-in-out infinite; }
.otter.party img:nth-of-type(1) { animation: otter-frame .64s steps(1) infinite; }
.otter.party img:nth-of-type(2) { animation: otter-frame .64s steps(1) -.32s infinite; }
.otter.party i { width: 20%; aspect-ratio: 1; background: #ffc94d; clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%); animation: otter-spark 1.1s ease-out infinite; }
.otter.party i:nth-of-type(1) { left: -12%; top: 2%; }
.otter.party i:nth-of-type(2) { right: -14%; top: 14%; animation-delay: .35s; background: #ff8fa3; width: 15%; }
.otter.party i:nth-of-type(3) { left: 40%; top: -18%; animation-delay: .7s; background: #9fb4ff; width: 16%; }
@keyframes otter-frame { 0% { opacity: 1; } 50%, 100% { opacity: 0; } }
@keyframes otter-jump { 0%, 50%, 100% { translate: 0 0; scale: 1.04 .96; } 25%, 75% { translate: 0 -11%; scale: .98 1.03; } }
@keyframes otter-spark { 0% { scale: 0; opacity: 0; rotate: 0deg; } 35% { scale: 1.1; opacity: 1; } 100% { scale: .3; opacity: 0; rotate: 90deg; } }
/* think: a slow head tilt, three dots rising one after another */
.otter.think { animation: otter-tilt 1.7s ease-in-out infinite alternate; }
.otter.think i { right: -4%; top: 4%; width: 11%; aspect-ratio: 1; border-radius: 50%; background: var(--stone, #8f7bff); animation: otter-dot 1.5s ease-in-out infinite; }
.otter.think i:nth-of-type(2) { right: -18%; top: -8%; width: 14%; animation-delay: .25s; }
.otter.think i:nth-of-type(3) { right: -36%; top: -24%; width: 18%; animation-delay: .5s; }
@keyframes otter-tilt { from { rotate: -4deg; } to { rotate: 3deg; } }
@keyframes otter-dot { 0%, 100% { opacity: .2; scale: .7; } 50% { opacity: 1; scale: 1.1; } }
/* sad: sinks a little and sniffles */
.otter.sad { animation: otter-sob 1.8s ease-in-out infinite; }
@keyframes otter-sob { 0%, 100% { translate: 0 0; scale: 1 1; } 40% { translate: 0 3%; scale: 1.03 .95; } 50% { translate: -2% 3%; } 60% { translate: 2% 3%; } 70% { translate: -1% 3%; scale: 1.03 .95; } }
/* sleep: slow breathing, z's drifting up */
.otter.sleep { animation: otter-breathe 3.4s ease-in-out infinite; }
.otter.sleep i { right: 4%; top: -4%; font-weight: 800; font-size: calc(var(--h) * .26); color: #8fb0ff; animation: otter-zzz 3.4s ease-out infinite; }
.otter.sleep i:nth-of-type(2) { animation-delay: 1.7s; font-size: calc(var(--h) * .2); }
@keyframes otter-breathe { 0%, 100% { scale: 1 1; } 50% { scale: 1.035 .955; } }
@keyframes otter-zzz { 0% { translate: 0 0; opacity: 0; } 20% { opacity: 1; } 100% { translate: 60% -110%; opacity: 0; rotate: 14deg; } }
/* where the moods sit */
.toast .otter { --h: 46px; margin: -9px 4px -9px 2px; }
.toast.cheer, .toast.sad { padding-left: 8px; }
.toast.level .otter { --h: 164px; margin: 6px 0 10px; }
#live .otter.think { --h: 38px; margin: -4px 14px 0 0; }
.quiet.rest { display: flex; align-items: center; gap: 14px; }
.quiet.rest .otter { --h: 64px; }
@media (prefers-reduced-motion: reduce) { .otter, .otter img, .otter i { animation: none !important; } .otter.party img:nth-of-type(1) { opacity: 0; } }

/* ---------- Real frame-by-frame otter animation ---------- */
/* A strip of drawn frames is played like a flip-book, so the otter's arm, head and eyes really move. */
.sprite { background-repeat: no-repeat; background-position: 0 0; }
.sprite.wave { aspect-ratio: 497 / 520; background-image: url(/otter-wave-strip.png); background-size: 600% 100%; }
.hello-otter.sprite.wave { animation: sprite-play .84s steps(6, jump-none) infinite alternate, otter-rock 2.8s ease-in-out infinite alternate; }
.banner-otter.sprite.wave { animation: sprite-play .84s steps(6, jump-none) infinite alternate, otter-rock 2.8s ease-in-out infinite alternate; }
@keyframes sprite-play { to { background-position: 100% 0; } }

/* The celebration: clap, clap, arms up, drawn frame by frame, with a hop as the arms go up */
.otter .sprite { position: absolute; inset: 0; }
.sprite.party { background-image: url(/otter-party-strip.png); background-size: 600% 100%; animation: sprite-play 1.02s steps(6, jump-none) infinite; }
.otter.party { aspect-ratio: 579 / 520; animation: otter-cheer-hop 1.02s ease-in-out infinite; }
@keyframes otter-cheer-hop { 0%, 62% { translate: 0 0; scale: 1 1; } 66% { scale: 1.05 .94; } 82% { translate: 0 -13%; scale: .97 1.04; } 100% { translate: 0 0; scale: 1 1; } }
@media (prefers-reduced-motion: reduce) { .sprite { animation: none !important; } }

/* Smooth playback: two layers of the same strip, blended so one drawing melts into the next */
.sprite.smooth { background-image: none !important; isolation: isolate; }
.sprite.smooth > b { position: absolute; inset: 0; background-repeat: no-repeat; background-size: 600% 100%; will-change: opacity; }
.sprite.smooth > b + b { mix-blend-mode: plus-lighter; }
.sprite.wave.smooth > b { background-image: url(/otter-wave-strip.png); }
.sprite.party.smooth > b { background-image: url(/otter-party-strip.png); }
.hello-otter.sprite.wave.smooth, .banner-otter.sprite.wave.smooth { animation: otter-rock 2.8s ease-in-out infinite alternate, otter-breathe 3.2s ease-in-out infinite; }
.sprite.party.smooth { animation: none; }
.otter.party { animation: otter-cheer-hop 1s cubic-bezier(.3, .1, .3, 1) infinite; }
@keyframes otter-cheer-hop { 0%, 46% { translate: 0 0; scale: 1 1; } 54% { translate: 0 0; scale: 1.05 .94; } 70% { translate: 0 -14%; scale: .97 1.04; } 86% { translate: 0 0; scale: 1.03 .97; } 100% { translate: 0 0; scale: 1 1; } }

/* ---------- The waving otter, rigged ---------- */
/* One drawing is split into the body and the raised arm. The arm swings on its shoulder with eased,
   continuous rotation, so it is smooth at any screen refresh rate, and the eyes blink now and then. */
.rig { aspect-ratio: 502 / 520; }
.rig > b { position: absolute; inset: 0; background: url(/otter-wave-strip.png) 0 0 / 600% 100% no-repeat; }
.rig .body { clip-path: polygon(evenodd, 0 0, 100% 0, 100% 100%, 0 100%, 0 0, 0.00% 26.92%, 12.35% 26.92%, 13.15% 30.77%, 14.94% 30.96%, 17.13% 32.31%, 18.92% 33.85%, 19.92% 35.77%, 20.72% 37.50%, 21.91% 39.62%, 23.90% 42.31%, 26.29% 45.00%, 29.48% 47.69%, 31.87% 49.62%, 28.29% 55.00%, 22.31% 60.38%, 11.95% 57.69%, 0.00% 50.00%, 0.00% 26.92%); }
.rig .arm { clip-path: polygon(0.00% 26.92%, 12.35% 26.92%, 13.15% 30.77%, 14.94% 30.96%, 17.13% 32.31%, 18.92% 33.85%, 19.92% 35.77%, 20.72% 37.50%, 21.91% 39.62%, 23.90% 42.31%, 26.29% 45.00%, 29.48% 47.69%, 32.27% 50.00%, 34.26% 51.92%, 36.25% 57.69%, 31.87% 66.35%, 23.51% 66.92%, 19.92% 63.46%, 11.95% 57.69%, 0.00% 50.00%); transform-origin: 22.9% 61.9%; animation: rig-wave 1.15s ease-in-out infinite alternate; }
.rig .blink { background-position: 60% 0; clip-path: inset(21% 24% 64% 31% round 30%); opacity: 0; animation: rig-blink 4.6s linear infinite; }
@keyframes rig-wave { from { rotate: 0deg; } to { rotate: 12deg; } }
@keyframes rig-blink { 0%, 93% { opacity: 0; } 95%, 98% { opacity: 1; } 100% { opacity: 0; } }
.hello-otter.rig, .banner-otter.rig { animation: otter-rock 3.6s ease-in-out infinite alternate, otter-breathe 3.2s ease-in-out infinite; }
.otter.party { animation: otter-cheer-hop 1.92s cubic-bezier(.3, .1, .3, 1) infinite; }
@media (prefers-reduced-motion: reduce) { .rig, .rig > b { animation: none !important; } }

/* The blink patch did not line up with the open eyes, so it is off until the eyes are drawn as their own layer */
.rig .blink { display: none; }

/* A band of fur colour behind the arm's inner edge, so no gap shows when the arm swings away from the cheek */
.rig .back { background: #d4835e; clip-path: polygon(20.72% 37.50%, 21.91% 39.62%, 23.90% 42.31%, 26.29% 45.00%, 29.48% 47.69%, 31.87% 49.62%, 28.29% 55.00%, 23.90% 51.54%, 20.32% 48.08%, 17.93% 44.62%, 16.33% 41.15%, 15.94% 38.46%); }

/* ---------- Twelve-frame otter animations ---------- */
.sprite.wave { aspect-ratio: 418 / 440; background-size: 1200% 100%; }
.sprite.party { background-size: 1200% 100%; }
.sprite.smooth > b { background-size: 1200% 100%; }
.otter.party { aspect-ratio: 472 / 440; animation: otter-cheer-hop12 1.38s cubic-bezier(.3, .1, .3, 1) infinite; }
.hello-otter.sprite.wave { animation: sprite-play 1.26s steps(12, jump-none) infinite, otter-rock 3.2s ease-in-out infinite alternate; }
.banner-otter.sprite.wave { animation: sprite-play 1.26s steps(12, jump-none) infinite, otter-rock 3.2s ease-in-out infinite alternate; }
.hello-otter.sprite.wave.smooth, .banner-otter.sprite.wave.smooth { animation: otter-rock 3.2s ease-in-out infinite alternate, otter-breathe 3.2s ease-in-out infinite; }
@keyframes otter-cheer-hop12 { 0%, 50% { translate: 0 0; scale: 1 1; } 56% { translate: 0 0; scale: 1.04 .95; } 68% { translate: 0 -12%; scale: .98 1.03; } 82% { translate: 0 0; scale: 1.03 .97; } 90%, 100% { translate: 0 0; scale: 1 1; } }

/* ---------- Forty-eight-frame otter animations ---------- */
/* Each sheet is a grid of 8 by 6 frames. Impera steps through them and blends neighbours on every screen refresh. */
.sprite.wave, .sprite.wave.smooth > b { background-image: url(/otter-wave-48.png); background-size: 800% 600%; }
.sprite.party, .sprite.party.smooth > b { background-image: url(/otter-party-48.png); background-size: 800% 600%; }
.sprite.smooth > b { background-size: 800% 600%; }
.hello-otter.sprite.wave, .banner-otter.sprite.wave { animation: otter-rock 3.4s ease-in-out infinite alternate, otter-breathe 3.4s ease-in-out infinite; }
.sprite.party { animation: none; }
.otter.party { animation: otter-cheer-hop12 1.65s cubic-bezier(.3, .1, .3, 1) infinite; }

/* ---------- The waving otter: back to the swinging arm ---------- */
/* Frames, however many, still step from picture to picture. The arm swinging on its shoulder is the one
   version that is truly continuous, so the wave uses that again, now with clean edges. Everything here
   moves with transforms only, which the graphics chip animates without redrawing the picture. */
.rig > b { background: url(/otter-wave-rig.png) 0 0 / 100% 100% no-repeat; }
.rig .back { background: #d4835e; }
.rig .arm { animation: rig-swing 1.25s ease-in-out infinite alternate; will-change: transform; }
@keyframes rig-swing { from { transform: rotate(0deg); } to { transform: rotate(12deg); } }
.hello-otter.rig, .banner-otter.rig { filter: none; animation: rig-sway 3.6s ease-in-out infinite alternate; will-change: transform; }
@keyframes rig-sway { from { transform: rotate(-1.6deg) scale(1, 1); } to { transform: rotate(1.6deg) scale(1.02, .985); } }

/* ---------- Ninety-six-frame otter animations ---------- */
/* 48 drawings each, with an in-between added per pair, in a grid of 12 by 8. */
.sprite.wave { aspect-ratio: 296 / 300; }
.sprite.wave, .sprite.wave.smooth > b { background-image: url(/otter-wave-96.png); background-size: 1200% 800%; }
.sprite.party, .sprite.party.smooth > b { background-image: url(/otter-party-96.png); background-size: 1200% 800%; }
.sprite.smooth > b { background-size: 1200% 800%; }
.otter.party { aspect-ratio: 329 / 300; animation: otter-cheer-hop12 2.1s cubic-bezier(.3, .1, .3, 1) infinite; }
.hello-otter.sprite.wave, .banner-otter.sprite.wave { filter: none; animation: rig-sway 3.6s ease-in-out infinite alternate; }

/* ---------- The polished otter ---------- */
/* Premium artwork: rich shading, a violet rim light and a glossy pebble. Animations are grids of 8 by 6 frames. */
.sprite.wave { aspect-ratio: 402 / 460; }
.sprite.wave, .sprite.wave.smooth > b { background-image: url(/otter-wave-anim.png); background-size: 800% 600%; }
.sprite.party, .sprite.party.smooth > b { background-image: url(/otter-party-anim.png); background-size: 800% 600%; }
.sprite.smooth > b { background-size: 800% 600%; }
.otter.party { aspect-ratio: 402 / 380; animation: otter-cheer-hop12 2s cubic-bezier(.3, .1, .3, 1) infinite; }
.otter.party i { display: none; }
.hello-otter { height: 298px; }
.banner-otter { height: 182px; }

/* The otter animations are drawn on a canvas */
.sprite.smooth { isolation: auto; }
.sprite.smooth > canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

/* ---------- The rigged otter ---------- */
/* Arm, body and head are separate pictures. Only transforms move, so the graphics chip animates them
   at the screen's full refresh rate, and every part stays perfectly sharp. */
.rig3 { position: relative; display: block; height: 100%; aspect-ratio: 940 / 960; }
.rig3 img { position: absolute; height: auto; -webkit-user-drag: none; user-select: none; will-change: transform; }
.rig3 .r-arm { left: 6.1%; top: 13%; width: 43.6%; transform-origin: 80% 86%; animation: rig-arm 1s ease-in-out infinite alternate; }
.rig3 .r-body { left: 19.8%; top: 42.4%; width: 79.5%; transform-origin: 45% 100%; animation: rig-body 2.8s ease-in-out infinite alternate; }
.rig3 .r-head { left: 15.85%; top: 0; width: 76.6%; transform-origin: 48% 88%; animation: rig-head 2.3s ease-in-out infinite alternate; }
@keyframes rig-arm { from { transform: rotate(-12deg); } to { transform: rotate(12deg); } }
@keyframes rig-body { from { transform: scale(1, 1); } to { transform: scale(1.018, .982); } }
@keyframes rig-head { from { transform: rotate(-2.4deg) translateY(0); } to { transform: rotate(2.6deg) translateY(-1.2%); } }
.hello-otter, .banner-otter { animation: none !important; filter: none !important; aspect-ratio: 940 / 960; }
/* cheering: a happy hop, a faster wave and a bouncier head */
.rig3.otter.cheer { height: var(--h); animation: rig-hop .78s cubic-bezier(.3, 0, .3, 1) infinite; }
.rig3.cheer .r-arm { animation: rig-arm .34s ease-in-out infinite alternate; }
.rig3.cheer .r-head { animation: rig-head-happy .39s ease-in-out infinite alternate; }
@keyframes rig-hop { 0%, 100% { transform: translateY(0) scale(1.04, .95); } 45% { transform: translateY(-13%) scale(.98, 1.03); } 80% { transform: translateY(0) scale(1.03, .97); } }
@keyframes rig-head-happy { from { transform: rotate(-4deg); } to { transform: rotate(4deg) translateY(-1.5%); } }
.toast .rig3.otter { margin: -9px 4px -9px 2px; }
.toast.level .rig3.otter { --h: 170px; margin: 12px 0 10px; }
@media (prefers-reduced-motion: reduce) { .rig3, .rig3 img { animation: none !important; } }

/* ---------- The rigged otter, second version ---------- */
/* Body and arm share one canvas, so they line up exactly as drawn. */
.rig3 { aspect-ratio: 726 / 900; transform-origin: 50% 100%; animation: rig-idle 3.4s ease-in-out infinite alternate; will-change: transform; }
.rig3 img, .rig3 .r-body, .rig3 .r-arm { left: 0; top: 0; width: 100%; height: 100%; }
.rig3 .r-body { animation: none; transform: none; }
.rig3 .r-arm { transform-origin: 33% 62%; animation: rig-arm2 .95s ease-in-out infinite alternate; }
@keyframes rig-arm2 { from { transform: rotate(-13deg); } to { transform: rotate(12deg); } }
@keyframes rig-idle { from { transform: rotate(-1.1deg) scale(1, 1); } to { transform: rotate(1.1deg) scale(1.016, .984); } }
.hello-otter, .banner-otter { aspect-ratio: 726 / 900; }
.rig3.otter.cheer { animation: rig-hop .78s cubic-bezier(.3, 0, .3, 1) infinite; }
.rig3.cheer .r-arm { animation: rig-arm2 .36s ease-in-out infinite alternate; }

/* ---------- The long waving animation ---------- */
/* 93 stills in a grid of 12 by 8, drawn on a canvas and blended between neighbours on every screen refresh. */
.sprite.wave { aspect-ratio: 390 / 420; }
.sprite.wave, .sprite.wave.smooth > b { background-image: url(/otter-wave-anim.png); background-size: 1200% 800%; }
.hello-otter, .banner-otter { aspect-ratio: 390 / 420; }
.hello-otter.sprite.wave, .banner-otter.sprite.wave { filter: none; animation: rig-idle 3.4s ease-in-out infinite alternate; transform-origin: 50% 100%; }
.otter.cheer { aspect-ratio: 390 / 420; animation: rig-hop .76s cubic-bezier(.3, 0, .3, 1) infinite; }
.otter.cheer .sprite { animation: none; }
.toast .otter.cheer { margin: -9px 4px -9px 2px; }
.toast.level .otter.cheer { --h: 170px; margin: 12px 0 10px; }

/* The otter film: each picture is 370 x 433 in an 11 x 11 grid. It moves by itself, so no extra swaying. */
.sprite.wave { aspect-ratio: 370 / 433; }
.sprite.wave, .sprite.wave.smooth > b { background-image: url(/otter-wave-anim.png); background-size: 1100% 1100%; }
.hello-otter.sprite.wave, .banner-otter.sprite.wave { animation: none; }

/* The celebration film (puts the pebble down, then claps): each picture is 260 x 298 in a 9 x 9 grid. */
.sprite.clap { aspect-ratio: 260 / 298; }
.otter.cheer { aspect-ratio: 260 / 298; animation: none; }
.toast .otter.cheer { --h: 62px; margin: -17px 6px -15px 0; }
.toast.level .otter.cheer { --h: 176px; margin: 12px 0 10px; }

/* ---------- Study tools: Focus, Blurting, Teach the otter (tools.js) ---------- */
.tool { --good: #1FA57D; }
.tool-start { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 22px; align-items: center; }
.tool-start input, .tool-start select { background: var(--field); border: 1px solid var(--edge); border-radius: 12px; padding: 10px 14px; outline: none; font-size: 14px; }
.tool-start input { flex: 1; min-width: 220px; }
.tool-start input:focus, .blurt-page:focus, .lesson-box textarea:focus { border-color: var(--stone); }
.tool-error { color: var(--danger); font-size: 13px; margin: 10px 0 0; }
.tool-h2 { font-size: 13px; font-weight: 600; color: var(--quiet); margin: 28px 0 10px; }
.tool-buttons { display: flex; gap: 10px; align-items: center; justify-content: center; margin-top: 18px; }
.btn.big { padding: 12px 28px; font-size: 15px; border-radius: 14px; }
.checking { display: inline-flex; align-items: center; gap: 12px; color: var(--quiet); font-size: 14px; }
.checking .otter { --h: 44px; }
.how { list-style: none; counter-reset: how; display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; padding: 0; margin: 28px 0 0; }
.how li { counter-increment: how; background: var(--paper); border: 1px solid var(--line); border-radius: 16px; padding: 16px; }
.how li::before { content: counter(how); display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--grad); color: #fff; font-size: 13px; font-weight: 600; margin-bottom: 10px; }
.how b { display: block; font-size: 14px; }
.how span { display: block; color: var(--quiet); font-size: 13px; margin-top: 4px; line-height: 1.45; }
.past { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
.past button { text-align: left; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; }
.past button:hover { border-color: var(--stone); }
.past b { display: block; font-size: 14px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.past span { font-size: 12px; color: var(--quiet); }

.ring { position: relative; width: 220px; aspect-ratio: 1; flex: none; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke: var(--soft); stroke-width: 8; }
.ring .arc { stroke: #2BB39A; stroke-linecap: round; transition: stroke-dashoffset 1s linear; }
.ring-text { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.ring-text b { font-size: 44px; font-weight: 600; line-height: 1.1; font-variant-numeric: tabular-nums; }
.ring-text span { color: var(--quiet); font-size: 13px; }

.bubble { position: relative; background: var(--field); border: 1px solid var(--edge); border-radius: 16px; padding: 12px 16px; font-size: 14px; line-height: 1.45; max-width: 300px; min-height: 46px; text-align: center; }
.bubble::after { content: ''; position: absolute; left: 50%; bottom: -7px; width: 12px; height: 12px; background: var(--field); border: solid var(--edge); border-width: 0 1px 1px 0; transform: translateX(-50%) rotate(45deg); }
.tool-otter { width: 170px; margin-top: 14px; }
.tool-otter.sprite { position: relative; }
.tool-otter.still { display: grid; place-items: center; aspect-ratio: 370 / 433; }
.tool-otter.still .otter { --h: 150px; }
.dots { display: inline-flex; gap: 5px; padding: 4px 0; }
.dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--quiet); animation: otter-dot 1.2s ease-in-out infinite; }
.dots i:nth-child(2) { animation-delay: .2s; } .dots i:nth-child(3) { animation-delay: .4s; }

.focus-stage { display: flex; gap: 48px; align-items: center; justify-content: center; flex-wrap: wrap; margin-top: 36px; }
.focus-clock { display: flex; flex-direction: column; align-items: center; }
.focus-clock .ring { width: 260px; }
.focus-clock .ring-text b { font-size: 56px; }
.focus-clock .lengths { margin-top: 22px; }
.focus-clock .lengths button { padding: 7px 16px; font-size: 13px; }
.focus-clock .lengths button[disabled] { opacity: .5; cursor: default; }
.focus-side { display: flex; flex-direction: column; align-items: center; text-align: center; }
.focus-side .reward { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 500; margin: 16px 0 2px; }
.focus-side .quiet, .blurt-result .quiet { color: var(--quiet); font-size: 13px; margin: 4px 0 0; }

.blurt-page { display: block; width: 100%; min-height: 320px; margin-top: 22px; background: var(--field); border: 1px solid var(--edge); border-radius: 18px; padding: 20px 22px; outline: none; resize: vertical; font-size: calc(15px * var(--scale)); line-height: 1.7; }
.blurt-result { display: flex; gap: 36px; align-items: flex-start; flex-wrap: wrap; margin-top: 28px; }
.blurt-result .score { display: flex; flex-direction: column; align-items: center; text-align: center; width: 240px; flex: none; }
.blurt-result .score p { margin: 14px 0 0; font-size: 14px; line-height: 1.45; }
.points { list-style: none; padding: 0; margin: 0; flex: 1; min-width: 280px; display: grid; gap: 8px; }
.points li { display: flex; gap: 12px; align-items: flex-start; background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; }
.points li > svg { flex: none; width: 22px; height: 22px; padding: 4px; border-radius: 50%; color: #fff; margin-top: 1px; }
.points .got > svg { background: var(--good); }
.points .missed > svg { background: var(--danger); }
.points b { display: block; font-size: 14px; font-weight: 500; line-height: 1.45; }
.points .got b { color: var(--quiet); }
.points span { display: block; font-size: 13px; color: var(--quiet); margin-top: 3px; line-height: 1.45; }

.teach-stage { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 24px; margin-top: 24px; align-items: start; }
.classroom { display: flex; flex-direction: column; align-items: center; background: var(--paper); border: 1px solid var(--line); border-radius: 20px; padding: 20px 18px; }
.understands { width: 100%; display: flex; flex-wrap: wrap; justify-content: space-between; font-size: 13px; color: var(--quiet); margin-top: 14px; }
.understands b { color: var(--ink); }
.meter { width: 100%; height: 8px; border-radius: 99px; background: var(--soft); margin-top: 6px; overflow: hidden; }
.meter i { display: block; height: 100%; border-radius: 99px; background: var(--grad); transition: width .6s cubic-bezier(.3, 1.3, .5, 1); }
.goals { list-style: none; padding: 0; margin: 14px 0 0; width: 100%; display: grid; gap: 8px; }
.goals li { display: flex; gap: 10px; align-items: center; font-size: 13px; line-height: 1.35; }
.goals li > svg, .goals em { flex: none; width: 18px; height: 18px; border-radius: 50%; }
.goals em { border: 1.5px solid var(--edge); }
.goals li > svg { background: var(--good); color: #fff; padding: 3px; }
.goals .got span { color: var(--quiet); }
.caught { font-size: 12px; color: var(--quiet); margin: 14px 0 0; text-align: center; }
.caught b { color: var(--ink); }
.lesson { display: flex; flex-direction: column; min-height: 420px; }
.lesson-talk { flex: 1; display: flex; flex-direction: column; gap: 10px; max-height: 52vh; overflow-y: auto; padding: 2px 2px 12px; scrollbar-width: thin; }
.otter-line { align-self: flex-start; max-width: 80%; background: var(--field); border: 1px solid var(--edge); border-radius: 12px; padding: 10px 14px; font-size: calc(14px * var(--scale)); line-height: 1.5; }
.tutor-note { align-self: stretch; display: flex; gap: 8px; align-items: flex-start; font-size: 13px; line-height: 1.45; color: var(--danger); background: color-mix(in srgb, var(--danger) 9%, transparent); border-radius: 10px; padding: 8px 12px; }
.tutor-note.good { color: var(--good); background: color-mix(in srgb, var(--good) 11%, transparent); }
.tutor-note svg { flex: none; margin-top: 2px; }
.lesson-box { display: flex; gap: 8px; align-items: flex-end; }
.lesson-box textarea { flex: 1; background: var(--field); border: 1px solid var(--edge); border-radius: 14px; padding: 10px 14px; outline: none; resize: none; font-size: calc(14px * var(--scale)); line-height: 1.5; }
@media (max-width: 760px) { .teach-stage { grid-template-columns: 1fr; } .focus-stage { gap: 24px; } }

/* ---------- Saved and Daily clue (tools.js) ---------- */
.keep-btn { flex: none; display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; color: var(--muted); vertical-align: middle; }
.keep-btn:hover { background: var(--soft); color: var(--ink); }
.keep-btn.on { color: #E8A417; }
.keep-btn.on svg { fill: currentColor; }
.reply .by { display: flex; align-items: center; gap: 6px; }
.points li .keep-btn { margin: -4px -6px -4px auto; }
.kept-bar { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-top: 22px; }
.kept-bar .seg button { padding: 6px 12px; font-size: 13px; }
.kept-bar .search { display: flex; align-items: center; gap: 8px; background: var(--field); border: 1px solid var(--edge); border-radius: 12px; padding: 7px 12px; min-width: 220px; color: var(--quiet); }
.kept-bar .search input { flex: 1; background: none; border: 0; outline: 0; font-size: 13px; }
.kept-list { display: grid; gap: 10px; margin-top: 18px; }
.kept-item { background: var(--paper); border: 1px solid var(--line); border-radius: 16px; padding: 14px 18px 16px; }
.kept-item header { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--quiet); }
.kept-item header span { flex: 1; }
.kept-item .kind { font-style: normal; font-weight: 600; padding: 3px 9px; border-radius: 99px; background: var(--soft); color: var(--ink); }
.kept-item h3 { margin: 10px 0 0; font-size: 15px; font-weight: 600; line-height: 1.4; }
.kept-item .body { margin-top: 6px; font-size: calc(14px * var(--scale)); line-height: 1.6; color: var(--quiet); overflow-wrap: anywhere; }
.kept-item .body > :first-child { margin-top: 0; } .kept-item .body > :last-child { margin-bottom: 0; }
.kept-empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 40px 20px; }
.kept-empty .otter { --h: 130px; margin-bottom: 10px; }
.kept-empty span { color: var(--quiet); font-size: 14px; max-width: 380px; line-height: 1.5; }

.daily-no { color: var(--quiet); font-weight: 500; }
.daily-streak { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--quiet); }
.daily-streak b { color: var(--ink); font-size: 15px; }
.daily-streak svg { color: #F0623F; }
.daily-stage { display: flex; gap: 36px; align-items: flex-start; flex-wrap: wrap; margin-top: 24px; }
.daily-play { flex: 1; min-width: 300px; max-width: 620px; }
.blanks { font-size: 24px; font-weight: 600; letter-spacing: 2px; margin: 0 0 16px; font-family: ui-monospace, Menlo, monospace; overflow-wrap: anywhere; }
.ladder { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.ladder li { display: flex; align-items: center; gap: 12px; border: 1px dashed var(--edge); border-radius: 14px; padding: 12px 14px; color: var(--muted); font-size: 14px; }
.ladder li.open { border-style: solid; border-color: var(--line); background: var(--paper); color: var(--ink); }
.ladder li.now { border-color: var(--stone); }
.ladder em { flex: none; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--soft); font-style: normal; font-size: 12px; font-weight: 600; color: var(--quiet); }
.ladder li.open em { background: var(--grad); color: #fff; }
.ladder span { flex: 1; line-height: 1.45; }
.ladder small { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--quiet); }
.tries { display: flex; gap: 6px; flex-wrap: wrap; margin: 12px 0 0; }
.tries s { background: var(--soft); border-radius: 99px; padding: 3px 10px; font-size: 12px; color: var(--quiet); }
.daily-box { margin-top: 14px; }
.daily-end { display: flex; flex-direction: column; align-items: center; text-align: center; width: 260px; }
.daily-end .word { font-size: 26px; font-weight: 600; margin: 10px 0 0; text-transform: capitalize; }
.daily-end p { margin: 6px 0 0; font-size: 14px; color: var(--quiet); line-height: 1.45; }
.daily-end .word { color: var(--ink); }
.tool-otter.still .otter.sad { --h: 150px; }
.daily-card { display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; margin-top: 12px; background: var(--paper); border: 1px solid var(--line); border-radius: 16px; padding: 12px 18px; }
.daily-card:hover { border-color: var(--stone); }
.daily-card .badge { background: var(--grad); color: #fff; font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 99px; flex: none; }
.daily-card b { flex: 1; font-size: 14px; font-weight: 500; }
.daily-card .go { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; color: var(--quiet); }

/* ---------- For today and Friends (tools.js) ---------- */
.today-list { margin-top: 14px; background: var(--paper); border: 1px solid var(--line); border-radius: 18px; padding: 16px 18px 10px; }
.today-list header { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.today-list h2 { margin: 0; font-size: 17px; font-weight: 600; }
.today-list header span { color: var(--quiet); font-size: 13px; }
.today-list header em { margin-left: auto; font-style: normal; font-size: 12px; font-weight: 600; background: var(--soft); border-radius: 99px; padding: 3px 10px; }
.today-rows { display: grid; margin-top: 8px; }
.today-rows button { display: flex; align-items: center; gap: 12px; text-align: left; padding: 9px 4px; border-top: 1px solid var(--line); color: var(--ink); }
.today-rows button:first-child { border-top: 0; }
.today-rows button:hover b { text-decoration: underline; }
.today-rows i { flex: none; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--edge); color: #fff; }
.today-rows .done i { background: #1FA57D; border-color: #1FA57D; }
.today-rows i svg { width: 12px; height: 12px; }
.today-rows b { flex: 1; font-size: 14px; font-weight: 500; }
.today-rows .done b { color: var(--quiet); }
.today-rows small { color: var(--quiet); font-size: 12px; }
.today-rows > button > svg { color: var(--muted); }

.friend-top { display: flex; gap: 12px; flex-wrap: wrap; align-items: stretch; margin-top: 22px; }
.friend-code { display: flex; align-items: center; gap: 12px; background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 8px 10px 8px 16px; }
.friend-code small { color: var(--quiet); font-size: 12px; }
.friend-code b { font-size: 18px; letter-spacing: 1px; font-variant-numeric: tabular-nums; }
.friend-add { flex: 1; margin-top: 0; min-width: 280px; }
.friend-add input { text-transform: uppercase; letter-spacing: 1px; }
.friend-add input::placeholder { text-transform: none; letter-spacing: 0; }
.friend-list .set { display: flex; align-items: center; gap: 12px; }
.friend-list .set > .profile { flex: none; }
.friend-list .set > span:not(.profile) { flex: 1; min-width: 0; }
.friend-list small { color: var(--quiet); font-size: 12px; }
.friend-list .streak { display: inline-flex; align-items: center; gap: 4px; }
.friend-list .streak svg { color: #F0623F; width: 14px; height: 14px; }
@media (max-width: 760px) { .blanks { font-size: 15px; letter-spacing: 0; } }

/* ---------- Soft colour menu icons ---------- */
/* Each page has its own colour: a pale tile with the picture in the full colour. */
.side .nav-item > svg { --ic: var(--muted); padding: 5px; width: 27px; height: 27px; border-radius: 9px; background: color-mix(in srgb, var(--ic) 17%, transparent); color: var(--ic); }
.side .nav-item.on > svg { background: color-mix(in srgb, var(--ic) 26%, transparent); }
.side .nav-item.quiet > svg { padding: 0; width: 14px; height: 14px; background: none; color: var(--muted); }
.nav-item[data-act="home"] > svg { --ic: #12A594; }
.nav-item[data-act="chats"] > svg { --ic: #7C5CFF; }
.nav-item[data-act="planner"] > svg { --ic: #F0623F; }
.nav-item[data-act="bank"] > svg { --ic: #2F7BF0; }
.nav-item[data-act="sheets"] > svg { --ic: #0FA3B1; }
.nav-item[data-act="blurt"] > svg { --ic: #E5488A; }
.nav-item[data-act="teach"] > svg { --ic: #C2702E; }
.nav-item[data-act="focus"] > svg { --ic: #6B6FE8; }
.nav-item[data-act="daily"] > svg { --ic: #F08A1C; }
.nav-item[data-act="play"] > svg { --ic: #E5488A; }
.nav-item[data-act="board"] > svg { --ic: #D99A00; }
.nav-item[data-act="friends"] > svg { --ic: #1FA57D; }
.nav-item[data-act="notes"] > svg { --ic: #2F7BF0; }
.nav-item[data-act="papers"] > svg { --ic: #E8770C; }
.nav-item[data-act="saved"] > svg { --ic: #E0A417; }
.nav-item[data-act="uni"] > svg { --ic: #7C5CFF; }
.nav-item[data-act="settings"] > svg { --ic: #7B8794; }
.side h2 { text-transform: none; margin: 14px 10px 3px; }

/* ---------- Subject cards: a cover picture and progress ---------- */
.subject-card.covered { padding: 0; min-height: 0; gap: 0; color: var(--ink); background: var(--paper); border: 1px solid var(--line); box-shadow: none; align-items: stretch; }
.subject-card.covered:hover { transform: translateY(-3px); box-shadow: 0 12px 26px color-mix(in srgb, var(--c) 26%, transparent); border-color: color-mix(in srgb, var(--c) 50%, var(--line)); }
.subject-card.covered .cover { position: relative; display: block; height: 104px; background: linear-gradient(135deg, color-mix(in srgb, var(--c) 70%, #fff), var(--c)); overflow: hidden; }
.cover-art { position: absolute; right: 6px; bottom: -4px; height: 104%; width: auto; }
.subject-card.covered .cover em { position: absolute; left: 12px; top: 12px; margin: 0; color: #fff; }
.subject-card.covered .info { display: flex; flex-direction: column; gap: 7px; padding: 12px 14px 14px; }
.subject-card.covered b { font-size: 15px; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.subject-card.covered small { color: var(--quiet); font-size: 12px; }
.progress { display: block; height: 6px; border-radius: 99px; background: var(--soft); overflow: hidden; }
.progress i { display: block; height: 100%; border-radius: 99px; background: var(--c, var(--stone)); transition: width .5s cubic-bezier(.3, 1.3, .5, 1); }
.steps-row { display: flex; flex-wrap: wrap; gap: 8px; }
.steps-row span { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; background: var(--paper); border: 1px solid var(--line); border-radius: 99px; padding: 6px 12px 6px 8px; color: var(--quiet); }
.steps-row i { display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid var(--edge); color: #fff; }
.steps-row i svg { width: 11px; height: 11px; }
.steps-row .done { color: var(--ink); }
.steps-row .done i { background: #1FA57D; border-color: #1FA57D; }

/* ---------- Question bank ---------- */
.cover-picks { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 10px; margin-top: 20px; }
.cover-pick { position: relative; overflow: hidden; height: 112px; border-radius: 16px; text-align: left; color: #fff; background: linear-gradient(135deg, color-mix(in srgb, var(--c) 70%, #fff), var(--c)); border: 3px solid transparent; transition: transform .15s, box-shadow .15s; }
.cover-pick:hover { transform: translateY(-2px); }
.cover-pick.on { border-color: var(--ink); box-shadow: 0 8px 20px color-mix(in srgb, var(--c) 36%, transparent); }
.cover-pick .cover-art { right: -6px; bottom: 10px; height: 78%; opacity: .95; }
.cover-pick b { position: absolute; left: 11px; right: 8px; bottom: 9px; font-size: 13px; font-weight: 600; line-height: 1.2; text-shadow: 0 1px 6px rgba(0, 0, 0, .25); }
.bank-q { margin-top: 22px; background: var(--paper); border: 1px solid var(--line); border-radius: 20px; padding: 20px 22px; max-width: 760px; }
.q-head { display: flex; align-items: center; justify-content: space-between; }
.q-head .marks { font-size: 12px; font-weight: 600; background: var(--grad); color: #fff; border-radius: 99px; padding: 3px 11px; }
.q-text { font-size: calc(16px * var(--scale)); font-weight: 500; line-height: 1.55; margin: 12px 0 14px; }
.q-text > :first-child { margin-top: 0; } .q-text > :last-child { margin-bottom: 0; }
.bank-q textarea { display: block; width: 100%; background: var(--field); border: 1px solid var(--edge); border-radius: 14px; padding: 12px 14px; outline: none; resize: vertical; font-size: calc(14px * var(--scale)); line-height: 1.6; }
.bank-q textarea:focus, .essay-edit textarea:focus, .essay-edit input:focus { border-color: var(--stone); }
.tool-buttons.left { justify-content: flex-start; }
.q-marked { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 14px; }
.got-marks { font-size: 20px; color: var(--quiet); margin: 0 0 10px; }
.got-marks b { font-size: 34px; color: var(--ink); }
.ticks { list-style: none; padding: 0; margin: 0 0 10px; display: grid; gap: 6px; }
.ticks li { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; line-height: 1.45; }
.ticks svg { flex: none; width: 18px; height: 18px; padding: 3px; border-radius: 50%; color: #fff; margin-top: 2px; }
.ticks.good svg { background: #1FA57D; } .ticks.bad svg { background: var(--danger); } .ticks.warn svg { background: #E0A417; }
.q-marked .feedback { font-size: 14px; line-height: 1.55; color: var(--quiet); margin: 0 0 10px; }
.q-marked details { font-size: 13px; color: var(--quiet); }
.q-marked summary { cursor: pointer; font-weight: 500; color: var(--ink); }
.q-marked ol { margin: 8px 0 0; padding-left: 20px; display: grid; gap: 4px; }
.q-marked ol p { margin: 0; }

/* ---------- Cheatsheets ---------- */
.sheet-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.sheet-tile { text-align: left; background: var(--paper); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; display: flex; flex-direction: column; transition: transform .15s; }
.sheet-tile:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--c) 50%, var(--line)); }
.sheet-tile .cover { position: relative; display: block; height: 78px; background: linear-gradient(135deg, color-mix(in srgb, var(--c) 70%, #fff), var(--c)); overflow: hidden; }
.sheet-tile b { padding: 10px 14px 0; font-size: 14px; font-weight: 600; }
.sheet-tile small { padding: 3px 14px 12px; font-size: 12px; color: var(--quiet); }
.sheet { margin-top: 20px; background: var(--paper); border: 1px solid var(--line); border-radius: 20px; overflow: hidden; }
.sheet > header { position: relative; display: flex; align-items: center; min-height: 118px; padding: 20px 150px 20px 24px; color: #fff; background: linear-gradient(135deg, color-mix(in srgb, var(--c) 70%, #fff), var(--c)); overflow: hidden; }
.sheet > header .cover-art { right: 16px; bottom: -6px; height: 110%; }
.sheet > header small { font-size: 12px; font-weight: 600; opacity: .9; }
.sheet > header h2 { margin: 2px 0 4px; font-size: 26px; font-weight: 700; }
.sheet > header p { margin: 0; font-size: 14px; line-height: 1.45; opacity: .95; }
.sheet-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0; }
.sheet section { padding: 16px 24px; border-top: 1px solid var(--line); }
.sheet-grid section { border-right: 1px solid var(--line); }
.sheet h3 { margin: 0 0 8px; font-size: 13px; font-weight: 700; color: var(--c); }
.sheet ul { margin: 0; padding-left: 18px; display: grid; gap: 5px; font-size: calc(14px * var(--scale)); line-height: 1.5; }
.sheet li p, .sheet dd p, .sheet .remember p { margin: 0; display: inline; }
.sheet dl { margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 8px 24px; font-size: calc(14px * var(--scale)); }
.sheet dl div { display: flex; gap: 8px; line-height: 1.45; }
.sheet dt { font-weight: 600; flex: none; }
.sheet dd { margin: 0; color: var(--quiet); }
.sheet .mistakes h3 { color: var(--danger); }
.remember { margin: 0; padding: 14px 24px; border-top: 1px solid var(--line); font-size: 14px; line-height: 1.5; background: color-mix(in srgb, #E0A417 10%, transparent); }
.remember b { margin-right: 6px; }
@media print {
  #rail, #top, #list, .no-print, .toast, #layer { display: none !important; }
  body, #app, .stage, .work, .card, .page { display: block !important; overflow: visible !important; height: auto !important; background: #fff !important; }
  .sheet { border: 0; break-inside: avoid; }
  .sheet > header { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* ---------- University ---------- */
.uni-apps { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.uni-app { background: var(--paper); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
.uni-app header { display: flex; align-items: flex-start; justify-content: space-between; padding: 14px 10px 26px 16px; color: #fff; background: linear-gradient(135deg, color-mix(in srgb, var(--c) 70%, #fff), var(--c)); }
.uni-app header small { display: block; font-size: 12px; opacity: .9; }
.uni-app header b { font-size: 18px; font-weight: 700; }
.uni-app header .icon-btn { color: #fff; }
.uni-progress { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; margin: -14px 12px 0; padding: 10px 12px; background: var(--field); border: 1px solid var(--line); border-radius: 12px; font-size: 12px; color: var(--quiet); position: relative; }
.uni-progress b { color: var(--ink); font-size: 14px; }
.uni-progress .progress { flex: 0 0 100%; margin-top: 6px; }
.uni-app .deadline { display: flex; align-items: center; gap: 7px; margin: 10px 16px 4px; font-size: 13px; color: var(--quiet); }
.uni-app .deadline.soon { color: var(--danger); font-weight: 500; }
.uni-app ul { list-style: none; margin: 0; padding: 4px 8px 10px; }
.uni-app li button { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 7px 8px; border-radius: 9px; font-size: 13px; }
.uni-app li button:hover { background: var(--soft); }
.uni-app li i { flex: none; display: grid; place-items: center; width: 18px; height: 18px; border-radius: 6px; border: 1.5px solid var(--edge); color: #fff; }
.uni-app li i svg { width: 11px; height: 11px; }
.uni-app li .done i { background: var(--c); border-color: var(--c); }
.uni-app li .done span { color: var(--quiet); text-decoration: line-through; }
.uni-add { margin-top: 14px; }
.essay-list .set { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; }
.essay-list .set > span { flex: 1; min-width: 0; }
.essay-list small { color: var(--quiet); font-size: 12px; }
.essay-list strong { font-variant-numeric: tabular-nums; font-size: 13px; }
.over { color: var(--danger) !important; }
.essay-edit { margin-top: 20px; max-width: 800px; display: grid; gap: 10px; }
.essay-edit input, .essay-edit textarea { background: var(--field); border: 1px solid var(--edge); border-radius: 12px; padding: 10px 14px; outline: none; font-size: 14px; }
.essay-edit .essay-title { font-size: 20px; font-weight: 600; }
.essay-meta { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.essay-meta > input { flex: 1; min-width: 240px; }
.essay-meta label { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--quiet); }
.essay-meta label input { width: 90px; }
.essay-edit textarea { min-height: 340px; resize: vertical; font-size: calc(15px * var(--scale)); line-height: 1.75; padding: 18px 20px; border-radius: 18px; }
.essay-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.essay-foot > span:first-child { font-size: 13px; color: var(--quiet); font-variant-numeric: tabular-nums; }
.essay-notes { background: var(--paper); border: 1px solid var(--line); border-radius: 18px; padding: 16px 20px 0; overflow: hidden; }
.essay-notes .summary { margin: 0 0 12px; font-size: 15px; font-weight: 500; line-height: 1.5; }
.essay-notes h3 { margin: 12px 0 8px; font-size: 13px; font-weight: 700; color: var(--quiet); }
.essay-notes .remember { margin: 14px -20px 0; }
.cover-pick .cover-art { right: -2px; top: 6px; bottom: auto; height: 60%; }

/* ---------- Workspaces (spaces.js) ---------- */
.spaces { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; margin: 0 2px 8px; padding: 3px; border-radius: 12px; background: var(--soft); }
.spaces button { padding: 6px 2px; border-radius: 9px; font-size: 12px; font-weight: 600; color: var(--quiet); white-space: nowrap; transition: background-color .15s, color .15s, transform .15s; }
.spaces button:hover { color: var(--ink); }
.spaces button.on { background: var(--c); color: #fff; box-shadow: 0 3px 10px color-mix(in srgb, var(--c) 40%, transparent); }
.spaces button:active { transform: scale(.94); }
.side .nav-item[data-act="work"] > svg { --ic: #D0537A; }
.side .nav-item[data-act="uni"] > svg { --ic: #0FA3B1; }

/* Home's banner takes on the workspace's colour and picture */
.banner.space-home > * { position: relative; }
.banner.space-home > .space-wash { position: absolute; inset: 0; background: linear-gradient(120deg, color-mix(in srgb, var(--c) 46%, transparent), color-mix(in srgb, var(--c) 10%, transparent) 62%, transparent); pointer-events: none; }
.banner.space-home > .space-art { position: absolute; right: 250px; top: 50%; height: 150px; width: auto; transform: translateY(-50%) rotate(-6deg); opacity: .2; pointer-events: none; }
.banner.space-home > .scene { position: absolute; }
.banner.space-home > .banner-otter { position: absolute; }
.space-badge { display: inline-block; margin-bottom: 8px; font-size: 11px; font-weight: 700; color: #fff; background: var(--c); border-radius: 99px; padding: 3px 11px; box-shadow: 0 3px 10px color-mix(in srgb, var(--c) 40%, transparent); }
@media (max-width: 760px) { .banner.space-home > .space-art { display: none; } }

/* Getting started */
.start-card { margin-top: 14px; border-radius: 18px; padding: 14px 16px 16px; background: color-mix(in srgb, var(--c) 9%, var(--paper)); border: 1px solid color-mix(in srgb, var(--c) 34%, var(--line)); }
.start-card header { display: flex; align-items: center; gap: 12px; }
.start-card h2 { margin: 0; font-size: 16px; font-weight: 600; }
.start-card header > span:not(.progress) { font-size: 13px; color: var(--quiet); }
.start-card header .progress { flex: 1; max-width: 220px; }
.start-card header .icon-btn { margin-left: auto; }
.start-steps { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px; margin-top: 12px; }
.start-steps button { display: flex; align-items: center; gap: 10px; text-align: left; padding: 10px 12px; border-radius: 12px; background: var(--paper); border: 1px solid var(--line); font-size: 13px; font-weight: 500; }
.start-steps button:hover { border-color: var(--c); }
.start-steps i { flex: none; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--edge); color: #fff; }
.start-steps i svg { width: 12px; height: 12px; }
.start-steps .done { color: var(--quiet); }
.start-steps .done i { background: var(--c); border-color: var(--c); }
.start-chip { display: flex; align-items: center; gap: 10px; width: 100%; margin-bottom: 4px; padding: 8px 10px; border-radius: 10px; background: var(--soft); font-size: 13px; font-weight: 500; text-align: left; }
.start-chip:hover { background: var(--line); }
.start-chip i { flex: none; width: 18px; height: 18px; border-radius: 50%; background: conic-gradient(#1FA57D calc(var(--part) * 360deg), var(--edge) 0); -webkit-mask: radial-gradient(circle, transparent 5px, #000 6px); mask: radial-gradient(circle, transparent 5px, #000 6px); }
.start-chip span { flex: 1; }
.start-chip b { font-size: 12px; color: var(--quiet); }

/* Welcome tour */
.dialog.tour { max-width: 420px; padding: 0 0 20px; overflow: hidden; text-align: center; animation: tour-in .35s cubic-bezier(.3, 1.4, .5, 1) both; }
@keyframes tour-in { from { opacity: 0; transform: translateY(14px) scale(.96); } }
.tour-art { position: relative; height: 170px; background: linear-gradient(135deg, color-mix(in srgb, var(--c) 66%, #fff), var(--c)); }
.tour-art .cover-art { position: absolute; left: 50%; top: 50%; right: auto; bottom: auto; height: 78%; transform: translate(-50%, -50%); }
.tour-dots { display: flex; justify-content: center; gap: 6px; margin: 16px 0 4px; }
.tour-dots i { width: 7px; height: 7px; border-radius: 99px; background: var(--edge); transition: width .25s, background-color .25s; }
.tour-dots i.on { width: 22px; background: var(--c); }
.dialog.tour h2 { margin: 10px 24px 6px; font-size: 21px; font-weight: 700; }
.dialog.tour p { margin: 0 28px; font-size: 14px; line-height: 1.55; color: var(--quiet); min-height: 66px; }
.dialog.tour footer { display: flex; justify-content: center; gap: 8px; margin-top: 16px; }

/* A program's own pieces of work */
.work-list { margin-top: 20px; }
.draft-open { display: flex; align-items: center; gap: 8px; width: calc(100% - 24px); margin: 0 12px 12px; padding: 9px 12px; border-radius: 11px; background: var(--soft); font-size: 13px; font-weight: 500; text-align: left; }
.draft-open:hover { background: var(--line); }
.draft-open span { flex: 1; }
.essay-meta > input[data-work="title"] { font-size: 18px; font-weight: 600; }

/* ---------- Home: number tiles and the two-column row (all looks) ---------- */
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; margin-top: 14px; background: var(--paper); border: 1px solid var(--line); border-radius: 22px; overflow: hidden; }
.tile { display: flex; align-items: center; gap: 14px; padding: 16px 20px; text-align: left; min-width: 0; transition: background-color .15s; }
.tile + .tile { border-left: 1px solid var(--line); }
.tile:hover { background: color-mix(in srgb, var(--c) 9%, transparent); }
.tile i { flex: none; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 16px; color: #fff; background: linear-gradient(145deg, color-mix(in srgb, var(--c) 68%, #fff), var(--c)); box-shadow: 0 7px 16px color-mix(in srgb, var(--c) 38%, transparent), inset 0 2px 3px rgba(255, 255, 255, .5), inset 0 -3px 5px rgba(0, 0, 0, .1); }
.tile i svg { width: 22px; height: 22px; }
.tile span { min-width: 0; }
.tile b { display: block; font-size: 23px; font-weight: 800; line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile small { display: block; font-size: 12px; color: var(--quiet); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.home-row { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 14px; margin-top: 14px; align-items: start; }
.home-row > .today-list { margin-top: 0; }
.home-card { background: var(--paper); border: 1px solid var(--line); border-radius: 22px; padding: 16px 18px 18px; }
.home-card header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.home-card h2 { margin: 0; font-size: 17px; font-weight: 700; }
.home-card .subject-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.home-card .quiet-box { margin: 0; }
@media (max-width: 900px) { .home-row { grid-template-columns: 1fr; } .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } .tile:nth-child(3) { border-left: 0; } .tile:nth-child(n+3) { border-top: 1px solid var(--line); } }

/* ---------- River look: a painted scene with frosted glass over it ---------- */
:root[data-look="river"] { --glass-blur: blur(22px) saturate(1.35); --lift: 0 12px 34px rgba(36, 46, 96, .13), 0 2px 6px rgba(36, 46, 96, .07); }
:root[data-look="river"][data-theme="dark"] { --lift: 0 14px 36px rgba(0, 0, 0, .42), 0 2px 6px rgba(0, 0, 0, .28); }
:root[data-look="river"] body { background: var(--sand); }
:root[data-look="river"] body::before { content: ""; position: fixed; inset: 0; z-index: -1; background: url(/scene-day.jpg) center / cover no-repeat; }
:root[data-look="river"][data-theme="dark"] body::before { background-image: url(/scene-night.jpg); }
:root[data-look="river"] #app { background: none; }

/* The menu is one tall pane of glass */
:root[data-look="river"] .side { background: var(--paper); border-right: 1px solid var(--line); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); padding: 16px 12px 12px; }
:root[data-look="river"] .side .nav-item { border-radius: 12px; }
:root[data-look="river"] .side .nav-item.on { background: var(--field); box-shadow: var(--lift); }
:root[data-look="river"] .side .nav-item > svg { border-radius: 10px; box-shadow: inset 0 -2px 0 color-mix(in srgb, var(--ic) 20%, transparent); }
:root[data-look="river"] .spaces button.on { background: var(--grad); box-shadow: 0 5px 14px rgba(108, 92, 231, .42); }
:root[data-look="river"] .stage { padding: 0 14px 14px 14px; }

/* The top bar floats: each thing in it is its own glass pill */
:root[data-look="river"] .top-search, :root[data-look="river"] .countdown, :root[data-look="river"] .stats, :root[data-look="river"] .top .pill, :root[data-look="river"] .top > .icon-btn {
  background: var(--paper); border: 1px solid var(--line); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); box-shadow: var(--lift); }

/* Home is open to the scene; every other page is one big sheet of glass */
:root[data-look="river"] .card { background: none; box-shadow: none; border-radius: 26px; }
:root[data-look="river"] #app:not([data-view="home"]) .card { background: var(--paper); border: 1px solid var(--line); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); box-shadow: var(--lift); }
:root[data-look="river"] .work .list { background: var(--paper); border: 1px solid var(--line); border-radius: 26px; margin-right: 12px; -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); box-shadow: var(--lift); }

/* Home's greeting sits straight on the sky, with the otter standing in the scene */
:root[data-look="river"] .home .banner { background: none; min-height: 250px; padding: 28px 16px 26px; overflow: visible; align-items: center; }
:root[data-look="river"] .home .banner .scene, :root[data-look="river"] .home .banner .space-wash, :root[data-look="river"] .home .banner .space-art { display: none; }
:root[data-look="river"] .home .banner .hi { font-size: 20px; font-weight: 600; color: var(--ink); opacity: .86; margin: 12px 0 0; }
:root[data-look="river"] .home .banner h1 { font-size: 52px; line-height: 1.04; font-weight: 800; letter-spacing: -.02em; color: var(--ink); margin: 0; }
:root[data-look="river"] .home .banner .sub { font-size: 15px; font-weight: 500; color: var(--ink); opacity: .8; margin-top: 10px; }
:root[data-look="river"][data-theme="dark"] .home .banner h1, :root[data-look="river"][data-theme="dark"] .home .banner .hi, :root[data-look="river"][data-theme="dark"] .home .banner .sub { text-shadow: 0 2px 18px rgba(8, 10, 30, .55); }
:root[data-look="river"] .space-badge { background: var(--grad); box-shadow: 0 6px 16px rgba(108, 92, 231, .42); font-size: 12px; padding: 5px 13px; }
:root[data-look="river"] .home .banner-otter { width: 200px; height: auto; top: auto; right: 25%; bottom: -6px; filter: drop-shadow(0 16px 18px rgba(20, 30, 70, .3)) !important; }

/* Cards on Home are glass with a soft lift */
:root[data-look="river"] .tiles, :root[data-look="river"] .home-card, :root[data-look="river"] .today-list, :root[data-look="river"] .start-card, :root[data-look="river"] .home .quiet-box,
:root[data-look="river"] .home .uni-app, :root[data-look="river"] .home .week-strip, :root[data-look="river"] .home .start, :root[data-look="river"] .home .task {
  -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); box-shadow: var(--lift); }
:root[data-look="river"] .home .quiet-box, :root[data-look="river"] .home .start, :root[data-look="river"] .home .task { background: var(--paper); border-color: var(--line); }
:root[data-look="river"] .start-card { background: color-mix(in srgb, var(--c) 10%, var(--paper)); }
:root[data-look="river"] .subject-card.covered { background: var(--field); border-radius: 18px; }
:root[data-look="river"] .subject-card.covered .cover { height: 92px; }
:root[data-look="river"] .home .section-head h2 { background: var(--paper); border: 1px solid var(--line); border-radius: 99px; padding: 7px 14px; -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); box-shadow: var(--lift); }
:root[data-look="river"] .home .section-head .link { background: var(--paper); border: 1px solid var(--line); border-radius: 99px; padding: 6px 12px; -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); text-decoration: none; }

/* Pop-ups are glass too */
:root[data-look="river"] .dialog, :root[data-look="river"] .menu, :root[data-look="river"] .toast { -webkit-backdrop-filter: blur(30px) saturate(1.4); backdrop-filter: blur(30px) saturate(1.4); box-shadow: var(--lift); }
:root[data-look="river"] .dialog, :root[data-look="river"] .menu { background: color-mix(in srgb, var(--sand) 90%, transparent); }
:root[data-look="river"] .btn.primary, :root[data-look="river"] .send.ready { box-shadow: 0 6px 16px rgba(108, 92, 231, .36); }
:root[data-look="river"] .btn { border-radius: 13px; }
:root[data-look="river"] .planner-head h1 { font-size: 32px; font-weight: 800; letter-spacing: -.01em; }

/* ---------- The workspace button and its list ---------- */
.space-pill { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 9px 11px; border-radius: 16px; background: var(--field); border: 1px solid var(--line); margin: 0 0 10px; transition: transform .15s, border-color .15s; }
.space-pill:hover { border-color: color-mix(in srgb, var(--c) 60%, var(--line)); }
.space-pill:active { transform: scale(.98); }
.space-pill > i, .space-row > i { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 12px; background: linear-gradient(145deg, color-mix(in srgb, var(--c) 66%, #fff), var(--c)); box-shadow: 0 5px 12px color-mix(in srgb, var(--c) 42%, transparent), inset 0 2px 3px rgba(255, 255, 255, .45); }
.space-pill > i svg, .space-row > i svg { width: 24px; height: 20px; }
.space-pill span { flex: 1; min-width: 0; }
.space-pill small { display: block; font-size: 10px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.space-pill b { display: block; font-size: 14px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.space-pill > svg { flex: none; width: 15px; height: 15px; color: var(--muted); }
.menu.space-menu { min-width: 236px; padding: 6px; border-radius: 18px; }
.menu-title { margin: 6px 10px 6px; font-size: 11px; font-weight: 600; color: var(--muted); }
.menu .space-row { gap: 11px; padding: 6px 8px; border-radius: 12px; font-size: 14px; font-weight: 500; }
.menu .space-row > i { width: 30px; height: 30px; border-radius: 10px; }
.menu .space-row > i svg { width: 20px; height: 16px; }
.menu .space-row span { flex: 1; }
.menu .space-row > svg { color: var(--stone); }
.menu hr { border: 0; border-top: 1px solid var(--line); margin: 6px 4px; }

/* River look: the menu is a floating rounded panel like everything else */
:root[data-look="river"] .side { margin: 12px 0 12px 12px; width: 240px; border: 1px solid var(--line); border-radius: 26px; background: color-mix(in srgb, var(--sand) 58%, transparent); box-shadow: var(--lift); padding: 16px 12px 12px; }
:root[data-look="river"] .space-pill { box-shadow: var(--lift); }
:root[data-look="river"] .side .nav-item { padding: 8px 9px; font-size: 14px; }
:root[data-look="river"] .side .nav-item.on { background: var(--grad); color: #fff; box-shadow: 0 6px 16px rgba(108, 92, 231, .4); }
:root[data-look="river"] .side .nav-item.on > svg { background: rgba(255, 255, 255, .22); color: #fff; box-shadow: none; }
:root[data-look="river"] .side .nav-item.small.on { background: var(--field); color: var(--ink); box-shadow: none; }
:root[data-look="river"] .side h2 { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; margin: 16px 10px 5px; }
:root[data-look="river"] .start-chip { background: var(--field); border: 1px solid var(--line); border-radius: 14px; }

/* ---------- The Applications tour: a full page over the scene ---------- */
#app.touring .side { pointer-events: none; }
#app.touring .side > *:not(.brand) { opacity: .4; }
#app.touring .top { visibility: hidden; }
:root[data-look="river"] #app.touring .card { background: none; border: 0; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
.tourpage { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; padding-top: 6px; padding-bottom: 20px; }
.tp-dots { display: flex; gap: 7px; }
.tp-dots i { width: 7px; height: 7px; border-radius: 99px; background: color-mix(in srgb, var(--ink) 26%, transparent); transition: width .3s, background-color .3s; }
.tp-dots i.on { width: 26px; background: var(--stone); }
.tourpage h1 { margin: 22px 0 0; font-size: 38px; line-height: 1.12; font-weight: 800; letter-spacing: -.02em; max-width: 760px; text-wrap: balance; animation: tp-in .4s cubic-bezier(.3, 1.2, .5, 1) both; }
.tp-actions { margin-top: 18px; }
.tp-actions .btn svg { width: 16px; height: 16px; vertical-align: -3px; }
.tp-card { width: 100%; max-width: 880px; margin-top: 26px; padding: 22px 24px; text-align: left; pointer-events: none; background: var(--paper); border: 1px solid var(--line); border-radius: 26px; -webkit-backdrop-filter: blur(24px) saturate(1.35); backdrop-filter: blur(24px) saturate(1.35); box-shadow: 0 24px 60px rgba(30, 40, 90, .22); animation: tp-in .5s cubic-bezier(.3, 1.2, .5, 1) .08s both; }
@keyframes tp-in { from { opacity: 0; transform: translateY(18px); } }
.tp-card .section-head { margin-top: 0; }
.tp-trio { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 14px; }
.tp-app { display: flex; flex-direction: column; gap: 8px; padding: 18px; min-height: 132px; border-radius: 18px; color: #fff; background: linear-gradient(135deg, color-mix(in srgb, var(--c) 66%, #fff), var(--c)); box-shadow: 0 10px 22px color-mix(in srgb, var(--c) 34%, transparent); }
.tp-app b { font-size: 19px; font-weight: 700; margin-bottom: auto; }
.tp-app span { display: flex; justify-content: space-between; font-size: 13px; }
.tp-app em { font-style: normal; font-weight: 700; }
.tp-app .progress { background: rgba(255, 255, 255, .35); }
.tp-app .progress i { background: #fff; }
.tp-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.tp-card .essay-edit { margin: 0; max-width: none; }
.tp-card .essay-edit textarea { min-height: 150px; }
.tp-card .essay-notes { border: 0; padding: 0; background: none; }
.tp-plan { display: grid; gap: 8px; }
.tp-plan div { display: flex; align-items: center; gap: 14px; padding: 12px 16px; border-radius: 14px; background: var(--field); border: 1px solid var(--line); border-left: 5px solid var(--c); }
.tp-plan em { font-style: normal; font-weight: 700; width: 64px; flex: none; }
.tp-plan b { flex: 1; font-weight: 500; }
.tp-plan small { color: var(--quiet); }
.tp-otter { position: absolute; right: 2%; bottom: -8px; width: 150px; filter: drop-shadow(0 14px 16px rgba(20, 30, 70, .3)); pointer-events: none; }
.tp-skip { margin-top: 18px; font-size: 13px; color: var(--quiet); text-decoration: underline; }
.tourpage.setup h1 { margin-top: 26px; }
.tp-bar { width: 220px; height: 6px; border-radius: 99px; background: color-mix(in srgb, var(--ink) 16%, transparent); overflow: hidden; }
.tp-bar i { display: block; height: 100%; border-radius: 99px; background: var(--grad); }
.tp-sub { margin: 10px 0 0; color: var(--quiet); font-size: 15px; max-width: 520px; }
.tp-places { display: grid; gap: 10px; width: 100%; max-width: 560px; margin-top: 24px; }
.tp-places button { display: flex; align-items: center; gap: 14px; text-align: left; padding: 15px 18px; border-radius: 18px; background: var(--paper); border: 2px solid var(--line); -webkit-backdrop-filter: blur(22px); backdrop-filter: blur(22px); transition: border-color .15s, transform .15s; }
.tp-places button:hover { transform: translateY(-1px); }
.tp-places button.on { border-color: var(--stone); }
.tp-places span { flex: 1; }
.tp-places b { display: block; font-size: 15px; font-weight: 600; }
.tp-places small { color: var(--quiet); font-size: 13px; }
.tp-places i { flex: none; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 8px; border: 2px solid var(--edge); color: #fff; }
.tp-places .on i { background: var(--stone); border-color: var(--stone); }
.tp-places i svg { width: 14px; height: 14px; }
@media (max-width: 760px) { .tourpage h1 { font-size: 26px; } .tp-trio, .tp-two { grid-template-columns: 1fr; } .tp-otter { display: none; } }
.tp-actions .btn { display: inline-flex; align-items: center; gap: 6px; }

/* ---------- Home in a narrower window (the Mac app opens at about 700 wide) ---------- */
@container (max-width: 860px) {
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tile:nth-child(3) { border-left: 0; }
  .tile:nth-child(n+3) { border-top: 1px solid var(--line); }
  .home-row { grid-template-columns: 1fr; }
  :root[data-look="river"] .home .banner { min-height: 200px; padding: 18px 8px 18px; }
  :root[data-look="river"] .home .banner > div:first-of-type { max-width: 62%; }
  :root[data-look="river"] .home .banner h1 { font-size: 38px; overflow-wrap: anywhere; }
  :root[data-look="river"] .home .banner .hi { font-size: 17px; }
  :root[data-look="river"] .home .banner-otter { width: 150px; right: 2%; }
}
@container (max-width: 560px) {
  :root[data-look="river"] .home .banner > div:first-of-type { max-width: none; }
  :root[data-look="river"] .home .banner-otter { display: none; }
  :root[data-look="river"] .home .banner h1 { font-size: 32px; }
}

/* ---------- Practice: the subject page, pebble stacks, review and exams (practice.js) ---------- */
.sp-head { display: flex; align-items: center; gap: 16px; }
.sp-head .cover { position: relative; flex: none; width: 66px; height: 66px; border-radius: 22px; overflow: hidden; background: linear-gradient(145deg, color-mix(in srgb, var(--c) 62%, #fff), var(--c)); box-shadow: 0 10px 22px color-mix(in srgb, var(--c) 40%, transparent), inset 0 2px 3px rgba(255, 255, 255, .5); }
.sp-head .cover .cover-art { right: 6px; bottom: 4px; height: 80%; }
.sp-head > div { flex: 1; min-width: 0; }
.sp-head h1 { margin: 0; font-size: 32px; font-weight: 800; letter-spacing: -.01em; line-height: 1.1; }
.sp-head h1 em { font-style: normal; font-size: 13px; font-weight: 700; vertical-align: middle; background: var(--soft); border-radius: 99px; padding: 3px 10px; margin-left: 6px; }
.sp-head p { margin: 3px 0 0; color: var(--quiet); font-size: 14px; }
.sp-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 16px 0 16px; }
.sp-tabs button { padding: 8px 15px; border-radius: 99px; font-weight: 600; font-size: 13px; color: var(--quiet); background: var(--soft); }
.sp-tabs button.on { background: var(--ink); color: var(--sand); }
.sp-top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
@container (max-width: 760px) { .sp-top { grid-template-columns: 1fr; } }

/* One clear next step, with what comes after it */
.deck { display: grid; gap: 8px; }
.next-card { position: relative; display: flex; flex-direction: column; align-items: flex-start; min-height: 232px; padding: 24px; border-radius: 26px; color: #fff; background: var(--grad); box-shadow: 0 22px 46px rgba(108, 92, 231, .38); overflow: hidden; }
.next-card::before { content: ""; position: absolute; right: -60px; top: -70px; width: 220px; height: 220px; border-radius: 50%; background: rgba(255, 255, 255, .13); }
.next-card > * { position: relative; }
.next-card small { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; opacity: .85; }
.next-card h2 { margin: 10px 0 8px; font-size: 28px; line-height: 1.12; font-weight: 800; letter-spacing: -.01em; }
.next-card p { margin: 0 0 18px; font-size: 15px; line-height: 1.45; opacity: .93; max-width: 420px; }
.next-card .go { margin-top: auto; padding: 12px 24px; border-radius: 15px; background: #fff; color: #2A2470; font-weight: 800; font-size: 15px; transition: transform .15s; }
.next-card .go:hover { transform: translateY(-2px); }
.next-card .checking { margin-top: auto; color: #fff; }
.next-card .mini { position: absolute; right: 22px; bottom: 22px; display: flex; gap: 4px; align-items: flex-end; }
.next-card .mini i { width: 32px; height: 21px; border-radius: 50%; background: rgba(255, 255, 255, .3); box-shadow: inset 3px 3px 5px rgba(255, 255, 255, .4); }
.next-card .mini i:nth-child(2) { width: 25px; height: 17px; } .next-card .mini i:nth-child(3) { width: 18px; height: 12px; }
.then { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 16px; background: var(--paper); border: 1px solid var(--line); font-weight: 600; font-size: 14px; text-align: left; }
.then:hover { border-color: var(--stone); }
.then em { flex: none; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--soft); font-style: normal; font-size: 12px; }
.then span { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.then small { color: var(--quiet); font-weight: 500; }

/* The chosen topic, or the whole subject as a map of tiles */
.topic-panel header { align-items: flex-start; }
.topic-panel header small { color: var(--quiet); font-size: 12px; }
.topic-panel header div small { display: block; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.topic-panel h2 { font-size: 19px; }
.topic-panel.empty { display: flex; align-items: center; gap: 16px; min-height: 232px; }
.topic-panel.empty .otter { --h: 110px; }
.topic-panel.empty p b, .topic-panel.empty p span { display: block; }
.topic-panel.empty p span { color: var(--quiet); font-size: 13px; margin-top: 4px; }
.topic-score { display: flex; align-items: center; gap: 14px; margin-bottom: 8px; }
.topic-score .ring { width: 78px; }
.topic-score .ring-text b { font-size: 18px; }
.topic-score p { margin: 0; font-size: 13px; color: var(--quiet); line-height: 1.45; }
.act { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 10px 12px; border-radius: 13px; background: var(--soft); font-weight: 600; font-size: 13px; margin-top: 7px; transition: transform .12s; }
.act:hover { transform: translateX(3px); }
.act[disabled] { opacity: .6; }
.act i { flex: none; width: 24px; height: 24px; border-radius: 8px; background: var(--c); box-shadow: 0 4px 9px color-mix(in srgb, var(--c) 40%, transparent); }
.act small { margin-left: auto; font-weight: 500; color: var(--quiet); }
.map-row { display: flex; align-items: center; gap: 12px; margin-top: 10px; }
.map-row b { flex: none; width: 128px; font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.map-row span { display: flex; gap: 5px; flex-wrap: wrap; }
.map-row button, .map-key span { width: 22px; height: 22px; border-radius: 7px; background: var(--soft); }
.map-row button:hover { outline: 2px solid var(--stone); outline-offset: 1px; }
.map-row .solid, .map-key .solid { background: #17B3A0; box-shadow: 0 3px 8px rgba(23, 179, 160, .4); }
.map-row .shaky, .map-key .shaky { background: #F5B83D; box-shadow: 0 3px 8px rgba(245, 184, 61, .4); }
.map-row .slipping, .map-key .slipping { background: #FF7A59; box-shadow: 0 3px 8px rgba(255, 122, 89, .4); }
.map-key { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; margin: 14px 0 0; font-size: 12px; color: var(--quiet); }
.map-key span { display: inline-block; width: 12px; height: 12px; border-radius: 4px; margin-left: 10px; box-shadow: none !important; }
.map-key span:first-child { margin-left: 0; }
.map-nums { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; }
.map-nums > * { padding: 12px; border-radius: 14px; background: var(--soft); text-align: left; }
.map-nums b { display: block; font-size: 22px; font-weight: 800; white-space: nowrap; }
.map-nums span { font-size: 12px; color: var(--quiet); }
.map-nums button:hover { outline: 2px solid var(--stone); }

/* The riverbank where the stacks stand */
.bank { position: relative; margin-top: 16px; padding: 18px 18px 0; border-radius: 26px; border: 1px solid var(--line); background: var(--paper); overflow: hidden; }
.bank::after { content: ""; position: absolute; left: -4%; right: -4%; bottom: 0; height: 92px; border-radius: 50% 50% 0 0 / 60% 60% 0 0; background: linear-gradient(180deg, color-mix(in srgb, #17B3A0 26%, transparent), color-mix(in srgb, #3BA4F5 20%, transparent)); }
.bank-note { position: relative; z-index: 1; display: flex; align-items: center; gap: 12px; }
.bank-note .otter { --h: 76px; }
.bank-note p { margin: 0; padding: 10px 16px; border-radius: 16px; background: var(--field); border: 1px solid var(--line); font-size: 14px; }
.bank-note p b, .bank-note p span { display: block; }
.bank-note p span { color: var(--quiet); font-size: 13px; }
.stacks { position: relative; z-index: 1; display: flex; align-items: flex-end; justify-content: space-around; gap: 10px; padding: 14px 0 20px; flex-wrap: wrap; }
.stacks .stack { display: flex; flex-direction: column; align-items: center; min-width: 130px; }
.stacks .stack .pile { display: flex; flex-direction: column-reverse; align-items: center; gap: 4px; min-height: 120px; justify-content: flex-start; }
.stacks .stack p { margin: 12px 0 0; text-align: center; }
.stacks .stack p b { display: block; font-size: 13px; font-weight: 700; }
.stacks .stack p small { color: var(--quiet); font-size: 12px; }
.peb { width: var(--w); height: 32px; border-radius: 50%; transform: rotate(var(--r)); transition: transform .18s cubic-bezier(.3, 1.6, .5, 1), box-shadow .18s;
  background: linear-gradient(145deg, color-mix(in srgb, var(--c) 58%, #fff), var(--c)); box-shadow: 0 6px 12px color-mix(in srgb, var(--c) 34%, transparent), inset -5px -7px 10px rgba(0, 0, 0, .15), inset 5px 5px 8px rgba(255, 255, 255, .5); }
.peb:hover { transform: rotate(var(--r)) scale(1.08) translateY(-2px); }
.peb.shaky, .peb.slipping { background: linear-gradient(90deg, var(--c) 0 var(--p), color-mix(in srgb, var(--c) 24%, var(--field)) var(--p)); }
.peb.new { background: color-mix(in srgb, var(--ink) 6%, transparent); box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--ink) 16%, transparent); }
.peb.pick { outline: 3px solid var(--stone); outline-offset: 4px; }

/* Loose pebbles */
.loose { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 16px; padding: 14px 18px; border-radius: 22px; background: var(--paper); border: 1px solid var(--line); }
.loose > b { font-size: 16px; }
.loose > span { color: var(--quiet); font-size: 13px; }
.loose .pile { display: flex; gap: 5px; align-items: flex-end; flex: 1; min-width: 120px; }
.loose .pile i { width: 34px; height: 22px; border-radius: 50%; transform: rotate(var(--r)); background: linear-gradient(145deg, color-mix(in srgb, var(--c) 58%, #fff), var(--c)); box-shadow: inset -4px -5px 7px rgba(0, 0, 0, .15), inset 4px 4px 6px rgba(255, 255, 255, .5); }
.loose.calm > span { flex: 1; }

/* Mistakes, decks, review and the exam */
.points.mistakes { margin-top: 14px; }
.points.mistakes li .icon-btn { margin: -4px -6px -4px auto; }
.past.decks { margin-top: 4px; }
.review-bar { margin-top: 16px; --c: var(--stone); }
.review-card .card-back { margin: 4px 0 6px; padding: 14px 16px; border-radius: 14px; background: color-mix(in srgb, #17B3A0 12%, transparent); font-size: calc(15px * var(--scale)); line-height: 1.55; }
.review-card .card-back > :first-child { margin-top: 0; } .review-card .card-back > :last-child { margin-bottom: 0; }
.review-end { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; margin-top: 30px; }
.review-end p { margin: 8px 0 0; font-size: 24px; font-weight: 800; }
.review-end > span { color: var(--quiet); margin-bottom: 12px; }
.exam-q { margin-top: 14px; }
.exam-q .q-head small { color: var(--quiet); font-size: 12px; }
.exam-clock { font-variant-numeric: tabular-nums; font-size: 18px; font-weight: 800; padding: 8px 16px; border-radius: 99px; background: var(--field); border: 1px solid var(--line); }
.exam-clock.over { color: var(--danger); }
.quiet-note { color: var(--quiet); font-size: 13px; }
.side .nav-item[data-act="exam"] > svg { --ic: #D8442F; }
:root[data-look="river"] .then, :root[data-look="river"] .bank, :root[data-look="river"] .loose { box-shadow: none; }

/* ---------- The otter's den (pet.js) ---------- */
.den-grid { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 16px; align-items: stretch; }
.den { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 22px 20px 20px; border-radius: 26px; border: 1px solid var(--line); background: linear-gradient(180deg, color-mix(in srgb, #3BA4F5 16%, var(--paper)), var(--paper) 60%); }
.den-bubble { position: relative; margin: 0; padding: 11px 16px; border-radius: 18px; background: var(--field); border: 1px solid var(--line); font-weight: 600; font-size: 14px; line-height: 1.4; max-width: 260px; }
.den-bubble::after { content: ""; position: absolute; left: 50%; bottom: -7px; width: 12px; height: 12px; background: var(--field); border: solid var(--line); border-width: 0 1px 1px 0; transform: translateX(-50%) rotate(45deg); }
.den-otter { width: 190px; margin: 16px 0 4px; filter: drop-shadow(0 16px 16px rgba(20, 30, 70, .28)); }
.den-otter.sprite { position: relative; }
.den-otter.still { display: grid; place-items: center; height: 210px; }
.den-otter.still .otter { --h: 180px; }
.den-name { display: inline-flex; align-items: center; gap: 8px; font-size: 28px; font-weight: 800; border-radius: 12px; padding: 0 8px; }
.den-name svg { width: 15px; height: 15px; color: var(--muted); opacity: 0; transition: opacity .15s; }
.den-name:hover svg { opacity: 1; }
.den-tag { margin: 0; color: var(--quiet); font-size: 13px; }
.den-meters { width: 100%; display: grid; gap: 11px; margin: 18px 0 18px; text-align: left; }
.den-meter b { display: flex; justify-content: space-between; align-items: baseline; font-size: 13px; }
.den-meter b span { color: var(--quiet); font-weight: 500; font-size: 12px; }
.den-meter u { display: block; height: 9px; border-radius: 99px; background: var(--soft); margin-top: 5px; overflow: hidden; }
.den-meter u i { display: block; height: 100%; border-radius: 99px; background: var(--c); box-shadow: 0 2px 6px color-mix(in srgb, var(--c) 45%, transparent); transition: width .8s cubic-bezier(.3, 1.3, .5, 1); }
.den-feed { margin-top: auto; width: 100%; }
.den-right { display: grid; gap: 16px; align-content: start; min-width: 0; }
.den-row { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 16px; }
.den-right .home-card header small { color: var(--quiet); font-size: 12px; }
.river { display: flex; align-items: flex-end; gap: 8px; height: 104px; }
.river > div { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 7px; height: 100%; font-size: 11px; color: var(--quiet); }
.river .peb { max-width: 50px; cursor: default; }
.river .peb:hover { transform: rotate(var(--r)); }
.river .today span { color: var(--ink); font-weight: 700; }
.den-note { margin: 12px 0 0; color: var(--quiet); font-size: 13px; }
.den-race { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.den-race li { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 12px; font-size: 14px; font-weight: 500; }
.den-race li.me { background: color-mix(in srgb, var(--stone) 15%, transparent); font-weight: 700; }
.den-race em { font-style: normal; width: 16px; color: var(--quiet); font-size: 12px; }
.den-race i { width: 24px; height: 17px; border-radius: 50%; transform: rotate(-10deg); background: linear-gradient(145deg, color-mix(in srgb, var(--c) 56%, #fff), var(--c)); box-shadow: inset -3px -4px 6px rgba(0, 0, 0, .15), inset 3px 3px 5px rgba(255, 255, 255, .5); }
.den-race span { margin-left: auto; font-variant-numeric: tabular-nums; }
.den-shelf { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 16px 8px; }
.den-shelf > div { text-align: center; }
.den-shelf .peb { display: block; margin: 0 auto 7px; cursor: default; }
.den-shelf .peb:hover { transform: rotate(var(--r)); }
.den-shelf b { display: block; font-size: 12px; font-weight: 700; }
.den-shelf span { display: block; font-size: 11px; color: var(--quiet); line-height: 1.3; }
.den-shelf > div:not(.got) b { color: var(--muted); }
.side .nav-item[data-act="otter"] > svg { --ic: #C2702E; }
@container (max-width: 820px) { .den-grid { grid-template-columns: 1fr; } .den-row { grid-template-columns: 1fr; } }
.den-right .home-card header { flex-direction: column; align-items: flex-start; gap: 0; }
.den-right .home-card:last-child header { flex-direction: row; align-items: center; }

/* ---------- The subjects window: steps, picture tiles and the otter's summary ---------- */
.dialog.wide.pick-win { max-width: 1120px; width: 100%; height: min(700px, 92dvh); max-height: none; padding: 0; flex-direction: row; overflow: hidden; border-radius: 30px; }
.pick-rail { width: 216px; flex: none; display: flex; flex-direction: column; gap: 5px; padding: 24px 14px; border-right: 1px solid var(--line); background: color-mix(in srgb, var(--stone) 7%, transparent); }
.pick-rail > b { font-size: 19px; font-weight: 800; padding: 0 10px 12px; }
.pick-rail button { display: flex; align-items: center; gap: 12px; text-align: left; padding: 10px; border-radius: 14px; font-weight: 600; font-size: 14px; color: var(--quiet); }
.pick-rail button:hover { background: var(--soft); }
.pick-rail em { flex: none; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--soft); font-style: normal; font-size: 12px; font-weight: 800; }
.pick-rail em svg { width: 13px; height: 13px; }
.pick-rail span { min-width: 0; }
.pick-rail small { display: block; font-weight: 500; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pick-rail .done em { background: #17B3A0; color: #fff; }
.pick-rail .on { background: var(--field); color: var(--ink); box-shadow: 0 6px 16px rgba(30, 40, 90, .12); }
.pick-rail .on em { background: var(--grad); color: #fff; }
.pick-mid { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.pick-win .pick-scroll { flex: 1; margin: 0; padding: 24px 26px 18px; overflow-y: auto; }
.pick-win h1 { margin: 0; font-size: 30px; font-weight: 800; letter-spacing: -.01em; line-height: 1.15; }
.pick-sub { margin: 6px 0 16px; color: var(--quiet); font-size: 15px; line-height: 1.45; }
.pick-win .pick-scroll h3 { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--quiet); margin: 18px 0 9px; }
.pick-mid > footer { display: flex; align-items: center; gap: 10px; padding: 14px 24px; border-top: 1px solid var(--line); }
.pick-mid > footer span { margin: 0 auto; color: var(--quiet); font-size: 13px; }
.pick-tools { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 4px; }
.pick-tools .search { display: flex; align-items: center; gap: 8px; width: 220px; margin: 0; padding: 9px 13px; border-radius: 14px; background: var(--field); border: 1px solid var(--line); color: var(--quiet); }
.pick-win .pick-tools .search input { flex: 1; min-width: 0; background: none; border: 0; padding: 0; border-radius: 0; font-size: 14px; }
.pick-pills { display: flex; gap: 6px; flex-wrap: wrap; flex: 1; }
.pick-pills button { padding: 7px 13px; border-radius: 99px; background: var(--soft); font-weight: 600; font-size: 13px; color: var(--quiet); }
.pick-pills button.on { background: var(--ink); color: var(--sand); }
.pick-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: 10px; }
.pick-tile, .pick-program { position: relative; height: 98px; border-radius: 18px; overflow: hidden; text-align: left; color: #fff; border: 3px solid transparent; background: linear-gradient(135deg, color-mix(in srgb, var(--c) 62%, #fff), var(--c)); filter: saturate(.6); opacity: .84; transition: transform .15s, filter .15s, opacity .15s, box-shadow .15s; }
.pick-tile:hover, .pick-program:hover { transform: translateY(-2px); filter: none; opacity: 1; }
.pick-tile .cover-art, .pick-program svg { position: absolute; right: -2px; top: 5px; bottom: auto; height: 60%; width: auto; }
.pick-tile b, .pick-program b { position: absolute; left: 10px; right: 8px; bottom: 8px; font-size: 13px; font-weight: 700; line-height: 1.15; text-shadow: 0 1px 6px rgba(0, 0, 0, .28); }
.pick-tile.on, .pick-program.on { filter: none; opacity: 1; border-color: var(--ink); box-shadow: 0 10px 22px color-mix(in srgb, var(--c) 40%, transparent); }
.pick-tile.on::after, .pick-program.on::after { content: "✓"; position: absolute; left: 8px; top: 8px; width: 22px; height: 22px; border-radius: 50%; background: #fff; color: #1A2238; display: grid; place-items: center; font-size: 13px; font-weight: 800; }
.pick-programs { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.pick-program { height: 128px; }
.pick-program b { font-size: 17px; left: 14px; bottom: 12px; }
.pick-own { margin-top: 16px; }
.pick-win .pick-own input { width: 100%; max-width: 420px; padding: 10px 14px; border-radius: 14px; border-style: dashed; }
.pick-win .pick-date { padding: 12px 16px; border-radius: 14px; font-size: 16px; }
.pick-win .level-row { padding: 6px 0; font-size: 14px; }
.pick-side { width: 250px; flex: none; display: flex; flex-direction: column; align-items: center; text-align: center; padding: 22px 18px; border-left: 1px solid var(--line); background: color-mix(in srgb, #3BA4F5 8%, transparent); overflow-y: auto; }
.pick-say { position: relative; margin: 0; padding: 10px 14px; border-radius: 16px; background: var(--field); border: 1px solid var(--line); font-weight: 600; font-size: 13px; }
.pick-side img { height: 128px; margin: 12px 0 6px; filter: drop-shadow(0 12px 12px rgba(20, 30, 70, .28)); }
.pick-side > b { font-size: 18px; font-weight: 800; }
.pick-side > small { color: var(--quiet); font-size: 13px; }
.pick-side ul { list-style: none; padding: 0; margin: 14px 0 12px; width: 100%; display: grid; gap: 6px; }
.pick-side li button { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 8px 10px; border-radius: 12px; background: var(--field); border: 1px solid var(--line); font-weight: 600; font-size: 13px; }
.pick-side li button:hover { border-color: var(--danger); }
.pick-side li i { flex: none; width: 20px; height: 15px; border-radius: 50%; transform: rotate(-10deg); box-shadow: inset -3px -4px 5px rgba(0, 0, 0, .15), inset 3px 3px 4px rgba(255, 255, 255, .5); }
.pick-side li span { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pick-side li small { color: var(--quiet); font-weight: 500; }
.pick-side li.more { padding: 8px 10px; border-radius: 12px; border: 1px dashed var(--edge); color: var(--quiet); font-size: 13px; text-align: left; }
.pick-when { margin: auto 0 0; width: 100%; padding: 10px 12px; border-radius: 12px; background: var(--soft); font-size: 13px; color: var(--quiet); }
.pick-when b { color: var(--ink); }
/* A narrower window: the otter panel folds away and the steps run across the top */
@media (max-width: 1000px) {
  .pick-side { display: none; }
}
@media (max-width: 780px) {
  .dialog.wide.pick-win { flex-direction: column; height: min(760px, 94dvh); }
  .pick-rail { width: auto; flex-direction: row; gap: 4px; padding: 12px; border-right: 0; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
  .pick-rail > b { display: none; }
  .pick-rail button { flex: none; padding: 7px 10px; }
  .pick-rail small { display: none; }
  .pick-win h1 { font-size: 24px; }
  .pick-mid > footer span { display: none; }
}

/* Subjects window: room under the heading, the search on its own line, and level choices on each chosen tile */
.pick-sub { margin-bottom: 20px; }
.pick-tools { display: grid; gap: 12px; margin-bottom: 6px; align-items: start; }
.pick-tools .search { width: min(100%, 340px); }
div.pick-tile { padding: 0; }
.pick-tile .hit { position: absolute; inset: 0; width: 100%; text-align: left; color: inherit; border-radius: inherit; }
.pick-tile.leveled { height: 118px; }
.pick-tile.leveled .hit b { bottom: 40px; }
.tile-levels { position: absolute; left: 7px; right: 7px; bottom: 7px; display: flex; gap: 3px; padding: 3px; border-radius: 11px; background: rgba(255, 255, 255, .26); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.tile-levels button { flex: 1; padding: 4px 2px; border-radius: 8px; font-size: 12px; font-weight: 700; color: #fff; white-space: nowrap; }
.tile-levels button:hover { background: rgba(255, 255, 255, .22); }
.tile-levels button.on { background: #fff; color: #1A2238; box-shadow: 0 2px 6px rgba(0, 0, 0, .2); }
.pick-tiles { align-items: start; }
.pick-win .pick-sub { margin: 8px 0 24px; }
.pick-win .pick-tools { margin-bottom: 10px; }

/* Subjects window: when a program is full, the tiles you can't add fade back, and the otter says why */
.pick-tile.full { filter: saturate(.15); opacity: .45; }
.pick-tile.full:hover { transform: none; filter: saturate(.15); opacity: .55; }
.pick-say.warn { border-color: var(--danger); color: var(--danger); animation: pick-shake .32s; }
@keyframes pick-shake { 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }

/* Application and coursework cards: stepping stones across a river instead of a percentage */
.uni-app header { padding-bottom: 14px; }
.crossing { position: relative; height: 92px; background: linear-gradient(#CDEBFA, #9DD3F3); overflow: hidden; }
.crossing::before, .crossing::after { content: ""; position: absolute; left: -10%; right: -10%; height: 16px; border-radius: 50%; border-top: 2px solid rgba(255, 255, 255, .7); }
.crossing::before { top: 20px; }
.crossing::after { top: 72px; left: 20%; right: 30%; }
:root[data-theme="dark"] .crossing { background: linear-gradient(#24407A, #1B2F63); }
:root[data-theme="dark"] .crossing::before, :root[data-theme="dark"] .crossing::after { border-top-color: rgba(255, 255, 255, .22); }
.cross-stones { position: absolute; left: 14px; right: 14px; bottom: 15px; display: flex; justify-content: space-between; align-items: flex-end; gap: 4px; }
.cstone { position: relative; flex: 0 1 34px; min-width: 14px; height: 20px; border-radius: 50%; background: rgba(255, 255, 255, .75); border: 2px dashed #8FB3D6; }
.cstone.done { background: var(--c); border: 0; box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .16); }
.cstone.done::after { content: "✓"; position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font-size: 11px; font-weight: 800; }
.cstone.here { background: #fff; border: 2px solid var(--c); }
.cstone.here.done { background: var(--c); border: 0; }
.cstone.here img { position: absolute; left: 50%; bottom: 8px; width: 46px; height: auto; transform: translateX(-50%); z-index: 1; }
.cstone.flag:not(.here)::before { content: "🏁"; position: absolute; left: 50%; bottom: 14px; transform: translateX(-30%); font-size: 18px; }
.cross-say { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 10px 16px 2px; font-size: 14px; }
.cross-say .when { flex: none; padding: 3px 10px; border-radius: 99px; font-size: 12px; font-weight: 700; background: var(--soft); color: var(--ink); }
.cross-say .when.soon { background: color-mix(in srgb, var(--danger) 16%, transparent); color: var(--danger); }
.tp-stones { display: flex; gap: 6px; justify-content: flex-start !important; }
.tp-stones i { width: 22px; height: 12px; border-radius: 50%; border: 1.5px dashed rgba(255, 255, 255, .8); }
.tp-stones i.done { background: #fff; border-style: solid; border-color: #fff; }

/* Workspace menu: the reset choice, and the note that asks before it happens */
.menu .danger { color: var(--danger); }
.menu .menu-note { margin: 0; padding: 2px 10px 8px; max-width: 240px; font-size: 12.5px; line-height: 1.4; color: var(--quiet); white-space: normal; }

/* Learn, then cross the river: lesson bites with a check each, then the stepping-stone quiz */
.lq-kicker { display: block; font-size: 11px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--quiet); }
.ll-cols { display: grid; grid-template-columns: 220px 1fr; gap: 16px; align-items: start; }
.ll-path { padding: 14px 12px; }
.ll-stop { display: flex; gap: 10px; align-items: center; width: 100%; text-align: left; padding: 9px 8px; border-radius: 13px; font-weight: 600; font-size: 13.5px; }
.ll-stop em { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: 12px; font-weight: 800; background: var(--soft); }
.ll-stop em svg { width: 13px; height: 13px; }
.ll-stop small { display: block; font-weight: 500; color: var(--quiet); font-size: 12px; }
.ll-stop.done em { background: #17B38A; color: #fff; }
.ll-stop.on { background: color-mix(in srgb, #6C5CE7 14%, transparent); }
.ll-stop.on em { background: #6C5CE7; color: #fff; }
.ll-main { display: grid; gap: 14px; min-width: 0; }
.ll-lesson, .ll-check, .lq-card, .lq-side { padding: 18px 22px; }
.ll-lesson h2 { font-size: 21px; margin: 2px 0 8px; }
.ll-text { font-size: 15px; line-height: 1.55; }
.ll-text p { margin: 0 0 9px; }
.ll-text strong { background: color-mix(in srgb, #F5B83D 34%, transparent); padding: 0 3px; border-radius: 4px; font-weight: 600; }
.ll-check { border: 2px solid #6C5CE7; }
.lq-q { font-size: 19px; font-weight: 700; line-height: 1.3; margin: 6px 0 12px; }
.lq-q.small { font-size: 16.5px; }
.lq-q p, .lq-opt p, .lq-why p { margin: 0; display: inline; }
.lq-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.lq-opt { display: flex; gap: 12px; align-items: center; text-align: left; padding: 12px 14px; border-radius: 15px; border: 1.5px solid var(--line); background: var(--field); font-size: 14.5px; transition: transform .15s; }
.lq-opt:not([disabled]):hover { transform: translateY(-2px); border-color: #6C5CE7; }
.lq-opt em { flex: none; width: 26px; height: 26px; border-radius: 9px; display: grid; place-items: center; font-style: normal; font-weight: 800; font-size: 12px; background: var(--soft); }
.lq-opt.right { border-color: #17B38A; background: color-mix(in srgb, #17B38A 14%, transparent); }
.lq-opt.right em { background: #17B38A; color: #fff; }
.lq-opt.wrong { border-color: var(--danger); background: color-mix(in srgb, var(--danger) 12%, transparent); }
.lq-opt.wrong em { background: var(--danger); color: #fff; }
.lq-opt.dim { opacity: .55; }
.lq-why { margin-top: 12px; padding: 11px 14px; border-radius: 14px; font-size: 13.5px; background: color-mix(in srgb, #17B38A 13%, transparent); border: 1px solid color-mix(in srgb, #17B38A 35%, transparent); }
.lq-why.miss { background: color-mix(in srgb, var(--danger) 10%, transparent); border-color: color-mix(in srgb, var(--danger) 30%, transparent); }
.lq-water { position: relative; height: 150px; border-radius: 22px; background: linear-gradient(#CDEBFA, #8FCBF0); overflow: hidden; margin-bottom: 14px; }
:root[data-theme="dark"] .lq-water { background: linear-gradient(#24407A, #1B2F63); }
.lq-water::before { content: ""; position: absolute; left: -5%; right: -5%; top: 34px; height: 20px; border-radius: 50%; border-top: 2px solid rgba(255, 255, 255, .5); }
.lq-bank { position: absolute; top: 0; bottom: 0; left: 0; width: 64px; background: #8FD694; border-radius: 0 60% 60% 0; }
.lq-bank.far { left: auto; right: 0; border-radius: 60% 0 0 60%; display: grid; place-items: center; font-style: normal; font-size: 28px; }
:root[data-theme="dark"] .lq-bank { background: #3F8F5C; }
.lq-row { position: absolute; left: 86px; right: 86px; bottom: 34px; display: flex; justify-content: space-between; align-items: flex-end; gap: 6px; }
.lq-stone { position: relative; flex: 0 1 58px; min-width: 22px; height: 30px; border-radius: 50%; background: rgba(255, 255, 255, .7); border: 2px dashed #7FA9D0; }
.lq-stone.done { background: #6C5CE7; border: 0; box-shadow: inset 0 -6px 0 rgba(0, 0, 0, .18); }
.lq-stone.done::after { content: "✓"; position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font-weight: 800; }
.lq-stone.miss { background: #F6C7C9; border: 2px solid var(--danger); }
.lq-stone.miss::after { content: "↻"; position: absolute; inset: 0; display: grid; place-items: center; color: var(--danger); font-weight: 800; }
.lq-stone.here { background: #fff; border: 2px solid #6C5CE7; box-shadow: none; }
.lq-stone.here::after { content: none; }
.lq-stone.here img { position: absolute; left: 50%; bottom: 12px; width: 78px; height: auto; transform: translateX(-50%); z-index: 1; transition: none; }
.lq-body { display: grid; grid-template-columns: 1fr 260px; gap: 16px; align-items: start; }
.lq-side ul { list-style: none; padding: 0; margin: 8px 0 12px; }
.lq-side li { display: flex; justify-content: space-between; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.lq-side .btn { width: 100%; }
@container (max-width: 720px) { .ll-cols, .lq-body { grid-template-columns: 1fr; } .lq-opts { grid-template-columns: 1fr; } }
@media (max-width: 760px) { .ll-cols, .lq-body { grid-template-columns: 1fr; } .lq-opts { grid-template-columns: 1fr; } }
.lq-flag { display: block; margin-top: 12px; font-size: 12.5px; color: var(--quiet); }
.ll-stop[disabled] { opacity: .7; cursor: default; }

/* ---- Grade calculator ---- */
.nav-item[data-act="grades"] > svg { --ic: #F2A900; }
.side .nav-item[data-act="grades"] > svg { --ic: #F2A900; }
.gc-river { margin-top: 20px; border-radius: 20px; padding: 18px 22px 20px; background: linear-gradient(180deg, #BFE5F8, #8FCDF0); color: #1F2A33; }
:root[data-theme="dark"] .gc-river { background: linear-gradient(180deg, #24407A, #1B2F63); color: #EEF3FA; }
.gc-river header { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; font-size: 15px; }
.gc-target { display: flex; align-items: center; gap: 8px; background: rgba(255, 255, 255, .6); border-radius: 12px; padding: 5px 8px 5px 12px; font-weight: 600; font-size: 13px; }
:root[data-theme="dark"] .gc-target { background: rgba(255, 255, 255, .14); }
.gc-target input { background: var(--field); color: var(--ink); border: 0; border-radius: 8px; padding: 5px 8px; outline: none; font-size: 13px; width: 190px; }
.gc-target input[type="number"] { width: 58px; font-weight: 700; text-align: center; }
.gc-path { display: flex; align-items: center; gap: 8px; }
.gc-stone { flex: 1 1 0; min-width: 0; height: 40px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 13px; background: rgba(255, 255, 255, .42); color: #3D6F8C; transform: rotate(-6deg); }
:root[data-theme="dark"] .gc-stone { background: rgba(255, 255, 255, .14); color: #B9CBE8; }
.gc-river .gc-stone.done { background: #fff; color: #2B2926; box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .1); }
.gc-river .gc-stone.here { background: #2B2926; color: #fff; transform: rotate(-6deg) scale(1.18); }
:root[data-theme="dark"] .gc-river .gc-stone.done { background: rgba(255, 255, 255, .55); color: #14234B; }
:root[data-theme="dark"] .gc-river .gc-stone.here { background: #fff; color: #14234B; }
.gc-river .gc-stone.flag, :root[data-theme="dark"] .gc-river .gc-stone.flag { background: #F2A900; color: #fff; }
.gc-river .gc-stone.here.flag, :root[data-theme="dark"] .gc-river .gc-stone.here.flag { background: #12A594; color: #fff; }
.gc-gap { font-weight: 800; opacity: .6; }
.gc-say { margin: 18px 0 0; font-size: 17px; font-weight: 700; }
.gc-say small { font: 500 12px/1 -apple-system, sans-serif; opacity: .7; margin-left: 6px; }
.gc-card { background: var(--paper); border-radius: 18px; padding: 16px 18px; box-shadow: 0 2px 12px color-mix(in srgb, var(--ink) 7%, transparent); }
.gc-split { display: grid; grid-template-columns: 240px 1fr; gap: 14px; margin-top: 14px; align-items: start; }
@media (max-width: 760px) { .gc-split { grid-template-columns: 1fr; } }
.gc-row { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border-radius: 12px; text-align: left; font-weight: 500; }
.gc-row:hover { background: var(--soft); }
.gc-row.on { background: var(--field); box-shadow: 0 2px 10px color-mix(in srgb, var(--ink) 9%, transparent); }
.gc-row i { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.gc-row span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gc-row small { color: var(--muted); font-size: 11px; }
.gc-row b { font-size: 17px; font-weight: 800; }
.gc-row b.guess { color: var(--muted); }
.gc-total { display: flex; justify-content: space-between; border-top: 1px solid var(--line); margin-top: 8px; padding: 12px 10px 2px; font-weight: 700; font-size: 15px; }
.gc-panel header, .gc-next header { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.gc-panel header .link, .gc-next header small { color: var(--muted); font-size: 12px; }
.gc-name { font-size: 18px; }
.gc-tag { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 99px; background: color-mix(in srgb, #2F7BF0 16%, transparent); color: #2F7BF0; vertical-align: 2px; }
.gc-part { display: grid; grid-template-columns: minmax(110px, 1.1fr) 170px 1fr 62px 22px; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.gc-part input, .gc-bounds input { background: var(--field); border: 1.5px solid var(--line); border-radius: 10px; padding: 6px 8px; outline: none; font-weight: 700; font-size: 15px; text-align: center; width: 100%; min-width: 0; }
.gc-part input:focus, .gc-bounds input:focus { border-color: var(--stone); }
.gc-part input::placeholder { font-weight: 400; font-size: 12px; color: var(--muted); }
.gc-part .gc-part-name { border-color: transparent; background: none; text-align: left; font-size: 14px; padding-left: 0; }
.gc-part .gc-part-name:hover, .gc-part .gc-part-name:focus { background: var(--field); border-color: var(--line); padding-left: 8px; }
.gc-mark { display: flex; align-items: center; gap: 6px; }
.gc-mark i { font-style: normal; color: var(--muted); }
.gc-bar { height: 8px; border-radius: 99px; background: var(--soft); overflow: hidden; }
.gc-bar i { display: block; height: 100%; border-radius: 99px; background: var(--grad); transition: width .25s; }
.gc-weight { display: flex; align-items: center; gap: 3px; color: var(--muted); font-size: 12px; }
.gc-weight input { font-size: 12px; font-weight: 600; padding: 5px 2px; }
.gc-x { color: var(--muted); opacity: .5; } .gc-x:hover { opacity: 1; } .gc-x svg { width: 14px; height: 14px; }
.gc-parts > .link { display: inline-flex; align-items: center; gap: 4px; margin-top: 10px; color: var(--quiet); font-size: 12px; font-weight: 600; }
.gc-parts > .link svg { width: 13px; height: 13px; }
.gc-bounds { background: var(--field); border-radius: 12px; padding: 10px 14px; margin: 6px 0; }
.gc-bounds p { margin: 0 0 8px; color: var(--quiet); font-size: 12px; }
.gc-bounds div { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.gc-bounds label { display: flex; align-items: center; gap: 5px; font-weight: 800; }
.gc-bounds input { width: 54px; font-size: 13px; }
.gc-bounds .link { font-size: 12px; color: var(--quiet); text-decoration: underline; }
.gc-bands { position: relative; height: 56px; margin: 20px 0 6px; }
.gc-track { position: absolute; left: 0; right: 0; top: 18px; height: 18px; border-radius: 99px; display: flex; overflow: hidden; }
.gc-track span { height: 100%; }
.gc-lab { position: absolute; top: 40px; font-size: 11px; font-weight: 700; color: var(--muted); transform: translateX(-50%); }
.gc-me { position: absolute; top: 0; transform: translateX(-50%); text-align: center; font-weight: 800; font-size: 12px; transition: left .25s; }
.gc-me::after { content: ""; display: block; width: 4px; height: 26px; background: var(--ink); border-radius: 2px; margin: 1px auto 0; }
.gc-result { display: flex; align-items: center; gap: 16px; margin-top: 10px; background: var(--field); border-radius: 14px; padding: 12px 16px; }
.gc-result > div:not(.gc-n):not(.gc-guess) { flex: 1; }
.gc-result small { color: var(--muted); font-size: 12px; }
.gc-n { font-size: 44px; font-weight: 800; line-height: 1; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.gc-guess, .gc-letters { display: flex; gap: 6px; }
.gc-guess button { width: 34px; height: 30px; border-radius: 50%; background: var(--soft); color: var(--muted); font-weight: 700; transform: rotate(-6deg); }
.gc-guess button.on { background: var(--c); color: #fff; }
.gc-letters button { width: 34px; height: 34px; border-radius: 10px; background: var(--soft); color: var(--muted); font-weight: 700; }
.gc-letters button.on { background: var(--grad); color: #fff; }
.gc-core { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.gc-core span b, .gc-core span small { display: block; } .gc-core small { color: var(--muted); font-size: 12px; }
.gc-next { margin-top: 14px; } .gc-next:empty { display: none; }
.gc-next header { justify-content: flex-start; } .gc-next header b { font-size: 15px; }
.gc-step { display: grid; grid-template-columns: 22px minmax(120px, 1.1fr) 64px 2fr 104px; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.gc-step:last-child { border: 0; padding-bottom: 2px; }
.gc-rank { width: 22px; height: 22px; border-radius: 50%; background: var(--soft); display: grid; place-items: center; font-size: 11px; font-weight: 800; color: var(--quiet); }
.gc-rank.top { background: #F2A900; color: #fff; }
.gc-jump { font-weight: 800; font-size: 15px; }
.gc-need { color: var(--quiet); font-size: 13px; } .gc-need b { color: #12A594; }

/* ---- Coursework: stones, stage helpers and the report card ---- */
.wk-path { display: flex; gap: 4px; margin-top: 20px; border-radius: 20px; padding: 16px 14px 14px; background: linear-gradient(180deg, #BFE5F8, #8FCDF0); color: #1F2A33; }
:root[data-theme="dark"] .wk-path { background: linear-gradient(180deg, #24407A, #1B2F63); color: #EEF3FA; }
.wk-stage { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 7px; padding: 6px 4px; border-radius: 14px; font-size: 12px; font-weight: 600; line-height: 1.25; text-align: center; color: inherit; }
.wk-stage:hover, .wk-stage.on { background: rgba(255, 255, 255, .34); }
:root[data-theme="dark"] .wk-stage:hover, :root[data-theme="dark"] .wk-stage.on { background: rgba(255, 255, 255, .12); }
.wk-stage i { display: grid; place-items: center; width: 50px; height: 36px; border-radius: 50%; font-style: normal; font-weight: 800; font-size: 13px; background: rgba(255, 255, 255, .45); color: #3D6F8C; transform: rotate(-6deg); }
:root[data-theme="dark"] .wk-stage i { background: rgba(255, 255, 255, .16); color: #B9CBE8; }
.wk-path .wk-stage.done i { background: #fff; color: #12A594; box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .1); }
.wk-path .wk-stage.flag i { background: #F2A900; color: #fff; }
.wk-path .wk-stage.here i { background: #2B2926; color: #fff; transform: rotate(-6deg) scale(1.14); }
:root[data-theme="dark"] .wk-path .wk-stage.here i { background: #fff; color: #14234B; }
.wk-stage span { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.wk-cols { display: grid; grid-template-columns: 1fr 340px; gap: 14px; margin-top: 14px; align-items: start; }
@media (max-width: 820px) { .wk-cols { grid-template-columns: 1fr; } .wk-stage span { display: none; } }
.wk-card { background: var(--paper); border-radius: 18px; padding: 18px 20px; box-shadow: 0 2px 12px color-mix(in srgb, var(--ink) 7%, transparent); min-width: 0; }
.wk-card h2 { margin: 0 0 4px; font-size: 18px; }
.wk-card h3 { margin: 0 0 8px; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.wk-side h3:not(:first-child) { margin-top: 16px; }
.wk-note { margin: 0 0 10px; color: var(--muted); font-size: 12.5px; }
.wk-edit { margin-top: 0; max-width: none; }
.wk-box { width: 100%; min-height: 130px; resize: vertical; background: var(--field); border: 1px solid var(--edge); border-radius: 14px; padding: 12px 14px; outline: none; font-size: 15px; line-height: 1.6; margin-bottom: 10px; }
.wk-box:focus { border-color: var(--stone); }
.wk-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.wk-done { display: inline-flex; align-items: center; gap: 6px; color: #12A594; font-weight: 600; font-size: 13px; } .wk-done svg { width: 15px; height: 15px; }
.wk-checks { margin-top: 12px; }
.wk-check { display: flex; gap: 10px; align-items: flex-start; padding: 9px 0; border-top: 1px solid var(--line); font-size: 13.5px; }
.wk-check i { flex: none; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-style: normal; font-size: 12px; font-weight: 800; background: #F2A900; }
.wk-check i.good { background: #12A594; } .wk-check i.bad { background: #D8644A; } .wk-check i.tip { background: #2F7BF0; }
.wk-stone-name { margin: 0; font-size: 13.5px; } .wk-stone-name b { margin-right: 4px; }
.wk-otter { display: flex; gap: 10px; align-items: center; margin: 16px 0 0; padding: 10px 12px; border-radius: 14px; font-size: 13px; background: color-mix(in srgb, #2F7BF0 12%, transparent); }
.wk-otter img, .wk-otter .otter { width: 44px; height: auto; flex: none; }
.wk-score { display: flex; align-items: center; gap: 14px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.wk-score b { font-size: 13.5px; font-weight: 600; }
.wk-n { flex: none; }
.wk-score small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.wk-n { font-size: 46px; font-weight: 800; line-height: 1; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; white-space: nowrap; }
.wk-score .wk-n small { display: inline; margin: 0; font-size: 19px; color: inherit; }
.wk-crit { padding: 10px 0; border-bottom: 1px solid var(--line); }
.wk-crit header { display: flex; justify-content: space-between; gap: 10px; font-weight: 600; font-size: 13.5px; }
.wk-crit header span { font-weight: 800; white-space: nowrap; }
.wk-side > h3 + .wk-crit header span, .wk-side .wk-crit:not(:has(.wk-bar)) header span { font-weight: 500; color: var(--muted); font-size: 12px; }
.wk-bar { height: 8px; border-radius: 99px; background: var(--soft); overflow: hidden; margin-top: 6px; }
.wk-bar i { display: block; height: 100%; border-radius: 99px; background: var(--grad); }
.wk-bar.low i { background: #D8644A; }
.wk-crit p { margin: 6px 0 0; font-size: 12.5px; color: var(--quiet); }
.wk-side > .wk-note { margin: 12px 0 0; }
.wk-first { margin: 14px 0 0; padding: 10px 14px; border-radius: 12px; font-size: 13px; background: color-mix(in srgb, #F2A900 20%, var(--field)); }

/* ---- Coursework: sources and citations ---- */
.src-cols { grid-template-columns: 1fr 1fr; margin-top: 20px; }
@media (max-width: 820px) { .src-cols { grid-template-columns: 1fr; } }
.src-types { display: flex; gap: 8px; margin: 10px 0 12px; }
.src-types button { flex: 1; padding: 8px 4px; border-radius: 12px; background: var(--field); border: 1.5px solid var(--line); font-weight: 600; font-size: 12.5px; }
.src-types button.on { border-color: #2F7BF0; color: #2F7BF0; background: color-mix(in srgb, #2F7BF0 10%, var(--field)); }
.src-form { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.src-form label { display: grid; gap: 4px; font-size: 11.5px; font-weight: 600; color: var(--muted); min-width: 0; }
.src-form label small { font-weight: 400; }
.src-form .wide { grid-column: 1 / -1; }
.src-form input:not([type="checkbox"]), .src-form select { width: 100%; min-width: 0; background: var(--field); color: var(--ink); border: 1.5px solid var(--line); border-radius: 11px; padding: 8px 11px; outline: none; font-size: 14px; font-weight: 400; }
.src-form input:focus, .src-form select:focus { border-color: var(--stone); }
.src-org { display: flex; align-items: center; gap: 6px; font-weight: 400; color: var(--quiet); font-size: 12px; }
.src-date { display: grid; grid-template-columns: 70px 1fr 90px; gap: 6px; }
.src-form label small { display: inline; }
.src-preview { margin-top: 14px; background: var(--field); border-radius: 14px; padding: 12px 16px; }
.src-cite { margin: 0; font: 14px/1.6 Georgia, serif; padding-left: 26px; text-indent: -26px; overflow-wrap: anywhere; }
.src-in { margin: 8px 0 0; font-size: 12.5px; color: var(--quiet); } .src-in b { color: var(--ink); font-weight: 600; } .src-in small { color: var(--muted); }
.src-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; } .src-head h3 { margin: 0; }
.src-row { display: flex; gap: 10px; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid var(--line); }
.src-row > i { flex: none; width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; color: #fff; font-style: normal; font-size: 12px; font-weight: 800; }
.src-row > div { min-width: 0; flex: 1; }
.src-acts { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.src-acts button { background: var(--soft); border-radius: 9px; padding: 4px 10px; font-size: 12px; font-weight: 600; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.src-acts button:hover { opacity: .8; }
.src-all { margin-top: 14px; }
.src-paste { display: flex; gap: 8px; align-items: center; margin-top: 10px; }
.src-paste input { flex: 1; min-width: 0; background: var(--field); color: var(--ink); border: 1.5px solid var(--line); border-radius: 11px; padding: 8px 11px; outline: none; font-size: 14px; }
.src-paste input:focus { border-color: var(--stone); }
.src-note { margin: 8px 0 0; font-size: 12.5px; color: #0E8C7E; }
.src-note.bad { color: var(--danger); }

/* ---- Question bank: hint ladder and step-by-step walkthrough ---- */
.ladder { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 0 0 12px; }
.rung { border-radius: 12px; padding: 8px 10px; background: var(--field); border: 1.5px solid var(--line); font-size: 11.5px; color: var(--muted); }
.rung b { display: block; font-size: 12.5px; color: var(--ink); }
.rung.used { border-color: #F2A900; background: color-mix(in srgb, #F2A900 14%, var(--field)); }
.rung.lock { opacity: .5; }
.bank-q .hint { margin: 0 0 10px; padding: 10px 14px; border-radius: 12px; font-size: 14px; background: color-mix(in srgb, #F2A900 16%, var(--field)); }
.bank-q .hint p { display: inline; margin: 0; }
.hint-stones { display: flex; align-items: center; gap: 5px; margin: 0 0 10px; font-size: 12px; color: var(--muted); }
.hint-stones i { width: 20px; height: 15px; border-radius: 50%; background: #12A594; transform: rotate(-8deg); }
.hint-stones i.off { background: var(--soft); }
.hint-stones span { margin-left: 5px; }
.walk { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 14px; }
.walk h3 { margin: 0 0 4px; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.walk-step { display: flex; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.walk-step > i { flex: none; width: 40px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-weight: 800; font-size: 13px; color: #fff; background: #12A594; transform: rotate(-6deg); }
.walk-step.now > i { background: var(--ink); color: var(--paper); }
.walk-step.lock { opacity: .45; } .walk-step.lock > i { background: var(--soft); color: var(--muted); }
.walk-step > div { flex: 1; min-width: 0; }
.walk-step > div > b { display: block; font-size: 14px; }
.walk-step p { margin: 2px 0 0; color: var(--quiet); font-size: 13.5px; }
.walk-step p b { color: var(--ink); }
.walk-tag { flex: none; align-self: flex-start; font-size: 11px; font-weight: 700; border-radius: 99px; padding: 2px 9px; color: #0E8C7E; background: color-mix(in srgb, #12A594 18%, transparent); }
.walk-tag.miss { color: #D8644A; background: color-mix(in srgb, #D8644A 16%, transparent); }
.walk-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; color: var(--muted); font-size: 12px; }
.walk-end { margin: 12px 0 0; font-size: 13px; color: var(--quiet); }

/* ---- Study from a file ---- */
.side .nav-item[data-act="files"] > svg, .nav-item[data-act="files"] > svg { --ic: #2F7BF0; }
.doc { position: relative; flex: none; width: 38px; height: 46px; border-radius: 7px; background: var(--c); color: #fff; font-size: 10px; font-weight: 800; display: grid; place-items: end center; padding-bottom: 6px; }
.doc::before { content: ""; position: absolute; top: 0; right: 0; border: 6px solid; border-color: var(--paper) var(--paper) rgba(255, 255, 255, .5) rgba(255, 255, 255, .5); border-radius: 0 0 0 4px; }
.doc.big { width: 50px; height: 60px; font-size: 16px; padding-bottom: 14px; }
.file-drop { margin-top: 20px; display: flex; align-items: center; gap: 18px; min-height: 104px; padding: 20px 22px; border-radius: 22px; border: 2.5px dashed color-mix(in srgb, #2F7BF0 55%, var(--line)); background: color-mix(in srgb, #2F7BF0 7%, var(--paper)); transition: background .15s, border-color .15s; }
.file-drop.over { border-color: #2F7BF0; background: color-mix(in srgb, #2F7BF0 18%, var(--paper)); }
.file-drop .doc.big::before { border-color: transparent transparent rgba(255, 255, 255, .5) rgba(255, 255, 255, .5); }
.file-drop > div { flex: 1; } .file-drop b { display: block; font-size: 18px; } .file-drop small { color: var(--muted); font-size: 12.5px; }
.file-cols { display: grid; grid-template-columns: 320px 1fr; gap: 14px; margin-top: 14px; align-items: start; }
@media (max-width: 860px) { .file-cols { grid-template-columns: 1fr; } }
.file-read header { display: flex; gap: 12px; align-items: center; margin-bottom: 12px; }
.file-read header b { display: block; font-size: 15px; line-height: 1.3; } .file-read small { color: var(--muted); font-size: 12px; }
.file-read p { margin: 0 0 10px; font-size: 13.5px; }
.file-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.file-tags span { background: var(--soft); border-radius: 99px; padding: 3px 10px; font-size: 12px; font-weight: 600; color: var(--quiet); }
.file-pack { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 620px) { .file-pack { grid-template-columns: 1fr; } }
.file-make { display: flex; align-items: center; gap: 12px; text-align: left; border-left: 6px solid var(--c); padding: 14px 16px; transition: transform .12s; }
.file-make:hover { transform: translateY(-2px); } .file-make[disabled] { opacity: .6; }
.file-make > div { flex: 1; min-width: 0; } .file-make b { display: block; font-size: 15px; } .file-make small { color: var(--muted); font-size: 12px; }
.file-subject { display: flex; align-items: center; gap: 8px; } .file-subject i { width: 10px; height: 10px; border-radius: 50%; } .file-subject small { font-weight: 400; }
.file-shelf { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.file-tile { display: flex; align-items: flex-start; gap: 4px; padding: 12px 10px 12px 14px; border: 1.5px solid transparent; }
.file-tile.on { border-color: #2F7BF0; }
.file-open { flex: 1; min-width: 0; display: flex; gap: 12px; align-items: center; text-align: left; }
.file-open b { display: block; font-size: 14px; line-height: 1.3; } .file-open small { color: var(--muted); font-size: 12px; }

/* Walkthroughs on a marked mock exam */
.points li .exam-walk { display: inline-flex; margin-top: 6px; font-size: 13px; }
.points li .walk { margin-top: 10px; }
.points li .walk p { color: var(--quiet); }
.points .walk p b, .points .walk p strong { display: inline; font-size: inherit; font-weight: 700; color: var(--ink); }
.points .walk-foot span, .points .walk-tag { display: inline-block; margin-top: 0; }
.points li > div { flex: 1; min-width: 0; }

/* Progress page */
.pg-week header { margin-bottom: 16px; }
.pg-nav { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; opacity: .85; }
.pg-nav button { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .45); color: inherit; }
.pg-nav button:disabled { opacity: .3; }
.pg-nav svg { width: 14px; height: 14px; }
.pg-days { align-items: flex-start; gap: 14px; }
.pg-day { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 9px; }
.pg-day .gc-stone { flex: none; width: 100%; max-width: 86px; height: 42px; font-size: 14px; }
.pg-day small { font-size: 11.5px; opacity: .75; min-height: 14px; }
.pg-sums { display: flex; align-items: center; gap: 30px; margin-top: 18px; flex-wrap: wrap; }
.pg-sums > div b { display: block; font-size: 34px; font-weight: 800; line-height: 1; }
.pg-sums > div small { font-size: 12px; opacity: .8; }
.pg-sums em { font-style: normal; font-weight: 700; } .pg-sums em.up { color: #0B7F72; } .pg-sums em.down { color: #B5462E; }
.pg-say { margin: 0 0 0 auto; display: flex; align-items: center; gap: 12px; max-width: 330px; font-size: 13px; line-height: 1.4; }
.pg-say .otter { --h: 54px; flex: none; }
.pg-say b { display: block; font-size: 14.5px; }
:root[data-theme="dark"] .pg-nav button { background: rgba(255, 255, 255, .14); }
:root[data-theme="dark"] .pg-sums em.up { color: #5FE0C4; } :root[data-theme="dark"] .pg-sums em.down { color: #FF9D85; }
.pg-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 14px; margin-top: 14px; align-items: start; }
.pg-card header { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 12px; }
.pg-card header small { color: var(--muted); font-size: 12px; }
.pg-total { display: flex; align-items: baseline; gap: 10px; }
.pg-total > b { font-size: 44px; font-weight: 800; line-height: 1; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.pg-total span { color: var(--quiet); font-size: 13px; }
.pg-pill { margin-left: auto; font-style: normal; font-size: 11px; font-weight: 700; border-radius: 99px; padding: 3px 10px; background: var(--soft); color: var(--quiet); }
.pg-pill.up { color: #0E8C7E; background: color-mix(in srgb, #12A594 18%, transparent); }
.pg-pill.down { color: #D8644A; background: color-mix(in srgb, #D8644A 16%, transparent); }
.pg-line { width: 100%; height: 96px; margin-top: 8px; }
.pg-line polyline { fill: none; stroke: #2F7BF0; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.pg-line circle { fill: #2F7BF0; } .pg-line circle.last { fill: var(--paper); stroke: #2F7BF0; stroke-width: 3; }
.pg-note { display: block; color: var(--muted); font-size: 12px; }
.pg-empty { margin: 12px 0; color: var(--quiet); font-size: 13.5px; line-height: 1.5; }
.pg-card > .btn { margin-top: 12px; }
.pg-topic { display: grid; grid-template-columns: minmax(110px, 1fr) minmax(60px, 1.2fr) 46px auto; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.pg-topic:last-child { border: 0; padding-bottom: 0; }
.pg-topic span b { display: block; font-size: 14px; } .pg-topic span small { color: var(--quiet); font-size: 12px; }
.pg-bar { height: 9px; border-radius: 9px; background: var(--soft); overflow: hidden; } .pg-bar i { display: block; height: 100%; border-radius: 9px; }
.pg-start { margin: 14px 2px 0; color: var(--muted); font-size: 12.5px; }
@media (max-width: 900px) { .pg-split { grid-template-columns: 1fr; } .pg-say { margin-left: 0; } }

/* Talk it through: a spoken conversation */
.vc-start { margin-top: 20px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px 18px; }
.vc-start label { display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--quiet); }
.vc-start label.wide, .vc-go { grid-column: 1 / -1; }
.vc-start label small { font-weight: 400; color: var(--muted); }
.vc-start select, .vc-start input { padding: 9px 11px; border-radius: 10px; border: 1px solid var(--line); background: var(--field); color: var(--ink); font: inherit; font-weight: 400; }
.vc-start .seg { align-self: flex-start; }
.vc-go { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.vc-stage { display: grid; grid-template-columns: minmax(0, 1fr) 250px; gap: 14px; margin-top: 18px; align-items: start; }
.vc-stage .lesson { display: flex; flex-direction: column; min-height: 420px; }
.vc-otter { display: flex; align-items: flex-start; gap: 6px; }
.vc-otter .icon-btn { flex: none; opacity: .6; } .vc-otter .icon-btn:hover { opacity: 1; }
.vc-fix { align-self: flex-end; max-width: 78%; } .vc-fix span b { display: block; color: var(--ink); }
.vc-bar { display: flex; align-items: center; gap: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.vc-bar p { flex: 1; min-width: 0; margin: 0; font-size: 14.5px; color: var(--ink); }
.vc-mic svg { width: 16px; height: 16px; margin-right: 6px; vertical-align: -3px; }
.vc-wave { display: inline-flex; align-items: center; gap: 3px; height: 30px; flex: none; }
.vc-wave i { width: 4px; height: 8px; border-radius: 4px; background: #2F7BF0; animation: vc-wave 1s ease-in-out infinite; }
.vc-wave i:nth-child(2) { animation-delay: .12s; } .vc-wave i:nth-child(3) { animation-delay: .24s; } .vc-wave i:nth-child(4) { animation-delay: .36s; }
.vc-wave i:nth-child(5) { animation-delay: .48s; } .vc-wave i:nth-child(6) { animation-delay: .6s; } .vc-wave i:nth-child(7) { animation-delay: .72s; }
.vc-wave.still i { animation: none; opacity: .4; }
@keyframes vc-wave { 0%, 100% { height: 8px; } 50% { height: 28px; } }
@media (prefers-reduced-motion: reduce) { .vc-wave i { animation: none; height: 16px; } }
.vc-where { margin: 10px 0 0; font-size: 12px; color: var(--muted); }
.vc-done { display: flex; align-items: center; gap: 12px; margin: 12px 0 0; padding-top: 12px; border-top: 1px solid var(--line); font-size: 13.5px; color: var(--quiet); }
.vc-done .otter { --h: 60px; flex: none; } .vc-done b { display: block; color: var(--ink); font-size: 15px; }
.vc-side h3 { margin: 16px 0 8px; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.vc-side h3:first-child { margin-top: 0; }
.vc-stat { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.vc-stat b { font-size: 15px; }
.vc-again { margin: 0 0 8px; padding: 8px 10px; border-radius: 10px; background: var(--soft); font-size: 13px; }
@media (max-width: 900px) { .vc-stage, .vc-start { grid-template-columns: 1fr; } }
.vc-tip { margin: 10px 0 0; font-size: 12px; line-height: 1.45; color: var(--muted); } .vc-tip b { color: var(--ink); } .vc-tip.bad { color: var(--danger); }
.vc-voice { display: flex; gap: 8px; align-items: center; } .vc-voice select { flex: 1; min-width: 0; }

/* Talk it through: the start page, where you meet the otter */
.vc-meet { margin-top: 20px; padding: 26px 28px; border-radius: 24px; display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 30px; align-items: center; }
.vc-hero { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.vc-hero .otter { --h: 190px; }
.vc-hero small { color: var(--muted); font-size: 12.5px; }
.vc-hello { position: relative; margin: 0 0 6px; padding: 12px 18px; border-radius: 20px; background: var(--field); font-size: 18px; font-weight: 800; box-shadow: 0 4px 16px color-mix(in srgb, var(--ink) 10%, transparent); }
.vc-hello::after { content: ""; position: absolute; left: 50%; bottom: -7px; width: 14px; height: 14px; margin-left: -7px; background: var(--field); transform: rotate(45deg); border-radius: 3px; }
.vc-choices { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.vc-choices h3 { margin: 0 0 9px; font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.vc-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.vc-chips button { display: inline-flex; align-items: center; gap: 5px; padding: 9px 16px; border-radius: 99px; background: var(--soft); color: var(--ink); font-size: 14px; font-weight: 600; transition: transform .12s; }
.vc-chips button:hover { transform: translateY(-1px); }
.vc-chips button.on { background: var(--grad); color: #fff; box-shadow: 0 5px 14px color-mix(in srgb, #2F7BF0 38%, transparent); }
.vc-chips.topic button.on { background: var(--ink); color: var(--paper); box-shadow: none; }
.vc-chips svg { width: 13px; height: 13px; }
.vc-pair { display: flex; gap: 30px; flex-wrap: wrap; }
.vc-seg { border-radius: 12px; padding: 3px; } .vc-seg button { padding: 8px 16px; border-radius: 10px; font-size: 13.5px; font-weight: 600; }
.vc-own { margin-top: 10px; width: 100%; padding: 11px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--field); color: var(--ink); font: inherit; }
.vc-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.vc-card { display: flex; align-items: center; border-radius: 16px; border: 2px solid var(--line); background: var(--field); min-width: 0; }
.vc-card.on { border-color: #2F7BF0; background: color-mix(in srgb, #2F7BF0 8%, var(--field)); }
.vc-pick { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; padding: 10px 6px 10px 12px; text-align: left; color: var(--ink); }
.vc-pick i { flex: none; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-style: normal; font-weight: 800; }
.vc-pick span { min-width: 0; } .vc-pick b { display: block; font-size: 14px; } .vc-pick small { display: block; color: var(--quiet); font-size: 12px; line-height: 1.3; text-transform: capitalize; }
.vc-play { flex: none; width: 30px; height: 30px; margin-right: 10px; border-radius: 50%; background: var(--soft); color: var(--ink); display: grid; place-items: center; }
.vc-play:hover { background: var(--grad); color: #fff; } .vc-play svg { width: 14px; height: 14px; margin-left: 1px; }
.vc-more { margin-top: 8px; font-size: 13px; }
.vc-meet .vc-go { display: flex; align-items: center; gap: 18px; flex-wrap: nowrap; }
.vc-meet .vc-go .quiet-note { font-size: 12px; line-height: 1.45; }
.vc-start-btn { flex: none; border-radius: 99px; padding: 15px 32px; font-size: 17px; font-weight: 700; color: #fff; background: var(--grad); box-shadow: 0 10px 26px color-mix(in srgb, #2F7BF0 42%, transparent); transition: transform .12s; }
.vc-start-btn:hover { transform: translateY(-2px); }
@media (max-width: 980px) { .vc-meet { grid-template-columns: 1fr; } .vc-hero .otter { --h: 130px; } .vc-cards { grid-template-columns: 1fr; } .vc-meet .vc-go { flex-wrap: wrap; } }

/* The talking otter: five drawings stacked, faded between by voice.js on every frame */
.talker { position: relative; display: inline-block; height: var(--h, 170px); aspect-ratio: 314 / 420; transform-origin: 50% 96%; will-change: transform; }
.talker b { position: absolute; inset: 0; background: url(/otter-talk-strip.png) 0 0 / 500% 100% no-repeat; }
.talker b:nth-child(n+2) { opacity: 0; will-change: opacity; -webkit-mask-image: radial-gradient(ellipse 19% 14.5% at 49% 40.5%, #000 58%, transparent 100%); mask-image: radial-gradient(ellipse 19% 14.5% at 49% 40.5%, #000 58%, transparent 100%); }
.talker b:nth-child(2) { background-position: 25% 0; } .talker b:nth-child(3) { background-position: 50% 0; }
.talker b:nth-child(4) { background-position: 75% 0; } .talker b:nth-child(5) { background-position: 100% 0; }
.talker, .talker[data-mood="idle"] { animation: otter-breathe 3.6s ease-in-out infinite; }
.talker[data-mood="talking"] { animation: otter-chat 1.5s ease-in-out infinite; }
.talker[data-mood="listening"] { animation: otter-listen 2.6s ease-in-out infinite; }
.talker[data-mood="thinking"] { animation: otter-ponder 2.2s ease-in-out infinite; }
.talker[data-mood="happy"] { animation: otter-hop .62s cubic-bezier(.3, .7, .4, 1) 2; }
@keyframes otter-breathe { 0%, 100% { transform: scale(1, 1); } 50% { transform: scale(1.012, 1.022); } }
@keyframes otter-chat { 0%, 100% { transform: translateY(0) rotate(-1.6deg); } 25% { transform: translateY(-2.2%) rotate(.4deg); } 50% { transform: translateY(0) rotate(1.8deg); } 75% { transform: translateY(-1.6%) rotate(.2deg); } }
@keyframes otter-listen { 0%, 100% { transform: rotate(-6deg) scale(1.05); } 50% { transform: rotate(-4deg) scale(1.065); } }
@keyframes otter-ponder { 0%, 100% { transform: rotate(4deg) translateY(0); } 50% { transform: rotate(7deg) translateY(-1%); } }
@keyframes otter-hop { 0%, 100% { transform: translateY(0) scale(1, 1); } 20% { transform: translateY(0) scale(1.06, .93); } 55% { transform: translateY(-9%) scale(.97, 1.05); } 85% { transform: translateY(0) scale(1.03, .97); } }
@media (prefers-reduced-motion: reduce) { .talker { animation: none !important; } }
.vc-face { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 6px 0 14px; margin-bottom: 12px; border-bottom: 1px solid var(--line); }
.vc-face small { font-size: 12.5px; font-weight: 600; color: var(--quiet); }
.vc-dots { position: absolute; top: 8px; right: 18px; display: none; gap: 4px; padding: 8px 10px; border-radius: 14px; background: var(--soft); }
.vc-face:has(.talker[data-mood="thinking"]) .vc-dots { display: inline-flex; }
.vc-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--quiet); animation: vc-dot 1s ease-in-out infinite; }
.vc-dots i:nth-child(2) { animation-delay: .15s; } .vc-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes vc-dot { 0%, 100% { transform: translateY(0); opacity: .45; } 50% { transform: translateY(-4px); opacity: 1; } }

/* Guides: the short demo that plays the first time you open a tab */
.guide-btn { position: fixed; right: 30px; bottom: 26px; z-index: 15; display: inline-flex; align-items: center; gap: 7px; padding: 9px 15px 9px 10px; border-radius: 99px; background: var(--paper); color: var(--ink); font-size: 13px; font-weight: 600; border: 1px solid var(--line); box-shadow: 0 6px 20px color-mix(in srgb, var(--ink) 16%, transparent); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.guide-btn b { width: 22px; height: 22px; border-radius: 50%; background: var(--grad); color: #fff; display: grid; place-items: center; font-size: 13px; }
.guide-btn:hover { transform: translateY(-1px); }
.guide-btn[hidden] { display: none; }
.guide-shade { position: fixed; inset: 0; z-index: 30; display: grid; place-items: center; padding: 20px; background: rgba(18, 22, 54, .5); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); animation: guide-in .25s ease-out; }
@keyframes guide-in { from { opacity: 0; } }
.guide-box { width: min(940px, 100%); display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 24px; align-items: center; padding: 22px; border-radius: 26px; background: var(--field); color: var(--ink); box-shadow: 0 24px 70px rgba(0, 0, 0, .35); animation: guide-rise .3s cubic-bezier(.2, .8, .3, 1); }
@keyframes guide-rise { from { transform: translateY(14px) scale(.98); opacity: 0; } }
.guide-video { position: relative; }
.guide-stage { position: relative; aspect-ratio: 16 / 10.5; border-radius: 18px; overflow: hidden; background: linear-gradient(160deg, color-mix(in srgb, #2F7BF0 13%, var(--paper)), color-mix(in srgb, #7C5CFF 16%, var(--paper))); border: 1px solid var(--line); container-type: inline-size; }
.guide-stage.ended > * { opacity: .35; transition: opacity .3s; }
.guide-prog { display: flex; gap: 5px; margin-top: 10px; }
.guide-prog i { flex: 1; height: 4px; border-radius: 4px; background: var(--soft); overflow: hidden; }
.guide-prog b { display: block; width: 0; height: 100%; border-radius: 4px; background: var(--grad); transition: width linear; }
.guide-prog i.now b, .guide-prog i.done b { width: 100%; } .guide-prog i.done b { transition: none; }
.guide-again { position: absolute; left: 50%; top: 44%; transform: translate(-50%, -50%); display: inline-flex; align-items: center; gap: 8px; padding: 12px 20px; border-radius: 99px; background: var(--grad); color: #fff; font-weight: 700; box-shadow: 0 10px 26px rgba(47, 123, 240, .45); }
.guide-again[hidden] { display: none; } .guide-again svg { width: 16px; height: 16px; }
.guide-side small { color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.guide-side h2 { margin: 4px 0 12px; font-size: 24px; line-height: 1.15; }
.guide-side ol { list-style: none; margin: 0; padding: 0; counter-reset: step; }
.guide-side li { position: relative; padding: 8px 10px 8px 44px; border-radius: 14px; counter-increment: step; transition: background .25s; }
.guide-side li::before { content: counter(step); position: absolute; left: 10px; top: 9px; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 800; background: var(--soft); color: var(--quiet); transition: background .25s, color .25s; }
.guide-side li.on { background: color-mix(in srgb, #2F7BF0 10%, transparent); } .guide-side li.on::before { background: var(--grad); color: #fff; }
.guide-side li b { display: block; font-size: 14.5px; } .guide-side li span { color: var(--quiet); font-size: 13px; }
.guide-foot { display: flex; align-items: center; gap: 12px; margin-top: 14px; } .guide-foot span { color: var(--muted); font-size: 12px; }
@media (max-width: 820px) { .guide-box { grid-template-columns: 1fr; } }
/* the miniature page inside the video */
.gd { position: absolute; inset: 0 0 15% 0; padding: 5% 6% 0; font-size: clamp(9px, 2.5cqw, 14px); display: flex; flex-direction: column; justify-content: center; }
.gd-col { display: flex; flex-direction: column; gap: .75em; } .gd-row { display: flex; gap: .7em; align-items: stretch; flex-wrap: wrap; }
.gd-h { font: 800 1.45em/1.2 ui-rounded, "SF Pro Rounded", system-ui; }
.gd-bar { display: flex; align-items: center; gap: .5em; min-height: 2.9em; padding: .55em .7em .55em 1em; border-radius: 1em; background: var(--field); border: 1px solid var(--line); box-shadow: 0 .3em 1em color-mix(in srgb, var(--ink) 8%, transparent); }
.gd-bar span { flex: 0 1 auto; } .gd-bar em { flex: 1; font-style: normal; color: var(--muted); } .gd-bar.typing em { visibility: hidden; flex: 1; width: 0; overflow: hidden; }
.gd-bar.typing span::after { content: ""; display: inline-block; width: 1.5px; height: 1.1em; margin-left: 1px; vertical-align: -.2em; background: #2F7BF0; animation: gd-blink .8s steps(1) infinite; }
@keyframes gd-blink { 50% { opacity: 0; } }
.gd-go { flex: none; margin-left: auto; font-style: normal; font-weight: 700; padding: .35em .8em; border-radius: .8em; background: var(--grad); color: #fff; }
.gd-msg { align-self: flex-start; max-width: 86%; padding: .6em .9em; border-radius: 1em; background: var(--field); border: 1px solid var(--line); line-height: 1.35; }
.gd-msg.me { align-self: flex-end; background: color-mix(in srgb, #2F7BF0 18%, var(--field)); border-color: transparent; }
.gd-btn { display: inline-flex; align-items: center; padding: .55em 1em; border-radius: .85em; background: var(--field); border: 1px solid var(--line); font-weight: 600; transition: transform .15s, box-shadow .15s; }
.gd-btn.pri { background: var(--grad); color: #fff; border-color: transparent; }
.gd-chips { display: flex; flex-wrap: wrap; gap: .5em; } .gd-chips span { padding: .45em .95em; border-radius: 99px; background: var(--field); border: 1px solid var(--line); font-weight: 600; transition: transform .15s; } .gd-chips span.on { background: var(--grad); color: #fff; border-color: transparent; }
.gd-card { flex: 1 1 0; min-width: 0; padding: .65em .85em; border-radius: 1em; background: var(--field); border: 1px solid var(--line); border-left: .32em solid var(--c); transition: transform .15s; } .gd-card b { display: block; } .gd-card small { color: var(--quiet); font-size: .86em; }
.gd-stones { display: flex; gap: .5em; } .gd-stones i { flex: 1; height: 2em; border-radius: 50%; background: color-mix(in srgb, var(--ink) 12%, transparent); transform: rotate(-6deg); } .gd-stones i.on { background: #2B2926; box-shadow: inset 0 -.25em 0 rgba(0, 0, 0, .25); }
:root[data-theme="dark"] .gd-stones i.on { background: #fff; }
.gd-score { flex: 1 1 0; } .gd-score b { display: block; font: 800 2em/1 ui-rounded, system-ui; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; } .gd-score small { color: var(--quiet); font-size: .86em; }
.gd-tick { display: flex; align-items: center; gap: .55em; } .gd-tick i { flex: none; width: 1.5em; height: 1.5em; border-radius: 50%; background: #12A594; color: #fff; display: grid; place-items: center; font-style: normal; font-size: .8em; font-weight: 800; } .gd-tick.bad i { background: #FF7A59; }
.gd-file { align-self: flex-start; display: flex; align-items: center; gap: .6em; padding: .5em .9em .5em .5em; border-radius: .9em; background: var(--field); border: 1px solid var(--line); } .gd-file i { padding: .5em .45em; border-radius: .5em; background: #D8644A; color: #fff; font-style: normal; font-size: .7em; font-weight: 800; }
.gd-otter { height: 6.2em; align-self: center; margin: 0 auto; } .gd-big { font: 800 1.35em/1.2 ui-rounded, system-ui; }
.gd-late { opacity: 0; transform: translateY(.6em) scale(.97); transition: opacity .35s, transform .35s cubic-bezier(.2, .9, .3, 1.2); } .gd-late.in { opacity: 1; transform: none; }
.gd .pressed { transform: scale(.94); box-shadow: 0 0 0 .3em color-mix(in srgb, #2F7BF0 35%, transparent); }
.gd-say { position: absolute; left: 0; right: 0; bottom: 0; margin: 0; padding: 3.2% 6%; font-size: clamp(10px, 2.7cqw, 15px); font-weight: 700; color: #fff; background: linear-gradient(90deg, #26327a, #4a3aa8); animation: gd-say .35s ease-out; }
@keyframes gd-say { from { transform: translateY(100%); } }
.gd-pointer { position: absolute; left: 0; top: 0; width: 22px; height: 22px; margin: -3px 0 0 -3px; opacity: 0; z-index: 2; pointer-events: none; transform: translate(78%, 90%); transition: transform .65s cubic-bezier(.3, .7, .2, 1), opacity .2s; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 2l15 9-6.500 1.500L16 20l-3 1.500-3.500-7.500L5 18z' fill='%23fff' stroke='%231c2340' stroke-width='1.6' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center / contain; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .35)); }
.gd-pointer.click::after { content: ""; position: absolute; left: -9px; top: -9px; width: 26px; height: 26px; border-radius: 50%; border: 2px solid #2F7BF0; animation: gd-ring .45s ease-out forwards; }
@keyframes gd-ring { from { transform: scale(.3); opacity: 1; } to { transform: scale(1.5); opacity: 0; } }

/* Multiple choice in the Question bank */
.mq-kinds { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 18px 0 4px; }
.mq-kinds button { text-align: left; padding: 12px 14px; border-radius: 16px; border: 2px solid var(--line); background: var(--field); color: var(--ink); }
.mq-kinds button.on { border-color: #2F7BF0; background: color-mix(in srgb, #2F7BF0 8%, var(--field)); }
.mq-kinds b { display: block; font-size: 14.5px; } .mq-kinds small { color: var(--quiet); font-size: 12.5px; }
.mq-count { display: flex; align-items: center; gap: 12px; margin: 12px 0 0; font-size: 13px; font-weight: 600; color: var(--quiet); }
.mq-actions { align-items: center; }
.mq-pill { display: inline-flex; align-items: center; gap: 6px; padding: 7px 13px; border-radius: 99px; background: var(--soft); font-weight: 700; font-size: 13px; white-space: nowrap; }
.mq-pill svg { width: 14px; height: 14px; color: #FF7A59; }
.mq-stones { display: flex; gap: 8px; margin: 18px 0 16px; }
.mq-stone { flex: 1; height: 30px; border-radius: 50%; background: color-mix(in srgb, var(--ink) 10%, transparent); transform: rotate(-6deg); display: grid; place-items: center; font-size: 12px; font-weight: 800; color: #fff; transition: background .25s, transform .25s; }
.mq-stone svg { width: 14px; height: 14px; stroke-width: 3; }
.mq-stone.ok { background: #12A594; } .mq-stone.no { background: #FF7A59; } .mq-stone.now { background: var(--ink); color: var(--paper); transform: rotate(-6deg) scale(1.18); }
.mq-box { background: var(--paper); border-radius: 22px; padding: 22px 24px; box-shadow: 0 2px 14px color-mix(in srgb, var(--ink) 8%, transparent); }
.mq-wait { display: grid; place-items: center; min-height: 220px; }
.mq-n { margin: 0 0 6px; font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.mq-q { font-family: ui-rounded, "SF Pro Rounded", system-ui; font-size: 20px; font-weight: 700; line-height: 1.35; margin-bottom: 16px; } .mq-q p { margin: 0; }
.mq-opts { display: grid; gap: 10px; }
.mq-opt { display: flex; align-items: center; gap: 14px; text-align: left; padding: 13px 16px; border-radius: 16px; border: 2px solid var(--line); background: var(--field); color: var(--ink); font-size: 15px; transition: transform .12s, border-color .15s, background .15s; }
.mq-opt:not(:disabled):hover { transform: translateY(-1px); border-color: color-mix(in srgb, #2F7BF0 55%, var(--line)); }
.mq-opt i { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-weight: 800; background: var(--soft); }
.mq-opt i svg { width: 16px; height: 16px; stroke-width: 3; } .mq-opt span p { margin: 0; }
.mq-opt.on { border-color: #2F7BF0; background: color-mix(in srgb, #2F7BF0 9%, var(--field)); } .mq-opt.on i { background: #2F7BF0; color: #fff; }
.mq-opt.good { border-color: #12A594; background: color-mix(in srgb, #12A594 11%, var(--field)); } .mq-opt.good i { background: #12A594; color: #fff; }
.mq-opt.bad { border-color: #FF7A59; background: color-mix(in srgb, #FF7A59 10%, var(--field)); } .mq-opt.bad i { background: #FF7A59; color: #fff; }
.mq-opt.dim { opacity: .6; } .mq-opt:disabled { cursor: default; }
.mq-why { margin: 14px 0 0; padding: 12px 14px; border-radius: 14px; background: color-mix(in srgb, #12A594 11%, transparent); font-size: 14px; line-height: 1.45; animation: mq-in .25s ease-out; }
.mq-why.missed { background: color-mix(in srgb, #FF7A59 11%, transparent); }
@keyframes mq-in { from { opacity: 0; transform: translateY(6px); } }
.mq-keys { margin: 12px 0 0; color: var(--muted); font-size: 12.5px; }
.mq-foot { display: flex; align-items: center; gap: 10px; margin-top: 16px; } .mq-foot > span { color: var(--muted); font-size: 13px; } .mq-gap { flex: 1; }
.mq-foot .btn svg { width: 13px; height: 13px; vertical-align: -1px; } .mq-flagged { background: #F2A900; color: #fff; border-color: transparent; }
.mq-go { border-radius: 99px; padding: 12px 26px; font-size: 15px; font-weight: 700; color: #fff; background: var(--grad); box-shadow: 0 8px 20px color-mix(in srgb, #2F7BF0 34%, transparent); }
.mq-go:disabled { opacity: .45; box-shadow: none; } .mq-go.dark { background: var(--ink); color: var(--paper); box-shadow: none; width: 100%; }
.mq-paper { display: grid; grid-template-columns: minmax(0, 1fr) 250px; gap: 14px; margin-top: 18px; align-items: start; }
.mq-side { padding: 18px; display: flex; flex-direction: column; gap: 10px; } .mq-side p { margin: 0; color: var(--quiet); font-size: 12.5px; line-height: 1.4; } .mq-side .link { align-self: center; font-size: 13px; }
.mq-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.mq-grid button { aspect-ratio: 1; border-radius: 10px; background: var(--soft); color: var(--ink); font-size: 13px; font-weight: 700; }
.mq-grid button.done { background: color-mix(in srgb, #2F7BF0 24%, var(--field)); } .mq-grid button.flag { background: #F2A900; color: #fff; }
.mq-grid button.now { outline: 2px solid var(--ink); outline-offset: 1px; } .mq-grid button.soon { opacity: .35; }
.mq-review { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.mq-done { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; background: var(--paper); border: 1px solid var(--line); }
.mq-done > i { flex: none; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: #12A594; } .mq-done.missed > i { background: #FF7A59; } .mq-done > i svg { width: 12px; height: 12px; stroke-width: 3; }
.mq-done b { display: block; font-size: 14px; font-weight: 500; line-height: 1.4; } .mq-done span { display: block; margin-top: 3px; font-size: 13px; color: var(--quiet); line-height: 1.4; }
.mq-done .mq-right { color: #0E8C7E; font-weight: 600; } .mq-done .mq-yours { color: #D8644A; }
@media (max-width: 900px) { .mq-paper, .mq-kinds { grid-template-columns: 1fr; } }
.mq-foot .btn { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }

/* Today's three things, at the top of Home */
.today3 { margin: 0 0 14px; padding: 18px 20px; border-radius: 24px; background: var(--paper); border: 1px solid var(--line); box-shadow: var(--lift, 0 6px 24px color-mix(in srgb, var(--ink) 9%, transparent)); -webkit-backdrop-filter: var(--glass-blur, blur(20px)); backdrop-filter: var(--glass-blur, blur(20px)); }
.today3 header { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.today3 h2 { margin: 0; font-size: 19px; font-weight: 800; } .today3 header span { color: var(--quiet); font-size: 13px; }
.today3 header em { margin-left: auto; font-style: normal; font-size: 13px; font-weight: 700; color: #0E8C7E; }
:root[data-theme="dark"] .today3 header em { color: #5FE0C4; }
.today3-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.today3-card { position: relative; display: flex; flex-direction: column; padding: 14px 16px 14px 20px; border-radius: 18px; background: var(--field); border: 1px solid var(--line); overflow: hidden; }
.today3-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 6px; background: var(--c); }
.today3-n { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--c); color: #fff; font-size: 12px; font-weight: 800; }
.today3-n svg { width: 13px; height: 13px; stroke-width: 3; }
.today3-card b { margin: 8px 0 2px; font-size: 15.5px; line-height: 1.3; } .today3-card small { color: var(--quiet); font-size: 12.5px; line-height: 1.35; } .today3-card .why { margin-top: 5px; color: var(--muted); }
.today3-foot { display: flex; align-items: center; gap: 8px; margin-top: auto; padding-top: 12px; }
.today3-time { font-size: 12px; font-weight: 700; color: var(--quiet); background: var(--soft); border-radius: 99px; padding: 4px 10px; }
.today3-go { margin-left: auto; border-radius: 99px; padding: 8px 18px; font-size: 13px; font-weight: 700; color: #fff; background: var(--grad); box-shadow: 0 5px 14px color-mix(in srgb, #2F7BF0 32%, transparent); transition: transform .12s; }
.today3-go:hover { transform: translateY(-1px); }
.today3-done { margin-left: auto; font-size: 13px; font-weight: 700; color: #0E8C7E; } :root[data-theme="dark"] .today3-done { color: #5FE0C4; }
.today3-card.done { opacity: .72; } .today3-card.done .today3-n { background: #12A594; } .today3-card.done b { text-decoration: line-through; text-decoration-thickness: 1.5px; }
.today3-cheer { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; padding: 10px 14px; border-radius: 16px; background: color-mix(in srgb, #12A594 12%, transparent); }
.today3-cheer .otter { --h: 62px; flex: none; } .today3-cheer p { margin: 0; color: var(--quiet); font-size: 13.5px; } .today3-cheer b { display: block; color: var(--ink); font-size: 15.5px; }
@media (max-width: 860px) { .today3-cards { grid-template-columns: 1fr; } .today3 header em { margin-left: 0; } }

/* Explain it in my language */
.own-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 10px; font-size: 12.5px; font-weight: 400; }
.own-bar button { display: inline-flex; align-items: center; gap: 5px; padding: 5px 11px; border-radius: 99px; background: var(--soft); color: var(--ink); font-size: 12.5px; font-weight: 600; }
.own-bar button:hover { background: color-mix(in srgb, #2F7BF0 16%, var(--soft)); } .own-bar svg { width: 12px; height: 12px; }
.own-bar .own-main.on { background: var(--grad); color: #fff; }
.own-bar .own-quiet { background: none; color: var(--muted); font-weight: 500; padding: 5px 4px; }
.own-wait { color: var(--muted); font-size: 12.5px; } .own-wait.bad { color: var(--danger); }
.own-text p { margin: 0 0 .5em; font-size: 1.04em; line-height: 1.7; color: var(--ink); } .own-text p:last-child { margin-bottom: 0; }
.own-term { position: relative; border-bottom: 2px dotted #2F7BF0; cursor: help; outline: none; white-space: nowrap; font-weight: 700; color: var(--ink); display: inline !important; }
.own-mean { color: var(--quiet); display: inline !important; margin: 0 !important; font-size: inherit !important; }
.own-term:hover::after, .own-term:focus::after { content: attr(data-about); position: absolute; left: 50%; bottom: calc(100% + 8px); transform: translateX(-50%); z-index: 5; width: max-content; max-width: 280px; white-space: normal; padding: 7px 12px; border-radius: 12px; background: var(--ink); color: var(--paper); font-size: 12.5px; font-weight: 600; line-height: 1.4; box-shadow: 0 6px 18px rgba(0, 0, 0, .25); }
.own-dialog { max-width: 620px; } .own-dialog h2 { font-size: 19px; }
.own-langs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 16px 0; max-height: 52vh; overflow-y: auto; }
.own-langs button { text-align: left; padding: 9px 12px; border-radius: 12px; background: var(--soft); color: var(--ink); } .own-langs button.on { background: var(--grad); color: #fff; }
.own-langs b { display: block; font-size: 14.5px; } .own-langs small { opacity: .7; font-size: 11.5px; }
.own-dialog footer { display: flex; justify-content: flex-end; }
.walk-step > div > .own-bar { margin-top: 6px; }
@media (max-width: 700px) { .own-langs { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ============ Riverlight ============
   Impera's premium look. The river scene becomes a soft glow behind frosted glass, the logo's teal-to-blue is
   the one accent, and each study tool opens with a headline, the otter, and your numbers as pebbles (hero.js). */
:root { --rl-grad: linear-gradient(135deg, #12A594, #2F7BF0); --rl-a: rgba(255, 255, 255, .86); --rl-b: rgba(255, 255, 255, .58); --rl-edge: rgba(255, 255, 255, .95); --rl-shine: #fff;
  --rl-drop: rgba(30, 60, 120, .38); --rl-hair: rgba(14, 26, 51, .09); --rl-field: #fff; --rl-chip: rgba(255, 255, 255, .82); --rl-teal: #0e8c7e; --rl-icon: #1466c8; --rl-icon-bg: linear-gradient(160deg, #e6f6f3, #dceaff); }
:root[data-theme="dark"] { --rl-a: rgba(255, 255, 255, .1); --rl-b: rgba(255, 255, 255, .035); --rl-edge: rgba(255, 255, 255, .13); --rl-shine: rgba(255, 255, 255, .2);
  --rl-drop: rgba(0, 0, 0, .7); --rl-hair: rgba(255, 255, 255, .09); --rl-field: rgba(10, 16, 40, .78); --rl-chip: rgba(12, 18, 44, .7); --rl-teal: #5fe0c4; --rl-icon: #bfe9ff; --rl-icon-bg: linear-gradient(160deg, rgba(47, 123, 240, .4), rgba(18, 165, 148, .2)); }

/* The window: scenery softened everywhere but Home, a glass menu, and glass pages */
:root[data-look="river"] body::before { transition: filter .5s ease, transform .5s ease; }
:root[data-look="river"]:has(#app:not([data-view="home"])) body::before { filter: blur(20px) saturate(1.25) brightness(1.04); transform: scale(1.12); }
:root[data-look="river"][data-theme="dark"]:has(#app:not([data-view="home"])) body::before { filter: blur(20px) saturate(1.15) brightness(.8); }
:root[data-look="river"] body::after { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: 0; transition: opacity .5s ease;
  background: radial-gradient(760px 520px at 84% -8%, rgba(255, 255, 255, .75), transparent 60%), linear-gradient(180deg, rgba(236, 245, 255, .62), rgba(232, 248, 243, .4)); }
:root[data-look="river"][data-theme="dark"] body::after { background: radial-gradient(760px 520px at 82% -6%, rgba(47, 123, 240, .5), transparent 62%), radial-gradient(620px 460px at 4% 104%, rgba(18, 165, 148, .38), transparent 62%), linear-gradient(180deg, rgba(6, 9, 30, .78), rgba(5, 14, 30, .62)); }
:root[data-look="river"]:has(#app:not([data-view="home"])) body::after { opacity: 1; }
:root[data-look="river"] .side { background: linear-gradient(170deg, var(--rl-a), var(--rl-b)); border: 1px solid var(--rl-edge); box-shadow: 0 1px 0 var(--rl-shine) inset, 0 30px 70px -34px var(--rl-drop); }
:root[data-look="river"] .side .nav-item.on { background: var(--rl-grad); color: #fff; box-shadow: 0 1px 0 rgba(255, 255, 255, .4) inset, 0 14px 28px -12px rgba(47, 123, 240, .85); }
:root[data-look="river"] .side .nav-item.on > svg { background: rgba(255, 255, 255, .22); color: #fff; box-shadow: none; }
:root[data-look="river"] #app:not([data-view="home"]) .card { background: linear-gradient(170deg, color-mix(in srgb, var(--rl-a) 58%, transparent), color-mix(in srgb, var(--rl-b) 38%, transparent)); border: 1px solid var(--rl-edge); box-shadow: 0 1px 0 var(--rl-shine) inset, 0 40px 90px -44px var(--rl-drop); }

/* Shared pieces, on every tool page */
.rl-glass { background: linear-gradient(170deg, var(--rl-a), var(--rl-b)); border: 1px solid var(--rl-edge); border-radius: 24px; box-shadow: 0 1px 0 var(--rl-shine) inset, 0 30px 60px -32px var(--rl-drop), 0 8px 18px -12px var(--rl-drop); -webkit-backdrop-filter: blur(26px) saturate(1.6); backdrop-filter: blur(26px) saturate(1.6); }
:root[data-look="river"] .planner-head h1 { font-family: "SF Pro Display", -apple-system, system-ui, sans-serif; font-size: 40px; font-weight: 700; line-height: 1.04; letter-spacing: -.035em; }
:root[data-look="river"] .planner-head .sub { margin-top: 10px; max-width: 540px; font-size: 15px; line-height: 1.5; }
:root[data-look="river"] .btn { background: var(--rl-chip); border: 1px solid var(--rl-hair); }
:root[data-look="river"] .btn.primary { border-color: transparent; background: var(--rl-grad); color: #fff; box-shadow: 0 1px 0 rgba(255, 255, 255, .4) inset, 0 -2px 0 rgba(0, 40, 90, .2) inset, 0 14px 26px -12px rgba(47, 123, 240, .85); }
:root[data-look="river"] .btn.primary svg { width: 15px; height: 15px; margin-left: 6px; vertical-align: -2px; stroke-width: 2.3; }
:root[data-look="river"] .tool-start { flex-wrap: nowrap; gap: 10px; padding: 8px 8px 8px 22px; border-radius: 22px; background: var(--rl-field); border: 1px solid var(--rl-edge); box-shadow: 0 1px 0 var(--rl-shine) inset, 0 24px 50px -24px rgba(47, 123, 240, .55); }
:root[data-look="river"] .tool-start input { min-width: 0; padding: 10px 0; border: 0; background: none; font-size: 16.5px; }
:root[data-look="river"] .tool-start select { flex: none; border: 0; background: var(--soft); border-radius: 12px; padding: 10px 12px; }
:root[data-look="river"] .tool-start .btn.primary { flex: none; padding: 13px 22px; border-radius: 15px; font-size: 14.5px; font-weight: 700; white-space: nowrap; }
:root[data-look="river"] .tool-start .checking { flex: none; padding-right: 12px; }
:root[data-look="river"] .how li, :root[data-look="river"] .gc-card, :root[data-look="river"] .mq-box, :root[data-look="river"] .quiet-box { background: linear-gradient(170deg, var(--rl-a), var(--rl-b)); border: 1px solid var(--rl-edge); box-shadow: 0 1px 0 var(--rl-shine) inset, 0 26px 50px -32px var(--rl-drop); }
:root[data-look="river"] .how li { border-radius: 22px; padding: 18px; }

/* The hero: eyebrow, headline, and the otter on its pool of light with your numbers as pebbles */
.rl-eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 11.5px; font-weight: 700; letter-spacing: .15em; text-transform: uppercase; color: var(--rl-teal); }
.rl-eyebrow i { width: 16px; height: 11px; border-radius: 50%; background: var(--rl-grad); transform: rotate(-8deg); }
.planner-head h1.rl-display { margin-top: 12px; font-family: "SF Pro Display", -apple-system, system-ui, sans-serif; font-size: 52px; font-weight: 700; line-height: 1.02; letter-spacing: -.04em; }
.rl-display em { font-style: normal; background: var(--rl-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.column.has-hero { position: relative; }
.column.has-hero .planner-head { min-height: 232px; padding-right: 352px; align-items: center; }
.column.has-hero .planner-head > div:first-child { max-width: 560px; }
.rl-stage { position: absolute; right: 40px; top: -4px; width: 340px; height: 244px; pointer-events: none; }
.rl-pool { position: absolute; left: 50px; right: 40px; bottom: 6px; height: 46px; border-radius: 50%; background: radial-gradient(closest-side, rgba(47, 123, 240, .38), rgba(18, 165, 148, .2) 60%, transparent); filter: blur(6px); }
:root[data-theme="dark"] .rl-pool { background: radial-gradient(closest-side, rgba(47, 123, 240, .7), rgba(18, 165, 148, .35) 60%, transparent); }
.rl-otter { position: absolute; left: 86px; bottom: 18px; height: 214px; filter: drop-shadow(0 24px 22px var(--rl-drop)); animation: otter-breathe 3.6s ease-in-out infinite; transform-origin: 50% 96%; }
.rl-peb { position: absolute; width: 112px; height: 76px; display: flex; flex-direction: column; align-items: center; justify-content: center; border-radius: 50%; background: var(--rl-chip); border: 1px solid var(--rl-edge);
  box-shadow: 0 1px 0 var(--rl-shine) inset, 0 -6px 0 var(--rl-hair) inset, 0 20px 30px -14px var(--rl-drop); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); animation: rl-float 5s ease-in-out infinite; }
.rl-peb b { font-family: "SF Pro Display", -apple-system, system-ui, sans-serif; font-size: 22px; font-weight: 700; line-height: 1; letter-spacing: -.03em; color: var(--ink); }
.rl-peb small { margin-top: 3px; font-size: 11px; color: var(--quiet); white-space: nowrap; }
.rl-peb.p0 { left: -8px; top: 18px; --tilt: -7deg; } .rl-peb.p1 { right: -10px; top: 92px; --tilt: 6deg; animation-delay: -1.7s; } .rl-peb.p2 { left: 6px; bottom: 14px; --tilt: 4deg; animation-delay: -3.1s; }
@keyframes rl-float { 0%, 100% { transform: rotate(var(--tilt, -6deg)) translateY(0); } 50% { transform: rotate(var(--tilt, -6deg)) translateY(-5px); } }
@media (prefers-reduced-motion: reduce) { .rl-peb, .rl-otter { animation: none; transform: rotate(var(--tilt, 0deg)); } }
@media (max-width: 940px) { .rl-stage { display: none; } .column.has-hero .planner-head { min-height: 0; padding-right: 0; } .planner-head h1.rl-display { font-size: 38px; } }

/* The Question bank's first screen */
.rl-pills { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.rl-pills button { display: inline-flex; align-items: center; gap: 8px; padding: 8px 15px; border-radius: 99px; background: var(--rl-chip); border: 1px solid var(--rl-hair); color: var(--ink); font-size: 13.5px; font-weight: 600; }
.rl-pills button i { width: 8px; height: 8px; border-radius: 50%; } .rl-pills button.on { background: var(--ink); color: var(--paper); border-color: transparent; }
.rl-hint { margin: 14px 2px 0; color: var(--quiet); font-size: 13.5px; } .rl-hint .link { font-weight: 600; text-decoration: underline; }
.mq-kinds { gap: 12px; margin: 14px 0 0; }
.mq-kinds button.rl-glass { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: 22px; }
.mq-kinds button.rl-glass.on { border-color: var(--rl-edge); background: linear-gradient(170deg, var(--rl-a), var(--rl-b)); box-shadow: 0 0 0 2px #2F7BF0, 0 1px 0 var(--rl-shine) inset, 0 26px 44px -22px rgba(47, 123, 240, .8); }
.mq-kinds button > i { flex: none; width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; font-style: normal; color: var(--rl-icon); background: var(--rl-icon-bg); box-shadow: 0 1px 0 var(--rl-shine) inset, 0 0 0 1px var(--rl-hair); }
.mq-kinds button.on > i { color: #fff; background: var(--rl-grad); box-shadow: 0 1px 0 rgba(255, 255, 255, .45) inset, 0 10px 18px -8px rgba(47, 123, 240, .9); }
.mq-kinds b { font-size: 15.5px; font-weight: 650; letter-spacing: -.015em; }
.rl-two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
.rl-panel { padding: 18px 22px 10px; }
.rl-panel h3 { margin: 0 0 4px; font-size: 11.5px; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; color: var(--muted); }
.rl-row { width: 100%; display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--rl-hair); text-align: left; color: var(--ink); }
.rl-panel h3 + .rl-row { border-top: 0; }
.rl-row > span:first-child { flex: 1; min-width: 0; } .rl-row b { display: block; font-size: 14.5px; font-weight: 600; letter-spacing: -.01em; } .rl-row small { font-size: 12.5px; color: var(--muted); }
.rl-row em { font-style: normal; font-size: 13.5px; font-weight: 650; font-variant-numeric: tabular-nums; } .rl-row em.quiet { color: var(--muted); font-weight: 600; }
.rl-meter { flex: none; width: 92px; height: 5px; border-radius: 5px; background: var(--rl-hair); overflow: hidden; } .rl-meter i { display: block; height: 100%; border-radius: 5px; background: linear-gradient(90deg, #ff7a59, #ffb347); }
.rl-go { flex: none; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--soft); transition: transform .15s, background .15s; } .rl-go svg { width: 14px; height: 14px; }
.rl-row:hover .rl-go { background: var(--rl-grad); color: #fff; transform: translateX(2px); }
.rl-empty { margin: 8px 0 10px; color: var(--quiet); font-size: 13.5px; line-height: 1.5; }
@media (max-width: 860px) { .rl-two { grid-template-columns: 1fr; } }
:root[data-look="river"] .tool-start .btn.primary { display: inline-flex; align-items: center; gap: 2px; }
.column.has-hero .kept-empty .otter { display: none; }   /* the hero already has the otter */
.column.has-hero .kept-empty { padding-top: 26px; }

/* Riverlight on the pages that are not tools: the same headline type everywhere */
:root[data-look="river"] .card h1.rounded { font-family: "SF Pro Display", -apple-system, system-ui, sans-serif; font-weight: 700; letter-spacing: -.03em; }
:root[data-look="river"] #app[data-view="chat"] .card h1.rounded { font-size: 44px; letter-spacing: -.04em; line-height: 1.05; }
.column.has-hero .planner-head .actions { align-self: flex-end; }

/* Energy: the ring in the top bar, the quiet card when it runs low, and the Impera Plus page */
.energy-pill { display: inline-flex; align-items: center; gap: 7px; padding: 5px 13px 5px 6px; border-radius: 99px; font-size: 13px; font-weight: 700; color: var(--ink); background: var(--paper); border: 1px solid var(--line); -webkit-backdrop-filter: var(--glass-blur, blur(20px)); backdrop-filter: var(--glass-blur, blur(20px)); box-shadow: var(--lift, none); white-space: nowrap; }
.energy-pill svg { width: 26px; height: 26px; } .energy-pill circle { fill: none; stroke: color-mix(in srgb, var(--ink) 11%, transparent); stroke-width: 4; }
.energy-pill circle.arc { stroke: #12A594; stroke-linecap: round; transition: stroke-dashoffset .5s ease; } .energy-pill path { fill: #12A594; }
.energy-pill.low circle.arc { stroke: #FF7A59; } .energy-pill.low path { fill: #FF7A59; }
.energy-pill.plus { padding: 6px 13px 6px 7px; } .energy-pill.plus i { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: var(--rl-grad); }
.energy-nudge { display: flex; align-items: center; gap: 18px; margin: 16px 0 4px; padding: 16px 20px; border-color: color-mix(in srgb, #FF7A59 40%, var(--rl-edge)); }
.energy-nudge .otter { --h: 78px; flex: none; }
.energy-nudge > div:nth-child(2) { flex: 1; min-width: 0; } .energy-nudge b { font-size: 17px; letter-spacing: -.02em; }
.energy-nudge p { margin: 4px 0 0; color: var(--quiet); font-size: 13.5px; line-height: 1.5; } .energy-nudge strong { color: var(--ink); font-weight: 600; }
.energy-acts { display: flex; flex-direction: column; gap: 8px; flex: none; } .energy-acts .btn { padding: 11px 18px; border-radius: 14px; white-space: nowrap; }
.plans-top { text-align: center; padding-top: 8px; } .plans-top h1.rl-display { margin: 12px 0 0; font-size: 50px; line-height: 1.02; letter-spacing: -.04em; }
.plans-top .sub { margin: 10px 0 0; font-size: 16px; color: var(--quiet); } .plans-seg { margin-top: 18px; padding: 4px; border-radius: 14px; } .plans-seg button { padding: 8px 16px; border-radius: 11px; font-size: 13px; font-weight: 600; }
.plans-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; max-width: 820px; margin: 22px auto 0; }
.plan-card { display: flex; flex-direction: column; padding: 22px; }
.plan-card.best { box-shadow: 0 0 0 2px #2F7BF0, 0 1px 0 var(--rl-shine) inset, 0 26px 44px -22px rgba(47, 123, 240, .7); }
.plan-card h3 { margin: 0; font-size: 12px; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; color: var(--muted); } .plan-card.best h3 { color: var(--rl-teal); }
.plan-price { margin: 8px 0 12px; font-family: "SF Pro Display", -apple-system, system-ui, sans-serif; font-size: 36px; font-weight: 700; line-height: 1; letter-spacing: -.04em; }
.plan-price small { font: 500 13px -apple-system, system-ui, sans-serif; letter-spacing: 0; color: var(--muted); }
.plan-card ul { list-style: none; margin: 0 0 16px; padding: 0; flex: 1; } .plan-card li { display: flex; gap: 9px; align-items: flex-start; padding: 5px 0; font-size: 13.5px; line-height: 1.4; }
.plan-card li svg { flex: none; width: 15px; height: 15px; margin-top: 2px; color: #12A594; stroke-width: 2.6; }
.plan-card .btn { justify-content: center; text-align: center; } .plan-card .btn.big { border-radius: 15px; padding: 13px 20px; font-weight: 700; }
.plan-now { display: block; text-align: center; padding: 12px; border-radius: 15px; background: var(--soft); color: var(--quiet); font-size: 13.5px; font-weight: 600; }
.plans-table { max-width: 820px; margin: 16px auto 0; padding: 6px 22px 10px; border-radius: 22px; }
.plans-row { display: grid; grid-template-columns: 1.7fr .8fr .8fr; align-items: center; gap: 10px; padding: 11px 0; border-top: 1px solid var(--rl-hair); font-size: 14px; }
.plans-row b { font-weight: 600; } .plans-row span { text-align: center; color: var(--quiet); } .plans-row span.yes { color: var(--rl-teal); font-weight: 700; }
.plans-row.head { border-top: 0; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); } .plans-row.head b { font-weight: 700; }
.plans-note { max-width: 820px; margin: 14px auto 0; text-align: center; color: var(--muted); font-size: 12.5px; }
@media (max-width: 860px) { .plans-cards { grid-template-columns: 1fr; } .energy-nudge { flex-wrap: wrap; } .energy-acts { flex-direction: row; } }

/* The card that comes up when a free account runs out of energy */
.dialog.energy-pop { max-width: 760px; padding: 26px 28px 20px; border-radius: 30px; background: linear-gradient(170deg, var(--rl-a), var(--rl-b)); border: 1px solid var(--rl-edge); box-shadow: 0 1px 0 var(--rl-shine) inset, 0 50px 110px -40px rgba(10, 20, 70, .7); -webkit-backdrop-filter: blur(28px) saturate(1.6); backdrop-filter: blur(28px) saturate(1.6); }
:root[data-theme="dark"] .dialog.energy-pop { background: linear-gradient(170deg, rgba(30, 38, 84, .96), rgba(16, 22, 56, .96)); }
.energy-pop-top { display: flex; align-items: center; gap: 22px; } .energy-pop-top .otter { --h: 112px; flex: none; }
.energy-pop-top h2 { margin: 0; font-family: "SF Pro Display", -apple-system, system-ui, sans-serif; font-size: 30px; font-weight: 700; line-height: 1.08; letter-spacing: -.035em; }
.energy-pop-top h2 em { font-style: normal; background: var(--rl-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.dialog.energy-pop .energy-pop-top p { margin: 8px 0 0; font-size: 14.5px; line-height: 1.5; color: var(--quiet); } .energy-pop-top p b { color: var(--ink); }
.energy-pop .plans-cards { max-width: none; margin-top: 20px; gap: 14px; }
.energy-pop .plan-card { padding: 18px; border-radius: 22px; background: color-mix(in srgb, var(--rl-field) 70%, transparent); border: 1px solid var(--rl-hair); }
.energy-pop .plan-card.best { background: var(--rl-field); border-color: transparent; }
.energy-pop .plan-price { font-size: 32px; } .energy-pop .plan-card .btn { padding: 12px 18px; border-radius: 15px; }
.dialog.energy-pop .energy-pop-note { margin: 14px 0 0; text-align: center; font-size: 12.5px; color: var(--muted); }
@media (max-width: 700px) { .energy-pop-top { flex-direction: column; text-align: center; } }

.plans .plans-cards { align-items: start; }
/* The ways to pay for Plus: one row each, the chosen one ringed */
.plan-ways { display: flex; flex-direction: column; gap: 8px; margin: 0 0 14px; }
.plan-ways button { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: 15px; text-align: left; color: var(--ink); background: color-mix(in srgb, var(--rl-field) 60%, transparent); border: 1.5px solid var(--rl-hair); transition: border-color .15s, background .15s; }
.plan-ways button > i { flex: none; width: 18px; height: 18px; border-radius: 50%; border: 2px solid color-mix(in srgb, var(--ink) 28%, transparent); }
.plan-ways button.on { border-color: #2F7BF0; background: color-mix(in srgb, #2F7BF0 9%, var(--rl-field)); }
.plan-ways button.on > i { border-color: #2F7BF0; background: radial-gradient(circle, #2F7BF0 0 46%, transparent 50%); }
.plan-ways span { flex: 1; min-width: 0; } .plan-ways b { display: block; font-size: 14px; font-weight: 650; } .plan-ways small { font-size: 12px; color: var(--muted); }
.plan-ways em { font-style: normal; font-size: 14px; font-weight: 700; white-space: nowrap; }
.plan-card ul.plan-short { flex: none; margin-bottom: 10px; } .plan-more { align-self: center; margin-top: 8px; font-size: 12.5px; color: var(--quiet); }

/* ---------- Settings: a pass in the river colours on the left, one section at a time on the right ---------- */
.set-page { display: grid; grid-template-columns: 290px minmax(0, 1fr); gap: 20px; padding: 30px 40px; align-items: start; }
.set-pass { position: sticky; top: 0; overflow: hidden; display: flex; flex-direction: column; min-height: min(640px, calc(100vh - 170px)); padding: 24px 22px 22px; border-radius: 30px; color: #fff;
  background: var(--grad); box-shadow: 0 44px 70px -38px color-mix(in srgb, var(--stone) 90%, #000), 0 0 0 1px rgba(255, 255, 255, .22) inset, 0 1px 0 rgba(255, 255, 255, .5) inset; }
.set-pass::before { content: ""; position: absolute; right: -90px; top: -80px; width: 300px; height: 300px; border-radius: 50%; background: radial-gradient(closest-side, rgba(255, 255, 255, .2), transparent); }
.set-pass::after { content: ""; position: absolute; left: -80px; bottom: -120px; width: 320px; height: 320px; border-radius: 50%; background: radial-gradient(closest-side, rgba(8, 30, 90, .38), transparent); }
.set-pass > * { position: relative; z-index: 1; }
.set-pass .rl-eyebrow { color: rgba(255, 255, 255, .9); } .set-pass .rl-eyebrow i { background: #fff; }
.set-pass h1 { display: flex; align-items: center; gap: 12px; margin: 12px 0 4px; font-family: "SF Pro Display", -apple-system, system-ui, sans-serif; font-size: 34px; line-height: 1.05; letter-spacing: -.035em; font-weight: 700; }
.set-pass h1 > span:last-child { min-width: 0; overflow-wrap: anywhere; }
.set-pass h1 .profile { flex: none; width: 40px; height: 34px; font-size: 15px; box-shadow: 0 0 0 2px rgba(255, 255, 255, .85), 0 10px 16px -8px rgba(0, 0, 0, .5); }
.set-pass .sub { margin: 0; color: rgba(255, 255, 255, .84); font-size: 13px; }
.set-otter { height: 172px; margin: 10px auto 2px; transform-origin: 50% 100%; filter: drop-shadow(0 18px 16px rgba(8, 30, 90, .4)); animation: otter-rock 3.2s ease-in-out infinite alternate; }
.set-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 12px 0 14px; }
.set-stats div { padding: 10px 4px; border-radius: 16px; text-align: center; background: rgba(255, 255, 255, .17); border: 1px solid rgba(255, 255, 255, .26); }
.set-stats b { display: block; font-family: "SF Pro Display", -apple-system, system-ui, sans-serif; font-size: 19px; letter-spacing: -.03em; line-height: 1.1; }
.set-stats small { display: block; font-size: 10.5px; opacity: .85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.set-plan { margin-top: auto; padding: 14px; border-radius: 20px; background: rgba(8, 30, 90, .26); border: 1px solid rgba(255, 255, 255, .22); }
.set-plan b { font-size: 14px; } .set-plan em { float: right; font-style: normal; font-size: 12px; opacity: .85; margin-top: 2px; }
.set-meter { display: block; height: 6px; margin: 9px 0 12px; border-radius: 99px; background: rgba(255, 255, 255, .22); overflow: hidden; } .set-meter i { display: block; height: 100%; border-radius: 99px; background: #fff; }
.set-plan button { display: flex; align-items: center; justify-content: center; gap: 7px; width: 100%; padding: 10px 16px; border-radius: 99px; background: #fff; color: #10306e; font-weight: 700; font-size: 13.5px; box-shadow: 0 12px 20px -12px rgba(0, 0, 0, .55); transition: transform .15s; }
.set-plan button:hover { transform: translateY(-1px); } .set-plan button svg { width: 15px; height: 15px; }
@keyframes rl-bob { 50% { transform: translateY(-5px); } }
@media (prefers-reduced-motion: reduce) { .set-otter { animation: none; } }

.set-right { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.set-tabs { display: flex; flex-wrap: wrap; gap: 4px; padding: 6px; border-radius: 26px; align-self: flex-start; max-width: 100%; }
.set-tabs button { display: inline-flex; align-items: center; gap: 5px; padding: 8px 11px; border-radius: 99px; font-size: 13px; font-weight: 600; color: var(--quiet); white-space: nowrap; transition: background-color .15s, color .15s; }
.set-tabs button svg { width: 15px; height: 15px; } .set-tabs button:hover { color: var(--ink); }
.set-tabs button.on { background: var(--grad); color: #fff; box-shadow: 0 12px 20px -12px var(--stone); }
.set-main { padding: 24px 26px 26px; border-radius: 28px; }
.set-main h2 { margin: 8px 0 3px; font-family: "SF Pro Display", -apple-system, system-ui, sans-serif; font-size: 30px; letter-spacing: -.035em; font-weight: 700; }
.set-main > .sub { margin: 0 0 16px; font-size: 14px; color: var(--quiet); }
.set-rows { display: flex; flex-direction: column; gap: 9px; }
.set-rows .set.st { gap: 14px; min-height: 60px; padding: 11px 16px; border-radius: 18px; border: 1px solid var(--rl-hair); background: var(--rl-chip); box-shadow: 0 10px 18px -16px var(--rl-drop); font-size: 14.5px; }
.set-rows .set + .set { border-top: 1px solid var(--rl-hair); }
.set-rows button.set.st { transition: transform .15s, box-shadow .15s; } .set-rows button.set.st:hover { transform: translateY(-1px); background: var(--rl-chip); box-shadow: 0 16px 22px -16px var(--rl-drop); }
.st-t { flex: 1; min-width: 0; font-weight: 600; color: var(--ink); } .st-t small { display: block; margin-top: 2px; font-weight: 400; font-size: 12.5px; line-height: 1.35; color: var(--quiet); }
.set.st.danger .st-t { color: var(--danger); }
.st-ico { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 11px; color: #fff; background: linear-gradient(150deg, var(--a), var(--b)); box-shadow: 0 8px 14px -8px var(--b), 0 1px 0 rgba(255, 255, 255, .45) inset; }
.st-ico svg { width: 17px; height: 17px; }
.st-ico.t-teal { --a: #39c2b0; --b: #12867a; } .st-ico.t-blue { --a: #5aa2ff; --b: #2f6be0; } .st-ico.t-violet { --a: #a48bff; --b: #6b54d6; }
.st-ico.t-amber { --a: #ffc266; --b: #f08a2c; } .st-ico.t-rose { --a: #ff9bb0; --b: #e0527a; } .st-ico.t-slate { --a: #8b9bb8; --b: #55647f; }
.st-val { display: inline-flex; align-items: center; gap: 5px; padding: 6px 8px 6px 13px; border-radius: 99px; background: color-mix(in srgb, var(--ink) 6%, transparent); font-size: 13px; font-weight: 600; color: var(--ink); white-space: nowrap; }
.st-val svg { width: 14px; height: 14px; color: var(--muted); } .st-val:empty { display: none; } .st-val.plain { padding: 6px 13px; }
.set-rows .set.st.tall { align-items: stretch; gap: 8px; padding: 14px 16px; } .set-rows .set.st.tall textarea { min-height: 56px; font-size: 14px; color: var(--ink); }
.set-rows .set input[type="text"] { font-size: 14px; font-weight: 600; color: var(--ink); } .set-rows .set input[type="date"] { font-size: 13.5px; font-weight: 600; color: var(--ink); }
.set-rows .seg { border-radius: 99px; padding: 3px; background: color-mix(in srgb, var(--ink) 7%, transparent); } .set-rows .seg button { padding: 6px 13px; border-radius: 99px; font-size: 12.5px; font-weight: 600; }
.set-rows .seg button.on { background: var(--field); box-shadow: 0 3px 8px -3px var(--rl-drop); }
.set-rows .switch { width: 44px; height: 26px; } .set-rows .switch::after { top: 3px; left: 3px; width: 20px; height: 20px; box-shadow: 0 2px 4px rgba(0, 0, 0, .25); }
.set-rows .switch.on { background: var(--grad); box-shadow: 0 6px 12px -6px var(--stone); } .set-rows .switch.on::after { transform: translateX(18px); }
.set-rows .swatches { gap: 10px; } .set-rows .swatches button { width: 24px; height: 20px; } .set-rows .swatches button.on { outline: 2px solid var(--ink); }
@media (max-width: 1320px) { .set-tabs button svg { display: none; } .set-tabs button { padding: 8px 13px; } }
@media (max-width: 1060px) { .set-page { display: block; padding: 20px 16px; } .set-pass { position: static; min-height: 0; margin-bottom: 16px; } .set-otter { height: 130px; } .set-plan { margin-top: 4px; } }
.st-val.bare { padding: 0; background: none; }

/* ---------- The Question bank's answer screen, and a photo of your working (shot.js) ---------- */
.shot-main h2 em { font-style: normal; background: var(--rl-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.shot-paper { position: relative; margin: 20px 6px 6px; padding: 7px; border-radius: 12px; background: #fffdf6; transform: rotate(-2.2deg); box-shadow: 0 26px 30px -18px rgba(8, 30, 90, .75); }
.shot-paper img { display: block; width: 100%; max-height: 230px; object-fit: cover; object-position: top; border-radius: 7px; }
.shot-paper i { position: absolute; z-index: 1; left: 50%; top: -9px; width: 74px; height: 20px; margin-left: -37px; background: rgba(255, 255, 255, .6); transform: rotate(2deg); box-shadow: 0 2px 4px rgba(0, 0, 0, .12); }
.shot-pass .set-plan button:disabled { opacity: .6; }
.shot-q { display: flex; gap: 14px; align-items: flex-start; padding: 14px 16px; border-radius: 18px; background: var(--rl-chip); border: 1px solid var(--rl-hair); box-shadow: 0 10px 18px -16px var(--rl-drop); }
.shot-q > span { flex: 1; min-width: 0; } .shot-q small { display: block; margin-bottom: 3px; font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--rl-teal); }
.shot-q .q-text { font-size: 15.5px; font-weight: 600; line-height: 1.45; color: var(--ink); } .shot-q .q-text p { margin: 0 0 6px; } .shot-q .q-text p:last-child { margin: 0; }
.shot-main .ladder { margin-top: 12px; }
.shot-seg { display: inline-flex; padding: 4px; margin: 16px 0 12px; border-radius: 99px; background: color-mix(in srgb, var(--ink) 7%, transparent); }
.shot-seg button { display: inline-flex; align-items: center; gap: 6px; padding: 8px 15px; border-radius: 99px; font-size: 13.5px; font-weight: 600; color: var(--quiet); }
.shot-seg button svg { width: 15px; height: 15px; } .shot-seg button.on { background: var(--grad); color: #fff; box-shadow: 0 10px 18px -10px var(--stone); }
.shot-main textarea { display: block; width: 100%; box-sizing: border-box; padding: 14px 16px; border-radius: 18px; border: 1px solid var(--rl-hair); background: var(--rl-field); color: var(--ink); font-size: 15px; line-height: 1.5; resize: vertical; outline: 0; }
.shot-main textarea:focus { border-color: color-mix(in srgb, var(--stone) 60%, transparent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--stone) 14%, transparent); }
.shot-main #shot-draft, .shot-main #shot-fix { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 14.5px; }
.shot-main #shot-fix { margin-top: 10px; }
.shot-main .tool-buttons { margin-top: 14px; } .shot-main .tool-buttons .btn svg, .shot-acts .btn svg { width: 16px; height: 16px; }
.shot-helpers { padding-top: 12px; border-top: 1px solid var(--rl-hair); }
.shot-drop { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 32px 20px; border-radius: 22px; cursor: pointer; border: 1.5px dashed color-mix(in srgb, var(--stone) 50%, transparent);
  background: linear-gradient(170deg, var(--rl-a), color-mix(in srgb, var(--stone) 8%, var(--rl-b))); transition: transform .15s, border-color .15s; }
.shot-drop:hover, .shot-drop.over { border-color: var(--stone); transform: translateY(-1px); } .shot-drop.over { background: color-mix(in srgb, var(--stone) 14%, var(--rl-a)); }
.shot-drop .st-ico { width: 54px; height: 54px; border-radius: 18px; margin-bottom: 6px; } .shot-drop .st-ico svg { width: 26px; height: 26px; }
.shot-drop b { font-family: "SF Pro Display", -apple-system, system-ui, sans-serif; font-size: 20px; letter-spacing: -.03em; } .shot-drop > span { color: var(--quiet); font-size: 13.5px; }
.shot-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; } .shot-acts .btn { display: inline-flex; align-items: center; gap: 7px; }
.shot-tips { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; margin-top: 12px; }
.shot-tips div { display: flex; align-items: center; gap: 10px; padding: 11px 12px; border-radius: 16px; background: var(--rl-chip); border: 1px solid var(--rl-hair); font-size: 13px; font-weight: 600; }
.shot-tips .st-ico { width: 28px; height: 28px; border-radius: 9px; } .shot-tips .st-ico svg { width: 14px; height: 14px; }
.shot-wait { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 30px 20px; text-align: center; } .shot-wait .otter { --h: 96px; } .shot-wait b { font-size: 17px; } .shot-wait span { color: var(--quiet); font-size: 13.5px; } .shot-wait .btn { margin-top: 10px; display: inline-flex; gap: 7px; align-items: center; }
.shot-note { margin: 14px 0 4px; font-size: 14px; line-height: 1.5; color: var(--quiet); } .shot-note b { color: var(--ink); }
.shot-step { display: flex; gap: 14px; align-items: flex-start; margin-top: 9px; padding: 13px 16px; border-radius: 18px; background: var(--rl-chip); border: 1px solid var(--rl-hair); box-shadow: 0 10px 18px -16px var(--rl-drop); }
.shot-step > span { flex: 1; min-width: 0; } .shot-step .st-ico { font: 700 14px -apple-system, system-ui, sans-serif; font-style: normal; }
.shot-step code { display: block; font: 600 15.5px ui-monospace, "SF Mono", Menlo, monospace; color: var(--ink); overflow-wrap: anywhere; background: none; padding: 0; }
.shot-step small { display: block; margin-top: 4px; font-size: 13px; line-height: 1.45; color: var(--quiet); } .shot-step small code { display: inline; font-size: 13.5px; }
.shot-step em { align-self: center; padding: 5px 11px; border-radius: 99px; font-style: normal; font-weight: 700; font-size: 12.5px; white-space: nowrap; background: rgba(26, 169, 127, .14); color: #0f7a5c; }
.shot-step.plain { align-items: center; padding: 10px 16px; }
.shot-step.bad { padding: 16px; border-color: rgba(224, 82, 122, .34); background: linear-gradient(135deg, rgba(255, 155, 176, .2), rgba(255, 194, 102, .16)); box-shadow: 0 22px 30px -22px #e0527a; }
.shot-step.bad small b { color: #c23a63; } .shot-step.dim { opacity: .5; }
.shot-hint { padding: 9px 12px; border-radius: 12px; background: var(--rl-chip); border: 1px solid var(--rl-hair); color: var(--ink) !important; }
:root[data-theme="dark"] .shot-step em { color: #7fe6c4; } :root[data-theme="dark"] .shot-step.bad small b { color: #ff9bb0; }
@media (max-width: 1060px) { .shot-tips { grid-template-columns: 1fr; } .shot-paper img { max-height: 160px; } }
.shot-main .tool-buttons .btn { display: inline-flex; align-items: center; gap: 7px; }

/* ---------- Mock exam (mock.js), exam timetable (dates.js), otter shop (shop.js), challenges (duel.js) ---------- */
.mock-ring { --p: 100%; margin: 18px auto 6px; width: 176px; height: 176px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(#fff 0 var(--p), rgba(255, 255, 255, .22) 0); box-shadow: 0 24px 34px -20px rgba(8, 30, 90, .7); }
.mock-ring div { width: 152px; height: 152px; border-radius: 50%; display: grid; place-items: center; align-content: center; background: linear-gradient(150deg, #129a92, #2b6fe6); }
.mock-ring b { font: 700 42px "SF Pro Display", -apple-system, system-ui, sans-serif; letter-spacing: -.04em; line-height: 1; font-variant-numeric: tabular-nums; } .mock-ring b.over { font-size: 26px; }
.mock-ring small { font-size: 11.5px; opacity: .85; margin-top: 4px; }
.mock-otter { display: grid; place-items: center; margin: 18px 0 6px; } .mock-otter .otter { --h: 150px; }
.mock-gap { display: block; height: 10px; }
.set-plan button.mock-quit { margin-top: 8px; padding: 4px; background: none; box-shadow: none; color: rgba(255, 255, 255, .85); font-weight: 600; font-size: 12.5px; }
.mock-nums { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px; border-radius: 26px; align-self: flex-start; max-width: 100%; }
.mock-nums button { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; font-size: 13.5px; font-weight: 700; color: var(--quiet); background: color-mix(in srgb, var(--ink) 6%, transparent); transition: transform .15s; }
.mock-nums button:hover { transform: translateY(-1px); }
.mock-nums button.done { background: rgba(26, 169, 127, .16); color: #0f7a5c; } .mock-nums button.flag { background: rgba(240, 138, 44, .2); color: #b8620f; }
.mock-nums button.on { background: var(--grad); color: #fff; box-shadow: 0 10px 18px -10px var(--stone); }
.mock-pill { flex: none; display: inline-flex; align-items: center; gap: 5px; padding: 5px 11px; border-radius: 99px; font-size: 12.5px; font-weight: 700; white-space: nowrap; background: rgba(26, 169, 127, .14); color: #0f7a5c; }
.mock-pill.warm { background: rgba(240, 138, 44, .18); color: #b8620f; } .mock-pill.grey { background: color-mix(in srgb, var(--ink) 7%, transparent); color: var(--quiet); }
.mock-pill .stone { width: 13px; height: 10px; border-radius: 50%; transform: rotate(-8deg); }
.mock-bar { flex: none; width: 150px; height: 8px; border-radius: 99px; background: color-mix(in srgb, var(--ink) 9%, transparent); overflow: hidden; } .mock-bar i { display: block; height: 100%; border-radius: 99px; background: var(--grad); }
.mock-bar.low i { background: linear-gradient(90deg, #ff9bb0, #f08a2c); }
.mock-grade { margin: 14px 0 4px; text-align: center; } .mock-grade b { display: block; font: 800 112px "SF Pro Display", -apple-system, system-ui, sans-serif; letter-spacing: -.06em; line-height: .95; text-shadow: 0 20px 30px rgba(8, 30, 90, .45); }
.mock-grade small { font-size: 13.5px; opacity: .9; }
.mock-points { margin-top: 4px; } .mock-page .tool-buttons .btn:disabled { opacity: .45; }
.shot-main select, .dt-add input, .dt-add select { background: var(--rl-field); border: 1px solid var(--rl-hair); border-radius: 14px; padding: 10px 12px; outline: 0; font: inherit; font-size: 14px; font-weight: 600; color: var(--ink); min-width: 0; }
.dt-add input:focus, .dt-add select:focus { border-color: color-mix(in srgb, var(--stone) 60%, transparent); }
:root[data-theme="dark"] .mock-pill, :root[data-theme="dark"] .mock-nums button.done { color: #7fe6c4; } :root[data-theme="dark"] .mock-pill.warm, :root[data-theme="dark"] .mock-nums button.flag { color: #ffc27a; } :root[data-theme="dark"] .mock-pill.grey { color: var(--quiet); }

.dt-big { margin-top: 14px; font: 800 72px "SF Pro Display", -apple-system, system-ui, sans-serif; letter-spacing: -.05em; line-height: 1; } .dt-big small { font-size: 19px; font-weight: 600; letter-spacing: -.02em; margin-left: 7px; opacity: .9; }
.dt-page .set-otter { height: 138px; }
.dt-date { flex: none; width: 50px; height: 54px; border-radius: 14px; display: grid; place-items: center; align-content: center; color: #fff; font-style: normal; background: linear-gradient(150deg, color-mix(in srgb, var(--c) 72%, #fff), var(--c)); box-shadow: 0 10px 16px -10px var(--c), 0 1px 0 rgba(255, 255, 255, .45) inset; }
.dt-date b { font: 700 21px "SF Pro Display", -apple-system, system-ui, sans-serif; line-height: 1; } .dt-date small { font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; opacity: .92; }
.dt-gone { opacity: .55; } .dt-page .set .forget svg { width: 15px; height: 15px; }
.dt-h3 { margin: 20px 0 8px; font-size: 11.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--quiet); }
.dt-add { display: grid; grid-template-columns: 1.4fr 1fr 1.1fr .9fr 1fr auto; gap: 8px; } .dt-add .btn { display: inline-flex; align-items: center; gap: 6px; }
.dt-cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; } .dt-cal span { font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--quiet); text-align: center; padding-bottom: 2px; }
.dt-cal div { min-height: 64px; padding: 6px 7px; border-radius: 14px; background: var(--rl-chip); border: 1px solid var(--rl-hair); font-size: 12px; font-weight: 700; color: var(--quiet); }
.dt-cal div.off { opacity: .35; } .dt-cal div.today { box-shadow: 0 0 0 2px #2F7BF0; color: var(--ink); }
.dt-cal em { display: block; margin-top: 4px; padding: 2px 6px; border-radius: 7px; font-style: normal; font-size: 10.5px; font-weight: 700; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; background: linear-gradient(150deg, color-mix(in srgb, var(--c) 72%, #fff), var(--c)); }
.dt-cal u { display: block; margin-top: 6px; height: 5px; border-radius: 9px; background: var(--grad); opacity: .55; }
.dt-page .add-task { margin-top: 0; } .dt-page .week-nav { margin-bottom: 10px; }

.worn { position: relative; aspect-ratio: 660 / 900; } .worn img { display: block; width: 100%; height: 100%; } .worn svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.set-otter.worn { animation: otter-rock 3.2s ease-in-out infinite alternate; margin-top: 34px; }
.den-otter.worn { width: 150px; margin-top: 44px; transform-origin: 50% 100%; animation: otter-rock 3.2s ease-in-out infinite alternate; }
.sh-page .set-otter { height: 200px; } .sh-page .set-otter.worn { margin-top: 44px; }
.den-shop { margin-top: 10px; display: inline-flex; align-items: center; gap: 6px; font-size: 13px; } .den-shop svg { width: 15px; height: 15px; }
.sh-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.sh-item { display: flex; flex-direction: column; align-items: center; gap: 7px; padding: 14px 8px 12px; border-radius: 20px; background: var(--rl-chip); border: 1px solid var(--rl-hair); box-shadow: 0 10px 18px -16px var(--rl-drop); text-align: center; transition: transform .15s, box-shadow .15s; }
.sh-item:hover { transform: translateY(-2px); box-shadow: 0 18px 24px -16px var(--rl-drop); }
.sh-item.on { box-shadow: 0 0 0 2px #2F7BF0, 0 20px 30px -20px rgba(47, 123, 240, .8); } .sh-item.lock .sh-art, .sh-item.lock .sh-scene, .sh-item.lock b { opacity: .5; }
.sh-art { width: 96px; height: 72px; filter: drop-shadow(0 8px 8px rgba(20, 30, 70, .22)); } .sh-item b { font-size: 13.5px; color: var(--ink); }
.sh-scene { display: block; width: 96px; height: 72px; border-radius: 16px; box-shadow: 0 10px 16px -10px rgba(20, 30, 70, .5), 0 1px 0 rgba(255, 255, 255, .5) inset; }

.du-vs { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 16px 0 0; } .du-vs div { text-align: center; } .du-vs > span { font-weight: 700; opacity: .8; }
.du-vs i { display: grid; place-items: center; width: 58px; height: 50px; border-radius: 50%; font: 700 21px -apple-system, system-ui, sans-serif; font-style: normal; background: rgba(255, 255, 255, .22); border: 2px solid rgba(255, 255, 255, .8); margin: 0 auto 4px; }
.du-vs b { font: 800 42px "SF Pro Display", -apple-system, system-ui, sans-serif; letter-spacing: -.04em; line-height: 1; } .du-vs small { display: block; font-size: 12px; opacity: .9; max-width: 90px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.du-page .set-otter { height: 132px; }
.du-new { grid-template-columns: 1fr 1.4fr auto; }
.du-link { display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 16px; border-radius: 99px; background: var(--rl-field); border: 1px solid var(--rl-hair); }
.du-link input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font: 600 13px ui-monospace, "SF Mono", Menlo, monospace; color: var(--quiet); } .du-link .btn { display: inline-flex; align-items: center; gap: 7px; flex: none; }
.du-opts { display: grid; gap: 9px; margin-top: 14px; }
.du-opts button { display: flex; align-items: center; gap: 14px; padding: 13px 16px; border-radius: 18px; text-align: left; background: var(--rl-chip); border: 1px solid var(--rl-hair); box-shadow: 0 10px 18px -16px var(--rl-drop); font-size: 15px; font-weight: 600; color: var(--ink); transition: transform .15s; }
.du-opts button:not(:disabled):hover { transform: translateY(-1px); border-color: color-mix(in srgb, var(--stone) 50%, transparent); }
.du-opts button i { flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 11px; font-style: normal; font-weight: 700; font-size: 14px; background: color-mix(in srgb, var(--ink) 7%, transparent); color: var(--quiet); }
.du-opts button span p { margin: 0; }
.du-opts .right { border-color: rgba(26, 169, 127, .5); background: rgba(26, 169, 127, .12); } .du-opts .right i { background: #1aa97f; color: #fff; }
.du-opts .wrong { border-color: rgba(224, 82, 122, .45); background: rgba(224, 82, 122, .1); } .du-opts .wrong i { background: #e0527a; color: #fff; } .du-opts .dim { opacity: .5; }
.du-page .st-val { cursor: pointer; }
@media (max-width: 1060px) { .dt-add, .du-new { grid-template-columns: 1fr 1fr; } .sh-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .mock-bar { width: 70px; } .mock-ring { margin-top: 12px; } }
.sh-wear { display: block; clear: both; margin: 6px 0 12px; font-size: 12.5px; line-height: 1.35; opacity: .9; }
.sh-item .mock-pill { white-space: normal; text-align: center; }
.dt-page .week { grid-template-columns: 1fr; gap: 7px; } .dt-page .day { min-height: 0; flex-direction: row; flex-wrap: wrap; align-items: flex-start; padding: 10px; border-radius: 16px; background: var(--rl-chip); border-color: var(--rl-hair); }
.dt-page .day header { width: 58px; flex: none; flex-direction: column; align-items: flex-start; gap: 2px; padding: 2px; } .dt-page .day .task, .dt-page .day .exam-mark { flex: 1 1 240px; }
.dt-page .mock-bar { width: 96px; } .dt-add { grid-template-columns: 1.3fr 1fr 1.2fr; } .dt-add.du-new { grid-template-columns: 1fr 1.4fr auto; } .dt-add .btn { justify-content: center; }

/* The shop's tiles: each item stands on a softly lit stage in its own colour */
.sh-grid { gap: 12px; } .sh-item { padding: 8px 8px 12px; border-radius: 22px; gap: 8px; }
.sh-stage { position: relative; display: grid; place-items: center; width: 100%; height: 124px; border-radius: 16px; overflow: hidden;
  background: radial-gradient(ellipse 70% 62% at 50% 46%, color-mix(in srgb, var(--c) 30%, transparent), transparent 72%), linear-gradient(180deg, color-mix(in srgb, var(--c) 9%, var(--rl-field)), color-mix(in srgb, var(--c) 17%, var(--rl-field)));
  box-shadow: 0 1px 0 rgba(255, 255, 255, .6) inset, 0 0 0 1px color-mix(in srgb, var(--c) 16%, transparent) inset; }
.sh-stage::before { content: ""; position: absolute; left: 12%; right: 12%; top: -40%; height: 70%; border-radius: 50%; background: radial-gradient(closest-side, rgba(255, 255, 255, .5), transparent); }
.sh-stage::after { content: ""; position: absolute; left: 24%; right: 24%; bottom: 11px; height: 12px; border-radius: 50%; background: radial-gradient(closest-side, color-mix(in srgb, var(--c) 55%, #1b2340), transparent); opacity: .38; }
.sh-art { position: relative; z-index: 1; width: 124px; height: 96px; filter: drop-shadow(0 10px 8px rgba(20, 30, 70, .26)); transition: transform .25s cubic-bezier(.3, 1.4, .5, 1); }
.sh-scene { position: relative; z-index: 1; width: 116px; height: 87px; border-radius: 14px; box-shadow: 0 12px 16px -10px rgba(20, 30, 70, .6), 0 0 0 3px rgba(255, 255, 255, .85); transition: transform .25s cubic-bezier(.3, 1.4, .5, 1); }
.sh-item:hover .sh-art, .sh-item:hover .sh-scene { transform: translateY(-4px) rotate(-3deg) scale(1.05); }
.sh-item.on { box-shadow: 0 0 0 2px var(--c), 0 22px 30px -20px var(--c); }
.sh-item.rare { background: linear-gradient(var(--rl-chip), var(--rl-chip)) padding-box, linear-gradient(140deg, #ffe08a, #f0a030 45%, #fff3c4 70%, #e08a1e) border-box; border: 1.5px solid transparent; }
.sh-stage em { position: absolute; z-index: 2; left: 8px; top: 8px; padding: 2px 8px; border-radius: 99px; font-style: normal; font-size: 9.5px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: #6b4300; background: linear-gradient(140deg, #fff3c4, #ffc94f); box-shadow: 0 4px 8px -4px #b8620f; }
.sh-item.lock .sh-art, .sh-item.lock .sh-scene { opacity: .55; filter: saturate(.55) drop-shadow(0 8px 8px rgba(20, 30, 70, .2)); } .sh-item.lock b { opacity: .6; }
.sh-item b { font-size: 14px; letter-spacing: -.01em; }
:root[data-theme="dark"] .sh-stage { box-shadow: 0 1px 0 rgba(255, 255, 255, .1) inset, 0 0 0 1px color-mix(in srgb, var(--c) 26%, transparent) inset; } :root[data-theme="dark"] .sh-stage::before { opacity: .25; }
.sh-item .mock-pill { white-space: nowrap; font-size: 11.5px; padding: 5px 9px; } .sh-item b { max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 13.5px; }
.sh-item.lock .sh-art, .sh-item.lock .sh-scene { opacity: .85; filter: saturate(.8) drop-shadow(0 8px 8px rgba(20, 30, 70, .2)); }
/* Shop items are pictures now: laid over the sitting otter, and shown alone on the tiles */
.worn .worn-item { position: absolute; height: auto; filter: drop-shadow(0 4px 3px rgba(40, 20, 10, .28)); }
img.sh-art { object-fit: contain; width: 128px; height: 100px; }
img.sh-art { width: 84%; height: 76%; }

/* ---------- The expression films (FILMS in app.js): thinking, sad, asleep, laughing and the rest ---------- */
.otter.film { animation: none; } .otter.film .sprite { position: absolute; inset: 0; }
.toast .otter.film { --h: 52px; margin: -11px 4px -11px 0; }
.den-otter.sprite { max-width: 100%; }
.den-moods { display: flex; flex-wrap: wrap; justify-content: center; gap: 5px; margin: 10px 0 4px; }
.den-moods button { padding: 4px 10px; border-radius: 99px; font-size: 12px; font-weight: 600; color: var(--quiet); background: color-mix(in srgb, var(--ink) 6%, transparent); transition: transform .15s; }
.den-moods button:hover { transform: translateY(-1px); color: var(--ink); } .den-moods button.on { background: var(--grad); color: #fff; box-shadow: 0 8px 14px -8px var(--stone); }
.du-mood { display: grid; place-items: center; margin: 4px 0 2px; } .du-mood .otter { --h: 150px; } .shot-wait .otter.film { --h: 110px; } .kept-empty .otter.film { --h: 96px; }
/* Until a film has loaded, the sitting otter stands in for it */
.sprite:not(.smooth):not(.wave):not(.clap):not(.party) { background: url(/otter.png) 50% 100% / contain no-repeat; }

/* The otter moves wherever it appears: page tops, empty pages, the subject picker and the how-to guides */
.rl-otter.sprite { animation: none; } .pick-otter { height: 128px; margin: 12px 0 6px; filter: drop-shadow(0 12px 12px rgba(20, 30, 70, .28)); }

/* A moving otter has no soft shadow painted around it: in the Mac app that shadow showed as a faint square around
   the film. It stands on a small shadow under its feet instead. */
.sprite.smooth, .otter.film, .otter.cheer { filter: none !important; }
.sprite.smooth::before { content: ""; position: absolute; left: 14%; right: 14%; bottom: -3%; height: 11%; border-radius: 50%; pointer-events: none;
  background: radial-gradient(closest-side, rgba(20, 30, 70, .3), rgba(20, 30, 70, .12) 60%, transparent); }
.toast .sprite.smooth::before, #live .sprite.smooth::before, .checking .sprite.smooth::before { display: none; }
.pick-otter, .gd-otter.sprite { position: relative; filter: none; }
.welcome-otter { position: relative; height: 132px; margin: 0 auto 4px; }

/* No otter anywhere uses a painted-on soft shadow (CSS filter): in the Mac app a filter shows as a faint square
   around whatever it is on. Each otter stands on a small shadow under its feet instead. */
:root .hello-otter, :root .banner-otter, :root[data-look="river"] .home .banner-otter, :root .den-otter, :root .set-otter, :root .rl-otter, :root .tp-otter,
:root .pick-side img, :root .pick-otter, :root .gd-otter, :root .worn, :root .worn img, :root .worn .worn-item, :root .otter, :root .otter img,
:root .sh-art, :root .sh-scene, :root .sh-item.lock .sh-art, :root .sh-item.lock .sh-scene { filter: none !important; }
.sh-item.lock .sh-art, .sh-item.lock .sh-scene { opacity: .6; }
.worn { isolation: isolate; }
.worn::before { content: ""; position: absolute; z-index: -1; left: 10%; right: 10%; bottom: -2%; height: 9%; border-radius: 50%; pointer-events: none;
  background: radial-gradient(closest-side, rgba(20, 30, 70, .3), rgba(20, 30, 70, .12) 60%, transparent); }

/* ---------- The menu's groups: Practise, Plan, the otter and My things fold open and shut ---------- */
.nav-group em { flex: none; display: grid; place-items: center; color: var(--muted); } .nav-group em svg { width: 14px; height: 14px; }
.nav-group.has { color: var(--ink); }
.nav-group[data-group="practise"] > svg { background: linear-gradient(150deg, #5aa2ff, #2f6be0); } .nav-group[data-group="plan"] > svg { background: linear-gradient(150deg, #39c2b0, #12867a); }
.nav-group[data-group="pip"] > svg { background: linear-gradient(150deg, #ffc266, #f08a2c); } .nav-group[data-group="things"] > svg { background: linear-gradient(150deg, #a48bff, #6b54d6); }
.nav-sub { margin: 2px 0 6px 14px; padding-left: 8px; border-left: 2px solid color-mix(in srgb, var(--ink) 8%, transparent); display: grid; gap: 1px; }
.nav-sub .nav-item { font-size: 13.5px; padding: 6px 9px; } .nav-sub .nav-item > svg { width: 22px; height: 22px; }

/* ---------- Weak spots (weak.js) ---------- */
.wk-page .set-otter { height: 150px; } .wk-kind { align-items: flex-start !important; } .wk-kind .mock-bar, .wk-kind .mock-pill { align-self: center; }
.st-t small.wk-tip { margin-top: 6px; padding: 7px 10px; border-radius: 10px; background: color-mix(in srgb, var(--stone) 8%, transparent); color: var(--ink); } .wk-tip b { font-weight: 700; }
.wk-page button.st-val { cursor: pointer; }

/* Home: what the otter says about your day, above today's three things */
.today3-pip { display: flex; align-items: baseline; gap: 8px; margin: 2px 0 12px; padding: 9px 14px; border-radius: 14px; font-size: 14px; color: var(--ink); background: color-mix(in srgb, var(--stone) 9%, transparent); }
.today3-pip b { font-weight: 700; color: var(--stone); }
#rail .nav-item.nav-group > svg { color: #fff !important; }

/* Welcome page: name your otter, under the otter */
.hello-stage { margin-bottom: 0; }
.hello-name { position: relative; z-index: 2; align-self: flex-start; margin-bottom: auto; display: inline-flex; align-items: center; gap: 12px; padding: 7px 7px 7px 18px; border-radius: 99px; font-size: 14.5px; font-weight: 600;
  color: #fff; background: rgba(255, 255, 255, .2); border: 1px solid rgba(255, 255, 255, .5); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); box-shadow: 0 14px 26px -16px rgba(8, 30, 90, .6); }
.hello-name input { width: 150px; padding: 9px 15px; border-radius: 99px; border: 0; outline: 0; background: #fff; color: #10306e; font: inherit; font-weight: 700; }
.hello-name input::placeholder { color: #9aa8c4; font-weight: 600; } .hello-name input:focus { box-shadow: 0 0 0 3px rgba(255, 255, 255, .55); }
@media (max-width: 860px) { .hello-name { align-self: center; margin-bottom: 0; } }

/* The sitting otter stands in only while a film is still loading, never between redraws */
.sprite:not(.smooth):not(.wave):not(.clap):not(.party) { background: none; }
.sprite.waiting:not(.wave):not(.clap):not(.party) { background: url(/otter.png) 50% 100% / contain no-repeat; }

/* Choosing what to learn (units.js): unit cards with a progress ring, a topic list, and the path on the pass */
.un-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; margin: 4px 0 14px; }
.un-card { position: relative; display: flex; gap: 11px; align-items: center; padding: 14px; border-radius: 22px; background: var(--rl-chip); border: 1px solid var(--rl-hair); box-shadow: 0 14px 24px -18px var(--rl-drop); text-align: left; color: var(--ink); transition: box-shadow .18s, transform .18s; }
button.un-card:hover, .un-card:has(.un-open:hover) { transform: translateY(-1px); }
.un-card.on { border-color: transparent; box-shadow: 0 0 0 2px var(--c), 0 24px 34px -22px var(--c); background: linear-gradient(140deg, color-mix(in srgb, var(--c) 9%, var(--rl-chip)), var(--rl-chip)); }
.un-card.open:not(.on) { box-shadow: 0 0 0 2px color-mix(in srgb, var(--c) 40%, transparent), 0 14px 24px -18px var(--rl-drop); }
.un-open { display: flex; gap: 11px; align-items: center; flex: 1; min-width: 0; text-align: left; color: inherit; }
.un-card .ico { flex: none; width: 44px; height: 44px; border-radius: 16px; display: grid; place-items: center; color: #fff; background: linear-gradient(145deg, color-mix(in srgb, var(--c) 62%, #fff), var(--c)); box-shadow: inset 0 1.5px 0 rgba(255, 255, 255, .55), inset 0 -3px 6px rgba(0, 0, 0, .12), 0 12px 18px -10px var(--c); }
.un-card .ico svg { width: 21px; height: 21px; }
.un-card:not(.on) .ico { opacity: .55; }
.un-card .t { flex: 1; min-width: 0; }
.un-card .t b { display: block; font-size: 14.5px; line-height: 1.2; }
.un-card .t small { display: block; font-size: 12.5px; color: var(--quiet); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.un-card .t em { font-style: normal; font-weight: 700; color: var(--c); }
.un-ring { flex: none; }
.un-tick { position: absolute; top: -7px; right: -7px; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--c); color: #fff; box-shadow: 0 0 0 3px var(--rl-chip), 0 8px 12px -6px var(--c); }
.un-tick svg { width: 14px; height: 14px; }
.un-tick.off { background: var(--rl-chip); box-shadow: 0 0 0 2px color-mix(in srgb, var(--ink) 22%, transparent); }
.un-box { border-radius: 22px; padding: 14px 16px 16px; background: color-mix(in srgb, var(--c) 6%, var(--rl-chip)); border: 1px solid var(--rl-hair); }
.un-boxh { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.un-boxh b { font-size: 15px; flex: 1; min-width: 0; }
.un-boxh span { font-size: 12.5px; color: var(--quiet); white-space: nowrap; }
.un-boxh button { font-size: 12.5px; font-weight: 700; color: #2F7BF0; white-space: nowrap; }
.un-list { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 6px 10px; }
.un-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 13px; font-size: 13.5px; font-weight: 600; background: var(--rl-chip); border: 1px solid var(--rl-hair); color: var(--quiet); text-align: left; }
.un-row i { flex: none; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; color: #fff; box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--ink) 22%, transparent); }
.un-row i svg { width: 12px; height: 12px; }
.un-row.on { color: var(--ink); }
.un-row.on i { background: linear-gradient(145deg, #5ac8f0, #2F7BF0); box-shadow: none; }
.un-row.done i { background: linear-gradient(145deg, #4fd6a8, #12A594); box-shadow: none; }
.un-row.done:not(.on) i { opacity: .5; }
.un-row span { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.un-mine { display: grid; gap: 8px; margin: 14px 0 12px; }
.un-mine h4, .un-path h4 { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; opacity: .8; margin: 0 0 2px; font-weight: 700; }
.un-mine div { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 16px; background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .22); }
.un-mine b { flex: 1; min-width: 0; font-size: 14px; line-height: 1.2; }
.un-mine small { font-size: 12px; opacity: .85; white-space: nowrap; }
.un-more { margin: 2px 0 0; font-size: 12.5px; opacity: .85; }
.un-path { margin: 16px 0 0; }
.un-path h4 { margin-bottom: 10px; }
.un-step { display: flex; gap: 12px; align-items: flex-start; position: relative; padding-bottom: 16px; }
.un-step:last-of-type { padding-bottom: 0; }
.un-step:not(:last-of-type)::before { content: ""; position: absolute; left: 12px; top: 26px; bottom: 2px; width: 2px; border-radius: 2px; background: rgba(255, 255, 255, .35); }
.un-step i { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; border: 2px solid rgba(255, 255, 255, .6); color: #1767c9; }
.un-step i svg { width: 14px; height: 14px; }
.un-step.ok i { background: #fff; border-color: #fff; }
.un-step.now i { background: #fff; border-color: #fff; box-shadow: 0 0 0 5px rgba(255, 255, 255, .28); }
.un-step.now i::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: linear-gradient(145deg, #12A594, #2F7BF0); }
.un-step b { display: block; font-size: 14px; line-height: 1.25; }
.un-step small { font-size: 12px; opacity: .85; }
.un-step.later { opacity: .72; } .un-step.out { opacity: .45; }
.un-step u { display: inline-block; text-decoration: none; font-size: 11px; font-weight: 700; padding: 2px 9px; border-radius: 99px; background: #fff; color: #1767c9; margin-left: 8px; }
.un-three { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 6px 0 18px; }
.un-three button { position: relative; padding: 16px; border-radius: 22px; text-align: left; background: var(--rl-chip); border: 1px solid var(--rl-hair); box-shadow: 0 14px 24px -18px var(--rl-drop); color: var(--ink); }
.un-three button.on { border-color: transparent; box-shadow: 0 0 0 2px #2F7BF0, 0 24px 34px -22px #2F7BF0; background: linear-gradient(140deg, color-mix(in srgb, #2F7BF0 9%, var(--rl-chip)), var(--rl-chip)); }
.un-three b { display: block; font-size: 15.5px; margin: 10px 0 4px; }
.un-three small { font-size: 12.5px; color: var(--quiet); line-height: 1.4; display: block; }
.un-foot { display: flex; align-items: center; gap: 14px; margin-top: 14px; }
.un-foot p { flex: 1; margin: 0; font-size: 13px; color: var(--quiet); line-height: 1.4; }
.un-foot p b { color: var(--ink); }
.un-foot .btn { flex: none; display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.un-foot .btn svg { flex: none; width: 16px; height: 16px; }
.un-page .set-otter { height: 132px; }
.un-page .set-pass .set-plan { margin-top: auto; }
.peb.out { opacity: .35; }
.sp-head .btn svg { width: 15px; height: 15px; margin-right: 6px; vertical-align: -2px; }
@media (max-width: 760px) { .un-grid, .un-list, .un-three { grid-template-columns: minmax(0, 1fr); } .un-foot { flex-wrap: wrap; } }
.ll-text ul { margin: 2px 0 10px; padding-left: 20px; } .ll-text li { margin: 3px 0; }

/* The lesson page (learn.js): one long page to read freely, a contents list, and a notes box */
.lr-page { flex: 1; overflow-y: auto; scrollbar-width: none; padding: 18px 20px 44px; }
.lr-head { position: relative; display: flex; align-items: center; gap: 18px; border-radius: 30px; padding: 18px 24px 18px 20px; margin-bottom: 16px; color: #fff; background: var(--grad, linear-gradient(135deg, #12A594, #2F7BF0)); box-shadow: 0 26px 40px -24px #2F7BF0, inset 0 1px 0 rgba(255, 255, 255, .35); overflow: hidden; }
.lr-head::before { content: ""; position: absolute; right: -60px; top: -90px; width: 300px; height: 300px; border-radius: 50%; background: radial-gradient(rgba(255, 255, 255, .28), transparent 65%); pointer-events: none; }
.lr-otter { flex: none; width: 92px; height: 112px; align-self: flex-end; margin: 0 0 -10px; position: relative; object-fit: contain; }
.lr-t { flex: 1; min-width: 0; position: relative; }
.lr-t small { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; font-weight: 700; opacity: .85; }
.lr-t h1 { font-size: 25px; letter-spacing: -.03em; line-height: 1.08; margin: 4px 0 10px; overflow-wrap: anywhere; }
.lr-bar { display: flex; align-items: center; gap: 10px; font-size: 12.5px; font-weight: 600; }
.lr-bar i { flex: 1; max-width: 260px; height: 8px; border-radius: 99px; background: rgba(255, 255, 255, .28); overflow: hidden; }
.lr-bar i b { display: block; height: 100%; border-radius: 99px; background: #fff; transition: width .4s; }
.lr-stats { display: flex; gap: 8px; position: relative; }
.lr-stats div { min-width: 68px; text-align: center; padding: 9px 10px; border-radius: 16px; background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .24); }
.lr-stats b { display: block; font-size: 19px; line-height: 1.1; }
.lr-stats small { font-size: 10.5px; opacity: .85; }
.lr-go { position: relative; display: grid; gap: 8px; }
.lr-go button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 10px 16px; border-radius: 99px; font-weight: 700; font-size: 13.5px; white-space: nowrap; background: #fff; color: #10306e; box-shadow: 0 12px 18px -10px rgba(8, 30, 90, .6); }
.lr-go button svg { width: 16px; height: 16px; }
.lr-go button[disabled] { opacity: .7; }
.lr-go .gh { background: rgba(255, 255, 255, .18); color: #fff; box-shadow: none; border: 1px solid rgba(255, 255, 255, .26); }
.lr-body { display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 16px; align-items: start; }
.lr-sec { border-radius: 26px; padding: 20px 24px 18px; margin-bottom: 14px; scroll-margin-top: 8px; }
.lr-sec h3 { font-size: 21px; letter-spacing: -.02em; margin: 0 0 10px; display: flex; align-items: center; gap: 10px; }
.lr-sec h3 i { flex: none; width: 28px; height: 28px; border-radius: 10px; display: grid; place-items: center; font-style: normal; font-size: 13px; font-weight: 800; color: #fff; background: linear-gradient(145deg, #12A594, #2F7BF0); }
.lr-text { font-size: 15.5px; line-height: 1.62; }
.lr-text p { margin: 0 0 10px; }
.lr-text ul { margin: 2px 0 10px; padding-left: 20px; } .lr-text li { margin: 4px 0; }
.lr-ex { display: flex; gap: 12px; padding: 12px 14px; border-radius: 16px; margin: 10px 0; background: color-mix(in srgb, #2F7BF0 9%, var(--rl-chip, var(--paper))); border: 1px solid color-mix(in srgb, #2F7BF0 22%, transparent); font-size: 14.5px; line-height: 1.5; box-shadow: 0 14px 22px -18px var(--rl-drop, rgba(20, 40, 90, .5)); }
.lr-ex b { color: #2F7BF0; white-space: nowrap; }
.lr-ex p { margin: 0; }
.lr-check { display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 99px; font-size: 13px; font-weight: 700; color: #2F7BF0; background: var(--rl-chip, var(--paper)); border: 1px solid var(--rl-hair, var(--line)); box-shadow: 0 12px 18px -12px var(--rl-drop, rgba(20, 40, 90, .5)), inset 0 1px 0 rgba(255, 255, 255, .7); margin: 2px 0 4px; }
.lr-check svg { width: 15px; height: 15px; }
.lr-q { border-radius: 18px; padding: 14px 16px; margin: 8px 0 4px; background: var(--rl-chip, var(--paper)); border: 1.5px solid #6C5CE7; }
.lr-wait { display: flex; align-items: center; gap: 10px; margin: 0; color: var(--quiet); font-size: 14px; }
.lr-wait span { width: 10px; height: 10px; border-radius: 50%; background: linear-gradient(145deg, #12A594, #2F7BF0); animation: lr-pulse 1.1s ease-in-out infinite alternate; }
@keyframes lr-pulse { from { opacity: .3; transform: scale(.8); } to { opacity: 1; transform: scale(1.15); } }
.lr-sec.waiting { opacity: .8; }
.lr-rail { display: grid; gap: 14px; position: sticky; top: 0; }
.lr-toc { border-radius: 24px; padding: 14px 12px; display: grid; gap: 2px; }
.lr-toc h4 { margin: 0 6px 6px; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--quiet); font-weight: 700; }
.lr-toc button { display: flex; align-items: center; gap: 10px; padding: 8px 9px; border-radius: 14px; font-size: 13.5px; font-weight: 600; color: var(--ink); line-height: 1.2; text-align: left; }
.lr-toc button span { flex: 1; min-width: 0; }
.lr-toc button em { flex: none; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: 11px; font-weight: 800; color: var(--quiet); box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--ink) 18%, transparent); }
.lr-toc button em svg { width: 12px; height: 12px; }
.lr-toc button.read em { background: linear-gradient(145deg, #4fd6a8, #12A594); color: #fff; box-shadow: none; }
.lr-toc button.on { background: color-mix(in srgb, #2F7BF0 11%, transparent); }
.lr-toc button.on:not(.read) em { background: linear-gradient(145deg, #12A594, #2F7BF0); color: #fff; box-shadow: none; }
.lr-toc button small { font-size: 11px; color: #12A594; font-weight: 700; white-space: nowrap; }
.lr-toc button small.soon { color: var(--quiet); font-weight: 600; }
.lr-toc button.river { margin-top: 4px; border-top: 1px solid var(--rl-hair, var(--line)); border-radius: 0 0 14px 14px; padding-top: 11px; }
.lr-toc button.river em { background: #6C5CE7; color: #fff; box-shadow: none; }
.lr-toc button[disabled] { opacity: .6; }
.lr-notes { display: flex; flex-direction: column; border-radius: 22px; padding: 14px 16px; background: color-mix(in srgb, #F5B83D 10%, var(--rl-chip, var(--paper))); border: 1px solid color-mix(in srgb, #F5B83D 30%, transparent); box-shadow: 0 18px 30px -22px var(--rl-drop, rgba(20, 40, 90, .5)); }
.lr-notes h4 { margin: 0; font-size: 15px; display: flex; align-items: center; gap: 8px; }
.lr-notes h4 svg { width: 16px; height: 16px; color: #c98a12; }
.lr-notes > small { font-size: 12px; color: var(--quiet); margin: 2px 0 10px; }
.lr-notes textarea { min-height: 240px; max-height: 46vh; resize: vertical; border: 0; outline: 0; padding: 0; font: inherit; font-size: 14px; line-height: 26.6px; color: var(--ink); background: repeating-linear-gradient(transparent 0 25.6px, color-mix(in srgb, var(--ink) 9%, transparent) 25.6px 26.6px) local; }
.lr-notes footer { display: flex; gap: 8px; align-items: center; margin-top: 10px; font-size: 12px; color: var(--quiet); min-height: 30px; }
.lr-notes footer button { margin-left: auto; padding: 6px 12px; border-radius: 99px; background: var(--rl-chip, var(--paper)); border: 1px solid var(--rl-hair, var(--line)); color: var(--ink); font-size: 12.5px; font-weight: 700; }
@media (max-width: 1020px) { .lr-head { flex-wrap: wrap; } .lr-body { grid-template-columns: minmax(0, 1fr); } .lr-rail { position: static; } .lr-go { grid-auto-flow: column; } }
.lr-text strong { background: color-mix(in srgb, #F5B83D 34%, transparent); padding: 0 3px; border-radius: 4px; font-weight: 600; }
.lr-toc { min-height: 0; height: auto; align-content: start; }
.lr-toc button { min-height: 0; height: auto; }
.lr-text > p b, .lr-text li b { background: color-mix(in srgb, #F5B83D 34%, transparent); padding: 0 3px; border-radius: 4px; font-weight: 600; }

/* Practice papers (papers.js): three exam sheets to choose from, on the lesson page's header */
.pp-sub { margin: 0; font-size: 13.5px; opacity: .9; }
.pp-main { padding: 20px 24px 22px; border-radius: 28px; }
.pp-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 16px; }
.pp-tabs button { padding: 8px 14px; border-radius: 99px; font-size: 13px; font-weight: 700; background: var(--rl-chip); border: 1px solid var(--rl-hair); color: var(--quiet); }
.pp-tabs button.on { background: linear-gradient(135deg, #12A594, #2F7BF0); color: #fff; border-color: transparent; box-shadow: 0 12px 18px -12px #2F7BF0; }
.pp-sheets { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px; margin: 0 0 16px; }
.pp-sheet { position: relative; display: flex; flex-direction: column; border-radius: 22px; padding: 0 0 16px; background: var(--rl-field, #fff); border: 1px solid var(--rl-hair); box-shadow: 0 30px 44px -30px var(--rl-drop), 0 2px 0 rgba(255, 255, 255, .5) inset; overflow: hidden; transition: transform .18s, box-shadow .18s; }
.pp-sheet:hover { transform: translateY(-4px); box-shadow: 0 0 0 2.5px var(--c), 0 34px 46px -28px var(--c); }
.pp-band { padding: 14px 18px 12px; color: #fff; background: linear-gradient(140deg, color-mix(in srgb, var(--c) 62%, #fff), var(--c)); }
.pp-band small { font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; font-weight: 700; opacity: .9; }
.pp-band b { display: block; font-size: 24px; letter-spacing: -.02em; line-height: 1.1; margin-top: 2px; }
.pp-sheet h5 { margin: 14px 18px 4px; font-size: 15.5px; }
.pp-sheet p { margin: 0 18px 12px; font-size: 12.5px; line-height: 1.45; color: var(--quiet); height: 2.9em; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.pp-two { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0 18px 12px; }
.pp-two div { padding: 8px 10px; border-radius: 14px; background: color-mix(in srgb, var(--c) 9%, transparent); }
.pp-two b { display: block; font-size: 17px; color: var(--c); }
.pp-two small { font-size: 11px; color: var(--quiet); }
.pp-rule { height: 1px; margin: auto 18px 12px; background: repeating-linear-gradient(90deg, color-mix(in srgb, var(--ink) 22%, transparent) 0 6px, transparent 6px 11px); }
.pp-go { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 0 18px; padding: 10px 16px; border-radius: 99px; font-weight: 700; font-size: 13.5px; color: #fff; background: linear-gradient(145deg, color-mix(in srgb, var(--c) 62%, #fff), var(--c)); box-shadow: 0 14px 20px -12px var(--c); }
.pp-go svg { width: 15px; height: 15px; }
.pp-sheet em { font-style: normal; font-size: 12px; color: var(--quiet); margin: 10px 18px 0; text-align: center; }
.pp-sheet.own { --c: #64748b; background: transparent; border: 1.5px dashed color-mix(in srgb, var(--ink) 22%, transparent); box-shadow: none; }
.pp-sheet.own .pp-band { background: color-mix(in srgb, var(--ink) 7%, transparent); color: var(--ink); }
.pp-sheet.own .pp-go { background: var(--rl-chip); color: var(--ink); border: 1px solid var(--rl-hair); box-shadow: 0 10px 16px -14px var(--rl-drop); }
.pp-len { display: flex; align-items: center; gap: 14px; padding: 12px 16px 12px 10px; border-radius: 22px; background: var(--rl-chip); border: 1px solid var(--rl-hair); box-shadow: 0 16px 26px -20px var(--rl-drop); }
.pp-tip { flex: none; width: 54px; height: 62px; display: grid; place-items: center; }
.pp-tip > * { width: 54px; height: 62px; position: relative; }
.pp-len > div:nth-child(2) { flex: 1; min-width: 0; }
.pp-len b { display: block; font-size: 14.5px; }
.pp-len div > small { font-size: 12.5px; color: var(--quiet); line-height: 1.4; display: block; }
.pp-seg { flex: none; display: flex; gap: 6px; padding: 5px; border-radius: 18px; background: color-mix(in srgb, var(--ink) 6%, transparent); }
.pp-seg button { padding: 8px 13px; border-radius: 13px; font-size: 12.5px; font-weight: 700; color: var(--quiet); white-space: nowrap; }
.pp-seg button small { font-weight: 500; opacity: .8; }
.pp-seg button.on { color: #fff; background: #10306e; box-shadow: 0 10px 16px -10px #10306e; }
.pp-page .shot-wait .btn { margin-top: 12px; }
.mock-src { margin: 0 0 12px; border-radius: 18px; padding: 12px 16px; background: color-mix(in srgb, #F5B83D 9%, var(--rl-chip)); border: 1px solid color-mix(in srgb, #F5B83D 30%, transparent); }
.mock-src summary { cursor: pointer; font-weight: 700; font-size: 13.5px; display: flex; align-items: center; gap: 8px; list-style: none; }
.mock-src summary svg { width: 16px; height: 16px; color: #c98a12; }
.mock-src .ll-text { margin-top: 8px; max-height: 260px; overflow-y: auto; font-size: 14.5px; white-space: pre-line; }
@media (max-width: 900px) { .pp-len { flex-wrap: wrap; } }
.pp-sheet.own { grid-column: 1 / -1; flex-direction: row; align-items: center; gap: 14px; padding: 12px 16px; }
.pp-sheet.own:hover { transform: none; box-shadow: none; }
.pp-sheet.own .pp-band { flex: none; border-radius: 14px; padding: 9px 14px; }
.pp-sheet.own .pp-band b { font-size: 16px; }
.pp-sheet.own h5 { display: none; }
.pp-sheet.own p { flex: 1; margin: 0; height: auto; font-size: 13.5px; }
.pp-sheet.own .pp-rule, .pp-sheet.own em { display: none; }
.pp-sheet.own .pp-go { flex: none; margin: 0; }
.lr-fig { margin: 12px 0; padding: 14px 16px 10px; border-radius: 18px; background: var(--rl-field, #fff); border: 1px solid var(--rl-hair, var(--line)); box-shadow: 0 16px 26px -22px var(--rl-drop, rgba(20, 40, 90, .5)); max-width: 460px; }
.lr-fig svg { display: block; width: 100%; height: auto; color: var(--ink); font-size: 11px; font-family: inherit; overflow: visible; }
.lr-fig figcaption { margin-top: 6px; font-size: 12.5px; color: var(--quiet); text-align: center; }
.lr-ex.worked { background: color-mix(in srgb, #7A5FE0 9%, var(--rl-chip, var(--paper))); border-color: color-mix(in srgb, #7A5FE0 24%, transparent); flex-direction: column; gap: 4px; }
.lr-ex.worked b { color: #7A5FE0; }
.lr-ex ol, .lr-ex ul { margin: 6px 0 0; padding-left: 20px; } .lr-ex li { margin: 3px 0; }
/* A key study inside a lesson: folded to its summary, opened for the full study (rows and evaluation as in Case studies) */
.lr-study { --c: #12A594; margin: 12px 0; padding: 12px 16px; border-radius: 16px; background: color-mix(in srgb, var(--c) 8%, var(--rl-chip, var(--paper))); border: 1px solid color-mix(in srgb, var(--c) 26%, transparent); box-shadow: 0 14px 22px -18px var(--rl-drop, rgba(20, 40, 90, .5)); }
.lr-study summary { list-style: none; cursor: pointer; display: grid; gap: 2px; }
.lr-study summary::-webkit-details-marker { display: none; }
.lr-study .k { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--c); font-weight: 700; }
.lr-study summary b { font-size: 15.5px; }
.lr-study .t { font-size: 13px; color: var(--quiet); }
.lr-study summary p { margin: 4px 0 0; font-size: 14px; line-height: 1.5; }
.lr-study summary u { margin-top: 6px; font-size: 13px; font-weight: 600; color: var(--c); text-decoration: none; }
.lr-study summary u::after { content: ' ▾'; }
.lr-study[open] summary u::after { content: ' ▴'; }
.lr-study[open] summary { margin-bottom: 6px; }
.lr-study .cs-row { font-size: 14px; }
.lr-study > .btn { margin-top: 12px; display: inline-flex; align-items: center; gap: 6px; }
.lr-study > .btn svg { width: 16px; height: 16px; }
.lr-text table { border-collapse: collapse; margin: 6px 0 12px; font-size: 14px; } .lr-text th, .lr-text td { padding: 6px 12px; border: 1px solid var(--rl-hair, var(--line)); text-align: left; } .lr-text th { background: color-mix(in srgb, var(--ink) 5%, transparent); }

/* Case studies (cases.js): a library of cards, and one case set out for study */
.cs-page .pp-tabs { margin-bottom: 12px; }
.cs-chips { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 14px; }
.cs-chips button { padding: 7px 13px; border-radius: 99px; font-size: 12.5px; font-weight: 700; background: var(--rl-chip); border: 1px solid var(--rl-hair); color: var(--quiet); }
.cs-chips button.on { background: linear-gradient(135deg, #12A594, #2F7BF0); color: #fff; border-color: transparent; box-shadow: 0 12px 18px -12px #2F7BF0; }
.cs-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.cs-card { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 16px 16px 14px; border-radius: 22px; background: var(--rl-field, #fff); border: 1px solid var(--rl-hair); box-shadow: 0 24px 36px -28px var(--rl-drop); text-align: left; color: var(--ink); transition: transform .18s, box-shadow .18s; }
.cs-card:hover { transform: translateY(-3px); box-shadow: 0 0 0 2px var(--c), 0 28px 38px -26px var(--c); }
.cs-card i { font-style: normal; align-self: flex-start; max-width: calc(100% - 34px); padding: 4px 10px; border-radius: 99px; font-size: 11px; font-weight: 800; letter-spacing: .04em; color: var(--c); background: color-mix(in srgb, var(--c) 13%, transparent); }
.cs-card b { font-size: 16px; line-height: 1.2; }
.cs-card small { font-size: 12.5px; color: var(--quiet); }
.cs-card p { margin: 2px 0 6px; font-size: 13px; line-height: 1.45; flex: 1; }
.cs-card footer { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--quiet); }
.cs-card footer u { margin-left: auto; text-decoration: none; font-weight: 700; color: #2F7BF0; }
.cs-card em { position: absolute; top: 13px; right: 13px; font-style: normal; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(145deg, #4fd6a8, #12A594); color: #fff; }
.cs-card em.again { background: linear-gradient(145deg, #ffc24f, #E8930C); }
.cs-card em svg { width: 14px; height: 14px; }
.cs-two { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 16px; align-items: start; }
.cs-list { border-radius: 24px; padding: 12px; display: grid; gap: 3px; position: sticky; top: 0; max-height: calc(100vh - 150px); overflow-y: auto; scrollbar-width: none; }
.cs-list h4 { margin: 10px 8px 4px; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--quiet); }
.cs-list button { position: relative; display: block; text-align: left; padding: 8px 30px 8px 11px; border-radius: 14px; color: var(--ink); }
.cs-list button b { display: block; font-size: 13.5px; line-height: 1.25; }
.cs-list button small { font-size: 12px; color: var(--quiet); }
.cs-list button.on { background: color-mix(in srgb, #2F7BF0 11%, transparent); }
.cs-list button em { position: absolute; right: 9px; top: 50%; margin-top: -9px; width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; background: #12A594; color: #fff; }
.cs-list button em svg { width: 11px; height: 11px; }
.cs-list .cs-back { display: flex; align-items: center; gap: 6px; padding: 8px 11px; font-size: 13px; font-weight: 700; color: #2F7BF0; }
.cs-list .cs-back svg { width: 15px; height: 15px; }
.cs-d { border-radius: 26px; padding: 22px 26px; }
.cs-d h2 { font-size: 25px; letter-spacing: -.03em; margin: 6px 0 2px; }
.cs-d .who { font-size: 13.5px; color: var(--quiet); margin: 0 0 14px; }
.cs-row { display: grid; grid-template-columns: 118px minmax(0, 1fr); gap: 14px; padding: 11px 0; border-top: 1px solid var(--rl-hair); font-size: 14.5px; line-height: 1.55; }
.cs-row > b { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--c, #2F7BF0); padding-top: 3px; }
.cs-row p { margin: 0 0 6px; } .cs-row p:last-child { margin: 0; }
.cs-ev { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 8px; }
.cs-ev div { border-radius: 16px; padding: 12px 14px; font-size: 13.5px; line-height: 1.5; }
.cs-ev p { margin: 0 0 5px; } .cs-ev p:last-child { margin: 0; }
.cs-ev .g { background: color-mix(in srgb, #12A594 10%, transparent); } .cs-ev .r { background: color-mix(in srgb, #E5484D 9%, transparent); }
.cs-ev b { display: block; margin-bottom: 4px; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
.cs-ev .g b { color: #0f7a5c; } .cs-ev .r b { color: #c0392b; }
.cs-use { margin: 14px 0 0; font-size: 13px; color: var(--quiet); } .cs-use b { color: var(--ink); }
.cs-note { display: block; margin-top: 14px; border-radius: 16px; padding: 10px 14px; background: color-mix(in srgb, #F5B83D 10%, var(--rl-chip)); border: 1px solid color-mix(in srgb, #F5B83D 30%, transparent); }
.cs-note span { display: flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 700; margin-bottom: 4px; } .cs-note span svg { width: 14px; height: 14px; color: #c98a12; }
.cs-note textarea { display: block; width: 100%; border: 0; outline: 0; background: none; resize: vertical; font: inherit; font-size: 14px; line-height: 1.5; color: var(--ink); }
.cs-q { margin-top: 14px; border-radius: 18px; padding: 14px 16px; background: var(--rl-chip); border: 1.5px solid #6C5CE7; }
.cs-foot { display: flex; gap: 10px; justify-content: flex-end; margin-top: 16px; }
.cs-foot .btn { display: inline-flex; align-items: center; gap: 7px; } .cs-foot .btn svg { width: 15px; height: 15px; }
.cs-foot .btn[aria-pressed="true"] { color: #0f7a5c; border-color: color-mix(in srgb, #12A594 40%, transparent); }
.cs-quiz { max-width: 760px; margin: 0 auto; }
@media (max-width: 900px) { .cs-two { grid-template-columns: minmax(0, 1fr); } .cs-list { position: static; max-height: 260px; } .cs-ev { grid-template-columns: 1fr; } .cs-row { grid-template-columns: 1fr; gap: 2px; } }

/* Exam practice in a lesson (learn.js): command-term pill and guide, answer box, ticked mark points, slips */
.ex-top { display: flex; align-items: center; gap: 10px; margin: 8px 0 4px; }
.ex-term { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 999px; border: 1.5px solid color-mix(in srgb, #6C5CE7 45%, transparent); background: color-mix(in srgb, #6C5CE7 12%, transparent); color: #6C5CE7; font-weight: 800; font-size: 13px; }
.ex-term svg { width: 15px; height: 15px; }
.ex-term.on, .ex-term:hover { background: color-mix(in srgb, #6C5CE7 22%, transparent); }
.ex-marks { font-size: 13px; font-weight: 700; color: var(--quiet); }
.ex-guide { margin: 8px 0 10px; padding: 12px 14px; border-radius: 14px; font-size: 13.5px; line-height: 1.5; background: color-mix(in srgb, #6C5CE7 8%, transparent); border: 1px solid color-mix(in srgb, #6C5CE7 25%, transparent); }
.ex-guide p { margin: 4px 0; }
.ex-guide small { color: var(--quiet); }
.ex-label { display: block; font-size: 13px; font-weight: 700; margin: 4px 0 6px; }
.ex-answer { width: 100%; box-sizing: border-box; min-height: 120px; padding: 12px 14px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--field); font: inherit; font-size: 14.5px; line-height: 1.5; resize: vertical; }
.ex-error { min-height: 1em; margin: 6px 0 0; font-size: 13px; color: var(--danger); }
.ex-error:empty { min-height: 0; margin: 0; }
.ex-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 14px; }
.ex-mine { margin: 4px 0 12px; padding: 10px 14px; border-radius: 14px; background: var(--soft); font-size: 14px; }
.ex-mine p { margin: 4px 0 0; white-space: pre-wrap; }
.ex-points { display: grid; gap: 8px; margin: 8px 0 4px; }
.ex-point { display: flex; gap: 12px; align-items: flex-start; text-align: left; padding: 11px 14px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--field); font-size: 14px; line-height: 1.45; }
.ex-point em { flex: none; width: 22px; height: 22px; margin-top: 1px; border-radius: 7px; border: 1.5px solid var(--line); display: grid; place-items: center; }
.ex-point em svg { width: 15px; height: 15px; }
.ex-point p { margin: 0; }
.ex-point:not([disabled]):hover { border-color: #17B38A; }
.ex-point.on { border-color: #17B38A; background: color-mix(in srgb, #17B38A 12%, transparent); }
.ex-point.on em { background: #17B38A; border-color: #17B38A; color: #fff; }
.ex-point[disabled]:not(.on) { opacity: .6; }
.ex-tip { margin-top: 10px; padding: 11px 14px; border-radius: 14px; font-size: 13.5px; background: color-mix(in srgb, #F5B83D 14%, transparent); border: 1px solid color-mix(in srgb, #F5B83D 40%, transparent); }
.ex-tip b { display: block; margin-bottom: 2px; }
.ex-tip p { margin: 0; display: inline; }
.ex-slips { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 2px; }
.ex-slip { padding: 6px 12px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--field); font-size: 13px; font-weight: 600; }
.ex-slip:hover { border-color: #FF7A59; }
.ex-slip.on { border-color: #FF7A59; background: color-mix(in srgb, #FF7A59 14%, transparent); }
.lr-toc .river.exam em svg { width: 15px; height: 15px; }
.ex-band em { width: auto; min-width: 22px; padding: 0 7px; font-style: normal; font-weight: 800; font-size: 12px; }
.ex-point.ex-band.on em { color: #fff; }

/* Tables inside lesson text (markdown | a | b | rows, drawn by plainMarkdown in app.js). Wide tables scroll sideways on phones. */
.md-table { overflow-x: auto; margin: 4px 0 12px; border: 1px solid var(--line); border-radius: 12px; }
.md-table table { border-collapse: collapse; width: 100%; font-size: .93em; line-height: 1.45; }
.md-table th, .md-table td { padding: 7px 11px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.md-table th { font-weight: 700; background: color-mix(in srgb, var(--line) 60%, transparent); }
.md-table tr:last-child td { border-bottom: none; }
.md-table td + td, .md-table th + th { border-left: 1px solid var(--line); }
