/* Shared by the landing page and the guides. Extracted so the three pages stay
   one design rather than three that drifted. */

:root {
  color-scheme: light dark;
  --bg: #ffffff;
  --fg: #111827;
  --muted: #6b7280;
  --card: #ffffff;
  --border: #e5e7eb;
  --soft: #f9fafb;
  --accent: #0e70ff;
  --accent-soft: #eff6ff;
  --warn: #b45309;
  --warn-soft: #fffbeb;
  --warn-border: #fcd34d;
  --code-bg: #0b1220;
  --code-fg: #e5e7eb;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #030712;
    --fg: #f3f4f6;
    --muted: #9ca3af;
    --card: #0b1220;
    --border: #1f2937;
    --soft: #0b1220;
    --accent-soft: #0a1e3d;
    --warn: #fbbf24;
    --warn-soft: #1c1508;
    --warn-border: #52400e;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 16px/1.65 ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.wrap {
  max-width: 46rem;
  margin: 0 auto;
  padding: 4rem 1.5rem 6rem;
}

/* ── brand ─────────────────────────────────────────────────────── */
.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 2rem;
}
.brand svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}
.brand b {
  font-weight: 600;
  letter-spacing: -0.01em;
}
.brand a {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: inherit;
  text-decoration: none;
  transition: opacity 0.15s ease;
}
.brand a:hover {
  opacity: 0.7;
}
.tag {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 2px 6px;
  background: var(--soft);
}

/* ── type ──────────────────────────────────────────────────────── */
h1 {
  font-size: 2.4rem;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin: 0 0 1rem;
  text-wrap: balance;
}
.lede {
  font-size: 1.1rem;
  color: var(--muted);
  margin: 0 0 2rem;
  text-wrap: pretty;
}
h2 {
  font-size: 1.15rem;
  letter-spacing: -0.01em;
  margin: 3rem 0 0.75rem;
  scroll-margin-top: 1.5rem;
  text-wrap: balance;
}
h3 {
  font-size: 0.95rem;
  margin: 2rem 0 0.5rem;
  text-wrap: balance;
}
p {
  text-wrap: pretty;
}
a {
  color: var(--accent);
}

/* ── code ──────────────────────────────────────────────────────── */
pre {
  background: var(--code-bg);
  color: var(--code-fg);
  border-radius: 0.75rem;
  padding: 1rem 1.1rem;
  overflow-x: auto;
  font: 13px/1.6 ui-monospace, SFMono-Regular, Menlo, monospace;
  margin: 0;
}
/* Long URLs wrap rather than hiding the end of a command behind a scroll the
   reader has no reason to expect. */
pre.wrap-code {
  white-space: pre-wrap;
  word-break: break-word;
}
code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.9em;
}
p code,
li code,
td code {
  background: var(--soft);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 0.05em 0.35em;
}

.cmd {
  position: relative;
  margin: 0.85rem 0;
}
.cmd button {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: rgba(255, 255, 255, 0.1);
  color: #e5e7eb;
  border: 0;
  border-radius: 0.4rem;
  padding: 0.3rem 0.55rem;
  font-size: 11px;
  cursor: pointer;
  min-width: 52px;
  transition: background 0.15s ease;
}
.cmd button:hover {
  background: rgba(255, 255, 255, 0.2);
}
.cmd button:active {
  scale: 0.96;
}
.note {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 0.6rem;
}

/* ── callouts ──────────────────────────────────────────────────── */
.callout {
  border: 1px solid var(--border);
  border-left-width: 3px;
  border-left-color: var(--accent);
  border-radius: 0.5rem;
  background: var(--accent-soft);
  padding: 0.85rem 1rem;
  margin: 1.25rem 0;
  font-size: 0.925rem;
}
.callout.warn {
  border-left-color: var(--warn-border);
  background: var(--warn-soft);
}
.callout.warn strong {
  color: var(--warn);
}
.callout p {
  margin: 0;
}
.callout p + p {
  margin-top: 0.5rem;
}

.honest {
  border-left: 2px solid var(--border);
  padding-left: 1rem;
  color: var(--muted);
  font-size: 0.9rem;
}

/* ── steps ─────────────────────────────────────────────────────── */
ol.steps {
  counter-reset: step;
  list-style: none;
  padding: 0;
  margin: 1rem 0;
}
ol.steps > li {
  counter-increment: step;
  position: relative;
  padding-left: 2.25rem;
  margin-bottom: 1.5rem;
}
ol.steps > li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0.05rem;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 999px;
  background: var(--soft);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  display: grid;
  place-items: center;
}
ol.steps > li > :first-child {
  margin-top: 0;
}

/* ── grid + cards ──────────────────────────────────────────────── */
.grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
}
.card {
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 1rem;
  background: var(--card);
}
.card h3 {
  margin: 0 0 0.3rem;
  font-size: 0.95rem;
}
.card p {
  margin: 0;
  font-size: 0.875rem;
  color: var(--muted);
}

/* ── tables ────────────────────────────────────────────────────── */
.table-wrap {
  overflow-x: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
th {
  text-align: left;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  font-weight: 600;
  padding: 0 0.6rem 0.4rem;
}
td {
  padding: 0.5rem 0.6rem;
  border-top: 1px solid var(--border);
  vertical-align: top;
}
td:first-child {
  white-space: nowrap;
  color: var(--muted);
  font-family: ui-monospace, monospace;
  font-size: 0.85em;
}

/* ── page furniture ────────────────────────────────────────────── */
.back {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.875rem;
  color: var(--muted);
  text-decoration: none;
  margin-bottom: 1.25rem;
}
.back:hover {
  color: var(--fg);
}

.toc {
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  background: var(--soft);
  padding: 0.9rem 1.1rem;
  margin: 0 0 2.5rem;
}
.toc p {
  margin: 0 0 0.5rem;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  font-weight: 600;
}
.toc ol {
  margin: 0;
  padding-left: 1.1rem;
  font-size: 0.9rem;
}
.toc li {
  margin: 0.15rem 0;
}

footer {
  margin-top: 4rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--muted);
}

@media (max-width: 40rem) {
  .wrap {
    padding: 2.5rem 1.1rem 4rem;
  }
  h1 {
    font-size: 1.9rem;
  }
}
