/* Shared styles for every metrickle.com page. Pages are generated by scripts/pages.ts; index.html is hand-written. */
:root {
  color-scheme: light;
  --bg: #f9f9f7;
  --surface: #fcfcfb;
  --surface-2: #f2f1ed;
  --border: rgba(11, 11, 11, 0.1);
  --border-strong: rgba(11, 11, 11, 0.18);
  --ink: #0b0b0b;
  --ink-2: #52514e;
  --ink-3: #6f6e69;
  --grid: #e1e0d9;
  --accent: #2a78d6;
  --accent-hover: #256abf;
  /* Fills behind white text: at least 4.5:1 against #fff (WCAG 1.4.3). */
  --accent-fill: #1f6fcf;
  --accent-fill-hover: #1a5fb4;
  --accent-ink: #1d5eae;
  --accent-wash: rgba(42, 120, 214, 0.1);
  /* Home hero lighting: a soft light from above and a fine dot texture, both fading out. */
  --hero-light: rgba(42, 120, 214, 0.05);
  --hero-dot: rgba(11, 11, 11, 0.07);
  --good: #006300;
  --bad: #d03b3b;
  /* Red text on tinted fills: 5.2:1 on the leak-note wash. */
  --bad-ink: #b42a2a;
  /* Amber text for "watch": 5.9:1 on --surface. */
  --warn-ink: #855700;
  --s1: #2a78d6;
  --s2: #eb6834;
  --s3: #1baf7a;
  --s4: #eda100;
  --s5: #e87ba4;
  --s7: #4a3aa7;
  --code-bg: #111110;
  --code-ink: #e9e8e3;
  --shadow: 0 1px 2px rgba(11, 11, 11, 0.04), 0 12px 32px -12px rgba(11, 11, 11, 0.18);
}
/* Dark follows the OS unless the visitor picked a theme (data-theme, set by the header toggle). */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0d0d0d;
    --surface: #1a1a19;
    --surface-2: #232322;
    --border: rgba(255, 255, 255, 0.1);
    --border-strong: rgba(255, 255, 255, 0.18);
    --ink: #ffffff;
    --ink-2: #c3c2b7;
    --ink-3: #9a998f;
    --grid: #2c2c2a;
    --accent: #3987e5;
    --accent-hover: #6da7ec;
    --accent-fill: #2266c8;
    --accent-fill-hover: #1a5fb4;
    --accent-ink: #9ec5f4;
    --accent-wash: rgba(57, 135, 229, 0.16);
    --hero-light: rgba(255, 255, 255, 0.06);
    --hero-dot: rgba(255, 255, 255, 0.06);
    --good: #3fbf6a;
    --bad: #f07070;
    --bad-ink: #f07070;
    --warn-ink: #f0b43c;
    --code-bg: #161615;
    --s7: #8b7fe0;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 12px 32px -12px rgba(0, 0, 0, 0.7);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0d0d0d;
  --surface: #1a1a19;
  --surface-2: #232322;
  --border: rgba(255, 255, 255, 0.1);
  --border-strong: rgba(255, 255, 255, 0.18);
  --ink: #ffffff;
  --ink-2: #c3c2b7;
  --ink-3: #9a998f;
  --grid: #2c2c2a;
  --accent: #3987e5;
  --accent-hover: #6da7ec;
  --accent-fill: #2266c8;
  --accent-fill-hover: #1a5fb4;
  --accent-ink: #9ec5f4;
  --accent-wash: rgba(57, 135, 229, 0.16);
  --hero-light: rgba(255, 255, 255, 0.06);
  --hero-dot: rgba(255, 255, 255, 0.06);
  --good: #3fbf6a;
  --bad: #f07070;
  --bad-ink: #f07070;
  --warn-ink: #f0b43c;
  --code-bg: #161615;
  --s7: #8b7fe0;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 12px 32px -12px rgba(0, 0, 0, 0.7);
}

*, *::before, *::after { box-sizing: border-box; }
/* Keep focused elements and anchor targets clear of the sticky header (WCAG 2.4.11). */
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 76px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.6 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
img, svg { display: block; max-width: 100%; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; margin: 0; }
p { margin: 0; }
code, pre { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 640px) { .wrap { padding: 0 24px; } }
.skip { position: fixed; left: 16px; top: 12px; z-index: 100; padding: 10px 16px; border-radius: 10px; background: var(--surface); color: var(--ink); border: 2px solid var(--accent); font-weight: 600; text-decoration: none; transform: translateY(-200%); }
.skip:focus { transform: none; }
main:focus { outline: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

/* Header */
header.site { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--border); }
header.site .wrap { display: flex; align-items: center; gap: 24px; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 650; font-size: 17px; text-decoration: none; letter-spacing: -0.01em; }
.brand svg { width: 26px; height: 26px; }
nav.primary { display: none; gap: 22px; font-size: 14px; color: var(--ink-2); }
nav.primary a { text-decoration: none; }
nav.primary a:hover { color: var(--ink); }
@media (min-width: 880px) { nav.primary { display: flex; } }
.header-cta { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.signin { font-size: 14px; color: var(--ink-2); text-decoration: none; padding: 8px 10px; }
.signin:hover { color: var(--ink); }
/* 36px square keeps the target well over the 24px minimum (WCAG 2.5.8). A toggle button: pressed = dark. */
.theme-toggle { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; padding: 0; color: var(--ink-2); background: none; border: 0; border-radius: 8px; cursor: pointer; }
.theme-toggle:hover { color: var(--ink); background: var(--surface-2); }
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .sun, .theme-toggle[aria-pressed="true"] .moon { display: none; }
.theme-toggle[aria-pressed="true"] .sun { display: block; }
.theme-toggle[hidden] { display: none; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-weight: 600; font-size: 15px; text-decoration: none; border-radius: 10px; padding: 11px 18px; border: 1px solid transparent; transition: background-color .15s, border-color .15s; white-space: nowrap; }
.btn-sm { font-size: 14px; padding: 7px 13px; border-radius: 8px; }
.btn-primary { background: var(--accent-fill); color: #fff; }
.btn-primary:hover { background: var(--accent-fill-hover); }
.btn-ghost { border-color: var(--border-strong); background: var(--surface); }
.btn-ghost:hover { background: var(--surface-2); }

/* Hero: the portfolio wall. "Every app you run" shown literally, one tile per app. */
.hero { padding: 64px 0 24px; text-align: center; }
@media (min-width: 760px) { .hero { padding: 88px 0 32px; } }
.hero h1 { font-size: clamp(38px, 6.4vw, 68px); font-weight: 750; margin: 0 auto; max-width: 16ch; letter-spacing: -0.04em; line-height: 1.04; }
.hero h1 em { font-style: normal; color: var(--accent); }
.lede { font-size: clamp(17px, 2vw, 19px); color: var(--ink-2); max-width: 38em; margin: 20px auto 0; }
.hero .ctas { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 28px; }
.hero .fine { margin-top: 18px; font-size: 13px; color: var(--ink-3); }
.hero .fine + .fine { margin-top: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wall { list-style: none; padding: 0; margin: 44px auto 0; max-width: 1000px; display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); text-align: left; }
@media (min-width: 900px) { .wall { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; } }
.tile { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 12px 12px 10px; transition: transform .2s, box-shadow .2s, border-color .2s; }
@media (min-width: 640px) { .tile { padding: 14px 16px 12px; } }
.tile:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.tile-head { display: flex; align-items: center; gap: 10px; min-width: 0; }
.app-icon { flex: none; width: 26px; height: 26px; border-radius: 7px; display: grid; place-items: center; color: #fff; font-size: 12px; font-weight: 700; }
.app-name { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.platform { margin-left: auto; flex: none; font-size: 11px; font-weight: 600; color: var(--ink-3); border: 1px solid var(--border); padding: 2px 8px; border-radius: 999px; }
@media (max-width: 639px) { .platform { display: none; } }
.tile-num { display: flex; align-items: baseline; gap: 8px; margin-top: 8px; }
.tile-num b { font-size: clamp(20px, 2.4vw, 24px); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.tile-num span { font-size: 12px; font-weight: 600; }
.tile svg { width: 100%; height: 40px; margin-top: 6px; }
.tile.hot { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-wash), var(--shadow); }
.mover { position: absolute; top: -10px; right: 14px; background: var(--accent-fill); color: #fff; font-size: 11px; font-weight: 700; padding: 2px 9px; border-radius: 999px; }
.up { color: var(--good); } .down { color: var(--bad); }

/* Product view: a fuller look at the dashboard. */
.product .shot { margin: 48px auto 0; max-width: 1080px; display: grid; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow); overflow: hidden; text-align: left; }
@media (min-width: 900px) { .product .shot { grid-template-columns: 200px 1fr; } }
.shot-side { display: none; flex-direction: column; gap: 2px; padding: 16px 12px; background: var(--surface-2); border-right: 1px solid var(--border); font-size: 13px; color: var(--ink-2); }
@media (min-width: 900px) { .shot-side { display: flex; } }
.shot-side span { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 6px; }
.shot-side i { width: 8px; height: 8px; border-radius: 2px; display: block; }
.shot-side .on { background: var(--surface); color: var(--ink); font-weight: 600; }
.shot-side .muted { color: var(--ink-3); } .shot-side .gap { margin-top: 12px; }
.shot-main { padding: 16px; display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 760px) { .shot-main { padding: 20px 24px 24px; grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.shot-bar { grid-column: 1 / -1; display: flex; align-items: center; gap: 12px; font-size: 13px; color: var(--ink-3); }
.shot-bar b { font-size: 16px; color: var(--ink); }
.shot-bar .live { margin-left: auto; display: flex; align-items: center; gap: 6px; color: var(--ink-2); }
.shot-bar .live i { width: 7px; height: 7px; border-radius: 50%; background: var(--s3); box-shadow: 0 0 0 3px color-mix(in srgb, var(--s3) 25%, transparent); }
.kpis { grid-column: 1 / -1; display: grid; gap: 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 760px) { .kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.kpi { border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; background: var(--bg); display: flex; flex-direction: column; }
.kpi span { font-size: 12px; color: var(--ink-3); }
.kpi b { font-size: 22px; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.kpi em { font-style: normal; font-size: 12px; font-weight: 600; }
.panel { border: 1px solid var(--border); border-radius: 12px; padding: 14px; background: var(--bg); }
.panel.wide { grid-column: 1 / -1; }
.panel h3 { font-size: 13px; font-weight: 600; color: var(--ink-2); letter-spacing: 0; }
.panel svg { width: 100%; height: 180px; margin-top: 10px; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12px; color: var(--ink-3); margin-top: 8px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 3px; border-radius: 2px; display: block; }
.frow, .sources li { display: grid; grid-template-columns: 80px 1fr 44px; align-items: center; gap: 10px; font-size: 13px; color: var(--ink-2); margin-top: 10px; }
.frow > span:last-child, .sources li > span:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.fbar, .sbar { height: 8px; border-radius: 4px; background: var(--surface-2); overflow: hidden; }
.fbar b, .sbar b { display: block; height: 100%; border-radius: 4px; background: var(--accent); }
.sbar b { background: color-mix(in srgb, var(--accent) 55%, var(--surface-2)); }
.frow.leak { color: var(--bad); font-weight: 600; } .frow.leak b { background: var(--bad); }
.msg-meta { margin-top: 10px; font-size: 12.5px; color: var(--ink-3); }
.leak-note { margin-top: 12px; font-size: 12.5px; font-weight: 600; color: var(--bad-ink); background: color-mix(in srgb, var(--bad) 10%, transparent); padding: 6px 10px; border-radius: 8px; }
.sources { list-style: none; margin: 0; padding: 0; }

/* Sections */
section.block { padding: 72px 0; }
@media (min-width: 760px) { section.block { padding: 104px 0; } }
.section-head { max-width: 680px; }
.section-head.center { margin: 0 auto; text-align: center; }
.section-head h2 { font-size: clamp(28px, 4vw, 40px); font-weight: 700; letter-spacing: -0.03em; }
.section-head p { color: var(--ink-2); font-size: 18px; margin-top: 14px; }

.grid { display: grid; gap: 16px; margin-top: 48px; }
@media (min-width: 640px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .grid.three { grid-template-columns: repeat(3, 1fr); } }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 24px; }
.card .icon { width: 36px; height: 36px; border-radius: 9px; background: var(--accent-wash); color: var(--accent); display: grid; place-items: center; }
.card .icon svg { width: 20px; height: 20px; }
.card h3 { font-size: 18px; font-weight: 650; margin-top: 16px; letter-spacing: -0.01em; }
.card p { color: var(--ink-2); margin-top: 8px; font-size: 15px; }
.card ul { margin: 12px 0 0; padding: 0; list-style: none; font-size: 14px; color: var(--ink-2); }
.card li { padding-left: 20px; position: relative; margin-top: 6px; }
.card li::before { content: ""; position: absolute; left: 2px; top: 8px; width: 8px; height: 8px; border-radius: 50%; border: 2px solid var(--accent); }

/* Split: install */
.alt { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.split { display: grid; gap: 40px; align-items: center; }
@media (min-width: 900px) { .split { grid-template-columns: 1fr 1.1fr; gap: 64px; } }
.checks { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 12px; }
.checks li { display: flex; gap: 12px; color: var(--ink-2); }
.checks svg { flex: none; width: 20px; height: 20px; color: var(--accent); margin-top: 3px; }
.checks strong { color: var(--ink); font-weight: 600; }
.code { background: var(--code-bg); color: var(--code-ink); border-radius: 14px; overflow: hidden; border: 1px solid var(--border); box-shadow: var(--shadow); }
.code .tabs { display: flex; gap: 4px; padding: 10px 12px; border-bottom: 1px solid rgba(255,255,255,.08); font-size: 12px; }
.code .tabs span { padding: 4px 10px; border-radius: 6px; color: #9a998f; }
.code .tabs span.on { background: rgba(255,255,255,.08); color: #fff; }
.code pre { margin: 0; padding: 20px; font-size: 13px; line-height: 1.7; overflow-x: auto; }
.c-tag { color: #6da7ec; } .c-attr { color: #eda100; } .c-str { color: #1baf7a; } .c-com { color: #898781; } .c-fn { color: #e87ba4; }

/* Research, accessibility and AI mocks. The pictures are decorative; the text beside them carries the meaning. */
.split.flip { align-items: center; }
@media (min-width: 900px) { .split.flip { grid-template-columns: 1.1fr 1fr; } .split.flip > :first-child { order: 2; } }
.mock { margin: 0; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow); padding: 16px; min-width: 0; }
@media (min-width: 640px) { .mock { padding: 20px 22px; } }
.alt .mock { background: var(--bg); }
.mock-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; font-size: 13px; color: var(--ink-3); }
.mock-head b { font-size: 15px; color: var(--ink); }
.mock .kpis { margin-top: 14px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.mock .kpi { padding: 10px 12px; }
.mock .kpi b { font-size: clamp(17px, 4.6vw, 20px); white-space: nowrap; }
.mtable { width: 100%; border-collapse: collapse; margin-top: 18px; font-size: 13px; }
.mtable caption { text-align: left; font-size: 13px; font-weight: 600; color: var(--ink-2); padding-bottom: 8px; }
.mtable th, .mtable td { text-align: left; font-weight: 400; color: var(--ink-2); padding: 9px 8px 9px 0; border-top: 1px solid var(--border); vertical-align: middle; }
.mtable thead th { font-size: 12px; color: var(--ink-3); border-top: 0; padding-top: 0; }
.mtable .n { text-align: right; padding-right: 0; font-variant-numeric: tabular-nums; color: var(--ink); white-space: nowrap; }
.mtable code { font-size: 12px; color: var(--ink); background: var(--surface-2); padding: 1px 6px; border-radius: 5px; overflow-wrap: break-word; }
.mtable .el { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.mtable .n + .n { padding-left: 12px; }
.mtable .bar { width: 38%; }
.mtable .fbar { display: block; }
.mtable tr.worst th, .mtable tr.worst td { color: var(--bad); font-weight: 600; }
.mtable tr.worst .fbar b { background: var(--bad); }
.tag { display: inline-block; font-size: 11px; font-weight: 600; color: var(--ink-2); border: 1px solid var(--border-strong); padding: 1px 8px; border-radius: 999px; white-space: nowrap; }
.insight { margin-top: 14px; font-size: 13px; color: var(--ink-2); background: var(--accent-wash); border-radius: 10px; padding: 10px 12px; }
.insight strong { color: var(--ink); }
.section-cta { margin-top: 28px; }
.note { margin-top: 18px; font-size: 14px; color: var(--ink-3); }

/* Comparison tables (solutions/compare). Fixed layout so they wrap instead of scrolling on phones. */
.ctable { width: 100%; table-layout: fixed; border-collapse: separate; border-spacing: 0; margin-top: 40px; font-size: 15px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; }
.alt .ctable { background: var(--bg); }
.ctable caption { text-align: left; font-size: 14px; color: var(--ink-3); padding-bottom: 10px; }
.ctable th, .ctable td { text-align: left; vertical-align: top; padding: 14px 12px; border-top: 1px solid var(--border); color: var(--ink-2); overflow-wrap: anywhere; }
.ctable thead th { border-top: 0; font-size: 13px; font-weight: 650; color: var(--ink); }
.ctable thead th:first-child { width: 28%; }
.ctable tbody th { font-weight: 600; color: var(--ink); }
.ctable .us { background: var(--accent-wash); color: var(--ink); }
.ctable thead .us { color: var(--accent-ink); }
@media (min-width: 640px) { .ctable th, .ctable td { padding: 16px 20px; } .ctable thead th:first-child { width: 22%; } }
.their-win { margin-top: 20px; border-left: 3px solid var(--border-strong); padding: 4px 0 4px 16px; max-width: 680px; }
.their-win h3 { font-size: 16px; font-weight: 650; }
.their-win p { color: var(--ink-2); margin-top: 6px; font-size: 15px; }
.role-titles { font-size: 15px; color: var(--ink-3); }
.section-head .subhead { font-size: clamp(19px, 2.2vw, 22px); font-weight: 600; line-height: 1.35; letter-spacing: -0.01em; color: var(--ink); margin-top: 16px; padding-left: 16px; border-left: 3px solid var(--accent); }
.section-head .subhead + p { margin-top: 12px; }
.ctable + .checks { margin-top: 32px; max-width: 760px; }

.demo h3 { margin-top: 0; }
.demo-vis { border: 1px solid var(--border); background: var(--bg); border-radius: 12px; padding: 14px; margin-bottom: 20px; min-height: 184px; font-size: 12px; color: var(--ink-2); }
.demo-vis svg { width: 100%; height: 156px; }
.nps-q { font-size: 13px; font-weight: 600; color: var(--ink); }
.nps { display: grid; grid-template-columns: repeat(11, minmax(0, 1fr)); gap: 3px; margin-top: 12px; }
.nps span { text-align: center; padding: 6px 0; border: 1px solid var(--border-strong); border-radius: 5px; background: var(--surface); font-size: 11px; font-variant-numeric: tabular-nums; }
.nps span.sel { background: var(--accent-fill); border-color: var(--accent-fill); color: #fff; font-weight: 700; }
.nps-ends { display: flex; justify-content: space-between; margin-top: 6px; font-size: 11px; color: var(--ink-3); }
.nps-why { margin-top: 12px; border: 1px solid var(--border-strong); background: var(--surface); border-radius: 8px; padding: 8px 10px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.chip { border: 1px solid var(--border-strong); border-radius: 999px; padding: 3px 10px; background: var(--surface); }
.chip.on { border-color: var(--accent); background: var(--accent-wash); color: var(--accent-ink); font-weight: 600; }
.fb-shot { position: relative; margin-top: 12px; height: 62px; border: 1px dashed var(--border-strong); border-radius: 8px; background: repeating-linear-gradient(180deg, transparent 0 14px, var(--surface-2) 14px 20px); }
.fb-shot i { position: absolute; left: 38%; top: 12px; width: 34%; height: 28px; border: 2px solid var(--s2); border-radius: 6px; }
.fb-shot b { position: absolute; right: 8%; top: 20px; width: 16%; height: 12px; background: var(--ink); border-radius: 3px; }

/* Privacy stats */
.stats { display: grid; gap: 16px; margin-top: 48px; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 900px) { .stats { grid-template-columns: repeat(3, 1fr); gap: 24px; } }
.stat { border-top: 2px solid var(--accent); padding-top: 16px; }
.stat b { display: block; font-size: 28px; letter-spacing: -0.02em; }
.stat span { font-size: 14px; color: var(--ink-2); }

/* FAQ */
.faq { max-width: 760px; margin: 40px auto 0; }
.faq details { border-bottom: 1px solid var(--border); padding: 18px 0; }
.faq summary { cursor: pointer; list-style: none; font-weight: 600; font-size: 17px; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-weight: 400; font-size: 22px; line-height: 1; color: var(--ink-3); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--ink-2); margin-top: 10px; }

/* CTA */
.cta-final { text-align: center; padding: 64px 24px; border-radius: 20px; background: var(--accent-fill); color: #fff; }
.cta-final :focus-visible { outline-color: #fff; }
.cta-final h2 { font-size: clamp(28px, 4vw, 40px); font-weight: 700; letter-spacing: -0.03em; }
.cta-final p { margin: 14px auto 0; max-width: 34em; font-size: 18px; }
.cta-final .btn { margin-top: 28px; background: #fff; color: #0d366b; }
.cta-final .btn:hover { background: #f2f1ed; }

footer.site { padding: 48px 0; margin-top: 72px; border-top: 1px solid var(--border); font-size: 14px; color: var(--ink-3); }
footer.site .wrap { display: flex; flex-wrap: wrap; gap: 16px 32px; align-items: center; }
footer.site nav { display: flex; flex-wrap: wrap; gap: 20px; margin-left: auto; }
footer.site a { text-decoration: none; } footer.site a:hover { color: var(--ink); }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }

/* --- Multi-page site: menus, page heroes, breadcrumbs, prose, footer columns ----------------- */

/* Primary nav with disclosure menus. Below 880px the whole nav opens from a Menu button. */
.nav-toggle { display: inline-flex; align-items: center; gap: 6px; font: inherit; font-size: 14px; font-weight: 600; color: var(--ink); background: none; border: 1px solid var(--border-strong); border-radius: 8px; padding: 6px 10px; cursor: pointer; }
@media (min-width: 880px) { .nav-toggle { display: none; } }
nav.primary { align-items: center; }
nav.primary ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 22px; align-items: center; }
nav.primary .menu-btn { font: inherit; color: inherit; background: none; border: 0; padding: 8px 0; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; }
nav.primary .menu-btn:hover, nav.primary a[aria-current="page"] { color: var(--ink); }
nav.primary .menu-btn svg { width: 14px; height: 14px; transition: transform .15s; }
nav.primary .menu-btn[aria-expanded="true"] svg { transform: rotate(180deg); }
nav.primary li { position: relative; }
.submenu { display: none; }
.submenu.open { display: grid; }
@media (min-width: 880px) {
  .submenu { position: absolute; top: calc(100% + 8px); left: -16px; min-width: 300px; gap: 2px; padding: 8px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow); }
}
.submenu a { display: block; padding: 8px 10px; border-radius: 8px; color: var(--ink); }
.submenu a:hover { background: var(--surface-2); }
.submenu a span { display: block; font-size: 13px; color: var(--ink-2); }
.submenu a strong { font-weight: 600; font-size: 14px; }
@media (max-width: 879px) {
  nav.primary.open { display: block; position: absolute; top: 60px; left: 0; right: 0; max-height: calc(100vh - 60px); overflow-y: auto; background: var(--bg); border-bottom: 1px solid var(--border); padding: 8px 16px 20px; box-shadow: var(--shadow); }
  nav.primary.open ul { flex-direction: column; align-items: stretch; gap: 0; }
  nav.primary.open > ul > li > a, nav.primary.open .menu-btn { display: flex; width: 100%; justify-content: space-between; padding: 12px 0; font-size: 16px; border-bottom: 1px solid var(--border); }
  nav.primary.open .submenu.open { padding: 4px 0 8px; }
  header.site .wrap { position: relative; }
}

/* Breadcrumbs */
.crumbs { font-size: 13px; color: var(--ink-3); padding-top: 24px; }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; }
.crumbs li + li::before { content: "/"; margin-right: 6px; color: var(--border-strong); }
.crumbs a { text-decoration: none; } .crumbs a:hover { color: var(--ink); text-decoration: underline; }

/* Page hero (inner pages): left-aligned, with an optional visual beside it */
.page-hero { padding: 32px 0 24px; }
@media (min-width: 760px) { .page-hero { padding: 48px 0 40px; } }
.page-hero h1 { font-size: clamp(34px, 5.2vw, 56px); font-weight: 750; letter-spacing: -0.035em; line-height: 1.06; max-width: 18ch; }
.page-hero .lede { margin: 18px 0 0; }
.page-hero .ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.page-hero .split { align-items: center; }

/* Labelled sample data: every showcase is a demo and says so. */
.sample { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--ink-2); background: var(--surface-2); border: 1px solid var(--border-strong); padding: 2px 8px; border-radius: 999px; margin-left: auto; }
.mock-head .sample { align-self: center; }
.mock + .fine, .showcase-note { font-size: 13px; color: var(--ink-3); margin-top: 10px; }

/* Numbered steps: "how the showcase unfolds" */
.steps { list-style: none; counter-reset: step; padding: 0; margin: 48px 0 0; display: grid; gap: 16px; }
@media (min-width: 900px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.steps > li { counter-increment: step; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 22px 22px 22px 64px; position: relative; }
.alt .steps > li { background: var(--bg); }
.steps > li::before { content: counter(step); position: absolute; left: 20px; top: 20px; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 14px; background: var(--accent-wash); color: var(--accent-ink); }
.steps h3 { font-size: 17px; font-weight: 650; letter-spacing: -0.01em; }
.steps p { color: var(--ink-2); font-size: 15px; margin-top: 6px; }

/* Linked cards (solution/feature hubs, related pages) */
a.card { display: block; text-decoration: none; transition: border-color .15s, transform .15s, box-shadow .15s; }
a.card:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: var(--shadow); }
a.card .more { display: inline-block; margin-top: 14px; font-size: 14px; font-weight: 600; color: var(--accent-ink); }

/* Long-form trust pages */
.prose { max-width: 760px; }
.prose h2 { font-size: clamp(24px, 3vw, 30px); font-weight: 700; letter-spacing: -0.02em; margin-top: 56px; scroll-margin-top: 80px; }
.prose h3 { font-size: 19px; font-weight: 650; margin-top: 32px; }
.prose p, .prose li { color: var(--ink-2); font-size: 17px; }
.prose p { margin-top: 14px; }
.prose ul, .prose ol { margin: 14px 0 0; padding-left: 22px; }
.prose li { margin-top: 8px; }
.prose li::marker { color: var(--accent); }
.prose strong { color: var(--ink); }
.prose a { color: var(--accent-ink); text-underline-offset: 2px; }
.prose code { font-size: 14px; background: var(--surface-2); padding: 1px 6px; border-radius: 5px; color: var(--ink); }
.prose table { width: 100%; border-collapse: collapse; margin-top: 18px; font-size: 15px; }
.prose th, .prose td { text-align: left; vertical-align: top; padding: 10px 12px 10px 0; border-top: 1px solid var(--border); color: var(--ink-2); }
.prose thead th { color: var(--ink); font-weight: 600; border-top: 0; }
.prose .table-scroll { overflow-x: auto; }
.toc { border: 1px solid var(--border); border-radius: 14px; padding: 18px 22px; background: var(--surface); margin-top: 32px; }
.toc h2 { font-size: 15px; margin: 0; letter-spacing: 0; color: var(--ink-2); font-weight: 600; }
.toc ol { margin: 10px 0 0; padding-left: 20px; columns: 2 240px; }
.toc li { font-size: 15px; margin-top: 4px; }
.updated { font-size: 14px; color: var(--ink-3); margin-top: 14px; }

/* Footer with link columns */
footer.site .cols { display: grid; gap: 32px; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; }
/* --link-cols is set by footer() so the grid never leaves an empty column (e.g. while Trust is hidden). */
@media (min-width: 760px) { footer.site .cols { grid-template-columns: 1.4fr repeat(var(--link-cols, 4), minmax(0, 1fr)); } }
footer.site .cols h2 { font-size: 13px; font-weight: 600; color: var(--ink); letter-spacing: 0; margin-bottom: 10px; }
footer.site .cols ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
footer.site .about { grid-column: 1 / -1; }
@media (min-width: 760px) { footer.site .about { grid-column: auto; } }
footer.site .about p { margin-top: 12px; max-width: 28ch; }
footer.site .legal { width: 100%; border-top: 1px solid var(--border); padding-top: 20px; margin-top: 8px; display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; }
/* A closing CTA section already pads the bottom of the page; don't stack the footer margin on top of it. */
main:has(> section.block:last-child) + footer.site { margin-top: 0; }
.signin { white-space: nowrap; }
@media (max-width: 419px) { header.site .wrap { gap: 12px; } .header-cta .signin { display: none; } }
.mock .demo-vis { margin: 14px 0 0; min-height: 0; }
.page-hero + section.block:has(.prose) { padding-top: 8px; }

/* --- Pricing ------------------------------------------------------------------------------ */
.pricing { padding-top: 8px; }
/* Billing toggle: two real radios styled as a segmented control; each target is at least 40px tall. */
.billing { display: inline-flex; gap: 4px; margin: 0 0 28px; padding: 4px; border: 1px solid var(--border-strong); border-radius: 12px; background: var(--surface); }
.billing[hidden] { display: none; }
.billing label { position: relative; display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px; border-radius: 9px; font-size: 15px; font-weight: 600; color: var(--ink-2); cursor: pointer; }
.billing input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.billing label:has(input:checked) { background: var(--accent-fill); color: #fff; }
.billing label:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.billing em { font-style: normal; font-size: 12px; font-weight: 700; margin-left: 8px; padding: 2px 8px; border-radius: 999px; background: var(--accent-wash); color: var(--accent-ink); }
.billing label:has(input:checked) em { background: rgba(255, 255, 255, 0.2); color: #fff; }
.plans { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 700px) { .plans { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1040px) { .plans { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.plan { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 24px; }
.plan.popular { border: 2px solid var(--accent); padding: 23px; box-shadow: var(--shadow); }
.plan-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.plan h3 { font-size: 20px; font-weight: 700; }
.plan-flag { font-size: 12px; font-weight: 700; color: var(--accent-ink); background: var(--accent-wash); padding: 3px 10px; border-radius: 999px; }
.plan-for { color: var(--ink-2); font-size: 15px; margin-top: 4px; min-height: 2.4em; }
.price { margin-top: 18px; display: flex; align-items: baseline; gap: 2px; }
.price .amount { font-size: 40px; font-weight: 750; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.price .per { font-size: 16px; color: var(--ink-2); }
.billed { font-size: 14px; color: var(--ink-3); margin-top: 2px; min-height: 1.6em; }
.local { font-size: 13px; color: var(--ink-3); margin-top: 0; }
.plan > .btn { margin-top: 18px; white-space: normal; text-align: center; }
.plan-limits { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 12px; margin: 22px 0 0; padding: 16px 0 0; border-top: 1px solid var(--border); }
.plan-limits dt { font-size: 12px; color: var(--ink-3); }
.plan-limits dd { margin: 0; font-weight: 650; font-variant-numeric: tabular-nums; }
.plan-includes { margin-top: 20px; font-size: 14px; font-weight: 600; }
.plan-features { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 8px; font-size: 14px; color: var(--ink-2); }
.plan-features li { display: flex; gap: 10px; }
.plan-features svg { flex: none; width: 16px; height: 16px; color: var(--accent); margin-top: 3px; }
/* Wide comparison table: scrolls inside a focusable region on narrow screens, never the page. */
.table-scroll { overflow-x: auto; margin-top: 40px; border-radius: 14px; }
.table-scroll .ctable { margin-top: 0; }
.plans-table { table-layout: auto; min-width: 760px; }
.plans-table caption { padding-left: 2px; }
.plans-table td { white-space: nowrap; font-variant-numeric: tabular-nums; }
.plans-table thead th:first-child { width: auto; }

/* --- Homepage: contract verdict, case file, contracts portfolio ----------------------------- */
.muted { color: var(--ink-3); }
@media (max-width: 479px) { .hide-sm { display: none; } }
/* Verdicts always pair a glyph and a word with the color, never color alone (WCAG 1.4.1). */
.status { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 650; padding: 2px 9px; border-radius: 999px; border: 1px solid currentColor; white-space: nowrap; line-height: 1.5; }
.status.holding { color: var(--good); }
.status.watch { color: var(--warn-ink); }
.status.broken { color: var(--bad-ink); background: color-mix(in srgb, var(--bad) 10%, transparent); }
.status.silent { color: var(--ink-3); border-style: dashed; font-weight: 550; }
.mtable .n .status { font-variant-numeric: normal; }

.hero-verdict .mock.verdict { max-width: 820px; margin: 44px auto 0; text-align: left; position: relative; }
/* Home hero background (hero.js): drawn behind the copy and card, fading out on every side so it melts into the header and the next section. */
.hero-verdict { position: relative; isolation: isolate; background: radial-gradient(ellipse 55% 42% at 50% -8%, var(--hero-light), transparent 72%); }
/* A fine dot texture under the light, fading out before it reaches the edges or the card. */
.hero-verdict::before { content: ""; position: absolute; inset: 0; z-index: -2; pointer-events: none;
  background-image: radial-gradient(circle at 1px 1px, var(--hero-dot) 1px, transparent 1.5px); background-size: 24px 24px;
  -webkit-mask-image: radial-gradient(ellipse 60% 48% at 50% 0%, #000 0%, transparent 78%);
  mask-image: radial-gradient(ellipse 60% 48% at 50% 0%, #000 0%, transparent 78%); }
.hero-fx { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; display: block; pointer-events: none;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 16%, #000 80%, transparent 100%), linear-gradient(to right, transparent 0, #000 9%, #000 91%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(to bottom, transparent 0, #000 16%, #000 80%, transparent 100%), linear-gradient(to right, transparent 0, #000 9%, #000 91%, transparent 100%);
  mask-composite: intersect; }
/* Pause/Play/Replay: the story runs over 5 seconds (WCAG 2.2.2). 32px tall clears the 24px target minimum. */
.hero-motion { position: absolute; top: 14px; right: 16px; z-index: 1; display: inline-flex; align-items: center; gap: 7px; min-height: 32px; padding: 5px 12px; font-family: inherit; font-size: 13px; font-weight: 600; line-height: 1; color: var(--ink-2); background: color-mix(in srgb, var(--surface) 80%, transparent); border: 1px solid var(--border); border-radius: 999px; cursor: pointer; }
.hero-motion:hover { color: var(--ink); }
.hero-motion[hidden] { display: none; }
.hero-motion svg { width: 13px; height: 13px; }
.hero-motion .i-play, .hero-motion .i-replay, .hero-motion[data-mode="play"] .i-pause, .hero-motion[data-mode="replay"] .i-pause { display: none; }
.hero-motion[data-mode="play"] .i-play, .hero-motion[data-mode="replay"] .i-replay { display: block; }
/* Problem tabs under the card (hero.js reveals them): each swaps the card and replays the background. */
.scenarios-label { margin: 24px auto 0; font-size: 13px; color: var(--ink-3); }
/* One joined segmented bar, so it reads as a control for the card above, not a list of pills. */
.scenarios { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px; width: fit-content; max-width: 100%; margin: 10px auto 0; padding: 4px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; }
.scenarios[hidden], .scenarios-label[hidden] { display: none; }
.scenarios button { font: inherit; font-size: 14px; font-weight: 600; color: var(--ink-2); background: transparent; border: 0; border-radius: 9px; padding: 7px 14px; min-height: 36px; cursor: pointer; }
.scenarios button:hover { color: var(--ink); background: color-mix(in srgb, var(--surface) 60%, transparent); }
.scenarios button[aria-selected="true"] { color: var(--ink); background: var(--surface); box-shadow: 0 0 0 1px var(--border-strong), 0 1px 3px rgba(11, 11, 11, 0.12); }
/* Where the animation lands: the row that broke and the banner warm up, then hold. */
.verdict .verdict-banner, .verdict .mtable th, .verdict .mtable td { transition: background-color .9s ease, box-shadow .9s ease; }
.verdict.lit tr.hit > * { background: color-mix(in srgb, var(--bad) 9%, transparent); }
.verdict.lit .verdict-banner { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--bad) 45%, transparent); background: color-mix(in srgb, var(--bad) 5%, var(--surface-2)); }
@media (prefers-reduced-motion: reduce) { .verdict .verdict-banner, .verdict .mtable th, .verdict .mtable td { transition: none; } }
.verdict-banner { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 14px; padding: 12px 14px; border-radius: 12px; background: var(--surface-2); font-size: 15px; font-weight: 600; color: var(--ink); }
.verdict .mtable { margin-top: 10px; font-size: 14px; }
.verdict .mtable th[scope="row"] { color: var(--ink); }
.case-strip { margin-top: 14px; padding: 12px 14px; border-radius: 12px; border: 1px solid color-mix(in srgb, var(--bad) 40%, transparent); background: color-mix(in srgb, var(--bad) 6%, transparent); font-size: 14px; color: var(--ink-2); }
.case-strip strong { color: var(--ink); }
.case-strip code, .insight code { white-space: nowrap; font-size: 12px; color: var(--ink); background: var(--surface-2); padding: 1px 6px; border-radius: 5px; }
.hero-verdict .fine { max-width: 40em; margin-left: auto; margin-right: auto; }

@media (min-width: 640px) and (max-width: 899px) { .steps.four { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .steps.four { grid-template-columns: repeat(4, 1fr); } .steps.four > li { padding: 64px 20px 22px; } .steps.four > li::before { top: 20px; left: 20px; } }

.case-track { list-style: none; padding: 0; margin: 14px 0 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; font-size: 12px; color: var(--ink-3); }
.case-track li { border-top: 3px solid var(--grid); padding-top: 6px; }
.case-track li.done { border-color: var(--accent); color: var(--ink-2); }
.case-track li.now { border-color: var(--accent); color: var(--ink); font-weight: 650; }
.recordings { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 6px; font-size: 13px; }
.recordings li { white-space: nowrap; display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg); color: var(--ink); }
.recordings .play { flex: none; width: 22px; height: 22px; border-radius: 50%; background: var(--ink); position: relative; }
.recordings .play::after { content: ""; position: absolute; left: 8px; top: 6px; border-left: 8px solid var(--bg); border-top: 5px solid transparent; border-bottom: 5px solid transparent; }
.recordings .at { margin-left: auto; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.mock-foot { margin-top: 10px; font-size: 12.5px; color: var(--ink-3); }

.wall.contracts .tile-num b { font-size: clamp(18px, 2.2vw, 22px); }
.wall.contracts .tile-num span { font-weight: 500; color: var(--ink-3); }
.tile-line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin-top: 10px; font-size: 13px; color: var(--ink-2); }
.tile.hot { border-color: var(--bad); box-shadow: 0 0 0 3px color-mix(in srgb, var(--bad) 14%, transparent), var(--shadow); }
p.fine.center { text-align: center; margin-top: 18px; font-size: 13px; color: var(--ink-3); }
p.fine.center a { color: var(--accent-ink); }
.early-access { margin: 0 0 18px; padding: 12px 16px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface, transparent); font-size: 15px; }
