/* geoguess.es — the admin console (admin.geoguess.es), redesign 2026-10-21 (docs/redesign/FINAL.md: direction C,
   made denser for a console). One family (Geist Mono), the shared tokens and components, structure from spacing
   and hairlines — no boxes, no rail. The shell is the site's top bar (layout.css) carrying the six console
   sections; the open section's screens sit in a row under it. Tables: 40 px rows, one hairline, a 12 px header.
   Colours are tokens only (and color-mix() of tokens for the chart ramps). Owner: WP10 (admin/**). */

:root { --a-row: 40px; --a-ctl: 40px; --a-max: 1440px; }
body { font-size: var(--fs-14); }

/* ================================================================== shell */
.admin { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; }
.a-top { height: 64px; gap: var(--sp-6); }
.a-brand { gap: 10px; }
.a-brand-tag { margin-left: 2px; }
.a-groups { margin-left: var(--sp-2); }
.a-groups .topnav-link { padding: 0 12px; }
.a-actions-top { gap: 4px; }
.a-me { max-width: 220px; }
.a-me .avatar { --d: 32px; }
body.a-bare .a-groups, body.a-bare .a-actions-top, body.a-bare .a-subnav { display: none; }

/* the open section's screens: plain text, the current one ink + 500 + the 5 px signal dot (the tabs' look) */
.a-subnav { display: flex; gap: 2px; padding: 0 var(--gutter); margin-top: -4px; overflow-x: auto; scrollbar-width: none; max-width: calc(var(--a-max) + 2 * var(--gutter)); width: 100%; margin-inline: auto; }
.a-subnav::-webkit-scrollbar { display: none; }
.a-sublink { position: relative; display: inline-flex; align-items: center; height: 44px; padding: 0 12px; border-radius: var(--r-pill); color: var(--ink-2); font-size: var(--fs-14); text-decoration: none; white-space: nowrap; flex: none; transition: color var(--t-fast) var(--ease), background-color var(--t-fast) var(--ease); }
.a-sublink:first-child { margin-left: -12px; }
.a-sublink:hover { color: var(--ink); background: var(--paper-2); }
.a-sublink[aria-current="page"] { color: var(--ink); font-weight: 500; }
.a-sublink[aria-current="page"]::after { content: ""; position: absolute; left: 50%; bottom: 3px; width: 5px; height: 5px; margin-left: -2.5px; border-radius: 50%; background: var(--signal); }
.a-subnav.more-end { -webkit-mask-image: linear-gradient(to right, black calc(100% - 48px), transparent); mask-image: linear-gradient(to right, black calc(100% - 48px), transparent); }
.a-subnav.more-start { -webkit-mask-image: linear-gradient(to left, black calc(100% - 48px), transparent); mask-image: linear-gradient(to left, black calc(100% - 48px), transparent); }
.a-subnav.more-start.more-end { -webkit-mask-image: linear-gradient(to right, transparent, black 48px, black calc(100% - 48px), transparent); mask-image: linear-gradient(to right, transparent, black 48px, black calc(100% - 48px), transparent); }

/* the account menu and the phone sheet */
.a-menu { min-width: 240px; }
.a-menu-who { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); }
.a-menu-who > span:first-child { color: var(--ink); font-size: var(--fs-14); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.a-sheet-title { font-size: var(--fs-15); }
.a-sheet .ms-grid { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 480px) { .a-sheet .ms-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ================================================================== page */
.a-main { flex: 1; min-width: 0; }
.a-main:focus { outline: none; }
.a-page { max-width: calc(var(--a-max) + 2 * var(--gutter)); margin: 0 auto; padding: var(--sp-6) var(--gutter) var(--sp-24); min-width: 0; }
.a-body { display: flex; flex-direction: column; gap: var(--sp-10); min-width: 0; }
.a-banner { margin-bottom: var(--sp-4); }

/* the title row: breadcrumb · title · one quiet line | period · updated */
.a-head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--sp-4) var(--sp-6); flex-wrap: wrap; }
.a-head-text { min-width: 0; flex: 1 1 320px; }
.a-head h1 { font-size: var(--fs-28); line-height: 1.2; letter-spacing: -0.02em; }
.a-head h1:focus { outline: none; }
.a-head-note, .a-head .flavour { margin: 6px 0 0; font-size: var(--fs-13); color: var(--ink-2); max-width: 80ch; }
.a-crumb, .a-head .eyebrow { margin: 0 0 6px; font-size: var(--fs-13); font-weight: 400; letter-spacing: 0; color: var(--ink-2); }
.a-crumb a, .a-head .eyebrow a { color: var(--ink-2); }
.a-crumb a:hover, .a-head .eyebrow a:hover { color: var(--ink); }
.a-head-actions { display: flex; align-items: center; gap: var(--sp-3); flex-wrap: wrap; }
.a-fresh { display: inline-flex; align-items: center; gap: 2px; font-size: var(--fs-13); color: var(--ink-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.a-refresh { color: var(--ink-2); }
.a-hero { font-size: var(--fs-18); line-height: 1.55; color: var(--ink-2); margin: 0; max-width: 80ch; }
.a-hero b { color: var(--ink); font-weight: 500; }
.a-note { font-size: var(--fs-13); color: var(--ink-2); margin: 0; }
.a-note a { color: var(--ink-2); }

/* sections: no box — a 16 px title, one quiet line, the content (FINAL.md §5.4) */
.a-sec { min-width: 0; }
.a-sec-head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--sp-2) var(--sp-4); flex-wrap: wrap; margin-bottom: var(--sp-4); }
.a-sec-title { flex: 1 1 220px; min-width: 0; }
.a-sec-head h2 { font-size: var(--fs-16); line-height: 1.4; letter-spacing: -0.01em; }
.a-sec-note { margin: 2px 0 0; font-size: var(--fs-13); color: var(--ink-2); max-width: 80ch; }
.a-sec-actions { display: flex; gap: var(--sp-2); align-items: center; flex-wrap: wrap; min-width: 0; max-width: 100%; }
.a-sec-actions > a:not(.btn) { font-size: var(--fs-13); color: var(--ink-2); display: inline-flex; align-items: center; padding-block: 12px; margin-block: -12px; } /* a 44 px target without moving the layout */
.a-sec-actions > .btn-sm { margin-block: -6px; }
.a-sec-actions > .ac-toggle { margin-right: -14px; }
.a-sec-tools { display: flex; flex-direction: column; gap: var(--sp-3); margin-bottom: var(--sp-4); min-width: 0; }
.a-sec > .stack > * + * { margin-top: var(--sp-6); }

.a-grid { display: grid; gap: var(--sp-10) var(--sp-12); align-items: start; }
.a-grid > * { min-width: 0; }
.g-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g-21 { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.g-12 { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); }

/* ================================================================== stats (KPIs): label · big number · one line */
.a-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--sp-8) var(--sp-8); }
.a-kpi { display: flex; flex-direction: column; gap: 2px; min-width: 0; margin: 0; }
.a-kpi-label, .a-kpi .eyebrow { display: flex; align-items: center; gap: 8px; margin: 0; font-size: var(--fs-13); font-weight: 400; letter-spacing: 0; color: var(--ink-2); }
.a-kpi-row { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--sp-3); min-width: 0; }
.a-kpi-value { margin: 0; font-size: var(--fs-34); line-height: 1.15; letter-spacing: -0.03em; font-weight: 500; color: var(--ink); min-width: 0; overflow-wrap: anywhere; }
.a-kpi-foot, .a-kpi .micro { margin: 0; font-size: var(--fs-13); font-weight: 400; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.a-kpi-foot .delta { font-size: inherit; }
.a-kpi-change { color: var(--ink); white-space: nowrap; }
.a-kpi-spark { flex: none; margin-bottom: 7px; }

/* ================================================================== tables: 40 px rows, one hairline, no zebra */
.table-scroll { position: relative; overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; }
.table-scroll > .a-table { width: max-content; min-width: 100%; }
.a-table { font-size: var(--fs-13); }
.a-table thead th { height: 32px; padding: 0 var(--sp-3); font-size: var(--fs-12); }
.a-table td, .a-table tbody th { height: var(--a-row); padding: 4px var(--sp-3); border-bottom: 1px solid var(--line); white-space: nowrap; }
.a-table tbody th[scope="row"] { font-weight: 400; text-align: left; font-size: var(--fs-13); letter-spacing: 0; color: var(--ink); background: transparent; }
.a-table tbody tr:hover th { background: color-mix(in srgb, var(--paper-2) 50%, transparent); }
.a-table th:first-child, .a-table td:first-child { padding-left: 0; }
.a-table th:last-child, .a-table td:last-child { padding-right: 0; }
.a-table .r { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.a-table .c { text-align: center; }
.a-table td.wrap, .a-table th.wrap { white-space: normal; min-width: 18ch; max-width: 52ch; }
.a-table .flag, .who .flag { max-width: none; flex: none; }
.a-table .who { max-width: 28ch; gap: 6px; }
.a-table .pill { height: 20px; font-size: var(--fs-11); padding: 0 8px; }
.a-st { white-space: nowrap; }
.a-st-win, .a-st-info { color: var(--ink); }
.a-st-neutral { color: var(--ink-2); }
.a-row-link { cursor: pointer; }
.a-empty { margin: 0; padding: var(--sp-2) 0; font-size: var(--fs-13); color: var(--ink-2); }
.a-empty-cell { padding: var(--sp-4) 0 !important; height: auto !important; white-space: normal !important; color: var(--ink-2); }
.flag-none { display: inline-block; width: 20px; }
.a-pill-xs { height: 18px; font-size: var(--fs-11); padding: 0 6px; }
/* inline share bars (the number is always printed beside them) */
.a-bar { display: inline-block; width: 60px; height: 6px; border-radius: 3px; background: var(--paper-2); vertical-align: middle; margin-right: 8px; overflow: hidden; }
.a-bar-fill { display: block; height: 100%; background: var(--ink-2); }
.a-bar-warn .a-bar-fill, .a-bar-loss .a-bar-fill { background: var(--signal); }

/* key/value lines: label left (ink-2), value right after it */
.a-kv { display: grid; grid-template-columns: minmax(120px, max-content) minmax(0, 1fr); gap: 8px var(--sp-6); margin: 0; font-size: var(--fs-14); }
.a-kv dt { color: var(--ink-2); }
.a-kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }

/* ================================================================== filters and toolbars: 40 px pills */
.a-toolbar { display: flex; align-items: center; gap: var(--sp-2); flex-wrap: wrap; min-width: 0; max-width: 100%; }
.a-toolbar .input, .a-select, .a-search .input, .a-num { height: var(--a-ctl); font-size: var(--fs-14); }
.a-select { width: auto; max-width: 100%; padding-left: 16px; padding-right: 40px; background-position: calc(100% - 21px) 52%, calc(100% - 16px) 52%; }
.a-search { position: relative; flex: 1 1 260px; max-width: 460px; min-width: 0; }
.a-search > .icon { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--ink-2); pointer-events: none; }
.a-search > .input { width: 100%; padding-left: 42px; padding-right: 44px; }
.a-search-go { position: absolute; right: 2px; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; color: var(--ink-2); }
.a-search-go:active:not(:disabled) { transform: translateY(-50%) scale(.95); }
.a-search-go .icon { width: 16px; height: 16px; }
.a-search-go::after { content: ""; position: absolute; inset: -4px; } /* a 44 px hit area */
.a-toolbar .segmented label, .a-head-actions .segmented label { height: 32px; padding: 0 14px; font-size: var(--fs-13); }
/* a group of links drawn as the segmented pill (the moderation status filter): track, raised thumb, 1.5 px ink ring */
.a-seg { display: inline-flex; gap: 4px; padding: 4px; border-radius: var(--r-pill); background: var(--paper-2); max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.a-seg a { position: relative; display: inline-flex; align-items: center; height: 32px; padding: 0 14px; border-radius: var(--r-pill); color: var(--ink-2); font-size: var(--fs-13); text-decoration: none; white-space: nowrap; }
.a-seg a:hover { color: var(--ink); }
.a-seg a[aria-current] { background: var(--raised); color: var(--ink); font-weight: 500; box-shadow: 0 0 0 1.5px var(--ink); }
.a-seg a::after { content: ""; position: absolute; inset: -6px 0; }
.a-pager { display: flex; justify-content: flex-start; gap: var(--sp-2); margin-top: var(--sp-3); }
.a-pager:empty { display: none; }
.a-actions { display: flex; flex-wrap: wrap; gap: var(--sp-2); align-items: center; }
.a-table .a-actions { flex-wrap: nowrap; gap: 6px; }

/* ================================================================== needs attention: a mark (shape + colour), a link, a line */
.a-attn { display: flex; flex-direction: column; }
.a-attn li { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: var(--sp-3); align-items: start; padding: 8px 0; }
.a-lv { display: inline-grid; place-items: center; width: 20px; height: 20px; margin-top: 1px; border-radius: 50%; font-size: var(--fs-12); font-weight: 500; line-height: 1; background: var(--paper-2); color: var(--ink-2); }
.a-lv .icon { width: 14px; height: 14px; }
.lv-loss .a-lv, .lv-warn .a-lv { background: var(--signal-wash); color: var(--signal-ink); }
.lv-ok .a-lv { background: transparent; }
.a-attn-text { min-width: 0; }
.a-attn a, .a-attn-title { font-weight: 500; color: var(--ink); }
.a-attn .lv-ok a, .a-attn .lv-ok .a-attn-title { font-weight: 400; }
.a-attn-detail { display: block; font-size: var(--fs-13); color: var(--ink-2); }
.a-allclear { display: flex; align-items: center; gap: var(--sp-3); margin: 0; }
.a-checks { margin-top: var(--sp-2); }
.a-checks summary, .a-dev summary { display: list-item; width: max-content; max-width: 100%; padding: 12px 0; cursor: pointer; color: var(--ink-2); font-size: var(--fs-13); line-height: 20px; }
.a-checks summary:hover, .a-dev summary:hover { color: var(--ink); }

/* small lists of people / rows */
.a-list { display: flex; flex-direction: column; }
.a-list > li { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); min-height: 40px; }
.a-list .meta { color: var(--ink-2); font-size: var(--fs-13); white-space: nowrap; }

/* ================================================================== a person, a game, a location */
/* in-page tabs (person, moderation) sit flush with the page edge, close to the title and the content */
.a-body > .tabs { margin: calc(-1 * var(--sp-4)) 0 calc(-1 * var(--sp-4)) -12px; }
.a-person-head { display: flex; align-items: center; gap: var(--sp-4); min-width: 0; }
.a-person-head > .avatar { --d: 56px; font-size: 24px; }
.a-person-head > div { min-width: 0; flex: 1; }
.a-more > summary .icon { width: 14px; height: 14px; }
.a-more[open] > summary { background: var(--paper-2); }
.a-more-menu { min-width: 280px; }
.a-person-name { display: flex; align-items: center; gap: var(--sp-2); flex-wrap: wrap; }
.a-person-name h1 { margin: 0; overflow-wrap: anywhere; }
.a-person-name .flag { width: 24px; height: 18px; }
.a-person-meta { margin: 4px 0 0; font-size: var(--fs-13); color: var(--ink-2); }
.a-tabs { margin: 0 0 calc(-1 * var(--sp-4)) -12px; }
.a-more { position: relative; }
.a-more > summary { list-style: none; }
.a-more > summary::-webkit-details-marker { display: none; }
.a-more-menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: var(--z-dropdown); }
@media (max-width: 899.98px) { .a-more-menu { right: auto; left: 0; } }
.a-danger-item, .menu [role="menuitem"].a-danger-item { color: var(--signal); }

.a-round + .a-round { margin-top: var(--sp-6); }
.a-round-head { display: flex; flex-wrap: wrap; gap: 4px var(--sp-4); align-items: baseline; margin-bottom: var(--sp-1); }
.a-round-head > b { font-size: var(--fs-15); }
.a-chat { display: flex; flex-direction: column; gap: 6px; max-height: 360px; overflow-y: auto; }
.a-chat li { display: flex; gap: var(--sp-2); align-items: center; flex-wrap: wrap; font-size: var(--fs-13); }
.a-chat .t { color: var(--ink-2); font-variant-numeric: tabular-nums; flex: none; }
.a-events { max-height: 420px; overflow: auto; }
.a-json { font-family: var(--font-ui); font-size: var(--fs-12); color: var(--ink-2); white-space: pre-wrap; overflow-wrap: anywhere; margin: 0; }
.a-pin-map { position: relative; border-radius: var(--r-3); overflow: hidden; }
.a-truth { fill: none; stroke: var(--ink); stroke-width: .35; }

/* ================================================================== settings: rows with one hairline between them */
.a-setting { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: var(--sp-4) var(--sp-8); align-items: center; padding: var(--sp-4) 0; border-bottom: 1px solid var(--line); }
.a-setting:last-child { border-bottom: 0; }
.a-setting-label { font-weight: 500; margin: 0 0 2px; }
.a-setting .micro { margin: 0; font-size: var(--fs-13); font-weight: 400; color: var(--ink-2); }
.a-setting > .select, .a-setting > .input { justify-self: start; }
.a-setting > .a-toolbar .input { flex: 1 1 260px; }
.a-fill { display: grid; grid-template-columns: repeat(2, max-content); gap: var(--sp-2) var(--sp-6); }
.a-fill .a-inline .micro { min-width: 9ch; }
.a-online { font-size: var(--fs-12); gap: 8px; }
.a-flags { display: flex; flex-wrap: wrap; gap: 0 var(--sp-6); }
.a-inline { display: inline-flex; align-items: center; gap: 6px; }
.a-inline .micro { font-weight: 400; color: var(--ink-2); min-width: 7ch; }
.a-num { width: 96px; padding: 0 14px; }
.a-save { position: sticky; bottom: 0; z-index: 1; padding: var(--sp-3) 0; background: color-mix(in srgb, var(--paper) 92%, transparent); }
.a-kv + .btn, .a-kv + a.small { margin-top: var(--sp-4); }
.a-kv .a-st { white-space: normal; }

/* ================================================================== sign-in, setup (under the bare top bar) */
.a-gate { display: flex; justify-content: center; padding: clamp(24px, 9vh, 112px) var(--gutter) var(--sp-16); }
.a-gate-card { width: min(400px, 100%); display: flex; flex-direction: column; }
.a-gate-card.a-gate-wide { width: min(620px, 100%); }
.a-gate-card > .stack > * + * { margin-top: var(--sp-5); }
.a-gate-card form.stack > * + * { margin-top: var(--sp-4); }
.a-gate h1 { font-size: var(--fs-28); line-height: 1.2; letter-spacing: -0.02em; }
.a-gate-lead { margin: 8px 0 0; color: var(--ink-2); font-size: var(--fs-14); }
.a-gate .btn-block { height: 48px; }
.a-gate-alt { align-self: flex-start; margin-left: -14px; }
.a-code { font-family: var(--font-ui); font-weight: 500; font-size: var(--fs-22); letter-spacing: .18em; height: 56px; text-align: center; }
.a-dev { margin-top: var(--sp-8); }
.a-dev form { margin-top: var(--sp-2); }
.a-enrol { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: var(--sp-6); align-items: start; }
.a-qr { background: var(--raised); border-radius: var(--r-3); padding: var(--sp-3); box-shadow: inset 0 0 0 1px var(--line); }
.qr { width: 100%; height: auto; }
.qr-bg { fill: var(--raised); }
.qr-ink { fill: var(--ink); }
/* a QR code must be dark on light to scan reliably: at Night the plate is the ink colour and the modules paper */
:root[data-theme="dark"] .qr-bg { fill: var(--ink); }
:root[data-theme="dark"] .qr-ink { fill: var(--paper); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .qr-bg { fill: var(--ink); } :root:not([data-theme="light"]) .qr-ink { fill: var(--paper); } }
.a-steps { list-style: decimal; padding-left: 1.4em; display: flex; flex-direction: column; gap: 4px; margin: 0; }
.a-secret { font-size: var(--fs-16); font-weight: 500; letter-spacing: .06em; padding: var(--sp-3) var(--sp-4); background: var(--paper-2); border-radius: var(--r-3); margin: 0; overflow-wrap: anywhere; user-select: all; }
.a-codes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px var(--sp-6); padding: var(--sp-4) var(--sp-5); background: var(--paper-2); border-radius: var(--r-3); font-size: var(--fs-15); font-weight: 500; font-variant-numeric: tabular-nums; }

/* dialogs: the fields stack 16 px apart */
.a-dialog-fields { display: flex; flex-direction: column; gap: var(--sp-4); }
.a-dialog .field-error { margin: var(--sp-3) 0 0; }

/* loading */
.a-loading .skeleton { height: 14px; }
.a-sk-0 { width: 40%; height: 28px !important; }
.a-sk-1 { width: 92%; }
.a-sk-2 { width: 76%; }

/* ================================================================== charts (admin/js/charts.js)
   Series: ink, the two data hues, then three greys (ink-2 and two ink/paper mixes) — always with a legend or a
   direct label and a table twin. Ramps (maps, the heat grid): ink mixed into the ground, 8 steps. */
.ac-fig { margin: 0; display: flex; flex-direction: column; gap: var(--sp-2); min-width: 0; }
.ac-head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--sp-3); }
.ac-head:not(:has(h3)) { justify-content: flex-end; margin-bottom: -8px; }
.ac-head h3 { font-size: var(--fs-14); font-weight: 500; }
.ac-flavour { margin: 2px 0 0; font-size: var(--fs-13); color: var(--ink-2); }
.ac-actions { display: flex; gap: var(--sp-2); align-items: center; flex: none; }
.ac-toggle { color: var(--ink-2); margin-right: -14px; }
.ac-toggle[aria-pressed="true"] { color: var(--ink); }
.ac-chart { display: flex; flex-direction: column; gap: var(--sp-2); }
.ac-wrap { position: relative; }
.ac-svg { width: 100%; height: auto; overflow: visible; }
.ac-svg text, .ac-clock text { font-family: var(--font-ui); font-variant-numeric: tabular-nums; }
.ac-grid { stroke: var(--line); stroke-width: 1; }
.ac-axis { fill: var(--ink-2); font-size: 11px; }
.ac-cross { stroke: var(--line-2); stroke-width: 1; }
.ac-line { fill: none; stroke-width: 1.75; stroke-linejoin: round; stroke-linecap: round; }
.ac-line.dashed { stroke-dasharray: 4 3; }
.ac-spark .ac-line { stroke-width: 1.5; stroke: var(--ink-2); }
.ac-spark .ac-dot { fill: var(--ink); }
.ac-area { opacity: .08; stroke: none; }
.ac-end { font-size: 11px; font-weight: 500; }
.ac-col { stroke: var(--paper); stroke-width: .5; }
.s-1 { --s: var(--ink); }
.s-2 { --s: var(--data-3); }
.s-3 { --s: var(--data-4); }
.s-4 { --s: var(--ink-2); }
.s-5 { --s: color-mix(in srgb, var(--ink) 50%, var(--paper)); }   /* ≥ 3:1 on paper in both themes */
.s-6 { --s: color-mix(in srgb, var(--ink) 24%, var(--paper)); }   /* "Other": the quiet remainder (legend + table twin carry it) */
.ac-line[class*="s-"] { stroke: var(--s); }
.ac-area[class*="s-"], .ac-col[class*="s-"], .ac-dot[class*="s-"], .ac-end[class*="s-"] { fill: var(--s); }
.ac-spark .ac-line[class*="s-"] { stroke: var(--ink-2); }
.ac-spark .ac-dot[class*="s-"] { fill: var(--ink); }
.ac-legend { display: flex; flex-wrap: wrap; gap: 4px var(--sp-4); font-size: var(--fs-13); color: var(--ink-2); }
.ac-legend li { display: inline-flex; align-items: center; gap: 6px; }
.ac-key { width: 12px; height: 12px; border-radius: 50%; background: var(--s); display: inline-block; }
.ac-key.dashed { width: 14px; height: 2px; border-radius: 0; background: repeating-linear-gradient(90deg, var(--s) 0 4px, transparent 4px 7px); }
.ac-tip { position: absolute; z-index: var(--z-tooltip); pointer-events: none; padding: 8px 12px; border-radius: var(--r-1); background: var(--ink); color: var(--paper); font-size: var(--fs-12); display: flex; flex-direction: column; gap: 1px; max-width: 240px; box-shadow: var(--shadow-pop); font-variant-numeric: tabular-nums; }
.ac-tip b { font-weight: 500; }
.ac-note { margin: var(--sp-2) 0 0; font-size: var(--fs-13); font-weight: 400; color: var(--ink-2); }
.ac-one { margin: 0; }
.ac-hbars { display: flex; flex-direction: column; gap: 8px; }
.ac-hbar { display: grid; grid-template-columns: minmax(80px, 34%) minmax(0, 1fr) max-content; gap: var(--sp-3); align-items: center; font-size: var(--fs-13); }
.ac-hbar-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.ac-hbar-track { height: 6px; border-radius: 3px; background: var(--paper-2); overflow: hidden; }
.ac-hbar-fill { display: block; height: 100%; background: var(--s, var(--ink-2)); border-radius: 3px; }
.ac-hbar-fill.s-1 { background: var(--ink-2); }
.ac-hbar-value { text-align: right; min-width: 6ch; }
.ac-hbar-value .muted { font-size: var(--fs-12); }
/* ramps: ink mixed into the ground in 8 steps (0 = no data) */
.d-1 { --dk: 10%; } .d-2 { --dk: 20%; } .d-3 { --dk: 30%; } .d-4 { --dk: 40%; }
.d-5 { --dk: 52%; } .d-6 { --dk: 64%; } .d-7 { --dk: 76%; } .d-8 { --dk: 88%; }
.ac-cell.d-0 { fill: var(--paper-2); }
.ac-cell[class*=" d-"]:not(.d-0) { fill: color-mix(in srgb, var(--ink) var(--dk), var(--paper-2)); }
.ac-land.d-0 { fill: var(--map-land); }
.ac-land[class*=" d-"]:not(.d-0) { fill: color-mix(in srgb, var(--ink) var(--dk), var(--map-land)); }
.ac-ramp { display: flex; align-items: center; gap: 2px; font-size: var(--fs-12); color: var(--ink-2); }
.ac-ramp span:first-child { margin-right: 6px; }
.ac-ramp span:last-child { margin-left: 6px; }
.ac-ramp-cell { width: 14px; height: 10px; border-radius: 2px; background: color-mix(in srgb, var(--ink) var(--dk), var(--paper-2)); }
.ac-clock { width: 100%; max-width: 240px; height: auto; margin: 0 auto; }
.ac-clock-ring { fill: none; stroke: var(--line); stroke-width: 1; }
.ac-clock-bar { fill: var(--ink-2); }
.ac-map-wrap { position: relative; display: flex; flex-direction: column; gap: var(--sp-3); }
.ac-map { border-radius: var(--r-3); overflow: hidden; }
.ac-world { width: 100%; height: auto; display: block; }
.ac-sea { fill: var(--map-water); }
.ac-land { stroke: var(--map-water); stroke-width: .15; }
.ac-city { fill: var(--data-3); fill-opacity: .8; stroke: var(--map-water); stroke-width: .2; }
.ac-map-legend { display: flex; align-items: center; gap: var(--sp-4); flex-wrap: wrap; font-size: var(--fs-12); color: var(--ink-2); }
.ac-map-legend .micro { font-weight: 400; }
.ac-dot-key { display: inline-flex; align-items: center; gap: 6px; }
.ac-city-key { width: 8px; height: 8px; border-radius: 50%; background: var(--data-3); display: inline-block; }
.ac-funnel { display: flex; flex-direction: column; gap: 10px; }
.ac-fig + .a-note, .ac-map-wrap .a-note, .a-sec > .a-note { margin-top: var(--sp-3); }
.ac-funnel-step { display: grid; grid-template-columns: minmax(150px, 24%) minmax(0, 1fr) 8ch 18ch; gap: var(--sp-4); align-items: center; }
.ac-funnel-label { display: flex; gap: var(--sp-3); align-items: baseline; font-weight: 500; min-width: 0; }
.ac-funnel-n { font-weight: 400; color: var(--ink-2); }
.ac-funnel-bar { height: 6px; background: var(--paper-2); border-radius: 4px; overflow: hidden; }
.ac-funnel-fill { display: block; height: 100%; background: var(--ink); border-radius: 4px; }
.ac-funnel-val { text-align: right; font-weight: 500; }
.ac-funnel-conv { color: var(--ink-2); font-weight: 400; font-size: var(--fs-13); }

/* cohort table: the tier ramp (its text pairs are AA, FINAL.md §3.2) */
.a-cohort td.r { min-width: 46px; }
.a-cohort .c0 { background: transparent; }
.a-cohort [class*="cb-"] { color: var(--depth-ink); }
.a-cohort .cb-1 { background: var(--depth-1); color: var(--ink); } .a-cohort .cb-2 { background: var(--depth-2); color: var(--ink); } .a-cohort .cb-3 { background: var(--depth-3); color: var(--ink); }
.a-cohort .cb-4 { background: var(--depth-4); color: var(--ink); } .a-cohort .cb-5 { background: var(--depth-5); } .a-cohort .cb-6 { background: var(--depth-6); } .a-cohort .cb-7 { background: var(--depth-7); } .a-cohort .cb-8 { background: var(--depth-8); }
.a-cohort td.r[class*="cb-"] { padding-right: var(--sp-2); }

/* ================================================================== responsive */
@media (max-width: 1279.98px) { .g-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 1099.98px) {
  .g-2, .g-3, .g-21, .g-12 { grid-template-columns: minmax(0, 1fr); }
  .a-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* below 960 px the six sections move into the menu sheet; the screens row stays */
@media (max-width: 959.98px) {
  .a-top .a-groups, .a-top .a-me, .a-top .tb-theme { display: none; }
  .a-top .tb-menu-btn { display: inline-grid; }
  .a-enrol { grid-template-columns: minmax(0, 1fr); }
  .a-enrol .a-qr { max-width: 240px; }
  .ac-funnel { gap: var(--sp-5); }
  .ac-funnel-step { grid-template-columns: minmax(0, 1fr) 8ch; gap: 6px var(--sp-3); }
  .ac-funnel-bar, .ac-funnel-conv { grid-column: 1 / -1; }
  .ac-funnel-bar { order: 3; }
  .ac-funnel-conv { order: 4; }
}
@media (max-width: 719.98px) {
  .a-page { padding-top: var(--sp-4); padding-bottom: var(--sp-16); }
  .a-body { gap: var(--sp-8); }
  .a-head h1, .a-gate h1 { font-size: var(--fs-22); }
  .a-person-head { gap: var(--sp-3); }
  .a-person-head > .avatar { --d: 44px; font-size: 18px; }
  .a-kpi-value { font-size: var(--fs-28); }
  .a-setting { grid-template-columns: minmax(0, 1fr); gap: var(--sp-2); }
  .a-fill { grid-template-columns: max-content; }
}
@media (max-width: 479.98px) {
  .a-kpis { gap: var(--sp-6) var(--sp-4); }
  .a-kpi-value { font-size: var(--fs-22); }
  .a-kpi-spark { display: none; }
  .a-codes { grid-template-columns: minmax(0, 1fr); }
  .a-kv { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .a-kv dd { margin-bottom: var(--sp-3); }
  .a-head-actions { width: 100%; }
  .a-search { flex-basis: 100%; max-width: none; }
}
@media (pointer: coarse) { .a-sublink { height: 44px; } .a-toolbar .input, .a-select, .a-search .input, .a-num { height: var(--hit-min); } }
@media (prefers-reduced-motion: reduce) { .skeleton { animation: none; } }
