/* MyTechMetrics. Layout: pinned instrument header, side navigation, one main column per page.
   Every colour is a token; light is the base, dark redefines the tokens. */
:root {
  --bg: #EEF2F3; --surface: #FFFFFF; --surface-2: #E3E9EB; --line: #CBD5D8;
  --ink: #0F2026; --ink-2: #44585F; --ink-3: #6B7E85;
  --accent: #0A6C86; --accent-ink: #FFFFFF; --track: #D6DEE1;
  --good: #1B7A4B; --good-bg: #DDF1E6; --watch: #8A5A00; --watch-bg: #FBEBC8; --bad: #B3261E; --bad-bg: #FADAD7;
  --shadow: 0 1px 2px rgba(15,32,38,.08), 0 8px 24px rgba(15,32,38,.06);
  --display: "Barlow Condensed", "Arial Narrow", Arial, sans-serif;
  --body: "Barlow", "Segoe UI", system-ui, sans-serif;
  --radius: .7rem;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #0B1518; --surface: #132227; --surface-2: #1B2E34; --line: #2A4047;
  --ink: #E8F0F2; --ink-2: #A9BCC2; --ink-3: #7F959C;
  --accent: #56C4E0; --accent-ink: #06222B; --track: #243940;
  --good: #5FD39A; --good-bg: #12382A; --watch: #F0BE5A; --watch-bg: #3B2E0E; --bad: #FF8A80; --bad-bg: #44191A;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.3); color-scheme: dark; } }
:root[data-theme="dark"] {
  --bg: #0B1518; --surface: #132227; --surface-2: #1B2E34; --line: #2A4047;
  --ink: #E8F0F2; --ink-2: #A9BCC2; --ink-3: #7F959C;
  --accent: #56C4E0; --accent-ink: #06222B; --track: #243940;
  --good: #5FD39A; --good-bg: #12382A; --watch: #F0BE5A; --watch-bg: #3B2E0E; --bad: #FF8A80; --bad-bg: #44191A;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.3); color-scheme: dark; }

html { font-size: 100%; scroll-behavior: smooth; }
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--body); font-size: 1rem; line-height: 1.5; font-variant-numeric: tabular-nums; }
h1, h2, h3, h4, p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.muted { color: var(--ink-3); font-weight: 400; }

/* ---------- Header ---------- */
.bar { position: sticky; top: 0; z-index: 30; background: var(--surface); border-bottom: 1px solid var(--line); }
.bar-in { padding: .55rem 1rem; display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; }
.brandmark { display: flex; align-items: center; gap: .6rem; min-width: 0; flex: 1 1 12rem; }
.brandmark svg { width: 2.1rem; height: 2.1rem; flex: none; }
.brandmark h1, .login h1 { font-family: var(--display); font-weight: 700; font-size: min(1.45rem, 6.2vw); letter-spacing: .02em; text-transform: uppercase; line-height: 1; }
.brandmark h1 span, .login h1 span { color: var(--accent); }
.brandmark p { font-size: .78rem; color: var(--ink-3); }
.tools { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.seg { display: flex; border: 1px solid var(--line); border-radius: .5rem; overflow: hidden; background: var(--bg); }
.seg button { border: 0; background: transparent; min-width: 2.4rem; height: 2.3rem; padding: 0 .5rem; font-family: var(--display); font-weight: 600; font-size: 1.05rem; }
.seg button + button { border-left: 1px solid var(--line); }
.seg button:hover { background: var(--surface-2); }
.seg button:disabled { opacity: .4; cursor: default; }
.seg .mid { min-width: 3.5rem; font-size: .95rem; color: var(--ink-2); }
.who { font-size: .85rem; color: var(--ink-2); max-width: 12rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Shell ---------- */
.shell { display: grid; grid-template-columns: 13.5rem minmax(0, 1fr); align-items: start; }
.side { position: sticky; top: var(--bar-h, 3.6rem); align-self: start; padding: 1rem .75rem; display: flex; flex-direction: column; gap: .2rem; }
.side .group { font-family: var(--display); font-size: .78rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); padding: .9rem .6rem .25rem; }
.navlink { display: flex; align-items: center; gap: .6rem; width: 100%; border: 0; background: transparent; border-radius: .5rem; padding: .5rem .6rem; text-align: left; font-family: var(--display); font-weight: 600; font-size: 1.1rem; letter-spacing: .03em; text-transform: uppercase; color: var(--ink-2); white-space: nowrap; }
.navlink svg { width: 1.15rem; height: 1.15rem; flex: none; }
.navlink:hover { background: var(--surface-2); color: var(--ink); }
.navlink[aria-current="page"] { background: var(--accent); color: var(--accent-ink); }
#view { min-width: 0; max-width: 72rem; width: 100%; padding-inline: 1rem; padding-block: 1.25rem 5rem; outline: none; display: flex; flex-direction: column; gap: 1.25rem; }
.banner { margin: 0; padding: .4rem 1rem; background: var(--watch-bg); color: var(--watch); text-align: center; font-size: .88rem; font-weight: 500; }

/* ---------- Common pieces ---------- */
.eyebrow { font-family: var(--display); font-weight: 600; font-size: .85rem; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: .5rem 1rem; }
.head h2, .page-title { font-family: var(--display); font-weight: 700; font-size: 1.9rem; line-height: 1.05; text-transform: uppercase; letter-spacing: .01em; text-wrap: balance; }
.head p { color: var(--ink-2); font-size: .9rem; max-width: 40rem; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.1rem; min-width: 0; }
.card > h3, .card > h2 { font-family: var(--display); font-weight: 700; font-size: 1.3rem; text-transform: uppercase; letter-spacing: .02em; margin-bottom: .6rem; }
.card > h3 .muted, .card > h2 .muted { font-family: var(--body); font-size: .85rem; text-transform: none; letter-spacing: 0; }
.stack { display: flex; flex-direction: column; gap: .75rem; }
.hint { font-size: .85rem; color: var(--ink-2); }
.state { display: grid; gap: .3rem; text-align: center; color: var(--ink-2); padding: 3rem 1rem; }
.state strong { color: var(--ink); font-family: var(--display); font-size: 1.5rem; text-transform: uppercase; }
.actions { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }

label { display: block; font-size: .82rem; color: var(--ink-2); font-weight: 500; }
input, select, textarea { width: 100%; padding: .5rem .7rem; background: var(--bg); border: 1px solid var(--line); border-radius: .5rem; margin-top: .2rem; }
input[type=checkbox] { width: auto; margin: 0 .3rem 0 0; }
textarea { resize: vertical; }
fieldset { border: 1px solid var(--line); border-radius: .5rem; padding: .75rem 1rem; margin: 0; min-width: 0; }
legend { padding: 0 .4rem; font-size: .82rem; color: var(--ink-2); font-weight: 600; }
.fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(11rem, 100%), 1fr)); gap: .6rem .9rem; }
.fields .wide { grid-column: 1 / -1; }
.fields .end { align-self: end; }

.btn { padding: .5rem .95rem; border-radius: .5rem; border: 1px solid var(--line); background: var(--surface); font-family: var(--display); font-weight: 600; font-size: 1.02rem; letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; }
.btn:hover { background: var(--surface-2); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.danger { color: var(--bad); }
.btn.small { padding: .2rem .6rem; font-size: .9rem; }
.btn.link { background: none; border: 0; color: var(--ink-2); text-transform: none; font-family: var(--body); font-weight: 400; text-decoration: underline; letter-spacing: 0; }

.pill { display: inline-flex; align-items: center; gap: .3rem; border-radius: 99px; padding: .12rem .6rem; font-size: .8rem; font-weight: 600; white-space: nowrap; }
.pill.good { background: var(--good-bg); color: var(--good); }
.pill.watch { background: var(--watch-bg); color: var(--watch); }
.pill.bad { background: var(--bad-bg); color: var(--bad); }
.pill.none { background: var(--surface-2); color: var(--ink-2); }
.tag { font-size: .72rem; padding: .05rem .45rem; border-radius: 99px; background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line); white-space: nowrap; font-family: var(--body); font-weight: 500; text-transform: none; letter-spacing: 0; }
.fill-good { background: var(--good); } .fill-watch { background: var(--watch); } .fill-bad { background: var(--bad); } .fill-none { background: var(--ink-3); }
.chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.chips button { border: 1px solid var(--line); background: var(--surface); border-radius: 99px; padding: .25rem .85rem; font-family: var(--display); font-weight: 600; font-size: 1rem; letter-spacing: .04em; text-transform: uppercase; }
.chips button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }

.table-wrap { overflow-x: auto; position: relative; }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th, td { padding: .45rem .7rem; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { color: var(--ink-2); font-weight: 600; font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; }
.num { text-align: right; }
.preview { border: 1px solid var(--line); border-radius: .5rem; }

/* ---------- Dashboard ---------- */
.panel { display: grid; grid-template-columns: minmax(0, 19rem) minmax(0, 1fr); gap: 1rem; }
.gauge { background: var(--surface); border: 1px solid var(--line); border-radius: .9rem; box-shadow: var(--shadow); padding: 1.1rem; display: flex; flex-direction: column; align-items: center; gap: .4rem; text-align: center; }
.gauge svg { width: 100%; max-width: 16rem; height: auto; }
.g-track { fill: none; stroke: var(--track); stroke-width: 14; stroke-linecap: round; }
.g-val { fill: none; stroke-width: 14; stroke-linecap: round; }
.g-val.good { stroke: var(--good); } .g-val.watch { stroke: var(--watch); } .g-val.bad { stroke: var(--bad); } .g-val.none { stroke: var(--ink-3); }
.g-tick { stroke: var(--ink-2); stroke-width: 2; fill: none; }
.g-lab { fill: var(--ink-3); font-family: var(--display); font-size: 11px; font-weight: 600; }
.g-num { fill: var(--ink); font-family: var(--display); font-weight: 700; font-size: 44px; }
.g-sub { fill: var(--ink-3); font-family: var(--body); font-size: 10px; }
.gauge .delta { font-size: .9rem; color: var(--ink-2); }
.up { color: var(--good); font-weight: 600; } .down { color: var(--bad); font-weight: 600; }
.states { display: flex; flex-wrap: wrap; gap: .5rem; width: 100%; margin-top: .4rem; }
.states div { flex: 1 1 5rem; min-width: 0; background: var(--surface-2); border-radius: .5rem; padding: .4rem .3rem; }
.states b { display: block; font-family: var(--display); font-size: 1.25rem; line-height: 1.1; }
.states span { font-size: .72rem; color: var(--ink-2); letter-spacing: .06em; text-transform: uppercase; }
.kpis { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: .75rem; }
.kpi { grid-column: span 2; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: .8rem .9rem; display: flex; flex-direction: column; justify-content: space-between; gap: .35rem; min-width: 0; }
.kpi:nth-child(n+4) { grid-column: span 3; }
.kpi .name { font-family: var(--display); font-weight: 600; font-size: .9rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); }
.kpi .val { font-family: var(--display); font-weight: 700; font-size: 2.3rem; line-height: 1; }
.kpi .val small { font-size: 1rem; font-weight: 600; color: var(--ink-3); margin-left: .15rem; }
.kpi .name, .kpi .val { overflow-wrap: anywhere; }
.kpi .meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .1rem .5rem; font-size: .8rem; color: var(--ink-2); }
.meter { position: relative; height: .5rem; background: var(--track); border-radius: .25rem; overflow: hidden; }
.meter i, .score-bar i { position: absolute; inset: 0 auto 0 0; border-radius: .3rem; transform-origin: left; animation: grow .7s ease-out both; }
@keyframes grow { from { transform: scaleX(.05); } to { transform: scaleX(1); } }

.board { display: flex; flex-direction: column; gap: .6rem; }
.row { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: .8rem .9rem; display: grid; grid-template-columns: 3rem minmax(0, 17rem) minmax(0, 1fr); gap: .6rem 1rem; align-items: center; }
.rank { font-family: var(--display); font-weight: 700; font-size: 2.2rem; line-height: 1; color: var(--ink-3); text-align: center; }
.row.first .rank { color: var(--accent); }
.whois { min-width: 0; }
.whois h3 { font-family: var(--display); font-weight: 700; font-size: 1.35rem; line-height: 1.1; text-transform: uppercase; letter-spacing: .01em; overflow-wrap: anywhere; }
.whois .sub { font-size: .82rem; color: var(--ink-2); }
.you { font-family: var(--display); font-size: .75rem; font-weight: 600; letter-spacing: .1em; background: var(--accent); color: var(--accent-ink); border-radius: .25rem; padding: .05rem .35rem; margin-left: .35rem; vertical-align: middle; }
.score { display: flex; align-items: center; gap: .6rem; margin-top: .35rem; }
.score b { font-family: var(--display); font-weight: 700; font-size: 1.5rem; line-height: 1; min-width: 3.6rem; }
.score-bar { position: relative; flex: 1; height: .55rem; background: var(--track); border-radius: .3rem; overflow: hidden; min-width: 3rem; }
.cells { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .4rem; }
.cell { border: 0; border-radius: .5rem; padding: .4rem .5rem; background: var(--surface-2); border-left: .25rem solid var(--line); min-width: 0; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.cell:hover, .kpi.pick:hover { box-shadow: 0 0 0 2px var(--line); }
.cell.on, .kpi.pick.on { box-shadow: 0 0 0 2px var(--accent); }
.kpi.pick { cursor: pointer; }
.admins { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(16rem, 100%), 1fr)); gap: .6rem; }
.admins .person { border: 1px solid var(--line); border-radius: .6rem; }
.tag.owner { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.row.guest { border-style: dashed; }
.tag.guest { border-color: var(--watch); color: var(--watch); }
.focusbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1rem; background: var(--surface); border: 1px solid var(--accent); border-radius: var(--radius); padding: .55rem .9rem; scroll-margin-top: calc(var(--stick, 4rem) + .75rem); }
.divider { display: flex; align-items: center; gap: .75rem; font-family: var(--display); font-weight: 600; font-size: .85rem; letter-spacing: .14em; text-transform: uppercase; color: var(--bad); }
.divider::before, .divider::after { content: ""; flex: 1; border-top: 1px dashed var(--bad); }
.cell.good { border-left-color: var(--good); } .cell.watch { border-left-color: var(--watch); } .cell.bad { border-left-color: var(--bad); }
.cell span { display: block; font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cell b { font-family: var(--display); font-weight: 700; font-size: 1.25rem; line-height: 1.15; }
.cell em { font-style: normal; font-size: .72rem; font-weight: 600; margin-left: .2rem; }
.cell.good em { color: var(--good); } .cell.watch em { color: var(--watch); } .cell.bad em { color: var(--bad); }
.focus { grid-column: 2 / -1; font-size: .88rem; color: var(--ink-2); border-top: 1px dashed var(--line); padding-top: .5rem; }
.focus strong { color: var(--ink); font-weight: 600; }
.legend { display: flex; flex-wrap: wrap; gap: .4rem 1rem; font-size: .82rem; color: var(--ink-2); }

.hero { display: grid; grid-template-columns: minmax(0, 19rem) minmax(0, 1fr); gap: 1rem; }
.podium { display: flex; flex-direction: column; gap: .4rem; }
.podium li { display: flex; align-items: baseline; gap: .6rem; }
.podium ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .35rem; }
.podium .pos { font-family: var(--display); font-weight: 700; font-size: 1.4rem; color: var(--accent); width: 1.6rem; }
.podium .nm { flex: 1; min-width: 0; overflow-wrap: anywhere; font-weight: 500; }
.podium .sc { font-family: var(--display); font-weight: 700; font-size: 1.15rem; }
.bigrank { font-family: var(--display); font-weight: 700; font-size: 1.6rem; line-height: 1.1; }

/* ---------- Library ---------- */
.shelf { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(18.5rem, 100%), 1fr)); gap: .9rem; }
.book { display: flex; flex-direction: column; gap: .5rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 0; overflow: hidden; text-align: left; min-width: 0; }
.book:hover { border-color: var(--accent); box-shadow: var(--shadow); }
.book .cover { background: var(--surface-2); border-bottom: 1px solid var(--line); aspect-ratio: 4 / 3; display: grid; place-items: center; overflow: hidden; }
.book .cover canvas, .book .cover img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
.book .cover svg { width: 2.6rem; height: 2.6rem; color: var(--ink-3); }
.book .info { padding: 0 .9rem .9rem; display: flex; flex-direction: column; gap: .3rem; }
.book h4 { font-family: var(--display); font-weight: 700; font-size: 1.2rem; line-height: 1.15; text-transform: uppercase; overflow-wrap: anywhere; }
.book .meta { font-size: .8rem; color: var(--ink-2); display: flex; flex-wrap: wrap; gap: .3rem .6rem; align-items: center; }

.reader-bar { position: sticky; top: calc(var(--stick, 3.6rem) + .4rem); z-index: 20; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: .5rem .7rem; display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .75rem; box-shadow: var(--shadow); }
.reader-bar h3 { font-family: var(--display); font-weight: 700; font-size: 1.2rem; text-transform: uppercase; flex: 1 1 10rem; min-width: 0; overflow-wrap: anywhere; }
.reader-bar input { width: 4rem; margin: 0; text-align: center; padding: .3rem .4rem; }
.reader-bar .find { width: 11rem; text-align: left; }
.reader-bar .count { font-size: .85rem; color: var(--ink-2); white-space: nowrap; }
.pages { display: flex; flex-direction: column; align-items: center; gap: 1rem; }
.page { background: #fff; box-shadow: var(--shadow); border: 1px solid var(--line); max-width: 100%; position: relative; }
.page canvas { display: block; width: 100%; height: auto; }
.page .pn { position: absolute; right: .4rem; bottom: .3rem; font-size: .7rem; color: #44585F; background: rgba(255,255,255,.85); padding: 0 .35rem; border-radius: .25rem; }
.hits { display: flex; flex-direction: column; gap: .3rem; max-height: 14rem; overflow-y: auto; }
.hits button { text-align: left; border: 1px solid var(--line); background: var(--surface); border-radius: .4rem; padding: .35rem .6rem; font-size: .88rem; }
.hits button:hover { background: var(--surface-2); }
.hits mark { background: var(--watch-bg); color: var(--watch); padding: 0 .1rem; border-radius: .15rem; }

/* ---------- Notices, FAQ, crew ---------- */
.note p { white-space: pre-wrap; overflow-wrap: anywhere; }
.note .meta { font-size: .82rem; color: var(--ink-2); display: flex; flex-wrap: wrap; gap: .3rem .6rem; align-items: center; margin-bottom: .4rem; }
details { border: 1px solid var(--line); border-radius: .5rem; background: var(--surface); }
details + details { margin-top: .4rem; }
summary { cursor: pointer; padding: .6rem .8rem; font-weight: 600; list-style-position: inside; overflow-wrap: anywhere; }
details[open] summary { border-bottom: 1px solid var(--line); }
details .answer { padding: .7rem .9rem; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--ink); }
details .answer + .actions { padding: 0 .9rem .7rem; }
.market { background: var(--surface); border: 1px solid var(--line); border-radius: .9rem; overflow: hidden; }
.market header { display: flex; justify-content: space-between; align-items: baseline; gap: .5rem; padding: .6rem .9rem; background: var(--surface-2); }
.market header h3 { font-family: var(--display); font-weight: 700; font-size: 1.3rem; text-transform: uppercase; letter-spacing: .03em; }
.market header span { font-size: .8rem; color: var(--ink-2); }
.markets { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(17rem, 100%), 1fr)); gap: 1rem; align-items: start; }
.person { padding: .7rem .9rem; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: .25rem; }
.person h4 { font-size: 1rem; font-weight: 600; overflow-wrap: anywhere; }
.person .line { font-size: .88rem; color: var(--ink-2); overflow-wrap: anywhere; user-select: all; }
.matches { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(14rem, 100%), 1fr)); gap: .6rem; }
.matches span { color: var(--ink); }
.checks { display: flex; flex-wrap: wrap; gap: .4rem 1rem; }
.checks label { color: var(--ink); font-size: .9rem; }
.split { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(16rem, 100%), 1fr)); gap: 1rem; }
.inline { display: flex; gap: .5rem; align-items: center; }
.inline input { margin-top: 0; }
.dropzone { display: grid; gap: .3rem; place-items: center; text-align: center; padding: 2rem 1rem; border: 2px dashed var(--line); border-radius: var(--radius); cursor: pointer; color: var(--ink-2); }
.dropzone strong { color: var(--ink); font-family: var(--display); font-size: 1.3rem; text-transform: uppercase; }
.dropzone:hover, .dropzone.over { border-color: var(--accent); background: var(--surface-2); }
.dropzone input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(9rem, 100%), 1fr)); gap: .75rem; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: .8rem .9rem; min-width: 0; }
.stat span { display: block; font-size: .8rem; color: var(--ink-2); }
.stat strong { font-family: var(--display); font-weight: 700; font-size: 1.9rem; line-height: 1.2; }
.bars { list-style: none; margin: 0; padding: 0; display: grid; gap: .4rem; }
.bars li { display: grid; grid-template-columns: minmax(5rem, 10rem) 1fr 4rem; gap: .7rem; align-items: center; }
.bar-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-track { height: .7rem; background: var(--track); border-radius: 99px; overflow: hidden; }
.bar-fill { display: block; height: 100%; background: var(--accent); border-radius: 99px; }
.bar-value { text-align: right; }

/* ---------- Login, toast, jump ---------- */
.login { min-height: 100vh; display: grid; place-items: center; padding: 1rem; }
.login-card { width: 100%; max-width: 24rem; display: grid; gap: .6rem; box-shadow: var(--shadow); padding: 1.5rem; }
.login h1 { font-size: 2rem; }
.form-error { color: var(--bad); font-size: .9rem; min-height: 1.3rem; }
.toast { position: fixed; left: 50%; bottom: 1.2rem; transform: translate(-50%, 1.2rem); max-width: calc(100vw - 2rem); padding: .6rem 1rem; background: var(--ink); color: var(--bg); border-radius: .5rem; font-weight: 500; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 60; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.error { background: var(--bad); color: #fff; }
:root[data-theme="dark"] .toast.error { color: #2a0b0a; }
.jump { position: fixed; right: 1rem; bottom: 1rem; z-index: 40; display: flex; flex-direction: column; gap: .4rem; }
.jump button { width: 2.75rem; height: 2.75rem; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow); display: grid; place-items: center; transition: opacity .2s, transform .2s; }
.jump button:hover { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.jump button.off { opacity: 0; pointer-events: none; transform: scale(.8); }
.jump svg { width: 1.2rem; height: 1.2rem; }

@media (max-width: 60rem) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side { position: sticky; top: var(--bar-h, 3.4rem); z-index: 25; flex-direction: row; overflow-x: auto; padding: .4rem .75rem; background: var(--surface); border-bottom: 1px solid var(--line); gap: .3rem; }
  .side .group { display: none; }
  .navlink { width: auto; padding: .35rem .7rem; font-size: 1rem; }
  .panel, .hero { grid-template-columns: minmax(0, 1fr); }
  .row { grid-template-columns: 2.4rem minmax(0, 1fr); }
  .cells, .focus { grid-column: 1 / -1; }
}
@media (max-width: 34rem) {
  .kpi, .kpi:nth-child(n+4) { grid-column: span 3; }
  .kpi:nth-child(5) { grid-column: span 6; }
  .cells { grid-template-columns: repeat(auto-fit, minmax(min(5.6rem, 100%), 1fr)); }
  .head h2, .page-title { font-size: 1.6rem; }
  .who { display: none; }
  .reader-bar .find { width: 100%; }
}
@media (prefers-reduced-motion: reduce) { .meter i, .score-bar i { animation: none; } html { scroll-behavior: auto; } .toast { transition: none; } }
