:root {
  --bg: #fafaf8;
  --surface: #ffffff;
  --surface-2: #f4f4f1;
  --fg: #171716;
  --muted: #6b6b67;
  --faint: #a3a39e;
  --accent: #188038;
  --accent-hover: #136c2e;
  --accent-soft: #e6f4ea;
  --accent-fg: #ffffff;
  --grid: rgba(0, 0, 0, 0.07);
  --ring: 0 0 0 1px rgba(0, 0, 0, 0.07);
  --shadow: 0 0 0 1px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04), 0 12px 32px -12px rgba(0, 0, 0, 0.12);
  --shadow-sm: 0 0 0 1px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.05);
  --code-bg: #f1f1ee;

  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --radius: 14px;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e0e0d;
    --surface: #161615;
    --surface-2: #1d1d1b;
    --fg: #ededeb;
    --muted: #9d9d98;
    --faint: #62625e;
    --accent: #5bb974;
    --accent-hover: #74c98a;
    --accent-soft: rgba(91, 185, 116, 0.14);
    --accent-fg: #0b1f11;
    --grid: rgba(255, 255, 255, 0.07);
    --ring: 0 0 0 1px rgba(255, 255, 255, 0.08);
    --shadow: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 12px 32px -12px rgba(0, 0, 0, 0.6);
    --shadow-sm: 0 0 0 1px rgba(255, 255, 255, 0.08);
    --code-bg: #1d1d1b;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 16px/1.6 var(--font);
  font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
a { color: inherit; }
code, pre { font-family: var(--mono); }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }

/* ---------- nav ---------- */
.nav { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; letter-spacing: -0.01em; text-decoration: none; }
.brand svg { width: 22px; height: 22px; }
.nav-links { display: flex; gap: 28px; font-size: 14px; }
.nav-links a { color: var(--muted); text-decoration: none; transition: color 150ms ease; }
@media (hover: hover) and (pointer: fine) {
  .nav-links a:hover { color: var(--fg); }
}
@media (max-width: 640px) {
  .nav-links a:not(.keep) { display: none; }
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  height: 44px; padding: 0 18px; border-radius: 10px; border: 0;
  font: 500 15px/1 var(--font); text-decoration: none; cursor: pointer;
  transition: transform 160ms var(--ease-out), background-color 150ms ease, box-shadow 150ms ease;
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--accent); color: var(--accent-fg); }
.btn-ghost { background: var(--surface); color: var(--fg); box-shadow: var(--shadow-sm); }
@media (hover: hover) and (pointer: fine) {
  .btn-primary:hover { background: var(--accent-hover); }
  .btn-ghost:hover { background: var(--surface-2); }
}
.btn:focus-visible, .copy:focus-visible, .replay:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- hero ---------- */
.hero { display: grid; grid-template-columns: 1fr 1.15fr; gap: 56px; align-items: center; padding-block: 56px 96px; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); margin-bottom: 20px; }
.eyebrow .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
h1 { font-size: clamp(40px, 5.4vw, 60px); line-height: 1.04; letter-spacing: -0.035em; font-weight: 650; margin: 0 0 20px; text-wrap: balance; }
.lede { font-size: 18px; color: var(--muted); margin: 0 0 32px; max-width: 30em; text-wrap: pretty; }
.cta { display: flex; gap: 12px; flex-wrap: wrap; }
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; gap: 48px; padding-top: 32px; }
  .hero > * { min-width: 0; }
}

/* ---------- demo ---------- */
.demo { position: relative; background: var(--surface); border-radius: 18px; box-shadow: var(--shadow); padding: 18px; }
.prompt { display: flex; gap: 12px; align-items: flex-start; padding: 4px 4px 16px; }
.avatar { flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--surface-2); box-shadow: var(--ring); display: grid; place-items: center; font-size: 11px; font-weight: 600; color: var(--muted); }
.prompt p { margin: 3px 0 0; font-size: 14.5px; line-height: 1.5; }
.status-row { position: relative; display: grid; height: 30px; margin: 0 4px 14px 44px; }
.status { grid-area: 1 / 1; align-self: center; justify-self: start; display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); }
.status code { font-size: 12px; color: var(--accent); background: var(--accent-soft); padding: 3px 7px; border-radius: 6px; }
.status .check { width: 16px; height: 16px; border-radius: 50%; background: var(--accent); color: var(--accent-fg); display: grid; place-items: center; }
.status .check svg { width: 10px; height: 10px; }
/* Without JS only the final status shows. */
.status:not(:last-of-type) { opacity: 0; }

.sheet { border-radius: 10px; box-shadow: var(--ring); overflow: hidden; background: var(--surface); }
.sheet-bar { display: flex; align-items: center; gap: 8px; padding: 10px 12px; font-size: 12.5px; font-weight: 500; background: var(--surface-2); box-shadow: inset 0 -1px 0 var(--grid); }
.sheet-bar svg { width: 14px; height: 14px; }
.sheet-bar span:last-child { margin-left: auto; color: var(--faint); font-weight: 400; }
table.grid { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; table-layout: fixed; }
.grid th, .grid td { height: 32px; padding: 0 10px; box-shadow: inset -1px -1px 0 var(--grid); white-space: nowrap; overflow: hidden; }
.grid thead th { height: 24px; font-size: 11px; font-weight: 500; color: var(--faint); background: var(--surface-2); text-align: center; }
.grid col.rn-col { width: 34px; }
.grid .rn { font-size: 11px; color: var(--faint); background: var(--surface-2); text-align: center; font-weight: 500; }
.grid td { text-align: right; }
.grid td:nth-child(2) { text-align: left; }
.grid tr.head td { font-weight: 600; position: relative; }
.grid tr.total td { font-weight: 600; }
.tint { position: absolute; inset: 0; background: var(--accent-soft); box-shadow: inset 0 -2px 0 var(--accent); z-index: 0; }
.grid td > .cell { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1fr); }
.cell > .v { grid-area: 1 / 1; }
.cell > .v:not(:last-child) { opacity: 0; }
.v.f { font-family: var(--mono); font-size: 11.5px; color: var(--accent); align-self: center; }
@media (max-width: 480px) {
  .demo { padding: 14px; }
  .status-row { margin-left: 40px; }
  table.grid { font-size: 12px; }
  .grid th, .grid td { padding: 0 6px; }
  .grid col.rn-col { width: 24px; }
  .grid col.a-col { width: 20%; }
  .v.f { font-size: 10px; }
}

.chart { margin-top: 12px; border-radius: 10px; box-shadow: var(--ring); padding: 14px 16px 10px; transform-origin: top left; }
.chart-title { font-size: 12.5px; font-weight: 600; margin-bottom: 12px; }
.bars { display: flex; align-items: flex-end; gap: 18px; height: 96px; padding: 0 8px; box-shadow: inset 0 -1px 0 var(--grid); }
.bar { flex: 1; background: var(--accent); border-radius: 4px 4px 0 0; opacity: 0.9; }
.bar-labels { display: flex; gap: 18px; padding: 6px 8px 0; font-size: 11px; color: var(--muted); }
.bar-labels span { flex: 1; text-align: center; }

.replay {
  position: absolute; top: 1px; right: 0;
  display: inline-flex; align-items: center; gap: 6px;
  height: 28px; padding: 0 10px; border: 0; border-radius: 8px;
  background: var(--surface-2); color: var(--muted); box-shadow: var(--ring);
  font: 500 12px/1 var(--font); cursor: pointer;
  transition: transform 160ms var(--ease-out), color 150ms ease;
}
.replay:active { transform: scale(0.97); }
.replay svg { width: 12px; height: 12px; }
@media (hover: hover) and (pointer: fine) {
  .replay:hover { color: var(--fg); }
}

/* ---------- sections ---------- */
section { padding: 88px 0; }
.section-head { max-width: 560px; margin-bottom: 44px; }
.kicker { font-size: 13px; font-weight: 500; color: var(--accent); margin-bottom: 12px; }
h2 { font-size: clamp(28px, 3.6vw, 38px); line-height: 1.12; letter-spacing: -0.03em; font-weight: 650; margin: 0 0 14px; text-wrap: balance; }
.section-head p { color: var(--muted); font-size: 17px; margin: 0; text-wrap: pretty; }

.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.feature { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 24px; }
.feature .icon { width: 36px; height: 36px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; margin-bottom: 18px; }
.feature .icon svg { width: 18px; height: 18px; }
.feature h3 { font-size: 16px; font-weight: 600; letter-spacing: -0.01em; margin: 0 0 6px; }
.feature p { font-size: 14.5px; color: var(--muted); margin: 0; }
@media (max-width: 900px) { .features { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .features { grid-template-columns: 1fr; } }

.safety { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; }
.safety h3 { font-size: 16px; font-weight: 600; margin: 16px 0 6px; }
.safety p { font-size: 14.5px; color: var(--muted); margin: 0; }
.safety .sample { font-family: var(--mono); font-size: 12px; background: var(--surface); box-shadow: var(--shadow-sm); border-radius: 10px; padding: 12px 14px; color: var(--muted); line-height: 1.7; }
.safety .sample b { color: var(--fg); font-weight: 500; }
.safety .sample .err { color: #d93025; }
@media (prefers-color-scheme: dark) { .safety .sample .err { color: #f28b82; } }
@media (max-width: 800px) { .safety { grid-template-columns: 1fr; gap: 32px; } }

.flow { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; align-items: center; gap: 12px; }
.node { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 20px; text-align: center; }
.node.you { box-shadow: 0 0 0 1.5px var(--accent), 0 12px 32px -12px rgba(24, 128, 56, 0.25); }
.node b { display: block; font-weight: 600; margin-bottom: 2px; }
.node span { font-size: 13.5px; color: var(--muted); }
.arrow { color: var(--faint); }
.arrow svg { width: 28px; height: 12px; display: block; }
.flow-note { margin-top: 24px; font-size: 14.5px; color: var(--muted); }
.flow-note a { color: var(--accent); text-underline-offset: 3px; }
@media (max-width: 760px) {
  .flow { grid-template-columns: 1fr; }
  .arrow { justify-self: center; transform: rotate(90deg); }
}

.steps { display: grid; gap: 14px; counter-reset: step; max-width: 760px; }
.step { display: grid; grid-template-columns: 32px 1fr; gap: 16px; align-items: start; }
.step::before { counter-increment: step; content: counter(step); width: 28px; height: 28px; border-radius: 50%; background: var(--surface); box-shadow: var(--shadow-sm); display: grid; place-items: center; font-size: 13px; font-weight: 600; margin-top: 10px; }
.step > div { min-width: 0; }
.step h3 { font-size: 15px; font-weight: 600; margin: 12px 0 8px; }
.step p { font-size: 14.5px; color: var(--muted); margin: 0 0 10px; }
.code { position: relative; display: flex; align-items: center; background: var(--code-bg); border-radius: 10px; box-shadow: var(--ring); }
.code pre { margin: 0; padding: 13px 16px; font-size: 13px; overflow-x: auto; flex: 1; min-width: 0; }
.copy {
  flex: none; margin-right: 6px; width: 32px; height: 32px; border: 0; border-radius: 8px; background: transparent; color: var(--muted);
  display: grid; cursor: pointer; transition: transform 160ms var(--ease-out), color 150ms ease, background-color 150ms ease;
}
.copy:active { transform: scale(0.97); }
.copy svg { grid-area: 1 / 1; place-self: center; width: 15px; height: 15px; transition: opacity 200ms var(--ease-out), transform 200ms var(--ease-out), filter 200ms var(--ease-out); }
.copy .done { opacity: 0; transform: scale(0.8); filter: blur(2px); color: var(--accent); }
.copy.copied .idle { opacity: 0; transform: scale(0.8); filter: blur(2px); }
.copy.copied .done { opacity: 1; transform: none; filter: none; }
@media (hover: hover) and (pointer: fine) {
  .copy:hover { color: var(--fg); background: var(--surface-2); }
}

footer { padding: 40px 0 56px; margin-top: 40px; box-shadow: inset 0 1px 0 var(--grid); font-size: 14px; color: var(--muted); }
footer .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
footer nav { display: flex; gap: 24px; }
footer a { text-decoration: none; transition: color 150ms ease; }
@media (hover: hover) and (pointer: fine) {
  footer a:hover { color: var(--fg); }
}

/* ---------- prose (privacy) ---------- */
.prose { max-width: 680px; padding: 40px 0 40px; }
.prose h1 { font-size: clamp(34px, 4.6vw, 46px); }
.prose h2 { font-size: 20px; letter-spacing: -0.015em; margin: 40px 0 10px; }
.prose p, .prose li { font-size: 16px; color: var(--fg); }
.prose .updated { color: var(--muted); font-size: 14px; margin-bottom: 32px; }
.prose a { color: var(--accent); text-underline-offset: 3px; }
.prose code { font-size: 13.5px; background: var(--code-bg); padding: 2px 6px; border-radius: 5px; }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: 8px; }

@media (prefers-reduced-motion: reduce) {
  .btn:active, .copy:active, .replay:active { transform: none; }
  .copy svg { transition: opacity 150ms ease; }
  .copy .done, .copy.copied .idle { transform: none; filter: none; }
}
