/* RZDW — shared styles. No external fonts or scripts, so pages stay fast. */

:root {
  --bg: #fafaf8;
  --fg: #141414;
  --muted: #6b6b66;
  --line: #e4e4df;
  --accent: #141414;
  --tag-bg: #ecece7;
  --banner-bg: #fff4d6;
  --banner-fg: #5c4400;
  --max: 40rem;
  --font: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111110;
    --fg: #ededea;
    --muted: #9a9a94;
    --line: #2a2a28;
    --accent: #ededea;
    --tag-bg: #232321;
    --banner-bg: #3a2f10;
    --banner-fg: #f3d98b;
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* Header */
.site-header {
  padding: 1.5rem 0 0;
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.wordmark {
  display: block;
  color: var(--fg);
  line-height: 0;
}
.wordmark svg {
  display: block;
  height: 1.5rem;
  width: auto;
}
.subnav {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 0.9375rem;
}
.subnav a {
  color: var(--muted);
  text-decoration: none;
}
.subnav a:hover,
.subnav a[aria-current="page"] {
  color: var(--fg);
}

/* Main */
main { padding: 4rem 0 3rem; }

h1 {
  font-size: clamp(2rem, 7vw, 2.75rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0 0 1.25rem;
  font-weight: 750;
}
h2 {
  font-size: 0.8125rem;
  font-family: var(--mono);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin: 3.5rem 0 1rem;
}
.prose h2 {
  font-family: var(--font);
  font-size: 1.1875rem;
  text-transform: none;
  letter-spacing: -0.01em;
  color: var(--fg);
  font-weight: 650;
  margin: 2.5rem 0 0.5rem;
}
h3 { font-size: 1.0625rem; margin: 1.75rem 0 0.25rem; }

p { margin: 0 0 1rem; }
.lede { font-size: 1.25rem; line-height: 1.5; }
.muted { color: var(--muted); }
.small { font-size: 0.9375rem; }

a { color: var(--accent); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }

ul, ol { padding-left: 1.25rem; margin: 0 0 1rem; }
li { margin-bottom: 0.35rem; }

/* Project list */
.list {
  list-style: none;
  padding: 0;
  margin: 0;
  border-top: 1px solid var(--line);
}
.list li { margin: 0; border-bottom: 1px solid var(--line); }
.list a,
.list .row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.25rem 1rem;
  padding: 1.1rem 0;
  text-decoration: none;
  color: var(--fg);
}
.list .name { font-weight: 650; }
.list .desc { grid-column: 1 / -1; color: var(--muted); font-size: 0.9375rem; }
.list .arrow { color: var(--muted); transition: transform 0.15s ease; }
.list a:hover .arrow { transform: translateX(3px); color: var(--fg); }

.tag {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: var(--tag-bg);
  color: var(--muted);
  padding: 0.15rem 0.45rem;
  border-radius: 0.25rem;
  margin-left: 0.5rem;
  vertical-align: 0.1em;
}

/* Buttons */
.button {
  display: inline-block;
  padding: 0.8rem 1.25rem;
  border-radius: 0.6rem;
  background: var(--fg);
  color: var(--bg);
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
}
.button[aria-disabled="true"] {
  background: var(--tag-bg);
  color: var(--muted);
  cursor: default;
}
.actions { display: flex; gap: 0.75rem; flex-wrap: wrap; margin: 1.75rem 0 0; }
.button.secondary {
  background: transparent;
  color: var(--fg);
  box-shadow: inset 0 0 0 1px var(--line);
}

/* Steps */
.steps {
  list-style: none;
  padding: 0;
  counter-reset: step;
}
.steps li {
  counter-increment: step;
  position: relative;
  padding-left: 2.5rem;
  margin-bottom: 1.25rem;
}
.steps li::before {
  content: counter(step, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 0.15rem;
  font-family: var(--mono);
  font-size: 0.8125rem;
  color: var(--muted);
}

/* Draft notice */
.banner {
  background: var(--banner-bg);
  color: var(--banner-fg);
  border-radius: 0.6rem;
  padding: 0.9rem 1rem;
  font-size: 0.9375rem;
  margin-bottom: 2rem;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 1.5rem 0 2.5rem;
  font-size: 0.875rem;
  color: var(--muted);
}
.site-footer .wrap {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.site-footer a { color: var(--muted); }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
