/* Layout: one phone-width column, sticky brand header, bottom tab bar. Navy theme for dark. */
:root {
  --navy: #2c3790; --blue: #5985c4; --sky: #5bb8e8;
  --bg: #f6f7fb; --surface: #ffffff; --tint: #eff1f7; --line: #e1e2e6;
  --ink: #232634; --muted: #5d6170; --heading: #2c3790; --accent-text: #2c3790;
  --hero: #2c3790; --hero-deep: #1e1b6e; --on-hero: #ffffff; --on-hero-muted: #dfe5ff;
  --good: #1d7a4f; --good-bg: #e3f4ea; --warn: #8a5a00; --warn-bg: #fdf0d5; --bad: #b3261e; --bad-bg: #fbe4e2;
  --chip-sky-bg: #5bb8e8; --chip-sky-fg: #1e2a6e;
  --shadow: 0 1px 2px rgba(30, 27, 110, .06), 0 4px 16px rgba(30, 27, 110, .06);
  --font: "Ubuntu", "Segoe UI", system-ui, -apple-system, sans-serif;
  --r-lg: 20px; --r-sm: 10px; --r-pill: 999px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #15134f; --surface: #1e1b6e; --tint: #26267f; --line: #3a3f96;
    --ink: #f3f5ff; --muted: #c4cbef; --heading: #ffffff; --accent-text: #8fd0f2;
    --hero: #2c3790; --hero-deep: #15134f; --on-hero: #ffffff; --on-hero-muted: #dfe5ff;
    --good: #7fdcaa; --good-bg: #1d4a3e; --warn: #ffd07a; --warn-bg: #4a3a16; --bad: #ff9c94; --bad-bg: #4e2230;
    --chip-sky-bg: #5bb8e8; --chip-sky-fg: #15134f;
    --shadow: none; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #15134f; --surface: #1e1b6e; --tint: #26267f; --line: #3a3f96;
  --ink: #f3f5ff; --muted: #c4cbef; --heading: #ffffff; --accent-text: #8fd0f2;
  --hero: #2c3790; --hero-deep: #15134f; --on-hero: #ffffff; --on-hero-muted: #dfe5ff;
  --good: #7fdcaa; --good-bg: #1d4a3e; --warn: #ffd07a; --warn-bg: #4a3a16; --bad: #ff9c94; --bad-bg: #4e2230;
  --chip-sky-bg: #5bb8e8; --chip-sky-fg: #15134f;
  --shadow: none; color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { background: var(--bg); }
body { color: var(--ink); font-family: var(--font); font-size: 15px; line-height: 1.45; -webkit-font-smoothing: antialiased; }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 30; background: var(--surface); }
h1, h2, h3 { color: var(--heading); text-wrap: balance; margin: 0; }
p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--sky); outline-offset: 2px; }
.num { font-variant-numeric: tabular-nums; }

.wrap { max-width: 520px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }

/* header */
.top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: var(--surface); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-block: 10px; }
.brand { display: flex; flex-direction: column; min-width: 0; }
.brand small { font-size: 11px; font-weight: 500; letter-spacing: .08em; color: var(--accent-text); text-transform: uppercase; }
.brand b { font-size: 19px; color: var(--heading); }
.iconbtn { width: 44px; height: 44px; border-radius: var(--r-pill); border: 0; background: var(--tint); color: var(--heading); display: inline-grid; place-items: center; cursor: pointer; flex-shrink: 0; }

.demo { background: var(--warn-bg); color: var(--warn); }
.demo .wrap { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-block: 8px; font-size: 13px; flex-wrap: wrap; }
.demo button { border: 0; background: var(--navy); color: #fff; border-radius: var(--r-pill); padding: 8px 14px; font-weight: 500; cursor: pointer; font-size: 13px; }

main { padding-block: 16px 110px; display: flex; flex-direction: column; gap: 18px; }
section { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.h-row { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
h2 { font-size: 19px; line-height: 1.25; }
.lead { color: var(--muted); font-size: 14px; }

/* cards */
.card { background: var(--surface); border-radius: var(--r-lg); padding: 16px; box-shadow: var(--shadow); border: 1px solid var(--line); min-width: 0; }
.soft { background: var(--tint); border-radius: var(--r-lg); padding: 14px 16px; }
.hero { background: var(--hero); color: var(--on-hero); border-radius: var(--r-lg); padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.hero h2, .hero b { color: var(--on-hero); }
.hero .muted { color: var(--on-hero-muted); }
.bignum { font-size: 46px; line-height: 1; font-weight: 700; }
.mid { font-size: 28px; line-height: 1; font-weight: 700; }
.bar { height: 12px; border-radius: var(--r-pill); background: var(--hero-deep); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: var(--r-pill); background: var(--sky); }
.split { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }

.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.win { background: var(--tint); border-radius: var(--r-lg); padding: 14px; display: flex; flex-direction: column; gap: 4px; }
.win b.mid { color: var(--heading); }

.alert { border-radius: var(--r-sm); padding: 12px 14px; font-size: 14px; display: flex; gap: 10px; align-items: flex-start; }
.alert.bad { background: var(--bad-bg); color: var(--bad); }
.alert.warn { background: var(--warn-bg); color: var(--warn); }
.alert.info { background: var(--tint); color: var(--ink); }
.alert svg { flex-shrink: 0; margin-top: 1px; }

/* subject rows */
.rows { display: flex; flex-direction: column; }
.row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.row:last-child { border-bottom: 0; }
.row .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.row .end { text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.row b { font-weight: 500; }
.grade { font-weight: 700; color: var(--heading); }
.trend { font-size: 12px; font-weight: 500; }
.trend.up { color: var(--good); } .trend.down { color: var(--bad); }

/* chips */
.chip { display: inline-flex; align-items: center; gap: 4px; border-radius: var(--r-pill); padding: 3px 10px; font-size: 12px; font-weight: 500; white-space: nowrap; }
.chip.navy { background: var(--navy); color: #fff; }
.chip.sky { background: var(--chip-sky-bg); color: var(--chip-sky-fg); font-weight: 700; }
.chip.likely { background: var(--good-bg); color: var(--good); }
.chip.reach { background: var(--warn-bg); color: var(--warn); }
.chip.long, .chip.req { background: var(--bad-bg); color: var(--bad); }
.chip.test, .chip.nopoints { background: var(--tint); color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }

/* buttons */
.btn { border: 0; border-radius: var(--r-pill); min-height: 48px; padding: 0 22px; font-weight: 500; font-size: 16px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; }
.btn.primary { background: var(--navy); color: #fff; }
.btn.secondary { background: var(--sky); color: #1e2a6e; }
.btn.ghost { background: transparent; color: var(--accent-text); border: 1.5px solid currentColor; }
.btn.small { min-height: 38px; font-size: 14px; padding: 0 14px; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: default; }
.linkbtn { border: 0; background: none; color: var(--accent-text); font-weight: 500; cursor: pointer; padding: 6px 0; font-size: 14px; }
.btns { display: flex; flex-direction: column; gap: 10px; }

/* forms */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field label, .lbl { font-size: 13px; font-weight: 500; color: var(--muted); }
input[type=text], input[type=number], input[type=date], input[type=search], select, textarea {
  width: 100%; min-height: 46px; border: 1.5px solid var(--line); background: var(--surface); border-radius: var(--r-sm); padding: 10px 12px; }
textarea { min-height: 80px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--sky); outline: none; }
.form { display: flex; flex-direction: column; gap: 12px; }
.frow { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.check { display: flex; gap: 10px; align-items: center; font-size: 14px; }
.check input { width: 20px; height: 20px; accent-color: var(--navy); }

/* plan */
.day { display: flex; flex-direction: column; gap: 8px; }
.dayhead { display: flex; justify-content: space-between; align-items: baseline; border-bottom: 2px solid var(--heading); padding-bottom: 4px; }
.dayhead h3 { font-size: 17px; }
.dayhead.today h3::after { content: "Today"; margin-left: 8px; font-size: 11px; font-weight: 700; background: var(--sky); color: #1e2a6e; padding: 2px 8px; border-radius: var(--r-pill); vertical-align: 2px; }
.sess { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.sess.done { opacity: .62; }
.sess.done .stitle { text-decoration: line-through; }
.sess.testday { background: var(--tint); border-style: dashed; }
.shead { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.shead .mins { margin-left: auto; font-size: 13px; color: var(--muted); }
.stick { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; }
.stick input { width: 22px; height: 22px; margin: 0; accent-color: var(--navy); flex-shrink: 0; }
.stitle { font-weight: 500; font-size: 15px; }
details summary { cursor: pointer; color: var(--accent-text); font-size: 14px; font-weight: 500; list-style: none; padding: 4px 0; }
details summary::-webkit-details-marker { display: none; }
details summary::before { content: "+ "; }
details[open] summary::before { content: "\2212 "; }
ol.steps { margin: 6px 0 0; padding-left: 20px; display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
.why { font-size: 13px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 8px; margin-top: 6px; }
.why b { color: var(--heading); font-weight: 700; }
.rest { color: var(--muted); font-size: 14px; padding: 8px 0; }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.stat { background: var(--tint); border-radius: var(--r-sm); padding: 10px 12px; display: flex; flex-direction: column; }
.stat span { font-size: 12px; color: var(--muted); }
.stat b { font-size: 18px; color: var(--heading); }
.progress { height: 8px; background: var(--tint); border-radius: var(--r-pill); overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--navy); }

/* tabs */
.tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; background: var(--surface); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom, 0px); padding-left: env(safe-area-inset-left, 0px); padding-right: env(safe-area-inset-right, 0px); }
.tabs .wrap { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); padding-block: 4px; }
.tab { border: 0; background: none; display: flex; flex-direction: column; align-items: center; gap: 3px; min-height: 54px; justify-content: center; font-size: 11px; color: var(--muted); cursor: pointer; }
.tab[aria-current="page"] { color: var(--accent-text); font-weight: 700; }

/* sheet */
.sheet { position: fixed; inset: 0; z-index: 40; background: rgba(10, 10, 40, .45); display: flex; align-items: flex-end; justify-content: center; }
.sheet .panel { background: var(--bg); width: 100%; max-width: 560px; max-height: 92%; overflow: auto; border-radius: 22px 22px 0 0; padding: 18px max(16px, env(safe-area-inset-right, 0px)) calc(24px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); display: flex; flex-direction: column; gap: 14px; }
.sheet .phead { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.toast { pointer-events: none; position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(80px + env(safe-area-inset-bottom, 0px)); background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: var(--r-pill); font-size: 14px; z-index: 50; max-width: calc(100% - 32px); }

/* search results */
.results { display: flex; flex-direction: column; gap: 8px; }
.cres { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); }
.cres .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.cres .t { font-weight: 500; font-size: 14px; }
.cres .s { font-size: 12px; color: var(--muted); }

.reqs { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.reqs li { display: flex; gap: 8px; align-items: baseline; }
.reqs .ok { color: var(--good); font-weight: 700; }
.reqs .no { color: var(--bad); font-weight: 700; }

.subedit { display: grid; grid-template-columns: minmax(0, 1fr) 58px 68px 40px; gap: 6px; align-items: end; }
.subedit select, .subedit input { padding-inline: 8px; }
.steps-nav { display: flex; gap: 6px; }
.steps-nav i { flex: 1; height: 4px; border-radius: 4px; background: var(--line); }
.steps-nav i.on { background: var(--navy); }
.daygrid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.daygrid .field label { text-align: center; }
.daygrid input { padding: 8px 4px; text-align: center; }

.email { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.email .ehead { background: var(--hero); color: #fff; padding: 16px; display: flex; flex-direction: column; gap: 4px; }
.email .ehead small { font-size: 11px; letter-spacing: .08em; color: var(--sky); font-weight: 500; }
.email .ehead b { font-size: 22px; color: #fff; }
.email .ebody { padding: 16px; display: flex; flex-direction: column; gap: 16px; }
.email h3 { font-size: 16px; }
svg text { fill: var(--muted); font-family: var(--font); }

@media (prefers-reduced-motion: no-preference) {
  .bar i, .progress i { transition: width .4s ease; }
}
@media (min-width: 700px) {
  main { padding-block: 24px 110px; }
}

.seg { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); background: var(--tint); border-radius: var(--r-pill); padding: 4px; gap: 4px; }
.seg button { border: 0; background: transparent; border-radius: var(--r-pill); min-height: 40px; font-size: 13px; font-weight: 500; color: var(--muted); cursor: pointer; padding: 0 6px; }
.seg button.on { background: var(--navy); color: #fff; }

.srow { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.srow details { flex: 1; min-width: 0; }
.srow-b { flex-shrink: 0; }

.mtile { background: var(--surface); border: 1.5px solid var(--line); border-radius: 14px; padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; }
.mtile.on, .mtile:has(input:checked) { border-color: var(--navy); background: var(--tint); }
.mcheck { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; }
.mcheck input { width: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--navy); flex-shrink: 0; }
.mcheck > span { display: flex; flex-direction: column; gap: 2px; }
.mcheck b { color: var(--heading); }

.timer { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 18px 0; background: var(--tint); border-radius: var(--r-lg); }
.tclock { font-size: 64px; font-weight: 700; color: var(--heading); line-height: 1; }
body.readmode { font-family: "Lexend", var(--font); font-size: 17px; line-height: 1.7; letter-spacing: .01em; word-spacing: .06em; }
body.readmode .small { font-size: 15px; }
body.readmode ol.steps { font-size: 16px; gap: 8px; }
body.readmode .stitle { font-size: 16px; }
:root { --read-bg: #fbf8f1; }
body.readmode, body.readmode html { background: var(--read-bg); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --read-bg: #15134f; } }
:root[data-theme="dark"] { --read-bg: #15134f; }

.rag-list { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.rag-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 10px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.rag-row:last-child { border-bottom: 0; }
.rag-t { flex: 1 1 160px; min-width: 0; }
.rag-row select { width: auto; min-height: 38px; padding: 6px 10px; flex: 0 0 auto; }
.rag { display: inline-flex; gap: 4px; }
.rag-b { position: relative; }
.rag-b input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.rag-b span { display: inline-block; font-size: 12px; font-weight: 500; padding: 6px 9px; border-radius: var(--r-pill); border: 1.5px solid var(--line); color: var(--muted); }
.rag-b input:focus-visible + span { outline: 2px solid var(--sky); outline-offset: 2px; }
.rag-b.red input:checked + span { background: var(--bad-bg); color: var(--bad); border-color: var(--bad); }
.rag-b.amber input:checked + span { background: var(--warn-bg); color: var(--warn); border-color: var(--warn); }
.rag-b.green input:checked + span { background: var(--good-bg); color: var(--good); border-color: var(--good); }
.rate { display: flex; flex-direction: column; gap: 6px; background: var(--tint); border-radius: var(--r-sm); padding: 10px 12px; }
.tmap { display: flex; flex-direction: column; gap: 4px; border-top: 1px solid var(--line); padding-top: 10px; }

.qlinks { display: flex; flex-direction: column; gap: 8px; background: var(--tint); border-radius: 12px; padding: 10px 12px; margin-top: 8px; }
.qlinks .chips { display: flex; flex-wrap: wrap; gap: 8px; }
.qlinks a.btn { text-decoration: none; }

ol.steps ul.sub { margin: 6px 0 2px; padding-left: 18px; list-style: disc; display: flex; flex-direction: column; gap: 3px; font-size: .95em; }

/* 1.9.0: detailed topics (Irish pilot) */
.sfocus { color: var(--heading); }
.sfocus b { font-weight: 700; }
.sreason { margin-top: -4px; }
ul.cover, ul.tips { margin: 6px 0 0; padding-left: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
ul.cover .check { align-items: flex-start; font-size: 14px; }
ul.cover .check input { margin-top: 1px; flex-shrink: 0; }
ul.cover .check input:checked + span { text-decoration: line-through; color: var(--muted); }
ul.tips { padding-left: 18px; list-style: disc; }
details.cover p, details.tips p { margin: 8px 0 0; }

/* 1.12.0: navy on every device, subject colours, Today card, focus mode */
:root, :root[data-theme="light"] {
  --bg: #15134f; --surface: #1e1b6e; --tint: #26267f; --line: #3a3f96;
  --ink: #f3f5ff; --muted: #c4cbef; --heading: #ffffff; --accent-text: #8fd0f2;
  --hero: #2c3790; --hero-deep: #15134f; --on-hero: #ffffff; --on-hero-muted: #dfe5ff;
  --good: #7fdcaa; --good-bg: #1d4a3e; --warn: #ffd07a; --warn-bg: #4a3a16; --bad: #ff9c94; --bad-bg: #4e2230;
  --chip-sky-bg: #5bb8e8; --chip-sky-fg: #15134f;
  --shadow: none; color-scheme: dark;
}
.btn.primary { background: var(--sky); color: #15134f; font-weight: 700; }
.btn.secondary { background: var(--hero); color: #ffffff; }
.chip.subj { color: #15134f; font-weight: 700; }
.subj-badge { width: 44px; height: 44px; border-radius: 14px; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 15px; color: #15134f; flex-shrink: 0; }
.dot-subj { display: inline-block; width: 10px; height: 10px; border-radius: 999px; margin-right: 8px; vertical-align: 1px; }
.hello { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.hello h1 { font-size: 26px; }
.streak { display: inline-flex; align-items: center; gap: 6px; background: var(--hero); border-radius: 999px; padding: 8px 14px; font-size: 13px; color: #dfe5ff; white-space: nowrap; }
.streak b { color: #ffc35c; font-size: 15px; }
.today { display: flex; flex-direction: column; gap: 10px; }
.today .trow { background: var(--surface); border-radius: 18px; padding: 12px 12px 12px 14px; display: flex; align-items: center; gap: 12px; }
.today .trow.done { opacity: .6; }
.today .trow.done .ttl { text-decoration: line-through; }
.today .ttl { font-size: 15px; font-weight: 500; color: var(--ink); }
.today .tick { width: 44px; height: 44px; border-radius: 999px; border: 2px solid var(--sky); background: transparent; color: var(--sky); display: flex; align-items: center; justify-content: center; flex-shrink: 0; cursor: pointer; padding: 0; }
.today .trow.done .tick { background: var(--sky); color: #15134f; }
.today .go { height: 56px; font-size: 17px; }
.sheet.focus { align-items: stretch; background: #15134f; }
.sheet.focus .panel { max-width: 560px; max-height: none; height: 100%; border-radius: 0; background: #15134f; display: flex; flex-direction: column; gap: 18px; padding: 20px 20px calc(24px + env(safe-area-inset-bottom, 0px)); }
.focus .ring { position: relative; width: 240px; height: 240px; margin: 0 auto; }
.focus .ring svg { position: absolute; inset: 0; }
.focus .ring .mid { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; text-align: center; padding: 0 30px; }
.focus .ring .tclock { font-size: 54px; color: #ffffff; }
.focus .stepcard { background: var(--surface); border-radius: 22px; padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; }
.focus .stepdots { display: flex; gap: 6px; }
.focus .stepdots i { flex: 1; height: 6px; border-radius: 999px; background: var(--line); }
.focus .stepdots i.on { background: var(--sky); }
.focus .steplbl { font-size: 13px; font-weight: 500; color: var(--sky); letter-spacing: .04em; text-transform: uppercase; }
.focus .steptxt { font-size: 18px; line-height: 26px; font-weight: 500; color: #ffffff; }
.focus .fbtns { display: flex; gap: 12px; margin-top: auto; }
.focus .fbtns .btn { flex: 1; min-height: 56px; font-size: 16px; }
.focus .btn.outline { background: transparent; border: 2px solid var(--sky); color: #ffffff; font-weight: 700; }
.focus .hint { text-align: center; font-size: 13px; color: var(--muted); }
.done-badge { width: 104px; height: 104px; border-radius: 999px; background: var(--sky); color: #15134f; display: flex; align-items: center; justify-content: center; margin: 12px auto 0; }
.done-head { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.done-head h2 { font-size: 28px; color: #ffffff; }
.rate3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.rate3 button { min-height: 80px; border-radius: 16px; border: 2px solid; font: inherit; font-size: 13px; font-weight: 500; color: #ffffff; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; cursor: pointer; padding: 6px; }
.rate3 .r-struggled { border-color: #ff9c94; background: #4e2230; }
.rate3 .r-gaps { border-color: #ffd07a; background: #4a3a16; }
.rate3 .r-nailed { border-color: #7fdcaa; background: #1d4a3e; }
input[type="checkbox"], input[type="radio"] { accent-color: #5bb8e8; }
.stick input { border-radius: 6px; }
.toast { border-radius: 16px; background: #ffffff; color: #15134f; max-width: calc(100% - 40px); text-align: center; }

/* 1.13.0: streak protection, topic paths, Monday recap */
button.streak, button.chip { border: 0; font: inherit; cursor: pointer; }
button.chip { font-size: 13px; padding: 7px 12px; }
.chip.subj.pathchip { min-height: 36px; }
.savecard { background: #3a2f2a; border-radius: 18px; padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.savecard p { color: #fff3dc; font-size: 15px; line-height: 22px; }
.savecard.good { background: #1d4a3e; }
.savecard.good p { color: #e3f4ea; }
.savecard .btn { min-height: 52px; }
.btn.outline { background: transparent; border: 2px solid var(--sky); color: #ffffff; font-weight: 700; }
.streakbig { background: var(--surface); border-radius: 24px; padding: 22px 18px; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.streakbig > b { font-size: 52px; line-height: 1; color: #ffc35c; }
.streakbig > span { color: #dfe5ff; }
.wdays { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; width: 100%; margin-top: 8px; }
.wday { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.wday i { width: 36px; height: 36px; border-radius: 999px; border: 2px solid var(--line); box-sizing: border-box; display: flex; align-items: center; justify-content: center; font-style: normal; font-size: 10px; font-weight: 700; color: #15134f; }
.wday i.on { background: #ffc35c; border-color: #ffc35c; }
.wday i.free { background: #8fd0f2; border-color: #8fd0f2; }
.wday i.rest { color: var(--muted); }
.wday i.now { border-color: #ffc35c; }
.pathtabs { flex-wrap: nowrap; overflow-x: auto; flex: 1; min-width: 0; padding-bottom: 2px; }
.pbar { flex-shrink: 0; min-height: 10px; height: 10px; border-radius: 999px; background: var(--surface); overflow: hidden; display: flex; }
.pbar i { display: block; height: 100%; }
ol.path { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
ol.path li { display: flex; align-items: center; gap: 12px; }
ol.path li.pm { padding-left: 25%; }
ol.path li.pr { padding-left: 50%; }
.pnode { width: 60px; height: 60px; border-radius: 999px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 12px; font-weight: 700; color: #15134f; border: 0; padding: 0; }
.pnode.green { background: #7fdcaa; }
.pnode.amber { background: #ffd07a; }
.pnode.red { background: #ff9c94; }
.pnode.none { background: var(--surface); border: 3px solid var(--line); box-sizing: border-box; }
.pnode.here { width: 72px; height: 72px; background: var(--sky); box-shadow: 0 0 0 7px rgba(91, 184, 232, .25); cursor: pointer; }
.plabel { font-size: 14px; color: var(--ink); display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.plabel b { font-size: 11px; letter-spacing: .05em; text-transform: uppercase; color: var(--sky); }
.rstats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.rstats > div { background: var(--surface); border-radius: 18px; padding: 14px 8px; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.rstats b { font-size: 28px; }
.rstats span { font-size: 12px; color: var(--muted); }
.rbar { display: flex; align-items: center; gap: 10px; font-size: 13px; color: #dfe5ff; }
.rbar > span:first-child { width: 96px; flex-shrink: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rbar > div { flex: 1; height: 12px; border-radius: 999px; background: #15134f; overflow: hidden; }
.rbar > div i { display: block; height: 100%; border-radius: 999px; }
.rbar > span:last-child { width: 40px; text-align: right; color: var(--muted); }
.sheet.focus .panel h2 { color: #ffffff; }

/* 1.14.0: Tonight screen, key dates, what if */
.tabs .wrap { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.tab { font-size: 10.5px; min-width: 0; }
.tonight { background: var(--surface); border: 1px solid var(--line); border-radius: 24px; padding: 18px 16px 16px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.tn-title { font-size: 26px; line-height: 1.2; color: var(--heading); overflow-wrap: anywhere; }
.tn-meta { font-size: 15px; color: var(--accent-text); font-weight: 700; }
.tn-box { background: var(--tint); border-radius: 16px; padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; font-size: 15px; line-height: 22px; min-width: 0; }
.tn-box > b { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--sky); }
.tn-box .qlinks { display: flex; flex-direction: column; gap: 8px; }
.btn.tn-go { min-height: 60px; font-size: 19px; background: var(--sky); color: #15134f; font-weight: 800; }
.tn-dots { display: flex; gap: 8px; justify-content: center; }
.tn-dots i { width: 12px; height: 12px; border-radius: 999px; background: var(--line); }
.tn-dots i.on { background: var(--good); }
.tn-dots i.now { background: var(--sky); box-shadow: 0 0 0 4px rgba(91, 184, 232, .25); }
.countdown { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; width: 100%; text-align: left; border: 0; cursor: pointer; font: inherit; background: var(--warn-bg); color: var(--warn); border-radius: 16px; padding: 12px 14px; }
.countdown b { font-size: 22px; }
.countdown span { font-size: 14px; color: var(--ink); }
.wi-out { background: var(--tint); border-radius: 18px; padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; }
.wi-total { display: flex; justify-content: space-between; align-items: flex-end; gap: 10px; }
.wi-diff { font-size: 18px; font-weight: 800; color: var(--muted); }
.wi-diff.up { color: var(--good); }
.wi-diff.down { color: var(--bad); }
.wi-list { display: flex; flex-direction: column; gap: 14px; margin: 14px 0 6px; }
.wi-row { display: flex; flex-direction: column; gap: 6px; }
.wi-row label { font-weight: 700; color: var(--heading); display: flex; align-items: center; gap: 6px; min-width: 0; }
.wi-row input[type=range] { width: 100%; height: 32px; margin: 0; cursor: pointer; }
