:root {
  --paper: #EEF2F5;
  --surface: #FFFFFF;
  --ink: #142230;
  --muted: #566574;
  --rule: #CED7DF;
  --bid: #1C5DCB;
  --bid-soft: #DCE7F8;
  --ask: #B33A2C;
  --ask-soft: #F6E1DD;
  --display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --prose: "Source Serif 4", Georgia, serif;
  --measure: 68ch;
  --wide: 72rem;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0F1720; --surface: #16212C; --ink: #E6EDF3; --muted: #93A3B2;
    --rule: #2A3846; --bid: #7AA7F2; --bid-soft: #1B2C45; --ask: #E58A7D; --ask-soft: #3A2421;
  }
}
:root[data-theme="dark"] {
  --paper: #0F1720; --surface: #16212C; --ink: #E6EDF3; --muted: #93A3B2;
  --rule: #2A3846; --bid: #7AA7F2; --bid-soft: #1B2C45; --ask: #E58A7D; --ask-soft: #3A2421;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--prose); font-size: 1.0625rem; line-height: 1.65;
}
a { color: var(--bid); text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--bid); outline-offset: 2px; border-radius: 2px; }
img { max-width: 100%; }

h1, h2, h3 {
  font-family: var(--display); font-stretch: 125%; line-height: 1.08;
  letter-spacing: -0.01em; margin: 0 0 0.5em;
}
h1 { font-size: clamp(2rem, 5.2vw, 3.4rem); font-weight: 800; }
h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); font-weight: 750; margin-top: 2.2em; }
h3 { font-size: 1.15rem; font-weight: 700; margin-top: 1.6em; }
p, ul, ol { max-width: var(--measure); }
.num, table, .ladder, .site-nav, .meta, .btn, .toggle, label, .facts dt {
  font-family: var(--display); font-variant-numeric: tabular-nums;
}

.wrap { max-width: var(--wide); margin: 0 auto; padding: 0 16px; }
@media (min-width: 700px) { .wrap { padding: 0 32px; } }

/* header */
.site-head { border-bottom: 1px solid var(--rule); background: var(--surface); }
.site-head .wrap { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.5rem 1.5rem; padding-top: 14px; padding-bottom: 14px; }
.brand { font-family: var(--display); font-stretch: 125%; font-weight: 800; font-size: 1.15rem; color: var(--ink); text-decoration: none; margin-right: auto; }
.brand span { color: var(--bid); }
.site-nav { display: flex; flex-wrap: wrap; gap: 0.25rem 1.1rem; font-size: 0.95rem; }
.site-nav a { color: var(--ink); text-decoration: none; }
.site-nav a:hover, .site-nav a[aria-current] { color: var(--bid); text-decoration: underline; }

.disclosure-bar { font-family: var(--display); font-size: 0.85rem; color: var(--muted); padding: 10px 0; border-bottom: 1px solid var(--rule); }
.disclosure-bar p { margin: 0; max-width: none; }

main { padding: 32px 0 64px; }
.lede { font-size: 1.2rem; color: var(--muted); max-width: 60ch; }
.meta { font-size: 0.875rem; color: var(--muted); }

/* hero ladder */
.hero { display: grid; gap: 32px; align-items: start; padding-bottom: 16px; }
@media (min-width: 960px) { .hero { grid-template-columns: 5fr 7fr; gap: 48px; } }
.ladder-panel { background: var(--surface); border: 1px solid var(--rule); border-radius: 6px; padding: 20px 16px; }
@media (min-width: 700px) { .ladder-panel { padding: 24px; } }
.controls { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: end; margin-bottom: 18px; }
.toggle { display: inline-flex; border: 1px solid var(--rule); border-radius: 4px; overflow: hidden; }
.toggle button {
  font: inherit; font-size: 0.95rem; font-weight: 600; padding: 8px 14px; border: 0;
  background: transparent; color: var(--ink); cursor: pointer; min-height: 40px;
}
.toggle button[aria-pressed="true"] { background: var(--ink); color: var(--surface); }
.field { display: grid; gap: 4px; font-size: 0.875rem; color: var(--muted); }
.field input {
  font: inherit; font-family: var(--display); font-variant-numeric: tabular-nums; font-size: 1rem; color: var(--ink);
  width: 9rem; padding: 7px 10px; border: 1px solid var(--rule); border-radius: 4px; background: var(--paper); min-height: 40px;
}
.ladder { list-style: none; margin: 0; padding: 0; max-width: none; font-size: 0.95rem; }
.ladder li {
  display: grid; grid-template-columns: 1.6rem minmax(7.5rem, 11rem) 1fr auto; gap: 10px; align-items: center;
  padding: 7px 8px; border-bottom: 1px solid var(--rule);
}
.ladder li:last-child { border-bottom: 0; }
.ladder .rank { color: var(--muted); font-size: 0.85rem; }
.ladder .who a { color: var(--ink); text-decoration: none; font-weight: 600; }
.ladder .who a:hover { text-decoration: underline; }
.ladder .who small { display: block; color: var(--muted); font-size: 0.78rem; font-weight: 400; }
.ladder .bar { height: 10px; background: var(--rule); border-radius: 1px; position: relative; }
.ladder .bar i { position: absolute; inset: 0 auto 0 0; background: var(--muted); border-radius: 1px; }
.ladder .cost { font-weight: 700; text-align: right; min-width: 5.5rem; }
.ladder li.low { background: var(--bid-soft); }
.ladder li.low .bar i { background: var(--bid); }
.ladder li.high { background: var(--ask-soft); }
.ladder li.high .bar i { background: var(--ask); }
@media (max-width: 520px) {
  .ladder li { grid-template-columns: 1.4rem 1fr auto; }
  .ladder .bar { grid-column: 2 / 4; grid-row: 2; }
}
.ladder-note { font-family: var(--display); font-size: 0.8rem; color: var(--muted); margin: 14px 0 0; max-width: none; }
@media (prefers-reduced-motion: no-preference) {
  .ladder .bar i { transition: width 280ms ease-out; }
}

/* tables */
.table-scroll { overflow-x: auto; border: 1px solid var(--rule); border-radius: 6px; background: var(--surface); margin: 16px 0 8px; }
table { border-collapse: collapse; width: 100%; font-size: 0.92rem; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--rule); vertical-align: top; }
thead th { font-weight: 700; background: var(--paper); white-space: nowrap; }
tbody tr:last-child td, tbody tr:last-child th { border-bottom: 0; }
tbody th { font-weight: 600; white-space: nowrap; }
td.n { text-align: right; white-space: nowrap; }
td.best { color: var(--bid); font-weight: 700; }
td.dim { color: var(--muted); }

/* broker grid */
.broker-groups { display: grid; gap: 28px; }
@media (min-width: 800px) { .broker-groups { grid-template-columns: repeat(3, 1fr); } }
.broker-groups h3 { margin-top: 0; padding-bottom: 6px; border-bottom: 2px solid var(--ink); }
.broker-groups ul { list-style: none; padding: 0; margin: 0; }
.broker-groups li { padding: 8px 0; border-bottom: 1px solid var(--rule); }
.broker-groups li a { font-family: var(--display); font-weight: 600; }
.broker-groups li span { display: block; font-size: 0.92rem; color: var(--muted); }

/* review pages */
.review-head { display: grid; gap: 16px; margin-bottom: 8px; }
.btn {
  display: inline-block; font-weight: 700; font-size: 1rem; background: var(--bid); color: #fff;
  padding: 11px 18px; border-radius: 4px; text-decoration: none; justify-self: start;
}
.btn:hover { filter: brightness(1.08); text-decoration: none; }
.facts { display: grid; grid-template-columns: 1fr; margin: 20px 0; border: 1px solid var(--rule); border-radius: 6px; background: var(--surface); max-width: 52rem; }
.facts div { display: grid; grid-template-columns: minmax(8rem, 13rem) 1fr; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--rule); }
.facts div:last-child { border-bottom: 0; }
.facts dt { font-weight: 600; font-size: 0.92rem; }
.facts dd { margin: 0; }
@media (max-width: 560px) { .facts div { grid-template-columns: 1fr; gap: 2px; } }
.verdict { display: grid; gap: 16px; max-width: 52rem; }
@media (min-width: 700px) { .verdict { grid-template-columns: 1fr 1fr; } }
.verdict section { border-left: 4px solid var(--bid); padding: 2px 0 2px 14px; }
.verdict section.warn { border-left-color: var(--ask); }
.verdict h3 { margin-top: 0; }
.verdict p { margin: 0; }

/* timeline */
.timeline { list-style: none; padding: 0; margin: 16px 0; max-width: 52rem; }
.timeline li { display: grid; grid-template-columns: 7.5rem 1fr; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--rule); }
.timeline time { font-family: var(--display); font-weight: 600; font-variant-numeric: tabular-nums; }
.timeline strong { font-family: var(--display); }
@media (max-width: 560px) { .timeline li { grid-template-columns: 1fr; gap: 2px; } }

.callout { background: var(--surface); border: 1px solid var(--rule); border-left: 4px solid var(--ask); padding: 14px 16px; border-radius: 4px; max-width: 52rem; margin: 24px 0; }
.callout p { margin: 0; }
.sources { font-size: 0.9rem; word-break: break-word; }

.site-foot { border-top: 1px solid var(--rule); background: var(--surface); padding: 28px 0 40px; font-family: var(--display); font-size: 0.875rem; color: var(--muted); }
.site-foot p { max-width: 80ch; }
.site-foot a { color: var(--ink); }
