@font-face { font-family: "Figtree"; font-style: normal; font-weight: 300 900; font-display: swap; src: url("/fonts/figtree.woff2") format("woff2"); }
:root {
  color-scheme: light dark;
  /* The whole palette lives here. Graphite and hi-vis lime on a cool off-white. */
  --bg: #F2F3F1; --card: #FFFFFF; --ink: #131517; --soft: #5A6066; --line: #D8DAD6;
  --accent: #3F5C00;                       /* lime dark enough to read as text on the light page */
  --tint: #E6F5B4;
  --btn: #131517; --btn-ink: #C8F53C;      /* main buttons */
  --pop: #C8F53C; --on-pop: #131517; --pop-wash: rgba(200, 245, 60, .14);
  /* The drawing board: the dark panel every drawing sits on. Same in light and dark mode. */
  --mat: #17191C; --mat-deep: #101113; --mat-line: #2F3338; --mat-soft: #A4ABB2; --mat-ink: #F2F4F1;
  --body: "Figtree", "Segoe UI", system-ui, -apple-system, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", "Consolas", "SF Mono", Menlo, monospace;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #0C0D0E; --card: #17191B; --ink: #F0F2EE; --soft: #A2A8A0; --line: #2A2D2F; --accent: #C8F53C; --tint: #252C12; --btn: #C8F53C; --btn-ink: #131517; }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 17px/1.55 var(--body); }
a { color: var(--accent); text-underline-offset: 3px; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }
[hidden] { display: none !important; }
:where(a, button, summary, input, select):focus-visible { outline: 3px solid var(--focus, var(--accent)); outline-offset: 2px; }
.in input:focus-visible, .in select:focus-visible { outline: none; }
.bp, .details, .demo-controls { --focus: var(--pop); }

/* The blueprint surface: every drawing sits on one of these, in light and dark mode alike. */
.bp {
  --d-a: var(--pop); --d-dim: var(--mat-soft); --d-text: var(--mat-ink);
  background-color: var(--mat);
  background-image: linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 18px 18px; background-position: -1px -1px;
  color: var(--mat-ink);
}
.bp svg { display: block; width: 100%; height: auto; }
.d-t { fill: var(--d-text); font: 600 11px var(--mono); }
.d-dim { stroke: var(--d-dim); stroke-width: 1; }
.d-dash { stroke: var(--d-dim); stroke-width: 1; stroke-dasharray: 3 3; }
.d-ground { stroke: var(--d-dim); stroke-width: 1.5; }
.d-base { fill: rgba(255,255,255,.13); }
.d-unit { fill: var(--d-a); fill-opacity: .62; }
.d-flat { fill-opacity: .3; }
.d-stroke { stroke: var(--d-a); stroke-width: 1.5; }
.d-edge { fill: none; stroke: var(--d-a); stroke-width: 1.5; }
.d-joist { stroke: #fff; stroke-opacity: .6; stroke-width: 1; stroke-dasharray: 4 3; }
.d-rail { stroke: var(--d-a); stroke-width: 3; }
.d-post { fill: var(--mat-ink); }
.d-under { fill-opacity: .35; }
.d-top { fill: var(--d-a); fill-opacity: .62; stroke: var(--d-a); stroke-width: 1.2; stroke-linejoin: round; }
.d-side1 { fill: var(--d-a); fill-opacity: .36; stroke: var(--d-a); stroke-width: 1.2; stroke-linejoin: round; }
.d-side2 { fill: var(--d-a); fill-opacity: .2; stroke: var(--d-a); stroke-width: 1.2; stroke-linejoin: round; }
.d-floor { fill: rgba(255,255,255,.08); stroke: var(--d-dim); stroke-width: 1; stroke-linejoin: round; }
.d-ceil { fill: rgba(255,255,255,.1); stroke: #fff; stroke-opacity: .7; stroke-width: 1; stroke-dasharray: 4 3; stroke-linejoin: round; }

/* Header and footer */
.top { border-bottom: 1px solid var(--line); background: var(--card); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 58px; }
.brand { display: inline-flex; align-items: center; gap: 9px; min-height: 44px; font-weight: 800; font-size: 1.18rem; letter-spacing: -0.01em; color: var(--ink); text-decoration: none; }
.brand svg { width: 26px; height: 26px; flex: none; }
.top nav { display: flex; gap: 4px; }
.top nav a { color: var(--ink); text-decoration: none; font-weight: 600; font-size: .95rem; padding: 12px 10px; border-radius: 8px; }
.top nav a:hover { background: var(--tint); }
footer { border-top: 1px solid var(--line); margin-top: 64px; padding: 26px 0 34px; color: var(--soft); font-size: .93rem; }
footer .wrap { display: grid; gap: 10px; }
footer nav { display: flex; flex-wrap: wrap; gap: 6px 18px; }
footer a { color: var(--soft); display: inline-block; padding: 10px 0; }
.prose p > a:only-child { display: inline-block; padding: 10px 0; }

/* Type */
h1 { font-size: clamp(2.1rem, 6.4vw, 3.5rem); line-height: 1.02; letter-spacing: -0.03em; font-weight: 800; margin: 0 0 14px; text-wrap: balance; }
h1 em { font-style: normal; background: var(--pop); color: var(--on-pop); padding: 0 .14em; border-radius: .14em; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.lede { font-size: 1.12rem; color: var(--soft); max-width: 60ch; margin: 0 0 8px; }
.eyebrow { margin: 0 0 12px; font: 700 .78rem var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--soft); }
.eyebrow::before { content: ""; display: inline-block; width: .7em; height: .7em; margin-right: .7em; background: var(--pop); border: 1.5px solid var(--ink); }
h2.section { font-size: clamp(1.5rem, 4vw, 2rem); letter-spacing: -0.02em; line-height: 1.1; margin: 0 0 4px; }

/* Home */
.hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.02fr); gap: 34px; align-items: center; padding: 44px 0 14px; }
.hero .cta { margin-top: 18px; }
.demo { border-radius: 20px; overflow: hidden; border: 1px solid var(--mat-line); box-shadow: 0 22px 50px -26px rgba(0, 0, 0, .55); }
.demo .stage { border-radius: 0; border: 0; padding: 18px 18px 6px; }
.demo-controls { background: var(--mat-deep); border-top: 1px solid var(--mat-line); padding: 10px 18px 16px; display: grid; gap: 4px; }
.demo-controls .field { border: 0; padding: 6px 0 2px; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 2px 12px; }
.demo-controls label { margin: 0; color: var(--mat-soft); font-weight: 600; font-size: .9rem; }
.demo-controls .in { border-color: var(--mat-line); background: transparent; width: 112px; }
.demo-controls .in input { color: var(--mat-ink); padding: 11px 8px; font-size: 1rem; text-align: right; }
.demo-controls .in .unit { background: transparent; border-color: var(--mat-line); color: var(--mat-soft); padding: 0 8px; }
.demo-controls .slide { grid-column: 1 / -1; accent-color: var(--pop); }
.demo-controls a { display: inline-block; padding: 10px 0; margin-top: 2px; color: var(--pop); font-weight: 700; font-size: .95rem; }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(236px, 1fr)); gap: 14px; margin: 22px 0 0; padding: 0; list-style: none; }
.cards a { display: flex; flex-direction: column; height: 100%; background: var(--card); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; color: var(--ink); text-decoration: none; transition: transform .16s, box-shadow .16s, border-color .16s; }
.cards a:hover { transform: translateY(-3px); border-color: var(--accent); box-shadow: 0 16px 34px -22px rgba(0, 0, 0, .5); }
.cards .bp { aspect-ratio: 360 / 202; overflow: hidden; }
.cards .txt { padding: 13px 15px 15px; display: grid; gap: 4px; }
.cards b { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; font-size: 1.08rem; letter-spacing: -0.01em; }
.cards i { font: 700 .72rem var(--mono); font-style: normal; color: var(--on-pop); background: var(--pop); border-radius: 999px; padding: 2px 9px; white-space: nowrap; }
.cards span { color: var(--soft); font-size: .92rem; line-height: 1.4; }
.band { margin: 62px 0 0; }
.points { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 22px; margin: 18px 0 0; padding: 0; list-style: none; counter-reset: p; }
.points li { border-top: 3px solid var(--ink); padding-top: 12px; counter-increment: p; }
.points li::before { content: "0" counter(p); display: block; font: 700 .78rem var(--mono); color: var(--accent); margin-bottom: 4px; }
.points b { display: block; font-size: 1.05rem; }
.points span { color: var(--soft); font-size: .96rem; }
.trade { margin: 62px 0 0; border-radius: 20px; padding: 28px 26px; display: grid; grid-template-columns: minmax(0, 1.3fr) auto; gap: 20px; align-items: center; }
.trade h2 { margin: 0 0 6px; font-size: clamp(1.4rem, 3.6vw, 1.9rem); letter-spacing: -0.02em; line-height: 1.1; }
.trade p { margin: 0; color: var(--mat-soft); max-width: 56ch; }
.trade .cta { margin: 0; background: var(--pop); color: var(--on-pop); white-space: nowrap; }

/* Calculator */
.crumbs { margin: 22px 0 10px; font-size: .9rem; color: var(--soft); }
.crumbs a { color: var(--soft); display: inline-block; padding: 11px 0; }
.page h1 { font-size: clamp(1.9rem, 5.4vw, 2.8rem); }
.tool { display: grid; grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr); gap: 20px; align-items: start; margin: 22px 0 0; }
.inputs { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 6px 18px 14px; }
.field { padding: 12px 0; border-top: 1px solid var(--line); }
.inputs > .field:first-child { border-top: 0; }
.field label { display: block; font-weight: 700; font-size: .96rem; margin-bottom: 6px; }
.in { display: flex; align-items: stretch; border: 1.5px solid var(--line); border-radius: 10px; background: var(--bg); overflow: hidden; }
.in:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--tint); }
.in input, .in select { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--ink); font: 600 1.12rem var(--body); padding: 10px 12px; outline: 0; font-variant-numeric: tabular-nums; }
.in select { cursor: pointer; background-color: var(--bg); }
.in select option { background-color: var(--card); color: var(--ink); }
.in .unit { display: flex; align-items: center; padding: 0 12px; color: var(--soft); font: 600 .82rem var(--mono); border-left: 1.5px solid var(--line); background: var(--card); white-space: nowrap; }
.slide { display: block; width: 100%; margin: 4px 0 0; height: 40px; accent-color: var(--btn); cursor: pointer; }
.hint { margin: 6px 0 0; color: var(--soft); font-size: .88rem; line-height: 1.4; }
.more { border-top: 1px solid var(--line); }
.more summary { cursor: pointer; padding: 13px 0; font-weight: 700; font-size: .96rem; list-style: none; display: flex; justify-content: space-between; align-items: center; }
.more summary::-webkit-details-marker { display: none; }
.more summary::after { content: "+"; font: 700 1.2rem var(--mono); color: var(--accent); }
.more[open] summary::after { content: "–"; }
.plain { border: 0; background: none; padding: 14px 0 8px; color: var(--soft); font: 600 .9rem var(--body); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

.side { position: sticky; top: 14px; border-radius: 18px; overflow: hidden; border: 1px solid var(--mat-line); box-shadow: 0 22px 50px -28px rgba(0, 0, 0, .55); }
.stage { padding: 20px 20px 8px; }
.r-label { margin: 0; color: var(--mat-soft); font: 700 .76rem var(--mono); letter-spacing: .09em; text-transform: uppercase; }
.r-big { margin: 2px 0 0; font-weight: 800; font-size: clamp(2.6rem, 6vw, 3.6rem); line-height: 1.05; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.r-big small { font-size: .36em; font-weight: 700; letter-spacing: 0; color: var(--mat-soft); margin-left: 6px; }
.r-big.long { font-size: clamp(1.7rem, 3.6vw, 2.3rem); }
.r-big.tick #h-value { animation: tick .28s ease-out; display: inline-block; }
@keyframes tick { from { color: var(--pop); transform: translateY(-3px); } to { color: inherit; transform: none; } }
#dia { margin: 6px 0 0; }
.details { background: var(--mat-deep); color: var(--mat-ink); padding: 6px 20px 18px; border-top: 1px solid var(--mat-line); }
#lines { margin: 0; }
#lines div { display: flex; justify-content: space-between; align-items: baseline; gap: 14px; padding: 10px 0; border-top: 1px solid var(--mat-line); }
#lines div:first-child { border-top: 0; }
#lines dt { color: var(--mat-soft); font-size: .95rem; }
#lines dd { margin: 0; font-weight: 700; text-align: right; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
#lines dd span { font: 500 .8rem var(--mono); color: var(--mat-soft); }
.r-price { margin: 10px 0 0; padding: 12px 14px; border-radius: 12px; background: var(--pop-wash); border: 1px solid var(--pop); }
.r-price b { display: block; font-size: 1.5rem; letter-spacing: -0.02em; }
.r-price span { color: var(--mat-soft); font-size: .88rem; }
.r-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 0; }
.r-actions button, .r-actions a { flex: 1 1 auto; text-align: center; border: 1px solid var(--mat-line); background: transparent; color: var(--mat-ink); font: 700 .9rem var(--body); padding: 12px 12px; min-height: 44px; border-radius: 10px; cursor: pointer; text-decoration: none; }
.r-actions button:hover, .r-actions a:hover { border-color: var(--mat-soft); }
.r-actions .main { background: var(--d-a, var(--pop)); border-color: var(--d-a, var(--pop)); color: var(--on-pop); }
.r-note { margin: 12px 0 0; color: var(--mat-soft); font-size: .84rem; line-height: 1.4; }

/* Text below the tool, and plain pages */
.prose { max-width: 70ch; margin: 48px 0 0; }
.prose h2 { font-size: 1.45rem; letter-spacing: -0.015em; line-height: 1.2; margin: 34px 0 8px; }
.prose h3 { font-size: 1.05rem; margin: 20px 0 4px; }
.prose p, .prose li { margin: 8px 0; }
.prose ul { padding-left: 20px; }
.example { background: var(--card); border: 1px solid var(--line); border-left: 5px solid var(--accent); border-radius: 12px; padding: 12px 16px; }
.example p { margin: 4px 0; }
.related { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; list-style: none; }
.related a { display: block; padding: 11px 15px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); color: var(--ink); text-decoration: none; font-weight: 600; font-size: .94rem; }
.related a:hover { border-color: var(--accent); }
.cta { display: inline-block; background: var(--btn); color: var(--btn-ink); font-weight: 800; text-decoration: none; padding: 13px 22px; border-radius: 12px; margin: 8px 10px 0 0; }
.cta.ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--ink); }
.trade-note { margin: 34px 0 0; padding: 16px 18px; border: 1px dashed var(--line); border-radius: 14px; background: var(--card); max-width: 70ch; }
.trade-note p { margin: 0; }

@media (max-width: 800px) {
  .hero { grid-template-columns: 1fr; gap: 22px; padding-top: 28px; }
  .trade { grid-template-columns: 1fr; }
  /* Phone: the answer and drawing stay pinned at the top while the boxes scroll under them. */
  .tool { display: flex; flex-direction: column; align-items: stretch; gap: 14px; margin-top: 16px; }
  .side { display: contents; }
  .stage { order: 0; position: sticky; top: 0; z-index: 5; margin: 0 -16px; padding: 10px 16px 4px; border-bottom: 1px solid var(--mat-line); box-shadow: 0 14px 24px -18px rgba(0, 0, 0, .8); }
  .stage .headline { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0 12px; }
  .inputs .field, .more summary { scroll-margin-top: 300px; }
  .stage .r-big { font-size: 1.9rem; margin: 0; white-space: nowrap; max-width: 100%; }
  .stage .r-big.long { font-size: 1.35rem; white-space: normal; overflow-wrap: anywhere; }
  .stage #dia { max-height: 27vh; margin: 2px auto 0; }
  .stage.folded #dia { display: none !important; }
  .stage.folded { padding-bottom: 10px; }
  .inputs { order: 1; }
  .details { order: 2; border: 1px solid var(--mat-line); border-radius: 18px; }
  .demo .stage { position: static; margin: 0; box-shadow: none; padding: 14px 14px 4px; }
  .demo .stage #dia { max-height: none; }
  .top nav a { padding: 12px 7px; font-size: .9rem; }
}
@media (prefers-reduced-motion: reduce) { .r-big.tick #h-value { animation: none; } .cards a { transition: none; } }
@media print {
  .top, footer, .r-actions, .plain, .related, .trade-note, .crumbs, .slide { display: none !important; }
  body { background: #fff; color: #000; }
  .bp, .details { background: #fff !important; color: #000; --d-text: #000; --d-dim: #444; }
  .side { box-shadow: none; border-color: #000; position: static; }
  .r-label, .r-big small, #lines dt, #lines dd span, .r-note { color: #000; }
  .d-post { fill: #333; } .d-base { fill: #eee; }
}
