/* Ledgerworks Market — design system.
   Tokens first; every component reads roles, never raw hex. Dark mode is a
   selected set of values (not an inversion) and follows the OS unless the
   viewer picks a theme (data-theme on <html>). Chart series colours are the
   validated data-viz palette, re-checked against these exact surfaces. */

/* Self-hosted fonts (SIL Open Font License 1.1, see ../fonts/OFL-*.txt). Served from this site so no
   visitor data goes to a font CDN. latin-ext only downloads when a page uses those characters. */
@font-face { font-family: 'Inter'; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url(../fonts/inter-latin-ext-wght-normal.woff2) format('woff2');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: 'Inter'; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url(../fonts/inter-latin-wght-normal.woff2) format('woff2');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Space Grotesk'; font-style: normal; font-display: swap; font-weight: 300 700;
  src: url(../fonts/space-grotesk-latin-ext-wght-normal.woff2) format('woff2');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: 'Space Grotesk'; font-style: normal; font-display: swap; font-weight: 300 700;
  src: url(../fonts/space-grotesk-latin-wght-normal.woff2) format('woff2');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-display: swap; font-weight: 400;
  src: url(../fonts/ibm-plex-mono-latin-ext-400-normal.woff2) format('woff2');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-display: swap; font-weight: 400;
  src: url(../fonts/ibm-plex-mono-latin-400-normal.woff2) format('woff2');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-display: swap; font-weight: 500;
  src: url(../fonts/ibm-plex-mono-latin-ext-500-normal.woff2) format('woff2');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-display: swap; font-weight: 500;
  src: url(../fonts/ibm-plex-mono-latin-500-normal.woff2) format('woff2');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-display: swap; font-weight: 600;
  src: url(../fonts/ibm-plex-mono-latin-ext-600-normal.woff2) format('woff2');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-display: swap; font-weight: 600;
  src: url(../fonts/ibm-plex-mono-latin-600-normal.woff2) format('woff2');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }

:root {
  color-scheme: light;
  --bg: #f5f6fb;
  --bg-2: #eceef7;
  --surface: #ffffff;
  --surface-2: #f8f9fd;
  --surface-3: #eef0f8;
  --ink: #0b0d1a;
  --ink-2: #3a3f56;
  --muted: #565c74;
  --line: #e2e5f0;
  --line-2: #cfd4e4;
  --accent: #5b3df5;
  --accent-2: #0b8fb3;
  --accent-3: #d63a8f;
  --accent-soft: rgba(91, 61, 245, 0.09);
  --accent-soft-2: rgba(11, 143, 179, 0.09);
  /* Text-safe variants of the accents: >= 4.5:1 on their own tints and on the light aurora. */
  --accent-2-ink: #04566d;
  --accent-3-ink: #a82c70;
  --btn-bg: #5b3df5;
  --btn-ink: #ffffff;
  --ring: rgba(91, 61, 245, 0.5);
  --good: #006300;
  --good-bg: rgba(12, 163, 12, 0.1);
  --warn: #8a5a00;
  --warn-bg: rgba(250, 178, 25, 0.16);
  --bad: #b3261e;
  --bad-bg: rgba(208, 59, 59, 0.1);
  --star: #e8a200;
  --glass: rgba(255, 255, 255, 0.72);
  --shadow-1: 0 1px 2px rgba(16, 20, 45, 0.06), 0 1px 1px rgba(16, 20, 45, 0.03);
  --shadow-2: 0 10px 30px -12px rgba(22, 24, 60, 0.22);
  --shadow-3: 0 30px 70px -24px rgba(40, 24, 120, 0.38);
  --grad: linear-gradient(120deg, #5b3df5 0%, #0b8fb3 55%, #d63a8f 100%);
  --grad-soft: linear-gradient(120deg, rgba(91, 61, 245, 0.14), rgba(11, 143, 179, 0.12) 55%, rgba(214, 58, 143, 0.12));
  /* For surfaces that carry white text: every stop is ≥ 5:1 against #fff. */
  --grad-strong: linear-gradient(120deg, #5b3df5 0%, #2563eb 55%, #0e7490 100%);
  --aurora-1: rgba(91, 61, 245, 0.28);
  --aurora-2: rgba(11, 175, 210, 0.22);
  --aurora-3: rgba(232, 80, 160, 0.18);
  --grid-line: rgba(30, 36, 80, 0.06);

  /* charts (validated data-viz palette, light steps, surface #ffffff) */
  --chart-surface: #ffffff;
  --chart-grid: #e7e9f1;
  --chart-axis: #c8ccda;
  --chart-text: #646a83;
  --s1: #2a78d6; --s2: #eb6834; --s3: #1baf7a; --s4: #eda100;
  --s5: #e87ba4; --s6: #008300; --s7: #6250d6; --s8: #e34948;
  --s-muted: #b6bccd;
  --ord-1: #86b6ef; --ord-2: #5598e7; --ord-3: #2a78d6; --ord-4: #1c5cab;
  --seq-1: #cde2fb; --seq-2: #9ec5f4; --seq-3: #6da7ec; --seq-4: #3987e5; --seq-5: #256abf; --seq-6: #184f95; --seq-7: #0d366b;
  --delta-up: #006300; --delta-down: #c62f2f;

  --font-sans: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-display: 'Space Grotesk', 'Inter', system-ui, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --radius-sm: 10px;
  --radius: 14px;
  --radius-lg: 22px;
  --header-h: 64px;
  --wrap: 1240px;
  --gutter: 24px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #070912; --bg-2: #0b0e1c; --surface: #0f1224; --surface-2: #141831; --surface-3: #1b2040;
    --ink: #eef0fb; --ink-2: #bcc1d9; --muted: #8e94b0; --line: rgba(255, 255, 255, 0.08); --line-2: rgba(255, 255, 255, 0.15);
    --accent: #a594ff; --accent-2: #4fd3f0; --accent-3: #ff7cc4;
    --accent-soft: rgba(140, 116, 255, 0.14); --accent-soft-2: rgba(79, 211, 240, 0.12); --accent-2-ink: #4fd3f0; --accent-3-ink: #ff7cc4;
    --btn-bg: #7357ff; --btn-ink: #ffffff; --ring: rgba(165, 148, 255, 0.6);
    --good: #3ccf5a; --good-bg: rgba(60, 207, 90, 0.12); --warn: #fbc04a; --warn-bg: rgba(250, 178, 25, 0.14);
    --bad: #ff8a80; --bad-bg: rgba(255, 99, 99, 0.13); --star: #fbbf24; --glass: rgba(15, 18, 36, 0.66);
    --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.4); --shadow-2: 0 12px 32px -12px rgba(0, 0, 0, 0.6); --shadow-3: 0 30px 80px -20px rgba(0, 0, 0, 0.75);
    --grad: linear-gradient(120deg, #8b74ff 0%, #36c5e8 55%, #ff6fbf 100%);
    --grad-soft: linear-gradient(120deg, rgba(139, 116, 255, 0.18), rgba(54, 197, 232, 0.14) 55%, rgba(255, 111, 191, 0.14));
    --aurora-1: rgba(120, 90, 255, 0.35); --aurora-2: rgba(40, 190, 230, 0.22); --aurora-3: rgba(255, 90, 180, 0.2); --grid-line: rgba(255, 255, 255, 0.045);
    --chart-surface: #0f1224; --chart-grid: #20253f; --chart-axis: #343a5c; --chart-text: #8e94b0;
    --s1: #3987e5; --s2: #d95926; --s3: #199e70; --s4: #c98500; --s5: #d55181; --s6: #0ca30c; --s7: #9085e9; --s8: #e66767;
    --s-muted: #3a4064;
    --ord-1: #184f95; --ord-2: #256abf; --ord-3: #3987e5; --ord-4: #6da7ec;
    --seq-1: #0d366b; --seq-2: #184f95; --seq-3: #256abf; --seq-4: #3987e5; --seq-5: #6da7ec; --seq-6: #9ec5f4; --seq-7: #cde2fb;
    --delta-up: #3ccf5a; --delta-down: #ff7b72;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #070912; --bg-2: #0b0e1c; --surface: #0f1224; --surface-2: #141831; --surface-3: #1b2040;
  --ink: #eef0fb; --ink-2: #bcc1d9; --muted: #8e94b0; --line: rgba(255, 255, 255, 0.08); --line-2: rgba(255, 255, 255, 0.15);
  --accent: #a594ff; --accent-2: #4fd3f0; --accent-3: #ff7cc4;
  --accent-soft: rgba(140, 116, 255, 0.14); --accent-soft-2: rgba(79, 211, 240, 0.12); --accent-2-ink: #4fd3f0; --accent-3-ink: #ff7cc4;
  --btn-bg: #7357ff; --btn-ink: #ffffff; --ring: rgba(165, 148, 255, 0.6);
  --good: #3ccf5a; --good-bg: rgba(60, 207, 90, 0.12); --warn: #fbc04a; --warn-bg: rgba(250, 178, 25, 0.14);
  --bad: #ff8a80; --bad-bg: rgba(255, 99, 99, 0.13); --star: #fbbf24; --glass: rgba(15, 18, 36, 0.66);
  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.4); --shadow-2: 0 12px 32px -12px rgba(0, 0, 0, 0.6); --shadow-3: 0 30px 80px -20px rgba(0, 0, 0, 0.75);
  --grad: linear-gradient(120deg, #8b74ff 0%, #36c5e8 55%, #ff6fbf 100%);
  --grad-soft: linear-gradient(120deg, rgba(139, 116, 255, 0.18), rgba(54, 197, 232, 0.14) 55%, rgba(255, 111, 191, 0.14));
  --aurora-1: rgba(120, 90, 255, 0.35); --aurora-2: rgba(40, 190, 230, 0.22); --aurora-3: rgba(255, 90, 180, 0.2); --grid-line: rgba(255, 255, 255, 0.045);
  --chart-surface: #0f1224; --chart-grid: #20253f; --chart-axis: #343a5c; --chart-text: #8e94b0;
  --s1: #3987e5; --s2: #d95926; --s3: #199e70; --s4: #c98500; --s5: #d55181; --s6: #0ca30c; --s7: #9085e9; --s8: #e66767;
  --s-muted: #3a4064;
  --ord-1: #184f95; --ord-2: #256abf; --ord-3: #3987e5; --ord-4: #6da7ec;
  --seq-1: #0d366b; --seq-2: #184f95; --seq-3: #256abf; --seq-4: #3987e5; --seq-5: #6da7ec; --seq-6: #9ec5f4; --seq-7: #cde2fb;
  --delta-up: #3ccf5a; --delta-down: #ff7b72;
}

@property --angle { syntax: '<angle>'; initial-value: 0deg; inherits: false; }
@view-transition { navigation: auto; }

/* ── Base ─────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0; min-height: 100vh; background: var(--bg); color: var(--ink);
  font-family: var(--font-sans); font-size: 15px; line-height: 1.55;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
p a, .prose a, .link { color: var(--accent); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.15; margin: 0; letter-spacing: -0.01em; }
h1 { font-size: clamp(34px, 5.4vw, 64px); font-weight: 700; letter-spacing: -0.03em; }
h2, .h2 { font-size: clamp(24px, 3vw, 34px); font-weight: 650; letter-spacing: -0.02em; }
h3 { font-size: 19px; font-weight: 600; }
h4 { font-size: 15px; font-weight: 600; font-family: var(--font-sans); letter-spacing: 0; }
p { margin: 0 0 12px; }
small, .small { font-size: 13px; }
.muted { color: var(--muted); }
.ink-2 { color: var(--ink-2); }
.mono { font-family: var(--font-mono); }
.num { font-variant-numeric: tabular-nums; }
:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; border-radius: 6px; }
::selection { background: var(--accent-soft); }
hr { border: 0; border-top: 1px solid var(--line); margin: 24px 0; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--surface); padding: 8px 14px; border-radius: 8px; }
.skip:focus { left: 12px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: 72px 0; position: relative; }
.section-sm { padding: 40px 0; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 28px; flex-wrap: wrap; }
.section-head p { margin: 8px 0 0; color: var(--muted); max-width: 62ch; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); font-weight: 500; }
.eyebrow::before { content: ''; width: 18px; height: 1px; background: currentColor; opacity: 0.6; }
.grid { display: grid; gap: 20px; }
.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)); }
.row { display: flex; align-items: center; gap: 12px; }
.row-wrap { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.stack > * + * { margin-top: 12px; }
.spacer { flex: 1; }
.center { text-align: center; }
.hide { display: none !important; }

/* ── Demo banner + header ─────────────────────────────────────────────── */
.demo-bar { background: var(--ink); color: var(--bg); font-size: 13px; position: relative; z-index: 41; }
.demo-bar .wrap { display: flex; gap: 12px; align-items: center; justify-content: center; min-height: 36px; padding-top: 6px; padding-bottom: 6px; text-align: center; }
.demo-bar a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.demo-bar button { background: none; border: 0; color: inherit; opacity: 0.7; cursor: pointer; padding: 4px; }
.demo-bar button svg { width: 16px; height: 16px; }
.site-header { position: sticky; top: 0; z-index: 40; height: var(--header-h); background: color-mix(in srgb, var(--bg) 78%, transparent); backdrop-filter: saturate(1.6) blur(16px); -webkit-backdrop-filter: saturate(1.6) blur(16px); border-bottom: 1px solid var(--line); }
.site-header .wrap { height: 100%; display: flex; align-items: center; gap: 18px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-mono); font-weight: 600; font-size: 15px; letter-spacing: -0.01em; white-space: nowrap; }
.brand:hover { color: var(--ink); }
.brand-mark { width: 30px; height: 30px; border-radius: 9px; background: var(--grad); display: grid; place-items: center; box-shadow: 0 6px 18px -6px rgba(91, 61, 245, 0.7); }
.brand-mark svg { width: 18px; height: 18px; color: #fff; }
.brand b { font-weight: 600; }
.brand .brand-sub { color: var(--muted); font-weight: 500; }
.nav-cats { position: relative; }
.nav-links { display: flex; gap: 4px; align-items: center; }
.nav-links a, .nav-btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 10px; font-size: 14px; font-weight: 500; color: var(--ink-2); background: none; border: 0; cursor: pointer; white-space: nowrap; }
.nav-links a:hover, .nav-btn:hover, .nav-links a[aria-current="page"] { background: var(--surface-3); color: var(--ink); }
.nav-btn svg, .nav-links a svg { width: 16px; height: 16px; }
.search-trigger { flex: 1; max-width: 420px; display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); cursor: text; font-size: 14px; transition: border-color .2s, box-shadow .2s; min-width: 0; }
.search-trigger:hover { border-color: var(--line-2); box-shadow: 0 0 0 4px var(--accent-soft); color: var(--ink-2); }
.search-trigger svg { width: 17px; height: 17px; flex: none; }
.search-trigger span { flex: 1; text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
kbd { font-family: var(--font-mono); font-size: 11px; padding: 2px 6px; border-radius: 6px; border: 1px solid var(--line-2); background: var(--surface-2); color: var(--muted); }
.header-actions { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.icon-btn { position: relative; display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; border: 0; background: none; color: var(--ink-2); cursor: pointer; transition: background .15s, color .15s; }
.icon-btn:hover { background: var(--surface-3); color: var(--ink); }
.icon-btn svg { width: 19px; height: 19px; }
.icon-btn .count { position: absolute; top: 4px; right: 3px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--btn-bg); color: var(--btn-ink); font-size: 11px; font-weight: 600; display: grid; place-items: center; box-shadow: 0 0 0 2px var(--bg); }
.icon-btn .count:empty, .icon-btn .count[data-n="0"] { display: none; }
.menu-btn { display: none; }

/* Mega menu */
.mega { position: absolute; top: calc(100% + 10px); left: 0; width: min(880px, calc(100vw - 40px)); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-3); padding: 18px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; opacity: 0; visibility: hidden; transform: translateY(-6px) scale(.99); transform-origin: top left; transition: opacity .18s, transform .18s, visibility .18s; z-index: 50; }
.nav-cats.open .mega { opacity: 1; visibility: visible; transform: none; }
.mega a { display: flex; gap: 12px; padding: 10px 12px; border-radius: 12px; align-items: flex-start; }
.mega a:hover { background: var(--surface-3); color: var(--ink); }
.mega .ico { flex: none; width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; color: #fff; }
.mega .ico svg { width: 18px; height: 18px; }
.mega b { display: block; font-size: 14px; font-weight: 600; }
.mega small { color: var(--muted); font-size: 12px; }
.mega .mega-foot { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; border-top: 1px solid var(--line); margin-top: 8px; padding: 12px 8px 0; font-size: 13px; }

/* Mobile drawer nav */
.mobile-nav { position: fixed; inset: 0; z-index: 60; display: none; }
.mobile-nav.open { display: block; }
.mobile-nav .scrim { position: absolute; inset: 0; background: rgba(5, 6, 15, 0.5); backdrop-filter: blur(4px); }
.mobile-nav .panel { position: absolute; top: 0; right: 0; bottom: 0; width: min(360px, 90vw); background: var(--surface); padding: 20px; overflow-y: auto; box-shadow: var(--shadow-3); animation: slideIn .25s ease-out; }
.mobile-nav .panel a { display: flex; gap: 10px; align-items: center; padding: 10px 8px; border-radius: 10px; font-weight: 500; }
.mobile-nav .panel a:hover { background: var(--surface-3); }
.mobile-nav .panel a svg, .mobile-nav .panel button svg { width: 18px; height: 18px; flex: none; }
.mobile-nav h4 { margin: 18px 8px 6px; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-family: var(--font-mono); font-weight: 500; }
@keyframes slideIn { from { transform: translateX(30px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ── Buttons, chips, badges ───────────────────────────────────────────── */
.btn { --b: var(--line-2); display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 42px; padding: 0 18px; border-radius: 12px; border: 1px solid var(--b); background: var(--surface); color: var(--ink); font-weight: 600; font-size: 14px; cursor: pointer; white-space: nowrap; transition: transform .15s ease, box-shadow .2s ease, background .2s, border-color .2s, color .2s; text-decoration: none; position: relative; }
.btn:hover { border-color: var(--accent); color: var(--ink); box-shadow: 0 0 0 4px var(--accent-soft); }
.btn:active { transform: translateY(1px) scale(.99); }
.btn svg { width: 17px; height: 17px; }
.btn-primary { --b: transparent; background: var(--btn-bg); color: var(--btn-ink); box-shadow: 0 8px 22px -10px var(--btn-bg); }
.btn-primary:hover { color: var(--btn-ink); background: color-mix(in srgb, var(--btn-bg) 88%, #000); box-shadow: 0 10px 28px -10px var(--btn-bg), 0 0 0 4px var(--accent-soft); }
.btn-grad { --b: transparent; background: var(--grad-strong); background-size: 160% 160%; color: #fff; box-shadow: 0 10px 30px -12px rgba(91, 61, 245, .8); animation: gradShift 8s ease infinite; }
.btn-grad:hover { color: #fff; box-shadow: 0 14px 34px -12px rgba(91, 61, 245, .9), 0 0 0 4px var(--accent-soft); }
.btn-ghost { --b: transparent; background: transparent; }
.btn-ghost:hover { background: var(--surface-3); box-shadow: none; border-color: transparent; }
.btn-soft { --b: transparent; background: var(--accent-soft); color: var(--accent); }
.btn-soft:hover { color: var(--accent); }
.btn-sm { height: 34px; padding: 0 12px; font-size: 13px; border-radius: 10px; }
.btn-lg { height: 52px; padding: 0 24px; font-size: 15px; border-radius: 14px; }
.btn-block { width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; box-shadow: none; }
@keyframes gradShift { 0%, 100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }

.chip { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); font-size: 13px; font-weight: 500; cursor: pointer; transition: all .15s; white-space: nowrap; }
.chip:hover { border-color: var(--accent); color: var(--ink); }
.chip.active, .chip[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.chip svg { width: 14px; height: 14px; }
.chip .x { margin-right: -4px; opacity: .6; }
.badge { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px; border-radius: 999px; font-size: 11.5px; font-weight: 600; letter-spacing: .01em; background: var(--surface-3); color: var(--ink-2); white-space: nowrap; }
.badge svg { width: 12px; height: 12px; }
.badge-verified { background: var(--accent-soft-2); color: var(--accent-2-ink); }
.badge-top { background: rgba(232, 162, 0, .14); color: #8a5a00; }
.badge-trend { background: rgba(214, 58, 143, .12); color: var(--accent-3-ink); }
.badge-new { background: var(--good-bg); color: var(--good); }
.badge-eu { background: rgba(42, 120, 214, .12); color: #1f5fae; }
.badge-risk-high { background: var(--bad-bg); color: var(--bad); }
.badge-risk-limited { background: var(--warn-bg); color: var(--warn); }
.badge-demo { background: transparent; border: 1px dashed var(--line-2); color: var(--muted); font-weight: 500; }
:root[data-theme="dark"] .badge-top { color: #fbbf24; }
:root[data-theme="dark"] .badge-eu { color: #7fb4f5; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .badge-top { color: #fbbf24; } :root:not([data-theme="light"]) .badge-eu { color: #7fb4f5; } }

/* ── Cards ────────────────────────────────────────────────────────────── */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-1); position: relative; }
.card-pad { padding: 22px; }
.card-hover { transition: transform .25s cubic-bezier(.2, .7, .3, 1), box-shadow .25s, border-color .25s; }
.card-hover:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); border-color: var(--line-2); }
.panel-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.panel-title h3 { font-size: 16px; font-family: var(--font-sans); font-weight: 650; }
.panel-title .muted { font-size: 13px; }

/* Spotlight: radial glow follows the pointer (fx.js sets --mx/--my) */
.spotlight { --mx: 50%; --my: 50%; }
.spotlight::after { content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .3s; background: radial-gradient(420px circle at var(--mx) var(--my), var(--accent-soft), transparent 45%); }
.spotlight:hover::after { opacity: 1; }

/* Animated conic border for featured items */
.glow-border { isolation: isolate; }
.glow-border::before { content: ''; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; background: conic-gradient(from var(--angle), transparent 0 55%, #8b74ff 70%, #36c5e8 80%, #ff6fbf 90%, transparent 100%); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; animation: spin 5s linear infinite; z-index: -1; opacity: .9; }
@keyframes spin { to { --angle: 360deg; } }

/* ── Product card ─────────────────────────────────────────────────────── */
.products { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 20px; }
.products.list { grid-template-columns: 1fr; }
.pcard { display: flex; flex-direction: column; overflow: hidden; height: 100%; transform-style: preserve-3d; }
.pcard .cover { position: relative; aspect-ratio: 16 / 9; overflow: hidden; border-bottom: 1px solid var(--line); }
.pcard .cover svg { width: 100%; height: 100%; transition: transform .6s cubic-bezier(.2, .7, .3, 1); }
.pcard:hover .cover svg { transform: scale(1.05); }
.pcard .cover .badges { position: absolute; top: 10px; left: 10px; display: flex; gap: 6px; flex-wrap: wrap; }
.pcard .cover .badges .badge { backdrop-filter: blur(6px); background: rgba(255, 255, 255, .86); color: #1b1e33; }
.pcard .cover .save { position: absolute; top: 8px; right: 8px; width: 34px; height: 34px; border-radius: 10px; border: 0; background: rgba(255, 255, 255, .86); color: #1b1e33; display: grid; place-items: center; cursor: pointer; backdrop-filter: blur(6px); transition: transform .15s; }
.pcard .cover .save:hover { transform: scale(1.08); }
.pcard .cover .save svg { width: 16px; height: 16px; }
.pcard .cover .save[aria-pressed="true"] svg { fill: #e0479e; stroke: #e0479e; }
.pcard .body { padding: 16px 16px 14px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.pcard .cat { font-family: var(--font-mono); font-size: 11px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); }
.pcard h3 { font-size: 17px; font-family: var(--font-sans); font-weight: 650; letter-spacing: -.01em; }
.pcard h3 a::after { content: ''; position: absolute; inset: 0; z-index: 1; }
.pcard .tagline { color: var(--ink-2); font-size: 13.5px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.9em; margin: 0; }
.pcard mark, .hl mark { background: color-mix(in srgb, var(--accent) 18%, transparent); color: inherit; border-radius: 4px; padding: 0 2px; }
.pcard .seller { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.pcard .foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 10px; border-top: 1px dashed var(--line); }
.pcard .price { font-weight: 700; font-size: 15px; }
.pcard .price small { font-weight: 500; color: var(--muted); font-size: 12px; }
.pcard .actions { position: relative; z-index: 2; display: flex; gap: 6px; }
.pcard .compare-toggle { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); cursor: pointer; padding: 4px 6px; border-radius: 8px; }
.pcard .compare-toggle:hover { background: var(--surface-3); color: var(--ink); }
.pcard .compare-toggle input { accent-color: var(--accent); margin: 0; }
.products.list .pcard { flex-direction: row; }
.products.list .pcard .cover { width: 260px; aspect-ratio: auto; border-bottom: 0; border-right: 1px solid var(--line); flex: none; }
.avatar { flex: none; width: 22px; height: 22px; border-radius: 7px; display: grid; place-items: center; color: #fff; font-size: 10px; font-weight: 700; letter-spacing: .02em; }
.avatar.lg { width: 56px; height: 56px; border-radius: 16px; font-size: 20px; }
.verified-ico { width: 15px; height: 15px; color: var(--accent-2); flex: none; }
.stars { --pct: 80%; position: relative; display: inline-flex; vertical-align: middle; }
.stars .base, .stars .fill { display: flex; gap: 1px; }
.stars .base svg { fill: var(--line-2); width: 14px; height: 14px; stroke: none; }
.stars .fill { position: absolute; inset: 0; width: var(--pct); overflow: hidden; }
.stars .fill svg { fill: var(--star); width: 14px; height: 14px; stroke: none; flex: none; }
.rating { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.rating b { color: var(--ink); font-weight: 650; }

/* skeleton shimmer */
.skeleton { position: relative; overflow: hidden; background: var(--surface-3); border-radius: var(--radius); }
.skeleton::after { content: ''; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--surface) 70%, transparent), transparent); animation: shimmer 1.4s infinite; }
@keyframes shimmer { to { transform: translateX(100%); } }
.sk-card { height: 340px; }

/* ── Hero & backgrounds ───────────────────────────────────────────────── */
.hero { position: relative; overflow: hidden; padding: 84px 0 72px; isolation: isolate; }
.hero .wrap { position: relative; z-index: 2; }
.aurora { position: absolute; inset: -20% -10% auto -10%; height: 140%; z-index: -1; pointer-events: none; filter: blur(70px); opacity: .9; }
.aurora span { position: absolute; border-radius: 50%; mix-blend-mode: normal; animation: drift 22s ease-in-out infinite alternate; }
.aurora span:nth-child(1) { width: 48vw; height: 48vw; left: 2%; top: 0; background: var(--aurora-1); }
.aurora span:nth-child(2) { width: 40vw; height: 40vw; right: 0; top: 6%; background: var(--aurora-2); animation-duration: 26s; animation-delay: -6s; }
.aurora span:nth-child(3) { width: 34vw; height: 34vw; left: 34%; top: 30%; background: var(--aurora-3); animation-duration: 30s; animation-delay: -12s; }
@keyframes drift { 0% { transform: translate(0, 0) scale(1); } 50% { transform: translate(6vw, 4vw) scale(1.08); } 100% { transform: translate(-4vw, 2vw) scale(.95); } }
.grid-bg { position: absolute; inset: 0; z-index: -1; pointer-events: none; background-image: linear-gradient(var(--grid-line) 1px, transparent 1px), linear-gradient(90deg, var(--grid-line) 1px, transparent 1px); background-size: 44px 44px; -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 35%, #000 30%, transparent 75%); mask-image: radial-gradient(ellipse 70% 60% at 50% 35%, #000 30%, transparent 75%); }
.neural { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; opacity: .75; pointer-events: none; }
.gradient-text { background: var(--grad); background-size: 200% 200%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: gradShift 9s ease infinite; }
.hero h1 { max-width: 17ch; }
.hero .lede { font-size: clamp(16px, 1.6vw, 19px); color: var(--ink-2); max-width: 60ch; margin: 18px 0 30px; }
.pill-note { display: inline-flex; align-items: center; gap: 8px; padding: 6px 6px 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--glass); backdrop-filter: blur(10px); font-size: 13px; color: var(--ink-2); margin-bottom: 22px; }
.pill-note b { background: var(--grad); color: #fff; font-size: 11px; padding: 3px 8px; border-radius: 999px; font-weight: 600; }

/* Big search */
.bigsearch { position: relative; max-width: 720px; }
.bigsearch form { display: flex; align-items: center; gap: 8px; padding: 8px 8px 8px 18px; background: var(--surface); border: 1px solid var(--line-2); border-radius: 18px; box-shadow: var(--shadow-3); transition: box-shadow .25s, border-color .25s; }
.bigsearch form:focus-within { border-color: var(--accent); box-shadow: var(--shadow-3), 0 0 0 5px var(--accent-soft); }
.bigsearch svg.lead { width: 22px; height: 22px; color: var(--muted); flex: none; }
.bigsearch input { flex: 1; border: 0; outline: 0; background: none; font-size: 17px; height: 46px; min-width: 0; }
.bigsearch input::placeholder { color: var(--muted); }
.suggest { position: absolute; top: calc(100% + 8px); left: 0; right: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-3); padding: 8px; z-index: 30; display: none; max-height: 70vh; overflow-y: auto; }
.suggest.open { display: block; animation: pop .16s ease-out; }
.suggest h5 { margin: 8px 10px 4px; font-size: 11px; font-family: var(--font-mono); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 500; }
.suggest a, .suggest button.s-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border-radius: 10px; border: 0; background: none; text-align: left; cursor: pointer; font-size: 14px; color: var(--ink); }
.suggest a[aria-selected="true"], .suggest a:hover, .suggest button.s-item:hover, .suggest button.s-item[aria-selected="true"] { background: var(--surface-3); color: var(--ink); }
.suggest .s-ico { flex: none; width: 30px; height: 30px; border-radius: 8px; overflow: hidden; display: grid; place-items: center; background: var(--surface-3); color: var(--muted); }
.suggest .s-ico svg { width: 16px; height: 16px; }
.suggest .s-ico.cover svg { width: 100%; height: 100%; }
.suggest .s-meta { margin-left: auto; color: var(--muted); font-size: 12px; white-space: nowrap; }
@keyframes pop { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.quick-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; align-items: center; }
.quick-chips .label { font-size: 13px; color: var(--muted); margin-right: 4px; }

/* Stats strip */
.stats-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; margin-top: 54px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; max-width: 880px; }
.stats-strip > div { background: var(--glass); backdrop-filter: blur(12px); padding: 18px 20px; }
.stats-strip b { display: block; font-family: var(--font-display); font-size: 28px; font-weight: 650; letter-spacing: -.02em; }
.stats-strip span { font-size: 13px; color: var(--muted); }

/* Marquee */
.marquee { overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee-track { display: flex; gap: 10px; width: max-content; animation: marquee 50s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* Category tiles */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.cat-tile { position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 10px; padding: 18px; min-height: 150px; }
.cat-tile .ico { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; color: #fff; box-shadow: 0 10px 22px -10px var(--c, #5b3df5); }
.cat-tile .ico svg { width: 21px; height: 21px; }
.cat-tile b { font-size: 15px; font-weight: 650; }
.cat-tile small { color: var(--muted); font-size: 12.5px; line-height: 1.45; }
.cat-tile .count { position: absolute; top: 16px; right: 16px; font-family: var(--font-mono); font-size: 12px; color: var(--muted); }
.cat-tile .arrow { position: absolute; right: 16px; bottom: 14px; width: 18px; height: 18px; color: var(--muted); transition: transform .2s, color .2s; }
.cat-tile:hover .arrow { transform: translateX(4px); color: var(--accent); }

/* Horizontal scroller */
.scroller { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(270px, 1fr); gap: 18px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 6px 2px 18px; scrollbar-width: thin; }
.scroller > * { scroll-snap-align: start; }
@media (min-width: 1100px) { .scroller { grid-auto-columns: calc((100% - 54px) / 4); } }

/* Steps / feature lists */
.steps { display: grid; gap: 14px; counter-reset: step; }
.step { display: flex; gap: 14px; align-items: flex-start; }
.step::before { counter-increment: step; content: counter(step); flex: none; width: 30px; height: 30px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); font-weight: 700; font-family: var(--font-mono); display: grid; place-items: center; font-size: 13px; }
.step b { display: block; font-weight: 650; }
.step p { margin: 2px 0 0; color: var(--muted); font-size: 14px; }
.checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.checklist li { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; }
.checklist li svg { flex: none; width: 18px; height: 18px; color: var(--good); margin-top: 2px; }
.feature-ico { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; background: var(--grad-soft); color: var(--accent); margin-bottom: 14px; }
.feature-ico svg { width: 22px; height: 22px; }

/* CTA band */
.cta-band { position: relative; overflow: hidden; border-radius: 28px; padding: 56px; background: radial-gradient(120% 140% at 0% 0%, #2a1b8f 0%, #10122b 55%, #0a0c1e 100%); color: #eef0fb; isolation: isolate; }
.cta-band h2 { color: #fff; max-width: 20ch; }
.cta-band p { color: #c2c6e0; max-width: 56ch; }
.cta-band .aurora { opacity: .7; }
.cta-band .btn:not(.btn-grad):not(.btn-primary) { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .18); color: #fff; }

/* ── Page header (inner pages) ────────────────────────────────────────── */
.page-head { position: relative; overflow: hidden; padding: 46px 0 34px; border-bottom: 1px solid var(--line); isolation: isolate; }
.page-head .aurora { opacity: .55; height: 220%; }
.page-head h1 { font-size: clamp(30px, 4vw, 46px); }
.page-head p.lede { color: var(--ink-2); max-width: 64ch; margin: 12px 0 0; font-size: 16.5px; }
.crumbs { display: flex; gap: 6px; align-items: center; font-size: 13px; color: var(--muted); margin-bottom: 14px; flex-wrap: wrap; }
.crumbs a:hover { color: var(--accent); }
.crumbs svg { width: 14px; height: 14px; }

/* ── Browse layout ────────────────────────────────────────────────────── */
.browse { display: grid; grid-template-columns: 268px minmax(0, 1fr); gap: 32px; align-items: start; padding-top: 30px; padding-bottom: 80px; } /* longhand: keeps .wrap's side gutter */
.facets { position: sticky; top: calc(var(--header-h) + 16px); max-height: calc(100vh - var(--header-h) - 32px); overflow-y: auto; padding-right: 6px; scrollbar-width: thin; }
.facet { border-bottom: 1px solid var(--line); padding: 14px 0; }
.facet:first-child { padding-top: 0; }
.facet > h4 { display: flex; justify-content: space-between; align-items: center; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-2); margin-bottom: 10px; font-family: var(--font-mono); font-weight: 500; }
.facet label.opt { display: flex; align-items: center; gap: 9px; padding: 5px 4px; border-radius: 8px; cursor: pointer; font-size: 14px; color: var(--ink-2); }
.facet label.opt:hover { background: var(--surface-3); color: var(--ink); }
.facet label.opt input { accent-color: var(--accent); width: 16px; height: 16px; margin: 0; flex: none; }
.facet label.opt .n { margin-left: auto; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.facet label.opt.zero { color: var(--muted); }
.facet .more { background: none; border: 0; color: var(--accent); font-size: 13px; padding: 4px; cursor: pointer; }
.results-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.results-bar .count { font-size: 14px; color: var(--muted); }
.results-bar .count b { color: var(--ink); }
.applied { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.seg { display: inline-flex; padding: 3px; border-radius: 12px; background: var(--surface-3); gap: 2px; }
.seg button { border: 0; background: none; height: 32px; padding: 0 10px; border-radius: 9px; cursor: pointer; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 500; }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-1); }
.seg button svg { width: 16px; height: 16px; }
.dym { padding: 12px 16px; border-radius: 12px; background: var(--accent-soft); margin-bottom: 16px; font-size: 14px; }
.dym button { background: none; border: 0; color: var(--accent); font-weight: 600; cursor: pointer; text-decoration: underline; padding: 0; }
.empty { text-align: center; padding: 64px 20px; border: 1px dashed var(--line-2); border-radius: var(--radius-lg); }
.empty svg { width: 42px; height: 42px; margin: 0 auto 12px; color: var(--muted); }
.pager { display: flex; justify-content: center; gap: 6px; margin-top: 32px; }
.pager button { min-width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; font-weight: 600; }
.pager button[aria-current="true"] { background: var(--btn-bg); color: var(--btn-ink); border-color: transparent; }
.facet-toggle { display: none; }
.mobile-only { display: none !important; }
.cat-hero { display: flex; gap: 20px; align-items: center; }
.cat-hero .ico { width: 64px; height: 64px; border-radius: 18px; display: grid; place-items: center; color: #fff; flex: none; }
.cat-hero .ico svg { width: 30px; height: 30px; }
.info-note { font-size: 12.5px; color: var(--muted); display: flex; gap: 8px; align-items: flex-start; }
.info-note svg { width: 15px; height: 15px; flex: none; margin-top: 2px; }

/* ── Forms ────────────────────────────────────────────────────────────── */
.field { display: grid; gap: 6px; }
.field label, .label { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.field .hint { font-size: 12px; color: var(--muted); }
.input, .select, .textarea { width: 100%; height: 44px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); outline: 0; transition: border-color .2s, box-shadow .2s; font-size: 14.5px; }
.textarea { height: auto; min-height: 110px; padding: 12px 14px; resize: vertical; line-height: 1.5; }
.select { appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.input-sm { height: 36px; font-size: 13.5px; border-radius: 10px; }
.input-group { display: flex; align-items: center; border: 1px solid var(--line-2); border-radius: 12px; background: var(--surface); overflow: hidden; }
.input-group:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.input-group .input { border: 0; box-shadow: none !important; }
.input-group span { padding: 0 12px; color: var(--muted); font-size: 13px; white-space: nowrap; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.form-grid .full { grid-column: 1 / -1; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; color: var(--ink-2); cursor: pointer; }
.check input { accent-color: var(--accent); width: 17px; height: 17px; margin: 2px 0 0; flex: none; }
input[type="range"] { width: 100%; accent-color: var(--accent); }
.range-row { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; }
.range-row output { font-variant-numeric: tabular-nums; font-weight: 650; min-width: 84px; text-align: right; }
.switch { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: 14px; }
.switch input { position: absolute; opacity: 0; }
.switch .track { width: 40px; height: 24px; border-radius: 99px; background: var(--line-2); position: relative; transition: background .2s; flex: none; }
.switch .track::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: var(--shadow-1); transition: transform .2s; }
.switch input:checked + .track { background: var(--btn-bg); }
.switch input:checked + .track::after { transform: translateX(16px); }
.switch input:focus-visible + .track { outline: 2px solid var(--ring); outline-offset: 2px; }
.form-msg { font-size: 14px; padding: 12px 14px; border-radius: 12px; display: none; }
.form-msg.show { display: block; }
.form-msg.ok { background: var(--good-bg); color: var(--good); }
.form-msg.err { background: var(--bad-bg); color: var(--bad); }
.radio-cards { display: grid; gap: 10px; }
.radio-card { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: 14px; border: 1px solid var(--line-2); cursor: pointer; background: var(--surface); transition: border-color .2s, box-shadow .2s, background .2s; }
.radio-card:hover { border-color: var(--accent); }
.radio-card input { accent-color: var(--accent); margin-top: 3px; flex: none; }
.radio-card:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 1px var(--accent); }
.radio-card .rc-main { flex: 1; min-width: 0; }
.radio-card .rc-title { font-weight: 650; display: flex; justify-content: space-between; gap: 8px; }
.radio-card .rc-sub { font-size: 13px; color: var(--muted); }

/* ── Tabs, tables, accordions ─────────────────────────────────────────── */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 22px; overflow-x: auto; scrollbar-width: none; }
.tabs button { position: relative; border: 0; background: none; padding: 12px 14px; font-weight: 600; font-size: 14px; color: var(--muted); cursor: pointer; white-space: nowrap; }
.tabs button[aria-selected="true"], .tabs button[aria-current="true"] { color: var(--ink); }
.tabs button[aria-selected="true"]::after, .tabs button[aria-current="true"]::after { content: ''; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 2px; border-radius: 2px; background: var(--grad); }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th, .table td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; background: var(--surface-2); white-space: nowrap; }
.table tr:last-child td { border-bottom: 0; }
.table td.num, .table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.table tbody tr:hover td { background: var(--surface-2); }
.table-compact th, .table-compact td { padding: 10px 9px; font-size: 13px; }
.table-compact th { white-space: normal; line-height: 1.3; }
.table-compact td:last-child { font-size: 12px; min-width: 110px; }
details.acc { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
details.acc + details.acc { margin-top: 10px; }
details.acc summary { list-style: none; cursor: pointer; padding: 16px 18px; font-weight: 600; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
details.acc summary::-webkit-details-marker { display: none; }
details.acc summary::after { content: '+'; font-family: var(--font-mono); font-size: 18px; color: var(--muted); transition: transform .2s; }
details.acc[open] summary::after { transform: rotate(45deg); }
details.acc .acc-body { padding: 0 18px 16px; color: var(--ink-2); font-size: 14.5px; }

/* ── Product page ─────────────────────────────────────────────────────── */
.product-top { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 36px; padding: 28px 0 40px; align-items: start; }
.gallery .main { border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--line); aspect-ratio: 16 / 10; background: var(--surface-2); box-shadow: var(--shadow-2); }
.gallery .main svg { width: 100%; height: 100%; }
.gallery .thumbs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 10px; }
.gallery .thumbs button { padding: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; cursor: pointer; aspect-ratio: 16 / 10; background: none; opacity: .7; transition: opacity .2s, border-color .2s; }
.gallery .thumbs button[aria-pressed="true"], .gallery .thumbs button:hover { opacity: 1; border-color: var(--accent); }
.gallery .thumbs svg { width: 100%; height: 100%; }
.buybox { position: sticky; top: calc(var(--header-h) + 20px); }
.buybox h1 { font-size: clamp(28px, 3.4vw, 40px); }
.buybox .tagline { font-size: 16.5px; color: var(--ink-2); margin: 10px 0 14px; }
.buybox .meta { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; font-size: 14px; color: var(--muted); margin-bottom: 16px; }
.price-big { font-family: var(--font-display); font-size: 34px; font-weight: 700; letter-spacing: -.02em; }
.price-big small { font-family: var(--font-sans); font-size: 14px; color: var(--muted); font-weight: 500; letter-spacing: 0; }
.trust-line { display: grid; gap: 8px; margin-top: 16px; font-size: 13px; color: var(--ink-2); }
.trust-line div { display: flex; gap: 8px; align-items: center; }
.trust-line svg { width: 16px; height: 16px; color: var(--good); flex: none; }
.kv { display: grid; grid-template-columns: minmax(140px, 220px) 1fr; gap: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.kv > div { padding: 12px 16px; border-bottom: 1px solid var(--line); font-size: 14px; }
.kv > div:nth-child(odd) { color: var(--muted); background: var(--surface-2); }
.kv > div:nth-last-child(-n+2) { border-bottom: 0; }
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.plan { padding: 22px; display: flex; flex-direction: column; gap: 12px; }
.plan.featured { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), var(--shadow-2); }
.plan .tag { position: absolute; top: -11px; left: 20px; }
.plan ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; font-size: 13.5px; color: var(--ink-2); }
.plan ul li { display: flex; gap: 8px; }
.plan ul svg { width: 16px; height: 16px; color: var(--good); flex: none; margin-top: 2px; }
.review { padding: 18px 0; border-bottom: 1px solid var(--line); }
.review:last-child { border-bottom: 0; }
.review .who { display: flex; gap: 10px; align-items: center; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.dist-row { display: grid; grid-template-columns: 34px 1fr 44px; gap: 10px; align-items: center; font-size: 13px; color: var(--muted); }
.dist-row .bar { height: 8px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.dist-row .bar i { display: block; height: 100%; border-radius: 99px; background: var(--s1); }
.ai-card { background: linear-gradient(var(--surface), var(--surface)) padding-box, var(--grad) border-box; border: 1px solid transparent; }

/* ── Compare ──────────────────────────────────────────────────────────── */
.compare-table { table-layout: fixed; min-width: 760px; }
.compare-table th:first-child, .compare-table td:first-child { width: 190px; position: sticky; left: 0; background: var(--surface-2); z-index: 1; }
.compare-table td.diff { background: var(--accent-soft); }
.compare-tray { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%) translateY(140%); z-index: 45; display: flex; align-items: center; gap: 12px; padding: 10px 10px 10px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow-3); transition: transform .35s cubic-bezier(.2, .8, .2, 1), opacity .2s; max-width: calc(100vw - 120px); opacity: 0; pointer-events: none; }
.compare-tray.show { transform: translateX(-50%); opacity: 1; pointer-events: auto; }  /* the hidden state also fades: on phones the tray sits 80px up, where the off-screen slide alone leaves an empty pill visible */
.compare-tray .thumbs { display: flex; gap: 6px; }
.compare-tray .thumbs span { width: 34px; height: 34px; border-radius: 9px; overflow: hidden; border: 1px solid var(--line); }
.compare-tray .thumbs svg { width: 100%; height: 100%; }

/* ── Dialogs, drawers, toasts, palette ────────────────────────────────── */
dialog { border: 0; padding: 0; background: transparent; color: var(--ink); max-width: calc(100vw - 32px); }
dialog::backdrop { background: rgba(6, 7, 18, 0.55); backdrop-filter: blur(6px); }
.modal { width: min(560px, calc(100vw - 32px)); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-3); padding: 26px; animation: pop .2s ease-out; }
.modal-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; margin-bottom: 14px; }
.drawer { position: fixed; inset: 0; z-index: 70; display: none; }
.drawer.open { display: block; }
.drawer .scrim { position: absolute; inset: 0; background: rgba(6, 7, 18, 0.5); backdrop-filter: blur(4px); animation: fadeIn .2s; }
.drawer .sheet { position: absolute; top: 0; right: 0; bottom: 0; width: min(440px, 100vw); background: var(--surface); box-shadow: var(--shadow-3); display: flex; flex-direction: column; animation: slideIn .28s cubic-bezier(.2, .8, .2, 1); }
.drawer .sheet header { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.drawer .sheet .content { flex: 1; overflow-y: auto; padding: 16px 20px; }
.drawer .sheet footer { border-top: 1px solid var(--line); padding: 16px 20px; display: grid; gap: 12px; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.cart-item { display: grid; grid-template-columns: 56px 1fr auto; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); align-items: start; }
.cart-item .thumb { width: 56px; height: 40px; border-radius: 9px; overflow: hidden; border: 1px solid var(--line); }
.cart-item .thumb svg { width: 100%; height: 100%; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line-2); border-radius: 10px; overflow: hidden; }
.qty button { width: 30px; height: 30px; border: 0; background: none; cursor: pointer; font-size: 16px; }
.qty input { width: 40px; height: 30px; border: 0; text-align: center; background: none; font-variant-numeric: tabular-nums; }
.sum-row { display: flex; justify-content: space-between; font-size: 14px; color: var(--ink-2); }
.sum-row.total { font-size: 17px; font-weight: 700; color: var(--ink); }
.toasts { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); z-index: 90; display: grid; gap: 8px; justify-items: center; pointer-events: none; }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 10px; padding: 11px 14px 11px 16px; border-radius: 14px; background: var(--ink); color: var(--bg); box-shadow: var(--shadow-3); font-size: 14px; font-weight: 500; animation: toastIn .3s cubic-bezier(.2, .8, .2, 1); max-width: min(520px, calc(100vw - 32px)); }
.toast svg { width: 18px; height: 18px; flex: none; }
.toast a, .toast button { color: inherit; font-weight: 700; text-decoration: underline; background: none; border: 0; cursor: pointer; padding: 0; }
.toast.out { animation: toastOut .25s forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateY(14px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateY(8px) scale(.97); } }
.palette { width: min(680px, calc(100vw - 24px)); margin-top: 10vh; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow-3); overflow: hidden; animation: pop .18s ease-out; }
.palette .p-input { display: flex; align-items: center; gap: 12px; padding: 4px 18px; border-bottom: 1px solid var(--line); }
.palette .p-input svg { width: 20px; height: 20px; color: var(--muted); flex: none; }
.palette .p-input input { flex: 1; height: 58px; border: 0; outline: 0; background: none; font-size: 17px; min-width: 0; }
.palette .p-results { max-height: min(60vh, 520px); overflow-y: auto; padding: 8px; }
.palette .p-foot { display: flex; gap: 16px; padding: 10px 18px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); flex-wrap: wrap; }
.palette .suggest { position: static; display: block; box-shadow: none; border: 0; padding: 0; max-height: none; }
dialog.dlg-palette { margin-top: 0; }

/* ── Footer ───────────────────────────────────────────────────────────── */
.site-footer { border-top: 1px solid var(--line); background: var(--bg-2); padding: 56px 0 28px; margin-top: 40px; font-size: 14px; }
.site-footer .cols { display: grid; grid-template-columns: 1.4fr repeat(4, 1fr); gap: 28px; }
.site-footer h5 { margin: 0 0 12px; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-family: var(--font-mono); font-weight: 500; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.site-footer ul a { color: var(--ink-2); }
.site-footer ul a:hover { color: var(--accent); }
.site-footer .legal { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; border-top: 1px solid var(--line); margin-top: 36px; padding-top: 20px; color: var(--muted); font-size: 12.5px; }

/* ── Charts & stat tiles ──────────────────────────────────────────────── */
.chart { position: relative; width: 100%; }
.chart svg { overflow: visible; }
.chart text { font-family: var(--font-sans); font-size: 11.5px; fill: var(--chart-text); }
.chart .gridlines line { stroke: var(--chart-grid); stroke-width: 1; shape-rendering: crispEdges; }
.chart .axis line, .chart .baseline { stroke: var(--chart-axis); stroke-width: 1; shape-rendering: crispEdges; }
.chart .crosshair { stroke: var(--chart-axis); stroke-width: 1; pointer-events: none; }
.chart .hit { fill: transparent; cursor: crosshair; }
.chart .mark { transition: opacity .15s, filter .15s; }
.chart .mark:hover, .chart .mark.active { filter: brightness(1.12) saturate(1.05); }
.chart .dimmed .mark:not(.active) { opacity: .35; }
.chart .label-tip { font-size: 12px; fill: var(--ink-2); font-variant-numeric: tabular-nums; }
.chart .label-name { font-size: 12.5px; fill: var(--ink-2); }
.chart .end-label { font-size: 12px; font-weight: 600; fill: var(--ink); }
.chart .draw { stroke-dasharray: var(--len, 2000); stroke-dashoffset: var(--len, 2000); animation: draw 1.4s cubic-bezier(.3, .7, .2, 1) forwards; }
.chart .grow { transform-box: fill-box; transform-origin: left center; animation: growX .9s cubic-bezier(.2, .8, .2, 1) both; }
.chart .grow-y { transform-box: fill-box; transform-origin: center bottom; animation: growY .9s cubic-bezier(.2, .8, .2, 1) both; }
.chart .fade { animation: fadeIn .8s ease both; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes growX { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes growY { from { transform: scaleY(0); } to { transform: scaleY(1); } }
.chart-tip { position: fixed; z-index: 95; pointer-events: none; min-width: 150px; max-width: 280px; padding: 10px 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-3); font-size: 12.5px; opacity: 0; transform: translateY(4px); transition: opacity .12s, transform .12s; }
.chart-tip.show { opacity: 1; transform: none; }
.chart-tip .t-head { color: var(--muted); font-size: 12px; margin-bottom: 6px; }
.chart-tip .t-row { display: grid; grid-template-columns: 14px auto 1fr; gap: 8px; align-items: center; padding: 2px 0; }
.chart-tip .t-row i { display: block; width: 12px; height: 2px; border-radius: 2px; }
.chart-tip .t-row i.box { height: 10px; border-radius: 3px; }
.chart-tip .t-row b { font-variant-numeric: tabular-nums; color: var(--ink); font-weight: 700; }
.chart-tip .t-row span { color: var(--muted); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12.5px; color: var(--ink-2); margin: 0 0 10px; padding: 0; list-style: none; }
.legend li { display: inline-flex; align-items: center; gap: 7px; }
.legend i { display: block; width: 12px; height: 12px; border-radius: 3px; }
.legend i.line { height: 2px; width: 14px; border-radius: 2px; }
details.table-view { margin-top: 10px; font-size: 13px; }
details.table-view summary { cursor: pointer; color: var(--muted); display: inline-flex; gap: 6px; align-items: center; user-select: none; }
details.table-view summary:hover { color: var(--accent); }
details.table-view .table-wrap { margin-top: 10px; max-height: 320px; overflow: auto; }
details.table-view .table th, details.table-view .table td { padding: 8px 12px; font-size: 13px; }
.stat { padding: 18px 18px 14px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.stat .s-label { font-size: 13px; color: var(--muted); font-weight: 500; }
.stat .s-value { font-size: 28px; font-weight: 700; letter-spacing: -.02em; line-height: 1.1; }
.stat .s-delta { font-size: 12.5px; font-weight: 600; display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 6px; }
.stat .s-delta .s-dn, .stat .s-delta .vs { white-space: nowrap; }
.stat .s-delta.up { color: var(--delta-up); }
.stat .s-delta.down { color: var(--delta-down); }
.stat .s-delta .vs { color: var(--muted); font-weight: 500; }
.stat .s-spark { height: 34px; margin-top: 6px; }
.stat .s-spark svg { width: 100%; height: 100%; }
.stat.hero-stat .s-value { font-size: clamp(38px, 4.2vw, 52px); }
.kpis .hero-stat { grid-column: span 2; }
#calc-kpis { grid-template-columns: 1.7fr 1fr 1fr 1fr; }
#calc-kpis .hero-stat { grid-column: auto; }
@media (max-width: 680px) { .kpis .hero-stat { grid-column: 1 / -1; } #calc-kpis { grid-template-columns: 1fr 1fr; } #calc-kpis .hero-stat { grid-column: 1 / -1; } }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; }
.filter-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 14px 0; position: sticky; top: var(--header-h); z-index: 20; background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.refetching { opacity: .5; transition: opacity .2s; }
.small-multiples { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
.sm-card { padding: 14px 14px 10px; }
.sm-card .sm-head { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.sm-card .sm-head b { font-size: 13px; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sm-card .sm-val { font-size: 18px; font-weight: 700; margin-top: 2px; }
.sm-card .sm-chart { height: 56px; margin-top: 6px; }
.segbar { display: flex; gap: 2px; height: 28px; }
.segbar .seg-part { border-radius: 4px; display: flex; align-items: center; padding: 0 8px; color: #fff; font-size: 12px; font-weight: 600; white-space: nowrap; overflow: hidden; min-width: 0; cursor: default; }
.segbar .seg-part.dark-ink { color: #0b0b0b; }
.segbar .seg-part:focus-visible { outline-offset: 1px; }

/* ── Quote builder ────────────────────────────────────────────────────── */
.quote-layout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 28px; align-items: start; padding-top: 30px; padding-bottom: 80px; }
.qstep { padding: 22px; }
.qstep + .qstep { margin-top: 18px; }
.qstep-head { display: flex; gap: 12px; align-items: center; margin-bottom: 16px; }
.qstep-head .n { width: 30px; height: 30px; border-radius: 10px; background: var(--grad); color: #fff; font-weight: 700; display: grid; place-items: center; font-size: 13px; font-family: var(--font-mono); flex: none; }
.qstep-head h3 { font-family: var(--font-sans); font-size: 17px; font-weight: 650; }
.profile-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.model-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.model-pick label { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); cursor: pointer; font-size: 13.5px; background: var(--surface); }
.model-pick label:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.model-pick input { accent-color: var(--accent); margin: 0; flex: none; }
.model-pick .prov { font-size: 11.5px; color: var(--muted); display: block; }
.quote-summary { position: sticky; top: calc(var(--header-h) + 20px); }
.quote-summary .lines { display: grid; gap: 10px; margin: 14px 0; }
.quote-summary .line { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; }
.quote-summary .line span:first-child { color: var(--ink-2); }
.quote-summary .grand { border-top: 1px solid var(--line); padding-top: 12px; font-weight: 700; font-size: 18px; }
.flag-up { display: inline-flex; gap: 4px; align-items: center; font-size: 11.5px; font-weight: 600; color: var(--warn); background: var(--warn-bg); border-radius: 999px; padding: 2px 8px; white-space: nowrap; }

/* ── Chat agent ───────────────────────────────────────────────────────── */
.agent-launch { position: fixed; right: 22px; bottom: 22px; z-index: 80; display: inline-flex; align-items: center; gap: 10px; height: 56px; padding: 0 20px 0 8px; border-radius: 999px; border: 0; cursor: pointer; color: #fff; font-weight: 650; font-size: 14.5px; background: var(--grad-strong); background-size: 180% 180%; animation: gradShift 7s ease infinite; box-shadow: 0 18px 40px -14px rgba(91, 61, 245, .85); transition: transform .2s; }
.agent-launch:hover { transform: translateY(-2px) scale(1.02); color: #fff; }
.agent-launch .orb { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .18); position: relative; }
.agent-launch .orb::after { content: ''; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .45); animation: pulse 2.4s ease-out infinite; }
.agent-launch svg { width: 20px; height: 20px; }
@keyframes pulse { 0% { transform: scale(.85); opacity: .9; } 100% { transform: scale(1.35); opacity: 0; } }
.agent-panel { position: fixed; right: 22px; bottom: 92px; z-index: 81; width: 410px; height: min(680px, calc(100vh - 120px)); display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow-3); overflow: hidden; transform-origin: bottom right; animation: agentIn .28s cubic-bezier(.2, .8, .2, 1); }
.agent-panel[hidden] { display: none; }
@keyframes agentIn { from { opacity: 0; transform: translateY(16px) scale(.96); } to { opacity: 1; transform: none; } }
.agent-head { display: flex; align-items: center; gap: 12px; padding: 14px 14px 14px 16px; border-bottom: 1px solid var(--line); background: var(--grad-soft); }
.agent-head .orb { width: 38px; height: 38px; border-radius: 12px; background: var(--grad); display: grid; place-items: center; color: #fff; flex: none; }
.agent-head .orb svg { width: 20px; height: 20px; }
.agent-head b { display: block; font-size: 15px; }
.agent-head small { color: var(--muted); font-size: 12px; display: flex; gap: 6px; align-items: center; }
.agent-head .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--good); box-shadow: 0 0 0 3px var(--good-bg); }
.agent-head .dot.offline { background: var(--warn); box-shadow: 0 0 0 3px var(--warn-bg); }
.agent-body { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 12px; scroll-behavior: smooth; }
.msg { max-width: 88%; font-size: 14px; line-height: 1.5; animation: pop .2s ease-out; }
.msg.user { align-self: flex-end; background: var(--btn-bg); color: var(--btn-ink); padding: 10px 14px; border-radius: 16px 16px 4px 16px; white-space: pre-wrap; word-wrap: break-word; }
.msg.bot { align-self: flex-start; background: var(--surface-2); border: 1px solid var(--line); padding: 12px 14px; border-radius: 16px 16px 16px 4px; }
.msg.bot p { margin: 0 0 8px; }
.msg.bot p:last-child, .msg.bot ul:last-child { margin-bottom: 0; }
.msg.bot ul { margin: 0 0 8px; padding-left: 18px; }
.msg.bot li { margin: 2px 0; }
.msg.bot a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.msg.bot code { font-family: var(--font-mono); font-size: 12.5px; background: var(--surface-3); padding: 1px 5px; border-radius: 5px; }
.msg.notice { align-self: stretch; max-width: none; font-size: 12px; color: var(--muted); background: none; border: 1px dashed var(--line-2); border-radius: 12px; padding: 10px 12px; }
.msg.error { align-self: stretch; max-width: none; background: var(--bad-bg); color: var(--bad); border-radius: 12px; padding: 10px 12px; font-size: 13px; }
.steps-line { display: flex; flex-wrap: wrap; gap: 6px; align-self: flex-start; }
.step-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--muted); padding: 4px 9px; border-radius: 999px; background: var(--surface-3); }
.step-chip svg { width: 12px; height: 12px; }
.step-chip.live svg { animation: spinIt 1s linear infinite; }
@keyframes spinIt { to { transform: rotate(360deg); } }
.typing { display: inline-flex; gap: 4px; padding: 14px 16px; align-self: flex-start; background: var(--surface-2); border: 1px solid var(--line); border-radius: 16px 16px 16px 4px; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: bounce 1.2s infinite ease-in-out; }
.typing i:nth-child(2) { animation-delay: .15s; } .typing i:nth-child(3) { animation-delay: .3s; }
@keyframes bounce { 0%, 80%, 100% { transform: translateY(0); opacity: .5; } 40% { transform: translateY(-5px); opacity: 1; } }
.mini-cards { display: grid; gap: 8px; align-self: stretch; }
.mini-card { display: flex; gap: 10px; align-items: center; padding: 8px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); transition: border-color .2s, transform .2s; }
.mini-card:hover { border-color: var(--accent); transform: translateX(2px); color: var(--ink); }
.mini-card .thumb { width: 52px; height: 36px; border-radius: 8px; overflow: hidden; flex: none; }
.mini-card .thumb svg { width: 100%; height: 100%; }
.mini-card b { font-size: 13.5px; display: block; }
.mini-card small { color: var(--muted); font-size: 12px; }
.agent-suggest { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 16px 10px; }
.agent-suggest .chip { height: 30px; font-size: 12.5px; }
.agent-input { border-top: 1px solid var(--line); padding: 10px; display: flex; gap: 8px; align-items: flex-end; }
.agent-input textarea { flex: 1; resize: none; border: 1px solid var(--line-2); border-radius: 14px; padding: 10px 12px; max-height: 120px; min-height: 44px; outline: 0; background: var(--surface); font-size: 14px; line-height: 1.4; }
.agent-input textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.agent-input .btn { height: 44px; width: 44px; padding: 0; border-radius: 14px; flex: none; }
.agent-foot { font-size: 11px; color: var(--muted); text-align: center; padding: 0 12px 10px; }

/* ── Misc page bits ───────────────────────────────────────────────────── */
.request-card { padding: 20px; display: grid; gap: 10px; }
.request-card .budget { font-weight: 700; font-size: 16px; }
.request-card .meta { display: flex; flex-wrap: wrap; gap: 12px; font-size: 13px; color: var(--muted); }
.request-card .meta span { display: inline-flex; gap: 5px; align-items: center; }
.request-card .meta svg { width: 14px; height: 14px; }
.callout { display: flex; gap: 14px; padding: 16px 18px; border-radius: var(--radius); background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent); font-size: 14px; color: var(--ink-2); }
.callout svg { width: 20px; height: 20px; color: var(--accent); flex: none; margin-top: 1px; }
.callout.warn { background: var(--warn-bg); border-color: color-mix(in srgb, var(--warn) 25%, transparent); }
.callout.warn svg { color: var(--warn); }
.prose { max-width: 72ch; color: var(--ink-2); font-size: 15.5px; }
.prose h2 { margin: 40px 0 12px; color: var(--ink); font-size: 26px; }
.prose h3 { margin: 26px 0 8px; color: var(--ink); }
.prose ul { padding-left: 20px; }
.prose li { margin: 6px 0; }
/* Account page */
.acct-wrap { display: grid; grid-template-columns: minmax(0, 560px) minmax(0, 1fr); gap: 40px; padding-top: 32px; padding-bottom: 80px; align-items: start; }
.acct-card { display: grid; gap: 18px; }
.acct-aside h2 { font-size: 18px; margin-bottom: 12px; }
.acct-aside .checklist { margin-bottom: 14px; }
.acct-tabs { margin-bottom: 4px; }
.acct-form { gap: 14px; }
.acct-google { gap: 10px; background: #fff; color: #1f1f1f; --b: #dadce0; font-weight: 600; }
.acct-google:hover { background: #f8f9fa; color: #1f1f1f; }
.acct-or { display: flex; align-items: center; gap: 12px; margin: 16px 0; color: var(--muted); font-size: 13px; }
.acct-or::before, .acct-or::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.acct-links { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 16px; }
.acct-links button { background: none; border: 0; padding: 4px 0; font: inherit; font-size: 14px; cursor: pointer; }
.acct-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.acct-head b { display: block; font-size: 17px; }
.acct-h { font-size: 17px; font-family: var(--font-sans); font-weight: 650; margin: 8px 0 0; }
.acct-seller { display: grid; gap: 8px; justify-items: start; padding-top: 6px; border-top: 1px solid var(--line); }
.acct-seller p { margin: 0; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.acct-danger { border-top: 1px solid var(--line); padding-top: 14px; }
.acct-danger summary { cursor: pointer; font-weight: 600; color: var(--bad); }
.acct-danger p { font-size: 14px; color: var(--ink-2); }
.acct-del { --b: color-mix(in srgb, var(--bad) 45%, transparent); color: var(--bad); }
@media (max-width: 860px) { .acct-wrap { grid-template-columns: 1fr; gap: 24px; } }
/* Legal drafts: highlighted items the owner must complete before publishing. */
mark.ph { background: var(--warn-bg); color: var(--ink); border-radius: 4px; padding: 0 4px; outline: 1px dashed color-mix(in srgb, var(--warn) 50%, transparent); -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.legal-meta { margin-top: 12px; font-size: 13px; color: var(--muted); }
.prose code { font-family: var(--font-mono); font-size: .9em; }
@media (max-width: 640px) {
  /* Wide reference tables become one labelled card per row on phones. */
  .table-stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .table-stack, .table-stack tbody, .table-stack tr, .table-stack td { display: block; width: 100%; }
  .table-stack tr { padding: 10px 0; border-bottom: 1px solid var(--line); }
  .table-stack tr:last-child { border-bottom: 0; }
  .table-stack td, .table-compact.table-stack td:last-child { border: 0; padding: 3px 14px; min-width: 0; font-size: 13.5px; }
  .table-stack td::before { content: attr(data-label); display: block; margin-top: 6px; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; }
  .table-stack td:first-child { font-weight: 650; color: var(--ink); font-size: 14.5px; }
  .table-stack td:first-child::before { display: none; }
  .table-stack tbody tr:hover td { background: none; }
}
.toc { position: sticky; top: calc(var(--header-h) + 24px); display: grid; gap: 4px; font-size: 14px; }
.toc a { padding: 6px 10px; border-radius: 8px; color: var(--muted); border-left: 2px solid transparent; }
.toc a:hover { color: var(--ink); background: var(--surface-3); }
.two-col { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 48px; padding-top: 40px; padding-bottom: 80px; align-items: start; }
.funnel-row { display: grid; grid-template-columns: 150px 1fr 70px; gap: 12px; align-items: center; font-size: 13px; }
.tag-list { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { font-size: 12px; padding: 3px 9px; border-radius: 8px; background: var(--surface-3); color: var(--ink-2); }
.sticky-cta { display: none; }
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s cubic-bezier(.2, .7, .3, 1), transform .7s cubic-bezier(.2, .7, .3, 1); transition-delay: calc(var(--i, 0) * 70ms); }
.reveal.in { opacity: 1; transform: none; }
[data-tilt] { transform-style: preserve-3d; will-change: transform; transition: transform .25s ease-out; }
.tilt-glare { position: absolute; inset: 0; border-radius: inherit; pointer-events: none; background: radial-gradient(circle at var(--gx, 50%) var(--gy, 50%), rgba(255, 255, 255, .22), transparent 55%); opacity: 0; transition: opacity .3s; z-index: 3; mix-blend-mode: soft-light; }
[data-tilt]:hover .tilt-glare { opacity: 1; }
canvas.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 99; }

::view-transition-old(root) { animation: 160ms ease-in both vtOut; }
::view-transition-new(root) { animation: 260ms cubic-bezier(.2, .8, .2, 1) both vtIn; }
@keyframes vtOut { to { opacity: 0; transform: translateY(-6px); } }
@keyframes vtIn { from { opacity: 0; transform: translateY(8px); } }

/* ── Responsive ───────────────────────────────────────────────────────── */
@media (max-width: 1100px) {
  .site-footer .cols { grid-template-columns: repeat(3, 1fr); }
  .nav-links .opt-hide { display: none; }
}
@media (max-width: 980px) {
  :root { --gutter: 20px; }
  .nav-links, .search-trigger kbd { display: none; }
  .menu-btn { display: inline-grid; }
  .browse { grid-template-columns: 1fr; }
  .facets { position: fixed; inset: 0; z-index: 65; max-height: none; background: var(--surface); padding: 20px; transform: translateX(-100%); transition: transform .3s cubic-bezier(.2, .8, .2, 1); visibility: hidden; }
  .facets.open { transform: none; visibility: visible; }
  .facet-toggle { display: inline-flex; }
  .mobile-only { display: flex !important; }
  .product-top, .quote-layout { grid-template-columns: 1fr; }
  .buybox, .quote-summary { position: static; }
  .g3, .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .two-col { grid-template-columns: 1fr; gap: 24px; }
  .toc { position: static; display: flex; flex-wrap: wrap; }
  .stats-strip { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 680px) {
  :root { --gutter: 16px; --header-h: 58px; }
  body { font-size: 14.5px; }
  .section { padding: 52px 0; }
  .hero { padding: 48px 0 44px; }
  .g2, .g3, .g4, .form-grid { grid-template-columns: 1fr; }
  .site-footer .cols { grid-template-columns: repeat(2, 1fr); }
  .brand .brand-sub, .hide-sm-inline { display: none; }
  .demo-bar { font-size: 12.5px; }
  .search-trigger { max-width: none; }
  .search-trigger span { font-size: 13px; }
  .header-actions .hide-sm { display: none; }
  .products.list .pcard { flex-direction: column; }
  .products.list .pcard .cover { width: auto; aspect-ratio: 16 / 9; border-right: 0; border-bottom: 1px solid var(--line); }
  .cta-band { padding: 32px 22px; border-radius: 22px; }
  .agent-launch { right: 14px; bottom: 14px; padding: 0 8px; height: 54px; }
  .agent-launch .al-text { display: none; }
  .agent-panel { right: 0; left: 0; bottom: 0; width: auto; height: min(86vh, 100%); border-radius: 22px 22px 0 0; }
  .compare-tray { max-width: calc(100vw - 24px); bottom: 80px; }
  .kv { grid-template-columns: 1fr; }
  .kv > div:nth-child(odd) { border-bottom: 0; padding-bottom: 2px; }
  .funnel-row { grid-template-columns: 110px 1fr 56px; }
  .bigsearch input { font-size: 16px; }
  .bigsearch form .btn span { display: none; }
  .stats-strip b { font-size: 22px; }
}

/* ── Motion & print ───────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
  .aurora span, .marquee-track, .glow-border::before { animation: none !important; }
  @view-transition { navigation: none; }
}
@media print {
  .site-header, .demo-bar, .site-footer, .agent-launch, .agent-panel, .compare-tray, .no-print, .aurora, .grid-bg, .neural { display: none !important; }
  body { background: #fff; color: #000; }
  .card { box-shadow: none; border-color: #ccc; }
  .quote-layout { grid-template-columns: 1fr; }
  .quote-summary { position: static; }
  a { text-decoration: none; }
}
@media (forced-colors: active) {
  .btn-primary, .btn-grad { border: 1px solid ButtonText; }
  .gradient-text { color: CanvasText; background: none; }
}

/* Grid children default to min-width:auto, which lets a wide table or control
   stretch the whole column on small screens. Let them shrink and scroll inside. */
.browse > *, .product-top > *, .quote-layout > *, .two-col > *, .grid > * { min-width: 0; }
#billing { width: auto !important; max-width: 100%; flex-wrap: wrap; }
#billing button { height: auto; min-height: 32px; padding: 6px 10px; white-space: normal; text-align: left; }
@media (max-width: 560px) { body[data-page="trends"] #kpis > :last-child:nth-child(even) { grid-column: span 2; } }
