:root {
  --bg: #fbfbfd;
  --bg-alt: #f2f3f7;
  --surface: #ffffff;
  --text: #16181d;
  --muted: #5b6170;
  --border: #e3e5ec;
  --accent: #3b5bdb;
  --accent-strong: #2f4ac0;
  --accent-soft: #e9edfc;
  --on-accent: #ffffff;
  --code-bg: #14161c;
  --code-text: #e6e8ee;
  --code-comment: #8a93a6;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.04), 0 4px 16px rgba(16, 24, 40, 0.06);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1015;
    --bg-alt: #14171e;
    --surface: #181b23;
    --text: #e8eaf0;
    --muted: #a0a6b4;
    --border: #262a35;
    --accent: #7b93f5;
    --accent-strong: #97aaf8;
    --accent-soft: #1d2440;
    --on-accent: #0e1015;
    --code-bg: #0a0b0f;
    --shadow: none;
  }
}

* { 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, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-strong); text-decoration: underline; }
a:focus-visible, .button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9em;
  background: var(--accent-soft);
  padding: 0.1em 0.35em;
  border-radius: 5px;
  overflow-wrap: anywhere;
}

h1, h2, h3 { line-height: 1.2; margin: 0 0 0.5em; letter-spacing: -0.01em; }
h1 { font-size: clamp(2rem, 5vw, 3.25rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
h3 { font-size: 1.1rem; }
p { margin: 0 0 1em; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 680px; }
.center { text-align: center; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(150%) blur(10px);
  border-bottom: 1px solid var(--border);
}
.header-row { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.15rem; color: var(--text); }
.logo:hover { text-decoration: none; color: var(--text); }
.logo svg { color: var(--accent); }
nav { display: flex; align-items: center; gap: 22px; }
nav a { color: var(--muted); font-size: 0.95rem; }
nav a:hover { color: var(--text); text-decoration: none; }
nav a.button { color: var(--on-accent); }

/* Buttons */
.button {
  display: inline-block;
  background: var(--accent);
  color: var(--on-accent);
  padding: 0.7em 1.25em;
  border-radius: 10px;
  font-weight: 600;
  border: 1px solid transparent;
}
.button:hover { background: var(--accent-strong); color: var(--on-accent); text-decoration: none; }
.button-small { padding: 0.45em 0.9em; font-size: 0.9rem; }
.button-quiet { background: transparent; color: var(--accent); border-color: var(--border); }
.button-quiet:hover { background: var(--accent-soft); color: var(--accent-strong); }

/* Hero */
.hero { padding: 88px 0 72px; }
.eyebrow { color: var(--accent); font-weight: 600; font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.08em; }
.lead { font-size: 1.2rem; color: var(--muted); max-width: 640px; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; margin: 28px 0 40px; }

.sample {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px 20px;
  max-width: 720px;
  display: grid;
  gap: 12px;
}
.sample-row { display: grid; grid-template-columns: 52px 1fr; gap: 12px; align-items: baseline; }
.sample-label { color: var(--muted); font-size: 0.85rem; font-weight: 600; }
.sample-long { background: none; padding: 0; color: var(--muted); }
.sample-short { background: none; padding: 0; color: var(--accent); font-weight: 600; font-size: 1.05em; }

/* Sections */
.section { padding: 80px 0; }
.section-alt { background: var(--bg-alt); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-lead { color: var(--muted); font-size: 1.1rem; max-width: 640px; margin-bottom: 36px; }
.center .section-lead { margin-left: auto; margin-right: auto; }

.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; }
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}
.card p { color: var(--muted); margin: 0; }

.split { display: grid; grid-template-columns: 1fr 1.15fr; gap: 48px; align-items: center; }
.split p { color: var(--muted); }
.ticks { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 10px; }
.ticks li { padding-left: 28px; position: relative; }
.ticks li::before {
  content: ""; position: absolute; left: 0; top: 0.35em;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 5px var(--accent-soft), inset 0 0 0 16px var(--accent);
}

.code-block {
  background: var(--code-bg);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: auto;
  min-width: 0;
}
.code-block pre { margin: 0; padding: 22px; }
.code-block code {
  background: none; padding: 0; color: var(--code-text);
  font-size: 0.85rem; line-height: 1.65; overflow-wrap: normal; white-space: pre;
}
.c-comment { color: var(--code-comment); }

/* Footer */
.site-footer { border-top: 1px solid var(--border); padding: 28px 0; color: var(--muted); font-size: 0.9rem; }
.footer-row { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

@media (max-width: 820px) {
  .split { grid-template-columns: 1fr; gap: 28px; }
  .hero { padding: 56px 0 48px; }
  .section { padding: 56px 0; }
}

@media (max-width: 560px) {
  nav a:not(.button) { display: none; }
  .sample-row { grid-template-columns: 1fr; gap: 2px; }
}
