/* Shared book-site stylesheet. Accent comes from site.accent on <html>. */

:root {
  --paper: #f7f4ee;
  --ink: #1c1914;
  --muted: #4a453c;
  --serif: "Source Serif 4", "Iowan Old Style", Palatino, "Palatino Linotype", "Times New Roman", serif;
  --sans: "Segoe UI", Candara, Calibri, "Lucida Grande", "Lucida Sans Unicode", ui-sans-serif, system-ui, sans-serif;
}

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

html {
  font-size: 112.5%;
  color-scheme: light;
  background: var(--paper);
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.7;
  text-rendering: optimizeLegibility;
}

img {
  max-width: 100%;
  height: auto;
  vertical-align: middle;
}

a {
  color: var(--ink);
  text-underline-offset: 0.18em;
}

a:hover {
  text-decoration-thickness: 2px;
}

:focus {
  outline: none;
}

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

.skip {
  position: absolute;
  left: 0.75rem;
  top: -4rem;
  z-index: 10;
  padding: 0.5rem 0.75rem;
  background: var(--ink);
  color: var(--paper);
}

.skip:focus {
  top: 0.75rem;
}

.wrap {
  width: min(65ch, calc(100% - 2.5rem));
  margin-inline: auto;
}

.wrap-wide {
  width: min(70rem, calc(100% - 2.5rem));
  margin-inline: auto;
}

h1,
h2,
h3 {
  font-family: var(--serif);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.015em;
  text-wrap: pretty;
}

h1 {
  font-size: clamp(2rem, 4.5vw, 3.1rem);
  margin: 0 0 1rem;
}

h2 {
  font-weight: 600;
  font-size: clamp(1.55rem, 3vw, 2.15rem);
  margin: 0 0 1.5rem;
}

h2::before {
  content: "";
  display: block;
  width: 2.75rem;
  height: 1px;
  margin-bottom: 0.9rem;
  background: var(--accent);
}

h3 {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0;
  margin: 0 0 0.4rem;
}

p,
ul {
  margin: 0 0 1rem;
}

.band {
  padding: 3.25rem 0;
}

.band-narrow + .band-narrow {
  padding-top: 0.5rem;
}

/* Hero */

.hero {
  position: relative;
  isolation: isolate;
  padding: 2.25rem 0 3.25rem;
  border-bottom: 1px solid var(--accent);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: var(--hero-bg, none);
  background-size: cover;
  background-position: center;
  opacity: 0.12;
  pointer-events: none;
}

.hero-grid {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.hero-cover {
  display: flex;
  justify-content: center;
  padding: 0.5rem 1.5rem 1.5rem 0.85rem;
}

.book {
  width: min(100%, 16.5rem);
}

.book img {
  display: block;
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  background: #d9d1c3;
  border-radius: 2px 4px 4px 2px;
  transform: perspective(1200px) rotateY(-10deg);
  transform-origin: left center;
  box-shadow:
    0 0 0 1px rgba(28, 24, 18, 0.14),
    -3px 0 0 #3f3a32,
    -6px 0 0 #1a1814,
    12px 18px 30px rgba(28, 24, 18, 0.28),
    4px 8px 12px rgba(28, 24, 18, 0.12);
}

.hero-copy .subhead {
  max-width: 65ch;
  margin-bottom: 1.15rem;
}

.audience {
  max-width: 65ch;
  padding-left: 1.15rem;
  margin: 0 0 1.5rem;
}

.audience li + li {
  margin-top: 0.55rem;
}

.price-block {
  margin-bottom: 1.25rem;
}

.price {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.85rem;
  line-height: 1.2;
  margin-bottom: 0.15rem;
  font-variant-numeric: tabular-nums;
}

.format,
.amazon,
.note,
.secondary {
  color: var(--muted);
  font-size: 0.95rem;
}

.format,
.amazon {
  margin-bottom: 0.2rem;
}

.amazon a {
  color: var(--muted);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 3.35rem;
  padding: 0.85rem 1.25rem;
  border: 0;
  border-radius: 2px;
  background: var(--accent);
  color: var(--paper);
  font-family: var(--sans);
  font-size: 1.12rem;
  font-weight: 700;
  line-height: 1.3;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}

.btn:hover {
  color: var(--paper);
  text-decoration: none;
  filter: brightness(0.92);
}

.btn:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

.hero-copy .btn,
.book-block-copy .btn,
.stack .btn,
form .btn {
  max-width: 32rem;
}

.secondary {
  margin-top: 0.85rem;
  margin-bottom: 0;
}

.secondary a {
  color: var(--ink);
}

.guarantee-line {
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1.4;
  max-width: 36rem;
  margin: 0 0 0.3rem;
}

.guarantee-detail {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.45;
  max-width: 36rem;
  margin: 0;
}

/* Hero portrait: face + standing cover as one composition */

.hero-portrait {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: min(100%, 20rem);
  margin-inline: auto;
  gap: 1.25rem;
}

.hero-portrait .portrait {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: center 18%;
  background: #d9d1c3;
  outline: 2px solid var(--paper);
  outline-offset: -2px;
  box-shadow: 0 10px 28px rgba(28, 24, 18, 0.22);
}

.hero-portrait .book {
  width: 40%;
}

/* Editorial section head */

.section-head {
  margin-bottom: 1.75rem;
}

.section-head h2 {
  margin-bottom: 0.85rem;
}

.lede {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.08rem;
  line-height: 1.65;
  max-width: 58ch;
  margin: 0;
}

/* Cost ledger (dark band) */

.band-dark {
  background: var(--ink);
  color: var(--paper);
}

.band-dark a {
  color: var(--paper);
}

.band-dark :focus-visible {
  outline-color: var(--paper);
}


.band-dark .note,
.band-dark .ledger-source,
.band-dark .ledger-source a {
  color: #c4bdb0;
}

.ledger {
  width: 100%;
  max-width: 52rem;
  margin: 0 0 1.25rem;
}

.ledger td {
  padding: 1.15rem 0;
  border-bottom: 1px solid rgba(247, 244, 238, 0.22);
  vertical-align: top;
}

.ledger tr:first-child td {
  border-top: 1px solid rgba(247, 244, 238, 0.22);
}

.ledger td:last-child {
  overflow-wrap: normal;
}

.ledger-line {
  display: block;
  font-size: 1.02rem;
  line-height: 1.4;
}

.ledger-source {
  display: block;
  margin-top: 0.3rem;
  font-size: 0.8rem;
  line-height: 1.4;
}

.ledger-figure {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(1.45rem, 3vw, 2.05rem);
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
  letter-spacing: -0.02em;
  text-align: right;
  white-space: nowrap;
  padding-left: 1.5rem;
  width: 1%;
}

.band-dark .note {
  margin-top: 0.25rem;
}

/* What's inside */

/* Three real pages side by side, each a link to the full-size render; the eight topics as a list. */
.page-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(0.6rem, 2.5vw, 1.75rem);
  max-width: 44rem;
}

.page-shot {
  margin: 0;
}

.page-shot a {
  display: block;
}

.page-shot img {
  display: block;
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  object-position: top center;
  background: #fff;
  box-shadow:
    0 0 0 1px rgba(28, 24, 18, 0.1),
    0 3px 10px rgba(28, 24, 18, 0.1);
}

.strip-note {
  margin: 0.75rem 0 1.5rem;
}

.topic-list {
  max-width: 65ch;
  padding-left: 1.15rem;
  margin: 0;
}

.topic-list li + li {
  margin-top: 0.55rem;
}

.all-chapters {
  max-width: 60rem;
}

.all-chapters[open] > summary {
  margin-bottom: 1.25rem;
}

/* Contents */

.contents-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.25rem;
  margin: 0 0 2.5rem;
}

.numeral {
  font-family: var(--serif);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin: 0 0 0.2rem;
}

.contents-name {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.45rem;
  letter-spacing: -0.015em;
  margin: 0 0 0.3rem;
}

.tagline {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  color: var(--muted);
  margin: 0 0 1rem;
}

.chapter-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.chapter-list li {
  margin: 0 0 0.75rem;
}

.chapter-list li:last-child {
  margin-bottom: 0;
}

.chapter-title {
  display: block;
  font-weight: 700;
  font-size: 0.98rem;
  line-height: 1.35;
}

.chapter-line {
  display: block;
  font-size: 0.88rem;
  line-height: 1.4;
  color: var(--muted);
}

.worksheets-block {
  padding-top: 2rem;
  border-top: 1px solid var(--accent);
}

.worksheets-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.35rem 1.5rem;
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 0.92rem;
}

/* Stack */

.stack-card {
  border: 1px solid var(--ink);
  border-radius: 2px;
  padding: 0.15rem 1.25rem;
  margin: 0 0 1.75rem;
}

.stack-row {
  padding: 1.1rem 0;
}

.stack-row + .stack-row {
  border-top: 1px solid var(--accent);
}

.stack-name {
  font-weight: 700;
  margin: 0 0 0.25rem;
}

.stack-detail {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.stack .guarantee-line {
  margin-top: 0;
}

/* Worksheet */

form p {
  margin-bottom: 0.85rem;
}

input[type="email"] {
  display: block;
  width: 100%;
  max-width: 32rem;
  min-height: 3.1rem;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--ink);
  border-radius: 2px;
  background: #fff;
  color: var(--ink);
  font-family: inherit;
  font-size: 1.05rem;
  line-height: 1.4;
  appearance: none;
  -webkit-appearance: none;
}

input[type="email"]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

label {
  cursor: pointer;
}

.note {
  margin-top: 0.35rem;
  margin-bottom: 0;
}

/* FAQ */

details {
  border-bottom: 1px solid var(--accent);
}

details:first-of-type {
  border-top: 1px solid var(--accent);
}

summary {
  padding: 1.05rem 0;
  font-weight: 700;
  font-size: 1.08rem;
  line-height: 1.4;
  cursor: pointer;
}

summary:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

details p {
  max-width: 65ch;
  margin: 0 0 1.15rem;
}

/* Thanks book block */

.book-block {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  align-items: center;
}

.book-block .book {
  width: min(100%, 14.5rem);
}

.book-block-copy {
  width: 100%;
  max-width: 65ch;
}

/* Errata */

.table-wrap {
  overflow-x: auto;
  margin: 1.5rem 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 1rem;
}

th,
td {
  padding: 0.7rem 1rem 0.7rem 0;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--accent);
}

th {
  font-weight: 700;
  white-space: nowrap;
}

td:last-child {
  overflow-wrap: anywhere;
}

/* Footer */

footer {
  padding: 2.25rem 0 3rem;
  border-top: 1px solid var(--accent);
  color: var(--muted);
  font-size: 0.95rem;
}

footer p {
  margin-bottom: 0.55rem;
}

footer a {
  color: var(--muted);
}

@media (min-width: 800px) {
  .hero {
    min-height: 100dvh;
    display: flex;
    align-items: center;
    padding-block: 3.5rem;
  }

  .hero-grid {
    display: grid;
    grid-template-columns: minmax(16rem, 0.85fr) minmax(22rem, 1.15fr);
    gap: 4rem;
    align-items: center;
  }

  .hero-cover {
    padding: 1rem 2.25rem 1.75rem 0.75rem;
    justify-content: flex-end;
  }

  .book {
    width: min(100%, 21rem);
  }

  .hero-copy .btn,
  .book-block-copy .btn,
  .stack .btn {
    width: auto;
    min-width: 16.5rem;
  }

  .hero-portrait {
    display: block;
    width: min(100%, 22rem);
    margin-inline: 0;
  }

  .hero-portrait .book {
    position: absolute;
    right: -6%;
    bottom: -8%;
    width: 40%;
    z-index: 1;
  }

  .hero-cover-portrait {
    padding: 1rem 2.75rem 3.25rem 0.75rem;
  }

  .contents-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2.75rem 3.5rem;
  }

  .band {
    padding: 4.5rem 0;
  }

  /* Copy comes first in the markup (phones read the offer before the picture); on desktop the picture sits left. */
  .hero-cover {
    order: -1;
  }

  .book-block {
    flex-direction: row;
    align-items: center;
    gap: 3.5rem;
  }

  .book-block .book {
    flex: 0 0 14.5rem;
  }
}

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

/* Mobile overrides added after review 2026-09-14: keep the portrait+cover overlap on phones
   (stacked, they pushed the headline a full screen down), and stack ledger rows figure-first
   instead of squeezing the sentence beside a large number. Desktop rules below restore the table. */
.hero-portrait { display: block; width: min(68%, 16rem); margin: 0 auto 1.25rem; }
.hero-portrait .book { position: absolute; right: -20%; bottom: -6%; width: 46%; z-index: 1; }
.hero-cover-portrait { padding: 0.5rem 2.5rem 1.25rem 0; }
.ledger tr { display: flex; flex-direction: column-reverse; padding: 1.1rem 0; border-bottom: 1px solid rgba(247, 244, 238, 0.22); }
.ledger tr:first-child { border-top: 1px solid rgba(247, 244, 238, 0.22); }
.ledger td, .ledger tr:first-child td { padding: 0; border: 0; }
.ledger td:last-child { margin-bottom: 0.35rem; }
.ledger-figure { text-align: left; }
@media (min-width: 800px) {
  .hero-portrait { width: min(100%, 22rem); margin-inline: 0; }
  .hero-portrait .book { right: -6%; bottom: -8%; width: 40%; }
  .hero-cover-portrait { padding: 1rem 2.75rem 3.25rem 0.75rem; }
  .ledger tr { display: table-row; padding: 0; border: 0; }
  .ledger td { padding: 1.15rem 0; border-bottom: 1px solid rgba(247, 244, 238, 0.22); }
  .ledger tr:first-child td { border-top: 1px solid rgba(247, 244, 238, 0.22); }
  .ledger td:last-child { margin-bottom: 0; }
  .ledger-figure { text-align: right; }
}

/* 2026-09-16: ledger button, sources block, legal pages */
.ledger-cta { margin: 1.75rem 0 0.5rem; }
.band-dark .guarantee-line { opacity: 0.85; }
.legal h2 { margin-top: 2rem; font-size: 1.35rem; }
.legal h3 { margin: 1.25rem 0 0.25rem; font-size: 1.05rem; }

/* 2026-09-25 review: offer on the first phone screen, one face line naming host and book,
   secondary actions look secondary, phone-only sticky buy bar. research/2026-09-25-landing-review.md */
.from { display: flex; align-items: center; gap: 0.75rem; margin: 0 0 1.1rem; line-height: 1.3; }
.from-face { width: 3rem; height: 3rem; border-radius: 50%; object-fit: cover; object-position: center 18%; flex: none; box-shadow: 0 0 0 2px var(--paper), 0 0 0 3px var(--accent); }
.from strong { display: block; font-size: 1rem; }
.from-book { display: block; color: var(--muted); font-family: var(--serif); font-style: italic; font-size: 0.98rem; }
.hero-copy .cta { margin-bottom: 0.7rem; }
.hero-copy .format { margin: 0.2rem 0 0; }
.hero-copy .audience { margin: 1.5rem 0 0; padding-top: 1.25rem; border-top: 1px solid rgba(28, 24, 18, 0.15); font-size: 0.98rem; }
.btn-quiet { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 2px var(--ink); }
.btn-quiet:hover { color: var(--ink); background: rgba(28, 24, 18, 0.05); filter: none; }
.band-worksheet { border-top: 1px solid var(--accent); }
.band-worksheet h2 { font-size: clamp(1.3rem, 2.4vw, 1.6rem); }
.band-worksheet h2::before { display: none; }
.contents-summary { max-width: 65ch; margin: 1.75rem 0 1rem; }
.all-chapters { border-top: 1px solid var(--accent); }
/* phones: the face is already in the .from line, so the hero picture is the cover alone */
@media (max-width: 799px) { .hero-portrait .portrait { display: none; } .hero-portrait .book { position: static; width: 100%; } .hero-portrait { width: min(46%, 10.5rem); margin: 0.25rem auto 0.5rem; } }
.buybar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 5; padding: 0.6rem 1rem calc(0.6rem + env(safe-area-inset-bottom)); background: rgba(247, 244, 238, 0.97); box-shadow: 0 -1px 0 var(--accent), 0 -6px 18px rgba(28, 24, 18, 0.12); transform: translateY(110%); transition: transform 0.2s ease; }
.buybar.on { transform: none; }
.buybar .btn { min-height: 3rem; }
/* phones: the portrait+cover composition follows the copy, smaller */
footer { padding-bottom: 6rem; }
@media (min-width: 800px) {
  .buybar { display: none; }
  .hero-portrait { width: min(100%, 22rem); margin: 0; }
  footer { padding-bottom: 3rem; }
}
@media (max-width: 799px) { .band { padding: 2.5rem 0; } .ledger tr { padding: 0.9rem 0; } }
@media (prefers-reduced-motion: reduce) { .buybar { transition: none; } }

/* 2026-09-29: video companion posts (post.html.j2, videos.html.j2) */
.crumbs { margin: 0 0 1rem; font-size: 0.9rem; color: var(--muted); }
.crumbs a { color: var(--muted); }
.post h2 { margin: 2.5rem 0 1rem; font-size: clamp(1.35rem, 2.6vw, 1.75rem); }
.post .lede { margin-bottom: 1.5rem; }
.post ul, .post ol { padding-left: 1.25rem; }
.post li + li { margin-top: 0.35rem; }
.yt { position: relative; aspect-ratio: 16 / 9; margin: 0 0 2rem; background: var(--ink); }
.yt a, .yt img, .yt iframe { display: block; width: 100%; height: 100%; border: 0; }
.yt img { object-fit: cover; }
.yt-btn { position: absolute; left: 50%; top: 50%; width: 4.25rem; height: 3rem; transform: translate(-50%, -50%); border-radius: 0.75rem; background: rgba(28, 24, 18, 0.82); }
.yt-btn::after { content: ""; position: absolute; left: 1.75rem; top: 0.85rem; border-style: solid; border-width: 0.65rem 0 0.65rem 1.1rem; border-color: transparent transparent transparent var(--paper); }
.yt a:hover .yt-btn { background: var(--accent); }
.post-fig { margin: 1.75rem 0; }
.post-fig img { width: 100%; border: 1px solid rgba(28, 24, 18, 0.15); background: #fff; }
.post-fig figcaption { margin-top: 0.5rem; font-size: 0.92rem; line-height: 1.45; }
.post-fig figcaption .note { display: block; font-size: 0.82rem; }
.post-box { margin: 2rem 0; padding: 1.1rem 1.25rem 0.4rem; border-left: 3px solid var(--accent); background: rgba(28, 24, 18, 0.04); }
.post-box-title { font-weight: 700; margin-bottom: 0.4rem; }
.band-post-book { border-top: 1px solid var(--accent); border-bottom: 1px solid var(--accent); }
.band-post-book .price { margin: 1.25rem 0 0.1rem; }
.post-sources h2 { font-size: 1.35rem; }
.post-sources li { font-size: 0.9rem; line-height: 1.45; overflow-wrap: anywhere; }
.post-list { list-style: none; padding: 0; margin: 1.5rem 0 0; }
.post-list li { padding: 0.9rem 0; border-top: 1px solid rgba(28, 24, 18, 0.15); }
.post-list a { display: block; font-family: var(--serif); font-weight: 600; font-size: 1.12rem; line-height: 1.35; }
.band-post-book .book { width: min(100%, 9rem); }
@media (min-width: 800px) { .band-post-book .book { width: min(100%, 13rem); } }
