@font-face { font-family: "Atkinson"; src: url("/fonts/atkinson-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Atkinson"; src: url("/fonts/atkinson-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --paper: #f8fbf6;
  --surface: #ffffff;
  --ink: #1d3832;
  --ink-soft: #587069;
  --line: #e2ece0;
  --leaf: #37a04f;
  --leaf-deep: #2b7a3b;
  --leaf-wash: #eef8eb;
  --sun: #f5b700;
  --sun-wash: #fff8de;
  --sky: #2f7fc1;
  --amber: #c77f00;
  --amber-wash: #fff6e6;
  --good: #2e7d32;
  --good-wash: #eef9ef;
  --radius-lg: 18px;
  --radius-sm: 10px;
  --shadow: 0 1px 0 rgba(29, 56, 50, 0.04), 0 6px 18px rgba(29, 56, 50, 0.05);
  /* Diagram tokens (shared with js/diagrams) */
  --sg-ink: var(--ink);
  --sg-muted: var(--ink-soft);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0e1c18; --surface: #15281f; --ink: #e4f0e6; --ink-soft: #a7bfb2; --line: #2a4038;
    --leaf: #51b867; --leaf-deep: #8fd19e; --leaf-wash: #1d3a2a; --sun-wash: #3a3115;
    --amber: #f0b13a; --amber-wash: #3b2c10; --good: #6fcf75; --good-wash: #1c3a22;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: "Atkinson", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 18px; line-height: 1.5;
  min-height: 100dvh; display: flex; flex-direction: column;
}
button, input, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--sky); outline-offset: 2px; }
[hidden] { display: none !important; }

/* ---------- header / HUD ---------- */
.hud {
  position: sticky; top: 0; z-index: 10;
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px;
  padding: max(8px, env(safe-area-inset-top)) 14px 8px;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(8px); border-bottom: 1px solid var(--line);
}
.hud-left { font-weight: 700; font-size: 15px; color: var(--ink-soft); white-space: nowrap; }
.hud-mid { min-width: 0; }
.hud-right { display: flex; align-items: center; gap: 10px; }
.btn-quiet {
  border: 1px solid var(--line); background: var(--surface); border-radius: 999px;
  padding: 8px 14px; min-height: 44px; font-size: 15px; cursor: pointer;
}

/* The sun timer: a Time-Timer style disk that fills as time passes on a screen. */
.sun-timer { width: 40px; height: 40px; flex: none; }
.sun-timer svg { width: 100%; height: 100%; display: block; }
@keyframes sun-pulse { 50% { transform: scale(1.12); } }

/* ---------- layout ---------- */
.app { flex: 1; width: 100%; max-width: 760px; margin: 0 auto; padding: 16px 16px 120px; outline: none; }
.actionbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
  padding: 12px 16px max(12px, env(safe-area-inset-bottom));
  background: color-mix(in srgb, var(--paper) 92%, transparent); backdrop-filter: blur(8px);
  border-top: 1px solid var(--line);
  display: flex; gap: 10px; justify-content: center;
}
.actionbar > * { flex: 1; max-width: 360px; }

.btn {
  min-height: 54px; border-radius: 14px; border: 2px solid transparent; padding: 10px 18px;
  font-weight: 700; font-size: 19px; cursor: pointer; background: var(--leaf); color: #fff;
  touch-action: manipulation;
}
.btn:disabled { opacity: 0.4; cursor: not-allowed; }
.btn.secondary { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn.sun { background: var(--sun); color: #2b2100; }

.card { background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: 18px; }
.stack > * + * { margin-top: 14px; }
.muted { color: var(--ink-soft); }
.small { font-size: 15px; }
h1 { font-size: 30px; line-height: 1.15; margin: 4px 0 8px; letter-spacing: -0.01em; }
h2 { font-size: 23px; line-height: 1.25; margin: 0 0 6px; }
.topic { font-size: 15px; color: var(--leaf-deep); font-weight: 700; margin: 0 0 4px; }

/* ---------- media ---------- */
.media { border-radius: var(--radius-sm); overflow: hidden; background: var(--leaf-wash); }
.media img, .media video { display: block; width: 100%; height: auto; max-height: 42vh; object-fit: contain; background: var(--leaf-wash); }
.visual { width: 100%; }
.visual svg { display: block; width: 100%; height: auto; max-height: 52vh; }

/* ---------- profile screens ---------- */
.profiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.profile {
  display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 18px 10px;
  border-radius: var(--radius-lg); border: 2px solid var(--line); background: var(--surface); cursor: pointer; min-height: 130px;
}
.profile .avatar { font-size: 46px; line-height: 1; }
.profile.add { border-style: dashed; color: var(--ink-soft); }
.avatars { display: flex; flex-wrap: wrap; gap: 8px; }
.avatars button { font-size: 32px; width: 58px; height: 58px; border-radius: 14px; border: 2px solid var(--line); background: var(--surface); cursor: pointer; }
.avatars button[aria-pressed="true"] { border-color: var(--leaf); background: var(--leaf-wash); }
.field { display: grid; gap: 6px; }
.field input, textarea {
  border: 2px solid var(--line); border-radius: 12px; padding: 12px 14px; background: var(--surface); min-height: 52px; width: 100%;
}
.field input:focus, textarea:focus { border-color: var(--sky); outline: none; }
.pin-dots { display: flex; gap: 14px; justify-content: center; margin: 10px 0 18px; }
.pin-dots span { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--ink-soft); }
.pin-dots span.on { background: var(--leaf); border-color: var(--leaf); }
.pinpad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; max-width: 320px; margin: 0 auto; }
.pinpad button { min-height: 64px; font-size: 26px; font-weight: 700; border-radius: 16px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; touch-action: manipulation; }
.error { color: var(--amber); font-weight: 700; min-height: 1.5em; }

/* ---------- topic map (home + quest) ---------- */
.topics { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.topic-chip { display: flex; gap: 8px; align-items: center; font-size: 15px; padding: 8px 10px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
.dot { width: 14px; height: 14px; border-radius: 50%; flex: none; background: var(--line); }
.dot.learning, .dot.review { background: var(--sun); }
.dot.known { background: #5fb6a8; }
.dot.mastered { background: var(--leaf); }

/* ---------- questions ---------- */
.prompt { font-size: 21px; font-weight: 700; line-height: 1.35; margin: 0; }
.choices { display: grid; gap: 10px; }
.choice {
  text-align: left; min-height: 56px; padding: 12px 16px; border-radius: 14px; border: 2px solid var(--line);
  background: var(--surface); cursor: pointer; font-size: 18px; touch-action: manipulation;
}
.choice[aria-pressed="true"] { border-color: var(--sky); background: color-mix(in srgb, var(--sky) 10%, var(--surface)); }
.choice.is-correct { border-color: var(--good); background: var(--good-wash); }
.choice.is-wrong { border-color: var(--amber); background: var(--amber-wash); }
.tf { grid-template-columns: 1fr 1fr; }
.tf .choice { text-align: center; font-weight: 700; }
.fill-input { font-size: 22px; }

.order-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.order-item {
  display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 8px;
  padding: 10px; border-radius: 14px; border: 2px solid var(--line); background: var(--surface); font-size: 17px;
}
.order-item.picked { border-color: var(--sky); }
.order-item .num { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--leaf-wash); font-weight: 700; font-size: 15px; }
.order-item .moves { display: flex; gap: 6px; }
.order-item .moves button { width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line); background: var(--paper); font-size: 18px; cursor: pointer; }
.order-item.is-correct { border-color: var(--good); background: var(--good-wash); }
.order-item.is-wrong { border-color: var(--amber); background: var(--amber-wash); }

.tray { display: flex; flex-wrap: wrap; gap: 8px; padding: 10px; border-radius: 14px; background: var(--paper); border: 1px dashed var(--line); min-height: 62px; }
.chip {
  min-height: 46px; padding: 8px 14px; border-radius: 999px; border: 2px solid var(--line); background: var(--surface);
  cursor: grab; font-size: 17px; touch-action: none; user-select: none; -webkit-user-select: none;
}
.chip.selected { border-color: var(--sky); box-shadow: 0 0 0 3px color-mix(in srgb, var(--sky) 25%, transparent); }
.chip.dragging { opacity: 0.85; position: fixed; z-index: 50; pointer-events: none; }
.chip.placed { border-color: var(--ink-soft); }
.buckets { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.bucket { border: 2px dashed var(--line); border-radius: 16px; padding: 10px; min-height: 110px; background: var(--surface); cursor: pointer; }
.bucket h3 { font-size: 16px; margin: 0 0 8px; }
.bucket .items { display: flex; flex-wrap: wrap; gap: 6px; }
.bucket.target-ready { border-color: var(--sky); }
.chip.is-correct { border-color: var(--good); background: var(--good-wash); }
.chip.is-wrong { border-color: var(--amber); background: var(--amber-wash); }

.equation { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; padding: 12px 6px; }
.slot {
  min-width: 92px; min-height: 52px; padding: 6px 10px; border-radius: 12px; border: 2px dashed var(--ink-soft);
  display: grid; place-items: center; background: var(--surface); cursor: pointer; font-weight: 700; font-size: 18px;
}
.slot.filled { border-style: solid; border-color: var(--leaf); }
.slot.is-correct { border-color: var(--good); background: var(--good-wash); }
.slot.is-wrong { border-color: var(--amber); background: var(--amber-wash); }
.eq-op { font-size: 24px; font-weight: 700; }
.eq-arrow { display: grid; grid-template-rows: auto auto auto; justify-items: center; gap: 4px; }
.eq-arrow .shaft { font-size: 30px; line-height: 1; }
.eq-arrow .slot { min-width: 104px; min-height: 44px; font-size: 15px; }

.sg-slot { cursor: pointer; }

/* ---------- confidence + result ---------- */
.confidence { display: flex; gap: 10px; width: 100%; max-width: 560px !important; }
.confidence .btn { flex: 1; }
.result { border-radius: var(--radius-lg); padding: 16px; border: 2px solid; }
.result.good { border-color: var(--good); background: var(--good-wash); }
.result.amber { border-color: var(--amber); background: var(--amber-wash); }
.result h2 { display: flex; align-items: center; gap: 8px; }
.result .answer { font-weight: 700; }
.result .tools { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.explain-box { margin-top: 10px; padding: 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }

/* ---------- learn cards ---------- */
.learn-dots { display: flex; gap: 6px; justify-content: center; }
.learn-dots span { width: 9px; height: 9px; border-radius: 50%; background: var(--line); }
.learn-dots span.on { background: var(--leaf); }
.learn-body p { margin: 0 0 8px; font-size: 19px; }
.badge { display: inline-block; font-size: 14px; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: var(--sun-wash); color: var(--ink); }

/* ---------- break / rating ---------- */
.center { text-align: center; }
.big-timer { width: 180px; height: 180px; margin: 10px auto; }
.faces { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; }
.faces button { font-size: 38px; width: 64px; height: 64px; border-radius: 16px; border: 2px solid var(--line); background: var(--surface); cursor: pointer; }

/* ---------- strategy HUDs ---------- */
.quest-hud { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; }
.xpbar { flex: 1; height: 10px; border-radius: 999px; background: var(--line); overflow: hidden; min-width: 40px; }
.xpbar > div { height: 100%; background: var(--sun); transition: width 400ms ease; }
.calm-bar { height: 8px; border-radius: 999px; background: var(--line); overflow: hidden; }
.calm-bar > div { height: 100%; background: var(--leaf); transition: width 600ms ease; }
.sprint-hud { font-size: 14px; font-weight: 700; display: flex; gap: 10px; align-items: center; white-space: nowrap; overflow: hidden; }
.toast {
  position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%); z-index: 40;
  background: var(--ink); color: var(--paper); padding: 10px 18px; border-radius: 999px; font-weight: 700; font-size: 16px;
}
.boss { border: 2px solid var(--sun); background: var(--sun-wash); border-radius: 12px; padding: 8px 12px; font-weight: 700; font-size: 15px; }

@media (min-width: 900px) {
  .app { padding-top: 24px; }
  .prompt { font-size: 23px; }
}
@media (max-width: 420px) {
  body { font-size: 17px; }
  .hud { padding-left: 10px; padding-right: 10px; gap: 6px; }
  .hud-left { display: none; }
  .btn-quiet { padding: 6px 10px; font-size: 14px; }
  h1 { font-size: 26px; }
  .prompt { font-size: 19px; }
  .order-item { font-size: 15px; grid-template-columns: 28px 1fr auto; }
  .order-item .moves button { width: 40px; height: 40px; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* ---------- Chromebook / laptop (primary device): picture left, words right ---------- */
@media (min-width: 1000px) {
  .app { max-width: 1180px; padding: 20px 28px 110px; }
  .app > .card:not(.split) { max-width: 820px; margin-left: auto; margin-right: auto; }
  .card.split { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 28px; align-items: start; }
  .card.split > .split-media { position: sticky; top: 76px; }
  .card.split > .split-media .visual svg { max-height: calc(100vh - 220px); }
  .card.split > .split-media .media img { max-height: calc(100vh - 240px); }
  .card.split.label-q { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); }
  .kbd-hint { display: inline; }
}
.kbd-hint { display: none; font-size: 13px; color: var(--ink-soft); margin-left: 6px; }
.choice .key { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 7px; border: 1px solid var(--line); font-size: 14px; font-weight: 700; margin-right: 10px; color: var(--ink-soft); }
@media (max-width: 999px) { .choice .key { display: none; } }

/* ---------- UX review fixes ---------- */
.result { scroll-margin-bottom: 110px; }
.confidence { align-items: center; flex-wrap: wrap; }
.confidence-q { width: 100%; text-align: center; font-weight: 700; font-size: 16px; margin-bottom: 2px; }
@media (min-width: 1000px) { .confidence-q { width: auto; margin: 0 6px 0 0; } }
.card.split.label-q .split-media .visual svg { max-height: calc(100vh - 170px) !important; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.legend > span { display: inline-flex; align-items: center; gap: 6px; }
.dot { border: 1px solid rgba(0, 0, 0, 0.12); }
.dot.review { background: #f08c00; }
.topic-chip { cursor: default; }
.faces button { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; height: 76px; width: 70px; gap: 2px; }
.faces button small { font-size: 12px; color: var(--ink-soft); }
.has-selection [data-slot]:not(.tray):not(svg *) { box-shadow: 0 0 0 3px color-mix(in srgb, var(--sky) 35%, transparent); }
.read-btn.playing { border-color: var(--sky); }
.hud-right { gap: 8px; }

/* =================== App shell (sign-in, classes, topics) =================== */
:root {
  --bg: #f5f7fa;
  --brand: #3557d9;
  --brand-wash: #eef2ff;
  --shell-ink: #172033;
  --shell-soft: #5a6578;
  --shell-line: #e3e8ef;
}
body.shell { background: var(--bg); color: var(--shell-ink); }
body.shell .app { max-width: 1080px; padding-top: 28px; }
.appbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between;
  padding: 10px 24px; background: #fff; border-bottom: 1px solid var(--shell-line);
}
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--shell-ink); text-decoration: none; }
.brand span { display: grid; line-height: 1.1; }
.brand strong { font-size: 17px; }
.brand small { font-size: 12px; color: var(--shell-soft); }
.appbar-right { display: flex; align-items: center; gap: 12px; }
.who { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 15px; }
.who .av { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-wash); font-size: 18px; }

/* sign-in */
.signin { display: grid; grid-template-columns: 1fr 1.1fr; max-width: 940px; margin: 4vh auto 0; background: #fff;
  border: 1px solid var(--shell-line); border-radius: 22px; overflow: hidden; box-shadow: 0 12px 40px rgba(23, 32, 51, 0.06); }
.signin-brand { background: var(--brand); color: #fff; padding: 40px 36px; display: flex; flex-direction: column; gap: 18px; }
.signin-brand h1 { color: #fff; font-size: 32px; line-height: 1.15; margin: 8px 0 0; }
.signin-brand p { margin: 0; color: rgba(255, 255, 255, 0.86); }
.signin-brand ul { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 14px; }
.signin-brand li { display: grid; grid-template-columns: 34px 1fr; gap: 10px; align-items: start; font-size: 16px; }
.signin-brand li span:first-child { width: 34px; height: 34px; border-radius: 10px; background: rgba(255, 255, 255, 0.16); display: grid; place-items: center; }
.signin-panel { padding: 36px; display: flex; flex-direction: column; gap: 14px; min-height: 460px; }
.signin-panel h2 { font-size: 24px; margin: 0; }
.people { display: grid; gap: 8px; }
.person { display: grid; grid-template-columns: 44px 1fr auto; align-items: center; gap: 12px; padding: 10px 14px;
  border: 1px solid var(--shell-line); border-radius: 14px; background: #fff; cursor: pointer; text-align: left; min-height: 60px; }
.person:hover { border-color: var(--brand); background: var(--brand-wash); }
.person .av { width: 44px; height: 44px; border-radius: 50%; background: var(--brand-wash); display: grid; place-items: center; font-size: 24px; }
.person strong { font-size: 17px; }
.person .chev { color: var(--shell-soft); font-size: 20px; }
.linkish { background: none; border: 0; color: var(--brand); font-weight: 700; cursor: pointer; padding: 8px 0; text-align: left; min-height: 44px; }
.signin-panel .pinpad button { background: #fff; }
.signin-panel .pin-dots span.on { background: var(--brand); border-color: var(--brand); }

/* pages */
.crumbs { display: flex; gap: 8px; align-items: center; font-size: 15px; color: var(--shell-soft); margin-bottom: 6px; flex-wrap: wrap; }
.crumbs a { color: var(--brand); text-decoration: none; font-weight: 700; }
.page-head { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.page-head h1 { margin: 0; font-size: 30px; }
.page-head .sub { color: var(--shell-soft); margin: 2px 0 0; }
.chip-icon { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; font-size: 26px; flex: none; }
.section-title { font-size: 18px; margin: 28px 0 12px; }
.upnext { display: grid; grid-template-columns: auto 1fr auto; gap: 20px; align-items: center; background: #fff;
  border: 1px solid var(--shell-line); border-radius: 18px; padding: 20px 22px; }
.upnext .label { font-size: 13px; font-weight: 700; color: var(--brand); }
.upnext h2 { margin: 2px 0; font-size: 22px; }
.upnext p { margin: 0; color: var(--shell-soft); }
.grid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.course { background: #fff; border: 1px solid var(--shell-line); border-radius: 18px; padding: 18px; display: flex; flex-direction: column;
  gap: 10px; cursor: pointer; text-align: left; min-height: 170px; transition: border-color 0.15s, box-shadow 0.15s; }
.course:hover { border-color: var(--c, var(--brand)); box-shadow: 0 6px 20px rgba(23, 32, 51, 0.06); }
.course h3 { margin: 0; font-size: 19px; }
.course .teacher { color: var(--shell-soft); font-size: 14px; margin: 0; }
.course .meta { margin-top: auto; font-size: 14px; color: var(--shell-soft); }
.course.empty { cursor: default; }
.course.empty:hover { border-color: var(--shell-line); box-shadow: none; }
.bar { height: 8px; border-radius: 999px; background: var(--shell-line); overflow: hidden; }
.bar > div { height: 100%; border-radius: 999px; background: var(--c, var(--brand)); }
.topic-card { display: grid; grid-template-columns: 1fr auto; gap: 18px; align-items: center; background: #fff;
  border: 1px solid var(--shell-line); border-radius: 18px; padding: 22px; }
.topic-card h2 { margin: 0 0 4px; font-size: 22px; }
.topic-card p { margin: 0 0 12px; color: var(--shell-soft); }
.empty-state { background: #fff; border: 1px dashed var(--shell-line); border-radius: 18px; padding: 28px; color: var(--shell-soft); }
.hub { display: grid; grid-template-columns: 300px 1fr; gap: 20px; align-items: start; }
.hub-side { background: #fff; border: 1px solid var(--shell-line); border-radius: 18px; padding: 22px; display: grid; gap: 14px; justify-items: center; text-align: center; position: sticky; top: 84px; }
.hub-side .btn { width: 100%; }
.ring-label { font-size: 15px; color: var(--shell-soft); margin: -6px 0 0; }
.sections { background: #fff; border: 1px solid var(--shell-line); border-radius: 18px; overflow: hidden; }
.sections ol { list-style: none; margin: 0; padding: 0; }
.sections li { display: grid; grid-template-columns: 32px 1fr auto; gap: 12px; align-items: center; padding: 12px 18px; border-top: 1px solid var(--shell-line); }
.sections li:first-child { border-top: 0; }
.sections .n { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 700; background: var(--bg); color: var(--shell-soft); }
.pill { font-size: 13px; font-weight: 700; padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.pill.new { background: #eef1f5; color: #5a6578; }
.pill.learning { background: #fff4d6; color: #8a5a00; }
.pill.review { background: #ffe8d6; color: #9a4a00; }
.pill.known { background: #e0f4f1; color: #0f6b5c; }
.pill.mastered { background: #e3f4e4; color: #1f6b2a; }
body.shell .btn { background: var(--brand); }
body.shell .btn.secondary { background: #fff; color: var(--shell-ink); border-color: var(--shell-line); }
body.shell .btn.sun { background: var(--sun); color: #2b2100; }
@media (max-width: 860px) {
  .signin { grid-template-columns: 1fr; margin-top: 0; }
  .signin-brand { padding: 24px; }
  .signin-brand ul { display: none; }
  .hub { grid-template-columns: 1fr; }
  .hub-side { position: static; }
  .upnext { grid-template-columns: 1fr; }
  .topic-card { grid-template-columns: 1fr; }
  .appbar { padding: 8px 14px; }
  .brand small { display: none; }
}
