/* ============================================================
   infradb.sh: shared stylesheet (home, docs, 404).
   Dark only, in InfraDB's own NOC palette: the tokens below are the
   product's dark theme (web/src/styles/tokens.css), its fonts are
   Montserrat (display), IBM Plex Sans (text) and IBM Plex Mono
   (machine values), all self-hosted. Status colours are used
   sparingly, and status is never colour alone: glyph + word.
   ============================================================ */

/* ---------- Fonts (self-hosted, OFL; see assets/fonts/LICENSE-*.txt) ---------- */
@font-face {
  font-family: "Montserrat";
  src: url("../assets/fonts/Montserrat-Variable-latin.woff2") format("woff2-variations"),
       url("../assets/fonts/Montserrat-Variable-latin.woff2") format("woff2");
  font-weight: 100 900; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "IBM Plex Sans";
  src: url("../assets/fonts/IBMPlexSans-400-latin.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "IBM Plex Sans";
  src: url("../assets/fonts/IBMPlexSans-500-latin.woff2") format("woff2");
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "IBM Plex Sans";
  src: url("../assets/fonts/IBMPlexSans-600-latin.woff2") format("woff2");
  font-weight: 600 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("../assets/fonts/IBMPlexMono-400-latin.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("../assets/fonts/IBMPlexMono-500-latin.woff2") format("woff2");
  font-weight: 500 700; font-style: normal; font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  color-scheme: dark;

  /* Product palette, dark (tokens.css) */
  --bg: #0f1419;
  --surface: #141a1f;
  --surface-raised: #1a2127;
  --surface-overlay: #212930;
  --line: #29323a;
  --line-strong: #6f7b83;
  --ink: #f5f6f2;
  --ink-muted: #c9c9c3;
  --ink-subtle: #99a19a;
  --sage: #6b7f6b;
  --sage-text: #a3b5a0;
  --accent: #b4c4b0;
  --accent-hover: #c7d4c3;
  --on-accent: #0f1419;
  --focus-ring: #c7d4c3;

  /* Status and severity (glyph + word, never colour alone) */
  --ok: #5db8a5;
  --warn: #e3b25e;
  --crit: #f08468;
  --info: #86aed4;
  --maj: #ea9964;
  --sev-warning: #c5ab76;

  /* Chart series */
  --c1: #5b9a50; --c2: #8b74d8; --c3: #a88a1e; --c4: #cc6491; --c5: #4a88cc; --c6: #c8703c;

  /* Site-only shades, derived from the palette */
  --band: #0b1014;            /* alternate section band, slightly deeper than --bg */
  --stage-bg: #0a0f13;        /* demo stages */
  --line-soft: #1d252c;       /* hairlines inside cards */
  --header-bg: rgba(15, 20, 25, 0.78);
  --glow: rgba(180, 196, 176, 0.1);
  --grad-text: linear-gradient(100deg, #e9efe6 0%, #b4c4b0 38%, #86c7b6 72%, #5db8a5 100%);

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.32);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 24px 64px rgba(0, 0, 0, 0.5);

  --font-display: "Montserrat", "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-sans: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --ease: cubic-bezier(0.2, 0, 0, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --header-h: 64px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); -webkit-text-size-adjust: 100%; }
body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg, video, canvas { display: block; max-width: 100%; }
img { height: auto; }
button { font: inherit; color: inherit; }
ul, ol { list-style: none; }
a { color: var(--sage-text); text-decoration: none; transition: color 0.15s ease; }
a:hover { color: var(--accent-hover); }
p a, li a, dd a, td a, .faq a { text-decoration: underline; text-decoration-color: rgba(163, 181, 160, 0.4); text-underline-offset: 3px; }
p a:hover, li a:hover, dd a:hover, td a:hover, .faq a:hover { text-decoration-color: currentColor; }
a.text-link, a.btn { text-decoration: none; }
:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; border-radius: 4px; }
::selection { background: rgba(180, 196, 176, 0.3); color: var(--ink); }

h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; line-height: 1.12; letter-spacing: -0.015em; color: var(--ink); }
code, kbd, pre, samp { font-family: var(--font-mono); font-weight: 400; }
strong, b { font-weight: 600; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  padding: 10px 16px; border-radius: 8px;
  background: var(--accent); color: var(--on-accent); font-weight: 600;
  transition: top 0.2s ease;
}
.skip-link:focus { top: 12px; color: var(--on-accent); }

.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 28px; }
.container-wide { max-width: 1320px; }
.mono { font-family: var(--font-mono); }

/* Status glyphs, as in the product (ui.tsx): circle, triangle, diamond, ring */
.glyph { display: inline-block; width: 9px; height: 9px; flex: none; vertical-align: 0; fill: currentColor; }
.t-ok { color: var(--ok); }
.t-warn { color: var(--warn); }
.t-crit { color: var(--crit); }
.t-info { color: var(--info); }
.t-maj { color: var(--maj); }
.t-sevw { color: var(--sev-warning); }

/* ---------- Scroll reveal (only once JS has run; boot.js adds .js) ---------- */
.js .reveal {
  opacity: 0; transform: translateY(20px);
  transition: opacity 0.8s var(--ease-out) var(--d, 0ms), transform 0.8s var(--ease-out) var(--d, 0ms);
}
.js .reveal.is-in { opacity: 1; transform: none; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 60;
  background: var(--header-bg);
  -webkit-backdrop-filter: saturate(150%) blur(14px);
  backdrop-filter: saturate(150%) blur(14px);
  border-bottom: 1px solid rgba(41, 50, 58, 0.7);
}
.nav { display: flex; align-items: center; gap: 28px; height: var(--header-h); }
.logo { display: inline-flex; align-items: center; flex: none; min-height: 40px; border-radius: 6px; }
.logo img { height: 28px; width: auto; }
.nav-links { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nav-links > a {
  padding: 8px 12px; border-radius: 8px;
  color: var(--ink-subtle); font-size: 14.5px; font-weight: 500;
  transition: color 0.15s ease, background 0.15s ease;
}
.nav-links > a:hover, .nav-links > a[aria-current="page"] { color: var(--ink); background: rgba(245, 246, 242, 0.04); }
.nav-links > a.cta {
  margin-left: 12px; padding: 8px 18px;
  background: var(--accent); color: var(--on-accent); font-weight: 600;
  transition: background 0.15s ease, transform 0.15s ease;
}
.nav-links > a.cta:hover { background: var(--accent-hover); color: var(--on-accent); transform: translateY(-1px); }
.nav-toggle {
  display: none; margin-left: auto; align-items: center; gap: 8px;
  height: 38px; padding: 0 14px; border-radius: 8px; cursor: pointer;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  font-size: 14px; font-weight: 500;
}
.nav-toggle svg { width: 18px; height: 18px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 24px; border-radius: 10px; border: 1px solid transparent;
  font-family: var(--font-sans); font-size: 15.5px; font-weight: 600; line-height: 1.2;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(1px) scale(0.985); }
.btn svg { width: 16px; height: 16px; flex: none; transition: transform 0.2s ease; }
.btn:hover svg { transform: translateX(3px); }
.btn-primary { background: var(--accent); color: var(--on-accent); box-shadow: 0 10px 30px rgba(180, 196, 176, 0.14); }
.btn-primary:hover { background: var(--accent-hover); color: var(--on-accent); }
.btn-secondary { border-color: rgba(111, 123, 131, 0.7); background: rgba(20, 26, 31, 0.6); color: var(--ink); }
.btn-secondary:hover { border-color: var(--accent); color: var(--ink); }
.btn-ghost { color: var(--ink-muted); padding: 0 12px; }
.btn-ghost:hover { color: var(--ink); }
.text-link { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 15px; color: var(--sage-text); }
.text-link svg { width: 16px; height: 16px; transition: transform 0.2s ease; }
.text-link:hover svg { transform: translateX(3px); }

/* ---------- Sections ---------- */
section { position: relative; padding: 112px 0; }
.band { background: var(--band); border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); }
.kicker {
  display: inline-flex; align-items: center; gap: 10px; margin-bottom: 18px;
  font-family: var(--font-display); font-size: 12px; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--sage-text);
}
.kicker::before { content: ""; width: 18px; height: 1px; background: currentColor; opacity: 0.6; }
.section-head { max-width: 760px; margin: 0 auto 64px; text-align: center; }
.section-head .kicker::after { content: ""; width: 18px; height: 1px; background: currentColor; opacity: 0.6; }
.section-head h2 { font-size: clamp(32px, 4.2vw, 48px); margin-bottom: 18px; text-wrap: balance; }
.section-head p { color: var(--ink-muted); font-size: 18px; line-height: 1.6; text-wrap: pretty; }
.section-head .section-note { margin-top: 14px; color: var(--ink-subtle); font-size: 14px; line-height: 1.6; }
.section-head.left { margin-left: 0; text-align: left; }
.section-head.left .kicker::after { display: none; }
.grad {
  background: var(--grad-text); background-size: 200% auto;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  animation: grad-shift 10s ease-in-out infinite;
}
@keyframes grad-shift { 0%, 100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
.fine { color: var(--ink-subtle); font-size: 13px; line-height: 1.5; }

/* ---------- Hero ---------- */
.hero { padding: 80px 0 88px; overflow: hidden; text-align: center; isolation: isolate; }
.hex-field {
  position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%;
  -webkit-mask-image: radial-gradient(ellipse 75% 62% at 50% 28%, #000 25%, transparent 78%);
  mask-image: radial-gradient(ellipse 75% 62% at 50% 28%, #000 25%, transparent 78%);
}
.hero::before {
  content: ""; position: absolute; z-index: -1; left: 50%; top: -260px; width: 1100px; height: 700px;
  transform: translateX(-50%); pointer-events: none;
  background: radial-gradient(closest-side, rgba(180, 196, 176, 0.13), rgba(93, 184, 165, 0.04) 55%, transparent);
}
.hero-pill {
  display: inline-flex; align-items: center; gap: 10px; max-width: 100%;
  margin-bottom: 30px; padding: 6px 14px 6px 8px;
  border-radius: 999px; border: 1px solid var(--line);
  background: rgba(20, 26, 31, 0.72); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  color: var(--ink-muted); font-size: 13.5px; font-weight: 500; text-decoration: none;
  transition: border-color 0.2s ease, color 0.2s ease;
}
.hero-pill:hover { color: var(--ink); border-color: var(--line-strong); }
.hero-pill .pill-tag {
  flex: none; padding: 2px 9px; border-radius: 999px;
  background: rgba(180, 196, 176, 0.14); color: var(--accent);
  font-family: var(--font-mono); font-size: 12px; font-weight: 500;
}
.hero-pill .pill-text { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hero-pill .pill-short { display: none; }
.hero-pill svg { width: 14px; height: 14px; flex: none; transition: transform 0.2s ease; }
.hero-pill:hover svg { transform: translateX(2px); }
.hero h1 {
  max-width: 960px; margin: 0 auto 26px;
  font-size: clamp(40px, 6vw, 72px); font-weight: 600; line-height: 1.04; letter-spacing: -0.025em;
  text-wrap: balance;
}
.hero .lede {
  max-width: 790px; margin: 0 auto 40px;
  color: var(--ink-muted); font-size: clamp(17px, 1.6vw, 19.5px); line-height: 1.6; text-wrap: pretty;
}
.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.hero-meta {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; margin-top: 28px;
  font-family: var(--font-mono); font-size: 12.5px; color: var(--ink-subtle);
}
.hero-meta li { display: inline-flex; align-items: center; gap: 18px; }
.hero-meta li + li::before { content: ""; width: 3px; height: 3px; border-radius: 50%; background: var(--line-strong); margin-left: -9px; margin-right: -9px; }
.hero-demo { position: relative; margin-top: 48px; max-width: 1240px; scroll-margin-top: calc(var(--header-h) + 12px); }
.hero-demo::before {
  content: ""; position: absolute; inset: 8% 6% -4%; z-index: -1; border-radius: 40px; pointer-events: none;
  background: radial-gradient(closest-side, rgba(180, 196, 176, 0.12), transparent);
  filter: blur(30px);
}

/* ---------- Trust strip ---------- */
.trust { padding: 0; border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); background: var(--band); }
.trust-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.trust-item {
  display: flex; align-items: flex-start; gap: 14px; padding: 30px 24px;
  border-left: 1px solid var(--line-soft);
}
.trust-item:first-child { border-left: 0; padding-left: 0; }
.trust-item svg { width: 22px; height: 22px; flex: none; margin-top: 2px; color: var(--sage-text); }
.trust-item b { display: block; font-size: 15px; font-weight: 600; color: var(--ink); line-height: 1.35; }
.trust-item span { display: block; margin-top: 3px; font-size: 13.5px; color: var(--ink-subtle); line-height: 1.45; }

/* ---------- How it works: a demo beside each explanation ---------- */
.how-rows { display: grid; gap: 120px; }
.how-row { display: grid; grid-template-columns: minmax(300px, 380px) minmax(0, 1fr); gap: 64px; align-items: center; }
.how-row.flip { grid-template-columns: minmax(0, 1fr) minmax(300px, 380px); }
.how-row.flip .how-copy { order: 2; }
.how-copy .step-no {
  display: inline-flex; align-items: center; gap: 10px; margin-bottom: 16px;
  font-family: var(--font-mono); font-size: 12.5px; font-weight: 500; color: var(--sage-text);
}
.how-copy .step-no i { width: 28px; height: 1px; background: var(--line-strong); }
.how-copy h3 { font-size: clamp(26px, 2.6vw, 32px); line-height: 1.15; margin-bottom: 16px; text-wrap: balance; }
.how-copy > p { color: var(--ink-muted); font-size: 16.5px; line-height: 1.65; }
.how-points { display: grid; gap: 10px; margin: 22px 0 24px; }
.how-points li { position: relative; padding-left: 26px; color: var(--ink-muted); font-size: 15px; line-height: 1.55; }
.how-points li::before {
  content: ""; position: absolute; left: 2px; top: 0.5em; width: 9px; height: 9px; border-radius: 50%;
  border: 1.5px solid var(--sage-text);
}
.how-points code, .how-copy p code { font-size: 0.9em; color: var(--accent); }
.how-copy .fine { margin: -8px 0 22px; }
.how-stage { min-width: 0; }

/* ---------- Metrics band ---------- */
.metrics { padding: 0; }
.metrics-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.metric { padding: 52px 28px 48px; border-left: 1px solid var(--line-soft); }
.metric:first-child { border-left: 0; }
.metric-num {
  display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap;
  font-family: var(--font-display); font-size: clamp(34px, 3.6vw, 46px); font-weight: 600; letter-spacing: -0.02em; line-height: 1.05;
  color: var(--ink); font-variant-numeric: tabular-nums;
}
.metric-num small { font-family: var(--font-sans); font-size: 16px; font-weight: 500; letter-spacing: 0; color: var(--ink-subtle); }
.metric-num s { font-size: 0.5em; font-weight: 500; color: var(--ink-subtle); text-decoration-thickness: 2px; text-decoration-color: var(--crit); }
.metric-label { margin-top: 12px; color: var(--ink-muted); font-size: 14.5px; line-height: 1.5; max-width: 260px; }
.metric-label em { font-style: normal; color: var(--ink-subtle); }

/* ---------- Features: bento with micro-animations ---------- */
.bento { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-flow: dense; gap: 18px; }
.tile {
  position: relative; display: flex; flex-direction: column; overflow: hidden; min-width: 0;
  padding: 20px 20px 24px; border: 1px solid var(--line); border-radius: 16px;
  background: linear-gradient(180deg, rgba(26, 33, 39, 0.9), rgba(20, 26, 31, 0.9));
  transition: border-color 0.25s ease, transform 0.25s ease;
}
.tile::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; border-radius: inherit;
  background: radial-gradient(360px circle at var(--mx, 50%) var(--my, 0%), rgba(180, 196, 176, 0.1), transparent 45%);
  transition: opacity 0.3s ease;
}
.tile:hover { border-color: #3a454e; transform: translateY(-3px); }
.tile:hover::before { opacity: 1; }
.tile-lg { grid-column: span 2; }
.tile > h3 { margin: 20px 0 8px; font-size: 18px; font-weight: 600; letter-spacing: -0.01em; text-wrap: balance; }
/* the badge flows with the title text, so balanced lines can end with it */
.tile > h3 .new-tag { margin-left: 3px; vertical-align: 2px; }
.nowrap { white-space: nowrap; }
.tile > p { color: var(--ink-muted); font-size: 14.5px; line-height: 1.6; }
.tile > p code { font-size: 0.92em; color: var(--accent); }
.new-tag {
  display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 6px;
  border: 1px solid rgba(93, 184, 165, 0.35); background: rgba(93, 184, 165, 0.1); color: var(--ok);
  font-family: var(--font-sans); font-size: 11.5px; font-weight: 600; letter-spacing: 0.01em; line-height: 1.4;
}

/* The animated panel at the top of each tile */
.fx {
  position: relative; height: 172px; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--line-soft); border-radius: 12px; background: var(--bg);
  font-size: 12.5px; line-height: 1.4; color: var(--ink-muted);
}
.fx, .fx * { animation-play-state: paused !important; }
.tile.is-live .fx, .tile.is-live .fx * { animation-play-state: running !important; }
.fx .mono, .fx code { font-family: var(--font-mono); font-size: 11.5px; }
.fx-swap { position: relative; display: block; height: 18px; width: 100%; }
.fx-swap > span { position: absolute; inset: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@keyframes show-a { 0%, 44% { opacity: 1; transform: none; } 48%, 94% { opacity: 0; transform: translateY(-6px); } 100% { opacity: 1; transform: none; } }
@keyframes show-b { 0%, 49% { opacity: 0; transform: translateY(6px); } 54%, 89% { opacity: 1; transform: none; } 93%, 100% { opacity: 0; } }
.fx-badge {
  display: inline-flex; align-items: center; gap: 5px; padding: 1px 7px; border-radius: 6px;
  font-family: var(--font-sans); font-size: 11px; font-weight: 500; line-height: 16px; white-space: nowrap;
}
.fx-badge.crit { background: rgba(240, 132, 104, 0.14); color: var(--crit); }
.fx-badge.warn { background: rgba(227, 178, 94, 0.14); color: var(--warn); }
.fx-badge.ok { background: rgba(93, 184, 165, 0.14); color: var(--ok); }
.fx-badge.info { background: rgba(134, 174, 212, 0.14); color: var(--info); }
.fx-badge.mute { background: rgba(153, 161, 154, 0.12); color: var(--ink-subtle); }
.fx-badge .glyph { width: 8px; height: 8px; }

/* One outage, one alarm */
.ou { width: calc(100% - 28px); max-width: 470px; }
.ou-row {
  display: grid; grid-template-columns: 76px minmax(0, 1fr) auto; align-items: center; gap: 10px;
  padding: 6px 10px; border-bottom: 1px solid var(--line-soft);
}
.ou-head { border-radius: 8px 8px 0 0; background: var(--surface); animation: ou-flash 8s infinite; }
.ou-host { font-family: var(--font-mono); font-size: 11.5px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ou-host small { display: block; font-family: var(--font-sans); font-size: 11px; color: var(--ink-subtle); }
.ou-sub { opacity: 0; color: var(--ink-subtle); padding-top: 4px; padding-bottom: 4px; }
.ou-sub .ou-host { color: var(--ink-subtle); }
.ou-sub:nth-of-type(2) { animation: ou-in 8s infinite; }
.ou-sub:nth-of-type(3) { animation: ou-in 8s 0.35s infinite; }
.ou-sub:nth-of-type(4) { animation: ou-in 8s 0.7s infinite; }
.ou-sum { padding: 7px 10px 0; font-size: 12px; color: var(--ink-subtle); animation: ou-in 8s 1.1s infinite; opacity: 0; }
.ou-sum b { color: var(--ok); font-weight: 500; }
@keyframes ou-flash { 0%, 6% { background: rgba(180, 196, 176, 0.2); } 30%, 100% { background: var(--surface); } }
@keyframes ou-in { 0%, 14% { opacity: 0; transform: translateY(4px); } 20%, 88% { opacity: 1; transform: none; } 96%, 100% { opacity: 0; } }

/* Sources converge into one console */
.src { display: grid; grid-template-columns: auto 44px auto; align-items: center; gap: 0; padding: 0 14px; }
.src-list { display: grid; gap: 6px; }
.src-list span {
  padding: 3px 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface);
  font-size: 11px; color: var(--ink-muted); white-space: nowrap;
}
.src-lines { width: 44px; height: 116px; overflow: visible; }
.src-lines path { fill: none; stroke: var(--line); stroke-width: 1.2; }
.src-lines .pk { stroke: var(--sage-text); stroke-width: 2; stroke-linecap: round; stroke-dasharray: 6 120; animation: src-pk 3.2s linear infinite; }
.src-lines .pk:nth-of-type(6) { animation-delay: -0.8s; }
.src-lines .pk:nth-of-type(7) { animation-delay: -1.6s; }
.src-lines .pk:nth-of-type(8) { animation-delay: -2.4s; }
@keyframes src-pk { from { stroke-dashoffset: 126; } to { stroke-dashoffset: 0; } }
.src-console {
  display: grid; justify-items: center; gap: 4px; padding: 10px 12px;
  border: 1px solid rgba(163, 181, 160, 0.4); border-radius: 10px; background: var(--surface);
  color: var(--ink); font-size: 11.5px;
}
.src-console svg { width: 20px; height: 20px; color: var(--sage-text); }

/* Scheduled work */
.sw-fx { width: calc(100% - 28px); }
.sw-track { position: relative; height: 36px; border-radius: 8px; background: var(--surface); border: 1px solid var(--line-soft); }
.sw-block {
  position: absolute; left: 34%; width: 38%; top: 5px; bottom: 5px; border-radius: 5px;
  border: 1px solid rgba(134, 174, 212, 0.45);
  background: repeating-linear-gradient(135deg, rgba(134, 174, 212, 0.16) 0 6px, rgba(134, 174, 212, 0.05) 6px 12px);
  color: var(--info); font-size: 11px; font-weight: 600; display: grid; place-items: center; letter-spacing: 0.04em;
}
.sw-now { position: absolute; top: -6px; bottom: -6px; left: 4%; width: 2px; background: var(--accent); border-radius: 2px; animation: sw-now 7s linear infinite; }
.sw-now::before { content: ""; position: absolute; left: -3px; top: -3px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
@keyframes sw-now { from { left: 4%; } to { left: 94%; } }
.sw-ticks { display: flex; justify-content: space-between; margin-top: 6px; font-family: var(--font-mono); font-size: 11px; color: var(--ink-subtle); }
.sw-msg { margin-top: 12px; }
.sw-msg span:first-child { animation: sw-a 7s infinite; }
.sw-msg span:last-child { opacity: 0; color: var(--info); animation: sw-b 7s infinite; }
@keyframes sw-a { 0%, 30% { opacity: 1; } 34%, 73% { opacity: 0; } 77%, 100% { opacity: 1; } }
@keyframes sw-b { 0%, 31% { opacity: 0; } 35%, 72% { opacity: 1; } 76%, 100% { opacity: 0; } }

/* Redfish hardware */
.bmc { width: calc(100% - 28px); max-width: 480px; }
.bmc-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.bmc-head .mono { color: var(--ink); font-size: 12px; }
.bmc-head small { color: var(--ink-subtle); font-size: 11px; }
.bmc-head .fx-badge { margin-left: auto; }
.bmc-os { position: relative; display: inline-grid; margin-left: auto; }
.bmc-os > span { grid-area: 1 / 1; justify-self: end; }
.bmc-os > span:first-child { animation: show-a 8s infinite; }
.bmc-os > span:last-child { opacity: 0; animation: show-b 8s infinite; }
.bmc-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.bmc-grid div {
  display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 6px 8px;
  border: 1px solid var(--line-soft); border-radius: 7px; background: var(--surface); font-size: 11.5px; white-space: nowrap;
}
.bmc-grid div > span:first-child { color: var(--ink-subtle); overflow: hidden; text-overflow: ellipsis; }
.bmc-grid .mono { color: var(--ink); }
.bmc-foot { margin-top: 10px; color: var(--ink-subtle); font-size: 11.5px; }
.bmc-foot.fx-swap > span:last-child { opacity: 0; color: var(--ink-muted); animation: show-b 8s infinite; }
.bmc-foot.fx-swap > span:first-child { animation: show-a 8s infinite; }

/* GPUs */
.gpu { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 6px; width: calc(100% - 28px); }
.gpu div { position: relative; padding: 7px 9px; border: 1px solid var(--line-soft); border-radius: 8px; background: var(--surface); }
.gpu b { display: block; font-size: 11px; font-weight: 500; color: var(--ink-subtle); letter-spacing: 0.04em; text-transform: uppercase; }
.gpu .mono { font-size: 13px; color: var(--ink); }
.gpu .gpu-hot { animation: gpu-hot 6s infinite; }
.gpu .gpu-hot .fx-badge {
  position: absolute; right: 6px; top: -10px; opacity: 0; animation: gpu-xid 6s infinite;
  border: 1px solid rgba(240, 132, 104, 0.45);
  background: linear-gradient(rgba(240, 132, 104, 0.14), rgba(240, 132, 104, 0.14)), var(--surface);
}
@keyframes gpu-hot { 0%, 38% { border-color: var(--line-soft); } 44%, 86% { border-color: rgba(240, 132, 104, 0.55); } 94%, 100% { border-color: var(--line-soft); } }
@keyframes gpu-xid { 0%, 40% { opacity: 0; } 46%, 86% { opacity: 1; } 94%, 100% { opacity: 0; } }

/* Poll workers */
.wk { width: calc(100% - 20px); max-width: 260px; }
.wk svg { width: 100%; height: auto; overflow: visible; }
.wk svg rect { fill: var(--surface); stroke: var(--line); stroke-width: 1; }
.wk svg text { font-family: var(--font-mono); font-size: 11px; fill: var(--ink); text-anchor: middle; }
.wk svg path { fill: none; stroke: var(--line); stroke-width: 1.2; }
.wk svg .pk { stroke: var(--sage-text); stroke-width: 2; stroke-linecap: round; stroke-dasharray: 6 120; animation: src-pk 1.8s linear infinite; }
.wk svg .pk.wa { animation: src-pk 1.8s linear infinite, wk-gone 7s infinite; }
.wk svg .pk.wb { animation-delay: -0.9s; }
.wk svg .wa-box { animation: wk-box 7s infinite; }
.wk svg .wa-x { opacity: 0; animation: wk-x 7s infinite; }
.wk svg .wa-x circle { fill: var(--crit); }
.wk svg .wa-x path { stroke: var(--bg); stroke-width: 1.6; stroke-linecap: round; }
@keyframes wk-box { 0%, 42% { stroke: var(--line); } 48%, 90% { stroke: var(--crit); } 96%, 100% { stroke: var(--line); } }
@keyframes wk-x { 0%, 44% { opacity: 0; } 48%, 90% { opacity: 1; } 96%, 100% { opacity: 0; } }
@keyframes wk-gone { 0%, 44% { opacity: 1; } 48%, 92% { opacity: 0; } 96%, 100% { opacity: 1; } }
.wk-cap { margin-top: 10px; text-align: center; font-size: 11.5px; }
.wk-cap span:first-child { animation: show-a 7s infinite; }
.wk-cap span:last-child { opacity: 0; color: var(--ink-muted); animation: show-b 7s infinite; }

/* NetBox */
.nb { width: calc(100% - 28px); max-width: 500px; }
.nb-flow { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; }
.nb-box { padding: 8px 12px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); font-size: 11.5px; color: var(--ink-subtle); line-height: 1.35; }
.nb-box b { display: block; font-size: 12.5px; color: var(--ink); font-weight: 600; }
.nb-pipe { position: relative; height: 2px; background: var(--line); border-radius: 2px; overflow: hidden; }
.nb-pipe i { position: absolute; top: 0; left: -30%; width: 30%; height: 2px; background: linear-gradient(90deg, transparent, var(--sage-text), transparent); animation: nb-pipe 1.8s linear infinite; }
@keyframes nb-pipe { to { left: 100%; } }
.nb-meta { display: flex; justify-content: space-between; gap: 10px; margin: 10px 2px 8px; font-size: 11.5px; color: var(--ink-subtle); }
.nb-meta b { color: var(--ok); font-weight: 600; }
.nb-drift {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 8px;
  padding: 6px 9px; border: 1px solid var(--line-soft); border-radius: 8px; background: var(--surface);
  font-size: 11.5px; opacity: 0; animation: nb-drift 8s infinite;
}
.nb-drift .mono { color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nb-drift em { font-style: normal; color: var(--ink-subtle); white-space: nowrap; }
@keyframes nb-drift { 0%, 30% { opacity: 0; transform: translateY(4px); } 36%, 90% { opacity: 1; transform: none; } 97%, 100% { opacity: 0; } }

/* MRTG import */
.rrd { width: calc(100% - 26px); font-family: var(--font-mono); font-size: 11.5px; }
.rrd-cmd { color: var(--ink); white-space: pre; overflow: hidden; line-height: 1.55; }
.rrd-cmd span { color: var(--sage-text); }
.rrd-bar { height: 4px; margin: 12px 0 10px; border-radius: 4px; background: var(--surface-overlay); overflow: hidden; }
.rrd-bar i { display: block; height: 100%; width: 100%; background: var(--c1); transform-origin: left; animation: rrd-fill 6s var(--ease) infinite; }
@keyframes rrd-fill { 0%, 8% { transform: scaleX(0); } 52%, 92% { transform: scaleX(1); } 100% { transform: scaleX(1); opacity: 0; } }
.rrd .fx-swap { font-family: var(--font-sans); font-size: 12px; }
.rrd .fx-swap span:first-child { animation: show-a 6s infinite; }
.rrd .fx-swap span:last-child { opacity: 0; color: var(--ok); animation: show-b 6s infinite; }

/* Nagios / Checkmk */
.lv { width: calc(100% - 26px); }
.lv-line { display: flex; align-items: center; gap: 8px; font-size: 11.5px; color: var(--ink-subtle); margin-bottom: 10px; }
.lv-line .fx-badge { margin-left: auto; }
.lv-cmd {
  padding: 8px 10px; border: 1px solid var(--line-soft); border-radius: 8px; background: var(--surface);
  font-family: var(--font-mono); font-size: 11px; color: var(--ink-muted); white-space: nowrap; overflow: hidden;
}
.lv-secret { position: relative; display: inline-grid; }
.lv-secret > span { grid-area: 1 / 1; }
.lv-secret > span:first-child { color: var(--crit); animation: lv-a 6s infinite; }
.lv-secret > span:last-child { color: var(--ok); opacity: 0; animation: lv-b 6s infinite; }
@keyframes lv-a { 0%, 36% { opacity: 1; } 42%, 92% { opacity: 0; } 100% { opacity: 1; } }
@keyframes lv-b { 0%, 38% { opacity: 0; } 44%, 90% { opacity: 1; } 98%, 100% { opacity: 0; } }
.lv-foot { margin-top: 10px; font-size: 11.5px; color: var(--ink-subtle); }

/* Alarm e-mails */
.em { display: grid; gap: 10px; width: calc(100% - 28px); max-width: 480px; }
.em-seg { display: inline-flex; justify-self: start; position: relative; padding: 2px; gap: 2px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.em-seg span { position: relative; z-index: 1; padding: 3px 10px; font-size: 11.5px; font-weight: 500; color: var(--ink-subtle); border-radius: 6px; }
.em-seg i {
  position: absolute; z-index: 0; top: 2px; bottom: 2px; left: 2px; width: calc(25% - 2px); border-radius: 6px;
  background: var(--surface-overlay); animation: em-seg 9s infinite;
}
@keyframes em-seg {
  0%, 30% { transform: translateX(100%); }
  36%, 63% { transform: translateX(200%); }
  69%, 94% { transform: translateX(300%); }
  100% { transform: translateX(100%); }
}
.em-card { padding: 10px 12px; border: 1px solid var(--line-soft); border-radius: 9px; background: var(--surface); }
.em-subj { font-family: var(--font-mono); font-size: 11.5px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.em-subj .t-crit { margin-right: 4px; }
.em-state { position: relative; height: 18px; margin-top: 6px; font-size: 11.5px; }
.em-state span { position: absolute; inset: 0; opacity: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.em-state span:nth-child(1) { color: var(--info); animation: em-1 9s infinite; }
.em-state span:nth-child(2) { color: var(--warn); animation: em-2 9s infinite; }
.em-state span:nth-child(3) { color: var(--ok); animation: em-3 9s infinite; }
@keyframes em-1 { 0%, 30% { opacity: 1; } 34%, 97% { opacity: 0; } 100% { opacity: 1; } }
@keyframes em-2 { 0%, 34% { opacity: 0; } 38%, 63% { opacity: 1; } 67%, 100% { opacity: 0; } }
@keyframes em-3 { 0%, 67% { opacity: 0; } 71%, 94% { opacity: 1; } 98%, 100% { opacity: 0; } }
.em-hold { display: flex; align-items: center; gap: 8px; font-size: 11.5px; color: var(--ink-subtle); }
.em-hold i { position: relative; width: 70px; height: 3px; border-radius: 3px; background: var(--surface-overlay); overflow: hidden; }
.em-hold i::after { content: ""; position: absolute; inset: 0; background: var(--sage-text); transform-origin: left; animation: em-hold 3s linear infinite; }
@keyframes em-hold { from { transform: scaleX(1); } to { transform: scaleX(0); } }

/* Audit log */
.au { position: relative; width: 100%; height: 100%; overflow: hidden; -webkit-mask-image: linear-gradient(transparent, #000 22%, #000 78%, transparent); mask-image: linear-gradient(transparent, #000 22%, #000 78%, transparent); }
.au-scroll { animation: au-scroll 16s linear infinite; padding: 0 14px; }
.au-scroll p { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 8px; padding: 4px 0; border-bottom: 1px solid var(--line-soft); font-size: 11.5px; white-space: nowrap; }
.au-scroll p span { font-family: var(--font-mono); color: var(--ink-subtle); }
.au-scroll p em { font-style: normal; color: var(--ink); overflow: hidden; text-overflow: ellipsis; }
.au-scroll p em b { margin-right: 6px; font-family: var(--font-mono); font-weight: 400; color: var(--sage-text); }
.au-scroll p.no em { color: var(--crit); }
@keyframes au-scroll { from { transform: translateY(0); } to { transform: translateY(-50%); } }

/* Sign-in */
.sso { display: grid; grid-template-columns: auto 40px auto; align-items: center; gap: 4px; }
.sso-col { display: grid; gap: 5px; }
.sso-col span { padding: 3px 9px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); font-size: 11px; color: var(--ink-muted); white-space: nowrap; }
.sso-col.roles span { border-color: rgba(163, 181, 160, 0.3); color: var(--ink); }
.sso-col span.hl1 { animation: sso-hl 6s infinite; }
.sso-col span.hl2 { animation: sso-hl 6s 1.5s infinite; }
.sso-col span.hl3 { animation: sso-hl 6s 3s infinite; }
.sso-col span.hl4 { animation: sso-hl 6s 4.5s infinite; }
@keyframes sso-hl { 0%, 4% { border-color: var(--line); background: var(--surface); } 8%, 20% { border-color: var(--sage-text); background: rgba(163, 181, 160, 0.14); } 26%, 100% { border-color: var(--line); background: var(--surface); } }
.sso-col.roles span.hl1, .sso-col.roles span.hl2, .sso-col.roles span.hl3, .sso-col.roles span.hl4 { border-color: rgba(163, 181, 160, 0.3); }
.sso svg { width: 40px; height: 120px; overflow: visible; }
.sso svg path { fill: none; stroke: var(--line); stroke-width: 1.2; }

/* ---------- Screenshots gallery ---------- */
.shots { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px 32px; }
.shot { margin: 0; min-width: 0; }
.shot.wide { grid-column: 1 / -1; }
.shot-link { display: block; border-radius: 14px; text-decoration: none; }
.shot-link:focus-visible { outline-offset: 6px; border-radius: 16px; }
.shot-frame {
  position: relative; display: block; overflow: hidden; border-radius: 14px;
  border: 1px solid var(--line); background: var(--surface);
  box-shadow: var(--shadow-lg);
  transition: border-color 0.25s ease, transform 0.35s var(--ease-out), box-shadow 0.35s ease;
}
.shot-bar { display: flex; align-items: center; gap: 12px; height: 32px; padding: 0 12px; background: var(--surface); border-bottom: 1px solid var(--line); }
.shot-bar i { width: 9px; height: 9px; border-radius: 50%; background: #3a444d; }
.shot-bar span { margin: 0 auto; padding: 1px 12px; border-radius: 6px; background: var(--bg); color: var(--ink-subtle); font-family: var(--font-mono); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: calc(100% - 140px); }
.shot-bar::after { content: ""; width: 45px; flex: none; }
.shot-frame img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; object-position: top left; }
.shot-zoom {
  position: absolute; right: 14px; bottom: 14px; display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: 999px; background: rgba(15, 20, 25, 0.86); border: 1px solid var(--line);
  color: var(--ink); font-size: 12.5px; font-weight: 500; opacity: 0; transform: translateY(6px);
  transition: opacity 0.2s ease, transform 0.25s var(--ease-out);
}
.shot-zoom svg { width: 14px; height: 14px; }
.shot-link:hover .shot-frame, .shot-link:focus-visible .shot-frame { border-color: #3d4852; transform: translateY(-4px); box-shadow: 0 34px 80px rgba(0, 0, 0, 0.55); }
.shot-link:hover .shot-zoom, .shot-link:focus-visible .shot-zoom { opacity: 1; transform: none; }
.shot figcaption { margin-top: 16px; padding: 0 2px; }
.shot figcaption strong { display: block; font-family: var(--font-display); font-size: 17px; font-weight: 600; color: var(--ink); margin-bottom: 3px; }
.shot figcaption span { color: var(--ink-muted); font-size: 14.5px; line-height: 1.55; }
.shots-note { margin-top: 36px; text-align: center; }

/* Lightbox (home.js; links open the image directly without JS) */
.lightbox {
  position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none;
  margin: 0; padding: 0; border: 0; background: transparent; color: var(--ink);
}
.lightbox[open] { display: grid; place-items: center; }
.lightbox::backdrop { background: rgba(5, 8, 10, 0.88); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.lb-inner { position: relative; display: grid; gap: 14px; width: min(1440px, calc(100vw - 120px)); max-height: calc(100vh - 48px); padding: 24px 0; }
.lb-inner img { width: 100%; height: auto; max-height: calc(100vh - 150px); object-fit: contain; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); }
.lb-cap { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; justify-content: center; text-align: center; font-size: 14.5px; color: var(--ink-muted); }
.lb-cap strong { font-family: var(--font-display); color: var(--ink); font-weight: 600; }
.lb-btn {
  position: fixed; z-index: 2; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--line); background: rgba(20, 26, 31, 0.9); color: var(--ink); cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.lb-btn:hover { background: var(--surface-overlay); border-color: var(--line-strong); }
.lb-btn svg { width: 20px; height: 20px; }
.lb-close { top: 16px; right: 16px; }
.lb-prev { left: 16px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 16px; top: 50%; transform: translateY(-50%); }
.lb-count { font-family: var(--font-mono); font-size: 12px; color: var(--ink-subtle); }

/* ---------- Deployment & architecture ---------- */
.arch { display: grid; grid-template-columns: minmax(0, 1fr) 64px minmax(0, 1.25fr) 64px minmax(0, 1fr); align-items: stretch; }
.arch-col, .arch-core {
  padding: 22px 22px 24px; border: 1px solid var(--line); border-radius: 16px;
  background: linear-gradient(180deg, rgba(26, 33, 39, 0.85), rgba(20, 26, 31, 0.85));
}
.arch-core { border-color: rgba(163, 181, 160, 0.35); box-shadow: 0 0 0 1px rgba(163, 181, 160, 0.06), 0 30px 80px rgba(0, 0, 0, 0.35); }
.arch-h { margin-bottom: 14px; font-family: var(--font-display); font-size: 11.5px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-muted); }
.arch-h small { display: block; margin-top: 4px; font-family: var(--font-mono); font-size: 11.5px; font-weight: 400; letter-spacing: 0; text-transform: none; color: var(--ink-subtle); }
.arch-list { display: grid; gap: 10px; }
.arch-list li { padding: 9px 12px; border: 1px solid var(--line-soft); border-radius: 10px; background: var(--bg); }
.arch-list b { display: block; font-size: 14px; font-weight: 600; color: var(--ink); line-height: 1.35; }
.arch-list span { display: block; font-size: 12.5px; color: var(--ink-subtle); line-height: 1.45; }
.arch-list li.is-worker { border-style: dashed; border-color: rgba(163, 181, 160, 0.35); }
.arch-out .arch-list li { border-style: dashed; }
.arch-layers { display: grid; gap: 10px; }
.arch-layer { position: relative; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); }
.arch-layer b { display: flex; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: 13.5px; font-weight: 500; color: var(--ink); }
.arch-layer b em { margin-left: auto; font-style: normal; font-size: 11.5px; color: var(--ink-subtle); font-weight: 400; }
.arch-layer span { display: block; margin-top: 3px; font-size: 12.5px; color: var(--ink-subtle); line-height: 1.5; }
.arch-layer.is-mc { border-color: rgba(163, 181, 160, 0.45); background: linear-gradient(180deg, rgba(163, 181, 160, 0.08), rgba(163, 181, 160, 0.02)); }
.arch-layer.is-mc b { color: var(--accent); }
.arch-layer .arch-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.arch-layer .arch-chips span { display: inline-block; margin: 0; padding: 2px 8px; border-radius: 6px; background: var(--surface-overlay); color: var(--ink-muted); font-size: 11.5px; line-height: 1.5; }
.arch-link { position: relative; display: flex; flex-direction: column; justify-content: center; gap: 46px; padding: 0 6px; }
.arch-link i { position: relative; display: block; height: 1px; background: linear-gradient(90deg, var(--line), var(--line-strong), var(--line)); }
.arch-link i::after {
  content: ""; position: absolute; top: -2.5px; left: 0; width: 6px; height: 6px; border-radius: 50%;
  background: var(--sage-text); box-shadow: 0 0 10px rgba(163, 181, 160, 0.8);
  animation: arch-dot 2.4s var(--ease) infinite;
}
.arch-link i:nth-child(2)::after { animation-delay: -0.8s; }
.arch-link i:nth-child(3)::after { animation-delay: -1.6s; }
.arch-link.out i { background: repeating-linear-gradient(90deg, var(--line-strong) 0 4px, transparent 4px 8px); }
.arch-link.out i::after { background: var(--info); box-shadow: 0 0 10px rgba(134, 174, 212, 0.7); animation-duration: 3.2s; }
@keyframes arch-dot { 0% { left: 0; opacity: 0; } 15% { opacity: 1; } 85% { opacity: 1; } 100% { left: calc(100% - 6px); opacity: 0; } }
.arch, .arch * { animation-play-state: paused; }
.arch.is-live, .arch.is-live * { animation-play-state: running; }

.deploy-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; margin-top: 24px; }
.panel {
  padding: 28px 28px 30px; border: 1px solid var(--line); border-radius: 16px;
  background: linear-gradient(180deg, rgba(26, 33, 39, 0.8), rgba(20, 26, 31, 0.8));
}
.panel h3 { font-size: 20px; margin-bottom: 8px; }
.panel > p { color: var(--ink-muted); font-size: 15px; line-height: 1.6; }
.panel .eyebrow { margin-bottom: 10px; }
.eyebrow { display: block; font-family: var(--font-display); font-size: 11px; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-muted); }

/* Retention tiers: bars on a log time axis */
.ret { display: grid; gap: 14px; margin-top: 22px; }
.ret-row { display: grid; grid-template-columns: 92px minmax(0, 1fr); align-items: center; gap: 14px; }
.ret-name { font-size: 14px; font-weight: 600; color: var(--ink); line-height: 1.25; }
.ret-name small { display: block; font-family: var(--font-mono); font-size: 11px; font-weight: 400; color: var(--ink-subtle); }
.ret-track { position: relative; height: 30px; border-radius: 8px; background: rgba(41, 50, 58, 0.35); }
.ret-bar {
  position: absolute; left: 0; top: 0; bottom: 0; width: var(--w); border-radius: 8px;
  display: flex; align-items: center; justify-content: flex-end; padding: 0 10px;
  font-family: var(--font-mono); font-size: 12px; font-weight: 500; color: var(--on-accent); white-space: nowrap;
  background: linear-gradient(90deg, rgba(91, 154, 80, 0.55), var(--c));
  clip-path: inset(0 0 0 0 round 8px); transition: clip-path 1.2s var(--ease-out) var(--d, 0ms);
}
.js .ret:not(.is-in) .ret-bar { clip-path: inset(0 97% 0 0 round 8px); }
/* a short bar is all dark start: a solid fill keeps its label at AA contrast */
.ret-bar.is-short { background: var(--c); }
.ret-bar.is-forever::after { content: "\2192"; margin-left: 6px; }
.ret-axis { position: relative; height: 16px; margin: 2px 0 0 106px; font-family: var(--font-mono); font-size: 11px; color: var(--ink-subtle); }
.ret-axis > span { position: absolute; top: 0; left: var(--x); transform: translateX(-50%); white-space: nowrap; }
.ret-axis > span:first-child { transform: none; }
.ret-axis > span:last-child { transform: translateX(-100%); }
.ret-axis .ax-s { display: none; }
.ret-note { margin-top: 18px; color: var(--ink-muted); font-size: 14px; line-height: 1.6; }

.checks { display: grid; gap: 14px; margin-top: 18px; }
.checks li { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 12px; color: var(--ink-muted); font-size: 14.5px; line-height: 1.55; }
.checks li svg { width: 18px; height: 18px; margin-top: 2px; color: var(--ok); }
.checks li b { color: var(--ink); font-weight: 600; }
.checks code { font-size: 0.9em; color: var(--accent); }

.sec-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin-top: 24px; }
.sec-grid .panel h3 { display: flex; align-items: center; gap: 10px; font-size: 18px; }
.sec-grid .panel h3 svg { width: 20px; height: 20px; color: var(--sage-text); flex: none; }

/* Integrations: two slow rows of chips */
.integrations { margin-top: 80px; }
.integrations-head { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 26px; }
.integrations-head h3 { font-size: 22px; text-wrap: balance; }
.integrations-head p { color: var(--ink-subtle); font-size: 14.5px; }
.marquee { position: relative; display: grid; gap: 12px; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee-row { display: flex; width: max-content; gap: 12px; animation: marquee 60s linear infinite; }
.marquee-row.rev { animation-direction: reverse; animation-duration: 70s; }
.marquee:hover .marquee-row { animation-play-state: paused; }
.marquee-row ul { display: flex; gap: 12px; }
.chip {
  display: inline-flex; align-items: center; gap: 9px; height: 40px; padding: 0 16px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--surface);
  color: var(--ink); font-size: 14px; font-weight: 500; white-space: nowrap;
}
.chip small { color: var(--ink-subtle); font-size: 12.5px; font-weight: 400; }
.chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--sage-text); }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(calc(-50% - 6px)); } }

/* ---------- FAQ ---------- */
.faq { max-width: 820px; margin: 0 auto; display: grid; gap: 12px; }
.faq details { border: 1px solid var(--line); border-radius: 14px; background: var(--surface); transition: border-color 0.2s ease, background 0.2s ease; }
.faq details[open] { border-color: #3a454e; background: var(--surface-raised); }
.faq summary {
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
  padding: 20px 24px; cursor: pointer; list-style: none; border-radius: 14px;
  font-family: var(--font-sans); font-size: 16.5px; font-weight: 600; color: var(--ink);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; flex: none; width: 22px; height: 22px; border-radius: 50%;
  background:
    linear-gradient(var(--sage-text), var(--sage-text)) center / 10px 1.5px no-repeat,
    linear-gradient(var(--sage-text), var(--sage-text)) center / 1.5px 10px no-repeat;
  border: 1px solid var(--line); transition: transform 0.25s var(--ease);
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq .faq-body { padding: 0 24px 22px; color: var(--ink-muted); font-size: 15px; line-height: 1.65; }
.faq .faq-body p + p { margin-top: 10px; }
.faq code { font-size: 0.9em; color: var(--accent); }
:root { interpolate-size: allow-keywords; }
.faq details::details-content { block-size: 0; overflow: hidden; transition: block-size 0.35s var(--ease), content-visibility 0.35s allow-discrete; }
.faq details[open]::details-content { block-size: auto; }

/* ---------- CTA band ---------- */
.cta-band { overflow: hidden; text-align: center; padding: 120px 0 128px; isolation: isolate; border-top: 1px solid var(--line-soft); background: var(--band); }
.cta-band .hex-field { -webkit-mask-image: radial-gradient(ellipse 60% 70% at 50% 45%, #000 20%, transparent 75%); mask-image: radial-gradient(ellipse 60% 70% at 50% 45%, #000 20%, transparent 75%); opacity: 0.8; }
.stinger { width: min(420px, 82vw); height: auto; aspect-ratio: 1160 / 540; margin: 0 auto 18px; }
.cta-band h2 { font-size: clamp(32px, 4.4vw, 52px); max-width: 760px; margin: 0 auto 18px; text-wrap: balance; }
.cta-band p { max-width: 600px; margin: 0 auto 36px; color: var(--ink-muted); font-size: 18px; text-wrap: pretty; }

/* ---------- Footer ---------- */
.site-footer { padding: 72px 0 40px; border-top: 1px solid var(--line-soft); background: #0a0e12; }
.footer-grid { display: grid; grid-template-columns: minmax(240px, 1.4fr) repeat(3, minmax(0, 1fr)); gap: 48px; }
.footer-brand img.footer-logo { height: 28px; width: auto; margin-bottom: 16px; }
.footer-brand p { max-width: 300px; color: var(--ink-subtle); font-size: 14px; line-height: 1.6; }
.by-kazlabs { display: inline-flex; align-items: center; margin-top: 12px; padding: 10px 0; color: var(--ink-subtle); font-size: 12.5px; text-decoration: none; }
.by-kazlabs img { height: 20px; width: auto; opacity: 0.85; transition: opacity 0.2s ease; }
.by-kazlabs:hover { color: var(--ink-muted); }
.by-kazlabs:hover img { opacity: 1; }
.footer-col h2 { margin-bottom: 14px; font-family: var(--font-display); font-size: 11.5px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-muted); }
.footer-col a { display: block; width: fit-content; padding: 5px 0; color: var(--ink-subtle); font-size: 14.5px; }
.footer-col a:hover { color: var(--ink); }
.footer-bottom {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px 24px;
  margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--line-soft);
  color: var(--ink-subtle); font-size: 13px;
}
.footer-bottom nav { display: flex; gap: 20px; }
.footer-bottom a { color: var(--ink-subtle); }
.footer-bottom a:hover { color: var(--ink); }

/* ---------- Docs ---------- */
.docs-main { padding: 56px 0 96px; }
.docs-layout { display: grid; grid-template-columns: 236px minmax(0, 1fr); gap: 64px; align-items: start; }
.docs-nav { position: sticky; top: calc(var(--header-h) + 28px); max-height: calc(100vh - var(--header-h) - 56px); overflow-y: auto; padding-right: 8px; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.docs-nav-label { margin: 22px 0 6px; font-family: var(--font-display); font-size: 11px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-subtle); }
.docs-nav-label:first-child { margin-top: 0; }
.docs-nav a {
  display: block; padding: 5px 0 5px 14px; margin-left: 1px; border-left: 1px solid var(--line);
  color: var(--ink-subtle); font-size: 14px; line-height: 1.4; text-decoration: none;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.docs-nav a:hover { color: var(--ink); }
.docs-nav a.is-active { color: var(--ink); border-left-color: var(--accent); }
.docs-toc-mobile { display: none; }
.docs-content { min-width: 0; max-width: 820px; }
.docs-title { font-size: clamp(34px, 4vw, 46px); margin-bottom: 14px; }
.docs-lede { color: var(--ink-muted); font-size: 18px; line-height: 1.6; max-width: 66ch; margin-bottom: 18px; }
.docs-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 40px; }
.docs-meta span { padding: 3px 10px; border: 1px solid var(--line); border-radius: 999px; font-family: var(--font-mono); font-size: 12px; color: var(--ink-subtle); }
.doc-section { padding: 40px 0 0; margin-top: 40px; border-top: 1px solid var(--line-soft); scroll-margin-top: calc(var(--header-h) + 12px); }
.doc-section:first-of-type { border-top: 0; margin-top: 0; padding-top: 0; }
.doc-section .kicker { margin-bottom: 10px; font-size: 11px; }
.doc-section h2 { font-size: 28px; margin-bottom: 16px; letter-spacing: -0.015em; }
.doc-section h3 { margin: 28px 0 10px; font-family: var(--font-sans); font-size: 17px; font-weight: 600; letter-spacing: 0; }
.doc-section p, .doc-section li, .doc-section dd { color: var(--ink-muted); font-size: 15.5px; line-height: 1.7; }
.doc-section p + p { margin-top: 12px; }
.doc-section ul, .doc-section ol { margin: 12px 0; padding-left: 4px; display: grid; gap: 6px; }
.doc-section ul > li { position: relative; padding-left: 20px; }
.doc-section ul > li::before { content: ""; position: absolute; left: 3px; top: 0.72em; width: 5px; height: 5px; border-radius: 50%; background: var(--sage); }
.doc-section ol { counter-reset: n; }
.doc-section ol > li { position: relative; padding-left: 30px; counter-increment: n; }
.doc-section ol > li::before { content: counter(n); position: absolute; left: 0; top: 0.2em; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-overlay); color: var(--ink-muted); font-family: var(--font-mono); font-size: 11px; }
.doc-section strong { color: var(--ink); }
.doc-section :not(pre) > code {
  padding: 1px 6px; border: 1px solid var(--line); border-radius: 5px; background: var(--surface);
  color: var(--accent); font-size: 0.86em; white-space: nowrap;
}
.doc-section table.wrap-first td:first-child { white-space: normal; width: 55%; }
.code-block { position: relative; margin: 16px 0; }
.doc-section pre {
  margin: 16px 0; padding: 16px 18px; overflow-x: auto;
  border: 1px solid var(--line); border-radius: 12px; background: #0a0e12;
  color: var(--ink); font-size: 13.5px; line-height: 1.7; tab-size: 2;
}
.code-block pre { margin: 0; padding-right: 84px; }
.doc-section pre code { font-size: inherit; }
.doc-section pre .c { color: var(--ink-subtle); }
.copy-btn {
  position: absolute; top: 10px; right: 10px; display: inline-flex; align-items: center; gap: 6px;
  height: 30px; padding: 0 10px; border-radius: 7px; cursor: pointer;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink-muted);
  font-family: var(--font-sans); font-size: 12.5px; font-weight: 500;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.copy-btn svg { width: 14px; height: 14px; }
.copy-btn:hover { background: var(--surface-overlay); color: var(--ink); }
.copy-btn.copied { color: var(--ok); border-color: rgba(93, 184, 165, 0.45); }
@media (max-width: 860px) {
  .code-block pre { padding-top: 54px; padding-right: 18px; }
  .copy-btn { top: 8px; right: 8px; height: 40px; padding: 0 12px; }
}
.table-wrap { margin: 16px 0; overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; }
.doc-section table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.doc-section th, .doc-section td { padding: 10px 14px; border-bottom: 1px solid var(--line-soft); text-align: left; vertical-align: top; color: var(--ink-muted); line-height: 1.55; }
.doc-section tr:last-child td { border-bottom: 0; }
.doc-section th { background: var(--surface); color: var(--ink-muted); font-size: 12px; font-weight: 500; letter-spacing: 0.04em; text-transform: uppercase; white-space: nowrap; }
.doc-section td:first-child { color: var(--ink); white-space: nowrap; }
.note {
  margin: 18px 0; padding: 14px 18px; border: 1px solid var(--line); border-left: 3px solid var(--info);
  border-radius: 0 10px 10px 0; background: var(--surface); color: var(--ink-muted); font-size: 14.5px; line-height: 1.65;
}
.note strong { color: var(--ink); }
.note.status { border-left-color: var(--warn); }
.doc-section dl { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 8px 18px; margin: 14px 0; }
.doc-section dt { color: var(--ink); font-size: 14.5px; font-weight: 500; }
.doc-section dd { margin: 0; }
.docs-end { margin-top: 64px; padding: 28px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px; }
.docs-end h2 { font-size: 22px; margin-bottom: 4px; }
.docs-end p { color: var(--ink-muted); font-size: 15px; }

/* ---------- 404 ---------- */
.err { min-height: calc(100vh - var(--header-h) - 160px); display: grid; place-items: center; padding: 96px 0; overflow: hidden; isolation: isolate; text-align: center; }
.err-alarm {
  display: inline-grid; grid-template-columns: auto auto minmax(0, 1fr); align-items: center; gap: 12px; max-width: 100%;
  margin-bottom: 30px; padding: 10px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface);
  font-size: 14px; text-align: left; box-shadow: var(--shadow-md);
}
.err-alarm .mono { color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.err-alarm .fx-badge { font-size: 12px; }
.err h1 { font-size: clamp(76px, 14vw, 156px); line-height: 0.95; letter-spacing: -0.04em; margin-bottom: 18px; }
.err p.lede { max-width: 560px; margin: 0 auto 34px; color: var(--ink-muted); font-size: 18px; }

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
  .how-row, .how-row.flip { grid-template-columns: minmax(0, 1fr); gap: 36px; }
  .how-row.flip .how-copy { order: 0; }
  .how-copy { max-width: 720px; }
  .how-rows { gap: 96px; }
  .sec-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 1080px) {
  .arch { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .arch-link { flex-direction: row; justify-content: center; gap: 54px; height: 54px; padding: 0; }
  .arch-link i { width: 1px; height: 100%; background: linear-gradient(180deg, var(--line), var(--line-strong), var(--line)); }
  .arch-link.out i { background: repeating-linear-gradient(180deg, var(--line-strong) 0 4px, transparent 4px 8px); }
  .arch-link i::after { left: -2.5px; top: 0; animation-name: arch-dot-v; }
  @keyframes arch-dot-v { 0% { top: 0; opacity: 0; } 15% { opacity: 1; } 85% { opacity: 1; } 100% { top: calc(100% - 6px); opacity: 0; } }
  .arch-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 980px) {
  .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .trust-row, .metrics-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .trust-item:nth-child(3) { border-left: 0; padding-left: 0; }
  .trust-item:nth-child(n + 3), .metric:nth-child(n + 3) { border-top: 1px solid var(--line-soft); }
  .metric:nth-child(3) { border-left: 0; }
  .deploy-grid { grid-template-columns: minmax(0, 1fr); }
  .footer-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .footer-brand { grid-column: 1 / -1; }
  .docs-layout { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .docs-nav { display: none; }
  .docs-toc-mobile { display: block; margin-bottom: 36px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
  .docs-toc-mobile summary { padding: 14px 18px; cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; align-items: center; }
  .docs-toc-mobile summary::-webkit-details-marker { display: none; }
  .docs-toc-mobile summary::after { content: "+"; color: var(--sage-text); font-size: 20px; line-height: 1; }
  .docs-toc-mobile[open] summary::after { content: "\2212"; }
  .docs-toc-mobile .toc-list { padding: 0 18px 16px; columns: 2; column-gap: 20px; }
  .docs-toc-mobile .toc-list a { display: block; padding: 4px 0; font-size: 14px; color: var(--ink-muted); break-inside: avoid; }
}
@media (max-width: 860px) {
  .nav-links { display: none; }
  .nav-toggle { display: inline-flex; }
  .nav-links.open {
    display: flex; flex-direction: column; align-items: stretch; gap: 2px;
    position: absolute; top: var(--header-h); left: 0; right: 0;
    padding: 12px 20px 20px; background: rgba(15, 20, 25, 0.98); border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-lg);
  }
  .nav-links.open > a { padding: 12px 8px; font-size: 16px; }
  .nav-links.open > a.cta { margin: 10px 0 0; text-align: center; padding: 12px 18px; }
}
@media (max-width: 760px) {
  section { padding: 76px 0; }
  .container { padding: 0 20px; }
  .hero { padding: 64px 0 56px; }
  .hero-pill { margin-bottom: 24px; min-height: 40px; font-size: 13px; }
  .nav-toggle { min-height: 44px; }
  .text-link { padding: 10px 0; margin: -10px 0; } /* a 40px target, same spacing */
  .footer-col a { min-width: 40px; padding: 10px 0; }
  .footer-bottom nav { gap: 8px; margin-left: -6px; }
  .footer-bottom nav a { padding: 10px 6px; }
  .hero h1 { font-size: clamp(36px, 10.2vw, 52px); margin-bottom: 20px; }
  .hero .lede { margin-bottom: 30px; }
  .hero-actions .btn { flex: 1 1 200px; }
  .hero-demo { margin-top: 44px; padding: 0 10px; }
  .section-head { margin-bottom: 44px; }
  .section-head p { font-size: 16.5px; }
  .how-rows { gap: 80px; }
  .bento { grid-template-columns: minmax(0, 1fr); }
  .tile-lg { grid-column: auto; }
  .shots { grid-template-columns: minmax(0, 1fr); gap: 36px; }
  .shot.wide { grid-column: auto; }
  .shot-zoom { opacity: 1; transform: none; right: 10px; bottom: 10px; padding: 4px 10px; font-size: 12px; }
  .metric { padding: 36px 16px 32px; }
  .metric:nth-child(odd) { padding-left: 0; }
  .metric-label { font-size: 13.5px; }
  .trust-item { padding: 22px 14px; }
  .trust-item:nth-child(odd) { padding-left: 0; }
  .panel { padding: 22px 20px 24px; }
  .ret-row { grid-template-columns: 74px minmax(0, 1fr); gap: 10px; }
  .ret-axis { margin-left: 84px; }
  .ret-axis .ax-l { display: none; }
  .ret-axis .ax-s { display: inline; }
  .arch-list { grid-template-columns: minmax(0, 1fr); }
  .faq summary { padding: 18px 18px; font-size: 15.5px; }
  .faq .faq-body { padding: 0 18px 20px; }
  .cta-band { padding: 84px 0 92px; }
  .cta-band p { font-size: 16.5px; }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 36px 24px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
  .lb-inner { width: calc(100vw - 24px); }
  .lb-prev, .lb-next { top: auto; bottom: 16px; transform: none; }
  .lb-prev { left: calc(50% - 56px); }
  .lb-next { right: calc(50% - 56px); }
  .doc-section h2 { font-size: 24px; }
  .doc-section dl { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .doc-section dd { margin-bottom: 10px; }
  .doc-section td:first-child { white-space: normal; }
  .doc-section th, .doc-section td { padding: 9px 10px; font-size: 13.5px; }
  .docs-toc-mobile .toc-list { columns: 1; }
  .docs-toc-mobile .toc-list a { padding-block: 10px; }
  .docs-toc-mobile summary { min-height: 48px; }
}
@media (max-width: 520px) {
  .container { padding: 0 16px; }
  .trust-row, .metrics-row { grid-template-columns: minmax(0, 1fr); }
  .trust-item, .trust-item:nth-child(odd) { border-left: 0; padding: 20px 0; }
  .trust-item + .trust-item { border-top: 1px solid var(--line-soft); }
  .metric, .metric:nth-child(odd) { border-left: 0; padding: 30px 0 28px; }
  .metric + .metric { border-top: 1px solid var(--line-soft); }
  .metric-label { max-width: none; }
  .hero-meta { gap: 4px 14px; font-size: 12px; }
  .hero-pill .pill-long { display: none; }
  .hero-pill .pill-short { display: inline; }
  .hero-meta li + li::before { display: none; }
  .hero-demo { padding: 0; }
  .fx { font-size: 12px; }
  .tile { padding: 16px 16px 20px; }
  .ou-row { grid-template-columns: 70px minmax(0, 1fr); }
  .ou-row > :last-child { display: none; }
  .bmc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bmc-grid div:nth-child(n + 5) { display: none; }
  .err-alarm { grid-template-columns: auto minmax(0, 1fr); }
  .err-alarm .err-what { display: none; }
}

/* iOS safe areas */
@supports (padding: max(0px)) {
  .site-header .nav, .site-footer .container { padding-left: max(20px, env(safe-area-inset-left)); padding-right: max(20px, env(safe-area-inset-right)); }
}

/* ---------- Reduced motion: still frames, no loops ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .fx *, .grad, .arch-link i::after, .marquee-row, .em-hold i::after { animation: none !important; }
  .ret-bar { transition: none; }
  .js .ret:not(.is-in) .ret-bar { clip-path: none; }
  .marquee { -webkit-mask-image: none; mask-image: none; }
  .marquee-row { width: auto; flex-wrap: wrap; justify-content: center; }
  .marquee-row ul { flex-wrap: wrap; justify-content: center; }
  .marquee-row ul[aria-hidden="true"] { display: none; }
  .faq details::details-content { transition: none; }
  .tile, .btn, .shot-frame { transition: none; }
  /* Show each fx in its most telling state */
  .ou-sub, .ou-sum, .nb-drift { opacity: 1; }
  .sw-msg span:first-child, .bmc-os > span:first-child, .bmc-foot.fx-swap > span:first-child, .wk-cap span:first-child,
  .rrd .fx-swap span:first-child, .em-state span:nth-child(1) { opacity: 0; }
  .sw-msg span:last-child, .bmc-os > span:last-child, .bmc-foot.fx-swap > span:last-child, .wk-cap span:last-child,
  .rrd .fx-swap span:last-child, .lv-secret > span:last-child { opacity: 1; }
  .lv-secret > span:first-child { opacity: 0; }
  .em-state span:nth-child(2) { opacity: 1; }
  .em-seg i { transform: translateX(200%); }
  .sw-now { left: 64%; }
  .gpu .gpu-hot { border-color: rgba(240, 132, 104, 0.55); }
  .gpu .gpu-hot .fx-badge { opacity: 1; }
  .wk svg .wa-box { stroke: var(--crit); }
  .wk svg .wa-x { opacity: 1; }
  .wk svg .pk.wa { opacity: 0; }
  .rrd-bar i { transform: none; }
}
