/* The page is drawn like the app: one teal lane runs down the left, every section is a node on it,
   and the graph section forks onto an amber lane and merges back. Tokens come from the app (DESIGN.md). */
:root {
  --ground: #e6efed; --surface: #fbfcfc; --raised: #d5e3e0; --ink: #15201f; --muted: #4b5a58;
  --line: #c6d6d2; --accent: #0b7a6f; --accent-ink: #ffffff; --hit: #c4ebe5; --fork: #a85d00;
  --radius: 4px; --rail: 40px;
  --mono: ui-monospace, "JetBrains Mono", "DejaVu Sans Mono", monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --ground: #0f1918; --surface: #161b1d; --raised: #22302e; --ink: #e6eceb; --muted: #9fb0ad;
    --line: #2b3937; --accent: #3cc9b8; --accent-ink: #06201d; --hit: #1d4a44; --fork: #f0a43a;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; background: var(--ground); color: var(--ink);
  font: 18px/1.55 system-ui, "Cantarell", "Noto Sans", sans-serif;
}
::selection { background: var(--hit); color: var(--ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
a { color: var(--accent); text-underline-offset: 3px; }
code, kbd { font: 0.88em var(--mono); }
code { background: var(--raised); padding: 1px 5px; border-radius: 2px; }
kbd { border: 1px solid var(--line); border-bottom-width: 2px; border-radius: var(--radius); padding: 0 5px; background: var(--surface); }
img { display: block; max-width: 100%; height: auto; }

.top, main, .end { width: min(1120px, 100% - 32px); margin-inline: auto; }

.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 0; flex-wrap: wrap; }
.wordmark { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 700; font-size: 20px; letter-spacing: -0.015em; }
.top nav { display: flex; gap: 20px; font-size: 16px; }
.top nav a { color: var(--ink); text-decoration: none; }
.top nav a:hover { color: var(--accent); text-decoration: underline; }

/* The main lane. */
main {
  position: relative; padding-left: var(--rail);
  background: linear-gradient(var(--accent), var(--accent)) no-repeat 7px 0 / 2px 100%;
}
.node { position: relative; padding: 56px 0 120px; }
.node > h1::before, .node > h2::before {
  content: ""; position: absolute; left: calc(-1 * var(--rail)); width: 16px; height: 16px; margin-top: 0.3em;
  border-radius: 50%; background: var(--ground); border: 3px solid var(--accent);
}
.hero > h1::before { background: var(--accent); margin-top: 0.35em; }

h1, h2, h3 { margin: 0; letter-spacing: -0.03em; line-height: 1.02; }
h1 { font-size: clamp(34px, 6.6vw, 84px); max-width: 16ch; }
h2 { font-size: clamp(30px, 4.2vw, 48px); max-width: 22ch; line-height: 1.08; }
h3 { font-size: 24px; letter-spacing: -0.015em; line-height: 1.2; }
p { margin: 0; max-width: 64ch; }
.lead { font-size: clamp(19px, 2vw, 23px); margin-top: 24px; max-width: 46ch; }
.fine { font-size: 15px; color: var(--muted); margin-top: 16px; }
.fine a + a::before { content: ""; margin-left: 20px; }

.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }
.button {
  display: inline-flex; align-items: center; gap: 10px; padding: 14px 22px; border-radius: var(--radius);
  background: var(--raised); color: var(--ink); text-decoration: none; font-weight: 700; font-size: 18px;
  transition: background-color .15s ease-out;
}
.button:hover { background: var(--line); }
.button.primary { background: var(--accent); color: var(--accent-ink); }
.button.primary:hover { background: color-mix(in srgb, var(--accent) 86%, var(--ink)); }
.button:active { transform: translateY(1px); }
.button svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

.shot { margin: 48px 0 0; }
.shot img { border-radius: var(--radius); background: var(--surface); box-shadow: 0 1px 0 var(--line), 0 24px 48px -28px rgb(0 0 0 / .45); }

.cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; margin-top: 40px; }
.cols strong { display: block; margin-bottom: 6px; }
.aside { margin-top: 64px; padding: 28px 32px; background: var(--surface); border-radius: var(--radius); max-width: 860px; }
.aside p { margin-top: 12px; }

/* The fork: an amber lane leaves the main one, runs beside the section, and merges back. */
.fork { margin-left: 28px; padding-left: 28px; }
.fork::before {
  content: ""; position: absolute; left: -61px; top: 20px; bottom: 80px; width: 50px;
  border: 2px solid var(--fork); border-left: 0; border-radius: 0 14px 14px 0;
}
.fork > h2::before { left: -20px; border-color: var(--fork); }
.fork > p { margin-top: 24px; }

.promises { display: grid; grid-template-columns: repeat(2, 1fr); gap: 32px 48px; margin: 40px 0 0; }
.promises dt { font-weight: 700; font-size: 20px; }
.promises dd { margin: 6px 0 0; max-width: 46ch; }

.steps { margin: 40px 0 32px; padding-left: 1.3em; display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; max-width: 760px; }
.steps li::marker { font-weight: 700; color: var(--accent); }
.command {
  display: flex; align-items: center; gap: 12px; margin-top: 12px; padding: 12px 12px 12px 18px;
  background: var(--surface); border-radius: var(--radius); flex-wrap: wrap;
}
.command code { background: none; padding: 0; font-size: 16px; flex: 1; min-width: 0; overflow-x: auto; }
.command button {
  font: inherit; font-size: 15px; font-weight: 700; border: 0; border-radius: var(--radius); padding: 6px 14px;
  background: var(--raised); color: var(--ink); cursor: pointer;
}
.command button:hover { background: var(--line); }

.end { padding: 96px 0 64px; border-top: 1px solid var(--line); }
.end > p:first-child { font-size: clamp(24px, 3vw, 34px); font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; max-width: 26ch; margin-bottom: 28px; }
.end .fine { margin-top: 40px; }

@media (max-width: 860px) {
  .cols, .promises { grid-template-columns: 1fr; gap: 24px; }
  .node { padding-bottom: 88px; }
}
@media (max-width: 560px) {
  :root { --rail: 28px; }
  body { font-size: 17px; }
  .top nav { gap: 14px; font-size: 15px; }
  .fork { margin-left: 14px; padding-left: 14px; }
  .fork::before { left: -34px; width: 30px; }
  .fork > h2::before { left: -13px; }
  .aside { padding: 22px 20px; }
  .command code { flex-basis: 100%; }
  .button { width: 100%; justify-content: center; font-size: 16px; padding: 14px 16px; }
}
