:root {
  color-scheme: light dark;
  --bg: #ffffff;
  --bg-alt: #f5f5f7;
  --card: #ffffff;
  --line: #e5e5ea;
  --text: #1d1d1f;
  --muted: #6e6e73;
  --tint: #007af2;
  --tint-soft: #e6f1fe;
  --screen: #f2f2f7;
  --bezel: #1c1c1e;
  --max: 1040px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --bg-alt: #111113;
    --card: #1c1c1e;
    --line: #2c2c2e;
    --text: #f5f5f7;
    --muted: #98989f;
    --tint: #2b8cff;
    --tint-soft: #16283d;
    --screen: #000000;
    --bezel: #2c2c2e;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--tint); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0; letter-spacing: -0.02em; line-height: 1.15; }
p { margin: 0; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.muted { color: var(--muted); }

/* Header */
header {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 56px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand .mark { width: 26px; height: 26px; border-radius: 7px; display: block; object-fit: cover; }
.nav nav { display: flex; gap: 22px; font-size: 15px; }
.nav nav a { color: var(--muted); }
.nav nav a:hover { color: var(--text); text-decoration: none; }
@media (max-width: 600px) { .nav nav { display: none; } }

/* Hero */
.hero { padding: 72px 0 40px; }
.hero .wrap {
  display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: center;
}
.hero h1 { font-size: 52px; font-weight: 700; }
.hero .lead { font-size: 20px; margin-top: 20px; max-width: 32ch; color: var(--muted); }
.cta { display: flex; gap: 12px; margin-top: 32px; flex-wrap: wrap; align-items: center; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 20px; border-radius: 12px; font-weight: 600; font-size: 16px;
  border: 1px solid transparent;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--tint); color: #fff; }
.btn-primary:hover { background: color-mix(in srgb, var(--tint) 88%, #000); }
.btn-secondary { background: var(--bg-alt); color: var(--text); border-color: var(--line); }
.btn-secondary:hover { background: var(--line); }
.note { font-size: 14px; color: var(--muted); }
@media (max-width: 820px) {
  .hero { padding-top: 48px; }
  .hero .wrap { grid-template-columns: 1fr; gap: 40px; }
  .hero h1 { font-size: 38px; }
  .hero .lead { font-size: 18px; }
}

/* Phone mockup */
.phone-wrap { display: flex; justify-content: center; }
.phone {
  width: 300px; border-radius: 44px; background: var(--bezel); padding: 10px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.16), 0 0 0 1px rgba(0,0,0,0.12) inset;
}
.screen {
  background: var(--screen); border-radius: 36px; height: 600px;
  padding: 18px 14px 14px; display: flex; flex-direction: column; overflow: hidden;
  font-size: 13px; position: relative;
}
.screen .topbar { display: flex; justify-content: space-between; margin-top: 12px; }
.screen .circle {
  width: 34px; height: 34px; border-radius: 50%; background: var(--card);
  display: grid; place-items: center; color: var(--tint);
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.screen .title { font-size: 26px; font-weight: 700; margin-top: 18px; letter-spacing: -0.02em; }
.screen .sub { color: var(--muted); font-size: 12px; margin: 6px 0 12px 2px; }
.list { background: var(--card); border-radius: 16px; padding: 4px 12px; }
.row { display: flex; gap: 11px; align-items: flex-start; padding: 11px 0; }
.row + .row { border-top: 1px solid var(--line); }
.tile {
  width: 46px; height: 46px; border-radius: 11px; background: var(--tint-soft);
  display: grid; place-items: center; color: var(--tint); flex: none;
  overflow: hidden;
}
.row .body { flex: 1; min-width: 0; }
.row .name { font-weight: 600; font-size: 14px; line-height: 1.25; }
.row .cat { color: var(--muted); font-size: 12px; margin-top: 2px; }
.row .re { color: var(--muted); font-size: 11px; margin-top: 4px; display: flex; align-items: center; gap: 5px; }
.row .re i {
  width: 12px; height: 12px; border-radius: 50%; display: inline-grid; place-items: center;
  background: var(--muted); color: var(--card); font-style: normal; font-size: 8px; font-weight: 700;
}
.score { color: var(--tint); font-weight: 700; font-size: 17px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.score small { font-weight: 500; font-size: 10px; color: color-mix(in srgb, var(--tint) 60%, transparent); }
.tabbar {
  margin-top: auto; align-self: center; display: flex; gap: 4px; padding: 4px;
  background: var(--card); border-radius: 999px; box-shadow: 0 2px 10px rgba(0,0,0,0.10);
}
.tab { padding: 6px 12px; border-radius: 999px; font-size: 10px; color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 2px; }
.tab.on { background: var(--screen); color: var(--tint); font-weight: 600; }
.tab svg { width: 16px; height: 16px; }

/* Sections */
section { padding: 72px 0; }
section.alt { background: var(--bg-alt); }
.kicker { color: var(--tint); font-weight: 600; font-size: 14px; letter-spacing: 0.01em; margin-bottom: 10px; }
h2 { font-size: 34px; font-weight: 700; }
.intro { font-size: 19px; color: var(--muted); margin-top: 14px; max-width: 52ch; }
@media (max-width: 820px) { h2 { font-size: 28px; } section { padding: 56px 0; } }

.three { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; margin-top: 44px; }
.three h3 { font-size: 19px; font-weight: 600; margin: 14px 0 8px; }
.three p { color: var(--muted); font-size: 16px; }
.icon {
  width: 40px; height: 40px; border-radius: 11px; background: var(--tint-soft); color: var(--tint);
  display: grid; place-items: center;
}
.icon svg { width: 22px; height: 22px; }
@media (max-width: 820px) { .three { grid-template-columns: 1fr; gap: 28px; } }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.split.flip > :first-child { order: 2; }
.split h2 { font-size: 30px; }
.split .text p { color: var(--muted); margin-top: 14px; }
.split ul { margin: 18px 0 0; padding: 0; list-style: none; }
.split li { padding: 8px 0 8px 28px; position: relative; color: var(--text); }
.split li::before {
  content: ""; position: absolute; left: 0; top: 15px; width: 16px; height: 16px; border-radius: 50%;
  background: var(--tint-soft);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.5l2.5 2.5L12 5.5' fill='none' stroke='%23007af2' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
@media (max-width: 820px) {
  .split { grid-template-columns: 1fr; gap: 32px; }
  .split.flip > :first-child { order: 0; }
}

/* Small cards used next to text */
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 18px;
  max-width: 380px; margin: 0 auto; font-size: 14px;
}
.card .head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.card .head b { font-size: 16px; }
.rank { display: flex; align-items: center; gap: 12px; padding: 10px 0; }
.rank + .rank { border-top: 1px solid var(--line); }
.rank .pos { width: 22px; color: var(--muted); font-variant-numeric: tabular-nums; font-weight: 600; }
.rank .n { flex: 1; font-weight: 500; }
.rank .tags { color: var(--muted); font-size: 12px; }
.chip { display: inline-block; padding: 2px 9px; border-radius: 999px; background: var(--tint-soft); color: var(--tint); font-size: 12px; font-weight: 600; margin-right: 4px; }

.scan { position: relative; height: 150px; border-radius: 12px; background: var(--bg-alt); display: grid; place-items: center; margin-bottom: 14px; overflow: hidden; }
.scan .corner { position: absolute; width: 28px; height: 28px; border: 3px solid var(--tint); }
.scan .tl { top: 14px; left: 14px; border-right: 0; border-bottom: 0; border-radius: 8px 0 0 0; }
.scan .tr { top: 14px; right: 14px; border-left: 0; border-bottom: 0; border-radius: 0 8px 0 0; }
.scan .bl { bottom: 14px; left: 14px; border-right: 0; border-top: 0; border-radius: 0 0 0 8px; }
.scan .br { bottom: 14px; right: 14px; border-left: 0; border-top: 0; border-radius: 0 0 8px 0; }
.barcode { display: flex; gap: 3px; align-items: flex-end; height: 56px; }
.barcode i { display: block; background: var(--text); height: 100%; }
.found { display: flex; align-items: center; gap: 12px; }
.found .tile { width: 40px; height: 40px; }
.found .ok { margin-left: auto; color: var(--tint); font-weight: 600; font-size: 13px; }
.found + .found { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.found .avatar { flex: none; width: 40px; height: 40px; }

.friends .person { display: flex; align-items: center; gap: 12px; padding: 10px 0; }
.friends .person + .person { border-top: 1px solid var(--line); }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--tint-soft); color: var(--tint); display: grid; place-items: center; font-weight: 600; font-size: 13px; }
.friends .who { flex: 1; }
.friends .who small { display: block; color: var(--muted); font-size: 12px; }

/* Privacy */
.privacy { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px 40px; margin-top: 36px; }
.privacy div { border-top: 1px solid var(--line); padding-top: 16px; }
.privacy b { display: block; font-size: 17px; margin-bottom: 4px; }
.privacy p { color: var(--muted); font-size: 16px; }
@media (max-width: 820px) { .privacy { grid-template-columns: 1fr; } }

/* Final */
.final { text-align: center; padding: 88px 0; }
.final h2 { font-size: 36px; }
.final .cta { justify-content: center; }

.legal .wrap { max-width: 760px; }
.legal h2 { font-size: 20px; font-weight: 650; margin: 36px 0 10px; }
.legal h3 { font-size: 16px; font-weight: 650; margin: 20px 0 6px; }
.legal p, .legal li { font-size: 16px; line-height: 1.6; color: var(--text); }
.legal p + p { margin-top: 10px; }
.legal ul, .legal ol { margin: 8px 0 0; padding-left: 22px; }
.legal h1 { font-size: 40px; font-weight: 700; }
.legal .toc { margin-top: 28px; padding: 16px 20px; border-radius: 14px; background: var(--bg-alt); }
.legal .toc ol { margin: 0; columns: 2; column-gap: 32px; }
.legal .toc li { font-size: 15px; break-inside: avoid; }
.legal h2 { scroll-margin-top: 72px; }
@media (max-width: 820px) { .legal h1 { font-size: 30px; } .legal .toc ol { columns: 1; } }
.legal li + li { margin-top: 4px; }
.legal .muted { color: var(--muted); }
footer { border-top: 1px solid var(--line); padding: 28px 0 40px; font-size: 14px; color: var(--muted); }
footer .wrap { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
footer nav { display: flex; gap: 6px 18px; flex-wrap: wrap; }
footer a { color: var(--muted); }
footer a:hover, footer a[aria-current="page"] { color: var(--text); }

/* Help */
.faq { margin-top: 36px; max-width: 760px; }
.faq details { border-top: 1px solid var(--line); }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary {
  cursor: pointer; list-style: none; padding: 16px 32px 16px 0; font-weight: 600; position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 4px; top: 13px; font-size: 22px; font-weight: 400; color: var(--muted);
}
.faq details[open] summary::after { content: "–"; }
.faq details p { color: var(--muted); padding: 0 0 18px; max-width: 64ch; }
.contact { margin-top: 32px; }

a:focus-visible, summary:focus-visible { outline: 2px solid var(--tint); outline-offset: 3px; border-radius: 4px; }

@media (prefers-reduced-motion: no-preference) {
  .btn { transition: background-color 0.15s ease; }
}
