:root {
  color-scheme: light dark;
  --bg: #f7f6f2;
  --surface: #ffffff;
  --ink: #1c2430;
  --muted: #5b6672;
  --line: #e3e1da;
  --accent: #1f5f4a;
  --accent-ink: #ffffff;
  --accent-soft: #e4f0eb;
  --warn: #a4552c;
  --warn-soft: #f8e9e1;
  --ok: #2c7a4b;
  --ok-soft: #e3f2e8;
  --neutral-soft: #eef0f2;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(20,30,40,.06), 0 4px 16px rgba(20,30,40,.05);
  --field: #ffffff;
  --banner: #2a2f36;
  --banner-ink: #d8dce2;
  --pending-soft: #fff3d6;
  --pending-ink: #8a6300;
  --btn-hover: #17493a;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #15191d; --surface: #1d2329; --ink: #e6e9ec; --muted: #9aa5ae; --line: #2e363e;
  --accent: #6fbf9a; --accent-ink: #0f1a15; --accent-soft: #1e332a;
  --warn: #e0a06a; --warn-soft: #3a2a1c; --ok: #7cc99a; --ok-soft: #1c3226; --neutral-soft: #262d34;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 4px 16px rgba(0,0,0,.25);
  --field: #12161a; --banner: #0f1316; --banner-ink: #b8c1c9; --pending-soft: #3a3012; --pending-ink: #e6c25a; --btn-hover: #8ad1ad; } }
:root[data-theme="dark"] {
  --bg: #15191d; --surface: #1d2329; --ink: #e6e9ec; --muted: #9aa5ae; --line: #2e363e;
  --accent: #6fbf9a; --accent-ink: #0f1a15; --accent-soft: #1e332a;
  --warn: #e0a06a; --warn-soft: #3a2a1c; --ok: #7cc99a; --ok-soft: #1c3226; --neutral-soft: #262d34;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 4px 16px rgba(0,0,0,.25);
  --field: #12161a; --banner: #0f1316; --banner-ink: #b8c1c9; --pending-soft: #3a3012; --pending-ink: #e6c25a; --btn-hover: #8ad1ad; }
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { font-family: Inter, system-ui, -apple-system, Segoe UI, sans-serif; background: var(--bg); color: var(--ink); line-height: 1.5; font-size: 16px; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0 0 .4em; line-height: 1.2; font-weight: 600; }
h1 { font-size: 2rem; }
h2 { font-size: 1.4rem; }
h3 { font-size: 1.1rem; }
p { margin: 0 0 1em; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }

.access-banner { background: var(--banner); color: var(--banner-ink); font-size: .8rem; text-align: center; padding: 6px 12px; line-height: 1.4; }
.linkbtn { background: none; border: none; color: #9fd3bd; cursor: pointer; font: inherit; text-decoration: underline; padding: 0; margin-left: 6px; }
.demo-panel { background: var(--banner); color: var(--banner-ink); border-top: 1px solid var(--line); padding: 10px 20px; font-size: .85rem; }
.demo-panel .demo-row { display: flex; gap: 8px; flex-wrap: wrap; margin: 6px 0; }
.demo-panel button { background: #fff; color: #222; border: none; padding: 6px 10px; border-radius: 6px; cursor: pointer; font: inherit; font-size: .8rem; }
.demo-panel button.active { background: #9fd3bd; }

.site-header { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 60px; gap: 16px; }
.brand { font-weight: 700; color: var(--ink); font-size: 1.05rem; display: flex; align-items: center; gap: 8px; }
.brand-mark { width: 22px; height: 22px; color: var(--accent); flex-shrink: 0; }
.brand img.brand-mark { object-fit: contain; }
.nav { display: flex; align-items: center; gap: 18px; font-size: .92rem; }
.nav a { color: var(--ink); }
.nav-account { color: var(--muted) !important; }
@media (max-width: 720px) { .nav a:not(.btn):not(.nav-account) { display: none; } }

.btn { display: inline-block; padding: 10px 16px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-weight: 500; cursor: pointer; font: inherit; text-decoration: none !important; }
.btn:hover { border-color: #c9c6bd; }
.btn-primary { background: var(--accent); color: var(--accent-ink) !important; border-color: var(--accent); }
.btn-primary:hover { background: var(--btn-hover); }
.btn-sm { padding: 7px 12px; font-size: .875rem; }
.btn-block { display: block; width: 100%; text-align: center; }

.hero { padding: 64px 0 40px; text-align: center; }
.hero h1 { font-size: 2.6rem; max-width: 720px; margin: 0 auto .5em; }
.hero p.lead { font-size: 1.15rem; color: var(--muted); max-width: 640px; margin: 0 auto 1.6em; }
.search-box { display: flex; max-width: 640px; margin: 0 auto; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); overflow: hidden; }
.search-box input { flex: 1; border: none; padding: 16px 18px; font: inherit; font-size: 1.05rem; outline: none; background: var(--surface); color: var(--ink); min-width: 0; }
.search-box button { border: none; background: var(--accent); color: var(--accent-ink); padding: 0 22px; font: inherit; font-weight: 600; cursor: pointer; }
.search-hint { margin-top: 10px; font-size: .875rem; color: var(--muted); }
.search-hint a { margin: 0 6px; }

.stats-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 40px 0; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; }
.stat .num { font-size: 1.8rem; font-weight: 700; }
.stat .lbl { color: var(--muted); font-size: .9rem; }
@media (max-width: 720px) { .stats-row { grid-template-columns: 1fr; } .hero h1 { font-size: 2rem; } }

.how { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin: 20px 0 50px; }
.how .step { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.how .step .n { display: inline-block; width: 28px; height: 28px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-weight: 700; text-align: center; line-height: 28px; margin-bottom: 10px; }
@media (max-width: 720px) { .how { grid-template-columns: 1fr; } }

.page { padding: 32px 0 60px; }
.page-head { margin-bottom: 24px; }
.card input[type=text][data-nom] { padding: 8px 10px; }
.crumbs { font-size: .85rem; color: var(--muted); margin-bottom: 8px; }
.grid-2 { display: grid; grid-template-columns: 2fr 1fr; gap: 24px; }
@media (max-width: 820px) { .grid-2 { grid-template-columns: 1fr; } }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; margin-bottom: 18px; }
.card h3 { margin-bottom: 12px; }

.result { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.result:last-child { border-bottom: none; }
.result .addr { font-weight: 600; font-size: 1.05rem; }
.result .meta { color: var(--muted); font-size: .875rem; }
.result .score { text-align: right; min-width: 90px; }
.score .big { font-size: 1.5rem; font-weight: 700; }
.score .cnt { font-size: .8rem; color: var(--muted); }

.rating-bars { display: grid; gap: 8px; }
.rating-bar { display: grid; grid-template-columns: 150px 1fr 40px; align-items: center; gap: 10px; font-size: .9rem; }
.bar { height: 8px; background: var(--neutral-soft); border-radius: 4px; overflow: hidden; }
.bar > span { display: block; height: 100%; background: var(--accent); }

.disc-list { display: grid; gap: 8px; }
.disc { display: flex; justify-content: space-between; align-items: center; font-size: .9rem; padding: 8px 10px; border-radius: 6px; background: var(--neutral-soft); }
.disc.flag { background: var(--warn-soft); }
.disc.good { background: var(--ok-soft); }
.disc .frac { font-weight: 600; white-space: nowrap; }

.tag { display: inline-block; font-size: .75rem; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--neutral-soft); color: var(--muted); }
.tag.verified { background: var(--ok-soft); color: var(--ok); }
.tag.pending { background: var(--pending-soft); color: var(--pending-ink); }
.tag.unverified { background: var(--neutral-soft); color: var(--muted); }

.review { padding: 18px 0; border-bottom: 1px solid var(--line); }
.review:last-child { border-bottom: none; }
.review-head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 6px; }
.review-head .who { font-weight: 600; }
.review-head .when { color: var(--muted); font-size: .875rem; }
.review .stars { color: var(--accent); font-weight: 700; margin-right: 6px; }
.review .body { margin: 8px 0 0; }
.review .flags { margin-top: 8px; display: flex; gap: 6px; flex-wrap: wrap; }
.review .flags .tag { background: var(--warn-soft); color: var(--warn); }
.review .flags .tag.pos { background: var(--ok-soft); color: var(--ok); }

.gated { position: relative; }
.gated .body { filter: blur(6px); user-select: none; pointer-events: none; }
.gate-overlay .btn { margin: 4px; }
.gate-overlay { background: linear-gradient(180deg, color-mix(in srgb, var(--surface) 60%, transparent), var(--surface) 60%); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; text-align: center; margin-top: -60px; position: relative; }
.gate-overlay h3 { margin-bottom: 6px; }
.gate-overlay p { color: var(--muted); max-width: 480px; margin: 0 auto 16px; }

.notice { border-left: 3px solid var(--accent); background: var(--accent-soft); padding: 12px 16px; border-radius: 6px; margin-bottom: 18px; font-size: .95rem; }
.notice.warn { border-color: var(--warn); background: var(--warn-soft); }

.card label { display: block; font-weight: 500; margin: 14px 0 6px; font-size: .95rem; }
.card input[type=text], .card input[type=number], .card input[type=email], .card select, .card textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; font: inherit; background: var(--field); color: var(--ink); }
.card textarea { min-height: 140px; }
.rating-input { display: flex; gap: 6px; }
.rating-input button { width: 40px; height: 40px; border-radius: 8px; border: 1px solid var(--line); background: var(--field); color: var(--ink); cursor: pointer; font: inherit; font-weight: 600; }
.rating-input button.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.disc-input { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: .95rem; }
@media (max-width: 720px) { .disc-input { grid-template-columns: 1fr; } }
.seg { flex-wrap: wrap; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.seg button { border: none; background: var(--field); color: var(--ink); padding: 6px 12px; cursor: pointer; font: inherit; font-size: .85rem; border-right: 1px solid var(--line); }
.seg button:last-child { border-right: none; }
.seg button.on { background: var(--ink); color: var(--bg); }
.steps { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 20px; font-size: .85rem; }
.steps span { padding: 4px 10px; border-radius: 999px; background: var(--neutral-soft); color: var(--muted); }
.steps span.on { background: var(--accent); color: var(--accent-ink); }
.form-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 22px; }

.ledger { width: 100%; border-collapse: collapse; font-size: .9rem; }
.ledger th, .ledger td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); }
.ledger th { color: var(--muted); font-weight: 500; }
.ledger td.num, .ledger th.num { text-align: right; }

.portfolio .result .addr { font-size: 1rem; }
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { display: flex; gap: 12px; padding: 8px 0; align-items: flex-start; }
.timeline .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--line); margin-top: 7px; flex-shrink: 0; }
.timeline li.done .dot { background: var(--ok); }
.timeline li.now .dot { background: var(--accent); }

.site-footer { border-top: 1px solid var(--line); background: var(--surface); margin-top: 40px; }
.footer-inner { display: grid; grid-template-columns: 2fr 1fr; gap: 30px; padding: 30px 20px; font-size: .875rem; color: var(--muted); }
.footer-links { display: grid; gap: 6px; align-content: start; }
@media (max-width: 720px) { .footer-inner { grid-template-columns: 1fr; } }

.upload { border: 2px dashed var(--line); border-radius: var(--radius); padding: 30px; text-align: center; color: var(--muted); cursor: pointer; }
.upload:hover { border-color: var(--accent); }
.method { display: block; border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; margin-bottom: 8px; cursor: pointer; }
.method.on { border-color: var(--accent); background: var(--accent-soft); }
.method strong { display: block; }
.method span { font-size: .875rem; color: var(--muted); }

/* early access capture */
.access { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin: 0 0 30px; }
@media (max-width: 720px) { .access { grid-template-columns: 1fr; } }
.access .card { margin: 0; }
.access form { display: grid; gap: 8px; margin-top: 10px; }
.access input[type=email], .access input[type=text], .access select { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; font: inherit; background: var(--field); color: var(--ink); }
.access .ok { color: var(--ok); font-weight: 500; }
.access .err { color: var(--warn); }
.guide h3 { margin-top: 22px; }
.guide h3:first-child { margin-top: 0; }
.guide table { width: 100%; border-collapse: collapse; font-size: .9rem; margin: 8px 0 12px; }
.guide th, .guide td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
.guide th { color: var(--muted); font-weight: 500; }
.toc { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.toc a { font-size: .85rem; padding: 4px 10px; border-radius: 999px; background: var(--neutral-soft); color: var(--ink); text-decoration: none; }
[id] { scroll-margin-top: 72px; }
@media (max-width: 720px) { .disc { min-width: 0; } .disc .frac { white-space: normal; text-align: right; } }
