/* Ward Round. Palette borrowed from the ward: scrub petrol, chart paper, and the
   green / amber / red bands of an observation chart for anything that is a score. */
:root {
  --paper: #EDF1F0; --surface: #FFFFFF; --ink: #10262B; --muted: #56696D; --line: #D5DDDC;
  --petrol: #0E5A63; --petrol-deep: #093E45; --petrol-wash: #DCEBEA;
  --good: #2C8F62; --mid: #D99A06; --low: #C4432F; --flag: #B7791F;
  --good-wash: #E1F2EA; --low-wash: #FBE9E5; --mid-wash: #FBF1D6;
  --grid: #C9D9D6; --shadow: 0 1px 2px rgba(16, 38, 43, .06), 0 8px 24px -12px rgba(16, 38, 43, .18);
  --display: 'Bricolage Grotesque', 'Segoe UI', system-ui, sans-serif;
  --body: 'Atkinson Hyperlegible', 'Segoe UI', system-ui, sans-serif;
}
[data-theme="dark"] {
  --paper: #0C1D21; --surface: #132A2F; --ink: #E6EFEE; --muted: #9DB2B4; --line: #264247;
  --petrol: #5CC2C9; --petrol-deep: #0A3238; --petrol-wash: #1B3D43;
  --good: #4FC08A; --mid: #EBB93A; --low: #EF7A66; --flag: #EBB93A;
  --good-wash: #163A2C; --low-wash: #40211C; --mid-wash: #3B3013; --grid: #1F3B40;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3);
}
* { box-sizing: border-box; }
html { font-size: 17px; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--body); line-height: 1.55; -webkit-font-smoothing: antialiased; }
h1, h2, h3 { font-family: var(--display); line-height: 1.15; margin: 0; letter-spacing: -.01em; }
h1 { font-size: 1.9rem; font-weight: 700; } h2 { font-size: 1.15rem; font-weight: 700; } h3 { font-size: .95rem; font-weight: 500; color: var(--muted); margin: 1.1rem 0 .4rem; }
p { margin: .5rem 0; } a { color: var(--petrol); }
.num { font-variant-numeric: tabular-nums; font-family: var(--display); font-weight: 700; }
.hint, small { color: var(--muted); font-size: .88rem; } small { display: block; font-weight: 400; }
:focus-visible { outline: 3px solid var(--mid); outline-offset: 2px; border-radius: 4px; }
.t-low { color: var(--low); } .t-mid { color: var(--flag); }

/* ---- Shell ---- */
.shell { display: grid; grid-template-columns: 232px minmax(0, 1fr); min-height: 100vh; }
.side { background: var(--petrol-deep); color: #DDEDEC; padding: 1.5rem 1rem; display: flex; flex-direction: column; gap: 1.5rem; position: sticky; top: 0; height: 100vh; }
.brand { display: flex; gap: .7rem; align-items: center; color: #fff; text-decoration: none; font-family: var(--display); font-weight: 700; font-size: 1.2rem; line-height: 1.1; padding: 0 .5rem; }
.brand small { font-family: var(--body); color: #9CC3C4; font-size: .72rem; margin-top: .2rem; }
.brand-mark { width: 30px; height: 30px; border-radius: 8px; flex: none; background:
  linear-gradient(#fff, #fff) center/4px 16px no-repeat, linear-gradient(#fff, #fff) center/16px 4px no-repeat, #1B8A93; }
.side-links { display: grid; gap: 2px; }
.side-links a { color: #C9E0DF; text-decoration: none; padding: .55rem .75rem; border-radius: 8px; }
.side-links a:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.side-links a.on { background: #fff; color: var(--petrol-deep); font-weight: 700; }
.side-foot { margin-top: auto; font-size: .8rem; color: #9CC3C4; padding: 0 .5rem; }
.main { min-width: 0; padding: 2.2rem clamp(1rem, 4vw, 3rem) 5rem; max-width: 1180px; width: 100%; }
.head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1.5rem; flex-wrap: wrap; margin-bottom: 1.4rem; }
.back { font-size: .85rem; text-decoration: none; display: inline-block; margin-bottom: .3rem; }
.back::before { content: '‹ '; }
.row { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; } .row.end { justify-content: flex-end; margin-top: 1.2rem; } .row.tight { gap: 1rem; margin: .4rem 0; }

/* ---- Buttons and fields ---- */
.btn { font: inherit; font-weight: 700; font-size: .92rem; padding: .6rem 1rem; border-radius: 9px; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; }
.btn:hover { border-color: var(--petrol); }
.btn.primary { background: var(--petrol); border-color: var(--petrol); color: #fff; }
[data-theme="dark"] .btn.primary { color: #062126; }
.btn.primary:hover { filter: brightness(1.1); }
.btn.danger { color: var(--low); } .btn.wide { width: 100%; justify-content: center; padding: .8rem; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.link { font: inherit; font-size: .88rem; background: none; border: 0; padding: 0; color: var(--petrol); cursor: pointer; text-decoration: underline; } .link.danger { color: var(--low); }
label { display: grid; gap: .3rem; font-weight: 700; font-size: .92rem; }
input[type=text], input:not([type]), input[type=number], select, textarea, input[type=file] { font: inherit; font-weight: 400; color: var(--ink); background: var(--surface); border: 1.5px solid var(--line); border-radius: 8px; padding: .55rem .7rem; width: 100%; }
textarea { resize: vertical; line-height: 1.5; }
.form { display: grid; gap: 1.1rem; max-width: 780px; } .grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.panel { background: var(--surface); border-radius: 14px; padding: 1.4rem 1.5rem; box-shadow: var(--shadow); margin-bottom: 1.2rem; }
.split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.2rem; align-items: start; }
.empty { max-width: 34rem; padding: 3rem 0; } .empty p { font-size: 1.05rem; margin: .8rem 0 1.4rem; }

/* ---- Today ---- */
.hero { display: grid; grid-template-columns: 1.1fr 1fr; gap: 2rem; align-items: center; margin-bottom: 1.6rem; }
.hero-line { font-size: clamp(1.6rem, 3.1vw, 2.5rem); font-weight: 500; max-width: 18ch; }
.hero-line .num { color: var(--petrol); }
.hero-sub { max-width: 46ch; color: var(--muted); margin: .9rem 0 1.3rem; }
.trace { margin: 0; background: var(--surface); border-radius: 14px; padding: .8rem; box-shadow: var(--shadow); }
.trace svg { display: block; width: 100%; height: auto; border-radius: 8px; }
.trace figcaption { font-size: .8rem; color: var(--muted); padding: .5rem .3rem 0; }
.tr-line { fill: none; stroke: var(--petrol); stroke-width: 2.4; stroke-linejoin: round; stroke-dasharray: 2000; stroke-dashoffset: 2000; animation: draw 1.4s ease-out forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.tr-dot { fill: var(--surface); stroke: var(--petrol); stroke-width: 2; }
.tr-target { stroke: var(--low); stroke-width: 1.2; stroke-dasharray: 5 4; }
.tr-label { font: 11px var(--body); fill: var(--muted); } .tr-val { font: 700 14px var(--display); fill: var(--ink); }
.lost, .recent, .rec { list-style: none; padding: 0; margin: .8rem 0; display: grid; gap: .2rem; }
.lost a { display: grid; grid-template-columns: 11rem 1fr 2.6rem; gap: .8rem; align-items: center; padding: .4rem .3rem; border-radius: 6px; text-decoration: none; color: var(--ink); }
.lost a:hover, .recent a:hover { background: var(--paper); }
.lost .num { text-align: right; }
.lost-bar, .bar { height: 10px; background: var(--paper); border-radius: 5px; overflow: hidden; display: block; }
.lost-bar i, .bar i, .meter i { display: block; height: 100%; border-radius: 5px; background: var(--petrol); }
i.b-good { background: var(--good); } i.b-mid { background: var(--mid); } i.b-low { background: var(--low); } i.b-none { background: var(--muted); }
.more { font-size: .88rem; }
.recent a { display: flex; gap: .9rem; align-items: center; padding: .5rem .3rem; text-decoration: none; color: var(--ink); border-radius: 6px; }
.score { font: 700 1rem var(--display); width: 3.4rem; text-align: center; padding: .35rem 0; border-radius: 8px; flex: none; }
.score.b-good, .result-score.b-good { background: var(--good-wash); color: var(--good); } .score.b-mid, .result-score.b-mid { background: var(--mid-wash); color: var(--flag); } .score.b-low, .result-score.b-low { background: var(--low-wash); color: var(--low); } .score.b-none { background: var(--paper); }

/* ---- Papers ---- */
.papers { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 1.2rem; }
.paper { background: var(--surface); border-radius: 14px; padding: 1.3rem 1.4rem; box-shadow: var(--shadow); display: grid; gap: 1rem; border-top: 5px solid var(--petrol); }
.paper-main { text-decoration: none; color: var(--ink); } .paper-main:hover h2 { text-decoration: underline; }
.meter { height: 6px; background: var(--paper); border-radius: 3px; margin: .7rem 0 .3rem; }
.chips { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: 1.2rem; }
.chip { background: var(--petrol-wash); border-radius: 99px; padding: .2rem .7rem; font-size: .82rem; } .chip b { margin-left: .3rem; }
.qlist { display: grid; gap: .5rem; }
.qr { background: var(--surface); border-radius: 10px; border-left: 5px solid var(--line); }
.qr.s-right { border-left-color: var(--good); } .qr.s-wrong, .qr.s-skip { border-left-color: var(--low); }
.qr summary { display: grid; grid-template-columns: 2.2rem 1fr auto auto; gap: .8rem; align-items: baseline; padding: .7rem 1rem; cursor: pointer; list-style: none; }
.qr summary::-webkit-details-marker { display: none; }
.qn { font: 700 .95rem var(--display); color: var(--muted); } .qs { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qr[open] .qs { visibility: hidden; height: 0; } .qt { font-size: .8rem; color: var(--muted); white-space: nowrap; }
.tag { font-size: .78rem; font-weight: 700; padding: .12rem .55rem; border-radius: 99px; background: var(--paper); white-space: nowrap; }
.tag.s-right { background: var(--good-wash); color: var(--good); } .tag.s-wrong, .tag.s-skip { background: var(--low-wash); color: var(--low); }
.qr-body { padding: 0 1.2rem 1.2rem 4rem; max-width: 52rem; }
.stem p { margin: 0 0 .8rem; }
.ropts { list-style: none; padding: 0; margin: .5rem 0 1rem; display: grid; gap: .3rem; }
.ropts li { display: flex; gap: .7rem; padding: .45rem .7rem; border-radius: 8px; border: 1.5px solid transparent; align-items: baseline; }
.ropts li.is-ans { background: var(--good-wash); border-color: var(--good); } .ropts li.is-wrong { background: var(--low-wash); border-color: var(--low); }
.ropts em { margin-left: auto; font-style: normal; font-size: .78rem; font-weight: 700; white-space: nowrap; }
.letter { font: 700 .95rem var(--display); width: 1.2rem; flex: none; }
.expl { background: var(--paper); border-radius: 10px; padding: .9rem 1.1rem; } .expl h3 { margin: 0 0 .3rem; }

/* ---- Editor ---- */
.editor { display: grid; gap: 1rem; max-width: 820px; }
.edq { background: var(--surface); border-radius: 12px; padding: 1rem 1.2rem; display: grid; gap: .5rem; box-shadow: var(--shadow); border-left: 5px solid var(--good); }
.edq.needs { border-left-color: var(--low); }
.edq-head { display: flex; gap: 1rem; align-items: center; } .edq-head select { width: auto; margin-left: auto; padding: .3rem .5rem; font-size: .88rem; }
.edopt { display: flex; gap: .6rem; align-items: center; font-weight: 400; } .edopt input[type=radio] { width: 1.1rem; height: 1.1rem; accent-color: var(--good); flex: none; }
.stickybar { position: sticky; bottom: 1rem; margin-top: 1.2rem; max-width: 820px; background: var(--ink); color: var(--paper); border-radius: 12px; padding: .7rem .8rem .7rem 1.2rem; display: flex; justify-content: space-between; align-items: center; }

/* ---- Builder ---- */
.builder { display: grid; grid-template-columns: 1fr 340px; gap: 1.2rem; align-items: start; }
.builder h2:not(:first-child) { margin-top: 1.6rem; }
.checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: .15rem .8rem; }
.check { display: flex; gap: .6rem; align-items: center; font-weight: 400; padding: .3rem .2rem; cursor: pointer; }
.check input, .radio input { width: 1.05rem; height: 1.05rem; accent-color: var(--petrol); flex: none; }
.check b { margin-left: auto; font: 700 .85rem var(--display); color: var(--muted); }
.summary { position: sticky; top: 1.2rem; display: grid; gap: 1rem; }
fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: .5rem; } legend { font-weight: 700; font-size: .92rem; padding: 0; margin-bottom: .3rem; }
.radio { display: flex; gap: .6rem; align-items: flex-start; font-weight: 400; cursor: pointer; } .radio strong { display: block; } .radio span { font-size: .88rem; color: var(--muted); } .radio strong { color: var(--ink); font-size: .95rem; }
.total { font-size: 1rem; margin: 0; border-top: 1.5px solid var(--line); padding-top: 1rem; } .total .num { font-size: 2rem; margin-right: .2rem; }

/* ---- Results and analytics ---- */
.result { display: grid; grid-template-columns: 220px 1fr; gap: 1.2rem 2rem; background: var(--surface); border-radius: 14px; padding: 1.5rem; box-shadow: var(--shadow); margin-bottom: 1.4rem; }
.result-score { border-radius: 12px; padding: 1.4rem 1rem; display: grid; text-align: center; align-content: center; grid-row: span 2; }
.result-score .num { font-size: 3.4rem; line-height: 1; margin-bottom: .3rem; } .result-score small { color: inherit; opacity: .85; }
.facts { display: flex; gap: 2.5rem; margin: 0; flex-wrap: wrap; } .facts dt { font-size: .82rem; color: var(--muted); } .facts dd { margin: 0; font: 700 1.3rem var(--display); }
.tr { display: grid; grid-template-columns: 15rem 1fr 3.4rem; gap: .8rem; align-items: center; padding: .25rem 0; font-size: .92rem; } .tr .num { text-align: right; } .bytopic h2 { margin-bottom: .5rem; }
.tabs { display: flex; gap: .3rem; margin-bottom: .8rem; flex-wrap: wrap; }
.tabs button { font: inherit; font-size: .9rem; border: 0; background: none; color: var(--muted); padding: .45rem .9rem; border-radius: 99px; cursor: pointer; } .tabs button.on { background: var(--ink); color: var(--paper); font-weight: 700; }
.gauge { margin: 2.4rem 0 1.2rem; }
.gauge-track { position: relative; height: 26px; border-radius: 6px; background: linear-gradient(90deg, var(--low-wash) 0 50%, var(--mid-wash) 50% 68%, var(--good-wash) 68%); }
.gauge-track i { position: absolute; top: 0; bottom: 0; }
.gauge-range { background: var(--petrol); opacity: .28; border-radius: 4px; }
.gauge-mark { width: 4px; margin-left: -2px; background: var(--petrol); top: -6px !important; bottom: -6px !important; border-radius: 2px; }
.gauge-mark span { position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%); font-size: 1.15rem; font-style: normal; padding-bottom: 2px; }
.gauge-target { width: 0; border-left: 2px dashed var(--ink); }
.gauge-target span { position: absolute; top: 100%; left: 50%; transform: translateX(-50%); font-size: .75rem; font-style: normal; white-space: nowrap; color: var(--muted); padding-top: 3px; }
.gauge-scale { display: flex; justify-content: space-between; font-size: .72rem; color: var(--muted); margin-top: 1.3rem; }
.tablewrap { overflow-x: auto; margin-top: .8rem; }
table { border-collapse: collapse; width: 100%; font-size: .92rem; }
th { text-align: left; font-weight: 700; font-size: .8rem; color: var(--muted); padding: .4rem .6rem; border-bottom: 1.5px solid var(--line); white-space: nowrap; }
td { padding: .42rem .6rem; border-bottom: 1px solid var(--line); } .r { text-align: right; }
.obs td { white-space: nowrap; } .obs .bar { display: inline-block; width: 120px; vertical-align: middle; } .acc { margin-left: .6rem; font-size: .85rem; }
.cell { display: inline-block; min-width: 2.2rem; text-align: center; padding: .15rem 0; border-radius: 5px; font: 700 .85rem var(--display); background: color-mix(in srgb, var(--petrol) calc(var(--o) * 75%), transparent); color: var(--ink); }
.rec li { display: flex; justify-content: space-between; gap: 1rem; padding: .35rem 0; border-bottom: 1px solid var(--line); } .rec b { font-size: .82rem; color: var(--muted); white-space: nowrap; }

.bp { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.2rem; margin-top: 1rem; }
.bp-paper { border: 1.5px solid var(--line); border-radius: 12px; padding: .9rem; } .bp-paper > h3 { margin: 0 0 .6rem; font-weight: 700; color: var(--ink); font-size: 1.05rem; }
.bp-clusters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem; } .bp-cluster { background: var(--paper); border-radius: 9px; padding: .5rem .5rem .2rem; }
.bp-row { display: grid; grid-template-columns: 1.6rem minmax(0, 1fr) auto 12px; gap: .5rem; align-items: center; padding: .3rem .4rem; border-radius: 6px; text-decoration: none; color: var(--ink); font-size: .88rem; line-height: 1.25; }
.bp-row:hover { background: var(--surface); } .bp-row .num { color: var(--petrol); text-align: right; } .bp-bank { font-size: .76rem; color: var(--muted); white-space: nowrap; }
.dot { width: 11px; height: 11px; border-radius: 50%; display: block; } .dot.b-none { background: transparent; border: 1.5px solid var(--line); }
.bp-float { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 0 1rem; }
.mock { display: flex; justify-content: space-between; align-items: center; gap: 1.5rem; flex-wrap: wrap; border-left: 5px solid var(--petrol); } .mock > div:first-child { max-width: 34rem; }
.tablewrap.tall { max-height: 30rem; overflow-y: auto; } .tall thead th { position: sticky; top: 0; background: var(--surface); }
.obs td.wrap { white-space: normal; min-width: 14rem; }
.missing { margin-top: .8rem; font-size: .88rem; } .missing summary { cursor: pointer; color: var(--petrol); font-weight: 700; } .missing p { color: var(--muted); }

/* ---- Exam: plain, calm, nothing to look at but the question ---- */
.exam { display: grid; grid-template-rows: auto 1fr auto; height: 100vh; background: var(--surface); }
.ex-top { background: var(--petrol-deep); color: #fff; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 1rem; padding: .6rem 1.2rem; }
.ex-title { font: 700 1rem var(--display); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ex-count { font-size: .95rem; } .ex-tools { display: flex; gap: .6rem; justify-content: flex-end; align-items: center; }
.timer { font: 700 1.05rem var(--display); font-variant-numeric: tabular-nums; padding: .3rem .8rem; background: rgba(255, 255, 255, .12); border-radius: 7px; white-space: nowrap; } .timer.low { background: var(--low); }
.xbtn { font: inherit; font-weight: 700; font-size: .9rem; padding: .5rem 1.1rem; border-radius: 7px; border: 1.5px solid currentColor; background: transparent; color: inherit; cursor: pointer; }
.xbtn.solid { background: #fff; color: var(--petrol-deep); border-color: #fff; } .xbtn:disabled { opacity: .4; cursor: not-allowed; }
.ex-body { display: grid; grid-template-columns: 1fr 250px; min-height: 0; }
.ex-q { overflow-y: auto; padding: 2rem clamp(1.2rem, 5vw, 4rem) 3rem; }
.ex-q > * { max-width: 46rem; }
.ex-qhead { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.2rem; border-bottom: 1.5px solid var(--line); padding-bottom: .8rem; } .ex-qhead h1 { font-size: 1.25rem; }
.flag { font: inherit; font-size: .88rem; font-weight: 700; background: none; border: 1.5px solid var(--line); border-radius: 7px; padding: .35rem .8rem; cursor: pointer; color: var(--ink); } .flag.on { background: var(--mid-wash); border-color: var(--flag); color: var(--flag); }
.exam .stem { font-size: 1.06rem; line-height: 1.65; margin-bottom: 1.4rem; }
.opts { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; }
.opt { display: flex; gap: .4rem; align-items: stretch; }
.opt-main { flex: 1; display: flex; gap: .8rem; align-items: center; text-align: left; font: inherit; font-size: 1.02rem; color: var(--ink); background: var(--surface); border: 1.5px solid var(--line); border-radius: 9px; padding: .7rem .9rem; cursor: pointer; }
.opt-main:hover:not(:disabled) { border-color: var(--petrol); }
.radio[aria-hidden] { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--muted); flex: none; }
.opt.sel .opt-main { border-color: var(--petrol); background: var(--petrol-wash); } .opt.sel .radio { border-color: var(--petrol); background: radial-gradient(var(--petrol) 45%, transparent 50%); }
.opt.struck .txt { text-decoration: line-through; color: var(--muted); } .opt.struck .opt-main { background: var(--paper); }
.strike { font: inherit; font-size: .78rem; color: var(--muted); background: none; border: 0; cursor: pointer; padding: 0 .5rem; opacity: 0; } .opt:hover .strike, .strike:focus-visible, .opt.struck .strike { opacity: 1; } .strike:hover { color: var(--low); text-decoration: underline; }
.opt.right .opt-main { border-color: var(--good); background: var(--good-wash); } .opt.wrong .opt-main { border-color: var(--low); background: var(--low-wash); } .opt-main:disabled { cursor: default; color: var(--ink); }
.feedback { margin-top: 1.4rem; border-radius: 10px; padding: 1rem 1.2rem; border-left: 5px solid var(--good); background: var(--good-wash); } .feedback.no { border-left-color: var(--low); background: var(--low-wash); } .feedback h2 { margin-bottom: .4rem; }
.ex-nav { border-left: 1.5px solid var(--line); background: var(--paper); padding: 1.2rem 1rem; overflow-y: auto; } .ex-nav h2 { font-size: .9rem; margin-bottom: .7rem; }
.navgrid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 5px; }
.navgrid button { font: 700 .82rem var(--display); aspect-ratio: 1; border-radius: 6px; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; position: relative; }
.navgrid .done { background: var(--petrol); border-color: var(--petrol); color: #fff; } [data-theme="dark"] .navgrid .done { color: #062126; }
.navgrid .flagged::after, .k.flagged::after { content: ''; position: absolute; top: -3px; right: -3px; width: 9px; height: 9px; border-radius: 50%; background: var(--mid); border: 1.5px solid var(--paper); }
.navgrid .cur { outline: 3px solid var(--ink); outline-offset: 1px; }
.legend { list-style: none; padding: 0; margin: 1.1rem 0 0; font-size: .82rem; display: grid; gap: .35rem; } .legend li { display: flex; gap: .5rem; align-items: center; }
.k { width: 14px; height: 14px; border-radius: 4px; border: 1.5px solid var(--line); background: var(--surface); position: relative; display: inline-block; } .k.done { background: var(--petrol); border-color: var(--petrol); }
.ex-foot { border-top: 1.5px solid var(--line); padding: .7rem 1.2rem; display: flex; justify-content: space-between; gap: .6rem; color: var(--petrol-deep); background: var(--surface); }
[data-theme="dark"] .ex-foot { color: var(--ink); } .ex-foot .xbtn.solid { background: var(--petrol); border-color: var(--petrol); color: #fff; } [data-theme="dark"] .ex-foot .xbtn.solid { color: #062126; }
.ex-foot .xbtn:last-child { margin-left: auto; } .ex-foot .xbtn:first-child { margin-right: auto; margin-left: 0; }

.qimg { margin: 0 0 1.3rem; } .qimg img { display: block; max-width: 100%; max-height: 380px; border-radius: 8px; border: 1.5px solid var(--line); cursor: zoom-in; background: #fff; }
.qimg.big img { max-height: none; cursor: zoom-out; } .qimg figcaption { font-size: .72rem; color: var(--muted); margin-top: .3rem; }
.qnote { background: var(--mid-wash); border-left: 4px solid var(--mid); padding: .5rem .8rem; border-radius: 6px; font-size: .9rem; margin-top: .8rem; }
.lockwrap { min-height: 100vh; display: grid; place-items: center; padding: 1rem; background: var(--petrol-deep); }
.lockbox { background: var(--surface); border-radius: 16px; padding: 2rem; width: 100%; max-width: 380px; display: grid; gap: 1rem; } .lockbox .brand-mark { width: 40px; height: 40px; border-radius: 10px; }
.lockbox input[type=password] { font: inherit; border: 1.5px solid var(--line); border-radius: 8px; padding: .6rem .7rem; width: 100%; background: var(--surface); color: var(--ink); } .lockbox p { margin: 0; min-height: 1.2em; }
.side-foot .link { color: #9CC3C4; margin-top: .4rem; }

/* ---- Overlays ---- */
.overlay { position: fixed; inset: 0; background: rgba(9, 30, 34, .55); display: grid; place-items: center; padding: 1rem; z-index: 10; }
.dialog { background: var(--surface); border-radius: 14px; padding: 1.6rem; max-width: 560px; width: 100%; max-height: 88vh; overflow-y: auto; }
.labs { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1.5rem; margin: 1rem 0 0; } .labs div { display: flex; justify-content: space-between; gap: 1rem; border-bottom: 1px solid var(--line); padding: .3rem 0; font-size: .86rem; } .labs dt { font-weight: 700; } .labs dd { margin: 0; text-align: right; color: var(--muted); }
.toast { position: fixed; bottom: 1.5rem; left: 50%; transform: translateX(-50%); background: var(--ink); color: var(--paper); padding: .7rem 1.2rem; border-radius: 10px; z-index: 20; }

@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; } .side { position: static; height: auto; flex-direction: row; align-items: center; padding: .7rem 1rem; gap: 1rem; overflow-x: auto; }
  .side-links { display: flex; } .side-links a { white-space: nowrap; } .side-foot, .brand small { display: none; }
  .hero, .split, .builder, .result, .grid2, .bp, .bp-clusters { grid-template-columns: minmax(0, 1fr); } .summary { position: static; }
  .ex-body { grid-template-columns: 1fr; } .ex-nav { border-left: 0; border-top: 1.5px solid var(--line); max-height: 22vh; padding: .7rem 1rem; } .navgrid { grid-template-columns: repeat(auto-fill, minmax(36px, 1fr)); } .ex-nav h2, .legend { display: none; }
  .ex-top { grid-template-columns: 1fr auto; } .ex-title { display: none; } .strike { opacity: 1; }
  .qr summary { grid-template-columns: 2rem 1fr auto; } .qt { display: none; } .qr-body { padding-left: 1.2rem; }
  .lost a { grid-template-columns: 8rem 1fr 2.4rem; } .tr { grid-template-columns: 9rem 1fr 3rem; } .labs { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { .tr-line { animation: none; stroke-dashoffset: 0; } }
