/* Graft: herbarium sheet meets code review.
   Mounting-board ground, iron-gall ink, one cambium green; risk classes carry a stamp word and shape, never hue alone. */

:root {
  --board: #e4e8df;
  --sheet: #f6f7f2;
  --sheet-edge: #cfd6c9;
  --label: #fbfaf2;
  --ink: #16212a;
  --ink-2: #3c4950;
  --ink-3: #536066;
  --rule: #bcc5b8;
  --cambium: #2f8a22;
  --cambium-ink: #22681a;
  --cambium-soft: #d5e8c8;
  --btn: #22681a;
  --btn-ink: #ffffff;
  --tape: #e3d8b0;
  --tape-line: #b9ab78;
  --sensitive: #b42318;
  --logic: #8a5600;
  --logic-fill: #d99a1e;
  --trivial: #22681a;
  --cabinet: #15201b;
  --cabinet-2: #1d2a24;
  --cabinet-ink: #e8ede4;
  --cabinet-ink-2: #b3bfb5;
  --cabinet-rule: #34453c;
  --cabinet-green: #8fd65c;
  --code-bg: #eceee6;
  --shadow: 0 1px 2px rgb(22 33 42 / .1), 0 8px 16px -8px rgb(22 33 42 / .3);
  --f-display: "IM Fell English", "Iowan Old Style", Georgia, serif;
  --f-body: "Literata", "Iowan Old Style", Georgia, serif;
  --f-mono: "Courier Prime", "Courier New", ui-monospace, monospace;
  --wrap: 1220px;
  --gutter: clamp(16px, 4vw, 48px);
  --sec: clamp(72px, 10vw, 136px);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --board: #0e1613; --sheet: #15201b; --sheet-edge: #26352d; --label: #1b2721;
    --ink: #e6ebe2; --ink-2: #bac4b9; --ink-3: #9aa69c; --rule: #2e3d35;
    --cambium: #7cc94a; --cambium-ink: #93d963; --cambium-soft: #22351f;
    --btn: #93d963; --btn-ink: #0e1613;
    --tape: #4d4834; --tape-line: #6e6748;
    --sensitive: #ff8b7b; --logic: #f0b84a; --logic-fill: #f0b84a; --trivial: #93d963;
    --cabinet: #08100c; --cabinet-2: #111b16; --cabinet-rule: #2a3a31;
    --code-bg: #111a16;
    --shadow: 0 1px 2px rgb(0 0 0 / .4), 0 8px 16px -8px rgb(0 0 0 / .6);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --board: #0e1613; --sheet: #15201b; --sheet-edge: #26352d; --label: #1b2721;
  --ink: #e6ebe2; --ink-2: #bac4b9; --ink-3: #9aa69c; --rule: #2e3d35;
  --cambium: #7cc94a; --cambium-ink: #93d963; --cambium-soft: #22351f;
  --btn: #93d963; --btn-ink: #0e1613;
  --tape: #4d4834; --tape-line: #6e6748;
  --sensitive: #ff8b7b; --logic: #f0b84a; --logic-fill: #f0b84a; --trivial: #93d963;
  --cabinet: #08100c; --cabinet-2: #111b16; --cabinet-rule: #2a3a31;
  --code-bg: #111a16;
  --shadow: 0 1px 2px rgb(0 0 0 / .4), 0 8px 16px -8px rgb(0 0 0 / .6);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0; background: var(--board); color: var(--ink);
  font: 400 1.0625rem/1.65 var(--f-body);
  font-optical-sizing: auto;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--cambium-ink); text-decoration-thickness: 1px; text-underline-offset: .22em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--cambium-ink); outline-offset: 3px; border-radius: 2px; }
::selection { background: var(--cambium); color: var(--sheet); }
code, pre { font-family: var(--f-mono); }
code { font-size: .92em; background: var(--code-bg); padding: .05em .3em; border-radius: 3px; overflow-wrap: anywhere; }
h1, h2, h3 { font-family: var(--f-display); font-weight: 400; line-height: 1.04; margin: 0; text-wrap: balance; }
p { margin: 0 0 1em; }
html { scrollbar-color: var(--rule) var(--board); }

.skip { position: absolute; left: 12px; top: -60px; z-index: 50; background: var(--ink); color: var(--board); padding: 10px 14px; border-radius: 4px; }
.skip:focus { top: 12px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

/* header */
.top { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--board) 92%, transparent); backdrop-filter: saturate(1.2) blur(8px); border-bottom: 1px solid var(--rule); }
.top__inner { max-width: var(--wrap); margin: 0 auto; padding: 10px var(--gutter); display: flex; align-items: center; gap: 24px; }
.wordmark { display: inline-flex; align-items: center; gap: 9px; color: var(--ink); text-decoration: none; font-family: var(--f-display); font-size: 1.6rem; line-height: 1; }
.wordmark img { width: 30px; height: 30px; }
:root[data-theme="dark"] .wordmark img, :root[data-theme="dark"] .gh__bar img { filter: invert(1) hue-rotate(180deg) brightness(1.1); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .wordmark img, :root:not([data-theme="light"]) .gh__bar img { filter: invert(1) hue-rotate(180deg) brightness(1.1); } }
.top__nav { display: flex; gap: 20px; margin-left: auto; font-size: .9rem; }
.top__nav a, .top__link { color: var(--ink-2); text-decoration: none; }
.top__nav a:hover, .top__link:hover { color: var(--ink); text-decoration: underline; }
.top__end { display: flex; align-items: center; gap: 18px; font-size: .9rem; }
.top__link { font-weight: 600; color: var(--ink); }
.theme { display: grid; place-items: center; width: 36px; height: 36px; border: 1px solid var(--rule); border-radius: 50%; background: transparent; color: var(--ink); cursor: pointer; }
.theme:hover { border-color: var(--ink-3); }

/* buttons */
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 22px; }
.btn { display: inline-flex; align-items: center; min-height: 48px; padding: 0 22px; border-radius: 3px; font: 600 1rem/1 var(--f-body); letter-spacing: 0; text-decoration: none; transition: transform .25s cubic-bezier(.2,.7,.2,1), box-shadow .25s; }
.btn--primary { background: var(--btn); color: var(--btn-ink); box-shadow: 0 1px 0 rgb(0 0 0 / .2), 0 6px 14px -8px rgb(0 0 0 / .35); }
.btn--primary:hover { transform: translateY(-1px); box-shadow: 0 1px 0 rgb(0 0 0 / .2), 0 10px 18px -8px rgb(0 0 0 / .4); }
.btn--ghost { color: var(--ink); border: 1.5px solid var(--ink); }
.btn--ghost:hover { background: var(--ink); color: var(--board); }
.btn--video svg { margin-right: 10px; flex: none; }
.textlink { font-family: var(--f-body); font-weight: 600; font-size: 1rem; }
.textlink::after { content: " \2192"; }

/* hero */
.hero { max-width: var(--wrap); margin: 0 auto; padding: clamp(40px, 6vw, 84px) var(--gutter) clamp(56px, 8vw, 104px); display: grid; grid-template-columns: 5fr 7fr; gap: clamp(28px, 5vw, 72px); align-items: center; }
.hero h1 { font-size: clamp(2.7rem, 5.6vw, 5.1rem); letter-spacing: -.012em; line-height: .98; }
.mono-name { font-family: var(--f-mono); font-weight: 700; font-size: .78em; letter-spacing: -.02em; color: var(--cambium-ink); white-space: nowrap; }
.lead { font-size: clamp(1.06rem, 1.3vw, 1.2rem); color: var(--ink-2); max-width: 36em; margin-top: 26px; }
.status { position: relative; padding-left: 22px; font-size: .9rem; color: var(--ink-2); max-width: 34em; padding-top: 18px; border-top: 1px solid var(--rule); }
.status__dot { position: absolute; left: 0; top: calc(18px + .5em); width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--logic); }

/* plates and the herbarium sheet */
.plate { margin: 0; }
.plate figcaption, .flow figcaption, .gh__cap, .floor__note, .code-plate figcaption { font-size: .86rem; color: var(--ink-3); margin-top: 14px; max-width: 60em; }
.plate-no { font-family: var(--f-display); font-style: italic; font-size: 1.08em; color: var(--ink); }
.sheet { position: relative; background: var(--sheet); border: 1px solid var(--sheet-edge); box-shadow: var(--shadow); aspect-ratio: 600 / 660; padding: 3% 3% 0; overflow: hidden; }
.sheet::before { /* faint graticule, the sheet's centimetre grid */
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: linear-gradient(var(--sheet-edge) 1px, transparent 1px), linear-gradient(90deg, var(--sheet-edge) 1px, transparent 1px);
  background-size: 40px 40px; mask-image: linear-gradient(180deg, transparent, #000 30%, #000 70%, transparent);
}
.crop { position: absolute; width: 18px; height: 18px; border-color: var(--ink-3); border-style: solid; border-width: 0; z-index: 2; }
.crop--tl { top: 10px; left: 10px; border-top-width: 1px; border-left-width: 1px; }
.crop--tr { top: 10px; right: 10px; border-top-width: 1px; border-right-width: 1px; }
.crop--bl { bottom: 10px; left: 10px; border-bottom-width: 1px; border-left-width: 1px; }
.crop--br { bottom: 10px; right: 10px; border-bottom-width: 1px; border-right-width: 1px; }
.specimen { position: relative; width: 100%; height: auto; overflow: visible; }
.stock { fill: none; stroke: var(--ink); stroke-width: 20; stroke-linecap: round; }
.scion { fill: none; stroke: var(--cambium); stroke-width: 13; stroke-linecap: round; }
.leaf path { fill: color-mix(in srgb, var(--cambium) 22%, var(--sheet)); stroke: var(--cambium); stroke-width: 1.6; }
.ink-thin path { fill: none; stroke: var(--ink-3); stroke-width: 1.3; stroke-linecap: round; }
.leaf-vein path { stroke: var(--cambium); opacity: .7; }
.bud circle { fill: var(--sheet); stroke: var(--ink); stroke-width: 3; }
.bud--scion circle { stroke: var(--cambium); }
.tag-text text, .sheet-label, .scale text { font-family: var(--f-mono); font-size: 15px; fill: var(--ink-2); }
.sheet-label { fill: var(--ink); font-weight: 700; }
.cambium { fill: none; stroke: var(--cambium); stroke-width: 5; stroke-linecap: round; }
.tape rect { fill: var(--tape); stroke: var(--tape-line); stroke-width: 1.2; }
.tape path { stroke: var(--tape-line); stroke-width: 1; }
.string { fill: none; stroke: var(--ink-2); stroke-width: 1.4; stroke-linecap: round; }
.leader { stroke: var(--ink-3); stroke-width: 1; stroke-dasharray: 3 4; fill: none; }
.strip { fill: var(--tape); opacity: .9; }
.scale path { stroke: var(--ink); stroke-width: 1.5; fill: none; }
.scale rect { fill: var(--ink); }
.scale text { font-size: 13px; }

.label, .slip { position: absolute; z-index: 3; font-family: var(--f-mono); color: var(--ink); background: var(--label); border: 1px solid var(--sheet-edge); box-shadow: 0 1px 1px rgb(0 0 0 / .06), 0 6px 14px -8px rgb(0 0 0 / .3); }
.label { right: 4%; bottom: 4%; width: 56%; padding: 12px 14px 10px; font-size: .82rem; line-height: 1.35; }
.label__head { font-family: var(--f-display); font-size: 1.12rem; margin: 0 0 6px; padding-bottom: 6px; border-bottom: 1.5px solid var(--ink); }
.label__head span { font-family: var(--f-mono); font-size: .76rem; color: var(--ink-3); }
.label dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 1px 12px; }
.label dl div { display: contents; }
.label dt { color: var(--ink-3); }
.label dd { margin: 0; font-weight: 700; overflow-wrap: anywhere; }
.label__goal { margin: 8px 0 0; padding-top: 6px; border-top: 1px dashed var(--rule); color: var(--ink-2); }
.label__goal em { font-style: normal; font-weight: 700; color: var(--ink); }
.slip { left: 5%; top: 7%; width: 31%; padding: 10px 12px; font-size: .8rem; line-height: 1.35; transform: rotate(-2.2deg); background: color-mix(in srgb, var(--cambium-soft) 55%, var(--label)); }
.slip p { margin: 0 0 4px; }
.slip__head { font-family: var(--f-display); font-size: 1.05rem; }
.slip__head em { font-style: italic; }
.slip__fine { color: var(--ink-3); margin: 0 !important; }
.slip code, .label code { background: none; padding: 0; }
.slip::before { content: ""; position: absolute; top: -6px; left: 50%; width: 10px; height: 10px; border-radius: 50%; background: var(--ink-3); box-shadow: inset -2px -2px 0 rgb(0 0 0 / .25); }

/* stamps: word + double ring; hue is a second channel */
.stamp { --c: var(--sensitive); display: inline-grid; place-items: center; text-align: center; padding: 12px; width: 116px; height: 116px; border-radius: 50%; border: 3px solid var(--c); outline: 1px solid var(--c); outline-offset: -9px; color: var(--c); font-family: var(--f-mono); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; line-height: 1; transform: rotate(-12deg); }
.stamp span { font-size: .8rem; align-self: end; }
.stamp small { font-size: .7rem; align-self: start; padding-top: 4px; letter-spacing: .06em; max-width: 78%; }
.sheet .stamp--sensitive { position: absolute; z-index: 4; right: 6%; top: 40%; mix-blend-mode: multiply; }
:root[data-theme="dark"] .stamp--sensitive { mix-blend-mode: normal; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .stamp--sensitive { mix-blend-mode: normal; } }
.stamp--logic { --c: var(--logic); border-radius: 6px; height: 76px; border-style: dashed; outline-offset: -8px; }
.stamp--trivial { --c: var(--trivial); border-width: 2px; outline: 0; }

/* the problem */
.problem { padding: var(--sec) 0 calc(var(--sec) * .8); border-top: 1px solid var(--rule); }
.problem__line { font-size: clamp(2rem, 4.2vw, 3.6rem); max-width: 19em; line-height: 1.06; }
.problem__line span { display: block; font-style: italic; color: var(--cambium-ink); margin-top: .2em; }
.problem__cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(24px, 4vw, 64px); margin-top: clamp(32px, 5vw, 56px); max-width: 980px; color: var(--ink-2); }

/* bands */
.band { background: var(--sheet); border-block: 1px solid var(--sheet-edge); padding: var(--sec) 0; }
.sec-head { max-width: 46em; margin-bottom: clamp(36px, 5vw, 60px); }
.sec-head h2 { font-size: clamp(2.1rem, 3.9vw, 3.3rem); }
.sec-lead { color: var(--ink-2); margin-top: 20px; max-width: 40em; }
.wrap--split { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: clamp(32px, 5vw, 80px); align-items: start; }
.wrap--policy { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
.sec-head--side { position: sticky; top: 96px; margin-bottom: 0; }

/* custody ledger */
.custody { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--ink); counter-reset: c; }
.custody__row { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: clamp(16px, 4vw, 56px); padding: 28px 0 26px; border-bottom: 1px solid var(--rule); counter-increment: c; }
.custody__q { font-family: var(--f-display); font-size: clamp(1.6rem, 2.6vw, 2.2rem); line-height: 1.05; margin: 0; }
.custody__q::before { content: counter(c, upper-roman) ". "; font-style: italic; color: var(--cambium-ink); }
.custody__body p:first-child { margin-top: .2em; }
.custody__by { font-family: var(--f-mono); font-size: .86rem; color: var(--ink-3); margin: 0; }
.custody__by strong { color: var(--ink); }

.flow { margin: clamp(48px, 6vw, 80px) 0 0; }
.flow__steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0; }
.flow__steps li { position: relative; padding: 18px 18px 18px 14px; border-top: 2px solid var(--ink); font-size: .9rem; color: var(--ink-2); }
.flow__steps li::before { content: ""; position: absolute; top: -8px; left: -1px; width: 14px; height: 14px; border-radius: 50%; background: var(--sheet); border: 3px solid var(--ink); }
.flow__steps li:nth-child(4)::before { border-color: var(--cambium); background: var(--cambium); }
.flow__steps strong { display: block; font-family: var(--f-mono); color: var(--ink); margin: 6px 0 4px; }

/* the comment */
.comment-sec { padding: var(--sec) 0; }
.checks { margin-top: 32px; border: 1px solid var(--sheet-edge); background: var(--sheet); border-radius: 6px; font-size: .9rem; }
.checks__title { margin: 0; padding: 10px 14px; border-bottom: 1px solid var(--sheet-edge); font-family: var(--f-mono); font-weight: 700; }
.checks ul { list-style: none; margin: 0; padding: 4px 0; }
.checks li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 14px; }
.checks code { background: none; padding: 0; }
.checks__state { margin-left: auto; color: var(--ink-3); font-family: var(--f-mono); font-size: .82rem; }
.checks__btns { flex-basis: 100%; display: flex; gap: 8px; padding-left: 22px; }
.fakebtn { font-family: var(--f-mono); font-size: .76rem; padding: 3px 9px; border: 1px solid var(--rule); border-radius: 4px; color: var(--ink-2); }
.neutral-mark { width: 14px; height: 14px; border-radius: 3px; border: 2px solid var(--ink-3); position: relative; flex: none; }
.neutral-mark::after { content: ""; position: absolute; left: 2px; right: 2px; top: 4px; height: 2px; background: var(--ink-3); }

.gh { background: var(--sheet); border: 1px solid var(--sheet-edge); border-radius: 6px; box-shadow: var(--shadow); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif; font-size: .94rem; line-height: 1.55; min-width: 0; }
.gh__bar { display: flex; align-items: center; gap: 8px; padding: 10px 16px; border-bottom: 1px solid var(--sheet-edge); background: color-mix(in srgb, var(--board) 60%, var(--sheet)); border-radius: 6px 6px 0 0; font-size: .86rem; flex-wrap: wrap; }
.gh__bar img { width: 20px; height: 20px; }
.gh__bar span { color: var(--ink-3); }
.gh__body { padding: 8px clamp(16px, 3vw, 28px) 20px; }
.gh__title { font-weight: 700; margin: 12px 0 4px; }
.gh h3 { font-family: inherit; font-weight: 600; font-size: 1.05rem; margin: 22px 0 10px; padding-bottom: 4px; }
.gh p { margin: 0 0 10px; }
.gh ul { margin: 0 0 12px; padding-left: 1.4em; }
.gh li { margin-bottom: 4px; }
.gh code { font-size: .84em; }
.gh details { margin: 4px 0 12px; }
.gh summary { cursor: pointer; color: var(--ink-2); }
.gh details[open] summary { margin-bottom: 8px; }
.gh table { border-collapse: collapse; margin: 0 0 10px; display: block; overflow-x: auto; max-width: 100%; }
.gh th, .gh td { border: 1px solid var(--sheet-edge); padding: 6px 12px; text-align: left; }
.gh th { font-weight: 600; }
.gh__link { color: var(--cambium-ink); text-decoration: underline; text-underline-offset: .2em; }
.gh__meta { color: var(--ink-2); font-size: .88rem; }
.gh__sub { font-size: .78rem; color: var(--ink-3); margin-top: 18px !important; }
.gh__cap { padding: 0 clamp(16px, 3vw, 28px) 18px; margin: 0; font-family: var(--f-body); }

/* the floor: a dark cabinet band */
.cabinet { background: var(--cabinet); color: var(--cabinet-ink); padding: var(--sec) 0; --ink: var(--cabinet-ink); --ink-2: var(--cabinet-ink-2); --ink-3: var(--cabinet-ink-2); --rule: var(--cabinet-rule); --code-bg: var(--cabinet-2); --cambium-ink: var(--cabinet-green); --trivial: #8fd65c; --logic: #f0b84a; --sensitive: #ff8b7b; }
.cabinet .sec-head h2 { color: var(--cabinet-ink); }
.cabinet a { color: var(--cabinet-green); }
.floor { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); gap: clamp(24px, 4vw, 56px); align-items: start; }
.floor fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.floor legend { font-family: var(--f-mono); font-weight: 700; font-size: .95rem; margin-bottom: 12px; padding: 0; }
.floor legend span { font-weight: 400; color: var(--ink-3); }
.floor__files label { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-top: 1px solid var(--rule); cursor: pointer; flex-wrap: wrap; }
.floor__files label:last-child { border-bottom: 1px solid var(--rule); }
.floor__files label:hover { background: var(--cabinet-2); }
.floor__files code { background: none; padding: 0; color: var(--ink); }
.floor small { color: var(--ink-3); font-family: var(--f-mono); font-size: .8rem; margin-left: auto; }
.floor input[type="checkbox"] { appearance: none; width: 20px; height: 20px; margin: 0; border: 1.5px solid var(--ink-2); border-radius: 2px; display: grid; place-items: center; cursor: pointer; flex: none; }
.floor input[type="checkbox"]:checked { background: var(--cabinet-green); border-color: var(--cabinet-green); }
.floor input[type="checkbox"]:checked::after { content: ""; width: 10px; height: 5px; border: 2.5px solid var(--cabinet); border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px, -1px); }
.floor__models fieldset { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.floor__models legend { grid-column: 1 / -1; }
.sel { display: grid; gap: 6px; font-family: var(--f-mono); font-size: .88rem; color: var(--ink-2); }
.sel select { font: 700 1rem var(--f-mono); color: var(--ink); background: var(--cabinet-2); border: 1px solid var(--rule); border-radius: 3px; padding: 10px 12px; min-height: 46px; }
.check { grid-column: 1 / -1; display: flex; gap: 12px; align-items: center; font-size: .95rem; cursor: pointer; flex-wrap: wrap; }
.check small { margin-left: 0; }
.gauge { position: relative; margin: 48px 0 26px; }
.gauge__track { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--rule); border-radius: 3px; overflow: hidden; }
.gauge__track span { font-family: var(--f-mono); font-size: .82rem; text-align: center; padding: 14px 4px; color: var(--ink-3); border-left: 1px solid var(--rule); transition: color .3s, background .3s; }
.gauge__track span:first-child { border-left: 0; }
.gauge__track span.is-below { background: repeating-linear-gradient(-45deg, transparent 0 6px, color-mix(in srgb, var(--cabinet-ink) 10%, transparent) 6px 7px); color: var(--ink-3); }
.gauge__track span.is-final { color: var(--cabinet); background: var(--c, var(--cabinet-green)); font-weight: 700; }
.gauge__track span[data-step="logic"].is-final { outline: 2px dashed var(--cabinet); outline-offset: -6px; }
.gauge__track span[data-step="sensitive"].is-final { outline: 3px double var(--cabinet); outline-offset: -7px; }
.gauge__floor { position: absolute; top: -10px; bottom: -10px; width: 3px; background: var(--cabinet-ink); left: 0; transition: left .5s cubic-bezier(.16,1,.3,1); }
.gauge__floor::after { content: "floor"; position: absolute; top: -20px; left: -2px; font: 700 .7rem var(--f-mono); color: var(--cabinet-ink); letter-spacing: .06em; }
.verdict { display: flex; gap: 20px; align-items: center; }
.verdict .stamp { flex: none; transform: rotate(-8deg); }
.verdict__text { font-size: 1rem; color: var(--ink); }
.floor__note { color: var(--ink-3); margin-top: 36px; }
.floor__note .plate-no { color: var(--cabinet-ink); }

/* code plate */
.code-plate { margin: 0; min-width: 0; }
.code-plate__tab { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-family: var(--f-mono); font-size: .82rem; padding: 10px 16px; background: var(--ink); color: var(--sheet); border-radius: 4px 4px 0 0; }
.code-plate__tab span:last-child { opacity: .75; }
.code-plate pre, .term pre { margin: 0; overflow-x: auto; font-size: .88rem; line-height: 1.6; }
.code-plate pre { padding: 18px 20px; background: var(--code-bg); border: 1px solid var(--sheet-edge); border-top: 0; border-radius: 0 0 4px 4px; }
.code-plate pre code, .term pre code { background: none; padding: 0; font-size: inherit; overflow-wrap: normal; }
.c { color: var(--ink-3); font-style: italic; }
.k { color: var(--cambium-ink); font-weight: 700; }
.s { color: var(--logic); }
.facts { padding-left: 1.1em; margin: 22px 0 26px; color: var(--ink-2); }
.facts li { margin-bottom: 8px; }
.facts li::marker { color: var(--cambium); content: "\2014  "; }

/* privacy ledger */
.privacy { padding: var(--sec) 0; }
.ledger { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 2px solid var(--ink); }
.ledger__col { padding: 24px clamp(16px, 2.4vw, 32px) 12px 0; border-right: 1px solid var(--rule); }
.ledger__col + .ledger__col { padding-left: clamp(14px, 2vw, 28px); }
.ledger__col:last-child { border-right: 0; }
.ledger__col h3 { font-size: 1.5rem; margin-bottom: 12px; }
.ledger__col p { color: var(--ink-2); font-size: .98rem; }
.ledger__col--out h3 { color: var(--logic); }
.privacy__more { margin-top: 28px; }

/* phase 0 field note */
.phase { padding: 0 0 var(--sec); }
.fieldnote { position: relative; max-width: 820px; margin: 0 auto; background: var(--label); border: 1px solid var(--sheet-edge); box-shadow: var(--shadow); padding: 64px clamp(20px, 5vw, 56px) 32px; line-height: 32px; background-image: linear-gradient(var(--label), var(--label)), repeating-linear-gradient(transparent 0 31px, color-mix(in srgb, var(--rule) 60%, transparent) 31px 32px); background-size: 100% 120px, auto; background-repeat: no-repeat, repeat; background-position: 0 0, 0 -7px; }
.fieldnote h2 { font-size: clamp(1.9rem, 3.4vw, 2.7rem); line-height: 64px; margin: -32px 0 32px; font-style: italic; padding-right: 120px; }
.fieldnote code { line-height: 1; padding-block: 0; }
.fieldnote .textlink { display: inline-block; line-height: 32px; }
.fieldnote p { color: var(--ink-2); line-height: 32px; margin: 0 0 32px; max-width: 40em; }
.fieldnote strong { color: var(--ink); }
.fieldnote__stamp { position: absolute; top: 28px; right: 28px; margin: 0; padding: 8px 12px; border: 2.5px solid var(--logic); color: var(--logic); font: 700 .8rem/1 var(--f-mono); letter-spacing: .14em; text-transform: uppercase; transform: rotate(6deg); }

/* quickstart */
.term { background: #121b17; color: #e2e8dd; border-radius: 6px; box-shadow: var(--shadow); min-width: 0; }
.term__bar { display: flex; gap: 6px; align-items: center; padding: 12px 14px; border-bottom: 1px solid #26332c; }
.term__bar span { width: 10px; height: 10px; border-radius: 50%; background: #3a4a41; }
.term__bar em { margin-left: 8px; font: .78rem var(--f-mono); color: #9fb0a4; font-style: normal; }
.term pre { padding: 18px 20px 22px; }
.term .c { color: #9fb0a4; }
.term .o { color: #93d963; }

/* close */
.close { background: var(--cambium-soft); border-top: 1px solid var(--sheet-edge); padding: clamp(64px, 9vw, 120px) 0; }
.close__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px 48px; }
.close h2 { font-size: clamp(2.2rem, 4.6vw, 4rem); max-width: 12em; }
.close .actions { margin: 0; }

/* footer */
.foot { padding: 40px 0 48px; font-size: .86rem; color: var(--ink-3); border-top: 1px solid var(--rule); }
.foot__inner { display: grid; grid-template-columns: auto 1fr auto; gap: 16px 40px; align-items: start; }
.foot p { margin: 0; max-width: 56em; }
.wordmark--foot { font-size: 1.3rem; color: var(--ink); }
.wordmark--foot img { width: 22px; height: 22px; }
.foot nav { display: flex; gap: 18px; }
.foot nav a { color: var(--ink-2); }

/* motion: the graft takes once. Everything is visible at rest; motion only adds the sap line and settles the paper. */
.sap { fill: none; stroke: var(--cambium-soft); stroke-width: 3; stroke-linecap: round; opacity: 0; }
@media (prefers-reduced-motion: no-preference) {
  .takes .sap { opacity: .9; stroke-dasharray: 340; stroke-dashoffset: 340; animation: grow 1.6s cubic-bezier(.16,1,.3,1) .3s forwards, fade .8s ease-out 2s forwards; }
  .takes .cambium { stroke-dasharray: 50; stroke-dashoffset: 50; animation: grow .7s cubic-bezier(.16,1,.3,1) .2s forwards; }
  .takes .leaf, .takes .leaf-vein { animation: unfurl 1.2s cubic-bezier(.16,1,.3,1) .4s both; transform-origin: 196px 296px; }
  .takes .label { animation: swing 1s cubic-bezier(.16,1,.3,1) .3s both; transform-origin: 70% 0; }
  .takes .slip { animation: pin .9s cubic-bezier(.16,1,.3,1) .6s both; }
  .takes .sheet .stamp--sensitive { animation: stampin .5s cubic-bezier(.2,.9,.2,1) 1.2s both; }
  @keyframes grow { to { stroke-dashoffset: 0; } }
  @keyframes fade { to { opacity: 0; } }
  @keyframes unfurl { from { transform: scale(.94) rotate(-1.5deg); } to { transform: none; } }
  @keyframes swing { from { transform: translateY(-8px) rotate(1.8deg); } to { transform: none; } }
  @keyframes pin { from { transform: translateY(-6px) rotate(-4.5deg); } to { transform: rotate(-2.2deg); } }
  @keyframes stampin { from { transform: scale(1.18) rotate(-16deg); } to { transform: rotate(-12deg); } }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}

/* responsive */
@media (max-width: 1080px) {
  .top__nav { display: none; }
  .top__end { margin-left: auto; }
}
@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; }
  .wrap--split, .wrap--policy { grid-template-columns: 1fr; }
  .sec-head--side { position: static; margin-bottom: 32px; }
  .floor { grid-template-columns: 1fr; }
  .ledger { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ledger__col:nth-child(2) { border-right: 0; }
  .ledger__col:nth-child(3) { padding-left: 0; }
  .ledger__col:nth-child(n+3) { border-top: 1px solid var(--rule); }
  .flow__steps { grid-template-columns: 1fr; }
  .flow__steps li { border-top: 0; border-left: 2px solid var(--ink); padding: 10px 0 22px 24px; }
  .flow__steps li::before { top: 12px; left: -8px; }
  .flow__steps strong { margin-top: 0; }
  .foot__inner { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .problem__cols { grid-template-columns: 1fr; gap: 0; }
  .custody__row { grid-template-columns: 1fr; gap: 10px; }
  .ledger { grid-template-columns: 1fr; }
  .ledger__col, .ledger__col + .ledger__col { padding: 20px 0 6px; border-right: 0; }
  .ledger__col + .ledger__col { border-top: 1px solid var(--rule); }
  .sheet { aspect-ratio: auto; padding: 4% 4% 16px; }
  .label, .slip { position: relative; right: auto; left: auto; bottom: auto; width: auto; }
  .slip { top: auto; margin: 8px 6% 14px 4%; }
  .tag-text, .scale { display: none; }
  .sheet-label { font-size: 20px; }
  .label { margin: 0 2% 0 6%; }
  .sheet .stamp--sensitive { width: 100px; height: 100px; right: auto; left: 6%; top: 3%; }
  .sheet .stamp--sensitive span { font-size: .72rem; }
  .fieldnote h2 { padding-right: 0; line-height: 32px; margin-top: 0; }
  .fieldnote { background-size: 100% 168px, auto; }
  .fieldnote { padding-top: 96px; }
  .fieldnote__stamp { top: 18px; right: 18px; }
  .floor__models fieldset { grid-template-columns: 1fr; }
  .top__end { gap: 12px; }
  .wordmark { font-size: 1.4rem; }
  .btn { flex: 1 1 auto; justify-content: center; }
  .close .actions { width: 100%; }
}
