/* Palette G, the same tokens the app ships in src/theme/colors.ts.
   One surface, hairline rules, no floating boxes — hierarchy comes from type. */

:root {
  --ground: #F7F7F4;
  --fill: #ECECE8;
  --ink: #141518;
  --muted: #6F7278;
  --faint: #A6A8AC;
  --line: #E2E2DE;
  --line-strong: #CBCBC6;
  --accent: #2748D9;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ground: #0D0D0D;
    --fill: #1A1A19;
    --ink: #F2F2EF;
    --muted: #9A9A96;
    --faint: #5C5C59;
    --line: #232322;
    --line-strong: #343432;
    --accent: #6D87F5;
  }
}

:root[data-theme="dark"] {
  --ground: #0D0D0D;
  --fill: #1A1A19;
  --ink: #F2F2EF;
  --muted: #9A9A96;
  --faint: #5C5C59;
  --line: #232322;
  --line-strong: #343432;
  --accent: #6D87F5;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: 'Archivo', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  font-variation-settings: 'wdth' 100;
  font-size: 16.5px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: 660px;
  margin: 0 auto;
  padding-inline: 24px;
  padding-block: 0 72px;
}

/* --- header ------------------------------------------------------------ */

header.bar {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  padding-block: 26px 22px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 52px;
}

.wordmark {
  font-weight: 700;
  font-variation-settings: 'wdth' 96;
  font-size: 19px;
  letter-spacing: -0.015em;
  color: var(--ink);
  text-decoration: none;
}

nav.bar-nav {
  display: flex;
  gap: 22px;
  font-size: 14px;
}

nav.bar-nav a {
  color: var(--muted);
  text-decoration: none;
}

nav.bar-nav a:hover,
nav.bar-nav a[aria-current] { color: var(--ink); }

/* --- type -------------------------------------------------------------- */

h1 {
  font-size: clamp(34px, 7.5vw, 50px);
  font-weight: 700;
  font-variation-settings: 'wdth' 95;
  letter-spacing: -0.03em;
  line-height: 1.06;
  margin: 0 0 20px;
  text-wrap: balance;
}

h2 {
  font-size: 21px;
  font-weight: 700;
  font-variation-settings: 'wdth' 97;
  letter-spacing: -0.015em;
  line-height: 1.25;
  margin: 0 0 14px;
}

h3 {
  font-size: 16.5px;
  font-weight: 600;
  letter-spacing: -0.005em;
  margin: 0 0 6px;
}

p { margin: 0 0 16px; max-width: 60ch; }

.lead {
  font-size: 19px;
  line-height: 1.5;
  color: var(--muted);
  margin-bottom: 26px;
}

.label {
  font-size: 11px;
  font-weight: 600;
  font-variation-settings: 'wdth' 108;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--faint);
  margin: 0 0 14px;
}

a { color: var(--accent); text-underline-offset: 3px; }

strong { font-weight: 600; }

/* --- sections ---------------------------------------------------------- */

section { padding-block: 40px; border-top: 1px solid var(--line); }

section:first-of-type { border-top: 0; padding-top: 0; }

.status {
  display: inline-block;
  font-size: 14px;
  color: var(--muted);
  border-left: 2px solid var(--accent);
  padding-left: 12px;
  margin-bottom: 8px;
}

/* --- measured rows ----------------------------------------------------- */

dl.rows { margin: 0; }

dl.rows > div {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 24px;
  align-items: baseline;
  padding-block: 14px;
  border-bottom: 1px solid var(--line);
}

dl.rows > div:first-child { border-top: 1px solid var(--line-strong); }

dl.rows dt {
  font-weight: 600;
  font-size: 16px;
}

dl.rows dd {
  margin: 0;
  grid-column: 2;
  grid-row: 1;
  font-size: 13.5px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  text-align: right;
  white-space: nowrap;
}

dl.rows dd.note {
  grid-column: 1 / -1;
  grid-row: auto;
  font-size: 14px;
  color: var(--muted);
  margin: 0;
  max-width: 54ch;
  text-align: left;
  white-space: normal;
}

/* --- steps ------------------------------------------------------------- */

ol.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; }

ol.steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 0 14px;
  padding-block: 18px;
  border-top: 1px solid var(--line);
}

ol.steps li::before {
  content: counter(step);
  grid-row: 1 / span 2;
  font-size: 13px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--accent);
  padding-top: 3px;
}

ol.steps p { margin: 0; color: var(--muted); font-size: 15.5px; }

/* --- long-form documents ----------------------------------------------- */

.doc h2 { margin-top: 40px; padding-top: 28px; border-top: 1px solid var(--line); }

.doc h2:first-of-type { margin-top: 30px; }

.doc ul { padding-left: 20px; margin: 0 0 16px; max-width: 60ch; }

.doc li { margin-bottom: 7px; }

.doc .meta { font-size: 14px; color: var(--muted); }

/* --- footer ------------------------------------------------------------ */

footer {
  margin-top: 56px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  align-items: baseline;
  font-size: 14px;
  color: var(--muted);
}

footer a { color: var(--muted); text-decoration: none; }

footer a:hover { color: var(--ink); }

footer .spacer { margin-left: auto; }

@media (max-width: 460px) {
  footer .spacer { margin-left: 0; width: 100%; }
  dl.rows > div { grid-template-columns: 1fr; }
  dl.rows dd { grid-column: 1; grid-row: auto; text-align: left; white-space: normal; }
}
