/* Outlay
   A drawing set: ink on bond paper, a highlighter for what matters, a red pen
   for checking, and the coloured markers estimators use for takeoff.
   One type family (Archivo): condensed for headings and sheet lettering, normal for reading. */

:root {
  --paper: #f3f4ee;        /* the desk-side tone of bond paper */
  --sheet: #fdfdfb;        /* a clean sheet lying on it */
  --tint: #e9ebe2;
  --ink: #131a22;          /* drafting ink, blue-black */
  --muted: #55606b;
  --rule: #c6cbc2;
  --marker: #ffe53b;       /* highlighter */
  --pen: #d8321a;          /* the checker's red pen */
  --greenbar: #e1eee4;     /* ledger paper, used only in the estimate */
  --ledger: #0d4a35;

  /* takeoff marker colours */
  --tk-carpet: #ffe53b;
  --tk-lvt: #62bdf2;
  --tk-tile: #f590c4;
  --tk-ceiling: #b6a4f2;
  --tk-partition: #0a9b68;
  --tk-doors: #e4502a;

  --wrap: 1240px;
  --gutter: clamp(16px, 4vw, 40px);
  --section: clamp(64px, 9vw, 128px);
  --line: 1.5px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 84px; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Archivo", "Helvetica Neue", Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.55;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }

h1, h2 {
  font-stretch: 68%;
  font-weight: 800;
  line-height: 0.98;
  letter-spacing: -0.005em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.5rem, 5.4vw, 4.5rem); }
h2 { font-size: clamp(2rem, 4.2vw, 3.25rem); }
h3 { font-size: 1.125rem; font-weight: 700; line-height: 1.25; }

:focus-visible { outline: 3px solid var(--pen); outline-offset: 3px; }

.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }

.visually-hidden {
  position: absolute; width: 1px !important; height: 1px; overflow: hidden;
  padding: 0 !important; border: 0 !important; margin: -1px;
  clip-path: inset(50%); white-space: nowrap;
}

.skip {
  position: absolute; left: 8px; top: -60px; z-index: 20;
  background: var(--ink); color: var(--sheet); padding: 10px 14px;
}
.skip:focus { top: 8px; }

/* Placeholders that still need confirming, drawn like a revision mark. */
.tbc { outline: 1.5px dashed var(--pen); outline-offset: 3px; border-radius: 2px; }
.draft-note {
  display: none;
  background: var(--pen); color: #fff;
  font-size: 0.875rem; text-align: center; padding: 6px var(--gutter);
}
html[data-draft] .draft-note { display: block; }
html:not([data-draft]) .tbc { outline: 0; }

/* Buttons */
.btn {
  display: inline-block; border: 0; cursor: pointer; text-decoration: none;
  font-weight: 700; padding: 15px 24px; border-radius: 2px;
  transition: background-color 0.15s, color 0.15s;
}
.btn-small { padding: 10px 16px; font-size: 0.9375rem; }
.btn-ink { background: var(--ink); color: var(--sheet); }
.btn-ink:hover { background: var(--marker); color: var(--ink); }
.btn-marker { background: var(--marker); color: var(--ink); }
.btn-marker:hover { background: #fff07a; }
.btn[disabled] { opacity: 0.6; cursor: progress; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: var(--paper); border-bottom: var(--line) solid var(--ink);
}
.header-row { display: flex; align-items: center; gap: 12px 32px; min-height: 64px; }
.wordmark { display: block; color: var(--ink); margin-right: auto; text-decoration: none; }
.wordmark .logo { display: block; height: 34px; width: auto; }
.site-nav { display: flex; gap: 28px; }
.site-nav a { text-decoration: none; font-size: 0.9375rem; font-weight: 500; white-space: nowrap; }
.site-nav a:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 6px; }

/* Hero */
.hero { padding-block: clamp(32px, 4vw, 56px) 0; }
.hero-grid {
  display: grid; gap: clamp(32px, 5vw, 72px);
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); align-items: start;
}
.lede { font-size: 1.1875rem; color: var(--muted); margin-top: 20px; max-width: 34em; }
.hero-aside { margin-top: 16px; font-size: 0.9375rem; color: var(--muted); }
.hero-aside a { color: var(--ink); font-weight: 600; text-underline-offset: 3px; }

.dropzone {
  position: relative; display: flex; align-items: center; gap: 18px; cursor: pointer;
  margin-top: 28px; padding: 22px 24px;
  border: 2px dashed var(--ink); border-radius: 2px; background: var(--sheet);
  transition: background-color 0.15s;
}
.dropzone:hover, .dropzone.is-over { background: var(--marker); }
.dropzone:focus-within { outline: 3px solid var(--pen); outline-offset: 3px; }
.dropzone.has-files { border-style: solid; background: var(--marker); }
.dropzone-icon { width: 40px; height: 40px; flex: none; }
.dropzone-text { display: grid; gap: 2px; }
.dropzone-text strong { font-size: 1.125rem; }
.dropzone-text span { font-size: 0.9375rem; color: var(--muted); }
.dropzone:hover .dropzone-text span, .dropzone.is-over .dropzone-text span, .dropzone.has-files .dropzone-text span { color: var(--ink); }

/* The plan: one drawing, used flat in the hero and raised in the sample section */
.plan { display: block; width: 100%; height: auto; }
.plan text { font-size: 10.5px; font-stretch: 80%; font-weight: 500; fill: var(--ink); }
.plan .gridline { fill: none; stroke: var(--muted); stroke-width: 0.6; stroke-dasharray: 12 3 2 3; }
.plan .bubble circle { fill: var(--sheet); stroke: var(--ink); stroke-width: 1; }
.plan .bubble text { font-size: 10px; font-weight: 700; text-anchor: middle; }
.plan .dim { fill: none; stroke: var(--ink); stroke-width: 0.8; }
.plan .dim-text { font-size: 9.5px; fill: var(--muted); paint-order: stroke; stroke: var(--sheet); stroke-width: 4px; }
.plan .north circle { fill: none; stroke: var(--ink); stroke-width: 1; }
.plan .north path { fill: var(--ink); }
.plan .wall-outer { fill: none; stroke: var(--ink); stroke-width: 5; }
.plan .wall { fill: none; stroke: var(--ink); stroke-width: 3; }
.plan .door { fill: none; stroke: var(--ink); stroke-width: 0.9; }

.layer-carpet rect { fill: var(--tk-carpet); }
.layer-lvt rect { fill: var(--tk-lvt); }
.layer-tile rect { fill: var(--tk-tile); }
.layer-carpet, .layer-lvt, .layer-tile { opacity: 0.6; transition: opacity 0.5s; }
.layer-partition path {
  fill: none; stroke: var(--tk-partition); stroke-width: 6; stroke-linecap: square; opacity: 0.85;
  stroke-dasharray: 1; stroke-dashoffset: 0; transition: stroke-dashoffset 0.7s ease-in-out;
}
.layer-perimeter { display: none; }
.layer-perimeter rect { fill: none; stroke: var(--tk-partition); stroke-width: 6; opacity: 0.85; }
.layer-doors circle {
  fill: var(--tk-doors); stroke: var(--sheet); stroke-width: 2;
  transform-box: fill-box; transform-origin: center; transition: transform 0.25s;
}

/* Hero sheet */
.sheet { border: var(--line) solid var(--ink); background: var(--sheet); }
.sheet .plan { padding: 6px 6px 0; }

/* Animated run: the drawing is inked, then each layer is measured in turn (main.js) */
.sheet.is-running .draw { stroke-dasharray: 1; stroke-dashoffset: 1; }
.sheet.is-running .annot, .sheet.is-running .door, .sheet.is-running .rooms { opacity: 0; }
.sheet.is-running.is-drawn .draw { stroke-dashoffset: 0; transition: stroke-dashoffset 1s ease-in-out; }
.sheet.is-running.is-drawn .annot, .sheet.is-running.is-drawn .door, .sheet.is-running.is-drawn .rooms { opacity: 1; transition: opacity 0.5s 0.6s; }
.sheet.is-running .layer-carpet,
.sheet.is-running .layer-lvt,
.sheet.is-running .layer-tile { opacity: 0; }
.sheet.is-running .layer-partition path { stroke-dashoffset: 1; }
.sheet.is-running .layer-doors circle { transform: scale(0); }
.sheet.is-running .layer.is-on { opacity: 0.6; }
.sheet.is-running .layer-partition.is-on { opacity: 1; }
.sheet.is-running .layer-partition.is-on path { stroke-dashoffset: 0; }
.sheet.is-running .layer-doors.is-on { opacity: 1; }
.sheet.is-running .layer-doors.is-on circle { transform: scale(1); }
.sheet.is-running .tally tr { opacity: 0.3; transition: opacity 0.3s; }
.sheet.is-running .tally tr.is-on { opacity: 1; }

.tally { width: 100%; border-collapse: collapse; margin-top: 4px; font-size: 0.9375rem; }
.tally th, .tally td { padding: 7px 14px; border-top: 1px solid var(--rule); }
.tally th { text-align: left; font-weight: 500; }
.tally td { text-align: right; font-weight: 700; white-space: nowrap; }
.swatch { display: inline-block; width: 12px; height: 12px; margin-right: 10px; vertical-align: -1px; }
.swatch-carpet { background: var(--tk-carpet); }
.swatch-lvt { background: var(--tk-lvt); }
.swatch-tile { background: var(--tk-tile); }
.swatch-partition { background: var(--tk-partition); }
.swatch-doors { background: var(--tk-doors); border-radius: 50%; }
.sheet figcaption {
  border-top: var(--line) solid var(--ink); padding: 8px 14px;
  font-size: 0.8125rem; font-stretch: 80%; color: var(--muted);
}

/* Title block */
.titleblock {
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-top: clamp(40px, 6vw, 72px); border: var(--line) solid var(--ink); background: var(--sheet);
}
.titleblock > div { padding: 14px 18px; border-left: 1px solid var(--ink); }
.titleblock > div:first-child { border-left: 0; }
.titleblock dt { font-size: 0.8125rem; font-stretch: 80%; color: var(--muted); }
.titleblock dd { font-weight: 700; margin-top: 2px; line-height: 1.3; }

/* Sections: each one is a sheet in the set, ruled off at the top with its number */
.section { padding-block: var(--section); }
.section-tint { background: var(--tint); }
.section-head { max-width: 46rem; margin-bottom: clamp(32px, 4vw, 56px); }
.section-head p { margin-top: 18px; color: var(--muted); font-size: 1.125rem; max-width: 38em; }
.section-head .sheet-no, .request-copy .sheet-no {
  margin: 0 0 20px; max-width: none; padding-top: 8px; border-top: var(--line) solid currentColor;
  font-size: 0.8125rem; font-stretch: 80%; font-weight: 600; color: var(--ink);
}
.wrap > .section-head:first-child { max-width: none; }
.wrap > .section-head:first-child > h2, .wrap > .section-head:first-child > p:not(.sheet-no) { max-width: 46rem; }
.wrap > .section-head:first-child > p:not(.sheet-no) { max-width: 38em; }

/* The instrument: plan and estimate side by side, linked */
.instrument {
  --t: 0; --s: 1; --h-int: 0.3; --h-ext: 0.3;
  display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 7fr); gap: clamp(20px, 3vw, 40px);
  align-items: start;
}
.instrument[data-walls="low"] { --h-int: 0.05; --h-ext: 0.05; }
.instrument[data-walls="int"] { --h-int: 1; --h-ext: 0.05; }
.instrument[data-walls="all"] { --h-int: 1; --h-ext: 1; }
.instrument[data-walls="base"] { --h-int: 0.1; --h-ext: 0.1; }

.instrument-model {
  position: sticky; top: 84px;
  border: var(--line) solid var(--ink); background: var(--sheet);
}
.model { position: relative; aspect-ratio: 572 / 372; overflow: hidden; }
.model:empty { display: none; }
.model-plane {
  position: absolute; left: 50%; top: 52%; width: 572px; height: 398px;
  transform-style: preserve-3d;
  /* no perspective: an axonometric view, the way a drawing shows three dimensions */
  transform: translate(-50%, -50%) scale(var(--s)) rotateX(calc(var(--t) * 56deg)) rotateZ(calc(var(--t) * -38deg));
  will-change: transform;
}
.model-plane .plan { position: absolute; inset: 0; width: 572px; height: 398px; }
.model .layer { transition: opacity 0.3s; }
.model .layer[data-pick] { cursor: pointer; }
.model .layer-perimeter { display: block; opacity: 0; }
.instrument.has-active .model .layer:not(.is-lit) { opacity: 0.07; }
.instrument.has-active .model .layer.is-lit { opacity: 0.85; }
.model.is-ceiling .layer-carpet rect, .model.is-ceiling .layer-lvt rect, .model.is-ceiling .layer-tile rect { fill: var(--tk-ceiling); }

.wall3d {
  position: absolute; height: 60px; transform-origin: 0 0; pointer-events: none;
  background: rgba(253, 253, 251, 0.6); border: 1px solid var(--ink);
  transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1), background-color 0.3s;
}
.wall3d-int { --h: var(--h-int); }
.wall3d-ext { --h: var(--h-ext); }
.instrument[data-walls="int"] .wall3d-int { background: rgba(10, 155, 104, 0.5); }
.instrument[data-walls="all"] .wall3d { background: rgba(255, 229, 59, 0.6); }
.instrument[data-walls="base"] .wall3d { background: var(--tk-doors); }

.readout { border-top: var(--line) solid var(--ink); padding: 14px 18px 16px; min-height: 7.2em; }
.readout-qty { font-stretch: 68%; font-weight: 800; font-size: 1.625rem; line-height: 1.1; }
.readout-how { margin-top: 6px; font-size: 0.9375rem; color: var(--muted); }

/* Ledger (the estimate) */
.ledger { border: var(--line) solid var(--ink); background: var(--sheet); }
.ledger-tabs { display: flex; border-bottom: var(--line) solid var(--ink); }
.ledger-tabs button {
  background: none; border: 0; border-right: 1px solid var(--ink); cursor: pointer;
  padding: 14px 22px; font-weight: 600;
}
.ledger-tabs button[aria-selected="true"] { background: var(--ink); color: var(--sheet); }
.ledger-tabs button:focus-visible { outline-offset: -4px; }
.greenbar { width: 100%; border-collapse: collapse; font-size: 0.9375rem; }
.greenbar th, .greenbar td { padding: 11px 14px; text-align: left; vertical-align: baseline; }
.greenbar thead th { font-size: 0.8125rem; font-stretch: 80%; font-weight: 600; color: var(--muted); border-bottom: 1px solid var(--rule); white-space: nowrap; }
.greenbar tbody tr:nth-child(odd) { background: var(--greenbar); }
.greenbar .num { text-align: right; white-space: nowrap; }
.greenbar-lines th:nth-child(2) { width: 99%; }
.greenbar-lines td:nth-child(4), .greenbar-lines th:nth-child(4) { padding-left: 0; }
.greenbar tbody .col-csi { white-space: nowrap; color: var(--muted); }
.greenbar tfoot th { font-weight: 500; text-align: right; }
.greenbar tfoot tr:first-child > * { border-top: var(--line) solid var(--ink); }
.greenbar tfoot .grand > * { font-size: 1.25rem; font-weight: 800; border-top: 1px solid var(--rule); }
.greenbar tfoot .grand td.num { background: var(--marker); }
.ledger-note { padding: 12px 14px; border-top: 1px solid var(--rule); font-size: 0.875rem; color: var(--muted); }

/* Rows you can pick */
.greenbar-lines tbody tr { cursor: pointer; transition: background-color 0.15s; }
.row-pick {
  background: none; border: 0; padding: 0; margin: 0; cursor: pointer; text-align: left;
  text-decoration: underline; text-decoration-color: var(--rule); text-decoration-thickness: 1.5px; text-underline-offset: 4px;
}
.greenbar-lines tbody tr:hover .row-pick { text-decoration-color: var(--ink); }
.greenbar-lines tbody tr.is-active { background: var(--marker); box-shadow: inset 4px 0 0 var(--pen); }
.greenbar-lines tbody tr.is-active .col-csi { color: var(--ink); }
.greenbar-lines tbody tr.is-active .row-pick { text-decoration-color: transparent; font-weight: 700; }

/* Process: steps sit on a scale ruler */
.steps {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 32px;
  counter-reset: step;
  padding-top: 28px;
  background:
    linear-gradient(var(--ink), var(--ink)) 0 0 / 100% 1.5px no-repeat,
    repeating-linear-gradient(90deg, var(--ink) 0 1.5px, transparent 1.5px 12px) 0 0 / 100% 8px no-repeat,
    repeating-linear-gradient(90deg, var(--ink) 0 1.5px, transparent 1.5px 60px) 0 0 / 100% 16px no-repeat;
}
.steps li { counter-increment: step; }
.steps li::before {
  content: counter(step);
  display: block; font-stretch: 62%; font-weight: 900; font-size: 4rem; line-height: 1;
}
.step-time { display: inline-block; margin-top: 10px; font-size: 0.875rem; font-weight: 700; background: var(--marker); padding: 2px 8px; }
.steps h3 { margin-top: 14px; font-size: 1.25rem; }
.steps p { margin-top: 8px; color: var(--muted); font-size: 1rem; }

/* Trades */
.scope { display: grid; gap: 40px; }
.scope-group h3 { margin-bottom: 14px; }
.scope-grid {
  display: grid; background: var(--sheet);
  border-top: var(--line) solid var(--ink); border-left: 1px solid var(--rule);
}
.scope-grid-six { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.scope-grid-trades { grid-template-columns: repeat(7, minmax(0, 1fr)); }
.scope-grid li { display: flex; }
.scope-grid button {
  display: flex; flex-direction: column; gap: 6px; width: 100%; min-height: 76px;
  padding: 14px 16px; text-align: left; cursor: pointer; font-weight: 600; line-height: 1.25;
  background: none; border: 0;
  border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule);
  transition: background-color 0.12s;
}
.scope-grid button:hover { background: var(--marker); }
.scope-grid button:focus-visible { outline-offset: -4px; }
.scope-grid b { font-stretch: 62%; font-weight: 800; font-size: 1.5rem; line-height: 1; }

/* Team */
.team-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
.team-grid .section-head { margin-bottom: 0; }
.record { border: var(--line) solid var(--ink); background: var(--sheet); }
.record > div { padding: 16px 18px; border-top: 1px solid var(--ink); }
.record > div:first-child { border-top: 0; }
.record dt { font-size: 0.8125rem; font-stretch: 80%; color: var(--muted); }
.record dd { font-stretch: 68%; font-weight: 800; font-size: 2rem; line-height: 1.15; margin-top: 4px; }

/* Pricing */
.pricing { width: 100%; border-collapse: collapse; border-top: var(--line) solid var(--ink); }
.pricing th, .pricing td { padding: 22px 0; border-bottom: 1px solid var(--rule); vertical-align: baseline; }
.pricing th { text-align: left; font-size: 1.375rem; font-weight: 700; }
.pricing th span { display: block; font-size: 1rem; font-weight: 400; color: var(--muted); margin-top: 4px; }
.pricing td { text-align: right; white-space: nowrap; color: var(--muted); padding-left: 24px; }
.pricing td strong { font-stretch: 62%; font-weight: 900; font-size: 2.5rem; color: var(--ink); margin-left: 6px; }
.pricing td .pricing-word { font-size: 1.375rem; font-stretch: 100%; font-weight: 700; margin-left: 0; }
.pricing td:has(.pricing-word) { white-space: normal; max-width: 9em; }
.pricing-cta { margin-top: 32px; }

/* FAQ */
.faq-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: clamp(24px, 6vw, 96px); align-items: start; }
.faq-grid .section-head { margin-bottom: 0; }
.faq details { border-top: 1px solid var(--rule); }
.faq details:first-child { border-top: var(--line) solid var(--ink); }
.faq details:last-child { border-bottom: 1px solid var(--rule); }
.faq summary {
  cursor: pointer; list-style: none; padding: 18px 40px 18px 0; position: relative;
  font-weight: 700; font-size: 1.125rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 4px; top: 12px;
  font-size: 1.75rem; font-weight: 400;
}
.faq details[open] summary::after { content: "\2212"; }
.faq details p { padding: 0 40px 20px 0; color: var(--muted); max-width: 40em; }

/* Request form */
.request { background: var(--ink); color: var(--sheet); }
.request-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
.request-copy .sheet-no { color: var(--sheet); }
.request-copy p:not(.sheet-no) { margin-top: 18px; font-size: 1.125rem; color: #c3cad1; }
.request-points { margin-top: 28px; display: grid; gap: 10px; }
.request-points li { padding-left: 26px; position: relative; }
.request-points li::before {
  content: ""; position: absolute; left: 0; top: 0.42em; width: 14px; height: 8px;
  border-left: 3px solid var(--marker); border-bottom: 3px solid var(--marker); transform: rotate(-45deg);
}
.request-form {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 20px;
  background: var(--sheet); color: var(--ink); padding: clamp(20px, 3vw, 36px); border-radius: 2px;
}
.field { display: grid; gap: 6px; align-content: start; }
.field-wide { grid-column: 1 / -1; }
.field label:not(.dropzone) { font-size: 0.9375rem; font-weight: 600; }
.optional { font-weight: 400; color: var(--muted); }
.field input, .field select, .field textarea {
  width: 100%; padding: 12px 14px; background: #fff;
  border: 1.5px solid var(--muted); border-radius: 2px;
}
.field textarea { resize: vertical; }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { outline-offset: 1px; border-color: var(--ink); }
.field [aria-invalid="true"] { border-color: var(--pen); }
.dropzone-form { margin-top: 0; padding: 18px 20px; background: var(--paper); }
.file-list { display: grid; gap: 6px; margin-top: 4px; }
.file-list:empty { display: none; }
.file-list li {
  display: flex; align-items: center; gap: 12px; padding: 8px 12px;
  background: var(--tint); font-size: 0.9375rem;
}
.file-list .file-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.file-list .file-size { color: var(--muted); margin-left: auto; white-space: nowrap; }
.file-list button { background: none; border: 0; cursor: pointer; text-decoration: underline; padding: 2px; }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: 6px; }
.form-actions .btn-marker { outline: var(--line) solid var(--ink); outline-offset: -1.5px; }
.form-actions .btn-marker:focus-visible { outline: 3px solid var(--pen); outline-offset: 3px; }
.form-status { font-size: 0.9375rem; font-weight: 600; flex: 1 1 16rem; }
.form-status.is-error { color: var(--pen); }
.form-status.is-ok { color: var(--ledger); }

.form-legal { font-size: 0.8125rem; color: var(--muted); }
.form-legal a { text-underline-offset: 3px; }
.request-form[hidden] { display: none; }
.request-done {
  display: grid; gap: 14px; justify-items: start;
  background: var(--sheet); color: var(--ink); padding: clamp(24px, 4vw, 48px);
  border-radius: 2px; border-top: 10px solid var(--marker);
}
.request-done[hidden] { display: none; }
.request-done:focus { outline: 0; }
.request-done h3 { font-stretch: 68%; font-weight: 800; font-size: 2.25rem; line-height: 1; }
.request-done p { color: var(--muted); max-width: 36em; }
.request-done p:first-of-type { color: var(--ink); font-size: 1.125rem; font-weight: 600; }
.request-done .btn { margin-top: 8px; }

/* Footer: the set's title block */
.site-footer { background: var(--ink); padding-block: 0 clamp(32px, 5vw, 56px); }
.titleblock-footer { margin-top: 0; grid-template-columns: 1fr 1.4fr 1.2fr 1.6fr 1.2fr; font-size: 0.9375rem; }
.titleblock-footer dd { font-weight: 600; }
.titleblock-footer .tb-name { display: flex; align-items: center; }
.titleblock-footer .tb-name dd { margin: 0; }
.titleblock-footer .wordmark { margin: 0; }
.titleblock-footer a:not(.wordmark) { text-underline-offset: 3px; }
.tb-links { display: flex; flex-wrap: wrap; gap: 2px 14px; }
.footer-legal { display: flex; flex-wrap: wrap; gap: 4px 20px; margin-top: 18px; font-size: 0.875rem; color: #c3cad1; }
.footer-legal span { margin-right: auto; }
.footer-legal a { text-underline-offset: 3px; }
.footer-legal a:hover { color: var(--marker); }

/* Text pages: privacy, terms and the not-found page */
.page { padding-block: clamp(40px, 6vw, 88px) var(--section); }
.page-head { max-width: 46rem; padding-bottom: clamp(24px, 3vw, 40px); }
.page .sheet-no {
  margin: 0 0 20px; padding-top: 8px; border-top: var(--line) solid currentColor;
  font-size: 0.8125rem; font-stretch: 80%; font-weight: 600;
}
.page-head p:not(.sheet-no) { margin-top: 18px; color: var(--muted); font-size: 1.125rem; }
.lost .sheet-no { color: var(--ink); }
.prose { max-width: 44rem; }
.prose h2 { font-size: 1.75rem; margin-top: 48px; padding-top: 20px; border-top: 1px solid var(--rule); }
.prose h2:first-child { margin-top: 0; }
.prose p, .prose ul { margin-top: 14px; }
.prose ul { list-style: square; padding-left: 1.25em; display: grid; gap: 8px; }
.prose a { text-underline-offset: 3px; }
.prose strong { font-weight: 700; }
.lost { max-width: 40rem; }
.lost h1 { margin-top: 8px; }
.lost p:not(.sheet-no) { margin-top: 20px; font-size: 1.1875rem; color: var(--muted); }
.lost .lost-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.btn-line { background: none; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); }
.btn-line:hover { background: var(--marker); }

/* Narrow screens */
@media (max-width: 1100px) {
  .scope-grid-trades { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .scope-grid-trades li:nth-last-child(-n+2) { grid-column: span 2; }
  .scope-grid-six { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  html { scroll-padding-top: 132px; }
  /* the nav becomes a strip you can slide, under the header row */
  .header-row { flex-wrap: wrap; padding-top: 10px; min-height: 0; }
  .site-nav {
    order: 3; flex: 0 0 calc(100% + 2 * var(--gutter)); margin-inline: calc(-1 * var(--gutter)); padding: 10px var(--gutter);
    gap: 22px; overflow-x: auto; border-top: 1px solid var(--rule); margin-top: 10px; scrollbar-width: none;
  }
  .site-nav::-webkit-scrollbar { display: none; }
  .hero-grid, .team-grid, .faq-grid, .request-grid { grid-template-columns: minmax(0, 1fr); }
  .titleblock { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .titleblock > div { border-left: 0; border-top: 1px solid var(--ink); }
  .titleblock > div:first-child { grid-column: 1 / -1; border-top: 0; }
  .titleblock > div:nth-child(odd):not(:first-child) { border-left: 1px solid var(--ink); }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 36px 28px; }

  .instrument { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .instrument-model { top: 121px; z-index: 2; border-bottom: 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .model { aspect-ratio: 572 / 470; border-right: 1px solid var(--ink); }
  .readout { border-top: 0; min-height: 0; padding: 12px 14px; align-self: center; }
  .readout-qty { font-size: 1.25rem; }
  .readout-how { font-size: 0.8125rem; line-height: 1.4; }
}
@media (max-width: 560px) {
  .steps { grid-template-columns: minmax(0, 1fr); }
  .request-form { grid-template-columns: minmax(0, 1fr); }
  .dropzone { padding: 18px; gap: 14px; }
  .pricing th { font-size: 1.125rem; }
  .pricing td strong { font-size: 1.875rem; display: block; margin-left: 0; }
  .scope-grid-trades, .scope-grid-six { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .scope-grid-trades li:nth-last-child(-n+2) { grid-column: auto; }
  .greenbar { font-size: 0.875rem; }
  .greenbar th, .greenbar td { padding: 10px 8px; }
  .greenbar .col-csi, .greenbar .col-rate { display: none; }
  .ledger-tabs button { padding: 12px 14px; flex: 1; }
  .ledger-tabs button:last-child { border-right: 0; }
  .record dd { font-size: 1.625rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; transition-delay: 0s !important; }
}
