/* ==========================================================================
   SQL Server Expert — design system
   Michael Paycer · Senior SQL Server Database Administrator Consultant

   Architecture
     1  Tokens                8  Bento tiles
     2  Base + grain          9  Technical diagrams
     3  Typography           10  Article / prose
     4  Layout primitives    11  Contact + CTA
     5  Nav island           12  Footer
     6  Buttons              13  Search
     7  Bezel (nested card)  14  Motion
                             15  Responsive
   ========================================================================== */

/* ==========================================================================
   1  TOKENS
   ========================================================================== */

:root {
  --radius-xl: 28px;
  --radius: 18px;
  --radius-btn: 999px;
  --radius-sm: 12px;

  --maxw: 1220px;
  --maxw-wide: 1400px;
  --maxw-read: 730px;

  /* Motion — mass and spring, never linear */
  --ease: cubic-bezier(0.32, 0.72, 0, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  --font-serif: "Fraunces", Georgia, "Times New Roman", serif;
  --font-sans: "Space Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  /* Vertical rhythm — sections breathe heavily */
  --sp-section: clamp(84px, 9vw, 152px);
  --sp-block: clamp(48px, 5vw, 80px);
}

.theme-dark {
  /* Near-black, tinted warm so the gold sits in the same family */
  --ink: #08090b;
  --ink-2: #0d0f13;
  --surface: #101318;
  --surface-2: #151920;
  --surface-glass: rgba(21, 25, 32, 0.72);

  --line: rgba(234, 232, 226, 0.075);
  --line-strong: rgba(234, 232, 226, 0.14);
  --line-bright: rgba(234, 232, 226, 0.22);

  --text: #e6e4de;
  --heading: #f4f2ec;
  --muted: #a3a19a;
  --faint: #6f6d67;

  --accent: #d1a460;
  --accent-bright: #e6c088;
  --accent-deep: #8a6524;
  --link: #e0b878;
  --link-hover: #f0d3a2;
  --btn-ink: #1a1206;

  --glow-a: rgba(209, 164, 96, 0.10);
  --glow-b: rgba(96, 132, 209, 0.055);

  /* Shadows tinted to the background hue, never pure black */
  --shadow-sm: 0 2px 8px -2px rgba(4, 5, 8, 0.7);
  --shadow: 0 24px 60px -30px rgba(4, 5, 8, 0.95);
  --shadow-lg: 0 48px 110px -50px rgba(4, 5, 8, 1);
  --shadow-gold: 0 18px 44px -20px rgba(138, 101, 36, 0.55);

  /* Inner highlight for the bezel core */
  --inset-hi: inset 0 1px 0 rgba(255, 255, 255, 0.045);

  color-scheme: dark;
}

* { box-sizing: border-box; }

/* ==========================================================================
   2  BASE + GRAIN
   ========================================================================== */

html {
  scroll-behavior: smooth;
  scroll-padding-top: 120px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--ink);
  line-height: 1.68;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  font-feature-settings: "kern" 1, "liga" 1;
}

/* Ambient mesh — two offset radial fields, not a flat 45deg fade */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(46% 38% at 84% -6%, var(--glow-a), transparent 64%),
    radial-gradient(40% 34% at 6% 18%, var(--glow-b), transparent 66%),
    radial-gradient(60% 40% at 50% 108%, var(--glow-a), transparent 70%);
}

/* Film grain — fixed layer, never attached to scrolling content */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.028;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='220' height='220' filter='url(%23n)'/%3E%3C/svg%3E");
}

a { color: var(--text); text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
svg { display: block; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 40px; }
.wrap-wide { max-width: var(--maxw-wide); margin: 0 auto; padding: 0 40px; }
.reading { max-width: var(--maxw-read); }

/* ---- Accessibility ---- */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 1000;
  background: var(--accent);
  color: var(--btn-ink);
  padding: 13px 20px;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
}
.skip-link:focus { left: 18px; top: 14px; }

a:focus-visible,
button:focus-visible,
.btn:focus-visible,
summary:focus-visible,
input:focus-visible {
  outline: 2px solid var(--accent-bright);
  outline-offset: 3px;
  border-radius: 6px;
}

.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;
}

/* ==========================================================================
   3  TYPOGRAPHY
   ========================================================================== */

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 500;
  line-height: 1.1;
  color: var(--heading);
  margin: 0 0 20px;
  letter-spacing: -0.022em;
  text-wrap: balance;
}

/* Fraunces optical sizing — heavier optical grade at display sizes */
h1 {
  font-size: clamp(44px, 6.4vw, 78px);
  letter-spacing: -0.04em;
  line-height: 0.99;
  font-variation-settings: "opsz" 120, "SOFT" 0, "WONK" 0;
}
h2 {
  font-size: clamp(29px, 3.7vw, 46px);
  letter-spacing: -0.03em;
  line-height: 1.06;
  font-variation-settings: "opsz" 60;
}
h3 { font-size: 21px; letter-spacing: -0.018em; line-height: 1.24; }
h4 { font-size: 17px; letter-spacing: -0.01em; }

p { margin: 0 0 17px; max-width: 68ch; text-wrap: pretty; }
p:last-child { margin-bottom: 0; }
strong { color: var(--heading); font-weight: 600; }

/* Eyebrow tag — microscopic pill, precedes major headings */
.kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 10.5px;
  font-weight: 500;
  color: var(--accent);
  margin-bottom: 26px;
  padding: 7px 15px 7px 13px;
  border: 1px solid color-mix(in srgb, var(--accent) 26%, transparent);
  border-radius: var(--radius-btn);
  background: color-mix(in srgb, var(--accent) 7%, transparent);
}
.kicker::before {
  content: "";
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--accent);
  flex: none;
}
.kicker.plain {
  border: 0;
  background: none;
  padding: 0;
  letter-spacing: 0.22em;
}
.kicker.plain::before { width: 22px; height: 1px; border-radius: 0; opacity: 0.6; }

section {
  padding: var(--sp-section) 0;
  position: relative;
}
/* Hairline separators, not heavy borders */
section + section::before {
  content: "";
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: min(100% - 80px, var(--maxw));
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line-strong) 22%, var(--line-strong) 78%, transparent);
}

.section-head { max-width: 760px; margin-bottom: var(--sp-block); }
.section-head p { color: var(--muted); font-size: 18.5px; }
.section-head.wide { max-width: 880px; }

/* Lead paragraph */
.lead { font-size: 19.5px; line-height: 1.62; color: var(--text); max-width: 60ch; }

/* Inline emphasis link inside prose blocks */
.ilink {
  color: var(--link);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  text-decoration-color: color-mix(in srgb, var(--link) 42%, transparent);
  transition: color 0.35s var(--ease), text-decoration-color 0.35s var(--ease);
}
.ilink:hover { color: var(--link-hover); text-decoration-color: var(--link-hover); }

/* ==========================================================================
   4  LAYOUT PRIMITIVES
   ========================================================================== */

/* The asymmetrical bento — the core layout archetype of this site.
   12-col grid; tiles claim different spans so no row is three equal boxes. */
.bento {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 18px;
}
.bento > .t4  { grid-column: span 4; }
.bento > .t5  { grid-column: span 5; }
.bento > .t6  { grid-column: span 6; }
.bento > .t7  { grid-column: span 7; }
.bento > .t8  { grid-column: span 8; }
.bento > .t12 { grid-column: span 12; }
.bento > .r2  { grid-row: span 2; }

/* Split — massive type one side, content the other */
.split {
  display: grid;
  grid-template-columns: 1.02fr 0.98fr;
  gap: clamp(40px, 5vw, 76px);
  align-items: center;
}
.split.top { align-items: start; }
.split.narrow-right { grid-template-columns: 1.25fr 0.75fr; }
.split.narrow-left { grid-template-columns: 0.78fr 1.22fr; }

.stack-sm { display: grid; gap: 14px; }
.stack { display: grid; gap: 22px; }

/* Breadcrumbs */
.crumbs {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--faint);
  padding: 26px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  align-items: center;
}
.crumbs a { color: var(--muted); transition: color 0.35s var(--ease); }
.crumbs a:hover { color: var(--accent-bright); }
.crumbs .sep { opacity: 0.42; }
.crumbs [aria-current="page"] { color: var(--text); }

/* ==========================================================================
   5  NAV ISLAND — floating glass pill, detached from the top
   ========================================================================== */

header.site {
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 18px 0 0;
  background: none;
  border: 0;
}
header.site .wrap { padding: 0 40px; }

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 22px;
  padding: 11px 11px 11px 24px;
  border-radius: var(--radius-btn);
  background: var(--surface-glass);
  border: 1px solid var(--line-strong);
  backdrop-filter: saturate(165%) blur(20px);
  -webkit-backdrop-filter: saturate(165%) blur(20px);
  box-shadow: var(--shadow), var(--inset-hi);
  transition: box-shadow 0.7s var(--ease), border-color 0.7s var(--ease), transform 0.7s var(--ease);
}
/* Tightens subtly once the page scrolls */
header.site.scrolled .nav {
  border-color: var(--line-bright);
  box-shadow: var(--shadow-lg), var(--inset-hi);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-serif);
  font-size: 19px;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--heading);
  white-space: nowrap;
}
.brand .dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--accent);
  flex: none;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 16%, transparent);
}
.brand .by {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--faint);
  border-left: 1px solid var(--line-strong);
  padding-left: 12px;
  margin-left: 3px;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-menu > li { position: relative; }
.nav-menu a,
.has-sub > button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 14px;
  border-radius: var(--radius-btn);
  color: var(--muted);
  font: inherit;
  background: none;
  border: 0;
  cursor: pointer;
  transition: color 0.4s var(--ease), background 0.4s var(--ease);
}
.nav-menu a:hover,
.has-sub > button:hover { color: var(--heading); background: color-mix(in srgb, var(--text) 6%, transparent); }
.nav-menu a[aria-current="page"] { color: var(--accent-bright); background: color-mix(in srgb, var(--accent) 10%, transparent); }

.has-sub > button .caret { transition: transform 0.45s var(--ease); font-size: 8px; opacity: 0.75; }
.has-sub[data-open="true"] > button .caret { transform: rotate(180deg); }

.submenu {
  position: absolute;
  top: calc(100% + 14px);
  left: 0;
  min-width: 268px;
  background: var(--surface-glass);
  backdrop-filter: saturate(165%) blur(22px);
  -webkit-backdrop-filter: saturate(165%) blur(22px);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 9px;
  list-style: none;
  margin: 0;
  box-shadow: var(--shadow-lg), var(--inset-hi);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px) scale(0.98);
  transform-origin: top left;
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease), visibility 0.4s;
}
.has-sub[data-open="true"] .submenu,
.has-sub:hover .submenu,
.has-sub:focus-within .submenu {
  opacity: 1;
  visibility: visible;
  transform: none;
}
.submenu a {
  display: block;
  padding: 11px 13px;
  border-radius: 10px;
  color: var(--muted);
  letter-spacing: 0.01em;
  text-transform: none;
  font-family: var(--font-sans);
  font-size: 14px;
  transition: background 0.3s var(--ease), color 0.3s var(--ease), transform 0.3s var(--ease);
}
.submenu a:hover {
  background: color-mix(in srgb, var(--accent) 11%, transparent);
  color: var(--heading);
  transform: translateX(3px);
}
.submenu a .sm-desc {
  display: block;
  font-size: 11.5px;
  color: var(--faint);
  margin-top: 3px;
  line-height: 1.45;
}
.submenu .sub-note {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--faint);
  padding: 8px 13px 6px;
}

.nav-cta { display: inline-flex; align-items: center; gap: 10px; }

/* Hamburger — lines morph into an X */
.nav-toggle {
  display: none;
  position: relative;
  background: none;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  width: 44px; height: 44px;
  cursor: pointer;
  color: var(--text);
  align-items: center;
  justify-content: center;
  transition: border-color 0.4s var(--ease), background 0.4s var(--ease);
}
.nav-toggle:hover { border-color: var(--accent); }
.nav-toggle .bar {
  position: absolute;
  left: 13px;
  width: 18px;
  height: 1.5px;
  background: currentColor;
  border-radius: 2px;
  transition: transform 0.5s var(--ease), opacity 0.3s var(--ease);
}
.nav-toggle .bar:nth-child(1) { transform: translateY(-5px); }
.nav-toggle .bar:nth-child(3) { transform: translateY(5px); }
.mobile-open .nav-toggle .bar:nth-child(1) { transform: rotate(45deg); }
.mobile-open .nav-toggle .bar:nth-child(2) { opacity: 0; transform: scaleX(0.4); }
.mobile-open .nav-toggle .bar:nth-child(3) { transform: rotate(-45deg); }

/* ==========================================================================
   6  BUTTONS — island architecture, magnetic hover
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.005em;
  padding: 12px 12px 12px 24px;
  border-radius: var(--radius-btn);
  border: 1px solid transparent;
  cursor: pointer;
  position: relative;
  transition:
    transform 0.55s var(--ease),
    background 0.45s var(--ease),
    border-color 0.45s var(--ease),
    box-shadow 0.55s var(--ease),
    color 0.45s var(--ease);
}

/* Button-in-button: the arrow lives in its own circle, flush right */
.btn .btn-ico {
  width: 30px; height: 30px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  flex: none;
  transition: transform 0.55s var(--ease), background 0.45s var(--ease);
}
.btn:active { transform: scale(0.975); }

.btn-primary {
  background: var(--accent);
  color: var(--btn-ink);
  box-shadow: var(--shadow-gold), inset 0 1px 0 rgba(255, 255, 255, 0.22);
}
.btn-primary .btn-ico { background: rgba(26, 18, 6, 0.16); color: var(--btn-ink); }
.btn-primary:hover {
  background: var(--accent-bright);
  transform: translateY(-2px);
  box-shadow: 0 26px 56px -22px rgba(138, 101, 36, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}
.btn-primary:hover .btn-ico { transform: translate(3px, -3px) scale(1.06); background: rgba(26, 18, 6, 0.24); }

.btn-ghost {
  background: color-mix(in srgb, var(--text) 4%, transparent);
  color: var(--text);
  border-color: var(--line-strong);
  padding: 12px 24px;
  box-shadow: var(--inset-hi);
}
.btn-ghost:hover {
  border-color: color-mix(in srgb, var(--accent) 55%, transparent);
  color: var(--accent-bright);
  background: color-mix(in srgb, var(--accent) 8%, transparent);
  transform: translateY(-2px);
}
.btn-ghost .btn-ico { background: color-mix(in srgb, var(--text) 8%, transparent); }
.btn-ghost:hover .btn-ico { transform: translate(3px, -3px) scale(1.06); }

.btn-sm { font-size: 13.5px; padding: 9px 9px 9px 18px; gap: 11px; }
.btn-sm .btn-ico { width: 25px; height: 25px; font-size: 11.5px; }
.btn-sm.btn-ghost { padding: 9px 18px; }

.nav .btn { text-transform: none; }

.cta-row { display: flex; gap: 14px; margin-top: 38px; flex-wrap: wrap; align-items: center; }

/* Quiet text link with arrow */
.textlink {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  transition: color 0.35s var(--ease);
}
.textlink .arrow { transition: transform 0.45s var(--ease); }
.textlink:hover { color: var(--accent-bright); }
.textlink:hover .arrow { transform: translateX(4px); }

/* ==========================================================================
   7  BEZEL — nested enclosure. Outer shell + inner core, concentric radii.
   ========================================================================== */

.bezel {
  padding: 6px;
  border-radius: var(--radius-xl);
  background: color-mix(in srgb, var(--text) 3.5%, transparent);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  transition: border-color 0.6s var(--ease), transform 0.6s var(--ease), box-shadow 0.6s var(--ease);
}
.bezel > .core {
  border-radius: calc(var(--radius-xl) - 6px);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--inset-hi);
  height: 100%;
  overflow: hidden;
}
.bezel:hover { border-color: var(--line-strong); }

/* Interactive bezel — lifts, and its rim warms toward gold */
a.bezel:hover,
.bezel.hoverable:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--accent) 38%, transparent);
  box-shadow: var(--shadow-lg);
}

/* ==========================================================================
   8  BENTO TILES
   ========================================================================== */

.tile {
  display: flex;
  flex-direction: column;
  padding: 32px 32px 34px;
  height: 100%;
  position: relative;
}
.tile-lg { padding: 40px 40px 42px; }
.tile h3 { margin-bottom: 12px; }
.tile p { font-size: 15px; line-height: 1.65; color: var(--muted); max-width: 54ch; }
.tile p + p { margin-top: 13px; }
.tile .tile-foot { margin-top: auto; padding-top: 24px; }

/* Index numeral */
.tile .idx {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent);
  letter-spacing: 0.14em;
  display: block;
  margin-bottom: 20px;
  font-variant-numeric: tabular-nums;
}

/* Eyebrow inside a tile */
.tile .t-eyebrow {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.17em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
  display: block;
}

/* Tile that is itself a link */
a.tile-link { color: var(--text); display: block; height: 100%; }
a.tile-link .tile { height: 100%; }

/* Featured tile — subtle gold field, used once per grid for emphasis */
.tile.feature {
  background:
    radial-gradient(90% 120% at 100% 0%, color-mix(in srgb, var(--accent) 11%, transparent), transparent 62%);
}

/* Stat block */
.statgrid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
}
.statgrid .stat {
  background: var(--surface);
  padding: 30px 26px;
  transition: background 0.5s var(--ease);
}
.statgrid .stat:hover { background: var(--surface-2); }
.stat .num {
  font-family: var(--font-serif);
  font-size: 33px;
  color: var(--heading);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: 11px;
}
.stat .num .accent { color: var(--accent); }
.stat .lbl {
  font-family: var(--font-mono);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.13em;
  color: var(--faint);
  line-height: 1.5;
}

/* Checklist */
.check-list { list-style: none; margin: 0; padding: 0; }
.check-list li {
  position: relative;
  padding: 14px 0 14px 34px;
  border-top: 1px solid var(--line);
  color: var(--text);
  font-size: 15.5px;
  line-height: 1.55;
}
.check-list li:first-child { border-top: none; padding-top: 0; }
.check-list li:first-child::before { top: 6px; }
.check-list li::before {
  content: "";
  position: absolute;
  left: 4px; top: 20px;
  width: 7px; height: 7px;
  border-right: 1.5px solid var(--accent);
  border-bottom: 1.5px solid var(--accent);
  transform: rotate(45deg);
}

/* Numbered rows */
.rows { border-top: 1px solid var(--line); }
.row {
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 32px;
  padding: 34px 12px;
  border-bottom: 1px solid var(--line);
  transition: padding-left 0.6s var(--ease), background 0.6s var(--ease);
}
.row:hover { background: color-mix(in srgb, var(--text) 2%, transparent); padding-left: 26px; }
.row .r-idx {
  font-family: var(--font-serif);
  font-size: 30px;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.row h3 { margin-bottom: 11px; }
.row p { font-size: 15.5px; max-width: 76ch; color: var(--muted); }

/* Chips */
.chips { display: flex; flex-wrap: wrap; gap: 9px; margin: 24px 0 0; }
.chip {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 8px 15px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-btn);
  background: color-mix(in srgb, var(--text) 3%, transparent);
  transition: border-color 0.4s var(--ease), color 0.4s var(--ease), transform 0.4s var(--ease);
}
a.chip:hover {
  border-color: color-mix(in srgb, var(--accent) 55%, transparent);
  color: var(--accent-bright);
  transform: translateY(-2px);
}

/* Profile links */
.profiles { display: grid; gap: 11px; }
.profile-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 19px 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font-weight: 500;
  font-size: 15px;
  box-shadow: var(--inset-hi);
  transition: transform 0.55s var(--ease), border-color 0.55s var(--ease), background 0.55s var(--ease);
}
.profile-link:hover {
  transform: translateX(6px);
  border-color: color-mix(in srgb, var(--accent) 45%, transparent);
  background: var(--surface-2);
}
.profile-link .arrow { color: var(--accent); transition: transform 0.55s var(--ease); }
.profile-link:hover .arrow { transform: translate(3px, -3px); }

/* ==========================================================================
   9  TECHNICAL DIAGRAMS — bespoke SVG figures, the site's visual signature
   ========================================================================== */

.diagram {
  width: 100%;
  height: auto;
  display: block;
  overflow: visible;
}
.diagram-wrap {
  padding: 34px 30px;
  background:
    radial-gradient(70% 90% at 78% 4%, color-mix(in srgb, var(--accent) 7%, transparent), transparent 64%),
    var(--surface);
  position: relative;
}
/* Blueprint grid behind figures */
.diagram-wrap::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.5;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: radial-gradient(72% 68% at 50% 45%, #000 30%, transparent 78%);
  -webkit-mask-image: radial-gradient(72% 68% at 50% 45%, #000 30%, transparent 78%);
}
.diagram-wrap > * { position: relative; }

.diagram-cap {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--faint);
  margin-top: 20px;
  display: flex;
  align-items: center;
  gap: 9px;
}
.diagram-cap::before {
  content: "";
  width: 16px; height: 1px;
  background: var(--accent);
  flex: none;
}

/* SVG token classes used inside diagrams */
.dg-node { fill: var(--surface-2); stroke: var(--line-bright); stroke-width: 1; }
.dg-node-a { fill: color-mix(in srgb, var(--accent) 14%, var(--surface-2)); stroke: color-mix(in srgb, var(--accent) 55%, transparent); stroke-width: 1; }
.dg-line { stroke: var(--line-bright); stroke-width: 1; fill: none; }
.dg-line-a { stroke: var(--accent); stroke-width: 1.25; fill: none; }
.dg-line-dash { stroke: var(--line-bright); stroke-width: 1; fill: none; stroke-dasharray: 3 4; }
.dg-t { fill: var(--text); font-family: var(--font-sans); font-size: 12px; font-weight: 500; }
.dg-ts { fill: var(--faint); font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.1em; text-transform: uppercase; }
.dg-ta { fill: var(--accent); font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.1em; text-transform: uppercase; }
.dg-bar { fill: var(--accent); }
.dg-bar-q { fill: var(--line-bright); }

/* Code sample */
.code {
  margin: 28px 0;
  border-radius: var(--radius);
  border: 1px solid var(--line-strong);
  background: #0a0c0f;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.code-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 11px 18px;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--text) 3%, transparent);
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--faint);
}
.code pre {
  margin: 0;
  padding: 20px 22px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.72;
  color: #cfd4dd;
  tab-size: 2;
}
.code .k { color: #7fb3e8; }
.code .s { color: #c8a06a; }
.code .c { color: #6b7280; font-style: italic; }
.code .f { color: #b99ce0; }
.code .n { color: #90c9a8; }

/* ==========================================================================
   10  ARTICLE / PROSE
   ========================================================================== */

.article { padding: 44px 0 var(--sp-section); }
.article-header { max-width: var(--maxw-read); margin: 0 auto 44px; }
.article-header h1 { margin-bottom: 22px; font-size: clamp(36px, 4.8vw, 56px); }
.article-lead { font-size: 20px; line-height: 1.62; color: var(--muted); max-width: var(--maxw-read); }
.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 26px;
  margin-top: 30px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--faint);
  align-items: center;
}
.article-meta strong { color: var(--muted); font-weight: 500; }
.article-meta a { color: var(--link); }

.prose { max-width: var(--maxw-read); margin: 0 auto; }
.prose > * { max-width: 100%; }
.prose h2 {
  font-size: clamp(26px, 3vw, 34px);
  margin: 60px 0 18px;
  scroll-margin-top: 120px;
}
.prose h3 { font-size: 21px; margin: 38px 0 13px; scroll-margin-top: 120px; }
.prose p { color: var(--text); margin: 0 0 21px; max-width: 100%; }
.prose a {
  color: var(--link);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  text-decoration-color: color-mix(in srgb, var(--link) 42%, transparent);
  transition: color 0.35s var(--ease), text-decoration-color 0.35s var(--ease);
}
.prose a:hover { color: var(--link-hover); text-decoration-color: var(--link-hover); }
.prose ul, .prose ol { color: var(--text); margin: 0 0 24px; padding-left: 24px; }
.prose li { margin-bottom: 10px; padding-left: 5px; }
.prose li::marker { color: var(--accent); }
.prose figure { margin: 36px 0; }
.prose figcaption {
  font-size: 13px;
  color: var(--faint);
  margin-top: 12px;
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
  line-height: 1.6;
}
.prose blockquote {
  margin: 34px 0;
  padding: 8px 0 8px 28px;
  border-left: 2px solid var(--accent);
  font-family: var(--font-serif);
  font-size: 22px;
  line-height: 1.44;
  color: var(--heading);
  font-style: italic;
}
.prose blockquote cite {
  display: block;
  margin-top: 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-style: normal;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--faint);
}
.prose .code, .prose .diagram-wrap, .prose .facttable { margin-left: 0; margin-right: 0; }
.prose > .bezel { margin: 34px 0; }

/* Direct-answer block — the featured-snippet target */
.answer {
  margin: 0 0 36px;
  padding: 28px 30px;
  border: 1px solid var(--line-strong);
  border-left: 2px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background:
    linear-gradient(100deg, color-mix(in srgb, var(--accent) 9%, var(--surface)), var(--surface) 70%);
  box-shadow: var(--inset-hi);
}
.answer .answer-q {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}
.answer p { font-size: 17.5px; color: var(--heading); margin: 0 0 14px; max-width: 100%; line-height: 1.6; }
.answer p:last-child { margin-bottom: 0; }

/* Callout */
.callout {
  margin: 32px 0;
  padding: 24px 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--text) 2.6%, transparent);
}
.callout .callout-title {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}
.callout p { font-size: 15px; color: var(--muted); margin-bottom: 12px; }
.callout p:last-child { margin-bottom: 0; }
.callout.warn { border-color: color-mix(in srgb, #c98b5a 34%, transparent); }
.callout.warn .callout-title { color: #d9a071; }

/* Fact table */
.facttable {
  width: 100%;
  border-collapse: collapse;
  margin: 30px 0;
  font-size: 14.5px;
}
.facttable caption {
  text-align: left;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}
.facttable th, .facttable td {
  text-align: left;
  padding: 14px 15px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  line-height: 1.6;
}
.facttable thead th {
  color: var(--heading);
  font-weight: 600;
  font-size: 12px;
  font-family: var(--font-mono);
  letter-spacing: 0.09em;
  text-transform: uppercase;
  border-bottom-color: var(--line-strong);
}
.facttable tbody th { color: var(--heading); font-weight: 600; width: 32%; }
.facttable td { color: var(--muted); }
.facttable tbody tr:hover td, .facttable tbody tr:hover th { background: color-mix(in srgb, var(--text) 2%, transparent); }
.facttable code { font-family: var(--font-mono); font-size: 13px; color: var(--accent-bright); }
.table-scroll { overflow-x: auto; margin: 30px 0; }
.table-scroll .facttable { margin: 0; }

/* Inline code */
.prose code, .tile code, p code, li code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  color: var(--accent-bright);
  background: color-mix(in srgb, var(--accent) 9%, transparent);
  padding: 2px 6px;
  border-radius: 5px;
  border: 1px solid color-mix(in srgb, var(--accent) 16%, transparent);
}
.prose pre code { background: none; border: 0; padding: 0; color: inherit; font-size: inherit; }

/* Table of contents */
.toc {
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 24px 26px;
  background: color-mix(in srgb, var(--text) 2.4%, transparent);
  margin: 0 auto 46px;
  max-width: var(--maxw-read);
  box-shadow: var(--inset-hi);
}
.toc .toc-title {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}
.toc ol { margin: 0; padding-left: 20px; columns: 2; column-gap: 34px; }
.toc li { margin-bottom: 9px; break-inside: avoid; }
.toc a { color: var(--muted); font-size: 14.5px; transition: color 0.3s var(--ease); }
.toc a:hover { color: var(--link-hover); }

/* FAQ */
.faq-item { padding: 28px 0; border-top: 1px solid var(--line); }
.faq-item:first-of-type { border-top: none; }
.faq-item h3 { margin-bottom: 11px; font-size: 20px; }
.faq-item p { max-width: 80ch; color: var(--muted); }

/* Related strip */
.related { max-width: var(--maxw-read); margin: 64px auto 0; padding-top: 40px; border-top: 1px solid var(--line); }
.related h2 { font-size: 22px; margin-bottom: 24px; }
.related-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.related-grid a {
  display: block;
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  box-shadow: var(--inset-hi);
  transition: border-color 0.5s var(--ease), transform 0.5s var(--ease), background 0.5s var(--ease);
}
.related-grid a:hover {
  border-color: color-mix(in srgb, var(--accent) 45%, transparent);
  transform: translateY(-3px);
  background: var(--surface-2);
}
.related-grid .rel-k {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  display: block;
  margin-bottom: 7px;
}
.related-grid .rel-t { color: var(--heading); font-weight: 600; font-size: 15.5px; line-height: 1.4; }

/* Author box */
.author-box {
  max-width: var(--maxw-read);
  margin: 60px auto 0;
  padding: 28px 30px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--inset-hi);
  display: flex;
  gap: 24px;
  align-items: flex-start;
}
.author-box img {
  width: 80px; height: 80px;
  border-radius: 16px;
  object-fit: cover;
  filter: grayscale(100%) contrast(1.05);
  border: 1px solid var(--line-strong);
  flex: none;
}
.author-box .ab-k {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.17em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}
.author-box h2 { font-size: 19px; margin: 0 0 9px; }
.author-box p { font-size: 14.5px; color: var(--muted); margin: 0 0 14px; }
.author-box .ab-links {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}
.author-box .ab-links a { color: var(--accent); transition: color 0.3s var(--ease); }
.author-box .ab-links a:hover { color: var(--accent-bright); }

/* Verified pill */
.verified {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
  padding: 8px 15px;
  border: 1px solid var(--line);
  border-radius: var(--radius-btn);
}
.verified .tick { color: var(--accent); }

/* Sources */
.sources { max-width: var(--maxw-read); margin: 48px auto 0; padding-top: 30px; border-top: 1px solid var(--line); }
.sources h2 { font-size: 18px; margin-bottom: 16px; }
.sources ol { margin: 0; padding-left: 22px; }
.sources li { font-size: 13.5px; color: var(--muted); margin-bottom: 9px; line-height: 1.6; }
.sources a { color: var(--link); }

/* Soft CTA inside articles */
.softcta {
  max-width: var(--maxw-read);
  margin: 60px auto 0;
  padding: 34px 36px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background:
    radial-gradient(80% 130% at 100% 0%, color-mix(in srgb, var(--accent) 9%, transparent), transparent 62%),
    var(--surface);
  box-shadow: var(--inset-hi);
}
.softcta h2 { font-size: 23px; margin-bottom: 11px; }
.softcta p { color: var(--muted); font-size: 15.5px; }
.softcta .cta-row { margin-top: 24px; }

/* ==========================================================================
   11  CONTACT + CTA
   ========================================================================== */

.contact-card { padding: clamp(44px, 6vw, 76px) clamp(28px, 5vw, 64px); }
.contact-card h2 { font-size: clamp(30px, 4.2vw, 50px); max-width: 17ch; }
.contact-card p { font-size: 17.5px; max-width: 58ch; color: var(--muted); }
.contact-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 22px 52px;
  margin-top: 44px;
  padding-top: 34px;
  border-top: 1px solid var(--line);
}
.contact-meta .item { display: flex; flex-direction: column; gap: 6px; }
.contact-meta .item .k {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--faint);
}
.contact-meta .item a {
  font-size: 17.5px;
  color: var(--text);
  font-weight: 500;
  transition: color 0.35s var(--ease);
}
.contact-meta .item a:hover { color: var(--accent-bright); }

/* ==========================================================================
   12  FOOTER
   ========================================================================== */

footer.site {
  padding: var(--sp-block) 0 60px;
  border-top: 1px solid var(--line);
  background:
    radial-gradient(60% 100% at 50% 100%, color-mix(in srgb, var(--accent) 4%, transparent), transparent 70%),
    var(--ink);
  position: relative;
}
.foot-top {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 44px;
  padding-bottom: 44px;
  border-bottom: 1px solid var(--line);
}
.foot-col h4 {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 18px;
  font-weight: 400;
}
.foot-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 11px; }
.foot-col a { color: var(--muted); font-size: 14.5px; transition: color 0.35s var(--ease); }
.foot-col a:hover { color: var(--accent-bright); }
.foot-brand .brand { margin-bottom: 16px; }
.foot-brand p { font-size: 14px; color: var(--faint); max-width: 38ch; margin-bottom: 20px; }
.foot-social { display: flex; gap: 10px; }
.foot-social a {
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  transition: border-color 0.4s var(--ease), color 0.4s var(--ease), transform 0.4s var(--ease);
}
.foot-social a:hover { border-color: var(--accent); color: var(--accent-bright); transform: translateY(-2px); }
.foot-social svg { width: 16px; height: 16px; }
.foot-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  padding-top: 30px;
  font-size: 13.5px;
  color: var(--faint);
}
.foot-bottom .foot-links { display: flex; gap: 24px; flex-wrap: wrap; }
.foot-bottom a { color: var(--muted); transition: color 0.35s var(--ease); }
.foot-bottom a:hover { color: var(--accent-bright); }

/* ==========================================================================
   13  SEARCH
   ========================================================================== */

.search-wrap { position: relative; }
.search-input {
  font-family: var(--font-sans);
  font-size: 13.5px;
  color: var(--text);
  background: color-mix(in srgb, var(--text) 5%, transparent);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-btn);
  padding: 10px 16px 10px 38px;
  width: 190px;
  transition: border-color 0.4s var(--ease), width 0.5s var(--ease), background 0.4s var(--ease);
}
.search-input::placeholder { color: var(--faint); }
.search-input:focus {
  border-color: color-mix(in srgb, var(--accent) 55%, transparent);
  width: 230px;
  outline: none;
  background: color-mix(in srgb, var(--text) 8%, transparent);
}
.search-wrap .s-ico {
  position: absolute;
  left: 15px; top: 50%;
  transform: translateY(-50%);
  color: var(--faint);
  pointer-events: none;
}
.search-results {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: 400px;
  max-width: 84vw;
  max-height: 62vh;
  overflow-y: auto;
  background: var(--surface-glass);
  backdrop-filter: saturate(165%) blur(22px);
  -webkit-backdrop-filter: saturate(165%) blur(22px);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 8px;
  display: none;
  z-index: 200;
}
.search-results.open { display: block; }
.search-results a {
  display: block;
  padding: 12px 14px;
  border-radius: 10px;
  color: var(--text);
  transition: background 0.25s var(--ease);
}
.search-results a:hover, .search-results a.active { background: color-mix(in srgb, var(--accent) 12%, transparent); }
.search-results .sr-cat {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  display: block;
  margin-bottom: 4px;
}
.search-results .sr-title { font-size: 14.5px; color: var(--heading); line-height: 1.4; }
.search-results .sr-empty { padding: 18px; color: var(--faint); font-size: 14px; line-height: 1.6; }

/* ==========================================================================
   14  MOTION — heavy fade-up with blur resolve, staggered
   ========================================================================== */

.reveal {
  opacity: 0;
  transform: translateY(26px);
  filter: blur(6px);
  transition:
    opacity 0.9s var(--ease-out),
    transform 0.9s var(--ease-out),
    filter 0.9s var(--ease-out);
}
.reveal.in { opacity: 1; transform: none; filter: none; }

/* Stagger children of a revealed container */
.stagger > * { transition-delay: 0ms; }
.stagger.in > *:nth-child(1) { transition-delay: 0ms; }
.stagger.in > *:nth-child(2) { transition-delay: 70ms; }
.stagger.in > *:nth-child(3) { transition-delay: 140ms; }
.stagger.in > *:nth-child(4) { transition-delay: 210ms; }
.stagger.in > *:nth-child(5) { transition-delay: 280ms; }
.stagger.in > *:nth-child(6) { transition-delay: 350ms; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; filter: none; transition: none; }
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
@media (scripting: none) {
  .reveal { opacity: 1; transform: none; filter: none; transition: none; }
}
.no-js .reveal { opacity: 1; transform: none; filter: none; transition: none; }

/* ==========================================================================
   15  RESPONSIVE
   ========================================================================== */

@media (max-width: 1080px) {
  .bento > .t4, .bento > .t5, .bento > .t7, .bento > .t8 { grid-column: span 6; }
  .bento > .r2 { grid-row: span 1; }
  .statgrid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  .nav-menu, .search-wrap.desktop { display: none; }
  .nav-toggle { display: inline-flex; }
  .nav { padding: 10px 10px 10px 20px; }

  header.site.mobile-open .nav-menu {
    display: flex;
    position: absolute;
    top: calc(100% + 12px);
    left: 40px; right: 40px;
    flex-direction: column;
    align-items: stretch;
    gap: 3px;
    background: var(--surface-glass);
    backdrop-filter: saturate(165%) blur(22px);
    -webkit-backdrop-filter: saturate(165%) blur(22px);
    border: 1px solid var(--line-strong);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: 14px;
    font-size: 13px;
  }
  header.site.mobile-open .nav-menu > li > a,
  header.site.mobile-open .has-sub > button { width: 100%; justify-content: space-between; padding: 13px 14px; }
  header.site.mobile-open .submenu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: 0;
    background: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    padding: 2px 0 6px 12px;
    min-width: 0;
  }
  header.site.mobile-open .has-sub[data-open="false"] .submenu { display: none; }

  /* Staggered reveal of mobile nav items */
  header.site.mobile-open .nav-menu > li {
    animation: navIn 0.55s var(--ease-out) both;
  }
  header.site.mobile-open .nav-menu > li:nth-child(1) { animation-delay: 40ms; }
  header.site.mobile-open .nav-menu > li:nth-child(2) { animation-delay: 90ms; }
  header.site.mobile-open .nav-menu > li:nth-child(3) { animation-delay: 140ms; }
  header.site.mobile-open .nav-menu > li:nth-child(4) { animation-delay: 190ms; }
  header.site.mobile-open .nav-menu > li:nth-child(5) { animation-delay: 240ms; }

  .split, .split.narrow-right, .split.narrow-left { grid-template-columns: 1fr; gap: 40px; }
  .foot-top { grid-template-columns: 1fr 1fr; gap: 34px; }
  .related-grid { grid-template-columns: 1fr; }
}

@keyframes navIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}

@media (max-width: 768px) {
  .bento { gap: 14px; }
  .bento > .t4, .bento > .t5, .bento > .t6,
  .bento > .t7, .bento > .t8, .bento > .t12 { grid-column: span 12; }
  .tile, .tile-lg { padding: 28px 26px 30px; }
  .toc ol { columns: 1; }
}

@media (max-width: 620px) {
  body { font-size: 16.5px; }
  .wrap, .wrap-wide, header.site .wrap { padding: 0 20px; }
  header.site.mobile-open .nav-menu { left: 20px; right: 20px; }
  section + section::before { width: calc(100% - 40px); }
  .statgrid { grid-template-columns: 1fr; }
  .row { grid-template-columns: 48px 1fr; gap: 18px; padding: 28px 6px; }
  .contact-meta { gap: 20px 32px; }
  .foot-top { grid-template-columns: 1fr; }
  .prose blockquote { font-size: 19px; padding-left: 20px; }
  .author-box { flex-direction: column; gap: 18px; }
  .diagram-wrap { padding: 24px 18px; }
  .code pre { font-size: 12px; padding: 16px 18px; }
}

/* ---------- Print ---------- */
@media print {
  body::before, body::after, header.site, footer.site, .softcta, .cta-row { display: none !important; }
  body { background: #fff; color: #000; }
  .prose a { color: #000; }
}
