/* Signal: Watchability Score's visual language.
   Ink fields, a cool ground, white surfaces and one accent: the heat ramp, which
   only ever encodes how strong a score or factor is. Page-specific styles live
   in home.css and game.css; the weekly page's are at the end of this file. */

:root {
    --ink: #16203A;
    --ink-raised: #1D2946;
    --ink-line: #2B3857;
    --ink-text-2: #B7C0D3;
    --ink-text-3: #8E9AB4;
    --ground: #F2F4F7;
    --surface: #FFFFFF;
    --line: #E3E6EB;
    --line-soft: #EEF0F3;
    --line-strong: #C9CED6;
    --text: #131B2E;
    --text-2: #4A5361;
    --text-3: #5B6472;
    --live: #15803D;
    --live-ink: #22C55E;
    --ad: #E9ECF0;

    --heat-0: #EEF0F3;
    --heat-1: #D9DEE5;
    --heat-2: #FFD3A8;
    --heat-3: #FF9A3D;
    --heat-4: #FF4D00;
    --accent: #FF4D00;
    --accent-hover: #FF6A26;

    --font: 'Archivo', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
    --mono: 'Geist Mono', ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;

    --r-lg: 14px;
    --r: 10px;
    --r-sm: 6px;
    --gutter: 24px;
}

/* ---------- Base ---------- */

*, *::before, *::after { box-sizing: border-box; }

/* Components set their own display, so make sure the hidden attribute still wins. */
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; scroll-padding-top: 16px; }

body {
    margin: 0;
    background: var(--ground);
    color: var(--text);
    font: 400 15px/1.5 var(--font);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3 {
    margin: 0;
    font-weight: 700;
    letter-spacing: -0.01em;
    line-height: 1.1;
    text-wrap: balance;
}

h1 { font-weight: 800; letter-spacing: -0.02em; }

p { margin: 0; }
a { color: inherit; text-underline-offset: 3px; text-decoration-thickness: 1.5px; }
img { max-width: 100%; }
button { font: inherit; color: inherit; }

::selection { background: var(--heat-2); color: var(--ink); }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

.wrap { max-width: 1280px; margin-inline: auto; padding-inline: var(--gutter); }

.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-link { position: absolute; left: -9999px; top: 8px; z-index: 100; }
.skip-link:focus { left: 16px; background: var(--surface); color: var(--text); padding: 8px 12px; border-radius: var(--r-sm); }

.mono { font-family: var(--mono); }
.meta { font-size: 12.5px; line-height: 1.4; color: var(--text-3); font-variant-numeric: tabular-nums; }

.icon { flex-shrink: 0; }

@media (max-width: 640px) {
    :root { --gutter: 16px; }
}

/* ---------- Header ---------- */

.site-header {
    position: relative;
    z-index: 40;
    background: var(--ink);
    color: #fff;
    border-bottom: 1px solid var(--ink-line);
}

.site-header-inner {
    display: flex;
    align-items: center;
    gap: 28px;
    min-height: 60px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    color: #fff;
    text-decoration: none;
}

.brand-mark {
    width: 28px;
    height: 28px;
    padding: 2px;
    border-radius: 7px;
    background: #fff;
}

.brand-word {
    font-weight: 800;
    font-size: 17px;
    letter-spacing: -0.01em;
}

.site-nav {
    display: flex;
    align-self: stretch;
    gap: 2px;
}

.site-nav a {
    position: relative;
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 0 12px;
    color: var(--ink-text-2);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.15s;
}

.site-nav a:hover { color: #fff; }
.site-nav a[aria-current="page"] { color: #fff; }

.site-nav a[aria-current="page"]::after {
    content: '';
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: -1px;
    height: 2px;
    background: var(--accent);
}

.live-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--live-ink);
}

.site-nav-count {
    padding: 1px 7px;
    border-radius: 999px;
    background: rgba(34, 197, 94, 0.16);
    color: #4ADE80;
    font: 500 11px var(--mono);
}

.tz-pill {
    margin-left: auto;
    padding: 7px 10px;
    border: 1px solid var(--ink-line);
    border-radius: 8px;
    color: var(--ink-text-2);
    font: 500 13px var(--font);
    white-space: nowrap;
}

.nav-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid var(--ink-line);
    border-radius: 8px;
    background: transparent;
    color: #fff;
    cursor: pointer;
}

@media (max-width: 1023px) {
    .site-header-inner { gap: 12px; }
    .nav-toggle { display: inline-flex; }

    .site-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        gap: 0;
        padding: 8px var(--gutter) 18px;
        background: var(--ink);
        border-bottom: 1px solid var(--ink-line);
        box-shadow: 0 16px 32px rgba(22, 32, 58, 0.35);
    }

    .site-nav.is-open { display: flex; }
    .site-nav a { padding: 13px 0; font-size: 16px; border-top: 1px solid var(--ink-line); }
    .site-nav a:first-child { border-top: 0; }
    .site-nav a[aria-current="page"]::after { left: auto; right: 0; top: 50%; bottom: auto; width: 6px; height: 6px; border-radius: 50%; transform: translateY(-50%); }
}

@media (max-width: 480px) {
    .tz-pill { display: none; }
    .nav-toggle { margin-left: auto; }
}

/* ---------- Footer ---------- */

.site-footer {
    margin-top: 72px;
    padding: 56px 0 28px;
    background: var(--ink);
    color: #fff;
}

.site-footer-top {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    padding-bottom: 36px;
    border-bottom: 1px solid var(--ink-line);
}

.site-footer-line {
    max-width: 19ch;
    font-weight: 800;
    font-size: clamp(1.9rem, 3.6vw, 2.75rem);
    line-height: 1.06;
    letter-spacing: -0.02em;
}

.site-footer-line span { color: var(--accent); }

.site-footer-cols {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 24px;
    padding: 32px 0;
}

.site-footer-cols h2 {
    margin-bottom: 14px;
    color: #fff;
    font: 700 14px var(--font);
}

.site-footer-cols a {
    display: block;
    padding: 4px 0;
    color: var(--ink-text-2);
    font-size: 14px;
    text-decoration: none;
}

.site-footer-cols a:hover { color: #fff; text-decoration: underline; }

.site-footer-legal {
    padding-top: 20px;
    border-top: 1px solid var(--ink-line);
    color: var(--ink-text-3);
    font-size: 13px;
}

@media (max-width: 720px) {
    .site-footer-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 28px; }
}

/* ---------- Buttons, links, chips ---------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    border: 1px solid transparent;
    border-radius: 999px;
    font: 600 15px/1.2 var(--font);
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}

.btn-accent { background: var(--accent); color: var(--ink); }
.btn-accent:hover { background: var(--accent-hover); }
.btn-ghost { background: transparent; color: #fff; border-color: #3D4A6B; }
.btn-ghost:hover { border-color: #6A7799; }
.btn-light { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn-light:hover { border-color: var(--line-strong); }
.btn-sm { padding: 8px 14px; font-size: 14px; }

.link {
    font-weight: 600;
    font-size: 14px;
    text-decoration: underline;
    white-space: nowrap;
}

.link:hover { color: var(--text-2); }

.chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface);
    color: var(--text);
    font: 500 14px/1.2 var(--font);
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: border-color 0.15s, background-color 0.15s;
}

.chip:hover { border-color: var(--line-strong); }
.chip.is-active, .chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip-count { color: var(--text-3); font: 500 11px var(--mono); }
.chip.is-active .chip-count, .chip[aria-pressed="true"] .chip-count { color: var(--ink-text-2); }

.scroll-row {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
}

.scroll-row::-webkit-scrollbar { display: none; }

/* ---------- Panels ---------- */

.panel {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
}

.panel-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    padding: 18px 20px 14px;
}

.panel-head-stack { display: block; }
.panel-title { font-size: 1.15rem; }
.panel-body { padding: 0 20px 18px; }
.panel-note { margin-top: 4px; color: var(--text-2); font-size: 13.5px; }

/* ---------- Teams and crests ---------- */

.crest {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
    border-radius: 50%;
    background: var(--line-soft);
    color: var(--text-3);
    font: 700 9px var(--font);
}

.crest img { width: 74%; height: 74%; object-fit: contain; }
.crest-sm { width: 20px; height: 20px; }
.crest-md { width: 24px; height: 24px; }
.crest-lg { width: 36px; height: 36px; font-size: 11px; }

.team-name { font-weight: 700; }
.team-pos { color: var(--text-3); font: 400 12.5px var(--font); letter-spacing: 0; }

/* ---------- Scores ---------- */

.score {
    display: inline-flex;
    align-items: baseline;
    color: var(--text);
    font-weight: 900;
    font-stretch: 125%;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.03em;
    line-height: 0.9;
}

.score-dec { color: var(--text-3); font-size: 0.5em; font-weight: 800; letter-spacing: 0; }
.score-xl { font-size: clamp(5.5rem, 10vw, 9rem); line-height: 0.8; color: var(--accent); letter-spacing: -0.045em; }
.score-xl .score-dec { color: inherit; }
.score-lg { font-size: 2.5rem; }
.score-md { font-size: 2rem; }
.score-sm { font-size: 1.4rem; }

.tier-must { --tier: var(--heat-4); }
.tier-rec { --tier: var(--heat-3); }
.tier-con { --tier: var(--heat-2); }
.tier-lim { --tier: #C3CAD4; }

.band-bar {
    position: relative;
    display: block;
    height: 4px;
    overflow: hidden;
    border-radius: 2px;
    background: var(--line-soft);
    --tick: var(--surface);
}

.band-fill { display: block; height: 100%; background: var(--tier); }

/* Band edges at 40, 60 and 85 cut through the bar. */
.band-bar::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(var(--tick), var(--tick)) calc(40% - 1px) 0 / 2px 100% no-repeat,
        linear-gradient(var(--tick), var(--tick)) calc(60% - 1px) 0 / 2px 100% no-repeat,
        linear-gradient(var(--tick), var(--tick)) calc(85% - 1px) 0 / 2px 100% no-repeat;
}

.tier-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text-2);
    font: 500 12.5px/1.2 var(--font);
    white-space: nowrap;
}

.tier-swatch {
    display: inline-block;
    width: 8px;
    height: 8px;
    flex-shrink: 0;
    border-radius: 2px;
    background: var(--tier);
}

.score-stack { display: grid; justify-items: end; gap: 7px; min-width: 0; }

/* 0 / 40 / 60 / 85 / 100 under a large band bar. */
.scale-ticks { position: relative; height: 14px; margin-top: 8px; color: var(--text-3); font: 400 10px var(--mono); }
.scale-ticks span { position: absolute; transform: translateX(-50%); }
.scale-ticks span:first-child { transform: none; }
.scale-ticks span:last-child { transform: translateX(-100%); }
.on-ink .scale-ticks { color: var(--ink-text-3); }
.score-stack .band-bar { width: 100%; }

/* ---------- Fingerprint ---------- */

.fp { display: inline-flex; gap: 3px; }
.fp-cell { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.fp-swatch { display: block; border-radius: 2px; background: var(--heat-0); }
.fp-sm .fp-swatch { width: 10px; height: 26px; }
.fp-md .fp-swatch { width: 12px; height: 26px; }
.fp-code { color: var(--text-3); font: 500 7.5px var(--mono); letter-spacing: 0; }
.fp-value { color: var(--text); font: 600 11px var(--mono); }

.heat-0 { background: var(--heat-0); }
.heat-1 { background: var(--heat-1); }
.heat-2 { background: var(--heat-2); }
.heat-3 { background: var(--heat-3); }
.heat-4 { background: var(--heat-4); }

.heat-na {
    background:
        repeating-linear-gradient(135deg, var(--line) 0 1.5px, transparent 1.5px 5px),
        var(--surface);
    box-shadow: inset 0 0 0 1px var(--line);
}

/* Large fingerprint: one cell per column, code and value under each. */
.fp-lg { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 5px; width: 100%; }
.fp-lg .fp-cell { display: grid; grid-template-columns: 1fr auto; align-items: baseline; gap: 6px 4px; }
.fp-lg .fp-swatch { grid-column: 1 / -1; width: 100%; height: 40px; border-radius: 3px; }
.fp-lg .fp-code { font-size: 10px; }

/* On ink the ramp darkens so the hot cells still lead. */
.on-ink .heat-0 { background: #243050; }
.on-ink .heat-1 { background: #34405F; }
.on-ink .heat-2 { background: #7C4422; }
.on-ink .heat-3 { background: #C8581D; }
.on-ink .heat-na { background: repeating-linear-gradient(135deg, #34405F 0 1.5px, transparent 1.5px 5px), #1A2440; box-shadow: inset 0 0 0 1px #34405F; }
.on-ink .fp-code { color: var(--ink-text-3); }
.on-ink .fp-value { color: #fff; }
.on-ink .band-bar { background: #26314F; --tick: var(--ink-raised); }
.on-ink .crest { background: #243050; color: var(--ink-text-2); }
.on-ink .tier-tag { color: var(--ink-text-2); }
.on-ink .meta, .on-ink .team-pos { color: var(--ink-text-3); }

/* Hover tip: the cell's factor and score (signal.js). */
.fp-cell.is-hover .fp-swatch { outline: 2px solid var(--ink); outline-offset: 1px; }
.on-ink .fp-cell.is-hover .fp-swatch { outline-color: #fff; }

.fp-tip {
    position: fixed;
    z-index: 60;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 10px;
    border-radius: 8px;
    background: var(--ink);
    color: #fff;
    font-size: 13px;
    line-height: 1.2;
    white-space: nowrap;
    pointer-events: none;
    box-shadow: 0 6px 16px rgba(22, 32, 58, 0.22);
}

.fp-tip b { margin-left: 4px; font-weight: 700; font-variant-numeric: tabular-nums; }
.fp-tip-swatch { width: 10px; height: 10px; flex-shrink: 0; border-radius: 2px; }
.fp-tip.is-light { background: var(--surface); color: var(--text); box-shadow: 0 6px 16px rgba(10, 16, 32, 0.35); }

/* Fingerprint key */
.fp-key {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 14px;
    margin: 0;
}

.fp-key div { display: flex; gap: 8px; align-items: baseline; }
.fp-key dt { flex: 0 0 28px; color: var(--text-3); font: 500 10.5px var(--mono); }
.fp-key dd { margin: 0; font-size: 13px; line-height: 1.3; }
.fp-key dd span { display: block; color: var(--text-3); font-size: 12px; }

.fp-ramp { display: flex; gap: 4px; margin-top: 16px; }
.fp-ramp > span { display: grid; flex: 1; gap: 5px; color: var(--text-3); font: 400 10px var(--mono); }
.fp-ramp .fp-swatch { width: 100%; height: 12px; }

/* ---------- Band legend ---------- */

.band-legend { margin: 0; padding: 0; list-style: none; }

.band-legend li {
    display: grid;
    grid-template-columns: 10px minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-top: 1px solid var(--line-soft);
    font-size: 14px;
}

.band-legend li:first-child { border-top: 0; }
.band-legend .tier-swatch { width: 10px; height: 10px; }
.band-legend-label { font-weight: 500; }
.band-legend-range { color: var(--text-3); font: 400 12px var(--mono); }
.band-legend-count { min-width: 2.5ch; text-align: right; font-weight: 800; font-size: 18px; font-variant-numeric: tabular-nums; }

/* ---------- Ads ---------- */

.ad {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 4px;
    border-radius: var(--r);
    background: var(--ad);
    overflow: hidden;
}

.ad-label {
    color: var(--text-3);
    font: 500 11.5px var(--font);
}

.ad-billboard { max-width: 990px; min-height: 120px; margin: 24px auto; }
.ad-inline { min-height: 120px; }
.ad-rail { min-height: 280px; }
.ad-tall { min-height: 630px; position: sticky; top: 16px; }

/* ---------- Breadcrumb ---------- */

.crumbs { display: flex; flex-wrap: wrap; gap: 6px; color: var(--text-3); font-size: 13px; }
.crumbs a { color: var(--text-2); }
.on-ink .crumbs { color: var(--ink-text-3); }
.on-ink .crumbs a { color: var(--ink-text-2); }

/* ---------- Two-column page with a rail ---------- */

.with-rail {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 24px;
    align-items: start;
}

.rail { display: grid; gap: 16px; }

@media (max-width: 1023px) {
    .with-rail { grid-template-columns: minmax(0, 1fr); }
    .rail .ad-tall { display: none; }
}

.prose { max-width: 68ch; color: var(--text-2); font-size: 15px; line-height: 1.6; }
.prose h2 { margin-bottom: 8px; color: var(--text); font-size: 1.25rem; }
.prose a { color: var(--text); font-weight: 600; }

.empty-state { padding: 28px 24px; }
.empty-state-title { font-weight: 700; font-size: 1.25rem; }
.empty-state-text { margin-top: 6px; color: var(--text-2); max-width: 60ch; }

/* ========== Weekly top 10 ========== */

.wt-hero { padding-top: 36px; background: var(--ink); color: #fff; }
.wt-hero h1 { max-width: 17ch; margin-top: 16px; font-size: clamp(2.1rem, 4.4vw, 3.5rem); }

.wt-hero-row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
}

.wt-hero-sub { max-width: 60ch; margin-top: 14px; color: var(--ink-text-2); font-size: 16px; }

.wt-tabs { margin-top: 28px; gap: 0; }

.wt-tabs a {
    position: relative;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 14px 14px 16px;
    color: var(--ink-text-2);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    white-space: nowrap;
}

.wt-tabs a:first-child { padding-left: 0; }
.wt-tabs a:hover { color: #fff; }
.wt-tabs a[aria-current="page"] { color: #fff; }
.wt-tabs a[aria-current="page"]::after { content: ''; position: absolute; left: 14px; right: 14px; bottom: 0; height: 2px; background: var(--accent); }
.wt-tabs a:first-child[aria-current="page"]::after { left: 0; }
.wt-tabs a.is-quiet { color: var(--ink-text-3); }
.wt-tabs .chip-count { color: var(--ink-text-3); }

.wt-main { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; min-width: 0; }
.wt-list { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }

.wt-card {
    position: relative;
    display: grid;
    grid-template-columns: 84px minmax(0, 1fr) auto 104px;
    align-items: center;
    gap: 18px;
    padding: 20px 22px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    transition: border-color 0.15s;
}

.wt-card:hover { border-color: var(--line-strong); }

.wt-rank {
    color: #8B94A1;
    font-weight: 800;
    font-size: 3.5rem;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.03em;
    line-height: 0.8;
}

.wt-card.is-first .wt-rank { color: var(--accent); }

.wt-teams { margin: 6px 0 7px; font-size: 1.45rem; line-height: 1.15; }
.wt-teams a { text-decoration: none; }
.wt-teams a::after { content: ''; position: absolute; inset: 0; border-radius: var(--r-lg); }
.wt-teams .team-name { font-weight: 700; }
.wt-teams .team-pos { font-size: 11px; }
.vs { margin: 0 0.3em; color: var(--text-3); font-size: 0.62em; font-weight: 500; font-stretch: 100%; }

.wt-driven { color: var(--text-2); font-size: 13.5px; }
.wt-driven b { color: var(--text); font-weight: 600; }

/* Sits above the card's stretched link so it gets its own hover and focus. */
.wt-preview { position: relative; z-index: 1; margin-top: 12px; }

.wt-ad { list-style: none; }

.wt-outside ol { margin: 0; padding: 0; list-style: none; }

.wt-outside li {
    display: grid;
    grid-template-columns: 30px minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 14px;
    padding: 12px 20px;
    border-top: 1px solid var(--line-soft);
}

.wt-outside a { font-weight: 600; font-size: 14px; text-decoration: none; }
.wt-outside a:hover { text-decoration: underline; }
.wt-outside .meta { text-align: right; }

.wt-sources { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }

.wt-sources li {
    display: grid;
    grid-template-columns: minmax(0, 7.5rem) minmax(0, 1fr) 1.5rem;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.25;
}

.wt-sources-bar { display: block; height: 8px; border-radius: 2px; background: var(--line-soft); }
.wt-sources-bar span { display: block; height: 100%; border-radius: 2px; background: var(--ink); }
.wt-sources .mono { text-align: right; font-size: 12px; color: var(--text-2); }

.best-list { margin: 0; padding: 0; list-style: none; }

.best-list li {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 11px 0;
    border-top: 1px solid var(--line-soft);
}

.best-list li:first-child { border-top: 0; }
.best-list li > div > * { display: block; }
.best-list a, .best-list li > div > span:last-child { margin-top: 2px; font-weight: 600; font-size: 14px; line-height: 1.3; text-decoration: none; }
.best-list a:hover { text-decoration: underline; }

.wt-league-tiles { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }

.wt-tile {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r);
    text-decoration: none;
}

.wt-tile:hover { border-color: var(--line-strong); }
.wt-tile-text { display: grid; min-width: 0; }
.wt-tile-name { font-weight: 700; font-size: 14px; }
.wt-tile .meta { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.wt-section-title { margin: 18px 0 12px; font-size: 1.2rem; }

@media (max-width: 860px) {
    /* The fingerprint gets the rank and main columns under the text, so it never
       runs into the score's band bar. */
    .wt-card {
        grid-template-columns: 56px minmax(0, 1fr) 112px;
        grid-template-areas: "rank main main" "fp fp score";
        gap: 14px 14px;
        padding: 16px;
    }

    .wt-rank { grid-area: rank; font-size: 2.4rem; align-self: start; }
    .wt-card-main { grid-area: main; }
    .wt-card .fp { grid-area: fp; align-self: end; }
    .wt-card .score-stack { grid-area: score; }
    .wt-teams { font-size: 1.2rem; }
}

@media (max-width: 480px) {
    .wt-card { grid-template-columns: 36px minmax(0, 1fr); grid-template-areas: "rank main" "fp fp" "score score"; }
    .wt-rank { font-size: 1.6rem; }
    .wt-card .score-stack { grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; justify-items: start; gap: 12px; }
    .wt-outside li { grid-template-columns: 24px minmax(0, 1fr) auto; }
    .wt-outside .meta { display: none; }
}

.link-button { padding: 0; border: 0; background: none; cursor: pointer; }

/* ========== About, terms and privacy ========== */

.pg-hero { padding: 36px 0 44px; background: var(--ink); color: #fff; }
.pg-hero.has-toc { padding-bottom: 0; }
.pg-hero h1 { max-width: 18ch; margin-top: 16px; font-size: clamp(2.1rem, 4.4vw, 3.5rem); }
.pg-sub { max-width: 62ch; margin-top: 14px; color: var(--ink-text-2); font-size: 17px; }
.pg-tldr { max-width: 62ch; margin-top: 12px; font-size: 15px; }
.pg-updated { margin-top: 14px; }

.pg-toc { margin-top: 28px; gap: 0; }
.pg-toc a { padding: 14px 14px 16px; color: var(--ink-text-2); font-size: 14px; font-weight: 500; text-decoration: none; white-space: nowrap; }
.pg-toc a:first-child { padding-left: 0; }
.pg-toc a:hover { color: #fff; }

.pg-body { margin-top: 24px; }
.pg-main { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; min-width: 0; }
.pg-section { scroll-margin-top: 16px; }

.pg-prose { max-width: 70ch; color: var(--text-2); font-size: 15.5px; line-height: 1.65; }
.pg-prose > * + * { margin-top: 12px; }
.pg-prose h2 { margin-top: 32px; color: var(--text); font-size: 1.25rem; scroll-margin-top: 16px; }
.pg-prose h2 + * { margin-top: 8px; }
.pg-prose ul { padding-left: 1.2em; }
.pg-prose li + li { margin-top: 6px; }
.pg-prose a, .pg-prose strong { color: var(--text); font-weight: 600; }
.pg-lead { color: var(--text); font-size: 17px; line-height: 1.55; }

/* The panel fills the column; only the lines inside it are capped. */
.pg-doc { max-width: none; padding: 28px 32px 32px; }
.pg-doc > * { max-width: 72ch; }

@media (max-width: 640px) {
    .pg-doc { padding: 20px; }
}

/* Factors, in fingerprint order, with the cell codes beside each one. */
.pg-factor-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 32px; }
.pg-factor-title { margin-bottom: 4px; font-size: 1rem; }
.pg-factors { margin: 0; padding: 0; list-style: none; }
.pg-factors li { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 12px; padding: 12px 0; border-top: 1px solid var(--line-soft); }
.pg-factors li:first-child { border-top: 0; }
.pg-codes { padding-top: 2px; color: var(--text-3); font: 500 12px var(--mono); }
.pg-factors b { font-weight: 700; }
.pg-factors p { margin-top: 3px; color: var(--text-2); font-size: 14px; line-height: 1.55; }
.pg-bonus { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); }
.pg-bonus > p { margin-bottom: 4px; color: var(--text-2); font-size: 14px; }

@media (max-width: 760px) {
    .pg-factor-cols { grid-template-columns: minmax(0, 1fr); }
}

/* The four labels, each with its stretch of the 0-100 scale. */
.pg-tiers { margin: 0; padding: 0; list-style: none; }
.pg-tiers li { display: grid; grid-template-columns: minmax(0, 13rem) minmax(0, 1fr); gap: 8px 24px; padding: 16px 0; border-top: 1px solid var(--line-soft); }
.pg-tiers li:first-child { border-top: 0; padding-top: 0; }
.pg-tier-name { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 15px; }
.pg-tier-name .tier-swatch { width: 10px; height: 10px; }
.pg-tier-range { display: block; margin-top: 4px; color: var(--text-3); font: 400 12px var(--mono); }
.pg-range-bar { position: relative; display: block; height: 6px; margin-top: 10px; overflow: hidden; border-radius: 3px; background: var(--line-soft); }
.pg-range-bar span { position: absolute; top: 0; bottom: 0; background: var(--tier); }
.pg-tiers p { color: var(--text-2); font-size: 14.5px; line-height: 1.55; }

@media (max-width: 560px) {
    .pg-tiers li { grid-template-columns: minmax(0, 1fr); }
}

.pg-coverage { columns: 3 13rem; column-gap: 28px; }
.pg-country { padding-bottom: 18px; break-inside: avoid; }
.pg-country h3 { margin-bottom: 6px; font-size: 15px; }
.pg-country ul { margin: 0; padding: 0; list-style: none; color: var(--text-2); font-size: 14px; line-height: 1.4; }
.pg-country li + li { margin-top: 4px; }

.pg-note { margin-top: 6px; padding: 16px 18px; border-radius: var(--r); background: var(--ground); color: var(--text-2); font-size: 14.5px; }
.pg-note a, .pg-note strong { color: var(--text); font-weight: 600; }

.pg-faq { display: grid; gap: 18px; }
.pg-faq h3 { font-size: 15px; line-height: 1.35; }
.pg-faq p { margin-top: 4px; color: var(--text-2); }

.pg-links { margin: 0; padding: 0; list-style: none; }
.pg-links li { border-top: 1px solid var(--line-soft); }
.pg-links li:first-child { border-top: 0; }
.pg-links a { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; font-weight: 600; font-size: 14px; text-decoration: none; }
.pg-links a:hover { text-decoration: underline; }
.pg-links .meta { font-weight: 400; }

/* Legal pages: a contents list that follows you down the page on desktop. */
.pg-contents { position: sticky; top: 16px; }

@media (max-width: 1023px) {
    .pg-contents { display: none; }
}
