/* =====================================================================
   Citewise AI design system
   Warm paper light theme + ink dark theme. Emerald "pulse" + violet "signal".
   ===================================================================== */

:root {
  --bg: #f7f6f2;
  --bg-2: #efede6;
  --surface: #ffffff;
  --surface-2: #faf9f5;
  --inset: #f3f1ea;
  --ink: #10131a;
  --ink-2: #353a47;
  --muted: #6a6f7e;
  --faint: #9a9eab;
  --line: #e5e2d8;
  --line-2: #d8d4c8;
  --brand: #0c9a6a;
  --brand-2: #14c784;
  --brand-ink: #067250;
  --brand-soft: #e2f4eb;
  --accent: #5b4cf0;
  --accent-soft: #ecebfd;
  --warn: #b7700a;
  --warn-soft: #fbf0dc;
  --bad: #cc3a52;
  --bad-soft: #fbe6e9;
  --good: var(--brand);
  --mark: #fff1a8;
  --shadow-sm: 0 1px 2px rgba(16, 19, 26, .05), 0 1px 1px rgba(16, 19, 26, .03);
  --shadow: 0 1px 2px rgba(16, 19, 26, .04), 0 8px 24px -8px rgba(16, 19, 26, .10);
  --shadow-lg: 0 2px 4px rgba(16, 19, 26, .04), 0 24px 60px -18px rgba(16, 19, 26, .22);
  --grad: linear-gradient(135deg, #14c784 0%, #0c9a6a 40%, #5b4cf0 100%);
  --r-sm: 8px;
  --r: 12px;
  --r-lg: 18px;
  --r-xl: 26px;
  --font: 'Geist', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --serif: 'Instrument Serif', ui-serif, Georgia, serif;
  --mono: 'Geist Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  --wrap: 1180px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b0d12;
    --bg-2: #0f1218;
    --surface: #13161d;
    --surface-2: #161a22;
    --inset: #0f1217;
    --ink: #eef0f4;
    --ink-2: #c6cad4;
    --muted: #8b91a1;
    --faint: #626979;
    --line: #232834;
    --line-2: #2f3543;
    --brand: #2bd492;
    --brand-2: #57e3ab;
    --brand-ink: #7cebbf;
    --brand-soft: rgba(43, 212, 146, .12);
    --accent: #8f84ff;
    --accent-soft: rgba(143, 132, 255, .14);
    --warn: #f2b14b;
    --warn-soft: rgba(242, 177, 75, .12);
    --bad: #ff6b81;
    --bad-soft: rgba(255, 107, 129, .12);
    --mark: rgba(255, 214, 102, .28);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 30px -10px rgba(0, 0, 0, .6);
    --shadow-lg: 0 2px 4px rgba(0, 0, 0, .3), 0 30px 70px -20px rgba(0, 0, 0, .75);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0b0d12;
  --bg-2: #0f1218;
  --surface: #13161d;
  --surface-2: #161a22;
  --inset: #0f1217;
  --ink: #eef0f4;
  --ink-2: #c6cad4;
  --muted: #8b91a1;
  --faint: #626979;
  --line: #232834;
  --line-2: #2f3543;
  --brand: #2bd492;
  --brand-2: #57e3ab;
  --brand-ink: #7cebbf;
  --brand-soft: rgba(43, 212, 146, .12);
  --accent: #8f84ff;
  --accent-soft: rgba(143, 132, 255, .14);
  --warn: #f2b14b;
  --warn-soft: rgba(242, 177, 75, .12);
  --bad: #ff6b81;
  --bad-soft: rgba(255, 107, 129, .12);
  --mark: rgba(255, 214, 102, .28);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 30px -10px rgba(0, 0, 0, .6);
  --shadow-lg: 0 2px 4px rgba(0, 0, 0, .3), 0 30px 70px -20px rgba(0, 0, 0, .75);
  color-scheme: dark;
}

/* ---------------------------------------------------------------- base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 16px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg { max-width: 100%; }
a { color: inherit; text-decoration: none; }
p a, .prose li a, .faq a, td a, .link { color: var(--brand-ink); text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--brand) 40%, transparent); text-underline-offset: 3px; }
p a:hover, .prose li a:hover, .link:hover { text-decoration-color: var(--brand); }
h1, h2, h3, h4 { margin: 0; line-height: 1.12; letter-spacing: -0.025em; font-weight: 650; color: var(--ink); }
h1 { font-size: clamp(2.3rem, 5.2vw, 4rem); letter-spacing: -0.035em; }
h2 { font-size: clamp(1.75rem, 3.4vw, 2.6rem); }
h3 { font-size: 1.15rem; letter-spacing: -0.015em; }
p { margin: 0 0 1em; color: var(--ink-2); }
em.serif, .serif { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: -0.01em; }
code, kbd, pre { font-family: var(--mono); font-size: .9em; }
:not(pre) > code { background: var(--inset); border: 1px solid var(--line); padding: .08em .38em; border-radius: 6px; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2rem 0; }
::selection { background: color-mix(in srgb, var(--brand) 28%, transparent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 820px; }
.center { text-align: center; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); border: 0; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--ink); color: var(--bg); padding: 8px 14px; border-radius: 8px; }
.skip:focus { left: 12px; }
.ic { flex: none; vertical-align: middle; }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); }
.hide { display: none !important; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 7px;
  font: 500 12.5px/1 var(--mono); text-transform: uppercase; letter-spacing: .08em;
  color: var(--brand-ink); margin: 0 0 16px;
}
.lead { font-size: clamp(1.05rem, 1.6vw, 1.22rem); color: var(--muted); max-width: 640px; line-height: 1.6; }
.center .lead { margin-left: auto; margin-right: auto; }

/* ---------------------------------------------------------------- buttons */
.btn {
  --h: 42px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: var(--h); padding: 0 18px; border-radius: 10px; border: 1px solid transparent;
  font: 550 15px/1 var(--font); cursor: pointer; white-space: nowrap;
  transition: background .15s, border-color .15s, color .15s, transform .15s, box-shadow .15s;
}
.btn:active { transform: translateY(1px); }
.btn-sm { --h: 36px; padding: 0 14px; font-size: 14px; border-radius: 9px; }
.btn-lg { --h: 50px; padding: 0 24px; font-size: 16px; border-radius: 12px; }
.btn-primary { background: var(--ink); color: var(--bg); box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: color-mix(in srgb, var(--ink) 86%, var(--brand)); }
.btn-brand { background: var(--brand); color: #fff; }
.btn-brand:hover { background: var(--brand-ink); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-2); }
.btn-ghost:hover { background: var(--surface); border-color: var(--ink-2); }
.btn-soft { background: var(--inset); color: var(--ink); border-color: var(--line); }
.btn-soft:hover { border-color: var(--line-2); background: var(--surface); }
.btn-danger { background: transparent; color: var(--bad); border-color: color-mix(in srgb, var(--bad) 40%, transparent); }
.btn-danger:hover { background: var(--bad-soft); }
.btn[disabled], .btn.is-loading { opacity: .6; pointer-events: none; }
.btn.is-loading::after { content: ''; width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
.btn-block { width: 100%; }
@keyframes spin { to { transform: rotate(360deg); } }

.icon-btn {
  display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); cursor: pointer;
}
.icon-btn:hover { color: var(--ink); border-color: var(--line-2); }

/* ---------------------------------------------------------------- header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
}
.nav { display: flex; align-items: center; gap: 22px; height: 66px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; }
.wordmark { font-size: 19px; letter-spacing: -0.03em; color: var(--ink); }
.wordmark span { margin-left: .2em; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.nav nav { flex: 1; }
.nav-links { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; justify-content: center; }
.nav-links > li > a { display: inline-flex; align-items: center; gap: 4px; padding: 8px 12px; border-radius: 9px; color: var(--ink-2); font-size: 14.5px; font-weight: 500; }
.nav-links > li > a:hover, .nav-links > li > a.active { color: var(--ink); background: color-mix(in srgb, var(--ink) 5%, transparent); }
.nav-cta { display: flex; align-items: center; gap: 8px; }
.nav-toggle { display: none; }
.theme-toggle .i-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .i-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .i-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .i-sun { display: block; }
  :root:not([data-theme="light"]) .theme-toggle .i-moon { display: none; }
}

.has-menu { position: relative; }
.has-menu .chev { transition: transform .2s; opacity: .7; }
.menu {
  position: absolute; top: calc(100% + 10px); left: 50%; width: 560px; transform: translate(-50%, 6px);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-lg);
  padding: 10px; opacity: 0; visibility: hidden; transition: opacity .16s, transform .16s, visibility .16s;
}
.menu::before { content: ''; position: absolute; left: 0; right: 0; top: -12px; height: 12px; }
.has-menu:hover .menu, .has-menu:focus-within .menu, .has-menu.open .menu { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
.has-menu:hover .chev, .has-menu.open .chev { transform: rotate(180deg); }
.menu-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.menu-item { display: flex; gap: 12px; padding: 12px; border-radius: 12px; }
.menu-item:hover { background: var(--surface-2); }
.menu-item strong { display: block; font-size: 14px; font-weight: 600; color: var(--ink); }
.menu-item small { display: block; font-size: 12.5px; color: var(--muted); line-height: 1.45; margin-top: 2px; }
.menu-ic { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--brand-soft); color: var(--brand-ink); flex: none; }
.menu-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 6px; padding: 11px 14px; border-radius: 10px; background: var(--inset); font-size: 13.5px; font-weight: 550; color: var(--ink-2); }
.menu-foot:hover { color: var(--ink); }

@media (max-width: 960px) {
  .nav-toggle { display: inline-grid; }
  .hide-sm { display: none; }
  .nav nav { position: absolute; left: 0; right: 0; top: 66px; flex: none; }
  .nav-links {
    display: none; flex-direction: column; align-items: stretch; gap: 2px;
    background: var(--bg); border-bottom: 1px solid var(--line); padding: 10px 16px 18px; box-shadow: var(--shadow);
  }
  .nav-links.open { display: flex; }
  .nav-links > li > a { padding: 12px; font-size: 16px; }
  .menu { position: static; width: auto; transform: none; opacity: 1; visibility: visible; box-shadow: none; border: 0; padding: 0 0 0 8px; background: transparent; display: none; }
  .has-menu.open .menu { display: block; transform: none; }
  .menu-grid { grid-template-columns: 1fr; }
  .menu-item small { display: none; }
  .menu-foot { display: none; }
  .nav { gap: 12px; }
  .brand { margin-right: auto; }
}

/* ---------------------------------------------------------------- sections */
section { position: relative; }
.section { padding: 96px 0; }
.section-sm { padding: 64px 0; }
.section-head { max-width: 720px; margin-bottom: 48px; }
.section-head.center { margin-left: auto; margin-right: auto; }
.section-head h2 + p { margin-top: 16px; font-size: 1.1rem; color: var(--muted); }
.band { background: var(--bg-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.dots {
  background-image: radial-gradient(color-mix(in srgb, var(--ink) 9%, transparent) 1px, transparent 1px);
  background-size: 22px 22px;
}

.page-hero { padding: 72px 0 40px; }
.page-hero h1 { font-size: clamp(2.1rem, 4.4vw, 3.3rem); }
.page-hero .lead { margin-top: 18px; }
.crumbs { font-size: 13.5px; color: var(--muted); margin-bottom: 22px; display: flex; gap: 6px; flex-wrap: wrap; }
.crumbs a:hover { color: var(--ink); }

/* ---------------------------------------------------------------- hero */
.hero { padding: 72px 0 120px; overflow: hidden; }
.hero::before {
  content: ''; position: absolute; inset: -20% -10% auto; height: 720px; z-index: -1;
  background:
    radial-gradient(600px 300px at 18% 30%, color-mix(in srgb, var(--brand-2) 16%, transparent), transparent 70%),
    radial-gradient(520px 300px at 85% 20%, color-mix(in srgb, var(--accent) 14%, transparent), transparent 70%);
}
.hero-grid { display: grid; grid-template-columns: 1.02fr 1fr; gap: 56px; align-items: center; }
.hero h1 { font-size: clamp(2.6rem, 5.6vw, 4.5rem); line-height: 1.02; }
.hero h1 .serif { color: var(--brand-ink); font-size: 1.06em; }
.hero .lead { margin-top: 22px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 30px; }
.hero-note { margin-top: 16px; font-size: 13.5px; color: var(--muted); display: flex; gap: 16px; flex-wrap: wrap; }
.hero-note span { display: inline-flex; align-items: center; gap: 6px; }
.hero-note .ic { color: var(--brand); }
.pill-link {
  display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px 5px 5px; border-radius: 99px;
  background: var(--surface); border: 1px solid var(--line); font-size: 13px; color: var(--ink-2); margin-bottom: 22px; box-shadow: var(--shadow-sm);
}
.pill-link b { background: var(--brand-soft); color: var(--brand-ink); padding: 3px 9px; border-radius: 99px; font-weight: 600; font-size: 12px; }
.pill-link:hover { border-color: var(--line-2); }

/* Answer mock: the product's core idea in one picture */
.answer-mock { position: relative; }
.am-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl); box-shadow: var(--shadow-lg);
  padding: 22px; position: relative; z-index: 2;
}
.am-q { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; background: var(--inset); border: 1px solid var(--line); border-radius: 14px; font-size: 14.5px; color: var(--ink); }
.am-q .ic { color: var(--muted); margin-top: 2px; }
.am-engines { display: flex; gap: 6px; margin: 16px 0 12px; flex-wrap: wrap; }
.eng { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 99px; font-size: 12px; font-weight: 550; border: 1px solid var(--line); color: var(--ink-2); background: var(--surface-2); }
.eng i { width: 7px; height: 7px; border-radius: 50%; background: var(--c, var(--brand)); }
.eng.on { border-color: color-mix(in srgb, var(--c) 45%, transparent); background: color-mix(in srgb, var(--c) 9%, var(--surface)); color: var(--ink); }
.am-a { font-size: 14.5px; line-height: 1.65; color: var(--ink-2); }
.am-a p { margin: 0 0 10px; color: inherit; }
.am-a ol { margin: 0; padding-left: 20px; }
.am-a li { margin: 4px 0; }
mark, .hl { background: var(--mark); color: var(--ink); padding: 0 3px; border-radius: 4px; font-weight: 600; }
.hl-comp { background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--ink); padding: 0 3px; border-radius: 4px; }
.am-cites { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 14px; padding-bottom: 96px; }
.cite { display: inline-flex; align-items: center; gap: 6px; font: 500 12px/1 var(--mono); padding: 6px 9px; border-radius: 8px; background: var(--inset); border: 1px solid var(--line); color: var(--ink-2); }
.cite.you { background: var(--brand-soft); border-color: color-mix(in srgb, var(--brand) 35%, transparent); color: var(--brand-ink); }
.am-float {
  position: absolute; z-index: 3; background: var(--surface); border: 1px solid var(--line); border-radius: 16px;
  box-shadow: var(--shadow-lg); padding: 14px 16px; font-size: 13px;
}
.am-float.score { right: -22px; bottom: -44px; width: 196px; }
.am-float.sov { left: -28px; bottom: -58px; width: 236px; }
.am-float .k { font: 500 11px/1 var(--mono); text-transform: uppercase; letter-spacing: .07em; color: var(--muted); }
.am-float .v { font-size: 30px; font-weight: 650; letter-spacing: -0.03em; margin-top: 6px; display: flex; align-items: baseline; gap: 8px; }
.am-float .v small { font-size: 12px; color: var(--brand-ink); font-weight: 600; }
.spark { width: 100%; height: 34px; margin-top: 6px; }
.spark path { fill: none; stroke: var(--brand); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.spark .area { fill: color-mix(in srgb, var(--brand) 14%, transparent); stroke: none; }
.sov-row { display: grid; grid-template-columns: 74px 1fr 34px; align-items: center; gap: 8px; margin-top: 7px; font-size: 12px; color: var(--ink-2); }
.sov-bar { height: 7px; border-radius: 9px; background: var(--inset); overflow: hidden; }
.sov-bar i { display: block; height: 100%; border-radius: 9px; background: var(--faint); }
.sov-row.you .sov-bar i { background: var(--grad); }
.sov-row b { font-weight: 600; text-align: right; font-family: var(--mono); font-size: 11.5px; }
.illus { position: absolute; left: 0; right: 0; bottom: -112px; margin: 0; font: 500 11px/1 var(--mono); color: var(--faint); text-align: center; }

.pulse-line { position: absolute; left: 0; right: 0; bottom: 6px; width: 100%; height: 84px; z-index: -1; opacity: .5; pointer-events: none; }
.pulse-line path { fill: none; stroke: url(#pulseGrad); stroke-width: 2; stroke-dasharray: 1400; stroke-dashoffset: 1400; animation: draw 3.2s ease-out .3s forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }

/* Engines strip */
.engines-strip { display: flex; align-items: center; justify-content: center; gap: 12px 36px; flex-wrap: wrap; padding: 26px 0 8px; color: var(--muted); font-size: 14px; }
.engines-strip .lbl { font: 500 12px/1 var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--faint); }
.engines-strip .e { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: var(--ink-2); font-size: 15.5px; }
.engines-strip .e i { width: 10px; height: 10px; border-radius: 3px; background: var(--c); transform: rotate(45deg); }

/* ---------------------------------------------------------------- cards / grids */
.grid { display: grid; gap: 18px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 26px;
  box-shadow: var(--shadow-sm); position: relative;
}
.card h3 { margin-bottom: 8px; }
.card p { margin: 0; font-size: 15px; color: var(--muted); }
.card.hover { transition: border-color .15s, transform .15s, box-shadow .15s; }
.card.hover:hover { border-color: var(--line-2); transform: translateY(-2px); box-shadow: var(--shadow); }
.feat-ic { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; margin-bottom: 18px; background: var(--brand-soft); color: var(--brand-ink); }
.feat-ic.v { background: var(--accent-soft); color: var(--accent); }

.steps { counter-reset: step; }
.step { position: relative; padding-top: 4px; }
.step-n { font: 500 13px/1 var(--mono); color: var(--brand-ink); display: inline-flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.step-n::after { content: ''; width: 46px; height: 1px; background: var(--line-2); }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.split.rev > :first-child { order: 2; }
.checklist { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 12px; }
.checklist li { display: flex; gap: 12px; color: var(--ink-2); }
.checklist li .ic { color: var(--brand); margin-top: 3px; }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl); box-shadow: var(--shadow); overflow: hidden; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); font-size: 13.5px; color: var(--muted); }
.panel-body { padding: 18px; }

/* Mini table used in marketing previews */
.mini-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.mini-table th { text-align: left; font: 500 11px/1 var(--mono); text-transform: uppercase; letter-spacing: .07em; color: var(--muted); padding: 10px 12px; border-bottom: 1px solid var(--line); }
.mini-table td { padding: 11px 12px; border-bottom: 1px solid var(--line); color: var(--ink-2); vertical-align: middle; }
.mini-table tr:last-child td { border-bottom: 0; }
.yes, .no, .pos { display: inline-grid; place-items: center; min-width: 26px; height: 24px; padding: 0 7px; border-radius: 7px; font: 600 12px/1 var(--mono); }
.yes { background: var(--brand-soft); color: var(--brand-ink); }
.no { background: var(--inset); color: var(--faint); }
.pos { background: var(--accent-soft); color: var(--accent); }

/* ---------------------------------------------------------------- tools grid */
.tool-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.tool-card {
  display: flex; gap: 16px; align-items: flex-start; padding: 22px; border-radius: var(--r-lg);
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); transition: border-color .15s, transform .15s, box-shadow .15s;
}
.tool-card:hover { border-color: color-mix(in srgb, var(--brand) 45%, var(--line)); transform: translateY(-2px); box-shadow: var(--shadow); }
.tool-card .t-ic { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; background: var(--brand-soft); color: var(--brand-ink); flex: none; }
.tool-card strong { display: block; font-size: 16.5px; font-weight: 600; margin-bottom: 4px; }
.tool-card span.d { display: block; color: var(--muted); font-size: 14.5px; line-height: 1.5; }
.tool-card .go { margin-left: auto; color: var(--faint); align-self: center; transition: transform .15s, color .15s; }
.tool-card:hover .go { color: var(--brand-ink); transform: translateX(3px); }
.free-tag { display: inline-block; font: 600 10.5px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; padding: 4px 7px; border-radius: 6px; background: var(--brand-soft); color: var(--brand-ink); margin-left: 6px; vertical-align: 2px; }

/* ---------------------------------------------------------------- pricing */
.price-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; align-items: stretch; }
.price { display: flex; flex-direction: column; padding: 26px 22px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); position: relative; }
.price.featured { border-color: transparent; box-shadow: var(--shadow-lg); background: linear-gradient(var(--surface), var(--surface)) padding-box, var(--grad) border-box; border: 1.5px solid transparent; }
.price .tag { position: absolute; top: -11px; left: 22px; background: var(--ink); color: var(--bg); font: 600 11px/1 var(--mono); letter-spacing: .05em; text-transform: uppercase; padding: 6px 9px; border-radius: 7px; }
.price h3 { font-size: 1.05rem; }
.price .blurb { font-size: 14px; color: var(--muted); margin: 6px 0 18px; min-height: 42px; }
.price .amt { font-size: 44px; font-weight: 650; letter-spacing: -0.04em; line-height: 1; }
.price .amt small { font-size: 15px; font-weight: 500; color: var(--muted); letter-spacing: 0; margin-left: 4px; }
.price .credits { margin-top: 10px; font: 500 14px/1.4 var(--mono); color: var(--brand-ink); }
.price .per { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.price ul { list-style: none; padding: 0; margin: 20px 0 24px; display: grid; gap: 10px; font-size: 14px; color: var(--ink-2); }
.price li { display: flex; gap: 9px; }
.price li .ic { color: var(--brand); margin-top: 2px; }
.price .btn { margin-top: auto; }
.price-note { margin-top: 22px; text-align: center; font-size: 13.5px; color: var(--muted); }

.calc { display: grid; grid-template-columns: 1.2fr 1fr; gap: 0; }
.calc-in { padding: 26px; display: grid; gap: 18px; }
.calc-out { padding: 26px; background: var(--inset); border-left: 1px solid var(--line); display: flex; flex-direction: column; justify-content: center; }
.range-row label { display: flex; justify-content: space-between; font-size: 14px; font-weight: 550; margin-bottom: 8px; }
.range-row output { font-family: var(--mono); color: var(--brand-ink); }
input[type="range"] { width: 100%; accent-color: var(--brand); }
.calc-big { font-size: 46px; font-weight: 650; letter-spacing: -0.04em; line-height: 1; }
.calc-sub { color: var(--muted); font-size: 14px; margin-top: 8px; }
.calc-rec { margin-top: 18px; padding: 12px 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); font-size: 14px; color: var(--ink-2); }

/* ---------------------------------------------------------------- FAQ */
.faq { display: grid; gap: 10px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 0 20px; }
.faq summary { cursor: pointer; list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 0; font-weight: 600; font-size: 15.5px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; font: 400 22px/1 var(--font); color: var(--muted); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 0 18px; margin: 0; color: var(--muted); font-size: 15px; }

/* ---------------------------------------------------------------- CTA band */
.cta-band { padding: 40px 0 96px; }
.cta-inner {
  position: relative; overflow: hidden; text-align: center; padding: 64px 24px; border-radius: var(--r-xl);
  background: #0e1117; color: #fff; border: 1px solid #1f2430;
}
.cta-inner::before { content: ''; position: absolute; inset: 0; background: radial-gradient(500px 220px at 20% 0%, rgba(20, 199, 132, .25), transparent 70%), radial-gradient(500px 240px at 90% 100%, rgba(91, 76, 240, .3), transparent 70%); }
.cta-inner > * { position: relative; }
.cta-inner h2 { color: #fff; max-width: 680px; margin: 0 auto; }
.cta-inner p { color: #b6bccb; margin: 16px auto 28px; max-width: 520px; }
.cta-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.cta-inner .btn-primary { background: #fff; color: #0e1117; }
.cta-inner .btn-primary:hover { background: #e8fff5; }
.cta-inner .btn-ghost { color: #fff; border-color: rgba(255, 255, 255, .25); }
.cta-inner .btn-ghost:hover { background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .5); }
.cta-pulse { position: absolute; left: 0; right: 0; top: 50%; width: 100%; height: 80px; transform: translateY(-50%); opacity: .14; }
.cta-pulse path { fill: none; stroke: #2bd492; stroke-width: 2; }

/* ---------------------------------------------------------------- footer */
.site-footer { border-top: 1px solid var(--line); background: var(--bg-2); padding: 56px 0 30px; }
.newsletter {
  display: grid; grid-template-columns: 1.2fr 1fr; gap: 36px; align-items: center;
  padding: 30px; border-radius: var(--r-xl); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); margin-bottom: 56px;
}
.newsletter h2 { font-size: 1.5rem; }
.newsletter p { margin: 10px 0 0; font-size: 14.5px; color: var(--muted); }
.newsletter .eyebrow { margin-bottom: 10px; }
.nl-form { display: grid; grid-template-columns: 1fr auto; gap: 10px; }
.nl-form input { height: 46px; }
.nl-form .btn { height: 46px; }
.nl-msg { grid-column: 1 / -1; margin: 0; min-height: 20px; font-size: 13.5px; }
.nl-msg.ok { color: var(--brand-ink); }
.nl-msg.err { color: var(--bad); }
.foot-grid { display: grid; grid-template-columns: 1.6fr repeat(4, 1fr); gap: 32px; }
.foot-grid h3 { font: 500 12px/1 var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--faint); margin-bottom: 16px; }
.foot-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.foot-grid ul a { color: var(--ink-2); font-size: 14.5px; text-decoration: none; }
.foot-grid ul a:hover { color: var(--ink); }
.foot-brand p { font-size: 14.5px; color: var(--muted); margin: 14px 0 16px; max-width: 320px; }
.status-pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 11px; border-radius: 99px; background: var(--surface); border: 1px solid var(--line); font-size: 12.5px; color: var(--muted); }
.status-pill .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); }
.status-pill.ok .dot { background: var(--brand); box-shadow: 0 0 0 0 color-mix(in srgb, var(--brand) 60%, transparent); animation: ping 2s infinite; }
.status-pill.down .dot { background: var(--bad); }
@keyframes ping { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--brand) 55%, transparent); } 70% { box-shadow: 0 0 0 7px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
.foot-legal { margin-top: 44px; padding-top: 22px; border-top: 1px solid var(--line); display: grid; gap: 6px; }
.foot-legal p { margin: 0; font-size: 12.5px; color: var(--faint); line-height: 1.6; }
.foot-legal a { color: var(--muted); }

/* ---------------------------------------------------------------- forms */
label.f { display: block; font-size: 14px; font-weight: 550; margin-bottom: 7px; color: var(--ink); }
.field { margin-bottom: 16px; }
.hint { font-size: 12.5px; color: var(--muted); margin-top: 6px; }
input[type="text"], input[type="email"], input[type="password"], input[type="url"], input[type="search"], select, textarea {
  width: 100%; height: 44px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--line-2);
  background: var(--surface); color: var(--ink); font: 400 15px var(--font); transition: border-color .15s, box-shadow .15s;
}
textarea { height: auto; min-height: 120px; padding: 12px 14px; line-height: 1.55; resize: vertical; }
input::placeholder, textarea::placeholder { color: var(--faint); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 16%, transparent); }
.check-row { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; color: var(--ink-2); }
.check-row input { margin-top: 4px; accent-color: var(--brand); width: 16px; height: 16px; }
.alert { padding: 12px 14px; border-radius: 10px; font-size: 14px; border: 1px solid var(--line); background: var(--inset); color: var(--ink-2); }
.alert.err { background: var(--bad-soft); border-color: color-mix(in srgb, var(--bad) 30%, transparent); color: var(--bad); }
.alert.ok { background: var(--brand-soft); border-color: color-mix(in srgb, var(--brand) 30%, transparent); color: var(--brand-ink); }
.alert.warn { background: var(--warn-soft); border-color: color-mix(in srgb, var(--warn) 30%, transparent); color: var(--warn); }

/* ---------------------------------------------------------------- auth */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.auth-side {
  position: relative; overflow: hidden; padding: 48px; display: flex; flex-direction: column; justify-content: space-between;
  background: #0e1117; color: #e8ebf1;
}
.auth-side::before { content: ''; position: absolute; inset: 0; background: radial-gradient(520px 300px at 0% 0%, rgba(20, 199, 132, .22), transparent 70%), radial-gradient(520px 320px at 100% 100%, rgba(91, 76, 240, .3), transparent 70%); }
.auth-side > * { position: relative; }
.auth-side .wordmark { color: #fff; }
.auth-side h2 { color: #fff; font-size: 2.1rem; max-width: 460px; }
.auth-side h2 .serif { color: #6ee7b7; }
.auth-side p { color: #aab1c0; }
.auth-side .checklist li { color: #d3d8e2; }
.auth-side small { color: #6f778a; font-size: 12.5px; }
.auth-main { display: grid; place-items: center; padding: 40px 20px; }
.auth-box { width: 100%; max-width: 400px; }
.auth-box h1 { font-size: 1.9rem; margin-bottom: 8px; }
.auth-box > p { color: var(--muted); margin-bottom: 26px; }
.divider { display: flex; align-items: center; gap: 12px; color: var(--faint); font-size: 12.5px; margin: 18px 0; }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.google-slot { min-height: 44px; display: flex; justify-content: center; }
.auth-foot { margin-top: 22px; font-size: 14px; color: var(--muted); text-align: center; }
.demo-box { margin-top: 22px; padding: 12px 14px; border-radius: 10px; border: 1px dashed var(--line-2); font-size: 13px; color: var(--muted); }
.demo-box code { font-size: 12.5px; }
@media (max-width: 900px) { .auth { grid-template-columns: 1fr; } .auth-side { display: none; } }

/* ---------------------------------------------------------------- prose / blog */
.prose { font-size: 17.5px; line-height: 1.75; color: var(--ink-2); }
.prose > * + * { margin-top: 1.15em; }
.prose p { margin: 0; color: inherit; }
.prose h2 { font-size: 1.65rem; margin-top: 2.1em; }
.prose h3 { font-size: 1.25rem; margin-top: 1.7em; }
.prose ul, .prose ol { padding-left: 1.3em; margin-bottom: 0; }
.prose li { margin: .45em 0; }
.prose li::marker { color: var(--brand); }
.prose blockquote { margin-left: 0; padding: 4px 0 4px 20px; border-left: 3px solid var(--brand); font-family: var(--serif); font-style: italic; font-size: 1.3em; color: var(--ink); }
.prose pre { background: var(--inset); border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px; overflow-x: auto; font-size: 14px; line-height: 1.6; }
.prose table { width: 100%; border-collapse: collapse; font-size: 15px; display: block; overflow-x: auto; }
.prose th, .prose td { border-bottom: 1px solid var(--line); padding: 10px 12px; text-align: left; }
.prose th { font-weight: 600; color: var(--ink); }
.prose .callout { padding: 18px 20px; border-radius: var(--r); background: var(--brand-soft); border: 1px solid color-mix(in srgb, var(--brand) 25%, transparent); font-size: 16px; }
.prose .callout p { margin: 0; }
.post-head { padding: 64px 0 24px; }
.post-head h1 { font-size: clamp(2.1rem, 4.6vw, 3.4rem); }
.post-meta { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 20px; font-size: 14px; color: var(--muted); }
.post-meta .sep { color: var(--faint); }
.tag-chip { display: inline-block; font: 500 12px/1 var(--mono); padding: 5px 9px; border-radius: 7px; background: var(--accent-soft); color: var(--accent); }
.post-layout { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 56px; align-items: start; padding-bottom: 40px; }
.toc { position: sticky; top: 92px; font-size: 14px; }
.toc h2 { font: 500 12px/1 var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--faint); margin-bottom: 14px; }
.toc ol { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.toc ol a { color: var(--muted); text-decoration: none; }
.toc ol a:hover { color: var(--ink); }
.toc .toc-cta { margin-top: 24px; padding: 18px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); }
.toc .toc-cta p { font-size: 13.5px; color: var(--muted); margin: 6px 0 12px; }
.post-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.post-card { display: flex; flex-direction: column; padding: 24px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); transition: border-color .15s, transform .15s, box-shadow .15s; }
.post-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--line-2); }
.post-card h3 { font-size: 1.15rem; margin: 14px 0 10px; line-height: 1.3; }
.post-card p { font-size: 14.5px; color: var(--muted); margin: 0 0 18px; }
.post-card .post-meta { margin-top: auto; font-size: 13px; }
.post-card.lead-post { grid-column: span 3; display: grid; grid-template-columns: 1.1fr 1fr; gap: 30px; align-items: center; padding: 34px; }
.post-card.lead-post h3 { font-size: 1.8rem; letter-spacing: -0.025em; }
.post-art { aspect-ratio: 16 / 9; border-radius: var(--r); background: var(--inset); border: 1px solid var(--line); position: relative; overflow: hidden; }
.post-art svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.author { display: flex; align-items: center; gap: 12px; padding: 22px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); margin-top: 48px; }
.avatar { width: 46px; height: 46px; border-radius: 50%; background: var(--grad); display: grid; place-items: center; color: #fff; font-weight: 700; flex: none; }
.author p { margin: 2px 0 0; font-size: 14px; color: var(--muted); }

/* ---------------------------------------------------------------- free tool pages */
.tool-hero { padding: 64px 0 28px; }
.tool-box { padding: 22px; border-radius: var(--r-xl); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.tool-form { display: grid; grid-template-columns: 1fr auto; gap: 10px; }
.tool-form input { height: 52px; font-size: 16px; padding-left: 44px; }
.tool-form .btn { height: 52px; padding: 0 24px; }
.input-ic { position: relative; }
.input-ic .ic { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: var(--faint); pointer-events: none; }
.tool-meta { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 14px; font-size: 13px; color: var(--muted); }
.tool-meta span { display: inline-flex; gap: 6px; align-items: center; }
.tool-meta .ic { color: var(--brand); }
.result { margin-top: 26px; }
.progress { height: 6px; border-radius: 9px; background: var(--inset); overflow: hidden; margin-top: 18px; }
.progress i { display: block; height: 100%; width: 30%; border-radius: 9px; background: var(--grad); animation: indet 1.2s ease-in-out infinite; }
@keyframes indet { 0% { transform: translateX(-100%); } 100% { transform: translateX(340%); } }
.progress-steps { display: grid; gap: 8px; margin-top: 14px; font-size: 14px; color: var(--muted); }
.progress-steps .done { color: var(--brand-ink); }
.score-head { display: flex; align-items: center; gap: 26px; padding: 24px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); flex-wrap: wrap; }
.ring { --p: 0; --c: var(--brand); width: 118px; height: 118px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--c) calc(var(--p) * 1%), var(--inset) 0); flex: none; }
.ring > div { width: 94px; height: 94px; border-radius: 50%; background: var(--surface); display: grid; place-items: center; text-align: center; }
.ring b { font-size: 32px; letter-spacing: -0.04em; display: block; line-height: 1; }
.ring small { font: 500 10.5px/1 var(--mono); color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.score-head h2 { font-size: 1.4rem; }
.score-head p { margin: 6px 0 0; color: var(--muted); font-size: 14.5px; word-break: break-all; }
.check-list { display: grid; gap: 10px; margin-top: 16px; }
.check-item { display: grid; grid-template-columns: 30px 1fr; gap: 12px; padding: 16px 18px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); }
.check-item .st { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; }
.check-item.pass .st { background: var(--brand-soft); color: var(--brand-ink); }
.check-item.warn .st { background: var(--warn-soft); color: var(--warn); }
.check-item.fail .st { background: var(--bad-soft); color: var(--bad); }
.check-item strong { display: block; font-size: 15px; }
.check-item .det { font-size: 14px; color: var(--muted); margin-top: 3px; word-break: break-word; }
.check-item .fix { font-size: 14px; color: var(--ink-2); margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--line); }
.check-group { font: 500 12px/1 var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--faint); margin: 24px 0 2px; }
.bot-table { width: 100%; border-collapse: collapse; font-size: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.bot-table th { text-align: left; font: 500 11px/1 var(--mono); text-transform: uppercase; letter-spacing: .07em; color: var(--muted); padding: 12px 14px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.bot-table td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; color: var(--ink-2); }
.bot-table tr:last-child td { border-bottom: 0; }
.bot-table .tok { font-family: var(--mono); font-weight: 500; color: var(--ink); font-size: 13.5px; }
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 4px 9px; border-radius: 7px; font: 600 12px/1 var(--font); white-space: nowrap; }
.badge.ok { background: var(--brand-soft); color: var(--brand-ink); }
.badge.bad { background: var(--bad-soft); color: var(--bad); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.neutral { background: var(--inset); color: var(--muted); border: 1px solid var(--line); }
.badge.violet { background: var(--accent-soft); color: var(--accent); }
.table-scroll { overflow-x: auto; border-radius: var(--r-lg); }
.code-out { width: 100%; min-height: 360px; font: 13.5px/1.6 var(--mono); background: var(--inset); }
.prompt-out { display: grid; gap: 8px; margin-top: 16px; }
.prompt-chip { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); font-size: 15px; }
.prompt-chip small { font: 500 11px/1 var(--mono); color: var(--faint); text-transform: uppercase; letter-spacing: .06em; white-space: nowrap; }
.tool-explain { padding: 64px 0 24px; }

/* ---------------------------------------------------------------- generic content page */
.content-grid { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 56px; align-items: start; padding-bottom: 72px; }
.side-nav { position: sticky; top: 92px; display: grid; gap: 4px; font-size: 14px; }
.side-nav a { padding: 7px 10px; border-radius: 8px; color: var(--muted); }
.side-nav a:hover { background: var(--surface); color: var(--ink); }
.legal h2 { font-size: 1.35rem; margin-top: 2.2em; }
.legal h3 { font-size: 1.08rem; margin-top: 1.6em; }
.legal { font-size: 16px; }
.legal .updated { font: 500 13px/1 var(--mono); color: var(--muted); }
.kv { display: grid; grid-template-columns: 180px 1fr; gap: 10px 20px; font-size: 15px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; color: var(--ink); }

/* API docs */
.endpoint { border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); overflow: hidden; margin: 18px 0; }
.endpoint-head { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--surface-2); font-family: var(--mono); font-size: 14px; flex-wrap: wrap; }
.method { font-weight: 600; font-size: 12px; padding: 4px 8px; border-radius: 6px; }
.method.get { background: var(--brand-soft); color: var(--brand-ink); }
.method.post { background: var(--accent-soft); color: var(--accent); }
.endpoint-body { padding: 16px; }
.endpoint pre { margin: 10px 0 0; }

/* ---------------------------------------------------------------- toasts / modal */
.toast-wrap { position: fixed; right: 18px; bottom: 18px; z-index: 200; display: grid; gap: 8px; max-width: min(380px, calc(100vw - 36px)); }
.toast { padding: 12px 16px; border-radius: 12px; background: var(--ink); color: var(--bg); font-size: 14px; box-shadow: var(--shadow-lg); animation: toastIn .2s ease-out; }
.toast.err { background: var(--bad); color: #fff; }
@keyframes toastIn { from { opacity: 0; transform: translateY(8px); } }
.modal-back { position: fixed; inset: 0; z-index: 150; background: rgba(8, 10, 14, .5); backdrop-filter: blur(3px); display: grid; place-items: center; padding: 20px; }
.modal { width: 100%; max-width: 640px; max-height: calc(100vh - 40px); overflow: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl); box-shadow: var(--shadow-lg); }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--surface); z-index: 1; }
.modal-head h2 { font-size: 1.15rem; }
.modal-body { padding: 22px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 16px 22px; border-top: 1px solid var(--line); position: sticky; bottom: 0; background: var(--surface); }

/* ---------------------------------------------------------------- misc */
.notfound { padding: 120px 0; text-align: center; }
.notfound .code { font: 500 14px/1 var(--mono); color: var(--brand-ink); }
.stat-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.stat-row > div { background: var(--surface); padding: 22px; }
.stat-row b { display: block; font-size: 28px; letter-spacing: -0.03em; font-weight: 650; }
.stat-row span { font-size: 13.5px; color: var(--muted); }
.compare { width: 100%; border-collapse: collapse; font-size: 15px; }
.compare th, .compare td { padding: 14px 16px; border-bottom: 1px solid var(--line); text-align: left; }
.compare th { font: 500 12px/1 var(--mono); text-transform: uppercase; letter-spacing: .07em; color: var(--muted); }
.compare td:first-child { color: var(--ink); font-weight: 550; }

/* ---------------------------------------------------------------- responsive */
@media (max-width: 1080px) {
  .price-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .foot-grid { grid-template-columns: 1fr 1fr 1fr; }
  .foot-brand { grid-column: 1 / -1; }
  .post-layout { grid-template-columns: 1fr; }
  .toc { display: none; }
}
@media (max-width: 900px) {
  .hero-grid, .split, .newsletter, .calc { grid-template-columns: 1fr; }
  .split.rev > :first-child { order: 0; }
  .g3, .g4, .post-grid { grid-template-columns: 1fr 1fr; }
  .post-card.lead-post { grid-column: span 2; grid-template-columns: 1fr; }
  .content-grid { grid-template-columns: 1fr; }
  .side-nav { display: none; }
  .calc-out { border-left: 0; border-top: 1px solid var(--line); }
  .am-float.score { right: 8px; }
  .am-float.sov { left: 8px; }
  .stat-row { grid-template-columns: 1fr 1fr; }
  .section { padding: 72px 0; }
}
@media (max-width: 640px) {
  body { font-size: 15.5px; }
  .wrap { padding: 0 16px; }
  .g2, .g3, .g4, .tool-grid, .price-grid, .post-grid { grid-template-columns: 1fr; }
  .post-card.lead-post { grid-column: auto; padding: 24px; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .nl-form, .tool-form { grid-template-columns: 1fr; }
  .hero { padding-top: 44px; }
  .am-float { display: none; }
  .illus { position: static; margin-top: 12px; }
  .am-cites { padding-bottom: 0; }
  .newsletter { padding: 22px; }
  .kv { grid-template-columns: 1fr; gap: 2px 0; }
  .kv dd { margin-bottom: 10px; }
  .cta-inner { padding: 48px 20px; }
  .stat-row { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .pulse-line path { stroke-dashoffset: 0; }
}

/* spacing between section headings and their lead paragraph */
h2 + .lead, h1 + .lead { margin-top: 16px; }
