/* ---------------------------------------------------------------------------
   Convert2EPUB — styled to the Convert2EPUB Design System (Newsreader /
   Instrument Sans / JetBrains Mono, "paper and ink, bookbinding green").
   Tokens below are copied verbatim from the design system's tokens/*.css so
   component rules can read directly from spec. The dark palette has no
   equivalent there — it is authored here, in the same spirit, and is
   redeclared fully in three places (see the note above the theme blocks).
   --------------------------------------------------------------------------- */

:root {
  /* ---- Fonts ---- */
  --font-display: "Newsreader", Georgia, "Times New Roman", serif;
  --font-body: "Instrument Sans", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  /* ---- Ink — text and structure, warm-black like print on paper ---- */
  --ink-900: #16130f;
  --ink-800: #241f19;
  --ink-700: #3d372f;
  --ink-600: #544c41;
  --ink-500: #6b6255;
  --ink-400: #8b8171;
  --ink-300: #a79c8c;
  --ink-200: #c9c0b1;
  --ink-100: #e2dbcd;

  /* ---- Paper — surfaces ---- */
  --paper-0: #ffffff;
  --paper-50: #fdfaf5;
  --paper-100: #f7f1e7;
  --paper-200: #efe7d9;
  --paper-300: #e4d9c6;

  /* ---- Spine — primary brand green (bound-book cloth) ---- */
  --spine-700: #1d4438;
  --spine-600: #255445;
  --spine-500: #2e6553;
  --spine-400: #468474;
  --spine-200: #a8c9be;
  --spine-100: #d6e7e0;
  --spine-50: #ecf4f1;

  /* ---- Pastel chapter tints — decorative only, never encode state ---- */
  --tint-amber: #f6dfa8;
  --tint-amber-deep: #e9a23b;
  --tint-sky: #c3d9ef;
  --tint-sky-deep: #3c6e9e;
  --tint-lilac: #d5cdee;
  --tint-lilac-deep: #6f5fb0;
  --tint-blush: #f3cfc3;
  --tint-blush-deep: #b3562e;
  --tint-sage: #cde3cf;
  --tint-sage-deep: #3f7d5c;

  /* ---- Semantic ---- */
  --success-500: #3f7d5c;
  --success-50: #e7f2eb;
  --warning-500: #c9861a;
  --warning-50: #fbeed6;
  --danger-500: #b3402a;
  --danger-50: #f8e3de;
  --info-500: #3c6e9e;
  --info-50: #e5eef6;

  /* ---- Shadows — theme-scoped because opacity/colour both have to flip ---- */
  --shadow-s: 0 1px 2px rgba(22, 19, 15, 0.06), 0 1px 1px rgba(22, 19, 15, 0.04);
  --shadow-m: 0 2px 4px rgba(22, 19, 15, 0.05), 0 6px 16px -6px rgba(22, 19, 15, 0.1);
  --shadow-l: 0 8px 24px -8px rgba(22, 19, 15, 0.14), 0 2px 6px rgba(22, 19, 15, 0.05);
  --shadow-page: 0 18px 40px -18px rgba(22, 19, 15, 0.22), 0 2px 8px rgba(22, 19, 15, 0.06);
  --shadow-inset-top: inset 0 1px 0 rgba(255, 255, 255, 0.7);

  /* ---- Semantic aliases — declared once; theme blocks below only ever
     redefine the raw tokens above, and every var() here re-resolves against
     whichever value is cascaded on the element at compute time. ---- */
  --text-strong: var(--ink-900);
  --text-body: var(--ink-700);
  --text-muted: var(--ink-500);
  --text-faint: var(--ink-400);
  --text-inverse: var(--paper-50);
  --text-link: var(--spine-600);
  --text-link-hover: var(--spine-700);

  --surface-page: var(--paper-50);
  --surface-card: var(--paper-0);
  --surface-sunken: var(--paper-100);
  --surface-raised: var(--paper-0);
  --surface-inverse: var(--ink-900);
  --surface-accent: var(--spine-50);

  --border-hairline: var(--ink-100);
  --border-default: var(--ink-200);
  --border-strong: var(--ink-300);
  --border-focus: var(--spine-500);

  --action-primary-bg: var(--ink-900);
  --action-primary-bg-hover: var(--ink-800);
  --action-primary-fg: var(--paper-50);
  --action-secondary-bg: var(--paper-0);
  --action-secondary-fg: var(--ink-900);
  --action-accent-bg: var(--spine-500);
  --action-accent-bg-hover: var(--spine-600);
  --action-accent-fg: #ffffff;

  --shadow-hairline: 0 0 0 1px var(--border-hairline);
  --focus-ring: 0 0 0 3px color-mix(in oklab, var(--spine-500) 28%, transparent);
  --veil-bg: color-mix(in oklab, var(--paper-50) 78%, transparent);

  /* ---- Type scale — 1.25 major third above 18px body ---- */
  --text-display-xl: 64px;
  --text-display-l: 52px;
  --text-display-m: 40px;
  --text-display-s: 32px;
  --text-title: 24px;
  --text-lead: 20px;
  --text-body-size: 17px;
  --text-body-s: 15px;
  --text-caption: 13px;
  --text-micro: 11px;

  --leading-display: 1.08;
  --leading-title: 1.22;
  --leading-body: 1.55;
  --leading-loose: 1.7;

  --weight-light: 300;
  --weight-regular: 400;
  --weight-medium: 500;
  --weight-semibold: 600;
  --weight-bold: 700;

  --tracking-display: -0.02em;
  --tracking-title: -0.01em;
  --tracking-eyebrow: 0.12em;

  --type-title: var(--weight-semibold) var(--text-title) / var(--leading-title) var(--font-body);
  --type-lead: var(--weight-regular) var(--text-lead) / var(--leading-body) var(--font-body);
  --type-body: var(--weight-regular) var(--text-body-size) / var(--leading-body) var(--font-body);
  --type-caption: var(--weight-medium) var(--text-caption) / 1.4 var(--font-body);
  --type-eyebrow: var(--weight-semibold) var(--text-micro) / 1.2 var(--font-body);
  --type-mono: var(--weight-regular) var(--text-body-s) / 1.5 var(--font-mono);

  /* ---- Spacing ---- */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;
  --space-20: 80px;
  --space-24: 96px;

  --section-y: var(--space-24);
  --section-y-tight: var(--space-16);
  --container-max: 1120px;
  --container-narrow: 720px;

  --control-h-s: 32px;
  --control-h-m: 40px;
  --control-h-l: 48px;

  /* ---- Effects ---- */
  --radius-xs: 6px;
  --radius-s: 10px;
  --radius-m: 14px;
  --radius-l: 20px;
  --radius-xl: 28px;
  --radius-pill: 999px;

  --ease-out: cubic-bezier(0.2, 0.8, 0.3, 1);
  --dur-fast: 120ms;
  --dur-base: 200ms;
  --dur-slow: 360ms;
  --press-scale: 0.985;
}

/* ---------------------------------------------------------------------------
   Dark palette. The design system defines none — everything below is authored
   to match its spirit (ink/paper roles invert, the spine accent lightens for
   contrast, the five pastel tints darken so they don't glow). It is declared
   three times on purpose: once for the OS preference, once for the explicit
   toggle, and once restating the LIGHT values under an explicit "light" flag.
   Skipping that third block is exactly how a past version of this site left
   near-white headings on cream paper for anyone who chose light on a
   dark-mode machine — every value a dark block touches has to be un-touched
   somewhere just as explicitly.
   --------------------------------------------------------------------------- */
@media (prefers-color-scheme: dark) {
  :root {
    --ink-900: #f1ece2;
    --ink-800: #ddd6c8;
    --ink-700: #b8b09f;
    --ink-600: #948c7c;
    --ink-500: #766f60;
    --ink-400: #5b564a;
    --ink-300: #423f36;
    --ink-200: #322f28;
    --ink-100: #26231d;

    --paper-0: #211d17;
    --paper-50: #17140f;
    --paper-100: #100d0a;
    --paper-200: #0c0a08;
    --paper-300: #080706;

    --spine-700: #2f6d5c;
    --spine-600: #3f8371;
    --spine-500: #4f9784;
    --spine-400: #6bb09d;
    --spine-200: #223530;
    --spine-100: #1c2b27;
    --spine-50: #172420;

    --tint-amber: #3c2f16;
    --tint-amber-deep: #f2bd66;
    --tint-sky: #1c2735;
    --tint-sky-deep: #7fb2e6;
    --tint-lilac: #241f38;
    --tint-lilac-deep: #ab9de0;
    --tint-blush: #342119;
    --tint-blush-deep: #dd8c62;
    --tint-sage: #1b2b1e;
    --tint-sage-deep: #72b892;

    --success-500: #5aab8a;
    --success-50: #17251c;
    --warning-500: #e2a53f;
    --warning-50: #2c2113;
    --danger-500: #d97355;
    --danger-50: #2c1a16;
    --info-500: #5f9cd6;
    --info-50: #17222e;

    --shadow-s: 0 1px 2px rgba(0, 0, 0, 0.35), 0 1px 1px rgba(0, 0, 0, 0.25);
    --shadow-m: 0 2px 4px rgba(0, 0, 0, 0.3), 0 6px 18px -6px rgba(0, 0, 0, 0.5);
    --shadow-l: 0 10px 28px -8px rgba(0, 0, 0, 0.55), 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-page: 0 20px 44px -18px rgba(0, 0, 0, 0.65), 0 2px 10px rgba(0, 0, 0, 0.35);
    --shadow-inset-top: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  }
}
:root[data-theme="dark"] {
  --ink-900: #f1ece2;
  --ink-800: #ddd6c8;
  --ink-700: #b8b09f;
  --ink-600: #948c7c;
  --ink-500: #766f60;
  --ink-400: #5b564a;
  --ink-300: #423f36;
  --ink-200: #322f28;
  --ink-100: #26231d;

  --paper-0: #211d17;
  --paper-50: #17140f;
  --paper-100: #100d0a;
  --paper-200: #0c0a08;
  --paper-300: #080706;

  --spine-700: #2f6d5c;
  --spine-600: #3f8371;
  --spine-500: #4f9784;
  --spine-400: #6bb09d;
  --spine-200: #223530;
  --spine-100: #1c2b27;
  --spine-50: #172420;

  --tint-amber: #3c2f16;
  --tint-amber-deep: #f2bd66;
  --tint-sky: #1c2735;
  --tint-sky-deep: #7fb2e6;
  --tint-lilac: #241f38;
  --tint-lilac-deep: #ab9de0;
  --tint-blush: #342119;
  --tint-blush-deep: #dd8c62;
  --tint-sage: #1b2b1e;
  --tint-sage-deep: #72b892;

  --success-500: #5aab8a;
  --success-50: #17251c;
  --warning-500: #e2a53f;
  --warning-50: #2c2113;
  --danger-500: #d97355;
  --danger-50: #2c1a16;
  --info-500: #5f9cd6;
  --info-50: #17222e;

  --shadow-s: 0 1px 2px rgba(0, 0, 0, 0.35), 0 1px 1px rgba(0, 0, 0, 0.25);
  --shadow-m: 0 2px 4px rgba(0, 0, 0, 0.3), 0 6px 18px -6px rgba(0, 0, 0, 0.5);
  --shadow-l: 0 10px 28px -8px rgba(0, 0, 0, 0.55), 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-page: 0 20px 44px -18px rgba(0, 0, 0, 0.65), 0 2px 10px rgba(0, 0, 0, 0.35);
  --shadow-inset-top: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
:root[data-theme="light"] {
  --ink-900: #16130f;
  --ink-800: #241f19;
  --ink-700: #3d372f;
  --ink-600: #544c41;
  --ink-500: #6b6255;
  --ink-400: #8b8171;
  --ink-300: #a79c8c;
  --ink-200: #c9c0b1;
  --ink-100: #e2dbcd;

  --paper-0: #ffffff;
  --paper-50: #fdfaf5;
  --paper-100: #f7f1e7;
  --paper-200: #efe7d9;
  --paper-300: #e4d9c6;

  --spine-700: #1d4438;
  --spine-600: #255445;
  --spine-500: #2e6553;
  --spine-400: #468474;
  --spine-200: #a8c9be;
  --spine-100: #d6e7e0;
  --spine-50: #ecf4f1;

  --tint-amber: #f6dfa8;
  --tint-amber-deep: #e9a23b;
  --tint-sky: #c3d9ef;
  --tint-sky-deep: #3c6e9e;
  --tint-lilac: #d5cdee;
  --tint-lilac-deep: #6f5fb0;
  --tint-blush: #f3cfc3;
  --tint-blush-deep: #b3562e;
  --tint-sage: #cde3cf;
  --tint-sage-deep: #3f7d5c;

  --success-500: #3f7d5c;
  --success-50: #e7f2eb;
  --warning-500: #c9861a;
  --warning-50: #fbeed6;
  --danger-500: #b3402a;
  --danger-50: #f8e3de;
  --info-500: #3c6e9e;
  --info-50: #e5eef6;

  --shadow-s: 0 1px 2px rgba(22, 19, 15, 0.06), 0 1px 1px rgba(22, 19, 15, 0.04);
  --shadow-m: 0 2px 4px rgba(22, 19, 15, 0.05), 0 6px 16px -6px rgba(22, 19, 15, 0.1);
  --shadow-l: 0 8px 24px -8px rgba(22, 19, 15, 0.14), 0 2px 6px rgba(22, 19, 15, 0.05);
  --shadow-page: 0 18px 40px -18px rgba(22, 19, 15, 0.22), 0 2px 8px rgba(22, 19, 15, 0.06);
  --shadow-inset-top: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

/* ---------------------------------------------------------------------------
   Base
   --------------------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
:target,
#how-it-works,
#pricing,
#faq {
  scroll-margin-top: 88px;
}

body {
  margin: 0;
  background: var(--surface-page);
  color: var(--text-body);
  font: var(--type-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1,
h2,
h3,
h4 {
  margin: 0;
  color: var(--text-strong);
  font-family: var(--font-display);
  font-weight: var(--weight-regular);
  letter-spacing: var(--tracking-display);
  line-height: var(--leading-display);
}
h3,
h4 {
  font-family: var(--font-body);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-title);
  line-height: var(--leading-title);
}
p {
  margin: 0;
}
a {
  color: var(--text-link);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
  transition: color var(--dur-fast) var(--ease-out);
}
a:hover {
  color: var(--text-link-hover);
}
button,
input,
select,
textarea {
  font: inherit;
}
:where(button, a, input, select, [tabindex]):focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

.c2e-eyebrow {
  display: inline-block;
  font: var(--type-eyebrow);
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
  color: var(--text-muted);
}
.c2e-container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding-inline: var(--space-6);
}
.hidden {
  display: none !important;
}

/* ---------------------------------------------------------------------------
   Header
   --------------------------------------------------------------------------- */
.site-head {
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--veil-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-hairline);
}
.site-head-row {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-8);
}
.wordmark {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink-900);
  font-family: var(--font-display);
  font-size: 22px;
  letter-spacing: -0.02em;
  white-space: nowrap;
}
.wordmark em {
  font-style: normal;
  color: var(--spine-500);
}
.wordmark-mark {
  width: 34px;
  height: 34px;
  flex: none;
  display: block;
}
.site-nav {
  display: flex;
  gap: var(--space-6);
}
.site-nav a {
  font: var(--type-body);
  font-size: var(--text-body-s);
  text-decoration: none;
  color: var(--text-body);
}
.site-nav a:hover {
  color: var(--text-link-hover);
}
.site-head-actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}
.theme-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-s);
  color: var(--text-muted);
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
}
.theme-btn svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
}
.theme-btn:hover {
  background: var(--paper-100);
  color: var(--ink-900);
}
.account-btn svg {
  width: 15px;
  height: 15px;
  flex: none;
}

/* ---------------------------------------------------------------------------
   Buttons — translated from the design system's Button.jsx spec
   --------------------------------------------------------------------------- */
.c2e-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font-family: var(--font-body);
  font-weight: var(--weight-medium);
  letter-spacing: 0.005em;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out),
    box-shadow var(--dur-fast) var(--ease-out), opacity var(--dur-fast) var(--ease-out);
}
.c2e-btn:active:not(:disabled) {
  transform: scale(var(--press-scale));
}
.c2e-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.c2e-btn-s {
  height: var(--control-h-s);
  padding: 0 12px;
  font-size: var(--text-caption);
  border-radius: var(--radius-xs);
}
.c2e-btn-m {
  height: var(--control-h-m);
  padding: 0 18px;
  font-size: var(--text-body-s);
  border-radius: var(--radius-s);
}
.c2e-btn-l {
  height: var(--control-h-l);
  padding: 0 26px;
  font-size: var(--text-body-size);
  border-radius: var(--radius-m);
}
.c2e-btn-primary {
  background: var(--action-primary-bg);
  color: var(--action-primary-fg);
  border: 1px solid var(--action-primary-bg);
}
.c2e-btn-primary:hover:not(:disabled) {
  background: var(--action-primary-bg-hover);
  border-color: var(--action-primary-bg-hover);
}
.c2e-btn-accent {
  background: var(--action-accent-bg);
  color: var(--action-accent-fg);
  border: 1px solid var(--action-accent-bg);
}
.c2e-btn-accent:hover:not(:disabled) {
  background: var(--action-accent-bg-hover);
  border-color: var(--action-accent-bg-hover);
}
.c2e-btn-secondary {
  background: var(--action-secondary-bg);
  color: var(--action-secondary-fg);
  border: 1px solid var(--border-default);
  box-shadow: var(--shadow-s);
}
.c2e-btn-secondary:hover:not(:disabled) {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-m);
}

/* ---------------------------------------------------------------------------
   Cards — translated from Card.jsx
   --------------------------------------------------------------------------- */
.c2e-card {
  background: var(--surface-card);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-l);
  padding: var(--space-6);
  box-shadow: var(--shadow-s);
}
.c2e-card h3 {
  margin: 0 0 8px;
  font-size: 17px;
  color: var(--text-strong);
}
.c2e-card p {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-muted);
}
.c2e-card-tint {
  border: none;
  box-shadow: none;
  display: grid;
  gap: var(--space-3);
  padding: var(--space-8);
}
.c2e-card-tint-sage {
  background: var(--tint-sage);
}
.c2e-card-tint-sky {
  background: var(--tint-sky);
}
.c2e-card-tint-amber {
  background: var(--tint-amber);
}
.card-dark {
  background: var(--surface-inverse);
  border-color: var(--surface-inverse);
}
.card-dark h3 {
  color: var(--paper-50);
}
.card-dark p {
  color: var(--paper-200);
}

/* ---------------------------------------------------------------------------
   Hero + tool card
   --------------------------------------------------------------------------- */
.hero {
  background: linear-gradient(180deg, var(--spine-50), var(--paper-50) 70%);
  padding-top: var(--space-20);
  padding-bottom: var(--space-16);
}
.hero-inner {
  display: grid;
  justify-items: center;
  gap: var(--space-5);
  text-align: center;
}
.hero-title {
  font-size: var(--text-display-xl);
  max-width: 780px;
}
.hero-lede {
  font: var(--type-lead);
  color: var(--text-muted);
  max-width: 560px;
}
.tool-card {
  width: 100%;
  max-width: 560px;
  margin-top: var(--space-4);
  background: var(--surface-card);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-m);
  padding: var(--space-8);
  text-align: left;
}

/* ---- Dropzone — translated from FileDropzone.jsx ---- */
.dropzone {
  display: grid;
  justify-items: center;
  gap: var(--space-3);
  padding: var(--space-10) var(--space-6);
  text-align: center;
  background: var(--surface-card);
  border: 1.5px dashed var(--border-strong);
  border-radius: var(--radius-l);
  cursor: pointer;
  outline: none;
  transition: background var(--dur-base) var(--ease-out), border-color var(--dur-base) var(--ease-out);
}
.dropzone:hover,
.dropzone:focus-visible {
  border-color: var(--spine-400);
}
.dropzone.dragover {
  background: var(--spine-50);
  border-color: var(--spine-500);
}
.dz-icon {
  display: inline-flex;
  width: 30px;
  height: 30px;
  color: var(--ink-300);
}
.dropzone.dragover .dz-icon,
.dropzone:hover .dz-icon {
  color: var(--spine-500);
}
.dz-icon svg {
  width: 100%;
  height: 100%;
}
.dz-title {
  font-family: var(--font-display);
  font-size: var(--text-title);
  color: var(--text-strong);
  line-height: 1.2;
}
.dz-sub {
  font: var(--type-caption);
  font-weight: 400;
  color: var(--text-muted);
}
.dz-sub .link {
  color: var(--text-link);
  border-bottom: 1px solid currentColor;
  padding-bottom: 1px;
}
.dz-limit {
  font: var(--type-caption);
  font-weight: 400;
  color: var(--text-faint);
}

/* ---- Selected file ---- */
.file-card {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-top: var(--space-4);
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-m);
  background: var(--surface-sunken);
}
.fc-icon {
  display: inline-flex;
  width: 20px;
  height: 20px;
  flex: none;
  color: var(--text-muted);
}
.fc-icon svg {
  width: 100%;
  height: 100%;
}
.fc-meta {
  flex: 1;
  min-width: 0;
}
.fc-name {
  font-size: var(--text-body-s);
  color: var(--text-strong);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.fc-size {
  font: var(--type-mono);
  font-size: var(--text-micro);
  color: var(--text-faint);
  margin-top: 2px;
}
.fc-remove {
  border: none;
  background: none;
  color: var(--text-faint);
  font-size: 18px;
  line-height: 1;
  padding: 4px 8px;
  cursor: pointer;
  border-radius: var(--radius-xs);
}
.fc-remove:hover {
  color: var(--text-strong);
  background: var(--paper-200);
}

/* ---- Conversion model ---- */
.model-picker {
  margin-top: var(--space-4);
}
.model-picker > .lbl {
  display: block;
  margin-bottom: var(--space-2);
}
.model-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-m);
  background: var(--surface-sunken);
}
.model-option {
  min-width: 0;
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: var(--radius-s);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  font: inherit;
}
.model-option:hover:not(:disabled) {
  color: var(--text-strong);
}
.model-option.is-on {
  border-color: var(--border-default);
  background: var(--surface-raised);
  color: var(--text-strong);
  box-shadow: var(--shadow-s);
}
.model-option:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}
.model-option-title {
  font-size: var(--text-body-s);
  font-weight: var(--weight-semibold);
}
.model-option-meta {
  font: var(--type-caption);
  font-weight: 400;
  color: var(--text-faint);
}
.model-option[data-pro="true"].is-on .model-option-meta {
  color: var(--spine-600);
}
.model-hint {
  margin: var(--space-2) 0 0;
  font: var(--type-caption);
  font-weight: 400;
  color: var(--text-faint);
}

/* ---------------------------------------------------------------------------
   What the book needs, and what it costs
   --------------------------------------------------------------------------- */
.estimate {
  margin-top: var(--space-4);
  padding: var(--space-4) var(--space-5);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-m);
  background: var(--surface-sunken);
}
.estimate-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-3);
}
.estimate-verdict {
  font-size: var(--text-body-s);
  font-weight: var(--weight-semibold);
  color: var(--text-strong);
}
.estimate-price {
  font: var(--type-mono);
  font-size: 20px;
  font-weight: var(--weight-medium);
  color: var(--text-strong);
  white-space: nowrap;
}
.estimate-price.is-free {
  font-size: var(--text-body-s);
  font-family: var(--font-body);
  color: var(--text-muted);
}
.estimate-price-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}
.estimate-price-alt {
  font: var(--type-caption);
  font-weight: 400;
  color: var(--text-faint);
}
.estimate-price-alt:empty {
  display: none;
}
.estimate-breakdown {
  list-style: none;
  margin: var(--space-3) 0 0;
  padding: 0;
  display: grid;
  gap: 6px;
}
.qrow {
  display: grid;
  grid-template-columns: 3.2em 1fr;
  align-items: baseline;
  gap: 4px 10px;
  font-size: 0.88rem;
}
.qrow-n {
  font: var(--type-mono);
  font-weight: var(--weight-medium);
  text-align: right;
  color: var(--text-body);
}
.qrow-why {
  grid-column: 2;
  font-size: 0.8rem;
  color: var(--text-faint);
}
.qrow-layer .qrow-label,
.qrow-ocr .qrow-label {
  font-weight: var(--weight-semibold);
  color: var(--text-strong);
}
.qrow-text .qrow-n,
.qrow-blank .qrow-n {
  color: var(--text-faint);
}
.estimate-note {
  margin: var(--space-3) 0 0;
  font: var(--type-caption);
  font-weight: 400;
  color: var(--text-faint);
}
.estimate-note:empty {
  display: none;
}
.pay-btn {
  width: 100%;
  margin-top: var(--space-3);
}

/* A book that was bought and cannot be produced. Set plainly, no warning
   colouring — nothing here is the reader's mistake, and dressing an apology
   in red would suggest something for them to do about it. */
.lost-notice {
  margin-top: var(--space-4);
  padding: var(--space-4) var(--space-5);
  border: 1px solid var(--border-hairline);
  border-left: 3px solid var(--spine-500);
  border-radius: var(--radius-m);
  background: var(--surface-sunken);
  font-size: 0.86rem;
  line-height: 1.55;
  color: var(--text-body);
}
.lost-notice p {
  margin: 0 0 9px;
}
.lost-notice p:last-child {
  margin-bottom: 0;
}
.lost-lead {
  font-weight: var(--weight-semibold);
  color: var(--text-strong);
}
.lost-ref code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  user-select: all;
  word-break: break-all;
  color: var(--text-strong);
}
.lost-notice a {
  color: var(--text-strong);
}

/* ---------------------------------------------------------------------------
   Settings
   --------------------------------------------------------------------------- */
.options {
  margin-top: var(--space-5);
  border-top: 1px solid var(--border-hairline);
}
.options summary {
  cursor: pointer;
  padding: var(--space-3) 0;
  font: var(--type-eyebrow);
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
  color: var(--text-faint);
  user-select: none;
  list-style: none;
}
.options summary::-webkit-details-marker {
  display: none;
}
.options summary::after {
  content: " +";
}
.options[open] summary {
  color: var(--text-muted);
}
.options[open] summary::after {
  content: " –";
}

.opt-grid {
  display: grid;
  gap: var(--space-4);
  padding-bottom: var(--space-5);
}
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.lbl {
  font: var(--type-caption);
  color: var(--text-muted);
}
.field input[type="text"],
.field select {
  height: var(--control-h-m);
  padding: 0 12px;
  font: var(--type-body);
  font-size: var(--text-body-s);
  color: var(--text-strong);
  background: var(--surface-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-s);
  box-shadow: var(--shadow-s);
  appearance: none;
  -webkit-appearance: none;
}
.field select {
  background-image: linear-gradient(45deg, transparent 50%, var(--ink-400) 50%),
    linear-gradient(135deg, var(--ink-400) 50%, transparent 50%);
  background-position: right 14px center, right 9px center;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 32px;
}
.field input[type="text"]:focus,
.field select:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: var(--focus-ring);
}
.field input::placeholder {
  color: var(--text-faint);
}

.sec {
  margin: var(--space-2) 0 2px;
  padding-top: var(--space-3);
  border-top: 1px solid var(--border-hairline);
  font: var(--type-eyebrow);
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
  color: var(--text-faint);
}

/* ---- Checkbox — translated from Checkbox.jsx ---- */
.checkbox {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  cursor: pointer;
}
.checkbox input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.cb-box {
  width: 18px;
  height: 18px;
  flex: none;
  margin-top: 2px;
  border-radius: 5px;
  background: var(--surface-card);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-s);
  display: grid;
  place-items: center;
  transition: background var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out);
}
.cb-box::after {
  content: "";
  width: 5px;
  height: 9px;
  border: solid #fff;
  border-width: 0 1.6px 1.6px 0;
  transform: rotate(43deg) scale(0);
  transition: transform var(--dur-fast) var(--ease-out);
}
.checkbox input:checked + .cb-box {
  background: var(--spine-500);
  border-color: var(--spine-500);
  box-shadow: none;
}
.checkbox input:checked + .cb-box::after {
  transform: rotate(43deg) scale(1);
}
.checkbox input:focus-visible + .cb-box {
  box-shadow: var(--focus-ring);
}
.cb {
  display: grid;
  gap: 2px;
}
.cb-title {
  font-size: var(--text-body-s);
  font-weight: var(--weight-medium);
  color: var(--text-strong);
}
.cb-note {
  font: var(--type-caption);
  font-weight: 400;
  color: var(--text-muted);
  line-height: 1.5;
}
.checkbox.disabled,
label.disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
label.disabled input {
  cursor: not-allowed;
}

/* ---- Segmented mode picker — translated from the Tabs.jsx pill variant ---- */
.segmented {
  display: inline-flex;
  width: 100%;
  gap: 4px;
  padding: 4px;
  background: var(--surface-sunken);
  border-radius: var(--radius-s);
}
.seg {
  flex: 1;
  padding: 8px 6px;
  font-size: var(--text-caption);
  font-weight: var(--weight-medium);
  color: var(--text-muted);
  background: transparent;
  border: none;
  border-radius: var(--radius-xs);
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
}
.seg:hover:not(.is-on) {
  color: var(--text-strong);
}
.seg.is-on {
  background: var(--surface-card);
  color: var(--text-strong);
  font-weight: var(--weight-semibold);
  box-shadow: var(--shadow-s);
}
.seg:focus-visible {
  box-shadow: var(--focus-ring);
}

.mode-hint {
  margin: 6px 0 0;
  font-size: var(--text-caption);
  line-height: 1.58;
  color: var(--text-muted);
  min-height: 3.2em;
}
.mode-hint strong {
  font-weight: var(--weight-semibold);
  color: var(--text-strong);
}

/* ---------------------------------------------------------------------------
   Convert, status, progress
   --------------------------------------------------------------------------- */
.convert-btn {
  width: 100%;
  margin-top: var(--space-5);
}
.status {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: var(--space-4);
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-m);
  font-size: var(--text-body-s);
  line-height: 1.5;
  color: var(--text-body);
}
.status.success {
  border-color: var(--success-500);
  background: var(--success-50);
  color: var(--text-strong);
}
.status.error {
  border-color: var(--danger-500);
  background: var(--danger-50);
  color: var(--text-strong);
}
.spinner {
  width: 10px;
  height: 10px;
  flex: none;
  border-radius: 99px;
  border: 1.5px solid var(--spine-500);
  animation: pulse 1s var(--ease-out) infinite;
}
@keyframes pulse {
  0%,
  100% {
    background: transparent;
  }
  50% {
    background: var(--spine-500);
  }
}
@media (prefers-reduced-motion: reduce) {
  .spinner {
    animation: none;
    background: var(--spine-500);
  }
}

.progress {
  margin-top: var(--space-2);
  height: 6px;
  border-radius: 99px;
  background: var(--paper-200);
  overflow: hidden;
}
.progress-bar {
  height: 100%;
  width: 0;
  border-radius: 99px;
  background: var(--spine-500);
  transition: width var(--dur-slow) var(--ease-out);
}

/* ---- Conversion steps: the live progress list, scoped under .steps so it
   cannot collide with anything else that calls itself a step. ---- */
.steps {
  list-style: none;
  margin: var(--space-3) 0 0;
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-m);
  background: var(--surface-sunken);
}
.steps .step {
  display: flex;
  align-items: baseline;
  gap: 9px;
  padding: 3px 0;
  font-size: var(--text-body-s);
  color: var(--text-faint);
}
.steps .step-mark {
  width: 12px;
  flex: none;
  text-align: center;
  font-size: 12px;
}
.steps .step-label {
  flex: 1;
}
.steps .step-detail {
  font: var(--type-mono);
  font-size: var(--text-micro);
  color: var(--text-faint);
  font-variant-numeric: tabular-nums;
}
.steps .step.is-done {
  color: var(--text-muted);
}
.steps .step.is-active {
  color: var(--spine-500);
  font-weight: var(--weight-semibold);
}
.steps .step.is-active .step-detail {
  color: var(--spine-500);
}

.tool-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 7px;
  margin: var(--space-5) 0 0;
  padding-top: var(--space-4);
  border-top: 1px solid var(--border-hairline);
  font: var(--type-caption);
  font-weight: 400;
  color: var(--text-faint);
}
.foot-dot {
  color: var(--border-strong);
}

/* ---------------------------------------------------------------------------
   Bands
   --------------------------------------------------------------------------- */
.band {
  padding-block: var(--section-y-tight);
}
.band-sunken {
  background: var(--surface-sunken);
}
.band-head {
  display: grid;
  gap: var(--space-3);
  justify-items: center;
  text-align: center;
  margin-bottom: var(--space-8);
}
.band-title {
  font-size: var(--text-display-m);
  max-width: 640px;
}
.band-lede {
  max-width: 52ch;
  font: var(--type-body);
  color: var(--text-muted);
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-5);
}
.grid-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-4);
}

.benefit-icon {
  display: inline-flex;
  width: 24px;
  height: 24px;
}
.benefit-icon svg {
  width: 100%;
  height: 100%;
}
.benefit-icon-sage {
  color: var(--tint-sage-deep);
}
.benefit-icon-sky {
  color: var(--tint-sky-deep);
}
.benefit-icon-amber {
  color: var(--tint-amber-deep);
}

.persona-grid {
  max-width: 820px;
  margin: 0 auto;
}
.persona {
  display: grid;
  justify-items: center;
  gap: var(--space-4);
  text-align: center;
}
.persona h3 {
  font-size: var(--text-lead);
}
.persona p {
  font: var(--type-body);
  font-size: var(--text-body-s);
  color: var(--text-muted);
  max-width: 32ch;
}
.persona-icon {
  width: 64px;
  height: 64px;
  border-radius: 99px;
  display: grid;
  place-items: center;
}
.persona-icon svg {
  width: 26px;
  height: 26px;
}
.persona-icon-sky {
  background: var(--tint-sky);
  color: var(--tint-sky-deep);
}
.persona-icon-sage {
  background: var(--tint-sage);
  color: var(--tint-sage-deep);
}
.persona-icon-lilac {
  background: var(--tint-lilac);
  color: var(--tint-lilac-deep);
}

/* ---------------------------------------------------------------------------
   Fixed PDF / reflowable EPUB comparison. Both examples use real output from
   the Physics test book and the same screen proportions, so the difference is
   the document rather than a change of device.
   --------------------------------------------------------------------------- */
.explainer {
  padding-block: var(--section-y-tight);
  background: var(--surface-sunken);
}
.explainer .band-head {
  margin-bottom: var(--space-8);
}
.reader-comparison {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-5);
}
.reader-panel {
  position: relative;
  display: grid;
  justify-items: center;
  align-content: start;
  gap: var(--space-6);
  min-width: 0;
  padding: var(--space-8);
  overflow: hidden;
  background: var(--surface-card);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-l);
  box-shadow: var(--shadow-s);
}
.reader-panel-before {
  border-top: 3px solid var(--danger-500);
}
.reader-panel-after {
  border-top: 3px solid var(--success-500);
}
.comparison-label {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding-inline: 10px;
  border-radius: var(--radius-xs);
  font: var(--type-eyebrow);
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
}
.reader-panel-before .comparison-label {
  color: var(--danger-500);
  background: var(--danger-50);
}
.reader-panel-after .comparison-label {
  color: var(--success-500);
  background: var(--success-50);
}
.ereader {
  position: relative;
  width: min(100%, 316px);
  aspect-ratio: 3 / 4;
  padding: 15px 15px 32px;
  background: #26231d;
  border: 1px solid #4a453c;
  border-radius: 18px;
  box-shadow: var(--shadow-page);
}
.ereader-screen {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid #c9c5bc;
  border-radius: 3px;
}
.ereader-page {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #ffffff;
}
.ereader-mark {
  position: absolute;
  right: 0;
  bottom: 9px;
  left: 0;
  color: #bdb5a7;
  font-family: var(--font-display);
  font-size: 11px;
  line-height: 1;
  text-align: center;
}
.ereader-mark em {
  color: #77a895;
  font-style: normal;
}
.comparison-copy {
  width: min(100%, 390px);
  display: grid;
  gap: var(--space-4);
}
.comparison-copy h3 {
  font: var(--type-title);
  font-size: var(--text-lead);
  text-align: center;
}
.comparison-points {
  display: grid;
  gap: var(--space-3);
  margin: 0;
  padding: 0;
  list-style: none;
}
.comparison-points li {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: var(--space-2);
  align-items: start;
  color: var(--text-muted);
  font: var(--type-body);
  font-size: var(--text-body-s);
}
.point-icon {
  display: inline-grid;
  width: 20px;
  height: 20px;
  place-items: center;
}
.point-icon svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.reader-panel-before .point-icon {
  color: var(--danger-500);
}
.reader-panel-after .point-icon {
  color: var(--success-500);
}

/* ---------------------------------------------------------------------------
   Wall of comments — two rows drifting in opposite directions. Each row holds
   its cards twice over and travels exactly -50%, so the second copy lands
   where the first began and the loop is seamless at any width.
   --------------------------------------------------------------------------- */
.wall {
  margin-top: var(--space-6);
  display: grid;
  gap: var(--space-3);
  /* The mask only hides the row's edges visually — without this, the row's
     own max-content width (literally thousands of pixels, the whole drifting
     strip laid out in one line) still pushes the document's real layout
     width out past the viewport. A phone then renders that oversized page
     and opens zoomed out to fit it, which is the "you can zoom out" bug this
     line exists to prevent. */
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
}
.wall-row {
  display: flex;
  width: max-content;
  animation: wall-drift 80s linear infinite;
}
.wall-row-dupe {
  display: contents;
}
.wall-row-back {
  animation-direction: reverse;
  animation-duration: 96s;
}
@keyframes wall-drift {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}
.wall:has(.quote:hover) .wall-row {
  animation-play-state: paused;
}
.quote {
  flex: 0 0 auto;
  width: 300px;
  margin-right: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: var(--space-5);
  background: var(--surface-card);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-l);
  box-shadow: var(--shadow-s);
  text-decoration: none;
  color: inherit;
}
.quote:hover {
  border-color: var(--border-strong);
}
.quote-text {
  margin: 0;
  font-family: var(--font-display);
  font-style: italic;
  font-size: var(--text-body-s);
  line-height: 1.5;
  color: var(--text-strong);
}
.quote-foot {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-top: auto;
  font: var(--type-caption);
  font-weight: 400;
  color: var(--text-faint);
}
.quote-who {
  font-weight: var(--weight-semibold);
  color: var(--text-muted);
}
.quote-src {
  margin-left: auto;
}

@media (prefers-reduced-motion: reduce) {
  .wall {
    -webkit-mask-image: none;
    mask-image: none;
  }
  .wall-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: var(--space-3);
    width: auto;
    animation: none;
  }
  .quote {
    width: auto;
    margin-right: 0;
  }
  .wall-row-dupe {
    display: none;
  }
}

/* ---------------------------------------------------------------------------
   Reader devices
   --------------------------------------------------------------------------- */
.device-row {
  display: flex;
  gap: var(--space-10);
  flex-wrap: wrap;
  justify-content: center;
}
.device-chip {
  display: grid;
  justify-items: center;
  gap: 8px;
}
.device-icon {
  width: 56px;
  height: 56px;
  border-radius: 99px;
  background: var(--surface-card);
  border: 1px solid var(--border-hairline);
  box-shadow: var(--shadow-s);
  display: grid;
  place-items: center;
  color: var(--text-body);
}
.device-icon svg {
  width: 22px;
  height: 22px;
}
.device-label {
  font: var(--type-caption);
  font-weight: 400;
  color: var(--text-muted);
}

/* ---------------------------------------------------------------------------
   Pricing
   --------------------------------------------------------------------------- */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-5);
  max-width: 1120px;
  margin: 0 auto;
}
.pricing-card {
  display: grid;
  gap: var(--space-4);
  padding: var(--space-8);
  box-shadow: var(--shadow-m);
}
.pricing-figure {
  font-family: var(--font-display);
  font-size: 44px;
  color: var(--text-strong);
}
.pricing-figure-unit {
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--text-faint);
}
.pricing-note {
  margin-top: -8px;
  font: var(--type-caption);
  font-weight: 400;
  color: var(--text-faint);
}
.pricing-features {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--space-2);
}
.pricing-features li {
  display: flex;
  align-items: center;
  gap: 8px;
  font: var(--type-body);
  font-size: var(--text-body-s);
  color: var(--text-body);
}
.check-icon {
  display: inline-flex;
  width: 15px;
  height: 15px;
  flex: none;
  color: var(--spine-500);
}
.check-icon svg {
  width: 100%;
  height: 100%;
}
.pricing-card-dark {
  background: var(--surface-inverse);
  border-color: var(--surface-inverse);
}
.pricing-card-dark .pricing-figure {
  color: var(--paper-50);
}
.pricing-card-dark .pricing-note {
  color: var(--ink-400);
}
.pricing-card-dark .pricing-features li {
  color: var(--ink-100);
}
.pricing-card-dark .check-icon {
  color: var(--spine-200);
}
.pricing-card-dark .c2e-eyebrow {
  color: var(--spine-200);
}

/* ---------------------------------------------------------------------------
   FAQ
   --------------------------------------------------------------------------- */
.faq {
  max-width: var(--container-narrow);
  margin: 0 auto;
}
.faq-item {
  border-bottom: 1px solid var(--border-hairline);
}
.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: var(--space-4) 24px var(--space-4) 0;
  font-size: var(--text-body-size);
  font-weight: var(--weight-semibold);
  color: var(--text-strong);
  position: relative;
}
.faq-item summary::-webkit-details-marker {
  display: none;
}
.faq-item summary::after {
  content: "+";
  position: absolute;
  right: 4px;
  color: var(--text-faint);
  font-weight: 400;
}
.faq-item[open] summary::after {
  content: "–";
}
.faq-item p {
  margin: 0;
  padding: 0 0 var(--space-4);
  font-size: var(--text-body-s);
  line-height: 1.6;
  color: var(--text-muted);
}

/* ---------------------------------------------------------------------------
   Footer
   --------------------------------------------------------------------------- */
.site-foot {
  background: var(--surface-inverse);
  color: var(--ink-300);
  padding-top: var(--space-16);
  padding-bottom: var(--space-8);
}
.site-foot-top {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: var(--space-8);
}
.site-foot-brand {
  display: grid;
  gap: var(--space-3);
  align-content: start;
}
.wordmark-foot {
  color: var(--paper-50);
  pointer-events: none;
}
.wordmark-foot em {
  color: var(--spine-200);
}
.site-foot-brand p {
  font: var(--type-caption);
  font-weight: 400;
  color: var(--ink-400);
  max-width: 260px;
}
.site-foot-col {
  display: grid;
  gap: var(--space-3);
  align-content: start;
}
.site-foot-col .c2e-eyebrow {
  color: var(--ink-400);
}
.site-foot-col a {
  font: var(--type-caption);
  font-weight: 400;
  color: var(--ink-200);
  text-decoration: none;
}
.site-foot-col a:hover {
  color: var(--paper-50);
}
.site-foot-bottom {
  margin-top: var(--space-12);
  padding-top: var(--space-5);
  border-top: 1px solid var(--ink-800);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font: var(--type-caption);
  font-weight: 400;
  color: var(--ink-500);
}
.site-foot-icons {
  display: flex;
  gap: var(--space-4);
  color: var(--ink-400);
}
.site-foot-icons svg {
  width: 16px;
  height: 16px;
}

/* ---------------------------------------------------------------------------
   Account dialog
   --------------------------------------------------------------------------- */
.account-dialog {
  width: min(460px, calc(100vw - 32px));
  max-height: min(760px, calc(100vh - 32px));
  padding: 0;
  overflow: auto;
  color: var(--text-body);
  background: var(--surface-card);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-l);
  box-shadow: var(--shadow-page);
}
.account-dialog::backdrop {
  background: rgba(22, 19, 15, 0.34);
  backdrop-filter: blur(4px);
}
.account-dialog-inner {
  display: grid;
  gap: var(--space-6);
  padding: var(--space-6);
}
.account-dialog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-4);
}
.account-dialog-head h2 {
  margin-top: var(--space-1);
  font-size: var(--text-display-s);
}
.account-close {
  display: grid;
  width: 32px;
  height: 32px;
  flex: none;
  padding: 0;
  place-items: center;
  color: var(--text-muted);
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-s);
  cursor: pointer;
}
.account-close:hover {
  color: var(--text-strong);
  background: var(--surface-sunken);
}
.account-close svg {
  width: 17px;
  height: 17px;
}
.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  padding: 3px;
  background: var(--surface-sunken);
  border-radius: var(--radius-s);
}
.auth-tab {
  height: 34px;
  padding: 0 10px;
  color: var(--text-muted);
  background: transparent;
  border: 0;
  border-radius: 7px;
  cursor: pointer;
}
.auth-tab.is-on {
  color: var(--text-strong);
  background: var(--surface-card);
  box-shadow: var(--shadow-s);
}
.auth-form {
  display: grid;
  gap: var(--space-4);
  margin-top: var(--space-5);
}
.account-field {
  display: grid;
  gap: 6px;
  color: var(--text-muted);
  font: var(--type-caption);
}
.account-field input {
  width: 100%;
  height: var(--control-h-m);
  padding: 0 12px;
  color: var(--text-strong);
  background: var(--surface-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-s);
  box-shadow: var(--shadow-s);
}
.account-field input:focus {
  border-color: var(--border-focus);
  box-shadow: var(--focus-ring);
}
.auth-error {
  padding: var(--space-3);
  color: var(--danger-500);
  background: var(--danger-50);
  border-radius: var(--radius-s);
  font: var(--type-caption);
}
.auth-form .c2e-btn,
.account-signed-in > .c2e-btn {
  width: 100%;
}
.account-signed-in {
  display: grid;
  gap: var(--space-5);
}
.account-identity {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}
.account-identity > div {
  display: grid;
  min-width: 0;
}
.account-identity strong {
  color: var(--text-strong);
  font: var(--type-body);
  font-weight: var(--weight-semibold);
}
.account-identity span:not(.account-initial) {
  overflow: hidden;
  color: var(--text-muted);
  font: var(--type-caption);
  font-weight: var(--weight-regular);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.account-initial {
  display: grid;
  width: 42px;
  height: 42px;
  flex: none;
  place-items: center;
  color: var(--spine-700);
  background: var(--spine-100);
  border-radius: var(--radius-pill);
  font-family: var(--font-display);
  font-size: var(--text-lead);
}
.account-plan {
  display: grid;
  gap: var(--space-4);
  padding: var(--space-5);
  background: var(--surface-sunken);
  border-radius: var(--radius-m);
}
.account-credits {
  display: grid;
  gap: var(--space-3);
  padding: var(--space-5);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-m);
}
.account-credits-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}
.account-credits-head > div {
  display: grid;
  gap: var(--space-1);
}
.account-credits-head strong {
  color: var(--text-strong);
  font: var(--type-title);
  font-size: var(--text-lead);
}
.account-credits > p:not(.auth-error) {
  margin: 0;
  color: var(--text-muted);
  font: var(--type-caption);
  font-weight: var(--weight-regular);
}
.credit-packs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-2);
}
.credit-pack {
  min-width: 0;
  display: grid;
  gap: 2px;
  justify-items: start;
  padding: 10px 12px;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-s);
  background: var(--surface-card);
  color: var(--text-strong);
  cursor: pointer;
  font: inherit;
  box-shadow: var(--shadow-s);
}
.credit-pack:hover {
  border-color: var(--border-focus);
}
.credit-pack:disabled {
  cursor: wait;
  opacity: 0.6;
}
.credit-pack strong {
  font-size: var(--text-body-s);
}
.credit-pack span {
  color: var(--text-muted);
  font: var(--type-caption);
  font-weight: var(--weight-regular);
}
.account-plan-head,
.account-usage-copy {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}
.account-plan-head > div {
  display: grid;
  gap: var(--space-1);
}
.account-plan-head strong {
  color: var(--text-strong);
  font: var(--type-title);
  font-size: var(--text-lead);
  text-transform: capitalize;
}
.account-plan-status {
  padding: 4px 8px;
  color: var(--text-muted);
  background: var(--surface-card);
  border-radius: var(--radius-xs);
  font: var(--type-caption);
  text-transform: capitalize;
}
.account-usage {
  display: grid;
  gap: var(--space-2);
}
.account-usage-copy {
  color: var(--text-muted);
  font: var(--type-caption);
  font-weight: var(--weight-regular);
}
.account-usage-copy span:last-child {
  color: var(--text-strong);
  font-family: var(--font-mono);
}
.account-usage-track {
  height: 6px;
  overflow: hidden;
  background: var(--paper-200);
  border-radius: var(--radius-pill);
}
.account-usage-track span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--spine-500);
  border-radius: inherit;
  transition: width var(--dur-slow) var(--ease-out);
}
.account-history {
  display: grid;
  gap: var(--space-3);
}
.account-history h3 {
  font-size: var(--text-body-size);
}
.account-history > p {
  color: var(--text-faint);
  font: var(--type-caption);
  font-weight: var(--weight-regular);
}
.account-jobs {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--border-hairline);
}
.account-job {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--space-2);
  padding-block: var(--space-3);
  border-bottom: 1px solid var(--border-hairline);
}
.account-job-main {
  display: grid;
  min-width: 0;
  gap: 2px;
}
.account-job-name {
  overflow: hidden;
  color: var(--text-strong);
  font: var(--type-caption);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.account-job-meta,
.account-job-status {
  color: var(--text-faint);
  font: var(--type-caption);
  font-weight: var(--weight-regular);
}
.account-job-status {
  text-transform: capitalize;
}

/* ---------------------------------------------------------------------------
   Small screens
   --------------------------------------------------------------------------- */
@media (max-width: 900px) {
  .grid-3 {
    grid-template-columns: 1fr;
  }
  .reader-comparison {
    grid-template-columns: 1fr;
    max-width: 620px;
    margin-inline: auto;
  }
  .site-nav {
    display: none;
  }
  .pricing-grid {
    grid-template-columns: 1fr;
  }
  .site-foot-top {
    grid-template-columns: 1fr;
    gap: var(--space-6);
  }
}
@media (max-width: 620px) {
  .hero {
    padding-top: var(--space-12);
    padding-bottom: var(--space-10);
  }
  .hero-title {
    font-size: var(--text-display-s);
  }
  .tool-card {
    padding: var(--space-5);
  }
  .band-title {
    font-size: 24px;
  }
  .site-head-row {
    gap: var(--space-3);
  }
  .site-head-actions {
    gap: var(--space-2);
  }
  .account-btn {
    width: 32px;
    padding: 0;
  }
  .account-btn span {
    display: none;
  }
  .reader-panel {
    padding: var(--space-5);
  }
  .ereader {
    width: min(100%, 290px);
  }
  .quote {
    width: 260px;
  }
}

/* ---------------------------------------------------------------------------
   Legal pages (Terms, Privacy) — long-form prose, not a marketing section.
   --------------------------------------------------------------------------- */
.legal-head {
  padding-top: var(--space-16);
  padding-bottom: var(--space-8);
  background: linear-gradient(180deg, var(--spine-50), var(--paper-50) 70%);
}
.legal-head h1 {
  font-size: var(--text-display-s);
  max-width: 640px;
}
.legal-updated {
  margin-top: var(--space-3);
  font: var(--type-caption);
  font-weight: 400;
  color: var(--text-faint);
}
.legal {
  max-width: 680px;
  margin: 0 auto;
  padding-block: var(--section-y-tight);
}
.legal h2 {
  margin: var(--space-10) 0 var(--space-3);
  font-size: 21px;
  color: var(--text-strong);
}
.legal h2:first-child {
  margin-top: 0;
}
.legal h3 {
  margin: var(--space-6) 0 var(--space-2);
  font-size: var(--text-body-size);
  color: var(--text-strong);
}
.legal p {
  margin: 0 0 var(--space-4);
  font-size: var(--text-body-s);
  line-height: 1.7;
  color: var(--text-body);
}
.legal ul,
.legal ol {
  margin: 0 0 var(--space-4);
  padding-left: 1.3em;
  display: grid;
  gap: 8px;
}
.legal li {
  font-size: var(--text-body-s);
  line-height: 1.65;
  color: var(--text-body);
}
.legal strong {
  color: var(--text-strong);
}
.legal a {
  color: var(--text-link);
}
.legal-note {
  margin: 0 0 var(--space-8);
  padding: var(--space-4) var(--space-5);
  background: var(--surface-sunken);
  border: 1px solid var(--border-hairline);
  border-left: 3px solid var(--spine-500);
  border-radius: var(--radius-m);
  font-size: var(--text-caption);
  line-height: 1.6;
  color: var(--text-muted);
}
.legal-note p {
  margin: 0;
  font-size: inherit;
  color: inherit;
}
.legal-note p + p {
  margin-top: 8px;
}

/* ---------------------------------------------------------------------------
   Blog — index listing and post pages. Listing reuses .c2e-card; post body
   reuses .legal's long-form prose rules so the two article types never drift
   out of sync typographically.
   --------------------------------------------------------------------------- */
.blog-head {
  padding-top: var(--space-16);
  padding-bottom: var(--space-8);
  background: linear-gradient(180deg, var(--spine-50), var(--paper-50) 70%);
}
.blog-head h1 {
  font-size: var(--text-display-s);
  max-width: 640px;
}
.blog-head p {
  margin-top: var(--space-3);
  max-width: 560px;
  font-size: var(--text-body-s);
  line-height: 1.6;
  color: var(--text-muted);
}
.blog-list {
  max-width: var(--container-max);
  margin: 0 auto;
  padding-block: var(--section-y-tight);
  display: grid;
  gap: var(--space-5);
}
.blog-card {
  display: block;
  text-decoration: none;
  color: inherit;
}
.blog-card h2 {
  margin: 0 0 8px;
  font-size: var(--text-title);
  color: var(--text-strong);
}
.blog-card:hover h2 {
  color: var(--text-link);
}
.blog-card p {
  margin: 0;
  font-size: var(--text-body-s);
  line-height: 1.6;
  color: var(--text-muted);
}
.blog-card-meta {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-2);
  font: var(--type-caption);
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
  color: var(--text-faint);
}
.blog-card-meta .dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: currentColor;
}

/* ---- A single post ---- */
.blog-post-head {
  padding-top: var(--space-16);
  padding-bottom: var(--space-6);
  background: linear-gradient(180deg, var(--spine-50), var(--paper-50) 70%);
}
.blog-crumb {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font: var(--type-caption);
  color: var(--text-muted);
  text-decoration: none;
}
.blog-crumb:hover {
  color: var(--text-link);
}
.blog-post-head h1 {
  margin-top: var(--space-4);
  font-size: var(--text-display-s);
  max-width: 720px;
}
.blog-post-meta {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-top: var(--space-3);
  font: var(--type-caption);
  font-weight: 400;
  color: var(--text-faint);
}
.blog-post-meta .dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: currentColor;
}
/* Long-form body: identical rules to .legal so a reader never notices the
   two article types come from different templates. */
.blog-post {
  max-width: 680px;
  margin: 0 auto;
  padding-block: var(--section-y-tight);
}
.blog-post h2 {
  margin: var(--space-10) 0 var(--space-3);
  font-size: 21px;
  color: var(--text-strong);
}
.blog-post h2:first-child {
  margin-top: 0;
}
.blog-post h3 {
  margin: var(--space-6) 0 var(--space-2);
  font-size: var(--text-body-size);
  color: var(--text-strong);
}
.blog-post p {
  margin: 0 0 var(--space-4);
  font-size: var(--text-body-s);
  line-height: 1.7;
  color: var(--text-body);
}
.blog-post ul,
.blog-post ol {
  margin: 0 0 var(--space-4);
  padding-left: 1.3em;
  display: grid;
  gap: 8px;
}
.blog-post li {
  font-size: var(--text-body-s);
  line-height: 1.65;
  color: var(--text-body);
}
.blog-post strong {
  color: var(--text-strong);
}
.blog-post a {
  color: var(--text-link);
}
.blog-post code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: var(--surface-sunken);
  padding: 0.1em 0.4em;
  border-radius: 4px;
}
.blog-post table {
  width: 100%;
  margin: 0 0 var(--space-6);
  border-collapse: collapse;
  font-size: var(--text-caption);
}
.blog-post th,
.blog-post td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid var(--border-hairline);
  vertical-align: top;
}
.blog-post th {
  font: var(--type-caption);
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
  color: var(--text-faint);
  border-bottom: 1px solid var(--border-default);
}
.blog-post td:first-child,
.blog-post th:first-child {
  padding-left: 0;
  color: var(--text-strong);
  font-weight: var(--weight-medium);
}
.blog-post-table-wrap {
  overflow-x: auto;
  margin: 0 0 var(--space-6);
}
.blog-post-table-wrap table {
  margin: 0;
}
.blog-cta {
  margin: var(--space-10) 0 0;
  padding: var(--space-6);
  background: var(--surface-sunken);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-m);
  text-align: center;
}
.blog-cta p {
  margin: 0 0 var(--space-4);
  color: var(--text-body);
}
@media (max-width: 640px) {
  .blog-head,
  .blog-post-head {
    padding-top: var(--space-10);
  }
}

/* ---------------------------------------------------------------------------
   Browser extension page — a hero with a real screenshot of the popup beside
   the copy, then the same band/card vocabulary the rest of the site uses.
   Nothing here is a mockup: the screenshots are captured from the actual
   popup UI (see the extension repo's store-listing harness), so the frame
   only needs to look like a small floating panel, not a browser chrome shell.
   --------------------------------------------------------------------------- */
.ext-hero {
  padding-top: var(--space-16);
  padding-bottom: var(--space-4);
}
.ext-hero-inner {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: var(--space-10);
  align-items: center;
}
.ext-hero-copy .c2e-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}
.ext-eyebrow-icon {
  width: 18px;
  height: 18px;
  border-radius: 5px;
}
.ext-hero-copy h1 {
  margin: var(--space-3) 0 0;
  font-size: var(--text-display-m);
  color: var(--text-strong);
}
.ext-hero-copy p {
  margin: var(--space-4) 0 0;
  max-width: 46ch;
  font: var(--type-body);
  color: var(--text-muted);
}
.ext-hero-actions {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin-top: var(--space-6);
}
.ext-cta-actions {
  display: flex;
  justify-content: center;
  margin-top: var(--space-2);
}
.ext-hero-note {
  font: var(--type-caption);
  color: var(--text-faint);
}
.ext-hero-shot {
  display: flex;
  justify-content: center;
}
.ext-shot-frame {
  width: min(100%, 300px);
  border-radius: var(--radius-l);
  box-shadow: var(--shadow-l);
  overflow: hidden;
  border: 1px solid var(--border-hairline);
}
.ext-shot-frame img {
  display: block;
  width: 100%;
  height: auto;
}

.ext-steps {
  counter-reset: ext-step;
}
.ext-steps .c2e-card {
  position: relative;
  padding-top: var(--space-8);
}
.ext-steps .c2e-card::before {
  counter-increment: ext-step;
  content: counter(ext-step);
  position: absolute;
  top: var(--space-5);
  left: var(--space-6);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--surface-inverse);
  color: var(--surface-page);
  font: var(--type-caption);
  font-weight: var(--weight-semibold);
}
.ext-steps .c2e-card h3 {
  margin-top: var(--space-6);
}

.ext-privacy-list {
  display: grid;
  gap: var(--space-3);
  margin: var(--space-6) 0 0;
  padding: 0;
  list-style: none;
  max-width: 56ch;
  margin-inline: auto;
}
.ext-privacy-list li {
  display: flex;
  gap: var(--space-3);
  align-items: flex-start;
  text-align: left;
  color: var(--text-body);
}
.ext-privacy-list .point-icon {
  flex: 0 0 auto;
  margin-top: 2px;
  color: var(--success-500);
}

@media (max-width: 900px) {
  .ext-hero-inner {
    grid-template-columns: 1fr;
  }
  .ext-hero-shot {
    order: -1;
  }
  .ext-shot-frame {
    width: min(100%, 280px);
  }
}
@media (max-width: 620px) {
  .ext-hero {
    padding-top: var(--space-10);
  }
  .ext-hero-copy h1 {
    font-size: var(--text-display-s);
  }
  .ext-hero-actions {
    flex-direction: column;
    align-items: flex-start;
  }
}
