:root {
  color-scheme: dark light;
  --bg: #0a0f15;
  --bg-elevated: #101720;
  --panel: #131c26;
  --panel-strong: #172330;
  --text: #f3f7fb;
  --muted: #a8b4c0;
  --faint: #72808e;
  --line: #263341;
  --accent: #62e6a7;
  --accent-strong: #42d392;
  --accent-ink: #06140d;
  --blue: #8ab4ff;
  --warning: #ffd166;
  --danger: #ff8f8f;
  --shadow: 0 20px 60px rgba(0, 0, 0, .28);
  --radius: 18px;
  --content: 1120px;
  --reading: 760px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 15% -10%, rgba(98, 230, 167, .12), transparent 34rem),
    radial-gradient(circle at 95% 10%, rgba(138, 180, 255, .11), transparent 32rem),
    var(--bg);
  color: var(--text);
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}

::selection { background: rgba(98, 230, 167, .28); }
a { color: var(--blue); text-underline-offset: .18em; }
a:hover { color: var(--accent); }
img, svg { display: block; max-width: 100%; }
code, pre, kbd { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; }
code { font-size: .9em; }

.skip-link {
  position: fixed; left: 1rem; top: -5rem; z-index: 1000;
  padding: .7rem 1rem; border-radius: .7rem; background: var(--accent); color: var(--accent-ink);
  font-weight: 800; text-decoration: none;
}
.skip-link:focus { top: 1rem; }

.site-header {
  position: sticky; top: 0; z-index: 100;
  border-bottom: 1px solid rgba(38, 51, 65, .78);
  background: rgba(10, 15, 21, .82);
  backdrop-filter: blur(18px);
}
.header-inner {
  width: min(calc(100% - 2rem), var(--content)); margin: 0 auto;
  min-height: 68px; display: flex; align-items: center; gap: 1.2rem;
}
.brand { display: inline-flex; align-items: center; gap: .72rem; color: var(--text); text-decoration: none; font-weight: 850; letter-spacing: -.02em; }
.brand img { width: 36px; height: 36px; }
.nav-toggle { display: none; margin-left: auto; }
.site-nav { margin-left: auto; display: flex; align-items: center; gap: .25rem; }
.site-nav a { color: var(--muted); text-decoration: none; font-size: .91rem; font-weight: 680; padding: .52rem .65rem; border-radius: .7rem; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--text); background: rgba(255,255,255,.055); }
.github-link { border: 1px solid var(--line); }

.container { width: min(calc(100% - 2rem), var(--content)); margin-inline: auto; }
.reading { width: min(calc(100% - 2rem), var(--reading)); margin-inline: auto; }
.section { padding: 5.3rem 0; }
.section-tight { padding: 3.5rem 0; }
.section-border { border-top: 1px solid var(--line); }
.eyebrow { color: var(--accent); font-size: .78rem; font-weight: 850; letter-spacing: .14em; text-transform: uppercase; }

h1, h2, h3 { line-height: 1.12; letter-spacing: -.035em; text-wrap: balance; }
h1 { font-size: clamp(2.65rem, 7vw, 5.6rem); margin: 0 0 1.35rem; }
h2 { font-size: clamp(2rem, 4.5vw, 3.35rem); margin: 0 0 1rem; }
h3 { font-size: 1.3rem; margin: 0 0 .55rem; }
p { margin: 0 0 1.15rem; }
.lead { color: var(--muted); font-size: clamp(1.1rem, 2.2vw, 1.35rem); max-width: 730px; }
.subtle { color: var(--muted); }
.fine-print { color: var(--faint); font-size: .84rem; }

.hero { padding: clamp(5rem, 10vw, 8.8rem) 0 5rem; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.08fr .92fr; gap: clamp(2rem, 6vw, 5rem); align-items: center; }
.hero-grid > *, .grid-2 > *, .grid-3 > *, .grid-4 > * { min-width: 0; }
.hero h1 span { color: var(--accent); }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin: 2rem 0 1.4rem; }
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  min-height: 46px; padding: .7rem 1rem; border-radius: .78rem; border: 1px solid var(--line);
  color: var(--text); background: var(--panel); text-decoration: none; font-weight: 790; cursor: pointer;
}
.button:hover { color: var(--text); border-color: #3c5064; transform: translateY(-1px); }
.button-primary { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.button-primary:hover { color: var(--accent-ink); background: #79efb7; }
.button-small { min-height: 38px; padding: .45rem .75rem; font-size: .88rem; }

.command-card { display: inline-flex; max-width: 100%; align-items: center; gap: .8rem; background: #070b10; border: 1px solid var(--line); border-radius: .8rem; padding: .68rem .75rem .68rem .95rem; }
.command-card code { overflow-x: auto; white-space: nowrap; color: #dce7f2; }
.copy-button { border: 0; border-radius: .55rem; padding: .38rem .58rem; background: #1a2632; color: var(--muted); font: inherit; font-size: .78rem; font-weight: 750; cursor: pointer; }
.copy-button:hover { color: var(--text); background: #223140; }

.terminal { overflow: hidden; border: 1px solid #2a3744; border-radius: var(--radius); background: #070b10; box-shadow: var(--shadow); }
.terminal-bar { height: 44px; display: flex; align-items: center; gap: .45rem; padding: 0 .9rem; border-bottom: 1px solid #202b36; background: #0d131a; }
.dot { width: 11px; height: 11px; border-radius: 50%; background: #344250; }
.dot:nth-child(1) { background: #ff6b6b; } .dot:nth-child(2) { background: #ffd166; } .dot:nth-child(3) { background: #62e6a7; }
.terminal-title { margin-left: .55rem; color: var(--faint); font-size: .78rem; }
.terminal pre { margin: 0; min-height: 460px; padding: 1.25rem; overflow: auto; color: #dbe7f3; font-size: clamp(.76rem, 1.6vw, .9rem); line-height: 1.72; }
.prompt { color: var(--accent); } .dim { color: #778697; } .auto { color: var(--accent); } .review { color: var(--warning); } .unknown { color: var(--blue); }

.proof-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; border: 1px solid var(--line); background: var(--line); border-radius: var(--radius); overflow: hidden; }
.proof-item { background: var(--bg-elevated); padding: 1.25rem; }
.proof-item strong { display: block; font-size: .97rem; margin-bottom: .2rem; }
.proof-item span { color: var(--muted); font-size: .86rem; }

.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.card { border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(150deg, rgba(255,255,255,.025), transparent 60%), var(--bg-elevated); padding: 1.5rem; }
.card p:last-child { margin-bottom: 0; }
.card-number { display: grid; place-items: center; width: 2.15rem; height: 2.15rem; border-radius: .65rem; margin-bottom: 1rem; background: rgba(98,230,167,.12); color: var(--accent); font-weight: 900; }
.tag { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; padding: .22rem .55rem; font-size: .72rem; font-weight: 850; letter-spacing: .07em; }
.tag-auto { color: var(--accent); background: rgba(98,230,167,.08); }
.tag-review { color: var(--warning); background: rgba(255,209,102,.08); }
.tag-blocked { color: var(--danger); background: rgba(255,143,143,.08); }
.tag-unknown { color: var(--blue); background: rgba(138,180,255,.08); }

.callout { border: 1px solid rgba(98,230,167,.3); border-radius: var(--radius); padding: 1.4rem; background: rgba(98,230,167,.06); }
.callout-warning { border-color: rgba(255,209,102,.35); background: rgba(255,209,102,.055); }
.callout strong { color: var(--text); }

.page-hero { padding: 5.5rem 0 3.5rem; border-bottom: 1px solid var(--line); }
.page-hero h1 { max-width: 900px; font-size: clamp(2.5rem, 6vw, 4.5rem); }
.breadcrumb { display: flex; flex-wrap: wrap; gap: .45rem; color: var(--faint); font-size: .86rem; margin-bottom: 1.4rem; }
.breadcrumb a { color: var(--muted); }
.article { padding: 3.8rem 0 6rem; }
.article h2 { margin-top: 3.4rem; font-size: clamp(1.65rem, 3vw, 2.35rem); }
.article h3 { margin-top: 2rem; }
.article ul, .article ol { padding-left: 1.35rem; }
.article li { margin-bottom: .5rem; }
.article pre { padding: 1rem; overflow: auto; background: #070b10; border: 1px solid var(--line); border-radius: .9rem; color: #dce7f2; font-size: .84rem; }
.article table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; font-size: .92rem; }
.article th, .article td { text-align: left; vertical-align: top; padding: .75rem; border-bottom: 1px solid var(--line); }
.article th { color: var(--text); }
.article td { color: var(--muted); }
.anchor-heading { scroll-margin-top: 90px; }

.steps { counter-reset: steps; display: grid; gap: 1rem; }
.step { counter-increment: steps; position: relative; padding: 1.2rem 1.2rem 1.2rem 4rem; border: 1px solid var(--line); border-radius: 1rem; background: var(--bg-elevated); }
.step::before { content: counter(steps); position: absolute; left: 1rem; top: 1rem; display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: .6rem; color: var(--accent); background: rgba(98,230,167,.1); font-weight: 900; }
.step p:last-child { margin-bottom: 0; }

.timeline { position: relative; display: grid; gap: 1.2rem; margin: 2rem 0; }
.timeline::before { content: ""; position: absolute; left: .68rem; top: .5rem; bottom: .5rem; width: 2px; background: var(--line); }
.timeline-item { position: relative; padding-left: 2.6rem; }
.timeline-item::before { content: ""; position: absolute; left: .32rem; top: .45rem; width: .75rem; height: .75rem; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 5px var(--bg); }

.faq details { border-top: 1px solid var(--line); padding: 1rem 0; }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; font-weight: 800; color: var(--text); }
.faq details p { color: var(--muted); margin: .8rem 0 0; }

.cta { text-align: center; border: 1px solid var(--line); border-radius: calc(var(--radius) + 8px); padding: clamp(2rem, 6vw, 4.2rem); background: radial-gradient(circle at 50% -20%, rgba(98,230,167,.18), transparent 55%), var(--bg-elevated); }
.cta .lead { margin-inline: auto; }
.cta .hero-actions { justify-content: center; }

.site-footer { border-top: 1px solid var(--line); padding: 2.3rem 0; color: var(--muted); font-size: .88rem; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; }
.footer-links { display: flex; flex-wrap: wrap; gap: 1rem; }
.footer-links a { color: var(--muted); }

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .v040-grid { grid-template-columns: 1fr; }
  .proof-grid { grid-template-columns: repeat(2, 1fr); }
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .terminal pre { min-height: auto; }
  .nav-toggle { display: inline-flex; border: 1px solid var(--line); border-radius: .65rem; background: transparent; color: var(--text); padding: .5rem .65rem; font: inherit; font-weight: 750; }
  .site-nav { display: none; position: absolute; left: 1rem; right: 1rem; top: 63px; flex-direction: column; align-items: stretch; padding: .6rem; border: 1px solid var(--line); border-radius: 1rem; background: #0d141c; box-shadow: var(--shadow); }
  .site-nav.is-open { display: flex; }
}
@media (max-width: 620px) {
  body { font-size: 16px; }
  .section { padding: 4rem 0; }
  .proof-grid, .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .hero { padding-top: 4.3rem; }
  .hero-actions .button { width: 100%; }
  .command-card { width: 100%; }
  .command-card code { flex: 1; }
  .article table { display: block; overflow-x: auto; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
@media (prefers-color-scheme: light) {
  :root {
    --bg: #f6f8fa; --bg-elevated: #ffffff; --panel: #ffffff; --panel-strong: #f0f4f7;
    --text: #111820; --muted: #4e5d6a; --faint: #6f7c87; --line: #d7e0e7;
    --accent: #0b8f57; --accent-strong: #087847; --accent-ink: #ffffff; --blue: #245fa9;
    --warning: #8d5d00; --danger: #b73535; --shadow: 0 20px 60px rgba(21, 35, 48, .12);
  }
  body { background: radial-gradient(circle at 15% -10%, rgba(11,143,87,.09), transparent 34rem), radial-gradient(circle at 95% 10%, rgba(36,95,169,.08), transparent 32rem), var(--bg); }
  .site-header { background: rgba(246,248,250,.88); }
  .terminal, .article pre, .command-card { background: #0b1118; }
  .terminal-bar { background: #101820; }
  .terminal pre, .article pre, .command-card code { color: #e6eef7; }
  .button-primary { color: white; }
}
