/* Videalt — shared stylesheet (Light & Airy Modern Tech design system) */

/* ---------- fonts (IBM Plex, SIL OFL 1.1 — see /fonts/OFL.txt) ---------- */
@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/ibm-plex-sans-latin-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/ibm-plex-sans-latin-600-normal.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/ibm-plex-sans-latin-700-normal.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2");
}

:root {
  --bg: #ffffff;
  --surface: #f7f8fb;
  --surface-2: #f1f4f9;
  --ink: #0c1524;
  --body: #38485c;
  --muted: #627286;
  --border: rgba(12, 21, 36, 0.08);
  --border-strong: rgba(12, 21, 36, 0.15);
  --accent: #2563eb;
  --accent-dark: #1d4ed8;
  --accent-mid: #3f7ddb;
  --accent-light: #a6c8f4;
  --accent-soft: #eff4ff;
  /* Brand blue lifted for small text on obsidian: 6.7:1 there, where
     --accent is only 3.5:1. Section labels use it on every dark surface. */
  --accent-on-dark: #6b9cf6;
  --teal: #14b8a6;
  --teal-bright: #5ed0c0;
  --obsidian: #0d1626;
  --obsidian-2: #152238;
  --on-dark: #e2ecf8;
  --on-dark-muted: #b4c3d6;
  --dark-line: rgba(166, 200, 244, 0.14);
  --radius-pill: 999px;
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --maxw: 1180px;
  --header-h: 70px;
  --shadow-xs: 0 1px 2px rgba(12, 21, 36, 0.04);
  --shadow-sm: 0 1px 2px rgba(12, 21, 36, 0.04), 0 6px 20px -8px rgba(12, 21, 36, 0.07);
  --shadow-md: 0 2px 4px rgba(12, 21, 36, 0.04), 0 16px 36px -14px rgba(12, 21, 36, 0.12);
  --shadow-stage: 0 1px 2px rgba(12, 21, 36, 0.05), 0 24px 56px -22px rgba(12, 21, 36, 0.18);
  --font-sans: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 1.25rem);
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; }
}

body {
  font-family: var(--font-sans);
  color: var(--body);
  background: var(--bg);
  line-height: 1.65;
  font-size: 16.5px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
::selection { background: rgba(37, 99, 235, 0.18); }

.container {
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: 1.5rem;
}

h1, h2, h3 {
  color: var(--ink);
  letter-spacing: -0.028em;
  line-height: 1.15;
  text-wrap: balance;
}
h1 {
  font-size: clamp(2.3rem, 4.4vw, 3.65rem);
  font-weight: 700;
  line-height: 1.07;
  letter-spacing: -0.036em;
}
h2 {
  font-size: clamp(1.65rem, 3vw, 2.35rem);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.03em;
  margin-block-end: 0.9rem;
}
h3 {
  font-size: 1.18rem;
  font-weight: 600;
  line-height: 1.28;
  margin-block-end: 0.5rem;
}

p { margin-block-end: 1rem; text-wrap: pretty; }
a { color: var(--accent); text-underline-offset: 0.18em; }
a:hover { color: var(--accent-dark); }
a:focus-visible, button:focus-visible, summary:focus-visible, [tabindex]:focus-visible {
  outline: 2.5px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}
code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.1em 0.38em;
}

.skip-link {
  position: fixed;
  top: 0.6rem;
  left: 0.6rem;
  z-index: 200;
  transform: translateY(-160%);
  background: var(--bg);
  color: var(--ink);
  border: 2px solid var(--accent);
  border-radius: var(--radius-pill);
  padding: 0.5rem 0.95rem;
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus { transform: translateY(0); }

/* ---------- logo ---------- */
.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--ink);
  text-decoration: none;
}
.logo-mark { flex: none; }
.logo-mark rect { fill: var(--obsidian); }
/* The Fold mark: two halves of a V in two blues. */
.logo-mark .fold-a { fill: var(--accent-light); }
.logo-mark .fold-b { fill: var(--accent-mid); }
.logo-word {
  font-size: 1.42rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1;
}

/* ---------- airy frosted header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.84);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-block-end: 1px solid var(--border);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  block-size: var(--header-h);
}
.site-header .logo:hover { color: var(--ink); }
.main-nav { display: flex; align-items: center; gap: 0.2rem; }
.main-nav a {
  color: var(--body);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 600;
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius-pill);
  transition: background-color 0.16s ease, color 0.16s ease;
}
.main-nav a:hover {
  color: var(--ink);
  background: var(--surface);
}
.main-nav a[aria-current] {
  color: var(--accent-dark);
  background: var(--accent-soft);
}
.main-nav a.btn,
.main-nav a.btn[aria-current] {
  background: var(--obsidian);
  color: #fff;
  border-color: var(--obsidian);
  border-radius: var(--radius-pill);
  padding: 0.52rem 1.2rem;
  margin-inline-start: 0.65rem;
  box-shadow: var(--shadow-xs);
}
.main-nav a.btn:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  transform: none;
}
.nav-toggle {
  display: none;
  background: none;
  border: 0;
  color: var(--ink);
  padding: 0.4rem;
  border-radius: 10px;
  cursor: pointer;
}
.nav-toggle:hover { background: var(--surface); }

/* ---------- modern pill buttons ---------- */
/* Primary buttons carry the Videalt brand blue (white text 5.2:1, AA). The
   header Contact pill stays obsidian, so each view has one blue action. */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  background: var(--accent);
  color: #fff;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.3;
  text-decoration: none;
  padding: 0.82rem 1.55rem;
  border: 1px solid var(--accent);
  border-radius: var(--radius-pill);
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(12, 21, 36, 0.14), 0 8px 20px -8px rgba(37, 99, 235, 0.55);
  transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}
.btn:hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(12, 21, 36, 0.16), 0 12px 26px -10px rgba(37, 99, 235, 0.6);
}
.btn:active { transform: translateY(0); }
.btn .btn-arrow {
  display: inline-block;
  transition: transform 0.18s ease;
}
.btn:hover .btn-arrow { transform: translateX(3px); }

.btn.ghost {
  background: var(--bg);
  color: var(--ink);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-xs);
}
.btn.ghost:hover {
  background: var(--surface);
  border-color: rgba(12, 21, 36, 0.28);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}

.cta-row {
  display: flex;
  gap: 0.85rem;
  flex-wrap: wrap;
  align-items: center;
}

/* ---------- quiet modern eyebrows & kickers ---------- */
.eyebrow,
.kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-block-end: 0.9rem;
}
.eyebrow-pill,
.page-hero .kicker,
.error-page .kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.34rem 0.85rem;
  border-radius: var(--radius-pill);
  background: var(--bg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-xs);
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  color: var(--body);
  margin-block-end: 1.35rem;
}
.eyebrow-dot,
.page-hero .kicker::before,
.error-page .kicker::before {
  content: "";
  flex: none;
  inline-size: 7px;
  block-size: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
}
/* On narrow phones the full hero label wraps to two lines inside the pill.
   Drop the "· ASIC & FPGA" suffix there; the facts strip below repeats it. */
@media (max-width: 25em) {
  .eyebrow-pill-extra { display: none; }
}

/* ---------- spacious sections ---------- */
.section { padding-block: 5.5rem; }
.section.soft,
.section.alt {
  background: var(--surface);
  border-block: 1px solid var(--border);
}
.section-head {
  max-width: 60ch;
  margin-block-end: 3.1rem;
}
.section-intro {
  max-width: 62ch;
  color: var(--muted);
  font-size: 1.07rem;
  line-height: 1.65;
  margin-block-end: 2.5rem;
}
.section-head .section-intro { margin-block-end: 0; }
.section-more {
  margin-block: 2.1rem 0;
  font-weight: 600;
}
.section-more a { text-decoration: none; }
.section-more a:hover { text-decoration: underline; }

/* CTA-only section spacing above the light footer */
.section:has(> .container > .cta-band:only-child) {
  padding-block: 0 5.5rem;
}
.section.alt + .section:has(> .container > .cta-band:only-child),
.section.soft + .section:has(> .container > .cta-band:only-child) {
  padding-block: 5.5rem;
}

/* ---------- light & airy homepage hero ---------- */
.proto-hero {
  position: relative;
  isolation: isolate;
  overflow: clip;
  background:
    radial-gradient(760px 480px at 78% 42%, rgba(37, 99, 235, 0.065), transparent 68%),
    radial-gradient(520px 380px at 14% 12%, rgba(20, 184, 166, 0.045), transparent 64%),
    linear-gradient(180deg, #fafbfd 0%, #ffffff 100%);
  padding-block: 4.75rem 4.5rem;
}
.proto-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: radial-gradient(rgba(12, 21, 36, 0.11) 1px, transparent 1px);
  background-size: 24px 24px;
  -webkit-mask-image: radial-gradient(ellipse 52% 80% at 75% 48%, #000 18%, transparent 74%);
  mask-image: radial-gradient(ellipse 52% 80% at 75% 48%, #000 18%, transparent 74%);
  pointer-events: none;
}
.proto-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2.5rem;
  align-items: center;
}
.proto-hero h1 {
  max-width: 18ch;
  margin-block-end: 1.35rem;
}
.proto-hero h1 em {
  font-style: normal;
  color: var(--accent);
}
.proto-hero .lede {
  font-size: 1.14rem;
  line-height: 1.62;
  color: var(--body);
  max-width: 48ch;
  margin-block-end: 2.1rem;
}

/* Open-canvas C++ -> Silicon IC animation */
.proto-hero-visual {
  display: none;
  position: relative;
  block-size: 368px;
  place-items: center;
  pointer-events: none;
  user-select: none;
}
@media (min-width: 860px) {
  .proto-hero-grid {
    grid-template-columns: minmax(0, 1.05fr) minmax(350px, 440px);
    gap: clamp(2rem, 4vw, 3.75rem);
  }
  .proto-hero-visual { display: grid; }
}

.stage-window {
  position: relative;
  inline-size: min(100%, 428px);
  background: var(--obsidian);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  box-shadow: var(--shadow-stage), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  overflow: clip;
  opacity: 0;
  transform: scale(0.98);
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.stage-window.is-visible { opacity: 1; transform: scale(1); }
.stage-window.is-hidden { display: none; }
.stage-window-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 1rem;
  border-block-end: 1px solid rgba(166, 200, 244, 0.12);
  font-family: var(--font-mono);
  font-size: 0.73rem;
  color: #cbd8e8;
}
/* Header badges on the code panels (hero window and the handoff file tree)
   share one muted style. They are labels, not code, so they stay out of the
   teal that marks syntax and directory names. */
.stage-window-lang,
.file-tree-badge {
  font-size: 0.67rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #7e96b2;
  background: rgba(166, 200, 244, 0.08);
  padding: 0.14rem 0.5rem;
  border-radius: var(--radius-pill);
}
.stage-code {
  margin: 0;
  padding: 1rem 1.1rem 1.15rem;
  font-family: var(--font-mono);
  font-size: clamp(0.66rem, 0.78vw, 0.78rem);
  line-height: 1.66;
  color: #a8bfd8;
  white-space: pre;
  min-block-size: calc(12 * 1.66em + 2.15rem);
  overflow: clip;
}
.stage-code .tok-pre { color: #c4b5fd; }
.stage-code .tok-kw { color: #93c5fd; }
.stage-code .tok-type { color: var(--teal-bright); }
.stage-code .tok-num { color: #f6b76b; }
.stage-code .tok-fn { color: #f8fafc; }
.stage-code .caret {
  display: inline-block;
  inline-size: 0.52ch;
  block-size: 1.05em;
  vertical-align: text-bottom;
  background: var(--teal-bright);
  animation: proto-caret 0.9s steps(1) infinite;
}
@keyframes proto-caret { 50% { opacity: 0; } }

progress.stage-progress {
  display: block;
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  block-size: 2px;
  inline-size: 100%;
  background: rgba(166, 200, 244, 0.12);
}
progress.stage-progress::-webkit-progress-bar {
  background: rgba(166, 200, 244, 0.12);
}
progress.stage-progress::-webkit-progress-value {
  background: linear-gradient(90deg, var(--accent), var(--teal-bright));
  transition: inline-size 0.12s linear;
}
progress.stage-progress::-moz-progress-bar {
  background: linear-gradient(90deg, var(--accent), var(--teal-bright));
}

.stage-window.is-compiling {
  animation: proto-compile 0.56s cubic-bezier(0.45, 0, 0.85, 0.25) forwards;
}
@keyframes proto-compile {
  0%   { transform: scale(1); opacity: 1; filter: brightness(1); }
  40%  { transform: scale(0.92); opacity: 1; filter: brightness(1.35); box-shadow: 0 0 0 6px rgba(37, 99, 235, 0.14), var(--shadow-stage); }
  100% { transform: scale(0.18); opacity: 0; filter: brightness(1.8); }
}

.stage-pulse {
  position: absolute;
  inline-size: 260px;
  block-size: 260px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(94, 208, 192, 0.34) 0%, rgba(37, 99, 235, 0.18) 38%, transparent 70%);
  opacity: 0;
  pointer-events: none;
}
.stage-pulse.is-firing {
  animation: proto-pulse 0.62s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
@keyframes proto-pulse {
  0%   { opacity: 0.95; transform: scale(0.35); }
  100% { opacity: 0; transform: scale(1.75); }
}

.stage-chip-wrap {
  position: relative;
  display: none;
  place-items: center;
  inline-size: 100%;
  block-size: 100%;
}
.stage-chip-wrap.is-shown {
  display: grid;
  animation: proto-chip-in 0.62s cubic-bezier(0.22, 1.25, 0.36, 1) forwards;
}
.stage-chip-wrap.is-static { display: grid; }
@keyframes proto-chip-in {
  0%   { opacity: 0; transform: scale(0.68); filter: blur(4px); }
  100% { opacity: 1; transform: scale(1); filter: blur(0); }
}
.stage-chip-svg {
  display: block;
  inline-size: min(100%, 284px);
  block-size: auto;
  overflow: visible;
}

/* ---------- airy daylight subpage hero ---------- */
.page-hero {
  position: relative;
  isolation: isolate;
  overflow: clip;
  background:
    radial-gradient(680px 360px at 84% 20%, rgba(37, 99, 235, 0.06), transparent 68%),
    radial-gradient(460px 300px at 10% 10%, rgba(20, 184, 166, 0.04), transparent 65%),
    linear-gradient(180deg, #fafbfd 0%, #ffffff 100%);
  border-block-end: 1px solid var(--border);
  padding-block: 3.75rem 3.35rem;
}
.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: radial-gradient(rgba(12, 21, 36, 0.1) 1px, transparent 1px);
  background-size: 24px 24px;
  -webkit-mask-image: radial-gradient(ellipse 55% 95% at 82% 40%, #000 10%, transparent 72%);
  mask-image: radial-gradient(ellipse 55% 95% at 82% 40%, #000 10%, transparent 72%);
  pointer-events: none;
}
.page-hero h1 {
  font-size: clamp(2.05rem, 3.8vw, 3.05rem);
  line-height: 1.09;
  max-width: 24ch;
  margin-block-end: 1rem;
}
.page-hero p {
  color: var(--body);
  font-size: 1.12rem;
  line-height: 1.62;
  max-width: 58ch;
  margin: 0;
}

/* ---------- quiet flush fact strip (homepage) ---------- */
.proto-facts {
  border-block: 1px solid var(--border);
  background: var(--bg);
}
.proto-facts-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.proto-facts-grid > div { padding: 1.5rem 1.6rem; }
.proto-facts-grid > div:first-child { padding-inline-start: 0; }
.proto-facts-grid > div:last-child { padding-inline-end: 0; }
.proto-facts-grid > div + div { border-inline-start: 1px solid var(--border); }
.proto-facts-grid dt {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
  margin-block-end: 0.25rem;
}
.proto-facts-grid dd {
  color: var(--ink);
  font-weight: 600;
  font-size: 0.96rem;
  line-height: 1.4;
}
@media (max-width: 900px) {
  .proto-facts-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .proto-facts-grid > div { padding: 1.15rem 1rem; }
  .proto-facts-grid > div:nth-child(odd) { padding-inline-start: 0; border-inline-start: 0; }
  .proto-facts-grid > div:nth-child(even) { padding-inline-end: 0; }
  .proto-facts-grid > div:nth-child(n + 3) { border-block-start: 1px solid var(--border); }
}

/* ---------- homepage asymmetric capabilities bento ---------- */
.bento-services {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.15rem;
}
@media (min-width: 760px) {
  .bento-services { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .bento-card.span-4 { grid-column: span 4; }
  .bento-card.span-3 { grid-column: span 3; }
  .bento-card.span-2 { grid-column: span 2; }
}
.bento-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 1.85rem 1.9rem;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
  container-type: inline-size;
}
.bento-card:hover {
  background: var(--bg);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.bento-card.is-featured {
  background:
    radial-gradient(420px 240px at 100% 0%, rgba(37, 99, 235, 0.06), transparent 65%),
    var(--bg);
  border-color: rgba(37, 99, 235, 0.16);
  box-shadow: var(--shadow-sm);
}
.bento-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-block-end: 1.1rem;
}
.bento-tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.bento-card.is-featured .bento-tag {
  color: var(--accent);
  background: var(--accent-soft);
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-pill);
}
.bento-arrow {
  display: inline-grid;
  place-items: center;
  inline-size: 28px;
  block-size: 28px;
  border-radius: 50%;
  color: var(--muted);
  background: rgba(12, 21, 36, 0.04);
  font-size: 0.88rem;
  transition: background-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}
.bento-card:hover .bento-arrow {
  background: var(--obsidian);
  color: #fff;
  transform: translate(1px, -1px);
}
.bento-card h3 { font-size: 1.24rem; margin-block-end: 0.55rem; }
.bento-card.is-featured h3 { font-size: 1.42rem; }
.bento-card p {
  color: var(--muted);
  font-size: 0.96rem;
  line-height: 1.62;
  margin: 0;
  max-width: 54ch;
}
.bento-flow {
  display: flex;
  flex-wrap: wrap;
  flex-wrap: balance;
  align-items: center;
  gap: 0.45rem;
  margin-block-start: 1.4rem;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--body);
}
.bento-flow span:not(.flow-sep) {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.28rem 0.65rem;
}
.bento-flow .flow-sep { color: var(--muted); }
/* The flow needs about 25.6rem on one row. In a narrower card (phones, and
   tablets just past the 760px grid breakpoint) stack it as a vertical pipeline
   instead of wrapping with an arrow left dangling at the end of a line. */
@container (max-width: 26rem) {
  .bento-flow {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.2rem;
  }
  .bento-flow .flow-sep {
    transform: rotate(90deg);
    margin-inline-start: 0.85rem;
  }
}
.bento-card .stretched { color: inherit; text-decoration: none; }
.bento-card .stretched::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.bento-card .stretched:focus-visible { outline: none; }
.bento-card:has(.stretched:focus-visible) { outline: 2px solid var(--accent); outline-offset: 3px; }
.bento-card:hover .stretched { color: var(--accent); }

/* ---------- shared card grids (services, resources, related guides) ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.35rem;
}
@media (min-width: 760px) {
  .card-grid.resource-guides { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 860px) {
  .related .card-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.related .card:not(:has(.card-media)) {
  background:
    radial-gradient(320px 200px at 100% 0%, rgba(37, 99, 235, 0.065), transparent 70%),
    var(--bg);
  border-color: rgba(37, 99, 235, 0.16);
}
.related .card:not(:has(.card-media)) h3 {
  font-size: 1.26rem;
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 1.75rem;
  overflow: clip;
}
.card p { color: var(--muted); font-size: 0.96rem; line-height: 1.62; margin-block-end: 0; }
.card p + p { margin-block-start: 0.9rem; }
.card .kicker { margin-block-end: 0.55rem; font-size: 0.72rem; }
.card h2 { font-size: 1.3rem; line-height: 1.24; margin-block-end: 0.55rem; }
.card h3 { font-size: 1.18rem; line-height: 1.28; margin-block-end: 0.5rem; }

/* Understated monochrome architectural icon badge (replaces pastel gradient) */
.card .icon {
  inline-size: 38px;
  block-size: 38px;
  flex: none;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-block-end: 1.15rem;
  color: var(--ink);
  transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}
.card:hover .icon {
  background: var(--accent-soft);
  border-color: rgba(37, 99, 235, 0.2);
  color: var(--accent);
}

.card .stretched { color: inherit; text-decoration: none; }
.card .stretched::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.card .stretched:focus-visible { outline: none; }
.card:has(.stretched) {
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}
.card:has(.stretched):hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.card:has(.stretched):hover .stretched,
.card:has(.stretched):hover .card-cta { color: var(--accent); }
.card:has(.stretched:focus-visible) { outline: 2.5px solid var(--accent); outline-offset: 3px; }

.card-cta {
  margin-block-start: auto;
  padding-block-start: 1.15rem;
  color: var(--ink);
  font-weight: 600;
  font-size: 0.93rem;
  transition: color 0.16s ease;
}
.card-media {
  display: block;
  inline-size: calc(100% + 3.5rem);
  max-inline-size: none;
  block-size: auto;
  aspect-ratio: 168 / 95;
  object-fit: cover;
  margin: -1.75rem -1.75rem 1.4rem;
  border-block-end: 1px solid var(--border);
  background: var(--surface);
}

/* Featured horizontal intro guide on /resources so the 4 focused guides form a balanced 2x2 grid */
@media (min-width: 920px) {
  .card-grid.resource-guides > .card:first-child {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr);
    grid-template-rows: auto auto auto 1fr;
    column-gap: 2.25rem;
    align-items: start;
    padding: 0;
  }
  .card-grid.resource-guides > .card:first-child .card-media {
    grid-column: 1;
    grid-row: 1 / -1;
    inline-size: 100%;
    block-size: 100%;
    margin: 0;
    border-block-end: 0;
    border-inline-end: 1px solid var(--border);
  }
  .card-grid.resource-guides > .card:first-child > :not(.card-media) {
    grid-column: 2;
    padding-inline-end: 2.25rem;
  }
  .card-grid.resource-guides > .card:first-child .kicker {
    margin-block-start: 2.1rem;
  }
  .card-grid.resource-guides > .card:first-child h2 {
    font-size: 1.55rem;
  }
  .card-grid.resource-guides > .card:first-child .card-cta {
    align-self: end;
    padding-block-end: 2.1rem;
  }
}

.resource-example {
  color: var(--muted);
  margin: -1.35rem 0 2.25rem;
  max-width: 72ch;
}
.resource-example a { font-weight: 600; }

/* ---------- split layout & Why HLS ---------- */
.split { display: grid; gap: 2rem 4rem; }
@media (min-width: 900px) {
  .split { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.6fr); align-items: start; }
  .split > :first-child { position: sticky; top: calc(var(--header-h) + 2rem); }
}
.split .section-intro { margin-block-end: 0; }

.proto-why-grid {
  list-style: none;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.15rem;
}
@media (min-width: 620px) {
  .proto-why-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.proto-why-grid li {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem 1.8rem;
  box-shadow: var(--shadow-sm);
}
.proto-why-num {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 0.18rem 0.55rem;
  border-radius: var(--radius-pill);
  margin-block-end: 1rem;
  font-variant-numeric: tabular-nums;
}
.proto-why-grid h3 { font-size: 1.14rem; margin-block-end: 0.5rem; }
.proto-why-grid p { color: var(--muted); font-size: 0.95rem; margin: 0; }

/* Obsidian band that breaks up the long light homepage (Why HLS). It uses the
   same obsidian, blue glow and dot grid as the hero chip and closing CTA card. */
.section.dark {
  position: relative;
  isolation: isolate;
  background:
    radial-gradient(760px 440px at 88% 0%, rgba(37, 99, 235, 0.22), transparent 65%),
    radial-gradient(560px 380px at 0% 100%, rgba(20, 184, 166, 0.07), transparent 65%),
    var(--obsidian);
  color: var(--on-dark-muted);
}
.section.dark::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: radial-gradient(rgba(166, 200, 244, 0.13) 1px, transparent 1px);
  background-size: 24px 24px;
  -webkit-mask-image: radial-gradient(ellipse 70% 90% at 82% 18%, #000 12%, transparent 72%);
  mask-image: radial-gradient(ellipse 70% 90% at 82% 18%, #000 12%, transparent 72%);
}
.section.dark .eyebrow { color: var(--accent-on-dark); }
.section.dark h2,
.section.dark h3 { color: #fff; }
.section.dark .section-intro,
.section.dark .proto-why-grid p { color: var(--on-dark-muted); }
.section.dark .proto-why-grid li {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--dark-line);
  box-shadow: none;
}
.section.dark .proto-why-num {
  color: var(--accent-light);
  background: rgba(166, 200, 244, 0.1);
}

/* ---------- timeline (How we work) ---------- */
.timeline { list-style: none; display: grid; gap: 1.6rem; position: relative; }
.timeline li { position: relative; padding-inline-start: 3.8rem; }
.timeline li::before {
  content: attr(data-step);
  position: absolute;
  inset-inline-start: 0;
  inset-block-start: 0;
  inline-size: 2.6rem;
  block-size: 2.6rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--border-strong);
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 0.8rem;
  z-index: 1;
}
.timeline li:not(:last-child)::after {
  content: "";
  position: absolute;
  inset-inline-start: calc(1.3rem - 0.5px);
  inset-block-start: 2.6rem;
  inset-block-end: -1.6rem;
  inline-size: 1px;
  background: var(--border-strong);
}
.timeline h3 { font-size: 1.1rem; padding-block-start: 0.45rem; }
.timeline p { color: var(--muted); font-size: 0.96rem; margin: 0; }
@media (min-width: 900px) {
  .timeline { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2.2rem; }
  .timeline li { padding-inline-start: 0; padding-block-start: 3.8rem; }
  .timeline li:not(:last-child)::after {
    inset-inline-start: 3.2rem;
    inset-inline-end: -1.6rem;
    inset-block-start: calc(1.3rem - 0.5px);
    inset-block-end: auto;
    inline-size: auto;
    block-size: 1px;
    background: var(--border-strong);
  }
  .timeline h3 { padding-block-start: 0; }
}

/* ---------- deliverables panel (single high-contrast dark obsidian anchor) ---------- */
.deliverables {
  display: grid;
  gap: 2rem 4rem;
  align-items: center;
  margin-block-start: 5rem;
  padding-block-start: 4.5rem;
  border-block-start: 1px solid var(--border);
}
@media (min-width: 900px) {
  .deliverables { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); }
}
.deliverables .section-intro { margin-block-end: 0; }

.file-tree {
  background: var(--obsidian);
  color: var(--on-dark-muted);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 18px;
  box-shadow: var(--shadow-stage);
  padding: 0 0 0.75rem;
  font-size: 0.94rem;
  overflow: clip;
}
.file-tree-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 0.75rem;
  margin: 0;
  padding: 0.85rem 1.4rem;
  border-block-end: 1px solid rgba(166, 200, 244, 0.12);
  font-family: var(--font-mono);
  color: var(--on-dark);
  font-size: 0.78rem;
}
.file-tree-title > span { white-space: nowrap; }
.file-tree-badge {
  white-space: nowrap;
}
.file-tree ul { list-style: none; padding: 0.45rem 0; }
.file-tree li {
  display: grid;
  grid-template-columns: 8.5rem minmax(0, 1fr);
  gap: 1rem;
  padding: 0.6rem 1.4rem;
}
.file-tree li:not(:last-child) {
  border-block-end: 1px solid rgba(166, 200, 244, 0.07);
}
.file-tree code {
  background: none;
  border: 0;
  padding: 0;
  color: var(--teal-bright);
  font-size: 0.88rem;
}
@media (max-width: 520px) {
  .file-tree-title { padding: 0.78rem 1rem; font-size: 0.72rem; }
  .file-tree-badge { font-size: 0.6rem; padding: 0.14rem 0.48rem; }
  .file-tree li { padding: 0.58rem 1rem; grid-template-columns: 7.4rem minmax(0, 1fr); gap: 0.65rem; }
}

/* ---------- worked example (homepage light data-viz card) ---------- */
.proto-worked {
  display: grid;
  gap: 2rem 3rem;
  align-items: center;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: var(--shadow-md);
  padding: clamp(1.75rem, 3.8vw, 2.75rem);
  margin-block-end: 5rem;
}
@media (min-width: 900px) {
  .proto-worked { grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr); }
}
.proto-worked h2 { font-size: clamp(1.45rem, 2.5vw, 1.9rem); }
.proto-worked-copy p { color: var(--muted); max-width: 50ch; }
.proto-worked-copy a { font-weight: 600; text-decoration: none; color: var(--accent); }
.proto-worked-copy a:hover { text-decoration: underline; }

.proto-metric-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 1.65rem;
}
.proto-metric-formula {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.proto-metric-big {
  display: block;
  color: var(--ink);
  font-size: 3rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.1;
  margin-block: 0.3rem 1rem;
  font-variant-numeric: tabular-nums;
}
.proto-metric-big span {
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0;
  color: var(--muted);
}
.proto-bars {
  list-style: none;
  display: grid;
  gap: 0.55rem;
  padding-block: 0.95rem;
  margin-block: 0 0.85rem;
  border-block: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-variant-numeric: tabular-nums;
  color: var(--body);
}
.proto-bars li {
  display: grid;
  grid-template-columns: 4.6rem 1fr 4.4rem;
  align-items: center;
  gap: 0.65rem;
}
.proto-bar-track {
  position: relative;
  block-size: 7px;
  background: rgba(12, 21, 36, 0.07);
  border-radius: var(--radius-pill);
}
.proto-bar-track::after {
  content: "";
  position: absolute;
  inset-block: -3px;
  inset-inline-start: 25%;
  inline-size: 1.5px;
  background: rgba(12, 21, 36, 0.3);
  border-radius: 1px;
  z-index: 1;
}
.proto-bar-fill {
  display: block;
  block-size: 100%;
  border-radius: var(--radius-pill);
}
.proto-bar-fill.is-miss { inline-size: 100%; background: #a8b5c7; }
.proto-bar-fill.is-fit { inline-size: 25%; background: var(--accent); }
.proto-bar-fill.is-fast { inline-size: 12.5%; background: var(--accent); }
.proto-bar-val { text-align: end; font-weight: 600; color: var(--ink); }
.proto-bar-val.is-miss { color: var(--muted); font-weight: 500; }
.proto-metric-note { font-size: 0.8rem; color: var(--muted); margin: 0; }

/* ---------- homepage 2x2 guides grid ---------- */
.proto-guides-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.4rem;
}
@media (min-width: 760px) {
  .proto-guides-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.proto-guide-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: clip;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}
.proto-guide-card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}
.proto-guide-media {
  display: block;
  inline-size: 100%;
  block-size: auto;
  aspect-ratio: 168 / 95;
  object-fit: cover;
  background: var(--surface);
  border-block-end: 1px solid var(--border);
}
.proto-guide-body {
  padding: 1.55rem 1.7rem 1.7rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.proto-guide-tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  margin-block-end: 0.55rem;
}
.proto-guide-body h3 { font-size: 1.24rem; margin-block-end: 0.5rem; }
.proto-guide-body p { color: var(--muted); font-size: 0.95rem; margin: 0; }
.proto-guide-cta {
  margin-block-start: auto;
  padding-block-start: 1.15rem;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--ink);
}
.proto-guide-card .stretched { color: inherit; text-decoration: none; }
.proto-guide-card .stretched::after { content: ""; position: absolute; inset: 0; }
.proto-guide-card .stretched:focus-visible { outline: none; }
.proto-guide-card:has(.stretched:focus-visible) { outline: 2.5px solid var(--accent); outline-offset: 3px; }
.proto-guide-card:hover .stretched,
.proto-guide-card:hover .proto-guide-cta { color: var(--accent); }

/* ---------- services overview page ---------- */
.service-chooser { margin: 0 0 2.75rem; }
.service-chooser h2 { font-size: 1.25rem; margin-block-end: 1rem; }
.service-chooser ul {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}
.service-chooser a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.95rem 1.2rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}
.service-chooser a:hover {
  background: var(--bg);
  border-color: var(--border-strong);
  color: var(--accent);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
  gap: 1.35rem;
}
.service-grid .featured {
  grid-column: 1 / -1;
  background:
    radial-gradient(480px 260px at 100% 0%, rgba(37, 99, 235, 0.055), transparent 65%),
    var(--bg);
  border-color: rgba(37, 99, 235, 0.18);
}
.service-lists {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 0.65rem 2rem;
  margin-block-start: 1.35rem;
  padding-block-start: 1.25rem;
  border-block-start: 1px solid var(--border);
}
.service-lists h3 {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-block-end: 0.55rem;
}

.check-list { list-style: none; margin-block-end: 0.85rem; }
.check-list li {
  position: relative;
  padding-inline-start: 1.4rem;
  color: var(--muted);
  font-size: 0.95rem;
  margin-block-end: 0.4rem;
}
.check-list li::before {
  content: "";
  position: absolute;
  inset-inline-start: 0.18rem;
  inset-block-start: 0.45em;
  inline-size: 0.42rem;
  block-size: 0.72rem;
  border: solid var(--accent);
  border-width: 0 1.85px 1.85px 0;
  transform: rotate(40deg);
}
.card-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 1.4rem;
  margin-block-start: auto;
  padding-block-start: 1.1rem;
  font-weight: 600;
  font-size: 0.94rem;
}
.card-links a { text-decoration: none; }
.card-links a:hover { text-decoration: underline; }

.start-options {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.35rem;
  margin-block-end: 1.65rem;
}
.start-options li {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 1.65rem 1.75rem;
}
.start-options .kicker { margin-block-end: 0.6rem; font-size: 0.72rem; }
.start-options h3 { font-size: 1.12rem; }
.start-options h3 a { color: var(--ink); text-decoration: none; }
.start-options h3 a:hover { color: var(--accent); text-decoration: underline; }
.start-options p { color: var(--muted); font-size: 0.95rem; margin: 0; }

.engagement-next {
  background: var(--bg);
  border: 1px solid var(--border);
  border-inline-start: 3px solid var(--accent);
  border-radius: 12px;
  padding: 1rem 1.3rem;
  margin-block-end: 4rem;
  max-width: 70ch;
  color: var(--body);
}
.engagement-next strong { color: var(--ink); }

@media (max-width: 900px) {
  .service-chooser ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .service-chooser ul,
  .start-options { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- service detail pages: prose + sticky side rail ---------- */
.service-layout {
  display: grid;
  gap: 3rem 4.5rem;
  align-items: start;
}
.service-aside { display: grid; gap: 1.25rem; }
@media (min-width: 1000px) {
  .service-layout { grid-template-columns: minmax(0, 1fr) 320px; }
  .service-aside { position: sticky; top: calc(var(--header-h) + 2rem); }
}

.side-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 1.6rem;
}
.side-card h2 {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-block-end: 0.85rem;
}
.side-card ul { list-style: none; }
.side-card li a {
  display: block;
  padding: 0.42rem 0 0.42rem 0.95rem;
  border-inline-start: 2px solid var(--border-strong);
  color: var(--body);
  font-size: 0.93rem;
  font-weight: 500;
  text-decoration: none;
  transition: border-color 0.16s ease, color 0.16s ease;
}
.side-card li a:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.side-back {
  display: inline-block;
  margin-block-start: 1.15rem;
  padding-block-start: 1rem;
  inline-size: 100%;
  border-block-start: 1px solid var(--border);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
}
.side-back:hover {
  color: var(--accent);
  text-decoration: underline;
}

/* ---------- about principles (balanced 2x2 studio cards) ---------- */
.principles {
  list-style: none;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.25rem;
  margin-block: 1.75rem 2.75rem;
}
@media (min-width: 680px) {
  .principles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.principles li {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.7rem 1.8rem;
  counter-increment: principle;
}
.principles { counter-reset: principle; }
.principles li::before {
  content: "0" counter(principle);
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 0.16rem 0.52rem;
  border-radius: var(--radius-pill);
  margin-block-end: 0.85rem;
  font-variant-numeric: tabular-nums;
}
.principles h3 { font-size: 1.12rem; margin-block-end: 0.45rem; }
.principles p { color: var(--muted); font-size: 0.95rem; margin: 0; }

/* ---------- contact ---------- */
.contact-layout {
  display: grid;
  gap: 2.5rem 4rem;
  align-items: start;
}
@media (min-width: 960px) {
  .contact-layout { grid-template-columns: minmax(0, 1fr) 370px; }
  .contact-layout .contact-card {
    grid-column: 2;
    grid-row: 1;
    position: sticky;
    top: calc(var(--header-h) + 2rem);
  }
  .contact-layout .prose { grid-column: 1; grid-row: 1; }
}
.contact-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: var(--shadow-md);
  padding: 1.85rem;
}
.contact-card h2 { font-size: 1.32rem; margin-block-end: 0.55rem; }
.contact-card p { color: var(--muted); font-size: 0.95rem; }
.contact-address {
  font-family: var(--font-mono);
  font-size: 1.02rem;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.72rem 0.95rem;
  margin-block: 1.1rem 1.25rem;
  user-select: all;
  overflow-wrap: anywhere;
}
.contact-card .cta-row .btn { flex: 1 1 auto; }
.copy-status {
  display: block;
  min-block-size: 1.4em;
  margin-block-start: 0.65rem;
  font-size: 0.88rem;
  color: var(--muted);
}

.prose .contact-essentials { list-style: none; margin: 1.5rem 0 1.75rem; }
.contact-essentials li {
  border-block-start: 1px solid var(--border);
  padding-block: 0.95rem;
}
.contact-essentials li:last-child { border-block-end: 1px solid var(--border); }
.contact-essentials strong { color: var(--ink); }

.contact-context {
  margin-block: 1.75rem 2.25rem;
  border-block: 1px solid var(--border);
}
.contact-context summary {
  display: flex;
  align-items: baseline;
  gap: 0.8rem;
  padding-block: 1.1rem;
  color: var(--ink);
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}
.contact-context summary::-webkit-details-marker { display: none; }
.contact-context summary::before {
  content: "";
  flex: none;
  inline-size: 0.46rem;
  block-size: 0.46rem;
  border-inline-end: 1.75px solid var(--accent);
  border-block-end: 1.75px solid var(--accent);
  rotate: -45deg;
  translate: 0 -0.1em;
}
.contact-context[open] > summary::before { rotate: 45deg; }
.context-content { padding: 0.25rem 0 1.35rem 1.25rem; }
.context-content h3:first-child { margin-block-start: 0; }

/* ---------- prose (long-form technical guides & detail pages) ---------- */
article.section > .container { container-type: inline-size; }

.prose { max-width: 72ch; }
.prose strong { color: var(--ink); }
.prose h2 {
  font-size: clamp(1.42rem, 2.5vw, 1.82rem);
  margin-block-start: 3.1rem;
  margin-block-end: 0.85rem;
}
.prose h3 {
  font-size: 1.15rem;
  margin-block-start: 1.9rem;
  margin-block-end: 0.5rem;
}
.prose ul,
.prose ol { margin: 0 0 1.1rem 1.4rem; }
.prose li { margin-block-end: 0.45rem; }
.prose .principles,
.prose .check-list { margin-inline-start: 0; }
.prose .check-list li { font-size: 0.99rem; color: var(--body); margin-block-end: 0.5rem; }
.prose > h2:first-child { margin-block-start: 0; }

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 0.55rem;
  color: var(--muted);
  font-size: 0.88rem;
  margin-block: 0 1.75rem;
}
.breadcrumbs a { color: var(--muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--accent); text-decoration: underline; }
.breadcrumbs [aria-current="page"] { color: var(--ink); font-weight: 600; }

.prose .note {
  background: var(--surface);
  border: 1px solid var(--border);
  border-inline-start: 3px solid var(--accent);
  border-radius: 12px;
  padding: 1.05rem 1.35rem;
  color: var(--body);
  font-size: 0.95rem;
  margin-block: 1.5rem;
}
.article-meta {
  color: var(--muted);
  font-size: 0.88rem;
  margin-block: 1.4rem;
  padding-block: 0.8rem;
  border-block: 1px solid var(--border);
}

/* Worked study panel inside /hls-feasibility-study */
.worked-study {
  min-inline-size: 0;
  max-inline-size: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: clamp(1.5rem, 3.5vw, 2.35rem);
  margin-block: 2.75rem;
}
.worked-study > h2:first-child { margin-block-start: 0; }
.worked-study .note { background: var(--bg); }

/* Article diagrams (container-query sized cleanly without 100vw scrollbar overflow) */
.article-diagram {
  inline-size: 100%;
  inline-size: 100cqi;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow-md);
  margin-block: 1.9rem 2.3rem;
  overflow: clip;
}
.article-diagram img {
  display: block;
  inline-size: 100%;
  block-size: auto;
}
.diagram-image-link { display: block; cursor: zoom-in; }
.diagram-image-link:focus-visible { outline-offset: -4px; }

.diagram-transcript {
  border-block-start: 1px solid var(--border);
  background: var(--surface);
}
.diagram-transcript summary {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  padding: 1rem 1.3rem;
  color: var(--ink);
  font-size: 0.94rem;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}
.diagram-transcript summary::-webkit-details-marker { display: none; }
.diagram-transcript summary::before {
  content: "";
  flex: none;
  inline-size: 0.44rem;
  block-size: 0.44rem;
  border-inline-end: 1.75px solid var(--accent);
  border-block-end: 1.75px solid var(--accent);
  rotate: -45deg;
  translate: 0 -0.1em;
}
.diagram-transcript[open] > summary::before { rotate: 45deg; }

.diagram-text { padding: 0.2rem 1.3rem 1.4rem; }
.diagram-text-title {
  color: var(--ink);
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.3;
}
.prose .diagram-steps { margin: 1.25rem 0 0 1.8rem; list-style: decimal-leading-zero; }
.prose ul.diagram-steps { list-style: disc; }
.diagram-steps li {
  padding: 0 0 1rem 0.65rem;
  border-inline-start: 1px solid rgba(37, 99, 235, 0.25);
}
.diagram-steps li:last-child { padding-block-end: 0; border-inline-start-color: transparent; }
.diagram-steps li::marker {
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.84rem;
}
.diagram-steps strong { display: block; color: var(--ink); font-size: 0.98rem; }
.diagram-steps span {
  display: block;
  margin-block-start: 0.15rem;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.5;
}
.prose .diagram-outcomes {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1.25rem 0 0;
  list-style: none;
}
.diagram-outcomes li {
  flex: 1 1 80px;
  margin: 0;
  border: 1px solid;
  border-radius: 8px;
  padding: 0.42rem 0.7rem;
  text-align: center;
  font-size: 0.88rem;
  font-weight: 600;
}
.outcome-go { color: #0f766e; background: #ecfdf5; border-color: rgba(15, 118, 110, 0.25); }
.outcome-refine { color: #92400e; background: #fffbeb; border-color: rgba(146, 64, 14, 0.25); }
.outcome-stop { color: #9f1239; background: #fff1f2; border-color: rgba(159, 18, 57, 0.25); }

.diagram-fullsize {
  display: block;
  inline-size: fit-content;
  margin-block-start: 0.55rem;
  padding-block: 0.25rem;
  font-weight: 600;
  text-decoration: none;
}
.diagram-fullsize:hover { text-decoration: underline; }
.article-diagram figcaption {
  border-block-start: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.89rem;
  line-height: 1.55;
  padding: 0.9rem 1.25rem 1rem;
}
@media (max-width: 600px) {
  .article-diagram { inline-size: 100%; }
  .diagram-image-link { display: none; }
}

/* Table of contents card inside guides */
.toc {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.35rem 1.6rem;
  margin-block: 1.6rem 2.3rem;
}
.toc h2 {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 0.85rem;
}
.toc a {
  text-decoration: none;
  font-weight: 600;
  font-size: 0.94rem;
  color: var(--body);
}
.toc a:hover { color: var(--accent); text-decoration: underline; }
.toc ul {
  columns: 2;
  column-gap: 2rem;
  margin: 0;
  list-style: none;
}
.toc li { break-inside: avoid; margin-block-end: 0.45rem; }

.sources {
  border-block-start: 1px solid var(--border);
  margin-block-start: 3.25rem;
  padding-block-start: 1.75rem;
}
.sources h2 { margin-block-start: 0; }
.sources li { overflow-wrap: anywhere; font-size: 0.95rem; }

/* ---------- tables ---------- */
.table-wrap {
  overflow-x: auto;
  overscroll-behavior-x: contain;
  margin-block: 1.6rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow-xs);
}
article.section .prose > .table-wrap {
  inline-size: min(100cqi, 940px);
}
.table-wrap tr:last-child td,
.table-wrap tr:last-child th { border-block-end: 0; }
table {
  border-collapse: collapse;
  inline-size: 100%;
  font-size: 0.93rem;
  min-inline-size: 560px;
}
caption {
  text-align: start;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 600;
  padding: 0.85rem 1.05rem;
  border-block-end: 1px solid var(--border);
  background: var(--bg);
}
th, td {
  text-align: start;
  padding: 0.8rem 1.05rem;
  border-block-end: 1px solid var(--border);
  vertical-align: top;
}
thead th {
  background: var(--surface);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
tbody th,
td:first-child {
  font-weight: 600;
  color: var(--ink);
  background: transparent;
}
tbody tr:hover td,
tbody tr:hover th { background: rgba(247, 248, 251, 0.7); }

/* ---------- hairline FAQ accordion with smooth ::details-content ---------- */
.faq {
  max-width: 76ch;
  border-block-start: 1px solid var(--border);
}
.faq details {
  border: 0;
  border-block-end: 1px solid var(--border);
  border-radius: 0;
  margin: 0;
  background: transparent;
}
.faq summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--ink);
  padding: 1.2rem 0.25rem;
  list-style: none;
  display: flex;
  align-items: baseline;
  gap: 0.85rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before {
  content: "";
  flex: none;
  inline-size: 0.48rem;
  block-size: 0.48rem;
  border-inline-end: 1.75px solid var(--accent);
  border-block-end: 1.75px solid var(--accent);
  rotate: -45deg;
  translate: 0 -0.1em;
}
.faq details[open] > summary::before { rotate: 45deg; }
.faq details p {
  padding: 0 0.25rem 1.3rem 1.35rem;
  color: var(--muted);
  margin: 0;
}

.faq-layout { display: grid; gap: 2rem 4rem; }
@media (min-width: 900px) {
  .faq-layout { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.6fr); align-items: start; }
  .faq-layout > :first-child { position: sticky; top: calc(var(--header-h) + 2rem); }
}
.faq-layout .section-intro { margin-block-end: 1.2rem; }
.faq-layout .faq { max-width: none; }

details::details-content {
  interpolate-size: allow-keywords;
  overflow: clip;
  contain: layout;
}
details:not([open])::details-content { block-size: 0; }

@media (prefers-reduced-motion: no-preference) {
  .faq summary::before,
  .contact-context summary::before,
  .diagram-transcript summary::before {
    transition: rotate 0.2s ease;
  }
  details::details-content {
    transition: block-size, content-visibility, display;
    transition-duration: 0.26s;
    transition-timing-function: ease-in-out;
    transition-behavior: allow-discrete;
  }
}

/* ---------- poised obsidian closing CTA card (homepage + all subpages) ---------- */
.proto-cta-wrap { padding-block: 0 5.5rem; }
.proto-cta,
.cta-band {
  position: relative;
  overflow: clip;
  background:
    radial-gradient(540px 280px at 88% 0%, rgba(37, 99, 235, 0.22), transparent 65%),
    var(--obsidian);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-stage);
  padding: clamp(2.15rem, 5vw, 3.65rem);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  gap: 1.75rem 3rem;
}
@media (min-width: 860px) {
  .proto-cta,
  .cta-band { grid-template-columns: minmax(0, 1fr) auto; }
}
.proto-cta .eyebrow,
.cta-band .kicker { color: var(--accent-on-dark); margin-block-end: 0.65rem; }
.proto-cta h2,
.cta-band h2 { color: #fff; margin: 0; }
.proto-cta p,
.cta-band p {
  color: var(--on-dark-muted);
  max-width: 54ch;
  margin-block: 0.65rem 0;
}
.proto-cta .btn,
.cta-band .btn {
  justify-self: start;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 10px 28px -8px rgba(37, 99, 235, 0.65);
}
.proto-cta a:focus-visible,
.cta-band a:focus-visible { outline-color: var(--accent-light); }

/* ---------- airy light porcelain footer ---------- */
.site-footer {
  background: var(--surface);
  color: var(--muted);
  border-block-start: 1px solid var(--border);
  margin-block-start: 0;
  padding-block: 4.25rem 2.5rem;
  font-size: 0.92rem;
}
.site-footer .cols {
  display: grid;
  grid-template-columns: minmax(220px, 1.6fr) repeat(3, minmax(0, 1fr));
  gap: 2.5rem 3rem;
  margin-block-end: 2.5rem;
}
.site-footer .logo { color: var(--ink); margin-block-end: 0.9rem; }
.site-footer .logo:hover { color: var(--ink); }
.site-footer .logo-mark rect { fill: var(--obsidian); }
.site-footer .logo-word { font-size: 1.3rem; }
.site-footer .footer-brand p { max-width: 34ch; color: var(--muted); }
.site-footer h2 {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink);
  margin-block-end: 0.9rem;
}
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--ink); }
.site-footer ul { list-style: none; }
.site-footer li { margin-block-end: 0.45rem; }
.site-footer .legal {
  border-block-start: 1px solid var(--border);
  padding-block-start: 1.3rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
}
.site-footer .legal .nowrap { white-space: nowrap; }

@media (max-width: 900px) {
  .site-footer .cols { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .site-footer .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 600px) {
  .site-footer .cols { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2rem; }
}

/* ---------- 404 error page ---------- */
.error-page { text-align: center; padding-block: 7rem; }
.error-page .kicker { margin-inline: auto; }
.error-page p { color: var(--muted); max-width: 48ch; margin: 1rem auto 2rem; }
.error-page .cta-row { justify-content: center; }

/* ---------- mobile navigation & responsive spacing ---------- */
@media (max-width: 760px) {
  .nav-toggle { display: block; }
  .main-nav { display: none; }
  .site-header.nav-open .main-nav {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.2rem;
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: var(--bg);
    border-block-end: 1px solid var(--border);
    padding: 0.85rem 1rem 1.4rem;
    box-shadow: var(--shadow-md);
  }
  .site-header.nav-open .main-nav a {
    font-size: 1.02rem;
    padding: 0.7rem 0.9rem;
    border-radius: 12px;
  }
  .site-header.nav-open .main-nav a.btn {
    margin: 0.65rem 0 0;
    padding: 0.82rem 1.2rem;
    border-radius: var(--radius-pill);
  }

  .proto-hero { padding-block: 3.25rem 3rem; }
  .page-hero { padding-block: 2.75rem 2.4rem; }
  .section { padding-block: 3.75rem; }
  .section:has(> .container > .cta-band:only-child) { padding-block: 0 3.75rem; }
  .section.alt + .section:has(> .container > .cta-band:only-child),
  .section.soft + .section:has(> .container > .cta-band:only-child) { padding-block: 3.75rem; }
  .proto-cta-wrap { padding-block: 0 3.75rem; }
  .deliverables { margin-block-start: 3.5rem; padding-block-start: 3.25rem; }
  .proto-worked { margin-block-end: 3.5rem; }
  .toc ul { columns: 1; }
}
