/* ==========================================================================
   TITLE 24 MASTER — Design System
   "Precision instrument" — engineering instrumentation meets modern web.
   No frameworks. No build step. One stylesheet.
   ========================================================================== */

/* ---------- 1. Tokens ----------
   Light editorial. Warm paper, near-black ink, ochre accent — an architecture
   monograph rather than a software dashboard. The old dark names are kept so
   every rule below still resolves; they now hold light values. */
:root {
  /* Paper — the canvas */
  --ink-950: #FBFAF8;   /* page */
  --ink-900: #FFFFFF;   /* raised surface */
  --ink-850: #F7F5F1;   /* inset surface */
  --ink-800: #F2EFE9;
  --ink-750: #ECE8E0;
  --ink-700: #E4DFD5;
  --ink-600: #D8D2C6;

  /* Signature — ochre is energy, green is compliance, blue is data.
     All three are contrast-checked against the paper for body text. */
  /* Every value below is measured against the paper (#FBFAF8). The ratio in
     the comment is the real computed one — the whole palette clears WCAG AA
     for body text, not just the headline sizes. */
  --amber:    #9A5C0D;   /* 5.2:1  — text-safe ochre */
  --amber-hi: #7E4A08;   /* 7.1:1  — hover / emphasis */
  --amber-lo: #E9A93C;   /* fills, rules and thumbs only — never type */
  --amber-ink:#1C1408;   /* type sitting on an ochre fill */
  --green:    #146B4A;   /* 6.4:1 */
  --green-lo: #2E9C6E;   /* fills only */
  --cyan:     #1A5F7A;   /* 6.9:1 */
  --red:      #A32F2F;   /* 6.1:1 */

  /* Type — three tiers of grey, all of which pass AA at body size */
  --txt:   #15171B;      /* 16.1:1 */
  --txt-2: #464C54;      /* 8.3:1 */
  --txt-3: #5A616A;      /* 6.0:1 */
  --txt-4: #666D76;      /* 5.0:1  — lightest grey allowed anywhere */

  --line:      rgba(21, 23, 27, 0.13);
  --line-soft: rgba(21, 23, 27, 0.07);
  --line-hot:  rgba(168, 100, 15, 0.30);

  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI Variable Text",
               "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", "Cascadia Mono",
               "Roboto Mono", Consolas, monospace;

  /* Spacing scale */
  --s1: 0.25rem;  --s2: 0.5rem;   --s3: 0.75rem;  --s4: 1rem;
  --s5: 1.5rem;   --s6: 2rem;     --s7: 3rem;     --s8: 4rem;
  --s9: 6rem;     --s10: 8rem;

  --r-sm: 6px; --r: 10px; --r-lg: 16px; --r-xl: 24px;
  --maxw: 1180px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-io: cubic-bezier(0.65, 0, 0.35, 1);

  --shadow-lift: 0 1px 2px rgba(21,23,27,.05),
                 0 18px 48px -18px rgba(21,23,27,.18);
  --shadow-card: 0 1px 2px rgba(21,23,27,.04), 0 10px 28px -14px rgba(21,23,27,.12);
  --glow-amber: 0 0 0 1px rgba(168,100,15,.2), 0 12px 32px -12px rgba(233,169,60,.45);
}

/* ---------- 2. Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important; animation-iteration-count: 1 !important;
    transition-duration: .01ms !important; scroll-behavior: auto !important;
  }
}

body {
  font-family: var(--font-sans);
  background: var(--ink-950);
  color: var(--txt);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "cv02","cv03","cv04","ss01";
  overflow-x: hidden;
}

img, svg, video { display: block; max-width: 100%; height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; }
a { color: var(--amber); text-decoration: none; }
a:hover { color: var(--amber-hi); }
:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 3px;
  border-radius: 3px;
}

/* ---------- 3. Blueprint canvas ---------- */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background:
    linear-gradient(var(--line-soft) 1px, transparent 1px) 0 0 / 64px 64px,
    linear-gradient(90deg, var(--line-soft) 1px, transparent 1px) 0 0 / 64px 64px;
  mask-image: radial-gradient(ellipse 100% 70% at 50% 0%, #000 20%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse 100% 70% at 50% 0%, #000 20%, transparent 78%);
}
body::after {
  content: ""; position: fixed; inset: 0; z-index: -3; pointer-events: none;
  background:
    radial-gradient(60rem 40rem at 12% -8%, rgba(233,169,60,.16), transparent 62%),
    radial-gradient(52rem 36rem at 92% 4%, rgba(26,95,122,.07), transparent 60%),
    radial-gradient(70rem 50rem at 50% 108%, rgba(20,107,74,.05), transparent 65%);
}

/* ---------- 4. Layout primitives ---------- */
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--s5); }
.wrap-tight { max-width: 780px; }
section { position: relative; }
.section { padding-block: var(--s9); }
.section-sm { padding-block: var(--s8); }
@media (max-width: 720px) {
  .section { padding-block: var(--s8); }
  .section-sm { padding-block: var(--s7); }
}

.grid { display: grid; gap: var(--s5); }
.g2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
@media (max-width: 940px) { .g3, .g4 { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 640px) { .g2, .g3, .g4 { grid-template-columns: 1fr; } }

.rule { height: 1px; background: var(--line); border: 0; }

/* ---------- 5. Typography ---------- */
h1, h2, h3, h4 {
  line-height: 1.08;
  letter-spacing: -0.028em;
  font-weight: 700;
  text-wrap: balance;
}
h1 { font-size: clamp(2.55rem, 6.2vw, 4.6rem); }
h2 { font-size: clamp(1.95rem, 3.9vw, 3rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.5rem); letter-spacing: -0.02em; }
h4 { font-size: 1.05rem; letter-spacing: -0.01em; }
p { text-wrap: pretty; }

.lede { font-size: clamp(1.08rem, 1.7vw, 1.3rem); color: var(--txt-2); line-height: 1.6; }
.muted { color: var(--txt-2); }
.dim   { color: var(--txt-3); }
.tiny  { font-size: .8125rem; line-height: 1.55; }
.mono  { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

.eyebrow {
  display: inline-flex; align-items: center; gap: .6em;
  font-family: var(--font-mono);
  font-size: .72rem; letter-spacing: .2em; text-transform: uppercase;
  color: var(--amber); font-weight: 500;
}
.eyebrow::before {
  content: ""; width: 26px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--amber));
}
.eyebrow.c-green { color: var(--green); }
.eyebrow.c-green::before { background: linear-gradient(90deg, transparent, var(--green)); }
.eyebrow.c-cyan { color: var(--cyan); }
.eyebrow.c-cyan::before { background: linear-gradient(90deg, transparent, var(--cyan)); }

.grad {
  background: linear-gradient(102deg, #C8820F 2%, #A8640F 45%, #7A4A0C 96%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.section-head { max-width: 62ch; margin-bottom: var(--s7); }
.section-head p { margin-top: var(--s4); }

/* ---------- 6. Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55em;
  padding: .82em 1.5em; border-radius: 999px;
  font-weight: 600; font-size: .95rem; letter-spacing: -0.01em;
  border: 1px solid transparent; white-space: nowrap;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease),
              background-color .2s, border-color .2s, color .2s;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: linear-gradient(180deg, #F2BA5D, #E9A93C 55%, #D3941F);
  color: var(--amber-ink);
  box-shadow: 0 6px 20px -8px rgba(211,148,31,.65), 0 1px 0 rgba(255,255,255,.55) inset;
}
.btn-primary:hover {
  color: var(--amber-ink);
  box-shadow: 0 12px 30px -10px rgba(211,148,31,.8), 0 1px 0 rgba(255,255,255,.65) inset;
}

.btn-ghost {
  border-color: var(--line); color: var(--txt); background: #FFFFFF;
  box-shadow: 0 1px 2px rgba(21,23,27,.04);
}
.btn-ghost:hover { border-color: var(--amber); color: var(--amber-hi); background: #FFFBF3; }

.btn-lg { padding: 1em 1.9em; font-size: 1.02rem; }
.btn-sm { padding: .6em 1.1em; font-size: .85rem; }
.btn-block { width: 100%; }

/* ---------- 7. Panels — the instrument motif ---------- */
.panel {
  position: relative;
  background: linear-gradient(168deg, #FFFFFF, #F8F6F2);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: var(--s6);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}
.panel::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(180deg, rgba(255,255,255,.9), transparent 42%);
}
/* corner ticks */
.panel.ticked::after {
  content: ""; position: absolute; inset: 10px; border-radius: 8px; pointer-events: none;
  background:
    linear-gradient(var(--line-hot), var(--line-hot)) 0 0 / 12px 1px no-repeat,
    linear-gradient(var(--line-hot), var(--line-hot)) 0 0 / 1px 12px no-repeat,
    linear-gradient(var(--line-hot), var(--line-hot)) 100% 0 / 12px 1px no-repeat,
    linear-gradient(var(--line-hot), var(--line-hot)) 100% 0 / 1px 12px no-repeat,
    linear-gradient(var(--line-hot), var(--line-hot)) 0 100% / 12px 1px no-repeat,
    linear-gradient(var(--line-hot), var(--line-hot)) 0 100% / 1px 12px no-repeat,
    linear-gradient(var(--line-hot), var(--line-hot)) 100% 100% / 12px 1px no-repeat,
    linear-gradient(var(--line-hot), var(--line-hot)) 100% 100% / 1px 12px no-repeat;
  opacity: .8;
}
.panel-tight { padding: var(--s5); }

.card {
  position: relative;
  background: linear-gradient(168deg, #FFFFFF, #FAF8F4);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: var(--s5);
  box-shadow: var(--shadow-card);
  transition: border-color .3s var(--ease), transform .3s var(--ease), box-shadow .3s var(--ease);
}
.card:hover {
  border-color: var(--amber); transform: translateY(-3px);
  box-shadow: 0 2px 4px rgba(21,23,27,.05), 0 18px 40px -16px rgba(21,23,27,.2);
}
.card h3 { margin-bottom: .55rem; }
.card p { color: var(--txt-2); font-size: .95rem; }

.card-num {
  font-family: var(--font-mono); font-size: .72rem; letter-spacing: .18em;
  color: var(--txt-4); display: block; margin-bottom: var(--s4);
}

/* ---------- 8. Chips / badges ---------- */
.chip {
  display: inline-flex; align-items: center; gap: .45em;
  padding: .34em .8em; border-radius: 999px;
  border: 1px solid var(--line); background: #FFFFFF;
  font-family: var(--font-mono); font-size: .74rem; letter-spacing: .05em;
  color: var(--txt-2);
}
.chip .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green-lo); flex: none; }
.chip.hot { border-color: var(--line-hot); color: var(--amber); background: #FFF8EC; }
.chip.hot .dot { background: var(--amber); }

.pulse { position: relative; }
.pulse::after {
  content: ""; position: absolute; inset: -4px; border-radius: 50%;
  border: 1px solid currentColor; opacity: 0; animation: pulseRing 2.4s var(--ease) infinite;
}
@keyframes pulseRing {
  0%   { transform: scale(.6); opacity: .7; }
  70%  { transform: scale(2.1); opacity: 0; }
  100% { opacity: 0; }
}

/* ---------- 9. Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 60;
  border-bottom: 1px solid transparent;
  transition: background-color .35s var(--ease), border-color .35s, backdrop-filter .35s;
}
.site-header.stuck {
  background: rgba(251,250,248,.86);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  border-bottom-color: var(--line);
}
.hdr {
  display: flex; align-items: center; gap: var(--s5);
  height: 74px;
}
.brand { display: flex; align-items: center; gap: .7rem; color: var(--txt); flex: none; }
.brand:hover { color: var(--txt); }
/* The mark is taller than it is wide, so height drives it and width follows —
   a fixed square would squash the mascot. */
.brand-mark { width: auto; height: 42px; flex: none; display: block; }
.brand-txt { display: flex; flex-direction: column; line-height: 1.05; }
.brand-name { font-weight: 750; letter-spacing: -0.03em; font-size: 1.06rem; }
.brand-sub {
  font-family: var(--font-mono); font-size: .58rem; letter-spacing: .22em;
  text-transform: uppercase; color: var(--txt-3);
}

.nav { display: flex; align-items: center; gap: var(--s1); margin-left: auto; }
/* :not(.btn) matters — a bare `.nav a` rule outranks `.btn-primary` and would
   paint the drawer's CTA grey-on-ochre once it becomes visible on mobile. */
.nav a:not(.btn) {
  padding: .5em .85em; border-radius: 8px; font-size: .9rem; font-weight: 500;
  color: var(--txt-2); transition: color .2s, background-color .2s;
  /* "ECC / HERS" and "Commercial & Hotels" contain spaces, so between the burger
     breakpoint and a wide window they wrap mid-label and the header goes two
     rows tall. A nav item is a label, never a paragraph — it never wraps. */
  white-space: nowrap;
}
.nav a:not(.btn):hover,
.nav a:not(.btn)[aria-current="page"] { color: var(--txt); background: rgba(21,23,27,.055); }
.hdr-cta { margin-left: var(--s3); }
/* The nav carries its own CTA for the mobile drawer; on desktop .hdr-cta is the
   one that shows, so hide the in-nav copy or the header renders it twice. */
.nav > .btn { display: none; }

.burger { display: none; width: 42px; height: 42px; margin-left: auto; border-radius: 9px;
  border: 1px solid var(--line); align-items: center; justify-content: center; }
.burger span { display: block; width: 17px; height: 1.5px; background: var(--txt); position: relative; transition: .3s var(--ease); }
.burger span::before, .burger span::after {
  content: ""; position: absolute; left: 0; width: 17px; height: 1.5px; background: var(--txt); transition: .3s var(--ease);
}
.burger span::before { top: -5.5px; } .burger span::after { top: 5.5px; }
.burger[aria-expanded="true"] span { background: transparent; }
.burger[aria-expanded="true"] span::before { top: 0; transform: rotate(45deg); }
.burger[aria-expanded="true"] span::after  { top: 0; transform: rotate(-45deg); }

/* 1150, not 900. Six no-wrap labels plus the mark and the CTA measure ~1150px,
   and since the labels can no longer wrap to a second row they push the page
   into a horizontal scroll instead. The burger has to take over while the full
   nav still fits, not after it has already broken the header. */
@media (max-width: 1150px) {
  .nav, .hdr-cta { display: none; }
  .burger { display: flex; }
  .nav.open {
    display: flex; flex-direction: column; align-items: stretch; gap: 2px;
    position: absolute; left: var(--s5); right: var(--s5); top: 72px;
    background: rgba(255,255,255,.98); backdrop-filter: blur(20px);
    border: 1px solid var(--line); border-radius: var(--r-lg);
    padding: var(--s3); box-shadow: var(--shadow-lift);
  }
  .nav.open a:not(.btn) { padding: .8em 1em; }
  .nav.open > .btn { display: inline-flex; margin-top: var(--s2); }
}

/* ---------- 10. Hero ---------- */
.hero { padding-top: clamp(3rem, 7vw, 5.5rem); padding-bottom: var(--s8); position: relative; }

/* Photograph behind the hero.
   A scrim heavy enough to carry dark text erases the photo — measured at 95%
   the image deviated from plain paper by 3 levels, which is no photo at all.
   So the veil stays light and the copy gets its own paper panel instead. The
   photo reads; the text sits on a known background rather than on scenery.
   The header is sticky and in flow, so it is above the hero at rest and never
   overlaps this. */
.hero-photo { position: relative; isolation: isolate; }
.hero-photo::before {
  content: ""; position: absolute; inset: 0; z-index: -2;
  background: var(--bg-hero, none) center 38% / cover no-repeat;
}
.hero-photo::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(180deg, rgba(251,250,248,.62) 0%, rgba(251,250,248,.34) 30%,
                            rgba(251,250,248,.40) 72%, var(--ink-950) 100%);
}

/* The panel the headline and lede sit on. Near-opaque, so every ratio in here
   is the one the type was designed for, with a blur so the photo reads as
   depth behind glass rather than as a rectangle stamped on top. */
.hero-copy {
  position: relative;
  background: rgba(251,250,248,.93);
  backdrop-filter: blur(14px) saturate(115%);
  -webkit-backdrop-filter: blur(14px) saturate(115%);
  border: 1px solid rgba(255,255,255,.7);
  border-radius: var(--r-xl);
  padding: var(--s6) var(--s6) var(--s7);
  box-shadow: 0 18px 50px -28px rgba(21,23,27,.4);
}
@media (max-width: 560px) { .hero-copy { padding: var(--s5) var(--s4) var(--s6); } }
.hero-grid {
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  gap: var(--s7); align-items: start;
}
@media (max-width: 1000px) { .hero-grid { grid-template-columns: 1fr; gap: var(--s6); } }

.hero h1 { margin-top: var(--s4); }
.hero .lede { margin-top: var(--s5); max-width: 46ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: var(--s3); margin-top: var(--s6); }

.trust-row {
  display: flex; flex-wrap: wrap; gap: var(--s2) var(--s4);
  margin-top: var(--s6); padding-top: var(--s5); border-top: 1px solid var(--line-soft);
}
.trust-item { display: flex; align-items: center; gap: .5rem; font-size: .84rem; color: var(--txt-2); }
.trust-item svg { flex: none; color: var(--green); }

/* Stat strip */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px;
  background: var(--line); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
@media (max-width: 760px) { .stats { grid-template-columns: repeat(2, 1fr); } }
.stat { background: #FFFFFF; padding: var(--s5) var(--s4); text-align: center; }
.stat-n {
  font-family: var(--font-mono); font-size: clamp(1.5rem, 3vw, 2.1rem); font-weight: 700;
  letter-spacing: -0.03em; color: var(--amber); font-variant-numeric: tabular-nums; line-height: 1;
  overflow-wrap: anywhere;
}
.stat-l { font-size: .76rem; color: var(--txt-3); margin-top: .5rem; letter-spacing: .02em; }

/* ---------- 11. Quote engine ---------- */
.console { position: relative; }
.console-head {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s4);
  padding-bottom: var(--s4); margin-bottom: var(--s5); border-bottom: 1px solid var(--line);
}
.console-title { font-family: var(--font-mono); font-size: .74rem; letter-spacing: .18em;
  text-transform: uppercase; color: var(--txt-3); }

.field { margin-bottom: 1.15rem; }
.field > label, .field-label {
  display: block; font-size: .75rem; font-weight: 600; letter-spacing: .06em;
  text-transform: uppercase; color: var(--txt-3); margin-bottom: .55rem;
}
.opts { display: grid; gap: .5rem; }
.opts-2 { grid-template-columns: 1fr 1fr; }
.opts-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 480px) { .opts-3 { grid-template-columns: 1fr 1fr; } }

.opt { position: relative; }
.opt input { position: absolute; opacity: 0; width: 0; height: 0; }
.opt span {
  display: flex; flex-direction: column; gap: .1rem;
  padding: .58rem .75rem; border-radius: var(--r);
  border: 1px solid var(--line); background: #FFFFFF;
  font-size: .88rem; font-weight: 550; line-height: 1.3;
  transition: .22s var(--ease); cursor: pointer; height: 100%;
}
.opt small { font-size: .72rem; color: var(--txt-3); font-weight: 400; }
.opt span:hover { border-color: var(--amber); background: #FFFBF3; }
.opt input:checked + span {
  border-color: var(--amber); background: #FDF3E1;
  box-shadow: 0 0 0 1px var(--amber) inset, 0 6px 18px -10px rgba(211,148,31,.55);
}
.opt input:focus-visible + span { outline: 2px solid var(--amber); outline-offset: 2px; }

.slider-row { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: .5rem; }
.slider-val { font-family: var(--font-mono); font-size: 1.05rem; color: var(--amber); font-variant-numeric: tabular-nums; }
input[type="range"] {
  -webkit-appearance: none; appearance: none; width: 100%; height: 4px; border-radius: 99px;
  background: linear-gradient(90deg, var(--amber-lo) var(--pct, 30%), rgba(21,23,27,.12) var(--pct, 30%));
  outline: none; cursor: pointer;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 20px; height: 20px; border-radius: 50%;
  background: var(--amber-lo); border: 3px solid #FFFFFF;
  box-shadow: 0 0 0 1px var(--amber-lo), 0 3px 10px -2px rgba(211,148,31,.7);
  transition: transform .18s var(--ease);
}
input[type="range"]::-webkit-slider-thumb:hover { transform: scale(1.15); }
input[type="range"]::-moz-range-thumb {
  width: 16px; height: 16px; border-radius: 50%; background: var(--amber-lo);
  border: 3px solid #FFFFFF; box-shadow: 0 0 0 1px var(--amber-lo); cursor: pointer;
}

.switches { display: grid; gap: .5rem; }
.switch {
  display: flex; align-items: center; gap: .75rem; cursor: pointer;
  padding: .55rem .75rem; border-radius: var(--r);
  border: 1px solid var(--line); background: rgba(255,255,255,.02);
  transition: .22s var(--ease);
}
.switch:hover { border-color: var(--amber); background: #FFFBF3; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch-track {
  width: 38px; height: 21px; border-radius: 99px; flex: none;
  background: rgba(21,23,27,.10); border: 1px solid var(--line);
  position: relative; transition: .25s var(--ease);
}
.switch-track::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 15px; height: 15px;
  border-radius: 50%; background: var(--txt-4); transition: .25s var(--ease);
}
.switch input:checked + .switch-track { background: #FBE6C2; border-color: var(--amber-lo); }
.switch input:checked + .switch-track::after { transform: translateX(17px); background: var(--amber); }
.switch input:focus-visible + .switch-track { outline: 2px solid var(--amber); outline-offset: 2px; }
.switch-txt { font-size: .88rem; line-height: 1.35; }
.switch-txt small { display: block; font-size: .74rem; color: var(--txt-3); }
.switch-price { margin-left: auto; font-family: var(--font-mono); font-size: .8rem; color: var(--txt-3); flex: none; }
/* Field verification is quoted, not published — mark it so the eye doesn't read
   a blank where every other row carries a figure. */
.switch-price.is-call {
  color: var(--amber-hi); font-size: .68rem; letter-spacing: .12em; text-transform: uppercase;
}

/* Readout */
.readout {
  margin-top: 1.15rem; padding-top: 1.15rem; border-top: 1px dashed var(--line);
}
.price-row { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--s4); flex-wrap: wrap; }
.price {
  font-family: var(--font-mono); font-weight: 700; letter-spacing: -0.04em;
  font-size: clamp(2.4rem, 5.6vw, 3.2rem); line-height: 1;
  font-variant-numeric: tabular-nums;
  background: linear-gradient(160deg, #D08F22, #A8640F 58%, #7A4A0C);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
/* A project type with base:null shows the phone number where the fee goes.
   A phone number is four times the width of "$200", so it steps down to a size
   that still fits on one line, and drops the gradient clip for a solid colour. */
.price.is-quoted {
  font-size: clamp(1.4rem, 3.2vw, 1.95rem); letter-spacing: -.02em;
  background: none; -webkit-background-clip: border-box; background-clip: border-box;
  color: var(--amber-hi); -webkit-text-fill-color: currentColor;
}
.price.is-quoted a { color: inherit; -webkit-text-fill-color: currentColor; }
.price.is-quoted a:hover { text-decoration: underline; }
.price-sub { font-size: .8rem; color: var(--txt-3); margin-top: .4rem; }
.turn { text-align: right; }
.turn-n { font-family: var(--font-mono); font-size: 1.6rem; font-weight: 700; color: var(--green); line-height: 1; }
.turn-l { font-size: .72rem; color: var(--txt-3); letter-spacing: .1em; text-transform: uppercase; margin-top: .35rem; }

.deliver { margin-top: var(--s4); display: grid; gap: .3rem; }
.deliver-item {
  display: flex; align-items: flex-start; gap: .55rem; font-size: .82rem;
  line-height: 1.45; color: var(--txt-2);
  animation: slipIn .4s var(--ease) both;
}
.deliver-item svg { flex: none; margin-top: .3rem; color: var(--green); }
.deliver-item code {
  font-family: var(--font-mono); font-size: .8rem; color: var(--cyan);
  background: rgba(86,204,242,.08); padding: .05em .4em; border-radius: 4px;
}
@keyframes slipIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.note {
  margin-top: var(--s4); padding: .85rem 1.05rem; border-radius: var(--r);
  background: #F0F6F9; border: 1px solid rgba(26,95,122,.20);
  border-left: 3px solid var(--cyan);
  font-size: .84rem; color: var(--txt-2);
}
.note strong { color: var(--cyan); }
.note.warn { background: #FFF8EC; border-color: rgba(168,100,15,.22); border-left-color: var(--amber); }
.note.warn strong { color: var(--amber); }

/* ---------- 11b. Architectural artwork ----------
   Custom SVG renderings, drawn by make_art.py. Explicit width/height on every
   <img> so nothing shifts while they load (Core Web Vitals). */
.artband {
  position: relative; margin: 0;
  border-radius: var(--r-xl); overflow: hidden;
  border: 1px solid var(--line); background: var(--ink-850);
  box-shadow: var(--shadow-lift);
}
.artband img {
  width: 100%; height: auto; display: block; aspect-ratio: 16 / 9; object-fit: cover;
}
.artband figcaption {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 2.4rem 1.6rem 1.1rem;
  background: linear-gradient(180deg, transparent, rgba(251,250,248,.94) 62%);
  display: flex; flex-wrap: wrap; align-items: baseline; gap: .5rem 1rem;
  font-family: var(--font-mono); font-size: .72rem; letter-spacing: .14em;
  text-transform: uppercase; color: var(--txt-3);
}
.artband figcaption b { color: var(--amber); font-weight: 600; letter-spacing: .1em; }

/* full-bleed band that escapes the wrap */
.artbleed {
  width: 100vw; max-width: 100vw;
  margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw);
  border-radius: 0; border-left: 0; border-right: 0;
}
.artbleed img { aspect-ratio: 24 / 9; }
@media (max-width: 720px) {
  .artbleed img, .artband img { aspect-ratio: 4 / 3; }
}

/* art sitting behind a page hero */
.arthero { position: relative; margin-bottom: var(--s7); }
.arthero .artband { border-radius: var(--r-xl); }

/* ---------- 11c. Project photographs ----------
   The source files are 760px wide. Three across the 1132px content column
   puts each tile at 361px, so on a retina screen they still render from more
   pixels than they show. The old sources were 384px and went soft on every
   modern phone; if you ever swap one, match the 760 or this comment lies. */
.shots { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s5); }
.shot {
  position: relative; margin: 0; overflow: hidden;
  border-radius: var(--r-lg); border: 1px solid var(--line);
  background: var(--ink-850); box-shadow: var(--shadow-lift);
  /* Hard ceiling at the source width. Whatever the column count works out to,
     a tile stops growing here rather than upscaling the photo. */
  width: 100%; max-width: 760px; margin-inline: auto;
}
.shot img {
  width: 100%; height: auto; display: block; aspect-ratio: 3 / 2; object-fit: cover;
  transition: transform .5s cubic-bezier(.2, .7, .3, 1);
}
.shot:hover img { transform: scale(1.035); }
.shot figcaption {
  position: absolute; inset: auto 0 0 0; padding: 3rem 1.1rem .95rem;
  background: linear-gradient(180deg, transparent, rgba(18, 20, 23, .88) 58%);
  color: #fff;
}
.shot-t {
  display: block; font-weight: 650; font-size: 1.02rem; letter-spacing: -.01em;
  line-height: 1.2;
}
.shot-m {
  display: block; margin-top: .3rem;
  font-family: var(--font-mono); font-size: .7rem; letter-spacing: .12em;
  text-transform: uppercase; color: rgba(255, 255, 255, .78);
}
/* --amber-lo is flagged "fills only, never type" because it fails on the light
   page. Here it sits on a near-black scrim at 8.8:1, so it is safe as type. */
.shot-m b { color: var(--amber-lo); font-weight: 600; }
@media (max-width: 860px) { .shots { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .shots { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { .shot img, .shot:hover img { transition: none; transform: none; } }

/* ---------- 12. Process rail ---------- */
.rail { position: relative; display: grid; gap: var(--s5); }
.rail::before {
  content: ""; position: absolute; left: 21px; top: 12px; bottom: 12px; width: 1px;
  background: linear-gradient(180deg, transparent, var(--line-hot) 12%, var(--line-hot) 88%, transparent);
}
.rail-step { display: grid; grid-template-columns: 44px 1fr; gap: var(--s4); align-items: start; }
.rail-dot {
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
  background: #FFFFFF; border: 1px solid var(--line-hot);
  box-shadow: 0 2px 8px -3px rgba(21,23,27,.15);
  font-family: var(--font-mono); font-size: .8rem; color: var(--amber); font-weight: 600;
  position: relative; z-index: 1;
}
.rail-step h3 { font-size: 1.08rem; margin-bottom: .3rem; }
.rail-step p { color: var(--txt-2); font-size: .92rem; }
.rail-tag {
  display: inline-block; margin-top: .5rem; font-family: var(--font-mono); font-size: .72rem;
  color: var(--green); background: #EDF7F2; border: 1px solid rgba(20,107,74,.22);
  padding: .18em .6em; border-radius: 5px;
}

/* ---------- 13. Climate zone map ---------- */
.cz-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s6); align-items: start; }
@media (max-width: 900px) {
  .cz-layout { grid-template-columns: 1fr; }
  /* Side by side, the map is the thing you look at first. Stacked on a phone
     it becomes 450px of scrolling in front of the box that answers the
     question, and its 23px dots are a poor target for a fingertip. So on a
     narrow screen the search goes first and the map becomes the illustration
     underneath it. */
  .cz-find { order: -1; }
}

.cz-map { width: 100%; max-width: 300px; height: auto; margin-inline: auto; }
.cz-map .ca-outline {
  fill: #F3F0EA; stroke: rgba(21,23,27,.22); stroke-width: 1.2;
}
.cz-node {
  cursor: pointer;
  transition: transform .3s var(--ease);
  transform-box: fill-box; transform-origin: center;
}
.cz-node circle.hit { fill: transparent; }
.cz-node circle.ring {
  fill: #FFFFFF; stroke: rgba(21,23,27,.28); stroke-width: 1.1;
  transition: stroke .3s, fill .3s, r .3s var(--ease);
}
.cz-node text {
  font-family: var(--font-mono); font-size: 9.5px; font-weight: 600;
  fill: var(--txt-2); text-anchor: middle; dominant-baseline: central;
  pointer-events: none; transition: fill .3s;
}
.cz-node:hover circle.ring { stroke: var(--amber); fill: #FDF3E1; }
.cz-node:hover text { fill: var(--amber); }
.cz-node.on circle.ring {
  stroke: var(--amber); stroke-width: 2; fill: #F7C86E;
  filter: drop-shadow(0 2px 6px rgba(168,100,15,.45));
}
.cz-node.on text { fill: var(--amber-ink); }
.cz-node:focus-visible { outline: none; }
.cz-node:focus-visible circle.ring { stroke: var(--cyan); stroke-width: 2; }

.zone-search { display: flex; gap: .5rem; margin-bottom: var(--s5); }
.input {
  flex: 1; padding: .85em 1.05em; border-radius: var(--r);
  background: rgba(255,255,255,.03); border: 1px solid var(--line);
  color: var(--txt); font-size: .95rem; transition: border-color .22s, background-color .22s;
}
.input::placeholder { color: var(--txt-4); }
.input:focus { outline: none; border-color: var(--amber); background: #FFFDF8;
  box-shadow: 0 0 0 3px rgba(233,169,60,.22); }
textarea.input { resize: vertical; min-height: 110px; font-family: inherit; }
select.input { cursor: pointer; appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--txt-3) 50%),
                    linear-gradient(135deg, var(--txt-3) 50%, transparent 50%);
  background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%;
  background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; padding-right: 2.6rem; }
select.input option { background: #FFFFFF; color: var(--txt); }

.zone-card { min-height: 250px; }
.zone-badge {
  display: inline-flex; align-items: baseline; gap: .5rem;
  font-family: var(--font-mono); font-weight: 700;
  font-size: 2.4rem; letter-spacing: -0.04em; color: var(--amber); line-height: 1;
}
.zone-badge small { font-size: .8rem; letter-spacing: .16em; color: var(--txt-3); text-transform: uppercase; font-weight: 500; }
.zone-meta { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line);
  border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; margin-top: var(--s5); }
.zone-meta div { background: #FFFFFF; padding: .8rem .9rem; }
.zone-meta dt { font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; color: var(--txt-4); }
.zone-meta dd { font-size: .9rem; margin-top: .2rem; font-weight: 550; }

/* ---------- 14. Advisor ---------- */
.adv-q { display: none; animation: slipIn .35s var(--ease) both; }
.adv-q.on { display: block; }
.adv-progress { height: 3px; border-radius: 99px; background: rgba(255,255,255,.08); overflow: hidden; margin-bottom: var(--s5); }
.adv-progress i { display: block; height: 100%; background: linear-gradient(90deg, var(--amber), var(--green));
  border-radius: 99px; transition: width .45s var(--ease); }
.adv-foot { display: flex; justify-content: space-between; align-items: center; gap: var(--s4); margin-top: var(--s5); }
.adv-count { font-family: var(--font-mono); font-size: .78rem; color: var(--txt-4); }

.result-block { display: grid; gap: var(--s3); margin-top: var(--s5); }
.result-line {
  display: grid; grid-template-columns: 150px 1fr; gap: var(--s4);
  padding: .8rem 0; border-top: 1px solid var(--line-soft); font-size: .92rem;
}
@media (max-width: 560px) { .result-line { grid-template-columns: 1fr; gap: .25rem; } }
.result-line dt { font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--txt-4); padding-top: .15rem; }
.result-line dd strong { color: var(--amber); }
.result-block > div:first-child .result-line { border-top: 0; }

.opt-btn { display: block; width: 100%; text-align: left; border-radius: var(--r); }
.opt-inner {
  display: flex; flex-direction: column; gap: .15rem; height: 100%;
  padding: .9rem 1rem; border-radius: var(--r);
  border: 1px solid var(--line); background: #FFFFFF;
  transition: .22s var(--ease);
}
.opt-inner strong { font-size: .95rem; font-weight: 600; letter-spacing: -0.01em; }
.opt-inner small  { font-size: .76rem; color: var(--txt-3); line-height: 1.35; }
.opt-btn:hover .opt-inner {
  border-color: var(--amber); background: rgba(255,180,61,.09);
  transform: translateY(-2px);
}
.opt-btn:hover .opt-inner strong { color: var(--amber); }

/* ---------- 15. FAQ ---------- */
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer; padding: 1.25rem 2.5rem 1.25rem 0;
  font-weight: 600; font-size: 1.02rem; position: relative;
  transition: color .2s; letter-spacing: -0.015em;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { color: var(--amber); }
.faq summary::after {
  content: ""; position: absolute; right: 4px; top: 1.55rem; width: 11px; height: 11px;
  border-right: 1.6px solid var(--txt-3); border-bottom: 1.6px solid var(--txt-3);
  transform: rotate(45deg); transition: transform .3s var(--ease), border-color .2s;
}
.faq details[open] summary { color: var(--amber); }
.faq details[open] summary::after { transform: rotate(-135deg); border-color: var(--amber); top: 1.85rem; }
.faq-body { padding: 0 2.5rem 1.5rem 0; color: var(--txt-2); animation: slipIn .3s var(--ease) both; }
.faq-body p + p { margin-top: .8rem; }

/* ---------- 16. Tables ---------- */
.tbl-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-lg); }
table.data { width: 100%; border-collapse: collapse; font-size: .9rem; min-width: 520px; }
table.data th, table.data td { padding: .85rem 1.1rem; text-align: left; border-bottom: 1px solid var(--line-soft); }
table.data { background: #FFFFFF; }
table.data thead th {
  font-family: var(--font-mono); font-size: .7rem; letter-spacing: .13em; text-transform: uppercase;
  color: var(--txt-3); background: #F5F2EC; font-weight: 500; white-space: nowrap;
}
table.data tbody tr:last-child td { border-bottom: 0; }
table.data tbody tr { transition: background-color .2s; }
table.data tbody tr:hover { background: #FFFBF3; }
table.data td.num { font-family: var(--font-mono); font-variant-numeric: tabular-nums; color: var(--amber); white-space: nowrap; }

/* ---------- 17. Pricing ---------- */
.tier { display: flex; flex-direction: column; height: 100%; }
.tier.feature { border-color: var(--amber); background: linear-gradient(168deg, #FFF8EC, #FFFFFF 60%); }
.tier-flag {
  position: absolute; top: 0; right: var(--s5); transform: translateY(-50%);
  font-family: var(--font-mono); font-size: .66rem; letter-spacing: .14em; text-transform: uppercase;
  background: var(--amber-lo); color: var(--amber-ink); padding: .28em .75em;
  border-radius: 99px; font-weight: 700;
}
.tier-price { font-family: var(--font-mono); font-size: 2.3rem; font-weight: 700; letter-spacing: -0.04em;
  color: var(--txt); margin: var(--s3) 0 .2rem; font-variant-numeric: tabular-nums; }
.tier-price small { font-size: .95rem; color: var(--txt-3); font-weight: 400; letter-spacing: 0; }
.tier ul { list-style: none; padding: 0; margin: var(--s5) 0 var(--s5); display: grid; gap: .55rem; }
.tier li { display: flex; gap: .6rem; font-size: .89rem; color: var(--txt-2); align-items: flex-start; }
.tier li svg { flex: none; margin-top: .3rem; color: var(--green); }
.tier .btn { margin-top: auto; }

/* ---------- 17b. Proof band ---------- */
.proof {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px;
  background: var(--line); border: 1px solid var(--line);
  border-radius: var(--r-lg); overflow: hidden;
}
@media (max-width: 780px) { .proof { grid-template-columns: repeat(2, 1fr); } }
.proof-item {
  background: #FFFFFF;
  padding: var(--s5) var(--s4); display: flex; flex-direction: column; gap: .45rem;
  align-items: center; text-align: center; transition: background-color .25s;
}
a.proof-item:hover { background: #FFFBF3; }
.proof-n {
  font-family: var(--font-mono); font-weight: 700; font-size: 1.5rem;
  letter-spacing: -0.03em; color: var(--amber); line-height: 1;
  display: inline-flex; align-items: baseline; gap: .18em;
}
.proof-n .stars { color: var(--amber); font-size: 1.1rem; }
.proof-l { font-size: .78rem; color: var(--txt-3); line-height: 1.4; max-width: 22ch; }

/* ---------- 17c. Review quotes ---------- */
.quotes { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: var(--s5); }
.quote {
  margin: 0; padding: var(--s5);
  background: #FFFFFF; box-shadow: var(--shadow-card);
  border: 1px solid var(--line); border-radius: var(--r-lg);
  position: relative;
}
.quote::before {
  content: "\201C"; position: absolute; top: .1rem; right: 1rem;
  font-size: 4rem; line-height: 1; color: var(--amber); opacity: .16;
  font-family: Georgia, serif;
}
.quote blockquote { margin: 0; font-size: 1rem; line-height: 1.6; color: var(--txt); }
.quote figcaption { margin-top: var(--s4); font-size: .82rem; color: var(--txt-2); }

/* ---------- 17d. Tool verdict ---------- */
.verdict {
  display: flex; gap: .85rem; align-items: flex-start;
  padding: 1rem 1.1rem; border-radius: var(--r);
  border: 1px solid var(--vc, var(--amber));
  background: color-mix(in srgb, var(--vc, var(--amber)) 9%, transparent);
}
@supports not (background: color-mix(in srgb, red 9%, transparent)) {
  .verdict { background: rgba(255,180,61,.09); }
}
.verdict-dot {
  width: 10px; height: 10px; border-radius: 50%; flex: none; margin-top: .42rem;
  background: var(--vc, var(--amber));
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--vc, var(--amber)) 22%, transparent);
}
.verdict strong { color: var(--vc, var(--amber)); font-size: 1rem; }
.verdict p { margin: 0; }

input[type="date"].input { cursor: pointer; }
input[type="date"].input::-webkit-calendar-picker-indicator {
  filter: invert(70%) sepia(60%) saturate(600%) hue-rotate(340deg); cursor: pointer;
}

/* ---------- 18. CTA band ---------- */
.cta-band {
  position: relative; border-radius: var(--r-xl); overflow: hidden;
  border: 1px solid var(--line-hot); padding: clamp(2.2rem, 5vw, 3.8rem);
  background:
    radial-gradient(40rem 22rem at 15% 0%, rgba(233,169,60,.26), transparent 65%),
    radial-gradient(36rem 20rem at 88% 100%, rgba(20,107,74,.10), transparent 62%),
    linear-gradient(150deg, #FFFFFF, #F6F2EA);
  box-shadow: var(--shadow-card);
  text-align: center;
}
.cta-band h2 { max-width: 20ch; margin-inline: auto; }
.cta-band p { max-width: 55ch; margin: var(--s4) auto 0; color: var(--txt-2); }
.cta-actions { display: flex; flex-wrap: wrap; gap: var(--s3); justify-content: center; margin-top: var(--s6); }

/* ---------- 19. Footer ---------- */
.site-footer { border-top: 1px solid var(--line); margin-top: var(--s9); padding-block: var(--s7) var(--s6);
  background: linear-gradient(180deg, transparent, rgba(233,169,60,.07)); }
.foot-grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: var(--s6); }
@media (max-width: 860px) { .foot-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .foot-grid { grid-template-columns: 1fr; } }
.foot-h { font-family: var(--font-mono); font-size: .7rem; letter-spacing: .17em; text-transform: uppercase;
  color: var(--txt-4); margin-bottom: var(--s4); }
.foot-list { list-style: none; padding: 0; display: grid; gap: .55rem; }
.foot-list a { color: var(--txt-2); font-size: .89rem; }
.foot-list a:hover { color: var(--amber); }
.foot-bottom { display: flex; flex-wrap: wrap; gap: var(--s4); justify-content: space-between;
  align-items: center; margin-top: var(--s7); padding-top: var(--s5); border-top: 1px solid var(--line-soft); }
.foot-bottom p { font-size: .8rem; color: var(--txt-4); }
.foot-legal { display: flex; flex-wrap: wrap; gap: var(--s4); font-size: .8rem; }
.foot-legal a { color: var(--txt-4); }
.foot-legal a:hover { color: var(--amber); }

/* ---------- 20. Reveal on scroll ---------- */
.rv { opacity: 0; transform: translateY(22px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.rv.in { opacity: 1; transform: none; }
.rv-d1 { transition-delay: .07s; } .rv-d2 { transition-delay: .14s; }
.rv-d3 { transition-delay: .21s; } .rv-d4 { transition-delay: .28s; }
@media (prefers-reduced-motion: reduce) { .rv { opacity: 1; transform: none; } }

/* ---------- 20b. Overflow guards ----------
   Nothing on this site may push the page sideways. Long words, pasted URLs,
   emails and mono strings wrap instead of widening their container. */
h1, h2, h3, h4, p, li, dd, summary, .chip, .zone-meta dd { overflow-wrap: break-word; }
.mono, code { overflow-wrap: anywhere; }
.card, .panel, .stat, .tier { min-width: 0; }
.grid > * { min-width: 0; }

/* ---------- 21. Utilities ---------- */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; left: 50%; top: -60px; transform: translateX(-50%); z-index: 200;
  background: var(--amber-lo); color: var(--amber-ink); padding: .7em 1.3em;
  border-radius: 0 0 10px 10px;
  font-weight: 600; transition: top .25s var(--ease);
}
.skip:focus { top: 0; color: var(--amber-ink); }
.mt0 { margin-top: 0; } .mt3 { margin-top: var(--s3); } .mt4 { margin-top: var(--s4); }
.mt5 { margin-top: var(--s5); } .mt6 { margin-top: var(--s6); } .mt7 { margin-top: var(--s7); }
.mb4 { margin-bottom: var(--s4); } .mb5 { margin-bottom: var(--s5); } .mb6 { margin-bottom: var(--s6); }
.mb7 { margin-bottom: var(--s7); }
.tac { text-align: center; }
.flex { display: flex; } .fwrap { flex-wrap: wrap; } .aic { align-items: center; }
.gap2 { gap: var(--s2); } .gap3 { gap: var(--s3); } .gap4 { gap: var(--s4); }
.nowrap { white-space: nowrap; }

/* ---------- 21a. Code Notes — cards and article prose ---------- */
.postgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: var(--s5); }

.postcard {
  display: flex; flex-direction: column;
  padding: var(--s6); color: var(--txt);
  background: #FFFFFF; border: 1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: var(--shadow-card);
  transition: transform .4s var(--ease), border-color .3s, box-shadow .4s var(--ease);
}
.postcard:hover {
  color: var(--txt); transform: translateY(-3px);
  border-color: var(--amber); box-shadow: var(--shadow-lift);
}
.postcard h3 { margin-top: .6rem; font-size: 1.18rem; letter-spacing: -0.02em; line-height: 1.28; }
.postcard p { margin-top: .6rem; font-size: .92rem; color: var(--txt-2); flex: 1 1 auto; }
.postcard-meta {
  display: flex; align-items: center; gap: .5em; flex-wrap: wrap;
  font-family: var(--font-mono); font-size: .7rem; letter-spacing: .1em;
  text-transform: uppercase; color: var(--txt-4);
}

.tags { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: var(--s4); }
.tag {
  padding: .28em .7em; border-radius: 999px;
  border: 1px solid var(--line-hot); background: #FFF8EC;
  font-family: var(--font-mono); font-size: .66rem; letter-spacing: .07em;
  color: var(--amber);
}

.backlink { font-family: var(--font-mono); font-size: .74rem; letter-spacing: .12em; text-transform: uppercase; }

/* A single measured column — long-form reads badly at the full page width. */
.postwrap { max-width: 44rem; margin-inline: auto; }
.postwrap h1 { font-size: clamp(1.9rem, 4.6vw, 3rem); }

.prose > * + * { margin-top: var(--s5); }
.prose h2 { font-size: clamp(1.3rem, 2.6vw, 1.75rem); margin-top: var(--s7); }
.prose h3 { font-size: 1.12rem; margin-top: var(--s6); }
.prose p, .prose li { color: var(--txt-2); font-size: 1.03rem; line-height: 1.72; }
.prose ul, .prose ol { padding-left: 1.3em; display: grid; gap: .5rem; }
.prose li::marker { color: var(--amber); }
.prose a { text-decoration: underline; text-underline-offset: .18em; text-decoration-thickness: 1px; }
.prose code {
  font-family: var(--font-mono); font-size: .88em;
  background: var(--ink-850); border: 1px solid var(--line-soft);
  border-radius: var(--r-sm); padding: .12em .4em;
}
.prose hr { border: 0; border-top: 1px solid var(--line); margin-block: var(--s7); }
.prose strong { color: var(--txt); font-weight: 650; }

/* ---------- 21b. Credential tiles ----------
   Third-party marks (ICC, CHEERS) keep their own brand colour — a greyed-out
   accreditation badge reads as decoration rather than proof. They sit on white
   so neither logo has to fight the warm paper behind it. */
.creds { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s5); }
/* Three marks need more room than two did. Below 1100 they drop to two abreast,
   and below 940 the tile text gets squeezed into a column three words wide, so
   it goes single-file well before the usual mobile breakpoint. */
@media (max-width: 1100px) { .creds { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 940px)  { .creds { grid-template-columns: 1fr; } }

.cred {
  display: flex; align-items: center; gap: var(--s5);
  padding: var(--s5) var(--s5) var(--s5) var(--s4);
  background: #FFFFFF; border: 1px solid var(--line);
  border-radius: var(--r-lg); box-shadow: var(--shadow-card);
}
.cred-mark {
  flex: none; display: grid; place-items: center;
  width: 116px; min-height: 88px;
}
.cred-mark img { display: block; max-width: 100%; height: auto; }
.cred-mark.sq img { width: 88px; }
/* Direct child only — a bare `.cred-txt strong` also caught the <strong> inside
   the paragraph and broke it onto its own line mid-sentence. */
.cred-txt > strong {
  display: block; font-size: .96rem; font-weight: 650;
  letter-spacing: -0.01em; line-height: 1.3;
}
.cred-txt p { margin-top: .45rem; font-size: .86rem; color: var(--txt-3); line-height: 1.5; }
.cred-txt .mono {
  display: inline-block; margin-top: .55rem;
  font-family: var(--font-mono); font-size: .68rem; letter-spacing: .14em;
  text-transform: uppercase; color: var(--amber);
}

/* ---------- 22. The ADU signboard ----------
   Two states of one offer. The band sits above the header and scrolls away;
   once it is gone the dock takes over so the price is never off-screen.
   Every colour here is measured against the band fill #FDE9C8:
   --amber-hi 6.2:1 · --txt 15.5:1 · --txt-2 7.3:1. Nothing lighter is used. */
.signboard {
  position: relative; overflow: hidden;
  background: linear-gradient(100deg, #FFF6E6 0%, #FDE9C8 42%, #FBE3BA 68%, #FFF6E6 100%);
  border-bottom: 1px solid var(--line-hot);
}
/* Slow sheen. Purely decorative — the reduced-motion reset kills it. */
.signboard::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(100deg, transparent 38%, rgba(255,255,255,.75) 50%, transparent 62%);
  transform: translateX(-60%); animation: sheen 7.5s var(--ease-io) infinite;
}
@keyframes sheen { 0%, 62% { transform: translateX(-60%); } 100% { transform: translateX(60%); } }

.sign-inner {
  position: relative; z-index: 1;
  display: flex; align-items: center; gap: var(--s5);
  min-height: 54px; padding-block: .5rem;
  color: var(--txt);
}
.sign-inner:hover { color: var(--txt); }
.sign-inner:hover .sign-cta { background: var(--amber-hi); }

.sign-flag {
  display: inline-flex; align-items: center; gap: .5em; flex: none;
  font-family: var(--font-mono); font-size: .68rem; letter-spacing: .18em;
  text-transform: uppercase; color: var(--amber-hi);
}
.sign-flag .dot { background: var(--amber-hi); }

/* centre, not baseline — the terms became a two-line stack once the
   prescriptive-method qualifier was added, and baseline hung the price off the
   first line and left it sitting high against the block. */
.sign-deal { display: inline-flex; align-items: center; gap: .55rem; flex: none; }
.sign-price {
  font-family: var(--font-mono); font-size: 1.5rem; font-weight: 700;
  letter-spacing: -0.03em; color: var(--amber-hi);
  font-variant-numeric: tabular-nums; line-height: 1;
}
.sign-terms {
  font-size: .88rem; color: var(--txt-2);
  display: flex; flex-direction: column; line-height: 1.25;
}
.sign-terms b { color: var(--txt); font-weight: 650; }
/* The scope of the flat fee. Small, but it is a pricing term, so it never
   drops out on narrow screens the way the decorative flag does. */
.sign-fine {
  font-size: .68rem; color: var(--txt-3); letter-spacing: .04em;
  text-transform: uppercase; font-family: var(--font-mono);
}

/* The rotating half. Fixed height + absolute lines so the bar never jumps. */
.sign-rot {
  position: relative; flex: 1 1 auto; min-width: 0; height: 1.35em;
  border-left: 1px solid var(--line-hot); padding-left: var(--s5);
}
.sign-line {
  position: absolute; left: var(--s5); right: 0; top: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  font-size: .88rem; color: var(--txt-2);
  opacity: 0; transform: translateY(.5em);
  transition: opacity .45s var(--ease), transform .45s var(--ease);
}
.sign-line.is-on { opacity: 1; transform: none; }
.sign-line b { color: var(--txt); font-weight: 650; }

.sign-cta {
  display: inline-flex; align-items: center; gap: .4em; flex: none;
  background: var(--amber); color: #FFFFFF;
  padding: .5em 1.05em; border-radius: 999px;
  font-size: .85rem; font-weight: 620; letter-spacing: -0.01em;
  transition: background-color .25s var(--ease);
}

@media (max-width: 900px) {
  .sign-rot { display: none; }
  .sign-inner { gap: var(--s4); justify-content: space-between; }
}
@media (max-width: 560px) {
  .sign-flag { display: none; }
  .sign-terms { font-size: .8rem; }
  .sign-price { font-size: 1.3rem; }
  .sign-cta { padding: .5em .85em; font-size: .8rem; }
  .sign-cta svg { display: none; }
}

/* The dock — appears once the band has scrolled away */
.signdock {
  position: fixed; z-index: 70; right: var(--s5); bottom: var(--s5);
  display: flex; align-items: stretch;
  background: #FFFFFF; border: 1px solid var(--line-hot); border-radius: var(--r-lg);
  box-shadow: var(--shadow-lift);
  opacity: 0; transform: translateY(16px) scale(.97); pointer-events: none;
  transition: opacity .4s var(--ease), transform .4s var(--ease);
}
.signdock.is-on { opacity: 1; transform: none; pointer-events: auto; }
.signdock-a {
  display: flex; align-items: center; gap: .8rem;
  padding: .8rem 1rem .8rem 1.1rem; color: var(--txt);
  border-left: 3px solid var(--amber-lo); border-radius: var(--r-lg) 0 0 var(--r-lg);
}
.signdock-a:hover { color: var(--txt); background: #FFFBF3; }
.signdock-price {
  font-family: var(--font-mono); font-size: 1.35rem; font-weight: 700;
  color: var(--amber-hi); letter-spacing: -0.03em; font-variant-numeric: tabular-nums;
}
.signdock-txt { display: flex; flex-direction: column; gap: .12rem; font-size: .87rem; line-height: 1.25; }
.signdock-txt small { font-size: .74rem; color: var(--txt-3); }
.signdock-x {
  flex: none; width: 30px; border: 0; border-left: 1px solid var(--line-soft);
  background: transparent; color: var(--txt-4); cursor: pointer;
  font-size: 1.1rem; line-height: 1; border-radius: 0 var(--r-lg) var(--r-lg) 0;
}
.signdock-x:hover { background: var(--ink-850); color: var(--txt); }
@media (max-width: 560px) {
  .signdock { right: var(--s4); left: var(--s4); bottom: var(--s4); }
  .signdock-a { flex: 1 1 auto; }
}

/* ---------- 23. The request sheet ----------
   The panel that slides up when someone clicks "Send this to Title 24 Master".
   It is a real <dialog>, so the browser handles the focus trap, the Escape key
   and keeping the rest of the page inert. None of that is written by hand and
   none of it can drift.
   ------------------------------------------------------------------------- */
.sheet {
  width: min(660px, calc(100vw - 2rem));
  max-height: min(88vh, 900px);
  /* A modal <dialog> is centred by the browser's own margin:auto. The reset at
     the top of this file zeroes the margin on everything, which pins the panel
     to the left edge instead, so it is set back here deliberately. */
  margin: auto;
  padding: 0; border: 1px solid var(--line); border-radius: var(--r-xl);
  background: linear-gradient(168deg, #FFFFFF, #F8F6F2);
  box-shadow: 0 40px 90px -30px rgba(21,23,27,.45), 0 2px 8px rgba(21,23,27,.08);
  color: var(--txt); overflow: visible;
}
.sheet::backdrop { background: rgba(21,23,27,.55); backdrop-filter: blur(3px); }
.sheet[open] { animation: sheet-in .32s var(--ease); }
.sheet[open]::backdrop { animation: fade-in .32s var(--ease); }
@keyframes sheet-in {
  from { opacity: 0; transform: translateY(18px) scale(.985); }
  to   { opacity: 1; transform: none; }
}
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .sheet[open], .sheet[open]::backdrop { animation: none; }
}

.sheet-body, .sheet-done {
  max-height: min(88vh, 900px); overflow-y: auto;
  padding: var(--s7) var(--s6) var(--s6);
  border-radius: var(--r-xl);
}
@media (max-width: 560px) { .sheet-body, .sheet-done { padding: var(--s6) var(--s5) var(--s5); } }

.sheet-x {
  position: absolute; top: -14px; right: -14px; z-index: 2;
  width: 40px; height: 40px; display: grid; place-items: center;
  border-radius: 999px; border: 1px solid var(--line); background: #FFFFFF;
  color: var(--txt-2); cursor: pointer;
  box-shadow: 0 6px 18px -8px rgba(21,23,27,.4);
  transition: color .2s, border-color .2s, transform .2s var(--ease);
}
.sheet-x:hover { color: var(--txt); border-color: var(--amber); transform: rotate(90deg); }
@media (max-width: 560px) { .sheet-x { top: 10px; right: 10px; box-shadow: none; } }

.sheet-h { font-size: clamp(1.5rem, 4vw, 2rem); letter-spacing: -0.03em; line-height: 1.1; }
.sheet-lede { color: var(--txt-2); font-size: .93rem; margin: var(--s4) 0 var(--s6); max-width: 56ch; }
.sheet-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s4); }
@media (max-width: 560px) { .sheet-row { grid-template-columns: 1fr; gap: 0; } }

/* Every input inside the sheet is full width. Elsewhere .input is a flex child
   of the zone search bar, where flex:1 does that job for it. */
.sheet .input { width: 100%; display: block; }
.sheet .field-label { text-transform: none; letter-spacing: 0; font-size: .84rem;
  color: var(--txt-2); font-weight: 600; }
.req { color: var(--txt-4); font-weight: 400; font-size: .78rem; margin-left: .3rem; }
.input.file { padding: .62em .7em; font-size: .88rem; cursor: pointer; background: #FFFFFF; }
.input.file::file-selector-button {
  margin-right: .8rem; padding: .5em 1em; border-radius: 999px;
  border: 1px solid var(--line); background: var(--ink-850);
  color: var(--txt); font: inherit; font-size: .84rem; font-weight: 600; cursor: pointer;
}
.input.file::file-selector-button:hover { border-color: var(--amber); color: var(--amber-hi); }

/* The bot trap. Never shown, never read out, and a real visitor cannot tab to
   it - so anything that arrives with it filled in was not typed by a person. */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* The send button is pinned to the bottom of the panel.
   It used to sit at the natural end of the form, which on a narrow window put
   it seven hundred pixels below the fold of a box that gives no hint it
   scrolls. The form looked like it had no way to send it. Now the button is
   always on screen and the fields scroll underneath it, which also makes the
   scrolling obvious. */
.sheet-foot {
  position: sticky; bottom: 0; z-index: 3;
  display: flex; flex-direction: column; align-items: center; gap: var(--s3);
  text-align: center;
  margin: var(--s6) calc(-1 * var(--s6)) calc(-1 * var(--s6));
  padding: var(--s4) var(--s6) var(--s5);
  background: #F8F6F2; border-top: 1px solid var(--line);
}
@media (max-width: 560px) {
  .sheet-foot { margin-inline: calc(-1 * var(--s5)); margin-bottom: calc(-1 * var(--s5));
                padding: var(--s3) var(--s5) var(--s4); }
}
.sheet-foot .btn { min-width: min(240px, 100%); }
.sheet-foot .tiny { max-width: 46ch; }
#f-submit[aria-busy="true"] { opacity: .65; pointer-events: none; }

.sheet-done { text-align: center; }
.sheet-tick {
  width: 68px; height: 68px; margin: var(--s4) auto var(--s5);
  display: grid; place-items: center; border-radius: 999px;
  background: rgba(46,156,110,.13); color: var(--green);
}
.sheet-done .sheet-lede { margin-inline: auto; }

/* print */
@media print {
  body::before, body::after, .site-header, .site-footer, .cta-band,
  .signboard, .signdock { display: none !important; }
  body { background: #fff; color: #000; }
}
