/* Landing, lab and boards pages. Shares tokens with styles.css and item rendering with board.css. */
.site { min-height: 100dvh; overflow-x: clip; background: var(--board); }
.site main { max-width: 1320px; margin: 0 auto; padding: 0 32px; }

/* ---------------------------------------------------------------- nav */
.nav { position: sticky; top: 0; z-index: 70; display: flex; align-items: center; gap: 28px; max-width: 1320px; margin: 0 auto; padding: 14px 32px; background: var(--board); box-shadow: -100vw 0 0 var(--board), 100vw 0 0 var(--board); }
.brand { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: var(--ink); }
.brand svg { width: 30px; height: 30px; }
.brand span { font: 800 1.5rem/1 var(--font-hand); font-variation-settings: "INFM" 20, "BNCE" 0; letter-spacing: -0.03em; }
.nav-links { display: flex; gap: 4px; margin-right: auto; }
.nav-links a { padding: 8px 12px; border-radius: 10px; text-decoration: none; font-weight: 550; font-size: 0.9375rem; color: var(--ink-2); transition: background-color 140ms ease, color 140ms ease; }
@media (hover: hover) { .nav-links a:hover { background: var(--board-2); color: var(--ink); } }
.nav-actions { display: flex; align-items: center; gap: 8px; }

/* hand-drawn strokes that draw themselves */
.draw path, .hl-stroke path, .hint-arrow path { stroke-dasharray: 1; stroke-dashoffset: 1; }
.drawn path, .is-in .draw path { animation: draw 900ms var(--ease-out) forwards; }

@keyframes draw { to { stroke-dashoffset: 0; } }

/* ---------------------------------------------------------------- hero */
.hero { display: grid; grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr); gap: 56px; align-items: center; min-height: min(calc(100dvh - 72px), 860px); padding: 24px 0 72px; }
.hero h1 {
  margin: 0; font: 760 clamp(3rem, 6.1vw, 5.75rem)/0.94 var(--font-hand);
  font-variation-settings: "INFM" 24, "BNCE" 4; letter-spacing: -0.035em; text-wrap: balance;
}
.hero h1 .line { display: block; animation: line-in 700ms var(--ease-out) both; }
.hero h1 .line + .line { animation-delay: 90ms; }
@keyframes line-in { from { opacity: 0; transform: translateY(18px); } }
.hl-wrap { position: relative; width: fit-content; isolation: isolate; }
.hl-stroke { position: absolute; z-index: -1; left: -3%; bottom: 0.02em; width: 106%; height: 0.58em; overflow: visible; }
.hl-stroke path { fill: none; stroke: var(--yellow); stroke-width: 34; stroke-linecap: round; opacity: 0.62; animation: draw 760ms var(--ease-out) 520ms forwards; }
.lede { max-width: 33rem; margin: 28px 0 32px; font-size: 1.1875rem; line-height: 1.55; color: var(--ink-2); animation: line-in 700ms var(--ease-out) 180ms both; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; animation: line-in 700ms var(--ease-out) 260ms both; }
.actions .btn { min-height: 52px; padding: 0 26px; font-size: 1rem; }
.hint { position: relative; margin: 46px 0 0; max-width: 18rem; font-size: 1.125rem; line-height: 1.3; color: var(--red); font-weight: 560; transform: rotate(-2deg); animation: fade 400ms ease 1100ms both; }
.hint-arrow { position: absolute; left: calc(100% + 4px); top: -34px; width: 120px; height: 70px; overflow: visible; }
.hint-arrow path { fill: none; stroke: var(--red); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; animation: draw 700ms var(--ease-out) 1300ms forwards; }
.hint-arrow path + path { animation-delay: 1850ms; animation-duration: 260ms; }
.new-error { color: var(--red); font-weight: 600; }
.hero-demo { min-width: 0; animation: line-in 800ms var(--ease-out) 200ms both; }

/* ---------------------------------------------------------------- the two-replica demo */
.demo { display: grid; gap: 18px; }
.demo-boards { display: grid; grid-template-columns: minmax(0, 1fr) 64px minmax(0, 1fr); align-items: center; }
.replica { margin: 0; display: grid; gap: 10px; min-width: 0; }
.replica-cap { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; }
.who { display: inline-flex; align-items: baseline; gap: 7px; min-width: 0; white-space: nowrap; overflow: hidden; }
.who i { width: 9px; height: 9px; border-radius: 50%; flex: none; align-self: center; }
.who b { font-weight: 650; }
.who span { color: var(--ink-3); font-size: 0.875rem; overflow: hidden; text-overflow: ellipsis; }
.replica-board {
  position: relative; aspect-ratio: 600 / 390; overflow: hidden; border-radius: 20px; touch-action: none; cursor: crosshair;
  background: #fff; box-shadow: 0 1px 2px rgba(23,25,30,.06), 0 18px 44px -18px rgba(23,25,30,.3);
  transition: box-shadow 400ms var(--ease-out);
}
.replica-board .world { position: absolute; left: 0; top: 0; width: 600px; height: 390px; transform-origin: 0 0; }
.replica-board .item .text, .replica-board .item textarea { font-size: 17px; }
.replica-board .item.note .text { padding: 12px 13px; }
.replica-board .cursor { position: absolute; left: 0; top: 0; z-index: 5; pointer-events: none; transition: none; }
.demo.agree .replica-board { box-shadow: 0 0 0 2.5px var(--green), 0 18px 44px -18px rgba(19,138,79,.35); }
.wire { position: relative; height: 100%; display: flex; align-items: center; justify-content: center; z-index: 2; }
.wire svg { position: absolute; left: -6px; right: -6px; top: 50%; width: calc(100% + 12px); height: 20px; transform: translateY(-50%); overflow: visible; }
.wire .v { display: none; }
.wire path { fill: none; stroke: var(--ink); stroke-width: 2.5; vector-effect: non-scaling-stroke; transition: stroke 200ms ease; }
.demo.cut .wire .wire-mid { stroke: transparent; }
.demo.cut .wire .wire-a, .demo.cut .wire .wire-b { stroke: var(--red); stroke-dasharray: 4 5; }
.wire circle { fill: var(--blue); stroke: #fff; stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.wire circle.held { fill: var(--red); }
.wire-btn {
  position: relative; z-index: 2; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; border: 0;
  background: #fff; color: var(--ink); box-shadow: var(--float); transition: transform 140ms var(--ease-out), background-color 160ms ease, color 160ms ease;
}
.wire-btn span { position: absolute; top: calc(100% + 8px); left: 50%; transform: translateX(-50%); white-space: nowrap; font-size: 0.8125rem; font-weight: 650; color: var(--ink-2); pointer-events: none; background: var(--board); padding: 2px 8px; border-radius: 999px; z-index: 3; }
.wire-btn:active { transform: scale(0.92); }
.wire-btn[aria-pressed="true"] { background: var(--red); color: #fff; }
.demo-caption {
  margin: 0; min-height: 2.6em; font: 600 1.25rem/1.3 var(--font-hand); font-variation-settings: "INFM" 60, "BNCE" 16;
  color: var(--ink); text-align: center; text-wrap: balance;
}
.demo-caption.in { animation: caption-in 420ms var(--ease-out); }
@keyframes caption-in { from { opacity: 0; transform: translateY(6px); filter: blur(2px); } }
.demo.compact .demo-boards { grid-template-columns: minmax(0, 1fr) 46px minmax(0, 1fr); }
.demo.compact .wire-btn span { display: none; }

/* ---------------------------------------------------------------- tray */
.tray { padding: 120px 0 40px; }
.tray-copy { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; align-items: end; margin-bottom: 36px; }
.site h2 { margin: 0; font: 750 clamp(2.25rem, 4.2vw, 3.75rem)/1 var(--font-hand); font-variation-settings: "INFM" 28, "BNCE" 4; letter-spacing: -0.03em; text-wrap: balance; }
.tray-copy p { margin: 0; max-width: 34rem; color: var(--ink-2); font-size: 1.125rem; }
.tray-board {
  position: relative; height: clamp(380px, 42vw, 560px); overflow: hidden; border-radius: 28px;
  background-color: #fff; box-shadow: 0 1px 2px rgba(23,25,30,.06), 0 30px 70px -30px rgba(23,25,30,.35);
}
.tray-board .world { position: absolute; left: 0; top: 0; transform-origin: 0 0; }
.tray-board .item { pointer-events: none; }
.tray-sizer { height: 1px; }

/* ---------------------------------------------------------------- merge (scroll-driven stage) */
.merge { padding: 140px 0 60px; }
.merge > h2 { max-width: 15ch; margin-bottom: 56px; }
.merge-grid { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 64px; }
.steps { list-style: none; margin: 0; padding: 0; }
.step { min-height: 62vh; padding: 12vh 0; opacity: 0.32; transition: opacity 400ms var(--ease-out); }
.step:first-child { padding-top: 4vh; }
.step.on { opacity: 1; }
.step h3 { margin: 0 0 14px; font: 700 1.75rem/1.15 var(--font-hand); font-variation-settings: "INFM" 40, "BNCE" 6; letter-spacing: -0.02em; text-wrap: balance; }
.step p { margin: 0 0 12px; color: var(--ink-2); font-size: 1.0625rem; max-width: 30rem; }
.step .crdt { color: var(--ink-3); font-size: 0.9375rem; }
.step .crdt b { color: var(--ink); font-weight: 650; }
.stage { position: relative; }
.stage-sticky { position: sticky; top: calc(50vh - 220px); }

/* ---------------------------------------------------------------- paper + terminal */
.paper { padding: 120px 0; }
.paper-copy p { margin: 22px 0 0; max-width: 40rem; color: var(--ink-2); font-size: 1.0625rem; }
.paper-copy .btn { margin-top: 30px; }
.term {
  margin: 0; padding: 26px 28px; border-radius: 22px; background: var(--ink); color: #e8eaee; overflow-x: auto; white-space: pre-wrap; overflow-wrap: anywhere;
  font: 400 0.875rem/1.75 var(--font-data); box-shadow: 0 30px 70px -32px rgba(23,25,30,.6);
}
.term .ok { color: #7fe0a6; }
.term .dim { color: #8a919c; }
.term .cmd { color: #fff; }

/* ---------------------------------------------------------------- flow diagram */
.flow { padding: 80px 0 120px; }
.flow h2 { margin-bottom: 40px; }
.flow-figure { margin: 0; }
.flow-figure svg { display: block; width: 100%; height: auto; overflow: visible; }
.fl-box path { fill: #fff; stroke: var(--ink); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.fl-arrow { fill: none; stroke: var(--blue); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.fl-t1 { font: 700 23px var(--font-hand); fill: var(--ink); }
.fl-t2 { font: 500 16px var(--font-ui); fill: var(--ink-3); }
.fl-t3 { font: 600 17px var(--font-hand); fill: var(--blue); }
.flow-figure path { stroke-dasharray: 1; stroke-dashoffset: 1; }
.flow-figure.is-in path { animation: draw 1100ms var(--ease-out) forwards; }
.flow-figure.is-in .fl-arrow { animation-delay: 700ms; animation-duration: 800ms; }
.flow-figure text { opacity: 0; transition: opacity 600ms ease 500ms; }
.flow-figure.is-in text { opacity: 1; }

/* ---------------------------------------------------------------- close + footer */
.close { padding: 100px 0 140px; text-align: center; display: grid; justify-items: center; }
.close h2 { font-size: clamp(3rem, 8vw, 7rem); }
.close p { margin: 20px 0 32px; color: var(--ink-2); font-size: 1.1875rem; max-width: 34rem; }
.close .btn { min-height: 56px; padding: 0 30px; font-size: 1.0625rem; }
.foot { max-width: 1320px; margin: 0 auto; padding: 0 32px 40px; color: var(--ink-3); font-size: 0.9375rem; overflow: hidden; }
.foot-mark { margin: 0 0 18px; font: 800 clamp(5rem, 22vw, 20rem)/0.8 var(--font-hand); font-variation-settings: "INFM" 40, "BNCE" 10; letter-spacing: -0.05em; color: var(--board-2); user-select: none; }
.foot-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 32px; }
.foot p { margin: 0; }
.foot a { color: var(--ink-2); }

/* ---------------------------------------------------------------- lab page */
.lab-page { padding-bottom: 100px; }
.lab-intro { max-width: 46rem; padding: 40px 0 36px; }
.lab-intro h1 { margin: 0 0 18px; font: 760 clamp(2.75rem, 5.5vw, 4.75rem)/0.98 var(--font-hand); font-variation-settings: "INFM" 26, "BNCE" 4; letter-spacing: -0.035em; }
.lab-intro p { margin: 0; font-size: 1.125rem; color: var(--ink-2); }
.lab { display: grid; gap: 18px; }
.lab-panes { display: grid; gap: 16px; }
.lab-3 .lab-panes { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.lab-pane { min-width: 0; display: flex; flex-direction: column; gap: 12px; padding: 16px; background: #fff; border-radius: 22px; box-shadow: var(--float); transition: box-shadow 300ms var(--ease-out); }
.lab-pane.agree { box-shadow: 0 0 0 2.5px var(--green), var(--float); }
.lab-pane-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.lab-pane-name { display: inline-flex; align-items: center; gap: 8px; font-weight: 650; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lab-tag { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--ink); color: #fff; font: 600 0.75rem/1 var(--font-data); flex: none; }
.lab-text {
  width: 100%; min-height: 110px; resize: none; padding: 14px 16px; border: 0; border-radius: 4px;
  background: var(--sun); color: var(--ink); font: 500 1.25rem/1.3 var(--font-hand); font-variation-settings: "INFM" 55, "BNCE" 18;
  box-shadow: 0 1px 1px rgba(23,25,30,.06), 0 10px 22px -10px rgba(23,25,30,.28);
}
.lab-text:focus { outline: 2.5px solid var(--focus); outline-offset: 3px; }
.lab-board { position: relative; height: 96px; border-radius: 12px; background: var(--board); overflow: hidden; }
.lab-chip { position: absolute; width: 24px; height: 18px; border-radius: 3px; box-shadow: 0 1px 2px rgba(23,25,30,.25); transition: left 500ms var(--ease-out), top 500ms var(--ease-out), background-color 300ms; }
.lab-chip.rect { border-radius: 6px; width: 28px; box-shadow: inset 0 0 0 2px var(--ink); }
.lab-chip.ellipse { border-radius: 50%; box-shadow: inset 0 0 0 2px var(--ink); }
.lab-chip.ink { width: 18px; height: 4px; border-radius: 2px; }
.lab-chip.arrive { animation: chip-in 380ms var(--ease-out); }
@keyframes chip-in { from { transform: scale(0.4); opacity: 0; } }
.lab-meta { margin: 0; color: var(--ink-3); font-size: 0.75rem; }
.lab-net { display: grid; grid-template-columns: 300px 1fr 1fr; grid-template-areas: "svg controls sliders" "svg verdict sliders" "svg isolate stats"; align-items: center; gap: 10px 28px; padding: 22px; background: #fff; border-radius: 22px; box-shadow: var(--float); }
.lab-net svg { grid-area: svg; width: 100%; height: auto; max-height: 150px; overflow: visible; }
.lab-controls { grid-area: controls; display: flex; flex-wrap: wrap; gap: 8px; }
.lab-verdict { grid-area: verdict; margin: 0; font-weight: 650; display: flex; align-items: center; gap: 10px; }
.lab-verdict::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--orange); flex: none; }
.lab-verdict[data-state="same"]::before { background: var(--green); box-shadow: 0 0 0 4px rgba(19,138,79,.18); }
.lab-verdict[data-state="cut"]::before { background: var(--red); }
.edge { stroke: var(--ink); stroke-width: 2.5; transition: stroke 200ms; }
.edge.cut { stroke: var(--red); stroke-dasharray: 5 7; }
.edge-hit { stroke: transparent; stroke-width: 24; cursor: pointer; }
.edge-hit:focus-visible { stroke: rgba(31,79,214,.25); outline: none; }
.node { fill: #fff; stroke: var(--ink); stroke-width: 2.5; }
.node-label { font: 600 13px var(--font-data); text-anchor: middle; fill: var(--ink); }
.packet { fill: var(--blue); stroke: #fff; stroke-width: 1.2; }
.packet.held { fill: var(--red); }
.lab-sliders { grid-area: sliders; display: grid; gap: 12px; }
.lab-slider { display: grid; gap: 6px; font-weight: 600; font-size: 0.875rem; }
.lab-slider-top { display: flex; justify-content: space-between; gap: 8px; }
.lab-slider input { width: 100%; accent-color: var(--ink); }
.lab-isolate { grid-area: isolate; display: flex; flex-wrap: wrap; gap: 4px; }
.lab-stats { grid-area: stats; display: grid; grid-template-columns: auto auto; gap: 3px 16px; margin: 0; font-size: 0.8125rem; justify-content: start; }
.lab-stats dt { color: var(--ink-3); }
.lab-stats dd { margin: 0; text-align: right; font-family: var(--font-data); }
.lab-notes { max-width: 46rem; margin-top: 64px; }
.lab-notes h2 { font-size: 2rem; margin-bottom: 18px; }
.lab-notes ol { padding-left: 1.2em; display: grid; gap: 12px; margin: 0 0 18px; color: var(--ink-2); }
.lab-notes b { color: var(--ink); }
.muted { color: var(--ink-3); }

/* ---------------------------------------------------------------- boards page */
.boards-page { padding: clamp(40px, 7vw, 88px) 0 120px; }
.boards-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 36px; }
.boards-head h1 { margin: 0; font: 760 clamp(2.5rem, 5vw, 4rem)/1 var(--font-hand); font-variation-settings: "INFM" 26, "BNCE" 4; letter-spacing: -0.035em; }
.boards-head p { margin: 10px 0 0; color: var(--ink-3); max-width: 36rem; }
.board-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 28px 22px; list-style: none; margin: 0; padding: 0; }
.board-card { position: relative; display: grid; gap: 12px; text-decoration: none; color: inherit; animation: card-in 420ms var(--ease-out) both; animation-delay: calc(var(--n, 0) * 40ms); }
@keyframes card-in { from { opacity: 0; transform: translateY(10px); } }
.board-thumb { position: relative; aspect-ratio: 4 / 3; border-radius: 18px; overflow: hidden; background: #fff; box-shadow: 0 1px 2px rgba(23,25,30,.06), 0 14px 34px -16px rgba(23,25,30,.3); transition: transform 260ms var(--ease-out), box-shadow 260ms var(--ease-out); }
.board-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.board-thumb .blank { position: absolute; inset: 0; display: grid; place-items: center; color: var(--ink-3); font: 600 1.125rem var(--font-hand); }
@media (hover: hover) and (pointer: fine) { .board-card:hover .board-thumb { transform: translateY(-3px); box-shadow: 0 2px 4px rgba(23,25,30,.06), 0 24px 44px -18px rgba(23,25,30,.38); } }
.board-card:active .board-thumb { transform: scale(0.985); }
.board-meta { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 0 4px; }
.board-meta b { font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board-meta span { color: var(--ink-3); font-size: 0.8125rem; white-space: nowrap; }
.board-forget { position: absolute; top: 10px; right: 10px; width: 34px; height: 34px; border-radius: 10px; border: 0; display: grid; place-items: center; background: rgba(255,255,255,.92); color: var(--ink-2); box-shadow: var(--float); opacity: 0; transition: opacity 140ms ease; }
.board-forget svg { width: 18px; height: 18px; }
.board-card:hover .board-forget, .board-forget:focus-visible { opacity: 1; }
@media (hover: none) { .board-forget { opacity: 1; } }
.board-new { display: grid; place-items: center; aspect-ratio: 4 / 3; border-radius: 18px; border: 0; background: var(--board-2); color: var(--ink-2); font: 650 1rem var(--font-ui); gap: 8px; transition: background-color 160ms ease, transform 160ms var(--ease-out); }
.board-new span { display: grid; justify-items: center; gap: 8px; }
.board-new svg { width: 28px; height: 28px; }
@media (hover: hover) { .board-new:hover { background: var(--board-3); } }
.board-new:active { transform: scale(0.985); }
.boards-note { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; margin: 0 0 30px; padding: 16px 18px; border-radius: 16px; background: #fff; box-shadow: var(--float); }
.boards-note p { margin: 0; color: var(--ink-2); }
.boards-empty { padding: 60px 0; color: var(--ink-3); font-size: 1.0625rem; }
.section-label { margin: 48px 0 18px; font: 700 1.375rem/1.2 var(--font-hand); font-variation-settings: "INFM" 40; }

/* ---------------------------------------------------------------- auth callback */
.callback { min-height: 100dvh; display: grid; place-items: center; text-align: center; padding: 24px; }
.callback h1 { font: 700 2rem/1.1 var(--font-hand); margin: 0 0 10px; }
.callback p { color: var(--ink-3); margin: 0 0 22px; }

/* ---------------------------------------------------------------- responsive */
@media (max-width: 1080px) {
  .hero { grid-template-columns: 1fr; gap: 40px; min-height: 0; padding-top: 28px; }
  .hint { display: none; }
  .tray-copy, .paper { grid-template-columns: 1fr; gap: 28px; }
  .merge-grid { grid-template-columns: 1fr; gap: 0; }
  .stage { order: -1; position: sticky; top: 64px; z-index: 5; background: var(--board); padding: 8px 0 12px; }
  .stage-sticky { position: static; }
  .step { min-height: 0; padding: 32px 0; }
  .lab-3 .lab-panes { grid-template-columns: 1fr; }
  .lab-net { grid-template-columns: 1fr 1fr; grid-template-areas: "svg svg" "controls controls" "verdict verdict" "sliders stats" "isolate isolate"; }
}
@media (max-width: 720px) {
  .site main, .nav, .foot { padding-left: 16px; padding-right: 16px; }
  .nav { gap: 12px; }
  .nav-links { display: none; }
  .nav-actions { margin-left: auto; }
  .hero h1 { font-size: clamp(2.75rem, 13vw, 4rem); }
  .lede { font-size: 1.0625rem; }
  .demo-boards { grid-template-columns: 1fr; grid-template-rows: auto 64px auto; }
  .demo.compact .demo-boards { grid-template-columns: 1fr; grid-template-rows: auto 46px auto; }
  .wire svg { left: 50%; right: auto; top: -6px; bottom: -6px; width: 20px; height: calc(100% + 12px); transform: translateX(-50%) rotate(0deg); }
  .wire { flex-direction: column; }
  .wire .h { display: none; }
  .wire .v { display: inline; }
  .wire-btn span { top: 50%; left: calc(100% + 10px); transform: translateY(-50%); }
  .demo.compact .wire-btn span { display: block; }
  .tray { padding-top: 80px; }
  /* too wide to shrink to a phone, so the board scrolls sideways like a real one */
  .tray-board { height: 340px; border-radius: 22px; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; overscroll-behavior-x: contain; }
  .tray-board::-webkit-scrollbar { display: none; }
  .merge { padding-top: 90px; }
  .merge > h2 { margin-bottom: 24px; }
  .stage { top: 58px; }
  .paper { padding: 80px 0; }
  .term { font-size: 0.75rem; padding: 18px; }
  .flow-figure { overflow-x: auto; margin: 0 -16px; padding: 0 16px; scrollbar-width: none; }
  .flow-figure svg { min-width: 680px; }
  .close { padding: 60px 0 100px; }
  .lab-net { grid-template-columns: 1fr; grid-template-areas: "svg" "controls" "verdict" "sliders" "stats" "isolate"; }
  .board-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 20px 14px; }
}
