:root {
  --bg: #faf9f6;
  --fg: #16161a;
  --muted: #6b6b73;
  --line: #e4e2dc;
  --accent: #c2410c;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111113;
    --fg: #ececef;
    --muted: #9a9aa3;
    --line: #26262b;
    --accent: #fb923c;
  }
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--fg);
  font: 400 17px/1.6 Inter, system-ui, -apple-system, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main, footer {
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: 0 24px;
}
main { flex: 1; padding-top: 18vh; padding-bottom: 64px; }
.mark { width: 44px; height: 44px; margin-bottom: 40px; }
.mark path { stroke: var(--accent); }
h1 {
  font-family: Fraunces, Georgia, serif;
  font-weight: 500;
  font-size: clamp(2.4rem, 7vw, 3.6rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
}
.tagline { margin-top: 16px; font-size: 1.2rem; color: var(--muted); max-width: 32em; }
section { margin-top: 64px; }
h2 {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 16px;
}
dl {
  display: grid;
  grid-template-columns: 8rem 1fr;
  border-top: 1px solid var(--line);
}
dt, dd { padding: 14px 0; border-bottom: 1px solid var(--line); }
dt { color: var(--muted); }
a { color: var(--fg); text-decoration-color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--accent); }
footer {
  padding-top: 24px;
  padding-bottom: 32px;
  font-size: 0.85rem;
  color: var(--muted);
}
@media (max-width: 520px) {
  dl { grid-template-columns: 1fr; }
  dt { padding-bottom: 0; border-bottom: 0; }
  dd { padding-top: 2px; }
}

/* Long-form pages */
.back { display: inline-block; margin-bottom: 40px; font-size: 0.9rem; color: var(--muted); text-decoration: none; }
.back:hover { color: var(--accent); }
.doc h1 { font-size: clamp(2rem, 6vw, 2.8rem); }
.doc .meta { margin-top: 12px; color: var(--muted); font-size: 0.95rem; }
.doc section { margin-top: 48px; }
.doc h2 { margin-bottom: 12px; }
.doc h3 { font-size: 1rem; font-weight: 600; margin: 20px 0 6px; }
.doc p + p, .doc p + ul, .doc ul + p { margin-top: 12px; }
.doc ul { padding-left: 1.2em; }
.doc li { margin-top: 6px; }
footer a { color: var(--muted); }
footer nav { display: inline; margin-left: 12px; }


/* Fun: step-by-step motion */
.mark path { stroke-dasharray: 40; stroke-dashoffset: 40; animation: draw 1s steps(5, end) 0.2s forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }

.tagline .w { display: inline-block; opacity: 0; transform: translateY(8px); animation: step-in 0.35s ease-out forwards; }
@keyframes step-in { to { opacity: 1; transform: none; } }

.print {
  position: fixed;
  left: 0; top: 0;
  width: 10px; height: 20px;
  margin: -10px 0 0 -5px;
  pointer-events: none;
  fill: var(--accent);
  animation: fade 1.8s ease-in forwards;
  z-index: 10;
}
@keyframes fade { from { opacity: 0.55; } to { opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  .mark path { animation: none; stroke-dashoffset: 0; }
  .tagline .w { animation: none; opacity: 1; transform: none; }
}
