:root {
  --bg: #ffffff;
  --bg-alt: #f5f6ff;
  --card: #ffffff;
  --text: #14152b;
  --muted: #565a78;
  --line: #e3e5f5;
  --brand: #5b5bf0;
  --brand-2: #8a4dea;
  --brand-ink: #ffffff;
  --shadow: 0 10px 30px rgba(60, 60, 160, .12);
  --radius: 16px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1020;
    --bg-alt: #151732;
    --card: #1a1c3a;
    --text: #eef0ff;
    --muted: #a3a7cc;
    --line: #2a2d56;
    --shadow: 0 10px 30px rgba(0, 0, 0, .4);
  }
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.65 system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--brand); }
img { max-width: 100%; }
.wrap { width: min(1080px, 100% - 32px); margin-inline: auto; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 8px; top: 8px; background: var(--card); padding: 8px 12px; z-index: 10; border-radius: 8px; }

/* header */
header.site {
  position: sticky; top: 0; z-index: 5;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
header.site .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.15rem; color: var(--text); text-decoration: none; }
.brand img { width: 30px; height: 30px; border-radius: 8px; }
nav.main { display: flex; gap: 22px; align-items: center; }
nav.main a { color: var(--muted); text-decoration: none; font-size: .95rem; }
nav.main a:hover { color: var(--text); }
@media (max-width: 640px) { nav.main a.hide-sm { display: none; } }

/* buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 22px; border-radius: 12px; font-weight: 600; text-decoration: none;
  background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: var(--brand-ink) !important;
  box-shadow: 0 6px 18px rgba(91, 91, 240, .35);
  transition: transform .15s, box-shadow .15s;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(91, 91, 240, .45); }
.btn.ghost { background: transparent; color: var(--text) !important; border: 1px solid var(--line); box-shadow: none; }
.btn.small { padding: 8px 16px; font-size: .9rem; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; border-radius: 6px; }

/* hero */
.hero { padding: 72px 0 56px; text-align: center; background: radial-gradient(900px 400px at 50% -10%, color-mix(in srgb, var(--brand) 18%, transparent), transparent); }
.hero img.logo { width: 88px; height: 88px; border-radius: 22px; box-shadow: var(--shadow); }
.hero h1 { font-size: clamp(2rem, 5vw, 3.4rem); line-height: 1.12; margin: 22px 0 14px; letter-spacing: -.02em; }
.hero h1 span { background: linear-gradient(135deg, var(--brand), var(--brand-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p.lead { max-width: 640px; margin: 0 auto 28px; color: var(--muted); font-size: 1.15rem; }
.cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.note { color: var(--muted); font-size: .88rem; margin-top: 14px; }
.mock { margin: 48px auto 0; max-width: 820px; border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid var(--line); background: var(--card); overflow: hidden; text-align: left; }
.mock svg { display: block; width: 100%; height: auto; }

/* sections */
section { padding: 64px 0; }
section.alt { background: var(--bg-alt); }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); margin: 0 0 10px; letter-spacing: -.01em; text-align: center; }
.sub { text-align: center; color: var(--muted); max-width: 620px; margin: 0 auto 40px; }
.grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.card h3 { margin: 12px 0 6px; font-size: 1.1rem; }
.card p { margin: 0; color: var(--muted); font-size: .96rem; }
.ico { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: color-mix(in srgb, var(--brand) 14%, transparent); }
.ico svg { width: 24px; height: 24px; stroke: var(--brand); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

table.keys { width: 100%; max-width: 720px; margin: 0 auto; border-collapse: collapse; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
table.keys th, table.keys td { padding: 14px 18px; text-align: left; border-bottom: 1px solid var(--line); }
table.keys tr:last-child td { border-bottom: 0; }
table.keys th { background: var(--bg-alt); font-size: .85rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
kbd { font: 600 .85rem ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--bg-alt); border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 6px; padding: 2px 8px; }

.privacy-band { text-align: center; }
.privacy-band .card { max-width: 760px; margin: 0 auto; padding: 36px; }
.privacy-band ul { list-style: none; padding: 0; margin: 18px 0 0; display: flex; flex-wrap: wrap; gap: 10px 22px; justify-content: center; color: var(--muted); }
.privacy-band li::before { content: "✓ "; color: var(--brand); font-weight: 700; }

details { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 14px 20px; margin: 0 auto 12px; max-width: 760px; }
details summary { cursor: pointer; font-weight: 600; }
details p { color: var(--muted); margin: 10px 0 0; }

/* docs (privacy / terms) */
main.doc { padding: 56px 0 72px; }
.doc .wrap { max-width: 780px; }
.doc h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); margin: 0 0 6px; letter-spacing: -.02em; }
.doc .meta { color: var(--muted); margin: 0 0 28px; }
.doc h2 { text-align: left; font-size: 1.35rem; margin: 36px 0 8px; }
.doc p, .doc li { color: var(--text); }
.doc ul { padding-left: 22px; }
.doc table { width: 100%; border-collapse: collapse; margin: 14px 0; font-size: .95rem; }
.doc th, .doc td { border: 1px solid var(--line); padding: 10px 12px; text-align: left; vertical-align: top; }
.doc th { background: var(--bg-alt); }
.callout { background: var(--bg-alt); border: 1px solid var(--line); border-left: 4px solid var(--brand); border-radius: 10px; padding: 14px 18px; margin: 18px 0; }

footer.site { border-top: 1px solid var(--line); padding: 32px 0; color: var(--muted); font-size: .92rem; }
footer.site .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 14px; }
footer.site nav { display: flex; gap: 20px; flex-wrap: wrap; }
footer.site a { color: var(--muted); text-decoration: none; }
footer.site a:hover { color: var(--text); text-decoration: underline; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
