/* RoTell V3 (design/brand-kit on main: DESIGN.md, THEME-ASSETS.md, brand-tokens.css). Ledger composition kept (docs/VISUAL_DIRECTION.md);
   identity carried by the palette, type and the wordmark. Brand colours are accents only: --rise/--fall/--warn stay semantic, and gold
   is never a growth, revenue or warning signal. Light text-on-ivory uses the dark inks (#765100, #574471), never pale gold. */
@font-face { font-family: "Inter"; src: url("/fonts/inter-latin-wght.3100e775e8.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Space Grotesk"; src: url("/fonts/space-grotesk-latin-wght.0640890476.woff2") format("woff2"); font-weight: 300 700; font-style: normal; font-display: swap; }
:root {
  /* palette (brand-tokens.css) */
  --midnight: #0B080D; --ivory: #FAF4E9; --gold-hi: #FFCA45; --lavender: #D9C9E8; --sand: #E9D4B7; --gold-dk: #765100; --lavender-dk: #574471;
  /* light theme: warm ivory paper, midnight ink */
  --paper: #FAF6EE; --panel: #FFFDF9; --ink: #0B080D; --muted: #5C5466; --line: #E6DCCB; --soft: #F2EADD; --raise: 0 1px 2px rgb(11 8 13 / 0.04), 0 1px 1px rgb(11 8 13 / 0.03);
  --brand: #574471; --brand-ink: #FAF4E9; --gold: #FFCA45; --gold-ink: #765100; --accent-line: #C99A1E;
  --rise: #076B49; --fall: #B42F2F; --warn: #9E4508; --focus: #574471;
  --glass: rgba(250, 246, 238, 0.86);
  --head: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
  --body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  /* motion (Emil Kowalski's framework): strong ease-out, under 300 ms, only for occasional actions */
  --t-press: 120ms; --t-select: 180ms; --t-panel: 240ms; --ease: cubic-bezier(0.23, 1, 0.32, 1); --ease-move: cubic-bezier(0.77, 0, 0.175, 1);
  --tint: color-mix(in srgb, var(--brand) 9%, transparent); --hover: color-mix(in srgb, var(--brand) 5%, transparent);
  --gold-tint: color-mix(in srgb, var(--gold) 22%, transparent);
  --r: 12px; --r-sm: 8px;
  color-scheme: light;
}
/* dark theme: midnight paper, ivory ink, lavender data, gold emphasis */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --paper: #0B080D; --panel: #151019; --ink: #FAF4E9; --muted: #B4A9BF; --line: #2A2230; --soft: #1D1723; --raise: none; --brand: #D9C9E8; --brand-ink: #0B080D; --gold: #FFCA45; --gold-ink: #FFCA45; --accent-line: #FFCA45; --rise: #42C995; --fall: #FF8070; --warn: #FFA15C; --focus: #FFCA45; --glass: rgba(11, 8, 13, 0.86); --gold-tint: color-mix(in srgb, #FFCA45 14%, transparent); color-scheme: dark; }
}
:root[data-theme="dark"] { --paper: #0B080D; --panel: #151019; --ink: #FAF4E9; --muted: #B4A9BF; --line: #2A2230; --soft: #1D1723; --raise: none; --brand: #D9C9E8; --brand-ink: #0B080D; --gold: #FFCA45; --gold-ink: #FFCA45; --accent-line: #FFCA45; --rise: #42C995; --fall: #FF8070; --warn: #FFA15C; --focus: #FFCA45; --glass: rgba(11, 8, 13, 0.86); --gold-tint: color-mix(in srgb, #FFCA45 14%, transparent); color-scheme: dark; }

* { box-sizing: border-box; }
html, body { margin: 0; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; } /* no iOS landscape auto-inflation; user zoom and text size still apply */
body { background: var(--paper); color: var(--ink); font: 0.875rem/1.55 var(--body); font-variant-numeric: tabular-nums; font-feature-settings: "cv11", "ss03"; -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; }
::selection { background: var(--gold-tint); }
a { color: var(--brand); text-underline-offset: 3px; text-decoration-thickness: 1px; }
main:focus { outline: none; } /* programmatic focus target after navigation */
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--panel); padding: 8px 12px; z-index: 10; }
.skip:focus { left: 8px; }
h1, h2, h3 { font-family: var(--head); line-height: 1.2; margin: 0; }
h1 { font-size: 1.85rem; font-weight: 700; letter-spacing: -0.025em; }
h2 { font-size: 1.12rem; font-weight: 650; margin: 30px 0 4px; letter-spacing: -0.01em; }
h3 { font-size: 0.98rem; font-weight: 650; }
p { margin: 4px 0; max-width: 76ch; }
.basis { color: var(--muted); font-size: 0.82rem; }
.muted { color: var(--muted); }

/* ---------- navigation rail: grouped by intent (monitor, explore, decide, owner) ---------- */
.rail { position: fixed; inset: 0 auto 0 0; width: 220px; isolation: isolate; background: var(--panel); border-right: 1px solid var(--line); padding: 16px 10px; display: flex; flex-direction: column; gap: 1px; overflow-y: auto; }
.rail .grp { font-size: 0.7rem; color: var(--muted); padding: 16px 10px 4px; letter-spacing: 0.06em; text-transform: uppercase; font-weight: 600; }
.rail a { color: var(--ink); text-decoration: none; padding: 7px 10px; min-height: 36px; border-radius: var(--r-sm); font-size: 0.9rem; font-weight: 520; transition: color var(--t-select) var(--ease); display: flex; align-items: center; gap: 10px; }
.ic { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; opacity: 0.78; }
.rail a[aria-current="page"] .ic { opacity: 1; }
.rail-more { display: contents; }
.rail .more { display: none; }
.rail a[aria-current="page"] { color: var(--ink); font-weight: 650; background: var(--gold-tint); box-shadow: inset 3px 0 var(--accent-line); }
/* One indicator glides between sections (transform only); without JS the current link carries the tint itself. */
.rail.marked a[aria-current="page"] { background: transparent; box-shadow: none; }
.rail-mark { position: absolute; left: 0; top: 0; width: 0; height: 0; border-radius: var(--r-sm); background: var(--gold-tint); box-shadow: inset 3px 0 var(--accent-line); z-index: -1; pointer-events: none; transition: transform var(--t-select) var(--ease-move), width var(--t-select) var(--ease), height var(--t-select) var(--ease); }
.rail:not(.marked) .rail-mark { display: none; }
.rail .brand { display: flex; align-items: center; gap: 8px; font-family: var(--head); font-size: 1.15rem; font-weight: 800; letter-spacing: -0.01em; padding: 4px 10px 10px; color: var(--ink); }
.rail .brand:hover { background: none; }
/* V3 board wordmark (design/brand-kit, imported by scripts/brand-import.mjs). The board background is part of the lockup; the theme
   picks the matching board. Both images are empty-alt: the link's aria-label names it. */
.rail .brand { padding: 4px 8px 12px; }
.brand .wm { display: block; width: 120px; height: auto; } /* transparent wordmark: sits directly on the navigation surface, no box */
.brand .mark { display: block; flex: none; width: 40px; height: 40px; } /* approved angel emblem on its own dark field, so it reads on both themes */
.rail .brand .wm { width: 120px; }
.brand .wm-dark { display: none; }
:root[data-theme="dark"] .brand .wm-dark { display: block; }
:root[data-theme="dark"] .brand .wm-light { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .brand .wm-dark { display: block; }
  :root:not([data-theme="light"]) .brand .wm-light { display: none; }
}
.rail a[hidden], .rail .grp[hidden] { display: none; }
@media (hover: hover) and (pointer: fine) { .rail a:not([aria-current="page"]):hover { background: var(--soft); } }

/* ---------- shell ---------- */
.shell { margin-left: 220px; padding: 0 clamp(20px, 2.2vw, 48px) 40px; } /* full-width workspace: no global max-width; prose blocks keep their own measure */
.top { position: sticky; top: 0; z-index: 4; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; margin-bottom: 20px; border-bottom: 1px solid var(--line); background: var(--glass); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.top-brand { display: none; }
/* Compact freshness and coverage: one short line; the full explanation opens on demand. */
details.status { position: relative; min-width: 0; }
details.status > summary { list-style: none; display: inline-flex; align-items: center; gap: 8px; max-width: 100%; padding: 5px 12px 5px 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--panel); cursor: pointer; min-height: 32px; }
details.status > summary::-webkit-details-marker { display: none; }
details.status > summary::after { content: ""; width: 5px; height: 5px; border-right: 1.5px solid var(--muted); border-bottom: 1.5px solid var(--muted); transform: rotate(45deg) translateY(-2px); flex: none; transition: transform var(--t-select) var(--ease); }
details.status[open] > summary::after { transform: rotate(-135deg) translateY(-1px); }
@media (hover: hover) and (pointer: fine) { details.status > summary:hover { border-color: var(--brand); } }
.status-more { position: absolute; left: 0; top: calc(100% + 6px); width: min(440px, calc(100vw - 28px)); background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); box-shadow: 0 10px 30px rgb(11 8 13 / 0.14); padding: 12px 14px; font-size: 0.82rem; z-index: 6; animation: unfold var(--t-panel) var(--ease); }
.status-more p { margin: 4px 0; }
.fresh { font-size: 0.8rem; color: var(--ink); margin: 0; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; font-weight: 520; }
.fresh::before { content: ""; display: inline-block; vertical-align: 1px; margin-right: 8px; width: 8px; height: 8px; border-radius: 50%; background: var(--rise); box-shadow: 0 0 0 3px color-mix(in srgb, var(--rise) 18%, transparent); flex: none; }
.fresh.stale { color: var(--warn); font-weight: 650; } .fresh.stale::before { background: var(--warn); box-shadow: 0 0 0 3px color-mix(in srgb, var(--warn) 18%, transparent); }
.fresh.delayed::before { background: transparent; border: 1.5px solid var(--warn); box-shadow: none; } /* delayed: hollow amber dot, text keeps normal weight */
.fresh .sep { color: var(--muted); font-weight: 400; }
.controls { display: flex; gap: 6px; flex: none; }
.controls button { display: inline-flex; align-items: center; gap: 6px; font-size: 0.8rem; padding: 5px 11px; min-height: 32px; border-radius: 999px; }
.controls .ic { width: 15px; height: 15px; opacity: 0.9; }
.controls button[hidden] { display: none; } /* the display rule above would otherwise override the hidden attribute */
@media (max-width: 1279px) { #ctx-toggle .lbl { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; } #ctx-toggle { padding: 5px 9px; } } /* icon only when the panel is a drawer */
@media (min-width: 641px) and (max-width: 1279px) { .controls { gap: 4px; } .controls button { padding: 5px 8px; } } /* keeps the freshness time untruncated beside the extra control */
.foot { color: var(--muted); font-size: 0.78rem; margin-top: 40px; border-top: 1px solid var(--line); padding-top: 14px; display: grid; gap: 14px 40px; align-items: start; }
.workspace { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 28px; align-items: start; }
.workspace.has-ctx { grid-template-columns: minmax(0, 1fr) clamp(280px, 20vw, 360px); }
.ctx { position: sticky; top: 68px; max-height: calc(100vh - 84px); overflow-y: auto; border-left: 1px solid var(--line); padding: 0 0 16px 20px; font-size: 0.86rem; }
.ctx h2 { font-size: 0.95rem; margin: 18px 0 6px; } .ctx h2:first-child { margin-top: 4px; }
.ctx .panel, .ctx .timeline { font-size: 0.82rem; } .ctx blockquote { margin: 4px 0 0; }
@media (max-width: 1279px) { .workspace.has-ctx { grid-template-columns: minmax(0, 1fr); }
  .ctx { position: fixed; z-index: 7; top: 0; right: 0; bottom: 0; max-height: none; width: min(360px, 92vw); background: var(--panel); border-left: 1px solid var(--line); padding: 16px; box-shadow: -8px 0 24px rgb(0 0 0 / 0.18); } }
.range { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 10px; }
.range button { font-size: 0.8rem; padding: 5px 12px; min-height: 32px; border-radius: 999px; }
.range button[aria-pressed="true"] { background: var(--gold-tint); border-color: var(--accent-line); color: var(--ink); font-weight: 650; }
.mh-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(380px, 100%), 1fr)); gap: 12px; }
.mh-grid .chart-wrap { margin: 0; min-width: 0; } .mh-grid h3 { font-size: 0.9rem; margin: 0 0 4px; }
@media (max-width: 640px) { .range button { min-height: 44px; } }
.sigcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(340px, 100%), 1fr)); gap: 12px; margin: 8px 0; }
.sigcard { display: grid; gap: 8px; padding: 12px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--panel); min-width: 0; align-content: start; }
.sc-head { display: flex; gap: 10px; align-items: flex-start; } .sc-title { flex: 1; min-width: 0; } .sc-title h3 { margin: 0; font-size: 0.98rem; overflow-wrap: anywhere; } .sc-title .basis, .sigcard .basis { margin: 0; }
.sc-nums { display: grid; grid-template-columns: 1fr 1.4fr; gap: 10px; } .sc-nums > div { display: grid; gap: 1px; min-width: 0; align-content: start; } .sc-nums b { font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.sc-spark svg { width: 100%; height: 44px; display: block; }
.btn { display: inline-flex; align-items: center; justify-content: center; padding: 5px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--panel); color: var(--ink); text-decoration: none; font-size: 0.8rem; font-weight: 560; }
@media (hover: hover) and (pointer: fine) { .btn:hover { border-color: var(--brand); } }
.sc-actions { display: flex; flex-wrap: wrap; gap: 8px; } .sc-actions .btn, .sc-actions button { min-height: 36px; }
@media (max-width: 640px) { .sc-actions .btn, .sc-actions button { min-height: 44px; } }
.copy-status { font-size: 0.8rem; color: var(--muted); } .copy-status:empty { display: none; } .brief-fallback { width: 100%; font: inherit; font-size: 0.8rem; margin-top: 6px; }
pre.brief { white-space: pre-wrap; overflow-wrap: anywhere; font: inherit; font-size: 0.86rem; background: var(--soft); padding: 12px 14px; border-radius: var(--r-sm); max-width: 96ch; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; margin: 8px 0 4px; }
.tile { display: grid; gap: 2px; align-content: start; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--panel); color: var(--ink); text-decoration: none; min-width: 0; }
.tile:hover { border-color: var(--brand); } .tile-k { font-size: 0.72rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; font-weight: 600; }
.tile-n { font-family: var(--head); font-size: 1rem; overflow-wrap: anywhere; } .tile-v { font-size: 1.05rem; font-weight: 650; font-variant-numeric: tabular-nums; } .tile .basis { margin: 0; font-size: 0.74rem; }
.tile-empty { color: var(--muted); }
.foot-id, .foot-notes { display: grid; gap: 4px; min-width: 0; }
@media (min-width: 900px) { .foot { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); } }
.foot .tagline { font-family: var(--head); font-size: 0.98rem; font-weight: 600; color: var(--ink); letter-spacing: -0.01em; }
.foot .tagline:has(.mark) { display: flex; align-items: center; gap: 10px; }
.foot .mark-sm { width: 28px; height: 28px; flex: none; }
.foot .tagline:has(.mark)::before { display: none; } /* the emblem carries the halo */
.foot .tagline::before { content: ""; display: inline-block; width: 14px; height: 6px; border: 1.5px solid var(--accent-line); border-radius: 50%; margin-right: 8px; vertical-align: 3px; transform: rotate(-12deg); } /* the halo motif, as a typographic mark */
.foot p { margin: 0; max-width: 92ch; }
/* standalone document pages (privacy notice): no rail, readable measure */
.doc { max-width: 76ch; margin: 0 auto; padding: 24px 16px 48px; }
.doc ul { padding-left: 20px; } .doc li { margin: 6px 0; }
.doc-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; padding-bottom: 14px; margin-bottom: 18px; border-bottom: 1px solid var(--line); }
.doc-head .brand .wm { width: 120px; }
.doc-head .brand { gap: 8px; }
.doc-head .brand .mark { width: 36px; height: 36px; }
.doc-foot { max-width: 76ch; margin: 0 auto 32px; padding: 16px 16px 0; }

.kicker { margin: 0 0 2px; font-family: var(--head); font-size: 0.86rem; font-weight: 600; color: var(--gold-ink); letter-spacing: 0.01em; }
.lead { display: flex; justify-content: space-between; align-items: end; gap: 16px; flex-wrap: wrap; }

/* ---------- controls ---------- */
button, select, input { font: inherit; color: inherit; }
button { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 6px 13px; min-height: 34px; cursor: pointer; font-size: 0.86rem; font-weight: 520; box-shadow: var(--raise); transition: border-color var(--t-press) ease, transform var(--t-press) var(--ease); touch-action: manipulation; }
button:active:not(:disabled) { transform: scale(0.97); }
@media (hover: hover) and (pointer: fine) { button:hover { border-color: var(--brand); } }
button[aria-pressed="true"] { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); font-weight: 600; }
button:disabled { opacity: 0.45; cursor: default; }
select, input[type="search"], input[type="number"], input:not([type]), input[type="file"], textarea { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 6px 10px; min-height: 36px; min-width: 0; max-width: 100%; font-size: 0.88rem; transition: border-color var(--t-press) ease; }
select:focus-visible, input:focus-visible, textarea:focus-visible { border-color: var(--focus); outline-offset: 1px; }
input[type="number"] { width: 9em; }
select { max-width: 100%; text-overflow: ellipsis; } /* a select is as wide as its longest option unless capped */
textarea { width: 100%; resize: vertical; }
.alert { border: 1px solid color-mix(in srgb, var(--fall) 45%, var(--line)); border-left: 3px solid var(--fall); color: var(--ink); background: color-mix(in srgb, var(--fall) 6%, var(--panel)); border-radius: var(--r-sm); padding: 10px 14px; margin-bottom: 16px; }
.notice { border: 1px solid var(--line); border-left: 3px solid var(--rise); color: var(--ink); background: var(--panel); border-radius: var(--r-sm); padding: 9px 14px; margin: 0 0 14px; animation: unfold var(--t-panel) var(--ease); }
.tabs { display: flex; gap: 4px; flex-wrap: wrap; margin: 8px 0; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: end; margin: 8px 0; }
.filters.picker { align-items: center; } .filters.picker select { width: 100%; }
details.filter-panel { margin: 8px 0; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); }
details.filter-panel > summary { padding: 10px 12px; min-height: 44px; display: flex; align-items: center; font-weight: 600; cursor: pointer; }
details.filter-panel > .filters { margin: 0; padding: 0 12px 12px; display: grid; grid-template-columns: 1fr 1fr; }
details.filter-panel > .filters label, details.filter-panel > .filters select, details.filter-panel > .filters input { width: 100%; }
details.filter-panel > .filters button { grid-column: 1 / -1; }
.filters label { display: flex; flex-direction: column; gap: 3px; font-size: 0.76rem; color: var(--muted); max-width: 100%; min-width: 0; }
.filters label.grow { flex: 1 1 220px; } .filters label.grow input { width: 100%; }
.pager { display: flex; gap: 10px; align-items: center; margin-top: 10px; }
.actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.stack { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }
.stack > label { display: flex; flex-direction: column; gap: 3px; font-size: 0.76rem; color: var(--muted); }
.stack > label input { width: 100%; }
details > summary { cursor: pointer; font-weight: 600; color: var(--brand); width: fit-content; }
details.compose { margin: 14px 0; }
details.correct > summary { font-weight: 500; border: 1px solid var(--line); border-radius: var(--r-sm); padding: 4px 12px; background: var(--panel); color: var(--ink); list-style: none; font-size: 0.86rem; }
details.correct[open] { flex-basis: 100%; }
details[open] > form { animation: unfold var(--t-panel) var(--ease); }
@keyframes unfold { from { opacity: 0; transform: translateY(-4px); } }
.prose { white-space: pre-wrap; max-width: 76ch; margin: 12px 0; }
.empty { background: color-mix(in srgb, var(--soft) 45%, transparent); border: 1px dashed var(--line); border-radius: var(--r); padding: 14px 16px; color: var(--muted); margin: 8px 0; }
/* loading: a quiet pulse on the word, no skeleton shapes that pretend to be data */
.loading { color: var(--muted); padding: 24px 0; display: flex; align-items: center; gap: 10px; }
.loading::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--gold); animation: pulse 1.1s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.25; } }
.empty strong { color: var(--ink); font-weight: 600; } .empty p { margin: 2px 0; }

/* ---------- panels and the ledger table ---------- */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px; box-shadow: var(--raise); }
.scroll { overflow-x: auto; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); -webkit-overflow-scrolling: touch; box-shadow: var(--raise); }
table { border-collapse: collapse; width: 100%; font-size: 0.86rem; }
th, td { text-align: left; padding: 8px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-weight: 600; color: var(--muted); font-size: 0.72rem; white-space: nowrap; letter-spacing: 0.03em; text-transform: uppercase; }
th button.sort { text-transform: uppercase; }
td.num, th.num { text-align: right; white-space: nowrap; }
tbody tr:last-child td { border-bottom: none; }
tbody tr { transition: background-color var(--t-press) ease; }
tbody tr:focus-within { background: var(--hover); }
tbody tr:focus-within > td:first-child { box-shadow: inset 2px 0 var(--brand); }
@media (hover: hover) and (pointer: fine) { tbody tr:hover { background: var(--hover); } tbody tr:hover > td:first-child { box-shadow: inset 2px 0 var(--brand); } }
thead th { position: sticky; top: 0; background: var(--panel); z-index: 1; }
td a, .kv a, ul.plain a, .game a { color: var(--ink); font-weight: 600; text-decoration: none; }
td a:hover, .kv a:hover, ul.plain a:hover, .game a:hover { color: var(--brand); text-decoration: underline; }
.simple .adv { display: none; }
.game { display: flex; align-items: center; gap: 10px; min-width: 180px; }
.thumb { width: 34px; height: 34px; border-radius: 8px; background: var(--soft); flex: none; object-fit: cover; box-shadow: inset 0 0 0 1px var(--line); }
.thumb.big { width: 72px; height: 72px; border-radius: 16px; }
.rise { color: var(--rise); } .fall { color: var(--fall); }
.chips { display: inline-flex; flex-wrap: wrap; gap: 2px 0; max-width: 100%; }
.chip { display: inline-block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; overflow-wrap: normal; word-break: normal; vertical-align: middle; font-size: 0.74rem; padding: 1px 8px; border-radius: 999px; background: var(--soft); margin: 1px 3px 1px 0; color: var(--ink); text-decoration: none; font-weight: 500; max-width: 100%; overflow-wrap: anywhere; vertical-align: bottom; } /* wraps only when a name is longer than its cell */
.chip.save { border: 1px solid var(--brand); color: var(--brand); background: transparent; padding: 3px 10px; font-size: 0.8rem; }
/* Status is a dot and a word: colour supports the word, never replaces it. */
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: 0.8rem; font-weight: 550; white-space: nowrap; }
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: none; }
.st-emerging, .st-growing, .st-repeat_success, .st-hit { color: var(--rise); }
.st-declining, .st-miss { color: var(--fall); }
.st-saturating, .st-single_success { color: var(--warn); }
.st-mature, .st-insufficient_data, .st-insufficient_coverage, .st-no_qualifying_game, .st-pending, .st-evidence, .st-note, .st-comparison { color: var(--muted); }

/* In-cell encodings (composition A): a demand band under the segment name and a diverging growth bar. Widths come from data. */
.seg-name { display: flex; align-items: baseline; gap: 6px; }
.seg-name .muted { font-size: 0.78rem; }
.band { display: block; height: 4px; border-radius: 2px; background: color-mix(in srgb, var(--brand) 55%, transparent); margin-top: 5px; min-width: 2px; }
.growth { display: inline-flex; align-items: center; gap: 8px; justify-content: flex-end; }
.dbar { position: relative; width: 56px; height: 4px; border-radius: 2px; background: var(--soft); flex: none; }
.dbar i { position: absolute; top: 0; bottom: 0; border-radius: 2px; }
.dbar i.up { left: 50%; background: var(--rise); } .dbar i.down { right: 50%; background: var(--fall); }

/* KPI strip: confident numerals, small labels below (no eyebrows). */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; margin: 14px 0; box-shadow: var(--raise); }
.kpis.compact { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.kpis.compact .kpi { padding: 8px 12px; } .kpis.compact .kpi b { font-size: 1.15rem; } .kpis.compact .kpi a { color: inherit; text-decoration: none; }
.kpi { background: var(--panel); padding: 14px 18px 15px; display: flex; flex-direction: column; gap: 4px; }
.kpi b { display: block; font-family: var(--head); font-size: 1.7rem; font-weight: 650; letter-spacing: -0.03em; line-height: 1.05; font-variant-numeric: tabular-nums; }
.kpi > span { color: var(--muted); font-size: 0.76rem; line-height: 1.35; }
.sharebar { display: flex; gap: 2px; height: 10px; border-radius: 5px; overflow: hidden; margin: 8px 0 4px; }
.sharebar i { background: var(--brand); min-width: 2px; }
.sharebar i:nth-child(2) { opacity: 0.72; } .sharebar i:nth-child(3) { opacity: 0.52; } .sharebar i:nth-child(n+4) { opacity: 0.34; }

/* ---------- the memorable element: strata (gameplay waves as demand bands) ---------- */
.strata { border-top: 1px solid var(--line); margin-top: 10px; }
.wave { display: grid; grid-template-columns: minmax(150px, 220px) minmax(0, 1fr) 72px; gap: 4px 18px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.strata.with-spark .wave { grid-template-columns: minmax(150px, 220px) minmax(0, 1fr) 150px 72px; }
.st-name h3 { font-size: 0.98rem; } .st-name h3 a { color: var(--ink); text-decoration: none; } .st-name h3 a:hover { color: var(--brand); text-decoration: underline; }
.st-name .basis { display: block; margin-top: 2px; }
.st-band { display: flex; align-items: center; gap: 10px; min-width: 0; }
.st-band .track { flex: 1 1 auto; min-width: 0; display: block; }
.st-band .fill { display: block; height: 24px; border-radius: 3px; background: color-mix(in srgb, var(--brand) 78%, transparent); box-shadow: inset -2px 0 var(--brand); transform-origin: left center; }
.st-band .big { font-family: var(--head); font-size: 1.15rem; font-weight: 650; letter-spacing: -0.02em; white-space: nowrap; }
.st-growth { text-align: right; font-family: var(--head); font-weight: 650; font-size: 1.02rem; }
.st-sim { grid-column: 1 / -1; margin: 0; }
svg.spark { width: 100%; height: 44px; display: block; }
svg.chart { width: 100%; height: auto; display: block; touch-action: pan-y; }
.ln { fill: none; stroke: var(--brand); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
/* The single orchestrated moment: on the first view of a session the wave lines draw in once. */
body.intro .wave .ln.draw { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 900ms var(--ease) 120ms forwards; }
body.intro .wave .fill { animation: grow 700ms var(--ease) both; } /* bands rise with the lines: the same single moment */
body.intro .wave:nth-child(2) .fill { animation-delay: 50ms; } body.intro .wave:nth-child(n+3) .fill { animation-delay: 100ms; }
@keyframes grow { from { transform: scaleX(0); } }
@keyframes draw { to { stroke-dashoffset: 0; } }
.ln.alt { stroke: var(--muted); stroke-dasharray: 4 3; stroke-width: 1.5; }
.ln.peak { stroke: var(--rise); stroke-width: 1.2; opacity: 0.7; }
.axis { fill: var(--muted); font-size: 9.5px; font-family: var(--body); }
.grid-ln { stroke: var(--line); stroke-width: 1; }
/* Chart cursor: follows pointer, touch or arrow keys; shows the stored values for that day only. */
.cursor { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 2 3; }
.cursor-dot { fill: var(--panel); stroke: var(--brand); stroke-width: 2; }
.chart-wrap { position: relative; }
.readout { display: flex; gap: 6px 16px; flex-wrap: wrap; font-size: 0.82rem; min-height: 1.5em; margin-top: 8px; padding: 6px 10px; background: var(--soft); border-radius: var(--r-sm); width: fit-content; max-width: 100%; }
.readout b { font-weight: 650; }
.legend { font-size: 0.76rem; color: var(--muted); display: flex; gap: 14px; flex-wrap: wrap; }
.key { display: inline-block; width: 16px; height: 0; border-top: 2px solid var(--brand); vertical-align: middle; margin-right: 4px; }
.key.alt { border-top: 2px dashed var(--muted); } .key.peak { border-top-color: var(--rise); }

/* ---------- timeline of chart events ---------- */
.timeline { list-style: none; margin: 8px 0 0; padding: 0; border-left: 1px solid var(--line); }
.timeline li { position: relative; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; padding: 7px 0 7px 18px; }
.timeline li::before { content: ""; position: absolute; left: -4px; top: 13px; width: 7px; height: 7px; border-radius: 50%; background: var(--muted); }
.timeline .ev-rise::before { background: var(--rise); } .timeline .ev-fall::before { background: var(--fall); } .timeline .ev-brand::before { background: var(--brand); }
.timeline time { color: var(--muted); font-size: 0.8rem; min-width: 72px; }
.timeline .ev-kind { font-size: 0.8rem; font-weight: 600; min-width: 96px; }
.timeline a { color: var(--ink); font-weight: 600; text-decoration: none; } .timeline a:hover { color: var(--brand); text-decoration: underline; }

/* ---------- methodology behind native disclosures ---------- */
details.method { margin: 4px 0 8px; font-size: 0.82rem; color: var(--muted); }
details.method > summary { color: var(--muted); font-weight: 550; list-style: none; display: inline-flex; align-items: center; gap: 6px; padding: 4px 0; min-height: 32px; }
details.method > summary::-webkit-details-marker { display: none; }
details.method > summary::before { content: ""; width: 6px; height: 6px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(-45deg); transition: transform var(--t-select) var(--ease); }
details.method[open] > summary::before { transform: rotate(45deg); }
details.method > div { border-left: 2px solid var(--line); padding: 2px 0 2px 12px; max-width: 76ch; }
details.method p { margin: 4px 0; }
details.method .kv { color: var(--ink); margin-top: 8px; }

/* ---------- Market Explorer split panel (wide screens) ---------- */
.split { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.split-list .seg-name { flex-wrap: wrap; column-gap: 6px; }
.split-list .badge { white-space: normal; }
.split-list .dbar { width: 40px; }
.split-detail { padding: 16px 18px; }
.split-detail .kpis { grid-template-columns: repeat(2, 1fr); }
.seg-title { font-size: 1.35rem; font-weight: 700; letter-spacing: -0.025em; margin: 0; }
h1.seg-title { font-size: 1.6rem; }
h2.sub, h3.sub { font-size: 0.9rem; margin: 18px 0 6px; }
tbody tr.sel { background: var(--tint); }
tbody tr.sel > td:first-child { box-shadow: inset 2px 0 var(--brand); }
.seg-name a[aria-current="true"] { color: var(--brand); }

/* ---------- Opportunity map ---------- */
.chart-fig { margin: 12px 0; }
svg.scatter { width: 100%; height: auto; display: block; overflow: visible; }
.pt { fill: color-mix(in srgb, var(--muted) 18%, transparent); stroke: var(--muted); stroke-width: 1; transition: fill var(--t-press) ease; }
.pt.pass { fill: color-mix(in srgb, var(--brand) 45%, transparent); stroke: var(--brand); stroke-width: 1.5; }
svg.scatter a:focus-visible .pt, svg.scatter a:hover .pt { stroke-width: 2.5; }
svg.scatter a:focus { outline: none; }
.threshold { stroke: var(--brand); stroke-dasharray: 4 4; stroke-width: 1; opacity: 0.7; }
.pt-label { fill: var(--ink); font-size: 11px; font-weight: 600; font-family: var(--body); paint-order: stroke; stroke: var(--panel); stroke-width: 3px; stroke-linejoin: round; }
.pt-label.muted { fill: var(--muted); font-weight: 500; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; border: 1px solid var(--muted); background: color-mix(in srgb, var(--muted) 18%, transparent); margin-right: 5px; vertical-align: -1px; }
.dot.pass { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 45%, transparent); }

.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); gap: 16px; }
.kv { display: grid; grid-template-columns: minmax(0, max-content) minmax(0, 1fr); gap: 6px 16px; font-size: 0.86rem; margin: 0; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; overflow-wrap: anywhere; }
.hero { display: flex; gap: 16px; align-items: center; margin-bottom: 4px; }
ul.plain { list-style: none; padding: 0; margin: 6px 0; }
ul.plain li { padding: 8px 0; border-bottom: 1px solid var(--line); }
ul.plain li:last-child { border-bottom: none; }
ul.plain.panel { padding-top: 4px; padding-bottom: 4px; }
blockquote { margin: 2px 0 0; color: var(--muted); font-size: 0.84rem; }

/* ---------- phone: bottom glass bar, larger touch targets ---------- */
@media (max-width: 640px) {
  #ctx-toggle, .ctx { display: none !important; } /* phones keep the single column and bottom navigation */
  .rail { inset: auto 0 0 0; width: auto; height: auto; padding: 4px max(4px, env(safe-area-inset-right, 0px)) calc(4px + env(safe-area-inset-bottom)) max(4px, env(safe-area-inset-left, 0px)); flex-direction: row; justify-content: space-between; align-items: stretch; border-right: none; border-top: 1px solid var(--line); z-index: 5; overflow: visible; background: var(--glass); backdrop-filter: blur(14px) saturate(1.4); -webkit-backdrop-filter: blur(14px) saturate(1.4); }
  .rail .brand, .rail .grp { display: none; }
  .rail > a, .rail .more { flex: 1 1 0; min-width: 0; min-height: 52px; flex-direction: column; justify-content: center; gap: 3px; padding: 4px 2px; font-size: 0.68rem; font-weight: 560; text-align: center; border: 0; background: transparent; border-radius: var(--r-sm); color: var(--ink); }
  .rail > a span, .rail .more span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
  /* Short names on the bar so no label is cut off; the full name stays in the sheet and on wide screens. */
  .rail > a[data-short] span { display: none; }
  .rail > a[data-short]::after { content: attr(data-short); white-space: nowrap; }
  .rail .more { display: flex; align-items: center; font: inherit; font-size: 0.68rem; font-weight: 560; cursor: pointer; box-shadow: none; background: transparent; }
  .rail .more.on, .rail .more[aria-expanded="true"] { color: var(--ink); background: var(--gold-tint); }
  .ic { width: 20px; height: 20px; }
  .rail a[aria-current="page"], .rail-mark { box-shadow: inset 0 3px var(--accent-line); }
  .rail > a, .rail .more { border-radius: 10px; }
  /* More sheet: the remaining sections, full labels, above the bar */
  .rail-more { display: none; }
  .rail.open .rail-more { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; position: fixed; left: 8px; right: 8px; bottom: calc(66px + env(safe-area-inset-bottom)); padding: 8px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); box-shadow: 0 8px 28px rgba(0, 0, 0, 0.18); animation: unfold var(--t-panel) var(--ease); }
  .rail.open .rail-more a { min-height: 44px; padding: 8px 10px; font-size: 0.86rem; }
  .rail.open .rail-more a[aria-current="page"] { background: var(--gold-tint); color: var(--ink); box-shadow: inset 3px 0 var(--accent-line); }
  thead th { position: static; }
  .shell { margin-left: 0; padding: 0 max(14px, env(safe-area-inset-right, 0px)) calc(88px + env(safe-area-inset-bottom, 0px)) max(14px, env(safe-area-inset-left, 0px)); }
  .top { padding: calc(6px + env(safe-area-inset-top, 0px)) 0 8px; margin-bottom: 14px; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 8px; }
  .top-brand { display: flex; align-items: center; min-height: 44px; min-width: 44px; line-height: 0; } .top-brand { gap: 6px; } .top-brand .mark { width: 32px; height: 32px; } .top-brand .wm { width: 76px; } /* compact board lockup: no subtitle */
  details.status { justify-self: start; min-width: 0; max-width: 100%; }
  details.status > summary { padding: 4px 12px 4px 10px; min-height: 44px; }
  .status-more { position: fixed; left: 12px; right: 12px; top: calc(56px + env(safe-area-inset-top, 0px)); width: auto; }
  .controls .lbl { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; } /* icon buttons on phones; the name stays for assistive tech */
  .controls button { padding: 0; width: 44px; min-height: 44px; justify-content: center; }
  .controls { gap: 4px; }
  h1 { font-size: 1.5rem; }
  .kicker { font-size: 0.78rem; }
  th, td { padding: 8px 9px; }
  .game { min-width: 150px; }
  button, select { min-height: 38px; }
  .kpi { padding: 12px 14px; } .kpi b { font-size: 1.35rem; }
  .kpis.compact { grid-template-columns: 1fr 1fr; } .kpis.compact .kpi:last-child:nth-child(odd) { grid-column: 1 / -1; }
  h2 { margin-top: 16px; }
  /* Tables with many columns become labelled rows: the first cell is the row's title, then label/value pairs. */
  .scroll:has(table.stacked) { overflow-x: visible; }
  table.stacked thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  table.stacked, table.stacked tbody { display: block; }
  table.stacked tr { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 14px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
  table.stacked tbody tr:last-child { border-bottom: none; }
  table.stacked td { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; padding: 2px 0; border: 0; text-align: left; min-width: 0; }
  table.stacked td.title { grid-column: 1 / -1; order: -1; padding-bottom: 4px; }
  table.stacked td[data-label]:not(.title)::before { content: attr(data-label); color: var(--muted); font-size: 0.74rem; font-weight: 400; }
  table.stacked td > * { min-width: 0; max-width: 100%; }
  table.stacked td { overflow-wrap: break-word; flex-wrap: wrap; }
  .simple table.stacked td.adv { display: none; }
  table.stacked tr > td { box-shadow: none !important; }
  .wave, .strata.with-spark .wave { grid-template-columns: minmax(0, 1fr) auto; }
  .st-band, .st-spark { grid-column: 1 / -1; }
  .st-growth { grid-row: 1; grid-column: 2; }
  .fresh { font-size: 0.74rem; }
  .fresh .wide, .fresh .lw { display: none; }
  .dbar { display: none; }
  svg.chart .axis { font-size: 19px; } /* the 720-unit history chart scales to about half on a phone */
  .seg-name { flex-wrap: wrap; column-gap: 6px; row-gap: 0; }
}

/* Route changes: only the content area fades, opacity only (frequent action, so no movement). Shared names morph a selected
   segment's title into the detail heading (View Transitions, feature-detected in app.js). */
#main { view-transition-name: main; }
::view-transition-old(root), ::view-transition-new(root) { animation: none; }
::view-transition-old(main) { animation: vt-out 120ms ease-out both; }
::view-transition-new(main) { animation: vt-in var(--t-select) var(--ease) both; }
::view-transition-group(seg-title) { animation-duration: var(--t-panel); animation-timing-function: var(--ease-move); }
@keyframes vt-out { to { opacity: 0; } }
@keyframes vt-in { from { opacity: 0; } }
/* Reduced motion: no movement; short opacity changes that aid comprehension stay. */
@media (prefers-reduced-motion: reduce) {
  * { transition-property: opacity, color, background-color, border-color !important; }
  .rail-mark { transition: none !important; }
  button:active:not(:disabled) { transform: none; }
  details[open] > form, .notice { animation: fade 120ms ease-out; }
  ::view-transition-group(seg-title) { animation: none; }
  body.intro .wave .ln.draw { stroke-dasharray: none; stroke-dashoffset: 0; animation: none; }
  body.intro .wave .fill { animation: none; }
  .rail.open .rail-more { animation: fade 120ms ease-out; }
  .loading::before { animation: none; }
  .status-more { animation: fade 120ms ease-out; }
  details.status > summary::after { transition: none; }
}
@keyframes fade { from { opacity: 0; } }

/* Chips: primary label first and stronger; inferred labels are dashed (not verified). */
.chip.primary { font-weight: 650; background: var(--tint); color: var(--brand); }
.chip.inferred { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--muted) 35%, transparent); }
.chip.more { color: var(--muted); }
th button.sort { all: unset; cursor: pointer; font: inherit; color: inherit; } th button.sort:focus-visible { outline: 2px solid var(--focus); border-radius: 4px; }
th button.sort[aria-pressed="true"] { color: var(--ink); font-weight: 650; }
/* Game cards (phones) */
ul.gcards { list-style: none; margin: 8px 0; padding: 0; display: grid; gap: 8px; }
.gcard { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 10px 12px; }
.gc-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center; }
.gc-name a { color: var(--ink); font-weight: 650; text-decoration: none; overflow-wrap: break-word; }
.gc-name .basis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gc-rank { color: var(--muted); font-weight: 600; }
.gc-ccu { text-align: right; } .gc-ccu b { display: block; font-family: var(--head); font-size: 1.05rem; } .gc-ccu .basis { font-size: 0.72rem; white-space: nowrap; }
.gc-tags { margin-top: 6px; }
details.gc-more { margin-top: 4px; } details.gc-more > summary { min-height: 32px; display: flex; align-items: center; color: var(--brand); font-size: 0.82rem; cursor: pointer; }
details.gc-more .kv { margin: 4px 0 0; font-size: 0.82rem; }
details.more-waves > summary { min-height: 40px; display: flex; align-items: center; color: var(--brand); cursor: pointer; }
p.overlap { margin-top: 4px; }
.tip { position: absolute; z-index: 30; background: var(--ink); color: var(--paper); font-size: 0.8rem; line-height: 1.4; padding: 9px 11px; border-radius: var(--r-sm); box-shadow: 0 8px 24px rgb(11 8 13 / 0.22); }
.notice.warn { border-left-color: var(--warn); margin: 6px 0; }
.src { display: inline-block; font-size: 0.68rem; font-weight: 600; padding: 0 6px; border-radius: 4px; margin-left: 6px; border: 1px solid var(--line); color: var(--muted); white-space: nowrap; }
.src-official_genre, .src-official_subgenre { color: var(--ink); background: var(--soft); }
.src-rotell_label { color: var(--brand); border-color: color-mix(in srgb, var(--brand) 40%, transparent); }
.src-title_formula { border-style: dashed; }
fieldset.srcs { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; } fieldset.srcs legend { font-size: 0.76rem; color: var(--muted); padding: 0; margin-bottom: 2px; }
label.check { display: inline-flex !important; flex-direction: row !important; align-items: center; gap: 6px; font-size: 0.84rem !important; color: var(--ink) !important; min-height: 32px; }
details.reps > summary { color: var(--brand); font-size: 0.8rem; cursor: pointer; min-height: 28px; display: flex; align-items: center; } details.reps ul { margin: 4px 0; }
.gc-head.nx { grid-template-columns: minmax(0, 1fr) auto; }
.nx-kv { display: grid; grid-template-columns: auto 1fr auto 1fr; gap: 2px 10px; font-size: 0.8rem; margin: 6px 0 0; } .nx-kv dd { margin: 0; text-align: right; }
details.filter-panel fieldset.srcs, details.filter-panel label.grow { grid-column: 1 / -1; }

/* ---------- administration ---------- */
.adm-tools { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; margin: 10px 0; }
.adm-tools .panel h3 { font-size: 0.86rem; margin: 0 0 8px; }
.adm-tools .filters { margin: 0; }
ul.review { list-style: none; margin: 8px 0; padding: 0; display: grid; gap: 10px; }
.rcard { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; box-shadow: var(--raise); }
.rcard-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.rcard-head a { font-weight: 650; color: var(--ink); text-decoration: none; } .rcard-head a:hover { text-decoration: underline; }
.rcard .pa { margin: 6px 0; }
.reasons { list-style: none; padding: 0; margin: 6px 0 8px; font-size: 0.8rem; color: var(--muted); }
.reasons li { padding-left: 14px; position: relative; } .reasons li::before { content: ""; position: absolute; left: 2px; top: 0.55em; width: 6px; height: 6px; border-radius: 50%; background: var(--warn); }
/* provenance: inferred (rules) and AI suggestions are outlined; verified (human) is solid */
.prov { display: inline-flex; align-items: center; font-size: 0.7rem; font-weight: 650; padding: 1px 8px; border-radius: 999px; letter-spacing: 0.02em; white-space: nowrap; }
.prov-rules { border: 1px dashed var(--muted); color: var(--muted); }
.prov-ai { border: 1px solid var(--brand); color: var(--brand); }
.prov-human { background: var(--brand); color: var(--brand-ink); }
.conf { font-size: 0.72rem; font-weight: 650; padding: 1px 8px; border-radius: 999px; background: var(--soft); color: var(--ink); white-space: nowrap; }
.conf.low { background: color-mix(in srgb, var(--warn) 14%, var(--panel)); color: var(--warn); }
.chip.role-primary { font-weight: 650; background: var(--tint); color: var(--brand); }

/* narrowest phones (320-430 px): the time in the status pill must stay visible; targets stay 44 px */
@media (max-width: 430px) {
  .top-brand { gap: 4px; } .top-brand .mark { width: 28px; height: 28px; } .top-brand .wm { width: 54px; } /* phone lockup: emblem + compact wordmark must leave the freshness time untruncated */
}
@media (max-width: 380px) {
  .top { gap: 6px; } .top-brand { gap: 3px; } .top-brand .mark { width: 26px; height: 26px; } .top-brand .wm { width: 50px; }
  details.status > summary { padding: 4px 9px 4px 8px; gap: 0; } details.status > summary::after { display: none; }
  .fresh { font-size: 0.7rem; } .fresh::before { margin-right: 6px; }
}
@media (max-width: 340px) {
  /* !important: the theme rules (:root[data-theme] .brand .wm-dark, specificity 0,4,0) would otherwise show the wordmark again */
  .top-brand .wm { display: none !important; } .top-brand .mark { width: 36px; height: 36px; } /* emblem alone: keeps the freshness time untruncated; the name stays in the link's accessible name */
}
