:root {
  --bg: #faf8fc;
  --surface: #ffffff;
  --text: #1d1526;
  --muted: #5e5470;
  --border: #e6e0ee;
  --accent: #7a3fd1;
  --accent-hover: #6a31bf;
  --accent-ink: #ffffff;
  --accent-soft: #f1e9fc;
  --accent-text: #6a31bf;
  --shadow: 0 1px 2px rgba(29, 21, 38, .05), 0 8px 24px rgba(29, 21, 38, .06);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #120d18;
    --surface: #1b1424;
    --text: #f1ecf7;
    --muted: #b3a8c2;
    --border: #2e2539;
    --accent: #a77bf0;
    --accent-hover: #b995f3;
    --accent-ink: #160d22;
    --accent-soft: #2a1d3d;
    --accent-text: #c3a3f6;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #120d18;
  --surface: #1b1424;
  --text: #f1ecf7;
  --muted: #b3a8c2;
  --border: #2e2539;
  --accent: #a77bf0;
  --accent-hover: #b995f3;
  --accent-ink: #160d22;
  --accent-soft: #2a1d3d;
  --accent-text: #c3a3f6;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
a { color: var(--accent-text); }
a:hover { color: var(--accent-hover); }
img, svg { display: block; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 640px) { .wrap { padding: 0 24px; } }

/* header / footer */
.top { border-bottom: 1px solid var(--border); background: var(--surface); }
.top-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 60px; }
.brand-logo { border-radius: 7px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; color: var(--text); text-decoration: none; }
.top nav { display: flex; gap: 20px; }
.top nav a { color: var(--muted); text-decoration: none; font-size: 15px; }
.top nav a:hover { color: var(--text); }
.bottom { border-top: 1px solid var(--border); margin-top: 72px; }
.bottom-inner { padding-top: 24px; padding-bottom: 40px; color: var(--muted); font-size: 14px; }
.bottom-inner p { margin: 0 0 8px; }
.bottom-links { display: flex; flex-wrap: wrap; gap: 8px 20px; }

/* hero */
.hero { padding-top: 64px; padding-bottom: 40px; }
.eyebrow { display: inline-block; margin: 0 0 16px; padding: 4px 12px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-text); font-size: 14px; font-weight: 600; }
.hero h1 { margin: 0 0 16px; font-size: clamp(34px, 6vw, 52px); line-height: 1.1; letter-spacing: -.02em; max-width: 16ch; }
.hero .lede { margin: 0; max-width: 58ch; font-size: 18px; color: var(--muted); }

/* app cards */
.apps { display: grid; gap: 20px; grid-template-columns: 1fr; }
@media (min-width: 900px) { .apps { grid-template-columns: repeat(3, 1fr); } }
.app {
  display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--border); border-radius: 16px;
  padding: 24px; box-shadow: var(--shadow);
}
.app-head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.app-logo { flex: none; width: 56px; height: 56px; border-radius: 14px; box-shadow: 0 0 0 1px var(--border); }
.app h2 { margin: 0; font-size: 21px; line-height: 1.2; }
.app .tagline { margin: 2px 0 0; color: var(--muted); font-size: 15px; }
.app ul { margin: 0 0 18px; padding-left: 20px; }
.app li { margin-bottom: 8px; }
.app li::marker { color: var(--accent); }
.app-foot { margin-top: auto; }
.perms { margin: 0 0 16px; padding: 12px 14px; border-radius: 10px; background: var(--bg); border: 1px solid var(--border); font-size: 14px; color: var(--muted); }
.perms strong { color: var(--text); font-weight: 600; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 18px; border-radius: 10px;
  font-weight: 600; font-size: 15px; text-decoration: none; border: 1px solid transparent;
}
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent-hover); color: var(--accent-ink); }
.btn-ghost { border-color: var(--border); color: var(--text); background: var(--surface); }
.btn-ghost:hover { border-color: var(--accent); color: var(--text); }
.btn:focus-visible, a:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.hint { margin: 0 0 20px; font-size: 14px; color: var(--muted); }
code { font: 14px/1.4 ui-monospace, SFMono-Regular, Consolas, monospace; background: var(--accent-soft); color: var(--accent-text); padding: 1px 6px; border-radius: 6px; }

/* sections */
.section { padding-top: 64px; }
.section > h2 { margin: 0 0 20px; font-size: 26px; letter-spacing: -.01em; }
.faq { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 760px) { .faq { grid-template-columns: 1fr 1fr; } }
.faq div { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 20px; }
.faq h3 { margin: 0 0 6px; font-size: 17px; }
.faq p { margin: 0; color: var(--muted); }
.steps { margin: 0; padding: 0; list-style: none; display: grid; gap: 16px; grid-template-columns: 1fr; counter-reset: step; }
@media (min-width: 760px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.steps li { counter-increment: step; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 20px; }
.steps li::before { content: counter(step); display: grid; place-items: center; width: 30px; height: 30px; margin-bottom: 10px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font-weight: 700; font-size: 15px; }
.steps h3 { margin: 0 0 4px; font-size: 17px; }
.steps p { margin: 0; color: var(--muted); }

/* legal pages */
.prose { max-width: 760px; padding-top: 48px; }
.prose h1 { font-size: clamp(30px, 5vw, 40px); line-height: 1.15; margin: 0 0 12px; letter-spacing: -.02em; }
.prose h2 { font-size: 22px; margin: 40px 0 10px; }
.prose h3 { font-size: 18px; margin: 28px 0 8px; }
.prose p, .prose li { color: var(--text); }
.prose table { border-collapse: collapse; width: 100%; display: block; overflow-x: auto; font-size: 15px; }
.prose th, .prose td { border: 1px solid var(--border); padding: 8px 10px; text-align: left; vertical-align: top; }
.prose th { background: var(--accent-soft); }
.prose hr { border: 0; border-top: 1px solid var(--border); margin: 32px 0; }
