/* ledgerworks.me marketing site. Brand: brand/system/project (LedgerWorks Brand). Light paper for words, dark ground for drawings. */
@font-face { font-family: "Geist"; src: url("/site/fonts/Geist-Variable.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url("/site/fonts/GeistMono-Variable.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Audiowide"; src: url("/site/fonts/Audiowide.woff2") format("woff2"); font-weight: 400; font-display: swap; }

:root {
  color-scheme: light;
  --ink: #191D21;
  --ink-muted: #585E66;
  --canvas: #F6F6F4;
  --surface: #FFFFFF;
  --sunken: #EDEDEA;
  --desk: #E7E6E1;
  --line: #DCDCD7;
  --line-strong: #8C9198;
  --signal: #FD5410;
  --on-signal: #191D21;
  --signal-text: #C2410C;
  --signal-tint: #FFE6DA;
  --cad: #14181C;
  --cadcraft: #212830; /* CADCraft's model space: the ground of every real render */
  --t-ink: #F2F1ED;
  --t-muted: #A2A8AF;
  --t-line: rgba(242, 241, 237, 0.16);
  --warning: #8A6100;
  --success: #1E7A4C;
  --shadow-1: 0 1px 2px rgba(25, 29, 33, .08), 0 1px 1px rgba(25, 29, 33, .04);
  --shadow-2: 0 8px 24px rgba(25, 29, 33, .12), 0 2px 6px rgba(25, 29, 33, .08);
  --shadow-sheet: 0 24px 60px rgba(0, 0, 0, .35), 0 4px 12px rgba(0, 0, 0, .25);
  --display: Audiowide, Geist, system-ui, sans-serif;
  --sans: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --gutter: clamp(16px, 4vw, 48px);
  --max: 1240px;
  --header: 64px;
  --section: clamp(88px, 11vw, 168px);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header) + 16px); scrollbar-color: var(--line-strong) var(--canvas); }
body { margin: 0; background: var(--canvas); color: var(--ink); font: 400 16px/1.6 var(--sans); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-underline-offset: .2em; text-decoration-thickness: 1px; }
::selection { background: var(--signal-tint); color: var(--ink); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; border-radius: 2px; }
.dark :focus-visible, .cta-band :focus-visible { outline-color: var(--t-ink); }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }
.wrap { width: 100%; max-width: calc(var(--max) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 16px; top: -48px; z-index: 50; background: var(--ink); color: var(--surface); padding: 8px 12px; border-radius: 8px; font-weight: 600; }
.skip:focus { top: 8px; }

/* Type */
.display-xl { font: 400 clamp(38px, 4.2vw, 64px)/1.06 var(--display); letter-spacing: -0.01em; }
.display { font: 400 clamp(28px, 3.1vw, 44px)/1.12 var(--display); letter-spacing: -0.005em; }
.title { font: 600 clamp(20px, 1.6vw, 24px)/1.25 var(--sans); letter-spacing: -0.01em; }
.lede { font-size: clamp(17px, 1.35vw, 19px); line-height: 1.6; color: var(--ink-muted); max-width: 38em; }
.dim, .mono { font-family: var(--mono); font-weight: 500; font-variant-numeric: tabular-nums; }
.label { font: 500 11px/16px var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.muted { color: var(--ink-muted); }
.small { font-size: 14px; line-height: 1.5; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 12px 20px; border-radius: 8px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); font: 600 15px/20px var(--sans); text-decoration: none; white-space: nowrap; cursor: pointer; transition: background-color .15s, border-color .15s, color .15s, transform .15s var(--ease-out); }
.btn:hover { border-color: var(--ink); }
.btn:active { transform: translateY(1px); }
.btn.sig { background: var(--signal); border-color: var(--signal); color: var(--on-signal); }
.btn.sig:hover { background: color-mix(in srgb, var(--signal) 86%, #fff); border-color: color-mix(in srgb, var(--signal) 86%, #fff); }
.btn.ink { background: var(--ink); border-color: var(--ink); color: var(--surface); }
.btn.ink:hover { background: color-mix(in srgb, var(--ink) 86%, var(--signal)); }
.btn.sm { min-height: 40px; padding: 8px 14px; font-size: 14px; }
.btn svg { width: 18px; height: 18px; flex: none; }
.link { font-weight: 600; text-decoration: underline; text-decoration-color: var(--line-strong); }
.link:hover { text-decoration-color: var(--ink); }

/* Header */
.site-head { position: sticky; top: 0; z-index: 40; height: var(--header); background: var(--canvas); border-bottom: 1px solid transparent; transition: border-color .2s, background-color .2s; }
.site-head.scrolled { border-bottom-color: var(--line); }
.head-in { height: 100%; display: flex; align-items: center; gap: 32px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font: 600 18px/1 var(--sans); letter-spacing: -0.01em; }
.brand img { width: auto; height: 30px; }
.nav { display: flex; align-items: center; gap: 4px; margin-right: auto; }
.nav a { padding: 8px 12px; border-radius: 8px; font-weight: 500; font-size: 15px; text-decoration: none; color: var(--ink-muted); transition: color .15s, background-color .15s; }
.nav a:hover { color: var(--ink); background: var(--sunken); }
.nav a[aria-current="page"] { color: var(--ink); }
.head-actions { display: flex; align-items: center; gap: 8px; }
.head-actions .signin { padding: 8px 12px; font-weight: 600; font-size: 15px; text-decoration: none; border-radius: 8px; }
.head-actions .signin:hover { background: var(--sunken); }
.menu-btn { display: none; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink); align-items: center; justify-content: center; cursor: pointer; }
.menu-btn svg { width: 20px; height: 20px; }
.menu-panel { display: none; }

@media (max-width: 860px) {
  :root { --header: 56px; }
  .nav, .head-actions .signin { display: none; }
  .head-in { gap: 12px; justify-content: space-between; }
  .head-actions { margin-left: auto; }
  .menu-btn { display: inline-flex; }
  .brand img { height: 26px; }
  .menu-panel { position: fixed; inset: var(--header) 0 auto 0; z-index: 39; background: var(--canvas); border-bottom: 1px solid var(--line); padding: 8px var(--gutter) 24px; box-shadow: var(--shadow-2); }
  .menu-panel[data-open] { display: block; }
  .menu-panel a { display: block; padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 18px; font-weight: 600; text-decoration: none; }
  .menu-panel a:last-child { border-bottom: 0; }
}

/* Construction-line ornament */
.ticks { position: relative; }
.ticks::before, .ticks::after { content: ""; position: absolute; width: 14px; height: 14px; border-color: var(--line-strong); border-style: solid; pointer-events: none; }
.ticks::before { top: -8px; left: -8px; border-width: 1px 0 0 1px; }
.ticks::after { bottom: -8px; right: -8px; border-width: 0 1px 1px 0; }
.dimline { position: relative; height: 18px; color: var(--line-strong); }
.dimline::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; border-top: 1px solid currentColor; }
.dimline i { position: absolute; top: 50%; width: 12px; height: 1px; background: currentColor; transform: translate(-50%, -50%) rotate(-45deg); }
.dimline i:first-child { left: 0; } .dimline i:last-child { left: 100%; }
.dimline b { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); padding: 0 10px; background: var(--canvas); font: 500 12px/1 var(--mono); color: var(--ink-muted); letter-spacing: .02em; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ---------- Home hero: the scroll is the drafting pass ---------- */
.hero { display: grid; grid-template-columns: minmax(0, 40fr) minmax(0, 60fr); border-bottom: 1px solid var(--line); }
.hero-copy { position: sticky; top: var(--header); align-self: start; height: calc(100vh - var(--header)); height: calc(100svh - var(--header)); display: flex; flex-direction: column; justify-content: center; gap: 24px; padding: 48px clamp(24px, 4vw, 64px) 48px max(var(--gutter), calc((100vw - var(--max)) / 2)); }
.hero-copy .lede { max-width: 30em; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
.hero-note { font-size: 14px; color: var(--ink-muted); display: flex; flex-wrap: wrap; gap: 4px 16px; }
.hero-note span { display: inline-flex; align-items: center; gap: 8px; }
.hero-note span::before { content: ""; width: 10px; height: 1px; background: var(--line-strong); }
.hero-track { position: relative; border-left: 1px solid var(--line); }
.js .hero-track { height: 460vh; }
.hero-pin { position: sticky; top: var(--header); height: calc(100vh - var(--header)); height: calc(100svh - var(--header)); display: flex; flex-direction: column; }
.stage { position: relative; flex: 1; min-height: 0; background: var(--desk); overflow: hidden; }
.stage svg.plan { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; }
.stage-fallback { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: var(--cadcraft); }
.js .stage-fallback { display: none; }
.gauge { flex: none; height: 64px; padding: 0 clamp(16px, 3vw, 40px) 14px; background: var(--canvas); border-top: 1px solid var(--line); position: relative; }
.gauge ol { position: relative; height: 100%; list-style: none; margin: 0; padding: 0; }
.gauge::before { content: ""; position: absolute; left: clamp(16px, 3vw, 40px); right: clamp(16px, 3vw, 40px); top: 22px; border-top: 1px solid var(--line-strong); }
.gauge-fill { position: absolute; left: clamp(16px, 3vw, 40px); right: clamp(16px, 3vw, 40px); top: 21px; height: 3px; background: var(--signal); transform-origin: 0 50%; transform: scaleX(var(--p, 0)); }
.gauge li { position: absolute; bottom: 0; left: max(var(--at), var(--min, 0px)); white-space: nowrap; font: 500 11px/16px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-muted); transition: color .2s; }
.gauge li::before { content: ""; position: absolute; left: 0; top: -12px; width: 12px; height: 1px; background: var(--ink); transform: translate(-50%, 0) rotate(-45deg); }
.gauge::after { content: ""; position: absolute; right: clamp(16px, 3vw, 40px); top: 22px; width: 12px; height: 1px; background: var(--ink); transform: translate(50%, 0) rotate(-45deg); }
.gauge li[data-on] { color: var(--ink); }

/* Plan SVG styling (scoped values keep the drawing dark in its own palette) */
.plan path, .plan line, .plan ellipse { fill: none; }
.plan [pathLength] { stroke-dasharray: 1 2; }
.p-desk { fill: var(--desk); }
.p-paper { fill: #FFFFFF; stroke: #D9D8D2; stroke-width: 1; }
.p-paper-shadow { fill: rgba(25, 29, 33, .10); }
.p-ground { fill: var(--cad); }
.p-grid-minor { stroke: rgba(242, 241, 237, .045); stroke-width: 1; }
.p-grid-major { stroke: rgba(242, 241, 237, .09); stroke-width: 1; }
.p-finder { stroke: var(--ink); stroke-width: 2.5; fill: none; }
.t-axis { stroke: var(--t-muted); stroke-opacity: .35; stroke-width: 1; stroke-dasharray: 14 5 2 5; }
.t-sketch path { stroke: #4B5158; stroke-linecap: round; stroke-linejoin: round; }
.t-hand path { stroke: #3E4349; stroke-opacity: .9; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.t-wall { stroke: var(--t-ink); stroke-linejoin: miter; }
.t-wall-in { stroke: var(--cad); stroke-linejoin: miter; }
.t-line, .t-line path { stroke: var(--t-ink); stroke-width: 1.4; }
.t-line .t-swing { stroke-width: 1; stroke-opacity: .75; }
.t-line .t-fixture { stroke-width: 1; stroke-opacity: .6; }
.t-dim path, .t-dim line { stroke: var(--signal); stroke-width: 1.2; }
.t-dim .t-ext { stroke-width: 1; stroke-opacity: .7; }
.t-dimtext, .t-room, .t-size { paint-order: stroke; stroke: var(--cad); stroke-width: 4px; stroke-linejoin: round; }
.t-dimtext { fill: var(--signal); font: 500 13px var(--mono); font-variant-numeric: tabular-nums; }
.t-room { fill: var(--t-ink); font: 600 12px var(--sans); letter-spacing: .06em; }
.t-size { fill: var(--t-muted); font: 500 11px var(--mono); font-variant-numeric: tabular-nums; }
.t-scan { stroke: var(--signal); stroke-width: 2.5; vector-effect: non-scaling-stroke; }
.t-scanband { fill: var(--signal); fill-opacity: .1; }
/* the printed sheet: black and white, like the PDF */
.print .p-sheet { fill: #FFFFFF; }
.print .p-sheet-shadow { fill: rgba(0, 0, 0, .35); }
.print .p-border, .print .p-tb path, .print .p-tb line { stroke: #111; stroke-width: 1.6; fill: none; }
.print .t-wall { stroke: #111; }
.print .t-wall-in { stroke: #FFFFFF; }
.print .t-line, .print .t-line path { stroke: #111; }
.print .t-dim path, .print .t-dim line { stroke: #333; }
.print .t-dimtext, .print .t-room, .print .t-size { stroke: #FFFFFF; }
.print .t-dimtext { fill: #111; }
.print .t-room { fill: #111; }
.print .t-size { fill: #444; }
.print .t-axis { stroke: #666; }
.print text.p-tbt { fill: #111; font: 500 10px var(--mono); letter-spacing: .06em; }
.print text.p-tbt.big { font: 400 26px var(--display); letter-spacing: 0; }
.print text.p-tbt.mid { font: 600 13px var(--sans); letter-spacing: .02em; }
.print text.p-note { fill: #222; font: 500 9.5px var(--mono); letter-spacing: .02em; }
.print text.p-title { fill: #111; font: 400 22px var(--display); }
.print .p-stamp { stroke: #111; stroke-dasharray: 4 3; fill: none; stroke-width: 1; }
.p-printhead { stroke: var(--signal); stroke-width: 2.5; vector-effect: non-scaling-stroke; }

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; }
  .hero-copy { position: static; height: auto; padding: 40px var(--gutter) 40px; gap: 18px; }
  .hero-track { border-left: 0; border-top: 1px solid var(--line); }
  .js .hero-track { height: 380vh; }
  .gauge { height: 56px; padding-bottom: 10px; }
  .gauge::before, .gauge-fill, .gauge::after { top: 18px; }
  .t-dimtext { font-size: 20px; }
  .t-room { font-size: 18px; letter-spacing: .02em; }
  .t-size { display: none; }
  .t-hand path { stroke-width: 2.4; }
}

/* ---------- Sections ---------- */
.section { padding: var(--section) 0; }
.section + .section { position: relative; }
.section-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px 64px; align-items: end; margin-bottom: clamp(48px, 6vw, 80px); }
.section-head .lede { justify-self: end; max-width: 34em; }
@media (max-width: 860px) { .section-head { grid-template-columns: 1fr; } .section-head .lede { justify-self: start; } }

/* How it works: three beats on one strip */
.beats { position: relative; list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); --rule: var(--ink); }
.beat { padding: 28px 32px 0 0; display: flex; flex-direction: column; gap: 14px; }
.beat + .beat { padding-left: 32px; border-left: 1px solid var(--line); }
.beat-step { display: flex; align-items: baseline; gap: 12px; }
.beat-step .dim { font-size: 13px; color: var(--signal-text); }
.beat h3 { font: 600 20px/1.3 var(--sans); letter-spacing: -0.01em; }
.beat p { color: var(--ink-muted); max-width: 32em; }
.beat-vis { margin-top: auto; padding-top: 20px; }
.vis-photo { position: relative; aspect-ratio: 4 / 3; background: var(--desk); border-radius: 14px; overflow: hidden; }
.vis-photo svg { position: absolute; inset: 8% 14%; width: 72%; height: 84%; }
.vis-photo .finder { position: absolute; inset: 9%; }
.vis-photo .finder i { position: absolute; width: 22px; height: 22px; border: 2.5px solid var(--ink); }
.vis-photo .finder i:nth-child(1) { top: 0; left: 0; border-width: 2.5px 0 0 2.5px; }
.vis-photo .finder i:nth-child(2) { top: 0; right: 0; border-width: 2.5px 2.5px 0 0; }
.vis-photo .finder i:nth-child(3) { bottom: 0; left: 0; border-width: 0 0 2.5px 2.5px; }
.vis-photo .finder i:nth-child(4) { bottom: 0; right: 0; border-width: 0 2.5px 2.5px 0; }
.vis-photo .shutter { position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%); font: 500 11px/16px var(--mono); letter-spacing: .08em; text-transform: uppercase; background: var(--ink); color: var(--surface); padding: 4px 10px; border-radius: 4px; }
.plancard { background: var(--surface); border: 1px solid var(--line-strong); border-radius: 14px; box-shadow: var(--shadow-2); padding: 18px; font-size: 14px; line-height: 1.5; }
.plancard .ph { margin: 0 0 10px; font: 600 16px/1.3 var(--sans); }
.plancard ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.plancard li { display: grid; grid-template-columns: 16px 1fr; gap: 8px; align-items: start; }
.plancard .dim { font-size: .9em; white-space: nowrap; letter-spacing: -0.02em; }
.plancard li svg { width: 16px; height: 16px; margin-top: 2px; color: var(--success); }
.plancard .est { margin-top: 10px; padding: 8px 10px; border-radius: 8px; background: color-mix(in srgb, var(--warning) 9%, var(--surface)); color: var(--ink); }
.plancard .est svg { color: var(--warning); }
.plancard .cost { margin-top: 10px; font: 500 13px/16px var(--mono); color: var(--ink-muted); }
.plancard .acts { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.fake-btn { display: inline-flex; align-items: center; min-height: 36px; padding: 6px 12px; border-radius: 8px; border: 1px solid var(--line-strong); background: var(--surface); font: 600 13px/20px var(--sans); }
.fake-btn.sig { background: var(--signal); border-color: var(--signal); }
.js .plancard [data-step] { opacity: 0; transform: translateY(6px); transition: opacity .45s var(--ease-out), transform .45s var(--ease-out); }
.js .plancard.on [data-step] { opacity: 1; transform: none; }
.vis-out { position: relative; aspect-ratio: 4 / 3; border-radius: 14px; overflow: hidden; background: var(--cadcraft); }
.vis-out img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 40%; }
.vis-out .files { position: absolute; left: 12px; bottom: 12px; display: flex; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 8px; border-radius: 4px; font: 500 11px/16px var(--mono); letter-spacing: .08em; text-transform: uppercase; background: var(--sunken); color: var(--ink-muted); }
.chip.dark { background: rgba(20, 24, 28, .82); color: var(--t-ink); border: 1px solid var(--t-line); }
@media (max-width: 960px) {
  .beats { grid-template-columns: 1fr; }
  .beat, .beat + .beat { position: relative; padding: 28px 0 40px; border-left: 0; --rule: var(--ink); }
  .beat + .beat::before { content: ""; }
  .beat-vis { max-width: 520px; }
}

/* Product frame: chat left, CAD right */
.live { background: var(--surface); }
.frame { border: 1px solid var(--line-strong); border-radius: 14px; overflow: hidden; background: var(--surface); }
.frame-bar { display: flex; align-items: center; gap: 12px; height: 52px; padding: 0 14px; border-bottom: 1px solid var(--line); }
.frame-bar img { height: 24px; width: auto; }
.frame-bar .pname { font: 600 15px/1 var(--sans); margin-right: auto; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.seg { display: inline-flex; }
.seg .fake-btn + .fake-btn { margin-left: -1px; }
.seg .fake-btn:first-child { border-radius: 8px 0 0 8px; } .seg .fake-btn:last-child { border-radius: 0 8px 8px 0; }
.fake-btn.inkb { background: var(--ink); border-color: var(--ink); color: var(--surface); }
.credits { font: 500 12px/1 var(--mono); padding: 8px 10px; border: 1px solid var(--line); border-radius: 999px; white-space: nowrap; }
.frame-body { display: grid; grid-template-columns: minmax(300px, 380px) minmax(0, 1fr); height: clamp(520px, 62vw, 680px); }
.chat { display: flex; flex-direction: column; gap: 12px; padding: 16px; border-right: 1px solid var(--line); overflow: hidden; background: var(--surface); }
.bubble { max-width: 92%; padding: 10px 12px; border-radius: 8px; font-size: 14px; line-height: 1.5; }
.bubble.me { align-self: flex-end; background: var(--signal-tint); border-bottom-right-radius: 4px; }
.bubble.ai { align-self: flex-start; background: var(--canvas); border: 1px solid var(--line); border-top-left-radius: 4px; }
.from { display: flex; gap: 8px; align-items: flex-start; }
.from > img { width: 22px; height: auto; margin-top: 6px; flex: none; }
.from .plancard { box-shadow: var(--shadow-1); padding: 14px; font-size: 13px; }
.status { display: inline-flex; align-items: center; gap: 8px; font: 500 12px/16px var(--mono); color: var(--ink-muted); }
.status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--signal); animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .3; } }
.nexts { display: flex; flex-wrap: wrap; gap: 6px; }
.nexts span { padding: 4px 10px; border: 1px solid var(--line-strong); border-radius: 999px; font-size: 13px; }
.chat-input { margin-top: auto; display: flex; gap: 8px; align-items: center; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--sunken); color: var(--ink-muted); font-size: 14px; }
.js .chat [data-seq] { opacity: 0; transform: translateY(10px); transition: opacity .5s var(--ease-out), transform .5s var(--ease-out); }
.js .chat [data-seq].on { opacity: 1; transform: none; }
.cad { position: relative; background: var(--cadcraft); overflow: hidden; display: flex; flex-direction: column; }
.cad-tools { display: flex; align-items: center; gap: 6px; height: 40px; padding: 0 12px; border-bottom: 1px solid var(--t-line); }
.cad-tools i { width: 16px; height: 16px; border: 1.5px solid rgba(242, 241, 237, .45); border-radius: 3px; }
.cad-tools i:nth-child(4n) { border-radius: 50%; }
.cad-tools i.gap { border: 0; width: 10px; }
.cad-tools .tab { margin-left: 16px; font: 500 12px/1 var(--mono); color: var(--t-ink); padding: 6px 10px; border: 1px solid var(--t-line); border-bottom: 0; border-radius: 6px 6px 0 0; align-self: flex-end; }
.cad-view { position: relative; flex: 1; min-height: 0; }
.cad-view img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.cad-cover { position: absolute; inset: 0; background: var(--cadcraft); transform-origin: 100% 50%; will-change: transform; }
.cad-cover::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 2px; background: var(--signal); box-shadow: -24px 0 0 0 rgba(253, 84, 16, .08); }
.cad-cmd { flex: none; margin: 10px 12px; padding: 7px 10px; border: 1px solid var(--t-line); border-radius: 6px; font: 500 12px/1 var(--mono); color: var(--t-muted); }
.frame-cap { margin-top: 20px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; color: var(--ink-muted); font-size: 14px; }
@media (max-width: 900px) {
  .frame-bar .seg, .frame-bar .dxf { display: none; }
  .frame-body { grid-template-columns: 1fr; height: auto; }
  .cad { order: -1; height: 72vw; min-height: 300px; }
  .chat { border-right: 0; border-top: 1px solid var(--line); }
}

/* Permit set: the sheet track */
.permit { background: var(--cad); color: var(--t-ink); }
.permit .lede { color: var(--t-muted); }
.permit .section-head { margin-bottom: 40px; }
.prompt { font-size: clamp(17px, 1.5vw, 20px); line-height: 1.5; color: var(--t-ink); max-width: 46em; padding-left: 20px; border-left: 1px solid var(--signal); margin-bottom: 48px; }
.prompt cite { display: block; margin-top: 8px; font-size: 14px; font-style: normal; color: var(--t-muted); }
.sheet-index { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 32px; margin: 0 0 56px; padding: 0; list-style: none; border-top: 1px solid var(--t-line); }
.sheet-index li { display: grid; grid-template-columns: 64px 1fr; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--t-line); font-size: 15px; }
.sheet-index .dim { color: var(--signal); font-size: 13px; padding-top: 2px; }
.set-track-wrap { position: relative; }
.js .set-scrub { height: 340vh; }
.set-pin { position: sticky; top: var(--header); height: calc(100vh - var(--header)); height: calc(100svh - var(--header)); display: flex; flex-direction: column; justify-content: center; overflow: hidden; }
.set-track { display: flex; gap: clamp(20px, 2.4vw, 40px); padding: 0 var(--gutter); width: max-content; will-change: transform; }
.sheet { width: min(66vw, 860px); flex: none; margin: 0; }
.sheet-frame { position: relative; aspect-ratio: 4 / 3; background: var(--cadcraft); border: 1px solid var(--t-line); border-radius: 4px; overflow: hidden; }
.sheet-frame img { width: 100%; height: 100%; object-fit: cover; }
.printed .sheet-frame { background: #fff; }
.printed .sheet-frame img { object-fit: contain; }
.sheet figcaption { display: grid; grid-template-columns: auto 1fr auto; border: 1px solid var(--t-line); border-top: 0; font: 500 11px/16px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--t-muted); }
.sheet figcaption span { padding: 10px 14px; }
.sheet figcaption span + span { border-left: 1px solid var(--t-line); }
.sheet figcaption span:first-child { color: var(--t-ink); }
.set-controls { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 24px var(--gutter) 0; max-width: calc(var(--max) + 2 * var(--gutter)); margin: 0 auto; width: 100%; }
.toggle { display: inline-flex; border: 1px solid var(--t-line); border-radius: 8px; padding: 3px; gap: 2px; }
.toggle button { appearance: none; border: 0; background: transparent; color: var(--t-muted); font: 600 14px/20px var(--sans); padding: 8px 14px; border-radius: 6px; cursor: pointer; min-height: 40px; }
.toggle button[aria-pressed="true"] { background: var(--t-ink); color: var(--ink); }
.toggle.light { border-color: var(--line-strong); }
.toggle.light button { color: var(--ink-muted); }
.toggle.light button[aria-pressed="true"] { background: var(--ink); color: var(--surface); }
.honest { display: grid; grid-template-columns: 20px 1fr; gap: 12px; max-width: 760px; color: var(--t-muted); font-size: 15px; }
.honest svg { width: 20px; height: 20px; color: #E9B44C; margin-top: 2px; }
.honest strong { color: var(--t-ink); font-weight: 600; }
.set-foot { margin-top: 56px; }
@media (max-width: 860px) {
  .sheet-index { grid-template-columns: 1fr; }
  .js .set-scrub { height: auto; }
  .set-pin { position: static; height: auto; overflow: visible; }
  .set-track { width: auto; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 12px; transform: none !important; scrollbar-color: var(--t-line) transparent; }
  .sheet { width: 84vw; scroll-snap-align: center; }
  .sheet figcaption span:nth-child(3) { display: none; }
  .sheet figcaption { grid-template-columns: auto 1fr; }
}

/* Features: general notes */
.notes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 64px; counter-reset: note; }
.note { position: relative; display: grid; grid-template-columns: 40px 1fr; gap: 4px 16px; padding: 22px 0; }
.note::before { counter-increment: note; content: counter(note) "."; font: 500 13px/26px var(--mono); color: var(--ink-muted); grid-row: span 2; }
.note h3 { font: 600 17px/26px var(--sans); }
.note p { color: var(--ink-muted); font-size: 15px; }
@media (max-width: 760px) { .notes { grid-template-columns: 1fr; } }
.vignettes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; margin-top: 64px; }
.vig { border: 1px solid var(--line); border-radius: 14px; background: var(--surface); padding: 24px; display: flex; flex-direction: column; gap: 16px; }
.vig h3 { font: 600 18px/1.3 var(--sans); }
.vig p { color: var(--ink-muted); font-size: 15px; }
.lang-plan { position: relative; background: var(--cadcraft); border-radius: 8px; aspect-ratio: 16 / 9; overflow: hidden; }
.lang-plan svg { width: 100%; height: 100%; }
.lang-plan .rm { fill: #F2E94E; font: 500 13px var(--mono); letter-spacing: .04em; }
.lang-plan .sz { fill: #F2E94E; font: 500 10px var(--mono); opacity: .8; }
.lang-plan .wl { stroke: #D8DADC; stroke-width: 2; fill: none; }
.lang-plan .dm { stroke: #E5484D; stroke-width: 1; fill: none; }
.lang-plan .dmt { fill: #E5484D; font: 500 10px var(--mono); }
.versions { display: grid; gap: 8px; }
.ver { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; font-size: 14px; }
.ver .chip { background: var(--sunken); }
.ver.cur { border-color: var(--line-strong); background: var(--canvas); }
.ver .undo { font-weight: 600; font-size: 13px; text-decoration: underline; text-decoration-color: var(--line-strong); }
@media (max-width: 860px) { .vignettes { grid-template-columns: 1fr; } }

/* Pricing */
.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--line-strong); border-radius: 14px; background: var(--surface); overflow: hidden; }
.plan-col { padding: 32px; display: flex; flex-direction: column; gap: 16px; }
.plan-col + .plan-col { border-left: 1px solid var(--line); }
.plan-col.pro { background: var(--canvas); }
.plan-col h3 { font: 600 18px/1.3 var(--sans); }
.price { display: flex; align-items: baseline; gap: 6px; }
.price b { font: 600 clamp(40px, 4vw, 52px)/1 var(--sans); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.price span { color: var(--ink-muted); font-size: 15px; }
.plan-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; font-size: 15px; }
.plan-col li { display: grid; grid-template-columns: 18px 1fr; gap: 10px; }
.plan-col li svg { width: 18px; height: 18px; margin-top: 3px; color: var(--ink); }
.plan-col .btn { margin-top: auto; }
.plan-col .fine { font-size: 13px; color: var(--ink-muted); }
@media (max-width: 900px) { .plans { grid-template-columns: 1fr; } .plan-col + .plan-col { border-left: 0; border-top: 1px solid var(--line); } }
.costs { width: 100%; border-collapse: collapse; font-size: 15px; }
.costs th, .costs td { text-align: left; padding: 14px 16px 14px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.costs th { font: 500 11px/16px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-muted); }
.costs td.dim { white-space: nowrap; font-size: 15px; }
.faq { position: relative; --rule: var(--ink); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: 20px 0; font: 600 17px/1.4 var(--sans); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; flex: none; width: 12px; height: 12px; border-right: 1.5px solid var(--ink); border-bottom: 1.5px solid var(--ink); transform: rotate(45deg) translate(-3px, -3px); transition: transform .2s var(--ease-out); }
.faq details[open] summary::after { transform: rotate(225deg) translate(-2px, -2px); }
.faq details > div { padding: 0 0 24px; color: var(--ink-muted); max-width: 46em; }
.faq details > div p + p { margin-top: 10px; }
.two-col { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 48px 80px; align-items: start; }
@media (max-width: 900px) { .two-col { grid-template-columns: 1fr; } }

/* Final CTA band */
.cta-band { background: var(--cad); color: var(--t-ink); padding: clamp(80px, 10vw, 140px) 0; position: relative; overflow: hidden; }
.cta-in { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: center; }
.cta-band .lede { color: var(--t-muted); margin-top: 18px; }
.cta-band .hero-ctas { margin-top: 32px; }
.cta-band .btn:not(.sig) { background: transparent; color: var(--t-ink); border-color: rgba(242, 241, 237, .4); }
.cta-band .btn:not(.sig):hover { border-color: var(--t-ink); }
.cta-band .hero-note { color: var(--t-muted); margin-top: 16px; }
.cta-band .hero-note span::before { background: rgba(242, 241, 237, .4); }
.cta-art { position: relative; aspect-ratio: 1; max-width: 520px; justify-self: end; width: 100%; }
.cta-art svg { width: 100%; height: 100%; }
@media (max-width: 860px) { .cta-in { grid-template-columns: 1fr; } .cta-art { justify-self: start; max-width: 360px; } }

/* Page heads (features / examples / pricing) */
.page-head { padding: clamp(64px, 9vw, 128px) 0 clamp(48px, 6vw, 80px); }
.page-head .lede { margin-top: 20px; }
.page-head .hero-ctas { margin-top: 28px; }

/* Feature groups */
.fgroup { position: relative; display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 32px 80px; padding: clamp(56px, 7vw, 96px) 0; }
.fgroup-aside { position: sticky; top: calc(var(--header) + 32px); align-self: start; display: grid; gap: 16px; }
.fgroup-aside p { color: var(--ink-muted); }
.flist { display: grid; gap: 0; }
.fitem { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.fitem:first-child { padding-top: 0; }
.fitem h3 { font: 600 18px/1.35 var(--sans); }
.fitem p { color: var(--ink-muted); max-width: 40em; }
.fitem .chip { justify-self: start; margin-top: 4px; }
@media (max-width: 900px) { .fgroup { grid-template-columns: 1fr; } .fgroup-aside { position: static; } }
.tb-demo { display: grid; grid-template-columns: minmax(0, 1fr) 180px; border: 1.5px solid var(--ink); background: #fff; min-height: 300px; margin-top: 8px; }
.tb-demo .sheet-area { position: relative; background: #fff; overflow: hidden; }
.tb-demo .sheet-area img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.tb-col { border-left: 1.5px solid var(--ink); display: grid; grid-template-rows: auto auto 1fr auto auto; font: 500 11px/15px var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--ink); }
.tb-col > div { padding: 8px 10px; border-bottom: 1px solid var(--ink); }
.tb-col > div:last-child { border-bottom: 0; }
.tb-col .stamp { border: 1px dashed var(--ink-muted); margin: 8px 10px; padding: 10px; color: var(--ink-muted); text-align: center; display: grid; place-items: center; min-height: 72px; }
.tb-col .sheetno { font: 400 24px/1 var(--display); letter-spacing: 0; padding: 12px 10px; }
@media (max-width: 560px) { .tb-demo { grid-template-columns: 1fr; } .tb-col { border-left: 0; border-top: 1.5px solid var(--ink); } .tb-demo .sheet-area { min-height: 240px; } }

/* Examples */
.ex { position: relative; padding: clamp(56px, 7vw, 104px) 0; }
.ex-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 40px 64px; align-items: start; }
.ex-grid.flip { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
.ex-grid.flip .ex-media { order: 2; }
.ex-media { display: grid; gap: 12px; }
.ex-shot { position: relative; display: block; background: var(--cadcraft); border-radius: 14px; overflow: hidden; border: 1px solid var(--line); }
.ex-shot img { width: 100%; height: auto; }
.ex-shot .chip { position: absolute; left: 12px; top: 12px; }
.ex-thumbs { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.ex-thumbs a { display: block; border-radius: 6px; overflow: hidden; background: var(--cadcraft); aspect-ratio: 4 / 3; border: 1px solid var(--line); }
.ex-thumbs img { width: 100%; height: 100%; object-fit: cover; }
.ex-body { display: grid; gap: 20px; position: sticky; top: calc(var(--header) + 32px); }
.ex-body h2 { font: 400 clamp(24px, 2.4vw, 34px)/1.15 var(--display); }
.asked { padding: 16px 18px; border-radius: 8px; background: var(--signal-tint); font-size: 16px; line-height: 1.55; }
.asked .label { display: block; color: var(--signal-text); margin-bottom: 6px; }
.came .label { display: block; color: var(--ink-muted); margin-bottom: 8px; }
.came ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.came li { display: grid; grid-template-columns: 18px 1fr; gap: 10px; color: var(--ink); font-size: 15px; }
.came li::before { content: ""; width: 10px; height: 1px; background: var(--ink); margin-top: 12px; }
.ex-meta { display: flex; gap: 6px; flex-wrap: wrap; }
@media (max-width: 960px) { .ex-grid, .ex-grid.flip { grid-template-columns: 1fr; } .ex-grid.flip .ex-media { order: 0; } .ex-body { position: static; } .ex-thumbs { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* Footer */
.site-foot { background: var(--canvas); border-top: 1px solid var(--line); padding: 56px 0 40px; font-size: 14px; }
.foot-grid { display: grid; grid-template-columns: minmax(0, 2fr) repeat(2, minmax(0, 1fr)); gap: 32px; }
.foot-grid h2 { font: 500 11px/16px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-muted); margin-bottom: 12px; }
.foot-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.foot-grid a { text-decoration: none; }
.foot-grid a:hover { text-decoration: underline; }
.foot-brand p { margin-top: 14px; color: var(--ink-muted); max-width: 30em; }
.foot-legal { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-top: 48px; padding-top: 20px; border-top: 1px solid var(--line); color: var(--ink-muted); font-size: 13px; }
@media (max-width: 700px) { .foot-grid { grid-template-columns: 1fr 1fr; } .foot-brand { grid-column: 1 / -1; } }


@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation: none !important; scroll-behavior: auto !important; }
  .js .hero-track, .js .set-scrub { height: auto; }
  .hero-pin { position: relative; top: 0; }
  .set-pin { position: static; height: auto; overflow: visible; }
  .set-track { width: auto; overflow-x: auto; scroll-snap-type: x mandatory; transform: none !important; padding-bottom: 12px; }
  .js .chat [data-seq], .js .plancard [data-step] { opacity: 1; transform: none; }
  .gauge, .phase, .scroll-hint { display: none !important; }
  .hero-pin { height: auto; }
  .stage { flex: none; height: min(80vh, 760px); }
  .cad-cover { display: none; }
}
.printed .ex-shot, .printed .ex-thumbs a { background: #fff; }
.ex-shot, .ex-thumbs a, .vis-out, .cad, .sheet-frame, .lang-plan { color: var(--t-ink); }
.set-note { font-size: 14px; color: var(--t-muted); }
.plan-col h2.ptitle { font: 600 18px/1.3 var(--sans); }

/* Dimension-line dividers: a line with 45-degree end ticks, drawn from the middle out (--draw, set on scroll) */
.section + .section::before, .ex::before, .beats::before, .beat + .beat::before, .note::before, .fgroup::before, .faq::before, .page-head + .ex::before {
  content: ""; position: absolute; top: -6px; left: 0; right: 0; height: 12px; pointer-events: none;
  background: linear-gradient(var(--rule, var(--line-strong)), var(--rule, var(--line-strong))) center / 100% 1px no-repeat;
  -webkit-mask: none;
  clip-path: inset(0 calc((1 - var(--draw, 1)) * 50%));
}
.section + .section::after, .ex::after, .beats::after, .note::after, .fgroup::after, .faq::after {
  content: ""; position: absolute; top: -6px; left: -6px; right: -6px; height: 12px; pointer-events: none;
  background:
    linear-gradient(135deg, transparent calc(50% - .6px), var(--rule, var(--line-strong)) calc(50% - .6px), var(--rule, var(--line-strong)) calc(50% + .6px), transparent calc(50% + .6px)) left center / 12px 12px no-repeat,
    linear-gradient(135deg, transparent calc(50% - .6px), var(--rule, var(--line-strong)) calc(50% - .6px), var(--rule, var(--line-strong)) calc(50% + .6px), transparent calc(50% + .6px)) right center / 12px 12px no-repeat;
  opacity: clamp(0, calc((var(--draw, 1) - .9) * 10), 1);
}
.section + .section::before, .section + .section::after, .ex::before, .ex::after { left: max(var(--gutter), calc((100% - var(--max)) / 2)); right: max(var(--gutter), calc((100% - var(--max)) / 2)); }
.section + .section::after, .ex::after { left: calc(max(var(--gutter), calc((100% - var(--max)) / 2)) - 6px); right: calc(max(var(--gutter), calc((100% - var(--max)) / 2)) - 6px); }
.beat + .beat::before { display: none; }
@media (max-width: 960px) { .beat + .beat::before { display: block; } .beats::after { display: none; } }
.permit::before, .permit::after { display: none; }
.section.permit + .section::before, .section.permit + .section::after { display: none; }

/* Crop ticks on drawing frames */
.ticks { position: relative; }
.ticks::before, .ticks::after { content: ""; position: absolute; width: 14px; height: 14px; border: 0 solid var(--line-strong); pointer-events: none; z-index: 1; }
.ticks::before { top: -8px; left: -8px; border-width: 1px 0 0 1px; }
.ticks::after { bottom: -8px; right: -8px; border-width: 0 1px 1px 0; }
.permit .ticks::before, .permit .ticks::after { border-color: rgba(242, 241, 237, .4); }
.sheet-frame.ticks, .ex-shot.ticks { overflow: visible; }
.sheet-frame.ticks img { border-radius: 4px; }
.wipe { position: relative; display: block; overflow: hidden; border-radius: 14px; background: var(--cadcraft); }
.wipe .cad-cover { z-index: 1; }
.printed .wipe, .printed .cad-cover { background: #fff; }
.printed .wipe .cad-cover::before { display: none; }

/* Examples: the drawing gets a full-width band */
.ex-band { display: grid; gap: 12px; margin-bottom: clamp(32px, 4vw, 56px); }
.ex-band .ex-shot { border: 0; background: none; border-radius: 0; }
.ex-band .wipe img { width: 100%; max-height: 82vh; object-fit: contain; }
.ex-sub { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 12px; align-items: start; }
.ex-sub .ex-thumbs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ex-text { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 24px 64px; align-items: start; }
.ex-text h2 { font: 400 clamp(24px, 2.4vw, 34px)/1.15 var(--display); }
.ex-text .left { display: grid; gap: 20px; }
.ex-text .right { display: grid; gap: 20px; }
.printed .ex-thumbs img { object-fit: contain; }
@media (max-width: 860px) { .ex-sub, .ex-text { grid-template-columns: 1fr; } }

/* Features: each group's aside carries a real render */
.aside-fig { margin: 8px 0 0; }
.aside-fig .wipe { aspect-ratio: 4 / 3; }
.aside-fig .wipe img { width: 100%; height: 100%; object-fit: cover; }
.aside-fig .wipe.paper { background: #fff; border: 1px solid var(--line); }
.aside-fig .wipe.paper img { object-fit: contain; }
.aside-fig figcaption { margin-top: 10px; font: 500 11px/16px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-muted); }

/* Hero narration, illustration note, scroll hint */
.hero-cap { flex: none; display: flex; justify-content: space-between; gap: 8px 24px; flex-wrap: wrap; padding: 0 clamp(16px, 3vw, 40px) 12px; background: var(--canvas); font-size: 13px; line-height: 1.45; color: var(--ink-muted); }
.hero-cap .phase { color: var(--ink); font-weight: 500; }
.scroll-hint { display: inline-flex; align-items: center; gap: 10px; margin-top: 16px; font: 500 11px/16px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-muted); transition: opacity .3s; }
.scroll-hint i { position: relative; width: 1px; height: 28px; background: var(--line-strong); overflow: hidden; }
.scroll-hint i::after { content: ""; position: absolute; left: -1px; top: -10px; width: 3px; height: 10px; background: var(--signal); animation: hint 1.8s var(--ease-out) infinite; }
@keyframes hint { to { transform: translateY(40px); } }
.scroll-hint[data-off] { opacity: 0; }
.permit :focus-visible { outline-color: var(--t-ink); }
@media (max-width: 860px) {
  .scroll-hint { display: none; }
  .hero-cap { flex-direction: column; padding-top: 4px; font-size: 14px; }
  .hero-cap .phase { font-size: 16px; }
}
.ex-shot .chip { z-index: 2; }
.wipe.paper .cad-cover { background: #fff; }
