/* PointLedger: the printed annual, set as a ledger.
   White sheets on a cool ledger-grey paper, near-black ink, one crimson. Crimson marks what closes soon,
   the all-time highs and the one main action on a page; everything else is ink and grey.
   Libre Franklin sets titles, figures and interface; Source Serif 4 sets everything meant to be read.
   Both are self-hosted from /fonts (SIL Open Font License; the licence texts sit beside the files).

   Bands re-theme every component through the --t-* roles: the default and .paper-band put white sheets
   on paper, .white-band puts paper sheets on white, .ink-band inverts. Charts read --chart-*. */

/* ---------- Fonts ---------- */
@font-face {
  font-family: "Libre Franklin"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url("/fonts/libre-franklin-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Libre Franklin"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url("/fonts/libre-franklin-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Source Serif 4"; font-style: normal; font-weight: 400 600; font-display: swap;
  src: url("/fonts/source-serif-4-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Source Serif 4"; font-style: normal; font-weight: 400 600; font-display: swap;
  src: url("/fonts/source-serif-4-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Source Serif 4"; font-style: italic; font-weight: 400 600; font-display: swap;
  src: url("/fonts/source-serif-4-italic-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Source Serif 4"; font-style: italic; font-weight: 400 600; font-display: swap;
  src: url("/fonts/source-serif-4-italic-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* Fallbacks sized to the real faces, so text barely moves when the web fonts arrive. */
@font-face { font-family: "Franklin Fallback"; src: local("Arial"), local("ArialMT"), local("Helvetica"); size-adjust: 104.2%; ascent-override: 93%; descent-override: 24%; line-gap-override: 0%; }
@font-face { font-family: "Serif Fallback"; src: local("Georgia"); size-adjust: 106.2%; ascent-override: 98%; descent-override: 32%; line-gap-override: 0%; }

/* ---------- Tokens ---------- */
:root {
  color-scheme: light;
  --white: #ffffff;
  --paper: #eff1f4;
  --paper-2: #e5e8ec;
  --ink: #14161b;
  --ink-2: #2c3039;
  --muted: #545b67;
  --faint: #656c78;
  --line: #e2e5ea;
  --line-strong: #c9ced6;
  --control: #868c97;
  --control-soft: #bfc4cc;
  --accent: #b3172b;
  --accent-hover: #941224;
  --accent-tint: #fbe8ea;
  --accent-text: #8c1121;
  --positive: #18663d;
  --positive-tint: #e1f1e7;
  --warning: #8a4900;
  --warning-tint: #fcefd9;
  --pos: var(--positive);
  --surface: var(--white);
  --surface-2: #f5f6f8;

  --font-ui: "Libre Franklin", "Franklin Fallback", "Helvetica Neue", Arial, sans-serif;
  --font-text: "Source Serif 4", "Serif Fallback", Georgia, "Times New Roman", serif;

  --maxw: 1360px;
  --margin: clamp(16px, 3.4vw, 48px);
  --gap: 24px;
  --pad: 24px;
  --radius: 2px;
  --ctl: 40px;
  --mast-h: 64px;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  /* Type scale shared by every page: caption 13, meta 14, interface 15, body 16, reading 17 to 19, then the
     titles. Page styles pick from these steps instead of adding sizes of their own. */
  --fs-caption: 13px;
  --fs-meta: 14px;
  --fs-ui: 15px;
  --fs-body: 16px;
  --fs-read: clamp(17px, 1.3vw, 19px);
  --fs-lead: clamp(18px, 1.45vw, 21px);
  --fs-h3: 19px;
  --fs-h2: clamp(21px, 1.7vw, 24px);
  --fs-title: clamp(26px, 2.3vw, 32px);
  --fs-display: clamp(28px, 3.1vw, 46px);
  --lh-read: 1.55;
  --measure: 68ch;
  /* Spacing steps: inside a component 4 to 24, between blocks 32 to 72. */
  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px; --sp-5: 24px; --sp-6: 32px; --sp-7: 48px; --sp-8: 72px;

  --t-ground: var(--paper);
  --t-card: var(--white);
  --t-card-2: #f4f5f7;
  --t-chip: #eceef2;
  --t-chip-hover: #e0e3e8;
  --t-ink: var(--ink);
  --t-muted: var(--muted);
  --t-line: var(--line);
  --t-line-strong: var(--line-strong);
  --t-control: var(--control);
  --t-control-soft: var(--control-soft);
  --t-input: var(--white);
  --t-input-ink: var(--ink);
  --t-hot: var(--accent);
  --t-pos: var(--positive);
  --t-warn: var(--warning);
  --t-focus: var(--ink);
  --t-err-bg: var(--accent-tint);

  --chart-ink: var(--ink);
  --chart-hue: var(--accent);
  --chart-grey: #aeb4be;
  --chart-span: #fbecee;
  --chart-grid: var(--line);
  --chart-muted: var(--muted);
}

.paper-band, .sheet-paper { background: var(--paper); color: var(--t-ink); }
.white-band, .dark-band {
  --t-ground: var(--white); --t-card: var(--paper); --t-card-2: var(--paper-2);
  --t-chip: #e6e9ed; --t-chip-hover: #d9dde3;
  background: var(--white); color: var(--t-ink);
}
.ink-band, .alerts-band {
  --t-ground: var(--ink); --t-card: #20232a; --t-card-2: #2a2e36; --t-chip: #2a2e36; --t-chip-hover: #363b45;
  --t-ink: #ffffff; --t-muted: #b4bac4; --t-line: #343944; --t-line-strong: #4a505c; --t-control: #ffffff;
  --t-hot: #ff9ba6; --t-focus: #ffffff; --t-err-bg: #3a1d22;
  background: var(--ink); color: #ffffff;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--mast-h) + 16px); scrollbar-color: #b6bcc5 var(--paper); }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--font-ui); font-size: 16px; line-height: 1.5;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; overflow-x: clip;
}
::selection { background: var(--accent); color: #ffffff; }
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4, p, ul, ol, dl, dd, figure, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }
h1, h2, h3, h4 { font-family: var(--font-ui); font-weight: 700; line-height: 1.15; letter-spacing: -0.02em; text-wrap: balance; }
p { text-wrap: pretty; }
section[id], h1, h2, h3 { scroll-margin-top: calc(var(--mast-h) + 16px); }
:focus-visible { outline: 2px solid var(--t-focus); outline-offset: 2px; }
.num, time, .metric, table { font-variant-numeric: tabular-nums; }
[hidden] { display: none !important; }
[data-pl-turnstile]:empty { display: none; }
.vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
code, pre { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.92em; }
.photo { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.04); background: var(--paper-2); }
.grey { color: var(--t-muted); }

.skip { position: absolute; left: 12px; top: -64px; z-index: 100; padding: 10px 14px; border-radius: var(--radius); background: var(--ink); color: #ffffff; font-weight: 600; }
.skip:focus { top: 12px; }

/* ---------- Masthead ---------- */
.mast { position: sticky; top: 0; z-index: 40; background: var(--white); }
.mast.is-scrolled { box-shadow: 0 1px 0 var(--line); } /* taste-skill-ignore: the sticky bar's edge once the page scrolls under it */
.bar { max-width: var(--maxw); height: var(--mast-h); margin-inline: auto; padding-inline: var(--margin); display: flex; align-items: center; gap: clamp(20px, 2.2vw, 40px); }
.wordmark { flex: none; display: inline-flex; align-items: center; gap: 10px; min-height: 44px; color: var(--ink); font-size: 20px; font-weight: 700; letter-spacing: -0.035em; }
.wordmark:hover { text-decoration: none; }
.wordmark .mark { width: 30px; height: auto; color: var(--accent); }
.nav { display: flex; align-self: stretch; align-items: stretch; gap: 2px; min-width: 0; }
.nav > a { position: relative; display: flex; align-items: center; padding: 0 10px; color: var(--muted); font-size: 15px; font-weight: 500; white-space: nowrap; transition: color 150ms var(--ease); }
.nav > a:hover { color: var(--ink); text-decoration: none; }
.nav > a[aria-current="page"] { color: var(--ink); }
.nav > a[aria-current="page"]::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: 0; height: 3px; background: var(--accent); }
.nav-actions, .nav-more { display: none; }
.nav > a:focus-visible { outline-offset: -6px; }
.bar-actions { margin-left: auto; display: flex; align-items: center; gap: 6px; flex: none; }
.bar-actions .menu-toggle { display: none; }
.menu-toggle .i-close, .menu-toggle[aria-expanded="true"] .i-menu { display: none; }
.menu-toggle[aria-expanded="true"] .i-close { display: inline; }

/* ---------- Buttons ---------- */
.btn {
  --b-bg: var(--t-chip); --b-ink: var(--t-ink); --b-line: transparent;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: var(--ctl); padding: 0 16px; border: 1px solid var(--b-line); border-radius: var(--radius); /* taste-skill-ignore: transparent unless a secondary button, so every variant keeps one height */
  background: var(--b-bg); color: var(--b-ink);
  font-family: var(--font-ui); font-size: 15px; font-weight: 600; line-height: 1.2; letter-spacing: -0.005em; text-align: center; white-space: nowrap;
  transition: background-color 150ms var(--ease), border-color 150ms var(--ease), color 150ms var(--ease), transform 120ms var(--ease);
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn svg { flex: none; }
.btn-primary, .btn-ink { --b-bg: var(--ink); --b-ink: #ffffff; }
.btn-primary:hover, .btn-ink:hover { --b-bg: var(--ink-2); }
.btn-accent { --b-bg: var(--accent); --b-ink: #ffffff; }
.btn-accent:hover { --b-bg: var(--accent-hover); }
.btn-ghost, .btn-secondary, .btn-outline { --b-bg: var(--t-input); --b-ink: var(--t-input-ink); --b-line: var(--t-control-soft); }
.btn-ghost:hover, .btn-secondary:hover, .btn-outline:hover { --b-line: var(--t-ink); }
.btn-quiet { --b-bg: transparent; padding: 0 12px; }
.btn-quiet:hover { --b-bg: var(--t-chip); }
.btn-icon { width: var(--ctl); padding: 0; --b-bg: transparent; }
.btn-icon:hover { --b-bg: var(--t-chip); }
.btn-lg { min-height: 48px; padding: 0 22px; font-size: 16px; }
.btn[aria-pressed="true"] { --b-bg: var(--ink); --b-ink: #ffffff; --b-line: var(--ink); }
.btn:disabled { cursor: progress; opacity: 0.7; }

.textbtn {
  display: inline-flex; align-items: center; gap: 6px; min-height: 28px; padding: 0; border: 0; background: none;
  color: var(--t-ink); font-family: var(--font-ui); font-size: 15px; font-weight: 600; line-height: 1.3; text-align: left;
  text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 0.22em; text-decoration-thickness: 1px;
  transition: text-decoration-color 150ms var(--ease);
}
.textbtn:hover { text-decoration: underline; text-decoration-color: currentColor; }
.textbtn svg { color: var(--t-muted); transition: transform 160ms var(--ease); }
.textbtn:hover svg { transform: translateX(2px); }
.textbtn[aria-pressed="true"], .textbtn[aria-pressed="true"] svg { color: var(--t-pos); }
.sponsored { color: var(--t-ink); }
.sponsored small, .pc-spons, .disclosure-bar { display: none; }
.linkbtn { padding: 0; border: 0; background: none; text-align: left; }

/* ---------- Canvas ---------- */
main { display: block; min-height: calc(100vh - var(--mast-h)); outline: none; }
.canvas { max-width: var(--maxw); margin-inline: auto; padding: 40px var(--margin) 112px; }
.boot-canvas { padding-top: 96px; }
.boot { font-family: var(--font-text); font-size: 19px; color: var(--muted); }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; margin-bottom: 12px; color: var(--t-muted); font-size: 14px; }
.crumbs a { color: var(--t-muted); }
.crumbs a:hover { color: var(--t-ink); }
.page-head { max-width: 920px; margin-bottom: 28px; }
.page-head h1, .title-row h1 { font-size: var(--fs-title); line-height: 1.12; letter-spacing: -0.03em; }
.standfirst, .subline { max-width: var(--measure); margin-top: 10px; color: var(--t-ink); font-family: var(--font-text); font-size: var(--fs-read); line-height: 1.5; }
.standfirst strong, .subline strong { font-weight: 600; }
.page-head .title-actions { margin-top: 20px; }
.title-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px 32px; margin-bottom: 28px; }
.title-row > div:first-child { min-width: 0; max-width: 920px; }
.title-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.stamp { flex: none; color: var(--t-muted); font-size: 14px; }
.section-gap { margin-top: var(--gap); }
.fine { padding: 12px var(--pad) 20px; color: var(--t-muted); font-size: 14px; line-height: 1.5; }
.fine a:not(.textbtn) { color: var(--t-ink); text-decoration: underline; text-underline-offset: 0.2em; }

/* ---------- Panels, cards, strips ---------- */
.panel { min-width: 0; border-radius: var(--radius); background: var(--t-card); }
.panel + .panel, .stack-list > .panel + .panel { margin-top: var(--gap); }
.panel-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 16px; padding: 20px var(--pad) 4px; }
.panel-head h2, .panel > h2 { font-size: 19px; line-height: 1.25; letter-spacing: -0.015em; }
.meta, .panel-head .meta { color: var(--t-muted); font-size: 14px; }
.panel-body { padding: 12px var(--pad) var(--pad); }
.card { display: block; padding: var(--pad); border-radius: var(--radius); background: var(--t-card); }
a.card:hover { text-decoration: none; background: var(--t-card-2); }
.card h3 { font-size: 20px; line-height: 1.2; }
.card p { margin-top: 8px; color: var(--t-muted); font-family: var(--font-text); font-size: 16px; line-height: 1.5; }
.grid-2, .grid-3, .grid-4 { display: grid; gap: var(--gap); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* A row of figures: one sheet split by quiet dividers. */
.strip { display: grid; grid-template-columns: repeat(var(--cells, 5), minmax(0, 1fr)); gap: 1px; margin-bottom: var(--gap); overflow: clip; border-radius: var(--radius); background: var(--t-line); }
.strip > div { min-width: 0; padding: 16px 20px 18px; background: var(--t-card); }
.strip dt { color: var(--t-muted); font-size: 14px; }
.strip dd { margin-top: 4px; font-size: clamp(24px, 2vw, 30px); font-weight: 700; line-height: 1.1; letter-spacing: -0.025em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.strip dd small { margin-left: 6px; color: var(--t-muted); font-size: 13px; font-weight: 500; letter-spacing: 0; }
.strip dd.is-hue { color: var(--t-hot); }
.strip dd.is-grey { color: var(--t-muted); }

/* ---------- Badges: pale tints, the hue of the verdict ---------- */
.badge, .pill {
  display: inline-flex; align-items: center; flex: none; height: 22px; padding: 0 8px; border-radius: var(--radius);
  background: var(--t-chip); color: var(--t-ink); font-family: var(--font-ui); font-size: 13px; font-weight: 600; line-height: 1; letter-spacing: 0; white-space: nowrap; vertical-align: middle;
}
.badge.v-all_time_high, .pill.v-all_time_high { background: var(--accent-tint); color: var(--accent-text); }
.badge.v-rare, .pill.v-rare { background: var(--ink); color: #ffffff; }
.badge.v-strong, .pill.v-strong, .pill.pos { background: var(--positive-tint); color: var(--positive); }
.badge.v-typical, .pill.v-typical { background: var(--t-chip); color: var(--t-muted); }
.badge.v-skip, .pill.v-skip, .pill.warn { background: var(--warning-tint); color: var(--warning); }
.badge.is-elevated { margin-left: 6px; background: var(--accent-tint); color: var(--accent-text); }
/* Ended: plain grey, never crimson (crimson means "closes soon"). */
.badge.v-ended { background: var(--paper-2); color: var(--ink); }

/* ---------- Filters: tabs, toolbar, search, select, chips ---------- */
.tabs { display: flex; gap: 24px; padding: 0 var(--pad); overflow-x: auto; scrollbar-width: none; box-shadow: inset 0 -1px 0 var(--t-line); } /* taste-skill-ignore: underline tabs sit on one full-width rule (app-screens 4.4) */
.tabs::-webkit-scrollbar { display: none; }
.tabs a, .tabs button {
  position: relative; flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 48px; padding: 0; border: 0; background: none;
  color: var(--t-muted); font-family: var(--font-ui); font-size: 15px; font-weight: 600; white-space: nowrap; transition: color 150ms var(--ease);
}
.tabs a:hover, .tabs button:hover { color: var(--t-ink); text-decoration: none; }
.tabs [aria-current="page"], .tabs [aria-pressed="true"], .tabs [aria-selected="true"] { color: var(--t-ink); }
.tabs [aria-current="page"]::after, .tabs [aria-pressed="true"]::after, .tabs [aria-selected="true"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--t-hot); }
.tabs .count { color: var(--t-muted); font-size: 13px; font-weight: 500; }
.canvas > .tabs, .guides section > .tabs { margin-bottom: var(--gap); padding: 0; }
/* Tabs that wrap onto a second line instead of running off the edge (a few filters, every one visible). */
.tabs-wrap { flex-wrap: wrap; gap: 0 24px; overflow: visible; }

.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; padding: 16px var(--pad) 0; }
.toolbar-lead { padding: 20px var(--pad) 16px; }
.toolbar .chips { padding: 0; }
.toolbar label.inline { display: inline-flex; align-items: center; gap: 8px; color: var(--t-muted); font-size: 14px; }
.guides section > .toolbar-lead, .guides section > .result-line { padding-left: 0; padding-right: 0; }

/* The search field: icon and input share one grid cell, so the icon always sits inside the field. */
.search { position: relative; display: grid; align-items: center; flex: 1 1 300px; min-width: 0; max-width: 460px; }
.search > * { grid-area: 1 / 1; }
.search > svg { z-index: 1; margin-left: 13px; color: var(--t-muted); pointer-events: none; }
.search input {
  width: 100%; min-width: 0; height: var(--ctl); padding: 0 12px 0 38px; border: 1px solid var(--t-control); border-radius: var(--radius);
  background: var(--t-input); color: var(--t-input-ink); font-size: 16px; transition: border-color 150ms var(--ease);
}
.search input:hover { border-color: var(--t-ink); }
.search-lg > svg { margin-left: 14px; }
.search-lg input { padding-left: 40px; }
input::placeholder, textarea::placeholder { color: var(--faint); opacity: 1; }
.select {
  max-width: 100%; height: var(--ctl); padding: 0 34px 0 12px; border: 1px solid var(--t-control); border-radius: var(--radius); appearance: none; /* taste-skill-ignore: a form control's own border */
  background: var(--t-input) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M3 4.5l3 3 3-3' fill='none' stroke='%2314161b' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 12px center;
  color: var(--t-input-ink); font-size: 15px;
}
.select:hover { border-color: var(--t-ink); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 14px var(--pad) 0; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 12px; border: 0; border-radius: var(--radius);
  background: var(--t-chip); color: var(--t-ink); font-family: var(--font-ui); font-size: 14px; font-weight: 500; line-height: 1.2; white-space: nowrap;
  transition: background-color 150ms var(--ease), color 150ms var(--ease);
}
.chip:hover { background: var(--t-chip-hover); text-decoration: none; }
.chip[aria-pressed="true"], .chip[aria-current="page"], .chip.is-on, .chip:has(input:checked) { background: var(--t-ink); color: var(--t-card); }
.chip .n { opacity: 0.75; font-weight: 500; font-variant-numeric: tabular-nums; }
.chip input { width: 16px; height: 16px; }
.result-line { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 16px; padding: 16px var(--pad) 8px; color: var(--t-muted); font-size: 14px; }
.result-line > p { margin-right: auto; }
.result-line strong { color: var(--t-ink); font-weight: 600; }
.result-line .textbtn { font-size: 14px; }

/* ---------- Tables: rules and alignment ---------- */
.table-wrap { padding: 0 var(--pad) 8px; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th { padding: 10px 16px 10px 0; border-bottom: 1px solid var(--t-line-strong); color: var(--t-muted); font-size: 13px; font-weight: 500; text-align: left; white-space: nowrap; vertical-align: bottom; }
td { padding: 16px 16px 16px 0; border-bottom: 1px solid var(--t-line); vertical-align: top; overflow-wrap: break-word; }
tbody tr:last-child td { border-bottom: 0; }
th:last-child, td:last-child { padding-right: 0; }
th.num, td.num { text-align: right; }
.ledger { table-layout: fixed; }
.ledger td { padding-top: 14px; padding-bottom: 14px; }
.ledger .verdict-why { display: -webkit-box; overflow: hidden; -webkit-line-clamp: 1; -webkit-box-orient: vertical; }
.ledger col.c-prog { width: 18%; }
.ledger col.c-deal { width: 42%; }
.ledger col.c-metric { width: 15%; }
.ledger col.c-verdict { width: 11%; }
.ledger col.c-date { width: 14%; }
.ledger tr.is-registered .deal-title::after { content: "Registered"; display: inline-flex; align-items: center; height: 20px; margin-left: 8px; padding: 0 6px; border-radius: var(--radius); background: var(--positive-tint); color: var(--positive); font-size: 13px; font-weight: 600; vertical-align: 1px; }
.prog-name { color: var(--t-ink); font-weight: 600; }
.sub { display: block; margin-top: 3px; color: var(--t-muted); font-size: 13px; line-height: 1.4; }
.sub .code { color: var(--t-ink); font-weight: 600; }
.deal-title { color: var(--t-ink); font-size: 16px; font-weight: 600; line-height: 1.35; }
.deal-summary { display: -webkit-box; margin-top: 4px; overflow: hidden; color: var(--t-muted); font-family: var(--font-text); font-size: 15px; line-height: 1.5; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.verdict-why { margin-top: 6px; }
.row-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 20px; margin-top: 8px; }
.row-actions .textbtn { font-size: 14px; }
.metric { color: var(--t-ink); font-size: 16px; font-weight: 700; line-height: 1.3; letter-spacing: -0.01em; }
.ledger tr.is-elevated .metric { color: var(--t-hot); }
.stack-link { display: inline-block; margin-top: 6px; color: var(--t-muted); font-size: 13px; font-weight: 600; line-height: 1.35; text-decoration: underline; text-underline-offset: 0.2em; }
.stack-link:hover { color: var(--t-ink); }
.date { font-weight: 600; }
.due { display: block; margin-top: 2px; color: var(--t-muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.due.is-soon { color: var(--t-hot); font-weight: 600; }
.due.is-closed { color: var(--t-muted); }
.reg-flag { display: block; margin-top: 4px; color: var(--t-warn); font-size: 13px; font-weight: 500; }
/* Guide cost tables hold short phrases ("14,000 JAL Miles", "Saves 6,000 miles..."), so every column reads
   from the left; tabular figures keep the numbers aligned. */
.price-table { table-layout: fixed; }
.price-table col.c-option { width: 23%; }
.price-table col.c-points { width: 19%; }
.price-table col.c-cost { width: 21%; }
.price-table col.c-rate { width: 12%; }
.price-table col.c-note { width: 25%; }
.price-table th, .price-table td { font-size: 15px; line-height: 1.45; white-space: normal; overflow-wrap: break-word; }
.price-table thead th { white-space: nowrap; }
.price-table th[scope="row"] { color: var(--t-ink); font-weight: 600; vertical-align: top; }
.price-table td.num, .price-table th.num { text-align: left; }
.price-table td:last-child { color: var(--t-muted); }
.price-table tfoot td, .price-table tr.total td { border-top: 3px double var(--t-ink); border-bottom: 0; font-weight: 700; }
.verdict-table td, .verdict-table th { font-size: 15px; }
.split .table-wrap table:not(.ledger) td.num:nth-child(2) { text-align: left; }
.verdict-table td:first-child { width: 150px; }

/* ---------- States ---------- */
.empty { margin: 8px var(--pad) var(--pad); padding: 20px; border-radius: var(--radius); background: var(--t-card-2); color: var(--t-muted); font-family: var(--font-text); font-size: 16px; line-height: 1.5; }
.empty strong { display: block; margin-bottom: 4px; color: var(--t-ink); font-family: var(--font-ui); font-size: 17px; font-weight: 700; }
.empty .textbtn { margin-top: 10px; }
.error-box { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin: 8px var(--pad) var(--pad); padding: 14px 16px; border-radius: var(--radius); background: var(--t-err-bg); color: var(--t-ink); }
.sk { display: inline-block; max-width: 100%; height: 12px; border-radius: var(--radius); background: var(--t-chip); vertical-align: middle; }
.sk.lg { height: 18px; }
[aria-busy="true"] .sk { cursor: progress; }

/* ---------- Charts ---------- */
.chart { overflow: visible; }
.chart .tick { fill: var(--chart-muted); font-family: var(--font-ui); font-size: 12px; }
.chart .lbl { fill: var(--chart-ink); font-family: var(--font-ui); font-size: 12px; }
.chart .today-label { fill: var(--chart-ink); font-family: var(--font-ui); font-size: 12px; font-weight: 600; }
.runway { position: relative; padding: 8px var(--pad) 20px; }
.runway svg { width: 100%; height: auto; }
.runway a circle { transition: r 120ms var(--ease); }
.runway a:hover circle { r: 7; }
.runway a:focus-visible { outline: none; }
.runway a:focus-visible circle { stroke: var(--t-ink); stroke-width: 2; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; color: var(--t-muted); font-size: 13px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.legend i { display: inline-block; width: 9px; height: 9px; border-radius: 50%; }
.legend i.dash { width: 14px; height: 2px; border-radius: 0; background: var(--t-muted); }
.legend i.span { width: 14px; height: 10px; border-radius: var(--radius); background: var(--chart-span); }
.graph-empty { max-width: 34ch; color: var(--t-muted); font-size: 14px; }

/* ---------- Detail pages ---------- */
.split { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: var(--gap); align-items: start; }
.col { min-width: 0; }
.rail { display: grid; gap: var(--gap); align-content: start; min-width: 0; }
.rail > .panel + .panel { margin-top: 0; } /* the rail's own gap spaces its panels */
.headline-block { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 16px 40px; align-items: start; padding: var(--pad); }
.headline-block > div:last-child > p:first-child { color: var(--t-ink); font-family: var(--font-text); font-size: 17px; line-height: 1.55; }
.big-metric { max-width: 13ch; font-size: clamp(28px, 2.6vw, 38px); font-weight: 700; line-height: 1.05; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.big-metric.is-money { color: var(--t-hot); }
.verdict-line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 12px; }
.verdict-reason { max-width: 64ch; margin-top: 12px; color: var(--t-ink); font-family: var(--font-text); font-size: 16px; line-height: 1.55; }
.verdict-reason strong { font-family: var(--font-ui); font-weight: 600; }
.hist-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 2px; margin: 0 var(--pad) 20px; }
.hist-strip > div { padding: 12px 16px; background: var(--t-card-2); }
.hist-strip dt { color: var(--t-muted); font-size: 13px; }
.hist-strip dd { margin-top: 2px; font-size: 18px; font-weight: 700; letter-spacing: -0.015em; }
.intel-rail { display: grid; gap: 12px; font-family: var(--font-text); font-size: 15px; line-height: 1.55; }
.intel-rail h3 { margin-top: 6px; color: var(--t-muted); font-family: var(--font-ui); font-size: 14px; font-weight: 600; letter-spacing: 0; }
.intel-rail strong { color: var(--t-ink); font-family: var(--font-ui); font-weight: 600; }
.terms-mini { display: grid; gap: 8px; }
.terms-mini li, .terms li { position: relative; padding-left: 18px; }
.terms-mini li::before, .terms li::before { content: ""; position: absolute; left: 1px; top: 0.6em; width: 6px; height: 6px; background: var(--accent); }
.guide-cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 28px; margin-bottom: var(--gap); padding: 20px var(--pad); }
.guide-cta:hover { text-decoration: none; }
.guide-cta:hover strong { text-decoration: underline; text-underline-offset: 0.2em; }
.guide-cta-text { display: grid; gap: 4px; max-width: 70ch; }
.guide-cta-text strong { color: var(--t-ink); font-size: 17px; }
.guide-cta-text span { color: var(--t-muted); font-family: var(--font-text); font-size: 16px; line-height: 1.5; }
.guide-cta-meta { display: inline-flex; flex: none; align-items: center; gap: 8px; color: var(--t-hot); font-size: 14px; font-weight: 600; }
.provenance { padding: 0 var(--pad) 20px; }
.dates3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2px; margin: 12px var(--pad) 0; }
.dates3 > div { min-width: 0; padding: 16px 18px 18px; background: var(--t-card-2); }
.dates3 dt { color: var(--t-muted); font-size: 13px; }
.dates3 dd { margin-top: 4px; font-size: 22px; font-weight: 700; line-height: 1.2; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.dates3 dd + dd { color: var(--t-muted); font-size: 13px; font-weight: 500; line-height: 1.4; letter-spacing: 0; }
.dates3 .is-hue { color: var(--t-hot); }
.timeline-svg { padding: 16px var(--pad) 20px; }
.action-row { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 var(--pad) var(--pad); }
.terms { display: grid; gap: 10px; padding: 8px var(--pad) var(--pad); }
.terms li { max-width: 72ch; font-family: var(--font-text); font-size: 16px; line-height: 1.55; }
.rows { display: grid; gap: 2px; }
.rows > li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 16px; padding: 12px 14px; background: var(--t-card-2); }
.rows > li > * { grid-column: 1; min-width: 0; }
.rows > li > .right { grid-column: 2; grid-row: 1 / span 3; text-align: right; font-variant-numeric: tabular-nums; }
.rows-wrap { padding: 8px var(--pad) 12px; }
.rows .date { display: block; }
td .rows { gap: 4px; }
td .rows > li { display: block; padding: 0; background: none; font-size: 14px; line-height: 1.4; }
.offer { padding: 18px var(--pad); }
.offer + .offer { padding-top: 6px; }
.offer h3 { margin-top: 4px; font-size: 16px; line-height: 1.35; }
.offer .btn { margin-top: 12px; }
.card-img { padding: 4px var(--pad) 20px; }
.card-img img { width: 100%; height: auto; aspect-ratio: 1200 / 630; border-radius: var(--radius); background: var(--t-card-2); }
.notice { margin-top: 18px; padding: 12px 14px; border-radius: var(--radius); background: var(--t-card); color: var(--t-ink); font-size: 14px; line-height: 1.5; }
.notice a { text-decoration: underline; text-underline-offset: 0.2em; }
.kv { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 8px 20px; font-size: 15px; }
.panel > .kv { padding: 12px var(--pad) 20px; }
.panel > #list > .grid-3 { padding: 20px var(--pad) var(--pad); }
.kv dt { color: var(--t-muted); }
.kv dd { overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }

/* ---------- Programs directory ---------- */
.dir col.c-name { width: 29%; }
.dir col.c-code { width: 6%; }
.dir col.c-all { width: 13%; }
.dir col.c-reg { width: 10%; }
.dir col.c-cur { width: 14%; }
.dir col.c-cpp { width: 8%; }
.dir col.c-live { width: 5%; }
.dir col.c-pin { width: 7%; }
.dir .group th { padding-top: 28px; border-bottom-color: var(--t-ink); color: var(--t-ink); font-size: 17px; font-weight: 700; letter-spacing: -0.015em; }
.dir .group th small { margin-left: 8px; color: var(--t-muted); font-size: 14px; font-weight: 500; letter-spacing: 0; }
.dir tbody:first-of-type .group th { padding-top: 16px; }
.dir td { padding: 14px 16px 14px 0; }
.dir .note { display: -webkit-box; margin-top: 3px; overflow: hidden; color: var(--t-muted); font-size: 13px; line-height: 1.45; -webkit-line-clamp: 1; -webkit-box-orient: vertical; }
.pin {
  display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border: 0; border-radius: var(--radius);
  background: var(--t-chip); color: var(--t-ink); font-size: 14px; font-weight: 600; white-space: nowrap; transition: background-color 150ms var(--ease), color 150ms var(--ease);
}
.pin:hover { background: var(--t-chip-hover); }
.pin[aria-pressed="true"] { background: var(--ink); color: #ffffff; }
.title-actions .pin { height: var(--ctl); padding: 0 16px; font-size: 15px; }

/* ---------- Program hub: transfer graph ---------- */
.note-block { max-width: 78ch; padding: 16px var(--pad) 22px; font-family: var(--font-text); font-size: 17px; line-height: 1.55; }
.graph { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(160px, 240px) minmax(0, 1fr); gap: 0 56px; align-items: center; padding: 18px var(--pad) var(--pad); }
.graph-lines { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.graph-col { position: relative; display: grid; gap: 6px; }
.graph-col h3 { margin-bottom: 2px; color: var(--t-muted); font-size: 14px; font-weight: 600; letter-spacing: 0; }
.graph-col.right { justify-items: start; }
.graph-col.left { justify-items: end; text-align: right; }
.node { position: relative; display: inline-flex; flex-direction: column; max-width: 100%; padding: 8px 12px; border-radius: var(--radius); background: var(--t-card-2); transition: background-color 150ms var(--ease); }
.node:hover { background: var(--t-chip-hover); text-decoration: none; }
.node b { font-size: 14px; font-weight: 600; line-height: 1.3; }
.node small { color: var(--t-muted); font-size: 13px; line-height: 1.3; }
.node.centre { justify-self: stretch; align-items: center; padding: 16px 18px; background: var(--accent); color: #ffffff; text-align: center; }
.node.centre b { font-size: 16px; }
.node.centre small { color: #fde3e6; }
.siblings { display: flex; flex-wrap: wrap; gap: 6px; padding: 16px var(--pad) var(--pad); }
/* What a round number of the program's points cost today: the planner's answer, price first (program.js). */
.prog-price-body { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px 40px; align-items: center; padding: 12px var(--pad) var(--pad); }
.prog-price-body > .sk { display: block; }
.prog-price-fig { color: var(--t-ink); font-size: 34px; font-weight: 700; line-height: 1; letter-spacing: -0.03em; white-space: nowrap; }
.prog-price-fig small { display: block; margin-top: 6px; color: var(--t-muted); font-size: 14px; font-weight: 500; letter-spacing: 0; }
.prog-price-route { max-width: 62ch; color: var(--t-ink); font-family: var(--font-text); font-size: 17px; line-height: 1.5; }
.prog-price-ref { display: grid; grid-template-columns: repeat(2, auto); gap: 4px 28px; }
.prog-price-ref dt { color: var(--t-muted); font-size: 13px; }
.prog-price-ref dd { margin-top: 2px; font-size: 18px; font-weight: 700; letter-spacing: -0.01em; white-space: nowrap; }
.prog-price-ref dd small { margin-left: 6px; color: var(--t-muted); font-size: 13px; font-weight: 500; letter-spacing: 0; }

/* ---------- Stacks board ---------- */
.stack { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: var(--gap) 40px; padding: var(--pad); }
.stack h2 { font-size: 20px; line-height: 1.25; }
.stack .kv { margin-top: 16px; font-size: 14px; }
.stack .closes { margin-top: 16px; color: var(--t-hot); font-size: 30px; font-weight: 700; line-height: 1.1; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.stack .closes + p { color: var(--t-muted); font-size: 14px; }
.lanes { --chart-ink: #a3a9b3; display: grid; gap: 4px; min-width: 0; }
.lane, .lane-axis { display: grid; grid-template-columns: minmax(0, 290px) minmax(0, 1fr); gap: 20px; }
.lane { align-items: center; min-height: 48px; }
.lane-label { min-width: 0; }
.lane-label a { font-weight: 600; }
.lane-label .sub { margin-top: 2px; }
.lane-label .badge { margin-left: 4px; }
.lane svg { width: 100%; height: 28px; }
.lane-axis svg { width: 100%; height: 18px; }
.stack-detail { padding: 0 var(--pad) var(--pad); }
.stack-detail h3 { margin-bottom: 10px; font-size: 16px; line-height: 1.3; }
.stack-detail .rows > li { display: block; }
.stack-detail .rows a { font-weight: 600; }

/* ---------- Status matches, portals, matrices ---------- */
.matrix-table td, .matrix-table th, .match-table td, .match-table th { font-size: 15px; }
.match-table td .btn { min-height: 36px; padding: 0 14px; font-size: 14px; }
.dir-section + .dir-section { margin-top: 8px; }
.dir-subhead { padding: 16px var(--pad) 4px; color: var(--t-ink); font-size: 15px; font-weight: 700; letter-spacing: -0.01em; }

/* ---------- Campaign, article, partner and guide cards ---------- */
.campaign-card, .article-card { display: grid; gap: 10px; align-content: start; min-width: 0; padding: var(--pad); border-radius: var(--radius); background: var(--t-card); }
.cc-top { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.cc-prog { font-weight: 700; }
.cc-cat { color: var(--t-muted); text-align: right; }
.cc-metric { font-size: 26px; line-height: 1.1; letter-spacing: -0.03em; }
.cc-title { display: -webkit-box; overflow: hidden; color: var(--t-muted); font-family: var(--font-text); font-size: 16px; line-height: 1.45; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.cc-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; font-size: 14px; }
.cc-meta .due { display: inline; margin: 0; }
.campaign-card.is-registered .cc-metric::after { content: " · Registered"; color: var(--t-pos); font-size: 14px; letter-spacing: 0; }
.ac-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; color: var(--t-muted); font-size: 14px; }
.ac-title { display: -webkit-box; overflow: hidden; font-size: 21px; line-height: 1.2; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
.ac-title a:hover { text-decoration-thickness: 2px; }
.article-card > .ac-title { order: -1; }
.ac-deck { color: var(--t-ink); font-family: var(--font-text); font-size: 16px; line-height: 1.5; }
.ac-cost { color: var(--t-muted); font-family: var(--font-text); font-size: 15px; font-style: italic; line-height: 1.5; }
.ac-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; margin-top: auto; padding-top: 6px; color: var(--t-muted); font-size: 14px; }
.article-grid { align-items: stretch; }
.article-grid .article-card { grid-template-rows: auto auto auto auto 1fr; }
.guide-lead { margin-bottom: var(--gap); }
.article-card.is-lead, .article-card.lg { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); column-gap: 48px; padding: 32px; }
.article-card.is-lead > *, .article-card.lg > * { grid-column: 1; }
.article-card.is-lead > .ac-deck, .article-card.lg > .ac-deck { grid-column: 2; grid-row: 1 / span 2; align-self: start; font-size: 18px; }
.article-card.is-lead > .ac-cost, .article-card.lg > .ac-cost { grid-column: 2; }
.article-card.is-lead > .ac-foot, .article-card.lg > .ac-foot { grid-column: 1 / -1; }
.article-card.is-lead .ac-title, .article-card.lg .ac-title { font-size: clamp(24px, 2.4vw, 32px); line-height: 1.12; letter-spacing: -0.03em; }
.partner-card { display: grid; gap: 10px; padding: 20px; border-radius: var(--radius); background: var(--t-card-2); }
.partner-card .btn { justify-self: start; }
.offer-stack { display: grid; gap: 2px; padding: 12px var(--pad) var(--pad); }
.offer-stack .fine { padding: 0; }
.pc-top { color: var(--t-muted); font-size: 13px; }
.pc-badge { font-weight: 600; }
.pc-title { font-size: 17px; line-height: 1.3; letter-spacing: -0.015em; }
.panel > #list > .grid-3 .partner-card { background: var(--t-card-2); }

/* ---------- Guides index (/guides): a ledger of guides, open deals first, ended ones kept below ---------- */
.guide-finder { margin-bottom: clamp(28px, 3vw, 40px); }
.guide-finder .toolbar-lead { justify-content: space-between; }
.result-count { color: var(--t-muted); font-size: 15px; }
.result-count strong { color: var(--t-ink); font-weight: 600; }
.group-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 24px; margin-bottom: 14px; }
.group-head h2 { font-size: var(--fs-h2); line-height: 1.2; letter-spacing: -0.02em; }
.group-head .meta { max-width: 64ch; color: var(--t-muted); font-size: 15px; line-height: 1.45; }
.guide-group + .guide-group { margin-top: clamp(48px, 5vw, 72px); }
.guide-feature {
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: 24px clamp(32px, 4vw, 64px);
  margin-bottom: 2px; padding: clamp(24px, 2.8vw, 40px); border-radius: var(--radius); background: var(--t-card);
}
.gf-title { font-size: clamp(24px, 2.1vw, 30px); line-height: 1.1; letter-spacing: -0.028em; }
.gf-title a:hover { text-decoration-thickness: 2px; }
.gf-deck { max-width: 62ch; margin-top: 16px; font-family: var(--font-text); font-size: clamp(17px, 1.3vw, 19px); line-height: 1.5; }
.gf-side { display: grid; gap: 14px; align-content: start; justify-items: start; padding-top: 4px; }
.gf-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; color: var(--t-muted); font-size: 14px; }
.gf-cost { font-family: var(--font-text); font-size: 17px; font-style: italic; line-height: 1.5; }
.gf-status { font-size: 15px; }
.gf-status .gs { justify-items: start; }
.guide-rows { display: grid; gap: 2px; }
.guide-row {
  position: relative; display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 2fr) minmax(0, 1.4fr) minmax(0, 1.5fr);
  gap: 8px 28px; align-items: start; padding: 20px 24px; border-radius: var(--radius); background: var(--t-card);
  transition: background-color 150ms var(--ease);
}
.guide-row:hover { background: var(--t-card-2); }
.gr-title { font-size: 19px; line-height: 1.25; letter-spacing: -0.015em; }
.gr-title a::after { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: var(--radius); } /* the whole row opens the guide */
.gr-title a:focus-visible { outline: none; }
.gr-title a:focus-visible::after { outline: 2px solid var(--t-focus); outline-offset: -2px; }
.guide-row:hover .gr-title a { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
.gr-deck { display: -webkit-box; max-width: 72ch; margin-top: 6px; overflow: hidden; font-family: var(--font-text); font-size: 16px; line-height: 1.5; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.gr-prog { font-size: 15px; font-weight: 600; line-height: 1.35; }
.gr-prog .sub { font-weight: 400; }
.gr-verdict { padding-top: 1px; }
.gr-status { font-size: 15px; text-align: right; }
.gs { display: inline-grid; gap: 2px; justify-items: end; line-height: 1.35; }
.gs .date { font-weight: 600; }
.gs .due { margin-top: 0; }
.gs.is-ended { color: var(--t-muted); font-weight: 600; }
.guide-row.is-ended .gr-title { color: var(--ink-2); }
.guide-row.is-sk .sk { display: block; margin-bottom: 10px; }

/* ---------- Long-form guide (/guides/<slug>) ---------- */
.article-head { padding-bottom: 40px; }
.article-head h1 { max-width: 23em; font-size: var(--fs-display); line-height: 1.06; letter-spacing: -0.035em; }
.article-head .standfirst { max-width: 64ch; margin-top: 16px; font-size: var(--fs-lead); }
.article-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-top: 20px; color: var(--t-muted); font-size: 14px; }
.cost-box { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 20px 40px; align-items: center; margin-top: 28px; padding: 24px 28px; }
.cost-box-text { display: grid; gap: 10px; min-width: 0; }
.cost-box-text h2 { color: var(--t-muted); font-size: 14px; font-weight: 600; letter-spacing: 0; }
.cost-line { max-width: 62ch; color: var(--t-ink); font-family: var(--font-text); font-size: 19px; font-weight: 600; line-height: 1.45; }
.cost-box-text p:not(.cost-line):not(.cost-dates):not(.cost-ended) { max-width: 64ch; color: var(--t-ink); font-family: var(--font-text); font-size: 16px; line-height: 1.5; }
.cost-dates { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; color: var(--t-muted); font-size: 15px; }
.cost-dates strong { color: var(--t-ink); }
.cost-dates time { color: var(--t-ink); font-weight: 600; }
.cost-dates .due { display: inline; margin: 0; font-size: 15px; }
.cost-ended { display: flex; align-items: baseline; gap: 10px; max-width: 70ch; padding: 12px 14px; border-radius: var(--radius); background: var(--paper); color: var(--t-ink); font-family: var(--font-text); font-size: 17px; line-height: 1.5; }
.cost-ended .badge { font-family: var(--font-ui); }
.cost-box-actions { display: flex; flex-direction: column; align-items: stretch; justify-content: center; gap: 8px; }
.guide-page > .paper-band { --t-ground: var(--white); --t-card: var(--paper); --t-card-2: var(--paper-2); --t-chip: #e6e9ed; --t-chip-hover: #d9dde3; background: var(--white); }
.canvas.article-body { max-width: 860px; padding-top: 56px; padding-bottom: 88px; }
.article-body { color: var(--t-ink); font-family: var(--font-text); font-size: 19px; line-height: 1.6; overflow-wrap: break-word; }
.article-body > * + * { margin-top: 1.8em; }
.article-body section > * + * { margin-top: 0.9em; }
.article-body p, .article-body ul, .article-body blockquote { max-width: 68ch; }
.article-body h2 { margin-top: 0.2em; font-family: var(--font-ui); font-size: clamp(22px, 2.1vw, 28px); line-height: 1.18; letter-spacing: -0.025em; }
.article-body h3 { margin-top: 1.4em; font-family: var(--font-ui); font-size: 19px; line-height: 1.3; letter-spacing: -0.015em; }
.article-body a:not(.btn):not(.textbtn) { overflow-wrap: anywhere; text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 0.18em; }
.article-body blockquote { padding: 16px 20px; background: var(--t-card); font-style: italic; }
.article-body ul li, .article-body ol:not(.steps-list) li { position: relative; padding-left: 22px; }
.article-body ul li + li, .article-body ol:not(.steps-list) li + li { margin-top: 8px; }
.article-body ul li::before { content: ""; position: absolute; left: 2px; top: 0.66em; width: 6px; height: 6px; background: var(--accent); }
.article-body .callout-list { display: grid; gap: 8px; margin-top: 12px; }
.article-body .table-wrap { margin-top: 16px; padding: 0; }
.article-body table { font-family: var(--font-ui); }
/* The cost table is wider than the reading column: it steps out to a table's measure, centred on the text. */
.article-body .price-wrap { width: min(1080px, calc(100vw - 2 * var(--margin))); max-width: none; margin-left: calc(50% - min(540px, 50vw - var(--margin))); }
.steps-list { counter-reset: step; display: grid; gap: 2px; max-width: 72ch; }
.article-body ol.steps-list > li, .steps-list > li { position: relative; padding: 16px 22px 16px 60px; background: var(--t-card); counter-increment: step; font-family: var(--font-text); font-size: 17px; line-height: 1.55; }
.article-body ol.steps-list > li::before, .steps-list > li::before { content: counter(step); position: absolute; left: 22px; top: 15px; color: var(--t-hot); font-family: var(--font-ui); font-size: 19px; font-weight: 700; font-variant-numeric: tabular-nums; }
.steps-list > li strong, .steps-list > li b { font-family: var(--font-ui); font-weight: 600; }
.steps-cta { margin-top: 20px; }
.steps-cta a { text-decoration: none; }
.article-end { max-width: 72ch; margin-top: 32px; padding: 18px 22px; background: var(--t-card); font-size: 17px; line-height: 1.5; }
.article-body .fine { font-family: var(--font-ui); }
.article-body .article-fine { padding: 12px 0 0; }
.faq-list { display: grid; gap: 2px; max-width: 72ch; }
.faq-list details { background: var(--t-card); }
.faq-list summary { display: flex; justify-content: space-between; gap: 16px; min-height: 52px; padding: 15px 20px; cursor: pointer; list-style: none; font-family: var(--font-ui); font-size: 17px; font-weight: 600; line-height: 1.35; letter-spacing: -0.01em; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: "+"; flex: none; color: var(--t-hot); font-size: 22px; line-height: 1; transition: transform 160ms var(--ease); }
.faq-list details[open] summary::after { transform: rotate(45deg); }
.faq-list details > :not(summary) { padding: 0 20px 18px; color: var(--t-ink); font-family: var(--font-text); font-size: 17px; line-height: 1.55; }
.faq-list dt { font-size: 17px; font-weight: 700; }
.faq-list dd { margin: 6px 0 18px; font-family: var(--font-text); font-size: 17px; line-height: 1.55; }
.canvas.related { padding-top: clamp(48px, 5vw, 72px); }

/* ---------- Partners (/partners): one row per offer, one quiet link out each ---------- */
.page-note { max-width: var(--measure); margin-top: 12px; color: var(--t-muted); font-size: 15px; line-height: 1.5; }
.page-note a { color: var(--t-ink); text-decoration: underline; text-underline-offset: 0.2em; }
.partner-rows { display: grid; gap: 2px; padding: 16px var(--pad) var(--pad); }
.partner-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 24px; align-items: center; padding: 16px 18px; border-radius: var(--radius); background: var(--t-card-2); }
.pr-title { font-size: 17px; line-height: 1.3; letter-spacing: -0.01em; }
.pr-text .sub { margin-top: 2px; }
.partner-row .btn { --b-bg: var(--t-card); }

/* ---------- Not found: a way back, beside the departures board ---------- */
.nf-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 32px clamp(32px, 5vw, 80px); align-items: start; }
.nf-search { display: flex; gap: 8px; max-width: 580px; margin-bottom: clamp(32px, 4vw, 48px); }
.nf-search .search { flex: 1 1 auto; max-width: none; }
.nf-search .search input, .nf-search .btn { min-height: 48px; height: 48px; }
.nf-popular h2 { margin-bottom: 12px; font-size: 20px; line-height: 1.25; letter-spacing: -0.015em; }
.nf-links { display: grid; gap: 2px; }
.nf-links a { display: grid; grid-template-columns: minmax(0, 13em) minmax(0, 1fr); gap: 2px 24px; align-items: baseline; padding: 16px 20px; border-radius: var(--radius); background: var(--t-card); transition: background-color 150ms var(--ease); }
.nf-links a:hover { text-decoration: none; background: var(--t-card-2); }
.nf-links a:hover .nf-name { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
.nf-name { font-size: 18px; font-weight: 700; line-height: 1.3; letter-spacing: -0.015em; }
.nf-note { font-family: var(--font-text); font-size: 17px; line-height: 1.45; }
.nf-photo { margin: 4px 0 0; aspect-ratio: 4 / 5; overflow: clip; background: var(--paper-2); }

/* ---------- Portals (/portals): one table, boosted rates first ---------- */
.portal-table { table-layout: auto; }
.portal-table th, .portal-table td { font-size: 15px; }
.portal-table td.c-merchant { width: 34%; min-width: 240px; }
.portal-table .deal-summary { max-width: 52ch; }
.portal-table .portal-stacks { margin-top: 8px; }
.portal-table td.c-links { width: 1%; white-space: nowrap; }
.portal-table .date { white-space: nowrap; }
.portal-table .metric { display: block; }
.portal-table .badge.is-elevated { margin: 6px 0 0; }
.portal-table .c-links .row-actions { flex-direction: column; align-items: flex-start; gap: 0; margin-top: 0; }
.prog-link { text-decoration: underline; text-decoration-color: var(--t-control-soft); text-underline-offset: 0.2em; }
.prog-link:hover { text-decoration-color: currentColor; }

/* ---------- Calculators ---------- */
.calc { display: grid; grid-template-columns: 360px minmax(0, 1fr); gap: var(--gap) 32px; padding: 12px var(--pad) var(--pad); }
.calc-form { display: grid; gap: 16px; align-content: start; }
.calc-result { min-width: 0; padding: var(--pad); border-radius: var(--radius); background: var(--t-card-2); transition: opacity 150ms var(--ease); }
.calc-result.is-loading { opacity: 0.6; }
.calc-result .verdict { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; }
.calc-result .verdict h3 { font-size: 22px; line-height: 1.2; }
.calc-result .verdict h3.pos { color: var(--t-pos); }
.verdict-note { max-width: 64ch; color: var(--t-ink); font-family: var(--font-text); font-size: 16px; line-height: 1.5; }
.calc-result .verdict-note { margin-top: 8px; }
.figures { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px 24px; margin-top: 20px; padding-top: 18px; border-top: 3px double var(--t-line-strong); }
.figures dt { color: var(--t-muted); font-size: 14px; }
.figures dd { margin-top: 2px; font-size: 22px; font-weight: 700; line-height: 1.2; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.figures dd.lead { color: var(--t-hot); font-size: clamp(30px, 2.8vw, 38px); line-height: 1.05; }
.figures dd.pos, .figures dd.lead.pos { color: var(--t-pos); }
.figures dd.neg { color: var(--t-hot); }
.figures dd small { display: block; margin-top: 2px; color: var(--t-muted); font-size: 13px; font-weight: 500; letter-spacing: 0; }
.calc-result .notice, .calc-result .hop-chain { background: var(--t-card); }
.bullet { margin-top: 20px; }
.bullet svg { width: 100%; height: 64px; }
.presets { display: flex; flex-wrap: wrap; gap: 6px; }
.x-buy-box { display: grid; gap: 12px; padding: 12px 14px; border-radius: var(--radius); background: var(--t-card-2); }
.check-inline { display: flex; align-items: center; gap: 10px; min-height: 32px; font-size: 14px; font-weight: 600; cursor: pointer; }
.pos { color: var(--t-pos); }
.hop-chain { display: inline-block; margin-top: 4px; padding: 3px 8px; border-radius: var(--radius); background: var(--t-card-2); color: var(--t-ink); font-size: 13px; font-weight: 600; }
.booster-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px; }
.booster-card { display: grid; gap: 10px; align-content: start; min-width: 0; padding: 18px 20px; border-radius: var(--radius); background: var(--t-card-2); overflow-wrap: anywhere; }
.booster-card > * { min-width: 0; }
.booster-top { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 10px 14px; }
.booster-top > div { flex: 1 1 180px; min-width: 0; }
.booster-top .badge { margin-right: 4px; }
.booster-top h3 { margin-top: 8px; font-size: 17px; line-height: 1.3; }
.booster-cpp { flex: none; font-size: 22px; font-weight: 700; letter-spacing: -0.02em; text-align: right; white-space: nowrap; }
.booster-cpp small { display: block; color: var(--t-muted); font-size: 12px; font-weight: 500; }
.booster-kv { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px 14px; padding: 12px 14px; border-radius: var(--radius); background: var(--t-card); }
.booster-kv dt { color: var(--t-muted); font-size: 12px; }
.booster-kv dd { font-size: 15px; font-weight: 700; }

/* ---------- The planner (/calculators, views/calculators.js): the question beside its answer ----------
   The question is the ink console; the answer is a white sheet that leads with the price and sets the route out
   as ledger entries (step, what you hold after it, what it costs) closed by a double rule and the total, as a
   ledger closes. Every other route is compared in one table below. Green says "cheaper"; crimson stays for the
   one main action and for offers that close soon. */
.planner-head { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; max-width: none; margin-bottom: 20px; }
.planner-head .standfirst { max-width: 70ch; }
.canvas > .tabs.planner-tabs, .planner-head + .tabs { margin-bottom: var(--gap); }
.pl-top { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--gap); align-items: start; }
/* The question stays in view beside a long answer, so a change of amount or program shows its effect at once. */
.pl-top > .pl-ask { position: sticky; top: calc(var(--mast-h) + 16px); }
.pl-ask {
  --t-ink: #ffffff; --t-muted: #b4bac4; --t-card: var(--ink); --t-card-2: #20232a; --t-chip: #272b33; --t-chip-hover: #343943;
  --t-line: #30353f; --t-focus: #ffffff; --t-control: #ffffff; --t-control-soft: #ffffff; --t-hot: #ff9ba6; --t-pos: #8fd6ac;
  display: flex; flex-direction: column; gap: 16px; min-width: 0; padding: 28px 32px 26px; border-radius: var(--radius); background: var(--ink); color: #ffffff;
}
.pl-ask h2 { font-size: clamp(21px, 1.8vw, 26px); line-height: 1.2; letter-spacing: -0.025em; }
.pl-q { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.pl-q .search { max-width: none; }
.pl-q .search > svg { margin-left: 16px; color: var(--muted); }
.pl-q .search input { height: 52px; padding-left: 44px; border-color: #ffffff; font-size: 17px; }
.pl-q .btn { min-height: 52px; padding: 0 22px; font-size: 16px; }
.pl-ask-msg { color: #ffd2d8; font-size: 15px; font-weight: 600; line-height: 1.45; }
.pl-ask-msg:empty { display: none; }
.pl-ask .pl-examples, .pl-ask .pl-popular { padding: 0; }
.pl-ask .pl-popular .chip { min-height: 30px; padding: 0 10px; font-size: 13px; }
.pl-ask .chip[aria-pressed="true"] { background: #ffffff; color: var(--ink); }
.pl-examples .chip { background: var(--t-chip); color: #ffffff; }
.pl-examples .chip:hover { background: var(--t-chip-hover); }
.pl-fields { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.7fr); gap: 14px 12px; align-items: end; }
.pl-fields .pl-f-prog { grid-column: 1 / -1; }
.pl-fields .field-label { color: #ffffff; }
.pl-fields .field :where(input, select) { border-color: #ffffff; }
.pl-fields .field input { font-variant-numeric: tabular-nums; }
.pl-fields .field input[aria-invalid="true"] { border-color: #ff9ba6; outline: 2px solid #ff9ba6; outline-offset: -3px; }
.pl-field-err { grid-column: 1 / -1; margin-top: -4px; color: #ffd2d8; font-size: 14px; font-weight: 600; }
.pl-field-err:empty { display: none; }
.pl-counts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 4px; padding-top: 18px; border-top: 1px solid var(--t-line); } /* taste-skill-ignore: the console's one divider sets what it counts apart from the question */
.pl-counts > div { display: flex; flex-direction: column-reverse; justify-content: flex-end; gap: 2px; min-width: 0; }
.pl-counts dt { color: var(--t-muted); font-size: 13px; line-height: 1.35; }
.pl-counts dt a { color: var(--t-muted); text-decoration: underline; text-decoration-color: #4a505c; text-underline-offset: 0.2em; }
.pl-counts dt a:hover { color: #ffffff; text-decoration-color: currentColor; }
.pl-counts dd { color: #ffffff; font-size: 24px; font-weight: 700; line-height: 1.1; letter-spacing: -0.02em; }
.pl-owned { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; color: var(--t-muted); font-size: 14px; line-height: 1.45; }
.pl-owned-typed, .pl-owned-hint { flex: 1 1 100%; }
.pl-owned-typed b { color: #ffffff; }
.pl-link { display: inline; padding: 0; border: 0; background: none; color: var(--t-ink); font: inherit; font-weight: 600; text-decoration: underline; text-underline-offset: 0.2em; cursor: pointer; }

.pl-answer { display: flex; flex-direction: column; min-width: 0; padding: 28px 32px 24px; border-radius: var(--radius); background: var(--t-card); transition: opacity 160ms var(--ease); }
.pl-top.is-working .pl-answer { opacity: 0.55; }
.pl-price-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 16px; }
.pl-price { color: var(--t-ink); font-size: 40px; font-weight: 700; line-height: 1; letter-spacing: -0.035em; white-space: nowrap; }
.pl-for { color: var(--t-ink); font-size: 18px; font-weight: 600; letter-spacing: -0.01em; }
.pl-for b { font-weight: 700; }
.pl-for-sub { display: block; margin-top: 2px; color: var(--t-muted); font-size: 14px; font-weight: 500; letter-spacing: 0; }
.pl-vs { max-width: 62ch; margin-top: 14px; color: var(--t-ink); font-family: var(--font-text); font-size: 16px; line-height: 1.5; }
.pl-vs.is-less { color: var(--positive); }
.pl-route-title { margin-top: 22px; font-size: 18px; line-height: 1.3; letter-spacing: -0.015em; }
.pl-route-title .badge { margin-left: 6px; vertical-align: 2px; }
.pl-ledger { margin-top: 10px; table-layout: auto; }
.pl-ledger th, .pl-ledger td { padding: 11px 16px 11px 0; font-size: 15px; vertical-align: top; }
.pl-ledger th:last-child, .pl-ledger td:last-child { padding-right: 0; }
.pl-ledger thead th { padding-top: 6px; padding-bottom: 6px; }
.pl-ledger td.num small { color: var(--t-muted); font-size: 13px; font-weight: 500; }
.pl-ledger td.num { white-space: normal; }
.pl-table td small { display: block; margin-top: 1px; color: var(--t-muted); font-size: 12px; font-weight: 500; white-space: normal; }
.pl-step { display: block; color: var(--t-ink); font-weight: 600; line-height: 1.35; }
.pl-note { display: block; margin-top: 2px; color: var(--t-muted); font-size: 13px; line-height: 1.4; }
.pl-ledger tbody tr:last-child td { border-bottom: 0; }
.pl-ledger tfoot th, .pl-ledger tfoot td { padding-top: 12px; border-top: 3px double var(--t-line-strong); border-bottom: 0; color: var(--t-ink); font-size: 15px; font-weight: 600; text-align: left; white-space: normal; vertical-align: top; } /* taste-skill-ignore: the ledger's closing double rule above the total */
.pl-ledger tfoot td { text-align: right; }
.pl-ledger tfoot b { font-size: 17px; font-weight: 700; }
.pl-extra { margin-top: 8px; color: var(--t-muted); font-size: 14px; line-height: 1.45; }
.pl-deals { display: grid; gap: 6px; margin-top: 16px; }
.pl-deals li { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 16px; font-size: 15px; line-height: 1.4; }
.pl-deals a { color: var(--t-ink); text-decoration: underline; text-decoration-color: var(--t-control-soft); text-underline-offset: 0.2em; }
.pl-deals a:hover { text-decoration-color: currentColor; }
.pl-deals li > span { color: var(--t-muted); font-size: 14px; white-space: nowrap; }
.pl-deals li > span.is-soon { color: var(--t-hot); font-weight: 600; }
.pl-caveat { max-width: 66ch; margin-top: 12px; color: var(--t-muted); font-size: 14px; line-height: 1.5; }
.pl-source { margin-top: auto; padding-top: 14px; }
.pl-answer .pl-source .textbtn { font-size: 15px; }
.pl-covered { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 16px; margin-top: 16px; padding: 12px 14px; border-radius: var(--radius); background: var(--positive-tint); color: var(--ink); font-size: 15px; line-height: 1.45; }
.pl-covered .pl-link { color: var(--positive); }
.pl-none { display: grid; gap: 10px; align-content: start; }
.pl-none-title { font-size: 22px; font-weight: 700; line-height: 1.2; letter-spacing: -0.02em; }
.pl-none-text { max-width: 60ch; font-family: var(--font-text); font-size: 17px; line-height: 1.5; }
.pl-ledger-sk { display: grid; gap: 14px; margin-top: 28px; }
.pl-answer .error-box { margin: 0; }

.pl-mid { display: grid; grid-template-columns: minmax(0, 8fr) minmax(300px, 4fr); gap: var(--gap); align-items: start; }
.pl-mid.no-ai { grid-template-columns: minmax(0, 1fr); }
.pl-mid > .panel + .panel { margin-top: 0; }
.pl-ai { position: sticky; top: calc(var(--mast-h) + 24px); }
.pl-compare .pl-kinds { margin: 8px var(--pad) 0; padding: 0; }
.pl-cmp-body .table-wrap { padding-top: 4px; }
.pl-table { table-layout: auto; }
.pl-table thead th { padding-top: 14px; }
.pl-table tbody { border-bottom: 1px solid var(--t-line); }
.pl-table tbody:last-child { border-bottom: 0; }
.pl-table td, .pl-table th { border-bottom: 0; }
.pl-table .pl-row > th, .pl-table .pl-row > td { padding-top: 14px; padding-bottom: 14px; font-weight: 400; vertical-align: top; }
.pl-table .pl-row > th { width: 46%; color: var(--t-ink); text-align: left; white-space: normal; }
.pl-table .pl-row > td { font-size: 16px; white-space: nowrap; }
.pl-row-btn { display: inline; padding: 0; border: 0; background: none; color: var(--t-ink); font: inherit; font-size: 16px; font-weight: 600; line-height: 1.35; text-align: left; cursor: pointer; }
.pl-row-btn::before { content: ""; display: inline-block; width: 7px; height: 7px; margin: 0 10px 2px 1px; border-right: 2px solid var(--t-muted); border-bottom: 2px solid var(--t-muted); transform: rotate(-45deg); transition: transform 160ms var(--ease); }
.pl-row-btn[aria-expanded="true"]::before { transform: rotate(45deg); }
.pl-row-btn:hover { text-decoration: underline; text-underline-offset: 0.2em; }
.pl-row-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin: 6px 0 0 19px; color: var(--t-muted); font-size: 13px; }
.pl-table tbody.is-lead .pl-row-btn { color: var(--positive); }
.pl-detail > td { padding: 2px 0 22px 19px; }
.pl-detail .pl-ledger { max-width: 760px; margin-top: 0; }
.pl-detail .pl-deals, .pl-detail .pl-source, .pl-detail .pl-caveat { max-width: 760px; }
.pl-detail .pl-source { margin-top: 0; padding-top: 10px; }
.pl-empty { margin: 8px var(--pad) var(--pad); padding: 16px 18px; border-radius: var(--radius); background: var(--t-card-2); color: var(--t-ink); font-family: var(--font-text); font-size: 16px; line-height: 1.5; }
.pl-verify { max-width: 96ch; }

.pl-ai-body { display: grid; gap: 16px; padding: 10px var(--pad) var(--pad); }
.pl-ai-lede { max-width: 66ch; font-family: var(--font-text); font-size: 17px; line-height: 1.5; }
.pl-ai-out:empty { display: none; }
.pl-ai-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; }
.pl-ai-left { color: var(--t-muted); font-size: 14px; }
.pl-ai-wait { color: var(--t-muted); font-family: var(--font-text); font-size: 16px; }
.pl-ai-problem { max-width: 66ch; padding: 12px 14px; border-radius: var(--radius); background: var(--t-card-2); font-size: 15px; line-height: 1.5; }
.pl-brief { display: grid; gap: 10px; max-width: 72ch; padding: 18px 20px; border-radius: var(--radius); background: var(--t-card-2); }
.pl-brief h3 { font-size: 19px; line-height: 1.25; letter-spacing: -0.015em; }
.pl-brief p { font-family: var(--font-text); font-size: 17px; line-height: 1.55; }
.pl-brief-watch b { font-family: var(--font-ui); font-weight: 600; }
.pl-brief .pl-brief-meta { color: var(--t-muted); font-family: var(--font-ui); font-size: 13px; }

@media (max-width: 1100px) {
  .pl-top, .pl-mid { grid-template-columns: minmax(0, 1fr); }
  .pl-top > .pl-ask { position: static; }
  .pl-answer .pl-source { margin-top: 0; }
  .pl-ai { position: static; }
}
@media (max-width: 640px) {
  .pl-ask { gap: 14px; padding: 22px 16px 20px; }
  .pl-q { grid-template-columns: minmax(0, 1fr); }
  .pl-q .btn { width: 100%; }
  .pl-q .search input { height: 52px; font-size: 16px; }
  .pl-ask .pl-popular .chip { min-height: 40px; }
  .pl-counts { display: none; } /* on a phone the answer comes first; the counts stay on wider screens */
  .pl-answer { padding: 22px 16px 20px; }
  .pl-price { font-size: 34px; }
  .pl-for { font-size: 17px; }
  .pl-ledger thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .pl-ledger th, .pl-ledger td { font-size: 14px; }
  .pl-ledger td:first-child { padding-right: 10px; }
  .pl-compare .pl-kinds { margin: 4px 16px 0; }
  .pl-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .pl-table, .pl-table tbody, .pl-table tr { display: block; width: 100%; }
  .pl-table .pl-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 16px; padding: 14px 0; }
  .pl-table .pl-row > th { grid-column: 1 / -1; width: auto; padding: 0; }
  .pl-table .pl-row > td { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding: 0; text-align: right; white-space: nowrap; }
  .pl-table .pl-row > td::before { content: attr(data-short); color: var(--t-muted); font-size: 13px; font-weight: 500; text-align: left; }
  .pl-table .pl-row > td small { display: inline; margin: 0 0 0 4px; }
  .pl-table .pl-detail { display: block; }
  .pl-table .pl-detail[hidden] { display: none; }
  .pl-table .pl-detail > td { display: block; padding: 0 0 16px; }
  .pl-row-meta { margin-left: 19px; }
  .pl-ai-body { padding: 8px 16px 18px; }
  .pl-brief { padding: 16px; }
}

/* ---------- Forms ---------- */
.field { display: grid; gap: 6px; min-width: 0; margin: 0; padding: 0; border: 0; }
.field-label { color: var(--t-ink); font-size: 14px; font-weight: 600; }
legend.field-label { margin-bottom: 6px; padding: 0; }
.field-hint, .field-note { color: var(--t-muted); font-size: 13px; line-height: 1.45; }
.field :where(input:not([type="checkbox"], [type="radio"]), select, textarea) {
  width: 100%; min-height: var(--ctl); padding: 8px 12px; border: 1px solid var(--t-control); border-radius: var(--radius);
  background-color: var(--t-input); color: var(--t-input-ink); font-size: 16px; line-height: 1.4; transition: border-color 150ms var(--ease);
}
.field :where(select) {
  padding-right: 34px; appearance: none;
  background: var(--t-input) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M3 4.5l3 3 3-3' fill='none' stroke='%2314161b' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 12px center;
}
.field :where(input, select, textarea):hover { border-color: var(--t-ink); }
.field :where(select:disabled) { cursor: not-allowed; color: var(--t-muted); background-color: var(--t-card-2); }
.field input[aria-invalid="true"] { border-color: var(--t-hot); outline: 1px solid var(--t-hot); outline-offset: -2px; }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible, .search input:focus-visible, .select:focus-visible { border-color: var(--t-focus); outline: 2px solid var(--t-focus); outline-offset: 0; }
.field-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.field-trio { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
input[type="checkbox"], input[type="radio"] { flex: none; width: 18px; height: 18px; margin: 0; accent-color: var(--accent); }
.checks { display: grid; gap: 2px; }
.checks label { display: flex; align-items: center; gap: 10px; min-height: 40px; font-size: 15px; cursor: pointer; }
.form-error { color: var(--t-hot); font-size: 14px; font-weight: 600; }
.form-error:empty { display: none; }
.form-done { padding: 16px 18px; border-radius: var(--radius); background: var(--positive-tint); color: var(--positive); font-family: var(--font-text); font-size: 17px; line-height: 1.5; }

/* ---------- Editorial pages (/about, /methodology, /disclosure, /contact, /privacy, /terms) ----------
   The text sheet is sized to its measure, the rail sits at the far edge and stays in view. */
.prose-split { display: grid; grid-template-columns: minmax(0, 800px) minmax(280px, 340px); justify-content: space-between; gap: var(--gap) clamp(24px, 4vw, 64px); align-items: start; }
.prose-split > .rail { position: sticky; top: calc(var(--mast-h) + 24px); }
.prose { padding: 40px clamp(24px, 3.4vw, 48px) 44px; }
.toc ol { display: grid; padding: 6px var(--pad) 18px; }
.toc a { display: block; padding: 6px 0; color: var(--t-ink); font-size: 15px; font-weight: 500; line-height: 1.35; }
.toc a:hover { text-decoration: underline; text-underline-offset: 0.2em; }
.toc a[aria-current="true"] { color: var(--accent-text); font-weight: 600; }
.rail-links { display: grid; padding: 4px var(--pad) 18px; }
.rail-links a { display: inline-flex; align-items: center; min-height: 36px; font-size: 15px; font-weight: 600; text-decoration: underline; text-decoration-color: var(--t-control-soft); text-underline-offset: 0.2em; }
.rail-links a:hover { text-decoration-color: currentColor; }
.prose h2 { margin-top: 36px; font-size: 22px; line-height: 1.2; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin-top: 24px; font-size: 18px; line-height: 1.3; letter-spacing: -0.01em; }
.prose h2 + h3 { margin-top: 12px; }
.prose p, .prose li { max-width: 68ch; font-family: var(--font-text); font-size: 18px; line-height: 1.6; }
.prose p + p, .prose h2 + p, .prose h3 + p, .prose p + ul, .prose h2 + ul, .prose ul + p, .prose h2 + table, .prose p + table, .prose table + h2 { margin-top: 14px; }
.prose h3 + p { margin-top: 8px; }
.prose ul { display: grid; gap: 10px; }
.prose li { position: relative; padding-left: 20px; }
.prose li::before { content: ""; position: absolute; left: 2px; top: 0.66em; width: 6px; height: 6px; background: var(--accent); }
.prose a:not(.btn):not(.textbtn) { text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 0.18em; }
.prose a[href^="http"] { overflow-wrap: anywhere; }
.prose blockquote { max-width: 66ch; margin: 14px 0 0; padding: 16px 20px; background: var(--t-card-2); font-family: var(--font-text); font-size: 17px; font-style: italic; line-height: 1.55; }
.prose table { margin-top: 14px; }
.prose .fine-date { color: var(--t-muted); font-family: var(--font-ui); font-size: 14px; }
.prose .btn { margin-top: 4px; }
.prose-figure { margin: -40px calc(-1 * clamp(24px, 3.4vw, 48px)) 36px; }
.prose-figure img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.prose-figure figcaption { padding: 10px clamp(24px, 3.4vw, 48px) 0; color: var(--t-muted); font-size: 14px; line-height: 1.45; }
.prose .prose-figure + h2 { margin-top: 0; }

/* =====================================================================
   HOME: a printed front page with the live ledger beside the headline
   ===================================================================== */
.home { display: block; }
.band { padding-block: clamp(72px, 8vw, 128px); }
.band-tight { padding-top: 0; }
.band-inner { max-width: var(--maxw); margin-inline: auto; padding-inline: var(--margin); }
.band-head { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 16px 48px; align-items: end; margin-bottom: 40px; }
.band-head h2 { grid-column: 1 / -1; max-width: 20ch; font-size: clamp(32px, 3.6vw, 54px); line-height: 1.02; letter-spacing: -0.04em; }
.band-head > .band-deck { grid-column: 2; }
.band-deck { max-width: 56ch; color: var(--t-ink); font-family: var(--font-text); font-size: clamp(17px, 1.3vw, 20px); line-height: 1.5; }
.band-head-row { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 20px 48px; }
.band-head-row > div { display: grid; gap: 14px; max-width: 780px; }
.band-head-row h2 { max-width: none; }
.sub-head { margin-bottom: 14px; font-size: 20px; line-height: 1.2; letter-spacing: -0.02em; }

/* ---------- Hero: title and search on the left, the live ledger on the right, a photo band below ---------- */
.hero { padding: clamp(28px, 3.6vw, 56px) 0 0; }
.hero-grid {
  max-width: var(--maxw); margin-inline: auto; padding-inline: var(--margin);
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); grid-template-rows: auto auto auto 1fr auto;
  grid-template-areas: "title panel" "deck panel" "search panel" "ctas panel" "mosaic mosaic";
  column-gap: clamp(32px, 4.4vw, 72px);
}
.hero-talk { display: contents; }
.hero-title-wrap { grid-area: title; container-type: inline-size; }
.hero-title { font-size: 10.4cqi; line-height: 0.95; letter-spacing: -0.045em; }
.lines .line { display: block; overflow: hidden; padding-bottom: 0.1em; margin-bottom: -0.1em; }
.lines [data-line] { display: block; white-space: nowrap; }
.hero-deck { grid-area: deck; max-width: 46ch; margin-top: 24px; font-size: clamp(18px, 1.4vw, 20px); line-height: 1.45; }
.hero-search { grid-area: search; display: flex; max-width: 580px; margin-top: 28px; }
.hero-search .search { flex: 1 1 auto; max-width: none; }
.hero-search .search input { height: 52px; padding-left: 44px; border-right-width: 0; border-radius: var(--radius) 0 0 var(--radius); font-size: 17px; }
.hero-search .search > svg { margin-left: 15px; }
.hero-search .btn { --b-bg: var(--ink); --b-ink: #ffffff; --b-line: var(--ink); min-height: 52px; padding: 0 22px; border-radius: 0 var(--radius) var(--radius) 0; }
.hero-search .btn:hover { --b-bg: var(--ink-2); --b-line: var(--ink-2); }
.hero-ctas { grid-area: ctas; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px; margin-top: 18px; }
.hero-ctas .btn-lg { min-height: 48px; }
.hero-ctas .btn-ghost { --b-bg: transparent; --b-line: transparent; min-height: 44px; padding: 0 2px; text-decoration: underline; text-decoration-color: var(--t-control-soft); text-underline-offset: 0.25em; text-decoration-thickness: 2px; }
.hero-ctas .btn-ghost:hover { --b-line: transparent; text-decoration-color: var(--accent); }
.hero-panel { grid-area: panel; align-self: start; margin-top: 4px; padding: 18px 20px 6px; border-radius: var(--radius); background: var(--t-card); }
.hp-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.hp-head h2 { font-size: 20px; line-height: 1.3; letter-spacing: -0.01em; }
.hp-head .textbtn { font-size: 14px; }
[data-ui].hp-rows > li { border-top: 1px solid var(--t-line-strong); }
[data-ui].hp-rows > li:first-child { border-top: 0; }
.hp-rows a { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr) auto; align-items: center; gap: 12px; min-height: 46px; padding: 6px 0; font-size: 16px; }
.hp-rows a:hover { text-decoration: none; }
.hp-rows a:hover .hp-name { text-decoration: underline; text-underline-offset: 0.2em; }
.hp-rows > li:not(:has(> a)):not(.hp-msg) { display: flex; align-items: center; gap: 16px; min-height: 46px; }
.hp-name { overflow: hidden; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.hp-metric { overflow: hidden; font-weight: 500; text-align: right; text-overflow: ellipsis; white-space: nowrap; }
.hp-due { color: var(--t-muted); font-size: 14px; text-align: right; white-space: nowrap; }
.hp-due.is-soon { color: var(--t-hot); font-weight: 600; }
.hp-msg .error-box { margin: 8px 0 12px; }
.hero-mosaic { grid-area: mosaic; display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 3fr) minmax(0, 3fr); height: clamp(240px, 24vw, 340px); margin-top: clamp(40px, 4.4vw, 72px); }
.hero-mosaic figure { margin: 0; overflow: clip; background: var(--paper-2); }
.hm-c { display: flex; flex-direction: column; justify-content: flex-end; min-width: 0; padding: clamp(20px, 2.2vw, 32px); background: var(--accent); color: #ffffff; }
.hm-num { font-size: clamp(44px, 3.9vw, 56px); font-weight: 700; line-height: 0.86; letter-spacing: -0.05em; }
.hm-cap { margin-top: 10px; font-size: clamp(17px, 1.4vw, 20px); font-weight: 600; letter-spacing: -0.01em; }
.hm-sub { margin-top: 4px; color: #fde3e6; font-family: var(--font-text); font-size: 16px; }

/* ---------- Coverage: photo and figures butted together ---------- */
.board-mosaic { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: minmax(248px, auto); gap: 2px; }
.bm-photo { grid-column: 1 / 3; grid-row: 1 / 3; margin: 0; overflow: clip; }
.bm-tile { display: flex; flex-direction: column; gap: 6px; padding: clamp(20px, 2vw, 28px); background: var(--white); color: var(--ink); transition: background-color 180ms var(--ease); }
.bm-tile:hover { text-decoration: none; background: #f8f9fa; }
.bm-tile.is-grey { background: var(--paper-2); }
.bm-tile.is-grey:hover { background: #dce0e5; }
.bm-tile.is-accent { background: var(--accent); color: #ffffff; }
.bm-tile.is-accent:hover { background: var(--accent-hover); }
.bm-num { display: flex; align-items: baseline; gap: 8px; margin-bottom: auto; font-size: clamp(40px, 3.9vw, 56px); font-weight: 700; line-height: 0.95; letter-spacing: -0.045em; }
.bm-num small { color: var(--muted); font-size: 15px; font-weight: 600; letter-spacing: 0; }
.bm-name { margin-top: 18px; font-size: 20px; font-weight: 700; line-height: 1.15; letter-spacing: -0.025em; }
.bm-tile:not(:has(.bm-num)) .bm-name { margin-top: auto; }
.bm-text { color: var(--ink-2); font-family: var(--font-text); font-size: 17px; line-height: 1.45; }
.bm-tile.is-accent small, .bm-tile.is-accent .bm-text { color: #fde3e6; }
.bm-tile:hover .bm-name { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.18em; }

/* ---------- Live board: the departures board of deals ---------- */
.live-board { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.lb-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; min-width: 0; }
.lb-tools .tabs { flex: 1 1 auto; min-width: 0; padding: 0; box-shadow: none; } /* taste-skill-ignore: removes the rule */
.lb-tools .search { flex: 0 1 340px; }
.board-rows { display: grid; gap: 4px; }
.board-row { overflow: clip; border-radius: var(--radius); background: var(--white); color: var(--ink); transition: background-color 200ms var(--ease); }
.br-head {
  display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 2.4fr) minmax(0, 1.1fr) minmax(0, 1.3fr) 132px; align-items: center; gap: 20px;
  width: 100%; min-height: 68px; padding: 0 0 0 24px; border: 0; background: none; color: inherit; font: inherit; text-align: left;
}
.br-head:hover .br-name { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.18em; }
.br-head:focus-visible { outline-offset: -3px; }
.br-name { overflow: hidden; font-size: clamp(18px, 1.4vw, 20px); font-weight: 700; letter-spacing: -0.025em; text-overflow: ellipsis; white-space: nowrap; }
.br-metric { overflow: hidden; font-size: 17px; font-weight: 600; letter-spacing: -0.015em; text-overflow: ellipsis; white-space: nowrap; }
.br-cat { color: var(--muted); font-size: 14px; }
.br-due { font-size: 15px; font-weight: 600; line-height: 1.3; }
.br-due .due { font-weight: 500; }
.br-status { display: flex; align-self: stretch; align-items: center; justify-content: center; padding: 0 12px; background: #eceef2; color: var(--muted); font-size: 14px; font-weight: 700; text-align: center; }
.br-status.v-all_time_high { background: var(--accent); color: #ffffff; }
.br-status.v-rare { background: var(--ink); color: #ffffff; }
.br-status.v-strong { background: var(--positive-tint); color: var(--positive); }
.br-status.v-skip { background: var(--warning-tint); color: var(--warning); }
.board-row.is-open { --t-focus: #ffffff; background: var(--accent); color: #ffffff; }
.board-row.is-open .br-cat, .board-row.is-open .due { color: #fde3e6; }
.board-row.is-open .br-status { background: var(--ink); color: #ffffff; }
.br-detail { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px 48px; align-items: end; padding: 2px 24px 24px; }
.br-title { grid-column: 1; font-size: 20px; font-weight: 700; line-height: 1.3; letter-spacing: -0.015em; }
.br-sum { grid-column: 1; max-width: 62ch; font-family: var(--font-text); font-size: 17px; line-height: 1.55; }
.br-actions { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; grid-column: 2; grid-row: 1 / span 2; }
.board-row.is-open .textbtn, .board-row.is-open .textbtn svg { color: #ffffff; }
.board-row.is-open .btn-ink { --b-bg: #ffffff; --b-ink: var(--ink); }
.board-row.is-open .btn-ink:hover { --b-bg: #f3e1e3; }
.board-row.is-sk .br-head { grid-template-columns: 2fr 2.4fr 1.1fr 1.3fr; padding-right: 24px; }
.board-msg .empty, .board-msg .error-box { margin: 0; }
.board-msg .empty { background: var(--white); }

/* ---------- Guides magazine ---------- */
.mag { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 48px; align-items: start; }
.mag-lead { display: grid; gap: 24px; }
.mag-figure { aspect-ratio: 4 / 3; margin: 0; overflow: clip; }
.mag-lead-body { display: grid; gap: 12px; justify-items: start; }
.mag-title { font-size: clamp(24px, 2.1vw, 30px); font-weight: 700; line-height: 1.12; letter-spacing: -0.03em; }
.mag-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; color: var(--t-muted); font-size: 14px; }
.mag-deck { color: var(--t-ink); font-family: var(--font-text); font-size: 17px; line-height: 1.5; }
.mag-cost { color: var(--t-muted); font-family: var(--font-text); font-size: 17px; font-style: italic; line-height: 1.5; }
.mag-list { display: grid; gap: 2px; }
.mag-list > li { display: grid; gap: 10px; }
.mag-item { display: grid; gap: 8px; padding: 22px 24px; background: var(--t-card); transition: background-color 160ms var(--ease); }
.mag-item:hover { text-decoration: none; background: var(--t-card-2); }
.mag-item:hover .mag-item-title { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
.mag-item-title { display: -webkit-box; overflow: hidden; font-size: 20px; font-weight: 700; line-height: 1.22; letter-spacing: -0.02em; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.mag-item .mag-deck { display: -webkit-box; overflow: hidden; font-size: 17px; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.mag-list > li .sk { display: block; margin: 8px 0; }

/* ---------- Tools: stacks and the quick price check ---------- */
.tools-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 48px; align-items: start; }
.tools-main { display: grid; }
.stack-cards { display: grid; gap: 4px; }
.stack-card { display: grid; gap: 12px; padding: 22px 24px; border-radius: var(--radius); background: var(--t-card); transition: background-color 150ms var(--ease); }
a.stack-card:hover { text-decoration: none; background: #f8f9fa; }
a.stack-card:hover .sc-label { text-decoration: underline; text-underline-offset: 0.18em; }
.sc-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.sc-label { font-size: 20px; font-weight: 700; line-height: 1.2; letter-spacing: -0.02em; }
.sc-count { flex: none; color: var(--t-muted); font-size: 14px; font-weight: 600; }
.sc-deals { display: flex; flex-wrap: wrap; gap: 6px; }
.sc-deals > span { display: inline-flex; gap: 6px; padding: 5px 9px; border-radius: var(--radius); background: var(--t-chip); font-size: 14px; }
.sc-close { color: var(--t-hot); font-size: 14px; font-weight: 700; }
.sc-more { justify-self: start; margin-top: 16px; }
.quick-calc { position: sticky; top: calc(var(--mast-h) + 24px); padding: 28px; border-radius: var(--radius); background: var(--white); color: var(--ink); }
.quick-calc h3 { margin-bottom: 20px; font-size: 24px; line-height: 1.15; letter-spacing: -0.03em; }
.qc-form { display: grid; gap: 14px; }
.qc-out { min-height: 232px; margin-top: 22px; transition: opacity 150ms var(--ease); }
.qc-out.is-loading { opacity: 0.55; }
.qc-big { display: flex; align-items: baseline; gap: 10px; color: var(--t-hot); font-size: clamp(44px, 3.9vw, 56px); font-weight: 700; line-height: 0.92; letter-spacing: -0.05em; }
.qc-big small { color: var(--muted); font-size: 15px; font-weight: 600; letter-spacing: 0; }
.qc-line { margin-top: 14px; font-family: var(--font-text); font-size: 17px; line-height: 1.5; }
.qc-line b { font-family: var(--font-ui); font-weight: 700; }
.qc-bullet { margin-top: 18px; }
.qc-verdict { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 16px; font-size: 15px; }
.qc-more { margin-top: 18px; }
.qc-lede { margin-bottom: 18px; font-family: var(--font-text); font-size: 17px; line-height: 1.5; }
.quick-calc .error-box, .quick-calc .fine { margin: 0; padding: 0; }

/* ---------- The planner, offered on the home page: one crimson field ---------- */
.crimson-band {
  --t-ground: var(--accent); --t-card: #9d1426; --t-card-2: #8a1121; --t-chip: #9d1426; --t-chip-hover: #86101f;
  --t-ink: #ffffff; --t-muted: #fde3e6; --t-line: #c9475a; --t-control: #ffffff; --t-hot: #ffffff; --t-focus: #ffffff;
  background: var(--accent); color: #ffffff;
}
.planner-teaser { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 28px 64px; align-items: end; }
.pt-copy { display: grid; gap: 16px; }
.pt-copy h2 { max-width: 16ch; font-size: clamp(32px, 3.6vw, 54px); line-height: 1.02; letter-spacing: -0.04em; }
.pt-copy .band-deck { color: #ffffff; }
.pt-tool { display: grid; gap: 14px; min-width: 0; }
.pt-form { display: flex; min-width: 0; }
.pt-form .search { flex: 1 1 auto; max-width: none; }
.pt-form .search > svg { margin-left: 16px; color: var(--muted); }
.pt-form .search input { height: 56px; padding-left: 46px; border: 0; border-radius: var(--radius) 0 0 var(--radius); font-size: 18px; }
.pt-form .btn { min-height: 56px; padding: 0 24px; border-radius: 0 var(--radius) var(--radius) 0; font-size: 16px; }
.pt-examples { padding: 0; }
.pt-examples .chip { background: var(--t-chip); color: #ffffff; }
.pt-examples .chip:hover { background: var(--t-chip-hover); }
.pt-answer { max-width: 62ch; min-height: 76px; padding: 16px 18px; border-radius: var(--radius); background: var(--t-card-2); font-family: var(--font-text); font-size: 17px; line-height: 1.5; }
.pt-answer strong { font-family: var(--font-ui); font-weight: 700; }
.pt-answer a { text-decoration: underline; text-underline-offset: 0.2em; }

/* ---------- Alerts: the close, inverted ---------- */
.alerts-grid { display: grid; gap: 40px; }
.alerts-title-wrap { container-type: inline-size; }
.alerts-title { max-width: 18ch; color: #ffffff; font-size: clamp(34px, 5.1vw, 73px); line-height: 0.98; letter-spacing: -0.045em; }
.alerts-title > span { display: inline; }
.alerts-inline { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 20px 48px; align-items: end; padding: 28px 32px; border-radius: var(--radius); background: var(--t-card); }
.alerts-deck { max-width: 38ch; color: var(--t-muted); font-family: var(--font-text); font-size: clamp(17px, 1.3vw, 19px); line-height: 1.5; }
.ai-row { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) auto; gap: 12px; align-items: end; }
.alerts-inline .field-label { color: #ffffff; }
.alerts-inline .field :where(input, select) { min-height: 48px; border-color: #ffffff; }
.alerts-inline .btn { min-height: 48px; padding: 0 24px; font-size: 16px; }
.alerts-inline .form-error { grid-column: 2; color: var(--t-hot); }
.alerts-inline .pl-human { grid-column: 2; }
.alerts-inline .field input[aria-invalid="true"] { border-color: #ff9ba6; outline: 2px solid #ff9ba6; outline-offset: -3px; }
.alerts-done { grid-column: 1 / -1; max-width: 46ch; color: #ffffff; font-family: var(--font-text); font-size: clamp(19px, 1.6vw, 24px); line-height: 1.4; }
.alerts-done:focus { outline: none; }

/* ---------- Footer: the name first ---------- */
.foot { overflow: clip; padding: clamp(56px, 6vw, 96px) 0 32px; background: var(--white); color: var(--ink); }
.foot-name { max-width: var(--maxw); margin: 0 auto; padding-inline: var(--margin); color: var(--ink); font-size: min(17.4vw, 236px); font-weight: 700; line-height: 0.92; letter-spacing: -0.06em; white-space: nowrap; }
.foot-grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 32px 48px; align-items: start; max-width: var(--maxw); margin: clamp(40px, 5vw, 72px) auto 0; padding-inline: var(--margin); }
.foot-line { max-width: 30ch; font-family: var(--font-text); font-size: 19px; line-height: 1.45; }
/* Four short columns, each named for what it holds; the links keep the main navigation's labels. */
.foot-nav { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px 32px; }
.foot-h { margin-bottom: 6px; color: var(--muted); font-size: 14px; font-weight: 600; line-height: 1.3; letter-spacing: 0; }
.foot-col ul { display: grid; }
.foot-col a, .foot-btn { display: inline-flex; align-items: center; min-height: 34px; font-size: 15px; font-weight: 600; line-height: 1.25; }
.foot-btn { padding: 0; border: 0; background: none; color: inherit; text-align: left; }
.foot-btn:hover { text-decoration: underline; }
.foot-btn[hidden] { display: none; }

/* Cookie choice for Google Analytics (static/js/consent.js): a strip above the masthead, shown only where the law
   asks for consent first. In the page flow rather than fixed, so it never covers what the visitor reads. */
.pl-consent { background: var(--paper-2); color: var(--ink); font-size: var(--fs-ui); line-height: 1.45; }
.pl-consent[hidden] { display: none; }
.pl-consent-in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 24px; max-width: var(--maxw); margin: 0 auto; padding: 12px var(--margin); }
.pl-consent-text { margin: 0; }
.pl-consent-text a { font-weight: 600; }
.pl-consent-actions { display: grid; grid-template-columns: repeat(2, minmax(112px, 1fr)); gap: 8px; }
@media (max-width: 560px) { .pl-consent-actions { width: 100%; } }
.foot-base { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px 48px; max-width: var(--maxw); margin: clamp(48px, 5vw, 72px) auto 0; padding-inline: var(--margin); }
.credits { max-width: 62ch; color: var(--muted); font-size: 14px; line-height: 1.55; }
.credits a { color: var(--ink); text-decoration: underline; text-underline-offset: 0.2em; }
.foot-row { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin-top: 12px; color: var(--muted); font-size: 14px; }
.foot-row a { display: inline-flex; align-items: center; min-height: 36px; color: var(--ink); font-weight: 600; }

/* ---------- Dialogs and toast ---------- */
.sheet { width: min(560px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); padding: 0; border: 0; border-radius: 4px; background: var(--white); color: var(--ink); box-shadow: 0 24px 64px rgba(20, 22, 27, 0.24); } /* taste-skill-ignore: a dialog floats */
.sheet::backdrop { background: rgba(20, 22, 27, 0.5); }
.sheet-body { display: grid; gap: 18px; padding: 24px 28px 28px; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.sheet-head h2 { font-size: 24px; line-height: 1.15; letter-spacing: -0.03em; }
.sheet-lede { color: var(--ink); font-family: var(--font-text); font-size: 17px; line-height: 1.5; }
.sheet-foot { display: flex; justify-content: flex-end; gap: 8px; }
.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 90; max-width: calc(100vw - 32px); padding: 12px 16px; border-radius: 4px;
  background: var(--ink); color: #ffffff; font-size: 14px; font-weight: 600; opacity: 0; pointer-events: none; transform: translate(-50%, 16px);
  box-shadow: 0 12px 32px rgba(20, 22, 27, 0.25); transition: opacity 180ms var(--ease), transform 180ms var(--ease); /* taste-skill-ignore: the toast floats */
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Advertising: labelled, height reserved, never inside a table or a form ---------- */
.ad-unit { display: block; margin-top: var(--gap); padding: 10px 16px 16px; border-radius: var(--radius); background: var(--t-card-2); contain: layout; }
.ad-unit.in-panel { margin: 8px var(--pad) 16px; }
.ad-label { margin: 0 0 10px; color: var(--t-muted); font-family: var(--font-ui); font-size: 13px; font-weight: 500; line-height: 1.3; }
.ad-slot { display: block; width: 100%; min-height: 280px; }
.article-body .ad-unit { max-width: none; margin-block: 2.2em; font-family: var(--font-ui); }
.ad-unit:has(ins[data-ad-status="unfilled"]) { display: none; }
.ledger-cont thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Without JavaScript: the crawlable summary sits between the header and the footer ---------- */
html:not(.js) body { display: flex; flex-direction: column; }
html:not(.js) main { display: none; }
html:not(.js) noscript { order: 2; }
html:not(.js) .foot { order: 3; }
.pl-ssr-noscript { max-width: 860px; margin: 0 auto; padding: 40px var(--margin) 72px; font-family: var(--font-text); font-size: 17px; line-height: 1.55; }
.pl-ssr-noscript h1 { margin-bottom: 12px; font-size: 32px; letter-spacing: -0.03em; }
.pl-ssr-noscript h2 { margin: 28px 0 10px; font-size: 22px; }
.pl-ssr-noscript li { margin-top: 8px; }
.pl-ssr-noscript a { text-decoration: underline; text-underline-offset: 0.18em; }

/* =====================================================================
   MOTION: the masked headline, one entrance per home section, feedback on controls.
   Hidden starting states exist only with JavaScript and when motion is welcome.
   ===================================================================== */
@media (prefers-reduced-motion: no-preference) {
  .js .lines [data-line] { animation: line-up 900ms var(--ease-out) both; animation-delay: calc(var(--i, 0) * 110ms + 60ms); }
  .js .hero-deck, .js .hero-search, .js .hero-ctas, .js .hero-panel, .js .hero-mosaic { animation: fade-up 760ms var(--ease-out) both; }
  .js .hero-deck { animation-delay: 280ms; }
  .js .hero-search { animation-delay: 340ms; }
  .js .hero-ctas { animation-delay: 400ms; }
  .js .hero-panel { animation-delay: 360ms; }
  .js .hero-mosaic { animation-delay: 480ms; }
  @keyframes line-up { from { transform: translateY(105%); } to { transform: none; } }
  @keyframes fade-up { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
  @keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

  .js .reveal { opacity: 0; transform: translateY(24px); transition: opacity 700ms var(--ease-out), transform 700ms var(--ease-out); }
  .js .reveal.is-in { opacity: 1; transform: none; }
  .band-head > .reveal:nth-child(2), .mag > .reveal:nth-child(2), .tools-grid > .reveal:nth-child(2), .alerts-grid > .reveal:nth-child(2) { transition-delay: 90ms; }
  .band-head > .reveal:nth-child(3) { transition-delay: 160ms; }
  .board-mosaic > .reveal:nth-child(3n + 2) { transition-delay: 80ms; }
  .board-mosaic > .reveal:nth-child(3n) { transition-delay: 160ms; }
  .board-mosaic > .reveal:nth-child(3n + 4) { transition-delay: 240ms; }

  .hm-a .photo { animation: drift 28s ease-in-out infinite alternate; transform-origin: 60% 40%; }
  @keyframes drift { from { transform: scale(1.02); } to { transform: scale(1.1) translate3d(-1.5%, -1%, 0); } }
  .mag-figure .photo, .bm-photo .photo { transition: transform 1200ms var(--ease-out); }
  .mag-lead:hover .mag-figure .photo, .board-mosaic:hover .bm-photo .photo { transform: scale(1.035); }
  .sheet[open] { animation: fade-up 220ms var(--ease-out); }
  .br-detail:not([hidden]) { animation: fade-in 320ms var(--ease-out); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-delay: 0ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; scroll-behavior: auto !important; }
}

/* =====================================================================
   RESPONSIVE
   ===================================================================== */
@media (pointer: coarse) {
  :root { --ctl: 44px; }
}

@media (max-width: 1180px) {
  .nav {
    position: fixed; inset: var(--mast-h) 0 0 0; z-index: 39; display: none; flex-direction: column; align-items: stretch; gap: 0;
    padding: 8px var(--margin) 32px; overflow-y: auto; background: var(--white);
  }
  .nav.is-open { display: flex; }
  .nav > a { min-height: 54px; padding: 0; color: var(--ink); font-size: 20px; font-weight: 600; letter-spacing: -0.02em; }
  .nav > a[aria-current="page"] { color: var(--accent); }
  .nav > a[aria-current="page"]::after { content: none; }
  .nav-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
  .nav-actions .btn { min-height: 48px; padding: 0 20px; font-size: 16px; }
  .nav-actions .btn-primary { display: none; } /* "Deal alerts" stays in the bar above the open menu */
  .nav-more { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; max-width: 460px; margin-top: 28px; }
  .nav-more a { display: flex; align-items: center; min-height: 44px; color: var(--muted); font-size: 16px; font-weight: 600; }
  .nav-more a:hover, .nav-more a[aria-current="page"] { color: var(--ink); }
  .bar-actions .btn-quiet { display: none; }
  .bar-actions .menu-toggle { display: inline-flex; }
  body.menu-open { overflow: hidden; }
}

@media (max-width: 1100px) {
  .split, .prose-split { grid-template-columns: minmax(0, 1fr); }
  .prose-split > .rail { position: static; }
  .toc { display: none; }
  .guide-feature { grid-template-columns: minmax(0, 1fr); }
  .guide-row { grid-template-columns: minmax(0, 1fr) minmax(0, 13em) minmax(0, 9em); }
  .gr-text { grid-column: 1 / -1; }
  .gr-status { grid-column: 3; grid-row: 2; }
  .rail { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .calc, .stack { grid-template-columns: minmax(0, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .strip { --cells: 3 !important; }
  .strip > div:last-child:nth-child(3n + 2) { grid-column: span 2; }

  .hero-grid { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; grid-template-areas: "title" "deck" "search" "ctas" "panel" "mosaic"; }
  .hero-title { font-size: 10.2cqi; }
  .hero-panel { margin-top: 36px; }
  .hero-mosaic { height: clamp(220px, 34vw, 320px); margin-top: 48px; }
  .band-head { grid-template-columns: minmax(0, 1fr); }
  .band-head > .band-deck { grid-column: 1; }
  .board-mosaic { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: minmax(220px, auto); }
  .bm-photo { grid-column: 1 / -1; grid-row: auto; aspect-ratio: 16 / 9; }
  .br-head { grid-template-columns: minmax(0, 1.6fr) minmax(0, 2fr) minmax(0, 1.2fr) 116px; }
  .br-cat { display: none; }
  .board-row.is-sk .br-head { grid-template-columns: 1.6fr 2fr 1.2fr; }
  .mag { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .mag-lead { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: end; gap: 32px; }
  .tools-grid { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .quick-calc { position: static; }
  .alerts-inline { grid-template-columns: minmax(0, 1fr); }
  .alerts-inline .form-error, .alerts-inline .pl-human { grid-column: 1; }
  .planner-teaser { grid-template-columns: minmax(0, 1fr); }
  .foot-grid { grid-template-columns: minmax(0, 1fr); }
  .foot-nav { grid-template-columns: repeat(4, minmax(0, max-content)); column-gap: clamp(32px, 6vw, 64px); }
  .article-card.is-lead, .article-card.lg { grid-template-columns: minmax(0, 1fr); }
  .article-card.is-lead > *, .article-card.lg > * { grid-column: 1 !important; grid-row: auto !important; }
}

@media (max-width: 860px) {
  :root { --ctl: 44px; }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rail { grid-template-columns: minmax(0, 1fr); }

  .ledger { table-layout: auto; }
  .ledger colgroup, .ledger thead { display: none; }
  .ledger, .ledger tbody, .ledger tr, .ledger td { display: block; width: 100%; }
  .ledger tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 16px; padding: 18px 0; border-bottom: 1px solid var(--t-line); }
  .ledger tbody tr:last-child { border-bottom: 0; }
  .ledger td { padding: 0; border: 0; }
  .ledger td.c-prog { grid-column: 1; grid-row: 1; }
  .ledger td.c-verdict { grid-column: 2; grid-row: 1; text-align: right; }
  .ledger td.c-deal { grid-column: 1 / -1; grid-row: 2; }
  .ledger td.c-metric { grid-column: 1; grid-row: 3; }
  .ledger td.c-date { grid-column: 2; grid-row: 3; text-align: right; }
  .ledger-cont { margin-top: 0; }

  .dir colgroup, .dir thead { display: none; }
  .dir, .dir tbody, .dir tr, .dir td { display: block; width: 100%; }
  .dir tr:not(.group) { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; padding: 14px 0; border-bottom: 1px solid var(--t-line); }
  .dir td { padding: 0; border: 0; }
  .dir td:not(.num) { text-align: left; }
  .dir td.c-name { grid-column: 1; grid-row: 1 / span 2; }
  .dir td.c-pin { grid-column: 2; grid-row: 1; }
  .dir td.c-cpp-base { display: none; }
  .dir td.c-cpp-floor { grid-column: 2; grid-row: 2; font-size: 14px; text-align: right !important; }
  .dir td.c-code, .dir td.c-all, .dir td.c-cur, .dir td.c-live, .dir td.c-reg { display: none; }
  .dir .group th { display: block; padding-top: 24px; }
  .dir .note { -webkit-line-clamp: 2; }
  .dir .m-meta { display: block; }
  .dir .dir-lbl { display: inline; color: var(--t-muted); font-size: 13px; font-weight: 500; }

  .match-table thead, .matrix-table thead { display: none; }
  .match-table, .match-table tbody, .match-table tr, .match-table td,
  .matrix-table, .matrix-table tbody, .matrix-table tr, .matrix-table td { display: block; width: 100%; }
  .match-table tr, .matrix-table tr { padding: 14px 0; border-bottom: 1px solid var(--t-line); }
  .match-table tbody tr:last-child, .matrix-table tbody tr:last-child { border-bottom: 0; }
  .match-table td, .matrix-table td { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 5px 0; border: 0; text-align: right; }
  .match-table td::before, .matrix-table td::before { content: attr(data-label); flex: none; color: var(--t-muted); font-size: 13px; font-weight: 600; text-align: left; }
  .match-table td:first-child, .matrix-table td:first-child { display: block; padding-bottom: 8px; text-align: left; }
  .match-table td:first-child::before, .matrix-table td:first-child::before { display: none; }
  .match-table td[data-label="Action"]::before, .matrix-table td[data-label="Action"]::before { display: none; }
  .match-table td .row-actions { margin-top: 4px; }
  .match-table td[data-label="Requirement"], .matrix-table td[data-label="Notes"] { display: block; text-align: left; }
  .match-table td[data-label="Requirement"]::before, .matrix-table td[data-label="Notes"]::before { display: block; margin-bottom: 4px; }
  .match-table td[data-label="Requirement"] .deal-summary { -webkit-line-clamp: 4; }

  .booster-card { padding: 16px; }
  .booster-cpp { text-align: left; }
  .booster-grid { grid-template-columns: minmax(0, 1fr); }

  .graph { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .prog-price-body { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .graph-lines { display: none; }
  .graph-col { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .graph-col.left { justify-items: start; text-align: left; }
  .graph-col h3 { grid-column: 1 / -1; }
  .node { width: 100%; }
  .br-detail { grid-template-columns: minmax(0, 1fr); }
  .br-actions { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 8px 20px; grid-column: 1; grid-row: auto; margin-top: 8px; }
  .mag-lead { grid-template-columns: minmax(0, 1fr); }
  .foot-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .cost-box { grid-template-columns: minmax(0, 1fr); }
  .cost-box-actions { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: flex-start; }
  .nf-grid { grid-template-columns: minmax(0, 1fr); }
  .nf-photo { aspect-ratio: 16 / 9; }
  .guide-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 18px 20px; }
  .gr-text { flex: 1 1 100%; }
  .gr-prog { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 10px; font-size: 14px; }
  .gr-prog .sub { display: inline; margin: 0; }
  .gr-status { margin-left: auto; font-size: 14px; text-align: right; }
  .gs { grid-auto-flow: column; gap: 10px; align-items: baseline; }

  .portal-table thead { display: none; }
  .portal-table, .portal-table tbody, .portal-table tr, .portal-table td { display: block; width: 100%; }
  .portal-table tr { padding: 14px 0; border-bottom: 1px solid var(--t-line); }
  .portal-table tbody tr:last-child { border-bottom: 0; }
  .portal-table td { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 5px 0; border: 0; text-align: right; }
  .portal-table td::before { content: attr(data-label); flex: none; color: var(--t-muted); font-size: 13px; font-weight: 600; text-align: left; }
  .portal-table td.c-merchant { display: block; min-width: 0; padding-bottom: 8px; text-align: left; }
  .portal-table td.c-merchant::before, .portal-table td.c-links::before { content: none; }
  .portal-table td.num > :is(.metric, .date) { margin-left: auto; }
  .portal-table td.c-links { display: block; width: 100%; white-space: normal; text-align: left; }
  .portal-table .c-links .row-actions { flex-direction: row; flex-wrap: wrap; gap: 0 18px; }
}
@media (min-width: 861px) { .m-meta, .dir-lbl { display: none; } }

@media (max-width: 640px) {
  :root { --gap: 16px; --pad: 16px; --mast-h: 60px; }
  .bar { gap: 10px; }
  .wordmark { gap: 8px; font-size: 19px; }
  .wordmark .mark { width: 27px; }
  .bar-actions .btn-primary { padding: 0 14px; }
  .canvas { padding-top: 28px; padding-bottom: 80px; }
  .crumbs a { display: inline-flex; align-items: center; min-height: 44px; }
  .crumbs { margin-bottom: 4px; }
  .title-row { flex-direction: column; align-items: flex-start; gap: 14px; }
  .page-head h1, .title-row h1 { font-size: 26px; line-height: 1.14; }
  .stamp { text-align: left; }
  .title-actions { width: 100%; }
  .title-actions > .btn { flex: 1 1 100%; }
  .title-actions > .pin { flex: 0 0 auto; }
  .strip { --cells: 2 !important; }
  .strip > div { padding: 14px 16px; }
  .strip > div:last-child:nth-child(3n + 2) { grid-column: auto; }
  .strip > div:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .tabs { gap: 20px; }
  .chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
  .chips::-webkit-scrollbar { display: none; }
  .chip { min-height: 44px; padding: 0 14px; }
  .pin { height: 44px; }
  .textbtn { min-height: 44px; white-space: normal; }
  .row-actions { gap: 0 18px; margin-top: 6px; }
  .search { flex-basis: 100%; max-width: none; }
  .toolbar label.inline { flex: 1 1 0; min-width: 0; }
  .toolbar .select { flex: 1 1 0; width: 100%; min-width: 0; font-size: 16px; }
  .toolbar-lead { padding-bottom: 12px; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: minmax(0, 1fr); }
  .headline-block { grid-template-columns: minmax(0, 1fr); }
  .dates3 { grid-template-columns: minmax(0, 1fr); }
  .figures { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .figures > div:first-child { grid-column: 1 / -1; }
  .calc { gap: 16px; padding: 12px 0 0; }
  .calc-form { padding: 0 16px; }
  .calc-result { padding: 18px 16px 20px; border-radius: 0; }
  .calc-result .verdict h3 { font-size: 17px; line-height: 1.3; }
  .field-pair { grid-template-columns: minmax(0, 1fr); }
  .field-trio { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .field-trio > :last-child:nth-child(odd) { grid-column: 1 / -1; }
  .checks label { min-height: 44px; }
  .lane, .lane-axis { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .lane-axis > span { display: none; }
  .lane { padding: 6px 0; }
  .prose { padding: 24px 18px 28px; }
  .prose-figure { margin: -24px -18px 28px; }
  .prose-figure figcaption { padding: 8px 18px 0; }
  .prose p, .prose li { font-size: 17px; }
  .verdict-table td:first-child { width: auto; }
  .article-head { padding-bottom: 28px; }
  .article-head h1 { font-size: 24px; line-height: 1.12; letter-spacing: -0.025em; }
  .article-head .standfirst { font-size: 17px; }
  .article-body .price-wrap { width: auto; margin-left: 0; }
  .cost-ended { flex-direction: column; gap: 6px; font-size: 16px; }
  .guide-row { padding: 16px; }
  .gr-title { font-size: 18px; }
  .gr-deck { font-size: 15px; }
  .guide-feature { padding: 20px 16px; }
  .gf-title { font-size: 21px; line-height: 1.18; letter-spacing: -0.02em; }
  .nf-search { flex-wrap: wrap; }
  .nf-search .btn { flex: 1 1 100%; }
  .nf-links a { grid-template-columns: minmax(0, 1fr); padding: 14px 16px; }
  .partner-row { grid-template-columns: minmax(0, 1fr); padding: 14px; }
  .partner-row .btn { justify-self: start; white-space: normal; text-align: left; }
  .tabs-wrap { gap: 0 18px; }
  .tabs-wrap > button, .tabs-wrap > a { min-height: 44px; }
  .gf-side .btn { width: 100%; }
  .group-head .meta { font-size: 14px; }
  .cost-box { gap: 16px; padding: 18px 16px; }
  .cost-box-actions .btn { flex: 1 1 100%; }
  .canvas.article-body { padding-top: 36px; padding-bottom: 56px; }
  .article-body { font-size: 17px; }
  .article-body ol.steps-list > li, .steps-list > li { padding: 14px 16px 14px 46px; }
  .article-body ol.steps-list > li::before, .steps-list > li::before { left: 16px; top: 13px; font-size: 18px; }
  .price-table thead { display: none; }
  .price-table, .price-table tbody, .price-table tr, .price-table th, .price-table td { display: block; width: 100%; }
  .price-table tr { padding: 14px 16px; background: var(--t-card); }
  .price-table tr + tr { margin-top: 4px; }
  .price-table th[scope="row"] { padding: 0 0 8px; border-bottom: 1px solid var(--t-line); font-size: 15px; }
  .price-table td, .price-table td.num { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 0; text-align: right; overflow-wrap: anywhere; }
  .price-table td:last-child { padding-left: 0; text-align: right; }
  .price-table td::before { content: attr(data-label); flex: none; color: var(--t-muted); font-size: 13px; font-weight: 500; text-align: left; }
  .ac-title { font-size: 19px; line-height: 1.25; }
  .article-card.is-lead .ac-title, .article-card.lg .ac-title { font-size: 21px; line-height: 1.18; }
  .article-card.is-lead, .article-card.lg { padding: 20px 16px; }
  .sheet-body { padding: 20px 18px 22px; }
  .sheet-head h2 { font-size: 21px; }
  .ad-slot { min-height: min(100vw, 480px); }

  .planner-teaser { grid-template-columns: minmax(0, 1fr); }
  .pt-form { flex-direction: column; gap: 8px; }
  .pt-form .search input { height: 52px; border-radius: var(--radius); font-size: 16px; }
  .pt-form .btn { width: 100%; min-height: 52px; border-radius: var(--radius); }
  .pt-examples { flex-wrap: wrap; overflow: visible; }

  /* Home on a phone: its own composition */
  .band { padding-block: 64px; }
  .band-tight { padding-top: 0; }
  .band-head { margin-bottom: 28px; }
  .band-head h2 { font-size: 30px; }
  .hero { padding-top: 20px; }
  .hero-deck { margin-top: 18px; font-size: 17px; }
  .hero-search { margin-top: 22px; }
  .hero-search .search input { height: 48px; padding-left: 40px; font-size: 16px; }
  .hero-search .search > svg { margin-left: 13px; }
  .hero-search .btn { min-height: 48px; padding: 0 16px; }
  .hero-ctas { gap: 4px 16px; margin-top: 14px; }
  .hero-ctas .btn-accent { flex: 1 1 100%; }
  .hero-ctas .btn-ghost { flex: 1 1 100%; }
  .hero-panel { margin-top: 32px; padding: 14px 14px 4px; }
  .hp-rows a { grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto auto; gap: 0 12px; min-height: 56px; padding: 8px 0; }
  .hp-name { grid-column: 1; grid-row: 1; }
  .hp-metric { grid-column: 1; grid-row: 2; color: var(--muted); font-size: 14px; text-align: left; }
  .hp-due { grid-column: 2; grid-row: 1 / span 2; }
  .hero-mosaic { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: auto auto; height: auto; margin-top: 36px; margin-inline: calc(var(--margin) * -1); }
  .hm-a { grid-column: 1 / -1; aspect-ratio: 16 / 10; }
  .hm-b, .hm-c { aspect-ratio: 1 / 1; }
  .hm-num { font-size: 56px; }
  .hm-sub { font-size: 15px; }
  .board-mosaic { grid-auto-rows: minmax(176px, auto); margin-inline: calc(var(--margin) * -1); }
  .bm-photo { aspect-ratio: 4 / 3; }
  .bm-tile { padding: 18px 16px; }
  .bm-num { flex-direction: column; align-items: flex-start; gap: 2px; font-size: 40px; }
  .bm-name { margin-top: 12px; font-size: 19px; }
  .bm-text { display: none; }
  .lb-tools .search { flex: 1 1 100%; }
  .lb-tools .tabs { width: 100%; }
  .br-head { grid-template-columns: minmax(0, 1fr) auto 84px; grid-template-rows: auto auto; gap: 2px 10px; min-height: 0; padding: 12px 0 12px 16px; }
  .br-name { grid-column: 1 / span 2; font-size: 18px; }
  .br-metric { grid-column: 1; grid-row: 2; font-size: 15px; }
  .br-due { grid-column: 2; grid-row: 2; font-size: 13px; text-align: right; }
  .br-due time { display: none; }
  .br-due .due { margin: 0; font-size: 13px; }
  .br-status { grid-column: 3; grid-row: 1 / span 2; margin: -12px 0; padding: 0 6px; font-size: 13px; }
  .br-sum { display: -webkit-box; overflow: hidden; -webkit-line-clamp: 6; -webkit-box-orient: vertical; }
  .board-row.is-sk .br-head { grid-template-columns: minmax(0, 1fr); padding-right: 16px; }
  .br-detail { padding: 6px 16px 20px; }
  .br-sum { font-size: 16px; }
  .br-actions .btn { width: 100%; }
  .mag-item { padding: 20px 16px; }
  .stack-card { padding: 20px 16px; }
  .quick-calc { padding: 22px 16px; }
  .alerts-inline { padding: 20px 16px; }
  .alerts-title { font-size: 34px; }
  .ai-row { grid-template-columns: minmax(0, 1fr); }
  .alerts-inline .btn { width: 100%; }
  .alerts-grid { gap: 28px; }
  .foot-grid { margin-top: 40px; }
  .foot-nav { gap: 24px 20px; }
  .foot-col a, .foot-row a { min-height: 44px; }
  .foot-base { grid-template-columns: minmax(0, 1fr); margin-top: 40px; }
}

/* ---------- Deals and dates: the stacks board (/stacks, static/js/views/stacks.js) ----------
   Each combo is a timeline that starts at this visitor's now. One 22px bar per deal runs to its end instant;
   the first to close is crimson, the window all the deals share is shaded up to that close, and a 2px crimson
   Today line runs down the start of every track. Bars and labels sit in percentages, so nothing is redrawn. */
.stacks-board .sb-index { margin-bottom: var(--gap); }
.sb-rows { columns: 3 240px; column-gap: 40px; padding: 6px var(--pad) 18px; }
.sb-rows li { break-inside: avoid; }
.sb-rows a { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "name due" "n due"; align-items: center; gap: 0 12px; min-height: 52px; margin-inline: -10px; padding: 7px 10px; border-radius: var(--radius); transition: background-color 150ms var(--ease); }
.sb-rows a:hover { background: var(--t-card-2); text-decoration: none; }
.sb-rows a:hover .sb-name { text-decoration: underline; text-underline-offset: 0.18em; }
.sb-name { grid-area: name; overflow: hidden; font-size: 15px; font-weight: 600; line-height: 1.3; text-overflow: ellipsis; white-space: nowrap; }
.sb-n { grid-area: n; color: var(--t-muted); font-size: 13px; line-height: 1.3; }
.sb-due { grid-area: due; color: var(--t-muted); font-size: 14px; font-weight: 600; text-align: right; white-space: nowrap; }
.sb-due.is-soon { color: var(--t-hot); }

.stack-card { padding-bottom: 10px; scroll-margin-top: calc(var(--mast-h) + 16px); }
.sk-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(220px, 320px); align-items: end; gap: 16px 48px; padding: 26px var(--pad) 18px; }
.sk-title h2 { font-size: clamp(22px, 1.9vw, 27px); line-height: 1.12; letter-spacing: -0.025em; }
.sk-line { max-width: 64ch; margin-top: 8px; font-family: var(--font-text); font-size: 17px; line-height: 1.5; }
.sk-line a { text-decoration: underline; text-decoration-color: var(--t-line-strong); text-underline-offset: 0.18em; }
.sk-line a:hover { text-decoration-color: currentColor; }
.sk-meta { margin-top: 4px; color: var(--t-muted); font-size: 14px; }
.sk-window { text-align: right; }
.sk-count { font-size: clamp(30px, 2.8vw, 40px); font-weight: 700; line-height: 1; letter-spacing: -0.035em; font-variant-numeric: tabular-nums; }
.sk-count.is-soon { color: var(--t-hot); }
.sk-until { margin-top: 8px; color: var(--t-muted); font-size: 14px; line-height: 1.45; }
.sk-until time { color: var(--t-ink); font-weight: 600; white-space: nowrap; }

.tl { --tl-cols: minmax(210px, 31%) minmax(0, 1fr); --tl-bar: #4f5662; padding: 0 var(--pad) 18px; }
.tl-axis, .tl-row { display: grid; grid-template-columns: var(--tl-cols); column-gap: 28px; }
.tl-scale { position: relative; height: 30px; border-left: 2px solid var(--t-hot); }
.tl-today { position: absolute; bottom: 9px; left: 8px; color: var(--t-ink); font-size: 13px; font-weight: 700; line-height: 1; white-space: nowrap; }
.tl-tick { position: absolute; bottom: 9px; left: var(--x); transform: translateX(-50%); color: var(--t-muted); font-size: 12px; line-height: 1; white-space: nowrap; font-variant-numeric: tabular-nums; }
.tl-tick::after { content: ""; position: absolute; top: calc(100% + 4px); left: 50%; width: 1px; height: 5px; background: var(--t-line-strong); }
.tl-tick.is-last { transform: translateX(-100%); }
.tl-tick.is-last::after { left: 100%; }
.tl-rows { display: grid; }
.tl-row { align-items: stretch; min-height: 56px; }
.tl-label { align-self: center; min-width: 0; padding: 7px 0; }
.tl-label a { font-size: 15px; font-weight: 600; line-height: 1.3; }
.tl-label .sub { margin-top: 2px; }
.tl-label .badge { margin-left: 2px; vertical-align: 1px; }
.tl-track { position: relative; min-height: 56px; border-left: 2px solid var(--t-hot); }
.tl-band { position: absolute; top: 0; bottom: 0; left: 0; width: var(--win); background: var(--chart-span); }
.tl-band::after { content: ""; position: absolute; top: 0; right: -1px; bottom: 0; width: 2px; background: var(--t-hot); opacity: 0.45; }
.tl-bar { position: absolute; top: 50%; left: 0; width: var(--w); height: 22px; transform: translateY(-50%); border-radius: 0 var(--radius) var(--radius) 0; background: var(--tl-bar); }
.tl-row.is-first .tl-bar { background: var(--t-hot); }
.tl-row.is-open-ended .tl-bar { background: var(--t-chip-hover); }
.tl-end { position: absolute; top: 50%; left: calc(var(--w) + 8px); transform: translateY(-50%); color: var(--t-ink); font-size: 13px; font-weight: 600; line-height: 1; white-space: nowrap; }
.tl-end.is-inside { right: calc(100% - var(--w) + 8px); left: auto; color: #ffffff; }
.tl-row.is-open-ended .tl-end.is-inside { color: var(--t-ink); }
.tl-end svg { display: inline-block; vertical-align: -1px; }
.tl-row:hover .tl-label a { text-decoration: underline; text-underline-offset: 0.18em; }

@media (max-width: 860px) {
  .sk-head { grid-template-columns: minmax(0, 1fr); align-items: start; gap: 14px; }
  .sk-window { text-align: left; }
  .tl { --tl-cols: minmax(0, 1fr); }
  .tl-axis-pad { display: none; }
  .tl-row { min-height: 0; padding-top: 8px; }
  .tl-row + .tl-row { margin-top: 4px; }
  .tl-label { padding: 0 0 6px; }
  .tl-track { min-height: 34px; }
}
@media (max-width: 520px) {
  .tl-tick.is-minor { display: none; }
  .sb-rows { columns: 1; }
}

/* ---------- Deals and dates: end times (deal page, ledger, home stack cards) ----------
   Every countdown runs to the end instant of a closing date (the zone the terms state, else US Pacific). */
.due-at { display: block; margin-top: 2px; color: var(--t-muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.deal-ended { margin-bottom: 20px; padding: 14px 18px; border-radius: var(--radius); background: var(--paper-2); color: var(--t-ink); font-family: var(--font-text); font-size: 17px; line-height: 1.5; }
.deal-ended strong { font-family: var(--font-ui); font-weight: 700; }
.deal-ended a { text-decoration: underline; text-underline-offset: 0.18em; }
.ends-note { margin: 12px var(--pad) 0; color: var(--t-muted); font-size: 14px; line-height: 1.5; }
.ends-note time, .ends-note .num { color: var(--t-ink); font-weight: 600; }
.sc-close.is-calm { color: var(--t-muted); }
@media (max-width: 640px) {
  /* A deal's past offers as two-line rows on a phone: the offer, then its headline and when it closed. */
  .hist-table thead { display: none; }
  .hist-table tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 16px; padding: 14px 0; border-bottom: 1px solid var(--t-line); }
  .hist-table tbody tr:last-child { border-bottom: 0; }
  .hist-table td { padding: 0; border: 0; }
  .hist-table td:nth-child(1) { grid-column: 1 / -1; }
  .hist-table td:nth-child(2) { grid-column: 1; text-align: left; color: var(--t-muted); font-size: 14px; }
  .hist-table td:nth-child(3) { display: none; }
  .hist-table td:nth-child(4) { grid-column: 2; grid-row: 2; font-size: 14px; }
}
/* The ledger's "Stacks with N live promos" link always starts on its own line under the headline figure. */
.ledger .c-metric .stack-link { display: block; width: fit-content; }
