@import url('https://fonts.googleapis.com/css2?family=DM+Mono:wght@400;500&family=Manrope:wght@400;500;600;700;800&display=swap');

:root {
  font-family: 'Manrope', 'Segoe UI', sans-serif;
  color: #e9efea;
  background: #101415;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  --bg: #101415;
  --panel: #191f21;
  --panel-alt: #202729;
  --line: #384144;
  --muted: #adb9b4;
  --text: #e9efea;
  --green: #8bd3a8;
  --cyan: #6dd8d3;
  --red: #ef7f78;
  --amber: #e6bd70;
  --mono: 'DM Mono', 'Consolas', monospace;
}

* { box-sizing: border-box; }
html { min-width: 320px; scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; background: var(--bg); }
button, input, select { font: inherit; }
button, select, input { accent-color: var(--cyan); }
button:focus-visible, select:focus-visible, input:focus-visible, summary:focus-visible, a:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }
a { color: inherit; text-decoration: none; }

.topbar { min-height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 4.2vw; border-bottom: 1px solid var(--line); background: var(--panel); }
.brand { display: inline-flex; gap: 11px; align-items: center; min-width: 224px; }
.brand-mark { width: 31px; height: 31px; display: grid; place-items: center; border: 1px solid var(--cyan); border-radius: 50%; color: var(--cyan); font-size: 15px; font-weight: 800; }
.brand-copy { display: grid; gap: 1px; }
.brand-copy strong { font-size: 13px; font-weight: 800; }
.brand-copy span, .product-label, .synthetic-tag, .version-label, .eyebrow, .panel-index, .network-toolbar, .range-scale, .comparison-kicker, .operator-signoff, .evidence-footer strong { font-family: var(--mono); letter-spacing: 0; }
.brand-copy span { color: #899994; font-size: 9px; }
.product-label { color: #c5d1cb; font-size: 10px; display: flex; align-items: center; gap: 9px; }
.status-light, .state-marker, .signoff-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 12px #8bd3a866; }
.topbar-right { min-width: 224px; display: flex; align-items: center; justify-content: flex-end; gap: 15px; }
.synthetic-tag { padding: 6px 8px; color: #e4c47d; border: 1px solid #645638; background: #28271d; font-size: 9px; }
.version-label { color: #7f8d88; font-size: 9px; }
.page-shell { max-width: 1600px; margin: 0 auto; padding: 27px 4.2vw 32px; }
.intro-row { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 22px; }
.eyebrow { margin: 0 0 8px; color: #8da49b; font-size: 9px; line-height: 1.35; }
.eyebrow span { color: #536261; padding: 0 3px; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 7px; font-size: 27px; line-height: 1.2; font-weight: 700; }
.intro-copy { margin: 0; color: #a7b3ae; font-size: 12px; }
.scenario-state { display: inline-flex; gap: 9px; align-items: center; padding: 8px 11px; border: 1px solid var(--line); background: var(--panel); color: var(--muted); font: 11px var(--mono); }
.state-marker { flex: 0 0 7px; }
.scenario-state.is-warning .state-marker { background: var(--amber); box-shadow: none; }
.scenario-state.is-error .state-marker { background: var(--red); box-shadow: 0 0 12px #ef7f7866; }
.workspace-grid { display: grid; grid-template-columns: 288px minmax(0, 1fr); gap: 20px; align-items: start; }
.control-panel { position: sticky; top: 14px; min-width: 0; background: var(--panel); border: 1px solid var(--line); padding: 17px 16px 15px; }
.panel-heading, .section-heading { display: flex; justify-content: space-between; align-items: end; gap: 14px; }
.panel-heading { align-items: center; padding-bottom: 14px; border-bottom: 1px solid #344041; margin-bottom: 17px; }
h2 { margin: 0; font-size: 16px; line-height: 1.35; font-weight: 700; }
.panel-index { color: #82938d; font-size: 9px; }
.field-label { display: block; margin-bottom: 7px; color: #d2ddd6; font-size: 11px; font-weight: 700; }
select { width: 100%; min-width: 0; min-height: 42px; padding: 0 32px 0 10px; color: var(--text); background: var(--bg); border: 1px solid #52605d; border-radius: 2px; font-size: 12px; }
.field-hint { min-height: 29px; margin: 7px 0 20px; color: #899a94; font-size: 10px; line-height: 1.5; }
.range-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.range-heading output { color: var(--cyan); font: 9px var(--mono); text-align: right; }
input[type="range"] { display: block; width: 100%; height: 18px; margin: 1px 0 2px; cursor: pointer; }
.range-scale { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px; color: var(--muted); font-size: 11px; }
#commit-state { flex-basis: 100%; order: 1; }
#commit-state { color: #a9b9b1; text-align: center; }
.switch-row { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 55px; border-bottom: 1px solid #303c3c; cursor: pointer; }
.switch-row:first-of-type { margin-top: 15px; }
.switch-row strong, .switch-row small { display: block; }
.switch-row strong { color: #d7e0da; font-size: 10px; }
.switch-row small { margin-top: 3px; color: #83918c; font-size: 9px; line-height: 1.35; }
.switch-row input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.switch { flex: 0 0 auto; width: 31px; height: 17px; padding: 2px; background: #394545; border: 1px solid #596562; transition: background .15s ease; }
.switch::after { display: block; width: 11px; height: 11px; content: ''; background: #8b9993; transition: transform .15s ease, background .15s ease; }
.switch-row input:checked + .switch { background: #276765; border-color: #5cbcb5; }
.switch-row input:checked + .switch::after { transform: translateX(13px); background: #e8fffb; }
.switch-row input:focus-visible + .switch { outline: 2px solid var(--cyan); outline-offset: 3px; }
.control-actions { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; margin-top: 17px; }
.button { display: inline-flex; justify-content: center; align-items: center; gap: 8px; min-height: 38px; padding: 0 10px; border-radius: 2px; cursor: pointer; font-size: 10px; font-weight: 700; transition: background .15s ease, border-color .15s ease; }
.button:disabled { opacity: .55; cursor: progress; }
.button-primary { border: 1px solid #5cbcb5; color: #101a1a; background: var(--cyan); }
.button-primary:hover:not(:disabled) { background: #9aebe5; }
.button-primary span { font-size: 14px; }
.button-quiet { border: 1px solid #465251; color: #b8c3bd; background: transparent; }
.button-quiet:hover { border-color: #8b9993; background: #253031; }
.button-quiet span { font-size: 15px; }
.control-footnote { display: flex; gap: 9px; margin-top: 16px; align-items: stretch; }
.footnote-rule { flex: 0 0 2px; background: var(--amber); }
.control-footnote p { margin: 0; color: #a0aca6; font-size: 9px; line-height: 1.5; }
.main-column { min-width: 0; }
.mission-section, .timeline-section, .comparison-section, .verification-section, .operator-panel { min-width: 0; }
.mission-section { margin-bottom: 19px; }
.section-heading { margin-bottom: 10px; }
.section-heading h2 { font-size: 17px; }
.metric-strip { display: flex; gap: 19px; align-items: end; }
.metric { display: grid; gap: 4px; text-align: right; }
.metric span { color: #7f9089; font: 8px var(--mono); }
.metric strong { color: #e3ece5; font: 13px var(--mono); }
.network-frame { overflow: hidden; border: 1px solid var(--line); background: var(--panel); }
.network-toolbar { display: flex; justify-content: space-between; gap: 12px; min-height: 32px; align-items: center; padding: 0 12px; border-bottom: 1px solid #313e3e; color: #82948d; font-size: 8px; }
#network-status { color: #acb9b2; text-align: right; }
.network-scroll { overflow-x: auto; scrollbar-color: #526260 var(--panel); }
#mission-network { display: block; width: 100%; min-width: 760px; height: auto; }
.grid-row { stroke: #2b3839; stroke-width: 1; }
.grid-col { stroke: #253132; stroke-width: 1; stroke-dasharray: 2 5; }
.axis-text { fill: #80918a; font: 9px var(--mono); }
.row-label { fill: #bdc9c2; font: 10px var(--mono); }
.row-label-depot { fill: var(--amber); }
.network-edge { fill: none; stroke: #586663; stroke-width: 2; opacity: .46; }
.network-edge.executed { stroke: var(--green); stroke-width: 4; opacity: .95; }
.network-edge.committed { stroke: var(--amber); stroke-width: 3; opacity: .92; stroke-dasharray: 5 3; }
.network-edge.invalidated { stroke: var(--red); stroke-width: 3; opacity: .98; stroke-dasharray: 5 4; }
.network-edge.repaired { stroke: var(--cyan); stroke-width: 3.5; opacity: .97; }
.network-edge.optimum { stroke: var(--amber); stroke-width: 2.5; opacity: .85; stroke-dasharray: 5 4; }
.network-edge.faded { opacity: .2; }
.network-node { fill: var(--panel); stroke: #87958f; stroke-width: 1.5; }
.network-node.executed { fill: var(--green); stroke: #c7f5d3; }
.network-node.repaired { fill: var(--cyan); stroke: #c2fff7; }
.network-node.invalidated { fill: var(--red); stroke: #ffd0c9; }
.closed-cross { stroke: var(--red); stroke-width: 2.5; }
.legend { display: flex; flex-wrap: wrap; gap: 14px; padding: 10px 12px; border-top: 1px solid #303c3d; color: #9aa7a1; font-size: 9px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend-swatch { width: 14px; height: 3px; display: inline-block; background: #909e98; }
.legend-swatch.executed { background: var(--green); }
.legend-swatch.committed { height: 0; border-top: 3px dashed var(--amber); background: transparent; }
.legend-swatch.invalidated { background: var(--red); }
.legend-swatch.repaired { background: var(--cyan); }
.legend-swatch.optimum { background: var(--amber); }
.table-alt { margin-top: 6px; color: #9eaaa4; font-size: 10px; }
summary { cursor: pointer; }
.table-alt summary, .verification-section summary { padding: 8px 0; color: #aebbb4; font-size: 10px; }
.timeline-section { padding-top: 16px; border-top: 1px solid #344141; margin-bottom: 21px; }
.compact-heading { margin-bottom: 9px; align-items: center; }
.section-note { color: #8b9993; font: 9px var(--mono); text-align: right; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; font-size: 10px; }
thead { color: #899891; font: 8px var(--mono); text-transform: uppercase; }
th { padding: 8px 9px; white-space: nowrap; border-bottom: 1px solid #40504f; }
td { padding: 9px; border-bottom: 1px solid #293637; color: #cbd5ce; white-space: nowrap; }
tbody tr:last-child td { border-bottom-color: #40504f; }
tbody tr.row-executed td:first-child { color: var(--green); }
tbody tr.row-invalidated td { color: #efaaa3; }
.numeric { text-align: right; font-family: var(--mono); }
.state-pill { display: inline-block; padding: 4px 6px; border: 1px solid #465250; color: #c1cbc5; font: 8px var(--mono); }
.state-pill.executed { border-color: #48795b; color: var(--green); }
.state-pill.committed { border-color: #806c42; color: var(--amber); }
.state-pill.invalidated { border-color: #8d4b49; color: var(--red); }
.state-pill.repaired { border-color: #397d78; color: var(--cyan); }
.state-pill.uncommitted { color: #a7b3ad; }
.comparison-section { border-top: 1px solid #344141; padding-top: 16px; margin-bottom: 20px; }
.comparison-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--line); background: var(--panel); }
.comparison-column { min-height: 144px; padding: 13px; border-right: 1px solid #354141; }
.comparison-column:last-child { border-right: 0; }
.comparison-original { border-top: 2px solid #88958f; }
.comparison-exact { border-top: 2px solid var(--amber); }
.comparison-repair { border-top: 2px solid var(--cyan); }
.comparison-kicker { margin: 0 0 7px; color: #84938c; font-size: 8px; }
.comparison-column h3 { margin-bottom: 9px; font-size: 12px; }
.comparison-empty { margin-bottom: 0; color: #899891; font-size: 9px; line-height: 1.55; }
.comparison-status { display: inline-flex; gap: 6px; align-items: center; margin: 0 0 8px; font: 9px var(--mono); }
.comparison-status.pass { color: var(--green); }
.comparison-status.fail { color: var(--red); }
.comparison-status.none { color: var(--amber); }
.comparison-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 10px; margin: 0; }
.comparison-stats div { min-width: 0; }
.comparison-stats dt { color: #81908a; font: 8px var(--mono); }
.comparison-stats dd { margin: 3px 0 0; overflow-wrap: anywhere; color: #dce5df; font: 11px var(--mono); }
.comparison-detail { margin: 9px 0 0; color: #9aa7a0; font-size: 9px; line-height: 1.45; }
.review-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(240px, .85fr); gap: 13px; border-top: 1px solid #344141; padding-top: 16px; }
.verification-section { border-right: 1px solid #334141; padding-right: 14px; }
.verification-badge { padding: 5px 7px; border: 1px solid #667672; color: #d0d9d2; font: 8px var(--mono); }
.verification-badge.pass { border-color: #48795b; color: var(--green); }
.verification-badge.fail { border-color: #8d4b49; color: var(--red); }
.verification-badge.warning { border-color: #806c42; color: var(--amber); background: #29251c; }
.verification-summary { margin: 3px 0 0; color: #a1ada7; font-size: 10px; }
.check-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 12px; margin: 0; padding: 0; list-style: none; }
.check-list li { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 7px; padding: 7px 0; border-bottom: 1px solid #2d3a3a; }
.check-status { font: 8px var(--mono); }
.check-status.pass { color: var(--green); }
.check-status.fail { color: var(--red); }
.check-copy strong, .check-copy small { display: block; }
.check-copy strong { color: #cfd8d1; font-size: 9px; font-weight: 600; }
.check-copy small { margin-top: 3px; color: #84938c; font-size: 8px; line-height: 1.45; }
.empty-check { display: block !important; grid-column: 1 / -1; color: #8e9b95; font-size: 9px; }
.drill-note { margin-top: 10px; padding: 8px; border-left: 2px solid var(--amber); background: #28251d; color: #ddc88e; font-size: 9px; line-height: 1.5; }
.drill-note[hidden] { display: none; }
.operator-panel { min-height: 166px; padding: 13px; background: var(--panel); border: 1px solid var(--line); border-left: 2px solid var(--amber); }
.operator-panel h2 { margin-bottom: 10px; font-size: 14px; }
.recommendation { margin-bottom: 8px; color: #f0d796; font-size: 12px; font-weight: 700; line-height: 1.45; }
.explanation { margin-bottom: 15px; color: #aab6af; font-size: 9px; line-height: 1.55; }
.operator-signoff { display: flex; align-items: center; gap: 7px; padding-top: 9px; border-top: 1px solid #3a4644; color: #9ca9a2; font-size: 8px; }
.operator-signoff .signoff-dot { width: 6px; height: 6px; background: var(--amber); box-shadow: none; }
.evidence-footer { margin-top: 25px; padding: 17px 18px; border-top: 1px solid var(--line); background: var(--panel); }
.evidence-head { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding-bottom: 13px; border-bottom: 1px solid #344141; }
.evidence-head h2 { font-size: 13px; }
.evidence-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; padding-top: 14px; }
.evidence-grid p { margin: 0; }
.evidence-footer strong { display: block; margin-bottom: 6px; color: #d1dcd4; font-size: 8px; }
.evidence-grid span { display: block; color: #899891; font-size: 9px; line-height: 1.5; }
.loading { opacity: .68; }

.brand-copy span, .product-label, .synthetic-tag, .version-label, .eyebrow,
.panel-index, .range-heading output, .section-note, .metric span,
.network-toolbar, .axis-text, .row-label, .legend, thead, .state-pill,
.comparison-kicker, .comparison-status, .comparison-stats dt,
.verification-badge, .check-status, .check-copy strong, .check-copy small,
.operator-signoff, .evidence-footer strong { font-size: 11px; }
.field-label, .field-hint, .switch-row strong, .switch-row small, .button,
.control-footnote p, .table-alt, .table-alt summary, .verification-section summary,
table, .comparison-empty, .comparison-detail, .verification-summary,
.empty-check, .drill-note, .explanation, .evidence-grid span { font-size: 12px; line-height: 1.55; }
.comparison-column h3 { font-size: 13px; line-height: 1.4; }
.brand-copy span, .version-label, .eyebrow, .panel-index, .field-hint,
.switch-row small, .metric span, .network-toolbar, .axis-text,
.comparison-kicker, .comparison-empty, .comparison-stats dt,
.check-copy small, .evidence-grid span { color: var(--muted); }
.axis-text { fill: var(--muted); }
.intro-row > *, .section-heading > *, .panel-heading > *, .evidence-head > *,
.range-heading > *, .switch-row > span:first-child, .comparison-column,
.check-copy, .evidence-grid > * { min-width: 0; }
.intro-copy, .scenario-state, .switch-row strong, .switch-row small,
.comparison-column, .check-copy, .section-note, .operator-panel,
.evidence-footer, .control-footnote p { overflow-wrap: anywhere; }
.section-heading, .network-toolbar, .evidence-head { flex-wrap: wrap; }
.network-toolbar { padding-top: 8px; padding-bottom: 8px; }
.button { padding: 8px 10px; }
.metric-strip { flex-wrap: wrap; }
.scenario-cue { margin: 14px 0 0; padding-top: 12px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; line-height: 1.55; }
.scenario-cue strong { color: var(--cyan); }

@media (min-width: 1500px) {
  .page-shell { padding-top: 34px; }
  .workspace-grid { grid-template-columns: 288px minmax(0, 1fr); gap: 24px; }
}
@media (max-width: 1020px) {
  .workspace-grid { grid-template-columns: 268px minmax(0, 1fr); gap: 14px; }
  .page-shell { padding-right: 2.5vw; padding-left: 2.5vw; }
  .metric-strip { gap: 11px; }
  .comparison-column { padding: 10px; }
  .review-grid { grid-template-columns: 1fr; }
  .verification-section { border-right: 0; padding-right: 0; }
  .comparison-grid { grid-template-columns: 1fr; }
  .comparison-column { min-height: 0; border-right: 0; border-bottom: 1px solid var(--line); }
  .comparison-column:last-child { border-bottom: 0; }
}
@media (max-width: 760px) {
  .topbar { min-height: 58px; padding: 0 16px; }
  .brand { min-width: 0; }
  .product-label { display: none; }
  .topbar-right { min-width: 0; }
  .version-label { display: none; }
  .page-shell { padding: 22px 14px 24px; }
  .intro-row { align-items: start; flex-direction: column; gap: 13px; }
  h1 { font-size: 24px; }
  .scenario-state { white-space: normal; }
  .workspace-grid { grid-template-columns: 1fr; }
  .control-panel { position: static; }
  .control-panel form { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 14px; }
  .control-panel form > .field-label, .control-panel form > select, .control-panel form > .field-hint, .control-panel form > .range-heading, .control-panel form > input[type="range"], .control-panel form > .range-scale { grid-column: 1 / -1; }
  .switch-row { min-height: 62px; }
  .switch-row:first-of-type { margin-top: 7px; }
  .control-actions { grid-column: 1 / -1; }
  .control-footnote { margin-top: 12px; }
  .section-heading { align-items: start; }
  .metric-strip { gap: 10px; }
  .metric span { font-size: 11px; }
  .metric strong { font-size: 11px; }
  .comparison-grid { grid-template-columns: 1fr; }
  .comparison-column { min-height: 0; border-right: 0; border-bottom: 1px solid #354141; }
  .comparison-column:last-child { border-bottom: 0; }
  .review-grid { grid-template-columns: 1fr; }
  .verification-section { border-right: 0; border-bottom: 1px solid #334141; padding: 0 0 14px; }
  .check-list { grid-template-columns: 1fr; }
  .evidence-grid { grid-template-columns: 1fr 1fr; gap: 13px; }
}
@media (max-width: 420px) {
  .topbar { padding: 0 12px; }
  .brand-copy strong { font-size: 12px; }
  .synthetic-tag { padding: 5px 6px; font-size: 11px; }
  .page-shell { padding-right: 11px; padding-left: 11px; }
  .control-panel { padding: 14px 12px; }
  .section-heading { gap: 8px; }
  .metric-strip { gap: 7px; }
  .metric strong { font-size: 11px; }
  .metric span { font-size: 11px; }
  .network-toolbar { font-size: 11px; }
  .legend { gap: 9px; font-size: 11px; }
  .control-panel form { grid-template-columns: minmax(0, 1fr); }
  .switch-row { grid-column: 1 / -1; }
  .evidence-footer { padding: 14px 12px; }
  .evidence-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}