:root {
  --ink: #1c2431;
  --muted: #4b5565;
  --stone: #f4f1ec;
  --stone-dark: #e6e0d6;
  --paper: #fffcf8;
  --line: #d7d0c4;
  --brass: #8a6a22;
  --orange: #ea6f0a;
  --sea: #0f766e;
  --ok: #016630;
  --bad: #bf000f;
  --shadow: 0 18px 40px rgba(28, 36, 49, 0.06);
  --sans: "Geist", "Avenir Next", "Segoe UI", sans-serif;
  --display: "Playfair Display", "Iowan Old Style", Palatino, serif;
  --mono: "Geist Mono", "IBM Plex Mono", ui-monospace, monospace;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(900px 280px at 90% -40px, rgba(234, 111, 10, 0.14), transparent 60%),
    linear-gradient(180deg, #f7f4ef 0%, var(--stone) 220px);
  font: 16px/1.5 var(--sans);
}
a { color: inherit; }
img { display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--orange); outline-offset: 3px; }

.skip {
  position: absolute;
  left: 12px;
  top: -40px;
  background: var(--ink);
  color: white;
  padding: 8px 12px;
  z-index: 5;
}
.skip:focus { top: 12px; }

.bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 18px 6vw;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 600;
}
.brand em { font-style: normal; color: var(--orange); }
.nav { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.nav a { text-decoration: none; color: var(--muted); }
.nav a:hover { color: var(--ink); }
.nav a[aria-current="page"] { color: var(--ink); font-weight: 600; }

.wrap { padding: 8px 6vw 72px; max-width: 1180px; }
.kicker {
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 12px;
  color: var(--sea);
  margin: 0 0 8px;
}
h1 {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(40px, 6vw, 68px);
  line-height: 1.02;
  letter-spacing: -0.03em;
  margin: 0 0 16px;
}
h2 { font-size: 22px; margin: 0 0 8px; }
.lede, .note { color: var(--muted); max-width: 62ch; }
.lede { font-size: 18px; margin-top: 0; }

.actions, .row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.button, button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: #fff;
  text-decoration: none;
  cursor: pointer;
}
.button.ghost, button.ghost {
  background: transparent;
  color: var(--ink);
}
button:disabled { opacity: 0.55; cursor: wait; }

.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 28px 0; }
.card, .panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
}
.card { padding: 18px 18px 16px; }
.card strong { display: block; margin-bottom: 6px; }
.card p, .panel p { margin: 0; color: var(--muted); }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 22px 0 8px; }
.step { border-top: 2px solid var(--orange); padding-top: 10px; }
.step b { display: block; font-family: var(--mono); font-size: 12px; color: var(--brass); font-weight: 500; }

.sample {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 18px;
  margin-top: 28px;
  padding: 22px;
}
.metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.metric { border-top: 2px solid var(--ink); padding-top: 8px; }
.metric b { display: block; font-family: var(--mono); font-size: 28px; font-weight: 500; }
.metric span { color: var(--muted); font-size: 12px; letter-spacing: 0.04em; text-transform: uppercase; }
.ok { color: var(--ok); }
.bad { color: var(--bad); }
.warn { color: var(--brass); }

.band {
  margin-top: 22px;
  padding: 14px 16px;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 14px;
  color: #7c2d12;
}

footer.colophon {
  padding: 10px 6vw 36px;
  color: var(--muted);
  font-size: 14px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.workspace { display: grid; grid-template-columns: 220px 1fr; gap: 16px; align-items: start; }
.tools { display: flex; flex-direction: column; gap: 6px; padding: 10px; position: sticky; top: 12px; }
.tools button {
  justify-content: flex-start;
  border-radius: 12px;
  background: transparent;
  color: var(--ink);
  border-color: transparent;
}
.tools button[aria-pressed="true"] { background: var(--ink); color: white; border-color: var(--ink); }
.stage { display: grid; gap: 14px; }
.panel { padding: 18px; }
.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 12px 0; }
label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); }
input, select, textarea {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: white;
  padding: 8px 10px;
}
textarea { min-height: 96px; resize: vertical; font-family: var(--mono); font-size: 13px; }
.check { flex-direction: row; align-items: center; gap: 8px; min-height: 42px; color: var(--ink); }
.check input { min-height: 0; width: 18px; height: 18px; }
.hidden { display: none; }
pre, .mono {
  font-family: var(--mono);
  font-size: 12px;
  white-space: pre-wrap;
  background: #f6f3ee;
  border-radius: 10px;
  padding: 12px;
  overflow: auto;
  max-height: 280px;
}
ul.clean { margin: 8px 0 0; padding-left: 18px; }
.account-form { display: grid; gap: 10px; max-width: 420px; }
.chip { font-size: 14px; color: var(--muted); }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.connect-list { display: grid; gap: 12px; }
code, .path { font-family: var(--mono); font-size: 0.92em; }

@media (max-width: 860px) {
  .grid, .steps, .sample, .workspace, .split, .fields, .metrics { grid-template-columns: 1fr; }
  .tools { position: static; flex-direction: row; overflow: auto; }
  .bar { align-items: flex-start; flex-direction: column; }
  h1 { font-size: 38px; }
}
