/* Copylab live datasheet. Tokens first; every value below comes from them. */
@font-face { font-family: "Inter"; src: url(/fonts/inter-var.woff) format("woff"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Copylab Part"; src: url(/fonts/part-var.woff) format("woff"); font-weight: 200 800; font-stretch: 75% 100%; font-style: normal; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url(/fonts/jetbrains-mono-var.woff) format("woff"); font-weight: 100 800; font-style: normal; font-display: swap; }

:root {
  color-scheme: light;
  --n0: #ffffff; --n1: #f7f8f8; --n2: #eceef0; --n3: #e1e4e7; --n4: #cfd4d8; --n5: #aab1b7;
  --n6: #838a92; --n7: #5c636b; --n8: #3b4148; --n9: #23272b; --n10: #0f1113;
  --ground: var(--n2); --sheet: var(--n0); --ink: var(--n10); --ink-2: var(--n8); --ink-3: var(--n7);
  --rule: var(--n10); --hair: var(--n3); --hair-2: var(--n4); --zebra: var(--n1); --well: var(--n1);
  --red: #c8102e; --red-ink: #a60e27; --on-red: #ffffff;
  --on-red-2: rgb(255 255 255 / 0.86); --on-red-line: rgb(255 255 255 / 0.55); --on-red-fill: rgb(0 0 0 / 0.16);
  --pos: #116f40; --warn: #935400; --info: #1d55b0;
  --shadow: 0 1px 2px rgb(15 17 19 / 0.07), 0 18px 40px -24px rgb(15 17 19 / 0.28);
  --sans: "Inter", ui-sans-serif, -apple-system, "Segoe UI", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --part: "Copylab Part", "Inter", ui-sans-serif, sans-serif;
  --fs-2xs: 0.75rem; --fs-xs: 0.8125rem; --fs-sm: 0.875rem; --fs: 0.9375rem; --fs-md: 1rem;
  --fs-lg: 1.25rem; --fs-xl: 1.5rem; --fs-2xl: 1.875rem; --fs-part: 4.5rem;
  --lh: 1.5; --lh-tight: 1.2;
  --bw: 1px; --bw-2: 2px; --bw-3: 3px;
  --r-1: 2px;
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 64px;
  --sheet-max: 1180px; --pad: var(--s4); --touch: 44px;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1); --t-fast: 150ms; --t: 200ms;
  --focus: var(--info);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --n0: #0c0e10; --n1: #111417; --n2: #050607; --n3: #1e2226; --n4: #2b3035; --n5: #4a5157;
    --n6: #6f777f; --n7: #8f979f; --n8: #b6bdc4; --n9: #d7dce0; --n10: #eef0f2;
    --red: #c21a35; --red-ink: #ff7385; --on-red: #ffffff;
    --pos: #45d08e; --warn: #f0a646; --info: #7aaeff;
    --shadow: 0 1px 0 rgb(255 255 255 / 0.03), 0 24px 48px -28px rgb(0 0 0 / 0.9);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --n0: #0c0e10; --n1: #111417; --n2: #050607; --n3: #1e2226; --n4: #2b3035; --n5: #4a5157;
  --n6: #6f777f; --n7: #8f979f; --n8: #b6bdc4; --n9: #d7dce0; --n10: #eef0f2;
  --red: #c21a35; --red-ink: #ff7385; --on-red: #ffffff;
  --pos: #45d08e; --warn: #f0a646; --info: #7aaeff;
  --shadow: 0 1px 0 rgb(255 255 255 / 0.03), 0 24px 48px -28px rgb(0 0 0 / 0.9);
}
@media (min-width: 720px) { :root { --pad: var(--s6); --fs-part: 7.5rem; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 112px; }
body {
  margin: 0; background: var(--ground); color: var(--ink);
  font: 400 var(--fs) / var(--lh) var(--sans);
  font-feature-settings: "cv05";
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  caret-color: var(--red);
}
h1, h2, h3, h4, p, ol, ul, dl, dd, figure { margin: 0; }
ol, ul { padding: 0; }
::selection { background: color-mix(in srgb, var(--red) 24%, transparent); }
:focus-visible { outline: var(--bw-2) solid var(--focus); outline-offset: 2px; }
a { color: var(--ink); text-decoration: underline; text-decoration-thickness: var(--bw); text-underline-offset: 3px; text-decoration-color: var(--hair-2); }
a:hover { text-decoration-color: var(--red); }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }
* { scrollbar-width: thin; scrollbar-color: var(--hair-2) transparent; }
.num, td.num, th.num, .tnum { font-variant-numeric: tabular-nums slashed-zero; }
.mono, code, .path { font-family: var(--mono); font-size: 0.92em; font-variant-numeric: slashed-zero; }
.muted { color: var(--ink-3); }
.pos { color: var(--pos); } .neg { color: var(--red-ink); } .warn { color: var(--warn); }
.skip { position: absolute; left: var(--s4); top: -60px; background: var(--sheet); padding: var(--s2) var(--s3); z-index: 20; }
.skip:focus { top: var(--s2); }

/* Document bar and chapter tabs */
.docbar { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--ground) 88%, transparent); backdrop-filter: saturate(1.2) blur(10px); border-bottom: var(--bw) solid var(--hair-2); }
.docbar-row { max-width: var(--sheet-max); margin: 0 auto; padding: 0 var(--pad); display: flex; align-items: center; justify-content: space-between; gap: var(--s3); min-height: 52px; }
.brand { display: flex; align-items: baseline; gap: var(--s3); min-width: 0; text-decoration: none; }
.wordmark { font-weight: 800; letter-spacing: 0.16em; font-size: var(--fs-sm); }
.doc-title { color: var(--ink-3); font-size: var(--fs-xs); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 519px) { .doc-title { display: none; } }
.doc-tools { display: flex; align-items: center; gap: var(--s2); flex-shrink: 0; }
.fresh { display: inline-flex; align-items: center; gap: var(--s2); font-size: var(--fs-xs); color: var(--ink-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.fresh::before { content: ""; width: 8px; height: 8px; background: var(--ink-3); }
.fresh.pos::before { background: var(--pos); } .fresh.warn::before { background: var(--warn); } .fresh.neg::before { background: var(--red); }
.icon-btn { width: var(--touch); height: var(--touch); display: inline-grid; place-items: center; border: var(--bw) solid transparent; background: none; border-radius: var(--r-1); cursor: pointer; color: var(--ink-2); }
.icon-btn:hover { border-color: var(--hair-2); color: var(--ink); }
.icon-btn svg { width: 18px; height: 18px; }
.chapters { max-width: var(--sheet-max); margin: 0 auto; padding: 0 var(--pad); display: flex; gap: var(--s1); overflow-x: auto; scrollbar-width: none; }
.chapters::-webkit-scrollbar { display: none; }
@media (max-width: 719px) { .chapters { -webkit-mask-image: linear-gradient(90deg, #000 78%, transparent); mask-image: linear-gradient(90deg, #000 78%, transparent); padding-right: var(--s7); } }
.chapter { position: relative; flex: none; display: inline-flex; align-items: center; gap: var(--s2); min-height: var(--touch); padding: 0 var(--s3); border: 0; background: none; cursor: pointer; color: var(--ink-3); font-size: var(--fs-sm); font-weight: 550; }
.chapter:hover { color: var(--ink); }
.chapter[aria-selected="true"] { color: var(--ink); font-weight: 700; }
.chapter[aria-selected="true"]::after { content: ""; position: absolute; left: var(--s3); right: var(--s3); bottom: -1px; height: var(--bw-3); background: var(--ink); }
.pip { width: 8px; height: 8px; background: var(--n5); }
.pip.pos { background: var(--pos); } .pip.warn { background: var(--warn); } .pip.neg { background: var(--red); }

/* Sheets */
main { padding: var(--s5) 0 var(--s7); }
@media (max-width: 719px) { main { padding: 0 0 var(--s6); } }
.sheet { max-width: var(--sheet-max); margin: 0 auto; background: var(--sheet); border: var(--bw) solid var(--hair-2); box-shadow: var(--shadow); }
@media (max-width: 719px) { .sheet { border-left: 0; border-right: 0; box-shadow: none; } }
.run-head, .run-foot { display: flex; justify-content: space-between; gap: var(--s3); padding: var(--s2) var(--pad); font-size: var(--fs-2xs); color: var(--ink-3); letter-spacing: 0.04em; font-variant-numeric: tabular-nums; }
.run-head { border-bottom: var(--bw) solid var(--hair); }
@media (max-width: 639px) { .run-head > span:first-child { display: none; } }
.run-foot { border-top: var(--bw) solid var(--hair); flex-wrap: wrap; }
.sheet-body { padding: var(--s5) var(--pad) var(--s6); display: grid; gap: var(--s6); }
.sec > .sec + .sec { margin-top: var(--s5); }
.status-region:empty { display: none; }
.status-region { max-width: var(--sheet-max); margin: 0 auto var(--s4); padding: 0 var(--pad); }
.notice { border: var(--bw-2) solid var(--ink); padding: var(--s3) var(--s4); background: var(--sheet); }

/* Headings and sections */
.sec { display: grid; gap: var(--s4); min-width: 0; align-content: start; }
.sec > *, .sheet-body > *, .cols > * { min-width: 0; }
.sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--s3); flex-wrap: wrap; border-bottom: var(--bw-2) solid var(--rule); padding-bottom: var(--s2); }
.sec-title { font-size: var(--fs-lg); font-weight: 750; letter-spacing: -0.012em; line-height: var(--lh-tight); }
.sec-aside { font-size: var(--fs-xs); color: var(--ink-3); display: flex; gap: var(--s2); align-items: center; flex-wrap: wrap; }
.lede { font-size: var(--fs-md); color: var(--ink-2); max-width: 68ch; }
.cols { display: grid; gap: var(--s6); }
@media (min-width: 960px) { .cols { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); } .cols.even { grid-template-columns: 1fr 1fr; } }

/* Stamps and tags */
.stamp { display: inline-flex; align-items: center; gap: var(--s1); padding: 3px 7px 3px 8px; border: var(--bw-2) solid currentColor; outline: var(--bw) solid currentColor; outline-offset: 2px; margin: 3px; font: 750 var(--fs-2xs) / 1.2 var(--sans); letter-spacing: 0.09em; text-transform: uppercase; white-space: nowrap; color: var(--ink); }
.stamp.red { color: var(--red-ink); } .stamp.pos { color: var(--pos); } .stamp.warn { color: var(--warn); } .stamp.info { color: var(--info); } .stamp.dim { color: var(--ink-3); }
.stamp.solid { background: var(--red); border-color: var(--red); outline-color: var(--red); color: var(--on-red); }
.stamps { display: flex; flex-wrap: wrap; gap: var(--s1); margin: calc(-1 * var(--s1)); }
.tag { display: inline-block; padding: 1px 6px; border: var(--bw) solid var(--hair-2); font-size: var(--fs-2xs); font-weight: 650; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-2); white-space: nowrap; }
.tag.pos { color: var(--pos); border-color: currentColor; } .tag.red { color: var(--red-ink); border-color: currentColor; } .tag.info { color: var(--info); border-color: currentColor; } .tag.warn { color: var(--warn); border-color: currentColor; }

/* Cover: part number block */
.cover { display: grid; gap: var(--s5); }
@media (min-width: 960px) { .cover { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); align-items: end; } }
.part { display: flex; align-items: flex-end; gap: var(--s4); flex-wrap: wrap; }
.part-no, .program-id, .note-n, .gate-n { font-family: var(--part); font-stretch: 75%; font-variation-settings: "opsz" 96; }
.part-no { font-size: var(--fs-part); font-weight: 800; letter-spacing: -0.02em; line-height: 0.82; }
.part-no.long { font-size: calc(var(--fs-part) * 0.6); line-height: 0.9; }
.part-meta { display: grid; gap: var(--s1); padding-bottom: var(--s1); }
.part-title { font-size: var(--fs-xl); font-weight: 700; letter-spacing: -0.015em; line-height: var(--lh-tight); }
.part-sub { color: var(--ink-3); font-size: var(--fs-sm); }
.cover-side { display: grid; gap: var(--s3); justify-items: start; }
@media (min-width: 960px) { .cover-side { justify-items: end; text-align: right; } }
.focus { display: grid; gap: var(--s2); max-width: 70ch; }
.focus-title { font-size: var(--fs-2xl); font-weight: 750; letter-spacing: -0.02em; line-height: 1.15; text-wrap: balance; }
.focus-detail { font-size: var(--fs-md); color: var(--ink-2); }
.focus-since { font-size: var(--fs-xs); color: var(--ink-3); }

/* Characteristics tables */
.spec-wrap { overflow-x: auto; }
table.spec { width: 100%; border-collapse: collapse; border-top: var(--bw-2) solid var(--rule); border-bottom: var(--bw-2) solid var(--rule); font-size: var(--fs-sm); }
table.spec caption { caption-side: top; text-align: left; font-size: var(--fs-xs); color: var(--ink-3); padding-bottom: var(--s2); }
table.spec thead th { font-size: var(--fs-2xs); font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-2); text-align: left; padding: var(--s2); border-bottom: var(--bw) solid var(--rule); white-space: nowrap; }
table.spec td, table.spec tbody th { padding: var(--s2); border-bottom: var(--bw) solid var(--hair); vertical-align: top; text-align: left; font-weight: 400; }
table.spec tbody th { font-weight: 600; }
table.spec tbody tr:last-child > * { border-bottom: 0; }
table.spec tbody tr:hover > * { background: var(--zebra); }
table.spec .num { text-align: right; white-space: nowrap; }
table.spec .cond { color: var(--ink-3); font-size: var(--fs-xs); }
table.spec td.cond { max-width: 34ch; }
table.spec tr.killed th, table.spec tr.killed td:not(.keep) { text-decoration: line-through; text-decoration-color: var(--ink-3); color: var(--ink-3); }
.fn { font-size: 0.72em; color: var(--ink-3); margin-left: 1px; }
.spec-notes { list-style: none; counter-reset: fn; display: grid; gap: 2px; font-size: var(--fs-xs); color: var(--ink-3); margin-top: calc(-1 * var(--s2)); }
.spec-notes li { counter-increment: fn; }
.spec-notes li::before { content: "(" counter(fn) ") "; }
@media (max-width: 639px) {
  table.spec.stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  table.spec.stack, table.spec.stack tbody { display: block; }
  table.spec.stack tr { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px var(--s3); padding: var(--s2) 0; border-bottom: var(--bw) solid var(--hair); }
  table.spec.stack tr:last-child { border-bottom: 0; }
  table.spec.stack tbody th { flex: 1 0 100%; padding: 0; border: 0; }
  table.spec.stack td { border: 0; padding: 0; text-align: left; max-width: none; }
  table.spec.stack td.cond { flex: 1 0 100%; margin-bottom: 2px; }
  table.spec.stack td.num::before { content: attr(data-label) " "; color: var(--ink-3); font-size: var(--fs-2xs); letter-spacing: 0.05em; text-transform: uppercase; }
  table.spec.stack td:empty { display: none; }
  table.spec.stack tbody tr:hover > * { background: none; }
}

/* Definition rows */
.defs { display: grid; gap: var(--s2); }
.defs > div { display: grid; gap: var(--s1); }
@media (min-width: 720px) { .defs > div { grid-template-columns: 9.5rem minmax(0, 1fr); gap: var(--s4); } }
.defs dt { font-size: var(--fs-xs); font-weight: 700; color: var(--ink-2); padding-top: 2px; }
.defs dd { max-width: 75ch; }

/* The needs-you band: the page-scale accent */
.band { background: var(--red); color: var(--on-red); margin: 0 calc(-1 * var(--pad)); padding: var(--s5) var(--pad); display: grid; gap: var(--s3); }
.band-head { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s3); border-bottom: var(--bw-2) solid var(--on-red-line); padding-bottom: var(--s2); }
.band-title { font-size: var(--fs-lg); font-weight: 800; letter-spacing: -0.01em; }
.band-count { font-size: var(--fs-xs); font-weight: 650; letter-spacing: 0.06em; text-transform: uppercase; }
.band-list { list-style: none; display: grid; gap: var(--s3); counter-reset: need; }
@media (min-width: 960px) { .band-list { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s5); } }
.band-list li { counter-increment: need; display: grid; grid-template-columns: auto 1fr; gap: var(--s3); }
.band-list li::before { content: counter(need); font-size: var(--fs-2xl); font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.band-item { display: grid; gap: var(--s2); align-content: start; }
.band-item > strong { font-size: var(--fs-md); font-weight: 700; }
.band-item > p { font-size: var(--fs-sm); color: var(--on-red-2); }
.band a { color: var(--on-red); text-decoration-color: var(--on-red-line); font-weight: 650; }
.band-actions { display: flex; flex-wrap: wrap; gap: var(--s2); }
.band .btn { background: transparent; color: var(--on-red); border-color: var(--on-red-line); }
.band .btn:hover { background: var(--on-red-fill); border-color: var(--on-red); }
.band .btn[aria-pressed="true"], .band .btn.primary { background: var(--on-red); color: var(--red); border-color: var(--on-red); }
.band .btn:focus-visible { outline-color: var(--on-red); }
.band input:not([hidden]) { width: 100%; background: var(--on-red-fill); border-color: var(--on-red-line); color: var(--on-red); }
.band input:not([hidden])::placeholder { color: var(--on-red-2); }
.band input:not([hidden]):focus { border-color: var(--on-red); box-shadow: 0 0 0 var(--bw-2) var(--on-red-line); }
.band .form-error { color: var(--on-red); }
.band-signin { display: grid; gap: var(--s2); padding-bottom: var(--s3); border-bottom: var(--bw) solid var(--on-red-line); font-size: var(--fs-sm); }
.band-signin .signin-row input { width: auto; }
.band-status { font-size: var(--fs-sm); border-top: var(--bw) solid var(--on-red-line); padding-top: var(--s2); }
.band-done { font-size: var(--fs-xs); color: var(--on-red-2); }
.icon { width: 14px; height: 14px; flex: none; }

/* Revision history */
.filters { display: flex; flex-wrap: wrap; gap: 0; border: var(--bw) solid var(--hair-2); width: fit-content; max-width: 100%; }
.filter { min-height: 34px; padding: 0 var(--s3); border: 0; border-right: var(--bw) solid var(--hair-2); background: var(--sheet); color: var(--ink-3); cursor: pointer; font-size: var(--fs-xs); font-weight: 600; }
.filter:last-child { border-right: 0; }
.filter[aria-pressed="true"] { background: var(--ink); color: var(--sheet); }
.revlog { width: 100%; border-collapse: collapse; border-top: var(--bw-2) solid var(--rule); border-bottom: var(--bw-2) solid var(--rule); }
.revlog th, .revlog td { padding: var(--s3) var(--s2); border-bottom: var(--bw) solid var(--hair); vertical-align: top; text-align: left; }
.revlog thead th { font-size: var(--fs-2xs); font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-2); border-bottom: var(--bw) solid var(--rule); padding-top: var(--s2); padding-bottom: var(--s2); }
.revlog .day th { font-size: var(--fs-xs); font-weight: 750; color: var(--ink); background: var(--zebra); padding-top: var(--s2); padding-bottom: var(--s2); }
.revlog .rev { width: 3.5rem; color: var(--ink-3); font-size: var(--fs-xs); font-variant-numeric: tabular-nums slashed-zero; }
.revlog .when { width: 4rem; font-size: var(--fs-xs); color: var(--ink-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.revlog .kind { width: 6.5rem; }
.rev-title { font-weight: 650; }
.rev-detail { color: var(--ink-2); max-width: 78ch; margin-top: 2px; }
.rev-tags { margin-top: var(--s1); font-size: var(--fs-2xs); color: var(--ink-3); letter-spacing: 0.04em; }
@media (max-width: 639px) {
  .revlog thead { display: none; }
  .revlog tr:not(.day) { display: grid; grid-template-columns: auto auto 1fr; gap: 0 var(--s2); padding: var(--s3) 0; border-bottom: var(--bw) solid var(--hair); }
  .revlog tr:not(.day) > * { border: 0; padding: 0; width: auto; }
  .revlog .change { grid-column: 1 / -1; margin-top: var(--s1); }
  .revlog .day { display: block; } .revlog .day th { display: block; padding-left: 0; background: none; border-bottom: var(--bw) solid var(--rule); }
}
.more { justify-self: start; }

/* Buttons and inputs */
.btn { min-height: 36px; padding: 0 var(--s4); display: inline-flex; align-items: center; justify-content: center; gap: var(--s2); border: var(--bw) solid var(--ink); border-radius: var(--r-1); background: var(--sheet); color: var(--ink); font-size: var(--fs-sm); font-weight: 650; cursor: pointer; transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease); }
.btn:hover { background: var(--zebra); }
.btn.primary { background: var(--ink); color: var(--sheet); }
.btn.primary:hover { background: var(--n9); }
.btn.quiet { border-color: transparent; }
.btn:disabled { opacity: 0.55; cursor: progress; }
@media (pointer: coarse) { .btn, .filter { min-height: var(--touch); } }
input[type="text"], input[type="password"], input[type="search"], input:not([type]), select, textarea { font: inherit; color: var(--ink); background: var(--sheet); border: var(--bw) solid var(--hair-2); border-radius: var(--r-1); min-height: 40px; padding: 0 var(--s3); }
textarea { padding: var(--s3); min-height: 14rem; width: 100%; resize: vertical; line-height: 1.5; font-size: var(--fs-sm); }
input:focus, select:focus, textarea:focus { border-color: var(--ink); outline: none; box-shadow: 0 0 0 var(--bw-2) color-mix(in srgb, var(--focus) 35%, transparent); }
::placeholder { color: var(--ink-3); opacity: 1; }

/* Milestones and jobs */
.when-cell { white-space: nowrap; font-variant-numeric: tabular-nums; }
.eta { font-variant-numeric: tabular-nums; font-weight: 650; }

/* Figures */
.fig { display: grid; gap: var(--s2); min-width: 0; }
.fig figcaption { font-size: var(--fs-xs); color: var(--ink-2); }
.fig-n { font-weight: 750; color: var(--ink); }
.fig-note { color: var(--ink-3); }
svg.chart { width: 100%; height: auto; display: block; overflow: visible; }
svg.chart .grid { stroke: var(--hair); stroke-width: 1; }
svg.chart .base, svg.chart .tick { stroke: var(--ink); stroke-width: 1.25; }
svg.chart .bar:not(.hatch) { fill: var(--ink); }
svg.chart { color: var(--ink); }
svg.chart .bar.hatch { stroke: var(--ink); stroke-width: 1; }
svg.chart .ax { fill: var(--ink-3); font: 500 12px var(--sans); font-variant-numeric: tabular-nums; }
svg.chart .axis-title { fill: var(--ink-2); }
svg.chart .mark { stroke: var(--red); stroke-width: 1.5; stroke-dasharray: 4 3; }
svg.chart .mark-label { fill: var(--red-ink); font-weight: 650; }
svg.chart .mark-label.soft { fill: var(--ink-2); font-weight: 600; }
svg.chart .bar-total { fill: none; stroke: var(--ink); stroke-width: 1; }
svg.chart .hatch-neg { color: var(--red-ink); }
svg.budget .row-label { fill: var(--ink); font: 700 13px var(--sans); }
svg.budget .row-verdict { font: 650 13px var(--sans); font-variant-numeric: tabular-nums; }
svg.budget .row-verdict.ok { fill: var(--pos); } svg.budget .row-verdict.miss { fill: var(--red-ink); }
svg.budget .win { fill: var(--well); stroke: var(--ink); stroke-width: 1; }
svg.budget .react { fill: var(--ink); }
svg.budget .deliver { stroke: var(--ink); stroke-width: 1; }
svg.budget .over { stroke: var(--red-ink); stroke-width: 1; stroke-dasharray: 3 2; }
svg.budget .close { stroke: var(--ink); stroke-width: 3; }
svg.catch .area { fill: var(--well); }
svg.catch .curve { fill: none; stroke: var(--ink); stroke-width: 2; stroke-linejoin: round; }
svg.catch .mark-soft { stroke: var(--ink-3); stroke-width: 1; stroke-dasharray: 3 3; }
svg.catch .dot { fill: var(--ink); } svg.catch .dot.strong { fill: var(--red); }
.legend { list-style: none; display: flex; flex-wrap: wrap; gap: var(--s2) var(--s4); font-size: var(--fs-xs); color: var(--ink-2); }
.legend li { display: inline-flex; align-items: center; gap: var(--s2); }
.key { flex: none; width: 18px; height: 10px; border: var(--bw) solid var(--ink); }
.key.react { background: var(--ink); }
.key.deliver { background: repeating-linear-gradient(135deg, var(--ink) 0 1.4px, transparent 1.4px 4.2px); }
.key.spare { background: var(--well); }
.key.close { width: var(--bw-3); height: 16px; border: 0; background: var(--ink); }
.verdict { display: grid; gap: var(--s2); max-width: 72ch; }
.verdict-line { font-size: var(--fs-2xl); font-weight: 750; letter-spacing: -0.02em; line-height: 1.15; text-wrap: balance; }
.verdict-line strong { font-weight: 850; }
.verdict-sub { font-size: var(--fs-md); color: var(--ink-2); }
.verdict-why { font-size: var(--fs-sm); color: var(--ink-2); padding-top: var(--s2); border-top: var(--bw) solid var(--hair); }
.hbars { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
.hbars th { text-align: left; font-weight: 550; padding: 6px var(--s2) 6px 0; white-space: nowrap; width: 1%; }
.hbars td { padding: 6px 0 6px var(--s2); }
.hbars td.num { white-space: nowrap; }
.hbar-cell { width: 100%; }
.hbar { display: block; height: 10px; background: var(--ink); min-width: 1px; }
.hbars tr + tr > * { border-top: var(--bw) solid var(--hair); }
.empty { color: var(--ink-3); font-size: var(--fs-sm); padding: var(--s3) 0; }

/* Live status dot */
.live-dot { display: inline-block; width: 8px; height: 8px; background: var(--pos); margin-right: var(--s2); }
.live-dot.warn { background: var(--warn); } .live-dot.neg { background: var(--red); } .live-dot.dim { background: var(--n5); }


/* Gates (canary) */
.gate-track { display: grid; grid-template-columns: repeat(8, 1fr); gap: 3px; }
.gate-cell { height: 12px; border: var(--bw) solid var(--ink); background: var(--sheet); }
.gate-cell.done { background: var(--ink); }
.gate-cell.active { background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="6" height="6"><path d="M-1 7 7-1" stroke="black" stroke-width="1.3"/></svg>'); }
.gate-cell.waiting_user { border-color: var(--red); border-width: var(--bw-2); }
.gate-cell.blocked { background: var(--red); border-color: var(--red); }
:root[data-theme="dark"] .gate-cell.active { background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="6" height="6"><path d="M-1 7 7-1" stroke="white" stroke-width="1.3"/></svg>'); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .gate-cell.active { background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="6" height="6"><path d="M-1 7 7-1" stroke="white" stroke-width="1.3"/></svg>'); } }
.gates { list-style: none; display: grid; border-top: var(--bw-2) solid var(--rule); border-bottom: var(--bw-2) solid var(--rule); }
.gate { display: grid; grid-template-columns: 3.25rem minmax(0, 1fr); gap: var(--s3); padding: var(--s3) 0; border-bottom: var(--bw) solid var(--hair); scroll-margin-top: 120px; }
.gate:last-child { border-bottom: 0; }
.gate:target { background: var(--zebra); }
.gate-n { font-size: var(--fs-xl); font-weight: 800; letter-spacing: -0.02em; line-height: 1; font-variant-numeric: tabular-nums slashed-zero; text-decoration: none; color: var(--ink); }
.gate.done .gate-n { color: var(--ink-3); }
.gate-main { display: grid; gap: var(--s1); }
.gate-top { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); justify-content: space-between; }
.gate-title { font-weight: 700; font-size: var(--fs-md); }
.gate-evidence { color: var(--ink-2); font-size: var(--fs-sm); max-width: 80ch; }
.steps { list-style: none; counter-reset: step; display: grid; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 2rem 1fr auto; gap: var(--s2); padding: var(--s2) 0; border-bottom: var(--bw) solid var(--hair); align-items: baseline; }
.steps li::before { content: counter(step); font-weight: 800; font-variant-numeric: tabular-nums; }
.steps li.done span { text-decoration: line-through; color: var(--ink-3); }
.plain-list { list-style: none; display: grid; }
.plain-list li { padding: var(--s2) 0; border-bottom: var(--bw) solid var(--hair); }
.plain-list li:last-child { border-bottom: 0; }

/* Evidence programs */
.program { display: grid; gap: var(--s4); padding-top: var(--s2); }
.program + .program { border-top: var(--bw) solid var(--hair-2); padding-top: var(--s5); }
.program-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--s3); }
.program-id { font-size: var(--fs-2xl); font-weight: 800; letter-spacing: -0.02em; font-variant-numeric: tabular-nums slashed-zero; }
.program-title { font-size: var(--fs-lg); font-weight: 700; }
.program.killed .program-id, .program.killed .program-title { text-decoration: line-through; text-decoration-thickness: var(--bw-2); color: var(--ink-3); }
.figs { display: grid; gap: var(--s5); }
@media (min-width: 960px) { .figs { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.hash { font-family: var(--mono); font-size: var(--fs-xs); color: var(--ink-2); }
.toolbar { display: flex; flex-wrap: wrap; gap: var(--s2); align-items: center; }
.toolbar input { flex: 1 1 14rem; min-width: 0; }

/* Problems (application notes) */
.notes { list-style: none; display: grid; }
.note { display: grid; gap: var(--s3); padding: var(--s5) 0; border-bottom: var(--bw) solid var(--hair-2); scroll-margin-top: 120px; }
.note:first-child { padding-top: var(--s3); }
.note:last-child { border-bottom: 0; }
.note-head { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--s4); align-items: start; }
.note-n { font-size: var(--fs-2xl); font-weight: 800; letter-spacing: -0.02em; line-height: 1; font-variant-numeric: tabular-nums slashed-zero; }
.note-title { font-size: var(--fs-lg); font-weight: 750; letter-spacing: -0.01em; line-height: 1.25; text-wrap: balance; }
.note-meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); margin-top: var(--s2); font-size: var(--fs-xs); color: var(--ink-3); }
.note-why { color: var(--ink-2); max-width: 76ch; }
details.fold { border-top: var(--bw) solid var(--hair); }
details.fold > summary { list-style: none; cursor: pointer; min-height: var(--touch); display: flex; align-items: center; gap: var(--s2); font-size: var(--fs-sm); font-weight: 650; }
details.fold > summary::-webkit-details-marker { display: none; }
details.fold > summary::before { content: ""; flex: none; width: 1.25rem; height: 1.25rem; border: var(--bw) solid var(--ink);
  background: linear-gradient(var(--ink), var(--ink)) center / 9px 2px no-repeat, linear-gradient(var(--ink), var(--ink)) center / 2px 9px no-repeat; }
details.fold[open] > summary::before { background: linear-gradient(var(--ink), var(--ink)) center / 9px 2px no-repeat; }
details.fold > summary .muted { font-weight: 450; }
.known { list-style: none; display: grid; gap: var(--s1); padding: 0 0 var(--s3) calc(1.25rem + var(--s2)); color: var(--ink-2); font-size: var(--fs-sm); }
.known li::before { content: "\2013\2002"; color: var(--ink-3); }
.procedure { margin: 0 0 var(--s3); border: var(--bw) solid var(--hair-2); border-top: var(--bw-2) solid var(--ink); background: var(--well); padding: var(--s4); white-space: pre-wrap; font-size: var(--fs-sm); line-height: 1.6; max-height: 26rem; overflow: auto; }
.actions { display: flex; flex-wrap: wrap; gap: var(--s2); }
.paste { display: grid; gap: var(--s2); padding: var(--s4); border: var(--bw-2) solid var(--ink); }
.paste-label { font-size: var(--fs-xs); font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; }
.paste-meta { display: flex; flex-wrap: wrap; gap: var(--s2); align-items: center; justify-content: space-between; }
.paste-meta input { flex: 1 1 14rem; min-width: 0; }
.count { font-size: var(--fs-xs); color: var(--ink-3); font-variant-numeric: tabular-nums; }
.flash { font-size: var(--fs-sm); font-weight: 600; }
.flash.pos { color: var(--pos); } .flash.warn { color: var(--warn); } .flash.neg { color: var(--red-ink); }
.session { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s3); padding: var(--s3) var(--s4); border: var(--bw) solid var(--hair-2); background: var(--well); }
.session form, form.session { display: grid; gap: var(--s2); width: 100%; }
.signin-row { display: flex; gap: var(--s2); }
.signin-row input { flex: 1; min-width: 0; min-height: var(--touch); }
.form-error { color: var(--red-ink); font-size: var(--fs-sm); font-weight: 600; }
.outcomes { list-style: none; display: grid; gap: var(--s2); font-size: var(--fs-sm); }
.outcome { border-top: var(--bw) solid var(--rule); padding-top: var(--s2); }
.outcome.waiting { border-top-color: var(--hair-2); color: var(--ink-2); }
.outcome-when { font-size: var(--fs-xs); color: var(--ink-3); }
.answer { display: grid; gap: var(--s2); }
.answer-label { font-size: var(--fs-2xs); font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-2); }
.note-next { max-width: 76ch; color: var(--ink-2); }
.note-next strong { color: var(--ink); font-weight: 700; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* Log: next steps and a dated timeline */
.next-steps { list-style: none; counter-reset: next; display: grid; }
.next-steps li { counter-increment: next; display: grid; grid-template-columns: 2rem 1fr; column-gap: var(--s2); padding: var(--s3) 0; border-bottom: var(--bw) solid var(--hair); }
.next-steps li::before { content: counter(next); font-weight: 800; font-variant-numeric: tabular-nums; grid-row: 1 / span 3; }
.next-steps li:last-child { border-bottom: 0; }
.next-top { display: flex; justify-content: space-between; gap: var(--s3); align-items: baseline; flex-wrap: wrap; }
.next-title { font-weight: 650; }
.next-when { color: var(--ink-2); font-size: var(--fs-xs); white-space: nowrap; }
.next-detail { color: var(--ink-2); max-width: 78ch; margin: var(--s1) 0 0; }
.next-owner { color: var(--ink-3); font-size: var(--fs-xs); margin: var(--s1) 0 0; }
.log-timeline { list-style: none; display: grid; }
.log-day { padding-top: var(--s5); }
.log-day:first-child { padding-top: 0; }
.log-date { font-size: var(--fs-xs); font-weight: 800; letter-spacing: 0.08em; color: var(--ink-3); margin: 0; padding-bottom: var(--s2); border-bottom: var(--bw-2) solid var(--rule); }
.log-entry { padding: var(--s3) 0 var(--s3) var(--s4); border-left: var(--bw-2) solid var(--hair-2); border-bottom: var(--bw) solid var(--hair); }
.log-entry.correction { border-left-color: var(--red); }
.log-entry.milestone { border-left-color: var(--ink); }
.log-head { display: flex; gap: var(--s2); align-items: baseline; flex-wrap: wrap; }
.log-title { font-weight: 650; }
.log-summary { color: var(--ink-2); max-width: 78ch; margin: var(--s1) 0 0; }

