/* RankingLab design system: "Calibrated Instrument", lab edition.
   Bottle green carries the brand, amber marks signals. Tokens in OKLCH;
   see DESIGN.md for the rationale. */

:root {
  --paper: oklch(0.984 0.005 160);
  --paper-2: oklch(0.961 0.008 160);
  --paper-3: oklch(0.927 0.012 160);
  --ink: oklch(0.22 0.025 170);
  --ink-2: oklch(0.35 0.025 170);
  --muted: oklch(0.5 0.02 170);
  --rule: oklch(0.885 0.012 160);
  --rule-strong: oklch(0.78 0.02 160);

  --brand-surface: oklch(0.36 0.075 165);
  --brand-deep: oklch(0.27 0.055 168);
  --brand-fg: oklch(0.42 0.09 165);
  --brand-tint: oklch(0.945 0.025 160);
  --on-brand: oklch(0.985 0.008 150);
  --on-brand-muted: oklch(0.87 0.035 160);
  --on-brand-rule: oklch(0.52 0.06 165);

  --signal: oklch(0.79 0.155 78);
  --signal-tint: oklch(0.962 0.04 88);
  --signal-on-brand: oklch(0.85 0.15 82);
  --focus: oklch(0.56 0.14 62);
  --mark-dot: oklch(0.72 0.165 70);
  --up: oklch(0.47 0.11 155);
  --down: oklch(0.53 0.17 32);

  --font-sans: 'Archivo', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-text: 'Literata', Georgia, 'Times New Roman', serif;

  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.3rem;
  --step-2: clamp(1.55rem, 1.25rem + 1.2vw, 2.05rem);
  --step-3: clamp(2rem, 1.4rem + 2.4vw, 3.1rem);
  --step-4: clamp(2.3rem, 1.4rem + 3.3vw, 4.3rem);
  --step-5: clamp(3rem, 1.4rem + 6.6vw, 7.4rem);

  --gutter: clamp(16px, 4vw, 44px);
  --maxw: 1260px;
  --radius: 4px;
  --ease: cubic-bezier(0.25, 1, 0.5, 1);
  --header-h: 68px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --paper: oklch(0.175 0.014 165);
    --paper-2: oklch(0.21 0.017 165);
    --paper-3: oklch(0.255 0.02 165);
    --ink: oklch(0.95 0.01 160);
    --ink-2: oklch(0.86 0.014 160);
    --muted: oklch(0.72 0.018 160);
    --rule: oklch(0.31 0.02 165);
    --rule-strong: oklch(0.42 0.025 165);
    --brand-surface: oklch(0.28 0.055 165);
    --brand-deep: oklch(0.21 0.038 168);
    --brand-fg: oklch(0.8 0.1 158);
    --brand-tint: oklch(0.25 0.035 165);
    --on-brand-rule: oklch(0.42 0.05 165);
    --signal: oklch(0.82 0.15 80);
    --signal-tint: oklch(0.28 0.05 80);
    --focus: oklch(0.82 0.15 80);
    --mark-dot: oklch(0.82 0.15 80);
    --up: oklch(0.8 0.12 155);
    --down: oklch(0.74 0.15 35);
  }
}
:root[data-theme='dark'] {
  --paper: oklch(0.175 0.014 165);
  --paper-2: oklch(0.21 0.017 165);
  --paper-3: oklch(0.255 0.02 165);
  --ink: oklch(0.95 0.01 160);
  --ink-2: oklch(0.86 0.014 160);
  --muted: oklch(0.72 0.018 160);
  --rule: oklch(0.31 0.02 165);
  --rule-strong: oklch(0.42 0.025 165);
  --brand-surface: oklch(0.28 0.055 165);
  --brand-deep: oklch(0.21 0.038 168);
  --brand-fg: oklch(0.8 0.1 158);
  --brand-tint: oklch(0.25 0.035 165);
  --on-brand-rule: oklch(0.42 0.05 165);
  --signal: oklch(0.82 0.15 80);
  --signal-tint: oklch(0.28 0.05 80);
  --focus: oklch(0.82 0.15 80);
  --mark-dot: oklch(0.82 0.15 80);
  --up: oklch(0.8 0.12 155);
  --down: oklch(0.74 0.15 35);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: var(--step-0);
  line-height: 1.6;
  font-feature-settings: 'tnum' 0;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--brand-fg); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2.5px solid var(--focus); outline-offset: 3px; border-radius: 2px; }
h1, h2, h3, h4 { margin: 0; line-height: 1.08; font-weight: 750; letter-spacing: -0.015em; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
ul, ol { margin: 0; padding: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--ink); color: var(--paper); padding: 10px 14px; border-radius: var(--radius); }
.skip:focus { top: 12px; }
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.num, .tnum { font-variant-numeric: tabular-nums; }
mark.todo { background: var(--signal-tint); color: var(--down); border: 1px dashed var(--signal); padding: 0 0.3em; border-radius: 3px; font-weight: 600; }

.display {
  font-stretch: 122%;
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 0.98;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in oklch, var(--paper) 94%, transparent);
  backdrop-filter: saturate(1.4) blur(6px);
  border-bottom: 1px solid var(--rule);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
.brand .mark { color: var(--brand-fg); }
.brand-word { font-stretch: 118%; font-weight: 800; font-size: 1.32rem; letter-spacing: -0.02em; }
.brand-word b { font-weight: 800; color: var(--brand-fg); }
.brand--light .brand-word b { color: var(--signal-on-brand); }
.brand--light .mark { --mark-dot: var(--signal-on-brand); }
.brand--light, .brand--light .mark { color: var(--on-brand); }
.site-nav { display: flex; align-items: center; gap: 8px; }
.site-nav ul { display: flex; list-style: none; gap: 2px; }
.site-nav a {
  display: block; padding: 8px 12px; color: var(--ink-2); text-decoration: none;
  font-weight: 550; font-size: 0.97rem; border-radius: var(--radius);
  transition: color 0.18s var(--ease), background-color 0.18s var(--ease);
}
.site-nav a:hover { color: var(--ink); background: var(--paper-2); }
.site-nav a[aria-current='page'] { color: var(--brand-fg); box-shadow: inset 0 -2px 0 var(--brand-fg); border-radius: 0; }
.theme-toggle, .nav-toggle {
  display: inline-grid; place-items: center; width: 40px; height: 40px;
  border: 1px solid var(--rule); background: transparent; color: var(--ink-2);
  border-radius: var(--radius); cursor: pointer; transition: border-color 0.18s var(--ease), color 0.18s var(--ease);
}
.theme-toggle:hover, .nav-toggle:hover { border-color: var(--rule-strong); color: var(--ink); }
.nav-toggle { display: none; }
.nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after {
  display: block; width: 18px; height: 2px; background: currentColor; position: relative; transition: transform 0.2s var(--ease);
}
.nav-toggle-bars::before, .nav-toggle-bars::after { content: ''; position: absolute; left: 0; }
.nav-toggle-bars::before { top: -6px; }
.nav-toggle-bars::after { top: 6px; }
.nav-toggle[aria-expanded='true'] .nav-toggle-bars { background: transparent; }
.nav-toggle[aria-expanded='true'] .nav-toggle-bars::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded='true'] .nav-toggle-bars::after { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 860px) {
  .nav-toggle { display: inline-grid; }
  .site-nav {
    position: absolute; left: 0; right: 0; top: var(--header-h);
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--paper); border-bottom: 1px solid var(--rule);
    padding: 8px var(--gutter) 20px;
    display: none;
  }
  .site-nav.is-open { display: flex; }
  .site-nav ul { flex-direction: column; }
  .site-nav a { padding: 14px 4px; font-size: 1.1rem; border-bottom: 1px solid var(--rule); border-radius: 0; }
  .site-nav a[aria-current='page'] { box-shadow: none; }
  .theme-toggle { margin-top: 14px; align-self: flex-start; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 0.6em;
  padding: 0.85em 1.25em; border-radius: var(--radius);
  font-weight: 650; font-size: 1rem; line-height: 1.1; text-decoration: none;
  border: 1.5px solid transparent; cursor: pointer;
  transition: transform 0.18s var(--ease), background-color 0.18s var(--ease), border-color 0.18s var(--ease), color 0.18s var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn .arrow { transition: transform 0.2s var(--ease); }
.btn:hover .arrow { transform: translateX(3px); }
.btn--solid { background: var(--brand-surface); color: var(--on-brand); }
.btn--solid:hover { background: var(--brand-deep); }
.btn--line { border-color: var(--rule-strong); color: var(--ink); }
.btn--line:hover { border-color: var(--ink); }
.on-brand .btn--solid { background: var(--on-brand); color: var(--brand-surface); }
.on-brand .btn--solid:hover { background: var(--brand-tint); }
.on-brand .btn--line { border-color: var(--on-brand-rule); color: var(--on-brand); }
.on-brand .btn--line:hover { border-color: var(--on-brand); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Brand band (drenched) ---------- */
.on-brand { background: var(--brand-surface); color: var(--on-brand); }
.on-brand a:not(.btn) { color: var(--on-brand); }
.on-brand .muted { color: var(--on-brand-muted); }
.muted { color: var(--muted); }

/* Measurement ruler: a tick-mark divider. */
.ruler {
  height: 14px;
  background:
    repeating-linear-gradient(90deg, currentColor 0 1px, transparent 1px 10px) bottom / 100% 6px no-repeat,
    repeating-linear-gradient(90deg, currentColor 0 1px, transparent 1px 50px) bottom / 100% 14px no-repeat;
  opacity: 0.35;
}

/* ---------- Hero ---------- */
.hero, .page-head.on-brand { position: relative; overflow: hidden; isolation: isolate; }
.hero::before, .page-head.on-brand::before {
  content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    linear-gradient(color-mix(in oklch, var(--on-brand) 7%, transparent) 1px, transparent 1px),
    linear-gradient(90deg, color-mix(in oklch, var(--on-brand) 7%, transparent) 1px, transparent 1px);
  background-size: 32px 32px;
  -webkit-mask-image: radial-gradient(ellipse 80% 90% at 72% 35%, #000 25%, transparent 78%);
  mask-image: radial-gradient(ellipse 80% 90% at 72% 35%, #000 25%, transparent 78%);
}
.hero-inner {
  display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  gap: clamp(32px, 5vw, 80px); align-items: center;
  padding-block: clamp(48px, 8vw, 112px) clamp(40px, 6vw, 84px);
}
.hero h1 { font-size: clamp(2.7rem, 1.1rem + 4.7vw, 5.5rem); font-stretch: 112%; }
.hero h1 .accent { color: var(--signal-on-brand); }
.hero-lede { margin-top: 28px; font-size: clamp(1.08rem, 1rem + 0.35vw, 1.28rem); line-height: 1.55; max-width: 54ch; color: var(--on-brand-muted); }
.hero-lede strong { color: var(--on-brand); font-weight: 650; }
.hero .btn-row { margin-top: 36px; }
.hero .ruler { color: var(--on-brand); }

.edition-bar {
  display: flex; flex-wrap: wrap; gap: 6px 28px; align-items: center;
  padding-block: 16px; font-size: 0.92rem; color: var(--on-brand-muted);
  border-top: 1px solid var(--on-brand-rule);
}
.edition-bar strong { color: var(--on-brand); font-weight: 650; }
.live-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--signal); margin-right: 8px; vertical-align: 1px; box-shadow: 0 0 0 0 var(--signal); animation: pulse 2.4s var(--ease) infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in oklch, var(--signal) 60%, transparent); } 70% { box-shadow: 0 0 0 9px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }

/* Hero ladder: an illustrative, self-recalibrating ranking. */
.ladder {
  background: color-mix(in oklch, var(--brand-deep) 55%, var(--brand-surface));
  border: 1px solid var(--on-brand-rule); border-radius: 6px;
  padding: 18px 18px 14px;
  box-shadow: 0 30px 60px -30px oklch(0.12 0.04 168 / 0.75);
}
.ladder-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 0.82rem; color: var(--on-brand-muted); padding-bottom: 12px; border-bottom: 1px solid var(--on-brand-rule); }
.ladder-head strong { color: var(--on-brand); font-weight: 650; font-size: 0.92rem; }
.ladder-list { list-style: none; position: relative; }
.ladder-row {
  display: grid; grid-template-columns: 2.1rem 1fr 7.5rem 3rem; gap: 10px; align-items: center;
  padding: 11px 0; border-bottom: 1px solid color-mix(in oklch, var(--on-brand-rule) 55%, transparent);
  font-size: 0.9rem; will-change: transform;
}
.ladder-row:last-child { border-bottom: 0; }
.ladder-rank { font-stretch: 115%; font-weight: 800; font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.ladder-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--on-brand); }
.ladder-name small { display: block; color: var(--on-brand-muted); font-size: 0.78rem; }
.ladder-score { text-align: right; font-variant-numeric: tabular-nums; font-weight: 650; }
.ladder-row.moved-up .ladder-rank { color: oklch(0.9 0.12 125); }
.ladder-row.moved-down .ladder-rank { color: oklch(0.83 0.11 45); }
.ladder-note { margin-top: 10px; font-size: 0.78rem; color: var(--on-brand-muted); }
.ladder .track { --track: color-mix(in oklch, var(--on-brand) 22%, transparent); --band: color-mix(in oklch, var(--on-brand) 38%, transparent); --dot: var(--on-brand); }

/* ---------- Score track (signature component) ---------- */
.track {
  --track: var(--rule); --band: color-mix(in oklch, var(--brand-fg) 26%, transparent); --dot: var(--brand-fg);
  position: relative; display: block; height: 18px;
}
.track::before { content: ''; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: var(--track); }
.track-band { position: absolute; top: 4px; bottom: 4px; left: var(--lo); right: calc(100% - var(--hi)); background: var(--band); border-radius: 2px; transition: left 0.6s var(--ease), right 0.6s var(--ease); }
.track-band::before, .track-band::after { content: ''; position: absolute; top: -3px; bottom: -3px; width: 1.5px; background: var(--dot); opacity: 0.55; }
.track-band::before { left: 0; }
.track-band::after { right: 0; }
.track-dot { position: absolute; top: 50%; left: var(--s); width: 9px; height: 9px; margin: -4.5px 0 0 -4.5px; border-radius: 50%; background: var(--dot); box-shadow: 0 0 0 2px var(--paper); transition: left 0.6s var(--ease); }
.on-brand .track-dot, .ladder .track-dot { box-shadow: none; }

/* ---------- Sections ---------- */
.section { padding-block: clamp(64px, 9vw, 128px); }
.section--tight { padding-block: clamp(48px, 6vw, 80px); }
.section--alt { background: var(--paper-2); }
.section-head { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr); gap: 24px 64px; align-items: end; margin-bottom: clamp(36px, 5vw, 64px); }
.section-head h2 { font-size: var(--step-4); font-stretch: 118%; font-weight: 800; letter-spacing: -0.025em; }
.section-head p { font-size: 1.12rem; color: var(--ink-2); max-width: 52ch; }
.section-head--stack { grid-template-columns: 1fr; }
.kicker { display: inline-block; font-size: 0.85rem; font-weight: 650; color: var(--brand-fg); margin-bottom: 18px; }
.on-brand .kicker, .feature-copy .kicker { color: var(--on-brand-muted); }

/* ---------- Featured ranking + index ---------- */
.feature {
  display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  border: 1px solid var(--rule); border-radius: 6px; overflow: hidden; background: var(--paper);
}
.feature-copy { padding: clamp(24px, 3.5vw, 44px); background: var(--brand-surface); color: var(--on-brand); display: flex; flex-direction: column; gap: 18px; }
.feature-copy h3 { font-size: var(--step-3); font-stretch: 116%; font-weight: 800; }
.feature-copy p { color: var(--on-brand-muted); }
.feature-copy .btn-row { margin-top: auto; padding-top: 12px; }
.feature-list { list-style: none; padding: 10px clamp(18px, 3vw, 36px); }
.feature-list li { display: grid; grid-template-columns: 2.4rem minmax(0, 1fr) minmax(90px, 9rem) 3.2rem; gap: 14px; align-items: center; padding: 15px 0; border-bottom: 1px solid var(--rule); }
.feature-list li:last-child { border-bottom: 0; }
.feature-list .r { font-stretch: 115%; font-weight: 800; font-size: 1.3rem; font-variant-numeric: tabular-nums; }
.feature-list .n { min-width: 0; }
.feature-list .n strong { display: block; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.feature-list .n span { color: var(--muted); font-size: 0.88rem; }
.feature-list .s { text-align: right; font-weight: 650; font-variant-numeric: tabular-nums; }

.index-list { list-style: none; border-top: 1.5px solid var(--ink); }
.index-list li { border-bottom: 1px solid var(--rule); }
.index-list a, .index-row {
  display: grid; grid-template-columns: 4.5rem minmax(0, 1fr) 11rem 9rem 2rem; gap: 20px; align-items: center;
  padding: 22px 4px; color: var(--ink); text-decoration: none;
  transition: background-color 0.18s var(--ease), padding 0.25s var(--ease);
}
.index-list a:hover { background: var(--paper-2); padding-inline: 14px 4px; }
.index-size { font-stretch: 122%; font-weight: 800; font-size: 2rem; line-height: 1; color: var(--brand-fg); font-variant-numeric: tabular-nums; }
.index-title { font-weight: 700; font-size: 1.18rem; line-height: 1.25; }
.index-title small { display: block; margin-top: 4px; color: var(--muted); font-weight: 450; font-size: 0.92rem; }
.index-meta { font-size: 0.9rem; color: var(--ink-2); }
.index-arrow { color: var(--brand-fg); font-size: 1.3rem; transition: transform 0.2s var(--ease); }
.index-list a:hover .index-arrow { transform: translateX(4px); }
/* A ranking announced for a later edition: drawn like a published one,
   without a link, its edition column marked coming next. */
.index-soon { display: inline-block; padding: 4px 11px; border: 1px solid var(--rule-strong); border-radius: 999px; font-size: 0.78rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-2); white-space: nowrap; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; }
.chips li { padding: 6px 12px; border: 1px dashed var(--rule-strong); border-radius: 999px; font-size: 0.9rem; color: var(--ink-2); }

/* ---------- Scope: academia to practice ---------- */
.scope { list-style: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1.5px solid var(--ink); }
.scope li { display: flex; flex-direction: column; gap: 12px; padding: 28px clamp(18px, 2.4vw, 32px) 30px; border-right: 1px solid var(--rule); }
.scope li:first-child { padding-left: 0; }
.scope li:last-child { border-right: 0; }
.index-group { font-size: var(--step-1); font-weight: 750; margin: 52px 0 14px; }
.index-group small { display: block; margin-top: 4px; font-size: 0.95rem; font-weight: 450; color: var(--muted); }
.index-group:first-of-type { margin-top: 8px; }
.scope .kicker { margin-bottom: 0; }
.scope h3 { font-size: var(--step-2); font-stretch: 114%; font-weight: 800; }
.scope p { color: var(--ink-2); }
.scope a { margin-top: auto; padding-top: 6px; font-weight: 650; }
.scope-core h3::after { content: 'Core'; margin-left: 10px; vertical-align: 6px; font-size: 0.72rem; font-stretch: 100%; font-weight: 650; padding: 2px 8px; border-radius: 3px; background: var(--brand-tint); color: var(--brand-fg); }

/* ---------- Ranking domain tabs ---------- */
.tabs { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 34px; border-bottom: 1px solid var(--on-brand-rule); }
.tabs a {
  display: inline-flex; align-items: baseline; gap: 10px; padding: 12px 18px 13px; margin-bottom: -1px;
  color: var(--on-brand-muted); text-decoration: none; font-weight: 650; border-bottom: 3px solid transparent;
}
.tabs a:hover { color: var(--on-brand); }
.tabs a[aria-current='page'] { color: var(--on-brand); border-bottom-color: var(--signal-on-brand); }
.tabs small { font-weight: 500; font-size: 0.82rem; color: var(--on-brand-muted); }

/* ---------- Pipeline diagram ---------- */
.pipeline { list-style: none; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); position: relative; counter-reset: stage; }
.pipeline::before { content: ''; position: absolute; left: 0; right: 0; top: 23px; height: 2px; background: var(--ink); }
.stage { position: relative; padding-right: 22px; counter-increment: stage; }
.stage-node {
  position: relative; z-index: 1; width: 48px; height: 48px; border-radius: 50%;
  display: grid; place-items: center; font-weight: 800; font-stretch: 115%; font-variant-numeric: tabular-nums;
  background: var(--paper); border: 2px solid var(--ink); color: var(--ink);
}
.stage--human .stage-node { background: var(--brand-surface); border-color: var(--brand-surface); color: var(--on-brand); }
.stage--ai .stage-node { background: var(--paper); border-style: dashed; border-color: var(--brand-fg); color: var(--brand-fg); }
.section--alt .stage-node:not(.stage--human .stage-node) { background: var(--paper-2); }
.stage h3 { margin-top: 22px; font-size: 1.22rem; }
.stage .who { display: inline-block; margin-top: 8px; font-size: 0.8rem; font-weight: 650; padding: 2px 8px; border-radius: 3px; background: var(--paper-3); color: var(--ink-2); }
.stage--human .who { background: var(--brand-tint); color: var(--brand-fg); }
.stage--ai .who { background: transparent; border: 1px dashed var(--brand-fg); color: var(--brand-fg); }
.stage p { margin-top: 12px; color: var(--ink-2); font-size: 0.97rem; line-height: 1.55; }
.pipeline-legend { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-top: 40px; font-size: 0.9rem; color: var(--muted); }
.pipeline-legend span::before { content: ''; display: inline-block; width: 12px; height: 12px; border-radius: 50%; margin-right: 8px; vertical-align: -1px; border: 2px solid var(--ink); }
.pipeline-legend .lg-human::before { background: var(--brand-surface); border-color: var(--brand-surface); }
.pipeline-legend .lg-ai::before { border-style: dashed; border-color: var(--brand-fg); }

/* ---------- Weights bar ---------- */
.weights { display: grid; gap: 28px; }
.weights-bar { display: flex; height: 64px; border-radius: 4px; overflow: hidden; border: 1px solid var(--rule-strong); }
.weights-bar span {
  flex: var(--w) 1 0; display: flex; align-items: flex-end; padding: 8px 10px;
  font-weight: 700; font-size: 0.9rem; color: var(--on-brand); font-variant-numeric: tabular-nums;
  border-right: 2px solid var(--paper);
}
.weights-bar span:last-child { border-right: 0; }
.weights-bar .w-ai { background: oklch(0.36 0.075 165); }
.weights-bar .w-depth { background: oklch(0.29 0.055 172); }
.weights-bar .w-field { background: oklch(0.44 0.085 158); }
.weights-bar .w-future { background: oklch(0.5 0.085 148); }
.weights-bar .w-outcomes { background: oklch(0.23 0.04 178); }
.weights-bar .w-external { background: repeating-linear-gradient(135deg, color-mix(in oklch, var(--signal) 45%, transparent) 0 2px, transparent 2px 7px) var(--signal-tint); color: var(--down); }
.pillar-defs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 36px 40px; list-style: none; }
.pillar-defs li { padding-top: 18px; border-top: 1px solid var(--rule-strong); }
.pillar-defs h3 { font-size: 1.15rem; display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.pillar-defs h3 .w { font-stretch: 115%; font-weight: 800; color: var(--brand-fg); font-variant-numeric: tabular-nums; }
.pillar-defs p { margin-top: 8px; color: var(--ink-2); }
.pillar-defs li.ext h3 .w { color: var(--down); }

/* ---------- Verification ---------- */
.verify { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
.verify h2 { font-size: var(--step-4); font-stretch: 118%; font-weight: 800; letter-spacing: -0.025em; }
.verify-lede { margin-top: 24px; font-size: 1.15rem; color: var(--on-brand-muted); max-width: 50ch; }
.stamp {
  display: inline-grid; gap: 4px; text-align: center; padding: 18px 26px;
  border: 3px double currentColor; border-radius: 4px; transform: rotate(-3deg);
  font-stretch: 125%; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; font-size: 0.95rem; line-height: 1.2;
}
.stamp small { font-stretch: 100%; font-weight: 550; letter-spacing: 0; text-transform: none; font-size: 0.8rem; opacity: 0.85; }
.flags { list-style: none; display: grid; gap: 0; border-top: 1px solid var(--on-brand-rule); }
.flags li { display: grid; grid-template-columns: 2rem 1fr; gap: 10px; padding: 14px 0; border-bottom: 1px solid var(--on-brand-rule); }
.flags li::before { content: '\00D7'; font-weight: 800; color: var(--signal); font-size: 1.2rem; line-height: 1.3; }
.section--paper .flags { border-top-color: var(--rule); }
.section--paper .flags li { border-bottom-color: var(--rule); }

/* ---------- Uncertainty explainer ---------- */
.explain { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 96px); align-items: center; }
.explain h2 { font-size: clamp(2.2rem, 1.3rem + 2.8vw, 3.8rem); font-stretch: 118%; font-weight: 800; letter-spacing: -0.025em; }
.explain p { margin-top: 20px; color: var(--ink-2); font-size: 1.1rem; max-width: 48ch; }
.specimen { border: 1px solid var(--rule-strong); border-radius: 6px; padding: clamp(20px, 3vw, 36px); background: var(--paper); }
.specimen-row { display: grid; grid-template-columns: auto 1fr auto; gap: 20px; align-items: center; }
.specimen-rank { font-stretch: 125%; font-weight: 800; font-size: clamp(3rem, 2rem + 4vw, 5rem); line-height: 0.9; color: var(--brand-fg); font-variant-numeric: tabular-nums; }
.specimen-rank small { display: block; font-size: 0.85rem; font-stretch: 100%; font-weight: 550; color: var(--muted); margin-top: 8px; }
.specimen .track { height: 34px; }
.specimen .track-dot { width: 15px; height: 15px; margin: -7.5px 0 0 -7.5px; }
.specimen-score { font-weight: 800; font-size: 2rem; font-variant-numeric: tabular-nums; font-stretch: 112%; }
.specimen-labels { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--rule); font-size: 0.9rem; color: var(--ink-2); }
.specimen-labels strong { display: block; color: var(--ink); font-size: 0.95rem; }
.axis { display: flex; justify-content: space-between; font-size: 0.75rem; color: var(--muted); font-variant-numeric: tabular-nums; margin-top: 6px; }

/* ---------- Commitments ledger ---------- */
.ledger { list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 64px; counter-reset: pledge; }
.ledger li { counter-increment: pledge; display: grid; align-content: start; grid-template-columns: 3.2rem 1fr; gap: 6px 14px; padding: 26px 0; border-top: 1px solid var(--rule-strong); }
.ledger li::before { content: counter(pledge, decimal-leading-zero); grid-row: span 2; font-stretch: 120%; font-weight: 800; font-size: 1.3rem; color: var(--brand-fg); font-variant-numeric: tabular-nums; }
.ledger h3 { font-size: 1.2rem; }
.ledger p { color: var(--ink-2); }

/* ---------- Split CTA / updates ---------- */
.split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(32px, 5vw, 72px); }
.split h2 { font-size: var(--step-3); font-stretch: 116%; font-weight: 800; }
.split p { margin-top: 16px; color: var(--ink-2); max-width: 50ch; }
.split .btn-row { margin-top: 26px; }
.updates { list-style: none; border-top: 1.5px solid var(--ink); }
.updates li { display: grid; grid-template-columns: 8.5rem 1fr; gap: 20px; padding: 18px 0; border-bottom: 1px solid var(--rule); }
.updates time { font-size: 0.9rem; color: var(--muted); font-variant-numeric: tabular-nums; padding-top: 2px; }
.updates strong { font-weight: 650; }
.updates p { color: var(--ink-2); margin-top: 4px; font-size: 0.97rem; }
.tag { display: inline-block; font-size: 0.75rem; font-weight: 650; padding: 1px 7px; border-radius: 3px; margin-right: 8px; background: var(--paper-3); color: var(--ink-2); vertical-align: 2px; }
.tag--method { background: var(--brand-tint); color: var(--brand-fg); }
.tag--correction { background: var(--signal-tint); color: var(--down); }

/* ---------- Inner page header ---------- */
.page-head { padding-block: clamp(48px, 7vw, 96px) clamp(36px, 5vw, 64px); }
.page-head h1 { font-size: var(--step-4); font-stretch: 120%; font-weight: 800; letter-spacing: -0.025em; max-width: 18ch; }
.page-head .lede { margin-top: 22px; font-size: clamp(1.08rem, 1rem + 0.3vw, 1.25rem); max-width: 60ch; color: var(--on-brand-muted); }
.page-head .lede--answer { margin-top: 16px; padding-left: 16px; border-left: 3px solid var(--signal); color: var(--on-brand); font-weight: 500; }
.page-head .meta-line { margin-top: 26px; display: flex; flex-wrap: wrap; gap: 6px 22px; font-size: 0.92rem; color: var(--on-brand-muted); }
.page-head .meta-line strong { color: var(--on-brand); font-weight: 650; }
.crumbs { font-size: 0.88rem; margin-bottom: 22px; color: var(--on-brand-muted); }
.crumbs a { color: var(--on-brand-muted); }
.page-head--paper { background: var(--paper); color: var(--ink); border-bottom: 1px solid var(--rule); }
.page-head--paper h1 { font-size: var(--step-3); max-width: 26ch; }
.page-head--paper .lede, .page-head--paper .crumbs, .page-head--paper .crumbs a, .page-head--paper .meta-line { color: var(--ink-2); }
.page-head--paper .meta-line strong { color: var(--ink); }

/* ---------- Long-form documents ---------- */

/* ---------- Methodology figures: research engine and workflow ---------- */
.prose .engine, .prose .flow { font-family: var(--font-sans); font-size: 0.93rem; line-height: 1.45; margin-block: 1.6em; }
.engine ul, .flow ol { list-style: none; padding-left: 0; }
.prose .engine li + li, .prose .flow li + li { margin-top: 0; }
.engine { display: grid; gap: 14px; }
.engine-layer { position: relative; display: grid; grid-template-columns: 9.5rem minmax(0, 1fr); gap: 14px; align-items: start; padding: 16px 18px; border-radius: 6px; }
.engine-layer + .engine-layer::before { content: ''; position: absolute; left: 50%; top: -15px; width: 2px; height: 14px; background: var(--rule-strong); }
.engine-tag { font-size: 0.74rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; padding-top: 3px; }
.engine-layer p { margin-top: 4px; }
.engine-layer--human { background: var(--brand-surface); color: var(--on-brand); }
.engine-layer--human .engine-tag, .engine-layer--human p { color: var(--on-brand-muted); }
.engine-layer--core { background: var(--paper-2); border: 1px solid var(--rule-strong); }
.engine-layer--ai { background: var(--brand-tint); border: 1.5px dashed var(--brand-fg); }
.engine-layer--core .engine-tag, .engine-layer--ai .engine-tag { color: var(--brand-fg); }
.engine-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.engine-chips li { padding: 7px 11px; border: 1px solid var(--rule); border-radius: 4px; background: var(--paper); font-weight: 650; }
.engine-chips small { display: block; font-weight: 450; font-size: 0.78rem; color: var(--muted); }
.engine figcaption, .flow figcaption { font-size: 0.85rem; color: var(--muted); }
.flow ol { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px 16px; }
.flow-step { display: grid; align-content: start; gap: 4px; padding-top: 12px; border-top: 3px solid var(--brand-surface); }
.flow-step--ai { border-top: 3px dashed var(--brand-fg); }
.flow-n { font-weight: 800; font-stretch: 115%; color: var(--brand-fg); font-variant-numeric: tabular-nums; }
.flow-step strong { font-size: 1rem; line-height: 1.25; }
.flow-who { justify-self: start; font-size: 0.72rem; font-weight: 650; padding: 1px 7px; border-radius: 3px; background: var(--brand-tint); color: var(--brand-fg); }
.flow-step--ai .flow-who { background: transparent; border: 1px dashed var(--brand-fg); }
.flow-step p { color: var(--ink-2); font-size: 0.88rem; }
.flow figcaption { margin-top: 18px; }

.doc { display: grid; grid-template-columns: 15rem minmax(0, 1fr); gap: clamp(32px, 5vw, 80px); padding-block: clamp(40px, 6vw, 80px); }
.doc-toc { position: sticky; top: calc(var(--header-h) + 24px); align-self: start; font-size: 0.92rem; }
.doc-toc h2 { font-size: 0.85rem; font-weight: 650; color: var(--muted); margin-bottom: 12px; }
.doc-toc ol { list-style: none; border-left: 1px solid var(--rule); }
.doc-toc a { display: block; padding: 6px 0 6px 14px; margin-left: -1px; color: var(--ink-2); text-decoration: none; border-left: 2px solid transparent; line-height: 1.35; }
.doc-toc a:hover { color: var(--ink); border-left-color: var(--rule-strong); }
.doc-toc a.is-active { color: var(--brand-fg); border-left-color: var(--brand-fg); }
.doc-meta { display: flex; flex-wrap: wrap; gap: 8px 20px; padding: 14px 0; margin-bottom: 36px; border-block: 1px solid var(--rule); font-size: 0.9rem; color: var(--ink-2); }
.doc-meta strong { color: var(--ink); font-weight: 650; }

.prose { font-family: var(--font-text); font-size: 1.09rem; line-height: 1.72; color: var(--ink); }
.prose > * { max-width: 70ch; }
.prose > figure { max-width: 60rem; }
.prose > * + * { margin-top: 1.1em; }
.prose h2 { font-family: var(--font-sans); font-size: var(--step-2); font-stretch: 112%; font-weight: 750; margin-top: 2.2em; padding-top: 0.9em; border-top: 1px solid var(--rule); }
.prose h3 { font-family: var(--font-sans); font-size: 1.2rem; font-weight: 700; margin-top: 1.8em; }
.prose h2 + *, .prose h3 + * { margin-top: 0.7em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: 0.45em; }
.prose li::marker { color: var(--brand-fg); }
.prose strong { font-weight: 650; }
.prose blockquote { margin-inline: 0; padding: 18px 22px; background: var(--brand-tint); border-radius: 4px; font-style: italic; }
.prose > p:first-child { font-size: 1.2rem; line-height: 1.6; }
.prose .table-wrap, .table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-family: var(--font-sans); font-size: 0.95rem; font-variant-numeric: tabular-nums; }
th, td { text-align: left; padding: 11px 14px 11px 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
thead th { font-weight: 650; border-bottom: 1.5px solid var(--ink); font-size: 0.88rem; color: var(--ink-2); }
td.numc, th.numc { text-align: right; padding-right: 0; padding-left: 14px; }

/* Content blocks used on inner pages */
.blocks { display: grid; gap: clamp(48px, 6vw, 88px); }
.block { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 20px clamp(32px, 5vw, 80px); }
.block h2 { font-size: var(--step-3); font-stretch: 114%; font-weight: 800; }
.block .body > * + * { margin-top: 1em; }
.block .body p, .block .body li { color: var(--ink-2); }
.block .body ul { padding-left: 1.2em; }
.block .body li + li { margin-top: 0.5em; }
.block .body li::marker { color: var(--brand-fg); }
.note { padding: 18px 20px; border: 1px solid var(--rule-strong); border-radius: 4px; background: var(--paper-2); font-size: 0.97rem; color: var(--ink-2); }
.note strong { color: var(--ink); }

/* Rubric */
.ind-code { color: var(--brand-fg); font-variant-numeric: tabular-nums; margin-right: 0.3em; }
.prose h3[id^='ind-'] { padding-top: 1.2em; border-top: 1px dashed var(--rule); }
.lvl-table td:first-child { white-space: nowrap; width: 9.5rem; }
.lvl-table td:first-child strong { display: inline-block; min-width: 1.4em; color: var(--brand-fg); font-size: 1.05rem; }

/* Policies index */
.policy-list { list-style: none; border-top: 1.5px solid var(--ink); counter-reset: pol; }
.policy-list li { counter-increment: pol; }
.policy-list a { display: grid; grid-template-columns: 3.5rem minmax(0, 1fr) 7.5rem; gap: 18px; align-items: baseline; padding: 22px 4px; border-bottom: 1px solid var(--rule); text-decoration: none; color: var(--ink); transition: background-color 0.18s var(--ease); }
.policy-list a::before { content: counter(pol, decimal-leading-zero); font-stretch: 120%; font-weight: 800; color: var(--brand-fg); font-variant-numeric: tabular-nums; }
.policy-list a:hover { background: var(--paper-2); }
.policy-list strong { font-size: 1.15rem; font-weight: 700; }
.policy-list span { display: block; color: var(--ink-2); font-size: 0.95rem; margin-top: 4px; }
.policy-list em { font-style: normal; font-size: 0.85rem; color: var(--muted); text-align: right; }
.policy-list--contact a { grid-template-columns: 3.5rem minmax(0, 1fr) 15rem; }

/* FAQ */
.faq { border-top: 1.5px solid var(--ink); max-width: 860px; }
.faq details { border-bottom: 1px solid var(--rule); }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 20px; padding: 20px 0; font-weight: 650; font-size: 1.12rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; font-weight: 400; font-size: 1.5rem; line-height: 1; color: var(--brand-fg); transition: transform 0.2s var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq .answer { padding: 0 0 22px; color: var(--ink-2); max-width: 70ch; }
.faq .answer > * + * { margin-top: 0.8em; }
.faq--compact summary { font-size: 1.02rem; padding: 16px 0; }

/* ---------- Ranking page ---------- */
.preview-banner { background: var(--signal-tint); color: var(--ink); border-bottom: 1px solid color-mix(in oklch, var(--signal) 40%, transparent); }
.preview-banner .wrap { display: flex; gap: 14px; align-items: flex-start; padding-block: 14px; font-size: 0.95rem; }
.preview-banner strong { color: var(--down); }
.preview-banner svg { flex: none; margin-top: 2px; color: var(--down); }

.rk-layout { display: grid; grid-template-columns: minmax(0, 1fr) 17rem; gap: clamp(28px, 4vw, 56px); padding-block: clamp(32px, 4vw, 56px) clamp(64px, 8vw, 112px); }
.rk-controls { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.field { display: grid; gap: 6px; font-size: 0.85rem; font-weight: 600; color: var(--ink-2); }
.field input, .field select {
  font: inherit; font-size: 0.98rem; font-weight: 450; color: var(--ink);
  background: var(--paper); border: 1px solid var(--rule-strong); border-radius: var(--radius);
  padding: 10px 12px; min-height: 44px; width: 100%;
  transition: border-color 0.18s var(--ease), box-shadow 0.18s var(--ease);
}
.field input:hover, .field select:hover { border-color: var(--ink-2); }
.field input:focus, .field select:focus { outline: none; border-color: var(--brand-fg); box-shadow: 0 0 0 3px color-mix(in oklch, var(--brand-fg) 22%, transparent); }
.rk-status { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 0.9rem; color: var(--muted); margin-bottom: 10px; }
.rk-status a { font-weight: 600; }

.rk-head, .rk-row {
  display: grid;
  grid-template-columns: 5.4rem minmax(0, 1fr) minmax(120px, 13rem) 3.8rem 3.6rem 1rem;
  gap: 16px; align-items: center;
}
.rk-head { padding: 10px 6px; border-bottom: 1.5px solid var(--ink); font-size: 0.8rem; font-weight: 650; color: var(--ink-2); }
.rk-head .numc { text-align: right; }
.rk-list { list-style: none; }
.rk-entry { border-bottom: 1px solid var(--rule); }
.rk-entry[hidden] { display: none; }
.rk-row { padding: 14px 6px; cursor: pointer; list-style: none; transition: background-color 0.15s var(--ease); }
.rk-row::-webkit-details-marker { display: none; }
.rk-row:hover { background: var(--paper-2); }
details[open] > .rk-row { background: var(--brand-tint); }
.rk-rank { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 8px; }
.rk-pos { font-stretch: 118%; font-weight: 800; font-size: 1.45rem; line-height: 1; font-variant-numeric: tabular-nums; }
.rk-rank small { flex-basis: 100%; margin-top: 5px; font-size: 0.72rem; font-weight: 550; color: var(--muted); font-variant-numeric: tabular-nums; }
.mv { font-size: 0.85rem; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.mv--up { color: var(--up); }
.mv--down { color: var(--down); }
.mv--same { color: var(--muted); font-weight: 500; }
.mv--new { color: var(--brand-fg); font-size: 0.72rem; border: 1px solid currentColor; border-radius: 3px; padding: 1px 5px; }
.rk-name { min-width: 0; }
.rk-name strong { display: block; font-weight: 650; line-height: 1.3; }
.rk-name span { display: block; color: var(--muted); font-size: 0.9rem; line-height: 1.35; margin-top: 2px; }
.rk-name .rk-keyfacts { color: var(--ink-2); font-size: 0.82rem; margin-top: 4px; font-variant-numeric: tabular-nums; }
.rk-country { font-size: 0.92rem; color: var(--ink-2); line-height: 1.3; }
.rk-score { text-align: right; font-weight: 700; font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.fp { display: flex; align-items: flex-end; gap: 3px; height: 26px; justify-content: flex-end; }
.fp i { display: block; width: 6px; height: var(--h); background: var(--brand-fg); border-radius: 1px; opacity: 0.85; }
.fp i.ext { background: var(--signal); }
.chev { width: 12px; height: 12px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg) translate(-3px, -3px); transition: transform 0.2s var(--ease); }
details[open] .chev { transform: rotate(225deg) translate(-3px, -3px); }

.rk-detail { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px 44px; padding: 22px 6px 30px calc(5.4rem + 22px); }
.rk-detail h4 { font-size: 0.9rem; font-weight: 650; color: var(--ink-2); margin-bottom: 12px; }
.pbars { list-style: none; display: grid; gap: 10px; }
.pbars li { display: grid; grid-template-columns: 9.5rem 1fr 2.4rem; gap: 12px; align-items: center; font-size: 0.92rem; }
.pbars .lbl small { color: var(--muted); font-variant-numeric: tabular-nums; }
.pbars .bar { height: 8px; background: var(--paper-3); border-radius: 4px; overflow: hidden; }
.pbars .bar i { display: block; height: 100%; width: var(--v); background: var(--brand-fg); border-radius: 4px; }
.pbars li.ext .bar i { background: var(--signal); }
.pbars .v { text-align: right; font-weight: 650; font-variant-numeric: tabular-nums; }
.facts { display: grid; gap: 10px; font-size: 0.93rem; }
.facts div { display: grid; grid-template-columns: 7.2rem 1fr; gap: 12px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; color: var(--ink); }
.facts .facts-group { grid-template-columns: 1fr; margin-top: 6px; padding-top: 10px; border-top: 1px solid var(--rule); }
.facts .facts-group dt { color: var(--ink-2); font-weight: 650; }
.facts .facts-group dd { display: none; }
.verified { display: inline-flex; align-items: center; gap: 6px; font-weight: 650; color: var(--up); }
.verified svg { flex: none; }
/* The Triple Crown (AACSB, EQUIS and AMBA), beside the accreditations. */
.crown { display: inline-block; vertical-align: -1px; margin-inline-start: 3px; color: var(--mark-dot); }
/* Logos in a column of their own, between the rank and the name, when the ranking has them. */
.rk-head.rk-logos, .rk-logos .rk-row { grid-template-columns: 5rem 5rem minmax(0, 1fr) minmax(100px, 10rem) 3.8rem 3.6rem 1rem; }
.rk-logo-cell { display: flex; align-items: center; justify-content: center; width: 5rem; height: 3.25rem; }
.rk-logo { display: block; width: 100%; height: 100%; object-fit: contain; padding: 5px 6px; box-sizing: border-box; background: #fff; border: 1px solid var(--rule); border-radius: 8px; }
.rk-empty { padding: 48px 6px; text-align: center; color: var(--ink-2); }
/* A ranking's own layout (src/lib/ranking-layout.mjs): its columns are set on the list and its head. */
.rk-head.rk-custom, .rk-custom .rk-row { grid-template-columns: var(--rk-cols); column-gap: 12px; }
.rk-custom .rk-logo-cell { width: 4.4rem; height: 2.9rem; }
.rk-col .rk-minibar { width: calc(100% - 2.6rem); min-width: 1.2rem; max-width: 4rem; }
/* A row too wide to stand beside the aside takes the page's width; the aside follows below. */
.rk-layout--wide { grid-template-columns: minmax(0, 1fr); }
.rk-layout--wide .rk-aside { position: static; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); }
/* The controls of a ranking's own layout wrap, however many filters it has. */
.rk-controls--custom { display: flex; flex-wrap: wrap; }
.rk-controls--custom .field { flex: 1 1 8.5rem; min-width: 0; }
.rk-controls--custom .field:first-child { flex: 2 1 14rem; }
.rk-col { min-width: 0; font-size: 0.9rem; color: var(--ink-2); line-height: 1.35; }
.rk-col.numc { text-align: right; font-variant-numeric: tabular-nums; }
.rk-lead { display: flex; align-items: center; justify-content: center; color: var(--brand-fg); }
.rk-icon { display: inline-block; flex: none; vertical-align: -4px; color: var(--brand-fg); }
.rk-iconval { display: inline-flex; align-items: center; gap: 5px; margin-inline-end: 8px; }
.rk-iconval:last-child { margin-inline-end: 0; }
.rk-yn { display: inline-flex; align-items: center; gap: 4px; }
.rk-yn--yes .rk-icon { color: var(--up); }
.rk-yn--no, .rk-yn--no .rk-icon { color: var(--muted); }
.rk-chips { display: inline-flex; flex-wrap: wrap; gap: 4px; vertical-align: middle; }
.rk-chips span { display: inline; padding: 1px 8px; margin: 0; border: 1px solid var(--rule); border-radius: 999px; background: var(--paper); font-size: 0.8rem; color: var(--ink-2); }
.rk-badge { display: inline-flex; align-items: center; gap: 4px; padding: 1px 9px; border-radius: 999px; background: var(--signal-tint); color: var(--ink); font-size: 0.78rem; font-weight: 650; }
.rk-badge .rk-icon { color: currentColor; }
.rk-minibar { display: inline-block; width: 3.2rem; height: 6px; margin-inline-end: 6px; vertical-align: middle; background: var(--paper-3); border-radius: 3px; overflow: hidden; }
.rk-minibar i { display: block; height: 100%; width: var(--v); background: var(--brand-fg); }
.rk-minibar-v { font-weight: 650; font-variant-numeric: tabular-nums; }
.rk-logo--inline { display: inline-block; width: auto; height: 1.7rem; max-width: 4.6rem; padding: 2px 4px; vertical-align: middle; }
.rk-detail--one { grid-template-columns: minmax(0, 1fr); }
.facts .facts-note { grid-template-columns: 1fr; }
.facts .facts-note dd { color: var(--ink-2); }
/* The grid of cards: a card for each entry; an open card takes the whole row. */
.rk-head.rk-cards { display: none; }
.rk-list.rk-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(16.5rem, 1fr)); gap: 14px; padding-top: 6px; }
.rk-cards .rk-entry { border: 1px solid var(--rule); border-radius: 8px; background: var(--paper); overflow: hidden; }
.rk-cards .rk-entry:has(details[open]) { grid-column: 1 / -1; }
.rk-cards .rk-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; padding: 16px; }
.rk-cards .rk-rank { flex: none; width: auto; }
.rk-cards .rk-name { flex: 1 1 55%; }
.rk-cards .rk-logo-cell { width: 4rem; height: 2.6rem; }
.rk-cards .rk-col { flex: 1 1 100%; display: flex; gap: 10px; text-align: left; }
.rk-cards .rk-col::before { content: attr(data-label); min-width: 7rem; color: var(--muted); font-size: 0.82rem; }
.rk-cards .track { flex: 1 1 55%; }
.rk-cards .chev { margin-inline-start: auto; }
.rk-cards .rk-detail { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); padding: 6px 16px 22px; }

.rk-aside { display: grid; gap: 28px; align-content: start; position: sticky; top: calc(var(--header-h) + 20px); align-self: start; }
.aside-block h2 { font-size: 0.95rem; font-weight: 700; margin-bottom: 12px; }
.aside-block p { font-size: 0.93rem; color: var(--ink-2); }
.aside-block p + p { margin-top: 10px; }
.wlist { list-style: none; display: grid; gap: 8px; }
.wlist li { display: grid; grid-template-columns: 1fr 2.6rem; gap: 8px; font-size: 0.92rem; align-items: center; }
.wlist .wbar { grid-column: 1 / -1; height: 4px; background: var(--paper-3); border-radius: 2px; overflow: hidden; margin-top: -2px; }
.wlist .wbar i { display: block; height: 100%; width: calc(var(--w) * 2.857%); background: var(--brand-fg); }
.wlist li.ext .wbar i { background: var(--signal); }
.wlist b { text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- Footer ---------- */
.site-footer { background: var(--brand-deep); color: var(--on-brand-muted); padding-block: clamp(56px, 7vw, 96px) 32px; }
.site-footer a { color: var(--on-brand); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.footer-top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2.1fr); gap: 48px; }
.footer-brand p { margin-top: 18px; max-width: 34ch; }
.footer-edition { font-size: 0.88rem; font-variant-numeric: tabular-nums; }
.footer-cols { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px; }
.footer-cols h2 { font-size: 0.9rem; font-weight: 700; color: var(--on-brand); margin-bottom: 14px; }
.footer-cols ul { list-style: none; display: grid; gap: 9px; font-size: 0.94rem; }
.footer-base { margin-top: 56px; padding-top: 22px; border-top: 1px solid var(--on-brand-rule); display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 20px; font-size: 0.85rem; }
.footer-base p:last-child { text-align: right; }

/* ---------- Motion on load ---------- */
@media (prefers-reduced-motion: no-preference) {
  .reveal { animation: rise 0.9s var(--ease) both; animation-delay: calc(var(--i, 0) * 90ms); }
  @keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  /* A wide layout's rows stack before the page gets too narrow for their columns. */
  .rk-layout--wide .rk-head { display: none; }
  .rk-layout--wide .rk-custom .rk-row {
    grid-template-columns: 4.2rem minmax(0, 1fr) auto 1rem;
    grid-template-areas: 'rank name score chev' 'rank track fp fp';
    row-gap: 10px; column-gap: 12px; align-items: start;
  }
  .rk-layout--wide .rk-row .rk-rank { grid-area: rank; }
  .rk-layout--wide .rk-row .rk-name { grid-area: name; }
  .rk-layout--wide .rk-row .rk-score { grid-area: score; }
  .rk-layout--wide .rk-row .fp { grid-area: fp; height: 18px; }
  .rk-layout--wide .rk-row .chev { grid-area: chev; margin-top: 6px; }
  .rk-layout--wide .rk-custom .rk-lead, .rk-layout--wide .rk-custom .rk-logo-cell { display: none; }
  .rk-layout--wide .rk-custom .rk-col { grid-column: 2 / -1; display: flex; gap: 10px; text-align: left; }
  .rk-layout--wide .rk-custom .rk-col::before { content: attr(data-label); min-width: 7rem; color: var(--muted); font-size: 0.82rem; }
  .rk-layout { grid-template-columns: 1fr; }
  .rk-aside { position: static; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pipeline { grid-template-columns: 1fr; gap: 0; }
  .pipeline::before { left: 23px; right: auto; top: 0; bottom: 0; width: 2px; height: auto; }
  .stage { display: grid; grid-template-columns: 48px 1fr; column-gap: 22px; padding: 0 0 34px; }
  .stage-node { grid-row: span 3; }
  .stage h3 { margin-top: 10px; }
  .pillar-defs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .scope { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .scope li:nth-child(3) { padding-left: 0; }
  .scope li:nth-child(2n) { border-right: 0; }
}
@media (max-width: 900px) {
  .feature, .verify, .explain, .split, .section-head, .block, .footer-top { grid-template-columns: 1fr; }
  .doc { grid-template-columns: 1fr; }
  .doc-toc { position: static; }
  .ledger { grid-template-columns: 1fr; }
  .scope { grid-template-columns: 1fr; }
  .flow ol { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .engine-layer { grid-template-columns: 1fr; gap: 8px; }
  .scope li { padding-inline: 0; border-right: 0; border-bottom: 1px solid var(--rule); }
  .index-list a, .index-row { grid-template-columns: 3.6rem minmax(0, 1fr) 1.5rem; }
  .index-list .index-meta { display: none; }
  .index-list .index-meta.index-when { display: block; grid-column: 2; margin-top: -10px; }
  .footer-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-base { grid-template-columns: 1fr; }
  .footer-base p:last-child { text-align: left; }
  .rk-head { display: none; }
  .rk-row {
    grid-template-columns: 4.2rem minmax(0, 1fr) auto 1rem;
    grid-template-areas: 'rank name score chev' 'rank track fp fp';
    row-gap: 10px; column-gap: 12px; align-items: start;
  }
  .rk-row .rk-rank { grid-area: rank; }
  .rk-row .rk-name { grid-area: name; }
  .rk-row .track { grid-area: track; align-self: center; }
  .rk-row .rk-score { grid-area: score; }
  .rk-row .fp { grid-area: fp; height: 18px; }
  .rk-row .chev { grid-area: chev; margin-top: 6px; }
  .rk-logos .rk-row { grid-template-columns: 4.2rem minmax(0, 1fr) auto 1rem; }
  .rk-logo-cell { display: none; }
  .rk-detail { grid-template-columns: 1fr; padding-left: 6px; }
  .rk-custom .rk-row { grid-template-columns: 4.2rem minmax(0, 1fr) auto 1rem; }
  .rk-custom .rk-lead { display: none; }
  .rk-custom .rk-col { grid-column: 2 / -1; display: flex; gap: 10px; text-align: left; }
  .rk-custom .rk-col::before { content: attr(data-label); min-width: 7rem; color: var(--muted); font-size: 0.82rem; }
  .rk-cards .rk-detail { grid-template-columns: 1fr; }
  .rk-controls { grid-template-columns: 1fr 1fr; }
  .rk-controls .field:first-child { grid-column: 1 / -1; }
}
/* The hero keeps the ladder beside the heading as long as there is room. */
@media (min-width: 721px) and (max-width: 900px) {
  .hero-inner { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 28px; }
  .ladder { padding-inline: 14px; }
  .ladder-row { grid-template-columns: 1.6rem minmax(0, 1fr) 4.2rem 2.6rem; gap: 8px; }
}
@media (max-width: 720px) {
  .hero-inner { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .pillar-defs { grid-template-columns: 1fr; }
  .rk-aside { grid-template-columns: 1fr; }
  .weights-bar { height: 52px; }
  .weights-bar span { font-size: 0; padding: 0; }
  .feature-list li { grid-template-columns: 2rem minmax(0, 1fr) 3rem; }
  .feature-list .track { display: none; }
  .updates li { grid-template-columns: 1fr; gap: 4px; }
  .specimen-labels { grid-template-columns: 1fr; }
  .ladder-row { grid-template-columns: 1.8rem 1fr 3rem; }
  .ladder-row .track { display: none; }
  .policy-list a { grid-template-columns: 2.6rem minmax(0, 1fr); }
  .policy-list em { display: none; }
  .pbars li { grid-template-columns: 7.5rem 1fr 2.2rem; }
  .facts div { grid-template-columns: 1fr; gap: 2px; }
  .hero h1 { max-width: none; }
}
@media print {
  .site-header, .site-footer, .rk-controls, .rk-aside, .preview-banner { display: none; }
}
