:root {
  --bg: #ffffff;
  --bg2: #f3f6fd;
  --ink: #141b2b;
  --muted: #5b6577;
  --line: #e1e6f0;
  --brand: #1f4fd1;
  --brand2: #3f6cf0;
  --accent: #ffb547;
  --radius: 16px;
  color-scheme: light;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0; color: var(--ink); background: var(--bg);
  font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif;
}
h1, h2, h3 { line-height: 1.15; margin: 0 0 .5em; letter-spacing: -0.01em; }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.3rem); text-align: center; }
h3 { font-size: 1.08rem; }
p { margin: 0 0 1em; }
a { color: var(--brand); }
.wrap { max-width: 1120px; margin: 0 auto; padding-left: 20px; padding-right: 20px; }
.narrow { max-width: 760px; }
section { padding: 72px 0; }
.section-lead { text-align: center; color: var(--muted); max-width: 680px; margin: 0 auto 36px; font-size: 1.05rem; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 13px 22px; border-radius: 12px; font: inherit; font-weight: 650;
  border: 1px solid var(--line); background: #fff; color: var(--ink); text-decoration: none; cursor: pointer;
  transition: transform .15s, box-shadow .15s;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(31,79,209,.15); }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.small { padding: 8px 14px; font-size: .9rem; border-radius: 10px; }
.btn.big { padding: 16px 30px; font-size: 1.1rem; }

/* nav */
.nav {
  position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 20px;
  padding: 12px max(20px, calc((100vw - 1120px) / 2 + 20px));
  background: rgba(255,255,255,.85); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line);
}
.logo { display: flex; align-items: center; gap: 8px; font-weight: 750; font-size: 1.1rem; color: var(--ink); text-decoration: none; margin-right: auto; }
.nav nav { display: flex; gap: 22px; }
.nav nav a { color: var(--muted); text-decoration: none; font-size: .95rem; }
.nav nav a:hover { color: var(--ink); }
@media (max-width: 720px) { .nav nav { display: none; } }

/* hero */
.hero {
  max-width: 1120px; margin: 0 auto; padding: 64px 20px 72px;
  display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: center;
}
@media (max-width: 900px) { .hero { grid-template-columns: 1fr; padding-top: 36px; gap: 36px; } }
.pill { display: inline-block; background: #e9f0ff; color: var(--brand); font-weight: 600; font-size: .85rem; padding: 6px 12px; border-radius: 999px; margin-bottom: 18px; }
.hero h1 { font-size: clamp(2.2rem, 5vw, 3.5rem); }
.hero h1 em { font-style: normal; color: var(--brand); background: linear-gradient(transparent 62%, #ffe2ae 62%); }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 560px; }
.cta { display: flex; gap: 12px; flex-wrap: wrap; margin: 26px 0 12px; }
.fine { font-size: .85rem; color: var(--muted); }

.hero-art { display: flex; align-items: center; justify-content: center; gap: 14px; }
.photo {
  position: relative; width: 44%; aspect-ratio: 16 / 9; border-radius: 10px;
  background: radial-gradient(circle at 30% 30%, #6f7f6a, #3f4a3c); box-shadow: 0 10px 30px rgba(0,0,0,.2);
  display: flex; align-items: center; justify-content: center; flex: none;
}
.photo-card { width: 60%; aspect-ratio: 85.6 / 54; transform: perspective(300px) rotateX(18deg) rotateZ(-8deg); }
.arrow { font-size: 1.8rem; color: var(--brand); flex: none; }
.sheet {
  position: relative; width: 46%; aspect-ratio: 210 / 297; background: #fff; flex: none;
  border-radius: 4px; box-shadow: 0 14px 40px rgba(20,27,43,.18), 0 0 0 1px var(--line);
}
.sheet-card { position: absolute; top: 4.7%; left: 6.7%; width: 40.8%; aspect-ratio: 85.6 / 54; outline: 1px dashed #9aa3b5; outline-offset: 1px; }
.sheet-card.back { left: 50.4%; }
.photo-card, .sheet-card { background: #fbf6e6; border-radius: 6px; overflow: hidden; }
.sheet-card { border-radius: 3px; }
.c-band, .c-pic, .c-l1, .c-l2, .c-l3, .c-qr { position: absolute; display: block; }
.photo-card { position: relative; }
.c-band { left: 0; right: 0; top: 0; height: 18%; background: linear-gradient(90deg, #1f4fd1, #6d8ff5); }
.c-pic { left: 7%; top: 28%; width: 24%; height: 56%; background: #c8d0e6; border-radius: 2px; }
.c-l1, .c-l2, .c-l3 { left: 38%; height: 7%; border-radius: 2px; background: #5d6680; }
.c-l1 { top: 32%; width: 52%; } .c-l2 { top: 50%; width: 40%; } .c-l3 { top: 68%; width: 46%; }
.back .c-l1, .back .c-l2 { left: 8%; } .back .c-l1 { top: 30%; width: 50%; } .back .c-l2 { top: 50%; width: 42%; }
.c-qr { right: 8%; top: 22%; width: 26%; aspect-ratio: 1; background: repeating-conic-gradient(#222 0 25%, #fff 0 50%) 0 0 / 25% 25%; }
.dim { position: absolute; font-size: .65rem; color: var(--brand); font-weight: 700; white-space: nowrap; }
.dim-w { top: 24%; left: 6.7%; width: 40.8%; text-align: center; border-top: 1px solid var(--brand); padding-top: 1px; }
.dim-h { top: 4.7%; left: calc(6.7% - 1.6em); height: 18.2%; writing-mode: vertical-rl; transform: rotate(180deg); text-align: center; border-left: 1px solid var(--brand); }
.tag { position: absolute; bottom: -28px; left: 50%; transform: translateX(-50%); font-size: .75rem; color: var(--muted); white-space: nowrap; }

/* privacy */
.privacy { background: linear-gradient(180deg, #0f1d4a, #1a2f73); color: #fff; }
.privacy .section-lead { color: #c5d0f0; }
.privacy .card { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); }
.privacy .card p { color: #c5d0f0; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
@media (max-width: 900px) { .grid3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 580px) { .grid3 { grid-template-columns: 1fr; } }
.card { border-radius: var(--radius); padding: 22px; }
.card p { margin: 0; font-size: .95rem; }
.ico { font-size: 1.7rem; margin-bottom: 8px; }

/* steps */
.steps { list-style: none; padding: 0; margin: 36px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; counter-reset: s; }
@media (max-width: 800px) { .steps { grid-template-columns: 1fr; } }
.steps li { background: var(--bg2); border-radius: var(--radius); padding: 26px; position: relative; }
.steps p { color: var(--muted); margin: 0; }
.num { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--brand); color: #fff; font-weight: 750; margin-bottom: 12px; }

/* features */
.features { background: var(--bg2); }
.features h2 { margin-bottom: 36px; }
.feat { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.feat b { display: block; margin-bottom: 6px; }
.feat p { color: var(--muted); font-size: .94rem; margin: 0; }

/* ids table */
.table-wrap { max-width: 720px; margin: 0 auto; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 11px 18px; text-align: left; border-bottom: 1px solid var(--line); }
th { background: var(--bg2); font-size: .85rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
td:last-child, th:last-child { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
tr:last-child td { border-bottom: none; }

/* faq */
.faq { background: var(--bg2); }
.faq h2 { margin-bottom: 28px; }
details { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 4px 18px; margin-bottom: 12px; }
summary { cursor: pointer; font-weight: 650; padding: 12px 0; list-style-position: outside; }
details p { color: var(--muted); }

/* final */
.final { text-align: center; padding: 80px 20px; }
.final p { color: var(--muted); font-size: 1.1rem; }

.foot { text-align: center; color: var(--muted); font-size: .85rem; padding: 26px 20px 40px; border-top: 1px solid var(--line); }
.foot p { margin: 4px 0; }

/* Dark theme: chosen explicitly, or "system" resolved by js/theme.js */
html[data-theme="dark"] { --bg: #0d1118; --bg2: #141a24; --ink: #e8ecf4; --muted: #9aa4b6; --line: #252d3b; --brand: #5b85ff; color-scheme: dark; }
html[data-theme="dark"] .nav { background: rgba(13,17,24,.85); }
html[data-theme="dark"] .btn { background: #182030; color: var(--ink); }
html[data-theme="dark"] .btn.primary { background: var(--brand); color: #fff; }
html[data-theme="dark"] .pill { background: #182446; }
html[data-theme="dark"] .feat, html[data-theme="dark"] details { background: #111723; }
html[data-theme="dark"] .hero h1 em { background: linear-gradient(transparent 62%, #5a4316 62%); }
html[data-theme="dark"] .privacy { background: linear-gradient(180deg, #0a1433, #13235a); }
/* Fallback before/without JavaScript */
@media (prefers-color-scheme: dark) {
  html:not([data-theme]) { --bg: #0d1118; --bg2: #141a24; --ink: #e8ecf4; --muted: #9aa4b6; --line: #252d3b; --brand: #5b85ff; color-scheme: dark; }
  html:not([data-theme]) .nav { background: rgba(13,17,24,.85); }
  html:not([data-theme]) .btn { background: #182030; color: var(--ink); }
  html:not([data-theme]) .btn.primary { background: var(--brand); color: #fff; }
  html:not([data-theme]) .pill { background: #182446; }
  html:not([data-theme]) .feat, html:not([data-theme]) details { background: #111723; }
  html:not([data-theme]) .hero h1 em { background: linear-gradient(transparent 62%, #5a4316 62%); }
  html:not([data-theme]) .privacy { background: linear-gradient(180deg, #0a1433, #13235a); }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .btn { transition: none; } }

/* theme switcher */
.theme-btn { min-width: 40px; }
.theme-btn .t-ico { font-size: 1rem; line-height: 1; }
.theme-btn .t-lab { display: none; }
