:root {
  color-scheme: light;
  --paper: #fff4b8;
  --paper-2: #fffdf1;
  --ink: #17120c;
  --muted: #5f5549;
  --border: #17120c;
  --green: #54c79d;
  --blue: #5b8cff;
  --red: #ff6d5f;
  --purple: #a87cff;
  --yellow: #ffd342;
  --black: #0b0b0b;
  --shadow: 6px 6px 0 var(--border);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(rgba(23, 18, 12, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(23, 18, 12, 0.035) 1px, transparent 1px),
    var(--paper);
  background-size: 22px 22px;
  line-height: 1.55;
}

a { color: inherit; }

.site-nav {
  position: sticky;
  z-index: 10;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px clamp(18px, 4vw, 54px);
  background: var(--paper-2);
  border-bottom: 3px solid var(--border);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: Georgia, serif;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: 0;
  text-decoration: none;
  white-space: nowrap;
}

.brand img {
  width: 34px;
  height: 34px;
  border: 2px solid var(--border);
  background: var(--black);
}

.nav-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
}

.nav-links a {
  padding: 6px 10px;
  border: 2px solid transparent;
  text-decoration: none;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  background: var(--yellow);
  border-color: var(--border);
}

.hero {
  position: relative;
  overflow: hidden;
  min-height: 88vh;
  display: grid;
  align-items: end;
  padding: 74px clamp(20px, 5vw, 72px) 46px;
  background:
    linear-gradient(rgba(23, 18, 12, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(23, 18, 12, 0.055) 1px, transparent 1px),
    linear-gradient(135deg, #fff9d1 0%, #fff4b8 58%, #ffd342 100%);
  background-size: 28px 28px, 28px 28px, auto;
  border-bottom: 5px solid var(--border);
}

.hero-copy {
  position: relative;
  z-index: 1;
  max-width: 960px;
}

.page-hero {
  padding: 70px clamp(20px, 5vw, 72px) 52px;
  border-bottom: 5px solid var(--border);
  background:
    linear-gradient(rgba(23, 18, 12, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(23, 18, 12, 0.055) 1px, transparent 1px),
    linear-gradient(135deg, #fffdf1 0%, #fff4b8 76%, #ffd342 100%);
  background-size: 28px 28px, 28px 28px, auto;
}

.hero-inner,
.section-inner {
  max-width: 1160px;
  margin: 0 auto;
}

.eyebrow,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 16px;
  padding: 7px 10px;
  background: var(--green);
  border: 2px solid var(--border);
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  box-shadow: 3px 3px 0 var(--border);
}

.section-kicker {
  background: var(--black);
  color: var(--paper-2);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 12px;
}

h1,
h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  letter-spacing: 0;
}

h1 {
  max-width: 900px;
  font-size: clamp(46px, 6.2vw, 84px);
  line-height: 0.94;
}

h2 {
  max-width: 820px;
  margin-bottom: 18px;
  font-size: clamp(32px, 5vw, 58px);
  line-height: 1.03;
}

h3 {
  margin: 0 0 10px;
  font-size: 19px;
}

.hero p,
.page-hero p {
  max-width: 760px;
  margin: 24px 0 0;
  color: var(--ink);
  font-size: clamp(18px, 2vw, 24px);
  font-weight: 650;
}

.lead {
  max-width: 780px;
  margin: 0;
  color: var(--muted);
  font-size: 19px;
  font-weight: 560;
}

.hero-notes,
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
}

.hero-notes li,
.chip {
  padding: 7px 10px;
  background: var(--paper-2);
  border: 2px solid var(--border);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 13px;
  font-weight: 800;
}

.actions {
  gap: 12px;
  margin-top: 28px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border: 3px solid var(--border);
  background: var(--paper-2);
  color: var(--ink);
  text-decoration: none;
  font-weight: 900;
  box-shadow: 4px 4px 0 var(--border);
  transition: transform 120ms ease, box-shadow 120ms ease;
}

.button:hover {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 var(--border);
}

.button.primary {
  background: var(--yellow);
  border-color: var(--border);
  color: var(--ink);
}

main { background: transparent; }

section,
.doc-section {
  scroll-margin-top: 82px;
  padding: 74px clamp(20px, 5vw, 72px);
  border-bottom: 4px solid var(--border);
}

section:nth-child(2n),
.doc-section.alt { background: var(--paper-2); }

.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 34px;
}

.feature,
.panel {
  min-height: 198px;
  padding: 20px;
  border: 3px solid var(--border);
  background: var(--paper-2);
  box-shadow: var(--shadow);
}

.feature:nth-child(3n + 1) { background: #dff8ef; }
.feature:nth-child(3n + 2) { background: #e8edff; }
.feature:nth-child(3n + 3) { background: #ffe1dc; }

.feature p,
.panel p,
.panel li {
  color: var(--ink);
  font-size: 15px;
}

.flow {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 30px;
  align-items: center;
  margin-top: 34px;
}

.screenshot-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  margin-top: 34px;
}

.flow img,
.screenshot-row img {
  width: 100%;
  display: block;
  border: 4px solid var(--border);
  background: var(--black);
  box-shadow: var(--shadow);
}

.screenshot-card {
  margin: 0;
  padding: 12px;
  border: 3px solid var(--border);
  background: var(--paper-2);
  box-shadow: var(--shadow);
}

.screenshot-card img {
  width: 100%;
  display: block;
  border-width: 3px;
  box-shadow: none;
}

figcaption {
  margin-top: 10px;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 12px;
  font-weight: 800;
  color: var(--muted);
}

pre {
  overflow-x: auto;
  margin: 0;
  padding: 20px;
  background: var(--black);
  border: 4px solid var(--border);
  color: #f7f0d8;
  font-size: 14px;
  line-height: 1.6;
  box-shadow: var(--shadow);
}

code { font-family: "SFMono-Regular", Consolas, monospace; }

.compare,
.doc-table {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin-top: 34px;
  border: 3px solid var(--border);
  background: var(--border);
  box-shadow: var(--shadow);
}

.compare div,
.doc-table div {
  background: var(--paper-2);
  padding: 18px;
  border-right: 2px solid var(--border);
}

.compare div:last-child,
.doc-table div:last-child { border-right: 0; }

.compare strong,
.doc-table strong {
  display: block;
  margin-bottom: 8px;
  color: var(--red);
  font-family: "SFMono-Regular", Consolas, monospace;
  text-transform: uppercase;
  font-size: 12px;
}

.doc-grid {
  display: grid;
  grid-template-columns: minmax(0, 260px) minmax(0, 1fr);
  gap: 34px;
  align-items: start;
}

.toc {
  position: sticky;
  top: 92px;
  padding: 18px;
  border: 3px solid var(--border);
  background: #e8edff;
  box-shadow: var(--shadow);
}

.toc strong {
  display: block;
  margin-bottom: 10px;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 12px;
  text-transform: uppercase;
}

.toc a {
  display: block;
  margin: 8px 0;
  font-weight: 800;
}

.doc-content {
  min-width: 0;
}

.doc-content h2 {
  margin-top: 44px;
}

.doc-content h2:first-child {
  margin-top: 0;
}

.doc-content p,
.doc-content li {
  max-width: 820px;
}

.callout {
  margin: 24px 0;
  padding: 18px;
  border: 3px solid var(--border);
  background: #dff8ef;
  box-shadow: var(--shadow);
}

.callout strong {
  display: block;
  margin-bottom: 6px;
}

footer {
  padding: 42px clamp(20px, 5vw, 72px);
  color: var(--paper-2);
  background: var(--black);
}

footer a {
  color: var(--paper-2);
}

@media (max-width: 920px) {
  .doc-grid,
  .grid,
  .flow,
  .screenshot-row,
  .compare,
  .doc-table {
    grid-template-columns: 1fr;
  }

  .toc {
    position: static;
  }

  .compare div,
  .doc-table div {
    border-right: 0;
    border-bottom: 2px solid var(--border);
  }

  .compare div:last-child,
  .doc-table div:last-child {
    border-bottom: 0;
  }
}

@media (max-width: 820px) {
  .site-nav {
    position: static;
    align-items: flex-start;
    flex-direction: column;
  }

  .nav-links { gap: 6px; }

  .hero {
    min-height: 78vh;
    padding-top: 48px;
    background:
      linear-gradient(rgba(23, 18, 12, 0.055) 1px, transparent 1px),
      linear-gradient(90deg, rgba(23, 18, 12, 0.055) 1px, transparent 1px),
      linear-gradient(135deg, #fff9d1 0%, #fff4b8 68%, #ffd342 100%);
    background-size: 26px 26px, 26px 26px, auto;
  }
}
