/* Truth Trading — design system
 *
 * One stylesheet for all four pages so the surfaces stay identical: the header,
 * hero, toolbar, ranked list, table and detail drawer are the same components
 * everywhere, only their content changes.
 *
 * Colour is token-driven and mode-aware. The status trio was validated for
 * colour-vision separation and surface contrast, and every status colour is
 * always paired with an icon and a text label — never colour alone.
 */

/* ---------------------------------------------------------------- tokens */

:root {
  color-scheme: light dark;

  --canvas: #ffffff;
  --canvas-alt: #f5f5f7;
  --surface: #ffffff;
  --surface-alt: #fafafc;
  --surface-sunken: #f2f2f5;

  --ink: #1d1d1f;
  --ink-80: rgba(29, 29, 31, 0.80);
  --ink-56: rgba(29, 29, 31, 0.56);
  --ink-40: rgba(29, 29, 31, 0.40);

  --hairline: rgba(0, 0, 0, 0.09);
  --hairline-strong: rgba(0, 0, 0, 0.16);

  --action: #0066cc;
  --action-soft: rgba(0, 102, 204, 0.08);

  --danger: #b3261e;
  --danger-soft: rgba(179, 38, 30, 0.09);
  --warn: #e0a030;
  --warn-soft: rgba(224, 160, 48, 0.14);
  --info: #0066cc;
  --info-soft: rgba(0, 102, 204, 0.08);
  --good: #1a7f4b;
  --good-soft: rgba(26, 127, 75, 0.10);

  --rank-1: #b8912a;
  --rank-2: #8a8a92;
  --rank-3: #a46b3a;

  /* Sequential ramp for magnitude (trust score). One hue, light to dark. */
  --ramp-1: #cfe0f2;
  --ramp-2: #9dc0e6;
  --ramp-3: #6a9fd8;
  --ramp-4: #3b7cc4;
  --ramp-5: #1d5aa0;

  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 18px;

  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;

  --shell: 1180px;

  /* Motion. Two speeds only: `fast` for anything the pointer triggers, `slow`
     for entrances. One easing for arrivals (decelerate) and one for exits. */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --t-fast: 160ms;
  --t-mid: 320ms;
  --t-slow: 620ms;
  --t-draw: 1100ms;
}

/* Dark tokens live in a named block applied from three places:
 *   1. the OS preference, for visitors who never touch the toggle;
 *   2. :root[data-theme="dark"], which the toggle sets and which must WIN over
 *      the media query — otherwise a dark-OS visitor cannot choose light;
 *   3. nothing else.
 * The `color-scheme` property alone does NOT do this: it only tells the browser
 * how to paint native widgets and does not re-evaluate prefers-color-scheme, so
 * an earlier toggle flipped a value no stylesheet read and changed no pixels.
 */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --canvas: #131315;
    --canvas-alt: #0e0e10;
    --surface: #1c1c1f;
    --surface-alt: #202024;
    --surface-sunken: #17171a;

    --ink: #f2f2f4;
    --ink-80: rgba(242, 242, 244, 0.80);
    --ink-56: rgba(242, 242, 244, 0.56);
    --ink-40: rgba(242, 242, 244, 0.40);

    --hairline: rgba(255, 255, 255, 0.10);
    --hairline-strong: rgba(255, 255, 255, 0.18);

    --action: #5aa9f5;
    --action-soft: rgba(90, 169, 245, 0.12);

    --danger: #f2776b;
    --danger-soft: rgba(242, 119, 107, 0.14);
    --warn: #e8b45c;
    --warn-soft: rgba(232, 180, 92, 0.16);
    --info: #5aa9f5;
    --info-soft: rgba(90, 169, 245, 0.12);
    --good: #5fce96;
    --good-soft: rgba(95, 206, 150, 0.14);

    --rank-1: #d9b143;
    --rank-2: #b0b0b8;
    --rank-3: #c98a52;

    --ramp-1: #1e3550;
    --ramp-2: #2b5480;
    --ramp-3: #3d76ab;
    --ramp-4: #5b9bd4;
    --ramp-5: #86bcf0;
  }
}


/* Explicit user choice. Outside the media query so it wins in both
 * directions: dark-on-a-light-OS and light-on-a-dark-OS. */
:root[data-theme="dark"] {
    --canvas: #131315;
    --canvas-alt: #0e0e10;
    --surface: #1c1c1f;
    --surface-alt: #202024;
    --surface-sunken: #17171a;

    --ink: #f2f2f4;
    --ink-80: rgba(242, 242, 244, 0.80);
    --ink-56: rgba(242, 242, 244, 0.56);
    --ink-40: rgba(242, 242, 244, 0.40);

    --hairline: rgba(255, 255, 255, 0.10);
    --hairline-strong: rgba(255, 255, 255, 0.18);

    --action: #5aa9f5;
    --action-soft: rgba(90, 169, 245, 0.12);

    --danger: #f2776b;
    --danger-soft: rgba(242, 119, 107, 0.14);
    --warn: #e8b45c;
    --warn-soft: rgba(232, 180, 92, 0.16);
    --info: #5aa9f5;
    --info-soft: rgba(90, 169, 245, 0.12);
    --good: #5fce96;
    --good-soft: rgba(95, 206, 150, 0.14);

    --rank-1: #d9b143;
    --rank-2: #b0b0b8;
    --rank-3: #c98a52;

    --ramp-1: #1e3550;
    --ramp-2: #2b5480;
    --ramp-3: #3d76ab;
    --ramp-4: #5b9bd4;
    --ramp-5: #86bcf0;
}

/* ---------------------------------------------------------------- base */

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--action); }

h1, h2, h3 { margin: 0; letter-spacing: -0.02em; font-weight: 640; }
h1 { font-size: clamp(30px, 4.6vw, 52px); line-height: 1.08; letter-spacing: -0.035em; }
h2 { font-size: 21px; }
h3 { font-size: 16px; }
p { margin: 0; }

.shell { width: 100%; max-width: var(--shell); margin: 0 auto; padding: 0 22px; }
.num { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--ink-56); }
.tiny { font-size: 12px; }
.eyebrow {
  font-size: 11px; font-weight: 600; letter-spacing: 0.09em;
  text-transform: uppercase; color: var(--ink-56);
}
.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* ---------------------------------------------------------------- header */

.site-header {
  position: sticky; top: 0; z-index: 60;
  background: color-mix(in srgb, var(--canvas) 88%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--hairline);
}
.site-header__inner {
  display: flex; align-items: center; gap: 20px; height: 56px;
}
.brand { display: flex; align-items: center; gap: 9px; font-weight: 650; letter-spacing: -0.02em; }
.brand__mark {
  width: 22px; height: 22px; border-radius: 7px; flex: none;
  background: linear-gradient(140deg, var(--action), #7b5cf0);
  display: grid; place-items: center; color: #fff; font-size: 12px; font-weight: 800;
}
.brand__sub { color: var(--ink-40); font-weight: 500; }

/* min-width 0 lets the nav shrink inside the flex header; on a phone the six
 * links are wider than the screen, and without a scroll container here they
 * widened the whole PAGE (259px of horizontal document scroll on a 390px
 * viewport — every page, since the header is shared). The nav scrolls inside
 * itself instead; scrollbar hidden because the affordance is the cut-off link. */
.site-nav { display: flex; gap: 3px; margin-left: auto; align-items: center;
  min-width: 0; overflow-x: auto; scrollbar-width: none; }
.site-nav::-webkit-scrollbar { display: none; }
.site-nav a {
  padding: 6px 11px; border-radius: 999px; font-size: 13.5px;
  color: var(--ink-56); white-space: nowrap;
}
.site-nav a:hover { background: var(--surface-sunken); color: var(--ink); }
.site-nav a[aria-current="page"] { background: var(--surface-sunken); color: var(--ink); font-weight: 560; }

.iconbtn {
  width: 32px; height: 32px; flex: none; border-radius: 9px; cursor: pointer;
  border: 1px solid var(--hairline); background: var(--surface); color: var(--ink-56);
  display: grid; place-items: center; font-size: 14px;
}
.iconbtn:hover { color: var(--ink); border-color: var(--hairline-strong); }

/* ---------------------------------------------------------------- hero */

.hero { padding: 56px 0 34px; border-bottom: 1px solid var(--hairline); }
/* Editorial two-column hero: headline left, the lead and its controls right.
   Below 980px it stacks, which is also the small-screen reading order. */
.hero__grid {
  display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 18px 48px; align-items: end;
}
@media (max-width: 980px) { .hero__grid { grid-template-columns: 1fr; align-items: start; } }
.hero__grid .hero__lead { margin-top: 0; }
.hero__grid .searchbar { margin-top: 18px; max-width: none; }
.hero__badge {
  display: inline-flex; align-items: center; gap: 7px; margin-bottom: 20px;
  padding: 5px 12px; border-radius: 999px; border: 1px solid var(--hairline);
  background: var(--surface); font-size: 12px; color: var(--ink-56);
}
.pulse {
  width: 6px; height: 6px; border-radius: 50%; background: var(--good);
  box-shadow: 0 0 0 3px var(--good-soft);
}
.hero h1 { max-width: 15ch; }
.hero h1 em { font-style: normal; color: var(--ink-40); }
.hero__lead { margin-top: 16px; max-width: 60ch; font-size: 17px; color: var(--ink-56); }

.searchbar {
  margin-top: 26px; display: flex; align-items: center; gap: 10px;
  max-width: 560px; padding: 11px 15px;
  border: 1px solid var(--hairline-strong); border-radius: 999px; background: var(--surface);
}
.searchbar:focus-within { border-color: var(--action); box-shadow: 0 0 0 3px var(--action-soft); }
.searchbar input {
  flex: 1; border: 0; outline: 0; background: none; color: var(--ink);
  font-family: inherit; font-size: 15px;
}
.searchbar input::placeholder { color: var(--ink-40); }
.kbd {
  font-family: var(--mono); font-size: 11px; color: var(--ink-40);
  border: 1px solid var(--hairline); border-radius: 6px; padding: 2px 6px;
}

.chips { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 18px; }
.chip {
  padding: 5px 11px; border-radius: 999px; border: 1px solid var(--hairline);
  background: var(--surface); font-size: 12.5px; color: var(--ink-56); cursor: pointer;
}
.chip:hover { color: var(--ink); border-color: var(--hairline-strong); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--canvas); border-color: var(--ink); }

/* ---------------------------------------------------------------- stat tiles */

/* Full-bleed band, hairlines drawn per cell so the shell never shows gutters. */
.statband { border-top: 1px solid var(--hairline); border-bottom: 1px solid var(--hairline); }
.statstrip {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0; margin: 0;
}
.stat { padding: 18px 22px; border-left: 1px solid var(--hairline); }
.stat:first-child { border-left: 0; padding-left: 22px; }
@media (max-width: 620px) {
  .stat:nth-child(odd) { border-left: 0; }
  .stat { border-top: 1px solid var(--hairline); }
  .stat:nth-child(-n+2) { border-top: 0; }
}
.stat__value { font-family: var(--mono); font-size: 26px; font-weight: 600; letter-spacing: -0.02em; }
.stat__label { margin-top: 3px; font-size: 12px; color: var(--ink-56); }

/* ---------------------------------------------------------------- toolbar */

.toolbar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  padding: 14px 0; border-bottom: 1px solid var(--hairline);
}
.segmented {
  display: inline-flex; padding: 2px; gap: 2px;
  background: var(--surface-sunken); border-radius: 999px;
}
.segmented button {
  border: 0; background: none; cursor: pointer; color: var(--ink-56);
  font-family: inherit; font-size: 13px; padding: 6px 13px; border-radius: 999px;
}
.segmented button[aria-pressed="true"] {
  background: var(--surface); color: var(--ink); font-weight: 560;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.10);
}
.segmented button:disabled { opacity: 0.4; cursor: not-allowed; }

select.control, input.control {
  appearance: none; font-family: inherit; font-size: 13px; color: var(--ink);
  background: var(--surface); border: 1px solid var(--hairline);
  border-radius: 999px; padding: 7px 13px; cursor: pointer;
}
select.control:focus, input.control:focus { outline: 0; border-color: var(--action); }
.toolbar__right { margin-left: auto; display: flex; align-items: center; gap: 8px; }

/* ---------------------------------------------------------------- ranked list */

.section { padding: 26px 0 60px; }
.section__head {
  display: flex; align-items: baseline; gap: 12px; margin-bottom: 4px;
}
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 34px; align-items: start; }
@media (max-width: 900px) { .layout { grid-template-columns: minmax(0, 1fr); } }

.rows { display: flex; flex-direction: column; }
.row {
  display: grid; grid-template-columns: 34px 38px 1fr auto; gap: 14px; align-items: center;
  padding: 15px 12px; border-bottom: 1px solid var(--hairline);
  border-radius: var(--radius); cursor: pointer; text-align: left;
  background: none; border-left: 0; border-right: 0; border-top: 0;
  font: inherit; color: inherit; width: 100%;
}
.row:hover { background: var(--surface-alt); }
.row:focus-visible { outline: 2px solid var(--action); outline-offset: -2px; }

.rank { font-family: var(--mono); font-size: 15px; color: var(--ink-40); text-align: right; }
.rank--1 { color: var(--rank-1); font-weight: 700; }
.rank--2 { color: var(--rank-2); font-weight: 700; }
.rank--3 { color: var(--rank-3); font-weight: 700; }

.row__main { min-width: 0; }
.row__title { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.row__title strong { font-weight: 600; font-size: 15.5px; letter-spacing: -0.01em; }
.row__meta {
  margin-top: 4px; display: flex; flex-wrap: wrap; gap: 5px 14px;
  font-size: 12.5px; color: var(--ink-56);
}
.row__flags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.row__side { display: flex; align-items: center; gap: 16px; }

.thumb {
  width: 38px; height: 38px; border-radius: 10px; object-fit: cover;
  background: var(--surface-sunken); border: 1px solid var(--hairline); flex: none;
  display: block;
}

/* Grade pill: ordinal state, so it carries the letter, not colour alone. */
.grade {
  font-family: var(--mono); font-size: 12px; font-weight: 700; letter-spacing: 0.02em;
  padding: 3px 8px; border-radius: 7px; border: 1px solid transparent; white-space: nowrap;
}
.grade--a { background: var(--good-soft); color: var(--good); border-color: var(--good); }
.grade--b { background: var(--info-soft); color: var(--info); border-color: var(--info); }
.grade--c { background: var(--warn-soft); color: var(--warn); border-color: var(--warn); }
.grade--d, .grade--f { background: var(--danger-soft); color: var(--danger); border-color: var(--danger); }

.score { text-align: right; min-width: 108px; }
.score__value { font-family: var(--mono); font-size: 19px; font-weight: 600; }
.score__value span { font-size: 11px; color: var(--ink-40); font-weight: 400; }
.scorebar {
  margin-top: 5px; height: 5px; border-radius: 999px;
  background: var(--surface-sunken); overflow: hidden;
}
.scorebar > i { display: block; height: 100%; border-radius: 999px; background: var(--ramp-4); }

/* Status chips always pair colour with an icon glyph AND a text label. */
.flag {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 9px; border-radius: 999px; font-size: 11.5px; white-space: nowrap;
  border: 1px solid transparent;
}
.flag__icon { font-size: 10px; }
.flag--danger { background: var(--danger-soft); color: var(--danger); border-color: color-mix(in srgb, var(--danger) 35%, transparent); }
.flag--warn { background: var(--warn-soft); color: var(--warn); border-color: color-mix(in srgb, var(--warn) 40%, transparent); }
.flag--info { background: var(--info-soft); color: var(--info); border-color: color-mix(in srgb, var(--info) 30%, transparent); }
.flag--good { background: var(--good-soft); color: var(--good); border-color: color-mix(in srgb, var(--good) 35%, transparent); }

/* ---------------------------------------------------------------- sidebar */

.panel {
  border: 1px solid var(--hairline); border-radius: var(--radius-lg);
  background: var(--surface); padding: 16px 18px; margin-bottom: 16px;
}
.panel h3 { margin-bottom: 10px; }
.panel__list { display: flex; flex-direction: column; gap: 10px; }
.panel__item { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.panel__item .num { margin-left: auto; color: var(--ink-56); }

/* ---------------------------------------------------------------- table */

.tablewrap { overflow-x: auto; border: 1px solid var(--hairline); border-radius: var(--radius-lg); }
table.data { width: 100%; border-collapse: collapse; font-size: 13.5px; min-width: 720px; }
table.data th, table.data td {
  padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--hairline);
  white-space: nowrap;
}
table.data th {
  position: sticky; top: 0; background: var(--surface-alt); z-index: 1;
  font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--ink-56); font-weight: 600; user-select: none;
}
/* Only a header that actually sorts looks clickable. The blanket `cursor:
   pointer` this replaced put a pointer on every header of every table,
   including the broker table where no header sorts anything. */
table.data th[data-key] { cursor: pointer; }
table.data th[data-key]:hover { color: var(--ink); background: var(--surface-sunken); }
table.data th[data-sorted]::after { content: " ↓"; color: var(--action); }
table.data th[data-sorted="asc"]::after { content: " ↑"; }
table.data tbody tr:hover { background: var(--surface-alt); }
table.data td.wrap { white-space: normal; min-width: 260px; }
table.data tbody tr:last-child td { border-bottom: 0; }

/* ---------------------------------------------------------------- pillars */

.pillars { display: flex; flex-direction: column; gap: 12px; }
.pillar__head { display: flex; align-items: baseline; gap: 8px; font-size: 13px; }
.pillar__head .num { margin-left: auto; color: var(--ink-56); font-size: 12.5px; }
.pillar__bar {
  margin-top: 5px; height: 6px; border-radius: 999px;
  background: var(--surface-sunken); overflow: hidden;
}
.pillar__bar > i { display: block; height: 100%; border-radius: 999px; background: var(--ramp-4); }
.pillar__evidence {
  margin: 8px 0 0; padding-left: 16px; font-size: 12.5px; color: var(--ink-56);
  display: flex; flex-direction: column; gap: 4px;
}
.pillar__evidence li::marker { color: var(--ink-40); }

/* ---------------------------------------------------------------- drawer */

.drawer-backdrop {
  position: fixed; inset: 0; background: rgba(0, 0, 0, 0.42); z-index: 90;
  opacity: 0; pointer-events: none; transition: opacity 0.18s ease;
}
.drawer-backdrop[data-open="true"] { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(560px, 100%);
  background: var(--canvas); border-left: 1px solid var(--hairline); z-index: 100;
  transform: translateX(100%); transition: transform 0.24s cubic-bezier(0.32, 0.72, 0, 1);
  display: flex; flex-direction: column;
}
.drawer[data-open="true"] { transform: none; }
.drawer__head {
  display: flex; align-items: flex-start; gap: 14px; padding: 18px 22px;
  border-bottom: 1px solid var(--hairline);
}
.drawer__body { overflow-y: auto; padding: 20px 22px 44px; }
.drawer__section { padding-top: 22px; margin-top: 22px; border-top: 1px solid var(--hairline); }
.drawer__section:first-child { padding-top: 0; margin-top: 0; border-top: 0; }

.hero-number { font-family: var(--mono); font-size: 42px; font-weight: 640; letter-spacing: -0.03em; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 18px; font-size: 13px; }
.kv dt { color: var(--ink-56); }
.kv dd { margin: 0; text-align: right; font-family: var(--mono); }

.prose { font-size: 13.5px; color: var(--ink-80); white-space: pre-wrap; line-height: 1.6; }
.shots { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.shots img {
  height: 110px; border-radius: var(--radius-sm); border: 1px solid var(--hairline);
}
.quote {
  border-left: 2px solid var(--hairline-strong); padding-left: 12px;
  font-size: 13px; color: var(--ink-80);
}

/* ---------------------------------------------------------------- misc */

.notice {
  display: flex; gap: 10px; align-items: flex-start; padding: 12px 15px;
  border: 1px solid var(--hairline); border-radius: var(--radius);
  background: var(--surface-alt); font-size: 13px; color: var(--ink-80);
}
.notice--warn { background: var(--warn-soft); border-color: color-mix(in srgb, var(--warn) 40%, transparent); }
.notice--danger { background: var(--danger-soft); border-color: color-mix(in srgb, var(--danger) 35%, transparent); }

.empty { padding: 50px 20px; text-align: center; color: var(--ink-56); font-size: 14px; }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; }
.card {
  border: 1px solid var(--hairline); border-radius: var(--radius-lg);
  background: var(--surface); padding: 18px;
}
.card h3 { margin-bottom: 6px; }
.card p { font-size: 13px; color: var(--ink-56); }

.spark { display: block; width: 100%; height: 30px; overflow: visible; }
.spark path { fill: none; stroke: var(--action); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }

.site-footer {
  border-top: 1px solid var(--hairline); padding: 26px 0 40px;
  font-size: 12.5px; color: var(--ink-56);
}
.site-footer__inner { display: flex; flex-wrap: wrap; gap: 14px 22px; align-items: center; }
.site-footer nav { display: flex; gap: 16px; margin-left: auto; }

.btn {
  display: inline-flex; align-items: center; gap: 7px; cursor: pointer;
  padding: 9px 16px; border-radius: 999px; font-size: 13.5px; font-weight: 550;
  border: 1px solid var(--hairline-strong); background: var(--surface); color: var(--ink);
  font-family: inherit;
}
.btn:hover { border-color: var(--ink-40); }
.btn--primary { background: var(--ink); color: var(--canvas); border-color: var(--ink); }
.btn--primary:hover { opacity: 0.88; color: var(--canvas); }

@media (max-width: 700px) {
  .site-nav a { padding: 6px 8px; font-size: 12.5px; }
  .brand__sub { display: none; }
  .row { grid-template-columns: 26px 34px 1fr; }
  .row__side { grid-column: 1 / -1; justify-content: space-between; }
  .hero { padding: 38px 0 26px; }
}

/* ================================================================ motion
 *
 * Everything below is gated on `prefers-reduced-motion` at the end of this
 * block: a visitor who has asked their OS for less movement gets the finished
 * state immediately, never a half-played animation.
 *
 * Entrances are driven by an IntersectionObserver in app.js, which sets
 * `data-seen="true"` once per element. Scroll listeners are deliberately
 * avoided - with 300 rows they cost more than the effect is worth.
 */

[data-reveal] {
  opacity: 0;
  transform: translateY(var(--reveal-shift, 18px));
  transition: opacity var(--t-slow) var(--ease-out),
              transform var(--t-slow) var(--ease-out);
  transition-delay: var(--reveal-delay, 0ms);
  will-change: opacity, transform;
}
[data-reveal][data-seen="true"] {
  opacity: 1;
  transform: none;
  will-change: auto;
}

/* Dense lists move less and finish sooner: the point is to feel alive while
   scrolling past 300 of them, not to make the reader wait for each one. */
.rows [data-reveal],
table.data [data-reveal] {
  --reveal-shift: 8px;
  transition-duration: var(--t-fast);
}

/* Page arrival.
 *
 * The body fades ONLY — no transform. An ancestor carrying a transform becomes
 * the containing block for its `position: fixed` descendants, which quietly
 * re-anchored the off-screen drawer to the document instead of the viewport and
 * gave every ranking page a horizontal scrollbar. Sections get the travel
 * instead; they hold nothing fixed. */
@keyframes ta-fade-up {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}
@keyframes ta-fade-in { from { opacity: 0; } to { opacity: 1; } }
body { animation: ta-fade-in var(--t-mid) var(--ease-out) both; }

/* Bars grow from nothing; the width itself is set inline by the renderer. */
.scorebar > i,
.pillar__bar > i {
  transform-origin: left center;
  animation: ta-grow var(--t-slow) var(--ease-out) both;
  animation-delay: var(--reveal-delay, 0ms);
}
@keyframes ta-grow {
  from { transform: scaleX(0); }
  to   { transform: scaleX(1); }
}

/* A line that draws itself. `pathLength="1"` in the SVG makes the dash maths
   independent of the actual path length, so one rule covers every chart. */
.chart path.draw {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: ta-draw var(--t-draw) var(--ease-in-out) forwards;
  animation-delay: var(--reveal-delay, 0ms);
}
@keyframes ta-draw { to { stroke-dashoffset: 0; } }

.chart .area {
  opacity: 0;
  animation: ta-area var(--t-slow) var(--ease-out) forwards;
  animation-delay: calc(var(--reveal-delay, 0ms) + 260ms);
}
@keyframes ta-area { to { opacity: 1; } }

.chart rect.bar {
  transform-origin: center bottom;
  animation: ta-rise var(--t-slow) var(--ease-out) both;
  animation-delay: var(--reveal-delay, 0ms);
}
@keyframes ta-rise { from { transform: scaleY(0); } to { transform: scaleY(1); } }

.chart circle.dot {
  animation: ta-pop var(--t-mid) var(--ease-out) both;
  animation-delay: var(--reveal-delay, 0ms);
}
@keyframes ta-pop { from { opacity: 0; } to { opacity: 1; } }

/* Pointer feedback. */
.row { transition: background var(--t-fast) ease, transform var(--t-fast) var(--ease-out); }
.row:hover { transform: translateX(3px); }
.thumb { transition: transform var(--t-fast) var(--ease-out), box-shadow var(--t-fast) ease; }
.row:hover .thumb { transform: scale(1.09); box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18); }
.card, .panel { transition: transform var(--t-fast) var(--ease-out), border-color var(--t-fast) ease; }
.card:hover { transform: translateY(-2px); border-color: var(--hairline-strong); }
.btn, .chip, .iconbtn { transition: transform var(--t-fast) var(--ease-out),
                                    background var(--t-fast) ease,
                                    border-color var(--t-fast) ease,
                                    color var(--t-fast) ease; }
.btn:active, .chip:active, .iconbtn:active { transform: scale(0.96); }

/* Drawer contents arrive one after another once the panel has slid in. */
.drawer[data-open="true"] .drawer__section {
  animation: ta-fade-up var(--t-mid) var(--ease-out) both;
}
.drawer[data-open="true"] .drawer__section:nth-child(1) { animation-delay: 90ms; }
.drawer[data-open="true"] .drawer__section:nth-child(2) { animation-delay: 150ms; }
.drawer[data-open="true"] .drawer__section:nth-child(3) { animation-delay: 210ms; }
.drawer[data-open="true"] .drawer__section:nth-child(4) { animation-delay: 270ms; }
.drawer[data-open="true"] .drawer__section:nth-child(n+5) { animation-delay: 330ms; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 1ms !important;
    animation-delay: 0ms !important;
    transition-duration: 1ms !important;
    scroll-behavior: auto !important;
  }
  [data-reveal] { opacity: 1 !important; transform: none !important; }
  .chart path.draw { stroke-dashoffset: 0 !important; }
  .chart .area { opacity: 1 !important; }
}

/* ================================================================ charts */

.chart { display: block; width: 100%; overflow: visible; }
.chart .axis { stroke: var(--hairline); stroke-width: 1; }
.chart .grid { stroke: var(--hairline); stroke-width: 1; stroke-dasharray: 2 4; }
.chart text { fill: var(--ink-40); font-family: var(--mono); font-size: 9px; }
.chart path.draw { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }

.figure { border: 1px solid var(--hairline); border-radius: var(--radius-lg);
          background: var(--surface); padding: 16px 18px; }
.figure__head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 6px; }
.figure__head h3 { font-size: 14px; }
.figure__head .num { margin-left: auto; color: var(--ink-56); font-size: 12px; }
.figure__note { margin-top: 10px; font-size: 12px; color: var(--ink-56); line-height: 1.45; }

/* Hero backdrop: the real score distribution, sitting behind the headline. */
.hero { position: relative; overflow: hidden; }
.hero__backdrop {
  height: 100% !important;
  position: absolute; inset: auto 0 0 0;
  pointer-events: none; opacity: 0.5;
  will-change: transform;
  /* Fade the bars out upwards so they sit UNDER the headline rather than
     through it — a backdrop that competes with the text is decoration, and
     this one is meant to be read as data. */
  -webkit-mask-image: linear-gradient(to top, #000 12%, rgba(0, 0, 0, 0.32) 62%, transparent 100%);
  mask-image: linear-gradient(to top, #000 12%, rgba(0, 0, 0, 0.32) 62%, transparent 100%);
}
.hero__backdrop rect { fill: var(--ramp-2); }
.hero > .shell { position: relative; z-index: 1; }
:root[data-theme="dark"] .hero__backdrop { opacity: 0.55; }
/* The distribution is the point, so it gets a caption rather than being left
   as an unexplained texture. */
.hero__caption {
  position: absolute; left: 0; right: 0; bottom: 8px; z-index: 1;
  text-align: center; font-size: 11px; color: var(--ink-40);
  pointer-events: none;
}

/* Proof Wall: the handful of products whose claims are actually verifiable. */
.proofwall {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(212px, 1fr));
  gap: 12px;
}
.proofcard {
  border: 1px solid var(--hairline); border-radius: var(--radius);
  background: var(--surface); padding: 13px 14px; display: block;
  transition: transform var(--t-fast) var(--ease-out), border-color var(--t-fast) ease;
}
.proofcard:hover { transform: translateY(-3px); border-color: var(--good); }
.proofcard__head { display: flex; align-items: center; gap: 8px; margin-bottom: 2px; min-width: 0; }
.proofcard__head strong { font-size: 13px; letter-spacing: -0.01em;
                          overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.proofcard .chart { margin: 8px 0 6px; }
.proofcard__foot { display: flex; gap: 12px; font-size: 11px; color: var(--ink-56); }
.proofcard__foot b { color: var(--ink-80); font-family: var(--mono); font-weight: 600; }

/* Mosaic of every indexed product, tinted by grade. */
.mosaic {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(36px, 1fr));
  gap: 5px;
}
.mosaic a {
  position: relative; aspect-ratio: 1; border-radius: 8px; overflow: hidden;
  border: 1.5px solid var(--tile, var(--hairline));
  background: var(--surface-sunken);
  transition: transform var(--t-fast) var(--ease-out), box-shadow var(--t-fast) ease;
  opacity: 0; animation: ta-tile var(--t-mid) var(--ease-out) forwards;
  animation-delay: var(--reveal-delay, 0ms);
}
@keyframes ta-tile { to { opacity: 1; } }
.mosaic a:hover { transform: scale(1.3); z-index: 2;
                  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3); }
.mosaic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mosaic__legend { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 14px;
                  font-size: 11.5px; color: var(--ink-56); }
.mosaic__legend span { display: inline-flex; align-items: center; gap: 6px; }
.mosaic__swatch { width: 10px; height: 10px; border-radius: 3px; border: 1.5px solid; }

/* Lightbox for the vendors' own backtest screenshots. */
.lightbox {
  position: fixed; inset: 0; z-index: 200; display: grid; place-items: center;
  background: rgba(0, 0, 0, 0.86); opacity: 0; pointer-events: none;
  transition: opacity var(--t-mid) ease;
}
.lightbox[data-open="true"] { opacity: 1; pointer-events: auto; }
.lightbox img { max-width: 94vw; max-height: 88vh; border-radius: var(--radius);
                box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5); }
.lightbox__close { position: absolute; top: 18px; right: 20px; }
.shots img { cursor: zoom-in; transition: transform var(--t-fast) var(--ease-out); }
.shots img:hover { transform: scale(1.05); }

/* Display numerals for the headline figures. */
.stat__value { font-size: 30px; letter-spacing: -0.03em; }
.hero-number { font-size: 48px; }

/* ============================================================ EA profile */

.profile-hero { padding: 34px 0 30px; }
.profile-hero__grid {
  display: grid; grid-template-columns: minmax(0, 1fr) 190px; gap: 30px; align-items: center;
}
@media (max-width: 820px) {
  .profile-hero__grid { grid-template-columns: 1fr; }
  .profile-hero__score { justify-self: start; }
}
.profile-hero__id { display: flex; gap: 20px; align-items: center; min-width: 0; }
.profile-hero__logo {
  width: 92px; height: 92px; flex: none; border-radius: 20px; object-fit: cover;
  border: 1px solid var(--hairline); background: var(--surface-sunken);
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.16);
}
@media (max-width: 520px) { .profile-hero__logo { width: 62px; height: 62px; border-radius: 15px; } }
.profile-hero__score { display: flex; flex-direction: column; align-items: center; }

/* Score ring: one arc, animated by the same dash trick as the line charts. */
.scorering { position: relative; width: 150px; height: 150px; }
.scorering svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.scorering__arc {
  stroke-dashoffset: 0;
  animation: ta-ring var(--t-draw) var(--ease-in-out) both;
}
@keyframes ta-ring { from { stroke-dasharray: 0 1; } }
.scorering__value {
  position: absolute; inset: 0; display: grid; place-content: center;
  font-family: var(--mono); font-size: 34px; font-weight: 640; letter-spacing: -0.03em;
  text-align: center; line-height: 1;
}
.scorering__max { display: block; font-size: 11px; color: var(--ink-40); font-weight: 400; margin-top: 4px; }

/* Compact fact grid inside a figure — denser than a <dl> for numeric pairs. */
.factgrid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
  gap: 1px; background: var(--hairline); border: 1px solid var(--hairline);
  border-radius: var(--radius-sm); overflow: hidden;
}
.factgrid > div { background: var(--surface); padding: 9px 11px; }
.factgrid span { display: block; font-size: 11px; color: var(--ink-56); }
.factgrid b { font-family: var(--mono); font-size: 13.5px; font-weight: 600; }

.shotgrid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px;
}
.shotgrid img {
  width: 100%; height: 140px; object-fit: cover; border-radius: var(--radius-sm);
  border: 1px solid var(--hairline); display: block;
}

.prosebox summary {
  cursor: pointer; font-size: 13.5px; color: var(--action);
  padding: 10px 14px; border: 1px solid var(--hairline); border-radius: var(--radius);
  background: var(--surface); list-style: none;
}
.prosebox summary::-webkit-details-marker { display: none; }
.prosebox summary::before { content: "▸ "; }
.prosebox[open] summary::before { content: "▾ "; }
.prosebox summary:hover { border-color: var(--hairline-strong); }

.pager { display: flex; gap: 14px; justify-content: space-between; }
.pager__link {
  display: flex; flex-direction: column; gap: 3px; min-width: 0; max-width: 46%;
  padding: 13px 17px; border: 1px solid var(--hairline); border-radius: var(--radius);
  background: var(--surface);
  transition: transform var(--t-fast) var(--ease-out), border-color var(--t-fast) ease;
}
.pager__link:hover { transform: translateY(-2px); border-color: var(--hairline-strong); }
.pager__link--right { text-align: right; }
.pager__link strong { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* This product's position on the market histogram. */
.chart line.mark { stroke: var(--ink); stroke-width: 1.5; stroke-dasharray: 3 2; }
.chart text.marklabel { fill: var(--ink); font-weight: 700; }

/* ====================================================== ranking home page
 *
 * The chassis follows repo.tinix.ai: a centred hero on the light surface with
 * the headline figures in a bordered card, then the working area on a distinctly
 * darker surface where every control and every result is its own white card.
 * The surface change is what makes the sections read as separate at a glance —
 * hairlines alone were not enough.
 */

.band-light { background: var(--canvas); }
.band-sunken {
  background: var(--canvas-alt);
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
}

/* ---------------------------------------------------------- centred hero */

.hero-c { padding: 44px 0 34px; text-align: center; position: relative; overflow: hidden; }
.hero-c > .shell { position: relative; z-index: 1; }
.hero-c h1 {
  font-size: clamp(30px, 4.6vw, 50px); line-height: 1.06; letter-spacing: -0.035em;
  max-width: 17ch; margin: 14px auto 0;
}
/* Second clause in the action colour: the sentence carries the promise, the
   colour marks where the promise actually lands. */
.hero-c h1 em { font-style: normal; color: var(--action); }
.hero-c__lead {
  margin: 14px auto 0; max-width: 62ch; font-size: 16.5px; color: var(--ink-56);
}
.hero-c .searchbar { margin: 24px auto 0; max-width: 620px; padding: 7px 7px 7px 18px; }
.hero-c .chips { justify-content: center; margin-top: 16px; }
.chips__label {
  display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px;
  color: var(--ink-56); margin-right: 2px;
}

.searchbar__actions { display: flex; align-items: center; gap: 6px; flex: none; }
.btn--sm { padding: 7px 13px; font-size: 13px; }

/* Headline figures, as a card rather than a full-bleed band. */
.statcard {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  max-width: 760px; margin: 26px auto 0;
  border: 1px solid var(--hairline); border-radius: var(--radius-lg);
  background: var(--surface); overflow: hidden;
}
.statcard > div { padding: 15px 18px; border-left: 1px solid var(--hairline); }
.statcard > div:first-child { border-left: 0; }
.statcard__label {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  font-size: 10.5px; font-weight: 700; letter-spacing: 0.075em;
  text-transform: uppercase; color: var(--ink-56);
}
.statcard__value {
  margin-top: 6px; font-family: var(--mono); font-size: 26px; font-weight: 640;
  letter-spacing: -0.03em;
}
@media (max-width: 620px) {
  .statcard > div:nth-child(odd) { border-left: 0; }
  .statcard > div:nth-child(n+3) { border-top: 1px solid var(--hairline); }
}

/* --------------------------------------------------------- source tabs */

.sourcetabs {
  display: inline-flex; gap: 4px; padding: 5px;
  background: var(--surface); border: 1px solid var(--hairline);
  border-radius: 999px; margin-bottom: 16px; flex-wrap: wrap;
}
.sourcetabs button {
  display: inline-flex; align-items: center; gap: 7px; cursor: pointer;
  border: 0; background: none; font-family: inherit; font-size: 13.5px;
  color: var(--ink-56); padding: 9px 18px; border-radius: 999px;
  transition: background var(--t-fast) ease, color var(--t-fast) ease;
}
.sourcetabs button:hover { color: var(--ink); }
.sourcetabs button[aria-selected="true"] {
  background: var(--ink); color: var(--canvas); font-weight: 560;
}
.sourcetabs button:disabled { opacity: 0.4; cursor: not-allowed; }
.sourcetabs .num { font-size: 11.5px; opacity: 0.72; }

/* ---------------------------------------------------------- filter card */

.filtercard {
  border: 1px solid var(--hairline); border-radius: var(--radius-lg);
  background: var(--surface); padding: 14px 16px; margin-bottom: 16px;
}
.filtercard__row {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
}
.filtercard__row + .filtercard__row {
  margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--hairline);
}
.filtercard__row .spacer { margin-left: auto; }
.filtercard__row[hidden] { display: none; }

.resultbar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  margin: 0 0 14px; font-size: 13px; color: var(--ink-56);
}
.resultbar .spacer { margin-left: auto; }

/* ------------------------------------------------------------ item cards */

.cardgrid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 12px;
}
.itemcard {
  display: block; border: 1px solid var(--hairline); border-radius: var(--radius-lg);
  background: var(--surface); padding: 15px 16px;
  transition: transform var(--t-fast) var(--ease-out), border-color var(--t-fast) ease,
              box-shadow var(--t-fast) ease;
}
.itemcard:hover {
  transform: translateY(-3px); border-color: var(--hairline-strong);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.08);
}
.itemcard__top { display: flex; align-items: center; gap: 11px; min-width: 0; }
.itemcard__rank {
  width: 30px; height: 30px; flex: none; border-radius: 9px;
  display: grid; place-items: center; font-family: var(--mono); font-size: 12.5px;
  font-weight: 700; background: var(--surface-sunken); color: var(--ink-56);
}
.itemcard__rank--1 { background: color-mix(in srgb, var(--rank-1) 18%, transparent); color: var(--rank-1); }
.itemcard__rank--2 { background: color-mix(in srgb, var(--rank-2) 20%, transparent); color: var(--rank-2); }
.itemcard__rank--3 { background: color-mix(in srgb, var(--rank-3) 18%, transparent); color: var(--rank-3); }
.itemcard__title { min-width: 0; flex: 1; }
.itemcard__title strong {
  display: block; font-size: 14.5px; letter-spacing: -0.01em;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.itemcard__sub {
  font-size: 12px; color: var(--ink-56); margin-top: 2px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.itemcard__badges { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 11px; }
.itemcard__foot {
  display: flex; align-items: center; gap: 12px; margin-top: 12px;
  padding-top: 11px; border-top: 1px solid var(--hairline);
}
.itemcard__score { margin-left: auto; text-align: right; flex: none; }
.itemcard__score b { font-family: var(--mono); font-size: 18px; font-weight: 640; }
.itemcard__score span { font-size: 10px; color: var(--ink-40); }
.itemcard .scorebar { width: 100%; margin-top: 6px; }
.itemcard__stat { font-size: 11.5px; color: var(--ink-56); }
.itemcard__stat b { font-family: var(--mono); color: var(--ink-80); font-weight: 600; }

/* The leader gets the emphasis tinix gives it: wider, accented, with the
   evidence chart shown rather than summarised. */
.itemcard--lead {
  grid-column: 1 / -1; border-color: var(--action);
  box-shadow: 0 0 0 3px var(--action-soft);
  display: grid; grid-template-columns: minmax(0, 1fr) 240px; gap: 20px; align-items: center;
}
@media (max-width: 760px) { .itemcard--lead { grid-template-columns: 1fr; } }
.itemcard--lead .itemcard__title strong { font-size: 18px; }
.itemcard--lead .itemcard__rank { width: 38px; height: 38px; font-size: 15px; }
.itemcard--lead .itemcard__foot { border-top: 0; padding-top: 0; margin-top: 0; }
.leadchart { min-width: 0; }
.leadchart .figure__note { margin-top: 6px; text-align: right; }

/* --------------------------------------------------------- section bands */

.band { padding: 46px 0; }
.band__head { text-align: center; max-width: 68ch; margin: 0 auto 26px; }
.band__head h2 { font-size: clamp(21px, 2.5vw, 28px); }
.band__head p { margin-top: 10px; color: var(--ink-56); font-size: 14.5px; }

/* The centred hero is taller than the old two-column one, so the distribution
   behind it needs to sit further back: at the previous weight the bars read as
   competing content rather than as texture the headline sits on top of. */
.hero-c .hero__backdrop {
  height: 40% !important;
  opacity: 0.30;
  -webkit-mask-image: linear-gradient(to top, #000 6%, rgba(0, 0, 0, 0.18) 55%, transparent 96%);
  mask-image: linear-gradient(to top, #000 6%, rgba(0, 0, 0, 0.18) 55%, transparent 96%);
}
:root[data-theme="dark"] .hero-c .hero__backdrop { opacity: 0.40; }

/* ========================================================== risk of ruin
 *
 * A second axis, deliberately styled unlike the score: the score is a
 * magnitude on a sequential ramp, the risk band is a state. Reading one as the
 * other is the mistake the first version of this site invited.
 */

.riskband {
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
  padding: 3px 10px; border-radius: 7px; font-size: 11.5px; font-weight: 650;
  letter-spacing: 0.04em; text-transform: uppercase;
  border: 1px solid transparent;
}
.riskband__icon { font-size: 10px; }
.riskband--low       { background: var(--good-soft);   color: var(--good);   border-color: color-mix(in srgb, var(--good) 35%, transparent); }
.riskband--moderate  { background: var(--info-soft);   color: var(--info);   border-color: color-mix(in srgb, var(--info) 30%, transparent); }
.riskband--high      { background: var(--warn-soft);   color: var(--warn);   border-color: color-mix(in srgb, var(--warn) 45%, transparent); }
.riskband--extreme   { background: var(--danger-soft); color: var(--danger); border-color: var(--danger); }

/* An unverified product is greyed rather than scored: there is nothing to
   rank, and a 0 dressed up as a score reads as a judgement it has not earned. */
.unverified .itemcard__score b,
.unverified .score__value { color: var(--ink-40); }
.notproven {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px;
  border-radius: 999px; font-size: 11.5px; white-space: nowrap;
  background: var(--surface-sunken); color: var(--ink-56);
  border: 1px dashed var(--hairline-strong);
}

/* ======================================================= brokers: partners
 *
 * The featured strip is the one place on the site where placement is bought.
 * It is therefore built to look like an advertisement rather than a result:
 * its own band, its own ribbon on every card, and the sentence "placement is
 * paid" above it. The ranking table below it is untouched by partner status,
 * which is only credible if the two are visibly different objects.
 */

.partnerband { padding: 30px 0 34px; }
.partnerband__head {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px 16px; margin-bottom: 16px;
}
.partnerband__head h2 { font-size: 20px; letter-spacing: -0.02em; }
.partnerband__head p { font-size: 13px; color: var(--ink-56); max-width: 62ch; }

.podium { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 940px) { .podium { grid-template-columns: 1fr; } }

.bcard {
  position: relative; display: flex; flex-direction: column; gap: 12px;
  padding: 18px 18px 16px; background: var(--surface);
  border: 1px solid var(--hairline); border-radius: var(--radius-lg);
  transition: transform var(--t-fast) var(--ease-out), border-color var(--t-fast) ease,
              box-shadow var(--t-fast) ease;
}
.bcard:hover { transform: translateY(-3px); border-color: var(--hairline-strong);
               box-shadow: 0 10px 26px rgba(0, 0, 0, 0.09); }
/* The first partner card carries the accent the leader card uses elsewhere, so
   the strip has a focal point without inventing a rank number for it. */
.bcard--first { border-color: var(--action); box-shadow: 0 0 0 3px var(--action-soft); }
.bcard--first:hover { box-shadow: 0 0 0 3px var(--action-soft), 0 10px 26px rgba(0, 0, 0, 0.09); }

.bcard__ribbon {
  position: absolute; top: -1px; right: 16px;
  padding: 4px 10px 5px; border-radius: 0 0 8px 8px;
  font-size: 10px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  background: var(--info-soft); color: var(--info);
  border: 1px solid color-mix(in srgb, var(--info) 30%, transparent); border-top: 0;
}
.bcard__top { display: flex; align-items: center; gap: 12px; min-width: 0; padding-right: 96px; }
.bmark {
  width: 46px; height: 46px; flex: none; border-radius: 13px; display: grid;
  place-items: center; font-weight: 700; font-size: 18px; letter-spacing: -0.02em;
  background: var(--surface-sunken); border: 1px solid var(--hairline); color: var(--ink-80);
}
.bmark--lg { width: 74px; height: 74px; border-radius: 20px; font-size: 28px; }
.bcard__name { min-width: 0; }
.bcard__name strong { display: block; font-size: 17px; letter-spacing: -0.02em; }
.bcard__name span { font-size: 12px; color: var(--ink-56); }
.bcard__score { display: flex; align-items: center; gap: 9px; }
.bcard__score b { font-family: var(--mono); font-size: 20px; font-weight: 640; }
.bcard__note { font-size: 12.5px; color: var(--ink-56); line-height: 1.5; }
.bcard__cta { display: flex; gap: 8px; margin-top: auto; padding-top: 4px; }
.bcard__cta .btn { flex: 1; justify-content: center; }

.regchips { display: flex; flex-wrap: wrap; gap: 5px; }
.regchip {
  font-size: 10.5px; font-weight: 650; letter-spacing: 0.04em; padding: 3px 7px;
  border-radius: 6px; background: var(--surface-sunken); border: 1px solid var(--hairline);
  color: var(--ink-80);
}
.regchip--t1 { background: var(--good-soft); color: var(--good);
               border-color: color-mix(in srgb, var(--good) 30%, transparent); }

/* The usage line is the page's argument, so it gets a mark of its own rather
   than being one more grey number in the fact grid. */
.usageline {
  display: flex; align-items: center; gap: 8px; font-size: 12.5px;
  padding: 8px 11px; border-radius: var(--radius-sm);
  background: var(--surface-sunken); border: 1px solid var(--hairline); color: var(--ink-80);
}
.usageline b { font-family: var(--mono); font-weight: 640; }
.usageline--none { color: var(--ink-56); border-style: dashed; }

/* ===================================================== brokers: detail page */

.bhero { padding: 34px 0 28px; }
.bhero__grid {
  display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 30px; align-items: center;
}
@media (max-width: 880px) { .bhero__grid { grid-template-columns: 1fr; } }
.bhero__id { display: flex; gap: 18px; align-items: center; min-width: 0; }
.bhero__id h1 { font-size: clamp(24px, 3.2vw, 36px); letter-spacing: -0.03em; }
.bhero__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 8px; }
.bhero__cta { display: flex; flex-direction: column; gap: 8px; }
.bhero__cta .btn { justify-content: center; }
.bhero__cta .tiny { text-align: center; }

.btn--cta {
  background: var(--action); border-color: var(--action); color: #fff;
  font-weight: 620; padding: 12px 18px; font-size: 14.5px;
}
.btn--cta:hover { color: #fff; opacity: 0.9; }

.ctabox {
  display: flex; flex-wrap: wrap; align-items: center; gap: 14px 18px;
  padding: 18px 20px; border-radius: var(--radius-lg);
  background: var(--action-soft); border: 1px solid color-mix(in srgb, var(--action) 30%, transparent);
}
.ctabox__text { min-width: 240px; flex: 1; font-size: 13.5px; color: var(--ink-80); line-height: 1.55; }
.ctabox__text strong { display: block; font-size: 15.5px; color: var(--ink); margin-bottom: 4px; }

/* A long opening post is the most complete thing on a strategy page and the
   most intimidating. It is clamped with a fade until the reader asks for it,
   which keeps the page scannable without hiding anything. */
.prose--clamped {
  max-height: 340px; overflow: hidden;
  -webkit-mask-image: linear-gradient(to bottom, #000 74%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 74%, transparent 100%);
}

/* -------------------------------------------------- generated illustration */

/* The generated marks and tiles replace the plain letter tiles the site used
   before. Nothing here is a downloaded brand asset: see brokerMark() and
   strategyArt() in app.js for why. */
.bmark { padding: 0; overflow: hidden; background: none; border: 0; }
.bmark__svg { display: block; width: 100%; height: 100%; border-radius: inherit; }
.bmark--lg { border-radius: 20px; }

.sart { display: block; width: 100%; border-radius: var(--radius-sm); overflow: hidden; }
.sart__line {
  stroke-dasharray: 1; stroke-dashoffset: 1;
  animation: ta-draw var(--t-draw) var(--ease-in-out) forwards;
}

/* Row thumbnail on the strategy table: small, fixed, never pushes the title. */
.sthumb {
  width: 62px; height: 34px; flex: none; border-radius: 7px; overflow: hidden;
  border: 1px solid var(--hairline); background: var(--surface-sunken);
}
.sthumb .sart { height: 100% !important; }
.srow { display: flex; gap: 11px; align-items: flex-start; min-width: 0; }

/* Banner on the strategy profile and the leader card. */
.sbanner {
  border-radius: var(--radius); overflow: hidden; border: 1px solid var(--hairline);
}
.sbanner .sart { border-radius: 0; }
.motifchip {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px;
  border-radius: 999px; font-size: 11.5px; background: var(--surface-sunken);
  border: 1px solid var(--hairline); color: var(--ink-56);
}

/* =============================================================== hot today
 *
 * The daily-movement strip. It exists to answer "is this site alive?", so it
 * always states WHEN it was collected and, when there is no previous run to
 * compare against, says that instead of implying movement it cannot measure.
 */

.hotband { border-bottom: 1px solid var(--hairline); background: var(--canvas-alt); }
.hotband__inner { padding: 22px 0 24px; }
.hotband__head {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 14px; margin-bottom: 4px;
}
.hotband__head h2 { font-size: 19px; }
.hotband__pulse {
  display: inline-flex; align-items: center; gap: 7px; font-size: 11px; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--good);
  background: var(--good-soft); border: 1px solid color-mix(in srgb, var(--good) 30%, transparent);
  padding: 3px 9px; border-radius: 999px;
}
.hotband__note { font-size: 12.5px; color: var(--ink-56); margin-bottom: 14px; max-width: 78ch; }

.hotstrip {
  display: grid; grid-auto-flow: column; grid-auto-columns: 244px; gap: 12px;
  overflow-x: auto; padding-bottom: 8px; scroll-snap-type: x proximity;
  scrollbar-width: thin;
}
.hotstrip > * { scroll-snap-align: start; }

.hotcard {
  display: flex; flex-direction: column; gap: 9px; padding: 12px 13px 13px;
  background: var(--surface); border: 1px solid var(--hairline);
  border-radius: var(--radius); min-width: 0;
  transition: transform var(--t-fast) var(--ease-out), border-color var(--t-fast) ease,
              box-shadow var(--t-fast) ease;
}
.hotcard:hover {
  transform: translateY(-3px); border-color: var(--hairline-strong);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}
.hotcard__top { display: flex; align-items: center; gap: 9px; min-width: 0; }
.hotcard__src {
  font-family: var(--mono); font-size: 10.5px; font-weight: 700; letter-spacing: 0.03em;
  padding: 3px 7px; border-radius: 6px; white-space: nowrap;
  background: var(--surface-sunken); border: 1px solid var(--hairline); color: var(--ink-56);
}
.hotcard__src--1 { color: var(--rank-1); border-color: color-mix(in srgb, var(--rank-1) 45%, transparent); }
.hotcard__src--2 { color: var(--rank-2); }
.hotcard__src--3 { color: var(--rank-3); }
.hotcard__title {
  font-size: 13.5px; font-weight: 620; line-height: 1.35; min-height: 2.7em;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.hotcard__verdict { font-size: 11.5px; color: var(--ink-56); line-height: 1.45; }
.hotcard__foot {
  display: flex; align-items: center; gap: 7px; margin-top: auto; padding-top: 9px;
  border-top: 1px solid var(--hairline); flex-wrap: wrap;
}
.hotcard .thumb { width: 34px; height: 34px; border-radius: 9px; flex: none; }
.hotcard .sthumb { width: 54px; height: 30px; }

/* The delta chip: green when the number grew, grey when it is a plain fact. */
.deltachip {
  display: inline-flex; align-items: center; gap: 4px; white-space: nowrap;
  font-family: var(--mono); font-size: 11px; font-weight: 650;
  padding: 2px 7px; border-radius: 6px;
  background: var(--surface-sunken); border: 1px solid var(--hairline); color: var(--ink-56);
}
.deltachip--up { background: var(--good-soft); color: var(--good);
                 border-color: color-mix(in srgb, var(--good) 30%, transparent); }
.deltachip--down { background: var(--danger-soft); color: var(--danger);
                   border-color: color-mix(in srgb, var(--danger) 30%, transparent); }

/* "UNPROVEN" replaces the letter when no live account backs a product's
   claims. Neutral and dashed on purpose: an F reads as a verdict on the
   software, and what is actually known is that the claim was not checkable. */
.grade--unproven {
  background: var(--surface-sunken); color: var(--ink-56);
  border: 1px dashed var(--hairline-strong); letter-spacing: 0.04em;
  font-size: 10.5px;
}

/* ------------------------------------------------- review theme analysis */

.themegrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
@media (max-width: 760px) { .themegrid { grid-template-columns: 1fr; } }
.themecol h3 { font-size: 14px; margin-bottom: 10px; }
.themerow { padding: 11px 0; border-top: 1px solid var(--hairline); }
.themerow:first-of-type { border-top: 0; padding-top: 0; }
.themerow__head { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.themequote {
  margin: 9px 0 0; padding: 8px 0 0 12px; border-left: 2px solid var(--hairline-strong);
  font-size: 12.5px; line-height: 1.55; color: var(--ink-80);
}
.themequote cite {
  display: block; margin-top: 5px; font-style: normal; font-size: 11px; color: var(--ink-40);
}

/* The praise/criticism split, shown as a proportion before any quotes: the
   first version listed themes on two identical columns and a reader could not
   tell at a glance which way a product leaned. */
.splitbar {
  display: flex; height: 10px; border-radius: 999px; overflow: hidden;
  background: var(--surface-sunken); border: 1px solid var(--hairline);
}
.splitbar i { display: block; }
.splitkey {
  display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 9px;
  font-size: 12px; color: var(--ink-56);
}
.splitkey span { display: inline-flex; align-items: center; gap: 6px; }
.splitkey i { width: 9px; height: 9px; border-radius: 3px; flex: none; }
.splitkey b { font-family: var(--mono); color: var(--ink); font-weight: 640; }
.splitkey .muted b { color: var(--ink-40); }

.themecol {
  padding: 14px 16px; border-radius: var(--radius); border: 1px solid var(--hairline);
  background: var(--surface);
}
.themecol--good { border-left: 3px solid var(--good); }
.themecol--bad { border-left: 3px solid var(--danger); }
.themecol__head {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding-bottom: 10px; border-bottom: 1px solid var(--hairline); margin-bottom: 4px;
}
.themerow__head strong { font-size: 13px; }

/* "Read more" inside a quote or a theme. A text button, not a chip: it is a
   continuation of the sentence above it, not a separate control. */
.linkbtn {
  display: inline-block; margin-top: 6px; padding: 0; border: 0; background: none;
  color: var(--action); font: inherit; font-size: 12px; cursor: pointer;
  text-align: left;
}
.linkbtn:hover { text-decoration: underline; }
.themerow__more { margin-top: 2px; }
.themequote .qfull { display: block; }

/* The method, lifted out of the prose, and the charts the author drew it on. */
.keypoints {
  margin: 4px 0 16px; padding: 13px 16px; border-radius: var(--radius);
  background: var(--surface-sunken); border: 1px solid var(--hairline);
}
.keypoints h4, .chartstrip h4 { margin: 0 0 8px; font-size: 13px; letter-spacing: -0.01em; }
.keypoints__list { margin: 0; padding-left: 20px; display: grid; gap: 7px; }
.keypoints__list li { font-size: 13.5px; line-height: 1.5; color: var(--ink-80); }
.keypoints p { margin-top: 10px; }
.chartstrip { margin: 4px 0 16px; }
.chartstrip .shots img {
  height: 132px; width: auto; border-radius: var(--radius-sm);
  border: 1px solid var(--hairline); background: var(--surface-sunken); display: block;
}
.chartstrip .shots a { flex: none; }

/* A seller's own avatar, sized and clipped exactly like the generated mark it
   replaces, so a page with a mix of the two still reads as one design. */
.sellermark {
  display: block; width: 100%; height: 100%; object-fit: cover;
  border-radius: inherit; background: var(--surface-sunken);
}

/* ------------------------------------------------------------------ pager
 *
 * The ranking runs to hundreds of pages once the whole MQL5 catalogue is
 * indexed, so prev/next alone is not navigation. First and last are always
 * reachable, a window of nearby numbers gives a sense of position, and the
 * jump box is the only practical way to reach page 200-odd. Disabled ends are
 * rendered as plain text rather than dead buttons: a control that cannot do
 * anything should not look like one.
 */

.pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--hairline);
}

.pager__btn {
  min-width: 36px;
  padding: 7px 11px;
  border: 1px solid var(--hairline-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink-80);
  font: inherit;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
}

.pager__btn:hover { border-color: var(--ink-40); color: var(--ink); }

.pager__btn[aria-current="page"] {
  background: var(--action);
  border-color: var(--action);
  color: #fff;
  font-weight: 600;
}

.pager__gap {
  padding: 7px 8px;
  font-size: 13px;
  color: var(--ink-40);
}

.pager__jump {
  margin-left: auto;
  font-size: 12.5px;
  color: var(--ink-56);
  display: flex;
  align-items: center;
  gap: 6px;
}

.pager__jump input {
  width: 68px;
  padding: 6px 8px;
  border: 1px solid var(--hairline-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.pager__jump input:focus { outline: 2px solid var(--action); outline-offset: -1px; }

@media (max-width: 720px) {
  .pager__jump { margin-left: 0; width: 100%; justify-content: flex-end; }
}

/* ------------------------------------------------------------------ */

/* ------------------------------------------------------------------ newsbar
 * Economic calendar strip at the top of the homepage. FF-style: impact dot,
 * event, Actual / Forecast / Previous. The table scrolls inside its own
 * container on narrow screens; the page never scrolls horizontally. */
.newsbar { padding: 18px 0 6px; }
.newsbar__head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.newsbar__title { font-size: 15px; font-weight: 700; margin: 0; letter-spacing: 0.01em; }
.newsbar__stamp { font-size: 12px; color: var(--ink-56); }
.newsbar__stamp .pulse { margin-right: 4px; }
.newsbar__spacer { flex: 1; }
.segmented--sm button { padding: 4px 9px; font-size: 11.5px; }
.newsbar__scroll { overflow-x: auto; margin-top: 10px; border: 1px solid var(--line);
  border-radius: 10px; background: var(--surface); }
.newsbar__table { width: 100%; border-collapse: collapse; font-size: 12.5px; min-width: 640px; }
.newsbar__table th { text-align: left; font-size: 10.5px; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--ink-40); padding: 7px 10px 5px;
  border-bottom: 1px solid var(--line); }
.newsbar__table th.num, .newsbar__table td.num { text-align: right;
  font-variant-numeric: tabular-nums; }
.newsbar__table td { padding: 5px 10px; border-bottom: 1px solid var(--line-soft, var(--line)); }
.newsbar__table tr:last-child td { border-bottom: 0; }
.newsbar__day td { background: var(--surface-sunken); color: var(--ink-56);
  font-weight: 600; font-size: 11px; padding: 4px 10px; }
.newsbar__time { white-space: nowrap; color: var(--ink-80); }
.newsbar__ccy { font-weight: 700; letter-spacing: 0.03em; }
.newsdot { display: inline-block; width: 9px; height: 9px; border-radius: 2px; }
.newsdot--high { background: var(--danger); }
.newsdot--medium { background: var(--warn); }
.newsdot--low { background: #d8c24a; }
.newsdot--none { background: var(--ink-40); opacity: 0.4; }
.newsbar__actual--better { color: var(--good); font-weight: 700; }
.newsbar__actual--worse { color: var(--danger); font-weight: 700; }
.newsbar__actual--flat { font-weight: 700; }
.newsbar__pending { color: var(--ink-40); }
.newsbar__soon td { background: var(--warn-soft); }
.newsbar__foot { font-size: 11px; color: var(--ink-40); margin: 8px 2px 10px; }
.newsbar__empty { padding: 14px; color: var(--ink-56); font-size: 12.5px; }

/* A flag chip carries a sentence-length label on some rows; with nowrap it was
 * 300px+ wide and pushed 36px of horizontal document scroll on phones
 * (mql5.html at 390px, found by the 2026-07-30 split audit). On narrow
 * screens the chip clips with an ellipsis instead of widening the page —
 * the full text stays available on the detail page. */
@media (max-width: 520px) {
  .row .flag, .itemcard .flag {
    max-width: calc(100vw - 120px); overflow: hidden; text-overflow: ellipsis;
  }
}

/* ==========================================================================
 * PHONE (audited on a real iPhone viewport, 2026-08-04)
 *
 * The desktop layout degraded quietly rather than loudly: nothing threw, the
 * pages "worked", and every file:// check passed — while on a 390px screen two
 * of the five nav links were off-screen with no hint they existed, the
 * calendar's Actual column (the whole point of that strip) sat outside the
 * viewport, and the search button was cut in half. Measured, not guessed: each
 * rule below fixes something observed at 375 / 390 / 430 px.
 * ====================================================================== */

@media (max-width: 640px) {
  /* --- header ---------------------------------------------------------
   * Brand + 5 links + theme toggle is ~530px of content. On one row the
   * overflow-x added on 2026-07-30 stopped the PAGE scrolling sideways but
   * pushed Sellers and Brokers out of sight — a scroll container with no
   * affordance reads as "this site has three pages". Let the header wrap so
   * the nav gets its own full-width row, and shrink the links enough that
   * all five fit without scrolling at 375px. */
  .site-header__inner { flex-wrap: wrap; height: auto; gap: 8px; padding: 8px 0; }
  .site-nav {
    order: 3; width: 100%; margin-left: 0; overflow-x: visible;
    justify-content: space-between; gap: 2px;
  }
  .site-nav a {
    padding: 9px 6px; font-size: 12.5px;
    /* 38px tall: not Apple's 44pt, but the row is edge-to-edge and every
       link is its own tap zone, which is what actually matters here. */
    min-height: 38px; display: flex; align-items: center;
  }
  .brand { font-size: 15px; }
  .iconbtn { margin-left: auto; }

  /* --- economic calendar ----------------------------------------------
   * The table declared min-width:640px, so on a phone the reader saw Time /
   * Currency / Event and had to discover a sideways scroll to reach Actual.
   * Previous is the least useful column on a small screen, so it goes; the
   * rest now fit at 375px and the strip reads without scrolling. */
  .newsbar__table { min-width: 0; font-size: 12px; }
  .newsbar__table th:nth-child(7), .newsbar__table td:nth-child(7) { display: none; }
  .newsbar__table th, .newsbar__table td { padding: 6px 6px; }
  .newsbar__head { gap: 6px; }
  .newsbar__title { font-size: 14px; }
  .segmented--sm button { padding: 7px 10px; min-height: 34px; }

  /* --- search ----------------------------------------------------------
   * Input + Advanced + Search on one pill overflowed the viewport and clipped
   * the primary button. Stack the actions under the field. */
  .searchbar { flex-wrap: wrap; border-radius: 22px; padding: 10px 14px; }
  .searchbar input { min-width: 0; flex: 1 1 100%; order: 1; }
  .searchbar__actions { order: 2; width: 100%; display: flex; gap: 8px; margin-top: 8px; }
  .searchbar__actions .btn { flex: 1; min-height: 40px; }

  /* --- filter rows -----------------------------------------------------
   * A segmented control wider than the screen pushed 10px of document scroll
   * at 375px. It scrolls inside itself instead; the page never does. */
  .segmented { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
  .segmented::-webkit-scrollbar { display: none; }
  .segmented button { white-space: nowrap; }

  /* --- touch targets + legibility -------------------------------------- */
  .chip { padding: 8px 12px; font-size: 12.5px; min-height: 34px; }
  .statcard__label { font-size: 11.5px; }
  /* A long mono value ("2026-08-04") broke mid-token in the tile. */
  .statcard__value { font-size: 21px; }

  /* Back-links were 18px tall — a real miss target on a phone. */
  a.tiny.muted { display: inline-flex; align-items: center; min-height: 36px; }
}

@media (max-width: 520px) {
  /* --- EA / seller / broker profile head -------------------------------
   * `.profile-hero__id` is a flex ROW: a 62px logo beside the title left the
   * name wrapping inside ~270px ("The Gold Reaper / MT5") with a dead gutter
   * under the logo. Stack it — the logo reads fine above the name. */
  .profile-hero__id { flex-direction: column; align-items: flex-start; gap: 12px; }
  .profile-hero__score { align-self: flex-start; }
  .regchip { font-size: 11.5px; }
}

@media (max-width: 640px) {
  /* Second pass, from the same measurement run: controls still under a
   * comfortable thumb size. Standalone controls get real height; INLINE
   * links inside prose get vertical padding instead — that grows the hit
   * box without changing the line box, so a sentence does not gain gaps. */
  .brand { min-height: 40px; }
  .segmented button { min-height: 34px; }
  .panel__item { min-height: 40px; }
  a.tiny { padding-top: 6px; padding-bottom: 6px; }
}

@media (max-width: 640px) {
  /* The calendar still ran past the right edge: dropping one column was not
   * enough because the remaining ones size to their content. Fixed layout
   * with explicit shares makes the row fit the screen exactly and lets the
   * event name wrap instead of pushing Actual/Forecast out of view. */
  .newsbar__table { table-layout: fixed; width: 100%; }
  .newsbar__table th:nth-child(1), .newsbar__table td:nth-child(1) { width: 20%; }
  .newsbar__table th:nth-child(2), .newsbar__table td:nth-child(2) { width: 7%; }
  .newsbar__table th:nth-child(3), .newsbar__table td:nth-child(3) { width: 15%; }
  .newsbar__table th:nth-child(4), .newsbar__table td:nth-child(4) { width: 30%; }
  .newsbar__table th:nth-child(5), .newsbar__table td:nth-child(5) { width: 14%; }
  .newsbar__table th:nth-child(6), .newsbar__table td:nth-child(6) { width: 14%; }
  .newsbar__table td { overflow-wrap: anywhere; }
  .newsbar__table th { font-size: 9.5px; letter-spacing: 0.03em; }
}

/* "CURRENCY" is wider than the column it was given on a phone, so it ran into
 * the next header and the row read "CURRENCYEVENT". The values (USD, NZD) are
 * self-explanatory, so the LABEL abbreviates on small screens; the full word
 * stays everywhere there is room. */
.th-narrow { display: none; }
@media (max-width: 640px) {
  .th-wide { display: none; }
  .th-narrow { display: inline; }
  /* The score ring sat centred while every line above it was left-aligned. */
  .profile-hero__score { align-items: flex-start; }
}

@media (max-width: 640px) {
  /* Last pass. Everything still flagged is an INLINE link inside a sentence
   * ("by Profalgo Limited ↗", "documented as purchasable") or a text button
   * that opens more prose. Giving those a 44px box would tear holes in the
   * paragraphs around them, so they get a padded hit area instead — bigger
   * to the thumb, unchanged to the eye, because vertical padding on an inline
   * box does not grow the line. */
  .prose a, p a, td a, .panel a, .linkbtn { padding-top: 7px; padding-bottom: 7px; }
}

@media (max-width: 640px) {
  /* The footer has its own <nav>, which the header rules above never touched:
   * its links were 19px tall. On a phone the footer is where someone reaches
   * for the sibling site, so it needs thumb-sized rows too. */
  .site-footer nav { display: flex; flex-wrap: wrap; gap: 4px 14px; }
  .site-footer nav a { min-height: 36px; display: inline-flex; align-items: center; }
  .site-footer__inner { flex-direction: column; align-items: flex-start; gap: 10px; }
}
