:root {
  --bg: #fafaf9;
  --surface: #ffffff;
  --text: #1c1917;
  --muted: #57534e;
  --line: #e7e5e4;
  --accent: #2f5bea;
  --accent-text: #ffffff;
  --code-bg: #f5f5f4;
  --radius: 10px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #131211;
    --surface: #1c1a19;
    --text: #f5f5f4;
    --muted: #a8a29e;
    --line: #2e2b29;
    --accent: #6c8cff;
    --accent-text: #0d0d0d;
    --code-bg: #171514;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  width: 100%;
  max-width: 1040px;
  margin: 0 auto;
  padding-inline: 20px;
}

a { color: inherit; }
h1, h2, h3 { line-height: 1.2; margin: 0; letter-spacing: -0.02em; }
h1 { font-size: clamp(2rem, 5vw, 3.25rem); }
h2 { font-size: 1.6rem; }
h3 { font-size: 1.1rem; }
p { margin: 0; }
code { background: var(--code-bg); padding: 1px 6px; border-radius: 5px; font-size: 0.9em; }

/* header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.bar { display: flex; align-items: center; justify-content: space-between; padding-block: 14px; }
.logo { font-weight: 700; font-size: 1.15rem; text-decoration: none; letter-spacing: -0.02em; }
nav { display: flex; align-items: center; gap: 22px; }
nav a { text-decoration: none; color: var(--muted); font-size: 0.95rem; }
nav a:hover { color: var(--text); }
nav a.btn { color: var(--accent-text); }

/* buttons */
.btn {
  display: inline-block;
  padding: 11px 20px;
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  background: var(--accent);
  color: var(--accent-text);
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}
.btn:hover { filter: brightness(1.08); }
.btn-sm { padding: 6px 14px; font-size: 0.9rem; }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--muted); filter: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* hero */
.hero { padding-block: 88px 56px; }
.eyebrow { color: var(--accent); font-weight: 600; font-size: 0.9rem; margin-bottom: 14px; }
.lead { max-width: 620px; margin-top: 18px; font-size: 1.15rem; color: var(--muted); }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }

/* sections */
.section { padding-block: 56px; }
.sub { color: var(--muted); margin-top: 8px; max-width: 640px; }

/* builder */
.builder { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 28px; align-items: start; }
.controls { display: flex; flex-wrap: wrap; gap: 16px; align-items: end; margin-bottom: 16px; }
.field { display: grid; gap: 4px; font-size: 0.85rem; color: var(--muted); }
select {
  font: inherit;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
}
.check { display: flex; align-items: center; gap: 8px; font-size: 0.95rem; padding-bottom: 8px; }
.tools { display: grid; gap: 10px; }
.tool {
  display: flex;
  gap: 12px;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
}
.tool:has(input:checked) { border-color: var(--accent); }
.tool input { margin-top: 5px; accent-color: var(--accent); }
.tool strong { display: block; font-size: 0.98rem; }
.tool span { color: var(--muted); font-size: 0.88rem; }

.output { position: sticky; top: 76px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.output-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.where { color: var(--muted); font-size: 0.82rem; overflow-wrap: anywhere; }
pre {
  margin: 0;
  padding: 14px;
  background: var(--code-bg);
  overflow-x: auto;
  font: 0.85rem/1.55 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  min-height: 140px;
}
.output pre { max-height: 50vh; overflow: auto; }
.notes { padding: 12px 14px; color: var(--muted); font-size: 0.85rem; border-top: 1px solid var(--line); }
.notes:empty { display: none; }
.notes p + p { margin-top: 8px; }

/* cards */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 28px; }
.cards.two { grid-template-columns: repeat(2, 1fr); max-width: 760px; }
.card { display: flex; flex-direction: column; gap: 10px; padding: 22px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.card p { color: var(--muted); font-size: 0.95rem; }
.card.featured { border-color: var(--accent); }
.card ul { margin: 0; padding-left: 18px; color: var(--muted); font-size: 0.95rem; flex: 1; }
.card li { margin-bottom: 4px; }
.card .btn { align-self: flex-start; margin-top: 8px; }
.tag { margin-top: auto; align-self: flex-start; font-size: 0.78rem; font-weight: 600; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 2px 10px; }
.card .price { font-size: 2rem; font-weight: 700; color: var(--text); letter-spacing: -0.02em; line-height: 1.1; }
.card .price span { font-size: 0.95rem; font-weight: 400; color: var(--muted); }

/* waitlist */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 36px 28px; text-align: center; }
.panel .sub { margin-inline: auto; }
.form { display: flex; gap: 10px; max-width: 460px; margin: 22px auto 0; }
.form input {
  flex: 1;
  min-width: 0;
  font: inherit;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 11px 14px;
}
.msg { min-height: 1.6em; margin-top: 12px; font-size: 0.92rem; color: var(--muted); }
.msg.error { color: #c2410c; }
.msg.ok { color: #15803d; }
@media (prefers-color-scheme: dark) {
  .msg.error { color: #fb923c; }
  .msg.ok { color: #4ade80; }
}

/* faq */
.faq details { border-bottom: 1px solid var(--line); padding: 14px 0; max-width: 720px; }
.faq details:first-of-type { margin-top: 20px; border-top: 1px solid var(--line); }
.faq summary { cursor: pointer; font-weight: 600; }
.faq details p { color: var(--muted); margin-top: 8px; }

/* guides */
.article { max-width: 720px; padding-block: 56px 72px; }
.article h1 { font-size: clamp(1.8rem, 4vw, 2.5rem); margin-bottom: 14px; }
.article h2 { margin-top: 44px; margin-bottom: 10px; }
.article h3 { margin-top: 26px; margin-bottom: 6px; }
.article p, .article li { color: var(--muted); }
.article p { margin-top: 12px; }
.article ul, .article ol { margin: 12px 0 0; padding-left: 22px; }
.article li { margin-bottom: 6px; }
.article a { color: var(--accent); }
.article pre { margin-top: 14px; border: 1px solid var(--line); border-radius: 8px; min-height: 0; }
.article strong { color: var(--text); }
.article .callout { margin-top: 18px; padding: 14px 16px; border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: 8px; background: var(--surface); }
.article .callout p { margin: 0; }
.article .cta-row { margin-top: 36px; }

/* footer */
.site-footer { border-top: 1px solid var(--line); padding-block: 28px; color: var(--muted); font-size: 0.85rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--text); }

@media (max-width: 800px) {
  .builder { grid-template-columns: 1fr; }
  .output { position: static; }
  .cards, .cards.two { grid-template-columns: 1fr; }
  nav a:not(.btn) { display: none; }
  .hero { padding-block: 56px 32px; }
  .form { flex-direction: column; }
}
