/* ==========================================================================
   Reports & Automation — shared stylesheet
   ========================================================================== */

:root {
  --ink:        #0B1020;
  --ink-2:      #131A2E;
  --ink-3:      #1D2740;
  --paper:      #FFFFFF;
  --wash:       #F5F7FB;
  --wash-2:     #EDF1F8;
  --line:       #DFE5EF;
  --line-dark:  rgba(255,255,255,.12);

  --text:       #10182B;
  --text-soft:  #4B5670;
  --text-mute:  #79839C;
  --on-dark:    #F2F5FA;
  --on-dark-soft: #A9B4CC;

  --accent:     #3D6BFF;
  --accent-dk:  #2A54DC;
  --accent-lt:  #EAF0FF;
  --mint:       #00C08B;

  --radius:     14px;
  --radius-sm:  9px;
  --maxw:       1160px;

  --shadow-sm:  0 1px 2px rgba(16,24,43,.06), 0 4px 12px rgba(16,24,43,.05);
  --shadow-md:  0 2px 6px rgba(16,24,43,.07), 0 14px 38px rgba(16,24,43,.09);

  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  color: var(--text);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0 0 .5em; line-height: 1.15; letter-spacing: -.021em; font-weight: 700; }
p  { margin: 0 0 1.1em; }
ul, ol { margin: 0 0 1.1em; padding-left: 1.15em; }
li { margin-bottom: .45em; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2.5rem 0; }

/* ---------- layout ---------- */
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 24px; }
.narrow { max-width: 760px; }
section { padding: 84px 0; }
.section-tight { padding: 56px 0; }

.eyebrow {
  font-family: var(--mono);
  font-size: 11.5px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: var(--accent); margin: 0 0 14px;
}
.eyebrow.on-dark { color: #8FAAFF; }

h1 { font-size: clamp(2.15rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); }
h3 { font-size: 1.22rem; }
.lede { font-size: clamp(1.06rem, 1.7vw, 1.28rem); color: var(--text-soft); line-height: 1.6; }
.lede.on-dark { color: var(--on-dark-soft); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .55em;
  padding: 13px 24px; border-radius: 10px;
  font-size: 15.5px; font-weight: 600; letter-spacing: -.005em;
  border: 1px solid transparent; cursor: pointer;
  transition: transform .15s ease, background .15s ease, border-color .15s ease, color .15s ease;
  text-decoration: none !important;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dk); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn-ghost:hover { border-color: #B9C4D8; background: var(--wash); }
.btn-ghost.on-dark { color: var(--on-dark); border-color: rgba(255,255,255,.24); }
.btn-ghost.on-dark:hover { background: rgba(255,255,255,.07); border-color: rgba(255,255,255,.4); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.86);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 17.5px;
         color: var(--text); letter-spacing: -.022em; text-decoration: none !important; }
.brand:hover { opacity: .82; }
.brand-logo { width: 29px; height: 29px; flex: none; display: block; }
.brand .amp { color: var(--accent); font-weight: 800; padding: 0 1px; }
.footer-brand .amp { color: #8FAAFF; font-weight: 800; padding: 0 1px; }
.footer-brand .brand-logo { width: 27px; height: 27px; }
.nav-links { display: flex; align-items: center; gap: 30px; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  color: var(--text-soft); font-size: 15px; font-weight: 500; text-decoration: none !important;
}
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--text); }
.nav-cta { display: flex; align-items: center; gap: 14px; }
.nav-toggle {
  display: none; background: none; border: 1px solid var(--line);
  border-radius: 8px; padding: 8px 10px; cursor: pointer; color: var(--text);
}

/* ---------- hero ---------- */
.hero {
  background: var(--ink);
  color: var(--on-dark);
  padding: 104px 0 96px;
  position: relative; overflow: hidden;
}
.hero::before {
  content: ""; position: absolute; inset: -30% -10% auto -10%; height: 620px;
  background:
    radial-gradient(46% 60% at 20% 30%, rgba(61,107,255,.30), transparent 70%),
    radial-gradient(38% 52% at 78% 18%, rgba(0,192,139,.16), transparent 72%);
  pointer-events: none;
}
.hero .wrap { position: relative; }
.hero h1 { color: #fff; max-width: 17ch; }
.hero .lede { max-width: 60ch; margin-top: 20px; }

.hero-stats {
  display: flex; flex-wrap: wrap; gap: 44px;
  margin-top: 56px; padding-top: 34px; border-top: 1px solid var(--line-dark);
}
.hero-stats div strong {
  display: block; font-size: 28px; font-weight: 700; color: #fff; letter-spacing: -.03em;
  font-variant-numeric: tabular-nums;
}
.hero-stats div span { font-size: 14px; color: var(--on-dark-soft); }

/* ---------- generic dark / wash bands ---------- */
.band-dark { background: var(--ink); color: var(--on-dark); }
.band-dark h2, .band-dark h3 { color: #fff; }
.band-wash { background: var(--wash); }

/* ---------- page header (inner pages) ---------- */
.page-head { background: var(--ink); color: var(--on-dark); padding: 76px 0 66px; }
.page-head h1 { color: #fff; max-width: 20ch; }
.page-head .lede { max-width: 64ch; margin-top: 16px; }
.page-head .hero-stats { margin-top: 38px; padding-top: 28px; }
.page-head .hero-stats div strong { font-size: 24px; }

/* ---------- cards ---------- */
.grid { display: grid; gap: 22px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }

.card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px 26px; transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.card:hover { border-color: #C6D2E8; box-shadow: var(--shadow-md); transform: translateY(-2px); }
.card h3 { margin-bottom: .45em; }
.card p:last-child { margin-bottom: 0; }
.card p { color: var(--text-soft); font-size: 15.5px; }

.card-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 9px; margin-bottom: 16px;
  background: var(--accent-lt); color: var(--accent-dk);
  font-family: var(--mono); font-size: 12.5px; font-weight: 700; font-variant-numeric: tabular-nums;
}
.card.on-dark {
  background: var(--ink-2); border-color: var(--line-dark);
}
.card.on-dark:hover { border-color: rgba(255,255,255,.26); box-shadow: none; }
.card.on-dark p { color: var(--on-dark-soft); }
.card.on-dark .card-num { background: rgba(61,107,255,.18); color: #9DB5FF; }

/* ---------- feature list ---------- */
.ticks { list-style: none; padding: 0; margin: 0; }
.ticks li {
  position: relative; padding-left: 30px; margin-bottom: 13px;
  color: var(--text-soft); font-size: 15.5px;
}
.ticks li::before {
  content: ""; position: absolute; left: 4px; top: .58em;
  width: 8px; height: 8px; border-radius: 50%; background: var(--mint);
}
.ticks.on-dark li { color: var(--on-dark-soft); }

/* ---------- split ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.split-narrow { grid-template-columns: .9fr 1.1fr; }

/* ---------- process steps ---------- */
.steps { counter-reset: step; display: grid; gap: 0; }
.step {
  display: grid; grid-template-columns: 60px 1fr; gap: 24px;
  padding: 28px 0; border-top: 1px solid var(--line);
}
.step:last-child { border-bottom: 1px solid var(--line); }
.step-n {
  font-family: var(--mono); font-size: 12.5px; font-weight: 600; letter-spacing: .1em;
  color: var(--accent); padding-top: 4px; font-variant-numeric: tabular-nums;
}
.step h3 { margin-bottom: .35em; }
.step p { color: var(--text-soft); font-size: 15.5px; margin-bottom: 0; }
.band-dark .step { border-color: var(--line-dark); }
.band-dark .step p { color: var(--on-dark-soft); }
.band-dark .step-n { color: #8FAAFF; }

/* ---------- flow (before / after) ---------- */
.flow { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.flow-row { display: grid; grid-template-columns: 1.1fr 1fr 1fr; }
.flow-row + .flow-row { border-top: 1px solid var(--line); }
.flow-row > div { padding: 18px 22px; font-size: 15px; }
.flow-row > div + div { border-left: 1px solid var(--line); }
.flow-head { background: var(--wash); font-weight: 650; font-size: 13.5px !important;
             letter-spacing: .04em; text-transform: uppercase; color: var(--text-mute); }
.flow-stage { font-weight: 600; color: var(--text); }
.flow-was { color: var(--text-mute); }
.flow-now { color: var(--text); }
.flow-now strong { color: var(--accent-dk); }

/* ---------- quote / callout ---------- */
.callout {
  border-left: 3px solid var(--accent); padding: 4px 0 4px 22px;
  font-size: clamp(1.15rem, 2.2vw, 1.5rem); line-height: 1.45; font-weight: 600;
  letter-spacing: -.015em; color: var(--text);
}
.callout.on-dark { color: #fff; border-color: #8FAAFF; }

/* ---------- CTA band ---------- */
.cta-band { background: var(--ink); color: var(--on-dark); padding: 72px 0; text-align: center; }
.cta-band h2 { color: #fff; max-width: 22ch; margin-inline: auto; }
.cta-band .lede { max-width: 56ch; margin: 14px auto 0; }
.cta-band .btn-row { justify-content: center; }

/* ---------- forms ---------- */
.form { display: grid; gap: 18px; }
.field { display: grid; gap: 7px; }
.field label { font-size: 14px; font-weight: 600; color: var(--text); }
.field input, .field select, .field textarea {
  font-family: inherit; font-size: 15.5px; color: var(--text);
  padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--paper); width: 100%;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(61,107,255,.14);
}
.field textarea { resize: vertical; min-height: 128px; }
.form-note { font-size: 13.5px; color: var(--text-mute); }

/* ---------- info panel ---------- */
.panel {
  background: var(--wash); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 28px 26px;
}
.panel h3 { font-size: 1.05rem; }
.panel p, .panel li { font-size: 15px; color: var(--text-soft); }
.panel p:last-child { margin-bottom: 0; }

.kv { list-style: none; padding: 0; margin: 0; }
.kv li { display: grid; grid-template-columns: 110px 1fr; gap: 12px; margin-bottom: 11px; font-size: 15px;
         overflow-wrap: anywhere; }
a[href^="mailto:"] { overflow-wrap: anywhere; }
.kv span { color: var(--text-mute); }

/* ---------- footer ---------- */
.site-footer { background: var(--ink); color: var(--on-dark-soft); padding: 64px 0 32px; font-size: 14.5px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; }
.site-footer h3 { color: #fff; font-size: 13px; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 16px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 10px; }
.site-footer a { color: var(--on-dark-soft); text-decoration: none; }
.site-footer a:hover { color: #fff; }
.footer-brand { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 700;
                font-size: 18px; margin-bottom: 14px; letter-spacing: -.02em; }
.footer-bot {
  margin-top: 46px; padding-top: 22px; border-top: 1px solid var(--line-dark);
  display: flex; justify-content: space-between; gap: 18px; flex-wrap: wrap;
  font-size: 13.5px; color: #78839C;
}

/* ---------- hero layout with visual ---------- */
.hero-grid { display: grid; grid-template-columns: 1.02fr .98fr; gap: 54px; align-items: center; }
.hero-grid .lede { margin-top: 18px; }
.hero-viz { max-width: 520px; width: 100%; margin-inline: auto; }

/* ---------- system diagram (svg) ---------- */
.viz { width: 100%; height: auto; overflow: visible; }
.viz-node { fill: rgba(255,255,255,.045); stroke: rgba(255,255,255,.17); stroke-width: 1; }
.viz-label {
  fill: #AEB9D0; font-family: var(--sans); font-size: 11.5px; font-weight: 600;
  letter-spacing: .01em;
}
.viz-label.out { fill: #D9E0EE; }
.viz-hub-label { fill: #fff; font-family: var(--sans); font-size: 13px; font-weight: 700; letter-spacing: -.01em; }
.viz-hub-sub  { fill: rgba(255,255,255,.72); font-family: var(--sans); font-size: 10.5px; font-weight: 600; letter-spacing: .07em; }
.viz-link {
  fill: none; stroke: var(--accent); stroke-width: 1.4; opacity: .6;
  stroke-dasharray: 5 9; animation: vizflow 1.9s linear infinite;
}
.viz-link.out { stroke: var(--mint); opacity: .55; }
@keyframes vizflow { to { stroke-dashoffset: -28; } }
.viz-halo { animation: vizpulse 3.4s ease-in-out infinite; }
@keyframes vizpulse { 0%, 100% { opacity: .17; } 50% { opacity: .42; } }
.viz-dot { animation: vizblink 2.6s ease-in-out infinite; }
@keyframes vizblink { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }

/* ---------- dotted grid background ---------- */
.gridbg { position: relative; }
.gridbg > * { position: relative; z-index: 1; }
.gridbg::after {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background-image: radial-gradient(rgba(255,255,255,.07) 1px, transparent 1px);
  background-size: 30px 30px;
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 28%, #000 72%, transparent);
          mask-image: linear-gradient(180deg, transparent, #000 28%, #000 72%, transparent);
}

/* ---------- layer stack (data → ai → output) ---------- */
.stack { display: grid; grid-template-columns: repeat(3, 1fr); gap: 46px; }
.stack-card {
  position: relative; background: var(--ink-2); border: 1px solid var(--line-dark);
  border-radius: var(--radius); padding: 26px 24px;
}
.stack-card::after {
  content: ""; position: absolute; right: -31px; top: 50%;
  width: 14px; height: 14px; transform: translateY(-50%) rotate(45deg);
  border-top: 2px solid rgba(255,255,255,.3); border-right: 2px solid rgba(255,255,255,.3);
}
.stack-card:last-child::after { display: none; }
.band-wash .stack-card::after, section:not(.band-dark) .stack-card::after {
  border-color: #A9B5CC;
}
.stack-tag {
  display: block; margin-bottom: 13px; font-family: var(--mono); font-size: 11px; font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase; color: #8FAAFF;
}
.stack-card h3 { color: #fff; font-size: 1.1rem; margin-bottom: .5em; }
.stack-card .ticks li { font-size: 14.5px; color: var(--on-dark-soft); margin-bottom: 10px; }
.stack-card .ticks li:last-child { margin-bottom: 0; }

/* ---------- service row (media + copy) ---------- */
.svc-row { display: grid; grid-template-columns: .95fr 1.05fr; gap: 58px; align-items: start; }
.svc-media { position: sticky; top: 94px; }
.svc-flip .svc-media { order: 2; }
.svc-body > h2 { margin-bottom: .3em; }
.svc-body .lede { margin-bottom: 20px; }

.svc-idx {
  display: block; margin-bottom: 12px;
  font-family: var(--mono); font-size: 11.5px; font-weight: 600;
  letter-spacing: .16em; text-transform: uppercase; color: var(--accent);
}

/* ---------- spec chips ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0 0 26px; }
.chips li {
  margin: 0; padding: 5px 11px; border-radius: 7px;
  background: var(--paper); border: 1px solid var(--line);
  font-family: var(--mono); font-size: 11.5px; line-height: 1.5; color: var(--text-mute);
}
.chips li b { color: var(--text); font-weight: 600; }
.chips.on-dark li { background: rgba(255,255,255,.05); border-color: var(--line-dark); color: var(--on-dark-soft); }
.chips.on-dark li b { color: #fff; }

/* ---------- what it saves ---------- */
.gain {
  margin: 26px 0 0; padding: 16px 18px; border-radius: 10px;
  background: rgba(0,192,139,.07); border: 1px solid rgba(0,192,139,.3);
  font-size: 15px; line-height: 1.55; color: var(--text);
}
.gain b {
  display: block; margin-bottom: 5px; font-family: var(--mono); font-size: 11px;
  font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: #0A8F68;
}
.gain.on-dark { background: rgba(0,192,139,.09); border-color: rgba(0,192,139,.32); color: var(--on-dark); }
.gain.on-dark b { color: #4ED7AC; }

/* ---------- headline metrics ---------- */
.metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 26px; }
.metric { border-top: 2px solid rgba(255,255,255,.14); padding-top: 20px; }
.metric.hl { border-top-color: var(--mint); }
.metric strong {
  display: block; margin-bottom: 8px; line-height: 1.03; color: #fff;
  font-size: clamp(1.85rem, 3.3vw, 2.5rem); font-weight: 700; letter-spacing: -.035em;
  font-variant-numeric: tabular-nums;
}
.metric span { display: block; font-size: 14.5px; color: var(--on-dark-soft); }

/* ---------- app frame around diagrams ---------- */
.frame {
  background: #0E1526; border: 1px solid var(--line); border-radius: 13px;
  overflow: hidden; box-shadow: var(--shadow-md);
}
.band-dark .frame, .page-head .frame { border-color: rgba(255,255,255,.13); box-shadow: none; }
.frame-bar {
  display: flex; align-items: center; gap: 6px; padding: 10px 14px;
  background: #131B30; border-bottom: 1px solid rgba(255,255,255,.07);
}
.frame-bar i { width: 9px; height: 9px; border-radius: 50%; background: rgba(255,255,255,.16); }
.frame-bar em {
  margin-left: 8px; font-style: normal; font-family: var(--mono);
  font-size: 11px; letter-spacing: .04em; color: #8894AE;
}
.frame svg { display: block; width: 100%; height: auto; }

/* ---------- diagram primitives ---------- */
.fx-bg    { fill: #0E1526; }
.fx-panel { fill: rgba(255,255,255,.04); stroke: rgba(255,255,255,.09); stroke-width: 1; }
.fx-row   { fill: rgba(255,255,255,.03); }
.fx-head  { fill: rgba(255,255,255,.06); }
.fx-rule  { stroke: rgba(255,255,255,.08); stroke-width: 1; }
.fx-txt   { fill: #8894AE; font-family: var(--mono); font-size: 9px; letter-spacing: .02em; }
.fx-txt-b { fill: #DCE3F0; font-family: var(--mono); font-size: 9.5px; font-weight: 600; letter-spacing: .02em; }
.fx-txt-a { fill: #9DB5FF; font-family: var(--mono); font-size: 9px; font-weight: 600; letter-spacing: .06em; }
.fx-txt-m { fill: #4ED7AC; font-family: var(--mono); font-size: 9px; font-weight: 600; letter-spacing: .02em; }
.fx-mask  { fill: rgba(255,255,255,.20); font-family: var(--mono); font-size: 9.5px; letter-spacing: .06em; }
.fx-bar   { fill: #3D6BFF; }
.fx-bar-2 { fill: #00C08B; }
.fx-ghost { fill: rgba(255,255,255,.05); stroke: rgba(255,255,255,.15); stroke-width: 1; stroke-dasharray: 3 3; }
.fx-hl    { fill: rgba(61,107,255,.15); stroke: rgba(61,107,255,.45); stroke-width: 1; }
.fx-hl-m  { fill: rgba(0,192,139,.14); stroke: rgba(0,192,139,.45); stroke-width: 1; }
.fx-dim   { fill: rgba(255,255,255,.12); }
.fx-dim-2 { fill: rgba(255,255,255,.07); }
.fx-arrow { stroke: rgba(255,255,255,.28); stroke-width: 1.2; fill: none; }
.fx-flow  { stroke: #3D6BFF; stroke-width: 1.3; fill: none; stroke-dasharray: 4 6; animation: vizflow 1.9s linear infinite; }

/* ---------- pricing ---------- */
.price { margin: 4px 0 16px; }
.price strong {
  display: block; font-size: clamp(1.7rem, 3vw, 2.1rem); font-weight: 700;
  letter-spacing: -.03em; font-variant-numeric: tabular-nums; color: var(--text);
}
.price span {
  font-family: var(--mono); font-size: 11px; font-weight: 600;
  letter-spacing: .13em; text-transform: uppercase; color: var(--text-mute);
}
.tag-pop {
  display: inline-block; margin-left: 10px; padding: 3px 10px; border-radius: 999px;
  background: rgba(0,192,139,.12); border: 1px solid rgba(0,192,139,.4); color: #0A8F68;
  font-family: var(--mono); font-size: 10.5px; font-weight: 600; letter-spacing: .12em;
  text-transform: uppercase; vertical-align: 2px;
}

@media (max-width: 1120px) {
  .nav-links { gap: 20px; }
  .nav-links a { font-size: 14px; }
}

/* ---------- scroll reveal (class applied by js, so no-js pages stay visible) ---------- */
.will-reveal { opacity: 0; transform: translateY(16px); transition: opacity .55s ease, transform .55s ease; }
.will-reveal.revealed { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .viz-link, .viz-halo, .viz-dot, .fx-flow { animation: none; }
  .will-reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

@media (max-width: 940px) {
  .svc-row { grid-template-columns: 1fr; gap: 32px; }
  .svc-media { position: static; }
  .svc-flip .svc-media { order: 0; }
  .metrics { grid-template-columns: repeat(2, 1fr); gap: 28px; }
}
@media (max-width: 560px) {
  .metrics { grid-template-columns: 1fr; }
}

/* ---------- responsive ---------- */
@media (max-width: 1040px) {
  .hero-grid { grid-template-columns: 1fr; gap: 46px; }
  .hero h1 { max-width: 20ch; }
}
@media (max-width: 940px) {
  .stack { grid-template-columns: 1fr; gap: 36px; }
  .stack-card::after {
    right: auto; left: 50%; top: auto; bottom: -26px;
    transform: translateX(-50%) rotate(135deg);
  }
}
@media (max-width: 940px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .split, .split-narrow { grid-template-columns: 1fr; gap: 36px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}
@media (max-width: 760px) {
  body { font-size: 16.5px; }
  section { padding: 62px 0; }
  .hero { padding: 78px 0 70px; }
  .nav-links {
    display: none; position: absolute; top: 68px; left: 0; right: 0;
    flex-direction: column; align-items: flex-start; gap: 0;
    background: var(--paper); border-bottom: 1px solid var(--line); padding: 10px 24px 18px;
  }
  .nav-links.open { display: flex; }
  .nav-links li { width: 100%; }
  .nav-links a { display: block; padding: 11px 0; font-size: 16px; }
  .nav-toggle { display: inline-flex; }
  .nav-cta .btn { display: none; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .hero-stats { gap: 28px; }
  .hero-stats div { flex: 1 1 40%; }
  .flow-row { grid-template-columns: 1fr; }
  .flow-row > div + div { border-left: 0; border-top: 1px dashed var(--line); }
  .flow-head { display: none; }
  /* wide diagrams stay legible: scroll inside the frame instead of shrinking to nothing */
  .frame { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .frame svg[viewBox^="0 0 960"] { min-width: 780px; }
  .step { grid-template-columns: 1fr; gap: 6px; }
  .footer-grid { grid-template-columns: 1fr; }
  .kv li { grid-template-columns: 96px 1fr; }
}
