:root {
  --bg: #F7F7F5;
  --surface: #FFFFFF;
  --text: #1F1E1B;
  --text-2: rgba(55, 53, 47, .72);
  --text-3: rgba(55, 53, 47, .48);
  --line: rgba(55, 53, 47, .10);
  --hover: rgba(55, 53, 47, .06);
  --accent: #2383E2;
  --accent-strong: #0B6ECC;
  --on-accent: #FFFFFF;
  --danger: #C4382F;
  --title-from: #000000;
  --title-to: #666666;
  --shadow: 0 1px 2px rgba(15, 15, 15, .04), 0 24px 64px rgba(15, 15, 15, .10);
  --glass: rgba(255, 255, 255, .72);
  --muted-word: rgba(31, 30, 27, .28);
  --ease: cubic-bezier(0.32, 0.72, 0, 1);
  --font: "Geist", system-ui, sans-serif;
  --mono: "Geist Mono", ui-monospace, monospace;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #000000;
    --surface: #181818;
    --text: #EDEDEC;
    --text-2: rgba(237, 237, 236, .72);
    --text-3: rgba(237, 237, 236, .46);
    --line: rgba(255, 255, 255, .10);
    --hover: rgba(255, 255, 255, .06);
    --accent: #529CCA;
    --accent-strong: #6BB0DA;
    --on-accent: #000000;
    --danger: #F07167;
    --title-from: #FFFFFF;
    --title-to: #9B9B9B;
    --shadow: 0 0 0 1px rgba(255, 255, 255, .06), 0 24px 64px rgba(0, 0, 0, .6);
    --glass: rgba(24, 24, 24, .72);
    --muted-word: rgba(237, 237, 236, .28);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #000000;
  --surface: #181818;
  --text: #EDEDEC;
  --text-2: rgba(237, 237, 236, .72);
  --text-3: rgba(237, 237, 236, .46);
  --line: rgba(255, 255, 255, .10);
  --hover: rgba(255, 255, 255, .06);
  --accent: #529CCA;
  --accent-strong: #6BB0DA;
  --on-accent: #000000;
  --danger: #F07167;
  --title-from: #FFFFFF;
  --title-to: #9B9B9B;
  --shadow: 0 0 0 1px rgba(255, 255, 255, .06), 0 24px 64px rgba(0, 0, 0, .6);
  --glass: rgba(24, 24, 24, .72);
  --muted-word: rgba(237, 237, 236, .28);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.5rem;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 600; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }

.sr-only, .hp {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0; padding: 0; margin: -1px;
}
.skip {
  position: absolute; left: 16px; top: -48px; z-index: 20;
  background: var(--surface); color: var(--text); padding: 8px 12px; border-radius: 8px;
  transition: top 300ms var(--ease);
}
.skip:focus { top: 16px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Nav */
.nav {
  position: sticky; top: 24px; z-index: 10;
  display: flex; align-items: center; gap: 24px;
  width: max-content; margin: 24px auto 0; padding: 4px 4px 4px 16px;
  background: var(--glass); backdrop-filter: blur(24px) saturate(1.6); -webkit-backdrop-filter: blur(24px) saturate(1.6);
  border: 1px solid var(--line); border-radius: 9999px;
}
.brand { display: flex; align-items: center; gap: 8px; text-decoration: none; font-weight: 600; font-size: .875rem; line-height: 1.25rem; }

/* Buttons and fields */
.button {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 8px 12px; border: 0; border-radius: 8px;
  background: var(--accent); color: var(--on-accent);
  font: 600 1rem/1.5rem var(--font); text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: background 500ms var(--ease), transform 500ms var(--ease);
}
.button:hover { background: var(--accent-strong); transform: translateY(-1px); }
.button:active { transform: scale(.98); }
.button[disabled] { opacity: .6; cursor: default; transform: none; }
.button-small { font-size: .875rem; line-height: 1.25rem; border-radius: 9999px; padding: 8px 16px; }

.waitlist {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 8px;
  width: 100%; max-width: 448px; margin: 0 auto;
}
.waitlist input[type="email"] {
  flex: 1 1 220px; min-width: 0;
  padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px;
  background: var(--surface); color: var(--text);
  font: 400 1rem/1.5rem var(--font);
  transition: border-color 500ms var(--ease), box-shadow 500ms var(--ease);
}
.waitlist input[type="email"]::placeholder { color: var(--text-3); }
.waitlist input[type="email"]:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent); }
.waitlist input[aria-invalid="true"] { border-color: var(--danger); }
.form-status { flex-basis: 100%; min-height: 1.25rem; font-size: .875rem; line-height: 1.25rem; color: var(--text-2); text-align: center; }
.form-status[data-tone="error"] { color: var(--danger); }
.waitlist.is-joined > input, .waitlist.is-joined > .button { display: none; }
.joined[hidden] { display: none; }
.joined {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 12px;
  width: 100%; padding: 8px 16px; border: 1px solid var(--line); border-radius: 12px;
  background: var(--surface); text-wrap: balance;
}
.joined i { font-size: 1.25rem; color: var(--accent); }
.joined b { font-weight: 600; overflow-wrap: anywhere; }
.link {
  padding: 4px 8px; border: 0; border-radius: 6px; background: transparent; color: var(--text-3);
  font: 500 .875rem/1.25rem var(--font); cursor: pointer;
  transition: background 500ms var(--ease), color 500ms var(--ease);
}
.link:hover { background: var(--hover); color: var(--text); }
.link:active { transform: scale(.98); }
.form-status { text-wrap: balance; }

/* Hero */
.hero { padding: 64px 16px 48px; text-align: center; }
.hero-title {
  max-width: 680px; margin: 0 auto;
  font-size: 3.75rem; line-height: 1; letter-spacing: -0.035em;
  background: linear-gradient(90deg, var(--title-from), var(--title-to));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  padding-bottom: 4px;
}
.hero-sub { max-width: 600px; margin: 24px auto 32px; text-wrap: balance; font-size: 1.125rem; line-height: 1.75rem; color: var(--text-2); }
.proof {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 24px;
  margin: 16px 0 0; padding: 0; list-style: none;
  font-size: .875rem; line-height: 1.25rem; color: var(--text-3);
}
.proof li { display: flex; align-items: center; gap: 8px; }
.proof i { font-size: 1rem; }

/* Product window */
.showcase { padding: 0 24px; }
.window {
  position: relative; margin: 0 auto; max-width: 1280px;
  border-radius: 16px; overflow: hidden;
  background: var(--surface); box-shadow: var(--shadow);
}
.window img { width: 100%; }
.lights { position: absolute; top: 16px; left: 16px; display: flex; gap: 8px; }
.lights i { width: 12px; height: 12px; border-radius: 9999px; background: #FF5F57; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .08); }
.lights i:nth-child(2) { background: #FEBC2E; }
.lights i:nth-child(3) { background: #28C840; }

/* Sections */
section { scroll-margin-top: 96px; }
.section-title { font-size: 2.25rem; line-height: 2.5rem; letter-spacing: -0.025em; text-align: center; }
.lede { font-size: 1.125rem; line-height: 1.75rem; color: var(--text-2); }

.tour { padding: 96px 24px 0; }
.tabs {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 4px;
  width: max-content; max-width: 100%; margin: 32px auto 0; padding: 4px;
  background: var(--hover); border-radius: 12px;
}
.tabs button {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 12px; border: 0; border-radius: 8px; background: transparent; color: var(--text-2);
  font: 500 .875rem/1.25rem var(--font); cursor: pointer;
  transition: background 500ms var(--ease), color 500ms var(--ease), transform 500ms var(--ease);
}
.tabs button:hover { color: var(--text); }
.tabs button:active { transform: scale(.98); }
.tabs button[aria-selected="true"] { background: var(--surface); color: var(--text); box-shadow: 0 1px 2px rgba(0, 0, 0, .08); }
.tabs i { font-size: 1rem; }
.tour-caption { max-width: 680px; min-height: 3.5rem; margin: 24px auto 32px; text-align: center; color: var(--text-2); font-size: 1.125rem; line-height: 1.75rem; }
.tour-panel .window img { transition: opacity 500ms var(--ease); }
.tour-panel .window.is-swapping img { opacity: 0; }

.tagline { padding: 96px 24px; }
.tagline-text {
  max-width: 880px; margin: 0 auto;
  font-size: 3rem; line-height: 1; letter-spacing: -0.03em; font-weight: 600; text-wrap: balance; text-align: center;
}
.tagline-text .w { color: var(--muted-word); transition: color 700ms var(--ease); }
.tagline-text .w.on { color: var(--text); }

.wiki {
  display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center;
  max-width: 1080px; margin: 0 auto; padding: 0 24px;
}
.wiki .section-title, .wiki .lede { text-align: left; }
.wiki .lede { margin-top: 16px; }
.steps { margin: 32px 0 0; padding: 0; list-style: none; display: grid; gap: 24px; }
.steps li { display: flex; gap: 16px; }
.step-n {
  flex: none; display: grid; place-items: center; width: 32px; height: 32px;
  border-radius: 9999px; background: var(--surface); border: 1px solid var(--line);
  font: 500 .875rem/1.25rem var(--mono); color: var(--text-2);
}
.steps h3 { font-size: 1rem; line-height: 1.5rem; }
.steps p { color: var(--text-2); }
.tree {
  margin: 0; padding: 32px; overflow-x: auto;
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px;
  font: 400 .875rem/1.5rem var(--mono); color: var(--text);
}
.t-dir { font-weight: 500; }
.t-note { color: var(--text-3); }

.compare { padding: 96px 24px 0; }
.table-wrap {
  max-width: 1080px; margin: 32px auto 0; overflow-x: auto;
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px;
}
table { width: 100%; border-collapse: collapse; font-size: 1rem; line-height: 1.5rem; }
th, td { padding: 16px 24px; text-align: left; vertical-align: top; }
thead th { font-size: .875rem; line-height: 1.25rem; font-weight: 600; color: var(--text-3); }
.compare table { min-width: 720px; }
.compare thead th:nth-child(2) { color: var(--accent); }
.compare tbody th { font-weight: 500; color: var(--text-2); width: 22%; }
.compare tbody td { width: 26%; }
.compare tbody td:nth-child(2) { font-weight: 500; }
.compare tbody td:nth-child(n+3) { color: var(--text-3); }
tbody tr { box-shadow: inset 0 1px 0 var(--line); }

.faq { padding: 96px 24px 0; }
.faq-list { max-width: 680px; margin: 32px auto 0; }
.faq details { box-shadow: inset 0 -1px 0 var(--line); }
.faq summary {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 16px 0; cursor: pointer; list-style: none; font-weight: 500;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font: 400 1.25rem/1.75rem var(--mono); color: var(--text-3); transition: transform 500ms var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 0 16px; color: var(--text-2); }

.final { padding: 96px 16px; text-align: center; }
.final-title {
  font-size: 3rem; line-height: 1; letter-spacing: -0.03em; margin-bottom: 32px;
  background: linear-gradient(90deg, var(--title-from), var(--title-to));
  -webkit-background-clip: text; background-clip: text; color: transparent; padding-bottom: 4px;
}
.final-note { margin-top: 8px; font-size: .875rem; line-height: 1.25rem; color: var(--text-3); }

.footer {
  display: flex; justify-content: center; gap: 24px; padding: 32px 16px 48px;
  font-size: .875rem; line-height: 1.25rem; color: var(--text-3);
}
.footer a { text-decoration: none; }
.footer a:hover { color: var(--text); }

/* Plain pages: privacy, 404 */
.page { max-width: 680px; margin: 0 auto; padding: 96px 16px; }
.prose h1 { font-size: 2.25rem; line-height: 2.5rem; letter-spacing: -0.025em; margin-bottom: 24px; }
.prose h2 { font-size: 1.25rem; line-height: 1.75rem; margin: 32px 0 8px; }
.prose p, .prose li { color: var(--text-2); }
.prose p + p { margin-top: 16px; }
.back { display: inline-block; margin-top: 32px; color: var(--accent); text-decoration: none; font-weight: 500; }
.back:hover { color: var(--accent-strong); }

/* Scroll reveal */
.js .reveal { opacity: 0; transform: translateY(64px); filter: blur(12px); transition: opacity 900ms var(--ease), transform 900ms var(--ease), filter 900ms var(--ease); }
.js .reveal.in { opacity: 1; transform: none; filter: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; filter: none; transition: none; }
  .tagline-text .w { transition: none; }
}

@media (max-width: 860px) {
  .wiki { grid-template-columns: 1fr; gap: 48px; }
}

@media (max-width: 640px) {
  .hero { padding: 64px 16px 40px; }
  .hero-title { font-size: 2.25rem; line-height: 2.5rem; }
  .hero-title br { display: none; }
  .hero-sub { font-size: 1rem; line-height: 1.5rem; }
  .showcase, .tour, .compare, .faq, .wiki { padding-left: 16px; padding-right: 16px; }
  .window { border-radius: 12px; }
  .lights { top: 8px; left: 8px; gap: 4px; }
  .lights i { width: 8px; height: 8px; }
  .section-title { font-size: 1.875rem; line-height: 2.25rem; }
  .tagline { padding: 64px 16px; }
  .tagline-text { font-size: 2.25rem; line-height: 2.5rem; }
  .final-title { font-size: 2.25rem; line-height: 2.5rem; }
  th, td { padding: 12px 16px; }
  .tree { padding: 16px; font-size: .75rem; line-height: 1.25rem; }
}

/* Admin */
.admin { max-width: 960px; margin: 0 auto; padding: 48px 16px 96px; }
.admin-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 32px; }
.admin-head h1 { font-size: 1.875rem; line-height: 2.25rem; letter-spacing: -0.025em; }
.admin-head a { font-size: .875rem; line-height: 1.25rem; color: var(--accent); text-decoration: none; }
.admin-head a:hover { color: var(--accent-strong); }
.admin h2 { font-size: 1.125rem; line-height: 1.75rem; margin: 40px 0 12px; }
.admin-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.admin-tile { display: flex; flex-direction: column; gap: 4px; padding: 16px 24px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.admin-tile span { font-size: .875rem; line-height: 1.25rem; color: var(--text-3); }
.admin-tile strong { font-size: 1.875rem; line-height: 2.25rem; font-weight: 600; }
.admin-chart { margin: 24px 0 0; padding: 16px 24px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.admin-chart svg { display: block; width: 100%; height: 96px; fill: var(--text-3); }
.admin-chart figcaption { display: flex; justify-content: space-between; margin-top: 8px; font-size: .75rem; line-height: 1rem; color: var(--text-3); font-family: var(--mono); }
.admin-sources { list-style: none; margin: 0; padding: 0; max-width: 320px; }
.admin-sources li { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: .875rem; line-height: 1.25rem; }
.admin-sources li span:last-child { font-family: var(--mono); color: var(--text-2); }
.admin-table { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.admin-table table { min-width: 0; font-size: .875rem; line-height: 1.25rem; }
.admin-table th, .admin-table td { padding: 12px 16px; border-bottom: 1px solid var(--line); }
.admin-table tbody tr:last-child td { border-bottom: 0; }
.admin-table td:nth-child(2) { font-family: var(--mono); color: var(--text-2); white-space: nowrap; }
.admin-table td:last-child { text-align: right; }
.admin-table form { margin: 0; }
.admin-table button { font: inherit; color: var(--danger); background: none; border: 0; border-radius: 6px; padding: 4px 8px; cursor: pointer; }
.admin-table button:hover { background: var(--hover); }
.admin-empty { color: var(--text-2); }
@media (max-width: 640px) {
  .admin-tiles { grid-template-columns: 1fr; }
}
