:root {
  color-scheme: dark;
  --bg: #0b0b0d;
  --surface: #151416;
  --surface-raised: #1b191b;
  --line: #363238;
  --line-soft: #2a272c;
  --text: #f4f1f4;
  --muted: #b0a9b2;
  --faint: #948c98;
  --rose: #e11d48;
  --violet: #a78bfa;
  --green: #6ee7b7;
  --amber: #f4c75e;
  --mono: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
  --sans: "Segoe UI", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }
html { background: var(--bg); scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; color: var(--text); background: radial-gradient(ellipse at 50% -25%, rgba(124,58,237,.12), transparent 54%), var(--bg); font-family: var(--sans); line-height: 1.55; }
button, a { font: inherit; }
button:focus-visible, a:focus-visible, [tabindex="0"]:focus-visible { outline: 3px solid var(--violet); outline-offset: 3px; }
::selection { color: #fff; background: #9f1239; }

.skip-link { position: absolute; top: 8px; left: 8px; z-index: 10; padding: 10px 14px; transform: translateY(-150%); color: #fff; background: var(--rose); border-radius: 8px; }
.skip-link:focus { transform: translateY(0); }
.site-header { display: flex; align-items: center; justify-content: space-between; min-height: 68px; padding: 0 clamp(18px,4vw,56px); border-bottom: 1px solid var(--line-soft); background: rgba(12,11,13,.94); }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font-size: 20px; font-weight: 700; letter-spacing: -.035em; text-decoration: none; }
.brand-mark { width: 30px; height: 30px; fill: none; stroke: var(--rose); stroke-width: 2.4; }
.brand-mark circle { fill: var(--rose); stroke: none; }
.header-state { display: inline-flex; align-items: center; gap: 9px; color: var(--muted); font-size: 12px; font-weight: 600; }
.state-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); }
.state-divider { width: 1px; height: 14px; background: var(--line); }
.page-shell { width: min(1240px,calc(100% - 40px)); margin: 0 auto; }
.intro { display: flex; align-items: end; justify-content: space-between; gap: 32px; padding: clamp(34px,5vw,62px) 0 30px; }
.intro-copy { max-width: 690px; }
h1,h2,h3,h4,p { margin-top: 0; }
h1 { max-width: 13ch; margin-bottom: 14px; font-size: clamp(34px,5vw,54px); line-height: 1.08; letter-spacing: -.035em; font-weight: 700; }
.intro-copy p { max-width: 66ch; margin-bottom: 0; color: var(--muted); font-size: 16px; }
.fixture-banner { display: flex; align-items: center; gap: 12px; width: min(360px,100%); padding: 13px 16px; border: 1px solid rgba(244,199,94,.38); border-radius: 12px; color: var(--muted); background: rgba(91,63,13,.18); font-size: 12px; line-height: 1.5; }
.fixture-banner strong { color: var(--amber); font-size: 13px; }
.fixture-symbol { flex: 0 0 26px; width: 26px; height: 26px; padding: 4px; fill: none; stroke: var(--amber); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.workflow { overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: rgba(17,16,18,.96); }
.workflow-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; padding: 28px 30px 22px; }
.field-label { display: block; margin-bottom: 6px; color: var(--muted); font-size: 12px; font-weight: 600; }
.workflow-head h2 { margin-bottom: 0; font-size: 22px; letter-spacing: -.025em; }
.step-count { margin-bottom: 2px; color: var(--muted); font-family: var(--mono); font-size: 12px; white-space: nowrap; }
.step-rail { display: grid; grid-template-columns: repeat(8,minmax(100px,1fr)); overflow-x: auto; padding: 0 22px 18px; border-bottom: 1px solid var(--line-soft); scrollbar-color: #55435c var(--surface); scrollbar-width: thin; }
.step { display: flex; min-height: 58px; align-items: center; gap: 9px; padding: 9px 10px; border: 1px solid transparent; border-radius: 10px; color: var(--faint); background: transparent; cursor: pointer; font-size: 12px; font-weight: 600; text-align: left; white-space: nowrap; }
.step:hover { color: var(--text); background: rgba(255,255,255,.035); }
.step.is-active { color: var(--text); border-color: rgba(225,29,72,.5); background: rgba(225,29,72,.09); }
.step.is-visited .step-number { color: var(--green); border-color: rgba(110,231,183,.52); }
.step-number { display: grid; flex: 0 0 25px; width: 25px; height: 25px; place-items: center; border: 1px solid #514b55; border-radius: 50%; color: var(--muted); font-family: var(--mono); font-size: 12px; }
.step.is-active .step-number { color: white; border-color: var(--rose); background: var(--rose); }
.workspace-grid { display: grid; grid-template-columns: minmax(0,1fr) 270px; gap: 18px; padding: 22px; }
.station-wrap { min-width: 0; }
.station-panel { min-height: 360px; padding: clamp(20px,3vw,32px); border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.station-panel[hidden] { display: none; }
.station-topline { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 16px; }
.station-panel h3 { margin-bottom: 9px; font-size: clamp(23px,3vw,30px); line-height: 1.2; letter-spacing: -.03em; }
.station-lead { max-width: 68ch; margin-bottom: 23px; color: var(--muted); font-size: 14px; }
.status-chip { display: inline-flex; align-items: center; min-height: 25px; padding: 3px 9px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-family: var(--mono); font-size: 11px; line-height: 1.2; white-space: nowrap; }
.status-violet { color: var(--violet); border-color: rgba(167,139,250,.35); background: rgba(124,58,237,.1); }
.status-green { color: var(--green); border-color: rgba(110,231,183,.3); background: rgba(16,100,67,.14); }
.status-amber { color: var(--amber); border-color: rgba(244,199,94,.34); background: rgba(91,63,13,.16); }
.status-muted { color: var(--muted); }
.question-prompt { max-width: 62ch; padding: 18px 0; margin: 0; border-block: 1px solid var(--line-soft); color: var(--text); font-size: clamp(18px,2.2vw,22px); font-weight: 500; line-height: 1.5; }
.inline-note { margin: 14px 0 0; color: var(--faint); font-size: 12px; }
.evidence-list { display: grid; gap: 10px; }
.evidence-row { display: grid; grid-template-columns: minmax(105px,150px) 1fr auto; align-items: start; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--line-soft); }
.evidence-row:first-child { border-top: 1px solid var(--line-soft); }
.evidence-row h4,.target-summary h4,.candidate-box h4 { margin: 0 0 4px; font-size: 14px; }
.evidence-row p,.candidate-box p,.deployment-state p { margin: 0; color: var(--muted); font-size: 12px; }
.record-id { color: var(--violet); font-family: var(--mono); font-size: 12px; overflow-wrap: anywhere; }
.target-summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 0; border-block: 1px solid var(--line-soft); }
.target-summary .field-label { display: block; }
.assessment-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; margin-top: 12px; }
.assessment-row { display: grid; gap: 9px; padding: 15px 0; border-bottom: 1px solid var(--line-soft); color: var(--muted); font-size: 12px; }
.assessment-row strong { color: var(--amber); font-size: 13px; }
.table-scroll { overflow-x: auto; padding: 4px; border: 1px solid var(--line-soft); border-radius: 10px; }
table { width: 100%; min-width: 660px; border-collapse: collapse; background: #111012; font-size: 12px; text-align: left; }
caption { padding: 12px 14px; color: var(--faint); text-align: left; }
th,td { padding: 11px 14px; border-top: 1px solid var(--line-soft); }
th { color: var(--muted); font-family: var(--mono); font-size: 11px; font-weight: 600; text-transform: uppercase; }
td:first-child { color: var(--violet); font-family: var(--mono); }
td:nth-child(4) { color: var(--amber); }
.detail-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0 18px; margin: 0 0 20px; border-top: 1px solid var(--line-soft); }
.detail-list div { display: flex; justify-content: space-between; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line-soft); font-size: 12px; }
.detail-list dt { color: var(--muted); }
.detail-list dd { margin: 0; color: var(--text); text-align: right; }
.action-disabled { min-height: 40px; padding: 0 14px; border: 1px solid #514b55; border-radius: 9px; color: #aaa4ad; background: #242126; cursor: not-allowed; font-size: 12px; font-weight: 600; }
.candidate-box { display: flex; align-items: start; justify-content: space-between; gap: 16px; padding: 18px 0; border-block: 1px solid var(--line-soft); }
.candidate-box .field-label { display: block; }
.prediction-preview { display: grid; justify-items: start; gap: 8px; padding: 18px 0; border-block: 1px solid var(--line-soft); }
.prediction-preview strong { font-size: 16px; }
.prediction-preview p { margin: 0; color: var(--muted); font-size: 12px; }
.prediction-muted { color: var(--amber); }
.prediction-divider { width: 100%; height: 1px; margin: 6px 0; background: var(--line-soft); }
.deployment-state { display: flex; align-items: start; gap: 12px; padding: 17px 0; margin-bottom: 16px; border-block: 1px solid var(--line-soft); }
.deployment-mark { flex: 0 0 10px; width: 10px; height: 10px; margin-top: 5px; border: 1px solid var(--amber); border-radius: 50%; }
.deployment-state strong { display: block; margin-bottom: 4px; font-size: 14px; }
.station-controls { display: flex; justify-content: space-between; gap: 12px; padding: 16px 2px 2px; }
.button-secondary,.button-primary { min-height: 42px; padding: 0 18px; border: 1px solid var(--line); border-radius: 9px; cursor: pointer; font-size: 13px; font-weight: 600; }
.button-secondary { color: var(--text); background: transparent; }
.button-secondary:hover:not(:disabled) { background: var(--surface-raised); }
.button-primary { color: #fff; border-color: var(--rose); background: var(--rose); }
.button-primary:hover:not(:disabled) { background: #be123c; }
.button-secondary:disabled,.button-primary:disabled { color: #aaa4ad; border-color: var(--line-soft); background: #1a181b; cursor: not-allowed; }
.safety-panel { align-self: start; padding: 20px; border: 1px solid rgba(244,199,94,.34); border-radius: 14px; background: rgba(65,48,14,.14); }
.safety-heading { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.safety-heading h2 { margin: 0; font-size: 16px; }
.safety-icon { flex: 0 0 24px; width: 24px; height: 24px; padding: 3px; border: 1px solid rgba(110,231,183,.55); border-radius: 50%; fill: none; stroke: var(--green); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.safety-panel > p { margin-bottom: 16px; color: var(--muted); font-size: 13px; }
.safety-list { display: grid; gap: 11px; padding: 0; margin: 0; list-style: none; }
.safety-list li { display: flex; align-items: center; gap: 9px; color: var(--text); font-size: 12px; }
.check { flex: 0 0 17px; width: 17px; height: 17px; padding: 2px; border: 1px solid rgba(110,231,183,.58); border-radius: 50%; fill: none; stroke: var(--green); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.rail-hint { display: none; padding: 7px 22px 0; margin: 0; color: var(--faint); font-size: 12px; text-align: right; }
.station-panel.is-entering { animation: station-arrive 220ms ease-out both; }
@keyframes station-arrive { from { opacity: .55; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
.safety-footnote { padding-top: 13px; margin: 16px 0 0; border-top: 1px solid rgba(244,199,94,.2); color: var(--amber) !important; font-size: 12px !important; }
.page-footer { display: flex; justify-content: space-between; gap: 14px; padding: 20px 0 28px; color: var(--faint); font-size: 12px; }

@media (max-width: 900px) {
  .intro { align-items: stretch; flex-direction: column; }
  .fixture-banner { width: 100%; }
  .workspace-grid { grid-template-columns: 1fr; }
  .safety-panel { order: -1; }
  .step-rail { grid-template-columns: repeat(8,minmax(112px,1fr)); }
  .rail-hint { display: block; }
}

@media (max-width: 560px) {
  .site-header { min-height: 60px; padding: 0 16px; }
  .header-state { gap: 5px; font-size: 11px; }
  .page-shell { width: min(100% - 24px,1240px); }
  .intro { padding: 30px 0 22px; gap: 20px; }
  h1 { font-size: 34px; }
  .workflow-head { align-items: start; flex-direction: column; padding: 22px 18px 16px; }
  .step-rail { padding: 0 12px 12px; }
  .workspace-grid { padding: 12px; gap: 12px; }
  .station-panel { min-height: 340px; padding: 18px; }
  .station-topline { align-items: start; }
  .evidence-row { grid-template-columns: 1fr; gap: 8px; }
  .target-summary,.candidate-box { align-items: start; flex-direction: column; }
  .assessment-grid,.detail-list { grid-template-columns: 1fr; }
  .page-footer { flex-direction: column; }
}

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