:root {
  --bg: #fafafa;
  --surface: #ffffff;
  --text: #1a1a1a;
  --muted: #5f5f5f;
  --faint: #8a8a8a;
  --line: rgba(0, 0, 0, 0.1);
  --line-strong: rgba(0, 0, 0, 0.16);
  --font-body: "Space Grotesk", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--muted);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--text); }

.page {
  width: min(100% - 2rem, 1040px);
  margin: 0 auto;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
}

.brand {
  color: var(--text);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-size: 0.9rem;
}

.topnav {
  display: flex;
  gap: 1rem;
  color: var(--faint);
  font-size: 0.92rem;
}

.hero {
  padding: clamp(3rem, 8vw, 5.5rem) 0 2.5rem;
  border-bottom: 1px solid var(--line);
}

.eyebrow, .label {
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

h1, h2, h3 {
  color: var(--text);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: 0;
}

h1 {
  max-width: 820px;
  margin: 0.5rem 0 1rem;
  font-size: clamp(2.4rem, 6vw, 4.8rem);
}

.lead {
  max-width: 720px;
  margin: 0;
  font-size: clamp(1.05rem, 2vw, 1.24rem);
  color: #3f3f3f;
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: clamp(2rem, 5vw, 4rem);
  padding: 2.5rem 0 4rem;
}

.section {
  padding: 2rem 0;
  border-bottom: 1px solid var(--line);
}

.section:first-child { padding-top: 0; }
.section:last-child { border-bottom: 0; }
.section h2 { margin: 0 0 0.85rem; font-size: clamp(1.55rem, 3vw, 2.2rem); }
.section h3 { margin: 1.4rem 0 0.5rem; font-size: 1.05rem; }
.section p { margin: 0 0 1rem; max-width: 70ch; }

.steps, .links {
  display: grid;
  gap: 0.75rem;
  margin: 1.25rem 0 0;
}

.step, .link-card, .aside-card {
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 1rem;
}

.step strong, .link-card strong, .aside-card strong {
  display: block;
  color: var(--text);
  font-weight: 500;
  margin-bottom: 0.25rem;
}

.link-card {
  display: block;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.link-card:hover {
  border-color: var(--line-strong);
  transform: translateY(-1px);
}

.code {
  overflow-x: auto;
  margin: 1rem 0;
  padding: 1rem;
  background: #f1f1f1;
  border: 1px solid var(--line);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.7;
  white-space: pre;
}

code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  color: var(--text);
}

.aside {
  position: sticky;
  top: 1.5rem;
  align-self: start;
  display: grid;
  gap: 1rem;
}

.aside-card {
  font-size: 0.92rem;
}

.aside-card a {
  display: block;
  margin-top: 0.45rem;
  color: var(--text);
  border-bottom: 1px solid var(--line-strong);
  width: fit-content;
}

.footer {
  border-top: 1px solid var(--line);
  padding: 1.5rem 0 2.5rem;
  color: var(--faint);
  font-size: 0.9rem;
}

@media (max-width: 760px) {
  .topbar { align-items: flex-start; }
  .topnav { flex-wrap: wrap; justify-content: flex-end; }
  .layout { grid-template-columns: 1fr; }
  .aside { position: static; }
}
