:root {
  --bg: #f7f8fb;
  --surface: #ffffff;
  --surface-2: #eef2f7;
  --text: #0f1b2d;
  --muted: #5a6b82;
  --border: #dbe2ec;
  --accent: #0e8a7e;
  --accent-strong: #0a6b62;
  --accent-soft: #e0f3f0;
  --navy: #10233f;
  --warn: #b25e09;
  --warn-soft: #fff3e3;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(16, 35, 63, .06), 0 8px 24px rgba(16, 35, 63, .06);
  --maxw: 1080px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1320;
    --surface: #121d2e;
    --surface-2: #182638;
    --text: #e7edf5;
    --muted: #9aabc2;
    --border: #243449;
    --accent: #2cc2b1;
    --accent-strong: #5ad6c8;
    --accent-soft: #123a3a;
    --navy: #e7edf5;
    --warn: #f0a55a;
    --warn-soft: #2e2213;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
a { color: var(--accent-strong); }
img { max-width: 100%; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -.01em; margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 5vw, 3.1rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 16px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 60px; gap: 16px; }
.logo { font-weight: 800; font-size: 1.15rem; color: var(--text); text-decoration: none; display: flex; align-items: center; gap: 8px; }
.logo span { color: var(--accent); }
.logo svg { width: 26px; height: 26px; }
.nav { display: flex; gap: 20px; }
.nav a { color: var(--muted); text-decoration: none; font-weight: 500; font-size: .95rem; white-space: nowrap; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--text); }
@media (max-width: 560px) { .nav { gap: 16px; } .nav .hide-sm { display: none; } .logo { font-size: 1.05rem; } }

/* Hero */
.hero { padding: 64px 0 40px; text-align: center; }
.hero p.lede { font-size: 1.15rem; color: var(--muted); max-width: 640px; margin: 0 auto 28px; }
.eyebrow { display: inline-block; font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-strong); background: var(--accent-soft); padding: 4px 12px; border-radius: 99px; margin-bottom: 16px; }
.pills { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 22px; margin-top: 22px; color: var(--muted); font-size: .92rem; }
.pills span::before { content: "✓ "; color: var(--accent); font-weight: 700; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 22px; border-radius: 10px; font-weight: 600; font-size: 1rem; border: 1px solid transparent; cursor: pointer; text-decoration: none; transition: background .15s, transform .05s; font-family: inherit; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-strong); }
@media (prefers-color-scheme: dark) { .btn-primary { color: #06201d; } }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn-ghost:hover { background: var(--surface-2); }

/* Cards / sections */
section { padding: 48px 0; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; }
.grid { display: grid; gap: 18px; }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.section-head { text-align: center; max-width: 680px; margin: 0 auto 32px; }
.section-head p { color: var(--muted); }
.muted { color: var(--muted); }
.small { font-size: .88rem; }

/* Dropzone */
.dropzone {
  border: 2px dashed var(--border); border-radius: var(--radius); background: var(--surface);
  padding: 40px 20px; text-align: center; cursor: pointer; transition: border-color .15s, background .15s;
  max-width: 720px; margin: 0 auto;
}
.dropzone:hover, .dropzone.drag { border-color: var(--accent); background: var(--accent-soft); }
.dropzone .icon { font-size: 2.2rem; }
.dropzone strong { display: block; font-size: 1.1rem; margin: 6px 0; }
.dropzone input { display: none; }
.lock-note { display: flex; gap: 10px; align-items: flex-start; max-width: 720px; margin: 14px auto 0; font-size: .9rem; color: var(--muted); }
.lock-note b { color: var(--text); }

.status { max-width: 720px; margin: 18px auto 0; text-align: center; color: var(--muted); min-height: 1.6em; }
.status.error { color: var(--warn); }
.progress { height: 6px; background: var(--surface-2); border-radius: 99px; overflow: hidden; max-width: 420px; margin: 10px auto 0; }
.progress > div { height: 100%; width: 0; background: var(--accent); transition: width .2s; }

/* Results */
#results { display: none; }
#results.show { display: block; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; margin-bottom: 28px; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 16px; }
.stat .v { font-size: 1.6rem; font-weight: 700; }
.stat .k { font-size: .82rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }

.trait { display: flex; flex-direction: column; gap: 8px; }
.trait .top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.trait .emoji { font-size: 1.6rem; }
.trait .gt { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .85rem; background: var(--surface-2); padding: 2px 8px; border-radius: 6px; color: var(--muted); }
.trait .result { font-weight: 600; font-size: 1.05rem; }
.trait .meta { font-size: .8rem; color: var(--muted); }
.trait.missing { opacity: .6; }

.chrom-bars { display: grid; grid-template-columns: repeat(auto-fill, minmax(34px, 1fr)); gap: 6px; align-items: end; height: 150px; margin-top: 10px; }
.chrom-bars .bar { display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; font-size: .7rem; color: var(--muted); }
.chrom-bars .bar i { display: block; width: 100%; background: var(--accent); border-radius: 4px 4px 0 0; min-height: 2px; }

.upsell { background: linear-gradient(135deg, var(--navy), #1b4b6b); color: #fff; border: none; }
@media (prefers-color-scheme: dark) { .upsell { background: linear-gradient(135deg, #133049, #0f4a52); } }
.upsell .muted { color: rgba(255,255,255,.75); }
.upsell ul { padding-left: 1.2em; margin: 0 0 1.2em; }
.price { font-size: 2rem; font-weight: 800; }

.disclaimer { background: var(--warn-soft); border: 1px solid color-mix(in srgb, var(--warn) 35%, transparent); color: var(--text); border-radius: 12px; padding: 14px 16px; font-size: .88rem; }

/* Steps */
.step-num { width: 34px; height: 34px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-strong); font-weight: 800; display: grid; place-items: center; margin-bottom: 10px; }

/* Comparison table */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
table.compare { width: 100%; border-collapse: collapse; min-width: 760px; font-size: .92rem; }
table.compare th, table.compare td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: top; }
table.compare thead th { background: var(--surface-2); font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); position: sticky; top: 0; cursor: pointer; white-space: nowrap; }
table.compare tbody tr:last-child td { border-bottom: none; }
table.compare td.name { font-weight: 700; white-space: nowrap; }
.yes { color: var(--accent-strong); font-weight: 700; }
.no { color: var(--muted); }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.chip { border: 1px solid var(--border); background: var(--surface); color: var(--text); padding: 6px 14px; border-radius: 99px; cursor: pointer; font: inherit; font-size: .88rem; }
.chip.on { background: var(--accent); border-color: var(--accent); color: #fff; }

/* Quiz */
.quiz { max-width: 720px; margin: 0 auto; }
.quiz .q { font-size: 1.2rem; font-weight: 700; margin-bottom: 14px; }
.quiz .opts { display: grid; gap: 10px; }
.quiz .opt { text-align: left; padding: 14px 16px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font: inherit; cursor: pointer; }
.quiz .opt:hover { border-color: var(--accent); background: var(--accent-soft); }
.quiz .bar { height: 6px; background: var(--surface-2); border-radius: 99px; margin-bottom: 20px; overflow: hidden; }
.quiz .bar div { height: 100%; background: var(--accent); transition: width .2s; }
.rec { border-left: 4px solid var(--accent); }
.rec + .rec { margin-top: 12px; }

/* FAQ */
details { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 14px 18px; }
details + details { margin-top: 10px; }
summary { font-weight: 600; cursor: pointer; }
details p { margin: 10px 0 0; color: var(--muted); }

/* Footer */
.site-footer { border-top: 1px solid var(--border); padding: 32px 0; color: var(--muted); font-size: .88rem; margin-top: 32px; }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; }
.site-footer a { color: var(--muted); }

.prose { max-width: 760px; }
.prose h2 { margin-top: 1.6em; font-size: 1.4rem; }

/* Articles */
.article { max-width: 720px; margin: 0 auto; padding: 40px 16px 24px; }
.article h1 { font-size: clamp(1.9rem, 4.5vw, 2.6rem); margin-bottom: .4em; }
.article .byline { color: var(--muted); font-size: .9rem; margin-bottom: 1.6em; }
.article h2 { font-size: 1.45rem; margin-top: 1.8em; }
.article h3 { margin-top: 1.4em; }
.article p, .article li { font-size: 1.05rem; }
.article ul, .article ol { padding-left: 1.3em; margin: 0 0 1.1em; }
.article li + li { margin-top: .35em; }
.article .lede { font-size: 1.2rem; color: var(--muted); }
.article table { width: 100%; border-collapse: collapse; margin: 1em 0 1.4em; font-size: .95rem; }
.article th, .article td { border-bottom: 1px solid var(--border); padding: 10px 8px; text-align: left; vertical-align: top; }
.article th { color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; }
.article .table-scroll { overflow-x: auto; }
.cta { background: var(--accent-soft); border-radius: var(--radius); padding: 20px 22px; margin: 1.8em 0; }
.cta p { margin: 0 0 12px; font-weight: 600; }
.verdict { border-left: 4px solid var(--accent); background: var(--surface); padding: 14px 18px; border-radius: 0 12px 12px 0; margin: 1.2em 0; }
.guide-list { display: grid; gap: 16px; }
.guide-list a.card { display: block; text-decoration: none; color: var(--text); transition: border-color .15s; }
.guide-list a.card:hover { border-color: var(--accent); }
.guide-list .tag { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--accent-strong); }
.guide-list h2 { font-size: 1.25rem; margin: 6px 0; }
