      :root {
        color-scheme: light dark;
        /* dark is the base (default); light applies via prefers-color-scheme */
        /* Two layers: html paints the canvas, body paints the content
           column. Without an explicit html background, body's would
           propagate to the canvas and the frame would disappear. */
        --canvas: #181a1b;
        --bg: #131516;
        --text: #e8e6e3;
        --heading: #f4f2ef;
        --prose: #c4bfb6;
        --muted: #988f81;
        --btn-bg: #262a2b;
        --btn-border: var(--muted);
        --thead-border: var(--muted);
        /* Site tab bar: one border colour everywhere, the tabs carry the
           only different background. */
        --tab-bg: #1e2223;
        --tab-border: #3a3f41;
        /* Row borders sit well below --muted: a quiet separator line,
           not a second text color. */
        --row-border: #423e39;
        /* Neutral inline monospace chip. */
        --code-bg: #23282b;
        --code-fg: #f2f0ec;
        /* Hover and the expanded detail rows share one color, so a
           clicked row and its dropdown read as one block. */
        --row-hover: var(--btn-bg);
        --status: #e06c60;
        --up: #7bb98c;
        --down: #de8482;
        --flat: #7fa6d9;
      }
      @media (prefers-color-scheme: light) {
        :root {
          --canvas: #f6f3ec;
          --bg: #f6f3ec;
          --text: #33302b;
          --heading: #22201c;
          --prose: #4a453e;
          --muted: #686056;
          --btn-bg: #e9e4d8;
          --row-border: #d5cfc3;
          --status: #b03a2a;
          --up: #2e7d4f;
          --down: #b0392b;
          --flat: #3a6ea5;
          --tab-bg: #e9e4d8;
          --tab-border: #d5cfc3;
          --code-bg: #e9e4d8;
          --code-fg: #22201c;
        }
      }
      html {
        background: var(--canvas);
      }
      * {
        box-sizing: border-box;
      }
      body {
        font-family:
          system-ui,
          -apple-system,
          "Segoe UI",
          sans-serif;
        max-width: 120rem;
        width: calc(100% - 2 * clamp(1rem, 4vw, 4rem));
        margin: 2rem auto;
        padding: 0.5rem clamp(1rem, 2vw, 2rem) 2rem;
        line-height: 1.45;
        background: var(--bg);
        color: var(--text);
      }
      h1 {
        font-size: 1.6rem;
        color: var(--heading);
        margin: 0.25rem 0 0.2rem;
      }
      /* Section and page headings share one consistent scale across all
         four pages; h2 sits tight above its .intro / .hint subtitle. */
      h2 {
        font-size: 1.28rem;
        color: var(--heading);
        margin: 1.5rem 0 0.25rem;
        line-height: 1.3;
      }
      h3 {
        font-size: 1.08rem;
        color: var(--heading);
        margin: 1.65rem 0 0.45rem;
        line-height: 1.35;
      }
      .sub {
        color: var(--muted);
        margin: 0;
        font-size: 0.95rem;
      }
      /* Page intro: the one-liner under a page's h2 (and under "Ranked
         picks" on the landing). */
      .intro {
        color: var(--muted);
        font-size: 0.88rem;
        margin: 0 0 1.1rem;
        max-width: 58rem;
      }
      /* Site tab bar — pure border geometry. Inactive tabs draw a 1px
         border on all four sides and .sitenav::after draws the trailing
         1px baseline; the active tab sets border-bottom: none with
         align-items: stretch so no border ever exists underneath it and
         no overlay box can mis-snap at fractional HiDPI scaling. */
      .sitenav {
        display: flex;
        align-items: stretch;
        gap: 0;
        margin: 1.4rem 0 0;
        font-size: 0.95rem;
      }
      .sitenav::after {
        content: "";
        flex: 1;
        border-bottom: 1px solid var(--tab-border);
      }
      .sitenav a {
        color: var(--muted);
        text-decoration: none;
        padding: 0.5rem 1.1rem;
        background: var(--tab-bg);
        border: 1px solid var(--tab-border);
        border-radius: 8px 8px 0 0;
      }
      .sitenav a + a {
        margin-left: -1px;
      }
      .sitenav a:hover {
        color: var(--text);
      }
      .sitenav a:focus-visible {
        position: relative;
        z-index: 1;
      }
      .sitenav a.active {
        background: var(--bg);
        color: var(--heading);
        font-weight: 600;
        border-bottom: none;
      }
      /* Four labels need ~460px: below that the bar wraps into blocks and
         drops the trailing baseline rather than widening the page. */
      @media (max-width: 48rem) {
        .sitenav {
          flex-wrap: wrap;
          gap: 4px;
        }
        .sitenav::after {
          content: none;
        }
        .sitenav a,
        .sitenav a.active {
          border-bottom: 1px solid var(--tab-border);
          border-radius: 8px;
        }
        .sitenav a + a {
          margin-left: 0;
        }
      }
      .tabs {
        display: flex;
        align-items: center;
        flex-wrap: wrap;
        gap: 0.5rem;
        margin: 1.25rem 0 0.75rem;
      }
      .tabs button {
        border: 1px solid var(--btn-border);
        background: var(--bg);
        color: inherit;
        padding: 0.35rem 0.9rem;
        border-radius: 999px;
        cursor: pointer;
        font: inherit;
        transition:
          background-color 0.15s,
          border-color 0.15s;
      }
      .tabs button:hover:not(.active) {
        background: var(--btn-bg);
        border-color: var(--btn-border);
      }
      .tabs button.active {
        background: var(--btn-bg);
        color: var(--text);
        border-color: var(--btn-border);
      }
      /* the stamp centers on the tabs line: flex: 1 makes its box the
         gap between the priority group and the view buttons, so
         text-align: center centers it between the two sets */
      .tabs .stamp {
        flex: 1 1 auto;
        text-align: center;
        font-size: 0.85rem;
        color: var(--muted);
      }
      /* Simple/Expert view toggle. Expert is the default (all 14
         columns); simple shows rank, 7-day, model, quality, in, out,
         discount, age and hides the legend for the absent columns. The
         body class is flipped by app.js (setView/applyView). */
      .view-simple .hide-simple {
        display: none;
      }
      #table .lbl-simple {
        display: none;
      }
      .view-simple #table .lbl-simple {
        display: inline;
      }
      .view-simple #table .lbl-expert {
        display: none;
      }
      .actions button {
        border: 1px solid var(--btn-border);
        background: var(--btn-bg);
        color: var(--text);
        padding: 0.4rem 0.9rem;
        margin-top: 1rem;
        border-radius: 6px;
        cursor: pointer;
        font: inherit;
      }
      .actions button:disabled {
        opacity: 0.5;
        cursor: default;
      }
      .hint {
        font-size: 0.85rem;
        color: var(--muted);
        margin: 0.5rem 0 0.65rem;
      }
      /* An All-view note that rides next to a section heading without
         inheriting the heading's size, weight, or colour. */
      .heading-note {
        font-size: 0.85rem;
        font-weight: 400;
        color: var(--muted);
      }
      /* Inline monospaced text stands out as a neutral rounded chip across
         all four pages (including model IDs in Weekly highlights). */
      code {
        font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
        font-size: 0.87em;
        background: var(--code-bg);
        color: var(--code-fg);
        padding: 0.12em 0.4em;
        border-radius: 4px;
      }
      pre code {
        background: none;
        padding: 0;
        border-radius: 0;
        color: inherit;
        font-size: inherit;
      }
      .status {
        color: var(--status);
        margin: 0.75rem 0;
      }
      .table-wrap {
        max-width: 100%;
        overflow-x: auto;
      }
      #table,
      #deals {
        border-collapse: collapse;
        width: 100%;
        margin-top: 1rem;
        font-family: ui-monospace, monospace;
        font-size: 0.9rem;
      }
      #table th,
      #table td,
      #deals th,
      #deals td {
        padding: 0.3rem 0.6rem;
        text-align: right;
        border-bottom: 1px solid var(--row-border);
        white-space: nowrap;
      }
      #table th:nth-child(3),
      #table td:nth-child(3) {
        text-align: left;
      }
      #deals th:nth-child(1),
      #deals td:nth-child(1) {
        text-align: left;
      }
      #table thead th,
      #deals thead th {
        border-bottom: 2px solid var(--thead-border);
      }
      #table .movement {
        text-align: center;
      }
      #table .caveat {
        color: var(--muted);
      }
      #table .na,
      #deals .na,
      #table .depth-table .depth-unlabeled td {
        color: var(--muted);
      }
      #table .depth-table .depth-recommended td:first-child {
        color: var(--flat);
        font-weight: 600;
      }
      #table tbody tr[role="button"] {
        cursor: pointer;
      }
      #table tbody tr[role="button"]:focus {
        outline: 1px solid var(--flat);
        outline-offset: -2px;
      }
      /* Clickable rows lift on hover; while a row's dropdown is open the
         row keeps that color too (aria-expanded), so the clicked row and
         its detail rows read as one highlighted block. */
      #table tbody tr[role="button"]:hover td,
      #table tbody tr[role="button"][aria-expanded="true"] td {
        background: var(--row-hover);
      }
      /* The deals table is not clickable, but its rows hover like the
         main table's so both tables read the same way. */
      #deals tbody tr:hover td {
        background: var(--row-hover);
      }
      #table .endpoint-note {
        color: var(--muted);
        margin: 0.1rem 0;
        font-size: 0.72rem;
      }
      #table tr.endpoint-row > td {
        padding: 0.15rem 0.6rem 0.3rem;
        background: var(--row-hover);
        font-size: 0.8rem;
      }
      #table tr.depth-row td {
        padding-top: 0.15rem;
        padding-bottom: 0.15rem;
      }
      #table .detail-heading {
        margin: 0.1rem 0;
        font-weight: 600;
        text-align: left;
      }
      #table tr.endpoint-row table {
        width: 100%;
        font-size: 0.75rem;
      }
      #table tr.endpoint-row table th,
      #table tr.endpoint-row table td {
        padding: 0.1rem 0.4rem;
        font-size: 0.72rem;
      }
      #table .depth-table th:first-child,
      #table .depth-table td:first-child {
        text-align: left;
      }
      /* The main table's nth-child(3) MODEL alignment also matches the
         nested table's third column; keep the depth numbers right-aligned. */
      #table .depth-table th:nth-child(n + 2),
      #table .depth-table td:nth-child(n + 2) {
        text-align: right;
      }
      #table .depth-table .not-selectable {
        color: var(--muted);
      }
      #table .depth-table button {
        border: 1px solid var(--btn-border);
        background: var(--btn-bg);
        color: var(--text);
        padding: 0.1rem 0.4rem;
        border-radius: 4px;
        cursor: pointer;
        font: inherit;
      }
      #table [title],
      #deals [title] {
        cursor: help;
        text-decoration: underline dotted;
        text-underline-offset: 3px;
      }
      /* max-width is ignored on <td> in auto table layout, so the SCHEDULE
         text clips on an inner inline-block span instead (measured there). */
      #deals .schedule-text {
        display: inline-block;
        max-width: 25ch;
        overflow: hidden;
        text-overflow: ellipsis;
        vertical-align: bottom;
      }
      /* text-decoration does not propagate into the inline-block clip
         wrapper, so underline it directly when the cell is clipped (the
         cell then carries the title). */
      #deals td[title] .schedule-text {
        text-decoration: underline dotted;
        text-underline-offset: 3px;
      }
      .main-actions button {
        float: right;
        margin: 0.9rem 0 0.7rem 1rem;
      }
      .deals-actions button {
        float: right;
        margin: 0.9rem 0 0.7rem;
      }
      #deals-section,
      .actions {
        clear: both;
      }
      .movement.up {
        color: var(--up);
      }
      .movement.down {
        color: var(--down);
      }
      .movement.flat {
        color: var(--flat);
      }
      .movement.new {
        color: var(--up);
      }
      #highlights {
        margin-top: 1.75rem;
        max-width: 62rem;
      }
      #highlights h3 {
        font-size: 1rem;
        margin: 1.05rem 0 0.3rem;
      }
      #highlights p {
        margin: 0 0 0.5rem;
        font-size: 0.92rem;
        line-height: 1.65;
        color: var(--prose);
      }
      /* Prose container for the non-table pages (plugin, how-to-use, faq):
         keeps line length comfortable while tables on Picks use full width. */
      /* Long-form pages (FAQ, How to use): a sticky "On this page"
         column to the right of the article. The article keeps at least
         450px; below that the TOC moves above it and stops sticking. */
      .page-with-toc {
        display: grid;
        /* The text column keeps its 56rem reading measure; the TOC
           grows to 500px and starts at the text column's right edge,
           instead of being pushed to the far right of the page. */
        grid-template-columns: minmax(450px, 56rem) minmax(15rem, 500px);
        justify-content: start;
        gap: clamp(1.5rem, 3vw, 2.5rem);
        align-items: start;
      }
      .page-with-toc .toc {
        position: sticky;
        top: 1rem;
        max-height: calc(100vh - 2rem);
        overflow-y: auto;
        padding-left: 0.9rem;
        border-left: 1px solid var(--row-border);
        font-size: 0.82rem;
        line-height: 1.35;
      }
      .toc-title {
        margin: 0 0 0.45rem;
        font-size: 0.72rem;
        font-weight: 600;
        letter-spacing: 0.05em;
        text-transform: uppercase;
        color: var(--muted);
      }
      .toc ul {
        margin: 0;
        padding: 0;
        list-style: none;
      }
      .toc li + li {
        margin-top: 0.35rem;
      }
      .toc a {
        color: var(--muted);
        text-decoration: none;
      }
      .toc a:hover {
        color: var(--text);
        text-decoration: underline;
      }
      /* Anchor targets clear the viewport edge when the TOC jumps. */
      .faq-item h3 {
        scroll-margin-top: 1rem;
      }
      @media (max-width: 52rem) {
        .page-with-toc {
          grid-template-columns: minmax(0, 1fr);
          gap: 1rem;
        }
        .page-with-toc .toc {
          order: -1;
          position: static;
          max-height: none;
          overflow: visible;
          padding: 0 0 0.85rem;
          border-left: 0;
          border-bottom: 1px solid var(--row-border);
        }
      }
      .prose {
        max-width: 56rem;
        min-width: 0;
        line-height: 1.55;
      }
      .prose p {
        margin: 0 0 0.65rem;
      }
      .prose p:not(.hint) {
        color: var(--prose);
      }
      .prose ul {
        margin: 0.25rem 0 0.85rem;
        padding-left: 1.35rem;
        color: var(--prose);
      }
      .prose li + li {
        margin-top: 0.35rem;
      }
      .prose strong {
        color: var(--text);
      }
      .prose h3 + p {
        margin-top: 0;
      }
      .faq-item + .faq-item {
        border-top: 1px solid var(--row-border);
        padding-top: 1.2rem;
        margin-top: 1.35rem;
      }
      .faq-item h3 {
        margin-top: 0;
      }
      /* Code and config blocks: static syntax highlighting (tokens marked
         up by hand in the HTML). */
      .jsonbox {
        background: var(--tab-bg);
        border: 1px solid var(--tab-border);
        border-radius: 6px;
        padding: 0.7rem 0.95rem;
        font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
        font-size: 0.84rem;
        line-height: 1.5;
        overflow-x: auto;
        margin: 0.5rem 0 0.85rem;
        color: var(--text);
      }
      .jsonbox .jk {
        color: var(--flat);
      }
      .jsonbox .js {
        color: var(--up);
      }
      .jsonbox .jp {
        color: var(--muted);
      }
      /* Content tables on the plugin page (aliases, shortcuts). */
      .info {
        border-collapse: collapse;
        width: 100%;
        margin: 0.55rem 0 0.85rem;
        font-size: 0.9rem;
      }
      .info th,
      .info td {
        padding: 0.42rem 0.65rem;
        text-align: left;
        border-bottom: 1px solid var(--row-border);
        vertical-align: top;
        color: var(--prose);
      }
      .info th:first-child,
      .info td:first-child {
        white-space: nowrap;
        padding-left: 0;
      }
      .info thead th {
        border-bottom: 2px solid var(--thead-border);
        font-size: 0.8rem;
        text-transform: uppercase;
        letter-spacing: 0.03em;
        color: var(--muted);
      }
      /* Clickable dialog thumbnails on the plugin page. */
      .thumbs {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(240px, 320px));
        align-items: start;
        gap: 1rem;
        margin: 0.75rem 0 1.1rem;
      }
      figure.shot {
        margin: 0;
      }
      figure.shot .shot-link {
        display: block;
        cursor: zoom-in;
      }
      figure.shot img {
        display: block;
        width: 100%;
        height: auto;
        border: 1px solid var(--tab-border);
        border-radius: 6px;
      }
      figure.shot .shot-link:hover img {
        border-color: var(--muted);
      }
      figure.shot figcaption {
        font-size: 0.82rem;
        color: var(--muted);
        margin-top: 0.4rem;
        line-height: 1.4;
      }
      /* Modal screenshot lightbox on the plugin page. Padding is placed on
         .lightbox-body so ev.target === dlg matches only ::backdrop clicks. */
      dialog.lightbox {
        background: var(--bg);
        color: var(--text);
        border: 1px solid var(--tab-border);
        border-radius: 8px;
        padding: 0;
        max-width: min(92vw, 62rem);
        margin: auto;
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7);
      }
      dialog.lightbox::backdrop {
        background: rgba(0, 0, 0, 0.72);
      }
      dialog.lightbox .lightbox-body {
        padding: 0.9rem;
      }
      dialog.lightbox img {
        display: block;
        max-width: 100%;
        max-height: calc(85vh - 4.5rem);
        width: auto;
        height: auto;
        margin: 0 auto;
        border-radius: 4px;
      }
      dialog.lightbox .lightbox-bar {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 1rem;
        margin-top: 0.6rem;
        font-size: 0.85rem;
        color: var(--muted);
      }
      dialog.lightbox button {
        border: 1px solid var(--btn-border);
        background: var(--btn-bg);
        color: var(--text);
        padding: 0.25rem 0.75rem;
        border-radius: 999px;
        cursor: pointer;
        font: inherit;
      }
      footer {
        margin-top: 2rem;
        padding-top: 0.85rem;
        border-top: 1px solid var(--row-border);
        font-size: 0.85rem;
        color: var(--muted);
      }
      a {
        color: inherit;
      }
      a:not(.sitenav a) {
        text-decoration: underline;
        text-underline-offset: 2px;
        text-decoration-color: var(--muted);
      }
      a:not(.sitenav a):hover {
        color: var(--heading);
        text-decoration-color: var(--heading);
      }
      /* Consent-first cookie dialog: a bottom-right overlay, shown only
         when no consent decision is stored (app.js gates it). */
      #cookie-dialog {
        position: fixed;
        right: 1.25rem;
        bottom: 1.25rem;
        max-width: 22rem;
        background: var(--btn-bg);
        border: 1px solid var(--btn-border);
        border-radius: 8px;
        padding: 0.9rem 1.1rem;
        box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
        z-index: 10;
        font-size: 0.88rem;
      }
      #cookie-dialog[hidden] {
        display: none;
      }
      #cookie-dialog p {
        margin: 0 0 0.7rem;
      }
      #cookie-dialog .cookie-actions {
        display: flex;
        gap: 0.5rem;
        justify-content: flex-end;
      }
      #cookie-dialog button {
        border: 1px solid var(--btn-border);
        background: var(--bg);
        color: inherit;
        padding: 0.3rem 0.9rem;
        border-radius: 999px;
        cursor: pointer;
        font: inherit;
      }

/* Retention view switch (ZDR view / All providers) and quote badges. */
.mode-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-left: 0.4rem;
  font-size: 0.85rem;
}
.mode-switch[hidden] {
  display: none;
}
.mode-label {
  color: var(--muted);
  cursor: pointer;
  user-select: none;
}
.mode-label:hover,
.mode-label.active {
  color: var(--text);
}
.mode-label.active {
  font-weight: 600;
}
.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex: 0 0 auto;
}
.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: var(--btn-bg);
  transition: background-color 0.2s;
}
.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: var(--muted);
  border-radius: 50%;
  transition: transform 0.2s;
}
.switch input:checked + .slider {
  background-color: var(--btn-bg);
}
.switch input:focus-visible + .slider {
  box-shadow: 0 0 0 2px var(--btn-border);
}
.switch input:checked + .slider:before {
  transform: translateX(20px);
}
.slider.round {
  border-radius: 24px;
}
/* Quote badges: small enough not to grow the row's line box. */
.zdr-badge {
  display: inline-block;
  padding: 0 0.25em;
  border-radius: 0.4em;
  font-size: 0.62em;
  line-height: 1.1;
  font-weight: 600;
  letter-spacing: 0.02em;
  border: 1px solid currentColor;
  opacity: 0.8;
}
