:root {
  --bg: #0a0e13;
  --bg-elev: #10161e;
  --bg-soft: #151c26;
  --line: #243041;
  --text: #e6edf3;
  --muted: #93a4b5;
  --faint: #6d7f90;
  --cyan: #3dcfbf;
  --copper: #e19a3d;
  --copper-dim: #b87728;
  --ok: #3dcfbf;
  --font-display: "Syne", system-ui, sans-serif;
  --font-body: "IBM Plex Sans", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;
  --wrap: min(1080px, calc(100% - 2rem));
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: var(--cyan); text-underline-offset: 0.15em; }
a:hover { color: #6fe0d3; }

code, kbd {
  font-family: var(--font-mono);
  font-size: 0.86em;
}

code {
  color: var(--cyan);
  background: rgba(61, 207, 191, 0.1);
  padding: 0.1em 0.35em;
  border-radius: 3px;
}

.wrap { width: var(--wrap); margin-inline: auto; }

.skip {
  position: absolute;
  left: -999px;
  top: 0.75rem;
  z-index: 100;
  background: var(--copper);
  color: #1a1006;
  padding: 0.5rem 0.8rem;
  font-weight: 600;
}
.skip:focus { left: 0.75rem; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(10, 14, 19, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.site-header__inner {
  width: var(--wrap);
  margin-inline: auto;
  min-height: 3.6rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: 0.12em;
  font-size: 0.95rem;
  color: var(--text);
  text-decoration: none;
}
.logo span {
  color: var(--copper);
  margin-right: 0.35rem;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem 1.1rem;
  font-size: 0.92rem;
}
.nav a {
  color: var(--muted);
  text-decoration: none;
}
.nav a:hover,
.nav a[aria-current="page"] {
  color: var(--text);
}
.nav a[aria-current="page"] {
  box-shadow: inset 0 -2px 0 var(--copper);
}

/* Hero (home) */
.hero {
  padding: 4.5rem 0 3.5rem;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(700px 320px at 90% 0%, rgba(61, 207, 191, 0.08), transparent 60%),
    radial-gradient(500px 280px at 0% 100%, rgba(225, 154, 61, 0.07), transparent 55%),
    var(--bg);
}

.hero__eyebrow {
  margin: 0 0 0.85rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cyan);
}

.hero h1 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.6rem, 7vw, 4.4rem);
  line-height: 1;
  letter-spacing: 0.04em;
}

.hero__tag {
  margin: 0.85rem 0 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.2rem, 2.5vw, 1.55rem);
  color: var(--fog, #c9d5e0);
  max-width: 22ch;
}

.hero__lede {
  margin: 1.1rem 0 0;
  max-width: 40rem;
  color: var(--muted);
  font-size: 1.08rem;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.7rem;
  padding: 0.55rem 1.1rem;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border: 1px solid transparent;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.btn--primary {
  background: var(--copper);
  color: #1a1006;
}
.btn--primary:hover { background: #f0ad52; color: #1a1006; }
.btn--ghost {
  border-color: var(--line);
  color: var(--text);
  background: transparent;
}
.btn--ghost:hover {
  border-color: var(--cyan);
  color: var(--text);
}

/* Page chrome */
.page-hero {
  padding: 3rem 0 2rem;
  border-bottom: 1px solid var(--line);
  background: var(--bg-elev);
}
.page-hero h1 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2rem, 4vw, 2.75rem);
  letter-spacing: -0.02em;
}
.page-hero p {
  margin: 0.75rem 0 0;
  max-width: 44rem;
  color: var(--muted);
}

.section {
  padding: 3.25rem 0;
  border-bottom: 1px solid var(--line);
}
.section:last-of-type { border-bottom: 0; }

.kicker {
  margin: 0 0 0.55rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--copper);
}

.section h2 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.45rem, 2.8vw, 1.9rem);
  letter-spacing: -0.02em;
  max-width: 28ch;
}

.section h3 {
  margin: 1.75rem 0 0.55rem;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
}

.prose {
  margin: 0.9rem 0 0;
  max-width: 46rem;
  color: var(--muted);
}
.prose + .prose { margin-top: 0.75rem; }

.grid-3,
.grid-2 {
  display: grid;
  gap: 1.25rem;
  margin-top: 1.75rem;
}
@media (min-width: 800px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-2 { grid-template-columns: 1fr 1fr; }
}

.tile {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  padding: 1.15rem 1.2rem 1.25rem;
}
.tile h3 {
  margin: 0 0 0.45rem;
  font-family: var(--font-display);
  font-size: 1.05rem;
}
.tile p {
  margin: 0;
  color: var(--muted);
  font-size: 0.98rem;
}
.tile a { text-decoration: none; }
.tile a:hover { text-decoration: underline; }

/* Tables */
.table-wrap {
  margin-top: 1.35rem;
  overflow-x: auto;
  border: 1px solid var(--line);
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}
th, td {
  text-align: left;
  padding: 0.7rem 0.9rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
th {
  background: var(--bg-soft);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
  font-weight: 500;
}
td { color: var(--muted); }
td strong, th { color: var(--text); }
tr:last-child td { border-bottom: 0; }
td:first-child {
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 0.88rem;
  white-space: nowrap;
}

/* Steps / flow */
.steps {
  margin: 1.5rem 0 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
  max-width: 46rem;
}
.steps li {
  position: relative;
  padding: 1rem 0 1rem 3.2rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
}
.steps li::before {
  counter-increment: step;
  content: counter(step, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 1.05rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--cyan);
  letter-spacing: 0.06em;
}
.steps strong { color: var(--text); }

/* Code block */
pre {
  margin: 1.15rem 0 0;
  padding: 1rem 1.1rem;
  overflow-x: auto;
  background: #070a0e;
  border: 1px solid var(--line);
  color: #c8d6e2;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.55;
}
pre code {
  background: none;
  padding: 0;
  color: inherit;
}

/* Doc TOC */
.toc {
  margin-top: 1.5rem;
  display: grid;
  gap: 0.45rem;
}
.toc a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.98rem;
}
.toc a:hover { color: var(--cyan); }

.docs-grid {
  display: grid;
  gap: 0.85rem;
  margin-top: 1.5rem;
}
@media (min-width: 700px) {
  .docs-grid { grid-template-columns: 1fr 1fr; }
}
.doc-link {
  display: block;
  padding: 1rem 1.1rem;
  border: 1px solid var(--line);
  background: var(--bg-elev);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease;
}
.doc-link:hover { border-color: var(--cyan); color: inherit; }
.doc-link strong {
  display: block;
  font-family: var(--font-display);
  margin-bottom: 0.25rem;
}
.doc-link span { color: var(--muted); font-size: 0.95rem; }

.callout {
  margin-top: 1.35rem;
  padding: 1rem 1.15rem;
  border-left: 3px solid var(--copper);
  background: rgba(225, 154, 61, 0.06);
  color: var(--muted);
  max-width: 46rem;
}
.callout strong { color: var(--text); }

.tree {
  margin: 1.15rem 0 0;
  padding: 1rem 1.1rem;
  background: #070a0e;
  border: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  line-height: 1.55;
  color: #b8c8d6;
  white-space: pre;
  overflow-x: auto;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 2rem 0 2.5rem;
  background: #070a0e;
  margin-top: auto;
}
.site-footer__inner {
  width: var(--wrap);
  margin-inline: auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  color: var(--faint);
  font-size: 0.9rem;
}
.site-footer strong {
  color: var(--text);
  font-family: var(--font-display);
  letter-spacing: 0.1em;
}

/* Screenshots */
.shot {
  margin: 1.35rem 0 0;
  border: 1px solid var(--line);
  background: var(--bg-elev);
  overflow: hidden;
}
.shot img {
  width: 100%;
  height: auto;
  display: block;
  vertical-align: top;
}
.shot figcaption {
  margin: 0;
  padding: 0.65rem 0.85rem;
  font-size: 0.9rem;
  color: var(--faint);
  border-top: 1px solid var(--line);
}

/* Guide / docs layout */
.docs-layout {
  display: grid;
  gap: 0;
  width: var(--wrap);
  margin-inline: auto;
}
@media (min-width: 960px) {
  .docs-layout {
    grid-template-columns: 15rem minmax(0, 1fr);
    gap: 2rem;
    align-items: start;
  }
}
.docs-side {
  padding: 1.5rem 0 2rem;
  border-bottom: 1px solid var(--line);
}
@media (min-width: 960px) {
  .docs-side {
    position: sticky;
    top: 3.6rem;
    max-height: calc(100vh - 3.6rem);
    overflow: auto;
    padding: 1.75rem 0 2.5rem;
    border-bottom: 0;
    border-right: 1px solid var(--line);
    padding-right: 1.25rem;
  }
}
.docs-side__label {
  margin: 0 0 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--copper);
}
.docs-side__nav {
  display: grid;
  gap: 0.35rem;
}
.docs-side__nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.92rem;
}
.docs-side__nav a:hover,
.docs-side__nav a[aria-current="page"] {
  color: var(--text);
}
.docs-side__nav a[aria-current="page"] {
  color: var(--cyan);
}
.docs-side__note {
  margin: 1.25rem 0 0;
  font-size: 0.82rem;
  color: var(--faint);
  line-height: 1.45;
}
.docs-main {
  min-width: 0;
}
.page-hero--flush {
  padding-left: 0;
  padding-right: 0;
  background: transparent;
  border-bottom: 1px solid var(--line);
}
.guide-body {
  padding-top: 1.5rem;
  padding-bottom: 3rem;
  border-bottom: 0;
}
.guide-body p {
  margin: 0 0 0.9rem;
  max-width: 46rem;
  color: var(--muted);
}
.guide-body pre {
  margin: 0.85rem 0 1.15rem;
}
.guide-toc {
  margin: 1.25rem 0 0;
  padding: 0;
  list-style: none;
  max-width: 36rem;
}
.guide-toc li {
  border-top: 1px solid var(--line);
}
.guide-toc a {
  display: block;
  padding: 0.7rem 0;
  color: var(--text);
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 600;
}
.guide-toc a:hover { color: var(--cyan); }

@media (max-width: 640px) {
  .nav { gap: 0.15rem 0.75rem; font-size: 0.85rem; }
}
