/* Theme 05: Blueprint (construction-drawing design language), shown for Keystone Remodeling Co. (sample business).
   The page is a drawing set: cyanotype paper, white line work, a title block, dimension lines, callout
   leaders and keynotes. One family (Barlow) in three widths. Breakpoints: 760 (tablet) and 1080 (desktop). */

/* Shared token layer (Linnet Studio library). Presets in AUDIT section 7 override these values. */
:root {
  color-scheme: dark;
  --c-bg: #1D4C8A;            /* cyanotype paper: page, keynote fill, the tint on the hero photo */
  --c-surface: #163E73;       /* deep plate: demo bar, form fields, table heads, action bar (white on it 10.7:1) */
  --c-ink: #FFFFFF;           /* line work and primary text (8.6:1 on paper) */
  --c-muted: #D2E2F8;         /* secondary text, field borders (6.5:1 on paper) */
  --c-line: rgb(255 255 255 / .3);  /* decorative hairlines only */
  --c-line-strong: var(--c-muted);  /* field borders and rules that carry meaning */
  --c-accent: #FFD54A;        /* highlighter: main actions and focus only (6.1:1 on paper) */
  --c-on-accent: #0F2D57;     /* text on the highlighter (9.7:1) */
  --c-accent-2: #FFB4A3;      /* status only, e.g. an error note (5.0:1 on paper); unused in the demo */
  --f-display: "Barlow Condensed", "Arial Narrow", sans-serif;       /* headlines, figures */
  --f-body: "Barlow", system-ui, sans-serif;                         /* reading text */
  --f-mono: "Barlow Semi Condensed", "Arial Narrow", sans-serif;     /* technical lettering: annotations, title block, buttons */
  --r-sm: 0px;                /* buttons, fields (drawings have square corners) */
  --r-lg: 0px;                /* plates and cards */
  --r-pill: 50%;              /* seals, roundels, step circles: always round */
  --s-1: 8px; --s-2: 16px; --s-3: 24px; --s-4: 40px; --s-5: 56px; --s-6: 88px;

  /* Theme names map to the shared layer */
  --paper: var(--c-bg);
  --paper-deep: var(--c-surface);
  --line: var(--c-ink);
  --soft: var(--c-muted);
  --hi: var(--c-accent);
  --ink: var(--c-on-accent);
  --cond: var(--f-display);
  --semi: var(--f-mono);
  --body: var(--f-body);
  --radius: var(--r-lg);
  --pad: var(--s-2);          /* sheet gutter (32px from 760, 56px from 1080) */
  --sec: 48px;                /* vertical space per section (80px from 760, 96px from 1080) */
  --ease-out: cubic-bezier(.23, 1, .32, 1);
  --bar-h: 0px;               /* height of the phone action bar */

  /* Derived from the values above; no need to touch these. */
  --line-2: color-mix(in srgb, var(--line) 62%, transparent);
  --line-3: var(--c-line);
  --grid: color-mix(in srgb, var(--line) 7.5%, transparent);
  --grid-fine: color-mix(in srgb, var(--line) 3.2%, transparent);
  --plate: color-mix(in srgb, var(--paper-deep) 55%, #000 10%);
  --wash: color-mix(in srgb, var(--line) 10%, transparent);
}
@media (max-width: 759.98px) {
  :root { --bar-h: calc(60px + env(safe-area-inset-bottom)); }
}
@media (min-width: 760px) { :root { --pad: 32px; --sec: 80px; } }
@media (min-width: 1080px) { :root { --pad: var(--s-5); --sec: 96px; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-bottom: calc(var(--bar-h) + 16px); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

body {
  margin: 0;
  padding-bottom: var(--bar-h);
  color: var(--line);
  font: 400 1rem/1.6 var(--body);
  background-color: var(--paper);
  background-image:
    radial-gradient(120% 70% at 50% 0%, var(--grid), transparent 70%),
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px),
    linear-gradient(var(--grid-fine) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-fine) 1px, transparent 1px);
  background-size: auto, 96px 96px, 96px 96px, 12px 12px, 12px 12px;
}
@media (min-width: 1080px) { body { font-size: 1.0625rem; } }

img { max-width: 100%; height: auto; }
a { color: inherit; }
p { margin: 0; }
h1, h2, h3 { margin: 0; font-weight: 600; text-wrap: balance; }
p, li, dd, figcaption { text-wrap: pretty; }
ul, ol, dl, dd { margin: 0; padding: 0; list-style: none; }
figure { margin: 0; }
address { font-style: normal; }
b { font-weight: 600; font-family: var(--semi); }

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

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 30;
  background: var(--hi); color: var(--ink); padding: 12px 16px; font-weight: 500;
}
.skip:focus { top: 12px; }
.sprite { display: none; }
.i { width: 1.25em; height: 1.25em; fill: currentColor; flex: none; }

/* Touch polish: no grey tap flash, no double-tap delay, a short press on everything pressable */
a, button, summary, label, select { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.btn, .action-bar a { transition: transform 120ms var(--ease-out); }
.btn:active, .action-bar a:active { transform: scale(.97); }
@media (prefers-reduced-motion: reduce) { .btn, .action-bar a, .fold > summary .i { transition: none; } }

/* Demo bar: outside the drawing, says what this page is. One line. */
.demo-bar p {
  margin: 0; padding: 7px 16px;
  background: var(--paper-deep); color: var(--line);
  border-bottom: 1px solid var(--line-3);
  font: 500 .8125rem/1.4 var(--semi); letter-spacing: .02em; text-align: center;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* ---------- The sheet: a double border around the whole page ---------- */
.sheet {
  position: relative;
  margin: 8px;
  border: 2px solid var(--line);
}
.sheet::before {
  content: ""; position: absolute; inset: 4px; pointer-events: none;
  border: 1px solid var(--line-3);
}
@media (min-width: 760px) { .sheet { margin: 20px; } }

/* Technical lettering for drawing annotations: title block fields, dimensions, callouts, roundel codes. */
.tb-l, .dim, .tag, .bubble small, .index small {
  font-family: var(--semi);
  font-weight: 500;
  font-size: .8125rem;
  line-height: 1.2;
  letter-spacing: .08em;
  text-transform: uppercase;
}

/* Brand mark: a keystone set in an arch, drawn in line */
.mark { width: 40px; height: 40px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linejoin: round; }
.mark .key-stone { fill: var(--paper); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 10px 22px;
  font: 600 1.0625rem/1.1 var(--semi); letter-spacing: .01em;
  text-decoration: none; text-align: center; white-space: nowrap;
  border: 2px solid var(--line);
  border-radius: var(--r-sm);
  cursor: pointer;
}
.btn-hi { background: var(--hi); border-color: var(--hi); color: var(--ink); }
.btn-line { color: var(--line); background: transparent; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.num { display: none; }
@media (min-width: 760px) { .num { display: inline; } }

/* ---------- Header: brand, sheet index (the navigation), call ---------- */
.head {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: stretch;
  border-bottom: 1px solid var(--line-2);
}
.brand {
  display: flex; align-items: center; gap: 10px; white-space: nowrap;
  min-height: 64px; padding: 8px var(--pad);
  text-decoration: none;
  font: 600 1.375rem/1 var(--cond); letter-spacing: .02em;
}
.brand small { font: 500 1.0625rem/1 var(--cond); color: var(--soft); letter-spacing: .02em; }
.head-cta { display: flex; align-items: stretch; grid-row: 1; grid-column: 2; }
.tel {
  display: flex; align-items: center; gap: 8px;
  min-width: 64px; padding: 0 var(--pad);
  border-left: 1px solid var(--line-2);
  font: 600 1rem/1 var(--semi); text-decoration: none;
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
.tel-num { display: none; }
.head-btn { display: none; }

/* On phones the sheet index is six single-line 44px tabs; the sheet codes appear from 760px */
.index {
  grid-column: 1 / -1;
  display: grid; grid-template-columns: repeat(6, minmax(0, 1fr));
  border-top: 1px solid var(--line-2);
}
.index a {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 2px; white-space: nowrap;
  border-left: 1px solid var(--line-3);
  font: 600 .875rem/1.1 var(--semi); text-decoration: none; text-align: center;
}
.index a:first-child { border-left: 0; }
.index small { display: none; color: var(--soft); }
@media (max-width: 374px) { .index a { font-size: .8125rem; } }

@media (min-width: 760px) {
  .tel-num { display: inline; }
  .tel-short { display: none; }
  .head-btn { display: inline-flex; align-self: center; margin: 0 var(--pad) 0 0; min-height: 44px; }
  .index a { font-size: 1rem; }
  .index small { display: inline; }
}
@media (min-width: 1080px) {
  .head { grid-template-columns: auto 1fr auto; }
  .head-cta { grid-column: 3; }
  .index { grid-column: 2; grid-row: 1; display: flex; justify-content: center; border-top: 0; border-left: 1px solid var(--line-2); }
  .index a { flex-direction: column; gap: 3px; padding: 0 clamp(6px, 1vw, 18px); min-height: 64px; font-size: clamp(.875rem, 1.15vw, 1rem); }
  .brand { padding: 8px 20px 8px 24px; font-size: clamp(1.25rem, 1.6vw, 1.375rem); }
  .brand small { font-size: clamp(1rem, 1.25vw, 1.0625rem); }
  .tel { padding: 0 clamp(10px, 1.2vw, 20px); font-size: clamp(.9375rem, 1.15vw, 1rem); }
  .head-btn { margin-right: 16px; padding-inline: clamp(14px, 1.4vw, 22px); font-size: clamp(.9375rem, 1.2vw, 1.0625rem); }
}

/* ---------- Hero / cover sheet ---------- */
.hero {
  display: grid;
  gap: 28px;
  padding: 28px var(--pad) 0;
}
.hero h1 {
  font: 600 clamp(3.25rem, 15vw, 6.75rem)/.9 var(--cond);
  letter-spacing: -.005em;
  max-width: 6em;
}
.lede { margin-top: 20px; font-size: 1.125rem; line-height: 1.55; color: var(--soft); max-width: 34em; }
.hero .lede { color: var(--line); max-width: 30em; }
@media (min-width: 1080px) { .hero .lede { font-size: 1.25rem; text-wrap: balance; } }
.hero .actions { margin-top: 24px; flex-wrap: nowrap; }
.hero .actions .btn { padding-inline: 18px; }
.hero .actions .btn-hi { flex: 1 1 auto; }
@media (min-width: 760px) { .hero .actions .btn-hi { flex: 0 0 auto; } .hero .actions .btn { padding-inline: 22px; } }

/* Plates: photos framed like sheets in a drawing set */
.plate {
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  padding: 6px;
  background: color-mix(in srgb, var(--plate) 60%, transparent);
}
.photo { position: relative; overflow: hidden; }
.photo > img { display: block; width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.hero-plate { align-self: start; background: none; border: 0; padding: 0; }
.hero-plate .photo { border: 1px solid var(--line); outline: 1px solid var(--line-3); outline-offset: 5px; }

/* Dimension line: ticks at both ends, label in the gap */
.dim {
  position: relative;
  display: flex; align-items: center; gap: 12px;
  min-height: 34px;
  color: var(--line);
  border-inline: 1px solid var(--line-2);
}
.dim::before, .dim::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.dim span { flex: none; max-width: 75%; text-align: center; }
.dim i {
  position: absolute; top: 50%; width: 14px; height: 2px; background: var(--line);
  transform: translate(-50%, -50%) rotate(-45deg);
}
.dim i:first-child { left: 0; }
.dim i:last-child { left: 100%; }
.hero-plate .dim { margin-bottom: 14px; }

/* Callout leaders over the hero photo (the signature: drawn in as the photo develops) */
.linework { position: absolute; inset: 0; }
.leaders { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.leaders polyline {
  fill: none; stroke: var(--line); stroke-width: 1.5;
  vector-effect: non-scaling-stroke;
  filter: drop-shadow(0 0 1.5px rgba(8, 26, 54, .9));
}
.pt {
  position: absolute; left: var(--x); top: var(--y);
  width: 11px; height: 11px; border-radius: var(--r-pill);
  background: var(--line); border: 2.5px solid var(--paper);
  box-shadow: 0 0 0 1.5px var(--line);
  transform: translate(-50%, -50%);
}
.tag {
  position: absolute; left: var(--x); top: var(--y);
  transform: translate(0, -50%);
  padding: 5px 8px;
  background: var(--paper); color: var(--line);
  border: 1px solid var(--line);
  letter-spacing: .05em; white-space: nowrap;
}
.tag.to-left { transform: translate(-100%, -50%); }
@media (min-width: 760px) { .tag { padding: 6px 10px; letter-spacing: .08em; } }

/* The signature moment: the photo starts as a cyanotype and develops into the built room */
.develop { position: absolute; inset: 0; background: var(--paper); mix-blend-mode: color; opacity: 0; pointer-events: none; }

@media (prefers-reduced-motion: no-preference) {
  .develop { animation: develop 1.5s cubic-bezier(.4, 0, .2, 1) 1.1s both; }
  .linework { animation: plot 1.2s cubic-bezier(.6, 0, .3, 1) .25s both; }
  .hero-plate .dim::before, .hero-plate .dim::after { animation: extend .7s ease-out .1s both; }
  .hero-plate .dim::before { transform-origin: right; }
  .hero-plate .dim::after { transform-origin: left; }

  /* Where the photo sits below the first screen (phones, tablets) it develops as it scrolls into view */
  @supports (animation-timeline: view()) {
    @media (max-width: 1079.98px) {
      .hero-plate .photo { view-timeline: --plate block; }
      .develop { animation: develop linear both; animation-timeline: --plate; animation-range: entry 40% entry 100%; }
      .linework { animation: plot linear both; animation-timeline: --plate; animation-range: entry 20% entry 80%; }
      .hero-plate .dim::before, .hero-plate .dim::after { animation: none; }
    }
  }
}
@keyframes develop { from { opacity: 1; } to { opacity: 0; } }
@keyframes plot { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes extend { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* Title block: the trust band */
.titleblock {
  margin: 4px calc(-1 * var(--pad)) 0;
  display: grid;
  grid-template-columns: 1fr;
  border-top: 2px solid var(--line);
  background: color-mix(in srgb, var(--plate) 50%, transparent);
}
.tb { padding: 14px var(--pad) 16px; border-top: 1px solid var(--line-2); min-width: 0; }
.tb .tb-l { display: block; color: var(--soft); margin-bottom: 8px; }
.tb p { font-weight: 500; font-variant-numeric: tabular-nums; }
.titleblock > .tb:first-child { border-top: 0; }
.tb-proj { display: grid; grid-template-columns: 1fr 1.2fr; column-gap: 20px; }

.firm { display: flex; align-items: center; gap: 12px; }
.firm .mark { width: 52px; height: 52px; stroke-width: 1.4; }
.firm span { display: flex; flex-direction: column; color: var(--soft); font-weight: 400; line-height: 1.4; }
.firm b { color: var(--line); font: 600 1.5rem/1.1 var(--cond); letter-spacing: .02em; }

.rates { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 14px; }
.rates li { display: grid; align-content: start; gap: 4px; }
.rates b { font: 600 2.25rem/1 var(--cond); font-variant-numeric: tabular-nums; }
.rates span { color: var(--soft); line-height: 1.3; font-size: .9375rem; }

/* Credentials drawn as round seals, the way an engineer stamps a sheet */
.stamps { display: flex; flex-wrap: wrap; gap: 6px; }
.stamps li {
  width: 78px; height: 78px; border-radius: var(--r-pill);
  display: grid; place-items: center; text-align: center;
  border: 1.5px solid var(--line);
  outline: 1px solid var(--line-3); outline-offset: -6px;
  font: 600 .75rem/1.15 var(--semi); letter-spacing: .01em;
}
.stamps span { padding: 0 4px; }

/* Sheet cell: roundel plus four fields */
.tb-sheet { display: grid; grid-template-columns: auto 1fr 1fr; gap: 10px 18px; align-items: center; }
.tb-sheet .bubble { grid-row: 1 / span 2; margin: 0; }
.tb-sheet p { font-family: var(--semi); font-size: 1.0625rem; }
.tb-sheet .tb-l { margin-bottom: 4px; }

@media (max-width: 759.98px) {
  .tb-firm { order: 1; }
  .tb-rate { order: 2; }
  .tb-seals { order: 3; }
  .tb-proj { order: 4; }
  .tb-sheet { order: 5; }
}
@media (min-width: 760px) {
  .titleblock { grid-template-columns: repeat(2, 1fr); }
  .tb-firm, .tb-seals, .tb-sheet { grid-column: 1 / -1; }
  .tb-proj { grid-template-columns: 1fr; row-gap: 12px; }
  .tb-rate { border-left: 1px solid var(--line-2); }
  .rates { grid-template-columns: 1fr; gap: 8px; }
  .rates li { grid-template-columns: 2.6rem 1fr; align-items: baseline; gap: 10px; }
  .rates b { font-size: 1.5rem; text-align: right; }
  .stamps li { width: 80px; height: 80px; }
  .tb-sheet { grid-template-columns: auto repeat(4, max-content); gap: 10px 36px; justify-content: start; }
  .tb-sheet .bubble { grid-row: auto; }
}
@media (min-width: 1080px) {
  .hero {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    column-gap: clamp(32px, 4vw, 72px);
    row-gap: 48px;
    padding-top: 56px;
  }
  .hero-copy { padding-top: 40px; }
  .titleblock {
    grid-column: 1 / -1;
    grid-template-columns: 1.1fr .95fr 1.05fr 1.6fr 1.3fr;
  }
  .titleblock > .tb { grid-column: auto; border-top: 0; border-left: 1px solid var(--line-2); }
  .titleblock > .tb:first-child { border-left: 0; }
  .tb { padding: 16px 20px 18px; }
  .stamps li { width: 76px; height: 76px; }
  .tb-sheet { grid-template-columns: 1fr 1fr; gap: 12px 18px; align-items: start; }
  .tb-sheet .bubble { grid-column: 1 / -1; }
  .tb-sheet p { font-size: 1rem; }
}

/* ---------- Sections (sheets) ---------- */
.sec { padding: var(--sec) var(--pad); border-top: 2px solid var(--line); }

/* Drawing title: heavy and light underline. Only the estimate sheet carries a roundel. */
.st { margin-bottom: 28px; }
.st h2 {
  position: relative;
  padding: 0 0 10px;
  border-bottom: 3px solid var(--line);
  font: 600 clamp(2.125rem, 6vw, 3.75rem)/1 var(--cond);
}
.st h2::after { content: ""; position: absolute; left: 0; right: 0; bottom: -9px; height: 1px; background: var(--line); }
.st p { margin-top: 24px; color: var(--soft); max-width: 40em; font-size: 1.0625rem; }

.bubble {
  position: relative; z-index: 1;
  width: 72px; height: 72px; flex: none;
  display: grid; grid-template-rows: 1fr 1fr; justify-items: center;
  border: 2px solid var(--line); border-radius: var(--r-pill);
  background: var(--paper);
}
.bubble::after { content: ""; position: absolute; left: 0; right: 0; top: calc(50% - 1px); height: 2px; background: var(--line); }
.bubble b { align-self: end; padding-bottom: 3px; font: 600 1.375rem/1 var(--cond); }
.bubble small { align-self: start; padding-top: 6px; letter-spacing: .04em; }
.st-b { display: grid; grid-template-columns: 72px minmax(0, 1fr); }
.st-b .bubble { grid-row: 1; grid-column: 1; align-self: end; margin-bottom: -36px; }
.st-b h2 { grid-row: 1; grid-column: 2; padding-left: 16px; }
.st-b p { grid-column: 1 / -1; margin-top: 52px; }
@media (min-width: 760px) { .st-b p { grid-column: 2; margin-top: 28px; padding-left: 16px; } }

/* Services as drawing details: a swipe rail on phones, three across from 760px */
.details {
  display: grid; grid-auto-flow: column; grid-auto-columns: 84%; column-gap: 16px;
  overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; scrollbar-width: none;
  margin-inline: calc(var(--pad) * -1); padding-inline: var(--pad); scroll-padding-inline: var(--pad);
}
.details::-webkit-scrollbar { display: none; }
.details:focus-visible { outline-offset: -3px; }
.detail { scroll-snap-align: start; min-width: 0; }
@media (min-width: 760px) {
  .details { grid-auto-flow: row; grid-auto-columns: auto; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; overflow: visible; margin-inline: 0; padding-inline: 0; }
}
@media (min-width: 1080px) { .details { gap: 36px; } }
@media (min-width: 760px) and (max-width: 1079.98px) {
  .spec-list { grid-template-columns: 1fr; }
  .spec-list div + div { border-left: 0; border-top: 1px solid var(--line-2); }
}
.detail .plate img { display: block; width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.detail h3 {
  position: relative;
  margin-top: 18px; padding-bottom: 6px;
  border-bottom: 2px solid var(--line);
  font: 600 1.625rem/1.1 var(--cond); letter-spacing: .01em;
}
.detail h3::after { content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 1px; background: var(--line-2); }
.detail > p { margin-top: 16px; color: var(--soft); max-width: 30em; }
.spec-list { margin-top: 18px; display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--line-2); }
.spec-list div { padding: 10px 12px; }
.spec-list div + div { border-left: 1px solid var(--line-2); }
.spec-list dt { color: var(--soft); font: 500 .875rem/1.2 var(--semi); letter-spacing: .02em; }
.spec-list dd { margin-top: 4px; font: 600 1.25rem/1.1 var(--cond); font-variant-numeric: tabular-nums; }
.also { margin-top: 32px; padding-top: 16px; border-top: 1px dashed var(--line-2); color: var(--soft); max-width: 60em; }
.also b { color: var(--line); margin-right: 8px; }

/* Before and after with keynotes: a swipe rail on phones, side by side from 760px */
.ba {
  display: grid; grid-auto-flow: column; grid-auto-columns: 88%; column-gap: 16px;
  overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; scrollbar-width: none;
  margin-inline: calc(var(--pad) * -1); padding-inline: var(--pad); scroll-padding-inline: var(--pad);
}
.ba::-webkit-scrollbar { display: none; }
.ba:focus-visible { outline-offset: -3px; }
.ba-plate { scroll-snap-align: start; min-width: 0; }
@media (min-width: 760px) {
  .ba { grid-auto-flow: row; grid-auto-columns: auto; grid-template-columns: 1fr 1fr; gap: 28px; overflow: visible; margin-inline: 0; padding-inline: 0; }
}
@media (min-width: 1080px) { .ba { gap: 36px; } }
.ba-plate figcaption { display: grid; gap: 10px; padding: 14px 8px 8px; }
.ba-plate h3 { font: 600 1.375rem/1 var(--cond); letter-spacing: .02em; }
.key {
  position: absolute; left: var(--x); top: var(--y); z-index: 1; isolation: isolate;
  width: 34px; height: 30px; display: grid; place-items: center;
  transform: translate(-50%, -50%);
  background: var(--line); color: var(--line);
  clip-path: polygon(25% 0, 75% 0, 100% 50%, 75% 100%, 25% 100%, 0 50%);
  font: 600 1rem/1 var(--cond);
}
.key::before {
  content: ""; position: absolute; inset: 2.5px 3px; z-index: -1;
  background: var(--paper);
  clip-path: polygon(25% 0, 75% 0, 100% 50%, 75% 100%, 25% 100%, 0 50%);
}
.keynotes { counter-reset: k; display: flex; flex-wrap: wrap; gap: 8px 20px; }
.keynotes li { counter-increment: k; display: flex; align-items: center; gap: 8px; color: var(--soft); }
.keynotes li::before {
  content: counter(k);
  width: 24px; height: 22px; display: grid; place-items: center; flex: none;
  background: var(--line); color: var(--ink);
  clip-path: polygon(25% 0, 75% 0, 100% 50%, 75% 100%, 25% 100%, 0 50%);
  font: 600 .8125rem/1 var(--cond);
}

/* Process on structural grid lines */
.dim-wide { margin-bottom: 28px; }
.dim-wide span { letter-spacing: .04em; }
.gridline { display: grid; gap: 0; }
.gridline li {
  position: relative;
  padding: 2px 0 22px 60px;
}
.gridline li::before {
  content: ""; position: absolute; left: 21px; top: 44px; bottom: 0;
  border-left: 1.5px dashed var(--line-2);
}
.gridline li:last-child { padding-bottom: 0; }
.gridline li:last-child::before { display: none; }
.gb {
  position: absolute; left: 0; top: 0;
  width: 44px; height: 44px; display: grid; place-items: center;
  border: 2px solid var(--line); border-radius: var(--r-pill);
  font: 600 1.375rem/1 var(--cond);
}
.gridline h3 { font: 600 1.375rem/1.15 var(--cond); padding-top: 8px; }
.gridline p { margin-top: 6px; color: var(--soft); max-width: 30em; }
/* Phones: the roundel sits on the heading's line and the text runs the full sheet width; a dashed rule separates steps */
@media (max-width: 759.98px) {
  .gridline li { display: grid; grid-template-columns: 44px minmax(0, 1fr); column-gap: 14px; align-items: center; padding: 0 0 18px; }
  .gridline li + li { padding-top: 18px; border-top: 1.5px dashed var(--line-2); }
  .gridline li::before { content: none; }
  .gb { position: static; }
  .gridline h3 { padding-top: 0; }
  .gridline p { grid-column: 1 / -1; margin-top: 10px; }
}
@media (min-width: 760px) {
  .gridline { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 40px; }
  .gridline li, .gridline li:last-child { padding: 64px 20px 8px 22px; }
  .gridline li::before, .gridline li:last-child::before { display: block; left: 0; top: 44px; }
  .gb { left: -22px; }
  .gridline h3 { padding-top: 0; }
  .dim-wide { margin-left: 22px; }
}
@media (min-width: 1080px) {
  .gridline { grid-template-columns: repeat(6, minmax(0, 1fr)); padding-left: 22px; }
  .dim-wide { margin-left: 22px; margin-right: calc(100% / 6); }
}

/* Collapsible blocks (general notes, review schedule): a drawn control, content hidden until opened */
.fold { border: 1px solid var(--line-2); background: color-mix(in srgb, var(--plate) 55%, transparent); max-width: 34rem; }
.fold > summary {
  display: flex; align-items: center; gap: 12px;
  min-height: 52px; padding: 0 14px;
  font: 600 1.125rem/1.2 var(--semi); letter-spacing: .01em;
  cursor: pointer; list-style: none;
}
.fold > summary::-webkit-details-marker { display: none; }
.fold > summary:focus-visible { outline-offset: -3px; }
.fold .sum-note { margin-left: auto; color: var(--soft); font-weight: 500; font-size: .9375rem; }
.fold > summary .i { transition: transform 180ms var(--ease-out); }
.fold[open] > summary .i { transform: rotate(45deg); }
.fold[open] > summary { border-bottom: 1px solid var(--line-2); }

/* About: the builder, plus general notes */
.about { display: grid; gap: 28px; }
@media (min-width: 1080px) { .about { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 64px; align-items: start; } }
.about-plate img { display: block; width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.about-plate figcaption, .map-plate figcaption { padding: 12px 4px 4px; color: var(--soft); font-size: .9375rem; border-top: 1px dashed var(--line-3); margin-top: 8px; }
.about-copy .lede { margin-top: 0; color: var(--line); font-size: 1.25rem; }
@media (min-width: 1080px) { .about-copy .lede { font-size: 1.5rem; line-height: 1.5; } }
.about-copy .fold { margin-top: 28px; }
.general-notes { counter-reset: g; padding: 4px 14px 8px; }
.general-notes li {
  counter-increment: g;
  display: grid; grid-template-columns: 30px 1fr; gap: 8px;
  padding: 10px 0; border-bottom: 1px dashed var(--line-3);
  color: var(--soft);
}
.general-notes li:last-child { border-bottom: 0; }
.general-notes li::before { content: counter(g) "."; font: 600 1.125rem/1.4 var(--cond); color: var(--line); }

/* Reviews: notes on a rail (phones) with the rating schedule folded away */
.rv { display: grid; gap: 24px; }
.notes {
  display: grid; grid-auto-flow: column; grid-auto-columns: 88%; column-gap: 16px;
  overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; scrollbar-width: none;
  margin-inline: calc(var(--pad) * -1); padding-inline: var(--pad); scroll-padding-inline: var(--pad);
}
.notes::-webkit-scrollbar { display: none; }
.notes:focus-visible { outline-offset: -3px; }
@media (min-width: 760px) {
  .notes { grid-auto-flow: row; grid-auto-columns: auto; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; overflow: visible; margin-inline: 0; padding-inline: 0; }
}
.note {
  scroll-snap-align: start; min-width: 0;
  padding: 20px 20px 18px;
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--plate) 55%, transparent);
  display: flex; flex-direction: column; justify-content: space-between; gap: 18px;
}
.note blockquote { margin: 0; font-size: 1.125rem; line-height: 1.45; }
@media (min-width: 1080px) { .note { padding: 28px 28px 24px; } .note blockquote { font-size: 1.375rem; line-height: 1.4; } }
.note blockquote p::before { content: "\201C"; }
.note blockquote p::after { content: "\201D"; }
.note figcaption { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; color: var(--soft); font-size: .9375rem; padding-top: 12px; border-top: 1px dashed var(--line-3); }
.note figcaption b { color: var(--line); font-size: 1rem; }
.note figcaption small { flex-basis: 100%; font: 500 .8125rem/1.3 var(--semi); letter-spacing: .02em; }

.schedule { width: 100%; border-collapse: collapse; font-family: var(--semi); }
.schedule-wrap { padding: 14px; }
.schedule caption { text-align: left; padding-bottom: 10px; color: var(--soft); font-size: .875rem; }
.schedule th, .schedule td { padding: 11px 12px; border: 1px solid var(--line-2); text-align: left; font-weight: 500; }
.schedule thead th { background: var(--paper-deep); font-size: .875rem; letter-spacing: .04em; color: var(--soft); }
.schedule tbody th { font-size: 1.0625rem; }
.schedule td { font: 600 1.375rem/1 var(--cond); text-align: right; font-variant-numeric: tabular-nums; }
.schedule tfoot th, .schedule tfoot td { border-top: 2px solid var(--line); background: var(--wash); font-weight: 600; }
.schedule tfoot th { font-size: 1.0625rem; }

/* Estimate + vicinity map */
.cta { display: grid; gap: 40px; }
@media (min-width: 1080px) { .cta { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: 64px; align-items: start; } }
.sub-h { padding-bottom: 6px; border-bottom: 2px solid var(--line); font: 600 1.5rem/1.1 var(--cond); }
.cta .actions { margin-top: 0; }
.cta .actions .btn { flex: 1 1 100%; }
@media (min-width: 760px) { .cta .actions .btn { flex: 0 0 auto; } }

/* Estimate form (concept-safe: submits to #sent and shows the confirmation in place) */
.form { margin-top: 28px; display: grid; gap: 16px; align-content: start; }
.field { display: grid; gap: 6px; }
.field label { font: 600 1rem/1.2 var(--semi); letter-spacing: .02em; }
.field input, .field select {
  width: 100%; min-height: 50px; padding: 0 14px;
  font: 400 1.0625rem/1.2 var(--body); color: var(--line);
  background-color: var(--paper-deep);
  border: 1.5px solid var(--c-line-strong); border-radius: var(--r-sm);
  -webkit-appearance: none; appearance: none;
}
.field select {
  padding-right: 44px;
  background-image: linear-gradient(45deg, transparent 50%, var(--line) 50%), linear-gradient(-45deg, transparent 50%, var(--line) 50%);
  background-size: 7px 7px; background-position: calc(100% - 22px) 50%, calc(100% - 15px) 50%; background-repeat: no-repeat;
}
.field input:focus-visible, .field select:focus-visible { outline-offset: 2px; }
.form .btn { min-height: 52px; }
.sent {
  display: none; align-items: flex-start; gap: 10px;
  padding: 14px 16px; background: var(--paper-deep); border: 2px solid var(--hi); font-weight: 500;
}
.sent .i { width: 1.5em; height: 1.5em; color: var(--hi); margin-top: 1px; }
.sent:target { display: flex; }
@media (min-width: 760px) {
  .form { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 16px; }
  .form > :is(.sub-h, .btn, .sent, .field:nth-of-type(3)) { grid-column: 1 / -1; }
  .form .btn { justify-self: start; }
}

.hours { display: grid; gap: 14px; max-width: 30rem; }
.hours dt { color: var(--soft); font: 500 .9375rem/1.2 var(--semi); letter-spacing: .03em; }
.hours dd { margin-top: 4px; font-variant-numeric: tabular-nums; }
.hours address a, .foot address a { display: inline-block; padding-block: 8px; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.cta-side { display: grid; gap: 28px; align-content: start; }
.map-plate { padding: 12px; }
.map { display: block; width: 100%; height: auto; }
.map .water { fill: color-mix(in srgb, var(--line) 14%, transparent); stroke: var(--line); stroke-width: 1.5; }
.map .wlabel { fill: var(--soft); font: italic 500 17px var(--semi); letter-spacing: .04em; }
.map .road { fill: none; stroke: var(--line); stroke-width: 1.5; stroke-dasharray: 7 5; opacity: .75; }
.map .rlabel { fill: var(--line); font: 600 17px var(--semi); letter-spacing: .06em; }
.map .city circle { fill: var(--line); }
.map .city text { fill: var(--line); font: 500 17px var(--semi); }
.map .city.big text { font: 600 23px var(--cond); }
.map .city.big circle { fill: var(--hi); }
.map .north circle { fill: none; stroke: var(--line); stroke-width: 1.5; }
.map .north path { fill: var(--line); }
.map .north text { fill: var(--line); font: 600 18px var(--cond); }
.map .brace path { fill: none; stroke: var(--line); stroke-width: 1.5; }
.map .brace text { fill: var(--line); font: 500 16px var(--semi); letter-spacing: .1em; text-transform: uppercase; }

/* ---------- Footer: the big title block ---------- */
.foot {
  display: grid;
  border-top: 2px solid var(--line);
  background: color-mix(in srgb, var(--plate) 60%, transparent);
}
.foot .tb { border-top: 1px solid var(--line-2); padding: 18px var(--pad) 20px; }
.foot .tb:first-child { border-top: 0; }
.foot h2.tb-l { font-weight: 500; }
.foot a { text-decoration-thickness: 1px; text-underline-offset: 3px; overflow-wrap: anywhere; }
.foot-links { display: grid; justify-items: start; }
.foot-links a { display: inline-flex; align-items: center; min-height: 44px; }
.foot p, .foot address { line-height: 1.7; }
.foot address + p { margin-top: 8px; color: var(--soft); }
.foot .fine { margin-top: 10px; color: var(--soft); font-size: .875rem; }
.foot-firm .firm { align-items: flex-start; }
.tb-firm .firm { align-items: flex-start; }
@media (min-width: 760px) { .foot { grid-template-columns: 1fr 1fr; } .foot .tb:nth-child(2n) { border-left: 1px solid var(--line-2); } .foot .tb:nth-child(2) { border-top: 0; } }
@media (min-width: 1080px) {
  .foot { grid-template-columns: 1.5fr 1fr 1.1fr 1fr; }
  .foot .tb { border-top: 0; border-left: 1px solid var(--line-2); }
  .foot .tb:first-child { border-left: 0; }
}

/* ---------- Phone action bar (C1): Call, Text and the estimate stay in reach below 760px ---------- */
.action-bar { display: none; }
@media (max-width: 759.98px) {
  .action-bar {
    position: fixed; inset: auto 0 0 0; z-index: 20;
    display: grid; grid-template-columns: .9fr .9fr 1.9fr;
    background: var(--paper-deep);
    border-top: 2px solid var(--line);
    padding-bottom: env(safe-area-inset-bottom);
  }
  .action-bar a {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 58px; padding: 0 6px;
    color: var(--line); font: 600 1rem/1 var(--semi); letter-spacing: .01em;
    text-decoration: none; white-space: nowrap;
  }
  .action-bar a + a { border-left: 1px solid var(--line-2); }
  .action-bar .ab-main { background: var(--hi); color: var(--ink); border-left-color: var(--hi); }
  .action-bar :focus-visible { outline-offset: -6px; }
  .action-bar .ab-main:focus-visible { outline-color: var(--ink); }
}

/* Hover only where a real pointer can hover */
@media (hover: hover) and (pointer: fine) {
  .btn-hi:hover { background: var(--line); border-color: var(--line); }
  .btn-line:hover, .tel:hover, .index a:hover { background: var(--wash); }
  .fold > summary:hover { background: var(--wash); }
  a:hover { text-decoration-thickness: 2px; }
}

/* One Call on the entry screen (Ethan, Oct 7 2026): on phones the action bar's Call is the one; the header number shows
   from 760px, where the bar is hidden. */
@media (max-width: 759.98px) { .head-cta .tel { display: none; } }
