:root {
  color-scheme: light;
  --bg: #f5f6f4;
  --paper: #fff;
  --ink: #1e3039;
  --muted: #5b6c74;
  --line: #e0e6e5;
  --subtle: #f7f9f8;
  --accent: #a7482f;
  --blue: #2c608e;
  --green: #20654d;
  --hold: #805b1d;
  --red: #9b412c;
  --radius: 12px;
  --ease-out: cubic-bezier(.23, 1, .32, 1);
  font: 15px/1.5 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg);
  font-variant-numeric: tabular-nums;
}
* { box-sizing: border-box; }
body { margin: 0; }
::selection { color: #153a53; background: #dceaf5; }
button, select, input { font: inherit; }
button, a, select, input, summary { -webkit-tap-highlight-color: transparent; }
button, select, summary { cursor: pointer; }
button { color: inherit; }
button:disabled, select:disabled, input:disabled { cursor: default; }
button:focus-visible, a:focus-visible, select:focus-visible, input:focus-visible, summary:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 4px;
}
a { color: inherit; text-underline-offset: 4px; }
h1, h2, h3, p { margin: 0; }
h2 { font-size: 16px; font-weight: 650; letter-spacing: -.02em; }
h3 { font-size: 13px; font-weight: 600; }
code, .mono { font: 12px/1.5 ui-monospace, SFMono-Regular, Consolas, monospace; }
.wrap { max-width: 1280px; margin-inline: auto; padding-inline: 40px; }
.muted { color: var(--muted); font-size: 13px; line-height: 1.65; }
.icon { width: 17px; height: 17px; flex: none; }
.site-header { height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--line); }
.wordmark { display: inline-flex; align-items: center; gap: 10px; font-size: 16px; font-weight: 650; letter-spacing: -.03em; text-decoration: none; }
.mark { width: 25px; height: 25px; color: var(--accent); }
.site-header nav { display: flex; gap: 24px; align-items: center; font-size: 13px; }
.site-header nav a { display: inline-flex; gap: 6px; align-items: center; text-decoration: none; min-height: 44px; }
.synthetic { font-size: 11px; color: #435d50; background: #e9efea; border-radius: 5px; padding: 5px 9px; }
.intro { padding: 30px 0 27px; }
h1 { font-size: 34px; font-weight: 600; letter-spacing: -.04em; line-height: 1.2; text-wrap: balance; }
.lede { margin-top: 12px; color: var(--muted); max-width: 78ch; font-size: 14px; line-height: 1.65; }
.workspace { background: var(--paper); border: 1px solid #d4dddc; border-radius: var(--radius); }
.workspace-bar { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 16px 24px; border-bottom: 1px solid var(--line); }
.workspace-bar > div { display: flex; align-items: center; gap: 9px; font-size: 12px; color: var(--muted); }
.status-dot { width: 6px; height: 6px; flex: none; background: #7d8c93; border-radius: 50%; }
.status-dot.ready { background: var(--green); }
.workspace-bar label { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 12px; }
select { min-height: 44px; padding: 8px 30px 8px 12px; background: white; color: var(--ink); border: 1px solid #cdd8d7; border-radius: 7px; font: 12px ui-monospace, monospace; }
.actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; padding: 20px 24px; }
.actions button { display: flex; gap: 12px; align-items: center; min-height: 56px; padding: 13px 15px; border: 1px solid var(--line); border-radius: 9px; background: var(--subtle); text-align: left; color: var(--muted); }
.action-index { display: grid; place-items: center; width: 26px; height: 26px; flex: none; border: 1px solid #d3dcda; border-radius: 50%; font-size: 12px; }
.action-index svg { width: 15px; height: 15px; }
.actions strong { display: block; font-size: 14px; font-weight: 600; }
.actions button[data-state="ready"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.actions button[data-state="ready"] .action-index { color: #fff; border-color: #7d9099; }
.actions button[data-state="complete"] { color: var(--green); background: #f0f6f2; border-color: #d9e6dd; }
.actions button[data-state="complete"] .action-index { border-color: #c3d8cb; background: #e4eee7; }
.actions button[data-state="history"] { background: var(--subtle); color: var(--muted); }
.review-grid, .history-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(320px, 1fr); border-top: 1px solid var(--line); }
.review-grid > *, .history-grid > * { min-width: 0; }
.measurement, .decision, .history, .impact { padding: 24px; }
.decision { background: #fafbf9; border-left: 1px solid var(--line); }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 12px; }
.section-head > .mono { color: var(--muted); font-size: 11px; }
.chart { margin-top: 20px; min-height: 230px; display: grid; align-items: center; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart-empty { padding: 70px 20px; background: var(--subtle); color: var(--muted); font-size: 13px; text-align: center; border-radius: 8px; }
.legend { display: flex; gap: 24px; margin: 4px 0 14px 42px; color: var(--muted); font-size: 11px; }
.legend span { display: inline-flex; align-items: center; gap: 8px; }
.legend i { width: 20px; border-top: 2px solid var(--blue); }
.legend .floor-line { border-top: 2px dashed var(--accent); }
.numeric-data { margin: 10px 0; color: var(--muted); font-size: 12px; }
summary { min-height: 44px; align-content: center; }
.numeric-data summary { width: fit-content; }
.numeric-data table { width: 100%; border-collapse: collapse; text-align: right; font: 12px ui-monospace, monospace; margin-top: 12px; }
.numeric-data caption { font: 12px system-ui, sans-serif; text-align: left; padding-bottom: 12px; }
.numeric-data th, .numeric-data td { border-bottom: 1px solid var(--line); padding: 8px 5px; }
.numeric-data th { font-weight: 500; }
.provenance { margin-top: 12px; border-top: 1px solid var(--line); }
.provenance > summary { padding-block: 14px; font-size: 13px; font-weight: 600; }
.sources { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; padding-top: 4px; }
.source { min-width: 0; padding-block: 10px; }
.source > a { display: inline-flex; align-items: center; min-height: 44px; color: var(--blue); font: 12px ui-monospace, monospace; }
.source p { margin-top: 10px; font-size: 12px; line-height: 1.9; }
.source p > span { color: var(--muted); margin-right: 6px; }
.source-meta { margin-top: 6px; color: var(--muted); }
.source-meta summary { font-size: 11px; min-height: 44px; }
.source-meta summary code { font-size: 10px; margin-left: 6px; }
.source-meta > code { display: block; overflow-wrap: anywhere; font-size: 11px; padding: 8px 0; }
.source-note { margin-top: 10px; color: var(--muted); font-size: 11px; }
.verdict { display: flex; align-items: center; gap: 12px; padding: 16px; border-radius: 9px; background: #eaf3ed; color: var(--green); margin: 20px 0 14px; }
.verdict[data-kind="hold"] { background: #f7f0df; color: var(--hold); }
.verdict[data-kind="abstain"] { background: #f8eee8; color: var(--red); }
.verdict-icon { width: 23px; height: 23px; flex: none; }
.verdict-icon svg { width: 100%; height: 100%; }
.verdict > div { min-width: 0; }
#verdict-label { display: block; font-size: 23px; font-weight: 600; letter-spacing: -.03em; line-height: 1.3; }
.verdict code { display: block; font-size: 10px; margin-top: 4px; overflow-wrap: anywhere; }
.explanation { font-size: 13px; line-height: 1.75; }
.rule { margin: 12px 0 22px; font-size: 11px; color: var(--muted); }
.rule code { font-size: 11px; }
.evidence { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 10px 0 22px; }
.evidence li { font: 11px ui-monospace, monospace; padding: 5px 7px; background: #eef1ee; border-radius: 4px; }
.record { padding: 15px 0; border-top: 1px solid var(--line); }
.record-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.record-label { display: block; color: var(--muted); font-size: 12px; }
.record-status { font-size: 10px; color: var(--muted); background: #e9eeea; border-radius: 4px; padding: 2px 6px; }
.record strong { display: block; font-size: 17px; font-weight: 600; letter-spacing: -.02em; margin: 6px 0; }
.record small { display: block; color: var(--muted); font-size: 11px; line-height: 1.75; }
.impact { border-left: 1px solid var(--line); }
.text-button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 44px; padding: 8px 0; background: transparent; color: var(--blue); font-size: 12px; border: 0; }
.text-button:disabled { color: var(--muted); }
.range-label { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 12px; margin-top: 18px; }
.range-label output { font: 12px ui-monospace, monospace; color: var(--ink); }
input[type="range"] { display: block; width: 100%; height: 24px; margin: 16px 0 10px; accent-color: var(--blue); cursor: ew-resize; }
.events { position: relative; display: flex; justify-content: safe center; overflow-x: auto; gap: 0; margin-top: 16px; padding: 5px 3px 12px; scrollbar-width: thin; scrollbar-color: #a9b9ba transparent; }
.event { flex: 0 0 44px; width: 44px; height: 88px; padding: 0 5px; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 10px; background: transparent; border: 0; border-radius: 6px; }
.event-tick { display: block; width: 4px; height: 18px; border-radius: 3px; background: #8f9fa5; }
.event[data-distance="0"] .event-tick { height: 54px; background: var(--accent); }
.event[data-distance="1"] .event-tick { height: 44px; }
.event[data-distance="2"] .event-tick { height: 33px; }
.event[data-distance="3"] .event-tick { height: 24px; }
.event.future .event-tick { background: #c5cfd1; }
.event small { color: var(--muted); font: 10px ui-monospace, monospace; }
.event[aria-current="true"] small { color: var(--accent); font-weight: 700; }
.revision-navigation { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 18px; }
.icon-button { display: grid; place-items: center; width: 44px; height: 44px; flex: none; padding: 11px; border: 1px solid var(--line); border-radius: 9px; background: var(--paper); color: var(--ink); }
.icon-button svg { width: 20px; height: 20px; }
.icon-button:disabled { color: #788990; background: var(--subtle); }
.event-preview { text-align: center; min-width: 0; }
.event-preview strong { display: block; font-size: 13px; font-weight: 600; }
.event-preview code { display: block; margin-top: 4px; color: var(--muted); font-size: 11px; }
summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; list-style: none; }
summary::-webkit-details-marker { display: none; }
.disclosure-icon { display: inline-flex; width: 18px; height: 18px; color: var(--muted); flex: none; margin-left: auto; }
.disclosure-icon svg { width: 100%; height: 100%; }
details[open] > summary .disclosure-vertical { visibility: hidden; }
.numeric-data summary { width: 100%; border-bottom: 1px solid var(--line); }
.provenance { margin-top: 0; border-top: 0; }
.decision-details > summary { border-bottom: 1px solid var(--line); }
.impact-count { display: inline-grid; place-items: center; min-width: 30px; height: 30px; padding-inline: 7px; border-radius: 7px; background: #f6eee7; color: var(--red); font: 15px ui-monospace, monospace; }
.impacts { margin: 20px 0; min-height: 98px; }
.empty { color: var(--muted); font-size: 13px; line-height: 1.7; padding-block: 8px; max-width: 34ch; }
.impact-row { padding: 12px 0; border-bottom: 1px solid var(--line); }
.impact-row:first-child { padding-top: 0; }
.impact-row strong { display: block; font: 12px ui-monospace, monospace; }
.impact-row p { font-size: 12px; color: var(--muted); margin-top: 6px; }
.impact-row code { font-size: 11px; }
.stats { display: flex; gap: 18px; border-top: 1px solid var(--line); padding-top: 16px; }
.stats > div { flex: 1; min-width: 0; }
.stats strong { display: block; font: 20px ui-monospace, monospace; }
.stats span { display: block; margin-top: 5px; color: var(--muted); font-size: 11px; }
.workspace-footer { display: flex; align-items: center; justify-content: flex-end; gap: 20px; padding: 8px 24px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.site-footer { display: flex; justify-content: space-between; gap: 24px; padding-block: 20px 28px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.error { color: var(--red); background: #f8eee8; border-radius: 8px; padding: 18px; margin: 20px 24px; font-size: 13px; }
.skip-link { position: absolute; top: -100px; left: 20px; z-index: 100; background: white; padding: 12px; }
.skip-link:focus { top: 15px; }
.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; }
[hidden] { display: none !important; }
@media (hover: hover) and (pointer: fine) {
  .site-header nav a:hover, .text-button:not(:disabled):hover { text-decoration: underline; }
  select:hover { border-color: #9bafb4; }
  .actions button[data-state="ready"]:hover { background: #334c58; border-color: #334c58; }
  .event:hover, .icon-button:not(:disabled):hover { background: #f0f3f3; }
  summary:hover { color: var(--ink); }
}
@media (prefers-reduced-motion: no-preference) {
  button { transition: transform 120ms var(--ease-out); }
  .text-button, .event { transition: background-color 160ms var(--ease-out), border-color 160ms var(--ease-out), transform 120ms var(--ease-out); }
  button:active:not(:disabled):not(:focus-visible) { transform: scale(.985); }
}
@media (max-width: 1000px) {
  .wrap { padding-inline: 24px; }
  h1 { font-size: 30px; }
  .review-grid, .history-grid { grid-template-columns: minmax(0, 1.2fr) minmax(290px, 1fr); }
  .measurement, .decision, .history, .impact { padding: 20px; }
  .actions { gap: 8px; padding-inline: 20px; }
  .actions button { gap: 9px; padding: 12px 10px; }
  .actions strong { font-size: 12px; }
  .sources { grid-template-columns: 1fr; gap: 10px; }
  .legend { margin-left: 0; gap: 16px; }
}
@media (max-width: 720px) {
  .wrap { padding-inline: 16px; }
  .site-header { height: 66px; }
  .wordmark { gap: 7px; font-size: 14px; }
  .mark { width: 22px; height: 22px; }
  .site-header nav { gap: 14px; font-size: 12px; }
  .intro { padding: 24px 0; }
  h1 { font-size: 28px; max-width: 23ch; }
  .lede { font-size: 13px; }
  .review-grid, .history-grid { grid-template-columns: minmax(0, 1fr); }
  .decision, .impact { border-left: 0; border-top: 1px solid var(--line); }
  .workspace-bar { padding: 13px 16px; gap: 12px; flex-wrap: wrap; }
  .workspace-bar > div { font-size: 11px; }
  .workspace-bar label { font-size: 11px; }
  .actions { padding: 16px; gap: 8px; }
  .actions button { flex-direction: column; align-items: flex-start; gap: 9px; min-height: 88px; padding: 12px 10px; }
  .actions strong { font-size: 12px; line-height: 1.5; }
  .action-index { width: 23px; height: 23px; font-size: 11px; }
  .measurement, .decision, .history, .impact { padding: 20px 16px; }
  .section-head { gap: 10px; }
  .section-head h2 { font-size: 15px; }
  .section-head > .mono { font-size: 10px; }
  .chart { margin-top: 18px; min-height: 220px; }
  .legend { font-size: 10px; gap: 16px; flex-wrap: wrap; }
  .sources { grid-template-columns: 1fr 1fr; gap: 16px; }
  .workspace-footer { flex-direction: column; align-items: flex-start; gap: 1px; padding: 8px 16px; }
  .site-footer { flex-direction: column; gap: 8px; }
}
@media (max-width: 400px) {
  .site-header nav { gap: 10px; }
  .synthetic { font-size: 10px; padding: 4px 6px; }
  .site-header nav a { font-size: 11px; gap: 3px; }
  .site-header nav .icon { width: 13px; height: 13px; }
  .workspace-bar label { width: 100%; justify-content: space-between; }
  .sources { grid-template-columns: 1fr; }
}

.decision-details { margin: 16px 0; font-size: 12px; color: var(--muted); }
.decision-details .rule { margin: 8px 0; }
.record small:empty { display: none; }
.provenance #measurement-context { margin: 10px 0; font-size: 12px; }

/* Independent vanilla adaptation of Dot Matrix's Core Spiral design.
   Source and scope: docs/dotmatrix.md. */
.load-indicator { display: inline-grid; place-items: center; width: 18px; height: 18px; flex: none; }
.dotmatrix { display: grid; grid-template-columns: repeat(5, 2px); grid-template-rows: repeat(5, 2px); gap: 1.5px; color: var(--blue); }
.dotmatrix i { display: block; width: 2px; height: 2px; border-radius: 50%; background: currentColor; opacity: .16; animation: core-spiral 1500ms linear infinite; }
@keyframes core-spiral {
  0%, 5% { opacity: 1; }
  17% { opacity: .5; }
  30%, 100% { opacity: .16; }
}
.dotmatrix i:nth-child(1) { animation-delay: -0ms; }
.dotmatrix i:nth-child(2) { animation-delay: -60ms; }
.dotmatrix i:nth-child(3) { animation-delay: -120ms; }
.dotmatrix i:nth-child(4) { animation-delay: -180ms; }
.dotmatrix i:nth-child(5) { animation-delay: -240ms; }
.dotmatrix i:nth-child(6) { animation-delay: -900ms; }
.dotmatrix i:nth-child(7) { animation-delay: -960ms; }
.dotmatrix i:nth-child(8) { animation-delay: -1020ms; }
.dotmatrix i:nth-child(9) { animation-delay: -1080ms; }
.dotmatrix i:nth-child(10) { animation-delay: -300ms; }
.dotmatrix i:nth-child(11) { animation-delay: -840ms; }
.dotmatrix i:nth-child(12) { animation-delay: -1380ms; }
.dotmatrix i:nth-child(13) { animation-delay: -1440ms; }
.dotmatrix i:nth-child(14) { animation-delay: -1140ms; }
.dotmatrix i:nth-child(15) { animation-delay: -360ms; }
.dotmatrix i:nth-child(16) { animation-delay: -780ms; }
.dotmatrix i:nth-child(17) { animation-delay: -1320ms; }
.dotmatrix i:nth-child(18) { animation-delay: -1260ms; }
.dotmatrix i:nth-child(19) { animation-delay: -1200ms; }
.dotmatrix i:nth-child(20) { animation-delay: -420ms; }
.dotmatrix i:nth-child(21) { animation-delay: -720ms; }
.dotmatrix i:nth-child(22) { animation-delay: -660ms; }
.dotmatrix i:nth-child(23) { animation-delay: -600ms; }
.dotmatrix i:nth-child(24) { animation-delay: -540ms; }
.dotmatrix i:nth-child(25) { animation-delay: -480ms; }
@media (prefers-reduced-motion: reduce) {
  .dotmatrix i { animation: none; opacity: .6; }
}
