/* ============================================================
   INFRAZEN — design system v3 "Quiet authority"
   Light warm ground; authority carried by type, not effects.
   Instrument Serif (display) · Geist (UI + prose) · Geist Mono (data).
   Dark "instrument islands": terminal, diagrams, calculator output,
   CTA panel, footer — at most one per page plus the footer.
   Docs: redesign-docs/V3-DESIGN.md · tokens mirrored in build.mjs
   ============================================================ */

/* ---------- fonts (self-hosted, latin subset) ---------- */
@font-face {
  font-family: "Instrument Serif";
  src: url("/assets/fonts/instrument-serif-400.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Instrument Serif";
  src: url("/assets/fonts/instrument-serif-400-italic.woff2") format("woff2");
  font-weight: 400; font-style: italic; font-display: swap;
}
@font-face {
  font-family: "Geist";
  src: url("/assets/fonts/geist-var.woff2") format("woff2");
  font-weight: 100 900; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Geist Mono";
  src: url("/assets/fonts/geist-mono-var.woff2") format("woff2");
  font-weight: 100 900; font-style: normal; font-display: swap;
}
/* metric-matched fallbacks: text laid out in the fallback occupies the same
   box as the webfont, so the swap does not shift the layout (CLS) */
@font-face {
  font-family: "Geist Fallback"; src: local("Arial"), local("Helvetica Neue"), local("Helvetica");
  size-adjust: 102.1%; ascent-override: 99%; descent-override: 28.4%; line-gap-override: 0%;
}
@font-face {
  font-family: "Instrument Serif Fallback"; src: local("Times New Roman"), local("Times");
  size-adjust: 81.8%; ascent-override: 121.1%; descent-override: 37.9%; line-gap-override: 0%;
}
@font-face {
  font-family: "Instrument Serif Fallback"; src: local("Times New Roman Italic"), local("TimesNewRomanPS-ItalicMT"), local("Times New Roman");
  font-style: italic;
  size-adjust: 89.4%; ascent-override: 110.8%; descent-override: 34.7%; line-gap-override: 0%;
}
@font-face {
  font-family: "Geist Fallback"; src: local("Arial Bold"), local("Arial-BoldMT"), local("Helvetica Neue Bold");
  font-weight: 550 900;
  size-adjust: 100.5%; ascent-override: 100.5%; descent-override: 28.9%; line-gap-override: 0%;
}
@font-face {
  font-family: "Geist Mono Fallback"; src: local("Menlo"), local("Courier New");
  size-adjust: 99.7%; ascent-override: 101.3%; descent-override: 29.1%; line-gap-override: 0%;
}

/* ---------- tokens ---------- */
:root {
  color-scheme: light;

  --bg: #F7F5EF;          /* page ground: warm paper */
  --bg-deep: #EFEBE2;     /* recessed strips, table heads */
  --surface: #FFFFFF;     /* cards, fields */
  --surface-2: #FDFCF9;   /* hover surfaces */
  --band: #FBFAF6;        /* explicit alternating band */

  --text: #121816;        /* ink */
  --text-2: #39423D;      /* long-form body */
  --sage: #5A655F;        /* secondary text, labels */

  --jade: #1F6A4A;        /* brand accent = status OK */
  --jade-hover: #185A3E;
  --jade-bright: #2E9E6F; /* decorative dots/bars only */
  --jade-dim: rgba(31, 106, 74, 0.08);
  --jade-line: rgba(31, 106, 74, 0.32);
  --amber: #8A6418;       /* cost numerals, warn */
  --amber-2: #7A5815;
  --crit: #A3432F;

  --line: rgba(18, 24, 22, 0.10);
  --line-strong: rgba(18, 24, 22, 0.20);
  --wash-1: rgba(18, 24, 22, 0.025);
  --wash-2: rgba(18, 24, 22, 0.06);
  --wash-3: rgba(18, 24, 22, 0.09);
  --grid: rgba(18, 24, 22, 0.045);

  /* dark instrument islands */
  --pit: #0D1A14;
  --pit-2: #14241C;
  --pit-3: #1B2F25;
  --pit-text: #EEF0EA;
  --pit-muted: #A3B1A8;
  --pit-line: rgba(238, 240, 234, 0.12);
  --jade-lit: #7CCBA6;
  --amber-lit: #E0B04E;
  --crit-lit: #E58A6B;

  --shadow-1: 0 1px 2px rgba(18, 24, 22, 0.04), 0 1px 1px rgba(18, 24, 22, 0.02);
  --shadow-2: 0 1px 2px rgba(18, 24, 22, 0.04), 0 14px 36px -14px rgba(18, 24, 22, 0.18);
  --shadow-3: 0 2px 6px rgba(18, 24, 22, 0.05), 0 32px 72px -28px rgba(18, 24, 22, 0.32);

  --font-serif: "Instrument Serif", "Instrument Serif Fallback", "Times New Roman", serif;
  --font-body: "Geist", "Geist Fallback", -apple-system, "Segoe UI", system-ui, sans-serif;
  --font-mono: "Geist Mono", "Geist Mono Fallback", ui-monospace, "SF Mono", Menlo, monospace;
  /* legacy aliases referenced by older inline styles */
  --font-sans: var(--font-body);
  --font-display: var(--font-serif);
  --gold: var(--jade);
  --teal: var(--jade);
  --text-primary: var(--text);
  --text-secondary: var(--sage);
  --border: var(--line);

  --s-1: 4px;  --s-2: 8px;  --s-3: 12px; --s-4: 16px; --s-5: 24px;
  --s-6: 32px; --s-7: 48px; --s-8: 64px; --s-9: 96px; --s-10: 128px;
  --space-4: var(--s-4);

  --r-1: 4px; --r-2: 8px; --r-3: 14px; --r-4: 20px; --r-pill: 999px;

  --nav-h: 64px;
  --wrap: 1200px;
  --gutter: clamp(20px, 4vw, 32px);
  --section-y: clamp(4.5rem, 9vw, 7.5rem);

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --t-fast: 0.18s var(--ease);
  --t-med: 0.32s var(--ease);
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--nav-h) + 24px); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  font-weight: 400;
  letter-spacing: -0.006em;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "ss01" 0, "cv11" 1;
}
img, svg { max-width: 100%; height: auto; }
a { color: var(--jade); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
strong, b { font-weight: 600; color: var(--text); }
em { font-style: italic; }
hr { border: none; border-top: 1px solid var(--line); margin: var(--s-8) 0; }
::selection { background: var(--jade); color: #F7FBF6; }

h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 var(--s-4); color: var(--text); font-weight: 600; letter-spacing: -0.015em; }
h1, h2 { font-family: var(--font-serif); font-weight: 400; letter-spacing: -0.012em; line-height: 1.08; }
h3, h4 { font-family: var(--font-body); }

/* links in running text stay distinguishable without colour (WCAG 1.4.1) */
p a, li a, td a, article a, .prose a, figcaption a, small a {
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  text-decoration-color: var(--jade-line);
}
p a:hover, li a:hover, td a:hover, article a:hover, .prose a:hover { text-decoration-color: currentColor; }
/* navigation lists are not running text */
.nav-panel a, .footer a, .toc a, .crumbs a, a.service-card, a.case-card, a.link-tile, .btn, .nav-cta, .nav-link { text-decoration: none; }

:focus-visible { outline: 2px solid var(--jade); outline-offset: 3px; border-radius: var(--r-1); }
:is(.footer, .cta-panel, .term, .calc-out, .nav-feature, main > section.contact:last-child) :focus-visible,
.nav-feature:focus-visible { outline-color: var(--jade-lit); }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--jade); color: #F7FBF6;
  font-size: 0.85rem; font-weight: 500;
  padding: var(--s-2) var(--s-4); border-radius: 0 0 var(--r-2) 0;
}
.skip-link:focus { left: 0; text-decoration: none; }

code, kbd, samp { font-family: var(--font-mono); font-size: 0.88em; }
:not(pre) > code {
  background: var(--bg-deep); border: 1px solid var(--line);
  border-radius: var(--r-1); padding: 0.08em 0.36em;
  overflow-wrap: anywhere; word-break: break-word;
}
pre {
  background: var(--pit); color: var(--pit-text);
  border-radius: var(--r-3); padding: var(--s-5);
  overflow-x: auto; font-size: 0.86rem; line-height: 1.7;
  border: 1px solid var(--pit-2);
}
pre code { background: none; border: 0; padding: 0; color: inherit; overflow-wrap: normal; word-break: normal; font-size: inherit; }

/* ---------- layout ---------- */
.container { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.container--narrow { max-width: calc(760px + 2 * var(--gutter)); }
/* one reading column: prose, takeaways and headers inside a narrow container share its edges */
.container--narrow .prose, .container--narrow .prose-article, .container--narrow .faq { max-width: none; }
section { position: relative; }
.section, .services, .contact, .global, .why-us, .ecosystem, .approach { padding: var(--section-y) 0; }
.section--band { background: var(--band); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section--deep { background: var(--bg-deep); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section--tight { padding: clamp(2.5rem, 5vw, 4rem) 0; }
.section--flush-top { padding-top: 0; }
.section--flush-bottom { padding-bottom: 0; }
/* consecutive plain sections share their gap rather than doubling it */
main > :is(section.services, .section):not(.section--band):not(.section--deep):not(.hero)
  + :is(section.services, .section):not(.section--band):not(.section--deep):not(.section--flush-top):not(.section--tight) { padding-top: calc(var(--section-y) * 0.35); }

.center { text-align: center; }
.muted { color: var(--sage); }
.mt-0 { margin-top: 0 !important; }
.mb-0 { margin-bottom: 0 !important; }
.lede { font-size: clamp(1.1rem, 1.6vw, 1.25rem); color: var(--text-2); line-height: 1.6; }
.meta-line {
  font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.04em;
  color: var(--sage); margin-top: var(--s-3);
}
.mono-key, main tbody th.mono-key { font-family: var(--font-mono); font-size: 0.8rem; font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--text); white-space: nowrap; }
@media (max-width: 768px) { .mono-key { white-space: normal; } }
/* series colours in comparison tables: a legend dot carries the colour, the text stays AA ink */
main th[style*="--series"]::before {
  content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  background: var(--series); margin-right: 8px; vertical-align: 1px;
}

/* ---------- nav ---------- */
.navbar {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  border-bottom: 1px solid transparent;
  transition: border-color var(--t-med);
}
/* scrim on a pseudo-element: backdrop-filter on .navbar itself would make it the
   containing block for the fixed mobile overlay (.nav-links), pinning it to the bar */
.navbar::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: rgba(247, 245, 239, 0.72);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  backdrop-filter: saturate(1.4) blur(12px);
  transition: background var(--t-med);
}
.navbar.scrolled { border-bottom-color: var(--line); }
.navbar.scrolled::before { background: rgba(247, 245, 239, 0.9); }
.nav-container {
  max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter);
  height: var(--nav-h);
  display: flex; align-items: center; gap: var(--s-5);
}
.nav-logo { display: inline-flex; align-items: center; gap: 10px; flex-shrink: 0; color: var(--text); }
.nav-logo img, .logo-full { height: 30px; width: auto; }
.logo-mark { height: 24px; width: 24px; }
.logo-word {
  font-family: var(--font-body); font-size: 1.12rem; font-weight: 650;
  letter-spacing: -0.035em; color: var(--text);
}
.logo-word b { color: var(--jade); font-weight: 650; }
.nav-logo:hover { text-decoration: none; }

.nav-links { display: flex; align-items: stretch; gap: 2px; margin-left: auto; height: 100%; }
.nav-item { display: flex; align-items: center; }
.nav-links > .nav-link { align-self: center; }
.nav-link, .nav-trigger, .nav-cta { white-space: nowrap; }
.nav-link, .nav-trigger {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-body); font-size: 0.92rem; font-weight: 500;
  color: var(--text-2); letter-spacing: -0.01em;
  padding: 8px 12px; border-radius: var(--r-pill);
  background: none; border: 0; cursor: pointer;
  transition: color var(--t-fast), background var(--t-fast);
}
.nav-link:hover, .nav-trigger:hover { color: var(--text); background: var(--wash-2); text-decoration: none; }
.nav-link.nav-active, .nav-trigger.nav-active { color: var(--text); }
.nav-trigger::after {
  content: ""; width: 6px; height: 6px; margin-top: -3px;
  border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg); opacity: 0.6; transition: transform var(--t-fast);
}
.nav-item.open > .nav-trigger { color: var(--text); background: var(--wash-2); }
.nav-item.open > .nav-trigger::after { transform: translateY(3px) rotate(225deg); }

.nav-panel {
  position: absolute; left: 0; right: 0; top: 100%;
  background: var(--surface);
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow-3);
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: opacity 0.2s var(--ease), transform 0.2s var(--ease), visibility 0s linear 0.2s;
}
.nav-item.open > .nav-panel { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.nav-panel-inner {
  max-width: var(--wrap); margin: 0 auto; padding: var(--s-6) var(--gutter) var(--s-7);
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(0, 0.9fr); gap: var(--s-6);
}
.nav-panel-inner.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)) minmax(0, 0.9fr); }
.nav-col-h {
  font-family: var(--font-mono); font-size: 0.68rem; font-weight: 500;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--sage);
  margin: 0 0 var(--s-3); padding-bottom: var(--s-2); border-bottom: 1px solid var(--line);
}
.nav-col ul { list-style: none; margin: 0; padding: 0; }
.nav-plink {
  display: block; padding: 7px 10px; margin: 0 -10px; border-radius: var(--r-2);
  color: var(--text); transition: background var(--t-fast);
}
.nav-plink:hover { background: var(--bg); text-decoration: none; }
.nav-plink-t { display: block; font-size: 0.92rem; font-weight: 550; letter-spacing: -0.01em; }
.nav-plink-d { display: block; font-size: 0.8rem; color: var(--sage); line-height: 1.4; }
.nav-plink[data-badge] .nav-plink-t { display: inline; }
.nav-plink[data-badge]::after {
  content: attr(data-badge);
  display: inline-block;
  font-family: var(--font-mono); font-size: 0.6rem; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--jade); border: 1px solid var(--jade-line); border-radius: var(--r-pill);
  padding: 1px 6px; margin-left: 6px; vertical-align: 2px;
}
.nav-feature {
  display: flex; flex-direction: column; justify-content: space-between; gap: var(--s-4);
  background: var(--pit); color: var(--pit-text);
  border-radius: var(--r-3); padding: var(--s-5);
  background-image: radial-gradient(circle at 100% 0%, rgba(124, 203, 166, 0.18), transparent 55%);
}
.nav-feature:hover { text-decoration: none; }
.nav-feature-k { font-family: var(--font-mono); font-size: 0.7rem; color: var(--jade-lit); letter-spacing: 0.06em; }
.nav-feature-t { font-family: var(--font-serif); font-size: 1.6rem; line-height: 1.1; color: var(--pit-text); }
.nav-feature-t i { color: var(--jade-lit); }
.nav-feature-c { font-size: 0.85rem; font-weight: 500; color: var(--jade-lit); }

.nav-cta {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.9rem; font-weight: 550; letter-spacing: -0.01em;
  color: #F7FBF6; background: var(--jade);
  padding: 9px 16px; border-radius: var(--r-pill);
  transition: background var(--t-fast), box-shadow var(--t-fast);
}
.nav-cta:hover { background: var(--jade-hover); text-decoration: none; box-shadow: var(--shadow-2); }
.hamburger {
  display: none; background: none; border: 0; cursor: pointer;
  padding: var(--s-2); margin-left: var(--s-1);
}
.hamburger span {
  display: block; width: 22px; height: 1.5px; background: var(--text);
  margin: 6px 0; border-radius: 1px; transition: transform var(--t-med), opacity var(--t-med);
}
.hamburger.active span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* no-JS / pointer fallback: hover and keyboard focus open the panels on desktop */
@media (hover: hover) and (min-width: 1025px) {
  html:not(.js) .nav-item:hover > .nav-panel,
  html:not(.js) .nav-item:focus-within > .nav-panel { opacity: 1; visibility: visible; transform: none; transition-delay: 0.08s; }
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  font-family: var(--font-body); font-size: 0.95rem; font-weight: 550; letter-spacing: -0.01em;
  padding: 0.8rem 1.35rem; border-radius: var(--r-pill);
  border: 1px solid transparent; cursor: pointer; line-height: 1.2;
  transition: background var(--t-fast), border-color var(--t-fast), color var(--t-fast),
              transform var(--t-fast), box-shadow var(--t-fast);
}
.btn:hover { text-decoration: none; }
.btn .btn-icon { font-family: var(--font-body); transition: transform var(--t-fast); }
.btn:hover .btn-icon { transform: translateX(3px); }
.btn-primary, .btn-gold { background: var(--jade); color: #F7FBF6; box-shadow: 0 1px 0 rgba(255,255,255,0.12) inset, 0 1px 2px rgba(18,24,22,0.12); }
.btn-primary:hover, .btn-gold:hover { background: var(--jade-hover); box-shadow: var(--shadow-2); transform: translateY(-1px); }
.btn-ghost { background: rgba(255, 255, 255, 0.55); color: var(--text); border-color: var(--line-strong); }
.btn-ghost:hover { background: var(--surface); border-color: var(--text); }
.btn-full { width: 100%; }

/* ---------- hero ---------- */
.hero {
  position: relative; isolation: isolate;
  padding: calc(var(--nav-h) + clamp(3.5rem, 8vw, 6.5rem)) 0 clamp(3.5rem, 7vw, 5.5rem);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
/* drafting grid, fading out from the top-left */
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 56px 56px;
  background-position: -1px -1px;
  -webkit-mask-image: radial-gradient(ellipse 85% 75% at 20% 0%, #000 25%, transparent 75%);
  mask-image: radial-gradient(ellipse 85% 75% at 20% 0%, #000 25%, transparent 75%);
}
.hero::after {
  content: ""; position: absolute; z-index: -1;
  width: 720px; height: 720px; right: -220px; top: -380px; border-radius: 50%;
  background: radial-gradient(circle, rgba(46, 158, 111, 0.10), transparent 62%);
  pointer-events: none;
}
.hero-noise, .hero-grid-overlay, .orb, #hero-canvas { display: none; }
.hero-content {
  max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter);
  text-align: left;
}
.hero-content > * { max-width: 900px; }
.hero-badge {
  display: block;
  font-family: var(--font-mono); font-size: 0.72rem; font-weight: 500;
  color: var(--sage); letter-spacing: 0.08em; text-transform: uppercase;
  margin-bottom: var(--s-5);
}
.hero-badge a { color: var(--text-2); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line-strong); }
.badge-dot {
  display: inline-block; vertical-align: 1px; margin-right: 10px;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--jade-bright); flex-shrink: 0;
  box-shadow: 0 0 0 0 rgba(46, 158, 111, 0.5);
  animation: pulse 3.2s var(--ease) infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(46, 158, 111, 0.45); }
  60% { box-shadow: 0 0 0 7px rgba(46, 158, 111, 0); }
  100% { box-shadow: 0 0 0 0 rgba(46, 158, 111, 0); }
}
.hero-headline {
  font-family: var(--font-serif); font-weight: 400;
  font-size: clamp(2.5rem, 5.4vw, 4.25rem);
  letter-spacing: -0.018em; line-height: 1.03;
  margin: 0 0 var(--s-5);
  text-wrap: balance;
}
.gradient-text { color: var(--jade); }
:is(h1, h2, .hero-headline, .section-title, .cta-title) .gradient-text { font-style: italic; letter-spacing: -0.01em; }
.hero-subtitle {
  font-size: clamp(1.08rem, 1.5vw, 1.25rem);
  color: var(--text-2); max-width: 44rem;
  margin: 0 0 var(--s-6); line-height: 1.6;
  text-wrap: pretty;
}
.hero-cta-group { display: flex; gap: var(--s-3); flex-wrap: wrap; align-items: center; }
.center .hero-subtitle, .center .section-lede { margin-left: auto; margin-right: auto; }
.center .hero-cta-group { justify-content: center; }
.hero-meta {
  display: flex; flex-wrap: wrap; gap: 6px 18px; margin: var(--s-5) 0 0;
  font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.04em; color: var(--sage);
}
.hero-meta span::before { content: "●"; color: var(--jade-bright); font-size: 0.55rem; margin-right: 8px; vertical-align: 2px; }

/* home hero: copy left, terminal right */
.hero--home { padding-top: calc(var(--nav-h) + clamp(3rem, 7vw, 6rem)); }
.hero--home .hero-headline { font-size: clamp(2.8rem, 5.6vw, 5.1rem); line-height: 1.0; }
.hero-split {
  max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter);
  display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  gap: clamp(2.5rem, 5vw, 4.5rem); align-items: center; text-align: left;
}
.hero-split .hero-subtitle { margin-left: 0; margin-right: 0; }
.hero-split .term { margin: 0; max-width: none; }

/* ---------- terminal (signature island) ---------- */
.term {
  max-width: 720px; margin: 0 auto var(--s-7);
  text-align: left;
  background: var(--pit);
  border: 1px solid var(--pit-2);
  border-radius: var(--r-4);
  box-shadow: var(--shadow-3), 0 0 0 6px rgba(255, 255, 255, 0.5);
  overflow: hidden;
  background-image: radial-gradient(circle at 100% 0%, rgba(124, 203, 166, 0.12), transparent 50%);
}
.term-bar {
  display: flex; align-items: center; gap: 7px;
  padding: 13px var(--s-5);
  border-bottom: 1px solid var(--pit-line);
}
.term-bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--pit-line); font-style: normal; }
.term-bar i:first-child { background: #C4604F; opacity: 0.8; }
.term-bar i:nth-child(2) { background: var(--amber-lit); opacity: 0.8; }
.term-bar i:nth-child(3) { background: var(--jade-lit); opacity: 0.85; }
.term-title {
  margin-left: auto; font-family: var(--font-mono);
  font-size: 0.7rem; color: var(--pit-muted); letter-spacing: 0.04em;
}
.term-body {
  padding: var(--s-5) var(--s-5) var(--s-4);
  font-family: var(--font-mono); font-size: 0.84rem; line-height: 1.8;
  color: var(--pit-muted);
  height: 272px; overflow-y: auto; overflow-x: hidden;
  scrollbar-width: thin; scrollbar-color: var(--pit-line) transparent;
}
.term-body .t-cmd { color: var(--pit-text); font-weight: 500; }
.term-body .t-prompt { color: var(--jade-lit); font-weight: 600; user-select: none; }
.term-body .t-out { color: var(--pit-muted); display: block; white-space: pre-wrap; }
.term-body .t-out b, .term-body .t-out strong { color: var(--pit-text); font-weight: 600; }
.term-body .t-ok { color: var(--jade-lit); }
.term-body .t-num { color: var(--amber-lit); }
.term-body .t-out a { color: var(--jade-lit); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(124, 203, 166, 0.4); }
.term-caret {
  display: inline-block; width: 8px; height: 1.05em;
  background: var(--jade-lit); vertical-align: text-bottom;
  animation: blink 1.1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }
.term-input-row { display: flex; align-items: baseline; gap: var(--s-2); border-radius: var(--r-1); }
.term-input-row:focus-within { box-shadow: 0 0 0 1px rgba(124, 203, 166, 0.55); background: rgba(124, 203, 166, 0.06); }
.term-input {
  flex: 1; background: none; border: 0; outline: none;
  font: inherit; color: var(--pit-text); caret-color: var(--jade-lit);
  min-width: 0; padding: 0;
}
.term-chips {
  display: flex; flex-wrap: wrap; gap: var(--s-2);
  padding: var(--s-3) var(--s-5) var(--s-5);
  border-top: 1px solid var(--pit-line);
}
.term-chip {
  font-family: var(--font-mono); font-size: 0.72rem;
  color: var(--pit-muted); background: var(--pit-2);
  border: 1px solid var(--pit-line); border-radius: var(--r-pill);
  padding: 4px 12px; cursor: pointer;
  transition: color var(--t-fast), border-color var(--t-fast), background var(--t-fast);
}
.term-chip:hover { color: var(--jade-lit); border-color: rgba(124, 203, 166, 0.5); background: var(--pit-3); }

/* ---------- section headers ---------- */
.section-header { max-width: 780px; margin: 0 auto var(--s-8); text-align: center; }
.section-header--left { margin-left: 0; text-align: left; }
.section-label, .kt-label {
  display: inline-flex; align-items: center; gap: var(--s-2);
  font-family: var(--font-mono); font-size: 0.72rem; font-weight: 500;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--sage);
  margin-bottom: var(--s-4);
}
.section-label::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--jade-bright); }
.section-title {
  font-family: var(--font-serif); font-weight: 400;
  font-size: clamp(2rem, 3.7vw, 3.1rem);
  letter-spacing: -0.014em; line-height: 1.06;
  text-wrap: balance; margin-bottom: var(--s-4);
}
.section-lede { color: var(--text-2); font-size: 1.1rem; line-height: 1.6; margin: 0 auto; max-width: 620px; text-wrap: pretty; }
.section-header--left .section-lede { margin-left: 0; }
/* log-line eyebrow (left-aligned sections) */
.log-line {
  display: flex; align-items: center; gap: var(--s-3);
  font-family: var(--font-mono); font-size: 0.72rem; font-weight: 500; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--sage);
  margin-bottom: var(--s-6);
}
.log-line::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--jade-bright); flex-shrink: 0; }
.log-line::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* ---------- grids ---------- */
.services-grid, .card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-5); }
.card-grid--2, .grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.card-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
/* bento: flagship practices in a row of three, specialist tiles in compact rows of three
   (or four with .bento--4); a .bento-sub label can divide the tiers */
.bento { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--s-4); }
.bento > * { grid-column: span 4; }
.bento--4 > :not(.bento-lg):not(.bento-sub) { grid-column: span 3; }
.bento > .bento-sub {
  grid-column: 1 / -1; display: flex; align-items: center; gap: var(--s-3); margin: var(--s-5) 0 var(--s-1);
  font-family: var(--font-mono); font-size: 0.7rem; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: var(--sage);
}
.bento > .bento-sub::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.bento > .service-card:not(.bento-lg) { padding: 1.25rem 1.4rem 1.3rem; }
.bento > .service-card:not(.bento-lg) .service-number { margin-bottom: var(--s-3); }
.bento > .service-card:not(.bento-lg) .service-title { font-size: 1.04rem; margin-bottom: var(--s-2); }
.bento > .service-card:not(.bento-lg) .service-desc { font-size: 0.9rem; margin-bottom: var(--s-3); }
.bento > .service-card:not(.bento-lg) .service-link { font-size: 0.85rem; }
.bento > .bento-lg { padding: clamp(1.6rem, 2.8vw, 2.2rem); }
.bento > .bento-lg.bento-half { grid-column: span 6; }
.bento > .bento-lg .service-title { font-family: var(--font-serif); font-weight: 400; font-size: clamp(1.7rem, 2.4vw, 2.1rem); letter-spacing: -0.01em; line-height: 1.1; }
.bento > .bento-lg .service-desc { font-size: 1rem; max-width: 34rem; }

/* ---------- cards ---------- */
.service-card, .glass {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-3);
  padding: clamp(1.4rem, 2.4vw, 1.9rem);
  box-shadow: var(--shadow-1);
  transition: border-color var(--t-med), transform var(--t-med), box-shadow var(--t-med);
  display: flex; flex-direction: column;
  color: var(--text);
}
a.service-card:hover, a.glass:hover, a.case-card:hover {
  text-decoration: none; transform: translateY(-3px);
  border-color: var(--line-strong); box-shadow: var(--shadow-2);
}
.service-card:hover { border-color: var(--line-strong); }
.service-card.featured { border-color: var(--jade-line); box-shadow: 0 0 0 3px var(--jade-dim), var(--shadow-1); }
.badge-sun {
  position: absolute; top: var(--s-5); right: var(--s-5);
  font-family: var(--font-mono); font-size: 0.62rem; font-weight: 500;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--jade); background: var(--jade-dim);
  border: 1px solid var(--jade-line);
  border-radius: var(--r-pill); padding: 3px 9px;
}
.service-icon { color: var(--jade); margin-bottom: var(--s-4); }
.service-number {
  font-family: var(--font-mono); font-size: 0.7rem; font-weight: 500;
  color: var(--sage); margin-bottom: var(--s-4); letter-spacing: 0.1em; text-transform: uppercase;
}
.service-title {
  font-family: var(--font-body); font-size: 1.14rem; font-weight: 600;
  letter-spacing: -0.018em; line-height: 1.3; margin-bottom: var(--s-3);
}
.service-desc { color: var(--text-2); font-size: 0.97rem; line-height: 1.6; margin: 0 0 var(--s-4); }
.service-features {
  list-style: none; margin: 0 0 var(--s-5); padding: 0;
  font-size: 0.92rem; color: var(--text-2);
}
.service-features li { padding: 9px 0 9px 22px; position: relative; border-top: 1px solid var(--line); }
.service-features li::before {
  content: ""; position: absolute; left: 2px; top: 1.05em;
  width: 9px; height: 5px; border-left: 1.5px solid var(--jade); border-bottom: 1.5px solid var(--jade);
  transform: rotate(-45deg);
}
.service-link {
  margin-top: auto;
  font-size: 0.9rem; font-weight: 550; color: var(--jade); letter-spacing: -0.01em;
}
.service-card:hover .service-link { text-decoration: underline; text-underline-offset: 3px; }

/* case cards: the numeral is the headline */
.case-card {
  display: flex; flex-direction: column; gap: var(--s-2);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-3);
  padding: clamp(1.5rem, 2.6vw, 2.1rem); color: var(--text); box-shadow: var(--shadow-1);
  transition: border-color var(--t-med), transform var(--t-med), box-shadow var(--t-med);
}
.case-meta { font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--sage); }
.case-num {
  font-family: var(--font-serif); font-size: clamp(3rem, 5vw, 4.25rem); line-height: 1;
  letter-spacing: -0.03em; color: var(--jade); margin: var(--s-3) 0 var(--s-1);
}
.case-title { font-family: var(--font-body); font-size: 1.12rem; font-weight: 600; letter-spacing: -0.015em; margin: 0; }
.case-card p { color: var(--text-2); font-size: 0.95rem; margin: 0 0 var(--s-4); }
.case-card .service-link { margin-top: auto; }

/* resource / link tiles */
.link-tile {
  display: flex; flex-direction: column; gap: 4px;
  padding: var(--s-4) var(--s-5); border: 1px solid var(--line); border-radius: var(--r-3);
  background: var(--surface); color: var(--text);
  transition: border-color var(--t-fast), background var(--t-fast);
}
.link-tile:hover { border-color: var(--jade-line); background: var(--surface-2); text-decoration: none; }
.link-tile b { font-size: 0.98rem; font-weight: 600; letter-spacing: -0.012em; }
.link-tile span { font-size: 0.86rem; color: var(--sage); line-height: 1.45; }

/* ---------- blog cards ---------- */
.blog-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-5); }
.blog-grid > .service-card:first-child { grid-column: 1 / -1; padding: clamp(1.8rem, 4vw, 3rem); }
.blog-grid > .service-card:first-child .service-title {
  font-family: var(--font-serif); font-weight: 400; font-size: clamp(1.8rem, 3.2vw, 2.6rem); line-height: 1.08;
  letter-spacing: -0.012em; max-width: 800px;
}
.blog-grid > .service-card:first-child .service-desc { font-size: 1.05rem; max-width: 720px; }
.blog-card-gradient { display: none; }
.blog-card .service-title { font-size: 1.12rem; line-height: 1.32; }
.blog-card.featured {
  padding: clamp(1.75rem, 4vw, 3rem); border-color: var(--line); box-shadow: var(--shadow-2);
  background:
    radial-gradient(ellipse 60% 90% at 100% 0%, rgba(46, 158, 111, 0.08), transparent 60%),
    var(--surface);
}
.blog-card.featured .service-title {
  font-family: var(--font-serif); font-weight: 400; font-size: clamp(1.9rem, 3.4vw, 2.8rem);
  line-height: 1.06; letter-spacing: -0.014em; max-width: 860px;
}
.blog-card.featured .service-desc { font-size: 1.06rem; max-width: 760px; }
.blog-card-category {
  display: inline-block; align-self: flex-start;
  font-family: var(--font-mono); font-size: 0.64rem; font-weight: 500;
  letter-spacing: 0.1em; text-transform: uppercase;
  border: 1px solid var(--line-strong); border-radius: var(--r-pill);
  padding: 3px 10px; margin-bottom: var(--s-4); color: var(--sage);
}
.blog-cat--devops, .blog-cat--platform { color: var(--jade); border-color: var(--jade-line); }
.blog-cat--sre, .blog-cat--k8s { color: var(--amber); border-color: rgba(138, 100, 24, 0.38); }
.blog-cat--cloud { color: var(--text); }
.blog-meta {
  margin-top: auto; padding-top: var(--s-4);
  display: flex; align-items: center; gap: var(--s-2); flex-wrap: wrap;
  font-family: var(--font-mono); font-size: 0.7rem; color: var(--sage); letter-spacing: 0.02em;
}

/* ---------- proof ---------- */
.evidence-row {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  max-width: 1040px; margin: 0 auto var(--s-4);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-3);
  box-shadow: var(--shadow-1);
}
.ev-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 820px; }
.ev-stat { padding: var(--s-6) var(--s-5); text-align: left; border-left: 1px solid var(--line); }
.ev-stat:first-child { border-left: 0; }
.ev-num {
  display: block; font-family: var(--font-serif); font-weight: 400;
  font-size: clamp(2.4rem, 4vw, 3.3rem); line-height: 1; color: var(--text); letter-spacing: -0.02em;
  margin-bottom: var(--s-3); font-variant-numeric: lining-nums;
}
.ev-label { display: block; font-family: var(--font-mono); font-size: 0.7rem; color: var(--sage); letter-spacing: 0.08em; text-transform: uppercase; line-height: 1.4; }
.disclaimer { font-size: 0.82rem; color: var(--sage); text-align: center; max-width: 680px; margin: var(--s-4) auto 0; }

.metric-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-6); max-width: var(--wrap); margin: 0 auto; }
.metric { border-top: 1px solid var(--line-strong); padding: var(--s-5) 0 0; }
.metric b {
  display: block; font-family: var(--font-serif); font-weight: 400;
  font-size: clamp(2.6rem, 4.4vw, 3.6rem); color: var(--amber); letter-spacing: -0.02em; line-height: 1;
  margin-bottom: var(--s-4);
}
.metric span { color: var(--text-2); font-size: 0.98rem; line-height: 1.55; display: block; }
.metric small { display: block; color: var(--sage); font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.03em; margin-top: var(--s-3); }

/* trust */
.trust-strip { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--bg-deep); padding: var(--s-6) 0; }
.trust-items, .trust-row {
  display: flex; flex-wrap: wrap; gap: var(--s-3) var(--s-5);
  justify-content: center; align-items: center;
  font-family: var(--font-mono); font-size: 0.74rem; color: var(--sage); letter-spacing: 0.03em;
}
.trust-row { justify-content: flex-start; }
.trust-items .t-ok { color: var(--jade); }
.trust-badge {
  font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.08em; text-transform: uppercase;
  border: 1px solid var(--line-strong); border-radius: var(--r-pill); background: var(--surface);
  color: var(--text); padding: 6px 12px;
}
.trust-check { display: inline-flex; align-items: center; gap: 8px; }
.trust-check::before {
  content: ""; width: 9px; height: 5px; margin-top: -3px;
  border-left: 1.5px solid var(--jade); border-bottom: 1.5px solid var(--jade); transform: rotate(-45deg);
}
.chip-row { display: flex; flex-wrap: wrap; gap: var(--s-2); justify-content: center; }
.chip-row span, .chip-row a {
  font-family: var(--font-mono); font-size: 0.74rem; color: var(--text-2);
  border: 1px solid var(--line); border-radius: var(--r-pill);
  background: var(--surface); padding: 5px 13px;
}

/* ---------- steps / timeline ---------- */
.timeline { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-6); counter-reset: tl; }
.timeline > li { position: relative; padding-top: var(--s-6); border-top: 1px solid var(--line-strong); }
.timeline > li::before {
  content: ""; position: absolute; top: -5px; left: 0; width: 9px; height: 9px; border-radius: 50%;
  background: var(--bg); border: 1.5px solid var(--jade);
}
.timeline-n { display: block; font-family: var(--font-serif); font-size: 2.6rem; line-height: 1; color: var(--jade); margin-bottom: var(--s-4); }
.timeline h3 { font-size: 1.15rem; margin-bottom: var(--s-2); }
.timeline p { color: var(--text-2); margin: 0 0 var(--s-3); font-size: 0.98rem; }
.timeline.timeline-v { grid-template-columns: 1fr; gap: 0; }
.timeline-v > li { padding: 0 0 var(--s-6) var(--s-6); border-top: 0; border-left: 1px solid var(--line-strong); }
.timeline-v > li:last-child { padding-bottom: 0; border-left-color: transparent; }
.timeline-v > li::before { top: 2px; left: -5px; }
.timeline-v .timeline-n { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.1em; margin-bottom: var(--s-2); line-height: 1.4; }

.steps { max-width: 900px; margin: 0 auto; }
.step { display: grid; grid-template-columns: 96px 1fr; gap: var(--s-6); padding: var(--s-6) 0; border-top: 1px solid var(--line); }
.step:last-child { border-bottom: 1px solid var(--line); }
.step-number { font-family: var(--font-serif); font-size: 2.6rem; line-height: 1; color: var(--jade); }
.step-number::after { content: none; }
.step-content h3 { font-size: 1.15rem; margin-bottom: var(--s-2); }
.step-content p { color: var(--text-2); margin: 0 0 var(--s-2); }
.step-week {
  font-family: var(--font-mono); font-size: 0.74rem; color: var(--sage); letter-spacing: 0.02em;
  display: block; padding-left: var(--s-4); position: relative; margin-top: var(--s-2);
}
.step-week::before { content: "└"; position: absolute; left: 0; color: var(--line-strong); }

/* engagement strips */
.strip-list { max-width: 1000px; margin: 0 auto; border-top: 1px solid var(--line-strong); }
.strip-row {
  display: grid; grid-template-columns: 240px 1fr auto; gap: var(--s-6); align-items: baseline;
  padding: var(--s-5) 0; border-bottom: 1px solid var(--line);
}
.strip-key { font-family: var(--font-serif); font-size: 1.45rem; line-height: 1.15; color: var(--text); }
.strip-val { color: var(--text-2); font-size: 0.98rem; }
.strip-link { font-size: 0.88rem; font-weight: 550; white-space: nowrap; }

/* decision table (services hub) */
.decide { max-width: 900px; margin: 0 auto; border: 1px solid var(--line); border-radius: var(--r-3); background: var(--surface); box-shadow: var(--shadow-1); overflow: hidden; }
.decide table { width: 100%; border-collapse: collapse; font-size: 0.96rem; }
.decide th {
  font-family: var(--font-mono); font-size: 0.68rem; font-weight: 500;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--sage);
  text-align: left; padding: var(--s-4) var(--s-5);
  border-bottom: 1px solid var(--line-strong); background: var(--bg-deep);
}
.decide td { padding: var(--s-4) var(--s-5); border-bottom: 1px solid var(--line); color: var(--text-2); vertical-align: middle; }
.decide tr:last-child td { border-bottom: none; }
.decide tbody tr { transition: background var(--t-fast); }
.decide tbody tr:hover { background: var(--jade-dim); }
.decide td a { font-size: 0.88rem; font-weight: 550; white-space: nowrap; }

/* sticky in-page nav (long landing pages) */
.page-toc {
  position: sticky; top: var(--nav-h); z-index: 90;
  background: rgba(247, 245, 239, 0.92); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
@media (max-height: 599px) { .page-toc { position: static; } }
.page-toc-inner {
  max-width: var(--wrap); margin: 0 auto; padding: var(--s-3) var(--gutter);
  display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-6); align-items: center;
  font-size: 0.86rem;
}
.page-toc-inner b { color: var(--sage); font-family: var(--font-mono); font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; font-size: 0.66rem; }
.page-toc-inner a { color: var(--text-2); }
.page-toc-inner a:hover { color: var(--jade); text-decoration: none; }

/* why-cards */
.why-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s-5); }
.why-card { text-align: left; }
.why-card h3 { font-size: 1.02rem; }
.why-card p { color: var(--text-2); font-size: 0.94rem; margin: 0; }
.why-icon { color: var(--jade); margin-bottom: var(--s-4); }

/* ---------- long-form ---------- */
article { color: var(--text-2); }
.prose-article, .prose {
  max-width: 760px; margin: 0 auto;
  font-size: 1.1rem; line-height: 1.75; color: var(--text-2);
}
.prose-article > p, .prose > p, .prose-article li, .prose li { text-wrap: pretty; }
.prose-article p, .prose p { margin: 0 0 1.35em; }
.prose-article h2, .prose h2 {
  font-family: var(--font-serif); font-weight: 400;
  font-size: clamp(1.85rem, 3vw, 2.35rem); line-height: 1.1; letter-spacing: -0.012em;
  color: var(--text); margin: 2.1em 0 0.6em; text-wrap: balance;
}
.prose-article h3, .prose h3 {
  font-family: var(--font-body); font-weight: 600; font-size: 1.25rem; letter-spacing: -0.018em;
  color: var(--text); margin: 1.8em 0 0.5em; line-height: 1.3;
}
.prose-article h4, .prose h4 { font-size: 1.05rem; margin: 1.5em 0 0.4em; }
.prose-article > h2:first-child, .prose > h2:first-child, .prose-article > .toc + h2 { margin-top: 0.4em; }
.prose-article ul, .prose-article ol, .prose ul, .prose ol { margin: 0 0 1.4em; padding-left: 1.35em; }
.prose-article li, .prose li { margin-bottom: 0.5em; }
.prose-article li::marker, .prose li::marker { color: var(--jade); }
.prose-article ol li::marker, .prose ol li::marker { font-family: var(--font-mono); font-size: 0.85em; }
.prose-article strong, .prose strong { color: var(--text); }
.prose-article blockquote, .prose blockquote {
  margin: 2em 0; padding: 0.2em 0 0.2em 1.4em; border-left: 2px solid var(--jade);
  font-family: var(--font-serif); font-size: 1.45rem; line-height: 1.35; color: var(--text);
}
.prose-article blockquote p, .prose blockquote p { margin-bottom: 0.5em; }
.prose-article hr, .prose hr { margin: 3em 0; }

figure { margin: 2.2em 0; }
figure > svg, figure > img { display: block; width: 100%; height: auto; }
figcaption { font-size: 0.86rem; color: var(--sage); text-align: center; margin-top: var(--s-3); line-height: 1.5; }

/* diagrams ship dark-designed: frame them as instrument panels and pull their
   type into the site's faces (CSS beats SVG presentation attributes) */
svg[role="img"] {
  background: var(--pit);
  border: 1px solid var(--pit-2);
  border-radius: var(--r-3);
  padding: 14px;
  box-shadow: var(--shadow-2);
}
svg[role="img"] > rect[fill="#0f172a"]:first-of-type { fill: var(--pit); }
svg[role="img"] text { font-family: var(--font-body); }
svg[role="img"] text[fill="#48484A"] { fill: var(--pit-muted); }
svg[role="img"] text[fill="#C4604F"] { fill: var(--crit-lit); }
svg[role="img"] text[fill="#8B5CF6"] { fill: #B49BFA; }

/* key takeaways — the summary card */
.key-takeaways {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-3);
  padding: clamp(1.25rem, 2.5vw, 1.75rem) clamp(1.25rem, 3vw, 2rem);
  margin: 2em 0 2.25em; box-shadow: var(--shadow-1);
  position: relative; overflow: hidden;
}
.key-takeaways::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--jade); }
.key-takeaways > p:first-child, .kt-label { color: var(--jade); margin: 0 0 var(--s-3); font-family: var(--font-mono); font-size: 0.72rem; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; }
.key-takeaways ul { margin: 0; padding-left: 1.2em; color: var(--text-2); font-size: 1rem; line-height: 1.65; }
.key-takeaways li { margin-bottom: 0.55em; }
.key-takeaways li:last-child { margin-bottom: 0; }
.key-takeaways li::marker { color: var(--jade); }
section > .container > .key-takeaways:only-child, .container--narrow > .key-takeaways { margin: 0; }

.callout {
  border-left: 3px solid var(--jade); background: var(--jade-dim);
  padding: 1.15rem 1.5rem 1.25rem; margin: 2em 0 2.25em; border-radius: 0 var(--r-3) var(--r-3) 0;
  color: var(--text-2);
}
.callout--amber { border-left-color: var(--amber); background: rgba(138, 100, 24, 0.07); }
.callout > :last-child { margin-bottom: 0; }
.callout p { margin: 0 0 0.75em; }
.calc .callout { margin: var(--s-4) 0 0; }

/* tables: framed, mono heads, quiet rows */
.tbl-scroll {
  overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%;
  border: 1px solid var(--line); border-radius: var(--r-3); background: var(--surface);
  margin: 1.5em 0 2em; box-shadow: var(--shadow-1);
}
.tbl-scroll + .tbl-scroll { margin-top: var(--s-5); }
main table { width: 100%; border-collapse: collapse; font-size: 0.95rem; line-height: 1.5; color: var(--text-2); }
.tbl-scroll > table { margin: 0; }
main th {
  text-align: left; vertical-align: bottom;
  font-family: var(--font-mono); font-size: 0.68rem; font-weight: 500;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--sage);
  background: var(--bg-deep); padding: 0.8rem 1rem;
  border-bottom: 1px solid var(--line-strong);
}
main td { padding: 0.8rem 1rem; border-bottom: 1px solid var(--line); vertical-align: top; }
main tbody tr:last-child td { border-bottom: 0; }
main tbody tr:hover td { background: var(--wash-1); }
main td:first-child, main tbody th { color: var(--text); font-weight: 500; }
main tbody th { background: none; font-family: var(--font-body); font-size: 0.95rem; letter-spacing: -0.01em; text-transform: none; border-bottom: 1px solid var(--line); vertical-align: top; }
main caption { caption-side: top; text-align: left; color: var(--sage); font-size: 0.85rem; padding: 0.9rem 1rem 0.2rem; }
main tfoot td { font-weight: 600; color: var(--text); background: var(--band); }

/* FAQ — quiet accordion */
.faq { max-width: 760px; margin: 0 auto; }
main details:not(.toc-d) {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-3);
  padding: 0; margin-bottom: 10px; transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
main details:not(.toc-d)[open] { border-color: var(--line-strong); box-shadow: var(--shadow-1); }
main details:not(.toc-d) > summary {
  cursor: pointer; list-style: none; position: relative;
  padding: 1.05rem 3.25rem 1.05rem 1.35rem;
  font-weight: 600; color: var(--text); font-size: 1.02rem; letter-spacing: -0.015em; line-height: 1.45;
}
main details:not(.toc-d) > summary::-webkit-details-marker { display: none; }
main details:not(.toc-d) > summary::after {
  content: ""; position: absolute; right: 1.35rem; top: 1.45rem;
  width: 8px; height: 8px; border-right: 1.5px solid var(--sage); border-bottom: 1.5px solid var(--sage);
  transform: rotate(45deg); transition: transform var(--t-fast);
}
main details:not(.toc-d)[open] > summary::after { transform: translateY(3px) rotate(225deg); }
main details:not(.toc-d) > summary:hover { color: var(--jade); }
main details:not(.toc-d) > :not(summary) { margin: 0 1.35rem; color: var(--text-2); line-height: 1.7; }
main details:not(.toc-d) > :not(summary):last-child { margin-bottom: 1.2rem; }
main details:not(.toc-d) > p + p { margin-top: 0.8em; }

/* FAQ wrappers from the legacy templates carry their own heading */
.faq > h2 {
  font-family: var(--font-serif); font-weight: 400; font-size: clamp(1.9rem, 3.2vw, 2.6rem);
  line-height: 1.08; letter-spacing: -0.012em; margin: 0 0 var(--s-6); text-wrap: balance;
}
.faq > p { color: var(--text-2); }

/* first-column row labels written as <td> */
main td.row-key { color: var(--text); font-weight: 600; }
td .muted, th .muted { display: block; font-size: 0.84rem; font-weight: 400; margin-top: 2px; }

/* arrow list (legacy walkthroughs) */
ul.arrow-list { list-style: none; padding: 0; margin: 0 0 1.25rem; }
.arrow-list > li { position: relative; padding: 0 0 0.85rem 1.75rem; }
.arrow-list > li:last-child { padding-bottom: 0; }
.arrow-list > li > span:first-child { position: absolute; left: 0; color: var(--jade); }

/* "InfraZen Engineering" author card at the end of posts (no named people) */
.author-card {
  border: 1px solid var(--line); border-radius: var(--r-3); background: var(--surface);
  padding: clamp(1.25rem, 3vw, 1.75rem); box-shadow: var(--shadow-1); max-width: 720px; margin: 0 auto;
}
.author-card p { color: var(--text-2); line-height: 1.7; font-size: 0.96rem; margin: 0 0 var(--s-4); }
.author-head { display: flex; align-items: center; gap: var(--s-4); margin-bottom: var(--s-4); }
.author-avatar {
  width: 46px; height: 46px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--pit); color: var(--jade-lit);
  font-family: var(--font-serif); font-size: 1.15rem; letter-spacing: 0.02em;
}
.author-name { font-weight: 600; font-size: 1.02rem; color: var(--text); letter-spacing: -0.015em; }
.author-role { color: var(--sage); font-size: 0.85rem; }
.author-links { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-5); font-size: 0.9rem; }
.author-links a { text-decoration: none; font-weight: 550; }
.author-links a:hover { text-decoration: underline; }

/* callout details */
.callout--amber strong { color: var(--text); }
.callout .muted { font-size: 0.94rem; }

/* legacy CTA sections put buttons side by side without a group wrapper */
section.contact .btn:not(:last-child) { margin-right: var(--s-3); }
section.contact .btn { margin-bottom: var(--s-2); }
.hero .meta-line, section.contact .meta-line { margin-top: var(--s-4); }
p.muted { font-size: 0.95rem; }

/* calculator no-JS fallback intro */
.calc [data-calc-static] > p { margin: 0 0 var(--s-4); color: var(--text-2); }

/* one-pager uses h2 inside steps for heading order */
.step-content h2 { font-family: var(--font-body); font-weight: 600; font-size: 1.15rem; letter-spacing: -0.015em; margin-bottom: var(--s-2); }

/* table of contents (injected by build.mjs into long articles) */
.toc { margin: 0 0 2.25em; }
.toc-d { border: 1px solid var(--line); border-radius: var(--r-3); background: var(--surface); }
.toc-d > summary {
  cursor: pointer; list-style: none; padding: 0.85rem 1.1rem;
  font-family: var(--font-mono); font-size: 0.7rem; font-weight: 500; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--sage); display: flex; justify-content: space-between; align-items: center;
}
.toc-d > summary::-webkit-details-marker { display: none; }
.toc-d > summary::after { content: "+"; font-size: 1rem; color: var(--jade); }
.toc-d[open] > summary::after { content: "−"; }
.toc ol { list-style: none; margin: 0; padding: 0 1.1rem 1rem; counter-reset: toc; }
.toc li { counter-increment: toc; margin: 0; }
.toc a {
  display: grid; grid-template-columns: 1.9em 1fr; gap: 2px;
  padding: 5px 0; font-size: 0.9rem; line-height: 1.4; color: var(--text-2);
  text-decoration: none; border-radius: var(--r-1);
}
.toc a::before { content: counter(toc, decimal-leading-zero); font-family: var(--font-mono); font-size: 0.72rem; color: var(--sage); padding-top: 2px; }
.toc a:hover { color: var(--jade); }
.toc a:focus-visible { outline-offset: -2px; }
.toc a.active { color: var(--text); font-weight: 600; }
.toc a.active::before { color: var(--jade); }

@media (min-width: 1280px) {
  .container--narrow:has(> .prose-article > .toc) { max-width: var(--wrap); }
  .prose-article:has(> .toc) { position: relative; max-width: 720px; margin-left: calc(50% - 360px + 124px); }
  .prose-article > .toc { position: absolute; top: 0; bottom: 0; right: calc(100% + 52px); width: 212px; margin: 0; }
  .prose-article > .toc > .toc-d { position: sticky; top: calc(var(--nav-h) + 28px); border: 0; background: none; max-height: calc(100vh - var(--nav-h) - 56px); overflow-y: auto; }
  .prose-article > .toc > .toc-d > summary { padding: 0 0 0.75rem; cursor: default; pointer-events: none; border-bottom: 1px solid var(--line); margin-bottom: 0.6rem; }
  .prose-article > .toc > .toc-d > summary::after { content: none; }
  .prose-article > .toc ol { padding: 0; }
  .prose-article > .toc a { font-size: 0.84rem; }
  .prose-article > .toc + h2 { margin-top: 0; }
}

/* ---------- CTA band (the page's one dark panel) ---------- */
.cta-band { padding: var(--section-y) 0; }
.cta-panel,
main > section.contact:last-child:not(:has(form, .contact-grid)) > .container {
  position: relative; overflow: hidden; isolation: isolate;
  background: var(--pit); color: var(--pit-text);
  border-radius: var(--r-4); text-align: center;
  padding: clamp(3rem, 7vw, 5.5rem) clamp(1.5rem, 5vw, 4rem);
  box-shadow: var(--shadow-3);
}
.cta-panel::before,
main > section.contact:last-child:not(:has(form, .contact-grid)) > .container::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background-image:
    radial-gradient(ellipse 60% 70% at 50% 0%, rgba(124, 203, 166, 0.16), transparent 70%),
    linear-gradient(rgba(238, 240, 234, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(238, 240, 234, 0.045) 1px, transparent 1px);
  background-size: auto, 44px 44px, 44px 44px;
  -webkit-mask-image: linear-gradient(to bottom, #000, rgba(0,0,0,0.35));
  mask-image: linear-gradient(to bottom, #000, rgba(0,0,0,0.35));
}
main > section.contact:last-child:not(:has(form, .contact-grid)) { padding: var(--section-y) 0; }
main > section.contact:last-child:not(:has(form, .contact-grid)) > .container { max-width: calc(var(--wrap) - 2 * var(--gutter)); margin: 0 var(--gutter); }
@media (min-width: 1264px) { main > section.contact:last-child:not(:has(form, .contact-grid)) > .container { margin: 0 auto; } }
.cta-prompt { font-family: var(--font-mono); font-size: 0.8rem; color: var(--pit-muted); margin: 0 0 var(--s-5); letter-spacing: 0.02em; }
.cta-prompt span { color: var(--jade-lit); margin-right: 6px; }
.cta-title,
main > section.contact:last-child:not(:has(form, .contact-grid)) .section-title {
  font-family: var(--font-serif); font-weight: 400; color: var(--pit-text);
  font-size: clamp(2.2rem, 4.6vw, 3.6rem); line-height: 1.04; letter-spacing: -0.015em;
  max-width: 820px; margin: 0 auto var(--s-4); text-wrap: balance;
}
.cta-panel .gradient-text,
main > section.contact:last-child:not(:has(form, .contact-grid)) .gradient-text { color: var(--jade-lit); }
.cta-sub,
main > section.contact:last-child:not(:has(form, .contact-grid)) :is(.hero-subtitle, p) {
  color: var(--pit-muted); font-size: 1.1rem; max-width: 600px; margin: 0 auto var(--s-6); line-height: 1.6;
}
main > section.contact:last-child:not(:has(form, .contact-grid)) .section-label { color: var(--pit-muted); }
main > section.contact:last-child:not(:has(form, .contact-grid)) .section-header { margin-bottom: var(--s-5); }
.cta-panel .hero-cta-group,
main > section.contact:last-child:not(:has(form, .contact-grid)) .hero-cta-group { justify-content: center; }
.cta-panel .btn-primary,
main > section.contact:last-child:not(:has(form, .contact-grid)) :is(.btn-primary, .btn-gold) { background: var(--jade-lit); color: var(--pit); box-shadow: none; }
.cta-panel .btn-primary:hover,
main > section.contact:last-child:not(:has(form, .contact-grid)) :is(.btn-primary, .btn-gold):hover { background: #97D8B9; }
.cta-panel .btn-ghost,
main > section.contact:last-child:not(:has(form, .contact-grid)) .btn-ghost { background: transparent; color: var(--pit-text); border-color: rgba(238, 240, 234, 0.28); }
.cta-panel .btn-ghost:hover,
main > section.contact:last-child:not(:has(form, .contact-grid)) .btn-ghost:hover { border-color: var(--pit-text); background: rgba(238, 240, 234, 0.06); }
main > section.contact:last-child:not(:has(form, .contact-grid)) a:not(.btn) { color: var(--jade-lit); }

/* ---------- contact / forms ---------- */
.contact-grid { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(2rem, 5vw, 4.5rem); max-width: 1080px; margin: 0 auto; align-items: start; }
.contact-info { display: flex; flex-direction: column; gap: var(--s-4); }
.contact-item { display: flex; align-items: center; gap: var(--s-3); color: var(--text-2); font-size: 0.98rem; }
.contact-item svg { color: var(--sage); flex-shrink: 0; }
.trust-signals { margin-top: var(--s-4); padding-top: var(--s-5); border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: var(--s-3); }
.trust-item { display: flex; align-items: center; gap: var(--s-3); font-size: 0.9rem; color: var(--text-2); }
.trust-item svg { color: var(--jade); flex-shrink: 0; }

.contact-form { padding: clamp(1.5rem, 3vw, 2.25rem); border-radius: var(--r-4); box-shadow: var(--shadow-2); }
@media (min-width: 769px) {
  .contact-grid > .contact-form, .contact-grid > :last-child:has(form) { position: sticky; top: calc(var(--nav-h) + 24px); }
}
.form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-4); }
.form-group { margin-bottom: var(--s-4); display: flex; flex-direction: column; }
.form-group label {
  font-size: 0.84rem; font-weight: 550; color: var(--text); letter-spacing: -0.01em;
  margin-bottom: 6px;
}
.req { color: var(--crit); margin-left: 2px; }
.form-legend { font-size: 0.82rem; color: var(--sage); margin: 0 0 var(--s-4); }
.form-group input, .form-group select, .form-group textarea, .calc input, .calc select {
  background: var(--surface); color: var(--text);
  border: 1px solid #8A938E; border-radius: var(--r-2);
  font: inherit; font-size: 0.97rem;
  padding: 0.72rem 0.9rem; width: 100%; min-width: 0;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus, .calc input:focus, .calc select:focus {
  outline: none; border-color: var(--jade); box-shadow: 0 0 0 4px var(--jade-dim);
}
.form-group input::placeholder, .form-group textarea::placeholder { color: var(--sage); opacity: 1; }
.form-privacy { font-size: 0.82rem; color: var(--sage); margin: var(--s-4) 0 0; }
.form-note {
  border: 1px solid var(--line-strong); border-left: 3px solid var(--amber);
  border-radius: var(--r-2); background: var(--bg-deep);
  padding: var(--s-4) var(--s-5); margin-top: var(--s-4);
  font-size: 0.92rem; color: var(--text-2);
}
.hp-field { position: absolute; left: -9999px; opacity: 0; }

/* ---------- calculator ---------- */
.calc {
  max-width: 900px; margin: 0 auto;
  border: 1px solid var(--line); border-radius: var(--r-4);
  background: var(--surface); box-shadow: var(--shadow-2); overflow: hidden;
}
.calc-head {
  display: flex; align-items: center; gap: var(--s-2);
  font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.12em;
  color: var(--sage); text-transform: uppercase;
  background: var(--band); border-bottom: 1px solid var(--line);
  padding: var(--s-4) var(--s-6);
}
.calc-head::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--jade-bright); }
.calc-body { padding: clamp(1.25rem, 3vw, 2rem); }
.calc-inputs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-4); margin-bottom: var(--s-5); }
.calc label { font-size: 0.84rem; font-weight: 550; color: var(--text); }
.calc-out {
  border: 1px solid var(--pit-2); border-radius: var(--r-3);
  background: var(--pit); padding: var(--s-5) var(--s-6);
  margin-bottom: var(--s-4); color: var(--pit-muted);
  background-image: radial-gradient(circle at 100% 0%, rgba(124, 203, 166, 0.12), transparent 55%);
}
.calc-out-row {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: var(--s-4); padding: var(--s-2) 0;
  font-size: 0.95rem; color: var(--pit-muted);
  flex-wrap: wrap;
}
.calc-out-row b {
  font-family: var(--font-serif); font-weight: 400; font-size: 1.9rem; line-height: 1.1;
  color: var(--amber-lit); letter-spacing: -0.01em;
}
.calc-out-row.total { border-top: 1px solid var(--pit-line); margin-top: var(--s-2); padding-top: var(--s-3); }
.calc-out-row.total b { color: var(--jade-lit); }
.calc-out a { color: var(--jade-lit); }
.calc-fine { font-size: 0.82rem; color: var(--sage); margin: var(--s-3) 0 0; }
.calc details { border: none; padding: var(--s-3) 0 0; background: none; box-shadow: none; }
main .calc details:not(.toc-d) { background: none; border: 0; box-shadow: none; margin: 0; }
main .calc details:not(.toc-d) > summary { padding: 0; font-size: 0.86rem; color: var(--jade); font-weight: 550; }
main .calc details:not(.toc-d) > summary::after { content: none; }
main .calc details:not(.toc-d) > :not(summary) { margin: var(--s-3) 0 0; }
.calc-cta { text-align: center; margin-top: var(--s-5); }

/* ---------- breadcrumb ---------- */
.crumbs {
  font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.03em;
  color: var(--sage); margin-bottom: var(--s-5);
}
.crumbs a { color: var(--sage); text-decoration: none; }
.crumbs a:hover { color: var(--jade); }
.crumbs .sep { color: var(--sage); padding: 0 var(--s-2); opacity: 0.7; }
.crumbs [aria-current] { color: var(--text-2); }

/* ---------- footer ---------- */
.footer {
  background: var(--pit); color: var(--pit-muted);
  padding: clamp(3.5rem, 7vw, 5.5rem) 0 var(--s-6);
  margin-top: 0; position: relative; overflow: hidden;
}
.footer::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(124, 203, 166, 0.45), transparent);
}
.footer .logo-word { color: var(--pit-text); }
.footer .logo-word b { color: var(--jade-lit); }
.footer-grid {
  display: grid; grid-template-columns: 1.4fr repeat(4, minmax(0, 1fr)); gap: var(--s-6);
  margin-bottom: var(--s-7);
}
.footer-tagline { color: var(--pit-muted); font-size: 0.92rem; margin: var(--s-4) 0 0; max-width: 300px; line-height: 1.6; }
.footer-partners { font-family: var(--font-mono); font-size: 0.68rem; color: var(--pit-muted); letter-spacing: 0.08em; margin-top: var(--s-4); text-transform: uppercase; }
.footer-col .footer-col-h {
  font-family: var(--font-mono); font-size: 0.68rem; font-weight: 500;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--pit-muted);
  margin: 0 0 var(--s-4);
}
.footer-col .footer-col-h + ul + .footer-col-h, .footer-col ul + .footer-col-h { margin-top: var(--s-6); }
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin-bottom: 10px; line-height: 1.35; }
.footer-col a { color: rgba(238, 240, 234, 0.86); font-size: 0.9rem; }
.footer-col a:hover { color: var(--jade-lit); text-decoration: none; }
.footer-bottom {
  border-top: 1px solid var(--pit-line); padding-top: var(--s-5);
  display: flex; justify-content: space-between; align-items: center; gap: var(--s-4);
  flex-wrap: wrap; font-size: 0.84rem; color: var(--pit-muted);
}
.footer-bottom p { margin: 0; }
.footer-bottom a { color: var(--pit-muted); }
.footer-bottom a:hover { color: var(--pit-text); }
.footer-social a { color: var(--pit-muted); display: inline-flex; }
.footer-social a:hover { color: var(--jade-lit); }
.footer-status { font-family: var(--font-mono); font-size: 0.72rem; color: var(--pit-muted); display: inline-flex; align-items: center; gap: var(--s-2); }
.footer-status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--jade-lit); }

/* ---------- utilities ---------- */
.back-to-top {
  position: fixed; right: var(--s-5); bottom: var(--s-5); z-index: 90;
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--surface); color: var(--text);
  border: 1px solid var(--line-strong); box-shadow: var(--shadow-2); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transform: translateY(6px);
  transition: opacity var(--t-med), transform var(--t-med), border-color var(--t-fast);
}
.back-to-top.visible { opacity: 1; pointer-events: auto; transform: none; }
.back-to-top:hover { border-color: var(--jade); color: var(--jade); }

.reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.6s var(--ease), transform 0.6s var(--ease); }
.reveal.visible { opacity: 1; transform: none; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .footer-grid { grid-template-columns: 1fr 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 1024px) {
  .services-grid, .card-grid, .blog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card-grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bento > *, .bento--4 > :not(.bento-lg):not(.bento-sub) { grid-column: span 6; }
  .bento > .bento-lg { grid-column: 1 / -1; }
  .why-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .evidence-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .evidence-row.ev-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .evidence-row > .ev-stat:nth-child(3) { border-left: 0; }
  .evidence-row > .ev-stat:nth-child(n+3) { border-top: 1px solid var(--line); }
  .evidence-row.ev-3 > .ev-stat:nth-child(3) { border-left: 1px solid var(--line); border-top: 0; }
  .hero-split { grid-template-columns: 1fr; }
  .hero-split .term { max-width: 640px; }
  .timeline { grid-template-columns: 1fr; gap: var(--s-5); }
  .strip-row { grid-template-columns: 200px 1fr auto; }

  /* mobile menu: full-screen sheet, panels become accordions */
  .hamburger { display: block; z-index: 102; }
  .nav-logo, .nav-cta { position: relative; z-index: 102; }
  .nav-cta { margin-left: auto; }
  .nav-links {
    position: fixed; inset: 0; z-index: 101; height: auto;
    background: var(--bg);
    flex-direction: column; align-items: stretch; gap: 0;
    padding: calc(var(--nav-h) + var(--s-4)) var(--gutter) var(--s-7);
    overflow-y: auto; overscroll-behavior: contain;
    opacity: 0; pointer-events: none; transition: opacity var(--t-med);
  }
  .nav-links.is-closed { display: none; }
  .nav-links.active { opacity: 1; pointer-events: auto; }
  .nav-item { display: block; border-bottom: 1px solid var(--line); }
  .nav-links > .nav-link { border-bottom: 1px solid var(--line); border-radius: 0; }
  .nav-link, .nav-trigger {
    width: 100%; justify-content: space-between;
    font-family: var(--font-serif); font-weight: 400; font-size: 1.75rem; letter-spacing: -0.01em;
    padding: 14px 0; border-radius: 0; color: var(--text);
  }
  .nav-link:hover, .nav-trigger:hover, .nav-item.open > .nav-trigger { background: none; }
  .nav-trigger::after { width: 9px; height: 9px; }
  .nav-panel {
    position: static; opacity: 1; visibility: visible; transform: none;
    box-shadow: none; border: 0; background: none; display: none;
  }
  .nav-item.open > .nav-panel { display: block; }
  .nav-panel-inner, .nav-panel-inner.cols-2 { grid-template-columns: 1fr; gap: var(--s-4); padding: 0 0 var(--s-5); }
  .nav-feature { display: none; }
  .navbar.menu-open::before { background: var(--bg); }
}
@media (max-width: 768px) {
  body { font-size: 1rem; }
  .form-group :is(input, select, textarea), .calc :is(input, select), .term-input { font-size: 16px; }
  .services-grid, .card-grid, .card-grid--2, .grid-2, .blog-grid, .metric-row, .calc-inputs, .contact-grid, .form-row { grid-template-columns: 1fr; }
  .bento > *, .bento--4 > :not(.bento-lg):not(.bento-sub) { grid-column: 1 / -1; }
  .metric-row { gap: var(--s-5); }
  .step { grid-template-columns: 64px 1fr; gap: var(--s-4); }
  .term-body { font-size: 0.74rem; height: 240px; padding-left: var(--s-4); padding-right: var(--s-4); }
  .section-header { margin-bottom: var(--s-7); }
  .strip-row { grid-template-columns: 1fr; gap: var(--s-2); }
  .prose-article, .prose { font-size: 1.04rem; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .decide { overflow-x: auto; }
}
@media (max-width: 520px) {
  .evidence-row, .evidence-row.ev-3 { grid-template-columns: 1fr 1fr; }
  .evidence-row.ev-3 > .ev-stat:nth-child(3) { border-left: 0; border-top: 1px solid var(--line); grid-column: 1 / -1; }
  .why-grid, .card-grid--4 { grid-template-columns: 1fr; }
  .hero-cta-group .btn { width: 100%; }
  .nav-cta { font-size: 0.82rem; padding: 7px 13px; }
  .nav-container { gap: var(--s-3); }
  .ev-stat { padding: var(--s-5) var(--s-4); }
}
@media (max-width: 400px) {
  .footer-grid { grid-template-columns: 1fr; }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- print ---------- */
@media print {
  body { background: #fff !important; color: #000 !important; }
  .navbar, .footer, .back-to-top, .term-chips, .term-input-row, .hero-cta-group,
  .nav-cta, .calc, .skip-link, .toc, .cta-band { display: none !important; }
  .hero { padding: 1rem 0; border: 0; }
  .hero::before, .hero::after { display: none; }
  a { color: var(--jade) !important; text-decoration: underline; }
  .service-card, .glass, .case-card, details { break-inside: avoid; }
  .reveal { opacity: 1 !important; transform: none !important; }
  main details > :not(summary) { display: block !important; }
}
