html[data-theme="light"] {
  --pst-color-primary: #2458d3;
  --pst-color-link: #2458d3;
  --pst-color-background: #fff;
  --pst-color-on-background: #fff;
  --pst-color-text-base: #27334a;
  --pst-color-text-muted: #647086;
}
html[data-theme="dark"] { --pst-color-primary: #91b1ff; --pst-color-link: #91b1ff; }
body { font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans CJK SC", sans-serif; }
.bd-header { box-shadow: none; border-bottom: 1px solid var(--pst-color-border); }
.navbar-brand { font-weight: 800; letter-spacing: -.04em; }
.navbar-nav .nav-link { font-size: .9rem; }
.bd-main .bd-content .bd-article-container { max-width: 960px; }
.bd-article h1, .bd-article h2, .bd-article h3 { letter-spacing: -.035em; }
.bd-article h1 { font-weight: 750; }
.bd-article p { line-height: 1.8; }
.bd-article table { font-size: .92rem; }
.sd-card { border-radius: 12px; box-shadow: none; }
.sd-card-header { font-weight: 650; }
.bd-main:has(.lab-kicker) .bd-content .bd-article-container { max-width: 1120px; padding: 3rem 2.5rem 2rem; }
.bd-article:has(.lab-kicker) > section > h1 { margin: .8rem 0 .4rem; font-size: clamp(3.5rem,7vw,5.5rem); line-height: 1.05; font-weight: 800; color: var(--pst-color-text-base); }
.lab-kicker { font-size: .7rem; letter-spacing: .19em; font-weight: 700; color: var(--pst-color-text-muted); }
.lab-subtitle { font-size: clamp(1.5rem,3vw,2.15rem); font-weight: 650; letter-spacing: -.035em; margin: .6rem 0 1rem; }
.bd-article:has(.lab-kicker) > section > p:first-of-type { max-width: 750px; font-size: 1.08rem; color: var(--pst-color-text-muted); }
.lab-actions { display: flex; gap: 1.6rem; align-items: center; flex-wrap: wrap; margin: 1.6rem 0 1.4rem; }
.lab-button { display: inline-flex; gap: 2rem; align-items: center; background: #2458d3; color: white !important; border-radius: 7px; padding: .7rem 1.1rem; font-weight: 650; text-decoration: none !important; }
.lab-button:hover { background: #1748b8; }
.lab-link { font-size: .94rem; font-weight: 600; text-decoration: none !important; }
.lab-tags { display: flex; gap: .6rem; flex-wrap: wrap; margin-bottom: 2rem; }
.lab-tags span { font-size: .75rem; color: var(--pst-color-text-muted); border: 1px solid var(--pst-color-border); border-radius: 4px; padding: .15rem .6rem; }
.lab-showcase { border: 1px solid var(--pst-color-border); border-radius: 14px; overflow: hidden; background: var(--pst-color-surface); margin-bottom: .8rem; }
.lab-showcase .sd-row { margin: 0; }
.lab-demo { border: none; border-radius: 0; background: transparent; }
.lab-demo .sd-card-header { padding: .7rem 1.1rem; font-size: .85rem; border: 0; background: transparent; }
.lab-demo .sd-card-body { padding: 0; }
.lab-demo p { margin: 0; }
.lab-demo img { display: block; width: 100%; margin: 0 !important; }
.lab-caption { font-size: .75rem; color: var(--pst-color-text-muted); padding: .8rem 1.1rem; border-top: 1px solid var(--pst-color-border); }
.lab-showcase + p { font-size: .83rem; color: var(--pst-color-text-muted); }
.bd-article:has(.lab-kicker) h2 { margin-top: 3.4rem; margin-bottom: .7rem; font-size: 1.7rem; font-weight: 700; }
.lab-finding { padding: .35rem .55rem; border-top: 3px solid #2458d3; }
.lab-finding-warning { border-top-color: #bc7626; }
.lab-finding .sd-card-header, .lab-task .sd-card-header { background: transparent; border-bottom: none; padding-bottom: 0; }
.lab-finding p { font-size: .92rem; }
.lab-score { display: grid; grid-template-columns: auto 1fr; gap: .1rem 1rem; align-items: baseline; margin: .2rem 0 .9rem; }
.lab-score strong { font-size: 2rem; font-weight: 750; letter-spacing: -.04em; }
.lab-score span { color: var(--pst-color-text-muted); font-size: .9rem; }
.lab-chart { border: 1px solid var(--pst-color-border); border-radius: 12px; overflow: hidden; background: white; margin: 1.3rem 0 .75rem; }
.lab-chart p { margin: 0; }
.lab-chart img { display: block; width: 100%; margin: 0 !important; }
.lab-chart + p { font-size: .83rem; color: var(--pst-color-text-muted); }
.lab-task .sd-card-body { font-size: .92rem; color: var(--pst-color-text-muted); }
.lab-note { margin: 2rem 0; padding: 1rem 1.2rem; background: var(--pst-color-surface); border-radius: 8px; font-size: .86rem; line-height: 1.8; color: var(--pst-color-text-muted); }
@media (max-width: 640px) {
 .bd-main:has(.lab-kicker) .bd-content .bd-article-container { padding: 2rem 1rem; }
 .lab-actions { gap: 1rem; }
 .lab-kicker { font-size: .6rem; letter-spacing: .1em; }
 .bd-article:has(.lab-kicker) h2 { margin-top: 2.5rem; }
}

/* Research homepage: a readable comparative article, separate from legacy reports. */
html[data-theme="light"] { --research-accent: #146454; --research-panel: #f2f6f3; --research-rule: #d6dfd9; }
html[data-theme="dark"] { --research-accent: #8bd4bd; --research-panel: #202d29; --research-rule: #475d53; }
.bd-main:has(.research-eyebrow) .bd-article-container { max-width: 1140px; padding: 3rem 2.5rem; }
.bd-article:has(.research-eyebrow) { color: var(--pst-color-text-base); }
.research-eyebrow { color: var(--research-accent); font: 650 .75rem/1.5 monospace; letter-spacing: .14em; margin: 1rem 0; }
.bd-article:has(.research-eyebrow) h1 { font-size: clamp(2.3rem, 5vw, 4rem); line-height: 1.18; max-width: 900px; font-weight: 750; letter-spacing: -.045em; margin: 1rem 0; }
.research-deck { font-size: clamp(1.2rem, 2.2vw, 1.8rem); color: var(--research-accent); margin: 1rem 0; font-weight: 550; }
.research-links { display: flex; flex-wrap: wrap; gap: .8rem 1.6rem; margin: 1.6rem 0; }
.research-links a { color: var(--research-accent); font-weight: 650; text-underline-offset: .3em; }
.research-meta { font-size: .8rem; padding-bottom: 2rem; border-bottom: 1px solid var(--research-rule); color: var(--pst-color-text-muted); }
.bd-article:has(.research-eyebrow) h2 { margin-top: 3.2rem; padding-top: .6rem; font-size: 1.7rem; font-weight: 650; }
.research-finding { border: 0; border-top: 3px solid var(--research-accent); border-radius: 0; background: var(--research-panel); }
.research-finding .sd-card-header { background: transparent; border: 0; padding: 1.2rem 1.2rem 0; color: var(--research-accent); }
.research-finding .sd-card-body { padding: 1.2rem; }
.bd-article:has(.research-eyebrow) table { font-size: .9rem; line-height: 1.6; width: 100%; }
.bd-article:has(.research-eyebrow) th { background: var(--research-panel); border-bottom: 2px solid var(--research-accent); }
.bd-article:has(.research-eyebrow) td { padding: .9rem .7rem; vertical-align: top; }
.research-caution { border-left: 3px solid var(--research-accent); padding: 1.1rem 1.4rem; background: var(--research-panel); line-height: 1.8; margin: 1.6rem 0; }
.research-footer { border-top: 1px solid var(--research-rule); margin-top: 2.5rem; padding-top: 1.5rem; color: var(--pst-color-text-muted); font-size: .85rem; }
.bd-article:has(.research-eyebrow) a:focus-visible { outline: 3px solid var(--research-accent); outline-offset: 3px; }
@media(max-width: 767px) { .bd-main:has(.research-eyebrow) .bd-article-container { padding: 1.5rem 1rem; } .bd-article:has(.research-eyebrow) h2 { margin-top: 2.2rem; } .bd-article:has(.research-eyebrow) .table-wrapper { overflow-x: auto; } }

/* Keep task verdicts readable while narrow screens scroll each table. */
#solver table td:first-child,
#task-coverage-by-solver table td:first-child { min-width: 18rem; max-width: 30rem; }
#solver table td:not(:first-child),
#task-coverage-by-solver table td:not(:first-child) { white-space: nowrap; }

/* Evidence comes first: compact overview, visual catalogue, recorded comparisons. */
.visual-intro {font-size:1.15rem;max-width:54rem;line-height:1.8}
.visual-hero {border-radius:12px;overflow:hidden;border:1px solid var(--pst-color-border);margin:1.4rem 0}
.visual-hero img {width:100%;display:block;margin:0!important}
.experiment-grid {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:1rem;margin:1.5rem 0}
.experiment-card {border:1px solid var(--pst-color-border);border-radius:10px;overflow:hidden;background:var(--pst-color-surface)}
.experiment-card img {height:140px;object-fit:contain;background:#f4f6f8;width:100%;margin:0!important}
.experiment-card .card-copy {padding:.8rem 1rem}.experiment-card h3 {font-size:1.05rem;margin:.1rem 0 .5rem}.experiment-card p {font-size:.86rem;line-height:1.6;margin:.4rem 0}
.experiment-card .engines {font-size:.75rem;color:var(--pst-color-text-muted)}
.dexlab-replay {border:1px solid var(--pst-color-border);border-radius:12px;padding:1rem;margin:1.2rem 0;background:var(--pst-color-surface)}
.replay-controls {display:flex;align-items:center;flex-wrap:wrap;gap:.55rem;margin-bottom:.8rem}
.dexlab-replay button,.dexlab-replay select {font:inherit;font-size:.85rem;padding:.45rem .7rem;border:1px solid var(--pst-color-border);border-radius:5px;background:var(--pst-color-background);color:var(--pst-color-text-base)}
.dexlab-replay button:hover {border-color:var(--pst-color-primary)}.dexlab-replay button:focus-visible,.dexlab-replay select:focus-visible,.dexlab-replay input:focus-visible {outline:3px solid var(--pst-color-primary);outline-offset:3px}
.replay-launch {font-weight:650;margin-bottom:.8rem}.replay-videos {display:flex;gap:.5rem;align-items:start}.replay-videos video {min-width:0;flex:1;width:100%;border-radius:6px;background:#142632}
.replay-timeline {display:flex;align-items:center;gap:.7rem;margin:1rem 0}.replay-timeline input {flex:1;min-width:40px}.replay-timeline output {font-variant-numeric:tabular-nums;min-width:6rem}
.replay-legend {list-style:none;padding:0;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.7rem}.replay-legend li {display:flex;flex-wrap:wrap;gap:.4rem;align-items:center}.replay-legend strong {padding-left:.4rem;font-size:.88rem}.replay-legend small {flex-basis:100%;font-size:.75rem;color:var(--pst-color-text-muted)}
.verdict {font-size:.65rem;font-weight:700;padding:.1rem .35rem;border:1px solid;border-radius:3px}.verdict.pass {color:#147657}.verdict.fail {color:#b34c2c}.verdict.invalid {color:#876025}
.replay-chart {margin:1rem 0;padding:.4rem 0;border-top:1px solid var(--pst-color-border)}.replay-chart h4 {font-size:.9rem;margin:.4rem 0}.replay-chart svg {display:block;width:100%;cursor:crosshair;touch-action:pan-y}
.chart-label {font-size:13px;fill:var(--pst-color-text-muted)}.chart-grid {stroke:var(--pst-color-border);stroke-width:1}.chart-reference,.chart-cursor {stroke:var(--pst-color-text-base)}.chart-cursor {stroke-width:1.5}
.chart-hold {fill:var(--pst-color-primary);opacity:.08}
html[data-theme="dark"] .verdict.pass {color:#85d9ba}html[data-theme="dark"] .verdict.fail {color:#ffaf96}html[data-theme="dark"] .verdict.invalid {color:#e7c384}
.chart-values,.replay-samples {font-size:.72rem!important;line-height:1.5!important;font-variant-numeric:tabular-nums;overflow-wrap:anywhere;color:var(--pst-color-text-muted)}
.replay-status {font-size:.82rem}.replay-panel details {font-size:.8rem;overflow-wrap:anywhere}.replay-panel details h4 {font-size:.9rem;margin:1rem 0 .5rem}.replay-panel details p {margin:.4rem 0}
.replay-fallback summary {cursor:pointer}.replay-fallback img {width:100%}.visual-note {padding:.8rem 1rem;border-left:3px solid var(--pst-color-primary);background:var(--pst-color-surface);font-size:.9rem}
@media(max-width:800px){.experiment-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.replay-legend{grid-template-columns:1fr}}
@media(max-width:560px){.experiment-grid{grid-template-columns:1fr}.replay-videos{flex-direction:column}.dexlab-replay{padding:.65rem}.replay-controls label:first-child{width:100%}.replay-controls select{max-width:100%}.replay-timeline{flex-wrap:wrap}.replay-timeline input{min-width:55%}.chart-label{font-size:16px}}
@media(min-width:960px){body:has(.experiment-grid) #pst-primary-sidebar,body:has(.dexlab-replay) #pst-primary-sidebar{display:none}.bd-main:has(.experiment-grid) .bd-article-container,.bd-main:has(.dexlab-replay) .bd-article-container{max-width:1120px}}
@media(max-width:560px){.replay-chart{overflow-x:auto}.replay-chart svg{min-width:650px}.chart-label{font-size:18px}.replay-chart .chart-values{max-width:calc(100vw - 90px)}}
@media(max-width:960px){html:has(.dexlab-replay),html:has(.experiment-grid){overflow-x:clip}}

/* Recorded cutting is the first view; the technical catalogue follows it. */
.cutting-showcase { margin: 1.1rem 0 2rem; }
.cutting-showcase-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 1rem; }
.cutting-player { min-width: 0; border: 1px solid var(--pst-color-border); border-radius: 12px; overflow: hidden; background: var(--pst-color-surface); }
.cutting-player header { display:flex; align-items:center; justify-content:space-between; gap:.65rem; padding:.85rem 1rem; flex-wrap:wrap; }
.cutting-player h3 { margin:0; font-size:1.05rem; }
.cutting-player video { display:block; width:100%; aspect-ratio:48/35; object-fit:contain; background:#e7eeeb; }
.cut-push-showcase .cutting-player video { aspect-ratio:96/79; }
.cutting-view-switch { display:flex; gap:3px; padding:3px; background:var(--pst-color-background); border-radius:7px; border:1px solid var(--pst-color-border); }
.cutting-view-switch button { padding:.2rem .6rem; font-size:.8rem; border:0; border-radius:4px; background:transparent; color:var(--pst-color-text-muted); cursor:pointer; }
.cutting-view-switch button[aria-pressed=true] { background:var(--pst-color-surface); color:var(--pst-color-text-base); box-shadow:0 1px 3px #0002; }
.cutting-player p { margin:0; padding:.7rem 1rem .85rem; font-size:.88rem; color:var(--pst-color-text-muted); }
.cutting-player a { font-weight:600; }
.cutting-showcase-note { margin:.8rem 0; font-size:.86rem; color:var(--pst-color-text-muted); }
@media(max-width:720px) { .cutting-showcase-grid { grid-template-columns:1fr; } }
@media(min-width:960px) { body:has(.cut-push-showcase) #pst-primary-sidebar { display:none; } .bd-main:has(.cut-push-showcase) .bd-article-container { max-width:1200px; } }

.cutting-comparison-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:.8rem; }
.cutting-comparison-panel { min-width:0; border:1px solid var(--pst-color-border); border-radius:12px; overflow:hidden; background:var(--pst-color-surface); }
.cutting-comparison-panel header { display:flex; min-height:4.25rem; padding:.8rem; justify-content:center; align-items:center; gap:.5rem; flex-wrap:wrap; box-sizing:border-box; }
.cutting-comparison-panel header h3 { margin:0; }
.cutting-comparison-panel h3 { text-align:center; font-size:1rem; margin:.6rem 0; }
.cutting-comparison-panel video { display:block; width:100%; aspect-ratio:8/5; object-fit:contain; border-radius:6px; background:#f0f0ed; }
.cutting-comparison-panel p { font-size:.78rem; line-height:1.6; margin:0; padding:.7rem .85rem; }
.cutting-reference-controls { display:flex; align-items:center; flex-wrap:wrap; gap:.65rem; margin:.8rem 0; }
.cutting-reference-controls[hidden] { display:none; }
.cutting-reference-controls button { padding:.4rem .7rem; border:1px solid var(--pst-color-border); border-radius:5px; background:var(--pst-color-surface); color:var(--pst-color-text-base); font:inherit; font-size:.85rem; }
.cutting-reference-controls input { flex:1; min-width:90px; }
.cutting-reference-controls output { font-size:.8rem; font-variant-numeric:tabular-nums; }
.cutting-playback-controls { display:flex; align-items:center; flex-wrap:wrap; gap:.4rem; padding:.45rem .65rem; }
.cutting-playback-controls button { padding:.25rem .45rem; border:1px solid var(--pst-color-border); border-radius:5px; background:var(--pst-color-surface); color:var(--pst-color-text-base); font:inherit; font-size:.78rem; }
.cutting-playback-controls input { flex:1; min-width:50px; width:80px; }
.cutting-playback-controls output { font-size:.72rem; font-variant-numeric:tabular-nums; }
@media(max-width:720px) { .cutting-comparison-grid { grid-template-columns:1fr; } }
@media(min-width:960px) { body:has(.cutting-comparison) #pst-primary-sidebar { display:none; } .bd-main:has(.cutting-comparison) .bd-article-container { max-width:1200px; } }
