:root {
    color-scheme: light dark;
    --bg: #f6f5f2;
    --bg-elevated: #ffffff;
    --bg-muted: #eeece7;
    --text: #1c1c1e;
    --text-secondary: #3f3f46;
    --text-muted: #52525b;
    --line: #e4e1da;
    --line-strong: #d4d0c8;
    --accent-query: #0f766e;
    --accent-query-soft: #e7f4f2;
    --accent-studio: #3730a3;
    --accent-studio-soft: #eef0fb;
    --status-good: #157a45;
    --status-warn: #9a6700;
    --status-crit: #b42318;
    --shadow: 0 18px 50px -28px rgba(28, 28, 30, 0.35);
    --header-h: 68px;
    --radius: 18px;
    --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, sans-serif;
    --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    --max: 1120px;
    --focus: #3730a3;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #121418;
        --bg-elevated: #1c1e24;
        --bg-muted: #181a20;
        --text: #f4f3ef;
        --text-secondary: #d4d2cb;
        --text-muted: #b7b5ad;
        --line: #2e3138;
        --line-strong: #3a3e47;
        --accent-query: #5eead4;
        --accent-query-soft: #143532;
        --accent-studio: #c7d2fe;
        --accent-studio-soft: #1e1b38;
        --status-good: #86efac;
        --status-warn: #fcd34d;
        --status-crit: #fca5a5;
        --shadow: 0 18px 50px -28px rgba(0, 0, 0, 0.7);
        --focus: #c7d2fe;
    }
}

*, *::before, *::after { box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--header-h) + 12px);
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    font-size: 17px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

body.nav-open { overflow: hidden; }

img, svg, video { max-width: 100%; height: auto; display: block; }

a { color: var(--accent-studio); }
a:hover { text-decoration-thickness: 2px; }

:focus { outline: none; }
:focus-visible {
    outline: 2px solid var(--focus);
    outline-offset: 3px;
}

.skip-link {
    position: absolute;
    left: 16px;
    top: -48px;
    z-index: 20;
    background: var(--bg-elevated);
    color: var(--text);
    padding: 8px 12px;
    border-radius: 8px;
}
.skip-link:focus { top: 12px; }

.container {
    width: min(var(--max), calc(100% - 32px));
    margin-inline: auto;
}
.narrow { width: min(760px, calc(100% - 32px)); }

.site-header {
    position: sticky;
    top: 0;
    z-index: 10;
    height: var(--header-h);
    background: color-mix(in srgb, var(--bg) 88%, transparent);
    backdrop-filter: saturate(1.2) blur(16px);
    border-bottom: 1px solid var(--line);
}

.header-bar, .footer-bar {
    display: flex;
    align-items: center;
    gap: 20px;
    height: 100%;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
    text-decoration: none;
    font-weight: 650;
    letter-spacing: -0.02em;
}
.brand-mark {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: grid;
    place-items: center;
    background: var(--accent-studio);
    color: #fff;
    font-size: 14px;
}
@media (prefers-color-scheme: dark) {
    .brand-mark { color: #1c1c1e; }
}

.nav-desktop {
    display: flex;
    gap: 18px;
    margin-left: auto;
}
.nav-desktop a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 15px;
}
.nav-desktop a:hover,
.nav-desktop a[aria-current="page"] { color: var(--text); }

.header-actions { display: flex; align-items: center; gap: 8px; }
.nav-desktop + .header-actions { margin-left: 8px; }
.nav-desktop { margin-left: auto; }

.nav-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--bg-elevated);
    padding: 0;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
}
.nav-toggle-bar {
    display: block;
    width: 16px;
    height: 1.5px;
    background: var(--text);
}

.mobile-nav[hidden],
.mobile-nav-backdrop[hidden] { display: none; }

.mobile-nav-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    z-index: 11;
}
.mobile-nav {
    position: fixed;
    z-index: 12;
    top: 12px;
    right: 12px;
    left: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 18px;
    background: var(--bg-elevated);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.mobile-nav a {
    color: var(--text);
    text-decoration: none;
    padding: 10px 8px;
    border-radius: 10px;
}
.mobile-nav a.btn { text-align: center; margin-top: 8px; }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 16px;
    border-radius: 999px;
    border: 1px solid transparent;
    font: inherit;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
}
.btn-primary { background: var(--text); color: var(--bg); }
.btn-primary:hover { filter: brightness(1.08); }
.btn-secondary {
    background: transparent;
    color: var(--text);
    border-color: var(--line-strong);
}
.btn:disabled { opacity: 0.55; cursor: progress; }

.hero, .section, .page-intro {
    padding-block: clamp(72px, 10vw, 160px);
}
.page-intro { padding-bottom: 0; }
.hero { padding-top: clamp(48px, 8vw, 96px); }

.hero-grid, .split {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 48px;
    align-items: center;
}
.split-reverse > :first-child { order: 2; }

h1, h2, h3 { line-height: 1.12; letter-spacing: -0.03em; font-weight: 700; }
h1 {
    margin: 16px 0 12px;
    font-size: clamp(36px, 5vw, 68px);
}
h2 { margin: 0 0 16px; font-size: clamp(30px, 4vw, 48px); }
h3 { margin: 0 0 8px; font-size: 20px; letter-spacing: -0.02em; }

.lede, .hero-copy .lede { font-size: 19px; color: var(--text-secondary); margin: 0 0 24px; }
.micro, .footnote, .fine-print, .note { color: var(--text-muted); font-size: 15px; }
.closing { margin-top: 28px; font-weight: 600; }

.pill, .kicker {
    display: inline-flex;
    margin: 0 0 8px;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 650;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}
.kicker-query { color: var(--accent-query); }
.kicker-studio { color: var(--accent-studio); }

.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 14px; }

.hero-visual, .frame {
    margin: 0;
    background: linear-gradient(180deg, var(--accent-query-soft), var(--accent-studio-soft));
    border-radius: 24px;
    padding: 12px;
}
.frame { margin-top: 36px; background: var(--bg-elevated); border: 1px solid var(--line); box-shadow: var(--shadow); }
.hero-visual img, .frame img, .sync-still img { border-radius: 16px; width: 100%; }

.scheme-dark { display: none; }
@media (prefers-color-scheme: dark) {
    .scheme-light { display: none; }
    .scheme-dark { display: block; }
}

.sync-video { display: none; width: 100%; border-radius: 16px; }
.sync-visual.has-video .sync-video { display: block; }
.sync-visual.has-video .sync-still { display: none; }

.problem-grid, .who-grid, .tiles {
    display: grid;
    gap: 16px;
}
.problem-grid { grid-template-columns: repeat(3, 1fr); margin-top: 36px; }
.who-grid, .tiles { grid-template-columns: 1fr 1fr; }
.problem-grid article, .who-grid article, .tiles article, .honest-box, .fingerprint-card {
    background: var(--bg-elevated);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 22px;
}
.problem-grid p, .who-grid p, .tiles p { margin: 0; color: var(--text-secondary); }
.icon { width: 36px; height: 36px; color: var(--accent-studio); margin-bottom: 12px; }
.quote { font-weight: 650; color: var(--text); }

.steps {
    list-style: none;
    padding: 0;
    margin: 32px 0 0;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}
.steps li {
    background: var(--bg-elevated);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 18px;
}
.steps p { margin: 0; color: var(--text-secondary); font-size: 15px; }
.step-num {
    display: inline-grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--bg-muted);
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 10px;
}

.ticks { padding-left: 18px; }
.ticks li { margin: 10px 0; color: var(--text-secondary); }
.ticks strong { color: var(--text); }

.chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0;
    margin: 24px 0;
    list-style: none;
}
.chips li {
    border: 1px solid var(--line);
    background: var(--bg-elevated);
    border-radius: 999px;
    padding: 8px 12px;
    font-size: 14px;
}

.compare-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-elevated);
    border-radius: 16px;
    overflow: hidden;
}
.compare-table th, .compare-table td {
    text-align: left;
    vertical-align: top;
    padding: 14px 16px;
    border-bottom: 1px solid var(--line);
    font-size: 15px;
}
.compare-table thead th { font-size: 13px; letter-spacing: 0.03em; text-transform: uppercase; color: var(--text-muted); }
.compare-table tbody th { font-weight: 650; width: 28%; }
.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: 16px; }

.honest-box { margin-top: 20px; }
.honest-box h3 { font-size: 18px; }
.honest-box ul { margin: 0; padding-left: 18px; color: var(--text-secondary); }
.honest-box li + li { margin-top: 8px; }

.fact-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0;
    margin: 0 0 20px;
    list-style: none;
}
.fact-row li {
    background: var(--bg-elevated);
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 8px 12px;
    font-size: 14px;
}
.text-link { font-weight: 650; }

.faq details {
    border-bottom: 1px solid var(--line);
    padding: 14px 0;
}
.faq summary {
    cursor: pointer;
    font-weight: 650;
    list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before {
    content: "+";
    display: inline-block;
    width: 1.2em;
    color: var(--text-muted);
}
.faq details[open] summary::before { content: "–"; }
.faq details p { color: var(--text-secondary); }

.waitlist-form { display: grid; gap: 14px; margin-top: 24px; }
.field { display: grid; gap: 6px; }
.field label { font-size: 14px; font-weight: 650; }
input, select {
    font: inherit;
    color: var(--text);
    background: var(--bg-elevated);
    border: 1px solid var(--line-strong);
    border-radius: 12px;
    min-height: 48px;
    padding: 0 12px;
    width: 100%;
}
.form-status { min-height: 1.4em; font-weight: 600; }
.early { background: var(--bg-muted); }

.site-footer {
    border-top: 1px solid var(--line);
    padding: 28px 0 40px;
    color: var(--text-muted);
    font-size: 14px;
}
.footer-bar { height: auto; flex-wrap: wrap; justify-content: space-between; }
.footer-bar nav { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; }
.footer-bar a { color: var(--text-secondary); }
.footer-bar p { margin: 0; }

.prose h2 { font-size: 28px; margin-top: 36px; }
.prose p { color: var(--text-secondary); }

.spec-list { padding-left: 18px; }
.spec-list li { margin: 10px 0; color: var(--text-secondary); }
.spec-list li::marker { color: var(--accent-query); }
code, .fingerprint-hash { font-family: var(--mono); font-size: 0.92em; overflow-wrap: anywhere; }
.preview-flag {
    display: inline-block;
    margin-right: 6px;
    padding: 2px 8px;
    border-radius: 999px;
    background: var(--status-warn);
    color: #1c1c1e;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.02em;
    vertical-align: 1px;
}
.fingerprint-card { padding: 0; overflow: hidden; }
.fingerprint-drop, .fingerprint-result { padding: 22px; }
.fingerprint-drop { border-bottom: 1px solid var(--line); cursor: pointer; }
.fingerprint-drop.is-dragover { background: var(--accent-query-soft); }
.fingerprint-title { font-weight: 700; margin: 0 0 6px; color: var(--text); }
.fingerprint-hash {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    margin: 12px 0 0;
    color: var(--text);
}
.status-pill[data-state="done"] { color: var(--status-good); font-weight: 700; }
.status-pill[data-state="error"] { color: var(--status-crit); font-weight: 700; }

mark.tbd {
    background: #fde68a;
    color: #1c1c1e;
    padding: 0 0.25em;
    border-radius: 4px;
}

@media (max-width: 1099px) {
    .nav-desktop { display: none; }
    .nav-toggle { display: inline-flex; }
    .header-actions .btn { display: none; }
}

@media (max-width: 860px) {
    .hero-grid, .split, .split-reverse, .problem-grid, .steps, .who-grid, .tiles {
        grid-template-columns: 1fr;
    }
    .split-reverse > :first-child { order: 0; }
    .hero { padding-top: 36px; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation: none !important;
        transition: none !important;
    }
    .sync-video { display: none !important; }
    .sync-still { display: block !important; }
}
