:root {
  --paper: #edefe8;
  --chalk: #fbfaf6;
  --ink: #16211c;
  --deep: #22332b;
  --mist: #8b978e;
  --plum: #6e4b63;
  --line: rgba(22, 33, 28, 0.18);
  --measure: 62ch;
  --display: "Petrona", Georgia, serif;
  --body: "IBM Plex Sans", system-ui, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin: 0 0 0.5em;
}

h1 { font-size: clamp(2.2rem, 7vw, 4rem); }
h2 { font-size: clamp(1.6rem, 4.2vw, 2.4rem); }
h3 { font-size: 1.2rem; }

p { margin: 0 0 1.1em; max-width: var(--measure); }

a { color: var(--plum); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--plum);
  outline-offset: 2px;
}

.skip {
  position: absolute; left: -9999px; top: 0; background: var(--ink); color: var(--chalk);
  padding: 0.6rem 1rem; z-index: 10;
}
.skip:focus { left: 0; }

/* ---------- masthead ---------- */
.masthead {
  display: flex; flex-wrap: wrap; gap: 0.75rem 1.5rem;
  align-items: baseline; justify-content: space-between;
  padding: 1.4rem clamp(1.1rem, 5vw, 4rem);
  border-bottom: 1px solid var(--line);
}
.wordmark {
  font-family: var(--display); font-size: 1.3rem; font-weight: 700;
  color: var(--ink); text-decoration: none; letter-spacing: -0.02em;
}
.wordmark__the { font-style: italic; font-weight: 400; color: var(--mist); }
.nav { display: flex; gap: 1.25rem; list-style: none; margin: 0; padding: 0; font-size: 0.95rem; flex-wrap: wrap; }
.nav a { color: var(--ink); text-decoration: none; padding-bottom: 2px; border-bottom: 1px solid transparent; }
.nav a:hover { border-bottom-color: var(--ink); }
.nav a[aria-current="page"] { border-bottom-color: var(--plum); color: var(--plum); }

/* ---------- layout ---------- */
.wrap { padding: clamp(2.5rem, 7vw, 5rem) clamp(1.1rem, 5vw, 4rem); }
.wrap--tight { max-width: 46rem; margin-inline: auto; }
.dark { background: var(--deep); color: var(--chalk); }
.dark h2, .dark h3 { color: var(--chalk); }
.dark a { color: #dcc4d4; }
.dark .fineprint { color: rgba(251, 250, 246, 0.66); }

/* ---------- hero ---------- */
.hero { padding: clamp(3rem, 9vw, 6.5rem) clamp(1.1rem, 5vw, 4rem) clamp(2.5rem, 6vw, 4rem); }
.hero h1 { max-width: 16ch; margin-bottom: 0.35em; }
.hero__lede { font-size: clamp(1.05rem, 2.4vw, 1.3rem); max-width: 46ch; color: #33463c; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-top: 1.8rem; }

.btn {
  display: inline-block; font: inherit; font-weight: 500; cursor: pointer;
  padding: 0.8rem 1.4rem; border-radius: 2px; border: 1px solid var(--ink);
  background: var(--ink); color: var(--chalk); text-decoration: none;
}
.btn:hover { background: var(--deep); }
.btn--ghost { background: transparent; color: var(--ink); }
.btn--ghost:hover { background: rgba(22, 33, 28, 0.06); }

/* ---------- the ledger (signature element) ---------- */
.ledger { border-top: 1px solid var(--line); }
.ledger__grid { display: grid; gap: 0; grid-template-columns: 1fr; }
@media (min-width: 720px) { .ledger__grid { grid-template-columns: 1fr 1fr; } }

.ledger__col { padding: clamp(1.6rem, 4vw, 2.6rem); }
.ledger__col + .ledger__col { border-top: 1px solid var(--line); }
@media (min-width: 720px) {
  .ledger__col + .ledger__col { border-top: 0; border-left: 1px solid var(--line); }
}
.ledger__head { font-family: var(--display); font-size: 1.35rem; margin-bottom: 0.15em; }
.ledger__sub { font-size: 0.92rem; color: var(--mist); margin-bottom: 1.4rem; }
.ledger__list { list-style: none; margin: 0; padding: 0; }
.ledger__list li {
  font-family: var(--display); font-size: clamp(1.15rem, 3vw, 1.5rem);
  padding: 0.32rem 0; line-height: 1.3;
}
.ledger__list--seen li { color: var(--ink); }
.ledger__list--unseen li {
  color: transparent;
  -webkit-text-stroke: 1px rgba(22, 33, 28, 0.42);
  transition: color 220ms ease, -webkit-text-stroke-color 220ms ease;
  cursor: default;
}
.ledger__list--unseen li:hover,
.ledger__list--unseen li:focus-within,
.ledger--revealed .ledger__list--unseen li { color: var(--plum); -webkit-text-stroke-color: transparent; }

.ledger__note { font-size: 0.95rem; color: var(--mist); margin-top: 1.4rem; max-width: 34ch; }

/* ---------- pull quote ---------- */
.pull {
  font-family: var(--display); font-style: italic;
  font-size: clamp(1.4rem, 4vw, 2.1rem); line-height: 1.3;
  max-width: 24ch; margin: 0;
}

/* ---------- model cards ---------- */
.model { display: grid; gap: 1.6rem; grid-template-columns: 1fr; margin-top: 2rem; }
@media (min-width: 760px) { .model { grid-template-columns: repeat(2, 1fr); } }
.model__item { border-top: 2px solid var(--plum); padding-top: 0.9rem; }
.model__item h3 { margin-bottom: 0.3em; }
.model__item p { font-size: 0.98rem; margin-bottom: 0; }

/* ---------- article ---------- */
.article { max-width: 40rem; margin-inline: auto; padding: clamp(2.2rem, 6vw, 4rem) clamp(1.1rem, 5vw, 2rem) 4rem; }
.article h2 { margin-top: 2.4em; }
.article h2:first-of-type { margin-top: 1.2em; }
.article h3 { margin-top: 1.9em; font-family: var(--body); font-size: 1.02rem; font-weight: 600; letter-spacing: 0.02em; }
.article p { font-size: 1.08rem; line-height: 1.72; }
.article blockquote {
  margin: 2rem 0; padding-left: 1.2rem; border-left: 3px solid var(--plum);
  font-family: var(--display); font-style: italic; font-size: 1.15rem;
}
.article ul { max-width: var(--measure); padding-left: 1.1rem; }
.article li { margin-bottom: 0.4rem; }
.article__meta { color: var(--mist); font-size: 0.92rem; margin-bottom: 2rem; }
.article__toc { border: 1px solid var(--line); padding: 1.2rem 1.4rem; margin-bottom: 2.5rem; }
.article__toc ol { margin: 0; padding-left: 1.2rem; font-size: 0.96rem; }

/* ---------- exercise form ---------- */
.exercise__grid { display: grid; gap: 1.5rem; grid-template-columns: 1fr; }
@media (min-width: 780px) { .exercise__grid { grid-template-columns: 1fr 1fr; } }
fieldset { border: 1px solid rgba(251, 250, 246, 0.28); padding: 1.2rem; margin: 0 0 1.5rem; }
legend { font-family: var(--display); font-size: 1.15rem; padding: 0 0.4rem; }
label { display: block; font-size: 0.92rem; margin-bottom: 0.35rem; }
input[type="text"], input[type="email"], textarea, select {
  width: 100%; font: inherit; padding: 0.65rem 0.7rem; border-radius: 2px;
  border: 1px solid var(--line); background: var(--chalk); color: var(--ink);
}
textarea { min-height: 5.5rem; resize: vertical; }
.field { margin-bottom: 1rem; }
.hint { font-size: 0.86rem; color: rgba(251, 250, 246, 0.7); margin: 0 0 1rem; }

.summary { border: 1px solid var(--line); padding: clamp(1.2rem, 4vw, 2rem); background: var(--chalk); }
.summary h3 { margin-top: 1.4em; }
.summary h3:first-child { margin-top: 0; }
.summary dl { margin: 0 0 1.4rem; }
.summary dt { font-weight: 600; font-size: 0.9rem; color: var(--mist); }
.summary dd { margin: 0 0 0.9rem; white-space: pre-wrap; }

/* ---------- footer ---------- */
.footer { background: var(--deep); color: var(--chalk); padding: clamp(2.5rem, 7vw, 4.5rem) clamp(1.1rem, 5vw, 4rem); }
.footer__inner { display: grid; gap: 2.5rem; grid-template-columns: 1fr; }
@media (min-width: 800px) { .footer__inner { grid-template-columns: 1.2fr 1fr; gap: 4rem; } }
.footer h2 { font-size: 1.5rem; }
.signup__row { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.signup__row input { flex: 1 1 14rem; }
.signup__row button {
  font: inherit; font-weight: 500; padding: 0.7rem 1.2rem; cursor: pointer;
  border: 1px solid var(--chalk); background: var(--chalk); color: var(--ink); border-radius: 2px;
}
.signup__row button:hover { background: #e6e2d6; }
.honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; }
.fineprint { font-size: 0.82rem; color: var(--mist); }
.notice { background: rgba(251, 250, 246, 0.12); padding: 0.7rem 0.9rem; border-left: 3px solid #dcc4d4; }
.footer__meta p { font-size: 0.92rem; }

/* ---------- inline signup band (light background) ---------- */
.band-signup {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: clamp(1.8rem, 5vw, 2.8rem) clamp(1.1rem, 5vw, 4rem);
  background: var(--chalk);
}
.band-signup .signup { max-width: 34rem; }
.band-signup h2 { font-size: clamp(1.3rem, 3vw, 1.7rem); }
.band-signup .signup__row button {
  border-color: var(--ink); background: var(--ink); color: var(--chalk);
}
.band-signup .signup__row button:hover { background: var(--deep); }
.band-signup .notice { background: rgba(110, 75, 99, 0.1); border-left-color: var(--plum); }
.band-signup label { font-size: 0.9rem; }

.article .band-signup { margin: 2.5rem 0; padding: 1.6rem; border: 1px solid var(--line); }
.article .band-signup h2 { margin-top: 0; }

/* confirmation pages */
.confirm { max-width: 34rem; }
.confirm .btn { margin-top: 1rem; }
