:root {
  color-scheme: dark;
  --ground: #20262a;
  --ground-deep: #171c1f;
  --panel: #272e32;
  --panel-raised: #2d3539;
  --line: #3b454a;
  --line-soft: #343d42;
  --ink: #eee8da;
  --muted: #aaa293;
  --faint: #777a71;
  --leaf: #9ccc7e;
  --leaf-deep: #78a95d;
  --gold: #e8b65f;
  --gold-ink: #2a1e08;
  --danger: #e38b77;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, ui-serif, serif;
  --sans: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: ui-monospace, "SFMono-Regular", "SF Mono", Menlo, Consolas, monospace;
  --content: 1120px;
  --reading: 760px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 82% -10%, rgba(151, 195, 124, 0.12), transparent 34rem), var(--ground-deep);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--leaf);
  text-underline-offset: 0.18em;
}

a:hover {
  color: #b9df9e;
}

code,
pre {
  font-family: var(--mono);
}

code {
  color: #d8d2c4;
  font-size: 0.88em;
}

pre {
  margin: 1.25rem 0;
  overflow-x: auto;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  background: #121719;
  padding: 1.1rem 1.2rem;
  color: #e6e0d2;
  font-size: 0.88rem;
  line-height: 1.65;
}

pre code {
  color: inherit;
  font-size: inherit;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 10px;
  left: 10px;
  transform: translateY(-160%);
  border-radius: 8px;
  background: var(--gold);
  padding: 0.6rem 0.8rem;
  color: var(--gold-ink);
}

.skip-link:focus {
  transform: none;
}

.site-header {
  position: sticky;
  z-index: 20;
  top: 0;
  border-bottom: 1px solid rgba(59, 69, 74, 0.7);
  background: rgba(23, 28, 31, 0.88);
  backdrop-filter: blur(18px);
}

.header-inner,
.page,
.footer-inner {
  width: min(calc(100% - 40px), var(--content));
  margin-inline: auto;
}

.header-inner {
  display: flex;
  min-height: 64px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 0.92rem;
  font-weight: 650;
  text-decoration: none;
}

.seed {
  width: 10px;
  height: 10px;
  transform: rotate(10deg);
  border-radius: 2px 7px 2px 7px;
  background: var(--leaf);
  box-shadow: 0 0 14px rgba(156, 204, 126, 0.55);
}

.brand em {
  color: var(--faint);
  font-style: normal;
  font-weight: 500;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(12px, 2.4vw, 28px);
  font-family: var(--mono);
  font-size: 0.78rem;
}

.site-nav a {
  color: var(--muted);
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--ink);
}

.hero {
  padding: clamp(72px, 12vw, 140px) 0 clamp(64px, 9vw, 110px);
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--leaf-deep);
  font-family: var(--serif);
  font-size: 1.08rem;
  font-style: italic;
}

h1,
h2,
h3 {
  font-family: var(--serif);
  font-weight: 520;
  letter-spacing: -0.015em;
}

h1 {
  max-width: 800px;
  margin: 0;
  font-size: clamp(2.8rem, 7vw, 5.7rem);
  line-height: 0.98;
  text-wrap: balance;
}

h1 em {
  color: var(--leaf);
  font-style: italic;
}

.lede {
  max-width: 650px;
  margin: 26px 0 0;
  color: var(--muted);
  font-size: clamp(1.05rem, 2vw, 1.3rem);
}

.choice-grid,
.mode-grid,
.fact-grid {
  display: grid;
  gap: 18px;
}

.choice-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 42px;
}

.choice,
.mode,
.fact,
.callout {
  border: 1px solid var(--line-soft);
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(45, 53, 57, 0.9), rgba(34, 41, 44, 0.9));
}

.choice {
  display: flex;
  min-height: 240px;
  flex-direction: column;
  padding: clamp(24px, 4vw, 38px);
  color: inherit;
  text-decoration: none;
  transition:
    transform 150ms ease,
    border-color 150ms ease;
}

.choice:hover {
  transform: translateY(-3px);
  border-color: var(--leaf-deep);
  color: inherit;
}

.choice .number,
.section-number {
  color: var(--leaf);
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.choice h2 {
  margin: auto 0 8px;
  font-size: clamp(1.7rem, 3vw, 2.25rem);
}

.choice p {
  margin: 0;
  color: var(--muted);
}

.choice .arrow {
  margin-top: 22px;
  color: var(--leaf);
  font-family: var(--mono);
}

.flow {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-items: stretch;
  gap: 10px;
  margin-top: 48px;
}

.flow-node {
  position: relative;
  display: grid;
  min-height: 112px;
  place-items: center;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  background: rgba(39, 46, 50, 0.74);
  padding: 16px;
  text-align: center;
}

.flow-node:not(:last-child)::after {
  position: absolute;
  right: -10px;
  width: 10px;
  height: 1px;
  background: var(--leaf-deep);
  content: "";
}

.flow-node strong {
  display: block;
  font-family: var(--serif);
  font-size: 1.05rem;
  font-weight: 520;
}

.flow-node span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.78rem;
}

.section {
  scroll-margin-top: 82px;
  border-top: 1px solid var(--line-soft);
  padding: clamp(72px, 10vw, 118px) 0;
}

.section-head {
  max-width: var(--reading);
}

.section h2,
.article h1 {
  margin: 12px 0 0;
  font-size: clamp(2.1rem, 4vw, 3.5rem);
  line-height: 1.06;
}

.section-head > p,
.article-lede {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 1.08rem;
}

.prose {
  max-width: var(--reading);
  margin-top: 42px;
}

.prose h3 {
  margin: 2.3rem 0 0.65rem;
  font-size: 1.45rem;
}

.prose p,
.prose ul,
.prose ol {
  color: #c5beaf;
}

.prose li + li {
  margin-top: 0.5rem;
}

.prose strong {
  color: var(--ink);
  font-weight: 650;
}

.steps {
  margin: 40px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: steps;
}

.steps li {
  position: relative;
  max-width: var(--reading);
  min-height: 82px;
  border-top: 1px solid var(--line-soft);
  padding: 24px 0 24px 64px;
  counter-increment: steps;
}

.steps li::before {
  position: absolute;
  top: 25px;
  left: 0;
  color: var(--leaf);
  content: counter(steps, decimal-leading-zero);
  font-family: var(--mono);
  font-size: 0.78rem;
}

.steps h3 {
  margin: 0 0 5px;
  font-size: 1.2rem;
}

.steps p {
  margin: 0;
  color: var(--muted);
}

.mode-grid,
.fact-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 36px;
}

.mode,
.fact {
  padding: 28px;
}

.mode h3,
.fact h3 {
  margin: 0 0 8px;
  font-size: 1.35rem;
}

.mode p,
.fact p {
  margin: 0;
  color: var(--muted);
}

.callout {
  max-width: var(--reading);
  margin-top: 32px;
  border-left: 3px solid var(--gold);
  padding: 22px 24px;
}

.callout strong {
  color: var(--gold);
}

.callout p {
  margin: 0;
  color: #cbc3b4;
}

.article {
  max-width: var(--reading);
  padding: clamp(70px, 10vw, 120px) 0;
}

.article h2 {
  margin: 3.2rem 0 0.8rem;
  font-size: 1.8rem;
}

.article h3 {
  margin: 2.1rem 0 0.6rem;
  font-size: 1.25rem;
}

.article p,
.article li {
  color: #c5beaf;
}

.article .updated {
  margin-top: 18px;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 0.78rem;
}

.table-wrap {
  width: calc(100vw - 40px);
  max-width: var(--content);
  margin-top: 40px;
  overflow-x: auto;
  border: 1px solid var(--line-soft);
  border-radius: 16px;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: rgba(30, 36, 39, 0.88);
  font-size: 0.9rem;
}

th,
td {
  padding: 15px 16px;
  border-bottom: 1px solid var(--line-soft);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

tr:last-child td {
  border-bottom: 0;
}

.method {
  color: var(--leaf);
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 700;
}

.status-line {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  padding: 7px 12px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.74rem;
  text-decoration: none;
}

.status-line::before {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--leaf);
  content: "";
}

.site-footer {
  border-top: 1px solid var(--line-soft);
  padding: 38px 0 72px;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 18px 30px;
  color: var(--faint);
  font-size: 0.82rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

.footer-links a {
  color: var(--muted);
  text-decoration: none;
}

@media (max-width: 760px) {
  .choice-grid,
  .mode-grid,
  .fact-grid {
    grid-template-columns: 1fr;
  }

  .flow {
    grid-template-columns: 1fr;
  }

  .flow-node {
    min-height: auto;
  }

  .flow-node:not(:last-child)::after {
    right: auto;
    bottom: -10px;
    left: 50%;
    width: 1px;
    height: 10px;
  }

  .site-nav a.optional {
    display: none;
  }
}

@media (max-width: 480px) {
  .header-inner,
  .page,
  .footer-inner {
    width: min(calc(100% - 28px), var(--content));
  }

  .brand em {
    display: none;
  }

  .site-nav {
    gap: 13px;
  }

  .choice {
    min-height: 210px;
  }

  .steps li {
    padding-left: 46px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .choice {
    transition: none;
  }
}

/* Rendered reference pages (console, CLI, API, how he works) */

.article.reference {
  max-width: 920px;
}

.article .table-wrap {
  width: 100%;
  margin: 1.2rem 0;
}

.article h1 {
  font-size: clamp(2.4rem, 5vw, 4rem);
}

.article h2 code,
.article h3 code {
  font-size: 0.82em;
}

.article h4 {
  margin: 1.6rem 0 0.4rem;
  font-family: var(--serif);
  font-size: 1.05rem;
}

.article blockquote {
  margin: 1.4rem 0;
  border-left: 3px solid var(--gold);
  border-radius: 0 12px 12px 0;
  background: rgba(45, 53, 57, 0.6);
  padding: 16px 20px;
}

.article blockquote p {
  margin: 0;
  color: #cbc3b4;
}

.article code {
  overflow-wrap: anywhere;
}

.article td:first-child,
.article td:nth-child(2) code {
  white-space: nowrap;
}

.article td:last-child {
  min-width: 14rem;
}

.article hr {
  margin: 3rem 0;
  border: 0;
  border-top: 1px solid var(--line-soft);
}

.article img {
  max-width: 100%;
  border-radius: 12px;
}

.toc {
  margin: 1.8rem 0 0;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  background: rgba(39, 46, 50, 0.6);
  padding: 18px 22px;
  font-size: 0.86rem;
}

.toc ul {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 4px 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.toc li {
  color: var(--muted);
}

.toc li a {
  text-decoration: none;
}

.toc code {
  font-size: 0.86em;
}

/* Landing reference cards */

.fact-link {
  color: inherit;
  text-decoration: none;
  transition:
    transform 150ms ease,
    border-color 150ms ease;
}

.fact-link:hover {
  transform: translateY(-3px);
  border-color: var(--leaf-deep);
  color: inherit;
}

/* How he works: surfaces → service → what he reaches */

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

.diagram h4 {
  margin: 0 0 4px;
  color: var(--leaf);
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.diagram-col {
  display: grid;
  align-content: start;
  gap: 8px;
}

.diagram-center {
  align-content: center;
}

.dnode {
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: rgba(39, 46, 50, 0.74);
  padding: 12px 14px;
}

.dnode-main {
  border-color: var(--leaf-deep);
  background: linear-gradient(145deg, rgba(45, 53, 57, 0.95), rgba(34, 41, 44, 0.95));
  box-shadow: 0 0 24px rgba(156, 204, 126, 0.12);
}

.dnode strong {
  display: block;
  font-family: var(--serif);
  font-size: 1rem;
  font-weight: 520;
}

.dnode span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.76rem;
}

.site-nav a.narrow {
  display: none;
}

@media (max-width: 760px) {
  .diagram {
    grid-template-columns: 1fr;
  }

  .site-nav a.narrow {
    display: inline;
  }
}
