/* ============================================================
   ARCHITECTOOL — v1.1 stylesheet
   Strict black & white. Greys are tints of black only.
   Every page is a stack of full-window "screens" that snap gently.
   ============================================================ */

:root {
  --ink: #000;
  --paper: #fff;
  --tint-1: #f3f3f3;
  --tint-2: #e4e4e4;
  --rule: 1px solid #000;
  --hair: 1px solid #e0e0e0;
  --serif: 'Instrument Serif', 'Times New Roman', serif;
  --sans: 'Space Grotesk', 'Helvetica Neue', Arial, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, Menlo, monospace;
  --bar: 48px;
  --tbar: 46px;
  --pad: 18px;
  --vh: 100svh;
}
@supports not (height: 100svh) { :root { --vh: 100vh; } }

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
  -webkit-text-size-adjust: 100%;
  /* screen-by-screen paging is handled in js/core/pager.js */
}
body {
  background: var(--paper); color: var(--ink);
  font-family: var(--sans); font-size: 14px; line-height: 1.45;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: #000; color: #fff; }
:focus-visible { outline: 2px solid #000; outline-offset: 2px; }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 8px; top: 8px; z-index: 999; background: #000; color: #fff; padding: 8px 12px; }

.caption {
  font-family: var(--mono); font-size: 10px; line-height: 1.5;
  letter-spacing: .06em; text-transform: uppercase;
}
.muted { opacity: .55; }

/* ---------- Masthead ---------- */
.masthead {
  position: sticky; top: 0; z-index: 60;
  display: grid; grid-template-columns: auto minmax(0, 1fr);
  height: var(--bar); background: #fff; border-bottom: var(--rule);
}
.wordmark {
  display: flex; align-items: center; padding: 0 var(--pad);
  font-weight: 700; font-size: 13px; letter-spacing: .16em; text-decoration: none;
  border-right: var(--rule);
}
.wordmark sup { font: 400 9px var(--mono); letter-spacing: 0; margin-left: 5px; }
.nav { display: flex; overflow-x: auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav a {
  display: flex; align-items: center; gap: 8px; flex: 0 0 auto;
  padding: 0 16px; border-right: var(--rule);
  text-decoration: none; font-size: 12.5px; font-weight: 500; white-space: nowrap;
  transition: background .18s, color .18s;
}
.nav a .n { font: 400 10px var(--mono); }
.nav a:hover { background: var(--tint-1); }
.nav a.active { background: #000; color: #fff; }

/* ---------- Screens ---------- */
.view { outline: none; }
.screen {
  min-height: calc(var(--vh) - var(--bar));
  border-bottom: var(--rule);
  display: flex; flex-direction: column;
}
.screen.fixed { height: calc(var(--vh) - var(--bar)); min-height: 520px; }
.screen:empty { display: none; }

.view.enter > * { animation: rise .45s cubic-bezier(.2,.7,.1,1) both; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .view.enter > * { animation: none; } }
.loading, .error { padding: 60px var(--pad); }
.error h2 { font: 400 40px/1 var(--serif); margin-bottom: 12px; }

/* ---------- Compact tool bar ---------- */
.toolbar {
  position: relative; flex: 0 0 auto; height: var(--tbar);
  display: flex; align-items: center; gap: 14px;
  padding: 0 var(--pad); border-bottom: var(--rule);
}
.toolbar .no { font: 400 11px var(--mono); }
.toolbar h1 { font: 400 26px/1 var(--serif); letter-spacing: -.01em; white-space: nowrap; }
.toolbar h1 em { font-style: italic; }
.toolbar .kick { opacity: .5; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.toolbar .sp { flex: 1; }
.tb-slot { display: flex; gap: 0; }
.tb-slot .btn + .btn { border-left: 0; }
.info-btn {
  flex: 0 0 auto; width: 26px; height: 26px; border: var(--rule); background: #fff; cursor: pointer;
  font: 400 15px/1 var(--serif); font-style: italic; transition: background .15s, color .15s;
}
.info-btn:hover, .info-btn[aria-expanded=true] { background: #000; color: #fff; }
.info-pop {
  position: absolute; right: var(--pad); top: calc(100% + 8px); z-index: 40;
  width: min(440px, calc(100vw - 32px)); background: #fff; border: var(--rule);
  padding: 16px 18px; display: none; box-shadow: 6px 6px 0 #000;
}
.info-pop.on { display: block; animation: rise .2s both; }
.info-pop p + p { margin-top: 10px; }
.info-pop .lede { font-size: 15px; line-height: 1.4; }

/* ---------- Workbench (one screen) ---------- */
.workbench {
  flex: 1; min-height: 0;
  display: grid;
  grid-template-columns: clamp(240px, 20vw, 290px) minmax(0, 1fr) clamp(220px, 18vw, 270px);
  grid-template-areas: "panel stage out";
}
.panel { grid-area: panel; border-right: var(--rule); padding: 0 var(--pad) 20px; overflow-y: auto; min-height: 0; scrollbar-width: thin; }
.stage-wrap { grid-area: stage; position: relative; border-right: var(--rule); min-width: 0; min-height: 0; }
.stage { position: absolute; inset: 0; overflow: hidden; background: #fff; }
.stage > svg, .stage > canvas { display: block; width: 100%; height: 100%; }
.outputs { grid-area: out; min-width: 0; min-height: 0; overflow-y: auto; scrollbar-width: thin; }

.workbench.v-list { grid-template-columns: clamp(220px, 19vw, 270px) minmax(0, 1fr); grid-template-areas: "panel stage"; }
.workbench.v-list .outputs { display: none; }
.workbench.v-list .stage-wrap { border-right: 0; }
.workbench.v-list .stage { overflow-y: auto; }
.workbench.v-board { grid-template-columns: 1fr; grid-template-areas: "stage"; }
.workbench.v-board .panel, .workbench.v-board .outputs { display: none; }
.workbench.v-board .stage-wrap { border-right: 0; }

.panel-h {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 14px 0 6px; border-bottom: var(--rule);
}
.panel-h b { font-weight: 500; }

/* collapsible groups */
details.group { border-bottom: var(--rule); }
details.group > summary {
  list-style: none; cursor: pointer; user-select: none;
  display: grid; grid-template-columns: 1fr auto 14px; gap: 8px; align-items: baseline;
  padding: 13px 0 9px;
}
details.group > summary::-webkit-details-marker { display: none; }
details.group > summary .val { opacity: .5; text-transform: none; letter-spacing: 0; }
details.group > summary::after { content: '+'; font: 400 13px/1 var(--mono); text-align: right; }
details.group[open] > summary::after { content: '−'; }
details.group > summary:hover { opacity: .7; }
details.group > .gbody { padding-bottom: 8px; }
details.group[open] > .gbody { animation: rise .25s both; }
.outputs details.group > summary { padding-left: var(--pad); padding-right: var(--pad); }
.outputs details.group > .gbody { padding-bottom: 0; }

.stage-cap {
  position: absolute; left: 14px; top: 12px; right: 14px; pointer-events: none;
  display: flex; justify-content: space-between; gap: 16px; z-index: 2;
}
.stage-tools { position: absolute; right: 14px; bottom: 12px; z-index: 3; display: flex; }
.stage-tools .btn + .btn { border-left: 0; }
.stage-hint { position: absolute; left: 14px; bottom: 14px; z-index: 2; pointer-events: none; opacity: .5; }

/* ---------- Fields ---------- */
.field { padding: 8px 0 3px; border-bottom: var(--hair); }
.field-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.field label, .field .lbl { font-size: 12.5px; }
.field .num { display: inline-flex; align-items: baseline; gap: 4px; }
.field .unit { font: 400 10px var(--mono); min-width: 1.6em; }
.field input[type=number], .field input[type=text], .field input.numfield {
  width: 84px; border: 0; border-bottom: 1px solid #000; background: transparent;
  font: 500 14px var(--sans); text-align: right; padding: 1px 0; border-radius: 0;
  font-variant-numeric: tabular-nums; -moz-appearance: textfield; appearance: textfield;
}
.field input::-webkit-outer-spin-button, .field input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.field.hidden { display: none; }
.field .hint { margin-top: -2px; padding-bottom: 4px; opacity: .5; }

input[type=range] {
  -webkit-appearance: none; appearance: none; display: block;
  width: 100%; height: 22px; background: transparent; cursor: ew-resize; margin-top: 1px;
}
input[type=range]::-webkit-slider-runnable-track { height: 1px; background: #000; }
input[type=range]::-moz-range-track { height: 1px; background: #000; }
input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 13px; height: 13px; margin-top: -6px;
  background: #000; border: 0; border-radius: 0; transition: transform .12s;
}
input[type=range]::-moz-range-thumb { width: 13px; height: 13px; background: #000; border: 0; border-radius: 0; }
input[type=range]:active::-webkit-slider-thumb { transform: scale(1.3); }
input[type=range]:focus-visible { outline: none; }
input[type=range]:focus-visible::-webkit-slider-thumb { outline: 2px solid #000; outline-offset: 3px; }

.seg { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); border: var(--rule); margin: 6px 0 4px; }
.seg button {
  background: #fff; border: 0; border-right: var(--rule); padding: 7px 4px;
  font-size: 11.5px; font-weight: 500; cursor: pointer; transition: background .15s, color .15s;
}
.seg button:last-child { border-right: 0; }
.seg button:hover { background: var(--tint-1); }
.seg button[aria-pressed=true] { background: #000; color: #fff; }
.seg.forms button { padding: 6px 2px 4px; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.seg.forms svg { width: 24px; height: 24px; }
.seg.forms button[aria-pressed=true] svg .f { fill: #fff; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: space-between; gap: 10px;
  border: var(--rule); background: #fff; padding: 8px 12px; border-radius: 0;
  font-size: 12.5px; font-weight: 500; cursor: pointer; text-decoration: none; text-align: left; white-space: nowrap;
  transition: background .15s, color .15s;
}
.btn:hover { background: #000; color: #fff; }
.btn.solid { background: #000; color: #fff; }
.btn.solid:hover { background: #fff; color: #000; }
.btn.small { padding: 5px 9px; font-size: 11.5px; }
.btn.block { display: flex; width: 100%; }
.btn[aria-pressed=true] { background: #000; color: #fff; }
.btn .arr { font-family: var(--mono); font-size: 11px; }
.btn-link { background: none; border: 0; border-bottom: 1px solid #000; cursor: pointer; font-size: 11px; padding: 0; }

.actions { display: grid; padding: 12px var(--pad) 16px; }
.actions .btn + .btn { border-top: 0; }
.actions .caption { margin-bottom: 8px; }

/* ---------- Readouts ---------- */
.readout { padding: 10px var(--pad); border-bottom: var(--rule); }
.readout .l { display: flex; justify-content: space-between; gap: 8px; }
.readout .v {
  font-size: clamp(21px, 1.8vw, 28px); font-weight: 500; letter-spacing: -.03em; line-height: 1.05;
  font-variant-numeric: tabular-nums; display: inline-block; margin-top: 3px;
}
.readout .u { font-size: 11.5px; margin-left: 5px; font-weight: 400; }
.readout .s { margin-top: 2px; opacity: .5; font-size: 9.5px; }
.readout.key { background: #000; color: #fff; padding-top: 14px; padding-bottom: 14px; }
.readout.key .v { font: 400 clamp(40px, 3.6vw, 60px)/.95 var(--serif); letter-spacing: -.02em; }
.readout.key .s { opacity: .7; }
.mini-table div { display: flex; justify-content: space-between; border-bottom: var(--hair); padding: 5px 0; font-size: 12.5px; font-variant-numeric: tabular-nums; }

.warn { padding: 9px var(--pad); border-bottom: var(--rule); display: none; gap: 8px; align-items: flex-start; }
.warn.on { display: flex; }
.warn::before { content: ''; flex: 0 0 8px; height: 8px; margin-top: 3px; background: #000; }

/* ---------- Secondary screens ---------- */
.sec-head {
  display: flex; justify-content: space-between; gap: 16px; align-items: baseline;
  padding: 14px var(--pad); border-bottom: var(--rule); flex: 0 0 auto;
}
.sec-head h2 { font: 400 26px/1 var(--serif); letter-spacing: -.01em; }
.sheet-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); flex: 0 0 auto; }
.sheet-grid .row {
  padding: 11px var(--pad); border-right: var(--hair); border-bottom: var(--hair);
  display: grid; gap: 3px; align-content: start;
}
.sheet-grid .f { font: 400 11.5px/1.5 var(--mono); }
.sheet-grid .r { font-size: 17px; font-weight: 500; font-variant-numeric: tabular-nums; }
.note { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 14px; padding: 18px var(--pad); margin-top: auto; border-top: var(--rule); }
.note .mark { font: 400 36px/.8 var(--serif); }
.note p { max-width: 100ch; }

.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); flex: 1; min-height: 0; }
.split > * { min-width: 0; display: flex; flex-direction: column; min-height: 0; }
.split > * + * { border-left: var(--rule); }
.split .sec-head { border-bottom: 0; }
.fill-svg { flex: 1; min-height: 0; padding: 0 var(--pad) 14px; }
.fill-svg svg { width: 100%; height: 100%; display: block; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 16px; bottom: 16px; z-index: 200;
  background: #000; color: #fff; padding: 10px 14px; max-width: 360px;
  font: 400 10.5px/1.5 var(--mono); letter-spacing: .05em; text-transform: uppercase;
  transform: translateY(20px); opacity: 0; transition: transform .25s, opacity .25s; pointer-events: none;
}
.toast.on { transform: none; opacity: 1; }

/* ---------- SVG drawing conventions ---------- */
.drawing text { font-family: var(--mono); fill: #000; }
.drawing .t-serif { font-family: var(--serif); }
.drawing .thin { stroke: #000; stroke-width: 1; vector-effect: non-scaling-stroke; fill: none; }
.drawing .bold { stroke: #000; stroke-width: 2; vector-effect: non-scaling-stroke; fill: none; }
.drawing .grid { stroke: #ececec; stroke-width: 1; vector-effect: non-scaling-stroke; }
.drawing .dim line { stroke: #000; stroke-width: .75; vector-effect: non-scaling-stroke; }
.drawing .dim .tick { stroke-width: 1.6; }
.drawing .draggable { cursor: grab; }
.drawing .draggable:active { cursor: grabbing; }

/* ---------- Home ---------- */
.hero { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); flex: 1; min-height: 0; }
.hero-text { padding: 28px var(--pad) 22px; display: flex; flex-direction: column; justify-content: space-between; gap: 24px; border-right: var(--rule); min-height: 0; }
.hero h1 { font: 400 min(6.6vw, 11.5vh)/.9 var(--serif); letter-spacing: -.03em; }
.hero h1 em { font-style: italic; }
.hero-sub { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: end; }
.hero-sub p.big { font-size: 16px; line-height: 1.38; max-width: 36ch; }
.hero-sub p.big.strong { font: 400 min(2.2vw, 3.6vh)/1.1 var(--serif); margin-bottom: 10px; max-width: 24ch; }
.hero-art { position: relative; min-height: 0; cursor: crosshair; }
.hero-art canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.hero-art .caption { position: absolute; left: 14px; bottom: 12px; right: 14px; display: flex; justify-content: space-between; pointer-events: none; }

.ticker { border-top: var(--rule); overflow: hidden; white-space: nowrap; padding: 8px 0; flex: 0 0 auto; }
.ticker div { display: inline-block; animation: tick 60s linear infinite; }
.ticker span { margin-right: 44px; }
@keyframes tick { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .ticker div { animation: none; } }

.index-list { flex: 1; display: grid; grid-template-rows: auto repeat(6, minmax(0, 1fr)); min-height: 0; }
.index-head { display: flex; justify-content: space-between; padding: 12px var(--pad); border-bottom: var(--rule); }
.index-row {
  display: grid; grid-template-columns: 80px minmax(0, 5fr) minmax(0, 4fr) 120px 40px;
  align-items: center; gap: 18px; padding: 0 var(--pad);
  border-bottom: var(--hair); text-decoration: none; position: relative; overflow: hidden; z-index: 0;
  transition: color .25s;
}
.index-row:last-child { border-bottom: 0; }
.index-row::before {
  content: ''; position: absolute; inset: 0; background: #000; transform: scaleY(0); transform-origin: bottom;
  transition: transform .35s cubic-bezier(.2,.7,.1,1); z-index: -1;
}
.index-row:hover { color: #fff; }
.index-row:hover::before { transform: scaleY(1); }
.index-row .no { font: 400 min(3.2vw, 5vh)/.9 var(--serif); }
.index-row .name { font: 400 min(4vw, 6.4vh)/.95 var(--serif); letter-spacing: -.02em; white-space: nowrap; }
.index-row .desc { font-size: 13px; max-width: 46ch; }
.index-row .go { font: 400 20px var(--mono); text-align: right; transition: transform .3s; }
.index-row:hover .go { transform: translateX(6px); }
.index-row .glyph svg { width: 100px; height: min(60px, 7vh); display: block; }
.index-row .glyph svg * { stroke: currentColor; }
.index-row .glyph svg .f { fill: currentColor; }

.about { flex: 1; display: grid; grid-template-rows: minmax(0, 1fr) minmax(0, 1.2fr); min-height: 0; }
.principles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-bottom: var(--rule); }
.principles > div { padding: 22px var(--pad); display: flex; flex-direction: column; justify-content: space-between; gap: 16px; }
.principles > div + div { border-left: var(--rule); }
.principles h3 { font: 400 min(2.6vw, 4.4vh)/1 var(--serif); letter-spacing: -.01em; margin-top: 10px; }
.principles p { max-width: 40ch; font-size: 13.5px; }
.later { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
.later > div { padding: 22px var(--pad); }
.later > div + div { border-left: var(--rule); overflow: auto; }
.later h2 { font: 400 min(3.6vw, 6vh)/.95 var(--serif); letter-spacing: -.02em; margin-top: 10px; }
.later ol { list-style: none; counter-reset: l; }
.later li { counter-increment: l; display: grid; grid-template-columns: 36px 1fr auto; gap: 10px; padding: 7px 0; border-bottom: var(--hair); align-items: baseline; font-size: 13px; }
.later li::before { content: counter(l, decimal-leading-zero); font: 400 10px var(--mono); }
.later li .tag { font: 400 9px var(--mono); text-transform: uppercase; letter-spacing: .06em; border: var(--rule); padding: 1px 5px; }

.colophon { padding: 0 var(--pad) 18px; }
/* the last screen of a page shares the window with the footer */
#view > .screen.fixed.with-foot { height: calc(var(--vh) - var(--bar) - var(--foot, 240px)); min-height: 340px; overflow: hidden; }
#view > .screen.with-foot .index-row .name { font-size: min(3.4vw, 4.6vh); }
#view > .screen.with-foot .index-row .no { font-size: min(2.4vw, 3.6vh); }
#view > .screen.with-foot .index-row .glyph svg { height: min(48px, 5vh); }
#view > .screen.with-foot .index-row .desc { font-size: 12.5px; }
@media (min-width: 761px) { .index-row, .index-head, .verb:last-child, .claim { padding-right: 44px; } }
.sheet-wrap { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.sheet-wrap .sheet-grid { flex: 1; min-height: 0; overflow-y: auto; grid-auto-rows: minmax(min-content, 1fr); scrollbar-width: thin; }
.sheet-wrap .sheet-grid .row { align-content: space-between; padding-top: 14px; padding-bottom: 14px; }
.sheet-wrap .sheet-grid .r { font-size: clamp(18px, 1.7vw, 26px); letter-spacing: -.02em; }
.sheet-screen .note { margin-top: 0; }

/* side index of screens */
.pager { position: fixed; right: 10px; top: 50%; transform: translateY(-50%); z-index: 70; display: grid; gap: 2px; }
.pager button { display: flex; align-items: center; justify-content: flex-end; gap: 8px; background: none; border: 0; padding: 4px 0; cursor: pointer; }
.pager i { width: 7px; height: 7px; border: 1px solid #000; background: #fff; display: block; transition: background .2s, transform .2s; }
.pager button[aria-current=true] i { background: #000; transform: scale(1.25); }
.pager .lbl { font: 400 9.5px var(--mono); letter-spacing: .06em; text-transform: uppercase; background: #fff; padding: 1px 5px; opacity: 0; transform: translateX(6px); transition: opacity .2s, transform .2s; pointer-events: none; }
.pager button:hover .lbl, .pager button[aria-current=true] .lbl { opacity: 1; transform: none; }
.pager button[aria-current=true] .lbl { opacity: .0; }
.pager:hover button .lbl { opacity: 1; transform: none; }
@media (max-width: 760px) { .pager { display: none !important; } }
.colophon-big { font: 700 clamp(40px, 10.4vw, 170px)/.8 var(--sans); letter-spacing: -.05em; padding-top: 22px; margin-left: -.04em; white-space: nowrap; overflow: hidden; }
.colophon-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; padding-top: 14px; border-top: var(--rule); margin-top: 14px; }

/* ---------- Home: centred hero ---------- */
.hero.split-hero { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); flex: 1; min-height: 0; }
.hero.split-hero .hero-center { border-right: var(--rule); }
.hero.split-hero .hero-art .caption { display: none; }
.hero.center .hero-art { position: absolute; inset: 0; opacity: .2; cursor: default; }
.hero.center .hero-art .caption { display: none; }
.hero-center { position: relative; z-index: 1; height: 100%; min-height: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 24px var(--pad); gap: min(4.2vh, 36px); }
.hero-center h1 { font: 400 min(5.4vw, 10.5vh)/.95 var(--serif); letter-spacing: -.03em; max-width: 20ch; }
.hero-center h1 em { font-style: italic; }
.hero-lead { font: 400 min(1.6vw, 3vh)/1.38 var(--sans); max-width: 32ch; letter-spacing: -.01em; display: grid; gap: .6em; }
.hero-lead .lead-strong { font-weight: 500; }
.hero-cta { display: flex; gap: 0; }
.hero-cta .btn { padding: 12px 18px; font-size: 14px; min-width: 210px; }
.hero-cta .btn + .btn { border-left: 0; }

/* ---------- Home: verbs + claim ---------- */
.verbs { flex: 1; min-height: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-bottom: var(--rule); }
.verb { display: flex; flex-direction: column; justify-content: space-between; gap: 18px; padding: 22px var(--pad); text-decoration: none; position: relative; z-index: 0; overflow: hidden; transition: color .3s; }
.verb + .verb { border-left: var(--rule); }
.verb::before { content: ''; position: absolute; inset: 0; background: #000; transform: scaleY(0); transform-origin: bottom; transition: transform .4s cubic-bezier(.2,.7,.1,1); z-index: -1; }
.verb:hover { color: #fff; }
.verb:hover::before { transform: scaleY(1); }
.verb .caption { display: flex; justify-content: space-between; }
.verb .vglyph { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; }
.verb .vglyph svg { width: min(80%, 220px); height: auto; max-height: 100%; transition: transform .5s cubic-bezier(.2,.7,.1,1); }
.verb:hover .vglyph svg { transform: scale(1.06) translateY(-4px); }
.verb h2 { font: 400 min(3.4vw, 6vh)/.95 var(--serif); letter-spacing: -.02em; }
.verb p { font-size: 13.5px; max-width: 30ch; opacity: .75; }
.claim { flex: 0 0 auto; display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); align-items: end; gap: 24px; padding: 24px var(--pad) 28px; }
.claim-right { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.claim .btn { padding: 12px 18px; font-size: 14px; }
.claim-no { font-size: 15px; line-height: 1.45; max-width: 36ch; }
.claim-big { font: 400 min(4.4vw, 7.5vh)/.95 var(--serif); letter-spacing: -.025em; }
.claim-big em { font-style: italic; }

/* ---------- Library ---------- */
.lib-search {
  width: 100%; border: 0; border-bottom: 2px solid #000; padding: 6px 0; margin-top: 6px;
  font: 400 24px var(--serif); background: transparent; border-radius: 0;
}
.lib-search::placeholder { color: #000; opacity: .3; }
.q { padding: 14px 0 4px; }
.cats { display: grid; margin-top: 8px; border-top: var(--rule); }
.cats button {
  display: flex; justify-content: space-between; align-items: baseline; gap: 10px;
  background: #fff; border: 0; border-bottom: var(--hair); padding: 6px 0; cursor: pointer; text-align: left;
  font-size: 12.5px; transition: padding .2s;
}
.cats button .c { font: 400 10px var(--mono); }
.cats button:hover { padding-left: 5px; }
.cats button[aria-pressed=true] { font-weight: 700; padding-left: 9px; box-shadow: inset 3px 0 0 #000; }
.lib-head { position: sticky; top: 0; background: #fff; z-index: 2; padding: 12px var(--pad); border-bottom: var(--rule); display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.lib-head h2 { font: 400 26px/1 var(--serif); }
.lib-row {
  display: grid; grid-template-columns: 34px minmax(0, 3fr) minmax(0, 4fr) minmax(0, 2fr) 74px;
  gap: 16px; padding: 11px var(--pad); border-bottom: var(--hair); align-items: baseline;
}
.lib-row .i { font: 400 10px var(--mono); }
.lib-row .nm { font: 400 22px/1 var(--serif); }
.lib-row .pv { margin-top: 3px; opacity: .6; }
.lib-row .ds { font-size: 13px; }
.lib-row .tg { display: flex; flex-wrap: wrap; gap: 4px; }
.lib-row .tg span { font: 400 9px var(--mono); text-transform: uppercase; letter-spacing: .05em; border: var(--hair); padding: 1px 5px; }
.lib-row .vs { text-align: right; }
.lib-empty { padding: 50px var(--pad); font: 400 28px/1 var(--serif); }

/* ---------- Mix type rows ---------- */
.type-row {
  display: grid; grid-template-columns: 22px minmax(0, 1fr) 46px 40px 16px; gap: 6px; align-items: center;
  padding: 6px 0; border-bottom: var(--hair);
}
.type-row.head { padding: 6px 0 2px; border-bottom: var(--rule); }
.type-row .sw { width: 22px; height: 14px; outline: 1px solid #000; outline-offset: -1px; display: block; }
.type-row input {
  width: 100%; border: 0; border-bottom: 1px solid #000; background: transparent; padding: 1px 0; border-radius: 0;
  font: 500 13px var(--sans); font-variant-numeric: tabular-nums; -moz-appearance: textfield; appearance: textfield;
}
.type-row input[type=number] { text-align: right; }
.type-row input::-webkit-outer-spin-button, .type-row input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.type-row .x { background: none; border: 0; font: 400 14px var(--mono); cursor: pointer; padding: 0; }
.type-row .x:disabled { opacity: .2; cursor: default; }
.type-row .meta { grid-column: 2 / -1; opacity: .5; }

/* ---------- Workflow board ---------- */
.board { position: absolute; inset: 0; overflow: hidden; touch-action: none; cursor: grab;
  background-image: radial-gradient(#d4d4d4 1px, transparent 1.2px); background-size: 22px 22px; }
.board.panning { cursor: grabbing; }
.world { position: absolute; left: 0; top: 0; transform-origin: 0 0; will-change: transform; }
.wires { position: absolute; left: 0; top: 0; overflow: visible; pointer-events: none; }
.wires .rope { fill: none; stroke: #000; stroke-width: 1.3; }
.wires .rope.q { stroke-dasharray: 3 4; }
.wires .flow { fill: none; stroke: #000; stroke-width: 3.2; stroke-linecap: round; stroke-dasharray: 0.1 18; animation: flow 1.6s linear infinite; }
.wires .draw { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw .8s cubic-bezier(.3,.6,.2,1) forwards; }
.wires .pin { fill: #fff; stroke: #000; stroke-width: 1.3; }
@keyframes flow { to { stroke-dashoffset: -18.1; } }
@keyframes draw { to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) { .wires .flow { animation: none; } .wires .draw { animation: none; stroke-dashoffset: 0; } }

.node {
  position: absolute; width: 200px; background: #fff; border: var(--rule);
  padding: 9px 11px 10px; cursor: pointer; user-select: none; -webkit-user-select: none;
  transition: box-shadow .15s, transform .15s, background .15s;
  animation: pop .4s cubic-bezier(.2,.8,.2,1.1) both;
}
@keyframes pop { from { opacity: 0; transform: scale(.85); } to { opacity: 1; transform: none; } }
.node:hover { box-shadow: 5px 5px 0 #000; transform: translate(-2px, -2px); }
.node.dragging { box-shadow: 8px 8px 0 #000; transform: translate(-3px, -3px); cursor: grabbing; transition: none; z-index: 5; }
.node .n-top { display: flex; justify-content: space-between; align-items: center; }
.node .n-title { font-size: 15px; font-weight: 500; line-height: 1.15; margin: 6px 0 8px; letter-spacing: -.01em; }
.node .n-meta { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; min-height: 16px; }
.node .badge { border: var(--rule); padding: 0 4px; font: 400 9px/14px var(--mono); letter-spacing: .04em; }
.node .badge.solid { background: #000; color: #fff; }
.node .dots { display: inline-flex; gap: 3px; margin-left: auto; }
.node .dots i { width: 6px; height: 6px; border: 1px solid #000; display: block; }
.node .tick { width: 12px; height: 12px; border: var(--rule); display: inline-block; }
.node.done { background: var(--tint-1); }
.node.done .tick { background: #000; }
.node.done .n-title { text-decoration: line-through; text-decoration-thickness: 1px; }
.node.q { background: #000; color: #fff; border-color: #000; }
.node.q .n-title { font: 400 21px/1.05 var(--serif); margin: 4px 0 4px; }
.node.q:hover { box-shadow: 5px 5px 0 #9a9a9a; }
.node.custom { border-style: dashed; }

.board-tools { position: absolute; right: 14px; top: 12px; z-index: 5; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.board-tools .grp { display: flex; }
.board-tools .grp .btn + .btn { border-left: 0; }
.board-title { position: absolute; left: 14px; top: 12px; z-index: 5; pointer-events: none; }
.board-title .big { font: 400 22px/1 var(--serif); margin-top: 4px; }

/* ---------- Modal ---------- */
.modal-back {
  position: fixed; inset: 0; z-index: 150; background: rgba(255,255,255,.72);
  display: flex; align-items: center; justify-content: center; padding: 16px;
  animation: fade .18s both;
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.modal {
  width: min(520px, 100%); max-height: calc(100svh - 32px); overflow: auto; background: #fff; border: var(--rule);
  box-shadow: 10px 10px 0 #000; animation: rise .25s both;
}
.modal header { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; border-bottom: var(--rule); position: sticky; top: 0; background: #fff; z-index: 1; }
.modal .x { background: none; border: 0; font: 400 18px var(--mono); cursor: pointer; }
.modal .mbody { padding: 14px 16px 6px; display: grid; gap: 12px; }
.modal h3 { font: 400 28px/1 var(--serif); }
.modal label.f { display: grid; gap: 4px; }
.modal input[type=text], .modal textarea, .modal select {
  width: 100%; border: 0; border-bottom: 1px solid #000; padding: 4px 0; background: transparent; border-radius: 0; font-size: 14px;
}
.modal input.title { font: 400 26px/1.1 var(--serif); }
.modal textarea { resize: vertical; min-height: 64px; line-height: 1.45; border: var(--hair); padding: 8px; }
.modal select { cursor: pointer; }
.modal .chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; border: var(--rule); padding: 3px 7px; background: #fff;
  font: 400 10.5px var(--mono); text-decoration: none; letter-spacing: .02em; cursor: pointer;
}
a.chip:hover { background: #000; color: #fff; }
.chip.solid { background: #000; color: #fff; }
.chip button { background: none; border: 0; cursor: pointer; font: inherit; padding: 0 0 0 2px; }
.modal .check { display: flex; gap: 8px; align-items: center; font-size: 13px; cursor: pointer; }
.modal .check input { width: 16px; height: 16px; accent-color: #000; }
.modal footer { display: flex; flex-wrap: wrap; gap: 0; padding: 12px 16px 16px; }
.modal footer .btn + .btn { border-left: 0; }
.modal footer .sp { flex: 1; }
.opts { display: grid; border: var(--rule); }
.opts button {
  display: grid; grid-template-columns: 24px 1fr; gap: 6px; align-items: baseline; text-align: left;
  background: #fff; border: 0; border-bottom: var(--rule); padding: 9px 12px; cursor: pointer;
  font-size: 14px; transition: background .15s, color .15s;
}
.opts button:last-child { border-bottom: 0; }
.opts button .k { font: 400 10px var(--mono); }
.opts button:hover { background: var(--tint-1); }
.opts button[aria-pressed=true] { background: #000; color: #fff; }
.trace li { list-style: none; padding: 6px 0; border-bottom: var(--hair); font: 400 11.5px/1.5 var(--mono); }

/* ---------- Responsive: medium (small laptops / tablets) ---------- */
@media (max-width: 1100px) {
  .workbench {
    grid-template-columns: clamp(230px, 28vw, 280px) minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr) auto;
    grid-template-areas: "panel stage" "panel out";
  }
  .stage-wrap { border-right: 0; }
  .outputs { border-top: var(--rule); overflow: visible; }
  .outputs-inner { display: flex; overflow-x: auto; }
  .outputs-inner > .readout { flex: 1 0 160px; border-bottom: 0; border-right: var(--hair); }
  .outputs-inner > .readout.key { flex: 0 0 auto; min-width: 200px; }
  .outputs-inner > details, .outputs-inner > .actions, .outputs-inner > .warn { display: none; }
  .index-row { grid-template-columns: 60px minmax(0, 1fr) minmax(0, 1fr) 30px; }
  .index-row .glyph { display: none; }
  .lib-row { grid-template-columns: 30px minmax(0, 2fr) minmax(0, 3fr) 70px; }
  .lib-row .tg { display: none; }
  .toolbar .kick { display: none; }
}

/* ---------- Responsive: phones ---------- */
@media (max-width: 760px) {
  :root { --pad: 14px; }
  .screen.fixed { height: auto; min-height: 0; }
  .screen { min-height: 0; }
  .workbench, .workbench.v-list {
    display: flex; flex-direction: column; min-height: 0;
  }
  .stage-wrap { order: -1; position: sticky; top: var(--bar); z-index: 20; height: 44svh; min-height: 260px; border-bottom: var(--rule); background: #fff; }
  .workbench.v-list .stage-wrap { position: static; height: auto; order: 0; }
  .workbench.v-list .stage { position: static; }
  .workbench.v-board .stage-wrap { height: calc(var(--vh) - var(--bar) - var(--tbar)); position: relative; }
  .panel { border-right: 0; overflow: visible; }
  .outputs { overflow: visible; }
  .outputs-inner { display: block; }
  .outputs-inner > .readout { border-right: 0; border-bottom: var(--rule); }
  .outputs-inner > details, .outputs-inner > .actions { display: block; }
  .outputs-inner > .warn.on { display: flex; }
  .toolbar h1 { font-size: 22px; }
  .hero, .later, .split, .principles, .hero-sub, .colophon-grid, .verbs, .claim { grid-template-columns: 1fr; }
  .verb + .verb { border-left: 0; border-top: var(--rule); }
  .hero-center h1 { font-size: 13vw; } .hero-lead { font-size: 19px; } .hero-cta { flex-direction: column; width: 100%; } .hero-cta .btn + .btn { border-left: var(--rule); border-top: 0; }
  .hero.split-hero { grid-template-columns: 1fr; } .hero.split-hero .hero-center { border-right: 0; padding: 28px var(--pad) 36px; } .hero.split-hero .hero-art { order: -1; min-height: 0; height: 46svh; border-top: 0; border-bottom: var(--rule); }
  .verb h2 { font-size: 34px; } .verb .vglyph svg { width: 140px; } .claim-big { font-size: 38px; } .hero-sub p.big.strong { font-size: 24px; }
  .hero-text { border-right: 0; }
  .hero h1 { font-size: 15vw; }
  .hero-art { min-height: 300px; border-top: var(--rule); }
  .index-list { grid-template-rows: auto; }
  .index-row { grid-template-columns: 44px minmax(0, 1fr) 24px; gap: 10px; padding: 14px var(--pad); }
  .index-row .no { font-size: 28px; } .index-row .name { font-size: 34px; }
  .index-row .desc { display: none; }
  .about { grid-template-rows: auto; }
  .split > * + *, .principles > div + div, .later > div + div { border-left: 0; border-top: var(--rule); }
  .lib-row { grid-template-columns: minmax(0, 1fr) 64px; }
  .lib-row .i, .lib-row .ds { display: none; }
  .nav a { padding: 0 11px; }
  .nav a .t { display: none; }
  .nav a .n { font-size: 12px; }
  .stage-cap > span + span, .stage-hint { display: none; }
  .fill-svg { height: 70vw; flex: none; }
  .board-tools { top: auto; bottom: 10px; right: 10px; left: 10px; justify-content: flex-start; }
}

/* Short laptop screens (e.g. 1366×768) */
@media (max-height: 800px) and (min-width: 761px) {
  :root { --bar: 42px; --tbar: 40px; }
  .toolbar h1 { font-size: 22px; }
  .field { padding: 6px 0 2px; }
  input[type=range] { height: 18px; }
  .readout { padding: 8px var(--pad); }
  .readout.key .v { font-size: clamp(36px, 3.2vw, 50px); }
  details.group > summary { padding: 10px 0 7px; }
}
.world.still .node { animation: none; }

/* ============================================================
   Project PDF — A4 portrait, website corporate design
   ============================================================ */
.print-root { position: fixed; inset: 0; z-index: 300; background: var(--tint-1); display: flex; flex-direction: column; animation: fade .2s both; }
.pr-bar { display: flex; align-items: center; gap: 14px; height: var(--bar); padding: 0 16px; background: #fff; border-bottom: var(--rule); }
.pr-bar .sp { flex: 1; }
.pg-word { font-weight: 700; font-size: 13px; letter-spacing: .16em; }
.pr-stage { flex: 1; overflow: auto; display: flex; align-items: center; justify-content: center; padding: 20px; perspective: 2400px; }
.pr-holder { position: relative; box-shadow: 6px 6px 0 #000; background: #fff; flex: 0 0 auto; display: none; overflow: hidden; }
.pr-holder.on { display: block; animation: turn .5s cubic-bezier(.2,.7,.1,1) both; transform-origin: left center; }
.pr-holder.on.back { animation-name: turnback; transform-origin: right center; }
@keyframes turn { from { opacity: 0; transform: rotateY(-26deg) translateX(30px); } to { opacity: 1; transform: none; } }
@keyframes turnback { from { opacity: 0; transform: rotateY(26deg) translateX(-30px); } to { opacity: 1; transform: none; } }
.pr-nav { display: flex; }
.pr-nav .pg { border: var(--rule); border-left: 0; border-right: 0; padding: 5px 12px; font: 400 11px var(--mono); }
.pr-arrow { position: fixed; top: 50%; transform: translateY(-50%); z-index: 2; width: 44px; height: 64px; background: #fff; border: var(--rule); font: 400 20px var(--mono); cursor: pointer; }
.pr-arrow:hover { background: #000; color: #fff; }
.pr-arrow:disabled { opacity: .2; cursor: default; background: #fff; color: #000; }
.pr-arrow.l { left: 14px; } .pr-arrow.r { right: 14px; }
.pr-water { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; pointer-events: none; z-index: 3; }
.pr-water span { font: 400 italic 150px/1 var(--serif); color: transparent; -webkit-text-stroke: 1.2px rgba(0,0,0,.18); transform: rotate(-35deg); letter-spacing: -.02em; }
.print-lock { display: none; }
.pw-list { display: grid; border-top: var(--rule); }
.pw-list > div { display: grid; grid-template-columns: 24px 1fr; padding: 7px 0; border-bottom: var(--hair); font-size: 14px; }

.sheet {
  width: 210mm; height: 297mm; background: #fff; color: #000; padding: 11mm 12mm 9mm;
  transform-origin: 0 0; overflow: hidden; display: flex; flex-direction: column;
  -webkit-print-color-adjust: exact; print-color-adjust: exact;
}
.sheet .caption { font-size: 6.4pt; }
.pg-head { display: grid; grid-template-columns: auto 1fr auto; gap: 6mm; align-items: baseline; padding-bottom: 2.5mm; border-bottom: .35mm solid #000; }
.pg-head .pg-word { font-size: 9pt; }
.pg-head .caption:nth-child(2) { text-align: center; }
.pg-title { display: flex; justify-content: space-between; align-items: flex-end; gap: 6mm; padding: 5mm 0 3.5mm; border-bottom: .2mm solid #000; }
.pg-title h2 { font: 400 34pt/.9 var(--serif); letter-spacing: -.02em; }
.pg-title h2 em { font-style: italic; }
.pg-body { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 4mm; padding-top: 4mm; }
.pg-fig { margin: 0; display: flex; flex-direction: column; min-height: 0; }
.pg-fig figcaption { display: flex; justify-content: space-between; padding-bottom: 1.5mm; }
.pg-canvas { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; overflow: hidden; border-top: .2mm solid #000; padding-top: 2mm; }
.pg-canvas img { width: 100%; height: 100%; object-fit: contain; display: block; }
.pg-canvas svg.fill { width: 100%; height: 100%; }
.pg-fig.hero { flex: 1.25; }
.pg-fig.mid { flex: 1; }
.pg-fig.mixfig { flex: 1; min-height: 70mm; }
.pg-fig.wf { height: 62mm; flex: none; }
.pg-fig.sq { height: 74mm; }
.pg-two { display: grid; grid-template-columns: 1fr 1fr; gap: 6mm; min-height: 0; }
.pg-two > .pg-fig { height: 100mm; }
.pg-two > .pg-fig.sq { height: 66mm; }
.pg-table.cols { display: grid; grid-template-columns: 1fr 1fr; column-gap: 6mm; }
.pg-table.cols h4 { grid-column: 1 / -1; }
.pg-strip { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr; border-top: .35mm solid #000; border-bottom: .2mm solid #000; }
.pg-strip > div { padding: 2.5mm 3mm 2.5mm 0; }
.pg-strip > div + div { padding-left: 3mm; border-left: .2mm solid #000; }
.pg-strip .v { font-size: 13pt; font-weight: 500; letter-spacing: -.02em; margin-top: 1mm; font-variant-numeric: tabular-nums; }
.pg-strip .key .v { font: 400 24pt/1 var(--serif); }
.pg-strip .u { font-size: 7.5pt; font-weight: 400; margin-left: 1mm; }
.pg-table h4, .pg-calc h4 { font: 400 15pt/1 var(--serif); padding-bottom: 2mm; border-bottom: .35mm solid #000; }
.pg-table > div { display: flex; justify-content: space-between; gap: 3mm; padding: 1.6mm 0; border-bottom: .1mm solid #ccc; font-size: 8.3pt; font-variant-numeric: tabular-nums; }
.pg-table b { font-weight: 500; text-align: right; }
.pg-calc .row { display: grid; grid-template-columns: 30mm 1fr 30mm; gap: 3mm; padding: 1.7mm 0; border-bottom: .1mm solid #ccc; align-items: baseline; }
.pg-calc .f { font: 400 7.2pt/1.4 var(--mono); }
.pg-calc .r { font-size: 8.3pt; font-weight: 500; text-align: right; font-variant-numeric: tabular-nums; }
.pg-note { margin-top: auto; font: 400 6.3pt/1.45 var(--mono); text-transform: uppercase; letter-spacing: .03em; opacity: .7; }
.pg-foot { display: flex; justify-content: space-between; padding-top: 2.5mm; margin-top: 3mm; border-top: .2mm solid #000; }

@media print {
  @page { size: A4 portrait; margin: 0; }
  html, body { background: #fff !important; height: auto; scroll-snap-type: none; }
  body.has-print > *:not(.print-root) { display: none !important; }
  .print-root { position: static; background: #fff; display: block; animation: none; }
  .pr-bar, .pr-arrow, .pr-water { display: none !important; }
  .pr-stage { padding: 0; display: block; overflow: visible; perspective: none; }
  .pr-holder { display: block !important; animation: none !important; box-shadow: none; width: auto !important; height: auto !important; overflow: visible; break-after: page; page-break-after: always; }
  .pr-holder:last-child { break-after: auto; page-break-after: auto; }
  .sheet { transform: none !important; }
  /* Pro lock: without access only a notice prints */
  .print-root.locked .pr-stage { display: none !important; }
  .print-root.locked .print-lock { display: block; padding: 40mm 20mm; font: 400 28pt/1.1 var(--serif); }
}
.linkline { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; padding: 7px 0 2px; }
.linkline .btn-link { font-size: 10px; }

/* ---------- Tool pages: one screen + slim footer ---------- */
body.tool-page .colophon { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 28px; padding: 9px var(--pad) 10px; }
body.tool-page .colophon-big { font-size: clamp(24px, 2.4vw, 38px); padding-top: 0; margin: 0; letter-spacing: -.04em; }
body.tool-page .colophon-grid { margin: 0; padding: 0; border: 0; gap: 20px; align-items: center; }
body.tool-page .colophon-grid .caption { font-size: 8.5px; line-height: 1.4; }
body.tool-page #view > .screen.fixed.with-foot { min-height: 480px; }

/* ---------- Dashboards (Apartment Mix, Deal Check) ---------- */
.stage.dash { display: grid; grid-template-rows: auto auto minmax(0, 1fr); background: #fff; }
.tile { display: flex; flex-direction: column; min-height: 0; min-width: 0; padding: 12px 16px 14px; border-bottom: var(--rule); }
.tile:last-child { border-bottom: 0; }
.tile-h { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.dash-types { display: grid; }
.dt { padding: 2px 12px 2px 0; min-width: 0; }
.dt + .dt { border-left: var(--hair); padding-left: 14px; }
.dt-top { display: flex; align-items: center; gap: 8px; }
.dt-top .sw { width: 18px; height: 12px; display: block; flex: 0 0 auto; }
.dt-name { font-size: 13px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dt-n { font: 400 clamp(46px, 5.2vw, 92px)/.9 var(--serif); letter-spacing: -.03em; margin: 6px 0 4px; }
.dash-bar { display: flex; height: 42px; gap: 3px; }
.seg-b { position: relative; min-width: 0; flex-basis: 0; overflow: hidden; }
.seg-b svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.seg-b span { position: absolute; left: 5px; bottom: 4px; background: #fff; padding: 0 4px; border: 1px solid #000; }
.dash-field, .dash-fill { flex: 1; min-height: 0; position: relative; }
.dash-field svg, .dash-fill svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.stage.dash-deal { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) minmax(0, 1.1fr); }
.stage.dash-deal .tile.wide { grid-column: 1 / -1; }
.stage.dash-deal .tile:nth-child(2) { border-right: var(--hair); border-bottom: 0; }
@media (max-width: 760px) {
  .stage-wrap:has(.dash) { position: static; height: auto; }
  .stage.dash { position: static; }
  .dash-field, .dash-fill { height: 240px; flex: none; }
  .stage.dash-deal { grid-template-columns: 1fr; grid-template-rows: auto; }
  .stage.dash-deal .tile:nth-child(2) { border-right: 0; border-bottom: var(--rule); }
  .dash-types { grid-template-columns: repeat(2, 1fr) !important; }
  body.tool-page .colophon { grid-template-columns: 1fr; gap: 6px; }
}
