/* ============================================================================
   /compare/ — the comparison workspace, in the 2026 visual system.
   ============================================================================

   Page-scoped and linked directly from templates/compare/{landing,detail,
   models}.html, so it is deliberately outside every bundle and needs no
   build step. The three templates share it because they share a shell: the
   same mode switch, the same control bar, the same column ruler.

   What this sheet is for, and what it is not.

   The drawing comes from am-system.css: .am-page-head, .am-panel, .am-seg,
   .am-table, .am-chart, .am-filterbar, .am-search, .am-chip, .am-evidence,
   .am-bar, .am-btn, .am-state. Nothing here restyles one of those for its
   own sake. What is here is the three things only this route knows:

     1. the shared column ruler — one --cmpw-label width read by both figure
        sheets, so AAPL sits above AAPL down the whole page;
     2. the plot, which is an SVG this page draws from the daily-return
        series the view already computes;
     3. the answers to the site-wide blanket rules.

   On (3): {% block extra_css %} sits *before* bundle-shell.css in base.html,
   which is what keeps a page sheet from overriding the shell. It also means
   every rule in this file loses a specificity tie to canvas-2026.css,
   am-system.css and page-unification.css. So a rule that has to hold is
   written with the system class in the selector (`.am-table.cmpw-sheet`),
   and the handful that answer an `!important` blanket are at the foot of the
   file, each saying which blanket it is answering.

   Legacy names deliberately not reused: .cmp-page, .cmp-title, .cmp-sub,
   .cmp-kicker, .cmp-hero, .cmp-form, .cmp-pair, .cmp-col, .cmp-verdict,
   .cmp-pred, .cmp-explainer. Every one of those is named with !important by
   page-unification.css or theme-foundation.css — gradient panels, uppercase
   kickers, lifting cards — which is the language this route is being moved
   off. The new namespace is `cmpw-` and none of those rules can reach it.

   Tokens only, logical properties only, 12px label floor, 44px targets at
   767px and below. Same contract as am-system.css.
   ============================================================================ */


/* ---------------------------------------------------------------------------
   Page ground
   ---------------------------------------------------------------------------
   One measure for all three modes, and the same one the site declares
   (--layout-workspace-max). The breadcrumb reads it too, so the crumb, the
   title and the first panel all start on one inline edge. */
.cmpw-crumb,
.cmpw-page {
  max-inline-size: var(--layout-workspace-max);
  margin-inline: auto;
  min-width: 0;
}
.cmpw-crumb { padding-block: var(--c-space-4) 0; }
.cmpw-page { padding-block: var(--c-space-2) var(--c-space-7); }

/* The mode switch. Two real links in a segmented control: each mode is its
   own URL, so "send me the provider comparison" is a thing a reader can do,
   and aria-current="page" is what makes the active one audible as well as
   drawn. The dark pill is .am-seg's own state. */
.cmpw-modes { margin-block-end: var(--c-space-5); }

/* The head. --split puts the reading in column 1 and the aside in column 2.

   PROMOTE to am-system: `.am-page-head--split` pins the aside to `grid-row: 1`,
   and row 1 also holds the kicker -- so an aside taller than one line sets the
   height of row 1 and pushes the h1 down by the difference. Measured on the
   pair head: a two-line reading card moved the h1 51px down, under an empty
   band. `grid-row: 1 / -1` does not fix it -- with no explicit rows declared,
   `-1` resolves to line 1 and the span collapses -- and a real span only
   redistributes the deficit across the rows it covers. The approved accuracy
   mockup shows the card level with the kicker and the title exactly where it
   would be without one, which is what taking the aside out of flow does. The
   grid's second column stays, so the copy never runs under the card, and the
   offsets are logical properties, so Arabic needs no second rule.

   Scoped to 48rem and up: below that am-system collapses --split to one
   column and the aside is meant to sit *under* the copy, in flow. */
@media (min-width: 48rem) {
  .cmpw-page .am-page-head--split { position: relative; }
  .cmpw-page .am-page-head--split > .am-page-head__aside {
    position: absolute;
    inset-block-start: 0;
    inset-inline-end: 0;
    inline-size: clamp(240px, 22vw, 320px);
  }
}

/* The pair itself is a baseline row, so "vs" sits with the two tickers rather
   than under them. */
.cmpw-pair {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--c-space-1) var(--c-space-3);
}
.cmpw-pair__vs {
  flex: 0 0 auto;
  color: var(--c-text-muted);
  font-size: var(--c-t-meta);
  font-weight: var(--c-w-semi);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
[dir="rtl"] .cmpw-pair__vs { letter-spacing: 0; }

/* The reading in the aside. It was a centred gradient pill above
   left-aligned content; it is one sentence about the pair, so it is typeset
   as one inside the header's own quiet card. */
.cmpw-reading { margin: 0; font-size: var(--c-t-meta); line-height: 1.6; }
.cmpw-reading strong { color: var(--c-text); font-weight: var(--c-w-semi); }
.cmpw-reading__k {
  display: block;
  margin-block-end: var(--c-space-2);
  color: var(--c-text-muted);
  font-size: var(--c-t-label);
  font-weight: var(--c-w-semi);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
[dir="rtl"] .cmpw-reading__k { letter-spacing: 0; }


/* ---------------------------------------------------------------------------
   Control bar
   ---------------------------------------------------------------------------
   The pair picker and the window switch in one .am-filterbar: the two things
   that change what is on the page, on one row, above it. The picker is a
   form (GET, ?a= and ?b= unchanged); the window is a row of links, because
   each window is a URL somebody can send. */
/* Page-scoped for the reason the backtest sheet gives at the same place:
   `.am-filterbar` is one class, it sets `align-items` and a `gap` shorthand,
   and it loads after this file, so an equal-specificity rule here loses.
   Bottom, not centre: every field in this bar is a label over a control, and
   a compare button centred against that pair sits above the controls it
   submits. */
.cmpw-page .cmpw-controls {
  align-items: flex-end;
  column-gap: var(--c-space-3);
  row-gap: var(--c-space-4);
}
.cmpw-picker {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--c-space-2);
  min-width: 0;
}
.cmpw-pick {
  flex: 1 1 9rem;
  max-inline-size: 14rem;
}
.cmpw-pick__input {
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
}
.cmpw-pick__input::placeholder {
  text-transform: none;
  letter-spacing: 0;
}
.cmpw-picker__vs {
  flex: 0 0 auto;
  color: var(--c-text-muted);
  font-size: var(--c-t-label);
  font-weight: var(--c-w-semi);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
[dir="rtl"] .cmpw-picker__vs { letter-spacing: 0; }

/* One field of the picker: its "vs", the field, and its remove button, as
   one unit that hides and shows together. The slot takes the flex share the
   bare field used to, and the field fills the slot. */
.cmpw-slot {
  display: flex;
  align-items: center;
  gap: var(--c-space-2);
  flex: 1 1 11rem;
  max-inline-size: 17rem;
  min-width: 0;
}
.cmpw-slot .cmpw-pick { flex: 1 1 auto; max-inline-size: none; min-width: 0; }
.cmpw-slot--select { flex: 0 1 auto; max-inline-size: none; align-items: flex-end; }
.cmpw-slot__remove {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  inline-size: 32px;
  block-size: 32px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: var(--c-r-pill);
  background: none;
  color: var(--c-text-muted);
  cursor: pointer;
}
.cmpw-slot--select .cmpw-slot__remove { margin-block-end: 4px; }
.cmpw-slot__remove svg { inline-size: 16px; block-size: 16px; }
.cmpw-slot__remove:hover { background: var(--c-inset); color: var(--c-text); }
.cmpw-slot__remove:focus-visible {
  outline: 2px solid var(--c-evidence);
  outline-offset: 2px;
}
.cmpw-add svg { inline-size: 16px; block-size: 16px; }
/* Shown only where the script has not run: with it, the add button says the
   same thing. */
.cmpw-picker__hint {
  flex: 1 1 100%;
  margin: 0;
  color: var(--c-text-muted);
  font-size: var(--c-t-label);
}
/* What the query asked for and the page did not draw. */
.cmpw-notices {
  display: grid;
  gap: var(--c-space-2);
  margin-block-end: var(--c-space-5);
}


/* A panel's own head. .am-panel__head is a no-wrap space-between row, which
   is right for a title beside a control and wrong for a title above a
   sentence: with `flex: 0 0 auto` on the second child the sentence pushed the
   panel past its own edge. The subtitle takes a full basis instead, so it
   drops to its own line under the title and wraps there. --meta is the short
   kind that genuinely belongs beside the title. */
.cmpw-subtitle {
  flex: 1 1 100%;
  margin: 0;
  max-inline-size: 84ch;
  color: var(--c-text-muted);
  font-size: var(--c-t-meta);
  line-height: 1.55;
}
.cmpw-meta {
  flex: 0 1 auto;
  margin: 0;
  color: var(--c-text-muted);
  font-size: var(--c-t-meta);
  font-variant-numeric: tabular-nums;
  text-align: end;
}
.cmpw-page .am-panel__head { flex-wrap: wrap; row-gap: var(--c-space-2); }


/* ---------------------------------------------------------------------------
   The plot
   ---------------------------------------------------------------------------
   Two symbols indexed to 100 at the start of the window, drawn from the
   daily returns markets/research/compare.py already computes. Nothing is
   interpolated and nothing is invented: a day with no stored close is a day
   the series does not have, and a symbol with fewer than two closes gets the
   empty state inside the same 320px box rather than a shorter panel.

   Time reads left to right in both locales — a price history is not a
   sentence — so the box is LTR even on the Arabic site. The series colours
   are the two chart tokens and they are locked to the two table columns
   below, which is what makes the plot and the sheets one reading. */
.cmpw-figure { margin-block-end: var(--c-space-5); }
.cmpw-plot { direction: ltr; }
.cmpw-plot__svg { display: block; inline-size: 100%; block-size: 100%; }
.cmpw-plot__grid { stroke: color-mix(in srgb, var(--c-line) 70%, transparent); }
.cmpw-plot__base {
  stroke: var(--c-line-strong);
  stroke-dasharray: 3 4;
}
.cmpw-plot__line {
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.cmpw-plot__line--a { stroke: var(--c-chart-blue); }
.cmpw-plot__line--b { stroke: var(--c-chart-orange); }
.cmpw-plot__dot--a { fill: var(--c-chart-blue); }
.cmpw-plot__dot--b { fill: var(--c-chart-orange); }

/* Series C and D. The system carries two chart tokens and no third, and the
   semantic tokens are spoken for -- --c-up and --c-down would read as a
   direction, --c-evidence is a link, --c-attention is a warning -- so the
   third and fourth series are told apart by pattern as much as by tone: C is
   the neutral token and dashed, D is the ink and dotted. The same dash runs
   through the line, the legend mark and the tick under the ticker, so the
   thread from a line to its column survives greyscale, forced colours and a
   reader who sees no hue. */
.cmpw-plot__line--c { stroke: var(--c-neutral); stroke-dasharray: 7 5; }
.cmpw-plot__line--d { stroke: var(--c-text); stroke-dasharray: 1.5 5; }
.cmpw-plot__dot--c { fill: var(--c-neutral); }
.cmpw-plot__dot--d { fill: var(--c-text); }

/* The legend mark per series. A and B carry am-system's own
   .am-chart__legend-item--blue / --orange (the token has one owner); C and D
   draw their mark as a short rule in their own dash rather than a dot,
   because a dot cannot show a dash. */
.am-chart__legend-item.cmpw-legend--c::before,
.am-chart__legend-item.cmpw-legend--d::before {
  inline-size: 16px;
  block-size: 0;
  border-radius: 0;
  background: none;
  border-block-start: 2px dashed var(--c-neutral);
}
.am-chart__legend-item.cmpw-legend--d::before { border-block-start: 2px dotted var(--c-text); }
/* 12px, not 11: the label floor holds inside an SVG as well as outside one. */
.cmpw-plot__tick {
  fill: var(--c-text-muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.cmpw-plot__tick--y { text-anchor: start; }
.cmpw-plot__tick--x0 { text-anchor: start; }
.cmpw-plot__tick--x1 { text-anchor: end; }


/* ---------------------------------------------------------------------------
   The figure sheets
   ---------------------------------------------------------------------------
   Two .am-table sheets sharing one ruler. They stay two tables rather than
   one: the first is what is true now, the second is measured over the
   window, and a single caption cannot say both.

   --cmpw-label is the shared label column. Both sheets read it, so the two
   asset columns are the same width and start at the same x in each, and a
   reader's eye runs straight down a symbol. */
.cmpw-sheets { --cmpw-label: clamp(9rem, 20vw, 17rem); }
.cmpw-sheet-panel { margin-block-end: var(--c-space-5); }
.cmpw-sheet__labelcol { inline-size: var(--cmpw-label); }

/* The column head: the ticker, its price, its move, and when the price was
   read. End-aligned, because everything in the column under it is. */
.am-table.cmpw-sheet thead th { vertical-align: bottom; }
.am-table.cmpw-sheet .cmpw-sheet__hd { text-align: end; white-space: normal; }
.cmpw-sheet__sym {
  display: block;
  color: var(--c-text);
  font-size: var(--c-t-h2);
  font-weight: var(--c-w-bold);
  letter-spacing: -0.01em;
  line-height: 1.15;
}
[dir="rtl"] .cmpw-sheet__sym { letter-spacing: 0; }
/* The series tick: a 3px rule in the column's own chart colour, directly
   under the ticker. It is the only thing tying a table column to a line on
   the plot, and it costs one element and no colour anywhere else. */
.cmpw-sheet__tick {
  display: block;
  inline-size: 28px;
  block-size: 3px;
  margin-block: var(--c-space-2) var(--c-space-2);
  margin-inline-start: auto;
  border-radius: var(--c-r-pill);
  background: var(--c-neutral);
}
.cmpw-sheet__tick--a { background: var(--c-chart-blue); }
.cmpw-sheet__tick--b { background: var(--c-chart-orange); }
/* The tick carries the line's dash for C and D, for the reason given at the
   plot: the thread from a column to its line must not rest on hue alone. */
.cmpw-sheet__tick--c,
.cmpw-sheet__tick--d {
  block-size: 0;
  border-radius: 0;
  background: none;
  border-block-start: 3px dashed var(--c-neutral);
}
.cmpw-sheet__tick--d { border-block-start: 3px dotted var(--c-text); }

/* Taking one column out of a three- or four-way comparison. A link, because
   the result is a new comparison with its own URL. Quiet: it is the least
   important thing in the column head and must not compete with the price. */
/* inline-block, not inline-flex: a flex container drops the space between
   "Remove" and the <bdi> ticker, and the link read "RemoveBTC". */
.cmpw-sheet__remove {
  display: inline-block;
  padding-block: 6px;
  margin-block-start: var(--c-space-1);
  color: var(--c-text-muted);
  font-size: var(--c-t-label);
  font-weight: var(--c-w-medium);
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, currentColor 40%, transparent);
  text-underline-offset: 3px;
}
.cmpw-sheet__remove:hover { color: var(--c-text); }
.cmpw-sheet__remove:focus-visible {
  outline: 2px solid var(--c-evidence);
  outline-offset: 2px;
}
.cmpw-sheet__price-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: flex-end;
  gap: var(--c-space-2);
}
.cmpw-sheet__price {
  color: var(--c-text);
  font-size: var(--c-t-lead);
  font-weight: var(--c-w-semi);
  font-variant-numeric: tabular-nums;
}
.cmpw-sheet__price--na {
  color: var(--c-text-muted);
  font-size: var(--c-t-meta);
  font-weight: var(--c-w-medium);
}
.cmpw-sheet__updated {
  display: block;
  margin-block-start: var(--c-space-2);
  color: var(--c-text-muted);
  font-size: var(--c-t-label);
  font-weight: var(--c-w-medium);
}

/* The row label is a label, not a heading: the figure beside it is the thing
   being read. */
.am-table.cmpw-sheet tbody th[scope="row"] {
  color: var(--c-text-secondary);
  font-size: var(--c-t-meta);
  font-weight: var(--c-w-medium);
  font-variant-numeric: normal;
}
.am-table.cmpw-sheet tbody td { overflow-wrap: anywhere; }
/* Three or four columns share the width two had, so a long unbroken value --
   a provider id like groq-reasoning-qwen/qwen3.8-27b -- has to wrap inside
   its cell. Left nowrap, one such id pushed the fourth column past the panel
   edge at 1440 and the sheet had to scroll to show it. */
.am-table.cmpw-sheet--n3 tbody td,
.am-table.cmpw-sheet--n4 tbody td { white-space: normal; }
.cmpw-sheet__note {
  display: block;
  margin-block-start: var(--c-space-1);
  color: var(--c-text-muted);
  font-size: var(--c-t-label);
}
.cmpw-na {
  color: var(--c-text-muted);
  font-variant-numeric: normal;
  white-space: normal;
}
/* A cell whose content is prose or a headline: it must not be nowrap and it
   must not be end-aligned, because a wrapped sentence ragged on its left
   edge is unreadable. */
.am-table.cmpw-sheet .cmpw-sheet__prose {
  text-align: start;
  white-space: normal;
  line-height: 1.5;
}
.am-table.cmpw-sheet .cmpw-sheet__prose a { color: var(--c-evidence); }

/* Phone: the two asset columns stay side by side and only the prose stacks.
   A fixed three-column table at 390 gave each value six characters; stacking
   every row into one value per line gave up the comparison the page exists
   for. So a row becomes a small grid — the metric name across the top, the
   two readings beneath it in two columns, each tagged with the symbol it
   belongs to — and a row marked as prose drops to one column. */
@media (max-width: 40rem) {
  .cmpw-sheet-wrap { overflow-x: visible; }
  .am-table.cmpw-sheet,
  .am-table.cmpw-sheet thead,
  .am-table.cmpw-sheet tbody,
  .am-table.cmpw-sheet tr,
  .am-table.cmpw-sheet th,
  .am-table.cmpw-sheet td { display: block; inline-size: auto; }
  .cmpw-sheet colgroup { display: none; }
  .am-table.cmpw-sheet thead tr {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--c-space-3);
    padding-block-end: var(--c-space-3);
    border-block-end: 1px solid var(--c-line);
  }
  .am-table.cmpw-sheet thead th { padding: 0; border: 0; }
  .am-table.cmpw-sheet thead th.cmpw-sheet__stub { display: none; }
  .am-table.cmpw-sheet .cmpw-sheet__hd { text-align: start; }
  .cmpw-sheet__price-row,
  .cmpw-sheet__tick { justify-content: flex-start; margin-inline-start: 0; }
  .am-table.cmpw-sheet tbody tr {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 var(--c-space-3);
    padding-block: var(--c-space-3);
    border-block-end: 1px solid color-mix(in srgb, var(--c-line) 70%, transparent);
  }
  .am-table.cmpw-sheet tbody tr:last-child { border-block-end: 0; }
  .am-table.cmpw-sheet tbody th[scope="row"] {
    grid-column: 1 / -1;
    padding: 0 0 var(--c-space-2);
    border: 0;
    color: var(--c-text-muted);
    font-size: var(--c-t-label);
    font-weight: var(--c-w-semi);
    letter-spacing: 0.05em;
    text-transform: uppercase;
  }
  [dir="rtl"] .am-table.cmpw-sheet tbody th[scope="row"] { letter-spacing: 0; }
  .am-table.cmpw-sheet tbody td {
    padding: 0;
    border: 0;
    text-align: start;
    white-space: normal;
  }
  /* The symbol the value belongs to, said against the value rather than
     living in a column that has been squeezed away. */
  .am-table.cmpw-sheet tbody td::before {
    content: attr(data-sym);
    display: block;
    margin-block-end: 2px;
    color: var(--c-text-faint);
    font-family: var(--c-mono);
    font-size: var(--c-t-label);
    font-weight: var(--c-w-semi);
  }
  .am-table.cmpw-sheet tbody tr.cmpw-sheet__row--prose { grid-template-columns: minmax(0, 1fr); }
  /* Three or four symbols: the readings wrap two to a line inside the row,
     each still tagged with its ticker by the ::before above, so every value
     keeps half the phone's width instead of a quarter of it and nothing has
     to scroll. The heads wrap the same way. */
  .am-table.cmpw-sheet--n3 thead tr,
  .am-table.cmpw-sheet--n4 thead tr { row-gap: var(--c-space-4); }
  .am-table.cmpw-sheet--n3 tbody tr,
  .am-table.cmpw-sheet--n4 tbody tr { row-gap: var(--c-space-3); }
  .am-table.cmpw-sheet tbody tr.cmpw-sheet__row--prose td + td { margin-block-start: var(--c-space-3); }
}


/* The pairwise correlation sheet, shown from three symbols up. The pair is a
   label, like every row label in the sheets above; the figures are the
   table's own tabular numerals. */
.am-table.cmpw-corr tbody th[scope="row"] {
  color: var(--c-text-secondary);
  font-size: var(--c-t-meta);
  font-weight: var(--c-w-medium);
}
.cmpw-corr__pair { font-family: var(--c-mono); white-space: nowrap; }


/* ---------------------------------------------------------------------------
   Sentiment split and the evidence under it
   ---------------------------------------------------------------------------
   Two panels on one ruler, one per symbol: how the models were split inside
   the window, then the most recent article that named the symbol. Both are
   stored figures — the split comes from PredictionOutcome rows in the
   window, the article from the same query the metric above it counts. */
.cmpw-splits {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--c-space-5);
  align-items: start;
  margin-block-end: var(--c-space-5);
}
/* Three or four symbols: one panel each, side by side where the width gives
   every panel at least the measure a headline needs, two-up below that, and
   one column on a phone (the 48rem block below). */
.cmpw-splits--n3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cmpw-splits--n4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.cmpw-split { display: grid; gap: var(--c-space-4); align-content: start; }
.cmpw-split__sym {
  margin: 0;
  color: var(--c-text);
  font-size: var(--c-t-h3);
  font-weight: var(--c-w-semi);
  font-family: var(--c-mono);
}
.cmpw-bars { margin: 0; padding: 0; list-style: none; }
.cmpw-bar-row {
  display: grid;
  grid-template-columns: minmax(4.5rem, auto) minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--c-space-3);
  padding-block: var(--c-space-2);
}
/* No `text-transform: capitalize` any more: the direction is a translated
   word now rather than the stored lowercase enum, and `capitalize` on an
   Arabic string is a rule the browser has to evaluate to do nothing. */
.cmpw-bar-row__k {
  color: var(--c-text-secondary);
  font-size: var(--c-t-meta);
}
.cmpw-bar-row__v {
  color: var(--c-text);
  font-size: var(--c-t-meta);
  font-weight: var(--c-w-semi);
  font-variant-numeric: tabular-nums;
  text-align: end;
}
/* The bar is .am-bar; only its measure is this page's business — a full-width
   track inside a two-up grid rather than the 160px leaderboard cell. */
.cmpw-bar-row .am-bar { inline-size: 100%; margin-block: 0; }
.cmpw-split__note {
  margin: 0;
  color: var(--c-text-muted);
  font-size: var(--c-t-label);
  line-height: 1.6;
}
/* The narrative block carries the figure's own name above whichever of the
   two states it is in -- the evidence block or the empty state -- so the
   label is a property of the block and not of the article that may or may
   not exist. A label, not a heading: the panel already has one (the symbol),
   and a second heading level for one quoted sentence would put an <h4> into
   the outline of every symbol column. */
.cmpw-narr { display: grid; gap: var(--c-space-2); }
.cmpw-narr__k {
  margin: 0;
  color: var(--c-text-muted);
  font-size: var(--c-t-label);
  font-weight: var(--c-w-medium);
}

.cmpw-split .am-evidence__claim a { color: inherit; text-decoration: none; }
.cmpw-split .am-evidence__claim a:hover { text-decoration: underline; }
.cmpw-split .am-evidence__claim a:focus-visible {
  outline: 2px solid var(--c-evidence);
  outline-offset: 2px;
}


/* ---------------------------------------------------------------------------
   Foot
   --------------------------------------------------------------------------- */
.cmpw-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--c-space-4);
  padding-block-start: var(--c-space-5);
  border-block-start: 1px solid var(--c-line);
}
.cmpw-foot__note {
  margin: 0;
  max-inline-size: 78ch;
  color: var(--c-text-secondary);
  font-size: var(--c-t-meta);
  line-height: 1.6;
}


/* ---------------------------------------------------------------------------
   The index: a picker, not a landing page
   --------------------------------------------------------------------------- */
.cmpw-intro { margin-block-end: var(--c-space-6); }
/* The pair field on the index is the subject of the screen, so it is the hero
   size rather than the inline one, and it is capped at the width of the
   shortcut list under it so the two read as one column of controls. */
.cmpw-entry { max-inline-size: 46rem; margin-block-end: var(--c-space-6); }
.cmpw-entry .cmpw-pick { flex: 1 1 11rem; max-inline-size: none; }

/* Capped at the width of three columns, so the list sits under the field as
   one column of controls rather than spreading to the full 1320px and turning
   six shortcuts into a banner of six offers. */
.cmpw-shortcuts { max-inline-size: 60rem; margin-block-end: var(--c-space-6); }
.cmpw-shortcuts__list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
  gap: 0 var(--c-space-6);
  margin: 0;
  padding: 0;
  list-style: none;
}
.cmpw-shortcut {
  display: flex;
  align-items: center;
  gap: var(--c-space-2);
  min-block-size: 48px;
  padding-block: var(--c-space-2);
  border-block-end: 1px solid color-mix(in srgb, var(--c-line) 70%, transparent);
  color: var(--c-text);
  font-size: var(--c-t-body);
  font-weight: var(--c-w-medium);
  text-decoration: none;
  transition: color var(--c-dur-state) var(--c-ease);
}
.cmpw-shortcut:hover { color: var(--c-evidence); }
.cmpw-shortcut:focus-visible {
  outline: 2px solid var(--c-evidence);
  outline-offset: 2px;
}
.cmpw-shortcut__sym { font-family: var(--c-mono); letter-spacing: 0.02em; }
/* --c-text-secondary rather than --c-text-faint: measured on the light canvas
   the faint token gave this label 4.31:1, under 1.4.3's 4.5. */
.cmpw-shortcut__vs {
  color: var(--c-text-secondary);
  font-size: var(--c-t-label);
  font-weight: var(--c-w-semi);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
[dir="rtl"] .cmpw-shortcut__vs { letter-spacing: 0; }
.cmpw-shortcut__go { margin-inline-start: auto; }
.cmpw-shortcut:hover .cmpw-shortcut__go { color: var(--c-evidence); }

.cmpw-basis {
  margin: 0;
  max-inline-size: 74ch;
  padding-block-start: var(--c-space-4);
  border-block-start: 1px solid var(--c-line);
  color: var(--c-text-secondary);
  font-size: var(--c-t-meta);
  line-height: 1.65;
}
.cmpw-basis strong { color: var(--c-text); font-weight: var(--c-w-semi); }


/* ---------------------------------------------------------------------------
   Providers & benchmarks
   ---------------------------------------------------------------------------
   Two provider columns on one ruler: every row in one column has a row of
   the same name at the same height in the other, so a reader compares across
   rather than reading two cards. */
/* `margin: 0` is not decoration: dashboard.css carries a `form label`
   blanket with `margin-bottom: .5rem`, and this field is a <label>. With the
   bar bottom-aligned, that stray half-rem is part of the field's margin box,
   so the control sat 8px above the button that submits it at every width. */
.cmpw-select {
  display: flex;
  flex-direction: column;
  gap: var(--c-space-2);
  margin: 0;
  min-width: 0;
}
.cmpw-select > span {
  color: var(--c-text-muted);
  font-size: var(--c-t-label);
  font-weight: var(--c-w-medium);
}
.cmpw-select__control {
  min-block-size: 40px;
  min-inline-size: 9.5rem;
  padding-block: var(--c-space-2);
  padding-inline: var(--c-space-3);
  border: 1px solid var(--c-line);
  border-radius: var(--c-r-control);
  background: var(--c-inset);
  color: var(--c-text);
  font: inherit;
  font-size: var(--c-t-meta);
}
.cmpw-select__control:focus-visible {
  outline: 2px solid var(--c-evidence);
  outline-offset: 1px;
}

.cmpw-cols {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--c-space-5);
  align-items: start;
  margin-block-end: var(--c-space-5);
}
/* Three or four providers: the same one ruler, one column each. */
.cmpw-cols--n3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cmpw-cols--n4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.cmpw-col { display: grid; gap: var(--c-space-4); align-content: start; }
.cmpw-col__name-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--c-space-2);
}
.cmpw-col__name {
  margin: 0;
  color: var(--c-text);
  font-size: var(--c-t-h3);
  font-weight: var(--c-w-semi);
}
.cmpw-col__tag {
  color: var(--c-text-faint);
  font-family: var(--c-mono);
  font-size: var(--c-t-label);
  word-break: break-all;
}
.cmpw-col__kindnote {
  margin: 0;
  color: var(--c-text-muted);
  font-size: var(--c-t-meta);
  line-height: 1.55;
}
/* Both columns now carry a classification line and a rate block, so the
   ladders start at the same height. The two floors stay because the two
   names are not the same length and the refusal to publish a rate takes
   three lines where a published rate takes two: without them the ladder of
   figures in one column slid out of step with the other's. */
.cmpw-col__head { min-block-size: 5.5rem; }
.cmpw-col__rate { min-block-size: 6.5rem; }
.cmpw-col__figure {
  display: block;
  margin: 0;
  color: var(--c-text);
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  font-weight: var(--c-w-figure, 650);
  letter-spacing: -0.03em;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
[dir="rtl"] .cmpw-col__figure { letter-spacing: 0; }
.cmpw-col__ci {
  display: block;
  margin-block-start: var(--c-space-1);
  color: var(--c-text-muted);
  font-size: var(--c-t-meta);
  font-variant-numeric: tabular-nums;
}
.cmpw-rows { margin: 0; padding: 0; }
.cmpw-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--c-space-3);
  padding-block: var(--c-space-3);
  border-block-end: 1px solid color-mix(in srgb, var(--c-line) 70%, transparent);
}
.cmpw-row:last-child { border-block-end: 0; }
.cmpw-row dt {
  min-width: 0;
  color: var(--c-text-muted);
  font-size: var(--c-t-meta);
}
.cmpw-row dd {
  margin: 0;
  color: var(--c-text);
  font-size: var(--c-t-meta);
  font-weight: var(--c-w-semi);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.cmpw-calib { margin-block-start: var(--c-space-2); }
.cmpw-calib__cap {
  margin: 0 0 var(--c-space-3);
  color: var(--c-text-muted);
  font-size: var(--c-t-label);
  line-height: 1.5;
}
.cmpw-note {
  margin: 0;
  max-inline-size: 78ch;
  color: var(--c-text-secondary);
  font-size: var(--c-t-meta);
  line-height: 1.65;
}
.cmpw-note + .cmpw-note { margin-block-start: var(--c-space-3); }
/* The note that belongs to the head rather than to a section under it. */
.cmpw-lede-note { margin-block: var(--c-space-4) var(--c-space-5); }
.cmpw-note a { color: var(--c-evidence); }


/* ---------------------------------------------------------------------------
   Narrow widths
   --------------------------------------------------------------------------- */
/* Four panels at 1440 are ~320px each, which a headline and a calibration
   table still fit; below 80rem they would not, so three and four fall to a
   two-up grid there. */
@media (max-width: 80rem) {
  .cmpw-splits--n3,
  .cmpw-splits--n4,
  .cmpw-cols--n3,
  .cmpw-cols--n4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 62rem) {
  .cmpw-sheets { --cmpw-label: clamp(8rem, 26vw, 13rem); }
}
@media (max-width: 48rem) {
  .cmpw-splits,
  .cmpw-splits--n3,
  .cmpw-splits--n4,
  .cmpw-cols,
  .cmpw-cols--n3,
  .cmpw-cols--n4 { grid-template-columns: minmax(0, 1fr); }
  /* Stacked, the two columns are no longer side by side, so the floors that
     kept them in step are only empty space. */
  .cmpw-col__head,
  .cmpw-col__rate { min-block-size: 0; }
  .cmpw-foot { align-items: stretch; }
}
@media (max-width: 40rem) {
  .cmpw-picker { inline-size: 100%; }
  .cmpw-pick { flex: 1 1 100%; max-inline-size: none; }
  /* A slot is a full-width row: the field, and its remove button at the end
     of the same line. The "vs" gets the line above it to itself, centred,
     as it had when the fields were bare. */
  .cmpw-slot { flex: 1 1 100%; max-inline-size: none; flex-wrap: wrap; }
  .cmpw-slot .cmpw-pick { flex: 1 1 0; }
  .cmpw-slot--select .cmpw-select { flex: 1 1 0; }
  .cmpw-slot__remove { inline-size: 44px; block-size: 44px; }
  .cmpw-add,
  .cmpw-submit { flex: 1 1 100%; }
  .cmpw-picker__vs { inline-size: 100%; text-align: center; }
  /* 44px is the floor a finger needs, and it applies to the field and to the
     button that submits it. */
  .cmpw-select__control { inline-size: 100%; min-inline-size: 0; min-block-size: 44px; }
  .cmpw-select { flex: 1 1 100%; }
  .cmpw-shortcuts__list { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  .cmpw-shortcut { transition: none; }
}
@media (forced-colors: active) {
  .cmpw-sheet__tick { background: CanvasText; }
  .cmpw-sheet__tick--c,
  .cmpw-sheet__tick--d { background: none; border-color: CanvasText; }
  .cmpw-plot__line { stroke: CanvasText; }
}


/* ===========================================================================
   The blankets, answered
   ===========================================================================
   Everything below exists because a site-wide rule loaded *after* this sheet
   declares the same property with !important. Each block says which one.
   Nothing here invents a value: every one restates what am-system.css
   already says, at the weight needed to keep it.

   page-unification.css sits inside bundle-shell.css, and bundle-shell.css is
   linked after {% block extra_css %} in base.html. That ordering is what
   stops a page sheet from breaking the shell, and it is also why these
   selectors are long.

   Why `#main-content`. Two of the blankets are `:is(...)` groups whose widest
   argument carries `:not(…, #search-input)`, and `:not()` takes the
   specificity of its most specific argument — so an id inside it makes the
   whole selector id-weighted and no chain of classes can outrank it. The one
   id every page body already sits inside is `#main-content` in base.html, so
   that is the anchor. */

/* brand.css: `form input[type="text"], form input[type="search"], … ` gives
   every text field inside a form a 1px border, a 10px radius, a filled
   ground and 0.75rem/1rem of padding. `.am-search__input` is in the `:not()`
   exclusion list of the three *other* blanket input rules, but not in this
   one -- and this one is a type-and-attribute selector, so the component's
   single class loses to it. Measured: a 235px bordered, filled box with its
   own radius, sitting inside the 299px pill, with the text pushed 16px off
   the icon.

   PROMOTE to am-system: the fix belongs beside `.am-search__input`'s own
   declarations, because every page that puts the SearchField inside a <form>
   -- which is every page that submits it -- has this defect. It is restated
   here only until then. */
#main-content .cmpw-page .cmpw-pick .cmpw-pick__input {
  min-height: 0;
  padding-block: var(--c-space-2);
  padding-inline: 0;
  border: 0;
  border-radius: 0;
  background: none;
}

/* `[hidden]` is the whole mechanism of the picker's add and remove, and the
   UA's `display: none` for it is weaker than any class that sets display --
   .am-btn is inline-flex, .cmpw-slot is flex. So the attribute is restated
   here at the weight that beats both, on this page's pickers only. */
#main-content .cmpw-page [data-cmpw-picker] [hidden] { display: none !important; }

/* page-unification.css: `:is(button[type="submit"]:not(.am-form__submit,
   .rf-search__go, .nf-search-submit, .am-search__submit), …)` paints every
   other submit button with the legacy brand gradient, white text and
   weight 800, and theme-foundation.css repeats it per theme. .am-btn is in
   none of those exclusion lists. The 2026 primary button inverts against the
   ground — a dark pill — and it is the same mechanic as the active segment
   beside it. */
#main-content .cmpw-page .cmpw-submit.am-btn--primary {
  min-height: 44px !important;
  border: 1px solid var(--c-text) !important;
  border-radius: var(--c-r-pill) !important;
  background-color: var(--c-text) !important;
  background-image: none !important;
  color: var(--c-canvas) !important;
  -webkit-text-fill-color: var(--c-canvas) !important;
  font-weight: var(--c-w-semi) !important;
  box-shadow: none !important;
}
#main-content .cmpw-page .cmpw-submit.am-btn--primary:hover {
  background-color: color-mix(in srgb, var(--c-text) 86%, var(--c-canvas)) !important;
}

/* The same sheets' control rules paint every `select` with a legacy card or
   near-white fill, three of them id-weighted. A provider picker is a control
   in a filter bar, so it sits on the inset ground like every other control in
   the 2026 system. */
#main-content .cmpw-page .cmpw-select .cmpw-select__control {
  border: 1px solid var(--c-line) !important;
  border-radius: var(--c-r-control) !important;
  background: var(--c-inset) !important;
  color: var(--c-text) !important;
  box-shadow: none !important;
}

/* Two ink blankets, neither id-weighted, so what is needed here is
   specificity and not force:

   page-unification.css `body[class^="page-"] .main-content p { color: inherit }`
   and canvas-bridge.css's light-theme net (`:root[data-theme="light"] p`,
   `[class*="-sub"]`, `[class*="-meta"]`) between them decide the ink of every
   paragraph on the page. Both are two class-level selectors, so naming the
   page, the page ground and the paragraph's own class is enough — and it is
   the same value this sheet already declares above, restated rather than
   redecided. */
body.page-compare .cmpw-page p.cmpw-subtitle,
body.page-compare .cmpw-page p.cmpw-meta,
body.page-compare .cmpw-page p.cmpw-narr__k,
body.page-compare .cmpw-page p.cmpw-split__note,
body.page-compare .cmpw-page p.cmpw-col__kindnote,
body.page-compare .cmpw-page p.cmpw-calib__cap { color: var(--c-text-muted); }
body.page-compare .cmpw-page p.cmpw-basis,
body.page-compare .cmpw-page p.cmpw-note,
body.page-compare .cmpw-page p.cmpw-foot__note { color: var(--c-text-secondary); }

/* am-system.css: `:root[data-theme="light"] .am-table tbody th` paints a row
   header in full text colour, and it is right to: in a leaderboard the row
   header is the provider's name, which is the row's content. In these two
   sheets the roles are the other way round — the row header is the metric's
   *label* and the content is the two figures beside it — and a label as
   strong as the figure is what stops the eye running across the row. Five
   class-level selectors, because that rule is three and loads later. */
body.page-compare .cmpw-sheets .am-table.cmpw-sheet tbody th[scope="row"] {
  color: var(--c-text-secondary);
}

/* canvas-bridge.css: `a[class*="btn"][class*="primary"]` and its button
   sibling predate any real button component and force an accent fill. The
   ghost kind at the foot of the page must stay what it is. */
#main-content .cmpw-page a.cmpw-quiet-link.am-btn {
  background: none !important;
  border-color: transparent !important;
  color: var(--c-text-secondary) !important;
  -webkit-text-fill-color: currentcolor !important;
}
#main-content .cmpw-page a.cmpw-quiet-link.am-btn:hover {
  background: var(--c-inset) !important;
  color: var(--c-text) !important;
}
