/* ==========================================================================
   GTM Growth — design system
   Written from scratch: tokens, then layout, then components.
   Every class used by index.html, fr/index.html, reports/opendpe.html and
   404.html is covered; the report page keeps its own inline layer on top.
   ========================================================================== */

/* ── 1. Tokens ─────────────────────────────────────────────────────────── */
:root {
  /* Ink & surfaces */
  --ink: #0d0d0f;
  --ink-2: #1f2430;
  --muted: #6f7684;
  --muted-2: #8494a9;
  --line: #e9e9ee;
  --line-2: #eef2f8;
  --bg: #ffffff;
  --bg-2: #fbfbfc;
  --card: #ffffff;
  --surface: #ffffff;

  /* Accents */
  --brand: #2563eb;
  --brand-2: #06b6d4;
  --brand-soft: #eaf1ff;
  --ok: #0f6b4a;
  --warn: #b25c00;
  --bad: #b42318;

  /* Night palette (hero, console) */
  --night: #070d18;
  --night-2: #0c1524;
  --night-3: #111d31;
  --night-line: #1c2b44;
  --night-ink: #eaf2fb;
  --night-muted: #8ea3bf;
  --night-accent: #2dd4bf;

  /* Shape & depth */
  --radius: 14px;
  --radius-sm: 9px;
  --radius-lg: 22px;
  --shadow: 0 1px 2px rgba(10, 15, 26, .04), 0 8px 24px -18px rgba(10, 15, 26, .28);
  --shadow-md: 0 2px 4px rgba(10, 15, 26, .05), 0 18px 40px -24px rgba(10, 15, 26, .35);
  --shadow-lg: 0 40px 80px -48px rgba(7, 13, 24, .55);

  /* Type & rhythm */
  --font: "Inter", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --wrap: 1140px;
  --gap: 1.25rem;
  --section-y: 5.5rem;
}

/* ── 2. Reset ──────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ink-2);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; }
img { height: auto; display: block; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { color: var(--ink); line-height: 1.12; letter-spacing: -.02em; margin: 0; }
p { margin: 0 0 1rem; }
ul, ol { margin: 0 0 1rem; padding-left: 1.15rem; }
code, pre { font-family: var(--mono); }
code { font-size: .88em; background: var(--bg-2); border: 1px solid var(--line); border-radius: 5px; padding: .08em .34em; }
pre { margin: 0; overflow-x: auto; }
pre code { background: none; border: 0; padding: 0; font-size: .86rem; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; border-radius: 6px; }
[hidden] { display: none !important; }

/* ── 3. Utilities ──────────────────────────────────────────────────────── */
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 1.5rem; }
.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: -9999px; top: 0; z-index: 100;
  background: var(--brand); color: #fff; padding: .7rem 1rem; border-radius: 0 0 10px 0;
}
.skip-link:focus { left: 0; text-decoration: none; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.dot {
  display: inline-block; width: .5rem; height: .5rem; border-radius: 50%;
  background: var(--ok); margin-right: .45rem; vertical-align: 1px;
}

/* ── 4. Typography helpers ─────────────────────────────────────────────── */
.eyebrow {
  display: inline-flex; align-items: center; gap: .4rem;
  margin: 0 0 .9rem;
  font-size: .74rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--brand);
}
.eyebrow-dark { color: var(--muted); }
.section-sub { max-width: 62ch; color: var(--muted); font-size: 1.03rem; }
.fineprint { font-size: .8rem; color: var(--muted); margin: .9rem 0 0; }
.note { font-size: .88rem; color: var(--muted); }
.hint { font-size: .86rem; color: var(--muted); margin: .55rem 0 0; }
.form-error { color: var(--bad); font-size: .88rem; margin: .6rem 0 0; font-weight: 600; }

/* ── 5. Buttons ────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  padding: .78rem 1.3rem;
  font: inherit; font-size: .94rem; font-weight: 650;
  color: #fff; background: var(--brand);
  border: 1px solid transparent; border-radius: 999px;
  cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
  box-shadow: 0 8px 18px -10px rgba(37, 99, 235, .7);
}
.btn:hover { background: #1d4fd8; text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-small { padding: .5rem .9rem; font-size: .84rem; }
.btn-ghost {
  background: transparent; color: var(--ink); border-color: var(--line);
  box-shadow: none;
}
.btn-ghost:hover { background: var(--bg-2); border-color: #cfd8e6; }
.btn-on-dark, .hero .btn-ghost { color: var(--night-ink); border-color: rgba(255, 255, 255, .22); }
.btn-on-dark:hover { background: rgba(255, 255, 255, .08); }

/* ── 6. 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);
}
.header-inner { display: flex; align-items: center; gap: 1.4rem; min-height: 64px; }
.brand {
  display: inline-flex; align-items: center; gap: .55rem;
  font-weight: 750; font-size: 1.02rem; color: var(--ink); letter-spacing: -.01em;
}
.brand:hover { text-decoration: none; }
.brand img { width: 28px; height: 28px; border-radius: 7px; }
.nav { display: flex; align-items: center; gap: 1.15rem; margin-left: auto; }
.nav a { color: var(--ink-2); font-size: .9rem; font-weight: 500; }
.nav a:hover { color: var(--brand); text-decoration: none; }
.nav-gh { color: var(--muted) !important; }
.lang {
  display: inline-flex; align-items: center; gap: .1rem;
  border: 1px solid var(--line); border-radius: 999px; padding: .15rem;
}
.lang a {
  font-size: .78rem; font-weight: 700; color: var(--muted);
  padding: .22rem .5rem; border-radius: 999px;
}
.lang a[aria-current="true"] { background: var(--ink); color: #fff; }
.lang a:hover { text-decoration: none; }

/* ── 7. Hero ───────────────────────────────────────────────────────────── */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(900px 460px at 82% -12%, rgba(6, 182, 212, .22), transparent 62%),
    radial-gradient(760px 420px at 12% 0%, rgba(37, 99, 235, .26), transparent 58%),
    linear-gradient(180deg, var(--night) 0%, #0a1424 62%, #0b1526 100%);
  color: var(--night-ink);
  padding: 5rem 0 4.5rem;
  border-bottom: 1px solid #0f1b2d;
}
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(70% 60% at 50% 0%, #000 40%, transparent 100%);
}
.hero-inner { position: relative; z-index: 1; }
.hero h1, .lede, .check-form, .hero-proof { max-width: 720px; }
.hero .eyebrow { color: #7fd7e8; }
.hero h1 {
  color: #fff; font-size: clamp(2.05rem, 4vw, 3.15rem); font-weight: 800;
  letter-spacing: -.035em; margin: 0 0 1.1rem; text-wrap: balance;
}
.lede { font-size: 1.1rem; line-height: 1.65; color: #c2d2e6; max-width: 60ch; }
.ai-engine-strip { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; margin: 1.25rem 0; max-width: 720px; }
.ai-engine-label { color: #9fb2ca; font-size: .8rem; font-weight: 650; }
.ai-engines { display: flex; flex-wrap: wrap; gap: .45rem; list-style: none; margin: 0; padding: 0; }
.ai-engines li { display: inline-flex; align-items: center; gap: .38rem; min-height: 2rem; padding: .34rem .58rem; border: 1px solid rgba(159, 190, 226, .25); border-radius: 999px; background: rgba(255,255,255,.06); color: #e8f1fb; font-size: .76rem; font-weight: 700; letter-spacing: -.01em; }
.ai-engines img { width: 1rem; height: 1rem; object-fit: contain; }
.check-form {
  display: flex; gap: .5rem; margin: 1.9rem 0 0; max-width: 620px;
  padding: .4rem; border-radius: 999px;
  background: rgba(255, 255, 255, .07);
  border: 1px solid rgba(255, 255, 255, .16);
}
.check-form input {
  flex: 1 1 auto; min-width: 0;
  padding: .8rem 1rem; font: inherit; font-size: .98rem;
  color: var(--ink); background: #fff; border: 0; border-radius: 999px;
}
.check-form input::placeholder { color: #90a0b6; }
.hero .hint { color: #8ea3bf; }
.hero .hint a { color: #9ec5ff; }
.hero-stats {
  list-style: none; display: flex; flex-wrap: wrap; gap: 2.4rem;
  margin: 2.8rem 0 0; padding: 0;
}
.hero-stats li { display: grid; gap: .1rem; }
.hero-stats strong { font-size: 1.75rem; font-weight: 800; color: #fff; line-height: 1; font-variant-numeric: tabular-nums; }
.hero-stats span { font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; color: #7f93ae; }

/* Hero proof strip */
.hero-proof {
  margin-top: 2.2rem; max-width: 760px;
  padding: 1rem 1.2rem 1.15rem;
  border: 1px solid rgba(255, 255, 255, .14); border-radius: var(--radius);
  background: rgba(255, 255, 255, .04);
}
.hero-proof-head {
  margin: 0 0 .85rem; font-size: .74rem; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase; color: #8497b3;
}
.hero-proof-head strong { color: #fff; letter-spacing: 0; text-transform: none; font-size: .84rem; }
.hero-proof-grid {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.1rem;
}
.hero-proof-grid li { display: grid; gap: .18rem; }
.hero-proof-grid strong { font-size: 1.55rem; line-height: 1; color: #fff; font-variant-numeric: tabular-nums; }
.hero-proof-grid strong span { font-size: .9rem; color: #7e93af; }
.hero-proof-grid em {
  font-style: normal; font-size: .72rem; font-weight: 700;
  letter-spacing: .09em; text-transform: uppercase; color: #7fd7e8;
}
.hero-proof-grid small { font-size: .75rem; color: #93a7c1; line-height: 1.35; }
.hero-proof-grid em { font-size: .7rem; }

/* ── 8. Sections ───────────────────────────────────────────────────────── */
.section { padding: var(--section-y) 0; }
.section-alt { background: var(--bg-2); }
.section-console { background: #f4f4f6; }
.section-head { max-width: 780px; margin-bottom: 2.6rem; }
.section-head h2 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); font-weight: 780; margin: 0 0 .9rem; text-wrap: balance; }
.grid { display: grid; gap: var(--gap); }
.cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.narrow { max-width: 780px; margin: 0 auto; }
.sub { color: var(--muted); font-size: .93rem; margin: 0 0 1rem; }

/* ── 9. Cards ──────────────────────────────────────────────────────────── */
.card {
  position: relative;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.4rem 1.45rem 1.5rem;
  box-shadow: var(--shadow);
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: #d7e0ee; }
.card h3 { font-size: 1.05rem; margin: 0 0 .55rem; }
.card p { color: var(--muted); font-size: .93rem; line-height: 1.55; margin: 0 0 .9rem; }
.card .icon {
  display: inline-grid; place-items: center;
  width: 2.3rem; height: 2.3rem; margin-bottom: .9rem;
  border-radius: 10px; background: var(--brand-soft); color: var(--brand);
}
.card .icon svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.tag {
  display: inline-block; margin: 0;
  font-family: var(--mono); font-size: .74rem;
  color: var(--muted); background: var(--bg-2);
  border: 1px solid var(--line); border-radius: 999px;
  padding: .2rem .55rem;
}
.tag.new { background: #e7f7ef; border-color: #bfe8d0; color: var(--ok); }
.cards-free .card {
  border-color: #c7dbff;
  background: linear-gradient(180deg, #f7fbff, #fff);
}
.cards-free .card .tag { background: #e7efff; border-color: #cfe0ff; color: #1d4ed8; }
.free-note { margin: 1.1rem 0 0; color: var(--muted); font-size: .88rem; max-width: 62ch; }
.group-head {
  display: flex; align-items: baseline; flex-wrap: wrap; gap: .55rem;
  margin: 3rem 0 1.2rem;
  font-size: .76rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted);
}
.group-head span { font-size: .86rem; font-weight: 400; letter-spacing: 0; text-transform: none; }
.toolkit-grid .card { padding: 1.15rem 1.2rem; }
.toolkit-grid .card h3 { font-size: .98rem; }

/* ── 10. Steps ─────────────────────────────────────────────────────────── */
.steps {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap);
}
.steps li { position: relative; padding-top: 1.2rem; border-top: 2px solid var(--line); }
.step-num {
  display: inline-grid; place-items: center;
  width: 1.7rem; height: 1.7rem; margin-bottom: .6rem;
  border-radius: 50%; background: var(--ink); color: #fff;
  font-size: .78rem; font-weight: 700;
}
.steps h3 { font-size: 1rem; margin: 0 0 .4rem; }
.steps p { color: var(--muted); font-size: .92rem; margin: 0; }
.steps-mini { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; padding: 0; margin: 1.2rem 0 0; list-style: none; font-size: .86rem; color: var(--muted); }

/* ── 11. Layers & board ────────────────────────────────────────────────── */
.layers {
  list-style: none; margin: 0 0 1.6rem; padding: 0;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap);
}
.layer { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem 1.3rem 1.3rem; box-shadow: var(--shadow); }
.layer-score { display: block; font-size: 2.05rem; font-weight: 800; color: var(--ink); line-height: 1; font-variant-numeric: tabular-nums; }
.layer-score small { font-size: .95rem; font-weight: 600; color: var(--muted); }
.layer h3 { margin: .6rem 0 .4rem; font-size: 1rem; }
.layer p { margin: 0; color: var(--muted); font-size: .9rem; }
.layer-tag { margin-top: .6rem !important; font-size: .74rem !important; text-transform: uppercase; letter-spacing: .08em; color: var(--muted-2) !important; }
.board-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); }
.board-card {
  margin: 0; display: flex; flex-direction: column; gap: .8rem;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.15rem 1.2rem 1.3rem; box-shadow: var(--shadow);
}
.board-card figcaption h3 { margin: 0 0 .3rem; font-size: .98rem; }
.board-card figcaption p { margin: 0; color: var(--muted); font-size: .88rem; }
.board-card svg { width: 100%; height: auto; max-width: 260px; margin: 0 auto; }
.nodes { list-style: none; display: flex; flex-wrap: wrap; gap: .4rem; margin: 0; padding: 0; }
.nodes li { font-size: .78rem; padding: .22rem .55rem; border-radius: 999px; border: 1px solid var(--line); }
.nodes .ok { background: #e7f7ef; border-color: #bfe8d0; color: var(--ok); }
.nodes .missing { background: #ffecea; border-color: #f7c9c4; color: var(--bad); }
.nodes-summary { margin: .3rem 0 0; font-size: .78rem; color: var(--muted); }
.board-note { margin: 1.5rem 0 0; font-size: .9rem; color: var(--muted); max-width: 70ch; }

/* ── 12. Analysis console — light app shell ────────────────────────────── */
.app {
  --app-bg: #fbfbfc;
  --app-panel: #ffffff;
  --app-line: #e9e9ee;
  --app-line-soft: #f1f1f5;
  --app-ink: #0d0d0f;
  --app-2: #1f2430;
  --app-muted: #6f7684;
  --app-soft: #9aa3b2;
  --app-accent: #4f5bd5;
  --app-green: #12805c;
  --app-red: #c0392b;
  --app-amber: #b27a12;

  margin-top: 2rem;
  background: var(--app-panel);
  border: 1px solid var(--app-line);
  border-radius: 18px;
  box-shadow: 0 24px 60px -40px rgba(13, 13, 15, .35);
  overflow: hidden;
  color: var(--app-ink);
}

/* Tab strip */
.app-tabs {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  background: var(--app-bg);
  border-bottom: 1px solid var(--app-line);
}
.app-tab {
  display: flex; align-items: center; justify-content: center; gap: .55rem;
  padding: 1rem .8rem;
  font: inherit; font-size: .92rem; font-weight: 500;
  color: var(--app-2); background: transparent;
  border: 0; border-right: 1px solid var(--app-line);
  cursor: pointer;
}
.app-tab:last-child { border-right: 0; }
.app-tab:hover { background: #fff; }
.app-tab.is-active {
  background: var(--app-panel);
  border-bottom: 1px solid var(--app-panel);
  margin-bottom: -1px;
  font-weight: 600;
  border-radius: 12px 12px 0 0;
  box-shadow: 0 -1px 0 var(--app-line), -1px 0 0 var(--app-line), 1px 0 0 var(--app-line);
}
.app-tab-icon {
  display: inline-grid; place-items: center;
  width: 1.55rem; height: 1.55rem;
  border: 1px solid var(--app-line);
  border-radius: 7px;
  background: #fff;
  color: var(--app-2);
}
.app-tab-icon svg { width: 14px; height: 14px; }
.app-tab.is-active .app-tab-icon { border-color: #d9d9e2; }

/* Shell */
.app-body { display: grid; grid-template-columns: 220px minmax(0, 1fr); }
.app-side {
  background: var(--app-bg);
  border-right: 1px solid var(--app-line);
  padding: 1rem .8rem 1.2rem;
  display: flex; flex-direction: column; gap: .9rem;
}
.app-switch {
  display: flex; align-items: center; gap: .5rem;
  padding: .5rem .6rem;
  background: #fff; border: 1px solid var(--app-line); border-radius: 10px;
  font-size: .86rem; font-weight: 600; color: var(--app-ink);
}
.app-switch img { border-radius: 5px; }
.app-switch span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app-switch .chev { width: 14px; height: 14px; color: var(--app-soft); transform: rotate(90deg); }
.app-search {
  display: flex; align-items: center; gap: .45rem;
  padding: .45rem .6rem;
  background: #fff; border: 1px solid var(--app-line); border-radius: 9px;
  font-size: .82rem; color: var(--app-soft);
}
.app-search svg { width: 14px; height: 14px; }
.app-search span { flex: 1; }
.app-search kbd {
  font: inherit; font-size: .72rem; color: var(--app-soft);
  background: var(--app-bg); border: 1px solid var(--app-line); border-radius: 5px;
  padding: .05rem .3rem;
}
.app-group {
  margin: .2rem 0 -.35rem;
  font-size: .68rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--app-soft);
  padding-left: .55rem;
}
.app-nav { list-style: none; margin: 0; padding: 0; display: grid; gap: .1rem; }
.app-nav a {
  display: flex; align-items: center; gap: .55rem;
  padding: .45rem .55rem; border-radius: 9px;
  font-size: .86rem; color: var(--app-2);
}
.app-nav a:hover { background: #fff; text-decoration: none; }
.app-nav a svg { width: 15px; height: 15px; color: var(--app-soft); }
.app-nav a.is-active {
  background: #fff; border: 1px solid var(--app-line);
  box-shadow: 0 1px 2px rgba(13, 13, 15, .05);
  font-weight: 600;
}
.app-nav a.is-active svg { color: var(--app-ink); }
.app-side-foot {
  display: flex; align-items: center; gap: .55rem;
  margin: auto 0 0; padding: .45rem .55rem;
  font-size: .84rem; color: var(--app-soft);
}
.app-side-foot svg { width: 15px; height: 15px; }

/* Main */
.app-main { padding: 1.1rem 1.2rem 1.3rem; display: grid; gap: 1rem; min-width: 0; }
.app-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.app-crumb { margin: 0; font-size: .9rem; color: var(--app-muted); display: flex; align-items: center; gap: .4rem; }
.app-crumb strong { color: var(--app-ink); font-weight: 650; }
.app-filters { display: flex; gap: .5rem; }
.app-pill {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .4rem .75rem; border-radius: 999px;
  font-size: .8rem; color: var(--app-2);
  border: 1px solid var(--app-line); background: #fff;
}
.app-pill.dashed { border-style: dashed; color: var(--app-muted); }
.app-pill svg { width: 14px; height: 14px; color: var(--app-soft); }

.app-panel { display: grid; gap: 1rem; }

/* KPI row — one bordered container, four cells */
.kpi-row {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid var(--app-line); border-radius: 12px; overflow: hidden;
}
.kpi-cell { padding: .85rem .95rem; border-right: 1px solid var(--app-line); display: grid; gap: .3rem; }
.kpi-cell:last-child { border-right: 0; }
.kpi-label { font-size: .76rem; color: var(--app-muted); }
.kpi-value { display: flex; align-items: baseline; gap: .15rem; }
.kpi-value strong { font-size: 1.55rem; font-weight: 650; color: var(--app-ink); line-height: 1; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.kpi-value em { font-style: normal; font-size: .8rem; color: var(--app-muted); }
.kpi-foot { display: flex; align-items: center; gap: .4rem; }
.kpi-note { font-size: .74rem; color: var(--app-muted); }
.delta { font-size: .76rem; font-weight: 650; }
.delta.up { color: var(--app-green); }
.delta.down { color: var(--app-red); }
.spark { width: 64px; height: 22px; margin-left: auto; flex: 0 0 auto; }

/* Chart + ranking */
.app-split { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 1rem; align-items: start; }
.app-chart {
  margin: 0; padding: 1rem 1rem .85rem;
  border: 1px solid var(--app-line); border-radius: 12px;
  display: grid; gap: .7rem;
}
.app-chart figcaption { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap; font-size: .86rem; font-weight: 600; color: var(--app-ink); }
.app-chart figcaption span { font-weight: 400; font-size: .78rem; color: var(--app-muted); }
.app-chart svg { width: 100%; height: auto; }
.app-axis { display: flex; justify-content: space-between; font-size: .72rem; color: var(--app-soft); }

.app-rank { border: 1px solid var(--app-line); border-radius: 12px; padding: .9rem .95rem; display: grid; gap: .6rem; }
.app-rank-head { display: flex; align-items: baseline; justify-content: space-between; font-size: .84rem; font-weight: 600; color: var(--app-ink); }
.app-rank-head span { font-size: .74rem; font-weight: 400; color: var(--app-muted); }
.app-rank-lead { margin: 0; font-size: .76rem; color: var(--app-muted); }
.app-rank-lead strong { color: var(--app-2); font-weight: 600; }
.rank-list { list-style: none; margin: 0; padding: 0; display: grid; }
.rank-list li {
  display: grid; grid-template-columns: 14px 1fr auto auto; align-items: center; gap: .5rem;
  padding: .45rem 0; border-bottom: 1px solid var(--app-line-soft);
  font-size: .84rem;
}
.rank-list li:last-child { border-bottom: 0; }
.rank-dot { width: 9px; height: 9px; border-radius: 3px; background: var(--app-accent); opacity: .9; }
.rank-list li:nth-child(2) .rank-dot { background: #e06c5a; }
.rank-list li:nth-child(3) .rank-dot { background: #e0b23c; }
.rank-list li:nth-child(4) .rank-dot { background: #8b7bd8; }
.rank-list li:nth-child(5) .rank-dot { background: #35b8c8; }
.rank-name { color: var(--app-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-score { font-weight: 650; font-variant-numeric: tabular-nums; }
.rank-delta { font-size: .78rem; }
.rank-delta.up { color: var(--app-green); }
.rank-delta.down { color: var(--app-red); }
.rank-foot { margin: 0; font-size: .72rem; color: var(--app-soft); }

/* Bottom strip */
.app-strip { border: 1px solid var(--app-line); border-radius: 12px; padding: .95rem 1rem 1.05rem; }
.app-strip h3 { margin: 0 0 .8rem; font-size: .9rem; font-weight: 600; }
.strip-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .7rem 1rem; }
.strip-list li { display: grid; gap: .3rem; }
.strip-name { font-size: .76rem; color: var(--app-muted); }
.strip-bar { display: block; height: 6px; border-radius: 3px; background: var(--app-line-soft); overflow: hidden; }
.strip-bar i { display: block; height: 100%; background: var(--app-accent); border-radius: 3px; }
.strip-value { font-size: .78rem; font-weight: 600; color: var(--app-2); font-variant-numeric: tabular-nums; }

/* Tables */
.app-table { width: 100%; border-collapse: collapse; font-size: .84rem; }
.app-table caption { text-align: left; font-size: .76rem; color: var(--app-muted); padding-bottom: .6rem; }
.app-table th, .app-table td { text-align: left; padding: .5rem .55rem; border-bottom: 1px solid var(--app-line-soft); }
.app-table thead th { font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; color: var(--app-soft); font-weight: 600; }
.app-table tbody th { font-weight: 550; color: var(--app-2); }
.app-table td { font-variant-numeric: tabular-nums; color: var(--app-2); }
.cbar { display: block; height: 6px; min-width: 90px; border-radius: 3px; background: var(--app-line-soft); overflow: hidden; }
.cbar i { display: block; height: 100%; background: var(--app-accent); }
.app .pill.ok { background: #e9f7f0; color: var(--app-green); }
.app .pill.warn { background: #fdf3e2; color: var(--app-amber); }
.app .pill.bad { background: #fdeceb; color: var(--app-red); }
.app-foot { margin: 0; padding: .75rem 1.2rem 1rem; font-size: .74rem; color: var(--app-muted); background: var(--app-bg); border-top: 1px solid var(--app-line); }

@media (max-width: 1000px) {
  .app-body { grid-template-columns: 1fr; }
  .app-side { flex-direction: row; flex-wrap: wrap; align-items: center; border-right: 0; border-bottom: 1px solid var(--app-line); }
  .app-side .app-group, .app-side .app-side-foot { display: none; }
  .app-nav { display: flex; flex-wrap: wrap; gap: .3rem; }
  .app-split { grid-template-columns: 1fr; }
  .strip-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .app-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .app-tab { border-bottom: 1px solid var(--app-line); }
  .app-tab.is-active { border-radius: 0; box-shadow: inset 0 -2px 0 var(--app-accent); }
  .kpi-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi-cell { border-bottom: 1px solid var(--app-line); }
  .kpi-cell:nth-child(2n) { border-right: 0; }
}

/* ── 13. Measurement / terminal ────────────────────────────────────────── */
.measurement { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: start; }
.measurement h3 { font-size: 1rem; margin: 1.2rem 0 .35rem; }
.measurement p { color: var(--muted); font-size: .93rem; margin: 0; }
.terminal {
  background: var(--night); border: 1px solid var(--night-line);
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-lg);
}
.terminal-bar {
  display: flex; align-items: center; gap: .5rem;
  padding: .6rem .9rem; border-bottom: 1px solid var(--night-line);
  font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; color: #7f93ae;
  background: #0a1220;
}
.terminal pre { padding: 1rem 1.1rem; color: #d7e3f5; }
.terminal pre code { color: inherit; }
.terminal .copy {
  margin: 0 1rem 1rem; padding: .5rem .9rem;
  font: inherit; font-size: .82rem; font-weight: 600;
  color: var(--night-ink); background: #16233a;
  border: 1px solid #23364f; border-radius: 999px; cursor: pointer;
}
.terminal .copy:hover { background: #1d2c46; }

/* ── 14. Plans ─────────────────────────────────────────────────────────── */
.plans { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.plan { display: flex; flex-direction: column; }
.plan .price { font-size: 2rem; font-weight: 800; color: var(--ink); margin: .2rem 0 1rem; line-height: 1; }
.plan-featured { border-color: #bcd0ff; box-shadow: var(--shadow-md); }
.plan .btn { margin-top: auto; align-self: flex-start; }
.tick-list { list-style: none; padding: 0; margin: 0 0 1.4rem; display: grid; gap: .5rem; }
.tick-list li { position: relative; padding-left: 1.55rem; font-size: .93rem; color: var(--ink-2); }
.tick-list li::before {
  content: "✓"; position: absolute; left: 0; top: -.02rem;
  color: var(--brand); font-weight: 800;
}

/* ── 15. Lead form ─────────────────────────────────────────────────────── */
.talk { display: grid; grid-template-columns: 1.15fr .85fr; gap: 3rem; align-items: start; }
.lead-form { display: grid; gap: .8rem; margin-top: 1.4rem; max-width: 30rem; }
.field { display: grid; gap: .3rem; }
.field label { font-size: .8rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.field input, .field select {
  padding: .75rem .85rem; font: inherit; font-size: .95rem;
  border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; color: var(--ink);
}
.field input:focus, .field select:focus { border-color: var(--brand); outline: none; box-shadow: 0 0 0 3px rgba(37, 99, 235, .16); }
.lead-form .btn { justify-self: start; }
.self-serve { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.4rem; }
.self-serve h3 { font-size: 1rem; margin: 0 0 .5rem; }
.self-serve p { color: var(--muted); font-size: .9rem; }
.self-serve pre { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: .8rem; margin: .8rem 0; }
.link { font-weight: 600; }

/* ── 16. FAQ ───────────────────────────────────────────────────────────── */
.faq details, .narrow details {
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--card); padding: .2rem .1rem; margin-bottom: .7rem;
  box-shadow: var(--shadow);
}
.faq summary, .narrow summary {
  cursor: pointer; padding: 1rem 1.2rem; font-weight: 650; color: var(--ink);
  list-style: none; display: flex; align-items: center; gap: .6rem;
}
summary::-webkit-details-marker { display: none; }
.faq summary::after, .narrow summary::after {
  content: "+"; margin-left: auto; color: var(--muted); font-weight: 400; font-size: 1.2rem; line-height: 1;
}
details[open] summary::after { content: "–"; }
.faq details p, .narrow details p { margin: 0 1.2rem 1.1rem; color: var(--muted); font-size: .93rem; }

/* ── 17. Proof ─────────────────────────────────────────────────────────── */
.proof-grid {
  list-style: none; margin: 2rem 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 1.2rem;
}
.proof-grid li { display: grid; gap: .15rem; }
.proof-grid strong { font-size: 1.7rem; font-weight: 800; color: var(--ink); line-height: 1; font-variant-numeric: tabular-nums; }
.proof-grid span { font-size: .72rem; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); }
.proof-note { margin: 1.6rem 0 0; font-size: .84rem; color: var(--muted); }

/* ── 18. Footer ────────────────────────────────────────────────────────── */
.site-footer { background: var(--night); color: #a9bbd2; padding: 3rem 0 2.4rem; }
.footer-inner { display: flex; flex-wrap: wrap; gap: 2rem; justify-content: space-between; align-items: flex-start; }
.footer-brand { display: grid; gap: .5rem; max-width: 24rem; }
.footer-brand strong { color: #fff; font-size: 1rem; }
.site-footer a { color: #cfdcec; }
.site-footer a:hover { color: #fff; }
.closing { text-align: center; }
.closing-inner { display: grid; gap: 1.2rem; justify-items: center; }
.closing h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
.closing-actions { display: flex; gap: .8rem; flex-wrap: wrap; justify-content: center; }

/* ── 19. Free-read result ──────────────────────────────────────────────── */
.result-section { padding: var(--section-y) 0; background: var(--bg-2); }
.result-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 2rem; box-shadow: var(--shadow-md); }
.result-head { display: flex; gap: 2rem; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.result-head h2 { font-size: 1.5rem; margin: .2rem 0 .5rem; }
.result-verdict { color: var(--muted); margin: 0; }
.score {
  --score: 0;
  position: relative; display: grid; place-items: center; gap: .1rem;
  width: 8.5rem; height: 8.5rem; border-radius: 50%;
  background:
    conic-gradient(var(--brand) calc(var(--score) * 1%), var(--line) 0);
  flex: 0 0 auto;
}
.score::before { content: ""; position: absolute; inset: .6rem; background: #fff; border-radius: 50%; }
.score-value { position: relative; font-size: 2.1rem; font-weight: 800; color: var(--ink); line-height: 1; }
.score-label { position: relative; font-size: .66rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.delta { font-size: .86rem; color: var(--muted); margin: 0; text-align: right; }
.delta strong { font-size: 1.3rem; color: var(--ok); }
.check-list { list-style: none; margin: 1.6rem 0 0; padding: 0; display: grid; gap: .6rem; }
.check-list li { display: flex; gap: .7rem; align-items: flex-start; padding: .7rem .9rem; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.check-list li.fail { border-color: #f7c9c4; background: #fff8f7; }
.check-list .mark { flex: 0 0 auto; display: grid; place-items: center; width: 1.3rem; height: 1.3rem; border-radius: 50%; font-size: .8rem; font-weight: 800; background: #e7f7ef; color: var(--ok); }
.check-list li.fail .mark { background: #ffecea; color: var(--bad); }
.check-list strong { display: block; font-size: .93rem; color: var(--ink); }
.check-list .evidence { color: var(--muted); font-size: .84rem; }
.check-list .fix { color: var(--bad); font-size: .84rem; }
.result-tables { margin-top: 1.8rem; }
.tables-note { margin: 0 0 .9rem; font-size: .86rem; color: var(--muted); border-left: 3px solid var(--line); padding: .35rem 0 .35rem .8rem; }
.tables-note[data-tone="live"] { border-left-color: var(--brand); color: var(--ink-2); }
.tables-note[data-tone="sample"] { border-left-color: #f5a524; }
.figure { margin: 0 0 1.4rem; }
.figure svg { width: 100%; height: auto; display: block; }
.figure figcaption { color: var(--muted); font-size: .8rem; margin-top: .5rem; }
.data-figure { margin: 0 0 1.4rem; }
.data-figure h3 { font-size: .98rem; margin: 0 0 .15rem; }
.data-sub { margin: 0; color: var(--muted); font-size: .84rem; }
.badge-sample, .badge-live { display: inline-block; margin-top: .4rem; font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; font-weight: 700; padding: .18rem .5rem; border-radius: 5px; }
.badge-sample { background: #fff4e5; color: #8a4b0f; }
.badge-live { background: #e7f7ef; color: var(--ok); }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.data-table { width: 100%; border-collapse: collapse; font-size: .88rem; min-width: 460px; }
.data-table th, .data-table td { text-align: left; padding: .55rem .7rem; vertical-align: top; }
.data-table thead th { font-size: .72rem; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); background: var(--bg-2); border-bottom: 1px solid var(--line); }
.data-table tbody th { font-weight: 600; color: var(--ink-2); width: 42%; }
.data-table tbody tr + tr th, .data-table tbody tr + tr td { border-top: 1px solid var(--line); }
.data-table .value { color: var(--ink); font-variant-numeric: tabular-nums; }
.data-table .note-row td { border-top: 0; padding-top: .1rem; color: var(--muted); font-size: .8rem; }
.download-band {
  display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap;
  border: 1px solid #bcd0ff; background: linear-gradient(135deg, #eef4ff, #f8fbff);
  border-radius: var(--radius); padding: 1rem 1.2rem; margin-bottom: 1.2rem;
}
.download-band h2 { margin: 0 0 .2rem; font-size: 1.05rem; }
.download-band p { margin: 0; color: var(--muted); font-size: .86rem; }
.result-next { margin-top: 1.8rem; padding-top: 1.6rem; border-top: 1px solid var(--line); }
.result-next h3 { font-size: 1.02rem; margin: 0 0 .8rem; }
.kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; }
.kpi { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: .9rem; }
.kpi strong { display: block; font-size: 1.35rem; color: var(--ink); line-height: 1.1; }
.kpi span { font-size: .76rem; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }

/* ── 20. IndexNow mini-generator ───────────────────────────────────────── */
.ink-mini { display: grid; gap: .45rem; margin: .8rem 0 .5rem; }
.ink-mini input { min-width: 0; width: 100%; padding: .5rem .65rem; font: inherit; font-size: .88rem; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.ink-mini-out { display: grid; gap: .2rem; margin: 0 0 .6rem; padding: .55rem .7rem; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--bg-2); font-size: .8rem; overflow-wrap: anywhere; }
.ink-mini-out code { background: none; border: 0; padding: 0; color: var(--ink); font-size: .82rem; }
.ink-mini-out span { color: var(--muted); }
.ink-mini-row { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }

/* ── 21. Report page support (its own inline layer adds the rest) ──────── */
.report-body { background: var(--bg); }
.report-hero { background: var(--night); color: var(--night-ink); padding: 3rem 0; }
.report-hero a { color: #9ec5ff; }
.report-meta { color: #8ea3bf; font-size: .84rem; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.4rem; box-shadow: var(--shadow); }
.panel h2 { font-size: 1.15rem; margin: 0 0 .5rem; }
.report { width: 100%; border-collapse: collapse; font-size: .88rem; }
.report th, .report td { text-align: left; padding: .5rem .6rem; border-bottom: 1px solid var(--line); }
.mini { display: block; height: 5px; border-radius: 3px; background: var(--line-2); margin-top: .35rem; overflow: hidden; }
.mini span { display: block; height: 100%; }
.mini .complete, .bar2 .complete { background: var(--ok); }
.mini .partial, .bar2 .partial { background: #f5a524; }
.mini .missing, .bar2 .missing { background: var(--bad); }
.bar2 { display: block; height: 7px; border-radius: 4px; background: var(--line-2); overflow: hidden; }
.bar2 span { display: block; height: 100%; }
.score-pill { display: inline-block; padding: .1rem .5rem; border-radius: 999px; font-size: .76rem; font-weight: 700; }
.score-pill.complete { background: #e7f7ef; color: var(--ok); }
.score-pill.partial { background: #fff2e0; color: var(--warn); }
.score-pill.missing { background: #ffecea; color: var(--bad); }
.band { display: inline-block; padding: .1rem .5rem; border-radius: 999px; font-size: .74rem; font-weight: 700; }
.band.ready { background: #e7f7ef; color: var(--ok); }
.band.partial { background: #fff2e0; color: var(--warn); }
.finding { border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.2rem; margin-bottom: 1rem; }
.finding h3 { font-size: 1rem; margin: .5rem 0 .5rem; }
.finding .fix { font-size: .9rem; color: var(--ink-2); }
.f-icon { display: inline-grid; place-items: center; width: 2rem; height: 2rem; border-radius: 8px; background: var(--brand-soft); color: var(--brand); }
.f-icon svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.cit-row { display: grid; grid-template-columns: 12rem 1fr 3rem 1.4fr; gap: .7rem; align-items: center; padding: .4rem 0; border-bottom: 1px solid var(--line-2); font-size: .86rem; }
.cit-label { color: var(--ink-2); }
.cit-evidence { color: var(--muted); font-size: .8rem; }
.pts { font-weight: 700; font-variant-numeric: tabular-nums; }
.dash { color: var(--muted); }
.closing-actions { margin-top: 1rem; }

/* ── 22. Responsive ────────────────────────────────────────────────────── */
@media (max-width: 1040px) {
  .cards, .steps, .layers, .board-grid, .toolkit-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .proof-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .console-grid, .measurement, .talk { grid-template-columns: 1fr; }
  .hero-proof-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  :root { --section-y: 3.6rem; }
  .nav { display: none; }
  .header-inner { min-height: 58px; }
  .hero { padding: 3.4rem 0 3rem; }
  .cards, .steps, .layers, .board-grid, .toolkit-grid, .plans, .kpis { grid-template-columns: 1fr; }
  .proof-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .console-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .check-form { flex-direction: column; border-radius: var(--radius); }
  .check-form input, .check-form .btn { border-radius: var(--radius-sm); width: 100%; }
  .result-head { flex-direction: column; align-items: flex-start; }
  .score { width: 7rem; height: 7rem; }
  .data-table { min-width: 0; }
  .cit-row { grid-template-columns: 1fr; gap: .2rem; }
  .hero-stats { gap: 1.6rem; }
  .ai-engine-strip { align-items: flex-start; }
}
@media (max-width: 420px) {
  .hero-proof-grid, .console-kpis { grid-template-columns: 1fr; }
}
