/* newsagent — instrument panel
 *
 * Dark by default because this is read at 7am and it is mostly numbers.
 * Light exists and is a real design, not an inversion.
 *
 * Every colour is a token on :root. Nothing below this block hard-codes one,
 * which is what makes the light theme a 30-line override instead of a rewrite.
 */

:root {
  --bg:        #08090b;
  --panel:     #0f1216;
  --panel-2:   #14181e;
  --line:      #1e242c;
  --line-soft: #171c22;
  --ink:       #ccd5df;
  --ink-bright:#f2f6fa;
  --ink-dim:   #78838f;
  --ink-faint: #4a545e;
  --accent:    #4ade80;
  --accent-dim:#1a3b28;
  /* Text that sits on --accent. A token rather than a per-rule override,
   * because the readable colour flips with the theme and three rules that
   * each remember to flip is three chances to forget. */
  --on-accent: #08090b;
  --warn:      #fbbf24;
  --shadow:    0 8px 32px rgba(0,0,0,.55);
  --grid:      rgba(255,255,255,.022);

  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
  --sans: system-ui, -apple-system, "Segoe UI", Inter, sans-serif;

  /* Topic colour is keyed on the namespace before the slash, so the six ai/*
   * topics read as one family on the calendar rather than six unrelated hues. */
  --t-ai:          #38bdf8;
  --t-policy:      #fbbf24;
  --t-business:    #4ade80;
  --t-jobs:        #a78bfa;
  --t-opportunity: #fb7185;
  --t-product:     #60a5fa;
  --t-technology:  #94a3b8;
  --t-science:     #2dd4bf;
  --t-world:       #f472b6;
  --t-other:       #64748b;

  --bar-h: 46px;
}

:root[data-theme="light"] {
  --bg:        #f4f6f8;
  --panel:     #ffffff;
  --panel-2:   #eef1f5;
  --line:      #d6dde5;
  --line-soft: #e5eaf0;
  --ink:       #2b343d;
  --ink-bright:#0b1219;
  --ink-dim:   #64717e;
  --ink-faint: #97a3b0;
  --accent:    #16a34a;
  --accent-dim:#d4f0de;
  --on-accent: #ffffff;
  --warn:      #b45309;
  --shadow:    0 8px 28px rgba(20,30,45,.14);
  --grid:      rgba(10,20,35,.028);

  --t-ai:          #0284c7;
  --t-policy:      #b45309;
  --t-business:    #15803d;
  --t-jobs:        #6d28d9;
  --t-opportunity: #be123c;
  --t-product:     #1d4ed8;
  --t-technology:  #475569;
  --t-science:     #0d9488;
  --t-world:       #be185d;
  --t-other:       #64748b;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 14px/1.5 var(--sans);
  font-variant-numeric: tabular-nums;
  /* The faint graph-paper grid that makes it feel like an instrument rather
   * than a document. Two gradients, no image, no request. */
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 28px 28px, 28px 28px;
  padding-top: var(--bar-h);
}

/* Scanline sheen. Pure decoration, so it never intercepts a click and it is
 * the first thing to go when the reader has asked for less motion. */
.scanlines {
  position: fixed; inset: 0; pointer-events: none; z-index: 1;
  background: repeating-linear-gradient(
    to bottom, transparent 0 3px, rgba(0,0,0,.13) 3px 4px);
  opacity: .5; mix-blend-mode: multiply;
}
:root[data-theme="light"] .scanlines { display: none; }

::selection { background: var(--accent); color: var(--on-accent); }

/* ---------------------------------------------------------------- top bar */

.bar {
  position: fixed; top: 0; left: 0; right: 0; height: var(--bar-h); z-index: 40;
  display: flex; align-items: center; gap: 18px;
  padding: 0 14px;
  background: color-mix(in srgb, var(--panel) 88%, transparent);
  backdrop-filter: blur(14px) saturate(1.3);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex; align-items: center; gap: 8px;
  background: none; border: 0; padding: 0; cursor: pointer;
  color: var(--ink-bright); font: 600 12px/1 var(--mono); letter-spacing: .14em;
}
.brand-mark { color: var(--accent); font-size: 15px; }
.brand:hover .brand-mark { animation: spin 1.4s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.bar-nav { display: flex; gap: 2px; }
.tab {
  background: none; border: 0; cursor: pointer;
  padding: 6px 11px; border-radius: 4px;
  color: var(--ink-dim); font: 500 11px/1 var(--mono); letter-spacing: .1em;
  transition: color .15s, background .15s;
}
.tab:hover { color: var(--ink); background: var(--panel-2); }
.tab[aria-current="true"] { color: var(--on-accent); background: var(--accent); }

.bar-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }

.readout {
  font: 400 10.5px/1 var(--mono); color: var(--ink-faint);
  letter-spacing: .06em; text-align: right; white-space: nowrap;
}
@media (max-width: 720px) { .readout { display: none; } }

.icon-btn {
  display: grid; place-items: center; width: 30px; height: 30px;
  background: none; border: 1px solid var(--line); border-radius: 5px;
  color: var(--ink-dim); cursor: pointer;
  transition: color .15s, border-color .15s, transform .15s;
}
.icon-btn:hover { color: var(--accent); border-color: var(--accent); transform: translateY(-1px); }
.icon-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; }
.icon-btn .cal-dot { fill: currentColor; stroke: none; }
:root[data-theme="light"] #theme-btn .rays { display: none; }
:root[data-theme="light"] #theme-btn circle { fill: currentColor; }

/* ------------------------------------------------------------------ layout */

main { position: relative; z-index: 2; max-width: 1180px; margin: 0 auto; padding: 22px 16px 90px; }

.boot { padding: 80px 0; color: var(--ink-dim); font: 400 12px/1.8 var(--mono); }
.cursor { animation: blink 1.05s steps(2) infinite; }
@keyframes blink { 0%,50% { opacity: 1; } 50.1%,100% { opacity: 0; } }

/* --------------------------------------------------------------- view head */

.vhead {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
  padding-bottom: 12px; margin-bottom: 18px;
  border-bottom: 1px solid var(--line);
}
.vhead h1 {
  margin: 0; font: 600 26px/1.1 var(--sans); letter-spacing: -.02em;
  color: var(--ink-bright);
}
.vhead .eyebrow {
  margin: 0 0 6px; font: 500 10.5px/1 var(--mono);
  letter-spacing: .16em; color: var(--accent); text-transform: uppercase;
}
.vhead .sub { margin: 6px 0 0; font: 400 12.5px/1.5 var(--sans); color: var(--ink-dim); }

.stepper { display: flex; align-items: center; gap: 6px; }
.stepper button {
  background: var(--panel); border: 1px solid var(--line); border-radius: 5px;
  color: var(--ink-dim); cursor: pointer; padding: 6px 10px;
  font: 500 11px/1 var(--mono); transition: .15s;
}
.stepper button:hover:not(:disabled) { color: var(--accent); border-color: var(--accent); }
.stepper button:disabled { opacity: .3; cursor: default; }

/* -------------------------------------------------------------- week strip */

.strip {
  position: sticky; top: var(--bar-h); z-index: 30;
  display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px;
  padding: 10px 0 12px; margin-bottom: 4px;
  background: linear-gradient(var(--bg) 78%, transparent);
}
.strip-day {
  background: var(--panel); border: 1px solid var(--line); border-radius: 5px;
  padding: 7px 8px 9px; cursor: pointer; text-align: left;
  transition: border-color .18s, transform .18s, background .18s;
  display: flex; flex-direction: column; gap: 7px;
}
.strip-day:hover { border-color: var(--ink-faint); transform: translateY(-2px); }
.strip-day[aria-current="true"] { border-color: var(--accent); background: var(--panel-2); }
.strip-day.empty { opacity: .4; cursor: default; }
.strip-day.empty:hover { transform: none; border-color: var(--line); }
.strip-top { display: flex; align-items: baseline; justify-content: space-between; gap: 4px; }
.strip-dow { font: 600 10px/1 var(--mono); letter-spacing: .1em; color: var(--ink-dim); }
.strip-num { font: 600 15px/1 var(--sans); color: var(--ink-bright); }
.strip-day.empty .strip-num { color: var(--ink-faint); }
.strip-meter { display: flex; gap: 1.5px; height: 15px; align-items: flex-end; }
.strip-meter i { flex: 1; background: var(--tc, var(--ink-faint)); border-radius: .5px; opacity: .85; }
.strip-count { font: 400 9.5px/1 var(--mono); color: var(--ink-faint); letter-spacing: .05em; }
@media (max-width: 640px) {
  .strip { grid-template-columns: repeat(7, 1fr); gap: 2px; }
  .strip-day { padding: 5px 4px 6px; }
  .strip-num { font-size: 12px; }
  .strip-meter { height: 10px; }
  .strip-count { display: none; }
}

/* ------------------------------------------------------------------- rows */

.daygroup { margin-top: 26px; }
.daygroup-head {
  display: flex; align-items: center; gap: 10px; margin-bottom: 8px;
  font: 500 11px/1 var(--mono); letter-spacing: .12em; color: var(--ink-dim);
  text-transform: uppercase;
}
.daygroup-head::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.rows { display: flex; flex-direction: column; gap: 2px; }

/* A row is visible with no classes at all. `.pre` is added by JS only when it
 * is about to animate the row in, and `.in` runs that animation.
 *
 * That ordering is deliberate. The obvious version - hide in CSS, reveal from
 * an IntersectionObserver - means the entire page is blank if the observer
 * never fires, and it does not fire in a screenshot renderer, a very old
 * browser, or any context where the script fails after the markup is in.
 * Content must not depend on an animation having run. */
.row {
  border: 1px solid transparent; border-radius: 6px;
  background: var(--panel);
  transition: border-color .16s, background .16s;
}
.row.pre { opacity: 0; transform: translateY(6px); }
.row.pre.in {
  animation: rise .4s cubic-bezier(.2,.7,.3,1) forwards;
  animation-delay: calc(var(--i, 0) * 28ms);
}
@keyframes rise { to { opacity: 1; transform: none; } }
.row:hover { border-color: var(--line); background: var(--panel-2); }
.row[aria-expanded="true"] { border-color: var(--tc, var(--accent)); background: var(--panel-2); }
.row.cursor-on { border-color: var(--ink-faint); }

.row-main {
  width: 100%; display: grid; align-items: center; gap: 12px;
  grid-template-columns: 46px 180px 104px 1fr auto;
  padding: 9px 12px; background: none; border: 0; cursor: pointer;
  color: inherit; text-align: left; font: inherit;
}
.row-time { font: 400 11px/1 var(--mono); color: var(--ink-faint); }
.row-topic {
  font: 500 10px/1 var(--mono); letter-spacing: .05em; color: var(--tc, var(--ink-dim));
  text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  display: flex; align-items: center; gap: 6px;
}
.row-topic::before {
  content: ""; width: 3px; height: 11px; border-radius: 2px;
  background: var(--tc, var(--ink-faint)); flex: none;
}

/* The two scores as one paired meter: importance above, relevance below.
 * Two bars in the space of one number, and the shape is readable at a glance
 * once you have seen twenty of them. */
.meter { display: flex; flex-direction: column; gap: 2px; }
.meter-row { display: flex; align-items: center; gap: 5px; }
.meter-key { font: 400 8.5px/1 var(--mono); color: var(--ink-faint); width: 7px; }
.meter-track { flex: 1; height: 4px; border-radius: 2px; background: var(--line); overflow: hidden; }
.meter-fill {
  /* `display: block` is load-bearing, not tidiness. A span defaults to inline,
   * and height and transform do not apply to an inline box - the bar renders
   * as a hairline at every score. The track escapes this only because it is a
   * flex item and therefore blockified for free. */
  display: block;
  height: 100%; border-radius: 2px; background: var(--tc, var(--accent));
  transform-origin: left; transform: scaleX(var(--v, 0));
  transition: transform .55s cubic-bezier(.2,.7,.3,1);
  transition-delay: calc(var(--i, 0) * 28ms + 120ms);
}
/* Same inversion as the row: full by default, emptied only while waiting to
 * animate, so a bar can never be stuck at zero and read as a score of zero. */
.row.pre .meter-fill { transform: scaleX(0); }
.row.pre.in .meter-fill { transform: scaleX(var(--v, 0)); }
.meter-row.dim .meter-fill { opacity: .42; }
.meter-num { font: 500 10px/1 var(--mono); color: var(--ink-dim); width: 12px; text-align: right; }

.row-title {
  font: 400 14px/1.35 var(--sans); color: var(--ink);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.row[aria-expanded="true"] .row-title { white-space: normal; color: var(--ink-bright); }
.row-src { font: 400 10px/1 var(--mono); color: var(--ink-faint); white-space: nowrap; }
.row-rank {
  font: 500 9.5px/1 var(--mono); color: var(--on-accent); background: var(--accent);
  padding: 2px 4px; border-radius: 3px; margin-left: 6px;
}

@media (max-width: 900px) {
  .row-main { grid-template-columns: 42px 1fr auto; row-gap: 6px; }
  .row-topic { grid-column: 2; }
  .meter { grid-column: 1 / -1; grid-row: 2; max-width: 150px; }
  .row-title { grid-column: 1 / -1; grid-row: 3; white-space: normal; }
  .row-src { grid-column: 3; grid-row: 1; }
}

/* ---------------------------------------------------------------- expanded */

.row-body {
  /* Height animation on a grid row rather than max-height: it lands exactly on
   * the content's height, so long articles do not snap and short ones do not
   * leave a gap. */
  display: grid; grid-template-rows: 0fr;
  transition: grid-template-rows .32s cubic-bezier(.2,.7,.3,1);
}
.row[aria-expanded="true"] .row-body { grid-template-rows: 1fr; }
.row-body > div { overflow: hidden; }
.row-inner { padding: 2px 12px 14px 58px; }
@media (max-width: 900px) { .row-inner { padding-left: 12px; } }

.row-summary { margin: 0 0 12px; font: 400 14px/1.62 var(--sans); color: var(--ink); max-width: 68ch; }

.kp { margin: 0 0 12px; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 5px; max-width: 68ch; }
.kp li { position: relative; padding-left: 16px; font: 400 13px/1.5 var(--sans); color: var(--ink-dim); }
.kp li::before {
  content: "▸"; position: absolute; left: 0; top: 0;
  color: var(--tc, var(--accent)); font-size: 10px; line-height: 1.9;
}

.chips { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 12px; }
.chip {
  font: 400 10.5px/1 var(--mono); color: var(--ink-dim);
  border: 1px solid var(--line); border-radius: 3px; padding: 4px 7px;
  background: var(--bg);
}

.why {
  margin: 0 0 12px; padding: 9px 11px; max-width: 68ch;
  border-left: 2px solid var(--tc, var(--accent)); background: var(--bg);
  font: 400 12px/1.55 var(--sans); color: var(--ink-dim); border-radius: 0 4px 4px 0;
}
.why b { color: var(--ink); font-weight: 500; letter-spacing: .06em;
         font-family: var(--mono); font-size: 10px; text-transform: uppercase; }

.row-foot { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.readlink {
  display: inline-flex; align-items: center; gap: 6px;
  font: 500 11px/1 var(--mono); letter-spacing: .06em; text-decoration: none;
  color: var(--on-accent); background: var(--accent); padding: 7px 11px; border-radius: 4px;
  transition: transform .15s, filter .15s;
}
.readlink:hover { transform: translateY(-1px); filter: brightness(1.1); }
.meta { font: 400 10.5px/1 var(--mono); color: var(--ink-faint); }

/* ----------------------------------------------------------------- archive */

.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.search {
  flex: 1; min-width: 220px; display: flex; align-items: center; gap: 8px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: 0 10px;
  transition: border-color .15s;
}
.search:focus-within { border-color: var(--accent); }
.search svg { width: 14px; height: 14px; fill: none; stroke: var(--ink-faint); stroke-width: 1.6; flex: none; }
.search input {
  flex: 1; background: none; border: 0; outline: 0; padding: 9px 0;
  color: var(--ink); font: 400 13px/1 var(--mono);
}
.search input::placeholder { color: var(--ink-faint); }

select.filter {
  background: var(--panel); color: var(--ink); border: 1px solid var(--line);
  border-radius: 6px; padding: 9px 10px; font: 400 11.5px/1 var(--mono); cursor: pointer;
  /* Capped, because a select sizes itself to its longest option and one very
   * long source name would otherwise push the search box down to a stub. */
  max-width: 190px;
}
select.filter:focus { outline: 0; border-color: var(--accent); }

.result-count { font: 400 11px/1 var(--mono); color: var(--ink-faint); margin-bottom: 10px; }

.hit {
  display: grid; grid-template-columns: 92px 180px 1fr 56px; gap: 12px; align-items: center;
  padding: 8px 10px; border-radius: 5px; border: 1px solid transparent;
  background: none; width: 100%; text-align: left; color: inherit; font: inherit; cursor: pointer;
  transition: background .14s, border-color .14s;
}
.hit:hover { background: var(--panel); border-color: var(--line); }
.hit-date { font: 400 10.5px/1 var(--mono); color: var(--ink-faint); }
.hit-title { font: 400 13.5px/1.35 var(--sans); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hit-scores { font: 500 10px/1 var(--mono); color: var(--ink-dim); text-align: right; }
.hit mark { background: var(--accent-dim); color: var(--ink-bright); border-radius: 2px; padding: 0 1px; }
@media (max-width: 760px) {
  .hit { grid-template-columns: 1fr auto; }
  .hit-topic { display: none; }
  .hit-title { grid-column: 1 / -1; grid-row: 2; white-space: normal; }
}

/* ---------------------------------------------------------------- calendar */

/* `display` here beats the user-agent rule that makes [hidden] work, so the
 * attribute has to be honoured explicitly. Without this the overlay is open
 * permanently and nothing else on the page is reachable. */
.overlay[hidden], .tooltip[hidden] { display: none; }

.overlay {
  position: fixed; inset: 0; z-index: 60;
  display: grid; place-items: center; padding: 20px;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(8px);
  animation: fade .2s ease;
}
@keyframes fade { from { opacity: 0; } }
.overlay-panel {
  width: min(980px, 100%); max-height: min(86vh, 760px);
  display: flex; flex-direction: column;
  background: var(--panel); border: 1px solid var(--line); border-radius: 10px;
  box-shadow: var(--shadow); overflow: hidden;
  animation: pop .26s cubic-bezier(.2,.8,.3,1);
}
@keyframes pop { from { opacity: 0; transform: translateY(14px) scale(.985); } }

.overlay-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 16px;
  padding: 16px 18px 14px; border-bottom: 1px solid var(--line);
}
.overlay-head h2 { margin: 0; font: 600 12px/1 var(--mono); letter-spacing: .16em; color: var(--ink-bright); }
.overlay-sub { margin: 6px 0 0; font: 400 11.5px/1 var(--mono); color: var(--ink-faint); }
.overlay-body { overflow: auto; padding: 18px; flex: 1; }
.overlay-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 11px 18px; border-top: 1px solid var(--line); background: var(--panel-2);
}
.hint { margin: 0; font: 400 10.5px/1 var(--mono); color: var(--ink-faint); }
.legend { display: flex; align-items: center; gap: 7px; }
.legend-label { font: 400 10px/1 var(--mono); color: var(--ink-faint); }
.legend-cells { display: flex; gap: 2px; }

.cal-year { margin-bottom: 26px; }
.cal-year:last-child { margin-bottom: 0; }
.cal-year-label {
  font: 600 11px/1 var(--mono); letter-spacing: .14em; color: var(--ink-dim);
  margin-bottom: 10px; display: flex; align-items: center; gap: 10px;
}
.cal-year-label::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.cal-grid { display: flex; gap: 3px; align-items: flex-start; justify-content: center; }
.cal-grid > .cal-weeks { justify-content: flex-start; }
.cal-dows { display: flex; flex-direction: column; gap: 3px; padding-top: 20px; }
.cal-dows span {
  height: 17px; font: 400 9px/17px var(--mono); color: var(--ink-faint);
  width: 22px; text-align: right; padding-right: 5px;
}
.cal-weeks { display: flex; gap: 3px; overflow-x: auto; padding-bottom: 4px; }
.cal-week { display: flex; flex-direction: column; gap: 3px; }
.cal-wk {
  height: 17px; font: 400 8.5px/17px var(--mono); color: var(--ink-faint);
  background: none; border: 0; padding: 0; width: 17px; cursor: pointer;
  transition: color .14s;
}
.cal-wk:hover { color: var(--accent); }

.cell {
  width: 17px; height: 17px; border-radius: 3px; border: 0; padding: 0;
  background: var(--line-soft); display: block;
}
button.cell { cursor: pointer; transition: transform .12s, box-shadow .12s; }
button.cell:hover { transform: scale(1.32); box-shadow: 0 0 0 1.5px var(--ink-dim); z-index: 2; position: relative; }
.cell.l0 { background: var(--line-soft); }
.cell.l1 { background: color-mix(in srgb, var(--tc, var(--accent)) 26%, var(--line-soft)); }
.cell.l2 { background: color-mix(in srgb, var(--tc, var(--accent)) 48%, var(--line-soft)); }
.cell.l3 { background: color-mix(in srgb, var(--tc, var(--accent)) 72%, var(--line-soft)); }
.cell.l4 { background: var(--tc, var(--accent)); }
.cell.today { box-shadow: 0 0 0 1.5px var(--ink-bright); }

.tooltip {
  position: fixed; z-index: 80; pointer-events: none;
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 5px;
  padding: 7px 9px; box-shadow: var(--shadow);
  font: 400 11px/1.45 var(--mono); color: var(--ink); white-space: nowrap;
}
.tooltip b { color: var(--ink-bright); font-weight: 600; }
.tooltip .tt-topic { color: var(--tc, var(--accent)); }

/* -------------------------------------------------------------------- misc */

.empty-state {
  padding: 60px 20px; text-align: center; color: var(--ink-faint);
  font: 400 12px/1.7 var(--mono); border: 1px dashed var(--line); border-radius: 8px;
}
.empty-state strong { display: block; color: var(--ink-dim); font-size: 13px; margin-bottom: 6px; }

.kbd {
  font: 500 10px/1 var(--mono); color: var(--ink-dim);
  border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 3px;
  padding: 3px 5px; background: var(--panel);
}
.footnote {
  margin-top: 42px; padding-top: 14px; border-top: 1px solid var(--line);
  display: flex; gap: 14px; flex-wrap: wrap; align-items: center;
  font: 400 10.5px/1.6 var(--mono); color: var(--ink-faint);
}

/* Motion is decoration here — every animation above has a static resting state
 * that is already correct, so turning them all off costs nothing. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important; animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .row, .row.pre { opacity: 1; transform: none; }
  .row.pre .meter-fill { transform: scaleX(var(--v, 0)); }
  .scanlines { display: none; }
}

/* ------------------------------------------------- how ranking works */

.icon-btn .q-dot { fill: currentColor; stroke: none; }

.about-panel { width: min(620px, 100%); }
.about-panel .overlay-body { padding: 20px 22px; }

.about-lede {
  margin: 0 0 18px; font: 400 15px/1.5 var(--sans); color: var(--ink-bright);
}

/* A definition: the letter as it appears on a row, then what it means. Keyed
 * to the same colours the meters use, so the panel and the rows teach each
 * other rather than being two separate vocabularies. */
.def { display: flex; gap: 13px; align-items: flex-start; margin-bottom: 15px; }
.def-key {
  flex: none; display: grid; place-items: center;
  width: 26px; height: 26px; border-radius: 5px;
  background: color-mix(in srgb, var(--tc) 16%, transparent);
  border: 1px solid color-mix(in srgb, var(--tc) 45%, transparent);
  color: var(--tc); font: 600 13px/1 var(--mono);
}
.def h3 {
  margin: 4px 0 3px; font: 500 13.5px/1.35 var(--sans); color: var(--ink-bright);
}
/* Emphasis takes the definition's own colour: green is relevance everywhere
 * else on the site, so using it for 'the world' would teach the opposite of
 * what this panel exists to teach. */
.def h3 em { font-style: normal; color: var(--tc); }
.def p { margin: 0; font: 400 13px/1.5 var(--sans); color: var(--ink-dim); }

.about-rule {
  display: flex; align-items: center; gap: 10px;
  margin: 24px 0 12px; font: 500 10.5px/1 var(--mono);
  letter-spacing: .14em; text-transform: uppercase; color: var(--ink-dim);
}
.about-rule::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.formula {
  display: flex; align-items: center; justify-content: center; gap: 9px;
  padding: 16px; border: 1px solid var(--line); border-radius: 7px;
  background: var(--bg); font: 500 18px/1 var(--mono);
}
.formula .f-out { color: var(--ink-bright); }
.formula .f-op  { color: var(--ink-faint); }
.formula .f-r   { color: var(--accent); }
.formula .f-i   { color: var(--t-technology); }
.formula .f-x   { color: var(--accent); font-size: 13px; }

.about-note {
  margin: 12px 0 0; font: 400 13px/1.6 var(--sans); color: var(--ink-dim);
  max-width: 60ch;
}
.about-note b { color: var(--ink-bright); font-weight: 600; }

.egs { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.egs th {
  text-align: right; padding: 0 8px 7px; border-bottom: 1px solid var(--line);
  font: 500 9.5px/1 var(--mono); letter-spacing: .1em;
  text-transform: uppercase; color: var(--ink-faint);
}
.egs th:first-child { text-align: left; }
.egs td {
  padding: 9px 8px; border-bottom: 1px solid var(--line-soft);
  font: 400 13px/1.35 var(--sans); color: var(--ink);
}
.egs tr:last-child td { border-bottom: 0; }
.egs .n { text-align: right; font: 500 13px/1 var(--mono); width: 34px; }
.egs .r { color: var(--accent); }
.egs .i { color: var(--t-technology); }
.egs .rank { color: var(--ink-bright); width: 44px; }
.egs .verdict {
  text-align: right; font: 500 9.5px/1 var(--mono);
  letter-spacing: .08em; text-transform: uppercase; width: 58px;
}
.egs .verdict.yes { color: var(--accent); }
.egs .verdict.no  { color: var(--ink-faint); }

@media (max-width: 520px) {
  .egs td:first-child { font-size: 12px; }
  .egs .verdict { display: none; }
}
