/* Blog pages: post list and posts. Loads after main.css and reuses its tokens and shell. */
:root {
    --track: #e9edf2;
    --miss-bg: #fdecdc;
    --miss-text: #8a2f0c;
    --v1: #2a78d6;
    --v2: #eb6834;
    --v3: #1baf7a;
    --v4: #eda100;
    --v5: #e87ba4;
}

@media (prefers-color-scheme: dark) {
    :root {
        --track: #1c232d;
        --miss-bg: #3b1d0d;
        --miss-text: #fdba74;
        --v1: #3987e5;
        --v2: #d95926;
        --v3: #199e70;
        --v4: #c98500;
        --v5: #d55181;
    }
}

/* ---------- base ---------- */
body { font-size: 1.0625rem; }

h2 {
    font-size: clamp(1.5rem, 2.6vw, 1.9rem);
    font-weight: 650;
    line-height: 1.2;
    letter-spacing: -0.02em;
    text-transform: none;
    color: var(--text);
    margin: 0 0 1.25rem;
    text-wrap: balance;
}

h3 { line-height: 1.3; }

p { margin: 0 0 1rem; }

code {
    font-family: var(--mono);
    font-size: 0.86em;
    background: var(--tag-bg);
    padding: 0.08em 0.3em;
    border-radius: 3px;
    overflow-wrap: anywhere;
}

strong { font-weight: 650; }

article a, .post-list a {
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 0.18em;
    border-bottom: 0;
}
article a:hover, .post-list a:hover { text-decoration-thickness: 2px; }

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

/* ---------- post header: title and verdict ---------- */
.lede {
    display: grid;
    gap: 2rem 3.5rem;
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
    align-items: start;
    padding-block: clamp(1.75rem, 4vw, 3rem) 2.25rem;
}
.lede h1 {
    font-size: clamp(2rem, 4.4vw, 3.3rem);
    line-height: 1.05;
    letter-spacing: -0.03em;
    font-weight: 720;
    margin: 0 0 0.9rem;
    text-wrap: balance;
}
.lede .meta { margin: 0 0 1.25rem; font-size: 0.875rem; }
.dek { font-size: 1.1875rem; line-height: 1.5; margin: 0 0 1rem; }
.lede .intro { margin: 0; }

.verdict { border-top: 3px solid var(--text); padding-top: 0.9rem; }
.verdict h2 { font-size: 1.25rem; letter-spacing: -0.01em; line-height: 1.3; margin: 0 0 0.5rem; }
.verdict p { line-height: 1.55; margin: 0; }

.picks {
    list-style: none;
    margin: 1rem 0 0;
    padding: 0.75rem 0 0;
    border-top: 1px solid var(--border);
    display: grid;
    gap: 0.5rem;
    font-size: 0.9375rem;
}
.picks li {
    display: grid;
    grid-template-columns: minmax(0, 11rem) minmax(0, 1fr);
    gap: 0.75rem;
    align-items: baseline;
}
.picks .use { font-size: 0.875rem; color: var(--muted); }

/* ---------- swatches ---------- */
.v1 { --v: var(--v1); }
.v2 { --v: var(--v2); }
.v3 { --v: var(--v3); }
.v4 { --v: var(--v4); }
.v5 { --v: var(--v5); }
.sw {
    display: inline-block;
    flex: none;
    width: 0.75rem;
    height: 0.75rem;
    border-radius: 2px;
    background: var(--v);
}
.nm { display: flex; align-items: center; gap: 0.5rem; }

/* ---------- sections ---------- */
article section { margin: 0; padding-top: clamp(2.5rem, 5vw, 4rem); }
article .section-first { padding-top: 0; }
.prose { max-width: var(--measure); }
.prose h3 { font-size: 1.1875rem; letter-spacing: -0.01em; margin: 2rem 0 0.5rem; }
.prose ul, .prose ol { padding-left: 1.25rem; margin: 0 0 1rem; }
.prose li { margin-bottom: 0.5rem; }

.scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.scroll:focus-visible { outline-offset: 2px; }
.scroll-hint {
    display: none;
    font-size: 0.8125rem;
    color: var(--muted);
    margin: 0.4rem 0 0;
}

.fine { font-size: 0.875rem; color: var(--muted); line-height: 1.55; }
.fine em { color: var(--text); font-style: normal; font-weight: 600; }
.note { font-size: 0.8125rem; color: var(--muted); margin: 0.6rem 0 0; }

table { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; }
caption { text-align: left; }

/* ---------- results board ---------- */
.board-head {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: baseline;
    gap: 0.25rem 1.5rem;
    margin-bottom: 0.6rem;
}
.board-head h2 { margin: 0; }
.board-head p { font-size: 0.8125rem; color: var(--muted); margin: 0; }

.board {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 6px;
}
.board th, .board td {
    padding: 0.8rem 0.75rem;
    text-align: left;
    vertical-align: top;
    border-bottom: 1px solid var(--border);
}
.board tbody tr:last-child > * { border-bottom: 0; }
.board thead th {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--muted);
    letter-spacing: 0.02em;
    padding-block: 0.6rem;
    white-space: nowrap;
}
.board thead th span { display: block; font-weight: 400; white-space: normal; }
.board tbody th { font-size: 0.9375rem; font-weight: 600; white-space: nowrap; }
.board tbody th .nm { gap: 0.55rem; }
.m { font-family: var(--mono); font-size: 0.9375rem; white-space: nowrap; }
.m b { font-weight: 700; }
.bar { display: block; height: 5px; margin-top: 0.4rem; background: var(--track); border-radius: 1px; min-width: 4.5rem; }
.bar i { display: block; height: 100%; width: calc(var(--w) * 100%); background: var(--v); border-radius: 1px; }
.dropped { font-size: 0.8125rem; line-height: 1.4; }
.dropped ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.3rem; }
.dropped li {
    font-size: 0.8125rem;
    font-variant-numeric: tabular-nums;
    padding: 0.1rem 0.4rem;
    border-radius: 3px;
    background: var(--miss-bg);
    color: var(--miss-text);
    white-space: nowrap;
}
.dropped .none { color: var(--muted); font-size: 0.8125rem; }
.board-foot { margin-top: 1.25rem; }

/* ---------- bar charts (HTML rows, drawn to scale) ---------- */
.charts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr));
    gap: 2.5rem 3.5rem;
    margin-top: 2.5rem;
}
figure { margin: 0; }
figcaption { font-weight: 650; font-size: 0.9375rem; margin-bottom: 0.75rem; }

.hchart {
    --name: 9.5rem;
    --gap: 0.75rem;
    --reserve: 3.5rem;
    max-width: 34rem;
}
.hbars { list-style: none; margin: 0; padding: 0; position: relative; }
.hbars::before {
    content: "";
    position: absolute;
    inset: 0 var(--reserve) 0 calc(var(--name) + var(--gap));
    background: linear-gradient(to right, var(--border) 1px, transparent 1px) 0 0 / 25% 100% repeat-x;
    border-right: 1px solid var(--border);
}
.hbars li {
    position: relative;
    display: grid;
    grid-template-columns: var(--name) minmax(0, 1fr);
    gap: var(--gap);
    align-items: center;
    padding-block: 0.35rem;
}
.hb-name { font-size: 0.875rem; font-weight: 600; line-height: 1.25; }
.hb-track { display: flex; align-items: center; gap: 0.4rem; min-width: 0; }
.hb-bar {
    flex: none;
    height: 0.8rem;
    width: calc((100% - var(--reserve)) * var(--w));
    background: var(--v);
    border-radius: 0 3px 3px 0;
}
.hb-val { font-family: var(--mono); font-size: 0.8125rem; white-space: nowrap; }
.hb-axis {
    position: relative;
    height: 1.4rem;
    margin: 0.25rem var(--reserve) 0 calc(var(--name) + var(--gap));
    font-family: var(--mono);
    font-size: 0.75rem;
    color: var(--muted);
}
.hb-axis span { position: absolute; top: 0; left: calc(var(--x) * 100%); transform: translateX(-50%); white-space: nowrap; }
.hb-axis span:first-child { transform: none; }

/* ---------- run chart ---------- */
.runlog { margin-top: 2rem; }
.runlog figcaption {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: baseline;
    gap: 0.25rem 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
}
.legend {
    display: flex;
    gap: 1rem;
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: 0.8125rem;
    font-weight: 400;
    color: var(--muted);
}
.legend > span { display: flex; align-items: center; gap: 0.4rem; }
.legend i { display: inline-block; flex: none; width: 0.3rem; height: 0.9rem; background: var(--muted); }
.legend i.hollow { background: transparent; box-shadow: inset 0 0 0 1.5px var(--muted); }
.runlog .scroll { padding-top: 0.75rem; }
.runlog-svg { display: block; width: 100%; min-width: 52rem; height: auto; font-family: var(--font-sans); }
.runlog-svg .label, .runlog-svg .value { fill: var(--text); font-size: 15px; }
.runlog-svg .label { font-weight: 600; }
.runlog-svg .value { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.runlog-svg .tier { fill: var(--muted); font-family: var(--mono); font-size: 14px; }
.runlog-svg .anno { fill: var(--text); font-size: 14px; font-weight: 600; }
.runlog-svg .bracket { stroke: var(--muted); stroke-width: 1; }
.runlog-svg .fail-tick { stroke: var(--text); stroke-width: 1.25; fill: none; }
.runlog-svg .base { fill: var(--muted); opacity: 0.45; }
.f1 { fill: var(--v1); }
.f2 { fill: var(--v2); }
.f3 { fill: var(--v3); }
.f4 { fill: var(--v4); }
.f5 { fill: var(--v5); }
.x1, .x2, .x3, .x4, .x5 { fill: var(--bg); stroke-width: 1.5; }
.x1 { stroke: var(--v1); }
.x2 { stroke: var(--v2); }
.x3 { stroke: var(--v3); }
.x4 { stroke: var(--v4); }
.x5 { stroke: var(--v5); }

/* ---------- per-task table (text alternative) ---------- */
details { margin-top: 1.5rem; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
summary { cursor: pointer; padding: 0.9rem 0; font-weight: 600; font-size: 0.9375rem; }
summary span { font-weight: 400; color: var(--muted); font-size: 0.875rem; }
details[open] summary { border-bottom: 1px solid var(--border); }
.tasks { min-width: 36rem; font-size: 0.875rem; margin-block: 0.5rem 1rem; }
.tasks caption { padding-top: 0.75rem; }
.tasks thead th {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--muted);
    text-align: right;
    padding: 0.5rem 0.6rem;
    vertical-align: bottom;
    line-height: 1.3;
}
.tasks thead th:first-child { text-align: left; }
.tasks thead th .sw { display: block; margin: 0 0 0.3rem auto; }
.tasks td, .tasks tbody th { padding: 0.3rem 0.6rem; border-bottom: 1px solid var(--border); }
.tasks tbody th { text-align: left; font-weight: 400; position: sticky; left: 0; background: var(--bg); }
.tasks td.n { text-align: right; font-family: var(--mono); color: var(--muted); }
.tasks td.miss { color: var(--miss-text); background: var(--miss-bg); font-weight: 700; }
.tasks tr.grp th { font-size: 0.75rem; font-weight: 600; padding-top: 1.1rem; letter-spacing: 0.02em; }

.toc {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 1.25rem;
    margin: 2.5rem 0 0;
    padding: 0.9rem 0;
    border-block: 1px solid var(--border);
    font-size: 0.875rem;
}
.toc span { font-size: 0.875rem; color: var(--muted); }

/* ---------- findings: one lane per surface ---------- */
.lanes { list-style: none; margin: 2.5rem 0 0; padding: 0; border-top: 1px solid var(--rule); }
.lane {
    display: grid;
    gap: 0.75rem 2.5rem;
    grid-template-columns: 14rem minmax(0, var(--measure));
    padding-block: 1.75rem;
    border-bottom: 1px solid var(--rule);
}
.lane .who { font-weight: 650; font-size: 1rem; line-height: 1.35; margin: 0; }
.lane .who .nm + .nm { margin-top: 0.3rem; }
.lane .who small {
    display: block;
    margin-top: 0.3rem;
    font-weight: 400;
    font-size: 0.8125rem;
    line-height: 1.45;
    color: var(--muted);
    padding-left: 1.25rem;
}
.lane > div:not(.who) { max-width: var(--measure); }
.lane h3 { font-size: 1.1875rem; letter-spacing: -0.01em; margin: 0 0 0.5rem; }
.lane p { margin: 0; }

/* ---------- setup ---------- */
.setup-grid {
    display: grid;
    gap: 1rem 3.5rem;
    grid-template-columns: minmax(0, var(--measure)) minmax(0, 1fr);
    align-items: start;
}
.aside-note { font-size: 0.9375rem; color: var(--muted); border-top: 1px solid var(--rule); padding-top: 0.9rem; }
.aside-note p { margin: 0; }
.tablewrap { margin: 1.5rem 0; max-width: 52rem; }
.plain { min-width: 32rem; font-size: 0.9375rem; background: var(--surface); border: 1px solid var(--border); border-radius: 6px; }
.plain caption { font-weight: 650; font-size: 0.9375rem; padding-bottom: 0.6rem; }
.plain th, .plain td { padding: 0.55rem 0.9rem; border-bottom: 1px solid var(--border); text-align: left; }
.plain tbody tr:last-child > * { border-bottom: 0; }
.plain thead th { font-size: 0.8125rem; font-weight: 600; color: var(--muted); }
.plain tbody th { font-weight: 600; white-space: nowrap; }
.plain tbody th .sw { margin-right: 0.5rem; }

.prose .tiers { list-style: none; padding: 0; margin: 1.25rem 0 0.75rem; border-top: 1px solid var(--rule); }
.tiers li {
    display: grid;
    grid-template-columns: 5.5rem minmax(0, 1fr);
    gap: 1rem;
    margin: 0;
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--border);
}
.tiers li p { margin: 0; }
.tiers .runs { font-family: var(--mono); font-size: 0.8125rem; color: var(--muted); line-height: 1.45; padding-top: 0.2rem; }
.tiers .runs b { display: block; color: var(--text); font-size: 1.25rem; font-weight: 600; }
.sum { font-family: var(--mono); font-size: 0.8125rem; color: var(--muted); margin: 0 0 1.25rem; }

/* ---------- run log list ---------- */
.log { list-style: none; margin: 0 0 1.25rem; padding: 0; border-top: 1px solid var(--rule); max-width: 52rem; }
.log li {
    display: grid;
    grid-template-columns: 7.5rem minmax(0, var(--measure));
    gap: 0.25rem 1.5rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border);
}
.log .tag { font-size: 0.8125rem; font-weight: 600; color: var(--miss-text); padding-top: 0.2rem; }
.log p { margin: 0; }

.sources li { margin-bottom: 0.5rem; }
.disclosure { margin-top: 2.5rem; padding-top: 1rem; border-top: 1px solid var(--border); font-size: 0.9375rem; color: var(--muted); }

/* ---------- post list (blog index) ---------- */
.list-head { padding-block: clamp(1.75rem, 4vw, 3rem) 2rem; max-width: var(--measure); }
.list-head h1 {
    font-size: clamp(2rem, 4.4vw, 3.3rem);
    line-height: 1.05;
    letter-spacing: -0.03em;
    font-weight: 720;
    margin: 0 0 0.9rem;
}
.post-list { list-style: none; margin: 0; padding: 0; border-top: 3px solid var(--text); max-width: 52rem; }
.post-list li {
    display: grid;
    grid-template-columns: 9rem minmax(0, 1fr);
    gap: 0.25rem 2rem;
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--border);
}
.post-list .when { font-size: 0.875rem; color: var(--muted); padding-top: 0.25rem; font-variant-numeric: tabular-nums; }
.post-list h2 { font-size: 1.25rem; letter-spacing: -0.01em; line-height: 1.3; margin: 0 0 0.4rem; }
.post-list h2 a { color: var(--text); text-decoration: none; }
.post-list h2 a:hover { color: var(--accent); text-decoration: underline; }
.post-list p { color: var(--muted); margin: 0; max-width: var(--measure); }

/* ---------- responsive ---------- */
@media (max-width: 64rem) {
    .lede, .setup-grid { grid-template-columns: minmax(0, 1fr); }
    .lane { grid-template-columns: minmax(0, 1fr); gap: 0.6rem; }
}

/* Results board becomes one card per surface before it would need to scroll. */
@media (max-width: 62rem) {
    .board, .board tbody, .board tr, .board th, .board td { display: block; }
    .board { background: none; border: 0; }
    .board thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
    .board tbody { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr)); }
    .board tr {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        background: var(--surface);
        border: 1px solid var(--border);
        border-radius: 6px;
    }
    .board tbody th, .board td { border-bottom: 1px solid var(--border); padding: 0.6rem 0.9rem; }
    .board tbody th { grid-column: 1 / -1; }
    .board td.dropped { grid-column: 1 / -1; border-bottom: 0; }
    .board td:nth-of-type(odd):not(.dropped) { border-right: 1px solid var(--border); }
    .board td::before {
        content: attr(data-label);
        display: block;
        margin-bottom: 0.15rem;
        font-family: var(--font-sans);
        font-size: 0.75rem;
        font-weight: 400;
        color: var(--muted);
        white-space: normal;
    }
    .board .bar { display: none; }
}

@media (max-width: 56.5rem) {
    .runlog .scroll-hint { display: block; }
}

@media (max-width: 39.125rem) {
    .tasks-hint { display: block; }
}

@media (max-width: 40rem) {
    body { font-size: 1rem; }
    .lede h1 { font-size: 2rem; }
    .dek { font-size: 1.0625rem; }
    .log li, .post-list li { grid-template-columns: minmax(0, 1fr); }
    .tiers li { grid-template-columns: 4.25rem minmax(0, 1fr); gap: 0.75rem; }
    .hchart { --name: 7.25rem; --gap: 0.5rem; --reserve: 3.25rem; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
}
