/* Tracer. One committed look: a blueprint. Navy drafting film, a 20 mm grid with a 100 mm major grid, white
   linework, and the cyan of a trace line. */
:root {
  --navy: #0c2848; --navy-2: #0f3157; --navy-3: #133a66; --ink: #eaf3ff; --dim: #c3d6ee; --mute: #8fa9c9;
  --line: rgba(234, 243, 255, 0.6); --line-soft: rgba(234, 243, 255, 0.28); --hot: #7ff5ff; --hot-glow: rgba(127, 245, 255, 0.45);
  --warn: #ffd166;
  --display: 'Barlow Condensed', 'Arial Narrow', 'Roboto Condensed', sans-serif;
  --mono: 'Red Hat Mono', ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; color: var(--ink); font: 15px/1.7 var(--mono);
  background-color: var(--navy);
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.07) 1px, transparent 1px),
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 100px 100px, 100px 100px, 20px 20px, 20px 20px;
}
a { color: var(--hot); }
a:hover { color: #c4fbff; }
:focus-visible { outline: 2px solid var(--hot); outline-offset: 2px; }
[hidden] { display: none !important; }
.skip { position: absolute; left: -9999px; top: 0; background: var(--hot); color: var(--navy); padding: 8px 12px; z-index: 10; }
.skip:focus { left: 8px; }
p { margin: 0; }

/* ---------- header ---------- */
.top { display: flex; align-items: center; gap: 24px; padding: 22px clamp(16px, 4vw, 44px); border-bottom: 1.5px solid var(--line-soft); }
.brand { font: 800 30px/1 var(--display); letter-spacing: 0.12em; color: var(--ink); text-decoration: none; }
.brand:hover { color: var(--ink); }
.nav { display: flex; gap: 22px; margin-left: auto; font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
.nav a { color: var(--ink); text-decoration: none; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--hot); }
.nav .nav-go { color: var(--hot); }

main { padding: 32px clamp(16px, 4vw, 44px); display: flex; flex-direction: column; gap: 40px; outline: none; max-width: 1400px; margin: 0 auto; }
.view { display: flex; flex-direction: column; gap: 28px; min-width: 0; animation: fade 0.25s ease-out; }
@keyframes fade { from { opacity: 0; } }

/* ---------- type ---------- */
.eyebrow { color: var(--hot); font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase; }
.mega { margin: 0; font: 800 clamp(60px, 7.4vw, 104px)/0.9 var(--display); text-transform: uppercase; }
.h1 { margin: 0; font: 800 clamp(44px, 5.5vw, 76px)/0.92 var(--display); text-transform: uppercase; text-wrap: balance; }
.h2 { margin: 0 0 14px; font: 800 26px/1 var(--display); text-transform: uppercase; letter-spacing: 0.04em; }
.h3 { margin: 0 0 10px; font: 600 12px/1.4 var(--mono); text-transform: uppercase; letter-spacing: 0.16em; color: var(--hot); }
.lede { max-width: 62ch; color: var(--dim); }
.fine { color: var(--mute); font-size: 12.5px; line-height: 1.6; }
.step-n { color: var(--hot); font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; }

/* ---------- drafting pieces ---------- */
.sheet { border: 1.5px solid var(--line); background: rgba(12, 40, 72, 0.55); position: relative; min-width: 0; }
.ink { stroke: var(--ink); stroke-width: 2; }
.ink-soft { stroke-opacity: 0.5; }
.offset { fill: none; stroke: var(--hot); stroke-width: 2.5; stroke-dasharray: 10 6; filter: drop-shadow(0 0 6px var(--hot-glow)); animation: march 3s linear infinite; }
@keyframes march { to { stroke-dashoffset: -64; } }
.offset-s { fill: none; stroke: var(--hot); stroke-width: 2; stroke-dasharray: 6 4; }
.dim { stroke: var(--ink); stroke-width: 1; fill: none; }
.leader { stroke: var(--hot); stroke-width: 1; }
.notch { fill: none; stroke: var(--hot); stroke-width: 2; }
.lbl text, .lbl-s { fill: var(--ink); font: 13px var(--mono); }
.lbl .hot { fill: var(--hot); }
.lbl-s { font-size: 11px; }
.paper { fill: rgba(234, 243, 255, 0.08); stroke: var(--ink); stroke-width: 1.2; }
.paper-line { fill: none; stroke: var(--line); stroke-width: 1; stroke-dasharray: 4 3; }
.titleblock { position: absolute; right: -1.5px; bottom: -1.5px; display: grid; grid-template-columns: auto auto; border: 1.5px solid var(--line); background: var(--navy); font-size: 11px; }
.titleblock span { padding: 5px 10px; border-bottom: 1px solid var(--line-soft); }
.titleblock span:nth-child(odd) { border-right: 1px solid var(--line-soft); color: var(--mute); }
.titleblock span:nth-last-child(-n + 2) { border-bottom: 0; }
@media (prefers-reduced-motion: reduce) { .offset { animation: none; } .view { animation: none; } }

/* ---------- buttons ---------- */
.actions { display: flex; flex-wrap: wrap; gap: 10px; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 18px; border: 1.5px solid var(--ink); background: transparent; color: var(--ink); font: 600 13px var(--mono); text-transform: uppercase; letter-spacing: 0.04em; text-decoration: none; cursor: pointer; }
.btn:hover { color: var(--navy); background: var(--ink); }
.btn-go { background: var(--hot); border-color: var(--hot); color: var(--navy); }
.btn-go:hover { background: #c4fbff; border-color: #c4fbff; }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* ---------- home ---------- */
.hero { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr); gap: 32px; align-items: stretch; }
.hero-fig { margin: 0; min-height: 420px; display: grid; place-items: center; padding: 16px 16px 60px; }
.hero-fig svg { width: 100%; height: auto; max-height: 520px; }
.hero-copy { display: flex; flex-direction: column; gap: 20px; justify-content: center; }
.step-row { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.step { padding: 18px; display: flex; flex-direction: column; gap: 8px; }
.step svg { width: 100%; height: auto; max-height: 170px; margin-bottom: 6px; }
.step b, .out-cards b, .method b { font: 800 22px/1.05 var(--display); text-transform: uppercase; letter-spacing: 0.02em; }
.step p, .out-cards p, .method p { color: var(--dim); font-size: 13.5px; }
.out-grid { margin: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1.5px solid var(--line); }
.out-grid > div { padding: 16px; }
.out-grid > div + div { border-left: 1px solid var(--line-soft); }
.out-grid dt { font: 800 28px/1 var(--display); color: var(--hot); }
.out-grid dd { margin: 8px 0 0; color: var(--dim); font-size: 13px; }

/* ---------- trace bench ---------- */
.bench { display: grid; grid-template-columns: minmax(0, 320px) minmax(0, 1fr); gap: 20px; align-items: start; }
.controls { padding: 18px; display: flex; flex-direction: column; gap: 16px; position: sticky; top: 16px; }
.drop { position: relative; display: flex; flex-direction: column; gap: 4px; align-items: center; justify-content: center; text-align: center; min-height: 130px; border: 1.5px dashed var(--line); cursor: pointer; padding: 14px; }
.drop:hover, .drop.is-over { border-color: var(--hot); background: rgba(127, 245, 255, 0.06); }
.drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.drop b { font: 800 26px/1 var(--display); text-transform: uppercase; }
.drop span { color: var(--mute); font-size: 12px; }
.row { display: flex; flex-direction: column; gap: 6px; font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--dim); }
.row span { display: flex; justify-content: space-between; }
.row output { color: var(--hot); font-variant-numeric: tabular-nums; }
select { min-height: 42px; border: 1.5px solid var(--line); background: var(--navy); color: var(--ink); font: 600 14px var(--mono); padding: 0 10px; }
input[type="range"] { width: 100%; accent-color: var(--hot); }
.status { border-left: 2px solid var(--hot); padding: 4px 0 4px 10px; font-size: 13px; color: var(--ink); }
.status.is-warn { border-color: var(--warn); color: var(--warn); }
.dl { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.dl .btn-go { grid-column: span 2; }
.board { margin: 0; min-height: 520px; padding: 20px 20px 72px; display: grid; place-items: center; }
.board > svg { width: 100%; height: auto; max-height: 78vh; }
.board-empty { display: flex; flex-direction: column; align-items: center; gap: 12px; color: var(--mute); font-size: 13px; text-transform: uppercase; letter-spacing: 0.12em; }
.board-empty svg { width: 180px; height: auto; }
.b-sheet { fill: rgba(234, 243, 255, 0.04); stroke: var(--line); stroke-width: 0.5; stroke-dasharray: 3 2; }
.b-tool { fill: rgba(127, 245, 255, 0.08); stroke: var(--hot); stroke-width: 0.6; filter: drop-shadow(0 0 1.5px var(--hot-glow)); }
.b-dim { stroke: var(--ink); stroke-width: 0.25; fill: none; }
.b-txt { fill: var(--ink); font: 4px var(--mono); }
.b-tag { fill: var(--navy); stroke: var(--hot); stroke-width: 0.4; }
.b-tagt { fill: var(--hot); font: 600 3.6px var(--mono); text-anchor: middle; dominant-baseline: central; }
.two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.two > .sheet { padding: 18px; }
.table-wrap { overflow-x: auto; }
.sched { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
.sched th, .sched td { text-align: left; padding: 7px 10px 7px 0; border-bottom: 1px solid var(--line-soft); white-space: nowrap; }
.sched th { color: var(--mute); font-weight: 400; font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; }
.photo-box summary { cursor: pointer; list-style: none; margin: 0; }
.photo-box summary::before { content: '+ '; }
.photo-box[open] summary::before { content: '− '; }
.photo-box[open] { display: flex; flex-direction: column; gap: 12px; }
.photo-box canvas { width: 100%; height: auto; touch-action: none; border: 1px solid var(--line-soft); cursor: crosshair; }


/* ---------- the maker: lay the pockets out, then make a bin, a tray or cut lines ---------- */
/* The layout board, the 3D view and their rules are VERTEX's (js/engine); its colour names map onto the blueprint. */
.maker {
  --teal: var(--hot); --text: var(--ink); --muted-dark: var(--mute); --line-dark: var(--line-soft); --page: var(--navy);
  --carbon: var(--navy); --carbon-2: #0a2240; --carbon-3: var(--navy-3); --font-ui: var(--mono); --font-mono: var(--mono); --font: var(--display);
  padding: 18px; display: flex; flex-direction: column; gap: 14px;
}
.maker-head { display: grid; gap: 6px; }
.maker-head .h2 { margin: 0; }
.maker-head .fine { max-width: 90ch; }
.maker-grid { display: grid; grid-template-columns: minmax(0, 360px) minmax(0, 1fr); gap: 20px; align-items: start; }
.maker-opts { display: flex; flex-direction: column; gap: 14px; }
.maker-view { position: relative; height: clamp(320px, 52vh, 560px); border: 1.5px solid var(--line); }
.maker-view .vp-off { padding: 16px; }
.checks { margin: 0; padding: 12px; border: 1px solid var(--line-soft); display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.checks legend { padding: 0 6px; margin: 0; }
.check { display: grid; grid-template-columns: auto 1fr; gap: 2px 8px; align-items: start; font-size: 13px; color: var(--ink); }
.check input { margin: 3px 0 0; accent-color: var(--hot); width: 16px; height: 16px; }
.check small { grid-column: 2; color: var(--mute); font-size: 12px; line-height: 1.45; }
.linkish { border: 0; background: none; padding: 0; color: var(--hot); font: inherit; text-decoration: underline; cursor: pointer; }
/* The board's own buttons and fields, in the blueprint's terms. */
.maker .btn-sm { min-height: 34px; padding: 0 12px; font-size: 12px; }
.maker .btn-ghost { border-color: var(--line-soft); }
.maker .input { min-height: 34px; border: 1.5px solid var(--line); background: var(--navy); color: var(--ink); font: 600 13px var(--mono); padding: 0 8px; }
.maker .danger { color: #ff8a7a; border-color: #ff8a7a; }
.maker .danger:hover { background: #ff8a7a; color: var(--navy); }
.tl-board { border-radius: 0 !important; }
.tl-rail section { border-radius: 0 !important; }
.tl-label text { font-family: var(--display) !important; letter-spacing: 0.04em; }
.tl-editor { display: grid; gap: 8px; margin: 10px 0 16px; }
.tl-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; font-size: 13.5px; }
.tl-bar select.input { width: auto; padding: 4px 6px; }
.tl-state { margin-left: auto; font-size: 13px; color: var(--muted-dark); }
.tl-state.is-bad { color: #ff8a7a; }
.tl-lib { border: 1px solid var(--line-dark); border-radius: 12px; padding: 8px 10px; max-height: 240px; overflow: auto; }
.tl-lib ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.tl-lib li { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 13.5px; }
.tl-lib small { color: var(--muted-dark); }
.tl-board { width: 100%; max-height: 62vh; background: var(--carbon-2); border: 1px solid color-mix(in srgb, var(--teal) 38%, var(--line-dark)); border-radius: 12px; touch-action: none; user-select: none; }
.tl-bin { fill: #103459; stroke: rgba(234, 243, 255, 0.6); stroke-width: 0.8; }
.tl-room { fill: none; stroke: rgba(234, 243, 255, 0.6); stroke-width: 0.3; stroke-dasharray: 2 2; }
.tl-grid { stroke: rgba(234, 243, 255, 0.14); stroke-width: 0.4; }
.tl-pocket { fill: color-mix(in srgb, var(--teal) 34%, transparent); stroke: var(--teal); stroke-width: 0.6; cursor: grab; }
.tl-pocket.is-sel { fill: color-mix(in srgb, var(--teal) 50%, transparent); stroke-width: 1; }
.tl-pocket.is-bad { fill: rgb(255 110 90 / 0.4); stroke: #ff6e5a; }
.tl-stalk { stroke: #ff8a3d; stroke-width: 0.5; }
.tl-turn { fill: #ff8a3d; stroke: #0c2848; stroke-width: 0.6; cursor: grab; }
.tl-pin { fill: #eaf3ff; stroke: #ff8a3d; stroke-width: 0.5; cursor: move; }
.tl-sel { display: grid; gap: 6px; font-size: 13.5px; }
.tl-sel-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.tl-sel-row small, .tl-hint { color: var(--muted-dark); font-size: 12.5px; margin: 0; }
.tl-sel .input { width: 70px; padding: 4px 6px; }
.tl-photo { opacity: .9; pointer-events: none; }
.tl-photo.is-on { opacity: 1; }
.tl-pocket.is-shaping { fill: color-mix(in srgb, var(--teal) 12%, transparent); stroke-width: .8; }
.tl-raw { fill: none; stroke: #ff8a3d; stroke-width: .5; stroke-dasharray: 1.5 1.2; pointer-events: none; }
.tl-brush { fill: rgba(158, 196, 181, .12); stroke: #9ec4b5; stroke-width: .45; pointer-events: none; }
.tl-brush.is-erase { fill: rgba(255, 138, 61, .12); stroke: #ff8a3d; }
.tl-protect { fill: rgba(158, 196, 181, .14); stroke: #9ec4b5; stroke-width: .5; stroke-dasharray: 2 1.4; pointer-events: none; }
.tl-paint { flex-wrap: wrap; gap: 6px; }
.tl-board:has(.tl-brush) { cursor: crosshair; }
.tl-round { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }
.tl-round input { width: 110px; }
.tl-offset, .tl-zoom { display: inline-flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.tl-offset b { margin-right: 4px; font-size: 13px; }
.tl-offset input { width: 70px; padding: 4px 6px; }
.tl-zoom { margin-left: auto; }
.tl-zoom output { min-width: 44px; text-align: center; font: 12px var(--font-mono); color: var(--muted-dark); }
.tl-chip { border: 1px solid var(--line-dark); background: transparent; color: var(--text); border-radius: 99px; padding: 3px 10px; font-size: 13px; cursor: pointer; }
.tl-chip.is-on { background: var(--teal); border-color: var(--teal); color: var(--carbon); }
.tl-label { cursor: move; }
.tl-label rect { pointer-events: all; }
.tl-label rect { fill: color-mix(in srgb, var(--page) 70%, transparent); stroke: var(--muted-dark); stroke-width: .3; stroke-dasharray: 1 .8; }
.tl-label text { fill: var(--text); font-family: var(--font-ui); font-weight: 700; pointer-events: none; }
.tl-label.is-sel rect { stroke: var(--teal); stroke-width: .5; stroke-dasharray: none; }
.tl-label.is-bad rect { stroke: #ff6e5a; stroke-dasharray: none; }
.tl-ltext { width: 12em; padding: 4px 8px; }
.tl-del { cursor: pointer; }
.tl-del circle { fill: #e0604f; stroke: #fff; stroke-width: .5; }
.tl-del path { stroke: #fff; stroke-width: .9; stroke-linecap: round; pointer-events: none; }
.tl-work { display: grid; grid-template-columns: minmax(0, 1fr) 190px; gap: 12px; align-items: start; }
.tl-main { display: grid; gap: 10px; min-width: 0; }
.tl-rail { display: grid; gap: 10px; position: sticky; top: 70px; }
.tl-rail section { border: 1px solid var(--line-dark); border-radius: 10px; padding: 8px; display: grid; gap: 2px; background: var(--carbon-2); }
.tl-rail h4 { margin: 0 0 4px; font: 600 11px/1.3 var(--font-ui); letter-spacing: .06em; text-transform: uppercase; color: var(--muted-dark); display: flex; justify-content: space-between; }
.tl-rail h4 output { text-transform: none; letter-spacing: 0; color: var(--text); }
.tl-rbtn { display: flex; align-items: center; gap: 8px; width: 100%; padding: 6px 8px; border: 0; border-radius: 7px; background: transparent; color: var(--text); font: 500 13px/1.2 var(--font-ui); cursor: pointer; text-align: left; }
.tl-rbtn:hover:not(:disabled) { background: color-mix(in srgb, var(--teal) 14%, transparent); }
.tl-rbtn:disabled { opacity: .4; cursor: default; }
.tl-rpair { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; }
.tl-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; max-height: 260px; overflow: auto; }
.tl-list li { display: flex; align-items: center; border: 1px solid var(--line-dark); border-radius: 8px; overflow: hidden; }
.tl-list li.is-sel { border-color: var(--teal); }
.tl-list li.is-bad { border-color: #e0604f; }
.tl-list li > button:first-child { flex: 1; min-width: 0; display: flex; align-items: center; gap: 6px; padding: 6px 8px; border: 0; background: transparent; color: var(--text); font: 500 12.5px/1.2 var(--font-ui); cursor: pointer; text-align: left; }
.tl-list li > button:first-child span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tl-list .tl-x { border: 0; background: transparent; color: var(--muted-dark); font-size: 16px; padding: 4px 9px; cursor: pointer; }
.tl-list .tl-x:hover { color: #e0604f; }
.tl-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--teal); flex: none; }
.tl-pocket.is-shape { stroke-dasharray: 2 1.2; fill: color-mix(in srgb, #f4b860 35%, transparent); stroke: #f4b860; }
.tl-bar > label { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.tl-bar > label select.input { min-width: 64px; }
@media (max-width: 760px) {
  .tl-work { grid-template-columns: 1fr; }
  .tl-rail { position: static; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
}
@media (max-width: 1000px) { .maker-grid { grid-template-columns: minmax(0, 1fr); } }

.vp { position: relative; overflow: hidden; background: radial-gradient(90% 70% at 50% 45%, #133a66 0%, var(--carbon-2) 70%), var(--carbon-2); }
.vp::before { content: ''; position: absolute; inset: 0; background-image: linear-gradient(rgba(234, 243, 255, 0.06) 1px, transparent 1px), linear-gradient(90deg, rgba(234, 243, 255, 0.06) 1px, transparent 1px); background-size: 42px 42px; background-position: center; mask-image: radial-gradient(70% 70% at 50% 55%, #000 30%, transparent 80%); pointer-events: none; }
.vp canvas { position: relative; width: 100%; height: 100%; display: block; touch-action: none; cursor: grab; }
.vp canvas:active { cursor: grabbing; }
.vp-tools { position: absolute; top: 12px; left: 12px; right: 12px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; pointer-events: none; }
.vp-tools > * { pointer-events: auto; }
.vp-seg { display: inline-flex; padding: 3px; gap: 2px; background: color-mix(in srgb, var(--page) 85%, transparent); border: 1px solid var(--line-dark); border-radius: 10px; backdrop-filter: blur(6px); }
.vp-seg button { border: 0; background: transparent; color: var(--muted-dark); font: 500 12.5px/1 var(--font-ui); padding: 8px 11px; border-radius: 7px; cursor: pointer; }
.vp-seg button[aria-pressed='true'] { background: var(--carbon-3); color: var(--text); }
.vp-seg [data-vp-fit] { border-left: 1px solid var(--line-dark); border-radius: 0 7px 7px 0; }
.vp-swatches { display: inline-flex; gap: 6px; padding: 6px; background: color-mix(in srgb, var(--page) 85%, transparent); border: 1px solid var(--line-dark); border-radius: 10px; }
.vp-swatches button { width: 22px; height: 22px; border-radius: 50%; border: 2px solid transparent; cursor: pointer; }
.vp-swatches button[aria-pressed='true'] { border-color: var(--text); }
.vp-c0 { background: #9ec4b5; } .vp-c1 { background: #f6eed9; } .vp-c2 { background: #494949; } .vp-c3 { background: #e8891c; }
.vp-hint { position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%); width: max-content; max-width: calc(100% - 24px); margin: 0; padding: 6px 10px; border-radius: 12px; background: color-mix(in srgb, var(--page) 85%, transparent); color: var(--muted-dark); font: 500 12px/1.3 var(--font-ui); text-align: center; pointer-events: none; transition: opacity 0.4s; }
.vp-hint-gone { opacity: 0; }
.vp-stats { position: absolute; left: 12px; bottom: 12px; display: flex; flex-wrap: wrap; gap: 8px; pointer-events: none; max-width: calc(100% - 24px); }
.vp-hint:has(~ .vp-stats:not(:empty)) { bottom: 72px; }
.vp-stats div { background: color-mix(in srgb, var(--page) 88%, transparent); border: 1px solid var(--line-dark); border-radius: 10px; padding: 7px 11px; display: grid; gap: 4px; backdrop-filter: blur(6px); }
.vp-stats span { font: 500 10px/1 var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted-dark); }
.vp-stats b { font: 700 14px/1 var(--font); }
@media (max-width: 600px) { .vp-seg button { padding: 8px 8px; } .vp-stats div:nth-child(n + 3) { display: none; } }

/* ---------- method / outputs ---------- */
.method { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.method li, .out-cards article { padding: 18px; display: flex; flex-direction: column; gap: 8px; }
.tips { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; border-top: 1px solid var(--line-soft); max-width: 80ch; }
.tips li { padding: 10px 0 10px 22px; border-bottom: 1px solid var(--line-soft); color: var(--dim); position: relative; }
.tips li::before { content: '→'; position: absolute; left: 0; color: var(--hot); }
.out-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.out-cards a { font-size: 13px; margin-top: auto; }

/* ---------- footer ---------- */
.foot { border-top: 1.5px solid var(--line-soft); padding-top: 16px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; font-size: 12px; color: var(--mute); }
.foot a { color: var(--dim); }

/* ---------- smaller screens ---------- */
@media (max-width: 1000px) {
  .hero, .bench, .two { grid-template-columns: minmax(0, 1fr); }
  .controls { position: static; }
  .out-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .out-grid > div:nth-child(3) { border-left: 0; }
  .out-grid > div:nth-child(n + 3) { border-top: 1px solid var(--line-soft); }
}
@media (max-width: 760px) {
  .top { flex-wrap: wrap; gap: 12px; padding: 16px; }
  .nav { order: 3; width: 100%; margin-left: 0; justify-content: space-between; gap: 10px; font-size: 12px; }
  .top .mmn { margin-left: auto; }
  main { padding: 24px 16px; }
  .hero-fig { min-height: 0; padding-bottom: 64px; }
  .step-row, .method, .out-cards { grid-template-columns: minmax(0, 1fr); }
  .board { min-height: 320px; padding: 12px 12px 92px; }
}
@media (max-width: 420px) {
  .out-grid { grid-template-columns: minmax(0, 1fr); }
  .out-grid > div + div { border-left: 0; border-top: 1px solid var(--line-soft); }
  .titleblock { font-size: 10px; }
}
