:root {
 color-scheme: dark;
 font-family: "Segoe UI", system-ui, sans-serif;
 color: #edf4f2;
 background: #0c1114;
 --muted: #a2b2b2;
 --accent: #8fedca;
 --line: #2a393b;
 --panel: #141d20;
}
* { box-sizing: border-box; }
body { margin: 0; }
a { color: inherit; text-decoration: none; }
a:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.skip { position: fixed; left: 12px; top: -60px; z-index: 3; background: var(--panel); padding: 12px; }
.skip:focus { top: 12px; }
.rail {
 position: fixed; inset: 0 auto 0 0; width: 224px; background: #10171a; border-right: 1px solid var(--line);
 display: flex; flex-direction: column; padding: 24px 16px;
}
.brand { display: flex; align-items: center; gap: 11px; font-weight: 850; letter-spacing: .11em; padding: 0 8px; font-size: 21px; }
.mark { border: 1px solid #578673; display: grid; place-items: center; width: 38px; height: 38px; background: #1c3930; color: var(--accent); border-radius: 10px; }
.accent { color: var(--accent); }
.rail nav { display: grid; gap: 7px; margin-top: 44px; }
.rail nav a { padding: 12px; border-radius: 8px; color: var(--muted); font-size: 14px; border: 1px solid transparent; }
.rail nav a span { display: inline-block; width: 21px; color: var(--accent); }
.rail nav a:hover, .rail nav a[aria-current] { background: #20332e; color: #e3faf0; border-color: #375347; }
.rail-note { margin-top: auto; font-size: 10px; letter-spacing: .16em; padding: 12px; color: var(--muted); }
.workspace { margin-left: 224px; min-height: 100vh; background: radial-gradient(ellipse at 90% -12%, #244139 0, transparent 52%); }
.top { height: 66px; padding: 0 36px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; color: var(--muted); font-size: 14px; }
.tag, .chip { border: 1px solid #41564f; background: #1d2c29; color: #ccede0; border-radius: 999px; padding: 5px 10px; font-size: 12px; white-space: nowrap; }
main { max-width: 1330px; margin: auto; padding: 36px; }
main:focus { outline: none; }
.page-title { margin-bottom: 25px; }
h1 { margin: 0 0 7px; font-size: clamp(32px, 4.2vw, 54px); letter-spacing: -.055em; line-height: 1.07; }
p { color: var(--muted); margin: 0; line-height: 1.5; }
h2, h3 { margin: 0; }
h2 { font-size: 17px; }
h3 { font-size: 15px; }
.metrics, .overview-grid, .review-grid { display: grid; gap: 16px; }
.metrics { grid-template-columns: repeat(3, minmax(0,1fr)); margin-bottom: 16px; }
.metric, .panel { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 20px; min-width: 0; }
.metric { background: linear-gradient(145deg, #21322e, #151f22 78%); }
.metric h2 { color: #c3d3cf; font-size: 14px; }
.metric strong { font-size: 46px; line-height: 1.27; color: var(--accent); font-variant-numeric: tabular-nums; }
.metric p, .topic p { font-size: 13px; }
.overview-grid { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); align-items: start; }
.panel > h2 { padding-bottom: 15px; }
.match-list, .topic-list, .finding-stack { display: grid; gap: 9px; }
.match-row, .topic { border: 1px solid var(--line); border-radius: 9px; background: #10191b; padding: 12px; }
.match-row { display: grid; grid-template-columns: auto minmax(0,1fr) auto auto; align-items: center; gap: 10px; min-height: 62px; }
.match-row:hover, .timeline a:hover { background: #20332e; }
.match-row small { display: block; margin-top: 3px; color: var(--muted); overflow-wrap: anywhere; }
.hero-icon { display: grid; place-items: center; width: 38px; height: 38px; color: #a5f0d1; border-radius: 9px; border: 1px solid #426c60; background: linear-gradient(140deg,#284e43,#152725); font-weight: 750; }
.row-count, .arrow { color: var(--muted); font-size: 12px; }
.arrow { font-size: 18px; }
.topic-title { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 4px; }
.evidence-link, .back { display: inline-block; color: var(--accent); font-size: 13px; padding: 6px 0; }
.evidence-link:hover, .back:hover { text-decoration: underline; }
.back { margin-bottom: 12px; }
.review-grid { grid-template-columns: minmax(185px, .45fr) minmax(0, 1fr); align-items: start; }
.timeline { display: grid; gap: 7px; }
.timeline a, .filters a { padding: 11px; border: 1px solid var(--line); border-radius: 8px; color: var(--muted); min-height: 44px; }
.timeline a[aria-current], .filters a[aria-current] { border-color: #5c9580; color: var(--accent); background: #20332e; }
.episode-id { font-size: 12px; overflow-wrap: anywhere; }
.finding h3 { font-size: 20px; margin: 9px 0 5px; }
.badge { display: inline-block; padding: 5px 8px; border-radius: 5px; background: #223a33; color: #b3efda; font-size: 12px; }
.badge.tactical_constraint { background: #3b3120; color: #f6d48e; }
.badge.potential_mistake { background: #402d26; color: #ffc6a0; }
.badge.reviewer_confirmed_mistake { background: #492a33; color: #ffbbc9; }
.badge.insufficient_evidence, .badge.rejected_mistake_hypothesis { background: #30323c; color: #d5d7ed; }
.badge.positive_execution { background: #23394a; color: #b6e1ff; }
.practice { border-left: 2px solid #659983; padding: 8px 11px; margin: 12px 0; background: #192a26; font-size: 14px; }
.references { color: var(--muted); font-size: 13px; padding: 6px 0; }
.references summary { cursor: pointer; padding: 6px 0; }
.references code { display: block; overflow-wrap: anywhere; color: #cfe8e0; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 15px; }
main > .panel + .panel { margin-top: 16px; }
.empty { padding: 9px 0; }
@media (max-width: 1080px) {
 .rail { width: 188px; }
 .workspace { margin-left: 188px; }
 main, .top { padding-left: 22px; padding-right: 22px; }
}
@media (max-width: 850px) {
 .overview-grid { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
 .rail { position: static; width: auto; border-right: 0; border-bottom: 1px solid var(--line); padding: 12px; }
 .brand { font-size: 18px; }
 .mark { width: 32px; height: 32px; }
 .rail nav { margin-top: 12px; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 5px; }
 .rail nav a { padding: 10px 7px; min-height: 44px; }
 .rail-note { display: none; }
 .workspace { margin-left: 0; }
 .top { height: 44px; }
 main { padding: 20px 12px; }
 .top { padding: 0 12px; }
 .metrics { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 6px; }
 .metric { padding: 9px; }
 .metric h2 { font-size: 12px; }
 .metric strong { font-size: 32px; }
 .metric p { display: none; }
 .panel { padding: 13px; }
 .review-grid { grid-template-columns: 1fr; }
 .timeline { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
