/* Later Chapters Press: reader pages.
 *
 * Tokens are SAMPLED from the cover (ALT_couple_v4, 2026-10-02), not chosen by eye.
 * Source and reasoning: Book Projects/Peptides for Seniors/Design/Brand-Kit.md.
 * Contrast ratios are measured (WCAG 2.x) and listed there. Do not add a colour pair
 * without measuring it: the reader is 66 and reading on a phone.
 *
 * One comment per block, closed on the same block. A comment closed early strands
 * its prose and silently drops the next rule (Skill-Harvest-Backlog, 2026-10-02).
 */

@font-face { font-family: "Merriweather"; font-style: normal; font-weight: 300 900; font-display: swap; src: url("../fonts/Merriweather-normal-latin.woff2") format("woff2"); }
@font-face { font-family: "Merriweather"; font-style: italic; font-weight: 300 900; font-display: swap; src: url("../fonts/Merriweather-italic-latin.woff2") format("woff2"); }
@font-face { font-family: "Source Sans 3"; font-style: normal; font-weight: 200 900; font-display: swap; src: url("../fonts/SourceSans3-normal-latin.woff2") format("woff2"); }

:root {
  color-scheme: light;

  /* Cover ground: forest-to-teal gradient, top to foot */
  --green-700: #264446;
  --green-800: #1e3d3f;
  --green-900: #1c383c;
  /* Cover title panel and title ink */
  --blush: #f9d5d7;
  --ink: #39354c;
  /* Cover top band, bottom bar and AFTER 60, and the bar's text */
  --copper: #cf9a76;
  --plum: #47283d;
  /* Evidence seal field and rim */
  --cream: #f6efe2;
  --gold: #d5a575;
  /* Web-only additions, each measured against --page */
  --page: #fbf7f0;
  --muted: #5a5568;
  --copper-text: #8a5a3c;
  --rule: #e3d7c3;
  --field-border: #7d7790;
  --error: #9e4a3a;

  --display: "Merriweather", Georgia, "Times New Roman", serif;
  --sans: "Source Sans 3", "Helvetica Neue", Arial, sans-serif;

  --measure: 34em;
  --wrap: 1080px;
  --gutter: 20px;
  --radius: 6px;
}

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

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

/* Body type: 21px minimum on every screen. The reader's book is set at 14pt. */
body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font: 400 21px/1.6 var(--sans);
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--green-800); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { color: var(--copper-text); }

:focus-visible { outline: 4px solid var(--copper); outline-offset: 3px; }

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

.skip { position: absolute; left: -9999px; }
.skip:focus { left: var(--gutter); top: 8px; z-index: 10; background: var(--cream); padding: 8px 14px; }

/* Preview ribbon: shown by optin.js until LIVE is true */
.preview-ribbon {
  display: none;
  background: #fff3c4;
  color: #4a3b00;
  border-bottom: 2px solid #b08900;
  font: 700 16px/1.4 var(--sans);
  text-align: center;
  padding: 8px var(--gutter);
}
.is-preview .preview-ribbon { display: block; }

/* Top band: the cover's LARGE PRINT strip */
.band {
  background: var(--copper);
  color: var(--plum);
  font: 700 15px/1.35 var(--sans);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-align: center;
  padding: 10px var(--gutter);
}
.band em { font-style: normal; }

/* Hero: the cover ground */
.hero {
  background: linear-gradient(180deg, var(--green-700) 0%, var(--green-900) 100%);
  color: var(--cream);
  padding: 36px 0 44px;
}
.hero-grid { display: grid; gap: 28px; }
.hero-copy { display: grid; gap: 20px; }
.hero-head { display: grid; grid-template-columns: 112px 1fr; gap: 18px; align-items: center; }
.cover { border-radius: 3px; box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45), 0 2px 6px rgba(0, 0, 0, 0.3); }
.cover-large { display: none; }

.kicker {
  font: 700 15px/1.3 var(--sans);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--copper);
  margin: 0 0 8px;
}
h1 {
  font: 900 34px/1.12 var(--display);
  color: var(--cream);
  margin: 0;
}
h1 .accent { color: var(--copper); }
.deck {
  font: italic 400 21px/1.5 var(--display);
  color: var(--blush);
  margin: 0;
  max-width: var(--measure);
}

/* The form card: cream field, copper rule, like the seal on the cover */
.card {
  background: var(--page);
  color: var(--ink);
  border-top: 8px solid var(--copper);
  border-radius: var(--radius);
  padding: 26px 22px 24px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.28);
}
.card h2 { font: 700 24px/1.25 var(--display); margin: 0 0 18px; color: var(--ink); }

.field { margin: 0 0 18px; }
.field label { display: block; font: 700 20px/1.3 var(--sans); margin: 0 0 6px; }
.field input {
  width: 100%;
  min-height: 60px;
  padding: 12px 14px;
  font: 400 22px/1.3 var(--sans);
  color: var(--ink);
  background: #fff;
  border: 2px solid var(--field-border);
  border-radius: var(--radius);
}
.field input:focus { border-color: var(--green-800); outline: 4px solid var(--copper); outline-offset: 1px; }
.field input[aria-invalid="true"] { border-color: var(--error); }
.field .error { display: none; color: var(--error); font: 600 18px/1.4 var(--sans); margin: 6px 0 0; }
.field input[aria-invalid="true"] + .error { display: block; }

/* Honeypot: off-screen, not display:none, so simple bots still fill it */
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.button {
  display: block;
  width: 100%;
  min-height: 64px;
  padding: 14px 20px;
  border: 0;
  border-radius: var(--radius);
  background: var(--green-900);
  color: var(--cream);
  font: 700 23px/1.2 var(--sans);
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  box-shadow: inset 0 -4px 0 var(--copper);
}
.button:hover { background: var(--green-700); color: var(--cream); }
.button[disabled] { opacity: 0.75; cursor: progress; }
.button.narrow { max-width: 420px; }
.section .after-cta, .after-cta { margin-top: 32px; }

.form-status { min-height: 0; margin: 12px 0 0; font: 600 18px/1.4 var(--sans); color: var(--error); }
.form-status:empty { display: none; }

.promise { font-size: 18px; line-height: 1.5; color: var(--muted); margin: 16px 0 0; }
.promise p { margin: 0 0 8px; }
.promise a { color: var(--muted); }

/* Body sections */
.section { padding: 48px 0; }
.section + .section { border-top: 1px solid var(--rule); }
.section h2 { font: 900 30px/1.2 var(--display); color: var(--ink); margin: 0 0 14px; }
.section p { max-width: var(--measure); margin: 0 0 16px; }
.lead { font-size: 22px; }

/* Three real tool pages, fanned */
.fan { position: relative; width: 100%; height: 270px; max-width: 420px; margin: 26px auto 34px; }
.fan img {
  position: absolute; top: 0; width: 46%;
  background: #fff;
  border: 1px solid #d9d2c3;
  box-shadow: 0 8px 20px rgba(28, 56, 60, 0.18);
}
.fan img:nth-child(1) { left: 0; transform: rotate(-6deg); top: 14px; }
.fan img:nth-child(2) { left: 27%; z-index: 2; }
.fan img:nth-child(3) { right: 0; transform: rotate(6deg); top: 14px; }

/* The twelve tools */
.tools { list-style: none; padding: 0; margin: 0; display: grid; gap: 0 36px; counter-reset: tool; }
.tools li {
  counter-increment: tool;
  display: grid; grid-template-columns: 44px 1fr; align-items: baseline;
  padding: 12px 0;
  border-bottom: 1px solid var(--rule);
}
.tools li::before {
  content: counter(tool);
  font: 900 24px/1 var(--display);
  color: var(--copper-text);
}
.tools .name { font-weight: 700; }
.tools .from { display: block; font-size: 17px; color: var(--muted); letter-spacing: 0.02em; }

/* Blush panel: the cover's title panel */
.panel {
  background: var(--blush);
  color: var(--ink);
  border-radius: var(--radius);
  padding: 24px 22px;
  margin: 8px 0 0;
}
.panel h2, .panel h3 { font: 700 24px/1.3 var(--display); margin: 0 0 10px; }
.panel p { margin: 0 0 10px; }
.panel p:last-child { margin-bottom: 0; }

/* Thank-you page */
.steps { list-style: none; padding: 0; margin: 0; counter-reset: step; }
.steps > li {
  counter-increment: step;
  position: relative;
  padding: 0 0 26px 64px;
}
.steps > li::before {
  content: counter(step);
  position: absolute; left: 0; top: -4px;
  width: 46px; height: 46px; border-radius: 50%;
  background: var(--green-900); color: var(--cream);
  box-shadow: inset 0 -3px 0 var(--copper);
  font: 900 22px/46px var(--display); text-align: center;
}
.steps h3 { font: 700 23px/1.3 var(--display); margin: 0 0 6px; }
.steps p { margin: 0 0 8px; }

.downloads { list-style: none; padding: 0; margin: 0 0 20px; }
.downloads li { border-bottom: 1px solid var(--rule); }
.downloads a {
  display: flex; justify-content: space-between; gap: 16px; align-items: center;
  min-height: 56px; padding: 10px 2px;
  font-weight: 600; text-decoration: none; color: var(--ink);
}
.downloads a::after { content: "PDF \2193"; flex: none; font: 700 15px/1 var(--sans); letter-spacing: 0.08em; color: var(--copper-text); }
.downloads a:hover { color: var(--green-800); text-decoration: underline; }
.downloads .all a { font-size: 23px; color: var(--green-900); }

/* Footer: cover foot */
.footer { background: var(--green-900); color: var(--cream); padding: 30px 0 36px; font-size: 17px; line-height: 1.55; }
.footer a { color: var(--cream); }
.footer .imprint { font: 700 16px/1.3 var(--display); letter-spacing: 0.16em; text-transform: uppercase; color: var(--copper); margin: 0 0 10px; }
.footer p { margin: 0 0 8px; max-width: 46em; }

/* Plain text pages (privacy, 404, home) */
.prose { padding: 40px 0 56px; }
.prose h1 { color: var(--ink); font-size: 34px; margin: 0 0 18px; }
.prose h2 { font: 700 24px/1.3 var(--display); margin: 34px 0 10px; }
.prose p, .prose li { max-width: var(--measure); }
.prose .meta { color: var(--muted); font-size: 18px; }

@media (min-width: 900px) {
  :root { --gutter: 32px; }
  .band { font-size: 16px; }
  .hero { padding: 56px 0 64px; }
  .hero-grid { grid-template-columns: 340px 1fr; gap: 56px; align-items: start; }
  .hero-head { display: block; }
  .hero-head .cover { display: none; }
  .cover-large { display: block; }
  h1 { font-size: 46px; margin-top: 4px; }
  .deck { font-size: 23px; margin-top: 14px; }
  .hero-copy { gap: 26px; }
  .card { padding: 30px 30px 26px; }
  .section { padding: 64px 0; }
  .section h2 { font-size: 36px; }
  .tools { grid-template-columns: 1fr 1fr; }
  .split { display: grid; grid-template-columns: 1fr 380px; gap: 56px; align-items: start; }
  .split .fan { margin-top: 8px; }
}

@media (prefers-reduced-motion: no-preference) {
  .button { transition: background-color 0.15s ease; }
}
