:root {
  color-scheme: light;
  --ink: #1b2421;
  --muted: #55625b;
  --border: #d5dcd2;
  --paper: #fffefa;
  --mono: "IBM Plex Mono", ui-monospace, "Cascadia Mono", monospace;
  font: 16px/1.45 "Inter", "Segoe UI", system-ui, sans-serif;
  color: var(--ink);
  background: #eff2eb;
}
* { box-sizing: border-box; }
body { margin: 0; }
button, input, select { font: inherit; color: inherit; }
button, select { cursor: pointer; }
button:disabled { opacity: .45; cursor: default; }
button:focus-visible, input:focus-visible, select:focus-visible {
  outline: 3px solid #1c765c; outline-offset: 3px;
}
.masthead { background: var(--ink); color: #fff; }
.mastinner, main { width: min(1240px, 100%); margin: auto; padding-inline: clamp(16px, 4vw, 60px); }
.mastinner { display: flex; align-items: center; gap: 12px; height: 62px; font-size: 18px; font-weight: 720; letter-spacing: -.04em; }
.mark { height: 22px; width: 26px; display: grid; grid-template-rows: repeat(3,1fr); gap: 2px; }
.mark i { background: #ffbc86; height: 100%; border-radius: 1px; width: 61%; }
.mark i:nth-child(2) { margin-left: 37%; }
.mark i:nth-child(3) { margin-left: 16%; }
main { padding-bottom: 52px; }
.intro { padding: clamp(26px,4.2vw,58px) 0 30px; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(2.6rem, 6vw, 4.7rem); line-height: 1.03; font-weight: 735; letter-spacing: -.075em; }
h1 span { color: #b85222; }
.intro p { margin-top: 14px; max-width: 680px; color: var(--muted); font-size: clamp(1rem,1.6vw,1.16rem); }
.workbench { display: grid; grid-template-columns: minmax(250px, .83fr) minmax(0, 1.9fr); gap: 18px; align-items: start; }
.results { display: grid; gap: 16px; min-width: 0; }
.panel { min-width: 0; border: 1px solid var(--border); border-radius: 14px; background: var(--paper); padding: clamp(16px, 2.2vw, 28px); }
h2 { font-size: clamp(1.15rem, 2vw, 1.5rem); letter-spacing: -.05em; line-height: 1.2; }
h3 { font-size: .91rem; font-weight: 650; }
.section-head, .track-head, .qfield, .axis { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.section-head { flex-wrap: wrap; margin-bottom: 20px; }
.section-head > span, .track-head > span, .axis, .legend-item, .records td, .inputs input, .qfield input { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.section-head > span, .track-head > span, .axis { font-size: .75rem; }
label, th { font-size: .85rem; font-weight: 650; }
select, input { border: 1px solid #a9b5a9; background-color: var(--paper); border-radius: 5px; padding: 7px; }
#preset { width: 100%; margin-top: 6px; font-size: .91rem; }
.inputs { width: 100%; margin: 23px 0 8px; border-collapse: collapse; }
.inputs thead th { text-align: left; color: var(--muted); border-bottom: 1px solid var(--border); padding-bottom: 6px; }
.inputs tbody th { text-align: left; }
.inputs td { padding: 5px 2px; }
.inputs input { width: 100%; max-width: 65px; min-width: 41px; font-size: .88rem; }
.process-badge { display: inline-grid; place-items: center; min-width: 24px; height: 24px; font: 700 .78rem var(--mono); color: var(--ink); border-radius: 5px; }
.remove { color: var(--muted); background: none; border: none; font-size: 1.4rem; border-radius: 4px; padding: 0 6px; }
.remove:hover:enabled { background: #f2e6dc; }
.add { padding: 7px 10px; background: #f3f5ed; border: 1px dashed #91a393; border-radius: 5px; font-size: .82rem; font-weight: 620; }
.qfield { margin: 23px 0; border-top: 1px solid var(--border); padding-top: 18px; }
.qfield div { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: .82rem; }
.qfield input { width: 52px; }
.primary { width: 100%; background: #1e4d3e; color: white; font-weight: 650; border: 1px solid #163f32; border-radius: 6px; padding: 11px 15px; display: flex; justify-content: space-between; align-items: center; }
.primary:hover { background: #28604d; }
.editor-note, .terms, .hint { font-size: .82rem; color: var(--muted); line-height: 1.5; }
.editor-note { margin-top: 12px; }
.error { margin-bottom: 10px; color: #9f2219; font-size: .87rem; }
.timing { background: var(--ink); color: #f7f8f3; border-color: var(--ink); }
.timing .section-head { margin-bottom: 4px; }
.timing .hint, .timing .section-head > span, .track-head > span, .axis { color: #b7c4bb; }
.track { margin-top: 20px; }
.rail { display: flex; height: 36px; border-radius: 4px; overflow: hidden; margin: 6px 0 3px; }
.slice { position: relative; color: #18231f; font: 680 .8rem var(--mono); padding: 0; min-width: 0; border: none; background-clip: padding-box; box-shadow: inset -1px 0 0 #27372c90; overflow: hidden; }
.slice:hover, .slice:focus-visible { outline: none; box-shadow: inset 0 0 0 3px white, inset 0 0 0 5px #1b2421; }
.idle { background: repeating-linear-gradient(115deg,#52605a 0 3px,#738078 3px 5px); color: white; }
.axis { min-height: 1.15rem; font-size: .72rem; }
.readout { color: #ecf4ed; }
#legend { display: flex; flex-wrap: wrap; gap: 8px 15px; padding-top: 16px; margin-top: 12px; border-top: 1px solid #425048; }
.legend-item { display: inline-flex; align-items: center; gap: 4px; color: #d0dacf; font-size: .69rem; }
.legend-item .process-badge, .legend-item i { min-width: 13px; height: 13px; border-radius: 3px; font-size: .6rem; }
.table-scroll { overflow-x: auto; }
.records { width: 100%; border-collapse: collapse; white-space: nowrap; }
.records th, .records td { padding: 8px 6px; font-size: .85rem; text-align: right; }
.records thead th { color: var(--muted); font-size: .76rem; border-bottom: 1px solid var(--border); }
.records th:first-child { padding-left: 0; text-align: left; }
.records tbody tr + tr { border-top: 1px solid #e5e9e1; }
.records td:last-child, .records th:last-child { padding-right: 0; }
#detail-policy { max-width: 100%; font-size: .8rem; }
.terms { margin-top: 14px; }
.sr { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (max-width: 760px) {
  .workbench { grid-template-columns: minmax(0,1fr); }
  .inputs input { max-width: 95px; }
  .section-head { margin-bottom: 14px; }
  .intro { padding-bottom: 24px; }
  .track-head { flex-wrap: wrap; }
}
@media (forced-colors: active) { .slice, .process-badge, .idle { border: 1px solid ButtonText; } }

.handoff-panel { margin-top: 14px; padding: 10px 12px; border-radius: 6px; background: #f1f4ed; }
.handoff-panel summary { cursor: pointer; font-size: .85rem; font-weight: 650; }
.handoff-panel .table-scroll { max-height: 215px; margin-top: 8px; }
.handoff-panel summary:focus-visible { outline: 2px solid #1c765c; outline-offset: 3px; }
#handoffs td:first-child { text-align: left; }

.quantum-pick { min-width: 2.4rem; border: 1px solid #a9b5a9; border-radius: 4px; background: var(--paper); }
.quantum-pick[aria-pressed="true"] { color: white; background: #1e4d3e; }

/* Type, navigation and rules shared by the research collection. */
:root {
  --book-ink: #193d32;
  --book-copper: #8e4b2b;
  --book-paper: #f7f4eb;
  --book-card: #fffdf7;
  --book-line: #c9c7b7;
  --book-serif: "Baskervville", "Baskerville Old Face", Georgia, "Songti SC", SimSun, serif;
  background: var(--book-paper);
  color: var(--book-ink);
}
.index-links {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 0 12px;
  border-bottom: 1px solid var(--book-line);
  color: #546259;
  font: 500 0.79rem/1.5 "DM Sans", "Segoe UI", system-ui, sans-serif;
}
.index-links a { color: inherit; text-decoration: none; }
.index-links a:hover { color: var(--book-copper); text-decoration: underline; text-underline-offset: 4px; }
.index-links a:focus-visible { outline: 2px solid var(--book-copper); outline-offset: 4px; }
.index-links a:last-child { text-align: right; }
::selection { background: #d6dfcf; color: #15382d; }

:root { --ink: var(--book-ink); --paper: var(--book-card); --border: var(--book-line); }
.masthead { border-bottom: 2px solid #b07b56; }
.mastinner { font: 400 1.4rem/1.15 var(--book-serif); letter-spacing: -.02em; }
.mark i { background: #e5bd94; }
.intro { padding-block: clamp(24px, 4vw, 44px) 28px; }
.intro h1 { font: 400 clamp(3rem, 5.8vw, 5.4rem)/1.03 var(--book-serif); letter-spacing: -.053em; }
.intro h1 span { color: var(--book-copper); }
.panel { border-radius: 3px; }
.results > .panel:first-child { border-top: 3px solid var(--book-ink); }

.ripple-controls { display:flex; align-items:center; flex-wrap:wrap; gap:1rem; }
.ripple-controls label { display:grid; gap:.25rem; }
.ripple-controls input { max-width:7rem; }
