/* ──────────────────────────────────────────────────────────────────────────────
   Bookbndr public website — "Reading Room Linen"
   Book-like conventions: a warm paper ground, forest-green ink, a rust accent,
   Cormorant Garamond for display, EB Garamond for reading, DM Sans for labels.
   Sections are chapters with running heads and folios; rules are hairlines;
   boxes are square plates, not rounded cards.

   The embedded Studio (workbench.html) shares this palette through theme.css.
   ────────────────────────────────────────────────────────────────────────────── */

:root {
  /* Palette */
  --bb-paper: #faf7f0;
  --bb-surface: #fffdf8;
  --bb-surface-soft: #f3ead8;
  --bb-ink: #1f3a2e;
  --bb-ink-deep: #132419;
  --bb-text: #2c3f34;
  --bb-muted: #4f5f54;
  --bb-accent: #a8512b;
  --bb-line: #d9d2c1;
  --bb-rule: #c9c2b0;
  --bb-leader: #8f9a90;
  --bb-inverse: #faf7f0;
  --bb-inverse-muted: #e2cfa6;
  --bb-success: #276b45;

  /* Aliases kept for pages.css, comparison.css and gifts.css */
  --bb-action: var(--bb-ink);
  --bb-action-hover: var(--bb-ink-deep);
  --bb-action-pressed: #0d1a12;
  --bb-border-strong: var(--bb-leader);
  --bb-brass: var(--bb-accent);
  --bb-backdrop: #1f3a2e99;
  --bb-shadow-sm: none;
  --bb-shadow-md: none;
  --bb-shadow-lg: none;
  --bb-shadow-plate: 8px 8px 0 var(--bb-surface-soft);
  --paper: var(--bb-paper);
  --ink: var(--bb-ink);
  --muted: var(--bb-muted);
  --line: var(--bb-line);

  /* Type */
  --serif-display: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --serif: 'EB Garamond', Georgia, 'Times New Roman', serif;
  --sans: 'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

/* ── Base ─────────────────────────────────────────────────────────────────── */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 24px; accent-color: var(--bb-accent); caret-color: var(--bb-ink); }
body {
  margin: 0;
  background: var(--bb-paper);
  color: var(--bb-ink);
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--bb-ink); text-decoration: none; }
a:hover { color: var(--bb-ink-deep); }
button { font: inherit; cursor: pointer; }
button, a, summary { -webkit-tap-highlight-color: transparent; }
::selection { background: var(--bb-ink); color: var(--bb-inverse); }
:is(a, button, summary, input, select, textarea, [tabindex]):focus-visible {
  outline: 2px solid var(--bb-accent);
  outline-offset: 4px;
}
:is(input, textarea)::placeholder { color: var(--bb-muted); opacity: 1; }
img { max-width: 100%; }
[hidden] { display: none !important; }

.wrap { width: min(1280px, calc(100% - 160px)); margin-inline: auto; }

/* ── Type scale ───────────────────────────────────────────────────────────── */
h1, h2, h3, .h2, .h3 { font-family: var(--serif-display); font-weight: 500; color: var(--bb-ink); margin: 0; }
h2, .h2 { font-size: clamp(40px, 4.5vw, 64px); line-height: 1.02; letter-spacing: -0.012em; }
h3, .h3 { font-size: 28px; line-height: 1.15; }
em { font-style: italic; font-weight: 400; color: var(--bb-accent); }
p { margin: 0; }
.body { font-size: 18px; line-height: 1.55; color: var(--bb-text); }
.eyebrow, .tiny-label {
  display: block;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--bb-accent);
}
.eyebrow.muted, .tiny-label.muted { color: var(--bb-muted); }
.smallcaps { font-variant-caps: small-caps; letter-spacing: 0.08em; color: var(--bb-accent); }
.diamond { display: inline-block; width: 6px; height: 6px; background: var(--bb-accent); transform: rotate(45deg); flex-shrink: 0; }

/* ── Buttons and links ────────────────────────────────────────────────────── */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 56px;
  padding: 0 32px;
  background: var(--bb-ink);
  color: var(--bb-inverse);
  border: 1px solid var(--bb-ink);
  border-radius: 0;
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.2;
  text-align: center;
  transition: background 0.18s, color 0.18s;
}
.button svg { width: 16px; height: 16px; flex-shrink: 0; }
.button:hover { background: var(--bb-ink-deep); border-color: var(--bb-ink-deep); color: var(--bb-inverse); }
.button:active { background: var(--bb-action-pressed); }
.button:disabled { background: var(--bb-surface-soft); border-color: var(--bb-line); color: var(--bb-muted); cursor: not-allowed; }
.button-small { min-height: 44px; padding: 0 20px; font-size: 13px; }
.button-light { background: var(--bb-paper); border-color: var(--bb-paper); color: var(--bb-ink); }
.button-light:hover { background: var(--bb-surface); border-color: var(--bb-surface); color: var(--bb-ink-deep); }
.text-link {
  display: inline-block;
  font-family: var(--serif-display);
  font-style: italic;
  font-size: 23px;
  line-height: 1.2;
  color: var(--bb-ink);
  border-bottom: 1px solid var(--bb-accent);
  padding-bottom: 2px;
}
.text-link:hover { color: var(--bb-accent); }
.text-link.small { font-family: var(--serif); font-size: 17px; }
.inline-link { color: var(--bb-ink); border-bottom: 1px solid var(--bb-accent); }
.inline-link:hover { color: var(--bb-accent); }
.skip-link { position: absolute; left: 20px; top: -100px; background: var(--bb-ink); color: var(--bb-inverse); padding: 14px 18px; z-index: 100; font-family: var(--sans); font-size: 14px; }
.skip-link:focus { top: 10px; }

/* ── Masthead ─────────────────────────────────────────────────────────────── */
.site-header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  padding: 26px 0 18px;
  border-bottom: 1.5px solid var(--bb-ink);
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--bb-muted);
}
.site-header::after { content: ''; position: absolute; left: 0; right: 0; bottom: -4px; height: 1px; background: var(--bb-accent); }
.wordmark {
  display: inline-flex;
  align-items: center;
  font-family: var(--serif-display);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
  color: var(--bb-ink);
  white-space: nowrap;
}
.wordmark:hover { color: var(--bb-ink); }
.brand-period { color: var(--bb-accent); }
.brand-mark { display: block; width: 28px; height: 28px; border-radius: 6px; flex-shrink: 0; margin-right: 10px; }
.site-header nav { display: flex; gap: 40px; }
.site-header nav a { color: var(--bb-muted); }
.site-header nav a:hover { color: var(--bb-ink); }
.header-cta { color: var(--bb-ink); border-bottom: 1px solid var(--bb-accent); padding-bottom: 3px; white-space: nowrap; }
.header-cta:hover { color: var(--bb-accent); }
.account-status { min-height: 1.4em; margin: 6px auto 0; font-size: 16px; font-style: italic; color: var(--bb-accent); }
.account-status:empty { min-height: 0; margin-top: 0; }

/* ── Running heads and chapters ───────────────────────────────────────────── */
.chapter { border-top: 1px solid var(--bb-rule); padding: 40px 0 80px; }
.runhead {
  display: flex;
  align-items: center;
  gap: 20px;
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--bb-muted);
}
.runhead > span:first-child { color: var(--bb-accent); }
.runhead .leader { flex-grow: 1; height: 1px; background: var(--bb-rule); }
.folio { font-family: var(--serif-display); font-size: 16px; letter-spacing: 0.2em; text-transform: none; color: var(--bb-muted); }
.lead { flex-grow: 1; border-bottom: 1px dotted var(--bb-leader); margin: 0 10px 6px; }
.plate { background: #ffffff; border: 1px solid var(--bb-line); }

/* ── Chapter One · Hero ───────────────────────────────────────────────────── */
.hero { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 40px 0 34px; }
.ornament { display: block; width: 280px; max-width: 100%; height: auto; color: var(--bb-ink); }
.ornament .accent { fill: var(--bb-accent); }
.chapter-label { margin-top: 26px; font-family: var(--serif-display); font-size: 20px; letter-spacing: 0.36em; text-transform: uppercase; color: var(--bb-accent); }
.hero-title { margin: 22px 0 0; font-family: var(--serif-display); font-weight: 500; color: var(--bb-ink); font-size: clamp(48px, 7vw, 100px); line-height: 0.98; letter-spacing: -0.012em; max-width: 1040px; }

/* The decorative frames share one grid cell: the tallest one sets the height, so the
   opening paragraph never moves while hero.js cross-fades between them. */
.hero-stage { display: grid; width: 100%; }
/* Frames anchor to the bottom of the stage: the heading always sits just above the paragraph and only the decoration above it varies. */
.hero-frame { position: relative; isolation: isolate; grid-area: 1 / 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; width: 100%; min-width: 0; opacity: 0; pointer-events: none; transition: opacity 1.4s ease; }
.hero-stage:not([data-frame]) .hero-frame:nth-child(1),
.hero-stage[data-frame="1"] .hero-frame:nth-child(1),
.hero-stage[data-frame="2"] .hero-frame:nth-child(2),
.hero-stage[data-frame="3"] .hero-frame:nth-child(3),
.hero-stage[data-frame="4"] .hero-frame:nth-child(4),
.hero-stage[data-frame="5"] .hero-frame:nth-child(5),
.hero-stage[data-frame="6"] .hero-frame:nth-child(6),
.hero-stage[data-frame="7"] .hero-frame:nth-child(7) { opacity: 1; pointer-events: auto; }

.hero-fleuron { display: block; width: 240px; height: 48px; margin-top: 12px; object-fit: contain; }
.frame-classic .chapter-label, .frame-literary .chapter-label,
.frame-modern .chapter-label, .frame-enchanted .chapter-label { margin-top: 0; }
.frame-classic .hero-title { font-family: 'Fraunces', var(--serif); font-size: clamp(34px, 5.4vw, 76px); font-weight: 600; line-height: 1.12; }
.frame-literary .hero-title { font-family: 'Fraunces', var(--serif); font-size: clamp(34px, 5.4vw, 76px); font-style: italic; font-weight: 400; line-height: 1.12; }
.frame-literary .chapter-label { font-family: 'Fraunces', var(--serif); font-style: italic; text-transform: none; letter-spacing: 0; }
.modern-heading { width: min(880px, 100%); text-align: left; }
.frame-modern .chapter-label { font-family: 'Inter', var(--sans); font-size: 14px; letter-spacing: 0.12em; }
.frame-modern .hero-title { font-family: 'Inter', var(--sans); font-size: clamp(30px, 5vw, 68px); line-height: 1.12; font-weight: 600; letter-spacing: -0.045em; }
.frame-modern .hero-title em { font-style: normal; font-weight: inherit; }
/* Match the book opener: number in the lower part of the illustration, title below.
   Keep the SVG's proportions so the central motif stays under the number at every width. */
.illustrated-chapter { position: relative; width: min(480px, 100%); }
.hero-illustration { display: block; width: 100%; height: auto; opacity: 0.65; pointer-events: none; }
.illustrated-chapter .chapter-label { position: absolute; top: 70%; left: 50%; transform: translate(-50%, -50%); margin: 0; color: var(--bb-ink); font-size: clamp(10px, 1.3vw, 16px); line-height: 1; letter-spacing: 0.1em; white-space: nowrap; }
.frame-enchanted .hero-title, .frame-enchanted .chapter-label { font-family: 'Cinzel', var(--serif-display); }
.frame-enchanted .hero-title { font-size: clamp(30px, 5.2vw, 72px); font-weight: 400; line-height: 1.12; }
.frame-enchanted .hero-title em { font-style: normal; }
.frame-brackets .chapter-label { margin-top: 0; }
.frame-numeral .numeral { font-size: 72px; color: var(--bb-ink); }
.double-rule { width: min(320px, 70%); height: 5px; margin-top: 14px; border-top: 1px solid var(--bb-accent); border-bottom: 1px solid var(--bb-accent); }
.chapter-label.small { margin-top: 14px; font-family: var(--serif); font-size: 14px; letter-spacing: 0.3em; }
.bracketed { display: flex; align-items: center; justify-content: center; gap: clamp(12px, 2.5vw, 36px); margin-top: 22px; max-width: 100%; }
.bracketed .hero-title { margin-top: 0; }
.bracket { font-family: var(--serif-display); font-weight: 300; font-size: clamp(88px, 11.7vw, 168px); line-height: 0.78; color: var(--bb-accent); align-self: center; flex-shrink: 0; }
.chapter-opening { margin: 36px auto 0; max-width: 720px; font-size: 22px; line-height: 1.55; text-align: justify; hyphens: auto; color: var(--bb-text); }
.dropcap { float: left; font-family: var(--serif-display); font-weight: 500; font-size: 5.95em; line-height: 0.78; margin: 0.035em 0.09em 0 0; color: var(--bb-ink); }
/* initial-letter only applies to ::first-letter, so the span-based drop cap stays a float. */
.hero-actions { display: flex; align-items: center; justify-content: center; gap: 36px; margin-top: 40px; flex-wrap: wrap; }
.hero-tagline { margin: 32px 0 0; font-family: var(--serif-display); font-style: italic; font-weight: 400; font-size: clamp(19px, 1.8vw, 24px); line-height: 1.3; letter-spacing: 0; color: var(--bb-muted); }
.folio-mark { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 88px; font-family: var(--serif-display); font-size: 16px; letter-spacing: 0.2em; color: var(--bb-muted); }
.folio-mark::before, .folio-mark::after { content: ''; width: 28px; height: 1px; background: var(--bb-accent); }

/* ── Chapter · Studio ─────────────────────────────────────────────────────── */
.studio-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 40px; margin-top: 34px; }
.studio-head p { margin: 0 0 10px; font-size: 19px; font-style: italic; color: var(--bb-muted); }
.studio-window { margin-top: 40px; border: 1px solid var(--bb-ink); background: var(--bb-surface); display: flex; flex-direction: column; }
.window-bar { min-height: 46px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 0 20px; border-bottom: 1px solid var(--bb-line); }
.window-dots { display: flex; gap: 6px; }
.window-dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--bb-rule); }
.window-dots i:first-child { background: var(--bb-accent); }
.window-dots i:nth-child(2) { background: var(--bb-ink); }
.window-bar .eyebrow { color: var(--bb-muted); }
.window-bar a { font-size: 15px; font-style: italic; color: var(--bb-ink); border-bottom: 1px solid var(--bb-accent); white-space: nowrap; }
.window-bar a:hover { color: var(--bb-accent); }
.studio-stage { position: relative; }
.studio-window iframe { display: block; width: 100%; height: 650px; border: 0; background: var(--bb-surface); }
/* Shown until studio-embed.js has loaded the workspace after the rest of the page. */
.studio-loading { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 14px; background: var(--bb-surface); color: var(--bb-muted); font-size: 19px; font-style: italic; }
.studio-loading .diamond { animation: studio-pulse 1.6s ease-in-out infinite; }
@keyframes studio-pulse { 0%, 100% { opacity: 0.25; transform: rotate(45deg) scale(0.8); } 50% { opacity: 1; transform: rotate(45deg) scale(1.15); } }
.studio-footnote { display: flex; gap: 10px; align-items: baseline; margin-top: 22px; font-size: 15px; color: var(--bb-muted); }
.studio-footnote > span:first-child { color: var(--bb-accent); font-style: italic; }
.studio-footnote a { color: var(--bb-ink); border-bottom: 1px solid var(--bb-accent); }
.studio-footnote a:hover { color: var(--bb-accent); }

.contents { display: grid; grid-template-columns: minmax(0, 480px) minmax(0, 1fr); gap: 80px; margin-top: 72px; padding-top: 40px; border-top: 1px solid var(--bb-rule); }
.contents-copy { display: flex; flex-direction: column; gap: 14px; }
.contents .h2 { font-size: clamp(34px, 3.2vw, 44px); }
.contents-list { display: flex; flex-direction: column; font-size: 20px; color: var(--bb-text); padding-top: 6px; }
.contents-list > div { display: flex; align-items: baseline; min-height: 40px; }
.contents-list em { color: var(--bb-muted); }

/* ── Chapter Two · The original ───────────────────────────────────────────── */
.original { display: grid; grid-template-columns: minmax(0, 560px) minmax(0, 1fr); gap: 100px; margin-top: 40px; }
.original-copy { display: flex; flex-direction: column; padding-top: 20px; }
.original-copy .body { margin-top: 18px; font-size: 19px; }
.original-copy .h2 + .body { margin-top: 36px; }
.original-copy .text-link { align-self: flex-start; margin-top: 36px; font-size: 22px; }
.workflow { display: flex; flex-direction: column; align-items: center; padding-bottom: 36px; }
.workflow .eyebrow { align-self: flex-start; }
.document-card { display: flex; align-items: center; gap: 14px; margin-top: 26px; border: 1px solid var(--bb-ink); padding: 12px 18px; background: var(--bb-surface); text-align: left; }
.doc-icon { font-family: var(--serif-display); font-size: 30px; font-weight: 600; color: var(--bb-ink); }
.document-card > div { display: flex; flex-direction: column; font-size: 15px; line-height: 1.3; }
.document-card strong { font-weight: 500; }
.document-card small { font-size: 15px; font-style: italic; color: var(--bb-muted); }
.connector { display: flex; flex-direction: column; align-items: center; height: 54px; }
.connector i { flex-grow: 1; width: 1px; background: var(--bb-accent); }
.connector span { width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--bb-accent); color: var(--bb-accent); font-size: 12px; display: grid; place-items: center; background: var(--bb-paper); }
.connector-line { width: 1px; height: 25px; background: var(--bb-accent); margin: auto; }
.binder-node { display: inline-flex; align-items: center; background: var(--bb-ink); color: var(--bb-inverse); padding: 12px 26px; font-family: var(--serif-display); font-size: 24px; font-weight: 600; }
.binder-node .brand-mark { width: 24px; height: 24px; border-radius: 5px; margin-right: 10px; }
.branch { display: block; width: 360px; max-width: 100%; height: auto; color: var(--bb-accent); }
.editions { display: flex; align-items: flex-start; justify-content: center; gap: 60px; }
.edition { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.edition-label { font-size: 15px; font-style: italic; color: var(--bb-muted); }
.print-page {
  width: 230px; height: 330px;
  background: #ffffff; border: 1px solid var(--bb-line); box-shadow: var(--bb-shadow-plate);
  padding: 34px 28px 22px;
  display: flex; flex-direction: column; text-align: center; color: var(--bb-ink);
}
.print-page .chapter-no { font-family: var(--sans); font-size: 7.5px; letter-spacing: 0.3em; text-transform: uppercase; color: var(--bb-accent); }
.print-page .chapter-title { font-family: var(--serif-display); font-size: 20px; line-height: 1.05; margin-top: 10px; }
.print-page .flourish { display: block; margin: 12px auto 0; color: var(--bb-ink); }
.print-page .flourish .accent { fill: var(--bb-accent); }
.print-page p { margin: 14px 0 0; font-size: 9px; line-height: 1.6; text-align: justify; color: var(--bb-text); }
.print-page p + p { margin-top: 8px; }
.print-page .page-dropcap { float: left; font-family: var(--serif-display); font-size: 3.1em; line-height: 0.78; margin: 0.13em 0.08em 0 0; color: var(--bb-accent); }
.print-page .page-no { margin-top: auto; font-family: var(--serif-display); font-size: 9px; letter-spacing: 0.2em; color: var(--bb-muted); }
.device { height: 330px; width: fit-content; border: 2px solid var(--bb-ink); border-radius: 12px; padding: 8px; background: #ffffff; display: flex; }
.device img { display: block; height: 100%; width: auto; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 5px; }
.workflow-note { margin-top: 26px; font-size: 16px; font-style: italic; color: var(--bb-muted); }

.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 60px; margin-top: 72px; padding-top: 56px; border-top: 1px solid var(--bb-rule); }
.steps article { display: flex; flex-direction: column; gap: 16px; border-right: 1px solid var(--bb-line); padding-right: 40px; }
.steps article:last-child { border-right: 0; padding-right: 0; }
.numeral { font-family: var(--serif-display); font-size: 72px; line-height: 1; color: var(--bb-accent); }
.steps .eyebrow { color: var(--bb-muted); }
.steps h3 { font-size: 34px; }

/* ── Chapter Three · Features ─────────────────────────────────────────────── */
.features-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 80px; margin-top: 34px; }
.features-head .h2 { max-width: 640px; }
.features-head p { margin: 0 0 8px; max-width: 460px; font-size: 19px; line-height: 1.5; font-style: italic; color: var(--bb-muted); text-align: right; }
.spotlight { display: grid; grid-template-columns: minmax(0, 560px) minmax(0, 1fr); gap: 80px; align-items: center; margin-top: 32px; padding-top: 32px; border-top: 1px solid var(--bb-line); }
.features-head + .spotlight { margin-top: 56px; }
.spotlight.reverse { grid-template-columns: minmax(0, 1fr) minmax(0, 560px); }
.spotlight.reverse .plate { order: 2; }
.spotlight-copy { display: flex; flex-direction: column; gap: 12px; }
.spotlight h3 { font-size: 36px; }
.spotlight .plate { min-height: 168px; padding: 30px 36px; }
.note-art { display: flex; flex-direction: column; justify-content: space-between; gap: 24px; }
.note-art > p { font-size: 20px; color: var(--bb-text); }
.note-art sup { font-size: 11px; color: var(--bb-accent); margin-left: 2px; }
.note-rule { width: 90px; height: 1px; background: var(--bb-ink); margin-bottom: 8px; }
.note-art small { font-size: 13px; color: var(--bb-muted); }
.note-art small span { color: var(--bb-accent); }
.index-art { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 30px; padding: 26px 36px; font-size: 14px; line-height: 1.55; color: var(--bb-text); }
.index-art .index-title { font-family: var(--serif-display); font-size: 18px; letter-spacing: 0.2em; color: var(--bb-accent); margin-bottom: 6px; }
.index-art b { display: block; font-weight: 600; color: var(--bb-ink); }
.index-art em { color: var(--bb-muted); }
.index-art > div:last-child { padding-top: 30px; }
.type-art { display: flex; align-items: center; gap: 30px; padding: 22px 36px; }
.type-art > span { font-family: var(--serif-display); font-size: 96px; line-height: 1; color: var(--bb-ink); }
.type-art > div { display: flex; flex-direction: column; gap: 10px; border-left: 1px solid var(--bb-line); padding-left: 30px; }
.type-art .eyebrow { font-size: 10px; }
.type-art i { font-family: var(--serif-display); font-style: italic; font-size: 26px; color: var(--bb-ink); }
.type-art small { font-size: 14px; letter-spacing: 0.6em; color: var(--bb-accent); }
.detail-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 36px 56px; margin-top: 48px; padding-top: 40px; border-top: 1.5px solid var(--bb-ink); }
.detail-grid article { display: flex; gap: 18px; }
.detail-symbol { font-family: var(--serif-display); font-size: 34px; line-height: 1; color: var(--bb-accent); width: 30px; flex-shrink: 0; }
.detail-grid h3 { font-size: 24px; }
.detail-grid p { margin-top: 8px; font-size: 16px; }

/* ── Chapter Four · Home ──────────────────────────────────────────────────── */
.home { display: grid; grid-template-columns: minmax(0, 560px) minmax(0, 1fr); gap: 100px; margin-top: 40px; }
.home-copy { display: flex; flex-direction: column; gap: 28px; }
.home-copy .body { font-size: 19px; }
.workflow-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; align-self: start; padding-top: 12px; }
.workflow-options > div { display: flex; flex-direction: column; gap: 10px; border-top: 1.5px solid var(--bb-ink); padding-top: 20px; }
.workflow-options .eyebrow { text-transform: lowercase; font-family: var(--serif-display); font-size: 16px; letter-spacing: 0.1em; }
.workflow-options p { font-size: 16px; }
.fix-once { display: grid; grid-template-columns: minmax(0, 560px) minmax(0, 1fr); gap: 100px; margin-top: 64px; padding-top: 40px; border-top: 1px solid var(--bb-line); }
.fix-once-copy { display: flex; flex-direction: column; gap: 18px; }
.fix-once h3 { font-size: 44px; }
.revision-list { padding-top: 8px; }
.revision-row { display: flex; align-items: center; gap: 20px; min-height: 62px; border-bottom: 1px dotted var(--bb-leader); font-size: 20px; color: var(--bb-ink); }
.revision-row > span:first-child { font-family: var(--serif-display); font-size: 20px; letter-spacing: 0.1em; color: var(--bb-accent); width: 34px; flex-shrink: 0; }
.revision-row strong { font-weight: 400; flex-grow: 1; }
.revision-row > span:last-child { color: var(--bb-accent); font-size: 18px; }
.revision-note { margin-top: 22px; font-size: 16px; font-style: italic; color: var(--bb-muted); }

/* ── Pricing plate ────────────────────────────────────────────────────────── */
.pricing { display: flex; justify-content: center; margin-top: 80px; padding-top: 60px; border-top: 1px solid var(--bb-rule); scroll-margin-top: 40px; }
.pricing-plate { width: min(1000px, 100%); border: 1.5px solid var(--bb-ink); padding: 6px; }
.pricing-inner { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 60px; padding: 48px 60px; border: 1px solid var(--bb-accent); background: var(--bb-surface); }
.pricing-copy { display: flex; flex-direction: column; justify-content: space-between; gap: 40px; }
.pricing-copy > div { display: flex; flex-direction: column; gap: 22px; }
.pricing .h2 { font-size: clamp(38px, 4vw, 56px); }
.pricing .body { font-size: 19px; }
.pricing-buy { display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 18px; border-left: 1px solid var(--bb-line); padding-left: 50px; }
.price { font-family: var(--serif-display); font-size: 96px; line-height: 0.9; color: var(--bb-ink); }
.pricing-buy p { font-size: 16px; line-height: 1.5; color: var(--bb-text); }
.pricing-buy p span { font-style: italic; color: var(--bb-muted); }
.pricing-buy .button { margin-top: 6px; align-self: stretch; white-space: nowrap; padding: 0 24px; }

/* ── Appendix · FAQ ───────────────────────────────────────────────────────── */
.faq .h2 { margin-top: 34px; }
.faq-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 80px; margin-top: 44px; font-size: 16px; line-height: 1.5; color: var(--bb-text); }
.faq-col { display: flex; flex-direction: column; }
.faq-item { display: flex; flex-direction: column; gap: 10px; padding: 22px 0; border-top: 1px solid var(--bb-line); }
.faq-col .faq-item:last-child { border-bottom: 1px solid var(--bb-line); }
.faq-item h3 { font-size: 24px; }

/* ── Colophon ─────────────────────────────────────────────────────────────── */
.site-footer {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 60px 80px;
  align-items: start;
  margin-top: 40px;
  padding: 44px 0 34px;
  border-top: 1.5px solid var(--bb-ink);
}
.site-footer::before { content: ''; position: absolute; left: 0; right: 0; top: -4px; height: 1px; background: var(--bb-accent); }
.footer-brand { display: flex; flex-direction: column; gap: 14px; }
.footer-brand .wordmark { font-size: 28px; }
.footer-brand p { font-size: 19px; font-style: italic; color: var(--bb-muted); }
.site-footer nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 48px; font-size: 16px; text-align: right; }
.site-footer nav a { color: var(--bb-text); }
.site-footer nav a:hover { color: var(--bb-accent); }
.colophon { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: baseline; gap: 20px 40px; flex-wrap: wrap; margin-top: 40px; font-size: 14px; color: var(--bb-muted); }
.colophon em { color: var(--bb-muted); }
.colophon .fleuron { color: var(--bb-accent); font-size: 18px; }

/* ── Dialogs ──────────────────────────────────────────────────────────────── */
dialog { border: 1px solid var(--bb-ink); background: var(--bb-surface); color: var(--bb-ink); padding: 44px; max-width: 480px; width: calc(100% - 40px); }
dialog::backdrop { background: var(--bb-backdrop); }
dialog h2 { font-size: 38px; }
dialog p { font-size: 17px; margin: 14px 0 25px; color: var(--bb-text); }
.dialog-close { position: absolute; right: 15px; top: 12px; border: 0; background: transparent; font-size: 25px; color: var(--bb-ink); }

/* ── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 1100px) {
  .wrap { width: calc(100% - 64px); }
  .site-header nav { gap: 24px; }
  .original, .home, .fix-once, .spotlight, .spotlight.reverse, .contents { grid-template-columns: 1fr; gap: 40px; }
  .spotlight.reverse .plate { order: 0; }
  .workflow .eyebrow { align-self: center; }
  .features-head { flex-direction: column; align-items: flex-start; gap: 20px; }
  .features-head p { text-align: left; max-width: 640px; }
  .steps { gap: 36px; }
  .detail-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pricing-inner { grid-template-columns: minmax(0, 1fr); gap: 40px; padding: 40px; }
  .pricing-buy { border-left: 0; padding-left: 0; border-top: 1px solid var(--bb-line); padding-top: 36px; }
}
@media (max-width: 900px) {
  .site-header:not(.page-header) nav { display: none; }
  .hero { padding-top: 40px; }
  .chapter { padding-bottom: 64px; }
  .studio-window iframe { height: 720px; }
  .faq-grid { grid-template-columns: 1fr; gap: 0; }
  .faq-col:first-child .faq-item:last-child { border-bottom: 0; }
}
@media (max-width: 700px) {
  .hero-tagline { margin-top: 26px; font-size: 18px; }
  .wrap { width: calc(100% - 40px); }
  body { font-size: 17px; }
  .site-header { flex-wrap: wrap; gap: 14px 24px; padding-top: 20px; }
  .site-header.page-header nav { gap: 18px; }
  .hero { padding-top: 24px; }
  .hero .ornament { width: 200px; }
  .chapter-label { margin-top: 16px; font-size: 16px; letter-spacing: 0.3em; }
  .hero-title { margin-top: 16px; }
  .bracketed { margin-top: 16px; }
  .frame-numeral .numeral { font-size: 44px; line-height: 1; }
  .frame-numeral .double-rule { width: 200px; margin-top: 10px; }
  .chapter-label.small { font-size: 12px; }
  .chapter-opening { margin-top: 28px; font-size: 19px; text-align: left; hyphens: manual; }
  .hero .dropcap { font-size: 4.8em; }
  .hero-actions { width: 100%; flex-direction: column; gap: 20px; margin-top: 28px; }
  .hero-actions .button { width: 100%; }
  .text-link { font-size: 21px; }
  .folio-mark { margin-top: 36px; }
  .runhead > span:nth-child(2) { display: none; }
  .studio-head { flex-direction: column; align-items: flex-start; gap: 12px; }
  .window-bar .eyebrow { display: none; }
  .window-bar { padding: 0 14px; }
  .studio-window iframe { height: 780px; }
  .studio-footnote { line-height: 1.5; }
  .contents-list { font-size: 18px; }
  .original-copy .body { font-size: 18px; }
  .workflow-options { grid-template-columns: 1fr; }
  .editions { gap: 24px; flex-wrap: wrap; }
  .steps { grid-template-columns: 1fr; gap: 32px; margin-top: 56px; padding-top: 40px; }
  .steps article { border-right: 0; padding-right: 0; border-top: 1px solid var(--bb-line); padding-top: 28px; }
  .steps article:first-child { border-top: 0; padding-top: 0; }
  .numeral { font-size: 56px; }
  .steps h3 { font-size: 30px; }
  .spotlight h3 { font-size: 30px; }
  .spotlight .plate { padding: 22px 24px; }
  .index-art { grid-template-columns: 1fr; gap: 12px; }
  .index-art > div:last-child { padding-top: 0; }
  .type-art > span { font-size: 64px; }
  .type-art { gap: 20px; }
  .detail-grid { grid-template-columns: 1fr; gap: 28px; }
  .fix-once h3 { font-size: 36px; }
  .revision-row { font-size: 18px; }
  .pricing { margin-top: 64px; padding-top: 48px; }
  .pricing-inner { padding: 32px 24px; }
  .price { font-size: 72px; }
  .pricing-buy .button { width: 100%; padding: 12px 16px; white-space: normal; }
  .site-footer { grid-template-columns: 1fr; gap: 36px; }
  .site-footer nav { text-align: left; gap: 12px 32px; }
  .colophon { flex-direction: column; align-items: flex-start; gap: 8px; margin-top: 24px; }
}
@media (max-width: 520px) {
  .wordmark { font-size: 22px; }
  .brand-mark { width: 24px; height: 24px; border-radius: 5px; margin-right: 8px; }
  .site-header { font-size: 11px; letter-spacing: 0.12em; }
  .site-header:not(.page-header) { gap: 12px; }
  .hero-title { font-size: clamp(30px, 9.3vw, 46px); }
  .bracketed { gap: 6px; }
  .bracketed .hero-title { font-size: clamp(26px, 8vw, 40px); }
  .bracket { font-size: clamp(48px, 14vw, 72px); }
  .frame-classic .hero-title, .frame-literary .hero-title { font-size: clamp(24px, 7.5vw, 39px); }
  .frame-modern .hero-title { font-size: clamp(24px, 7.4vw, 38px); }
  .frame-enchanted .hero-title { font-size: clamp(23px, 7vw, 36px); }
  .hero-fleuron { width: 180px; height: 36px; margin-top: 8px; }
  .print-page { width: 190px; height: 280px; padding: 26px 20px 18px; }
  .device { height: 280px; }
  .branch { width: 300px; }
}
@media (max-width: 360px) {
  .site-header:not(.page-header) { gap: 8px; font-size: 10px; }
  .site-header:not(.page-header) .wordmark { font-size: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}
