@charset "utf-8";

/* ==========================================================================
   The Vibe Coder's Marketing Playbook
   Design system. Hand-written; replaces the Tailwind CDN build.

   The world is a prospectus: hairline rules, tabular figures, a strict
   measure, and display type set thin and large. Navy, gold and cream are
   the incumbent identity and are kept. What changed is the execution.

   Gold (--gold) is legible on the navy grounds only. On paper and white,
   gold text must use --gold-ink, which is dark enough to pass AA.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Faces
   Self-hosted. No third-party font CDN runs on the checkout page.
   -------------------------------------------------------------------------- */

@font-face {
  font-family: 'Clash Display';
  src: url('/fonts/clashdisplay-200.woff2') format('woff2');
  font-weight: 200;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Clash Display';
  src: url('/fonts/clashdisplay-300.woff2') format('woff2');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Clash Display';
  src: url('/fonts/clashdisplay-400.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Clash Display';
  src: url('/fonts/clashdisplay-500.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Supreme';
  src: url('/fonts/supreme-400.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Supreme';
  src: url('/fonts/supreme-500.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Supreme';
  src: url('/fonts/supreme-700.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
/* Reading face. Loaded on the library reader only, where people sit with
   20 chapters, and a text face beats a UI grotesque. */
@font-face {
  font-family: 'Literata';
  src: url('/fonts/literata-var.woff2') format('woff2');
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

/* --------------------------------------------------------------------------
   2. Tokens
   -------------------------------------------------------------------------- */

:root {
  /* Grounds */
  --ink: #0a1f3d;
  --ink-raised: #102a52;
  --ink-deep: #06162c;
  --paper: #f6efe1;
  --paper-2: #efe5d0;
  --white: #ffffff;

  /* Accent. --gold rides the navy grounds; --gold-ink rides paper and white. */
  --gold: #e8a93c;
  --gold-bright: #f2ba55;
  --gold-ink: #8f6210;

  /* Text on navy */
  --on-ink: #f6efe1;
  --on-ink-muted: #c3bcae;
  --on-ink-faint: #aca596;

  /* Text on paper and white */
  --on-paper: #0a1f3d;
  --on-paper-muted: #4d596d;

  /* Hairlines. The structural device of the whole page. */
  --rule-on-ink: rgba(246, 239, 225, 0.16);
  --rule-on-ink-strong: rgba(246, 239, 225, 0.32);
  --rule-on-paper: rgba(10, 31, 61, 0.16);
  --rule-on-paper-strong: rgba(10, 31, 61, 0.32);

  /* State */
  --danger: #a3241a;
  --danger-bg: #fdf3f2;
  --success: #1c5c3b;
  --success-bg: #f1f8f4;

  /* Faces */
  --display: 'Clash Display', 'Avenir Next', 'Helvetica Neue', Arial, sans-serif;
  --text: 'Supreme', 'Avenir Next', 'Helvetica Neue', Arial, system-ui, sans-serif;
  --reading: 'Literata', Georgia, 'Times New Roman', serif;

  /* Scale */
  --step-display: clamp(2.35rem, 6.2vw, 5.4rem);
  --step-h2: clamp(1.9rem, 4vw, 3.3rem);
  --step-h3: clamp(1.5rem, 2.2vw, 1.9rem);
  --step-h4: 1.1875rem;
  --step-body: 1.0625rem;
  --step-small: 0.9375rem;
  --step-fine: 0.8125rem;

  /* Rhythm */
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --section-y: clamp(4.5rem, 9vw, 8rem);
  --measure: 68ch;

  --radius: 2px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

/* --------------------------------------------------------------------------
   3. Reset and base
   -------------------------------------------------------------------------- */

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

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

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  background: var(--white);
  color: var(--on-paper);
  font-family: var(--text);
  font-size: var(--step-body);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: 'kern' 1;
}

h1,
h2,
h3,
h4 {
  font-family: var(--display);
  margin: 0;
  text-wrap: balance;
}

h1 {
  font-size: var(--step-display);
  font-weight: 200;
  line-height: 1.02;
  letter-spacing: -0.022em;
}

h2 {
  font-size: var(--step-h2);
  font-weight: 200;
  line-height: 1.06;
  letter-spacing: -0.018em;
}

h3 {
  font-size: var(--step-h3);
  font-weight: 300;
  line-height: 1.14;
  letter-spacing: -0.012em;
}

h4 {
  font-size: var(--step-h4);
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -0.006em;
}

p {
  margin: 0;
}

p + p {
  margin-top: 1.1em;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

a {
  color: inherit;
}

strong,
b {
  font-weight: 700;
}

em,
i {
  font-style: italic;
}

img,
svg {
  display: block;
  max-width: 100%;
}

/* Money and any figure that belongs in a column lines up. */
.num {
  font-variant-numeric: tabular-nums lining-nums;
  font-feature-settings: 'tnum' 1, 'lnum' 1;
}

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 1px;
}

.on-ink :focus-visible {
  outline-color: var(--gold);
}

::selection {
  background: var(--gold);
  color: var(--ink);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--gold);
  color: var(--ink);
  padding: 0.75rem 1.25rem;
  font-weight: 500;
}

.skip-link:focus {
  left: 0;
}

/* --------------------------------------------------------------------------
   4. Layout
   -------------------------------------------------------------------------- */

.wrap {
  width: 100%;
  max-width: 76rem;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.wrap-narrow {
  max-width: 54rem;
}

.wrap-text {
  max-width: 42rem;
}

.section {
  padding-block: var(--section-y);
}

.section-tight {
  padding-block: clamp(3rem, 5vw, 4.5rem);
}

/* Grounds. Sections alternate paper and navy; the seam is the design. */
.on-ink {
  background: var(--ink);
  color: var(--on-ink);
}

.on-ink-deep {
  background: var(--ink-deep);
  color: var(--on-ink);
}

.on-paper {
  background: var(--paper);
  color: var(--on-paper);
}

.on-white {
  background: var(--white);
  color: var(--on-paper);
}

.lede {
  font-size: clamp(1.0625rem, 1.5vw, 1.25rem);
  line-height: 1.65;
  max-width: 54ch;
  color: var(--on-paper-muted);
}

.on-ink .lede {
  color: var(--on-ink-muted);
}

.measure {
  max-width: var(--measure);
}

.center {
  text-align: center;
}

.center .lede,
.center .measure {
  margin-inline: auto;
}

/* A section head is a heading and, at most, a lede. No kickers.
   Measures are set on the children, each in its own font size: capping the
   wrapper in `ch` would size every heading against the body face and trap
   display type in a body-width column. */
.section-head {
  max-width: 56rem;
  margin-bottom: clamp(2.5rem, 4vw, 3.5rem);
}

.section-head h2 {
  max-width: 20ch;
}

.section-head.center,
.section-head.center h2,
.section-head.center .lede {
  margin-inline: auto;
}

.section-head > * + * {
  margin-top: 1.25rem;
}

/* --------------------------------------------------------------------------
   5. Rules
   The hairline is how structure is expressed. Not borders around boxes.
   -------------------------------------------------------------------------- */

.rule {
  border: 0;
  border-top: 1px solid var(--rule-on-paper);
  margin: 0;
}

.on-ink .rule,
.on-ink-deep .rule {
  border-top-color: var(--rule-on-ink);
}

.rule-gold {
  border-top-color: var(--gold-ink);
}

.on-ink .rule-gold {
  border-top-color: var(--gold);
}

/* --------------------------------------------------------------------------
   6. Buttons and links
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  min-height: 3.25rem;
  padding: 0 1.75rem;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-family: var(--text);
  font-size: 1rem;
  font-weight: 500;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.18s var(--ease), border-color 0.18s var(--ease),
    color 0.18s var(--ease);
}

.btn svg {
  flex: none;
}

.btn-primary {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--ink);
  font-weight: 700;
}

.btn-primary:hover {
  background: var(--gold-bright);
  border-color: var(--gold-bright);
}

.btn-primary:active {
  background: var(--gold);
}

/* On paper the primary action is navy; gold-on-cream is not legible enough
   to carry a filled button label. */
.btn-ink {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--on-ink);
  font-weight: 700;
}

.btn-ink:hover {
  background: var(--ink-raised);
  border-color: var(--ink-raised);
}

.btn-outline {
  background: transparent;
  border-color: var(--rule-on-ink-strong);
  color: var(--on-ink);
}

.btn-outline:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.on-paper .btn-outline,
.on-white .btn-outline {
  border-color: var(--rule-on-paper-strong);
  color: var(--on-paper);
}

.on-paper .btn-outline:hover,
.on-white .btn-outline:hover {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--on-ink);
}

.btn[disabled],
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-block {
  width: 100%;
}

/* Text link with a rule under it, the prospectus way. */
.link {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid var(--rule-on-paper-strong);
  padding-bottom: 1px;
  transition: border-color 0.18s var(--ease), color 0.18s var(--ease);
}

.link:hover {
  border-bottom-color: var(--gold-ink);
  color: var(--gold-ink);
}

.on-ink .link,
.on-ink-deep .link {
  border-bottom-color: var(--rule-on-ink-strong);
}

.on-ink .link:hover,
.on-ink-deep .link:hover {
  border-bottom-color: var(--gold);
  color: var(--gold);
}

.link-quiet {
  color: var(--on-paper-muted);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.link-quiet:hover {
  color: var(--on-paper);
  border-bottom-color: var(--rule-on-paper-strong);
}

/* Every navy surface, not just .on-ink sections: the masthead, footer, gate
   and reader sidebar are all dark grounds and their links must be tinted for
   dark, or they render near-invisible. */
.on-ink .link-quiet,
.masthead .link-quiet,
.footer .link-quiet,
.gate .link-quiet,
.reader-sidebar .link-quiet {
  color: var(--on-ink-muted);
}

.on-ink .link-quiet:hover,
.masthead .link-quiet:hover,
.footer .link-quiet:hover,
.gate .link-quiet:hover,
.reader-sidebar .link-quiet:hover {
  color: var(--on-ink);
  border-bottom-color: var(--rule-on-ink-strong);
}

.masthead .link,
.footer .link,
.gate .link,
.reader-sidebar .link {
  border-bottom-color: var(--rule-on-ink-strong);
}

.masthead .link:hover,
.footer .link:hover,
.gate .link:hover,
.reader-sidebar .link:hover {
  border-bottom-color: var(--gold);
  color: var(--gold);
}

/* --------------------------------------------------------------------------
   7. Masthead
   -------------------------------------------------------------------------- */

.masthead {
  background: var(--ink-deep);
  color: var(--on-ink);
  border-bottom: 1px solid var(--rule-on-ink);
}

.masthead-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 3.5rem;
  padding-block: 0.75rem;
}

.masthead-mark {
  font-family: var(--display);
  font-weight: 400;
  font-size: 0.9375rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--on-ink);
  text-decoration: none;
  white-space: nowrap;
}

.masthead-mark span {
  color: var(--gold);
}

.masthead-actions {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  font-size: var(--step-small);
}

.masthead .btn {
  min-height: 2.5rem;
  padding: 0 1.125rem;
  font-size: var(--step-small);
}

@media (max-width: 33rem) {
  .masthead-hide-sm {
    display: none;
  }
}

/* --------------------------------------------------------------------------
   8. Hero
   -------------------------------------------------------------------------- */

.hero {
  background: var(--ink);
  color: var(--on-ink);
  padding-block: clamp(3.5rem, 8vw, 7rem);
  position: relative;
}

.hero-grid {
  display: grid;
  gap: clamp(3rem, 6vw, 5rem);
  align-items: end;
}

@media (min-width: 62rem) {
  .hero-grid {
    grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  }
}

.hero h1 {
  max-width: 16ch;
}

.hero h1 em {
  font-style: normal;
  font-weight: 400;
  color: var(--gold);
}

.hero-lede {
  margin-top: clamp(1.75rem, 3vw, 2.25rem);
  max-width: 48ch;
  font-size: clamp(1.0625rem, 1.4vw, 1.1875rem);
  line-height: 1.7;
  color: var(--on-ink-muted);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: clamp(2rem, 3.5vw, 2.75rem);
}

/* Terms sit on a rule, set as a specification line rather than a badge row. */
.terms {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 2rem;
  margin-top: 2.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--rule-on-ink);
  font-size: var(--step-fine);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--on-ink-faint);
}

.on-paper .terms,
.on-white .terms {
  border-top-color: var(--rule-on-paper);
  color: var(--on-paper-muted);
}

/* Book object. A drawn cover, not a shadowed mockup. */
.cover {
  width: 100%;
  max-width: 20rem;
  margin-inline: auto;
  aspect-ratio: 3 / 4;
  background: var(--ink-deep);
  border: 1px solid var(--rule-on-ink-strong);
  padding: clamp(1.5rem, 2.5vw, 2rem);
  display: flex;
  flex-direction: column;
  position: relative;
}

@media (min-width: 62rem) {
  .cover {
    margin-inline: 0 0;
    margin-left: auto;
  }
}

.cover::after {
  content: '';
  position: absolute;
  inset: 0.5rem;
  border: 1px solid var(--rule-on-ink);
  pointer-events: none;
}

.cover-top {
  font-size: 0.6875rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--gold);
}

.cover-title {
  margin-top: auto;
  font-family: var(--display);
  font-weight: 200;
  font-size: clamp(1.75rem, 3.4vw, 2.35rem);
  line-height: 1.04;
  letter-spacing: -0.02em;
  color: var(--on-ink);
}

.cover-sub {
  margin-top: 1rem;
  padding-top: 0.875rem;
  border-top: 1px solid var(--rule-on-ink);
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--on-ink-muted);
}

.cover-by {
  margin-top: 1.25rem;
  font-size: 0.6875rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--on-ink-faint);
}

/* --------------------------------------------------------------------------
   9. Pull quote
   -------------------------------------------------------------------------- */

.pullquote {
  font-family: var(--display);
  font-weight: 200;
  font-size: clamp(1.5rem, 3.2vw, 2.4rem);
  line-height: 1.28;
  letter-spacing: -0.015em;
  max-width: 26ch;
  margin: 0;
}

.pullquote strong {
  font-weight: 400;
  color: var(--gold-ink);
}

.on-ink .pullquote strong {
  color: var(--gold);
}

.pullquote-cite {
  display: block;
  margin-top: 1.75rem;
  font-family: var(--text);
  font-size: var(--step-fine);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--on-paper-muted);
  font-style: normal;
}

.on-ink .pullquote-cite {
  color: var(--on-ink-faint);
}

/* --------------------------------------------------------------------------
   10. Ledger. The IF/THEN sequence, the day-one math, order summaries.
   -------------------------------------------------------------------------- */

.ledger {
  border-top: 1px solid var(--rule-on-paper);
}

.on-ink .ledger {
  border-top-color: var(--rule-on-ink);
}

.ledger > li,
.ledger > .ledger-row {
  display: grid;
  grid-template-columns: 4.25rem minmax(0, 1fr);
  gap: 0 1.5rem;
  align-items: baseline;
  padding-block: 1.05rem;
  border-bottom: 1px solid var(--rule-on-paper);
}

.on-ink .ledger > li,
.on-ink .ledger > .ledger-row {
  border-bottom-color: var(--rule-on-ink);
}

.ledger-key {
  font-family: var(--display);
  font-weight: 400;
  font-size: 0.8125rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-ink);
}

.on-ink .ledger-key {
  color: var(--gold);
}

.ledger-val {
  font-size: clamp(1rem, 1.4vw, 1.125rem);
  line-height: 1.55;
}

.ledger-val em {
  font-style: italic;
}

/* Money ledger: label left, figure right. */
.accounts {
  border-top: 1px solid var(--rule-on-paper);
  width: 100%;
}

.on-ink .accounts {
  border-top-color: var(--rule-on-ink);
}

.accounts-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1.5rem;
  padding-block: 0.9rem;
  border-bottom: 1px solid var(--rule-on-paper);
}

.on-ink .accounts-row {
  border-bottom-color: var(--rule-on-ink);
}

.accounts-label {
  color: var(--on-paper-muted);
}

.on-ink .accounts-label {
  color: var(--on-ink-muted);
}

.accounts-figure {
  font-variant-numeric: tabular-nums lining-nums;
  font-feature-settings: 'tnum' 1, 'lnum' 1;
  white-space: nowrap;
}

.accounts-row-sum {
  border-bottom-width: 1px;
}

.accounts-row-sum .accounts-label {
  color: var(--on-paper);
  font-weight: 500;
}

.on-ink .accounts-row-sum .accounts-label {
  color: var(--on-ink);
}

.accounts-row-sum .accounts-figure {
  font-weight: 500;
}

/* The bottom line. This row carries the argument of the whole page, so it
   gets the one authored motion moment: the gold rule draws across on first
   view, from an already-visible default. */
.accounts-row-total {
  border-bottom: 0;
  padding-block: 1.4rem;
  position: relative;
  align-items: baseline;
}

.accounts-row-total .accounts-label {
  font-family: var(--display);
  font-weight: 400;
  font-size: 1.125rem;
  color: var(--on-paper);
}

.on-ink .accounts-row-total .accounts-label {
  color: var(--on-ink);
}

.accounts-row-total .accounts-figure {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(1.75rem, 3.4vw, 2.5rem);
  letter-spacing: -0.02em;
  color: var(--gold-ink);
  line-height: 1;
}

.on-ink .accounts-row-total .accounts-figure {
  color: var(--gold);
}

.accounts-row-total::before {
  content: '';
  position: absolute;
  inset-inline: 0;
  top: 0;
  height: 2px;
  background: var(--gold-ink);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 1.1s var(--ease);
}

.on-ink .accounts-row-total::before {
  background: var(--gold);
}

.accounts.is-settled .accounts-row-total::before {
  transform: scaleX(1);
}

@media (prefers-reduced-motion: reduce) {
  .accounts-row-total::before {
    transition: none;
    transform: scaleX(1);
  }
}

.accounts-note {
  margin-top: 1.25rem;
  font-size: var(--step-small);
  color: var(--on-paper-muted);
}

.on-ink .accounts-note {
  color: var(--on-ink-muted);
}

/* --------------------------------------------------------------------------
   11. Comparison. Two columns divided by a rule, not two cards.
   -------------------------------------------------------------------------- */

.compare {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--rule-on-ink);
}

@media (min-width: 48rem) {
  .compare {
    grid-template-columns: 1fr 1fr;
  }
}

.compare-col {
  padding: clamp(1.75rem, 3vw, 2.5rem) 0;
}

@media (min-width: 48rem) {
  .compare-col + .compare-col {
    border-left: 1px solid var(--rule-on-ink);
    padding-left: clamp(2rem, 4vw, 3.5rem);
  }

  .compare-col:first-child {
    padding-right: clamp(2rem, 4vw, 3.5rem);
  }
}

@media (max-width: 47.99rem) {
  .compare-col + .compare-col {
    border-top: 1px solid var(--rule-on-ink);
  }
}

.on-paper .compare,
.on-white .compare,
.on-paper .compare-col + .compare-col,
.on-white .compare-col + .compare-col {
  border-color: var(--rule-on-paper);
}

.compare-head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.compare-head h3 {
  font-size: 1.375rem;
  font-weight: 400;
}

.compare-mark {
  flex: none;
  width: 1.5rem;
  height: 1.5rem;
}

.compare-mark-no {
  color: var(--danger);
}

.on-ink .compare-mark-no {
  color: #e08a80;
}

.compare-mark-yes {
  color: var(--gold);
}

.on-paper .compare-mark-yes,
.on-white .compare-mark-yes {
  color: var(--gold-ink);
}

.compare-list > li {
  padding-block: 0.6rem;
  border-bottom: 1px solid var(--rule-on-ink);
  line-height: 1.55;
}

.on-paper .compare-list > li,
.on-white .compare-list > li {
  border-bottom-color: var(--rule-on-paper);
}

.compare-list > li:last-child {
  border-bottom: 0;
}

.compare-foot {
  margin-top: 1.5rem;
  font-size: var(--step-small);
  color: var(--on-ink-muted);
}

.on-paper .compare-foot,
.on-white .compare-foot {
  color: var(--on-paper-muted);
}

.compare-foot strong {
  color: var(--on-ink);
  font-weight: 500;
}

.on-paper .compare-foot strong,
.on-white .compare-foot strong {
  color: var(--on-paper);
}

/* --------------------------------------------------------------------------
   12. Funnel stack
   -------------------------------------------------------------------------- */

.funnel {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.funnel-cap {
  font-size: var(--step-fine);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--on-paper-muted);
  padding-block: 0.75rem;
}

.funnel-step {
  --inset: 0%;
  clip-path: polygon(0 0, 100% 0, calc(100% - var(--inset)) 100%, var(--inset) 100%);
  background: var(--ink);
  color: var(--on-ink);
  padding: 1.25rem clamp(1.5rem, 5vw, 3rem);
  text-align: center;
}

.funnel-step:nth-child(even) {
  background: var(--ink-raised);
}

.funnel-step-meta {
  font-size: 0.6875rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
}

.funnel-step-name {
  font-family: var(--display);
  font-weight: 300;
  font-size: 1.1875rem;
  line-height: 1.2;
  margin-top: 0.25rem;
}

/* --------------------------------------------------------------------------
   13. Parts. The book's five parts are a real sequence, so they are numbered.
   -------------------------------------------------------------------------- */

.parts {
  border-top: 1px solid var(--rule-on-paper);
}

.part {
  display: grid;
  gap: 0.75rem clamp(1.5rem, 4vw, 3.5rem);
  padding-block: clamp(2rem, 3.5vw, 2.75rem);
  border-bottom: 1px solid var(--rule-on-paper);
}

@media (min-width: 52rem) {
  .part {
    grid-template-columns: 5rem minmax(0, 1.1fr) minmax(0, 1fr);
    align-items: start;
  }
}

.part-num {
  font-family: var(--display);
  font-weight: 200;
  font-size: clamp(2.25rem, 4vw, 3.25rem);
  line-height: 0.9;
  letter-spacing: -0.03em;
  color: var(--gold-ink);
  font-variant-numeric: tabular-nums lining-nums;
}

.part-title {
  font-size: clamp(1.375rem, 2vw, 1.75rem);
  font-weight: 300;
}

.part-blurb {
  margin-top: 0.75rem;
  color: var(--on-paper-muted);
  font-size: var(--step-small);
  line-height: 1.65;
}

.part-chapters > li {
  display: grid;
  grid-template-columns: 3.25rem minmax(0, 1fr);
  gap: 1rem;
  padding-block: 0.4rem;
  font-size: var(--step-small);
  line-height: 1.5;
  color: var(--on-paper-muted);
}

.part-chapters .ch {
  font-variant-numeric: tabular-nums lining-nums;
  font-size: var(--step-fine);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold-ink);
  padding-top: 0.15em;
}

/* --------------------------------------------------------------------------
   14. Inclusions. What you get, set as a specification list.
   -------------------------------------------------------------------------- */

.inclusions {
  border-top: 1px solid var(--rule-on-paper);
}

.on-ink .inclusions {
  border-top-color: var(--rule-on-ink);
}

.inclusion {
  display: grid;
  gap: 0.35rem clamp(1.5rem, 4vw, 3rem);
  padding-block: clamp(1.35rem, 2.4vw, 1.85rem);
  border-bottom: 1px solid var(--rule-on-paper);
}

.on-ink .inclusion {
  border-bottom-color: var(--rule-on-ink);
}

@media (min-width: 46rem) {
  .inclusion {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr);
    align-items: baseline;
  }
}

.inclusion h3 {
  font-size: 1.1875rem;
  font-weight: 400;
  line-height: 1.3;
}

.inclusion p {
  color: var(--on-paper-muted);
  font-size: var(--step-small);
  line-height: 1.65;
}

.on-ink .inclusion p {
  color: var(--on-ink-muted);
}

.inclusion-lead {
  border-bottom: 0;
}

.inclusion-lead h3 {
  color: var(--gold-ink);
}

.on-ink .inclusion-lead h3 {
  color: var(--gold);
}

/* --------------------------------------------------------------------------
   15. Schedule. The 30-day plan, as a dated sequence.
   -------------------------------------------------------------------------- */

.schedule {
  border-top: 1px solid var(--rule-on-paper);
}

.schedule-item {
  display: grid;
  gap: 0.35rem clamp(1.5rem, 4vw, 3rem);
  padding-block: clamp(1.35rem, 2.4vw, 1.85rem);
  border-bottom: 1px solid var(--rule-on-paper);
  align-items: baseline;
}

@media (min-width: 46rem) {
  .schedule-item {
    grid-template-columns: 7.5rem minmax(0, 0.85fr) minmax(0, 1.4fr);
  }
}

.schedule-days {
  font-variant-numeric: tabular-nums lining-nums;
  font-size: var(--step-fine);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-ink);
}

.schedule-item h3 {
  font-size: 1.1875rem;
  font-weight: 400;
}

.schedule-item p {
  color: var(--on-paper-muted);
  font-size: var(--step-small);
  line-height: 1.65;
}

/* --------------------------------------------------------------------------
   16. Chapter feature blocks (newest chapters)
   -------------------------------------------------------------------------- */

.chapters-new {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--rule-on-ink);
}

@media (min-width: 52rem) {
  .chapters-new {
    grid-template-columns: 1fr 1fr;
  }
}

.chapter-new {
  padding-block: clamp(2rem, 3.5vw, 2.75rem);
}

@media (min-width: 52rem) {
  .chapter-new + .chapter-new {
    border-left: 1px solid var(--rule-on-ink);
    padding-left: clamp(2rem, 4vw, 3.5rem);
  }

  .chapter-new:first-child {
    padding-right: clamp(2rem, 4vw, 3.5rem);
  }
}

@media (max-width: 51.99rem) {
  .chapter-new + .chapter-new {
    border-top: 1px solid var(--rule-on-ink);
  }
}

.chapter-new-ref {
  font-size: var(--step-fine);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
}

.chapter-new h3 {
  margin-top: 0.75rem;
  font-size: clamp(1.375rem, 2vw, 1.75rem);
  font-weight: 300;
}

.chapter-new p {
  margin-top: 1.1rem;
  color: var(--on-ink-muted);
  font-size: var(--step-small);
  line-height: 1.7;
}

/* --------------------------------------------------------------------------
   17. Author
   -------------------------------------------------------------------------- */

.credits {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--rule-on-paper);
  border-bottom: 1px solid var(--rule-on-paper);
  margin-block: 2.5rem;
}

@media (min-width: 40rem) {
  .credits {
    grid-template-columns: repeat(3, 1fr);
  }
}

.credit {
  padding: 1.25rem 0;
}

@media (min-width: 40rem) {
  .credit + .credit {
    border-left: 1px solid var(--rule-on-paper);
    padding-left: 1.5rem;
  }
}

@media (max-width: 39.99rem) {
  .credit + .credit {
    border-top: 1px solid var(--rule-on-paper);
  }
}

.credit-kind {
  font-size: var(--step-fine);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-ink);
}

.credit-what {
  margin-top: 0.4rem;
  font-family: var(--display);
  font-weight: 400;
  font-size: 1.0625rem;
  line-height: 1.25;
}

.signature {
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--rule-on-paper);
  font-size: var(--step-fine);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--on-paper-muted);
}

/* --------------------------------------------------------------------------
   18. Price
   -------------------------------------------------------------------------- */

.price {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  flex-wrap: nowrap;
  white-space: nowrap;
  font-variant-numeric: tabular-nums lining-nums;
}

.price-was {
  font-family: var(--display);
  font-weight: 300;
  font-size: clamp(1.25rem, 2.4vw, 1.875rem);
  color: var(--on-paper-muted);
  text-decoration: line-through;
  text-decoration-thickness: 1px;
}

.on-ink .price-was {
  color: var(--on-ink-faint);
}

.price-now {
  font-family: var(--display);
  font-weight: 200;
  font-size: clamp(3rem, 7vw, 5rem);
  line-height: 0.9;
  letter-spacing: -0.03em;
  color: var(--on-paper);
}

.on-ink .price-now {
  color: var(--gold);
}

.price-unit {
  font-size: var(--step-fine);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--on-paper-muted);
}

.on-ink .price-unit {
  color: var(--on-ink-faint);
}

.price-center {
  justify-content: center;
}

/* Offer summary above the form */
.offer {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
  padding-block: 1.75rem;
  border-top: 1px solid var(--rule-on-ink);
  border-bottom: 1px solid var(--rule-on-ink);
}

.offer-body {
  flex: 1 1 20rem;
  min-width: 0;
}

.offer h3 {
  font-size: 1.375rem;
  font-weight: 300;
}

.offer p {
  margin-top: 0.5rem;
  font-size: var(--step-small);
  color: var(--on-ink-muted);
  max-width: 46ch;
}

.offer .price-now {
  font-size: clamp(2.5rem, 5vw, 3.25rem);
}

/* --------------------------------------------------------------------------
   19. Forms
   -------------------------------------------------------------------------- */

.panel {
  background: var(--paper);
  color: var(--on-paper);
  padding: clamp(1.5rem, 3.5vw, 2.5rem);
  border: 1px solid var(--rule-on-paper);
  border-radius: var(--radius);
}

.panel-plain {
  background: transparent;
  border-color: var(--rule-on-paper);
}

.on-ink .panel-plain {
  border-color: var(--rule-on-ink);
  color: var(--on-ink);
}

.field {
  display: block;
}

.field + .field,
.field-row + .field,
.field + .field-row {
  margin-top: 1.25rem;
}

.field-row {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 34rem) {
  .field-row {
    grid-template-columns: 1fr 1fr;
  }

  .field-row .field + .field {
    margin-top: 0;
  }
}

.label {
  display: block;
  font-size: var(--step-fine);
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--on-paper-muted);
  margin-bottom: 0.5rem;
}

.input {
  width: 100%;
  font-family: var(--text);
  font-size: 1rem;
  line-height: 1.4;
  color: var(--on-paper);
  background: var(--white);
  border: 1px solid var(--rule-on-paper-strong);
  border-radius: var(--radius);
  padding: 0.875rem 1rem;
  transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease);
}

.input::placeholder {
  color: #6b7586;
}

.input:focus {
  outline: none;
  border-color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--ink);
}

.input[aria-invalid='true'] {
  border-color: var(--danger);
}

/* Stripe Elements is styled from the same tokens as .input */
.StripeElement {
  width: 100%;
  background: var(--white);
  border: 1px solid var(--rule-on-paper-strong);
  border-radius: var(--radius);
  padding: 0.9375rem 1rem;
  transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease);
}

.StripeElement--focus {
  border-color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--ink);
}

.StripeElement--invalid {
  border-color: var(--danger);
}

.field-error {
  margin-top: 0.5rem;
  font-size: var(--step-small);
  color: var(--danger);
  min-height: 1.25rem;
}

.field-error:empty {
  min-height: 0;
}

.form-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  margin-top: 1.75rem;
}

.secure {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: var(--step-fine);
  color: var(--on-paper-muted);
}

.secure svg {
  flex: none;
  width: 1rem;
  height: 1rem;
}

.fineprint {
  margin-top: 1.25rem;
  font-size: var(--step-fine);
  line-height: 1.6;
  color: var(--on-paper-muted);
}

.on-ink .fineprint {
  color: var(--on-ink-faint);
}

/* A panel is a paper surface even when it sits inside a navy section, so it
   takes the paper text colors back. */
.on-ink .panel .fineprint,
.on-ink .panel .label,
.on-ink .panel .secure {
  color: var(--on-paper-muted);
}

.on-ink .panel {
  color: var(--on-paper);
}

/* Alerts */
.alert {
  border: 1px solid;
  border-radius: var(--radius);
  padding: 0.875rem 1rem;
  font-size: var(--step-small);
  line-height: 1.5;
  margin-bottom: 1.25rem;
}

.alert[hidden] {
  display: none;
}

.alert-error {
  color: var(--danger);
  border-color: rgba(163, 36, 26, 0.35);
  background: var(--danger-bg);
}

.alert-success {
  color: var(--success);
  border-color: rgba(28, 92, 59, 0.35);
  background: var(--success-bg);
}

/* Spinner */
.spinner {
  width: 1rem;
  height: 1rem;
  animation: spin 0.8s linear infinite;
}

.spinner[hidden] {
  display: none;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .spinner {
    animation-duration: 2s;
  }
}

/* --------------------------------------------------------------------------
   20. Guarantee
   -------------------------------------------------------------------------- */

.guarantee {
  display: grid;
  gap: 1.5rem clamp(1.5rem, 3vw, 2.5rem);
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--rule-on-ink);
}

@media (min-width: 40rem) {
  .guarantee {
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start;
  }
}

.guarantee-days {
  font-family: var(--display);
  font-weight: 200;
  font-size: clamp(3rem, 6vw, 4.5rem);
  line-height: 0.85;
  letter-spacing: -0.03em;
  color: var(--gold);
  font-variant-numeric: tabular-nums lining-nums;
}

.guarantee-days small {
  display: block;
  font-family: var(--text);
  font-size: 0.6875rem;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--on-ink-faint);
  margin-top: 0.5rem;
}

.guarantee h3 {
  font-size: 1.375rem;
  font-weight: 300;
  color: var(--gold);
}

.guarantee p {
  margin-top: 0.75rem;
  color: var(--on-ink-muted);
  line-height: 1.7;
  max-width: 60ch;
}

/* --------------------------------------------------------------------------
   21. FAQ
   -------------------------------------------------------------------------- */

.faq {
  border-top: 1px solid var(--rule-on-paper);
}

.faq-item {
  border-bottom: 1px solid var(--rule-on-paper);
}

.faq-q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding-block: 1.35rem;
  cursor: pointer;
  list-style: none;
  font-family: var(--display);
  font-weight: 400;
  font-size: 1.125rem;
  line-height: 1.35;
  transition: color 0.15s var(--ease);
}

.faq-q::-webkit-details-marker {
  display: none;
}

.faq-q:hover {
  color: var(--gold-ink);
}

.faq-sign {
  flex: none;
  width: 0.875rem;
  height: 0.875rem;
  position: relative;
}

.faq-sign::before,
.faq-sign::after {
  content: '';
  position: absolute;
  background: currentColor;
  transition: transform 0.22s var(--ease), opacity 0.22s var(--ease);
}

.faq-sign::before {
  inset-inline: 0;
  top: 50%;
  height: 1px;
  margin-top: -0.5px;
}

.faq-sign::after {
  inset-block: 0;
  left: 50%;
  width: 1px;
  margin-left: -0.5px;
}

.faq-item[open] .faq-sign::after {
  transform: scaleY(0);
  opacity: 0;
}

.faq-a {
  padding-bottom: 1.5rem;
  color: var(--on-paper-muted);
  line-height: 1.7;
  max-width: 62ch;
}

@media (prefers-reduced-motion: reduce) {
  .faq-sign::before,
  .faq-sign::after {
    transition: none;
  }
}

/* --------------------------------------------------------------------------
   22. Footer
   -------------------------------------------------------------------------- */

.footer {
  background: var(--ink-deep);
  color: var(--on-ink-faint);
  padding-block: 2.5rem;
  border-top: 1px solid var(--rule-on-ink);
  font-size: var(--step-small);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 2rem;
  align-items: center;
  justify-content: space-between;
}

/* --------------------------------------------------------------------------
   23. Account and library shells
   -------------------------------------------------------------------------- */

.app-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--paper);
}

.app-main {
  flex: 1;
  padding-block: clamp(2.5rem, 5vw, 4rem);
}

.app-head {
  padding-bottom: 1.75rem;
  border-bottom: 1px solid var(--rule-on-paper);
  margin-bottom: 2.5rem;
}

.app-head h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 200;
}

.app-head p {
  margin-top: 0.75rem;
  color: var(--on-paper-muted);
}

.shelf {
  border-top: 1px solid var(--rule-on-paper);
}

.shelf-item {
  display: grid;
  gap: 0.35rem 1.5rem;
  align-items: baseline;
  padding-block: 1.35rem;
  border-bottom: 1px solid var(--rule-on-paper);
  text-decoration: none;
  color: inherit;
  transition: background-color 0.15s var(--ease);
}

@media (min-width: 44rem) {
  .shelf-item {
    grid-template-columns: minmax(0, 1fr) auto;
  }
}

.shelf-item:hover {
  background: rgba(10, 31, 61, 0.035);
}

.shelf-item h3 {
  font-size: 1.1875rem;
  font-weight: 400;
}

.shelf-item p {
  margin-top: 0.25rem;
  font-size: var(--step-small);
  color: var(--on-paper-muted);
}

.shelf-go {
  font-size: var(--step-fine);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-ink);
  white-space: nowrap;
}

/* --------------------------------------------------------------------------
   24. Reader
   -------------------------------------------------------------------------- */

.reader {
  display: grid;
  min-height: 100vh;
  background: var(--paper);
}

@media (min-width: 60rem) {
  .reader {
    grid-template-columns: 19rem minmax(0, 1fr);
  }
}

.reader-sidebar {
  background: var(--ink);
  color: var(--on-ink);
  border-right: 1px solid var(--rule-on-ink);
  display: flex;
  flex-direction: column;
}

@media (min-width: 60rem) {
  .reader-sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
  }
}

@media (max-width: 59.99rem) {
  .reader-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: min(20rem, 85vw);
    z-index: 40;
    transform: translateX(-100%);
    transition: transform 0.3s var(--ease);
  }

  .reader-sidebar.is-open {
    transform: translateX(0);
  }
}

.reader-sidebar-head {
  padding: 1.25rem var(--gutter);
  border-bottom: 1px solid var(--rule-on-ink);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.reader-nav {
  flex: 1;
  overflow-y: auto;
  padding: 1.25rem 0 2.5rem;
}

.reader-part {
  padding: 1.5rem var(--gutter) 0.5rem;
  font-size: var(--step-fine);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
}

.sidebar-link {
  display: grid;
  grid-template-columns: 2.25rem minmax(0, 1fr);
  gap: 0.75rem;
  padding: 0.55rem var(--gutter);
  color: var(--on-ink-muted);
  text-decoration: none;
  font-size: var(--step-small);
  line-height: 1.45;
  border-left: 2px solid transparent;
  transition: color 0.15s var(--ease), background-color 0.15s var(--ease);
}

.sidebar-link:hover {
  color: var(--on-ink);
  background: rgba(246, 239, 225, 0.05);
}

.sidebar-link.is-current {
  color: var(--on-ink);
  border-left-color: var(--gold);
  background: rgba(246, 239, 225, 0.07);
}

.sidebar-link .ch {
  font-variant-numeric: tabular-nums lining-nums;
  color: var(--on-ink-faint);
}

.sidebar-link.is-current .ch {
  color: var(--gold);
}

.reader-body {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.reader-topbar {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.875rem var(--gutter);
  border-bottom: 1px solid var(--rule-on-paper);
  background: var(--paper);
  position: sticky;
  top: 0;
  z-index: 20;
}

@media (min-width: 60rem) {
  .reader-topbar {
    display: none;
  }
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid var(--rule-on-paper-strong);
  border-radius: var(--radius);
  background: transparent;
  color: inherit;
  cursor: pointer;
  transition: border-color 0.15s var(--ease);
}

.icon-btn:hover {
  border-color: var(--ink);
}

.on-ink .icon-btn {
  border-color: var(--rule-on-ink-strong);
  color: var(--on-ink);
}

.on-ink .icon-btn:hover {
  border-color: var(--gold);
}

.reader-scrim {
  position: fixed;
  inset: 0;
  background: rgba(6, 22, 44, 0.6);
  z-index: 30;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s var(--ease);
}

.reader-scrim.is-open {
  opacity: 1;
  pointer-events: auto;
}

@media (min-width: 60rem) {
  .reader-scrim {
    display: none;
  }
}

.chapter {
  width: 100%;
  max-width: 44rem;
  margin-inline: auto;
  padding: clamp(2.5rem, 5vw, 4.5rem) var(--gutter) 4rem;
}

/* Wayfinding, not decoration: which part and chapter you are in. */
.chapter-where {
  font-size: var(--step-fine);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-ink);
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--rule-on-paper);
}

.chapter h1 {
  margin-top: 1.75rem;
  font-size: clamp(2rem, 4.4vw, 3.1rem);
  font-weight: 200;
}

.chapter-prose {
  margin-top: 2.5rem;
  font-family: var(--reading);
  font-size: 1.125rem;
  line-height: 1.78;
  color: #16233a;
}

.chapter-prose > * + * {
  margin-top: 1.4em;
}

.chapter-prose h2 {
  font-family: var(--display);
  font-size: clamp(1.5rem, 2.6vw, 2rem);
  font-weight: 300;
  margin-top: 2.4em;
  line-height: 1.15;
}

.chapter-prose h3 {
  font-family: var(--display);
  font-size: 1.3125rem;
  font-weight: 400;
  margin-top: 2em;
}

.chapter-prose ul,
.chapter-prose ol {
  padding-left: 1.35rem;
  list-style: disc;
}

.chapter-prose ol {
  list-style: decimal;
}

.chapter-prose li + li {
  margin-top: 0.5em;
}

.chapter-prose blockquote {
  margin: 2em 0;
  padding-left: 1.5rem;
  border-left: 1px solid var(--gold-ink);
  font-style: italic;
  color: var(--on-paper-muted);
}

.chapter-prose img {
  margin-block: 2em;
  width: 100%;
  height: auto;
  border: 1px solid var(--rule-on-paper);
}

.chapter-prose h4 {
  font-family: var(--display);
  font-size: 1.125rem;
  font-weight: 500;
  margin-top: 1.8em;
}

/* Tables carry real data in this book, so they are set as data: tabular
   figures, ruled rows, no fills or rounding. */
.chapter-prose table {
  width: 100%;
  border-collapse: collapse;
  margin-block: 2em;
  font-family: var(--text);
  font-size: 0.9375rem;
  font-variant-numeric: tabular-nums lining-nums;
}

.chapter-prose th {
  text-align: left;
  font-family: var(--text);
  font-size: var(--step-fine);
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-ink);
  padding: 0 0.9rem 0.6rem 0;
  border-bottom: 1px solid var(--rule-on-paper-strong);
  vertical-align: bottom;
}

.chapter-prose td {
  padding: 0.7rem 0.9rem 0.7rem 0;
  border-bottom: 1px solid var(--rule-on-paper);
  vertical-align: top;
  line-height: 1.55;
}

.chapter-prose th:last-child,
.chapter-prose td:last-child {
  padding-right: 0;
}

.chapter-prose figure {
  margin-block: 2.25em;
}

.chapter-prose figure img {
  border: 1px solid var(--rule-on-paper);
  background: var(--paper);
}

.chapter-prose figcaption {
  margin-top: 0.7rem;
  font-family: var(--text);
  font-size: var(--step-fine);
  color: var(--on-paper-muted);
}

/* Checklist items are boxes to tick, drawn rather than typed as a glyph. */
.chapter-prose ul.checklist {
  list-style: none;
  padding-left: 0;
}

.chapter-prose ul.checklist li {
  position: relative;
  padding-left: 1.85rem;
}

.chapter-prose ul.checklist li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 0.8rem;
  height: 0.8rem;
  border: 1px solid var(--gold-ink);
  border-radius: 1px;
}

.chapter-prose .prompt-instructions {
  font-family: var(--text);
  font-size: var(--step-small);
  color: var(--on-paper-muted);
  margin-bottom: 0.75rem;
}

.chapter-prose pre {
  margin-block: 2em;
  padding: 1.25rem;
  padding-right: 5.5rem;
  background: var(--ink-deep);
  color: var(--on-ink);
  border-radius: var(--radius);
  overflow-x: auto;
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', monospace;
  font-size: 0.875rem;
  line-height: 1.6;
  position: relative;
}

.chapter-prose pre.prompt-block {
  white-space: pre-wrap;
  word-break: break-word;
}

.copy-btn.is-copied {
  color: var(--gold);
  border-color: var(--gold);
}

.chapter-prose code {
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', monospace;
  font-size: 0.9em;
}

.chapter-prose :not(pre) > code {
  background: rgba(10, 31, 61, 0.07);
  padding: 0.15em 0.35em;
  border-radius: var(--radius);
}

.copy-btn {
  position: absolute;
  top: 0.625rem;
  right: 0.625rem;
  border: 1px solid var(--rule-on-ink-strong);
  background: transparent;
  color: var(--on-ink-muted);
  border-radius: var(--radius);
  font-family: var(--text);
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.35rem 0.6rem;
  cursor: pointer;
  transition: color 0.15s var(--ease), border-color 0.15s var(--ease);
}

.copy-btn:hover {
  color: var(--gold);
  border-color: var(--gold);
}

/* Flex rather than a two-column grid: at the first and last chapter one of
   the two links is absent, and a grid would leave its partner sitting in the
   wrong cell wearing a divider with nothing on the other side of it. */
.chapter-turn {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem 2.5rem;
  margin-top: 4rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--rule-on-paper);
}

.turn-link {
  padding: 1.25rem 0;
  text-decoration: none;
  color: inherit;
  flex: 1 1 12rem;
  min-width: 0;
}

.turn-next {
  margin-left: auto;
  text-align: right;
}

.turn-link[hidden] {
  display: none;
}

.turn-dir {
  font-size: var(--step-fine);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-ink);
}

.turn-title {
  margin-top: 0.4rem;
  font-family: var(--display);
  font-weight: 400;
  font-size: 1.0625rem;
  line-height: 1.3;
}

/* --------------------------------------------------------------------------
   25. Centered single-purpose pages (login, set password)
   -------------------------------------------------------------------------- */

.gate {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: var(--ink);
  color: var(--on-ink);
  padding: var(--gutter);
}

.gate-inner {
  width: 100%;
  max-width: 27rem;
}

.gate-mark {
  font-family: var(--display);
  font-weight: 400;
  font-size: 0.9375rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--on-ink);
  display: inline-block;
  margin-bottom: 2.5rem;
}

.gate-mark span {
  color: var(--gold);
}

.gate h1 {
  font-size: clamp(1.875rem, 4vw, 2.5rem);
  font-weight: 200;
}

.gate-lede {
  margin-top: 0.875rem;
  color: var(--on-ink-muted);
  font-size: var(--step-small);
  line-height: 1.65;
}

.gate .panel {
  margin-top: 2rem;
}

/* The gate's panel is a paper surface sitting on the navy ground, so text
   inside it must not inherit the dark-surface tints. */
.gate .panel .link-quiet {
  color: var(--on-paper-muted);
}

.gate .panel .link-quiet:hover {
  color: var(--on-paper);
  border-bottom-color: var(--rule-on-paper-strong);
}

.gate-foot {
  margin-top: 1.75rem;
  font-size: var(--step-small);
  color: var(--on-ink-muted);
  text-align: center;
}

/* --------------------------------------------------------------------------
   26. Utilities kept deliberately few
   -------------------------------------------------------------------------- */

.stack > * + * {
  margin-top: 1.25rem;
}

.stack-tight > * + * {
  margin-top: 0.625rem;
}

.stack-loose > * + * {
  margin-top: 2rem;
}

.row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
}

.row-between {
  justify-content: space-between;
}

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mt-6 { margin-top: 3rem; }

[hidden] {
  display: none !important;
}
