/* SevnLabs — design tokens & styles
   Montserrat (text) + Source Sans 3 (labels, data). Light theme, blue accent panels.
   Scroll motion: [data-anim] elements reveal (and re-hide below the fold) via main.js. */

@font-face {
  font-family: "Montserrat";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/montserrat-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Source Sans 3";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/source-sans-3-latin.woff2") format("woff2");
}

/* ---------- Tokens ---------- */
:root,
.theme-light {
  --bg: #ffffff;
  --bg-elev: #ffffff;
  --bg-elev-2: #f5f6f8;
  --line: rgba(10, 11, 13, 0.08);
  --line-strong: rgba(10, 11, 13, 0.15);
  --text: #0a0b0d;
  --muted: #4f5662;
  --dim: #6b7280;
  --accent: #2b4bf2;
  --accent-soft: rgba(43, 75, 242, 0.08);
  --btn-bg: #0a0b0d;
  --btn-ink: #ffffff;
  --btn-hover: #23262d;
  --dot: #047857;
}
:root {
  --guide: rgba(10, 11, 13, 0.05);
  --blue: #2b4bf2;
  --blue-deep: #1a2fc4;
  --ok: #047857;
  --warn: #b45309;
  --err: #dc2626;
  --shadow: 0 1px 2px rgba(10, 11, 13, 0.04), 0 12px 32px -12px rgba(10, 11, 13, 0.12);
  --shadow-lg: 0 40px 80px -30px rgba(5, 10, 40, 0.55);

  --font-sans: "Montserrat", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-label: "Source Sans 3", "Montserrat", ui-sans-serif, system-ui, sans-serif;
  --font-code: ui-monospace, SFMono-Regular, Menlo, monospace;

  --maxw: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
  --radius: 14px;
  --radius-lg: 28px;
  --section-y: clamp(80px, 11vw, 140px);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  color-scheme: light;
}

/* Blue panels (hero, product stage, CTA) re-scope the tokens */
.panel-blue {
  --text: #ffffff;
  --muted: rgba(255, 255, 255, 0.9);
  --dim: rgba(255, 255, 255, 0.92);
  --line: rgba(255, 255, 255, 0.16);
  --line-strong: rgba(255, 255, 255, 0.3);
  --accent: #ffffff;
  --accent-soft: rgba(255, 255, 255, 0.14);
  --btn-bg: #ffffff;
  --btn-ink: #0a0b0d;
  --btn-hover: #e9ecff;
  --dot: #7dfcc6;
  background:
    radial-gradient(120% 90% at 85% 0%, rgba(120, 150, 255, 0.55), transparent 55%),
    linear-gradient(160deg, var(--blue) 0%, var(--blue-deep) 100%);
  color: var(--text);
  border-radius: var(--radius-lg);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 96px; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--font-sans); font-size: 16px; line-height: 1.65;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; height: auto; }
figure { margin: 0; }
a { color: inherit; text-decoration: none; }
p { margin: 0 0 1em; text-wrap: pretty; }
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -0.025em; line-height: 1.1; text-wrap: balance; }
code, pre { font-family: var(--font-code); }
ul { margin: 0; padding: 0; list-style: none; }
::selection { background: var(--blue); color: #fff; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.i { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.skip-link { position: absolute; left: 16px; top: -48px; z-index: 100; background: var(--blue); color: #fff; padding: 10px 14px; border-radius: 8px; font-weight: 600; }
.skip-link:focus { top: 12px; }
.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; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
.container--narrow { max-width: 860px; }
.muted { color: var(--muted); }
.accent { color: var(--accent); }

/* Static column guides behind the page */
body::before {
  content: ""; position: fixed; top: 0; bottom: 0; left: 50%; z-index: 0; pointer-events: none;
  width: min(100% - 2 * var(--gutter), var(--maxw) - 2 * var(--gutter)); transform: translateX(-50%);
  border-left: 1px solid var(--guide); border-right: 1px solid var(--guide);
  background-image: linear-gradient(var(--guide), var(--guide)), linear-gradient(var(--guide), var(--guide)), linear-gradient(var(--guide), var(--guide));
  background-size: 1px 100%; background-repeat: no-repeat; background-position: 25% 0, 50% 0, 75% 0;
}
body:has(.legal)::before { display: none; }
@media (max-width: 760px) { body::before { display: none; } }
main, .footer { position: relative; z-index: 1; }

/* ---------- Nav: full width at top, floating pill once scrolled ---------- */
.nav { position: sticky; top: 0; z-index: 50; padding: 0 clamp(8px, 1.4vw, 20px); transition: padding .5s var(--ease-out); }
.nav__inner {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  height: 68px; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter);
  background: rgba(255, 255, 255, 0.9); border: 1px solid transparent; border-radius: 0;
  backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px);
  transition: max-width .55s var(--ease-out), height .55s var(--ease-out), border-radius .55s var(--ease-out),
              padding .55s var(--ease-out), box-shadow .55s var(--ease-out), border-color .55s var(--ease-out);
}
.nav.is-compact { padding-top: 10px; }
.nav.is-compact .nav__inner {
  max-width: 900px; height: 58px; padding: 0 10px 0 24px; border-radius: 999px;
  border-color: var(--line); box-shadow: 0 10px 30px -12px rgba(10, 11, 13, 0.18); background: rgba(255, 255, 255, 0.97);
}
.brand { display: inline-flex; align-items: center; min-height: 44px; font-weight: 700; letter-spacing: -0.035em; font-size: 21px; }
.nav__links { display: flex; align-items: center; gap: 28px; }
.nav__links a { color: var(--muted); font-size: 14px; font-weight: 500; transition: color .2s var(--ease); }
.nav__links a:hover { color: var(--text); }
.nav__cta { display: flex; align-items: center; gap: 10px; }
.nav__toggle { display: none; background: #fff; border: 1px solid var(--line-strong); color: var(--text); border-radius: 999px; width: 44px; height: 44px; cursor: pointer; align-items: center; justify-content: center; }
@media (max-width: 900px) {
  .nav.is-compact .nav__inner { padding-left: 20px; }
  .nav__links {
    position: absolute; top: calc(100% + 8px); left: clamp(8px, 1.4vw, 20px); right: clamp(8px, 1.4vw, 20px);
    flex-direction: column; align-items: stretch; gap: 0; padding: 8px 20px; display: none;
    background: #fff; border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow);
  }
  .nav__links.is-open { display: flex; }
  .nav__links a { display: block; padding: 14px 0; font-size: 16px; border-bottom: 1px solid var(--line); }
  .nav__links li:last-child a { border-bottom: 0; }
  .nav__toggle { display: inline-flex; }
}
@media (max-width: 900px) { .nav__inner > nav { display: contents; } }
@media (max-width: 420px) {
  .nav__inner { gap: 10px; }
  .nav__cta .btn--sm { min-height: 44px; padding: 0 14px; font-size: 13px; white-space: nowrap; }
  .brand { font-size: 19px; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 20px;
  border-radius: 999px; border: 1px solid transparent; font-family: var(--font-sans); font-size: 15px; font-weight: 600;
  letter-spacing: -0.01em; cursor: pointer; white-space: nowrap;
  transition: background .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease), transform .25s var(--ease-out), box-shadow .25s var(--ease);
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(.98); }
.btn .i { width: 17px; height: 17px; transition: transform .25s var(--ease-out); }
.btn:hover .i:last-child { transform: translateX(3px); }
.btn--primary { background: var(--btn-bg); color: var(--btn-ink); box-shadow: 0 8px 20px -10px rgba(10, 11, 13, 0.5); }
.btn--primary:hover { background: var(--btn-hover); }
.btn--glass { color: var(--text); border-color: var(--line-strong); background: rgba(255, 255, 255, 0.08); }
.btn--glass:hover { border-color: var(--text); background: rgba(255, 255, 255, 0.16); }
.btn--sm { min-height: 40px; padding: 0 16px; font-size: 14px; }
.btn--lg { min-height: 52px; padding: 0 26px; font-size: 16px; }

/* ---------- Type ---------- */
.eyebrow { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-label); font-size: 13px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--dim); }
.eyebrow .idx { color: var(--accent); }
.h-display { font-size: clamp(42px, 7.4vw, 92px); font-weight: 700; letter-spacing: -0.045em; line-height: 1; }
.h-section { font-size: clamp(32px, 4.6vw, 56px); font-weight: 600; letter-spacing: -0.04em; line-height: 1.04; }
.h-card { font-size: 18px; letter-spacing: -0.02em; line-height: 1.3; }
.lede { font-size: clamp(17px, 1.6vw, 20px); color: var(--muted); max-width: 54ch; line-height: 1.55; }

/* ---------- Sections ---------- */
.section { padding: var(--section-y) 0; position: relative; }
.section__head { display: grid; justify-items: center; text-align: center; gap: 18px; margin: 0 auto clamp(48px, 6vw, 72px); max-width: 820px; }
.section__head .lede { margin: 0; }
.oneliner { margin: clamp(48px, 6vw, 72px) auto 0; text-align: center; font-size: clamp(20px, 2.4vw, 28px); font-weight: 500; letter-spacing: -0.025em; color: var(--muted); max-width: 30ch; line-height: 1.3; }
.oneliner b { color: var(--text); font-weight: 600; }

.frame { border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-elev); box-shadow: var(--shadow); position: relative; }
.icon { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; color: var(--accent); background: var(--accent-soft); flex: none; }
.icon .i { width: 20px; height: 20px; }

/* ---------- Hero ---------- */
.hero { margin: 8px clamp(8px, 1.4vw, 20px) 0; padding: clamp(72px, 10vw, 136px) 0 clamp(72px, 10vw, 136px); overflow: hidden; position: relative; transform-origin: 50% 0; }
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(to right, var(--line) 1px, transparent 1px), linear-gradient(to bottom, var(--line) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 58% 42% at 50% 32%, transparent 60%, #000 100%);
          mask-image: radial-gradient(ellipse 58% 42% at 50% 32%, transparent 60%, #000 100%);
  opacity: .7;
}
.hero__inner { position: relative; }
.hero__copy { display: grid; justify-items: center; text-align: center; gap: 28px; max-width: 980px; margin: 0 auto; }
.hero__sub { margin: 0; max-width: 34ch; font-size: clamp(18px, 2vw, 24px); line-height: 2.05; color: var(--muted); font-weight: 500; letter-spacing: -0.01em; }
.chip {
  display: inline-flex; align-items: center; gap: 7px; padding: 1px 14px 1px 11px; margin: 0 2px;
  border-radius: 999px; background: rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
  color: var(--text); font-weight: 600; line-height: 1.55; white-space: nowrap; vertical-align: 1px;
}
.chip .i { width: 17px; height: 17px; }
.chip--text { padding-inline: 13px; }
.hero__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.trust { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 24px; font-family: var(--font-label); font-size: 14.5px; font-weight: 500; color: var(--muted); }
.trust li { display: inline-flex; align-items: center; gap: 8px; }
.trust .i { width: 14px; height: 14px; color: var(--accent); }
.status { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-label); font-size: 13.5px; font-weight: 500; letter-spacing: .01em; color: var(--muted); border: 1px solid var(--line-strong); border-radius: 999px; padding: 6px 14px 6px 12px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--dot); animation: pulse 2.4s infinite; flex: none; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--dot) 45%, transparent); } 70% { box-shadow: 0 0 0 8px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
@media (max-width: 420px) { .status { font-size: 12px; padding: 6px 10px; gap: 8px; } .chip { padding: 1px 10px 1px 8px; } }

/* ---------- How it works ---------- */
.layers { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(24px, 4vw, 56px); align-items: center; }
.layers__list { border-top: 1px solid var(--line); }
.layer { display: grid; grid-template-columns: 42px 1fr; gap: 20px; padding: 26px 0; border-bottom: 1px solid var(--line); }
.layer h3 { font-size: 20px; margin-bottom: 6px; }
.layer p { margin: 0; color: var(--muted); font-size: 15.5px; }
.layer { border-radius: 12px; transition: background .3s var(--ease); outline-offset: 4px; }
.layer .tags { margin-top: 0; max-height: 0; overflow: hidden; }
.layer .tag { opacity: 0; transform: translateY(6px) scale(.96); transition: opacity .35s var(--ease-out), transform .35s var(--ease-out); }
.layer:hover .tags, .layer:focus-within .tags { margin-top: 12px; max-height: 80px; }
.layer:hover .tag, .layer:focus-within .tag { opacity: 1; transform: none; }
.layer:hover .tag:nth-child(2), .layer:focus-within .tag:nth-child(2) { transition-delay: .05s; }
.layer:hover .tag:nth-child(3), .layer:focus-within .tag:nth-child(3) { transition-delay: .1s; }
.layer:hover .tag:nth-child(4), .layer:focus-within .tag:nth-child(4) { transition-delay: .15s; }
.layer .tags { transition: max-height .4s var(--ease-out), margin-top .4s var(--ease-out); }
@media (hover: none) { .layer .tags { margin-top: 12px; max-height: none; } .layer .tag { opacity: 1; transform: none; } }
.layers__fig { padding: 20px; }
.flowfig { cursor: pointer; }
.flowfig__stack { display: grid; }
.flowfig__stack > svg { grid-area: 1 / 1; width: 100%; transition: opacity .5s var(--ease-out), transform .6s var(--ease-out); }
.flowfig__detail { opacity: 0; transform: scale(.97); }
.flowfig:hover .flowfig__flow, .flowfig:focus-within .flowfig__flow { opacity: 0; transform: scale(1.03); }
.flowfig:hover .flowfig__detail, .flowfig:focus-within .flowfig__detail { opacity: 1; transform: none; }
.flowfig__hint { margin: 8px 0 0; text-align: center; font-family: var(--font-label); font-size: 13px; font-weight: 600; letter-spacing: .04em; color: var(--dim); transition: opacity .3s; }
.flowfig:hover .flowfig__hint, .flowfig:focus-within .flowfig__hint { opacity: 0; }
.hint-touch { display: none; }
@media (hover: none) { .hint-hover { display: none; } .hint-touch { display: inline; } }

/* Flow animation (branch sites → sources → semantic layers → one view) */
.fl-cap { font-size: 13px; font-weight: 600; letter-spacing: .3px; fill: #2f343c; }
.fl-branch { color: #6b7280; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.fl-branch--off .fl-branch { color: #dc2626; }
.fl-sites .fl-branch--off circle { fill: #e5e7eb; animation: none; }
.fl-offline circle { fill: #fff; stroke: #dc2626; stroke-width: 1.4; }
.fl-offline path { stroke: #dc2626; stroke-width: 1.6; stroke-linecap: round; }
.fl-card-dot--off { fill: #dc2626; }
.fl-logo { fill: #2b4bf2; }
.fl-logo-s { font-family: "Montserrat", sans-serif; font-size: 17px; font-weight: 700; fill: #fff; }
.fl-brand { font-family: "Montserrat", sans-serif; font-size: 14px; font-weight: 700; letter-spacing: -.3px; fill: #0a0b0d; }
.fl-sites circle { fill: #c7cfe8; animation: site-pulse 3.2s var(--ease) infinite; }
.fl-sites circle:nth-child(3n) { animation-delay: .4s; }
.fl-sites circle:nth-child(4n) { animation-delay: .9s; }
.fl-sites circle:nth-child(5n+1) { animation-delay: 1.5s; }
.fl-sites circle:nth-child(7n) { animation-delay: 2.1s; }
@keyframes site-pulse { 0%, 100% { fill: #c7cfe8; } 45% { fill: #2b4bf2; } 60% { fill: #6f86ff; } }
.fl-wires path { fill: none; stroke: rgba(43, 75, 242, 0.16); stroke-width: 1.2; }
.fl-wires .fl-wire--strong, .fl-out { fill: none; stroke: rgba(43, 75, 242, 0.42); stroke-width: 1.6; }
.fl-pkt { fill: #2b4bf2; opacity: .75; }
.fl-pkt--strong { fill: #2b4bf2; opacity: 1; }
.fl-node circle { fill: #fff; stroke: rgba(43, 75, 242, 0.35); stroke-width: 1.4; }
.fl-node use { color: #2b4bf2; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.fl-node-label { font-size: 12.5px; font-weight: 600; fill: #2f343c; }
.fl-glow { fill: rgba(43, 75, 242, 0.22); animation: glow 4s var(--ease) infinite; }
@keyframes glow { 0%, 100% { opacity: .6; } 50% { opacity: 1; } }
.fl-lyr { animation: float 5s var(--ease) infinite; }
.fl-lyr--2 { animation-delay: -1.6s; }
.fl-lyr--3 { animation-delay: -3.2s; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
.fl-lyr polygon:not(.fl-lyr-side) { stroke: rgba(43, 75, 242, 0.5); stroke-width: 1.2; }
.fl-lyr-side { fill: rgba(26, 47, 196, 0.18); }
.fl-lyr text { font-size: 12.5px; font-weight: 600; fill: #1a2fc4; }
.fl-lyr--3 text { fill: #fff; }
.fl-card rect:first-child { fill: #fff; stroke: rgba(43, 75, 242, 0.35); stroke-width: 1.4; filter: drop-shadow(0 10px 18px rgba(26, 47, 196, 0.18)); }
.fl-card-bar { fill: #e3e8fb; }
.fl-card-dot:not(.fl-card-dot--off) { fill: #c7cfe8; animation: card-on 4.8s var(--ease) infinite; }
.fl-card-dot--2 { animation-delay: .4s; } .fl-card-dot--3 { animation-delay: .8s; }
.fl-card-dot--5 { animation-delay: 1.6s; } .fl-card-dot--6 { animation-delay: 2s; }
@keyframes card-on { 0%, 15% { fill: #c7cfe8; } 30%, 85% { fill: #047857; } 100% { fill: #c7cfe8; } }
@media (max-width: 600px) {
  .layers__fig { padding: 10px; }
  /* The figure scales to fit; enlarge the key SVG labels so they stay legible after scaling. */
  .fl-node-label { font-size: 17px; }
  .fl-lyr text { font-size: 14px; }
  .fl-cap { font-size: 17px; }
  .fl-brand { font-size: 16px; }
}
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { font-family: var(--font-label); font-size: 13px; font-weight: 500; color: var(--muted); border: 1px solid var(--line-strong); border-radius: 999px; padding: 3px 10px; white-space: nowrap; }
@media (max-width: 980px) { .layers { grid-template-columns: 1fr; } }

/* Diagram line drawing */
.draw { stroke-dasharray: 1; stroke-dashoffset: 0; }
.js [data-draw] .draw { stroke-dashoffset: 1; transition: stroke-dashoffset 1.2s var(--ease-out) .35s; }
.js [data-draw] .draw--late { transition-delay: .9s; }
.js [data-draw].is-in .draw { stroke-dashoffset: 0; }

/* ---------- Product (SaaS preview) ---------- */
.stage { padding: clamp(14px, 3.6vw, 44px); }
.app { display: grid; grid-template-columns: 180px 1fr; background: #fff; color: var(--text); border-radius: 16px; overflow: hidden; box-shadow: var(--shadow-lg); min-height: 520px; text-align: left; }
.app__side { background: #f7f8fb; border-right: 1px solid var(--line); padding: 18px 12px; display: flex; flex-direction: column; gap: 2px; }
.app__logo { font-weight: 700; letter-spacing: -0.03em; font-size: 16px; padding: 4px 10px 16px; }
.app__nav { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 10px; font-family: var(--font-label); font-size: 14.5px; font-weight: 600; color: var(--muted); }
.app__nav .i { width: 17px; height: 17px; }
.app__nav.is-active { background: #fff; color: var(--text); box-shadow: 0 1px 2px rgba(10, 11, 13, 0.06), 0 0 0 1px var(--line); }
.app__nav.is-active .i { color: var(--blue); }
.app__nav em { margin-left: auto; font-style: normal; font-size: 12px; color: #fff; background: var(--err); border-radius: 999px; padding: 0 7px; line-height: 18px; }
.app__main { display: flex; flex-direction: column; min-width: 0; }
.app__top { display: flex; align-items: center; gap: 12px; padding: 14px 20px; border-bottom: 1px solid var(--line); }
.app__title { font-weight: 600; font-size: 15px; letter-spacing: -0.01em; margin-right: auto; }
.app__search { display: inline-flex; align-items: center; gap: 8px; min-width: 210px; padding: 7px 12px; border: 1px solid var(--line-strong); border-radius: 10px; font-family: var(--font-label); font-size: 14px; color: var(--dim); }
.app__search .i { width: 15px; height: 15px; }
.app__range { font-family: var(--font-label); font-size: 14px; font-weight: 600; color: var(--muted); padding: 7px 12px; border: 1px solid var(--line-strong); border-radius: 10px; }
.app__avatar { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--blue); color: #fff; font-size: 12px; font-weight: 700; }
.app__kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; padding: 16px 20px 0; }
.kpi { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; display: grid; gap: 2px; }
.kpi__k { font-family: var(--font-label); font-size: 13px; font-weight: 600; color: var(--muted); }
.kpi b { font-size: 22px; font-weight: 700; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.kpi b small { font-size: 14px; color: var(--dim); font-weight: 600; }
.kpi--err { color: var(--err); }
.app__grid { display: grid; grid-template-columns: 1.85fr 1fr; gap: 16px; padding: 16px 20px 20px; flex: 1; }
.app__table { border: 1px solid var(--line); border-radius: 12px; overflow-x: auto; display: flex; flex-direction: column; }
.ptable { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 470px; }
.ptable th { text-align: left; font-family: var(--font-label); font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--dim); padding: 11px 12px; border-bottom: 1px solid var(--line); background: #fafbfc; }
.ptable td { padding: 10px 12px; border-bottom: 1px solid var(--line); color: var(--muted); white-space: nowrap; }
.ptable tbody tr:last-child td { border-bottom: 0; }
.ptable .num { font-family: var(--font-label); font-size: 14.5px; font-variant-numeric: tabular-nums; }
.app-row { cursor: pointer; transition: background .2s var(--ease); }
.app-row:hover, .app-row:focus-visible { background: var(--accent-soft); }
.app-row:focus-visible { outline: 2px solid var(--blue); outline-offset: -2px; }
.app-row .site { display: block; color: var(--text); font-weight: 600; }
.app-row .city { display: block; font-family: var(--font-label); font-size: 13px; color: var(--dim); }
.app__tip { margin: auto 0 0; padding: 10px 16px; display: flex; align-items: center; gap: 8px; font-family: var(--font-label); font-size: 13px; font-weight: 600; color: var(--dim); border-top: 1px solid var(--line); }
.app__tip .i { width: 14px; height: 14px; color: var(--blue); }
.pill { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-label); font-size: 12.5px; font-weight: 600; padding: 2px 10px; border-radius: 999px; border: 1px solid var(--line-strong); }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill--ok { color: var(--ok); border-color: rgba(4, 120, 87, 0.3); background: rgba(4, 120, 87, 0.06); }
.pill--warn { color: var(--warn); border-color: rgba(180, 83, 9, 0.3); background: rgba(180, 83, 9, 0.06); }
.pill--err { color: var(--err); border-color: rgba(220, 38, 38, 0.3); background: rgba(220, 38, 38, 0.06); }
.app__side-panel { display: grid; gap: 12px; align-content: start; }
.insight { border: 1px solid var(--line); border-radius: 12px; padding: 14px; background: #fafbfc; display: grid; gap: 6px; }
.insight__k { font-family: var(--font-label); font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.insight__k .i { width: 14px; height: 14px; color: var(--ok); }
.insight p { margin: 0; font-size: 14px; color: var(--muted); line-height: 1.5; }
.insight b { color: var(--text); font-weight: 600; }
.insight--ok { background: rgba(4, 120, 87, 0.05); border-color: rgba(4, 120, 87, 0.2); }
.dot--err { --dot: var(--err); }
.bars { display: grid; gap: 7px; margin-top: 2px; }
.bar { display: grid; grid-template-columns: 70px 1fr 44px; gap: 10px; align-items: center; font-family: var(--font-label); font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.bar span:nth-child(2) { height: 6px; border-radius: 999px; background: var(--line); position: relative; overflow: hidden; }
.bar span:nth-child(2) i { position: absolute; inset: 0 auto 0 0; background: var(--blue); border-radius: 999px; transform-origin: 0 50%; }
.bar span:last-child { text-align: right; }
.w-95 { width: 95%; } .w-85 { width: 85%; } .w-80 { width: 80%; } .w-70 { width: 70%; }
.js .stage[data-anim] .bar i { transform: scaleX(0); transition: transform 1.1s var(--ease-out) .5s; }
.js .stage[data-anim].is-in .bar i { transform: scaleX(1); }
@media (max-width: 1100px) { .app__search { display: none; } .app__grid { grid-template-columns: 1fr; } .app__side-panel { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 980px) { .app { grid-template-columns: 1fr; } .app__side { display: none; } }
@media (max-width: 760px) { .app__side-panel { grid-template-columns: 1fr; } }
@media (max-width: 600px) { .app__kpis { grid-template-columns: repeat(2, 1fr); padding: 12px 12px 0; } .app__grid { padding: 12px; } .app__top { padding: 12px; } .app__range { display: none; } .kpi b { font-size: 19px; } }

/* Link details dialog */
.modal { width: min(460px, calc(100% - 32px)); padding: 0; border: 0; border-radius: 18px; background: #fff; color: var(--text); box-shadow: 0 40px 80px -20px rgba(5, 10, 40, 0.45); }
.modal::backdrop { background: rgba(10, 11, 13, 0.45); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.modal[open] { animation: modal-in .35s var(--ease-out); }
@keyframes modal-in { from { opacity: 0; transform: translateY(12px) scale(.97); } to { opacity: 1; transform: none; } }
.modal__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding: 22px 22px 0; }
.modal__eyebrow { font-family: var(--font-label); font-size: 13px; font-weight: 600; color: var(--blue); letter-spacing: .04em; text-transform: uppercase; }
.modal h3 { font-size: 22px; letter-spacing: -0.03em; margin-top: 4px; }
.modal__close { width: 40px; height: 40px; border-radius: 999px; border: 1px solid var(--line-strong); background: #fff; color: var(--muted); display: grid; place-items: center; cursor: pointer; flex: none; }
.modal__close:hover { color: var(--text); border-color: var(--text); }
.modal__status { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; padding: 14px 22px 0; font-family: var(--font-label); font-size: 14px; color: var(--muted); }
.modal__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; margin: 18px 22px 0; background: var(--line); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.modal__grid > div { background: #fff; padding: 12px 14px; }
.modal__wide { grid-column: 1 / -1; }
.modal dt { font-family: var(--font-label); font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--dim); }
.modal dd { margin: 2px 0 0; font-weight: 600; font-size: 15px; font-variant-numeric: tabular-nums; }
.modal__foot { display: flex; justify-content: space-between; align-items: center; padding: 16px 22px 20px; }
.modal__note { font-family: var(--font-label); font-size: 13px; color: var(--dim); }

/* ---------- Cards ---------- */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.card { padding: 28px; display: grid; gap: 14px; align-content: start; transition: transform .35s var(--ease-out), box-shadow .35s var(--ease-out), border-color .35s; }
.card:hover { transform: translateY(-4px); box-shadow: 0 2px 4px rgba(10, 11, 13, 0.04), 0 24px 48px -20px rgba(10, 11, 13, 0.22); border-color: var(--line-strong); }
.card p { margin: 0; color: var(--muted); font-size: 15.5px; }
.card ul { display: grid; gap: 8px; margin-top: 4px; }
.card--reveal ul { max-height: 0; margin-top: 0; overflow: hidden; transition: max-height .45s var(--ease-out), margin-top .45s var(--ease-out); }
.card--reveal li { opacity: 0; transform: translateX(-8px); transition: opacity .35s var(--ease-out), transform .35s var(--ease-out); }
.card--reveal:hover ul, .card--reveal:focus-within ul { max-height: 140px; margin-top: 4px; }
.card--reveal:hover li, .card--reveal:focus-within li { opacity: 1; transform: none; }
.card--reveal:hover li:nth-child(2), .card--reveal:focus-within li:nth-child(2) { transition-delay: .06s; }
.card--reveal:hover li:nth-child(3), .card--reveal:focus-within li:nth-child(3) { transition-delay: .12s; }
@media (hover: none) { .card--reveal ul { max-height: none; margin-top: 4px; } .card--reveal li { opacity: 1; transform: none; } }
.card li { font-family: var(--font-label); font-size: 14.5px; color: var(--muted); display: flex; gap: 10px; }
.card li::before { content: "→"; color: var(--accent); }
@media (max-width: 980px) { .grid-3 { grid-template-columns: 1fr; } }

/* ---------- Principles ---------- */
.principles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.principle { display: grid; grid-template-columns: 42px 1fr; gap: 16px; padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-elev); }
.principle h3 { font-size: 16.5px; margin: 2px 0 4px; letter-spacing: -0.015em; }
.principle p { margin: 0; color: var(--muted); font-size: 14.5px; line-height: 1.55; }
@media (max-width: 980px) { .principles { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .principles { grid-template-columns: 1fr; } }

/* ---------- FAQ ---------- */
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 22px 0; min-height: 44px; font-weight: 600; font-size: 17px; letter-spacing: -0.015em; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--font-label); font-weight: 400; color: var(--dim); font-size: 20px; transition: transform .3s var(--ease-out); }
.faq details[open] summary::after { transform: rotate(45deg); color: var(--accent); }
.faq details p { color: var(--muted); margin: -6px 0 22px; max-width: 68ch; font-size: 15.5px; }

/* ---------- CTA ---------- */
.section--cta { padding-top: 0; }
.cta { position: relative; overflow: hidden; display: grid; justify-items: center; text-align: center; gap: 18px; padding: clamp(56px, 9vw, 104px) var(--gutter); box-shadow: var(--shadow-lg); }
.cta::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(var(--line-strong) 1px, transparent 1px); background-size: 22px 22px;
  -webkit-mask-image: radial-gradient(ellipse 60% 70% at 50% 50%, #000, transparent 80%);
          mask-image: radial-gradient(ellipse 60% 70% at 50% 50%, #000, transparent 80%);
  opacity: .55;
}
.cta > * { position: relative; }
.cta .lede { margin: 0 0 12px; }
.cta__actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); padding: 40px 0 36px; font-size: 14px; color: var(--muted); background: var(--bg); }
.footer__inner { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 24px 48px; }
.footer__brand p { margin: 4px 0 0; }
.footer__links { display: flex; flex-wrap: wrap; gap: 0 24px; max-width: 640px; }
.footer__links a { display: inline-flex; align-items: center; min-height: 44px; }
.footer__links a:hover { color: var(--text); }
.footer__legal { margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; font-family: var(--font-label); font-size: 13.5px; color: var(--dim); }
.footer__legal span:last-child { max-width: 70ch; }

/* ---------- Legal pages ---------- */
.legal { padding: clamp(48px, 7vw, 88px) 0 var(--section-y); }
.legal__wrap { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: clamp(24px, 5vw, 64px); align-items: start; }
.legal__toc { position: sticky; top: 100px; font-size: 13.5px; }
.legal__toc-title { font-family: var(--font-label); font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--dim); margin-bottom: 12px; }
.legal__toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.legal__toc a { color: var(--muted); display: block; padding: 6px 0; }
.legal__toc a:hover { color: var(--text); }
.legal__doc { max-width: 760px; }
.legal__doc h1 { font-size: clamp(32px, 4.4vw, 48px); margin: 14px 0 12px; letter-spacing: -0.035em; }
.legal__meta { font-family: var(--font-label); font-size: 14px; color: var(--dim); margin-bottom: 32px; display: flex; flex-wrap: wrap; gap: 8px 20px; }
.legal__doc h2 { font-size: 22px; margin: 44px 0 14px; letter-spacing: -0.02em; scroll-margin-top: 100px; }
.legal__doc h3 { font-size: 17px; margin: 24px 0 10px; letter-spacing: -0.01em; }
.legal__doc p, .legal__doc li { color: #2f343c; font-size: 15.5px; line-height: 1.75; }
.legal__doc ul, .legal__doc ol { padding-left: 22px; margin: 0 0 1em; }
.legal__doc ul { list-style: disc; }
.legal__doc li { margin-bottom: 6px; }
.legal__doc a { color: var(--accent); border-bottom: 1px solid rgba(43, 75, 242, 0.3); }
.legal__doc strong { color: var(--text); font-weight: 600; }
.callout { border: 1px solid var(--line-strong); border-left: 2px solid var(--accent); border-radius: 10px; padding: 16px 18px; background: var(--bg-elev-2); margin: 0 0 28px; }
.callout p { margin: 0; font-size: 14.5px; }
@media (max-width: 860px) { .legal__wrap { grid-template-columns: 1fr; } .legal__toc { position: static; border: 1px solid var(--line); border-radius: 12px; padding: 16px; } }

/* ---------- 404 ---------- */
.notfound { min-height: 70vh; display: grid; place-items: center; text-align: center; padding: 80px var(--gutter); }
.notfound h1 { margin: 16px 0 12px; }
.notfound code { color: var(--accent); }
.notfound .btn { margin-top: 12px; }

/* ---------- Scroll motion ----------
   main.js adds .is-in when an element enters the viewport and removes it when the element
   drops back below the fold, so the sequence replays every time you scroll down. */
.js [data-anim] {
  opacity: 0; transform: translate3d(0, 28px, 0); filter: blur(8px);
  transition: opacity .9s var(--ease-out), transform .9s var(--ease-out), filter .9s var(--ease-out);
  transition-delay: calc(var(--i, 0) * 90ms);
}
.js [data-anim="scale"] { transform: translate3d(0, 40px, 0) scale(.94); filter: none; }
.js [data-anim="left"] { transform: translate3d(-32px, 0, 0); }
.js [data-anim].is-in { opacity: 1; transform: none; filter: none; }
.js [data-anim].is-out { opacity: 0; transform: translate3d(0, -28px, 0); transition-delay: 0s; }
.js [data-anim="scale"].is-out { transform: translate3d(0, -32px, 0) scale(.96); }
.js .card[data-anim].is-in:hover { transform: translateY(-4px); transition-delay: 0s; }

@media (prefers-reduced-motion: reduce) {
  .fl-pkts { display: none; }
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; transition-delay: 0s !important; }
  .js [data-anim], .js [data-anim].is-out { opacity: 1; transform: none; filter: none; }
  .js [data-draw] .draw { stroke-dashoffset: 0; }
  .js .stage[data-anim] .bar i { transform: none; }
}
@media print {
  .js [data-anim], .js [data-anim].is-out { opacity: 1; transform: none; filter: none; }
  .js .stage[data-anim] .bar i { transform: none; }
  .modal { display: none; }
  .hero { transform: none !important; }
  .js [data-draw] .draw { stroke-dashoffset: 0; }
  body::before, .nav { display: none; }
}
