:root {
  --ink: #f4f7f9;
  --muted: #b1c0c8;
  --quiet: #a0b3be;
  --night: #101f25;
  --night-deep: #0b171c;
  --panel: #14262e;
  --panel-2: #182d36;
  --line: #364c57;
  --line-soft: rgba(151, 181, 196, .2);
  --blue: #0064e0;
  --blue-hover: #0057c2;
  --blue-bright: #72b9ff;
  --cyan: #8cddff;
  --good: #86deae;
  --warn: #f4c476;
  --danger: #ff9691;
  --rail: 248px;
  --topbar: 72px;
  --gutter: clamp(28px, 3.4vw, 64px);
  --content-width: 1280px;
  --radius: 12px;
  --radius-pill: 999px;
  --display: "Figtree", "Noto Sans KR", sans-serif;
  --body: "Figtree", "Noto Sans KR", sans-serif;
  --mono: "IBM Plex Mono", "Noto Sans KR", monospace;
}

* { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--topbar) + 24px);
  background: var(--night);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background: var(--night);
  font-family: var(--body);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.65;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}
:lang(ko) { word-break: keep-all; }
button, input, select, textarea { font: inherit; }
input, select, textarea { font-size: 16px; }
button, select, input[type="radio"], input[type="checkbox"] { cursor: pointer; }
button { color: inherit; }
a { color: inherit; text-decoration: none; }
button, a, input, select, textarea, summary { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid var(--cyan); outline-offset: 4px; }
::selection { color: white; background: var(--blue); }
button:disabled, input:disabled, textarea:disabled, select:disabled {
  opacity: .58;
  cursor: not-allowed;
}
.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: fixed;
  z-index: 1000;
  top: 12px;
  left: 12px;
  padding: 10px 16px;
  color: var(--night);
  background: var(--ink);
  border-radius: 8px;
  transform: translateY(-160%);
  transition: transform .18s ease;
}
.skip-link:focus { transform: translateY(0); }

/* Navigation and persistent actions. */
.app-shell { min-height: 100vh; }
.side-rail {
  position: fixed;
  z-index: 50;
  inset: 0 auto 0 0;
  display: flex;
  width: var(--rail);
  flex-direction: column;
  overflow-y: auto;
  padding: 24px 20px 20px;
  background: var(--night-deep);
  border-right: 1px solid var(--line);
}
.brand-lockup { display: flex; align-items: center; gap: 11px; min-height: 44px; }
.brand-lockup div { display: grid; line-height: 1.15; }
.brand-lockup b { font-family: var(--display); font-size: 23px; font-weight: 600; letter-spacing: -.035em; }
.brand-lockup span { margin-top: 5px; color: var(--muted); font-size: 12px; font-weight: 500; letter-spacing: .045em; }
.brand-mark { width: 31px; height: 31px; overflow: visible; fill: var(--blue-bright); stroke: var(--blue-bright); stroke-linecap: round; stroke-linejoin: round; stroke-width: 2; flex-shrink: 0; }
.brand-mark path { fill: none; }
.rail-search { position: relative; display: block; margin: 30px 0 20px; }
.rail-search input {
  width: 100%;
  height: 46px;
  padding: 0 40px 0 13px;
  color: var(--ink);
  background: transparent;
  border: 1px solid #5a707c;
  border-radius: 8px;
}
.rail-search input::placeholder { color: var(--muted); }
.rail-search svg { position: absolute; top: 13px; right: 12px; width: 20px; fill: none; stroke: var(--blue-bright); stroke-width: 1.7; pointer-events: none; }
.rail-nav { display: grid; margin-bottom: 20px; border-top: 1px solid var(--line); }
.rail-nav a { display: flex; min-height: 50px; align-items: center; justify-content: space-between; gap: 12px; padding: 0 8px; font-size: 16px; font-weight: 500; border-bottom: 1px solid var(--line-soft); transition: color .18s ease, background .18s ease; }
.rail-nav a small { color: var(--quiet); font-family: var(--mono); font-size: 12px; }
.rail-nav a:hover, .rail-nav a.active { color: var(--blue-bright); background: rgba(65, 139, 184, .08); }
.source-overview { display: flex; min-height: 44px; align-items: center; margin: 0 8px 18px; color: var(--blue-bright); font-size: 14px; line-height: 1.5; }
.rail-groups { display: grid; gap: 2px; }
.rail-groups details { border-bottom: 1px solid var(--line-soft); }
.rail-groups summary { position: relative; min-height: 46px; padding: 11px 28px 11px 8px; font-size: 14px; font-weight: 500; list-style: none; cursor: pointer; }
.rail-groups summary::-webkit-details-marker { display: none; }
.rail-groups summary::after { content: "+"; position: absolute; right: 8px; color: var(--blue-bright); font-family: var(--mono); }
.rail-groups details[open] summary::after { content: "−"; }
.rail-groups details > p, .rail-groups ul { margin: 0 8px 16px; color: var(--muted); font-size: 13px; }
.rail-groups ul { display: grid; gap: 10px; padding: 0; list-style: none; }
kbd { display: inline-grid; min-width: 25px; height: 25px; margin-right: 7px; place-items: center; font-family: var(--mono); font-size: 12px; color: var(--ink); border: 1px solid var(--line); border-radius: 4px; }
.rail-progress { height: 4px; margin: 4px 8px 12px; overflow: hidden; background: #263b44; border-radius: var(--radius-pill); }
.rail-progress i { display: block; width: 0; height: 100%; background: var(--blue-bright); transition: width .28s ease; }
.rail-footer { display: flex; align-items: center; gap: 12px; margin: auto -20px -20px; padding: 24px 22px; border-top: 1px solid var(--line); }
.rail-footer div { display: grid; min-width: 0; gap: 3px; }
.rail-footer b { font-size: 14px; font-weight: 500; }
.rail-footer small { color: var(--quiet); font-size: 12px; line-height: 1.5; }
.privacy-light { width: 8px; height: 8px; flex-shrink: 0; border-radius: 50%; background: var(--good); box-shadow: 0 0 0 4px rgba(134, 222, 174, .1); }
.workspace { margin-left: var(--rail); }
.topbar { position: sticky; z-index: 40; top: 0; display: flex; height: var(--topbar); align-items: center; justify-content: flex-end; padding: 0 var(--gutter); background: rgba(16, 31, 37, .96); border-bottom: 1px solid var(--line); backdrop-filter: blur(16px); }
.topbar-actions { display: flex; gap: 12px; align-items: center; }
.language-link { display: inline-flex; min-height: 44px; align-items: center; color: var(--muted); font-size: 14px; }
.outline-pill, .primary-pill, .light-pill { min-height: 44px; padding: 10px 22px; font-size: 15px; font-weight: 600; line-height: 1.4; border-radius: var(--radius-pill); transition: background .18s ease, border-color .18s ease; }
.outline-pill { color: var(--ink); background: transparent; border: 1px solid #617783; }
.primary-pill { color: white; background: var(--blue); border: 1px solid var(--blue); }
.outline-pill:hover { background: var(--panel-2); border-color: var(--muted); }
.primary-pill:hover { background: var(--blue-hover); border-color: var(--blue-hover); }
.primary-pill span, .light-pill span { margin-left: 8px; }
.status-dot { display: inline-block; width: 7px; height: 7px; margin-right: 8px; border-radius: 50%; background: var(--warn); }
.outline-pill[aria-pressed="false"] .status-dot { background: var(--blue-bright); }
.mobile-menu, .mobile-brand { display: none; }
.menu-backdrop { position: fixed; z-index: 45; inset: var(--topbar) 0 0; background: rgba(0, 0, 0, .55); border: 0; }
.menu-backdrop[hidden] { display: none; }

/* Restrained editorial opening; all data sections share the same edges. */
main { overflow: clip; }
.hero { position: relative; min-height: 560px; display: grid; place-items: center; isolation: isolate; border-bottom: 1px solid var(--line); }
#networkCanvas { position: absolute; z-index: -1; inset: 0; width: 100%; height: 100%; opacity: .35; }
.hero::after { content: ""; position: absolute; z-index: -1; inset: 0; background: linear-gradient(0deg, rgba(16, 31, 37, .26), transparent 70%); }
.hero-content { width: min(820px, calc(100% - var(--gutter) * 2)); padding: 64px 0; text-align: center; }
.eyebrow { margin: 0 0 14px; color: var(--muted); font-size: 13px; font-weight: 500; letter-spacing: .07em; line-height: 1.5; }
.hero h1 { max-width: 760px; margin: 0 auto 24px; font-family: var(--display); font-size: clamp(48px, 4vw, 64px); font-weight: 400; letter-spacing: -.035em; line-height: 1.08; text-wrap: balance; }
.hero-copy { max-width: 620px; margin: 0 auto 32px; color: #d7e1e7; font-size: 18px; line-height: 1.65; }
.problem-setting { margin-top: 28px; padding: clamp(22px, 2.5vw, 32px); text-align: left; background: var(--night-deep); border: 1px solid var(--line); border-radius: var(--radius); }
.problem-heading { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 8px 16px; }
.problem-heading h2 { margin: 0; color: var(--cyan); font-size: 16px; font-weight: 500; }
.problem-heading > span { color: var(--muted); font-size: 13px; }
.case-presentation { margin: 18px 0 24px; color: var(--ink); font-size: 19px; line-height: 1.65; }
.problem-task { padding-top: 20px; border-top: 1px solid var(--line); }
.problem-task > span { color: var(--quiet); font-size: 12px; font-weight: 500; letter-spacing: .05em; }
.problem-task p { margin: 6px 0 16px; font-size: 16px; line-height: 1.6; }
.problem-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.problem-actions span { padding: 5px 12px; color: var(--ink); background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-pill); font-size: 13px; }
.problem-rules { margin: 14px 0 0; color: var(--muted); font-size: 13px; }
.problem-instructions { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 14px; }
.problem-instructions summary { min-height: 32px; color: var(--cyan); cursor: pointer; }
.problem-instructions h3 { margin: 18px 0 8px; color: var(--quiet); font-size: 13px; font-weight: 500; }
.problem-instructions p { margin: 0 0 14px; font-size: 15px; white-space: pre-wrap; overflow-wrap: anywhere; }
.problem-instructions .problem-review-note { padding-top: 14px; color: var(--muted); font-size: 13px; border-top: 1px solid var(--line); }
.problem-reference-link { display: inline-block; margin-top: 12px; color: var(--muted); font-size: 13px; }
.problem-reference-link:hover { color: var(--cyan); text-decoration: underline; text-underline-offset: 4px; }
.run-overview .run-loader { width: 100%; margin: 0 0 10px; }
.run-overview #nextUnreviewedButton { margin-bottom: 28px; }
@media (max-width: 680px) {
  .case-presentation { font-size: 17px; }
  .problem-task p { font-size: 15px; }
}
.run-loader { display: grid; width: min(720px, 100%); min-height: 80px; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; margin: 0 auto 14px; padding: 14px 18px; text-align: left; background: #112128; border: 1px solid var(--line); border-radius: var(--radius); }
.prompt-mark { color: var(--blue-bright); font-family: var(--mono); font-size: 22px; }
.run-loader select { min-width: 0; width: 100%; min-height: 48px; padding: 0 10px; color: var(--ink); font-family: var(--mono); font-size: 16px; background: transparent; border: 0; border-radius: 6px; }
.run-loader option { color: var(--ink); background: var(--night); }
.run-loader button { min-width: 100px; min-height: 44px; padding: 10px 20px; color: white; font-size: 15px; font-weight: 600; background: var(--blue); border: 0; border-radius: var(--radius-pill); }
.run-loader button:hover { background: var(--blue-hover); }
.load-status { min-height: 24px; margin: 10px 0; color: var(--cyan); font-size: 13px; line-height: 1.6; overflow-wrap: anywhere; }
.load-status.error, .storage-status.error { color: var(--danger); }
.text-link { min-height: 44px; padding: 8px 0; color: var(--ink); background: transparent; border: 0; font-size: 16px; font-weight: 500; }
.text-link span { margin-left: 7px; color: var(--blue-bright); }
.text-link:hover { color: var(--blue-bright); }
.content-section { width: min(var(--content-width), calc(100% - var(--gutter) * 2)); margin: 0 auto; padding: 76px 0; }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 32px; }
.section-heading > div { min-width: 0; }
.section-heading h2 { margin: 0; font-family: var(--display); font-size: clamp(32px, 3vw, 40px); font-weight: 400; letter-spacing: -.025em; line-height: 1.2; }
.section-heading > p, .section-heading > span { margin: 0; color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
#runTimestamp { font-family: var(--mono); font-size: 13px; }
.metric-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.metric-card { min-width: 0; min-height: 160px; padding: 26px; border-right: 1px solid var(--line); }
.metric-card:nth-child(3n) { border-right: 0; }
.metric-card:nth-child(n+4) { border-top: 1px solid var(--line); }
.metric-card span { display: block; margin-bottom: 16px; color: var(--muted); font-size: 13px; font-weight: 500; letter-spacing: .045em; text-transform: uppercase; }
.metric-card strong { display: block; font-family: var(--mono); font-size: clamp(26px, 2.3vw, 32px); font-weight: 400; letter-spacing: -.045em; line-height: 1.3; overflow-wrap: anywhere; }
.metric-card small { display: block; margin-top: 9px; color: var(--quiet); font-size: 13px; line-height: 1.55; }
.metric-card.is-blue strong { color: var(--blue-bright); }
.metric-card.is-good strong { color: var(--good); }
.metric-card.is-warn strong { color: var(--warn); }
.method-note { margin: 18px 0 0; color: var(--muted); font-size: 14px; line-height: 1.6; }
.integrity-details { margin-top: 24px; padding: 16px 20px; color: var(--muted); font-size: 14px; border: 1px solid var(--line); border-radius: var(--radius); }
.integrity-details summary, .source-detail summary, .recorded-detail summary { min-height: 28px; padding-block: 4px; cursor: pointer; color: var(--cyan); }
.integrity-details dl { display: grid; gap: 8px; }
.integrity-details dt { margin-top: 8px; }
.integrity-details dd { margin: 0; color: var(--ink); font-family: var(--mono); font-size: 13px; overflow-wrap: anywhere; }

/* Reading surface and clinical review controls. */
.trajectory-section { border-top: 1px solid var(--line); }
.sticky-heading { align-items: center; }
.section-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.section-tools > span { color: var(--muted); font-family: var(--mono); font-size: 13px; }
.filter-tabs { display: flex; padding: 4px; border: 1px solid var(--line); border-radius: var(--radius-pill); }
.filter-tabs button { min-height: 44px; padding: 0 16px; color: var(--muted); background: transparent; border: 0; border-radius: var(--radius-pill); font-size: 14px; font-weight: 500; }
.filter-tabs button.active { color: white; background: var(--blue); }
.trajectory-layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 28px; align-items: start; }
.trajectory-layout > .timeline { grid-column: 1; grid-row: 1; }
.trajectory-layout > .reviewer-panel { grid-column: 2; grid-row: 1; }
.timeline { position: relative; display: grid; min-width: 0; gap: 24px; }
.timeline::before { content: ""; position: absolute; top: 22px; bottom: 22px; left: 21px; width: 1px; background: var(--line); }
.turn-card { position: relative; display: grid; min-width: 0; grid-template-columns: 44px minmax(0, 1fr); gap: 14px; scroll-margin-top: calc(var(--topbar) + 24px); }
.turn-index { position: relative; z-index: 1; display: grid; width: 44px; height: 44px; place-items: center; font-family: var(--mono); font-size: 14px; font-weight: 500; background: var(--night); border: 1px solid var(--line); border-radius: 10px; }
.turn-card[data-verdict="acceptable"] .turn-index { color: var(--good); border-color: var(--good); }
.turn-card[data-verdict="questionable"] .turn-index { color: var(--warn); border-color: var(--warn); }
.turn-card[data-verdict="unsafe"] .turn-index { color: var(--danger); border-color: var(--danger); }
.turn-body { min-width: 0; background: #12232b; border: 1px solid var(--line); border-radius: var(--radius); }
.turn-body > summary { display: flex; min-height: 88px; align-items: center; justify-content: space-between; gap: 18px; padding: 20px 24px; list-style: none; cursor: pointer; }
.turn-body > summary::-webkit-details-marker { display: none; }
.turn-summary-title { min-width: 0; }
.turn-summary-title span { display: block; color: var(--blue-bright); font-size: 13px; font-weight: 500; letter-spacing: .065em; }
.turn-summary-title h3 { margin: 5px 0 0; font-size: 20px; font-weight: 500; letter-spacing: -.012em; line-height: 1.4; overflow-wrap: anywhere; }
.turn-meta { display: flex; flex-wrap: wrap; gap: 8px; flex-shrink: 0; align-items: center; }
.route-badge, .provenance-badge, .source-chip, .shadow-badge { display: inline-flex; max-width: 100%; min-height: 30px; align-items: center; padding: 3px 9px; color: var(--muted); font-size: 13px; font-weight: 500; line-height: 1.5; border: 1px solid var(--line); border-radius: 6px; overflow-wrap: anywhere; }
.source-chip { font-family: var(--mono); font-size: 13px; border-style: dashed; }
.turn-cost { color: var(--muted); font-family: var(--mono); font-size: 13px; }
.turn-content { border-top: 1px solid var(--line); }
.exchange { display: grid; grid-template-columns: 1fr; border-bottom: 1px solid var(--line-soft); }
.exchange:last-child { border-bottom: 0; }
.exchange-label { padding: 20px 24px 0; color: var(--muted); font-size: 13px; font-weight: 500; letter-spacing: .05em; }
.exchange-content { min-width: 0; padding: 10px 24px 24px; }
.exchange-content p { max-width: 72ch; margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.exchange-content .request { margin-bottom: 14px; color: var(--muted); font-size: 15px; line-height: 1.6; }
.exchange-content .response { font-size: 17px; line-height: 1.7; }
.exchange-footer { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.provenance-badge[data-provenance="core"] { color: var(--good); border-color: rgba(134, 222, 174, .5); }
.provenance-badge[data-provenance="generated"] { color: var(--warn); border-color: rgba(244, 196, 118, .5); }
.provenance-badge[data-provenance="mixed"] { color: var(--cyan); border-color: rgba(140, 221, 255, .5); }
.provenance-badge[data-provenance="refused"], .provenance-badge[data-provenance="rejected"] { color: var(--danger); border-color: rgba(255, 150, 145, .5); }
.source-popover { margin-top: 14px; padding: 16px 18px; color: var(--muted); font-size: 15px; line-height: 1.65; background: var(--night-deep); border-left: 2px solid var(--blue-bright); border-radius: 0 8px 8px 0; overflow-wrap: anywhere; }
.source-detail { margin-top: 16px; color: var(--muted); font-size: 14px; line-height: 1.65; overflow-wrap: anywhere; }
.source-detail li { margin-top: 12px; }
.source-detail ul { margin: 12px 0; padding-left: 20px; }
.recorded-detail { margin: 18px 24px; font-size: 14px; }
.recorded-detail pre, .source-detail pre { margin: 12px 0; white-space: pre-wrap; overflow-wrap: anywhere; font-family: var(--mono); font-size: 13px; line-height: 1.7; }
.turn-error { margin: 18px 24px; color: var(--danger); font-size: 14px; white-space: pre-wrap; overflow-wrap: anywhere; }
.turn-review { padding: 24px; background: #172c35; border-top: 1px solid var(--line); border-radius: 0 0 var(--radius) var(--radius); }
.turn-review fieldset, .final-review fieldset { min-width: 0; margin: 0 0 20px; padding: 0; border: 0; }
.turn-review legend, .final-review legend { margin-bottom: 12px; padding: 0; font-size: 15px; font-weight: 500; }
.choice-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.choice-grid label, .issue-tags label { position: relative; cursor: pointer; }
.choice-grid input, .issue-tags input { position: absolute; opacity: 0; pointer-events: none; }
.choice-grid span { display: grid; min-height: 46px; place-items: center; padding: 9px 8px; color: var(--muted); font-size: 14px; font-weight: 500; line-height: 1.4; text-align: center; border: 1px solid #536b78; border-radius: 8px; transition: background .15s ease, color .15s ease, border-color .15s ease; }
.choice-grid input:focus-visible + span, .issue-tags input:focus-visible + span { outline: 3px solid var(--cyan); outline-offset: 3px; }
.choice-grid input[value="acceptable"]:checked + span, .choice-grid input[value="agree"]:checked + span { color: var(--night-deep); background: var(--good); border-color: var(--good); }
.choice-grid input[value="questionable"]:checked + span, .choice-grid input[value="partial"]:checked + span, .choice-grid input[value="missing"]:checked + span { color: var(--night-deep); background: var(--warn); border-color: var(--warn); }
.choice-grid input[value="unsafe"]:checked + span, .choice-grid input[value="disagree"]:checked + span, .choice-grid input[value="overcalled"]:checked + span { color: white; background: #993b3b; border-color: var(--danger); }
.choice-grid input:disabled + span, .issue-tags input:disabled + span { opacity: .58; cursor: not-allowed; }
.issue-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 0; }
.issue-tags span { display: inline-flex; min-height: 44px; align-items: center; padding: 8px 13px; color: var(--muted); font-size: 14px; line-height: 1.5; border: 1px solid #536b78; border-radius: var(--radius-pill); }
.issue-tags input:checked + span { color: white; background: #623a38; border-color: var(--danger); }
.turn-review textarea, .final-review textarea, .reviewer-panel input, .final-review select { width: 100%; min-width: 0; min-height: 48px; padding: 12px 14px; color: var(--ink); font-size: 16px; font-weight: 400; line-height: 1.6; background: var(--night-deep); border: 1px solid #526c79; border-radius: 8px; resize: vertical; }
textarea::placeholder, .reviewer-panel input::placeholder { color: var(--quiet); opacity: 1; }
.turn-review > label, .final-review > label, .reviewer-panel label { display: grid; min-width: 0; gap: 8px; color: var(--muted); font-size: 14px; font-weight: 500; }
.reviewer-panel { position: sticky; top: calc(var(--topbar) + 24px); min-width: 0; max-height: calc(100dvh - var(--topbar) - 48px); overflow-y: auto; padding: 24px; background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--radius); }
.reviewer-panel .eyebrow { margin-bottom: 8px; }
.reviewer-panel h3 { margin: 0 0 24px; font-family: var(--display); font-size: 26px; font-weight: 400; letter-spacing: -.02em; line-height: 1.25; }
.reviewer-panel label { margin-bottom: 16px; }
.panel-button { width: 100%; min-height: 46px; margin: 4px 0 18px; padding: 10px 12px; color: var(--ink); background: transparent; border: 1px solid #617d8c; border-radius: 8px; font-size: 14px; font-weight: 500; line-height: 1.5; }
.panel-button:hover { color: var(--blue-bright); border-color: var(--blue-bright); background: rgba(0, 0, 0, .1); }
.portable-actions { display: flex; gap: 8px; }
.portable-actions .panel-button { margin: 0; }
.storage-status { margin: 16px 0; color: var(--cyan); font-size: 13px; line-height: 1.65; overflow-wrap: anywhere; }
.session-readout { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.session-readout div { display: flex; min-height: 48px; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--line-soft); }
.session-readout div:last-child { border-bottom: 0; }
.session-readout span { color: var(--muted); font-size: 14px; }
.session-readout strong { font-family: var(--mono); font-size: 16px; font-weight: 500; }
.panel-note { margin: 18px 0 0; color: var(--quiet); font-size: 13px; line-height: 1.65; }

/* Final assessment and source reference. */
.evaluation-section, .reference-section { border-top: 1px solid var(--line); }
.section-heading .shadow-badge, .shadow-badge { color: var(--warn); border-color: rgba(244, 196, 118, .5); }
.evaluation-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.decision-card, .final-review { min-width: 0; padding: 30px; }
.decision-card { border-right: 1px solid var(--line); }
.decision-card h3 { margin: 0 0 12px; color: var(--muted); font-size: 13px; font-weight: 500; letter-spacing: .055em; }
.diagnosis-text { margin: 0 0 28px; font-family: var(--display); font-size: 28px; font-weight: 400; letter-spacing: -.02em; line-height: 1.35; overflow-wrap: anywhere; }
.rationale-box { margin: 24px 0; padding: 20px; color: #d9e3e8; font-size: 17px; line-height: 1.7; background: var(--night-deep); border-left: 2px solid var(--blue-bright); border-radius: 0 8px 8px 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.reward-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.reward-strip div { min-width: 0; padding: 16px 10px; border-right: 1px solid var(--line); }
.reward-strip div:last-child { border-right: 0; }
.reward-strip span { display: block; margin-bottom: 5px; color: var(--quiet); font-size: 13px; overflow-wrap: anywhere; }
.reward-strip strong { font-family: var(--mono); font-size: 19px; font-weight: 500; overflow-wrap: anywhere; }
.penalty-list { display: grid; gap: 10px; margin-top: 24px; }
.penalty-item { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 16px; border: 1px solid rgba(255, 150, 145, .45); border-radius: 8px; }
.penalty-item b { font-size: 14px; font-weight: 500; overflow-wrap: anywhere; }
.penalty-item span { color: var(--danger); font-family: var(--mono); font-size: 15px; flex-shrink: 0; }
.decision-card .recorded-detail { margin-inline: 0; }
.final-review { display: grid; align-content: start; gap: 16px; background: var(--panel); }
.reference-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.reference-card { min-width: 0; min-height: 192px; padding: 28px; border-right: 1px solid var(--line); }
.reference-card:last-child { border-right: 0; }
.reference-card span { color: var(--muted); font-size: 13px; letter-spacing: .055em; }
.reference-card h3 { margin: 18px 0 10px; font-size: 21px; font-weight: 500; line-height: 1.4; overflow-wrap: anywhere; }
.reference-card p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.65; overflow-wrap: anywhere; }
.reference-locked { grid-column: 1 / -1; min-height: 144px; display: grid; place-content: center; padding: 24px; color: var(--muted); text-align: center; }
.completion-band { display: flex; width: min(var(--content-width), calc(100% - var(--gutter) * 2)); min-height: 196px; align-items: center; justify-content: space-between; gap: 32px; margin: 0 auto 76px; padding: 38px 40px; color: white; background: var(--blue); border-radius: 16px; }
.completion-band .eyebrow { color: white; }
.completion-band h2 { max-width: 680px; margin: 0; font-family: var(--display); font-size: clamp(30px, 3vw, 40px); font-weight: 400; letter-spacing: -.025em; line-height: 1.2; }
.light-pill { flex-shrink: 0; color: #17303e; background: white; border: 1px solid white; }
.light-pill:hover { background: #e5efff; border-color: #e5efff; }
.page-footer { display: flex; min-height: 120px; align-items: center; justify-content: space-between; gap: 24px; padding: 28px max(var(--gutter), calc((100% - var(--content-width)) / 2)); color: var(--muted); border-top: 1px solid var(--line); }
.brand-lockup.compact .brand-mark { width: 26px; }
.page-footer p { margin: 0; font-size: 13px; line-height: 1.6; }
.toast { position: fixed; z-index: 100; right: 24px; bottom: 24px; max-width: 420px; padding: 16px 20px; color: var(--ink); font-size: 15px; line-height: 1.6; background: #1b333d; border: 1px solid var(--blue-bright); border-radius: var(--radius); transform: translateY(140%); opacity: 0; transition: transform .22s ease, opacity .22s ease; overflow-wrap: anywhere; }
.toast.show { transform: translateY(0); opacity: 1; }
.toast.error { border-color: var(--danger); }
.empty-state { padding: 40px 24px; color: var(--muted); text-align: center; border: 1px dashed var(--line); border-radius: var(--radius); }
.is-hidden { display: none !important; }

@media (max-width: 1439px) {
  .trajectory-layout { grid-template-columns: minmax(0, 1fr) 264px; gap: 24px; }
  .turn-body > summary { align-items: flex-start; flex-direction: column; gap: 12px; }
  .reviewer-panel { padding: 20px; }
  .evaluation-grid { grid-template-columns: 1fr; }
  .decision-card { border-right: 0; border-bottom: 1px solid var(--line); }
}

@media (max-width: 1279px) {
  .trajectory-layout > .reviewer-panel { grid-column: 1; grid-row: 1; }
  .trajectory-layout > .timeline { grid-column: 1; grid-row: 2; }
  .trajectory-layout { grid-template-columns: minmax(0, 1fr); }
  .reviewer-panel { position: static; grid-row: 1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 20px; max-height: none; overflow: visible; padding: 26px; }
  .reviewer-panel .eyebrow, .reviewer-panel h3, .reviewer-panel .panel-note, .portable-actions, .storage-status { grid-column: 1 / -1; }
  .reviewer-panel .eyebrow, .reviewer-panel h3, .reviewer-panel label, .panel-note, .storage-status { margin: 0; }
  .reviewer-panel .panel-button { margin: 0; }
  .reviewer-panel > .panel-button { grid-column: 1 / -1; }
  .session-readout { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .session-readout div { padding-inline: 14px; border-right: 1px solid var(--line-soft); border-bottom: 0; }
  .session-readout div:last-child { border-right: 0; }
  .sticky-heading { align-items: flex-start; flex-direction: column; }
  .reference-grid { grid-template-columns: 1fr; }
  .reference-card { min-height: 0; border-right: 0; border-bottom: 1px solid var(--line); }
  .reference-card:last-child { border-bottom: 0; }
}

@media (max-width: 1024px) {
  :root { --gutter: 32px; --topbar: 72px; }
  .side-rail { top: var(--topbar); width: min(320px, 88vw); transform: translateX(-105%); transition: transform .22s ease; box-shadow: 28px 0 80px rgba(0, 0, 0, .35); }
  .side-rail.open { transform: translateX(0); }
  .workspace { margin-left: 0; }
  .topbar { z-index: 60; justify-content: space-between; gap: 10px; }
  .mobile-menu { display: grid; width: 44px; height: 44px; flex-shrink: 0; padding: 10px; place-content: center; gap: 5px; background: transparent; border: 0; border-radius: 8px; }
  .mobile-menu > span:not(.sr-only) { display: block; width: 21px; height: 2px; background: var(--ink); }
  .mobile-brand { display: block; margin-right: auto; font-family: var(--display); font-size: 22px; font-weight: 600; letter-spacing: -.03em; }
  .hero h1 { font-size: 56px; }
  .hero-content { padding-block: 60px; }
  .content-section { padding-block: 64px; }
  .completion-band { margin-bottom: 64px; }
}

@media (max-width: 700px) {
  :root { --gutter: 24px; --topbar: 68px; }
  .topbar { padding-inline: 16px; gap: 6px; }
  .topbar-actions { gap: 10px; }
  .mobile-brand { font-size: 20px; }
  .language-link { font-size: 13px; }
  .outline-pill { min-width: 44px; width: 44px; padding: 0; }
  .outline-pill span:last-child { display: none; }
  .outline-pill .status-dot { margin: 0; }
  .primary-pill { padding-inline: 16px; font-size: 14px; }
  .primary-pill span { margin-left: 5px; }
  .hero { min-height: 540px; }
  .hero-content { padding-block: 52px; }
  .hero h1 { font-size: 44px; }
  .hero-copy { font-size: 17px; }
  .hero .eyebrow { max-width: 30em; margin-inline: auto; font-size: 12px; }
  .run-loader { grid-template-columns: auto minmax(0, 1fr); padding: 14px; }
  .run-loader select { padding-inline: 4px; }
  .run-loader button { grid-column: 1 / -1; width: 100%; }
  .content-section { padding-block: 52px; }
  .section-heading { align-items: flex-start; flex-direction: column; gap: 18px; margin-bottom: 26px; }
  .section-heading h2 { font-size: 34px; }
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metric-card, .metric-card:nth-child(3n) { min-height: 156px; padding: 20px; border-right: 1px solid var(--line); border-top: 1px solid var(--line); }
  .metric-card:nth-child(2n) { border-right: 0; }
  .metric-card:nth-child(-n+2) { border-top: 0; }
  .metric-card span { margin-bottom: 12px; }
  .metric-card strong { font-size: 28px; }
  .metric-card:first-child strong { font-family: var(--body); font-size: 24px; letter-spacing: -.02em; }
  .section-tools { width: 100%; justify-content: space-between; gap: 12px; }
  .filter-tabs button { padding-inline: 14px; }
  .turn-card { grid-template-columns: 1fr; gap: 0; }
  .timeline { gap: 28px; }
  .timeline::before { display: none; }
  .turn-index { position: absolute; top: 18px; left: 18px; width: 36px; height: 36px; font-size: 13px; border-radius: 8px; }
  .turn-body > summary { min-height: 104px; padding: 20px 18px 20px 68px; gap: 10px; }
  .turn-summary-title h3 { font-size: 19px; }
  .turn-summary-title span { font-size: 12px; }
  .turn-meta { width: 100%; }
  .exchange-label { padding: 20px 20px 0; }
  .exchange-content { padding: 10px 20px 24px; }
  .recorded-detail, .turn-error { margin-inline: 20px; }
  .turn-review { padding: 22px 20px; }
  .choice-grid { grid-template-columns: 1fr; }
  .choice-grid span { min-height: 46px; }
  .reviewer-panel { grid-template-columns: 1fr; gap: 16px; padding: 24px; }
  .reviewer-panel > * { grid-column: 1; }
  .session-readout { grid-template-columns: 1fr; }
  .session-readout div { padding-inline: 0; border-right: 0; border-bottom: 1px solid var(--line-soft); }
  .decision-card, .final-review { padding: 24px; }
  .diagnosis-text { font-size: 26px; }
  .rationale-box { padding: 18px; }
  .reward-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .reward-strip div:nth-child(2) { border-right: 0; }
  .reward-strip div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .reference-card { padding: 24px; }
  .completion-band { align-items: flex-start; flex-direction: column; gap: 28px; margin-bottom: 52px; padding: 32px 28px; }
  .completion-band h2 { font-size: 32px; }
  .light-pill { width: 100%; }
  .page-footer { align-items: flex-start; flex-direction: column; justify-content: center; gap: 12px; padding-block: 32px; }
  .toast { left: 16px; right: 16px; max-width: none; }
}

@media (max-width: 420px) {
  :root { --gutter: 18px; }
  .topbar { gap: 4px; padding-inline: 8px; }
  .topbar-actions { gap: 7px; }
  .mobile-brand { font-size: 18px; }
  .mobile-menu { width: 40px; }
  .primary-pill { padding-inline: 12px; }
  .primary-pill span { display: none; }
  .hero h1 { font-size: 40px; }
  .hero-copy { font-size: 16px; }
  .run-loader { padding-inline: 12px; gap: 8px; }
  .metric-card, .metric-card:nth-child(3n) { padding: 18px; }
  .filter-tabs { width: 100%; }
  .filter-tabs button { flex: 1; padding-inline: 10px; }
  .turn-body > summary { padding-left: 64px; }
  .turn-index { left: 16px; }
  .exchange-label, .exchange-content, .turn-review { padding-inline: 18px; }
  .recorded-detail, .turn-error { margin-inline: 18px; }
  .reviewer-panel, .decision-card, .final-review { padding: 20px; }
  .completion-band { padding: 30px 24px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
