:root {
  /* color */
  --bg: #faf8f5;
  --text: #2c2825;
  --muted: #7a726a;
  --accent: #b8510d;
  --rule: #e0dbd5;
  --code-bg: #f0ece7;

  /* type families */
  --font-body: 'Source Serif 4', Georgia, serif;
  --font-ui: 'Inter', sans-serif;
  --font-mono: 'SF Mono', Menlo, monospace;

  /* type scale */
  --text-xs: 13px;
  --text-sm: 14px;
  --text-md: 15px;
  --text-base: 16px;
  --text-lg: 17px;
  --text-body: 18px;
  --text-xl: 20px;
  --text-2xl: 22px;
  --text-3xl: 36px;

  /* spacing scale */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 16px;
  --space-4: 20px;
  --space-5: 24px;
  --space-6: 40px;
  --space-7: 48px;
  --space-8: 56px;
  --space-9: 64px;
  --space-10: 80px;
  --space-11: 120px;

  /* layout & misc */
  --max-width: 720px;
  --transition: 0.2s;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  font-size: var(--text-body);
  -webkit-font-smoothing: antialiased;
}

.page {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--space-10) var(--space-5) var(--space-11);
}

a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color var(--transition);
}

a:hover,
a:focus-visible {
  border-bottom-color: var(--accent);
  outline: none;
}

h1 {
  font-size: var(--text-3xl);
  font-weight: 600;
  line-height: 1.25;
  margin-bottom: var(--space-3);
  letter-spacing: -0.01em;
}

h2 {
  font-family: var(--font-ui);
  font-size: var(--text-sm);
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--space-4);
}

p {
  margin-bottom: var(--space-4);
}

hr {
  border: none;
  border-top: 1px solid var(--rule);
  margin: var(--space-8) 0;
}

code {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  background: var(--code-bg);
  padding: 2px 6px;
  border-radius: 3px;
}

pre {
  background: var(--text);
  color: var(--bg);
  padding: var(--space-4) var(--space-5);
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  line-height: 1.6;
  overflow-x: auto;
  margin: var(--space-5) 0;
}

.mark {
  font-family: var(--font-ui);
  font-size: var(--text-sm);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: var(--space-7);
}

.mark a {
  color: var(--muted);
}

.subtitle {
  font-size: var(--text-xl);
  font-weight: 300;
  color: var(--muted);
  margin-bottom: var(--space-9);
  font-style: italic;
}

.section {
  margin-bottom: var(--space-8);
}

/* List scaffold shared by all list patterns. */
.features,
.tools,
.commands,
.steps {
  list-style: none;
  margin: var(--space-5) 0;
}

.features li,
.tools li,
.commands li,
.steps li {
  border-bottom: 1px solid var(--rule);
}

.features li:first-child,
.tools li:first-child,
.commands li:first-child,
.steps li:first-child {
  border-top: 1px solid var(--rule);
}

/* .features and .tools — title + description rows. */
.features li { padding: var(--space-3) 0; }
.tools li    { padding: var(--space-4) 0; }

.features strong,
.tools strong {
  font-family: var(--font-ui);
  font-weight: 500;
  display: block;
  margin-bottom: var(--space-1);
}

.features strong { font-size: var(--text-md); }
.tools strong    { font-size: var(--text-base); }

.features > li > span,
.tools > li > span {
  font-size: var(--text-base);
  color: var(--muted);
}

/* .commands — mono command + description in a flex row. */
.commands li {
  padding: 10px 0;
  display: flex;
  gap: var(--space-4);
}

.commands .cmd {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--accent);
  min-width: 140px;
  flex-shrink: 0;
}

.commands .desc {
  font-size: var(--text-base);
  color: var(--muted);
}

/* .steps — counter list. */
.steps {
  counter-reset: step;
}

.steps li {
  counter-increment: step;
  padding: var(--space-3) 0;
}

.steps li::before {
  content: counter(step);
  font-family: var(--font-ui);
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--accent);
  margin-right: 12px;
}

.tree {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  line-height: 1.8;
  color: var(--muted);
  margin: var(--space-5) 0;
  padding-left: var(--space-2);
}

.callout {
  font-size: var(--text-2xl);
  font-weight: 300;
  font-style: italic;
  color: var(--text);
  border-left: 2px solid var(--accent);
  padding-left: var(--space-5);
  margin: var(--space-6) 0;
  line-height: 1.6;
}

.callout cite {
  display: block;
  font-size: var(--text-md);
  font-style: normal;
  color: var(--muted);
  margin-top: var(--space-2);
}

.aside {
  font-size: var(--text-lg);
  font-style: italic;
  color: var(--muted);
  line-height: 1.6;
}

.footer {
  margin-top: var(--space-10);
  padding-top: var(--space-5);
  border-top: 1px solid var(--rule);
  font-family: var(--font-ui);
  font-size: var(--text-xs);
  color: var(--muted);
}
