/* ══════════════════════════════════════════════════════════════════
   PLOTIGOO — design system
   Search · Compare · Choose best

   Palette is taken straight from the logo: navy #042152 (the wordmark)
   and orange #FA6507 (the highlight). Navy carries the interface —
   chrome, headings, primary actions. Orange is the emphasis colour:
   active states, price figures, badges. Used sparingly, as in the mark.

   Type is IBM Plex — a corporate family with matched Sans and Mono, so
   figures in tables line up with the prose around them. Self-hosted in
   assets/fonts, no third-party requests.
   ══════════════════════════════════════════════════════════════════ */

/* ── typefaces ───────────────────────────────────────────────────── */
@font-face { font-family: "Plex Sans"; src: url("fonts/plex-sans-400.woff2") format("woff2");
             font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Plex Sans"; src: url("fonts/plex-sans-500.woff2") format("woff2");
             font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Plex Sans"; src: url("fonts/plex-sans-600.woff2") format("woff2");
             font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Plex Sans"; src: url("fonts/plex-sans-700.woff2") format("woff2");
             font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Plex Mono"; src: url("fonts/plex-mono-400.woff2") format("woff2");
             font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Plex Mono"; src: url("fonts/plex-mono-500.woff2") format("woff2");
             font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Plex Mono"; src: url("fonts/plex-mono-600.woff2") format("woff2");
             font-weight: 600; font-style: normal; font-display: swap; }

:root {
  /* ── brand, from the logo ────────────────────────────────────────
     These are the mark's own colours and are FIXED — they are used as
     dark grounds (utility strip, footer) and as the logo's orange, so
     they must not flip with the theme. Theme-aware interactive colours
     are --accent / --action below.                                     */
  --navy:        #042152;
  --navy-700:    #0A3079;
  --navy-600:    #14419C;
  --navy-300:    #A7BADB;
  --orange:      #FA6507;
  --on-navy:     rgba(255,255,255,.82);
  --on-navy-str: #FFFFFF;

  /* ── primary interactive = navy ────────────────────────────────── */
  --accent:      #0A3079;
  --accent-ink:  #042152;
  --accent-wash: #E9EEF9;

  /* ── emphasis = orange. Three steps, because bright orange fails
        contrast as text: --action for bars and icons, --action-btn
        behind white text (4.6:1), --action-ink for text on light. ── */
  --action:      #FA6507;
  --action-btn:  #C85400;
  --action-ink:  #A84400;
  --action-wash: #FEF1E7;

  /* ── neutrals, biased very slightly toward the navy ────────────── */
  --paper:       #F3F6FB;
  --surface:     #FFFFFF;
  --surface-2:   #F8FAFD;
  --ink:         #0B1B36;
  --ink-2:       #33456B;
  --muted:       #64748E;
  --line:        #DBE2EF;
  --line-soft:   #EAEFF7;

  /* ── semantic, kept clear of both brand hues ───────────────────── */
  --good:        #0F7048;
  --good-wash:   #E4F2EB;
  --warn:        #8A5A08;
  --warn-wash:   #FAF0DC;
  --crit:        #A82016;
  --crit-wash:   #FBE7E5;

  --on-accent:   #FFFFFF;
  --on-action:   #FFFFFF;

  --shadow-1:    0 1px 2px rgba(4,33,82,.06);
  --shadow-2:    0 1px 2px rgba(4,33,82,.05), 0 8px 22px -14px rgba(4,33,82,.28);
  --shadow-3:    0 2px 6px rgba(4,33,82,.1), 0 18px 42px -22px rgba(4,33,82,.4);
  --shadow:      var(--shadow-2);

  /* ── type ──────────────────────────────────────────────────────── */
  --body:    "Plex Sans", "Segoe UI", Roboto, system-ui, -apple-system, sans-serif;
  --display: var(--body);
  --data:    "Plex Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;

  --r:  4px;
  --r2: 6px;
  --rail: 256px;
  --map:  342px;
}

@media (prefers-color-scheme: dark) {
  :root {
    /* --navy / --orange deliberately NOT redefined: they are the mark's
       fixed colours and are used as dark grounds in both themes. */
    --accent:      #8AA9E4;
    --accent-ink:  #B3C7EF;
    --accent-wash: #142449;

    --action:      #FF8A3D;
    --action-btn:  #E06412;
    --action-ink:  #FFA871;
    --action-wash: #2E1808;

    --paper:       #060C1A;
    --surface:     #0D1526;
    --surface-2:   #131E33;
    --ink:         #E8EDF7;
    --ink-2:       #C1CBDE;
    --muted:       #8996B1;
    --line:        #223052;
    --line-soft:   #1A2440;

    --good:        #4FBE92;
    --good-wash:   #0D2A20;
    --warn:        #D2A055;
    --warn-wash:   #2B2010;
    --crit:        #E5837A;
    --crit-wash:   #2D1513;

    --on-accent:   #061024;
    --on-action:   #FFFFFF;

    --shadow-1:    0 1px 2px rgba(0,0,0,.5);
    --shadow-2:    0 1px 2px rgba(0,0,0,.5), 0 10px 26px -16px rgba(0,0,0,.8);
    --shadow-3:    0 2px 8px rgba(0,0,0,.6), 0 20px 46px -22px rgba(0,0,0,.9);
  }
}

* { box-sizing: border-box; min-width: 0; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
a { color: inherit; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 2px;
}

h1, h2, h3, h4 { font-weight: 600; letter-spacing: -.011em; }

/* ── shared micro-typography ─────────────────────────────────────── */
.eyebrow {
  font-family: var(--body);
  font-size: 10.5px; font-weight: 600;
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted);
}
.num { font-family: var(--data); font-variant-numeric: tabular-nums; font-feature-settings: "zero" 1; }
.vh {
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

/* ── brand mark ───────────────────────────────────────────────────────
   Two files, not a CSS filter: logo.png is navy + orange for light
   grounds, logo-light.png knocks the navy out to white and keeps the
   orange for dark grounds. A filter would have flattened the orange.   */
.logo { display: block; height: 34px; width: auto; }
.logo--sm { height: 28px; }

.logo-swap { display: block; }
.logo-swap .logo--dark { display: none; }
@media (prefers-color-scheme: dark) {
  .logo-swap .logo--light { display: none; }
  .logo-swap .logo--dark  { display: block; }
}

/* ── utility bar: slim navy strip above the nav ──────────────────── */
.util {
  background: var(--navy);
  color: var(--on-navy);
}
.util__in {
  max-width: 1320px; margin: 0 auto; padding: 0 22px;
  height: 32px; display: flex; align-items: center; gap: 18px;
  font-size: 12px;
}
.util__tag {
  font-weight: 600; letter-spacing: .09em; text-transform: uppercase;
  font-size: 11px; color: var(--on-navy-str);
}
.util__tag b { color: var(--orange); font-weight: 600; }
.util__sep { width: 1px; height: 13px; background: rgba(255,255,255,.24); flex: none; }
.util__in a { color: var(--on-navy); text-decoration: none; }
.util__in a:hover { color: var(--on-navy-str); }
.util__end { margin-left: auto; display: flex; align-items: center; gap: 16px; }

/* ── results page top bar ────────────────────────────────────────── */
.topbar {
  position: sticky; top: 0; z-index: 40;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow-1);
}
.topbar__in {
  max-width: 1320px; margin: 0 auto;
  padding: 11px 22px;
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
}
.mark { display: flex; align-items: center; text-decoration: none; flex: none; }

.query {
  flex: 1 1 620px;
  display: grid;
  grid-template-columns: 1.4fr 1.2fr 1fr .85fr auto;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--surface);
}
.query:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-wash); }
.field {
  display: flex; flex-direction: column; gap: 2px;
  padding: 6px 12px;
  border-left: 1px solid var(--line-soft);
  min-width: 0;
}
.field:first-child { border-left: 0; }
.field input, .field select {
  border: 0; background: none; padding: 0;
  font-size: 14px; font-weight: 500; color: var(--ink);
  width: 100%; min-width: 0;
}
.field select { cursor: pointer; }
.field input:focus, .field select:focus { outline: none; }
.field input::placeholder { color: var(--muted); font-weight: 400; }

.query__go {
  margin: 4px; padding: 0 20px;
  background: var(--accent); color: var(--on-accent);
  border-radius: 3px;
  font-size: 14px; font-weight: 600; letter-spacing: .01em;
}
.query__go:hover { background: var(--accent-ink); }

.topbar__end { display: flex; align-items: center; gap: 6px; margin-left: auto; flex: none; }
.ghost {
  padding: 7px 12px; border-radius: 3px;
  font-size: 13.5px; font-weight: 500; color: var(--ink-2);
}
.ghost:hover { background: var(--surface-2); color: var(--ink); }
.ghost.is-solid { border: 1px solid var(--line); }

/* ── page heading strip ──────────────────────────────────────────── */
.strip {
  max-width: 1320px; margin: 0 auto;
  padding: 24px 22px 14px;
  display: flex; align-items: flex-end; gap: 26px; flex-wrap: wrap;
}
.strip h1 {
  margin: 0;
  font-size: clamp(22px, 2.5vw, 30px);
  font-weight: 600; line-height: 1.16; letter-spacing: -.015em;
  text-wrap: balance;
}
.strip p { margin: 7px 0 0; font-size: 13.5px; color: var(--muted); max-width: 66ch; }
.strip p b { color: var(--ink-2); font-weight: 600; }

/* summary figures, ruled like a report header */
.stats {
  margin-left: auto; display: flex;
  background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r);
  overflow: hidden; box-shadow: var(--shadow-1);
}
.stat { padding: 10px 18px; border-left: 1px solid var(--line-soft); }
.stat:first-child { border-left: 0; }
.stat b {
  display: block; margin-top: 3px;
  font-family: var(--data); font-variant-numeric: tabular-nums;
  font-size: 18px; font-weight: 600; letter-spacing: -.02em;
}
.stat--lead { background: var(--accent-wash); }
.stat--lead b { color: var(--accent-ink); }

/* ── notices ─────────────────────────────────────────────────────── */
.notes { max-width: 1320px; margin: 0 auto; padding: 0 22px; }
.note {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 11px 14px; border-radius: var(--r);
  font-size: 13.5px; margin-bottom: 10px;
  border: 1px solid transparent; border-left-width: 3px;
}
.note b { font-weight: 600; }
.note--info { background: var(--accent-wash); color: var(--accent-ink); border-left-color: var(--accent); }
.note--warn { background: var(--warn-wash); color: var(--warn); border-left-color: var(--warn); }
.note--crit { background: var(--crit-wash); color: var(--crit); border-left-color: var(--crit); }
.note a { font-weight: 600; }

/* ── shell ───────────────────────────────────────────────────────── */
.shell {
  max-width: 1320px; margin: 0 auto;
  padding: 8px 22px 90px;
  display: grid; grid-template-columns: var(--rail) minmax(0, 1fr);
  gap: 22px; align-items: start;
}

/* ── filter rail ─────────────────────────────────────────────────── */
.rail {
  position: sticky; top: 74px;
  background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r);
  max-height: calc(100vh - 96px); overflow-y: auto;
  box-shadow: var(--shadow-1);
}
.rail__top {
  position: sticky; top: 0; z-index: 2;
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px; background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.rail__clear { font-size: 12px; font-weight: 600; color: var(--accent); }
.rail__clear:hover { text-decoration: underline; }
.fgroup { padding: 14px; border-bottom: 1px solid var(--line-soft); }
.fgroup:last-child { border-bottom: 0; }
.fgroup > .eyebrow { display: block; margin-bottom: 9px; }

.opt { display: flex; align-items: center; gap: 9px; padding: 4px 0; font-size: 13.5px; cursor: pointer; }
.opt input[type="checkbox"], .opt input[type="radio"] {
  appearance: none; margin: 0; flex: none;
  width: 15px; height: 15px; border: 1.5px solid var(--line);
  background: var(--surface); position: relative; cursor: pointer;
  border-radius: 2px;
}
.opt input[type="radio"] { border-radius: 50%; }
.opt input:checked { background: var(--accent); border-color: var(--accent); }
.opt input[type="checkbox"]:checked::after {
  content: ""; position: absolute; inset: 0;
  background: no-repeat center/9px 9px
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'><path d='M1.5 6.4 4.4 9.3 10.5 3' fill='none' stroke='white' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/></svg>");
}
.opt input[type="radio"]:checked::after {
  content: ""; position: absolute; inset: 3.5px;
  border-radius: 50%; background: var(--on-accent);
}
.opt span:first-of-type { flex: 1; }
.opt .cnt { font-family: var(--data); font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }

.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pair label { display: flex; flex-direction: column; gap: 3px; }
.pair input {
  border: 1px solid var(--line); border-radius: 3px;
  background: var(--surface); padding: 7px 9px;
  font-family: var(--data); font-size: 13px; font-variant-numeric: tabular-nums;
}
.pair input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-wash); }
.hint { font-size: 11.5px; color: var(--muted); margin: 8px 0 0; line-height: 1.45; }

.quickset { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.quickset a {
  font-family: var(--data); font-size: 11px; font-weight: 500;
  padding: 4px 8px; border: 1px solid var(--line); border-radius: 3px;
  text-decoration: none; color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}
.quickset a:hover { background: var(--accent-wash); border-color: var(--accent); color: var(--accent-ink); }

.switch { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 4px 0; cursor: pointer; font-size: 13.5px; }
.switch input {
  appearance: none; margin: 0; width: 34px; height: 19px; flex: none;
  background: var(--line); border-radius: 999px; position: relative;
  transition: background .14s; cursor: pointer;
}
.switch input::after {
  content: ""; position: absolute; top: 2px; left: 2px;
  width: 15px; height: 15px; border-radius: 50%;
  background: var(--surface); transition: transform .14s;
  box-shadow: 0 1px 2px rgba(0,0,0,.3);
}
.switch input:checked { background: var(--accent); }
.switch input:checked::after { transform: translateX(15px); }

.apply {
  width: 100%; padding: 10px; border-radius: 3px;
  background: var(--accent); color: var(--on-accent);
  font-size: 14px; font-weight: 600;
}
.apply:hover { background: var(--accent-ink); }

/* ── sort row ────────────────────────────────────────────────────── */
.sortrow { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.tabs {
  display: flex; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r); overflow: hidden;
}
.tabs a {
  padding: 8px 14px; font-size: 13px; font-weight: 500;
  color: var(--muted); text-decoration: none;
  border-right: 1px solid var(--line-soft);
}
.tabs a:last-child { border-right: 0; }
.tabs a:hover { background: var(--surface-2); color: var(--ink); }
.tabs a[aria-current="true"] {
  background: var(--surface-2); color: var(--accent-ink); font-weight: 600;
  box-shadow: inset 0 -2px 0 var(--action);
}
.freshness { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.pill {
  font-family: var(--data); font-size: 10.5px; font-weight: 500;
  letter-spacing: .05em; text-transform: uppercase;
  padding: 4px 9px; border-radius: 3px;
  background: var(--surface-2); color: var(--muted);
  border: 1px solid var(--line);
}
.pill--live { background: var(--good-wash); color: var(--good); border-color: transparent; }

/* ── the results board ───────────────────────────────────────────── */
.board {
  background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r);
  box-shadow: var(--shadow-2); overflow: hidden;
}
.row {
  display: grid; grid-template-columns: 132px minmax(0, 1fr) 236px;
  gap: 18px; padding: 16px;
  border-top: 1px solid var(--line-soft);
  position: relative;
}
.row:first-child { border-top: 0; }
.row::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--accent); opacity: 0; transition: opacity .12s;
}
.row:hover { background: var(--surface-2); }
.row:hover::before { opacity: 1; }
.row.is-best { background: var(--action-wash); }
.row.is-best::before { opacity: 1; background: var(--action); }

/* portal-tinted tile standing in for a photo we don't have */
.tile {
  aspect-ratio: 4 / 3; border-radius: 3px;
  background: linear-gradient(158deg,
              hsl(var(--h) 38% 26%), hsl(calc(var(--h) + 22) 34% 42%));
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 10px; color: #fff; overflow: hidden;
}
.tile__bhk { font-size: 22px; font-weight: 700; line-height: 1; letter-spacing: -.02em; }
.tile__type { font-size: 10.5px; font-weight: 500; opacity: .9; line-height: 1.3; }
.tile__src {
  font-family: var(--data); font-size: 9px; font-weight: 500;
  letter-spacing: .07em; text-transform: uppercase; opacity: .82;
}

.info { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.badges { display: flex; gap: 6px; flex-wrap: wrap; }
.badge {
  font-size: 10.5px; font-weight: 600;
  letter-spacing: .05em; text-transform: uppercase;
  padding: 3px 8px; border-radius: 2px;
}
.badge--best    { background: var(--action-wash); color: var(--action-ink); }
.badge--cheap   { background: var(--good-wash);   color: var(--good); }
.badge--rank    { background: var(--accent-wash); color: var(--accent-ink); }
.badge--unknown { background: var(--warn-wash);   color: var(--warn); }

.name { margin: 0; font-size: 16.5px; font-weight: 600; line-height: 1.32; letter-spacing: -.008em; }
.name a { text-decoration: none; color: var(--accent-ink); }
.name a:hover { text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 2.5px; }

.metrics { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.dot { width: 3px; height: 3px; border-radius: 50%; background: var(--line); flex: none; }
.where { color: var(--ink-2); font-weight: 600; }

.snippet {
  margin: 0; font-size: 13px; color: var(--muted); line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.tags { display: flex; gap: 6px; flex-wrap: wrap; }
.tag {
  font-size: 12px; color: var(--ink-2);
  border: 1px solid var(--line); border-radius: 2px;
  padding: 3px 8px; background: var(--surface);
}
.tag--good { color: var(--good); border-color: color-mix(in srgb, var(--good) 32%, transparent); background: var(--good-wash); }

/* ── price column ────────────────────────────────────────────────── */
.ladder {
  border-left: 1px solid var(--line-soft); padding-left: 16px;
  display: flex; flex-direction: column; gap: 8px;
}
.ladder__site { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.ladder__site .who { font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.price { display: flex; align-items: baseline; gap: 4px; line-height: 1; }
.price .amt {
  font-family: var(--data); font-variant-numeric: tabular-nums;
  font-size: 25px; font-weight: 600; letter-spacing: -.03em;
  color: var(--action-ink);
}
.price .per { font-size: 11.5px; font-weight: 500; color: var(--muted); }
.price--none .amt { font-size: 14.5px; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.subprice { font-family: var(--data); font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }

.facts { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line-soft); }
.facts li {
  display: grid; grid-template-columns: 1fr auto; gap: 8px;
  padding: 5px 0; border-bottom: 1px solid var(--line-soft); font-size: 12.5px;
}
.facts li:last-child { border-bottom: 0; }
.facts .k { color: var(--muted); }
.facts .v { font-family: var(--data); font-weight: 500; font-variant-numeric: tabular-nums; }

.cta {
  display: flex; align-items: center; justify-content: center; gap: 7px;
  padding: 10px 12px; border-radius: 3px;
  background: var(--accent); color: var(--on-accent);
  font-size: 14px; font-weight: 600; text-decoration: none;
}
.cta:hover { background: var(--accent-ink); }
.cta svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 2.4; }

/* ── board footer / pagination ───────────────────────────────────── */
.board__foot {
  padding: 13px 16px; border-top: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap; background: var(--surface-2);
}
.pager { display: flex; gap: 4px; }
.pager a, .pager span {
  min-width: 34px; height: 30px; padding: 0 10px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); border-radius: 3px;
  font-family: var(--data); font-size: 12.5px; font-weight: 500;
  color: var(--muted); text-decoration: none; background: var(--surface);
}
.pager a:hover { background: var(--accent-wash); color: var(--accent-ink); border-color: var(--accent); }
.pager span[aria-current="page"] { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.pager span.is-off { opacity: .4; }

/* ── empty state ─────────────────────────────────────────────────── */
.empty {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r); padding: 44px 26px; text-align: center;
  box-shadow: var(--shadow-1);
}
.empty h2 { margin: 0 0 8px; font-size: 21px; font-weight: 600; }
.empty p { margin: 0 auto; max-width: 56ch; color: var(--muted); font-size: 14px; }
.empty ul { display: inline-block; text-align: left; margin: 16px 0 0; color: var(--muted); font-size: 13.5px; }
.empty li { margin: 4px 0; }
.empty code, .foot code {
  font-family: var(--data); font-size: 12px;
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: 2px; padding: 1px 5px;
}

.related { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.related a {
  font-size: 12.5px; text-decoration: none;
  border: 1px solid var(--line); border-radius: 999px;
  padding: 5px 12px; background: var(--surface); color: var(--ink-2);
}
.related a:hover { border-color: var(--accent); color: var(--accent-ink); background: var(--accent-wash); }

/* ── page footer ─────────────────────────────────────────────────── */
.foot {
  max-width: 1320px; margin: 0 auto; padding: 0 22px 40px;
  font-size: 12px; color: var(--muted); line-height: 1.6;
}

/* ── responsive ──────────────────────────────────────────────────── */
@media (max-width: 1080px) {
  .query { grid-template-columns: 1fr 1fr 1fr; }
  .query__go { grid-column: 1 / -1; padding: 9px; }
}
@media (max-width: 900px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .rail { position: static; max-height: none; }
  .row { grid-template-columns: 106px minmax(0, 1fr); }
  .ladder {
    grid-column: 1 / -1; border-left: 0; padding-left: 0;
    padding-top: 12px; border-top: 1px solid var(--line-soft);
  }
  .stats { margin-left: 0; }
}
@media (max-width: 560px) {
  .topbar__in, .strip, .shell, .notes, .foot, .util__in { padding-left: 14px; padding-right: 14px; }
  .query { grid-template-columns: 1fr 1fr; }
  .row { grid-template-columns: minmax(0, 1fr); }
  .tile { aspect-ratio: 16 / 6; flex-direction: row; align-items: center; }
  .stats { width: 100%; flex-wrap: wrap; }
  .stat { flex: 1 1 44%; }
  .util__end { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
