:root {
  /* Original palette: warm paper + holly red, with a dark-mode twin. */
  --night: #fbf8f3;      /* page background */
  --surface: #ffffff;    /* cards, callouts */
  --gold: #b3261e;       /* accent: links, buttons, tags */
  --gold-light: #24211d; /* emphasis text */
  --gold-dim: #c9bfae;   /* borders, divider */
  --holly: #b3261e;
  --text: #24211d;
  --text-dim: #6b645b;
  --rule: #e6dfd3;
  --snow: none;
}
@media (prefers-color-scheme: dark) {
  :root {
    --night: #171512;
    --surface: #1f1c18;
    --gold: #f08a7e;
    --gold-light: #ece6dc;
    --gold-dim: #5a5248;
    --holly: #f08a7e;
    --text: #ece6dc;
    --text-dim: #a39a8d;
    --rule: #332e28;
    --snow: block;
  }
}

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

body {
  background: var(--night);
  color: var(--text);
  font-family: 'Crimson Pro', Georgia, serif;
  font-size: 19px;
  line-height: 1.7;
  min-height: 100vh;
}

/* Snowfall */
body::before {
  content: '';
  display: var(--snow);
  position: fixed;
  inset: 0;
  background:
    radial-gradient(1.5px 1.5px at 8% 12%, rgba(255, 255, 255, 0.45), transparent),
    radial-gradient(1px 1px at 22% 38%, rgba(255, 255, 255, 0.3), transparent),
    radial-gradient(2px 2px at 37% 6%, rgba(255, 255, 255, 0.35), transparent),
    radial-gradient(1px 1px at 52% 44%, rgba(255, 255, 255, 0.25), transparent),
    radial-gradient(1.5px 1.5px at 68% 18%, rgba(255, 255, 255, 0.4), transparent),
    radial-gradient(2px 2px at 88% 28%, rgba(255, 255, 255, 0.3), transparent),
    radial-gradient(1px 1px at 12% 62%, rgba(255, 255, 255, 0.25), transparent),
    radial-gradient(1.5px 1.5px at 92% 58%, rgba(255, 255, 255, 0.3), transparent),
    radial-gradient(1px 1px at 47% 72%, rgba(255, 255, 255, 0.2), transparent),
    radial-gradient(2px 2px at 30% 88%, rgba(255, 255, 255, 0.25), transparent),
    radial-gradient(1px 1px at 76% 78%, rgba(255, 255, 255, 0.25), transparent),
    radial-gradient(1.5px 1.5px at 60% 94%, rgba(255, 255, 255, 0.3), transparent),
    radial-gradient(ellipse 80% 50% at 50% 0%, rgba(208, 87, 75, 0.08), transparent);
  pointer-events: none;
  z-index: 0;
}

.container {
  position: relative;
  z-index: 1;
  max-width: 720px;
  margin: 0 auto;
  padding: 60px 24px 60px;
}

/* Header */
header { text-align: center; margin-bottom: 70px; padding-top: 40px; }
header.compact { margin-bottom: 50px; padding-top: 10px; }

h1 {
  font-family: 'Fraunces', Georgia, serif;
  font-size: clamp(2.3rem, 7vw, 3.6rem);
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0.01em;
  line-height: 1.15;
}
header.compact h1 { font-size: clamp(2rem, 6vw, 2.6rem); }

.subtitle {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 0.85rem;
  color: var(--text-dim);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  margin-top: 12px;
}

.divider {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 240px;
  margin: 30px auto;
  color: var(--gold-dim);
  font-size: 0.9rem;
}
.divider::before, .divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-dim));
}
.divider::after { background: linear-gradient(90deg, var(--gold-dim), transparent); }

.tagline { font-style: italic; color: var(--text-dim); font-size: 1.1rem; }

.cta {
  display: inline-block;
  margin-top: 28px;
  padding: 10px 24px;
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 600;
  font-size: 1rem;
  color: var(--night);
  background: var(--gold);
  border: 1px solid var(--gold);
  border-radius: 999px;
  transition: background 0.2s, border-color 0.2s;
}
.cta:hover { background: var(--gold-light); border-color: var(--gold-light); color: var(--night); }

.back { font-size: 0.9rem; color: var(--text-dim); }

/* Sections */
section { margin-bottom: 56px; }

h2 {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 20px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--rule);
}

p { margin-bottom: 16px; }
strong { color: var(--gold-light); font-weight: 600; }
em { color: var(--gold-light); }
code { font-family: inherit; color: var(--gold-light); }

a {
  color: var(--gold);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}
a:hover { color: var(--gold-light); border-bottom-color: var(--gold-light); }
.cta:hover, .cta { border-bottom-width: 1px; }

ul.plain { padding-left: 1.2rem; }
ul.plain li { margin-bottom: 10px; }
ul.plain li::marker { color: var(--gold-dim); }

/* Steps */
.steps { list-style: none; counter-reset: step; }
.steps li { counter-increment: step; position: relative; padding-left: 56px; margin-bottom: 28px; }
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 2px;
  width: 36px;
  height: 36px;
  border: 1px solid var(--gold-dim);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Fraunces', Georgia, serif;
  font-size: 0.9rem;
  color: var(--gold);
  background: var(--surface);
}
.step-title {
  display: block;
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 600;
  color: var(--gold-light);
  font-size: 1.02rem;
  margin-bottom: 4px;
}
.step-desc { font-size: 1rem; }

/* Callouts */
.callout {
  background: var(--surface);
  border-left: 2px solid var(--holly);
  padding: 20px 24px;
  margin: 24px 0;
  border-radius: 0 6px 6px 0;
}
.callout-title {
  font-family: 'Fraunces', Georgia, serif;
  color: var(--gold);
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 6px;
}
.callout p { margin-bottom: 0; font-size: 0.97rem; }
.callout p + p { margin-top: 10px; }

/* Definition rows: tiers, accounts, commands */
.rows { list-style: none; }
.rows li {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--rule);
}
.rows li:last-child { border-bottom: none; }
.tag {
  flex: 0 0 auto;
  min-width: 6.5rem;
  font-family: 'Fraunces', Georgia, serif;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-align: center;
  padding: 2px 10px;
  border: 1px solid var(--gold-dim);
  border-radius: 999px;
  color: var(--gold);
  white-space: nowrap;
}
.rows .desc { font-size: 1rem; }
.rows .desc a { font-weight: 600; }
.rows.accounts li { display: block; }
.rows.accounts .handle { display: block; font-family: 'Fraunces', Georgia, serif; font-weight: 600; }
.note { color: var(--text-dim); font-size: 0.92rem; font-style: italic; }

/* Tables (privacy page) */
.table-wrap { overflow-x: auto; margin: 12px 0 16px; }
table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
th, td { text-align: left; vertical-align: top; padding: 10px 12px 10px 0; border-bottom: 1px solid var(--rule); }
th { font-family: 'Fraunces', Georgia, serif; font-weight: 600; color: var(--gold); font-size: 0.9rem; }

/* Footer */
footer {
  text-align: center;
  padding: 40px 0 0;
  color: var(--text-dim);
  font-size: 0.88rem;
  border-top: 1px solid var(--rule);
}
footer p { margin-bottom: 8px; }
footer .sign-off { font-family: 'Fraunces', Georgia, serif; font-style: italic; color: var(--text-dim); margin-top: 14px; }

@media (max-width: 600px) {
  body { font-size: 18px; }
  .container { padding: 40px 16px 50px; }
  header { margin-bottom: 50px; }
  .rows li { flex-direction: column; gap: 6px; }
  .tag { min-width: 0; }
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: no-preference) {
  header, section { animation: fadeUp 0.6s ease-out both; }
  section:nth-of-type(1) { animation-delay: 0.08s; }
  section:nth-of-type(2) { animation-delay: 0.14s; }
  section:nth-of-type(3) { animation-delay: 0.2s; }
  section:nth-of-type(4) { animation-delay: 0.26s; }
  section:nth-of-type(5) { animation-delay: 0.32s; }
}
