/* ==========================================================================
   intellox.ai — Monochrome Obsidian Editorial Studio Design System (v4)
   - Clean Floating Header (No grey pill background around menu links)
   - Full-Screen (100vh) Landing Heroes across Home, Expertise, Case Studies, AI Governance, Contact
   - "Build Futureproof" Tagline Integration
   - Interactive Multi-Step Flow Form for EU AI Act Risk Tier Assessment
   ========================================================================== */

:root {
  --bg: #070709;
  --bg-elevated: #0c0c10;
  --surface: rgba(15, 15, 19, 0.78);
  --surface-solid: #101015;
  --surface-hover: rgba(22, 22, 28, 0.94);
  --border: rgba(255, 255, 255, 0.1);
  --border-strong: rgba(255, 255, 255, 0.24);

  --ink: #f5f5f2;
  --ink-secondary: #c8c8d0;
  /* Contrast on --bg (#070709): ink-muted 7.2:1, ink-dim 5.9:1 (WCAG AA body text >= 4.5:1). */
  --ink-muted: #9a9aa5;
  --ink-dim: #8a8a95;

  --status-ok: #34d399;
  --status-warn: #e2e8f0;
  --status-bad: #f87171;

  --font-display: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-serif: 'Instrument Serif', Georgia, 'Times New Roman', serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, monospace;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --max-w: 1260px;
}

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

html {
  scroll-behavior: smooth;
  background: var(--bg);
  color: var(--ink);
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.65;
  overflow-x: hidden;
  min-height: 100vh;
}

/* Base link style for unclassed links in body copy, forms and legal text.
   :where() keeps the element part at zero specificity, so the rule is 0,1,0 and every classed
   link (.btn, .nav-menu a, .footer a, .toc-list a, .legal-body a ...) keeps its own styling. */
:where(p, li, td, th, dd, dt, blockquote, label, figcaption, .form-privacy, .legal-body) a:not([class]) {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--border-strong);
  text-underline-offset: 0.2em;
}
:where(p, li, td, th, dd, dt, blockquote, label, figcaption, .form-privacy, .legal-body) a:not([class]):hover {
  color: var(--ink);
  text-decoration-color: var(--ink);
}

#fluid-canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
}

.site-shell {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100svh;
}

.wrap {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 4vw, 3rem);
}

/* Typography */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  letter-spacing: -0.035em;
  line-height: 1.05;
  font-weight: 600;
  color: var(--ink);
}

.serif-italic {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.01em;
  color: #e6e6eb;
}

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

.tagline-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-secondary);
  margin-bottom: 1.35rem;
}

.tagline-kicker::before,
.tagline-kicker::after {
  content: '';
  width: 24px;
  height: 1px;
  background: rgba(255, 255, 255, 0.24);
}

.hero-headline {
  font-size: clamp(2.85rem, 6.4vw, 5.4rem);
  line-height: 1.01;
  letter-spacing: -0.04em;
}

.section-heading {
  font-size: clamp(1.95rem, 3.8vw, 3.1rem);
  line-height: 1.08;
}

/* ==========================================================================
   CLEAN FLUIDIC HEADER (Zero grey background or box highlights on nav links)
   ========================================================================== */
/* Two states, one class. At the top (scrollY <= 40px) the header is an in-flow, transparent strip laid over
   the hero. The .topbar box itself has zero height, so it reserves no space and the hero starts at y=0.
   Past 40px (.topbar--scrolled, toggled in main.js) it becomes a compact fixed glass bar. */
.topbar {
  --hdr-h: 84px;
  --logo-scale: 1;
  --nav-size: 0.87rem;
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  height: 0;
  z-index: 60;
}

.topbar.topbar--scrolled {
  position: fixed;
  --hdr-h: 60px;
  --logo-scale: 0.85;
  --nav-size: 0.8rem;
}

.topbar-bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: var(--hdr-h);
  pointer-events: none;
  isolation: isolate;
  transition: height 220ms ease;
}

/* Surface: separate layer so the nav panel below keeps its own backdrop. */
.topbar-bar::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background-color: rgba(7, 7, 9, 0);
  border-bottom: 1px solid rgba(255, 255, 255, 0);
  transition: background-color 220ms ease, border-color 220ms ease;
}

.topbar--scrolled .topbar-bar::before {
  background-color: rgba(7, 7, 9, 0.72);
  border-bottom-color: rgba(255, 255, 255, 0.08);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
}

.topbar-inner {
  position: relative;
  height: 100%;
  pointer-events: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: var(--ink);
}

/* Logo image (white wordmark, tagline inside the image). Height follows the 320x103 intrinsic ratio:
   96px wide = 31px high. Srcset serves the 640px file to 2x screens. */
.brand-logo {
  --logo-w: 96px;
  display: block;
  width: calc(var(--logo-w) * var(--logo-scale, 1));
  height: auto;
  max-width: none;
  transition: width 220ms ease;
}

.footer-brand .brand-logo { width: 104px; }

.brand-mark-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ink);
}

/* Pure clean typography links — no grey wrapper, no pill fill around menu items */
.nav-menu {
  display: flex;
  align-items: center;
  gap: 2.1rem;
  list-style: none;
  background: transparent;
  padding: 0;
  border: none;
}

.nav-menu a {
  text-decoration: none;
  color: var(--ink-muted);
  font-size: var(--nav-size);
  font-weight: 500;
  padding: 0.25rem 0;
  background: transparent !important;
  border-radius: 0;
  position: relative;
  transition: color 0.25s var(--ease), font-size 220ms ease;
}

.nav-menu a:hover,
.nav-menu a.active {
  color: var(--ink);
  background: transparent !important;
}

.nav-menu a.active::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -4px;
  height: 1px;
  background: var(--ink);
}

.mobile-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--ink);
  width: 44px;
  height: 44px;
  padding: 0;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  cursor: pointer;
}
.mt-bars { display: flex; flex-direction: column; gap: 5px; width: 20px; }
.mt-bars i { display: block; height: 2px; border-radius: 1px; background: currentColor; }

/* ==========================================================================
   FULL-SCREEN (100VH) LANDING HEROES FOR ALL PRIMARY PAGES
   ========================================================================== */
.hero-fullscreen {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 0 0 2.75rem;
  border-bottom: 1px solid var(--border);
  position: relative;
}

.hero-main-area {
  /* Keep .wrap's horizontal centring and gutters; only adjust vertical spacing. */
  margin-top: auto;
  margin-bottom: auto;
  /* Clears the transparent header overlaid on the hero (the hero itself starts at y=0) */
  padding-top: 7rem;
  padding-bottom: 2rem;
}

.hero-bottom-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.scroll-cue {
  color: var(--ink-secondary);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  transition: color 0.25s;
}
.scroll-cue:hover { color: var(--ink); }

/* Non-fullscreen top padding (for article reader) */
.page-top {
  padding-top: clamp(7.75rem, 13vw, 10rem);
  padding-bottom: clamp(4rem, 7vw, 6rem);
  border-bottom: 1px solid var(--border);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.78rem 1.45rem;
  border-radius: 9999px;
  font-weight: 600;
  font-size: 0.86rem;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.3s var(--ease), background 0.25s var(--ease), color 0.25s var(--ease), border-color 0.25s var(--ease);
}

.btn-primary {
  background: var(--ink);
  color: var(--bg);
}

.btn-primary:hover {
  background: #ffffff;
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  color: var(--ink);
  border-color: var(--border-strong);
}

.btn-outline:hover {
  border-color: var(--ink);
  background: rgba(255, 255, 255, 0.06);
  transform: translateY(-2px);
}

.btn-sm { padding: 0.5rem 1.15rem; font-size: 0.81rem; }

/* Home Hero Elements */
.hero-centered {
  text-align: center;
  max-width: 940px;
  margin: 0 auto 3rem;
}

.hero-lead {
  color: var(--ink-muted);
  font-size: clamp(1.03rem, 1.35vw, 1.18rem);
  max-width: 62ch;
  margin: 1.35rem auto 0;
}

/* Connected 4-Column Capability Strip (/010 - /040) */
.cap-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  background: rgba(14, 14, 18, 0.76);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.65);
}

.cap-cell {
  padding: 1.85rem 1.65rem;
  border-right: 1px solid var(--border);
  text-decoration: none;
  color: var(--ink);
  transition: background 0.3s var(--ease);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  min-height: 195px;
}

.cap-cell:last-child { border-right: none; }
.cap-cell:hover { background: rgba(255, 255, 255, 0.045); }

/* Fixed-height number and two-line title slots: number, title and description start at the same y
   in every cell, whether the title wraps to one or two lines. */
.cap-num {
  font-family: var(--font-display);
  font-size: 2.25rem;
  line-height: 1;
  height: 2.25rem;
  font-weight: 400;
  color: var(--ink-muted);
  margin-bottom: 1.25rem;
  letter-spacing: -0.04em;
}

.cap-title {
  font-size: 1.18rem;
  line-height: 1.25;
  min-height: 2.5em;
  font-weight: 600;
  margin-bottom: 0.4rem;
}

.cap-desc {
  color: var(--ink-muted);
  font-size: 0.87rem;
  line-height: 1.5;
}

/* Hairline Sections & Grids */
.band {
  padding: clamp(4.25rem, 8vw, 6.5rem) 0;
  border-bottom: 1px solid var(--border);
}

.band-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-bottom: 2.75rem;
}

.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem; }
/* Company and Timing share a row too narrow for the longest select option, so this row stacks at every width. */
.form-row-stack { grid-template-columns: minmax(0, 1fr); }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.25rem; }

.frame {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: clamp(1.5rem, 2.5vw, 2.2rem);
  backdrop-filter: blur(12px);
  transition: border-color 0.35s var(--ease), background 0.35s var(--ease), transform 0.4s var(--ease);
}

.frame:hover {
  border-color: var(--border-strong);
  background: var(--surface-hover);
  transform: translateY(-3px);
}

/* ==========================================================================
   RISK-CHECKER WIZARD (governance.html #risk-flow-wizard)
   One question per screen, tap or Enter/Space selects and advances (no Continue button).
   Panels are built in memory and swapped with a direction-aware slide. The stage height is
   animated between panels. prefers-reduced-motion: instant swaps, no slide, no stagger.
   ========================================================================== */
.flow-card {
  background: rgba(14, 14, 19, 0.88);
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  padding: clamp(1.6rem, 2.8vw, 2.25rem);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.7);
}

.flow-head { margin-bottom: 1.35rem; }

.flow-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.55rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--ink-muted);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.flow-bar-bg {
  width: 100%;
  height: 3px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 99px;
  overflow: hidden;
}

.flow-bar-fill {
  height: 100%;
  width: 0;
  background: var(--ink);
  border-radius: 99px;
  transition: width 0.45s var(--ease);
}

.flow-steps {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.9rem;
  margin: 0.7rem 0 0;
  padding: 0;
  font-size: 0.78rem;
  color: var(--ink-dim);
}

.flow-steps li { display: inline-flex; align-items: center; gap: 0.35rem; }
.flow-steps li.is-done { color: var(--ink-secondary); }
.flow-steps li.is-current { color: var(--ink); font-weight: 600; }
.flow-steps .flow-step-dot {
  width: 0.5rem; height: 0.5rem; border-radius: 99px;
  border: 1px solid var(--ink-muted);
}
.flow-steps li.is-done .flow-step-dot { background: var(--ink-secondary); border-color: var(--ink-secondary); }
.flow-steps li.is-current .flow-step-dot { background: var(--ink); border-color: var(--ink); }
.flow-step-btn {
  background: none;
  border: 0;
  padding: 0.15rem 0.1rem;
  color: inherit;
  font: inherit;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: var(--border-strong);
  text-underline-offset: 3px;
}
.flow-step-btn:hover { color: var(--ink); }

.flow-stage {
  position: relative;
  overflow: hidden;
}
.flow-stage.is-animating { transition: height 0.38s var(--ease); }

.flow-panel {
  width: 100%;
  transition: transform 0.38s var(--ease), opacity 0.3s var(--ease);
}
.flow-panel.is-leaving {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  pointer-events: none;
}
.flow-panel.is-entering.dir-fwd { transform: translateX(32px); opacity: 0; }
.flow-panel.is-entering.dir-back { transform: translateX(-32px); opacity: 0; }
.flow-panel.is-leaving.dir-fwd { transform: translateX(-32px); opacity: 0; }
.flow-panel.is-leaving.dir-back { transform: translateX(32px); opacity: 0; }
.flow-panel:focus { outline: none; }

.flow-topic {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--ink-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.45rem;
}

.flow-question { font-size: 1.45rem; line-height: 1.2; margin-bottom: 0.5rem; }
.flow-why { color: var(--ink-muted); font-size: 0.88rem; margin-bottom: 0; }

.flow-option-list {
  display: grid;
  gap: 0.6rem;
  margin: 1.15rem 0 1.25rem;
}

.flow-option {
  width: 100%;
  min-height: 56px;
  text-align: left;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.85rem 1rem;
  color: var(--ink);
  cursor: pointer;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.9rem;
  transition: background 0.25s var(--ease), border-color 0.25s var(--ease), transform 0.25s var(--ease);
  animation: flowOptionIn 0.42s var(--ease) backwards;
  animation-delay: calc(var(--i, 0) * 45ms + 60ms);
  font: inherit;
}

.flow-option:hover {
  border-color: var(--border-strong);
  background: rgba(255, 255, 255, 0.06);
  transform: translateY(-2px);
}

.flow-option:active { transform: translateY(0); }

.flow-option[aria-checked="true"],
.flow-option.is-selected {
  border-color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--ink);
  background: rgba(255, 255, 255, 0.1);
}

.flow-option.is-picked { animation: flowPulse 0.32s var(--ease); }

.flow-option-icon {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  color: var(--ink-secondary);
  flex-shrink: 0;
}
.flow-option-icon svg { width: 22px; height: 22px; }
.flow-option[aria-checked="true"] .flow-option-icon,
.flow-option.is-selected .flow-option-icon { color: var(--ink); background: rgba(255, 255, 255, 0.12); }

.flow-option-text { display: block; min-width: 0; }
.flow-option-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.96rem;
  line-height: 1.3;
  display: block;
  margin-bottom: 0.2rem;
}
.flow-option-sub { font-size: 0.81rem; color: var(--ink-muted); display: block; line-height: 1.45; }
.flow-option-tag {
  display: inline-block;
  margin-top: 0.35rem;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  color: var(--ink-muted);
  border: 1px solid var(--border);
  border-radius: 99px;
  padding: 0.05rem 0.45rem;
}

/* Selected state is shown by a border, a check mark and the label, not by colour alone. */
.flow-option-check {
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 99px;
  border: 1px solid var(--border-strong);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: transparent;
  flex-shrink: 0;
  transition: background 0.25s var(--ease), border-color 0.25s var(--ease), color 0.25s var(--ease);
}
.flow-option-check svg { width: 14px; height: 14px; }
.flow-option-check path {
  stroke-dasharray: 24;
  stroke-dashoffset: 24;
  transition: stroke-dashoffset 0.3s var(--ease) 0.05s;
}
.flow-option[aria-checked="true"] .flow-option-check,
.flow-option.is-selected .flow-option-check {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--bg);
}
.flow-option[aria-checked="true"] .flow-option-check path,
.flow-option.is-selected .flow-option-check path { stroke-dashoffset: 0; }

.flow-option:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

.flow-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border);
}

.flow-skipped {
  margin: 1rem 0 0;
  font-size: 0.8rem;
  color: var(--ink-muted);
}

.flow-result {
  padding: 1.25rem;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: var(--bg);
  margin-bottom: 1.25rem;
}
.flow-result-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 0.65rem; margin-bottom: 0.85rem; }
/* Long tier names wrap inside a 14px-radius, left-aligned pill (not a full capsule) */
.flow-result-head > .pill { border-radius: 14px; max-width: 100%; min-width: 0; white-space: normal; text-align: left; justify-content: flex-start; align-items: flex-start; line-height: 1.45; padding: 0.4rem 0.75rem; overflow-wrap: anywhere; }
.flow-result-deadline { font-family: var(--font-mono); font-size: 0.76rem; color: var(--ink-muted); }
.flow-result-meta { font-family: var(--font-mono); font-size: 0.7rem; color: var(--ink-muted); margin: 0.35rem 0 1rem; }
.flow-result-h { font-size: 0.82rem; color: var(--ink); margin: 1rem 0 0.4rem; font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 0.03em; }
.flow-result-summary { color: var(--ink-secondary); font-size: 0.93rem; }
.flow-result .check-list li { opacity: 0; animation: flowRise 0.45s var(--ease) forwards; animation-delay: calc(var(--i, 0) * 70ms + 180ms); }
.flow-result .check-list { padding-left: 0; list-style: none; }
.flow-result-reveal { opacity: 0; animation: flowRise 0.5s var(--ease) forwards; }
.flow-result-reveal.r1 { animation-delay: 0.05s; }
.flow-result-reveal.r2 { animation-delay: 0.12s; }
.flow-result-reveal.r3 { animation-delay: 0.2s; }
.flow-result-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 0.4rem; }
.flow-result-actions .btn { flex: 0 1 auto; }
.flow-complete {
  display: inline-flex; align-items: center; gap: 0.45rem;
  font-family: var(--font-mono); font-size: 0.72rem; color: var(--ink);
}
.flow-complete svg { width: 14px; height: 14px; }
.flow-restore { font-size: 0.8rem; color: var(--ink-muted); margin: 0.9rem 0 0; }

.flow-card.is-complete .flow-bar-fill { background: var(--ink); }

#risk-disclaimer { margin-top: 1.25rem; font-size: 0.78rem; color: var(--ink-muted); max-width: 64ch; }

@keyframes flowOptionIn {
  from { opacity: 0; transform: translateX(14px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes flowPulse {
  0% { transform: scale(1); }
  40% { transform: scale(1.018); }
  100% { transform: scale(1); }
}
@keyframes flowRise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   TBDSTUDIO & ALTERO INSPIRED EXPERTISE & CASE STUDY SHOWCASES
   ========================================================================== */
.studio-showcase-list {
  display: grid;
  gap: 2rem;
}

.studio-showcase {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 2.5rem;
  align-items: center;
  padding: clamp(1.75rem, 3.2vw, 2.75rem);
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(14, 14, 18, 0.72);
  transition: border-color 0.35s var(--ease), background 0.35s var(--ease), transform 0.4s var(--ease);
}

.studio-showcase:hover {
  border-color: var(--border-strong);
  background: rgba(20, 20, 26, 0.9);
  transform: translateY(-3px);
}

/* Hub cards: each card sizes to its own content (no shared row height), so the case-study link follows the text directly. */
@media (min-width: 981px) {
  .studio-showcase-list > .studio-showcase { padding-block: 3rem; }
}

.showcase-index {
  font-family: var(--font-display);
  font-size: clamp(2.1rem, 3.4vw, 3rem);
  font-weight: 400;
  color: var(--ink-muted);
  letter-spacing: -0.04em;
  line-height: 1;
  margin-bottom: 0.85rem;
}

.showcase-visual {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #09090d;
  padding: 1.35rem;
  min-height: 230px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}

.ui-node-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.025);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--ink-secondary);
}

/* Case Study Impact Metrics */
.impact-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
  margin: 1.25rem 0;
}

.impact-box {
  padding: 0.95rem 1rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.02);
}

.impact-num {
  font-family: var(--font-display);
  font-size: 1.65rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.1;
  margin-bottom: 0.25rem;
}

/* Practice Rows on Home */
.practice-row {
  display: grid;
  grid-template-columns: 95px 1.15fr 1.5fr 1fr;
  gap: 1.75rem;
  align-items: start;
  padding: 2.1rem 0;
  border-top: 1px solid var(--border);
}
.practice-row:last-child { border-bottom: 1px solid var(--border); }

.check-list {
  list-style: none;
  display: grid;
  gap: 0.45rem;
  font-size: 0.88rem;
  color: var(--ink-secondary);
}

.check-list li::before {
  content: '✓ ';
  color: var(--ink);
  font-family: var(--font-mono);
}

/* Pills */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  padding: 0.28rem 0.7rem;
  border-radius: 9999px;
  border: 1px solid var(--border);
  color: var(--ink-secondary);
  background: rgba(255, 255, 255, 0.03);
}

.pill-light {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
  font-weight: 600;
}

.pill-ok { border-color: rgba(52, 211, 153, 0.4); color: #6ee7b7; background: rgba(52, 211, 153, 0.08); }
.pill-warn { border-color: rgba(255, 255, 255, 0.35); color: var(--ink); background: rgba(255, 255, 255, 0.1); }
.pill-bad { border-color: rgba(248, 113, 113, 0.4); color: #fca5a5; background: rgba(248, 113, 113, 0.08); }

/* Widget header rows: label + pill. Wrap with a real gap instead of squeezing; pills never break mid-label. */
.widget-head { flex-wrap: wrap; gap: 0.5rem 1rem; }
.widget-head > .pill { white-space: nowrap; }

/* Governance Split Hero */
.gov-hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 2.5rem;
  align-items: center;
}

.wireframe-art {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.07), transparent 68%), #0a0a0e;
  padding: 1.35rem;
  margin-top: 1.5rem;
}

.timeline-4col {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--border);
}

.timeline-col {
  padding: 1.5rem 1.5rem 0.5rem 1.25rem;
  border-left: 1px solid var(--border);
}

.timeline-year {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--ink-muted);
  padding-bottom: 0.85rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--border);
  display: block;
}

/* Comparison / Control Mapping Table */
.data-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
}

.data-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.9rem;
}

.data-table th,
.data-table td {
  padding: 1.05rem 1.25rem;
  border-bottom: 1px solid var(--border);
}

.data-table th {
  font-family: var(--font-mono);
  font-size: 0.73rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-muted);
  background: rgba(255, 255, 255, 0.025);
}

.data-table tr:last-child td { border-bottom: none; }
/* Phones: the first (key) column stays visible while the table scrolls sideways, a right-edge shade marks more content, and a mono hint sits under the table. */
@media (max-width: 720px) {
  .data-table-wrap {
    background:
      linear-gradient(to left, rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0)) right center / 36px 100% no-repeat scroll,
      var(--surface);
  }
  .data-table-wrap::after {
    content: 'Scroll for more \2192';
    display: block;
    padding: 0.55rem 1rem 0.7rem;
    border-top: 1px solid var(--border);
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.04em;
    color: var(--ink-muted);
    text-align: right;
  }
  .data-table th:first-child,
  .data-table td:first-child {
    position: sticky;
    left: 0;
    z-index: 1;
    background: var(--surface);
    box-shadow: 1px 0 0 var(--border);
  }
  .data-table th:first-child {
    background: linear-gradient(rgba(255, 255, 255, 0.025), rgba(255, 255, 255, 0.025)), var(--surface);
  }
}

/* Blog & Editorial */
.blog-featured-split {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 2.25rem;
  align-items: stretch;
  padding: 2.25rem;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  background: var(--surface);
  margin-bottom: 2rem;
}

.artwork-box {
  border-radius: 8px;
  border: 1px solid var(--border);
  overflow: hidden;
  background: #09090d;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 220px;
}

.artwork-box svg {
  width: 100%;
  height: 100%;
  display: block;
}

.blog-controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
}

.filter-pills { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.filter-pill {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--ink-muted);
  padding: 0.45rem 1.05rem;
  border-radius: 9999px;
  font-size: 0.83rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.25s var(--ease);
}
.filter-pill:hover, .filter-pill.active {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}

.search-input {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--ink);
  padding: 0.55rem 1rem;
  border-radius: 9999px;
  font-size: 0.86rem;
  min-width: 240px;
  outline: none;
}
.search-input:focus { border-color: var(--ink); }

.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 0%;
  background: var(--ink);
  z-index: 100;
}

.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 290px;
  gap: 2.75rem;
  align-items: start;
}

.article-body h2 { font-size: 1.6rem; margin: 2.25rem 0 0.85rem; }
.article-body h3 { font-size: 1.2rem; margin: 1.6rem 0 0.6rem; }
.article-body p { color: var(--ink-secondary); margin-bottom: 1.2rem; font-size: 1.03rem; }
.article-body ul { margin: 0.75rem 0 1.4rem 1.4rem; color: var(--ink-secondary); }
.article-body li { margin-bottom: 0.5rem; }
.article-body a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }

.callout-box {
  border-left: 2px solid var(--ink);
  background: rgba(255, 255, 255, 0.04);
  padding: 1.15rem 1.35rem;
  margin: 1.5rem 0;
  border-radius: 0 6px 6px 0;
}

.toc-sticky { position: sticky; top: 6.5rem; }
.toc-list { list-style: none; display: flex; flex-direction: column; gap: 0.6rem; margin-top: 0.75rem; }
.toc-list a { color: var(--ink-muted); text-decoration: none; font-size: 0.86rem; }
.toc-list a:hover { color: var(--ink); }

/* FAQ Accordion */
.faq-item { border-bottom: 1px solid var(--border); }
.faq-trigger {
  width: 100%;
  background: transparent;
  border: none;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  text-align: left;
  padding: 1.35rem 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  cursor: pointer;
}
.faq-icon { font-family: var(--font-mono); color: var(--ink-muted); transition: transform 0.3s var(--ease); }
.faq-item.open .faq-icon { transform: rotate(45deg); color: var(--ink); }
.faq-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s var(--ease), padding 0.4s var(--ease);
  color: var(--ink-muted);
  font-size: 0.94rem;
}
.faq-item.open .faq-panel { padding-bottom: 1.35rem; }

/* Interactive Scope Pills on Contact & Modal */
.chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.scope-chip {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--border);
  color: var(--ink-secondary);
  padding: 0.48rem 0.95rem;
  border-radius: 9999px;
  font-size: 0.82rem;
  cursor: pointer;
  transition: all 0.22s var(--ease);
}

.scope-chip:hover,
.scope-chip[aria-pressed="true"] {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
  font-weight: 600;
}

/* Forms & Modal */
.form-group { display: flex; flex-direction: column; gap: 0.48rem; margin-bottom: 1.15rem; }
.form-label { font-size: 0.82rem; font-weight: 500; color: var(--ink-muted); }
.form-control {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.78rem 1rem;
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 0.93rem;
  outline: none;
  transition: border-color 0.25s;
}
.form-control:focus { border-color: var(--ink); }
/* Long placeholders (brief context) keep their last line visible. */
textarea.form-control { min-height: 7.5rem; }

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.84);
  backdrop-filter: blur(10px);
  z-index: 90;
  display: none;
  place-items: center;
  padding: 1.25rem;
}
.modal-backdrop.open { display: grid; }
.modal-panel {
  width: 100%;
  max-width: 540px;
  background: var(--surface-solid);
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  padding: 2.25rem;
  position: relative;
}

/* Kinetic Entrances */
.kinetic-in { animation: kineticUp 0.8s var(--ease) both; }
.kinetic-d1 { animation-delay: 0.08s; }
.kinetic-d2 { animation-delay: 0.16s; }

@keyframes kineticUp {
  from { opacity: 0; transform: translateY(22px); }
  to { opacity: 1; transform: translateY(0); }
}

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

/* Footer */
.footer {
  margin-top: auto;
  background: var(--bg);
  padding: 4rem 0 2.5rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr 0.9fr;
  gap: 2rem;
  margin-bottom: 3rem;
}

.footer a { color: var(--ink-muted); text-decoration: none; font-size: 0.88rem; }
.footer a:hover { color: var(--ink); }

/* ==========================================================================
   v5 additions: accessibility, shared chrome, forms, wizard, legal, motion
   ========================================================================== */
[hidden] { display: none !important; }

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 200;
  background: var(--ink);
  color: var(--bg);
  padding: 0.6rem 1rem;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  transition: top 0.2s var(--ease);
}
.skip-link:focus { top: 1rem; }

:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 4px; }
h2:focus, h3:focus, .flow-question:focus, .flow-panel:focus { outline: none; }

/* Anchored sections sit below the fixed topbar */
[id] { scroll-margin-top: 7.5rem; }

.header-actions { display: flex; align-items: center; gap: 0.6rem; }
.mobile-toggle[aria-expanded="true"] { border-color: var(--ink); }

.text-link { color: var(--ink); text-decoration: none; font-weight: 600; font-size: 0.9rem; }
.text-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.card-title-link { color: var(--ink); text-decoration: none; }
.card-title-link:hover { text-decoration: underline; text-underline-offset: 4px; }
.card-article { padding: 1.35rem; display: flex; flex-direction: column; justify-content: space-between; }

.footer-links { display: grid; gap: 0.55rem; }
.footer-bottom { border-top: 1px solid var(--border); padding-top: 1.5rem; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem; font-size: 0.8rem; color: var(--ink-dim); }

/* Modal: scroll lock, scrollable panel, close button */
body.modal-open { overflow: hidden; }
.modal-panel {
  max-height: calc(100vh - 2.5rem);
  max-height: calc(100svh - 2.5rem);
  overflow-y: auto;
}
.modal-close {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  background: transparent;
  border: none;
  color: var(--ink-muted);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.25rem;
  border-radius: 6px;
}
.modal-close:hover { color: var(--ink); }

/* Honeypot: off-screen for people, present for bots */
.hp-field { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }

.form-submit:disabled { opacity: 0.6; cursor: wait; }
.form-status { margin-top: 1rem; font-size: 0.9rem; }
.form-status:empty { display: none; }
.form-status p { margin: 0 0 0.4rem; }
.form-status a { color: var(--ink); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.form-status.is-success { color: #6ee7b7; }
.form-status.is-error { color: #fca5a5; }
.form-status.is-info { color: var(--ink-secondary); }

/* Enquiry success: the form fades out (is-leaving), then its fields are removed (is-confirmed) and a centred
   tick is drawn in place of them. The status region keeps role=status, so the copy is still announced. */
.contact-form.is-leaving > :not(.form-status) { opacity: 0; transition: opacity 250ms ease; }
.contact-form.is-confirmed > :not(.form-status) { display: none; }
.form-status.is-confirmed { color: var(--ink-muted); text-align: center; padding: 0.25rem 0 0.5rem; }
.enquiry-tick { display: flex; justify-content: center; margin: 0.5rem 0 1.1rem; }
.enquiry-tick svg { width: 72px; height: 72px; overflow: visible; }
.enquiry-tick-ring,
.enquiry-tick-mark {
  fill: none; stroke: #6ee7b7; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 100; stroke-dashoffset: 100;
}
.enquiry-tick-ring { animation: enquiry-tick-draw 300ms ease-out 0ms forwards; }
.enquiry-tick-mark { animation: enquiry-tick-draw 300ms ease-out 300ms forwards; }
@keyframes enquiry-tick-draw { to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) {
  .contact-form.is-leaving > :not(.form-status) { transition: none; }
  .enquiry-tick-ring,
  .enquiry-tick-mark { animation: none; stroke-dashoffset: 0; }
}

/* Articles, TOC, noscript blog list, legal placeholders */
.toc-list a.active { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }
.noscript-list { list-style: none; display: grid; gap: 0.6rem; margin-top: 1.5rem; }
.noscript-list a { color: var(--ink); }
.placeholder-box {
  border: 1px dashed var(--border-strong);
  border-radius: 10px;
  padding: 1.5rem;
  color: var(--ink-secondary);
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

/* Legal pages: notice, lede and fragment body (privacy, cookies, terms, imprint, about) */
.legal-lede { color: var(--ink-muted); font-size: 1.04rem; max-width: 60ch; margin-bottom: 2.25rem; }
.legal-body { color: var(--ink-secondary); font-size: 0.97rem; line-height: 1.7; }
.legal-body h2 { font-size: 1.45rem; margin: 2.4rem 0 0.75rem; color: var(--ink); }
.legal-body h3 { font-size: 1.12rem; margin: 1.9rem 0 0.55rem; color: var(--ink); }
.legal-body p { margin: 0 0 1rem; max-width: 70ch; }
.legal-body ul { margin: 0 0 1.25rem; padding-left: 1.2rem; list-style: disc; max-width: 70ch; }
.legal-body li { margin-bottom: 0.45rem; }
.legal-body a { color: var(--ink); text-underline-offset: 3px; }
.legal-body strong { color: var(--ink); }

/* Reduced motion: no entrance animations, no reveal transitions, no hover lift */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .kinetic-in, .kinetic-d1, .kinetic-d2 { animation: none !important; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .frame:hover, .studio-showcase:hover, .flow-option:hover, .btn-primary:hover, .btn-outline:hover { transform: none; }
  /* Wizard: no stagger, no slide, no pulse. Panels swap instantly. */
  .flow-option, .flow-result .check-list li, .flow-result-reveal { animation: none !important; opacity: 1; transform: none; }
  .flow-panel, .flow-stage.is-animating, .flow-bar-fill, .flow-option-check path { transition: none !important; }
}

/* Without JavaScript, show all reveal content and every FAQ answer (see <noscript> in each head). */

@media (max-width: 980px) {
  .grid-3, .grid-4, .timeline-4col, .impact-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  /* Avoid a lonely last card on odd counts: let it span both columns */
  .grid-3 > :last-child:nth-child(odd) { grid-column: span 2; }
  .gov-hero-grid, .blog-featured-split, .article-layout, .footer-grid, .practice-row, .studio-showcase { grid-template-columns: 1fr; }
  .toc-sticky { position: static; }
}

/* Header: links never wrap. Hamburger menu from 1000px down (the full row needs about 1000px). */
.nav-menu a, .header-actions .btn { white-space: nowrap; }
.nav-start-mobile { display: none; }

@media (max-width: 1000px) {
  .brand-logo { --logo-w: 88px; }
  .nav-menu {
    display: none;
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 1rem;
    right: 1rem;
    background: #101015;
    transition: background-color 220ms ease;
    flex-direction: column;
    padding: 1.25rem;
    border-radius: 16px;
    border: 1px solid var(--border-strong);
    gap: 1rem;
  }
  .nav-menu.open { display: flex; }
  /* Open menu after scroll inherits the glass surface; at the top it stays solid for legibility over the hero. */
  .topbar--scrolled .nav-menu {
    background: rgba(7, 7, 9, 0.72);
    -webkit-backdrop-filter: blur(14px) saturate(140%);
    backdrop-filter: blur(14px) saturate(140%);
  }
  .mobile-toggle { display: inline-flex; }
}

@media (max-width: 720px) {
  .topbar { --hdr-h: 72px; }
  .hero-main-area { padding-top: 6rem; }
  .grid-2, .grid-3, .grid-4, .timeline-4col, .impact-strip { grid-template-columns: 1fr; }
  .grid-3 > :last-child:nth-child(odd) { grid-column: auto; }
}

/* Narrow phones: the header button moves into the menu so the header row never wraps */
@media (max-width: 420px) {
  .brand-logo { --logo-w: 80px; }
  .header-start { display: none; }
  .nav-start-mobile { display: block; }
  .nav-start-mobile .btn { width: 100%; }
}

/* Capability strip (index.html .cap-strip). Each cell is a stretch grid item, so all cells share one
   top edge and one height. Borders are per cell: one divider between neighbours, none on the outer frame
   (the strip border is the frame). >= 1100px: one row of five. 721-1099px: six columns, cells 1-3 span 2
   and cells 4-5 span 3 (no orphan, no gap). <= 720px: one column. */
@media (min-width: 721px) and (max-width: 1099px) {
  .cap-strip { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .cap-cell { grid-column: span 2; border-right: 1px solid var(--border); border-bottom: none; }
  .cap-cell:nth-child(-n+3) { border-bottom: 1px solid var(--border); }
  .cap-cell:nth-child(3), .cap-cell:last-child { border-right: none; }
  .cap-cell:nth-child(n+4) { grid-column: span 3; }
}

@media (max-width: 720px) {
  .cap-strip { grid-template-columns: minmax(0, 1fr); }
  .cap-cell { grid-column: auto; border-right: none; border-bottom: 1px solid var(--border); }
  .cap-cell:last-child { border-bottom: none; }
}

/* Visually hidden but available to assistive technology */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Shared page footnote: small, muted, left-aligned note above the footer */
.page-footnote { font-size: 0.8rem; line-height: 1.5; max-width: 70ch; text-align: left; margin-top: 2.5rem; color: var(--ink-muted); }

/* Risk checker band (governance.html): heading, then one centred card that holds the intro and, after Start, the wizard. */
.risk-checker-head { text-align: center; max-width: 60ch; margin: 0 auto clamp(2rem, 4vw, 2.75rem); }
.risk-checker-kicker { display: block; color: var(--ink-muted); margin-bottom: 0.65rem; }
.risk-checker-head .section-heading { margin-bottom: 0.85rem; }
.risk-checker-lead { color: var(--ink-muted); font-size: 1.02rem; }
.risk-anchor { display: block; height: 0; }
.risk-checker-card { max-width: 760px; width: 100%; margin: 0 auto; }
.risk-checker-card.is-resizing { overflow: hidden; transition: height 0.42s var(--ease); }
.risk-intro { text-align: center; padding: clamp(0.5rem, 2vw, 1rem) 0 0.25rem; }
.risk-intro-title { font-family: var(--font-display); font-size: 1.35rem; margin-bottom: 1.1rem; }
.risk-intro-list { list-style: none; display: grid; gap: 0.65rem; max-width: 46ch; margin: 0 auto 1.85rem; text-align: left; }
.risk-intro-list li { position: relative; padding-left: 1.25rem; color: var(--ink-muted); font-size: 0.97rem; line-height: 1.5; }
.risk-intro-list li::before { content: ''; position: absolute; left: 0; top: 0.6em; width: 6px; height: 6px; border-radius: 50%; background: var(--ink); }
.risk-intro-start { min-width: 14rem; }
.flow-result-kicker { font-family: var(--font-mono); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--ink-muted); margin-bottom: 0.7rem; }

/* ==========================================================================
   Case-study layout (reusable .cs-* classes). Phase 19: credit-decision-support.html
   and the two case-study pages that follow reuse these.
   Centred hero, stat strip, centred section headers, alternating bands, framed
   diagrams, card grids. Text inside cards stays left aligned for readability.
   ========================================================================== */
.cs-center { text-align: center; }

.cs-hero { padding: 8.5rem 0 3rem; }
.cs-back {
  display: flex;
  align-items: center;
  width: max-content;
  min-height: 44px;
  margin: 0 auto 1.25rem;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-muted);
  text-decoration: none;
}
.cs-back:hover, .cs-back:focus-visible { color: var(--ink); }
.cs-kicker { justify-content: center; }
.cs-h1 {
  font-size: clamp(2.5rem, 5.2vw, 4.4rem);
  max-width: 18ch;
  margin: 0 auto 1.4rem;
  border-bottom: 0;
  text-wrap: balance;
}
.cs-lede {
  color: var(--ink-muted);
  font-size: 1.08rem;
  line-height: 1.65;
  max-width: 60ch;
  margin: 0 auto 1.75rem;
  text-wrap: pretty;
}
.cs-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem; }

/* Stat strip: four equal tiles, 2x2 at 560-999px, one column below. Hairlines via the 1px gap. */
.cs-stats-band { padding: 0 0 clamp(4rem, 7vw, 6rem); border-bottom: 1px solid var(--border); }
.cs-stats {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}
.cs-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.55rem;
  min-height: 210px;
  padding: 1.85rem 1.4rem;
  text-align: center;
  background: rgba(14, 14, 18, 0.92);
}
.cs-stat-label { font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-muted); }
.cs-stat-value {
  font-family: var(--font-display);
  font-size: clamp(2.3rem, 4vw, 3.2rem);
  line-height: 1;
  font-weight: 600;
  letter-spacing: -0.04em;
  color: var(--ink);
  margin: 0.4rem 0 0.2rem;
}
.cs-stat-note { color: var(--ink-muted); font-size: 0.9rem; line-height: 1.45; max-width: 24ch; text-wrap: balance; }
@media (min-width: 560px) and (max-width: 999px) {
  .cs-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 559px) {
  .cs-stats { grid-template-columns: minmax(0, 1fr); }
  .cs-stat { min-height: 0; }
}

/* Sections: generous rhythm (7rem scale), alternate bands with hairline top and bottom borders. */
.cs-section { padding: clamp(3.375rem, 6vw, 5.25rem) 0; border-bottom: 1px solid var(--border); scroll-margin-top: 6rem; }
/* Wide blocks (cards, tables, grids, diagram frames) share one width of about 1000px and stay centred. Text stays at about 62 characters. */
.cs-facts, .cs-stats, .cs-grid-2, .cs-grid-3, .cs-grid-4, .cs-now, .cs-cols, .cs-open, .cs-findings, .cs-gov, .cs-chipgrid { max-width: 1000px; margin-left: auto; margin-right: auto; }
.cs-section--alt { background: rgba(255, 255, 255, 0.022); border-top: 1px solid var(--border); }
.cs-sechead {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.9rem;
  text-align: center;
  max-width: 760px;
  margin: 0 auto clamp(2.5rem, 5vw, 3.5rem);
}
.cs-idx { font-size: 0.78rem; letter-spacing: 0.12em; color: var(--ink-muted); }
.cs-h2 {
  font-size: clamp(1.9rem, 3.6vw, 2.9rem);
  line-height: 1.08;
  max-width: 22ch;
  margin: 0;
  border-bottom: 0;
  text-wrap: balance;
}
.cs-standfirst { color: var(--ink-secondary); font-size: 1.08rem; line-height: 1.55; max-width: 60ch; margin: 0; text-wrap: balance; }
.cs-rule { display: block; width: 56px; height: 1px; background: var(--border-strong); margin-top: 0.4rem; }

.cs-prose { max-width: 62ch; margin: 0 auto 2.5rem; text-align: center; }
.cs-prose p { color: var(--ink-secondary); font-size: 1.02rem; line-height: 1.7; margin-bottom: 0.9rem; text-wrap: pretty; }
.cs-prose p:last-child { margin-bottom: 0; }
.cs-prose--after { margin: 2.5rem auto 0; }
/* Short text-only section: half the usual vertical padding, and the section runs straight into the next one. */
.cs-section--compact { padding-top: 3.5rem; padding-bottom: 3.5rem; }
.cs-section--compact .cs-prose { margin-bottom: 0; }

.cs-h3 { font-size: clamp(1.2rem, 2vw, 1.4rem); letter-spacing: -0.02em; line-height: 1.2; margin: 0 0 0.6rem; border-bottom: 0; text-wrap: balance; }
.cs-h3--center { text-align: center; font-size: clamp(1.4rem, 2.6vw, 1.9rem); margin: 0 0 2rem; }
.cs-h4 { font-size: 1.05rem; line-height: 1.25; margin: 0 0 0.4rem; }
.cs-h4--lead { font-size: clamp(1.3rem, 2.4vw, 1.7rem); text-align: center; margin: 0 0 2rem; }
.cs-subhead { font-size: clamp(1.25rem, 2.2vw, 1.5rem); text-align: center; margin: 3.5rem 0 1.5rem; }

/* Cards: the .cap-cell / impact box family. */
.cs-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: clamp(1.4rem, 2.2vw, 1.9rem);
  text-align: left;
  height: 100%;
}
.cs-card p { color: var(--ink-secondary); font-size: 0.97rem; line-height: 1.6; }
.cs-card--row { padding: 1.1rem 1.35rem; font-size: 0.97rem; line-height: 1.6; color: var(--ink-secondary); }

.cs-grid-2, .cs-grid-3, .cs-grid-4 { list-style: none; display: grid; gap: 1.25rem; }
.cs-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cs-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cs-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 899px) {
  .cs-grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cs-grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  /* An odd last card spans the full row, so no tile is left alone. */
  .cs-grid-3 > :last-child:nth-child(odd),
  .cs-grid-4 > :last-child:nth-child(odd) { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
  .cs-grid-2, .cs-grid-3, .cs-grid-4 { grid-template-columns: minmax(0, 1fr); }
  .cs-grid-3 > :last-child:nth-child(odd), .cs-grid-4 > :last-child:nth-child(odd) { grid-column: auto; }
}

/* Challenge: question cards. */
.cs-q { display: flex; align-items: flex-start; gap: 0.9rem; color: var(--ink); font-size: 1.05rem; line-height: 1.5; }
.cs-q-n { flex: 0 0 auto; color: var(--ink-muted); font-size: 0.78rem; letter-spacing: 0.08em; padding-top: 0.25rem; min-width: 2.2rem; }

/* What we audited: numbered tiles. */
.cs-tile { display: flex; flex-direction: column; gap: 0.6rem; }
.cs-tile-n { color: var(--ink-muted); font-size: 0.8rem; letter-spacing: 0.1em; }
.cs-tile .cs-h3 { margin: 0; }
.cs-tile p { color: var(--ink-muted); font-size: 0.92rem; line-height: 1.55; }

/* Findings: full-width row cards. Stacked inside the card at 720px and below. */
.cs-findings { list-style: none; display: grid; gap: 1rem; }
.cs-finding {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.9rem;
  padding: clamp(1.4rem, 2.4vw, 1.9rem);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
}
.cs-finding-body { min-width: 0; }
.cs-finding-head { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem; }
/* Long finding tags read as deliberate two-line pills, not clipped or orphaned fragments. */
.cs-finding-head .cs-tag { line-height: 1.35; padding: 0.35rem 0.75rem; border-radius: 14px; max-width: 100%; text-align: left; text-wrap: balance; }
.cs-finding-title { font-size: 1.15rem; line-height: 1.3; letter-spacing: -0.02em; margin: 0 0 0.45rem; border-bottom: 0; }
.cs-finding-why { color: var(--ink-secondary); font-size: 0.97rem; line-height: 1.6; max-width: 66ch; margin: 0; }
.cs-why-label { display: block; color: var(--ink-muted); font-size: 0.7rem; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 0.3rem; }
.cs-tag {
  display: inline-block;
  font-size: 0.72rem;
  letter-spacing: 0.03em;
  color: var(--ink-secondary);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  padding: 0.3rem 0.7rem;
}
@media (min-width: 721px) {
  .cs-finding { grid-template-columns: minmax(0, 15rem) minmax(0, 1fr); gap: 2rem; align-items: start; }
  .cs-finding-head { flex-direction: column; align-items: flex-start; }
}

/* Open items: quieter second block, dashed frames. */
.cs-open { list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.cs-open-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 1.25rem 1.4rem;
  border: 1px dashed var(--border-strong);
  border-radius: 12px;
}
.cs-open-title { font-size: 1rem; letter-spacing: -0.01em; margin: 0; border-bottom: 0; }
.cs-open-item p { color: var(--ink-muted); font-size: 0.92rem; line-height: 1.55; margin: 0; }
/* The tag sits on its own line above the sentence (table keeps it shrink-to-fit, not full width). */
.cs-open-item .cs-tag { display: table; margin: 0 0 0.6rem; }
@media (max-width: 720px) { .cs-open { grid-template-columns: minmax(0, 1fr); } }

/* What we did next: callout and remediation cards. */
.cs-callout { max-width: 880px; margin: 0 auto 1.5rem; padding: clamp(1.5rem, 3vw, 2rem) clamp(1.25rem, 4vw, 2.5rem); text-align: center; }
.cs-callout p {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 2.9vw, 2.25rem);
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: var(--ink);
  max-width: 30ch;
  margin: 0 auto;
  text-wrap: balance;
}
.cs-remed { margin-top: 3rem; }
.cs-remed-card .cs-h3 { font-size: 1.1rem; }
.cs-advise ul { list-style: none; display: grid; gap: 0.7rem; }
.cs-advise li { position: relative; padding-left: 1.25rem; color: var(--ink-secondary); font-size: 0.95rem; line-height: 1.55; }
.cs-advise li::before { content: ''; position: absolute; left: 0; top: 0.62em; width: 6px; height: 6px; border-radius: 50%; background: var(--ink); }
/* A single card under a section's prose: the same 1000px column as the findings list, with section spacing above it. */
.cs-wide { max-width: 1000px; margin: 3rem auto 0; }

/* What the team now has: 5 cards on a 6-column grid; the last two split the row, no orphan. */
.cs-now { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.cs-now > li { grid-column: span 2; }
.cs-now > li:nth-child(n + 4) { grid-column: span 3; }
@media (max-width: 899px) {
  .cs-now { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cs-now > li, .cs-now > li:nth-child(n + 4) { grid-column: auto; }
  .cs-now > li:last-child:nth-child(odd) { grid-column: 1 / -1; }
}
@media (max-width: 720px) { .cs-now { grid-template-columns: minmax(0, 1fr); } .cs-now > li:last-child:nth-child(odd) { grid-column: auto; } }

/* AI layer (architecture page): four cards in a 2 x 2 grid from 700px (about 45 characters per line), one column below. Equal heights per row. */
.cs-ai { display: grid; gap: 1.25rem; grid-template-columns: minmax(0, 1fr); max-width: 1000px; margin: 0 auto; }
@media (min-width: 700px) { .cs-ai { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.cs-ai > .cs-card { text-align: left; padding: 1.5rem; }
.cs-ai .cs-card p { max-width: 44ch; }
.cs-ai .cs-card p + p { margin-top: 0.9rem; }
/* Three equal cards in a row from 1000px (Data, Security, Repeatable setup), stacked below. Left-aligned text. */
.cs-trio { display: grid; gap: 1.25rem; grid-template-columns: minmax(0, 1fr); max-width: 1000px; margin: 0 auto; }
@media (min-width: 1000px) { .cs-trio { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.cs-trio > .cs-card { text-align: left; padding: 1.5rem; }
.cs-trio > .cs-card p { max-width: 48ch; }

/* Bulleted lists inside centred prose: full-width rows with a hairline border, a mono index at the left and left-aligned text. */
.cs-rows { list-style: none; display: grid; gap: 0.6rem; counter-reset: cs-row; max-width: 62ch; margin: 1.75rem auto 0; padding: 0; text-align: left; }
.cs-rows > li {
  position: relative;
  counter-increment: cs-row;
  padding: 0.95rem 1.2rem 0.95rem 3.9rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink-secondary);
  font-size: 0.97rem;
  line-height: 1.6;
  text-align: left;
}
.cs-rows > li::before {
  content: counter(cs-row, decimal-leading-zero);
  position: absolute;
  left: 1.2rem;
  top: 1.05rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  color: var(--ink-muted);
}
/* Numbered rows in a wide block (about 1000px). Two columns from 1100px with four rows per column, so the numbers still read down, one column below. */
.cs-rows--cols { max-width: 1000px; margin-left: auto; margin-right: auto; }
/* Two columns from 1100px: a grid that fills column first (1-4 left, 5-8 right) with four rows, so both columns end at the same y. Each row's boxes share one height; content stays top-aligned. One column below 1100px in numbered order. */
@media (min-width: 1100px) {
  .cs-rows--cols { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: repeat(4, auto); grid-auto-flow: column; gap: 0.6rem 1.25rem; }
  .cs-rows--cols > li { height: 100%; box-sizing: border-box; margin: 0; }
}

/* Blocks inside How it is built. */
.cs-block { margin-top: clamp(4rem, 7vw, 5.5rem); }
.cs-block:first-of-type, .cs-sechead + .cs-block { margin-top: 0; }
.cs-block--inner { margin-top: 3.5rem; padding-top: 3.5rem; border-top: 1px solid var(--border); }
.cs-block-head { text-align: center; margin-bottom: 2rem; }
.cs-block-head .cs-h3 { margin: 0; }

.cs-cols { display: grid; gap: 1.25rem; }
.cs-cols--2, .cs-cols--3 { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) {
  .cs-cols--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cs-cols--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.cs-prose-card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: clamp(1.4rem, 2.2vw, 1.9rem); }
.cs-prose-card p { color: var(--ink-secondary); font-size: 1rem; line-height: 1.68; margin: 0; }

/* Two-column composition: text beside a card or chip grid. Alternates at 1100px and above. */
.cs-split { display: grid; gap: clamp(2rem, 4vw, 4rem); align-items: start; }
.cs-split-text h3 { margin-top: 0; }
.cs-split-text p { color: var(--ink-secondary); font-size: 1.02rem; line-height: 1.68; max-width: 60ch; margin-bottom: 1rem; }
.cs-split-text p:last-child { margin-bottom: 0; }
.cs-split-aside { display: grid; gap: 1rem; align-content: start; }
.cs-card--plain p { margin: 0; }
.cs-chips-label { color: var(--ink-muted); font-size: 0.95rem; margin: 0; }
.cs-chipgrid { list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.6rem; }
.cs-chipgrid li {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0.55rem 1rem;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--ink-secondary);
  font-size: 0.9rem;
  line-height: 1.35;
}
.cs-stack { list-style: none; display: grid; gap: 0.8rem; }
.cs-gov { list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.cs-gov .cs-card { padding: 1.3rem 1.4rem; }
.cs-gov .cs-card p { font-size: 0.92rem; }
@media (max-width: 559px) { .cs-chipgrid, .cs-gov { grid-template-columns: minmax(0, 1fr); } }
@media (min-width: 1100px) {
  .cs-split { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
  .cs-split--flip > .cs-split-text { grid-column: 2; grid-row: 1; }
  .cs-split--flip > .cs-split-aside { grid-column: 1; grid-row: 1; }
}

/* Framed diagram card: 1px border, rounded, padding, subtle inner background, centred mono caption. */
.cs-figure {
  margin: 2.5rem auto 0;
  max-width: 1000px;
  padding: clamp(0.75rem, 1.2vw, 1rem) 0;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.018);
}
.cs-figure .diagram { margin: 0; }
/* Phones: no horizontal frame padding, so the 360px mobile SVG scales to at least 11px labels. */
@media (max-width: 720px) { .cs-figure { padding: 0.25rem 0 0.75rem; } .cs-figure .diagram figcaption { padding: 0 1rem; } }
.cs-figure .diagram figcaption {
  margin: 1.1rem auto 0;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.5;
  color: var(--ink-muted);
  max-width: 70ch;
}
.cs-block .cs-figure:first-of-type { margin-top: 0; }

/* Obligation map: full-width framed table card. */
.cs-table-card { margin: 2rem auto 0; max-width: 1000px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); overflow: hidden; }
/* Label column about 28% of the table; the rest goes to the outcome column. */
.cs-table-card .data-table thead th:first-child { width: 28%; }
/* Table and the diagram frame below it: a consistent 2rem gap. */
.cs-table-card + .cs-figure { margin-top: 2rem; }
.cs-caption { caption-side: top; text-align: left; padding: 1rem 1.25rem; font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.04em; color: var(--ink-muted); }

/* Delivery plan: five phase cards on a connecting line; stacked below 900px. */
.cs-phases {
  list-style: none;
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1rem;
  margin: 2.5rem 0 0;
}
.cs-phases::before {
  content: '';
  position: absolute;
  top: 1.6rem;
  left: 10%;
  right: 10%;
  height: 1px;
  background: var(--border-strong);
}
.cs-phase {
  position: relative;
  padding: 1.25rem 1.2rem 1.35rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
}
.cs-phase-n {
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  margin-bottom: 1.1rem;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  background: var(--bg);
  color: var(--ink);
  font-size: 0.8rem;
}
.cs-phase .cs-h4 { font-size: 1.05rem; }
.cs-phase p { color: var(--ink-muted); font-size: 0.9rem; line-height: 1.55; }
@media (max-width: 899px) {
  .cs-phases { grid-template-columns: minmax(0, 1fr); }
  .cs-phases::before { display: none; }
}

/* Handover checklist: check marks, 4 columns at 1100px, 2 at 640px, one column below. */
.cs-checks { list-style: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.9rem; }
.cs-checks li {
  position: relative;
  padding: 1.1rem 1.2rem 1.1rem 3.1rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  color: var(--ink-secondary);
  font-size: 0.95rem;
  line-height: 1.5;
}
.cs-checks li::before { content: '✓'; position: absolute; left: 1.2rem; top: 1.05rem; color: #6ee7b7; font-weight: 600; }
@media (max-width: 1099px) { .cs-checks { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 639px) { .cs-checks { grid-template-columns: minmax(0, 1fr); } }

/* Questions: accordion, centred at 760px. */
.cs-faq { max-width: 760px; margin: 0 auto; }
.cs-faq .faq-trigger { font-size: 1.05rem; min-height: 44px; }

/* Closing CTA band. */
/* Balanced line breaks for headlines, so a short last word does not sit alone on its own line. */
h1, h2, .section-heading { text-wrap: balance; }
.cs-cta-band { padding: clamp(3.75rem, 6.75vw, 5.625rem) 0; border-top: 1px solid var(--border); }
.cs-cta-title { font-size: clamp(2rem, 4vw, 3.2rem); line-height: 1.06; max-width: 20ch; margin: 0 auto 1.25rem; border-bottom: 0; text-wrap: balance; }
.cs-cta-text { color: var(--ink-muted); font-size: 1.05rem; line-height: 1.6; max-width: 56ch; margin: 0 auto 2rem; text-wrap: pretty; }
.cs-cta-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 1.25rem; }
.cs-cta-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
  text-decoration: none;
}
.cs-cta-link:hover, .cs-cta-link:focus-visible { color: var(--ink); }
/* Closing band directly above the footnote: the buttons sit 3rem above the footnote (no extra band padding below). */
.cs-cta-band--flush { padding-bottom: 0; }
.cs-cta-band--flush + .wrap > .page-footnote { margin-top: 3rem; }
.cs-back:focus-visible, .cs-cta-link:focus-visible, .cs-section a:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 4px; }

/* At a glance: centred mono label, then a framed grid of equal cells. 3 x 2 at 1000px and up,
   2 columns at 560-999px, one column below 560px. Hairlines come from the 1px gap over the border colour. */
.cs-glance-head { margin-bottom: clamp(2rem, 4vw, 2.75rem); }
.cs-glance-label {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 400;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  line-height: 1.4;
  color: var(--ink-muted);
  max-width: none;
  margin: 0;
}
.cs-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin: 0;
  background: var(--border-strong);
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  overflow: hidden;
  max-width: 1000px;
  margin: 0 auto;
}
.cs-fact {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 0.6rem;
  padding: clamp(1.4rem, 2.4vw, 2rem) clamp(1.25rem, 2.2vw, 1.75rem);
  text-align: center;
  background: rgba(14, 14, 18, 0.92);
}
.cs-fact dt {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
  line-height: 1.4;
}
.cs-fact dd {
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.55;
  max-width: 34ch;
  text-wrap: balance;
}
@media (min-width: 560px) and (max-width: 999px) {
  .cs-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  /* Odd count: the last cell takes the full row, so no empty grey block is left. */
  .cs-facts > .cs-fact:last-child:nth-child(odd) { grid-column: 1 / -1; }
}
@media (min-width: 1000px) {
  /* 3 columns: 7 cells end with one cell (full row); 5 cells end with two (last cell spans two columns). */
  .cs-facts > .cs-fact:last-child:nth-child(3n + 1) { grid-column: 1 / -1; }
  .cs-facts > .cs-fact:last-child:nth-child(3n + 2) { grid-column: span 2; }
}
@media (max-width: 559px) {
  .cs-facts { grid-template-columns: minmax(0, 1fr); }
  .cs-facts > .cs-fact:last-child:nth-child(odd) { grid-column: auto; }
}

/* Diagrams: desktop variant above 720px, stacked variant at 720px and below. Only one is exposed. */
.diagram { margin: 2.25rem 0 0.75rem; }
.diagram-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.diagram-scroll:focus-visible { outline: 1px solid var(--border-strong); outline-offset: 4px; border-radius: 6px; }
.diagram svg { display: block; width: 100%; height: auto; }
.diagram .dg-mobile { display: none; }
.diagram figcaption { margin-top: 0.9rem; color: var(--ink-muted); font-size: 0.9rem; line-height: 1.55; max-width: 70ch; }
@media (min-width: 721px) and (max-width: 1000px) {
  /* Keep desktop labels legible on tablets: the diagram scrolls inside its own box, not the page. */
  .diagram .dg-desktop { min-width: 1000px; }
}
@media (max-width: 720px) {
  .diagram .dg-desktop { display: none; }
  .diagram .dg-mobile { display: block; }
}

/* Diagram primitives (SVG classes used by src/diagrams/*.svg). */
.dg .dg-box { fill: rgba(255, 255, 255, 0.04); stroke: rgba(229, 229, 229, 0.42); stroke-width: 1; }
.dg .dg-box.dg-hi { fill: rgba(110, 231, 183, 0.05); stroke: #6ee7b7; }
.dg .dg-line { fill: none; stroke: rgba(229, 229, 229, 0.28); stroke-width: 1; }
.dg .dg-edge { fill: none; stroke: rgba(229, 229, 229, 0.6); stroke-width: 1; }
.dg .dg-edge.dg-dash { stroke-dasharray: 4 4; }
.dg .dg-edge.dg-hi, .dg .dg-line.dg-hi { stroke: #6ee7b7; }
.dg text { font-family: var(--font-mono); }
.dg .dg-t { fill: #f5f5f2; letter-spacing: 0.02em; }
.dg .dg-t.dg-hi-t { fill: #6ee7b7; }
.dg .dg-s { fill: #9a9aa5; }
.dg .dg-e { fill: #c8c8d0; }
.dg .dg-cap { fill: #8a8a95; text-transform: uppercase; letter-spacing: 0.06em; }
.dg .dg-tag { fill: #6ee7b7; text-transform: uppercase; letter-spacing: 0.06em; }
.dg-desktop .dg-t { font-size: 11px; }
.dg-desktop .dg-s { font-size: 10px; }
.dg-desktop .dg-e { font-size: 10px; }
.dg-desktop .dg-cap { font-size: 10px; }
.dg-desktop .dg-tag { font-size: 10px; }
.dg-mobile .dg-t { font-size: 13px; }
.dg-mobile .dg-s { font-size: 11.5px; }
.dg-mobile .dg-e { font-size: 11.5px; }
.dg-mobile .dg-cap { font-size: 11.5px; }
.dg-mobile .dg-tag { font-size: 11.5px; }

/* Tap targets (44px minimum) for header nav, burger, header and mobile CTA, and footer links. */
.nav-menu a { min-height: 44px; min-width: 44px; display: inline-flex; align-items: center; justify-content: center; padding-inline: 0.5rem; box-sizing: border-box; }
.nav-start-mobile .btn, .header-actions .btn { min-height: 44px; }
.mobile-toggle { min-width: 44px; min-height: 44px; }
.footer a { display: inline-flex; align-items: center; min-height: 44px; }
/* Headings and sections land below the fixed bar when reached by a jump or scrollIntoView. */
main h1, main h2, main section, :target { scroll-margin-top: 6rem; }

/* ==========================================================================
   First-visit privacy notice (#ix-notice). A notice, not a consent gate.
   Non-modal: no focus trap, no backdrop, page stays scrollable and clickable.
   ========================================================================== */
.ix-notice {
  position: fixed;
  left: 16px;
  bottom: 16px;
  z-index: 75; /* above page content and the header (60), below the contact modal (90) */
  width: min(420px, calc(100vw - 32px));
  max-width: 420px;
  padding: 1.1rem 1.2rem;
  background: rgba(7, 7, 9, 0.86);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
  color: var(--ink);
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 200ms var(--ease), transform 200ms var(--ease);
}
.ix-notice.is-in { opacity: 1; transform: none; }
.ix-notice-kicker { font-size: 0.68rem; color: var(--ink-dim); margin-bottom: 0.35rem; }
.ix-notice-title {
  font-family: var(--font-display);
  font-size: 0.98rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.3;
  color: var(--ink);
  margin-bottom: 0.45rem;
}
.ix-notice-body { font-size: 0.84rem; line-height: 1.55; color: var(--ink-secondary); }
.ix-notice-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0 1.1rem;
  margin-top: 0.7rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.02em;
}
.ix-notice-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--ink-muted);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.ix-notice-links a:hover, .ix-notice-links a:focus-visible { color: var(--ink); }
.ix-notice-actions { margin-top: 0.4rem; }
.ix-notice .btn { min-height: 44px; }

@media (max-width: 720px) {
  .ix-notice {
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-width: none;
    border-radius: 12px 12px 0 0;
    border-bottom: 0;
    padding: 1.1rem 1.2rem calc(1.1rem + env(safe-area-inset-bottom));
  }
}

@media (prefers-reduced-motion: reduce) {
  .ix-notice { transition: none; transform: none; }
}
