/* Sonnet Skills — shared site styles. One file, no build step.
   Dark edition: near-black ground, glass panels, luminous red for action,
   one cool accent (cyan) for data, focus and 3D detail. Books stay light paper. */

:root {
  color-scheme: dark;
  --bg: #06070a;
  --bg-2: #090b10;
  --bg-3: #0d1017;
  --surface: rgba(255, 255, 255, 0.035);
  --surface-2: rgba(255, 255, 255, 0.06);
  --surface-solid: #0e1118;
  --surface-hi: #151a24;
  --glass: linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.018));
  --glass-strong: linear-gradient(180deg, rgba(255, 255, 255, 0.085), rgba(255, 255, 255, 0.03));
  --ink: #f4f5f8;
  --ink-2: #c9cdd6;
  --muted: #8a90a0;
  --line: rgba(255, 255, 255, 0.085);
  --line-strong: rgba(255, 255, 255, 0.16);
  --inner-hi: inset 0 1px 0 rgba(255, 255, 255, 0.07);
  --red: #e5221b;
  --red-hot: #ff3b2f;
  --red-hover: #f22c24;
  --red-ink: #ff6a5e; /* red text on dark, 6.5:1 */
  --red-glow: rgba(255, 45, 32, 0.5);
  --red-soft: rgba(229, 34, 27, 0.14);
  --cyan: #45d8f0;
  --cyan-ink: #7fe4f4;
  --cyan-glow: rgba(69, 216, 240, 0.32);
  --success: #5fe0a4;
  --success-bg: rgba(52, 211, 153, 0.08);
  --success-line: rgba(52, 211, 153, 0.3);
  --warn: #f5c76b;
  --warn-bg: rgba(245, 184, 70, 0.08);
  --warn-line: rgba(245, 184, 70, 0.3);
  --error-bg: rgba(255, 69, 58, 0.09);
  --error-line: rgba(255, 99, 88, 0.42);
  --error-ink: #ff9d94;
  --paper: #fbfaf7;
  --font: "Geist", "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --wrap: 1160px;
  --gutter: clamp(20px, 5vw, 48px);
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 24px 60px -28px rgba(0, 0, 0, 0.9);
  --shadow-lift: 0 30px 70px -30px rgba(0, 0, 0, 0.95), 0 0 0 1px rgba(255, 255, 255, 0.06);
  --header-h: 64px;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* Light "paper" scope: book pages, the inbox preview. Re-declares the tokens they use. */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  background: var(--bg);
}

body {
  position: relative;
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink-2);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}
/* Ambient ground: a red aurora and a cool wash at the top, a faint grid that fades out. */
body::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: 0;
  left: 0;
  right: 0;
  height: min(1100px, 140vh);
  pointer-events: none;
  background:
    radial-gradient(46% 38% at 82% -4%, rgba(229, 34, 27, 0.2), transparent 70%),
    radial-gradient(38% 34% at 6% 2%, rgba(69, 216, 240, 0.075), transparent 70%),
    linear-gradient(rgba(255, 255, 255, 0.028) 1px, transparent 1px) 0 0 / 56px 56px,
    linear-gradient(90deg, rgba(255, 255, 255, 0.028) 1px, transparent 1px) 0 0 / 56px 56px;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, rgba(0, 0, 0, 0.55) 45%, transparent 100%);
  mask-image: linear-gradient(180deg, #000 0%, rgba(0, 0, 0, 0.55) 45%, transparent 100%);
}
/* Fine grain, fixed so it never repaints on scroll. */
body::after {
  content: "";
  position: fixed;
  z-index: -1;
  inset: 0;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}

main { flex: 1 0 auto; }
img, svg { max-width: 100%; }
img { display: block; }
[hidden] { display: none !important; }
a { color: inherit; }
p { margin: 0; }
h1, h2, h3 {
  margin: 0;
  color: var(--ink);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.025em;
  text-wrap: balance;
}
ul, ol { margin: 0; }
button { font: inherit; }
strong { color: var(--ink); }
::selection { background: rgba(229, 34, 27, 0.45); color: #fff; }

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

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

.skip-link {
  position: absolute;
  left: 12px;
  top: -200px;
  z-index: 100;
  padding: 12px 16px;
  background: var(--ink);
  color: var(--bg);
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-weight: 600;
}
.skip-link:focus { top: 12px; }

.wrap {
  width: 100%;
  max-width: calc(var(--wrap) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

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

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(6, 7, 10, 0.66);
  -webkit-backdrop-filter: saturate(1.6) blur(18px);
  backdrop-filter: saturate(1.6) blur(18px);
  border-bottom: 1px solid var(--line);
}
.site-header::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 70, 60, 0.35) 30%, rgba(69, 216, 240, 0.25) 70%, transparent);
  opacity: 0.6;
  pointer-events: none;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  height: var(--header-h);
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  font-size: 17px;
  font-weight: 650;
  letter-spacing: -0.02em;
  text-decoration: none;
  white-space: nowrap;
  color: var(--ink);
}
.wordmark-mark {
  width: 9px;
  height: 9px;
  border-radius: 2px;
  background: var(--red-hot);
  box-shadow: 0 0 0 1px rgba(255, 120, 110, 0.4), 0 0 12px 1px var(--red-glow);
  flex: none;
}

.site-nav { display: flex; align-items: center; gap: 2px; }
.nav-auth {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 2px;
  min-height: 44px;
}
html.auth-pending [data-auth-area] { visibility: hidden; }

.nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 12px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-2);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.15s ease, background-color 0.15s ease;
}
.nav-link:hover { color: var(--ink); background: var(--surface-2); }
.nav-link[aria-current="page"] { color: var(--ink); }
.nav-link-strong {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
}
.site-nav .btn-sm { margin-left: 6px; }

@media (max-width: 640px) {
  .nav-hide-sm { display: none; }
  .nav-link { padding: 0 10px; }
}

.account { position: relative; margin-left: 4px; }
.avatar {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
}
.avatar-initials {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(160deg, #262c3a, #11151e);
  box-shadow: inset 0 0 0 1px var(--line-strong), 0 0 16px -6px var(--cyan-glow);
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.avatar:hover .avatar-initials { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.3), 0 0 18px -4px var(--cyan-glow); }
.avatar[aria-expanded="true"] .avatar-initials { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--red), 0 0 18px var(--red-glow); }
.account-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  width: 260px;
  max-width: calc(100vw - 32px);
  padding: 6px;
  background: rgba(14, 17, 24, 0.94);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  box-shadow: var(--inner-hi), 0 30px 60px -20px rgba(0, 0, 0, 0.9);
}
.account-id {
  display: grid;
  gap: 2px;
  padding: 10px 12px 12px;
  margin-bottom: 6px;
  border-bottom: 1px solid var(--line);
}
.account-id strong { font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
.account-id span { font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.menu-item {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  border: 0;
  border-radius: var(--radius-sm);
  background: none;
  color: var(--ink);
  font-size: 14px;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}
.menu-item:hover { background: var(--surface-2); }

/* ---------- Buttons & links ---------- */

.btn {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 10px 22px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.07em;
  line-height: 1.2;
  text-transform: uppercase;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.25s ease, transform 0.25s var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: translateY(0) scale(0.99); }
.btn-sm { min-height: 44px; padding: 8px 16px; font-size: 13px; }
.btn-lg { min-height: 56px; padding: 12px 30px; }
.btn-block { width: 100%; }

/* The primary action: luminous red with a travelling sheen. */
.btn-primary {
  color: #fff;
  border-color: rgba(255, 120, 108, 0.5);
  background: linear-gradient(180deg, #ec2b22 0%, #de1d16 52%, #b9130e 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.3),
    inset 0 -1px 0 rgba(0, 0, 0, 0.18),
    0 0 0 1px rgba(229, 34, 27, 0.35),
    0 10px 30px -12px rgba(255, 40, 28, 0.85),
    0 0 36px -10px rgba(255, 45, 32, 0.6);
  text-shadow: 0 1px 1px rgba(90, 0, 0, 0.35);
}
.btn-primary:hover {
  background: linear-gradient(180deg, #f5372d 0%, #e5221b 52%, #c2150f 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.36),
    inset 0 -1px 0 rgba(0, 0, 0, 0.18),
    0 0 0 1px rgba(255, 70, 58, 0.55),
    0 14px 38px -12px rgba(255, 40, 28, 0.95),
    0 0 52px -8px rgba(255, 45, 32, 0.7);
  transform: translateY(-1px);
}
.btn-primary:focus-visible { outline-color: #fff; }
.btn-primary.btn-lg::after,
.btn-primary.btn-block::after,
.continue-btn::after {
  content: "";
  position: absolute;
  z-index: -1;
  top: -2px;
  bottom: -2px;
  left: -60%;
  width: 42%;
  background: linear-gradient(100deg, transparent 0%, rgba(255, 255, 255, 0.34) 50%, transparent 100%);
  transform: translateX(0) skewX(-18deg);
  animation: sheen 5.2s cubic-bezier(0.45, 0, 0.2, 1) 1.4s infinite;
  pointer-events: none;
}
@keyframes sheen {
  0%, 64% { transform: translateX(0) skewX(-18deg); }
  100% { transform: translateX(440%) skewX(-18deg); }
}

.btn-dark {
  background: linear-gradient(180deg, #ffffff, #e6e8ee);
  color: #07080b;
  border-color: rgba(255, 255, 255, 0.7);
  box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.12), 0 10px 30px -14px rgba(255, 255, 255, 0.35);
}
.btn-dark:hover { background: #fff; box-shadow: 0 12px 36px -12px rgba(255, 255, 255, 0.45); transform: translateY(-1px); }
.btn-dark:focus-visible { outline-color: var(--cyan); }

.btn-secondary,
.btn-on-dark {
  background: var(--glass);
  color: var(--ink);
  border-color: var(--line-strong);
  box-shadow: var(--inner-hi);
}
.btn-secondary:hover,
.btn-on-dark:hover {
  background: var(--glass-strong);
  border-color: rgba(255, 255, 255, 0.32);
  box-shadow: var(--inner-hi), 0 0 0 1px rgba(69, 216, 240, 0.12), 0 10px 30px -16px var(--cyan-glow);
  transform: translateY(-1px);
}
.btn-google {
  background: var(--glass);
  color: var(--ink);
  border-color: var(--line-strong);
  box-shadow: var(--inner-hi);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
}
.btn-google:hover { border-color: rgba(255, 255, 255, 0.34); background: var(--glass-strong); }
.btn-google svg { flex: none; }

.btn[aria-disabled="true"],
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }
.btn[aria-busy="true"] { opacity: 0.8; cursor: progress; }
.btn[aria-disabled="true"]::after,
.btn:disabled::after,
.btn[aria-busy="true"]::after { display: none; }

.text-link {
  color: var(--ink);
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: rgba(255, 255, 255, 0.35);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: text-decoration-color 0.15s ease, color 0.15s ease;
}
.text-link:hover { color: #fff; text-decoration-color: var(--red-hot); }

.link-button {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink);
  font-size: 15px;
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: rgba(255, 255, 255, 0.35);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  cursor: pointer;
}
.link-button:hover { text-decoration-color: var(--red-hot); }
.link-button[aria-disabled="true"] { color: var(--muted); text-decoration: none; cursor: default; }

/* ---------- Type ---------- */

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  line-height: 1.4;
  text-transform: uppercase;
  color: var(--ink-2);
}
.eyebrow::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 1.5px;
  background: var(--red-hot);
  box-shadow: 0 0 10px 1px var(--red-glow);
  flex: none;
}
/* Pill eyebrow for hero headers */
.eyebrow-pill {
  padding: 6px 14px 6px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  box-shadow: var(--inner-hi);
}

.display {
  margin-top: 20px;
  font-size: clamp(2.4rem, 1.45rem + 4.2vw, 4.75rem);
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -0.045em;
}
/* Hero headlines only: metallic gradient + a faint red bloom. */
.display-hero {
  background: linear-gradient(180deg, #ffffff 0%, #eef0f5 48%, #a7adbb 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 28px rgba(255, 60, 48, 0.16));
  padding-bottom: 0.06em;
}
.glow-text {
  background: linear-gradient(95deg, #ff8a7a 0%, #ff3b2f 42%, #ff6a4e 70%, #ffc2b4 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
.h2 {
  font-size: clamp(2rem, 1.35rem + 2.6vw, 3.25rem);
  line-height: 1.05;
  letter-spacing: -0.038em;
}
.h3 { font-size: 1.25rem; letter-spacing: -0.02em; line-height: 1.25; }
.lede {
  margin-top: 22px;
  max-width: 38em;
  font-size: clamp(1.05rem, 1rem + 0.3vw, 1.2rem);
  line-height: 1.6;
  color: var(--ink-2);
}
.fine { margin-top: 20px; font-size: 14px; color: var(--muted); }
.prose p + p { margin-top: 1em; }
.prose p { color: var(--ink-2); }

/* ---------- Glass surfaces (shared) ---------- */

.cart-block,
.summary-card,
.empty,
.product-panel,
.stat,
.book-card,
.kit,
.kit-item,
.bonus,
.delivery-option,
.purchase,
.unlocked-item,
.receipt-rows,
.addon-card,
.auth-card,
.hero-feature {
  border: 1px solid var(--line);
  background: var(--glass);
  box-shadow: var(--inner-hi), 0 20px 50px -34px rgba(0, 0, 0, 0.9);
}

/* ---------- Sections ---------- */

.section {
  position: relative;
  padding-block: clamp(64px, 9vw, 128px);
  border-top: 1px solid var(--line);
}

.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

/* Home: hero — the agent network fills it; the copy sits on a soft vignette. */
.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  align-items: center;
  min-height: min(860px, calc(100svh - var(--header-h)));
  padding-block: clamp(56px, 9vw, 120px) clamp(64px, 9vw, 120px);
}
.hero > .wrap { position: relative; }
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(60% 70% at 18% 52%, rgba(6, 7, 10, 0.82), rgba(6, 7, 10, 0) 72%),
    linear-gradient(180deg, rgba(6, 7, 10, 0) 70%, var(--bg) 100%);
}
.hero-grid { display: grid; gap: 40px; align-items: end; }
.hero-copy { max-width: 660px; }
.hero-copy .display { font-size: clamp(2.7rem, 1.4rem + 5.2vw, 5.6rem); line-height: 0.98; }
.hero-sub { margin-top: 14px; font-weight: 500; color: var(--ink); }
@media (min-width: 900px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr) auto; gap: 48px; }
}
@media (max-width: 400px) {
  .hero .cta-row .btn { flex: 1 1 auto; padding-inline: 16px; }
}

/* The featured playbook, as a floating glass card over the network. */
.hero-feature {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  width: min(100%, 340px);
  padding: 14px 18px 14px 14px;
  border-radius: 18px;
  background: rgba(12, 14, 20, 0.62);
  -webkit-backdrop-filter: blur(14px) saturate(1.3);
  backdrop-filter: blur(14px) saturate(1.3);
  color: var(--ink);
  text-decoration: none;
  transition: border-color 0.2s ease, transform 0.3s var(--ease), box-shadow 0.3s ease;
}
.hero-feature:hover {
  border-color: rgba(255, 90, 78, 0.45);
  transform: translateY(-3px);
  box-shadow: var(--inner-hi), 0 24px 50px -24px rgba(0, 0, 0, 0.9), 0 0 40px -14px var(--red-glow);
}
.hero-feature .cover { width: 64px; transform: rotate(-4deg); }
.hero-feature-body { display: grid; gap: 3px; min-width: 0; }
.hero-feature-kicker { font-size: 11px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--red-ink); }
.hero-feature-title { font-size: 15px; font-weight: 600; line-height: 1.3; letter-spacing: -0.01em; }
.hero-feature-cta { font-size: 13px; color: var(--ink-2); }
.hero-feature:hover .hero-feature-cta { color: var(--ink); }
@media (min-width: 900px) {
  .hero-feature { margin-bottom: 8px; }
}

/* Network stage: whole hero on wide screens, a band behind the headline on phones. */
.hero-fx {
  position: absolute;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(90deg, rgba(0, 0, 0, 0.35) 0%, rgba(0, 0, 0, 0.45) 34%, #000 62%);
  mask-image: linear-gradient(90deg, rgba(0, 0, 0, 0.35) 0%, rgba(0, 0, 0, 0.45) 34%, #000 62%);
}
.hero-fx-static {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transition: opacity 0.9s ease;
}
.hero-fx.is-fx-ready .hero-fx-static { opacity: 0; }
@media (max-width: 899px) {
  .hero { align-items: flex-end; min-height: 0; padding-top: clamp(150px, 42vw, 240px); }
  .hero-fx {
    bottom: auto;
    height: min(560px, 118vw);
    -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 34%, rgba(0, 0, 0, 0.38) 62%, transparent 100%);
    mask-image: linear-gradient(180deg, #000 0%, #000 34%, rgba(0, 0, 0, 0.38) 62%, transparent 100%);
  }
  .hero::after {
    background:
      linear-gradient(180deg, rgba(6, 7, 10, 0) 20%, rgba(6, 7, 10, 0.72) 48%, rgba(6, 7, 10, 0.4) 100%),
      linear-gradient(180deg, rgba(6, 7, 10, 0) 80%, var(--bg) 100%);
  }
}

/* CSS entrance for hero copy (the page never waits for JS to show it). */
@media (prefers-reduced-motion: no-preference) {
  html:not(.nofx) .hero-copy > *,
  html:not(.nofx) .hero-feature{
    animation: rise-in 0.9s var(--ease) both;
  }
  html:not(.nofx) .hero-copy > :nth-child(2) { animation-delay: 0.06s; }
  html:not(.nofx) .hero-copy > :nth-child(3) { animation-delay: 0.12s; }
  html:not(.nofx) .hero-copy > :nth-child(4) { animation-delay: 0.18s; }
  html:not(.nofx) .hero-copy > :nth-child(n + 5) { animation-delay: 0.24s; }
  html:not(.nofx) .hero-feature { animation-delay: 0.5s; }
  html:not(.nofx) .auth-card,
  html:not(.nofx) .cart-head,
  html:not(.nofx) .learn-head,
  html:not(.nofx) .access-body,
  html:not(.nofx) .legal,
  html:not(.nofx) .about-hero .wrap > * {
    animation: rise-in 0.7s var(--ease) both;
  }
  html:not(.nofx) .cart-grid > * { animation: rise-in 0.7s var(--ease) both; }
  html:not(.nofx) .cart-grid > :nth-child(2) { animation-delay: 0.06s; }
  html:not(.nofx) .cart-grid > :nth-child(3) { animation-delay: 0.12s; }
  html:not(.nofx) .cart-grid > :nth-child(4) { animation-delay: 0.1s; }
}
@keyframes rise-in {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}

/* Home: featured */
.featured-grid { display: grid; gap: 40px; }
@media (min-width: 860px) {
  .featured-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 80px; align-items: center; }
}
.featured-media {
  position: relative;
  display: grid;
  place-items: center;
  padding: clamp(36px, 6vw, 72px);
  border: 1px solid var(--line);
  border-radius: 24px;
  background:
    radial-gradient(60% 50% at 50% 100%, rgba(229, 34, 27, 0.28), transparent 70%),
    radial-gradient(50% 40% at 30% 0%, rgba(69, 216, 240, 0.09), transparent 70%),
    var(--bg-3);
  box-shadow: var(--inner-hi);
  overflow: hidden;
}
.featured-media::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px) 0 0 / 32px 32px,
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px) 0 0 / 32px 32px;
  -webkit-mask-image: radial-gradient(closest-side, #000, transparent);
  mask-image: radial-gradient(closest-side, #000, transparent);
  pointer-events: none;
}
.featured-media .cover { width: min(100%, 300px); transform: rotate(-2deg); box-shadow: var(--shadow-lift), 0 40px 80px -30px rgba(229, 34, 27, 0.45); }
@media (max-width: 859px) {
  .featured-media .cover { width: min(62%, 240px); }
}
.subtitle { margin-top: 12px; font-size: 1.15rem; line-height: 1.45; color: var(--ink-2); }
.featured-copy .prose { margin-top: 24px; }
.dash-list { list-style: none; padding: 0; margin-top: 28px; display: grid; gap: 10px; }
.dash-list li { display: grid; grid-template-columns: 18px 1fr; gap: 12px; align-items: baseline; color: var(--ink-2); }
.dash-list li::before {
  content: "";
  width: 12px;
  height: 2px;
  background: var(--red-hot);
  box-shadow: 0 0 8px var(--red-glow);
  transform: translateY(-4px);
}
.price-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 14px;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
.price { font-size: 2.5rem; font-weight: 600; line-height: 1; letter-spacing: -0.03em; color: var(--ink); font-variant-numeric: tabular-nums; }
.price-note { font-size: 14px; color: var(--muted); }
.featured-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin-top: 24px; }

/* Home: learn */
.section-head { display: grid; gap: 16px; max-width: 760px; }
.learn-grid {
  list-style: none;
  padding: 0;
  margin-top: 48px;
  display: grid;
  gap: 12px;
}
.learn-item {
  position: relative;
  display: grid;
  gap: 10px;
  align-content: start;
  padding: 24px 22px 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--glass);
  box-shadow: var(--inner-hi);
  overflow: hidden;
  transition: border-color 0.2s ease, transform 0.3s var(--ease), box-shadow 0.3s ease;
}
.learn-item::before {
  content: "";
  position: absolute;
  top: 0;
  left: 22px;
  right: 22px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 80, 66, 0.7), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.learn-item:hover { border-color: var(--line-strong); transform: translateY(-3px); box-shadow: var(--inner-hi), 0 24px 50px -30px rgba(0, 0, 0, 0.9); }
.learn-item:hover::before { opacity: 1; }
.learn-num { font-size: 13px; font-weight: 600; letter-spacing: 0.04em; color: var(--red-ink); font-variant-numeric: tabular-nums; }
.learn-title { font-size: 14px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; line-height: 1.4; }
.learn-item p { color: var(--ink-2); }
@media (min-width: 720px) {
  .learn-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
}
@media (min-width: 1040px) {
  .learn-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
}

/* Home: philosophy */
.philosophy {
  background:
    radial-gradient(50% 60% at 100% 100%, rgba(69, 216, 240, 0.07), transparent 70%),
    var(--bg-2);
}
.philosophy-grid { display: grid; gap: 28px; }
@media (min-width: 900px) {
  .philosophy-grid { grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: 80px; align-items: end; }
}
.statement {
  font-size: clamp(2.2rem, 1.35rem + 3.6vw, 4.25rem);
  line-height: 1.04;
  letter-spacing: -0.045em;
}
.statement .quiet { color: var(--muted); }
.steps {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 18px;
  margin-top: 56px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
  font-size: clamp(1rem, 0.85rem + 0.7vw, 1.4rem);
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--ink);
}
.steps .arrow { color: var(--red-hot); letter-spacing: 0; text-shadow: 0 0 12px var(--red-glow); }
.steps-note { margin-top: 12px; color: var(--muted); }

/* Final CTA band */
.final {
  overflow: hidden;
  isolation: isolate;
  border-top: 1px solid var(--line);
  background: var(--bg-2);
}
.final::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(55% 80% at 85% 110%, rgba(229, 34, 27, 0.34), transparent 70%),
    radial-gradient(40% 60% at 0% 0%, rgba(69, 216, 240, 0.08), transparent 70%),
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px) 0 0 / 48px 48px,
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px) 0 0 / 48px 48px;
}
.final .h2 { max-width: 16ch; }
.final .lede { color: var(--ink-2); }

/* ---------- Footer ---------- */

.site-footer {
  position: relative;
  padding-block: 56px 36px;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.015), transparent 60%);
  font-size: 14px;
  color: var(--ink-2);
}
.footer-grid { display: grid; gap: 32px; }
.footer-brand .wordmark { min-height: 44px; }
.lede-flush { margin-top: 0; }
.footer-brand p { margin-top: 10px; max-width: 34ch; color: var(--muted); }
.footer-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
@media (min-width: 800px) {
  .footer-grid { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); }
}
.footer-heading {
  margin-bottom: 4px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
}
.footer-links { list-style: none; padding: 0; display: grid; }
.footer-links a { display: inline-flex; align-items: center; min-height: 40px; text-decoration: none; color: var(--ink-2); transition: color 0.15s ease; }
.footer-links a:hover { color: var(--ink); text-decoration: underline; text-decoration-color: var(--red-hot); text-underline-offset: 3px; }
.footer-legal {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 6px 24px;
  margin-top: 36px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--muted);
}

/* ---------- Covers (light paper objects in the dark) ---------- */

.cover {
  position: relative;
  margin: 0;
  width: 100%;
  aspect-ratio: 2 / 3;
  border-radius: 4px;
  overflow: hidden;
  background: #efebe4;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.07),
    0 2px 4px rgba(0, 0, 0, 0.4),
    0 26px 50px -22px rgba(0, 0, 0, 0.95);
  container-type: inline-size;
}
.cover::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.14) 0, rgba(0, 0, 0, 0.03) 3.5%, rgba(255, 255, 255, 0.1) 5%, transparent 9%),
    linear-gradient(155deg, rgba(255, 255, 255, 0.12), transparent 45%);
}
.cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cover-fallback {
  display: none;
  position: absolute;
  inset: 0;
  flex-direction: column;
  padding: 11% 9% 10% 9%;
  background: var(--paper);
  color: #111;
}
.cover.is-fallback img { display: none; }
.cover.is-fallback .cover-fallback { display: flex; }
.cover-fallback-brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.9em;
  font-size: 11px;
  font-size: clamp(7px, 3.2cqi, 12px);
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #1a1a1a;
}
.cover-fallback-brand::before { content: ""; width: 2.6em; height: 0.24em; background: #d71914; }
.cover-fallback-title {
  margin-top: auto;
  font-size: 22px;
  font-size: clamp(12px, 9.5cqi, 38px);
  font-weight: 600;
  line-height: 1.06;
  letter-spacing: -0.03em;
}
.cover-fallback-rule { width: 22%; height: 2px; margin: 8% 0 5%; background: #d71914; }
.cover-fallback-sub { font-size: 12px; font-size: clamp(7px, 4.2cqi, 14px); line-height: 1.35; color: #555; }

/* ---------- Auth & forms ---------- */

.auth-main {
  position: relative;
  isolation: isolate;
  overflow-x: clip;
  padding-block: clamp(32px, 6vw, 80px) clamp(56px, 8vw, 96px);
}
.auth-main::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: -80px;
  left: 50%;
  width: min(900px, 140vw);
  height: 620px;
  transform: translateX(-50%);
  pointer-events: none;
  background:
    radial-gradient(closest-side at 50% 40%, rgba(229, 34, 27, 0.16), transparent 100%),
    radial-gradient(closest-side at 70% 70%, rgba(69, 216, 240, 0.06), transparent 100%);
}
.auth-card {
  width: 100%;
  max-width: 480px;
  margin-inline: auto;
  padding: clamp(24px, 5vw, 40px);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(20, 23, 32, 0.78), rgba(12, 14, 20, 0.72));
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  border-color: var(--line-strong);
  box-shadow: var(--inner-hi), 0 40px 90px -40px rgba(0, 0, 0, 0.95), 0 0 0 1px rgba(0, 0, 0, 0.4);
}

/* Pages that lay content out without a card keep the plain column. */
.wrap[data-access] > section[data-view="paid"] .auth-card { background: none; }
.auth-title {
  margin-top: 14px;
  font-size: clamp(1.9rem, 1.45rem + 1.7vw, 2.6rem);
  line-height: 1.08;
  letter-spacing: -0.035em;
}
.auth-title:focus { outline: none; }
.auth-lede { margin-top: 12px; color: var(--ink-2); }
.auth-lede strong, .notice strong { color: var(--ink); font-weight: 600; overflow-wrap: anywhere; }
.auth-links { display: grid; gap: 4px; margin-top: 24px; font-size: 15px; color: var(--ink-2); }
.auth-links p { display: flex; flex-wrap: wrap; align-items: center; gap: 0 6px; min-height: 44px; }
.auth-subhead { font-size: 1.25rem; letter-spacing: -0.02em; margin-top: 32px; }
.auth-subhead + p { margin-top: 6px; color: var(--ink-2); }
@media (max-width: 480px) {
  .auth-main .wrap:has(> .auth-card) { padding-inline: 14px; }
}

.form { display: grid; gap: 18px; margin-top: 28px; }
.form > .btn { margin-top: 6px; }
.field { display: grid; gap: 7px; align-content: start; min-width: 0; }
.field > label, .label { font-size: 14px; font-weight: 500; color: var(--ink); }
.input {
  width: 100%;
  min-height: 50px;
  padding: 10px 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: rgba(8, 10, 15, 0.7);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.4);
  color: var(--ink);
  caret-color: var(--cyan);
  font: inherit;
  font-size: 16px; /* prevents iOS zoom */
  line-height: 1.4;
  transition: border-color 0.15s ease, box-shadow 0.2s ease, background-color 0.15s ease;
}
.input::placeholder { color: #7c8293; }
.input:hover { border-color: rgba(255, 255, 255, 0.28); }
.input:focus {
  outline: 2px solid transparent;
  border-color: var(--cyan);
  background: rgba(10, 13, 19, 0.9);
  box-shadow: 0 0 0 3px rgba(69, 216, 240, 0.22), 0 0 24px -6px var(--cyan-glow);
}
.input[aria-invalid="true"] {
  border-color: #ff6a5e;
  box-shadow: 0 0 0 3px rgba(255, 70, 58, 0.16);
}
.input[aria-invalid="true"]:focus { box-shadow: 0 0 0 3px rgba(255, 70, 58, 0.3); }
.input[readonly] { background: rgba(255, 255, 255, 0.03); color: var(--ink-2); border-style: dashed; box-shadow: none; }
.input:-webkit-autofill,
.input:-webkit-autofill:hover,
.input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--ink);
  -webkit-box-shadow: 0 0 0 1000px #0c1017 inset;
  caret-color: var(--cyan);
  transition: background-color 9999s ease 0s;
}
.select {
  -webkit-appearance: none;
  appearance: none;
  padding-right: 34px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23c9cdd6' stroke-width='1.6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  cursor: pointer;
}
.select option { background: #0e1118; color: var(--ink); }
.hint { font-size: 13px; color: var(--muted); }
.field-error {
  display: flex;
  gap: 6px;
  align-items: baseline;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.45;
  color: var(--error-ink);
}
.field-error::before { content: "!"; flex: none; display: inline-grid; place-items: center; width: 16px; height: 16px; border-radius: 50%; background: rgba(255, 90, 78, 0.2); font-size: 11px; font-weight: 700; transform: translateY(2px); }
.field-aside { display: flex; justify-content: flex-end; margin-top: -8px; }
.field-aside a { display: inline-flex; align-items: center; min-height: 44px; font-size: 14px; }

.phone { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px; }
.phone .select { width: auto; min-width: 104px; }

.password { position: relative; }
.password .input { padding-right: 78px; }
.pw-toggle {
  position: absolute;
  top: 3px;
  right: 3px;
  min-width: 64px;
  min-height: 44px;
  padding: 0 12px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.pw-toggle:hover { color: var(--ink); background: var(--surface-2); }

.otp {
  font-size: 26px;
  font-weight: 600;
  letter-spacing: 0.45em;
  text-align: center;
  text-indent: 0.45em;
  font-variant-numeric: tabular-nums;
  min-height: 62px;
}

.form-error, .notice {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  line-height: 1.5;
}
.form-error {
  background: var(--error-bg);
  border: 1px solid var(--error-line);
  color: var(--error-ink);
  box-shadow: 0 0 30px -18px rgba(255, 60, 48, 0.8);
}
.form-error .text-link, .form-error a { color: #ffd2cd; }
.notice { background: var(--surface); border: 1px solid var(--line); color: var(--ink-2); }
.notice-success { background: var(--success-bg); border-color: var(--success-line); color: var(--success); }
.notice-warn { background: var(--warn-bg); border-color: var(--warn-line); color: var(--warn); }
.notice-warn strong, .notice-success strong { color: inherit; }
.notice .text-link { color: inherit; }
.notice-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; }

.divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 20px 0;
  font-size: 13px;
  color: var(--muted);
}
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line-strong); }
.oauth { margin-top: 28px; }
.oauth:not([hidden]) + .form { margin-top: 0; }
.oauth-bottom { margin-top: 0; }

.segmented {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin: 0;
  padding: 4px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.35);
}
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented label {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-2);
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}
.segmented input:checked + label {
  background: var(--surface-hi);
  color: var(--ink);
  font-weight: 600;
  box-shadow: inset 0 0 0 1px var(--line-strong), 0 6px 16px -8px rgba(0, 0, 0, 0.9);
}
.segmented input:focus-visible + label { outline: 2px solid var(--cyan); outline-offset: 1px; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 26px;
  padding: 2px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink-2);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  line-height: 1.2;
  text-transform: uppercase;
  white-space: nowrap;
}
.badge-success { background: var(--success-bg); border-color: var(--success-line); color: var(--success); }
.badge-success::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; box-shadow: 0 0 8px currentColor; }
.badge-dark { background: var(--ink); border-color: var(--ink); color: var(--bg); }

.status-block { display: grid; justify-items: start; gap: 16px; padding-block: 24px; }
.spinner {
  width: 28px;
  height: 28px;
  border: 2px solid var(--line-strong);
  border-top-color: var(--red-hot);
  border-radius: 50%;
  filter: drop-shadow(0 0 6px var(--red-glow));
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.purchase-list { list-style: none; padding: 0; margin-top: 20px; display: grid; gap: 10px; }
.purchase {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 16px;
  align-items: center;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
}
.purchase-name { font-weight: 600; line-height: 1.35; color: var(--ink); }
.purchase-meta { grid-column: 1; font-size: 14px; color: var(--muted); }
.purchase .badge { grid-row: 1 / span 2; grid-column: 2; }

.step-actions { display: flex; flex-wrap: wrap; gap: 4px 20px; margin-top: 16px; }

/* ---------- Access page ---------- */

.access-grid { display: grid; gap: 32px; }
.access-cover { width: min(56%, 220px); }
@media (min-width: 820px) {
  .access-grid { grid-template-columns: 280px minmax(0, 1fr); gap: 64px; align-items: start; }
  .access-cover { width: 100%; position: sticky; top: calc(var(--header-h) + 32px); }
}
.access-cover .cover { box-shadow: var(--shadow-lift), 0 40px 90px -30px rgba(229, 34, 27, 0.5); }
.access-body { max-width: 540px; }
.access-product { margin-top: 10px; font-size: 1.1rem; color: var(--ink-2); }
.access-email { margin-top: 14px; font-size: 15px; color: var(--ink-2); overflow-wrap: anywhere; }
.access-email strong { color: var(--ink); font-weight: 600; }
.access-step { margin-top: 28px; padding-top: 28px; border-top: 1px solid var(--line); }
.access-step > p { color: var(--ink-2); }
.access-step .btn-primary { margin-top: 18px; }

/* ---------- Library ---------- */

.empty {
  margin-top: 36px;
  padding: clamp(28px, 5vw, 48px);
  border-radius: var(--radius);
  display: grid;
  gap: 10px;
  justify-items: start;
}
.empty .btn { margin-top: 12px; }
.banner { margin-top: 28px; }

.product-layout { display: grid; gap: 32px; }
.product-cover { width: min(52%, 220px); }
@media (min-width: 800px) {
  .product-layout { grid-template-columns: 320px minmax(0, 1fr); gap: 64px; align-items: start; }
  .product-cover { width: 100%; }
}
.product-cover .cover { box-shadow: var(--shadow-lift), 0 40px 90px -30px rgba(229, 34, 27, 0.45); }
.product-body { max-width: 620px; display: grid; justify-items: start; }
.product-body .display { font-size: clamp(2rem, 1.4rem + 2.6vw, 3.25rem); margin-top: 14px; }
.product-body .prose { margin-top: 20px; }
.product-read-note { flex-basis: 100%; margin: 0; font-size: 14px; }

.product-panel {
  width: 100%;
  margin-top: 32px;
  padding: 24px;
  border-radius: var(--radius);
  display: grid;
  gap: 8px;
  justify-items: start;
}
.product-panel .btn { margin-top: 10px; }
.back-link { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; font-size: 14px; color: var(--ink-2); text-decoration: none; transition: color 0.15s ease; }
.back-link:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }

.skeleton { background: var(--surface-2); border-radius: 6px; }

/* ---------- About & legal ---------- */

.about-hero { position: relative; padding-block: clamp(56px, 9vw, 128px) clamp(48px, 7vw, 96px); }
.about-hero .display { max-width: 15ch; }
.two-col { display: grid; gap: 28px; }
@media (min-width: 860px) {
  .two-col { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 80px; }
}
.plain-list { list-style: none; padding: 0; display: grid; border-top: 1px solid var(--line); }
.plain-list li {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  font-size: 1.1rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.plain-list li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 10px var(--cyan-glow); flex: none; }
.audience { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; padding: 0; margin-top: 8px; }
.audience li {
  padding: 8px 16px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: 15px;
  color: var(--ink);
  background: var(--glass);
  box-shadow: var(--inner-hi);
}
.big-statement {
  font-size: clamp(2.2rem, 1.2rem + 4.4vw, 5rem);
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -0.035em;
  color: var(--ink);
}
.big-statement span { display: block; }
.big-statement span:nth-child(2) { color: var(--muted); }
.big-statement span:last-child::after { content: "."; color: var(--red-hot); text-shadow: 0 0 20px var(--red-glow); }

.legal { max-width: 760px; }
.legal-meta { margin-top: 12px; font-size: 14px; color: var(--muted); }
.legal .notice { margin-top: 32px; }
.legal-content { margin-top: 40px; color: var(--ink-2); }
.legal-content h2 { margin: 2em 0 0.6em; font-size: 1.35rem; }
.legal-content h3 { margin: 1.6em 0 0.5em; font-size: 1.1rem; }
.legal-content p, .legal-content ul, .legal-content ol { margin: 0 0 1em; }
.legal-content ul, .legal-content ol { padding-left: 1.3em; }
.legal-content li::marker { color: var(--red-ink); }
.legal-content a { color: var(--ink); text-underline-offset: 3px; text-decoration-color: rgba(255, 255, 255, 0.4); }
.legal-content a:hover { text-decoration-color: var(--red-hot); }

/* ---------- Landing page (lp.html) ---------- */

.secure-note { display: flex; gap: 8px; align-items: center; justify-content: center; margin-top: 4px; font-size: 13px; color: var(--muted); text-align: center; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .btn-primary::after, .continue-btn::after { display: none; }
  .featured-media .cover, .hero-feature .cover { transform: none; }
  .spinner { border-right-color: var(--red-hot); }
}
html.nofx .btn-primary::after, html.nofx .continue-btn::after { animation: none; display: none; }

/* ---------- Compact footer & utilities ---------- */

.site-footer-compact { padding-block: 24px 28px; }
.site-footer-compact .footer-legal { margin-top: 8px; padding-top: 14px; }
.footer-inline { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 0 20px; }
.footer-inline a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; color: var(--ink-2); transition: color 0.15s ease; }
.footer-inline a:hover { color: var(--ink); text-decoration: underline; text-decoration-color: var(--red-hot); text-underline-offset: 3px; }
@media (max-width: 480px) {
  .featured-actions .btn { flex: 1 1 100%; }
}
.mt-s { margin-top: 12px; }
.mt-m { margin-top: 20px; }
.mt-l { margin-top: 28px; }
.mt-xl { margin-top: 44px; }

/* ---------- Landing page: funnel sections ---------- */

.price-compare {
  font-size: 1.15rem;
  font-weight: 500;
  color: var(--muted);
  text-decoration: line-through;
  text-decoration-color: rgba(255, 106, 94, 0.8);
  text-decoration-thickness: 1.5px;
  font-variant-numeric: tabular-nums;
}

.levels { margin: 0; padding-left: 1.4em; display: grid; gap: 4px; color: var(--ink); font-weight: 500; }
.levels li::marker { color: var(--red-ink); font-weight: 600; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 26px;
  padding: 2px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink-2);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  line-height: 1.2;
  text-transform: uppercase;
  white-space: nowrap;
}
.chip-proven::before, .chip-emerging::before, .chip-frontier::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 8px currentColor; }
.chip-proven { color: var(--success); border-color: var(--success-line); background: var(--success-bg); }
.chip-emerging { color: var(--warn); border-color: var(--warn-line); background: var(--warn-bg); }
.chip-frontier { color: var(--error-ink); border-color: var(--error-line); background: var(--error-bg); }

/* Book pages stay paper: light, with their own ink. */

.flow { list-style: none; padding: 0; margin: -4px 0 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 13px; line-height: 1.3; color: var(--ink); }
.flow li { padding: 4px 8px; border: 1px solid var(--line-strong); border-radius: 4px; background: #f6f3ee; }

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 1px 7px;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink-2);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  line-height: 1.3;
  text-transform: uppercase;
  white-space: nowrap;
}
/* Credibility */

/* Final CTA */

/* ---------- Access page: unlocked, bonus, delivery choice ---------- */

@media (max-width: 819px) { .access-cover { width: min(40%, 160px); } }
.section-label { font-size: 12px; font-weight: 600; letter-spacing: 0.14em; line-height: 1.4; text-transform: uppercase; color: var(--ink-2); }
.unlocked { margin-top: 28px; }
.unlocked-list { list-style: none; padding: 0; margin-top: 12px; display: grid; gap: 8px; }
.unlocked-item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 12px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
}
.unlocked-name { font-weight: 600; line-height: 1.35; color: var(--ink); }
.item-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.item-tags:empty { display: none; }
.unlocked-meta { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.unlocked-detail { flex-basis: 100%; font-size: 14px; color: var(--ink-2); overflow-wrap: anywhere; }
.unlocked-detail strong { color: var(--ink); font-weight: 600; }
.access-addons { margin-top: 6px; font-size: 15px; color: var(--ink-2); }
.access-addons strong { color: var(--ink); font-weight: 600; }
.card-status { font-size: 14px; font-weight: 600; color: var(--success); }
.card-status-ended { color: var(--muted); }
.product-period { font-size: 15px; font-weight: 600; color: var(--ink-2); }

.bonus {
  position: relative;
  display: grid;
  gap: 12px;
  margin-top: 28px;
  padding: clamp(18px, 4vw, 26px);
  border-radius: var(--radius);
  background:
    radial-gradient(70% 90% at 100% 0%, rgba(229, 34, 27, 0.16), transparent 70%),
    var(--glass);
  border-color: rgba(255, 90, 78, 0.28);
}
.bonus-flag {
  justify-self: start;
  padding: 3px 9px;
  border-radius: 5px;
  background: linear-gradient(180deg, #ec2b22, #b9130e);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  box-shadow: 0 0 16px -4px var(--red-glow);
}
.bonus-title { font-size: 1.2rem; line-height: 1.3; letter-spacing: -0.015em; }
.bonus-meta { display: grid; gap: 4px; margin: 0; font-size: 15px; }
.bonus-meta div { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 12px; }
.bonus-meta dt { color: var(--muted); }
.bonus-meta dd { margin: 0; font-weight: 500; color: var(--ink); }
.bonus-desc { font-size: 15px; color: var(--ink-2); }
.bonus-price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; font-size: 15px; color: var(--ink-2); }
.bonus-price strong { font-size: 1.1rem; color: var(--ink); }
.bonus .btn { justify-self: start; }
@media (max-width: 480px) { .bonus .btn { justify-self: stretch; } }

.delivery { display: grid; gap: 12px; margin-top: 18px; }
.delivery-option {
  display: grid;
  gap: 6px;
  justify-items: start;
  width: 100%;
  padding: 18px;
  border-radius: var(--radius);
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.25s ease, transform 0.3s var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.delivery-option:hover { border-color: rgba(255, 255, 255, 0.3); transform: translateY(-2px); }
.delivery-primary {
  gap: 8px;
  padding: clamp(20px, 4vw, 26px);
  border: 1px solid rgba(255, 90, 78, 0.45);
  background:
    radial-gradient(80% 100% at 100% 0%, rgba(229, 34, 27, 0.18), transparent 70%),
    var(--glass-strong);
  box-shadow: var(--inner-hi), 0 0 0 1px rgba(229, 34, 27, 0.2), 0 30px 60px -30px rgba(229, 34, 27, 0.5);
}
.delivery-primary:hover { border-color: rgba(255, 110, 98, 0.7); box-shadow: var(--inner-hi), 0 0 0 1px rgba(229, 34, 27, 0.3), 0 30px 70px -26px rgba(229, 34, 27, 0.65); }

.delivery-title { font-size: 1.1rem; font-weight: 600; line-height: 1.25; letter-spacing: -0.015em; color: var(--ink); }
.delivery-primary .delivery-title { font-size: 1.4rem; }
.delivery-text { font-size: 15px; line-height: 1.5; color: var(--ink-2); }
.delivery-features { display: flex; flex-wrap: wrap; gap: 6px; }
.delivery-features span { padding: 2px 10px; border: 1px solid rgba(69, 216, 240, 0.3); border-radius: 999px; background: rgba(69, 216, 240, 0.06); font-size: 12px; font-weight: 600; color: var(--cyan-ink); }
.access-step .delivery-cta { margin-top: 10px; pointer-events: none; }
.choice-note { display: flex; flex-wrap: wrap; align-items: center; gap: 0 10px; margin-top: 10px; font-size: 14px; color: var(--muted) !important; }
.choice-note .link-button { min-height: 36px; font-size: 14px; }

/* ---------- Library & product actions ---------- */

.card-title-link { text-decoration: none; }
.card-title-link:hover { text-decoration: underline; text-decoration-color: var(--red-hot); text-underline-offset: 3px; }

/* ---------- Prices: "+ GST" ---------- */

.price-tax { font-size: 0.95rem; font-weight: 500; letter-spacing: 0; color: var(--muted); white-space: nowrap; }
.cart-tax, .kit-tax { font-size: 13px; font-weight: 500; letter-spacing: 0; color: var(--muted); white-space: nowrap; }
.price-group { display: inline-flex; align-items: baseline; gap: 8px; }

/* Small CSS envelope mark (newsletter). */
.envelope {
  position: relative;
  display: inline-block;
  width: 24px;
  height: 17px;
  border: 1.5px solid currentColor;
  border-radius: 2px;
  overflow: hidden;
}
.envelope::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -10px;
  width: 16px;
  height: 16px;
  border: 1.5px solid currentColor;
  transform: translateX(-50%) rotate(45deg);
}

/* ---------- Cart (checkout.html) ---------- */

.cart-main { position: relative; isolation: isolate; overflow-x: clip; padding-block: clamp(16px, 3vw, 40px) clamp(56px, 8vw, 96px); }
.cart-main::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: -60px;
  right: 0;
  width: min(760px, 100%);
  height: 560px;
  pointer-events: none;
  background: radial-gradient(closest-side, rgba(229, 34, 27, 0.14), transparent);
}
.cart-head { display: grid; gap: 8px; justify-items: start; }
.cart-head .back-link { margin-bottom: 6px; }
.cart-title { font-size: clamp(2.3rem, 1.7rem + 2.4vw, 3.6rem); line-height: 1; letter-spacing: -0.045em; }
.cart-lede { max-width: 56ch; font-size: 15px; color: var(--ink-2); }

.cart-grid { display: grid; gap: 14px; margin-top: 24px; align-items: start; }
.cart-block, .cart-summary { min-width: 0; }
@media (min-width: 960px) {
  .cart-grid { grid-template-columns: minmax(0, 1fr) 380px; gap: 18px 44px; margin-top: 32px; }
  .cart-block { grid-column: 1; }
  .cart-summary { grid-column: 2; grid-row: 1 / span 3; position: sticky; top: calc(var(--header-h) + 24px); }
}
@media (min-width: 1100px) { .cart-grid { grid-template-columns: minmax(0, 1fr) 400px; gap: 20px 64px; } }

.cart-block {
  padding: clamp(18px, 3.5vw, 28px);
  border-radius: 20px;
}
.cart-block-title { font-size: 12px; font-weight: 600; letter-spacing: 0.16em; line-height: 1.4; text-transform: uppercase; color: var(--ink-2); }
.cart-block-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 16px; }
.cart-block-note { font-size: 14px; color: var(--muted); }

.cart-item { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 4px 18px; margin-top: 18px; align-items: start; }
.cart-item-cover { grid-row: 1 / span 2; }
.cart-item-cover .cover { width: 76px; box-shadow: var(--shadow-lift), 0 20px 40px -20px rgba(229, 34, 27, 0.5); }
.cart-item-body { display: grid; gap: 4px; min-width: 0; }
.cart-item-kicker, .addon-kicker { font-size: 11px; font-weight: 600; letter-spacing: 0.16em; line-height: 1.4; text-transform: uppercase; color: var(--red-ink); }
.cart-item-name { font-size: 1.2rem; font-weight: 600; line-height: 1.25; letter-spacing: -0.02em; color: var(--ink); }
.cart-item-sub { font-size: 14px; line-height: 1.45; color: var(--ink-2); }
.cart-item-facts { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 2px 14px; margin-top: 4px; font-size: 13px; color: var(--muted); }
.cart-item-facts li { display: inline-flex; align-items: center; gap: 7px; }
.cart-item-facts li::before { content: ""; width: 4px; height: 4px; border-radius: 50%; background: var(--cyan); flex: none; }
.cart-item-price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; margin-top: 8px; }
.cart-item-price strong, .addon-price strong {
  font-size: 1.7rem;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
@media (min-width: 560px) {
  .cart-item { grid-template-columns: 92px minmax(0, 1fr) auto; }
  .cart-item-cover .cover { width: 92px; }
  .cart-item-price { grid-column: 3; grid-row: 1; margin-top: 2px; flex-direction: column; align-items: flex-end; }
}

/* Add-on cards */
.addon-list { display: grid; gap: 14px; margin-top: 16px; }
.addon-card {
  position: relative;
  display: grid;
  gap: 16px;
  padding: clamp(16px, 3vw, 22px);
  border-radius: 16px;
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.02);
  transition: border-color 0.2s ease, box-shadow 0.3s ease, background-color 0.2s ease;
}
.addon-card:hover { border-color: rgba(255, 255, 255, 0.26); }
.addon-card.is-selected {
  border-color: rgba(255, 90, 78, 0.75);
  background:
    radial-gradient(80% 100% at 100% 0%, rgba(229, 34, 27, 0.14), transparent 70%),
    rgba(255, 255, 255, 0.04);
  box-shadow: var(--inner-hi), 0 0 0 1px rgba(229, 34, 27, 0.35), 0 24px 60px -30px rgba(229, 34, 27, 0.6);
}
.addon-head { display: flex; gap: 16px; align-items: flex-start; }
.addon-cover { flex: none; width: 60px; }
.addon-cover .cover-fallback { padding: 10% 9%; }
.addon-cover .cover-fallback-brand, .addon-cover .cover-fallback-rule { display: none; }
.addon-heading { display: grid; gap: 4px; min-width: 0; }
.addon-name { font-size: 1.2rem; line-height: 1.2; letter-spacing: -0.02em; }
.addon-sub { font-size: 14px; font-weight: 600; color: var(--ink); }
.addon-desc { font-size: 14px; line-height: 1.5; color: var(--ink-2); }
.addon-includes { padding-top: 2px; border-top: 1px solid var(--line); }
.addon-titles { list-style: none; padding: 0; margin: 0; }
.addon-titles li {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  gap: 4px 8px;
  align-items: baseline;
  padding: 9px 0;
  border-bottom: 1px dashed var(--line-strong);
  font-size: 15px;
  line-height: 1.35;
}
.addon-title-num { font-size: 12px; font-weight: 600; color: var(--red-ink); font-variant-numeric: tabular-nums; }
.addon-title-name { font-weight: 500; color: var(--ink); }
.addon-title-tags { grid-column: 2; display: flex; flex-wrap: wrap; gap: 6px; }
@media (min-width: 560px) {
  .addon-titles li { grid-template-columns: 26px minmax(0, 1fr) auto; }
  .addon-title-tags { grid-column: 3; }
}
.addon-foot { margin-top: 10px; font-size: 13px; color: var(--muted); }
.addon-action { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding-top: 14px; border-top: 1px solid var(--line); }
.addon-price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; }
.addon-price .price-compare { font-size: 1rem; }
.addon-toggle {
  min-width: 168px;
  background: var(--glass);
  color: var(--ink);
  border-color: var(--line-strong);
  box-shadow: var(--inner-hi);
}
.addon-toggle:hover { border-color: rgba(255, 255, 255, 0.4); background: var(--glass-strong); transform: translateY(-1px); }
.addon-toggle[aria-pressed="true"] {
  background: rgba(229, 34, 27, 0.16);
  border-color: rgba(255, 90, 78, 0.7);
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255, 90, 78, 0.2), 0 0 24px -8px var(--red-glow);
}
.addon-toggle[aria-pressed="true"]:hover { background: rgba(229, 34, 27, 0.24); }
@media (max-width: 420px) { .addon-toggle { flex: 1 1 100%; } }

/* Details */
.cart-fields { display: grid; gap: 16px; margin-top: 16px; }
@media (min-width: 640px) {
  .cart-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cart-fields .field-wide { grid-column: 1 / -1; }
}

/* Summary */
.summary-card {
  position: relative;
  display: grid;
  gap: 16px;
  padding: clamp(20px, 3.5vw, 28px);
  border-radius: 20px;
  border-color: var(--line-strong);
  background:
    radial-gradient(90% 60% at 50% 0%, rgba(229, 34, 27, 0.12), transparent 70%),
    linear-gradient(180deg, rgba(22, 26, 36, 0.9), rgba(12, 14, 20, 0.9));
  box-shadow: var(--inner-hi), 0 40px 80px -40px rgba(0, 0, 0, 0.95);
}
.summary-card::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 24px;
  right: 24px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 90, 78, 0.9), transparent);
}
.summary-card > .btn { margin-top: 2px; }
.summary-lines { list-style: none; padding: 0; display: grid; gap: 10px; }
.summary-lines li { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; font-size: 15px; line-height: 1.35; }
.summary-name { color: var(--ink-2); }
.summary-price { font-weight: 600; white-space: nowrap; color: var(--ink); font-variant-numeric: tabular-nums; }
.summary-totals { display: grid; gap: 8px; margin: 0; padding-top: 14px; border-top: 1px solid var(--line); }
.summary-totals div { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; font-size: 15px; }
.summary-totals dt { color: var(--ink-2); }
.summary-totals dd { margin: 0; color: var(--ink); font-variant-numeric: tabular-nums; }
.summary-totals .summary-total { margin-top: 6px; padding-top: 14px; border-top: 1px solid var(--line-strong); }
.summary-total dt { font-weight: 600; color: var(--ink); }
.summary-total dd { font-size: 2.2rem; font-weight: 600; line-height: 1; letter-spacing: -0.035em; color: #fff; }
.summary-assure { list-style: none; padding: 14px 0 0; border-top: 1px solid var(--line); display: grid; gap: 6px; font-size: 13px; color: var(--muted); }
.summary-assure li { display: grid; grid-template-columns: 14px minmax(0, 1fr); gap: 8px; align-items: baseline; }
.summary-assure li::before { content: "\2713"; font-weight: 700; color: var(--success); }
.notice.is-pulsed { animation: note-pulse 1s ease; }
@keyframes note-pulse {
  0% { box-shadow: 0 0 0 0 rgba(245, 184, 70, 0.55); }
  100% { box-shadow: 0 0 0 12px rgba(245, 184, 70, 0); }
}

/* Mobile pay bar */
.paybar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  padding: 10px var(--gutter) calc(10px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line-strong);
  background: rgba(8, 10, 14, 0.86);
  -webkit-backdrop-filter: saturate(1.5) blur(16px);
  backdrop-filter: saturate(1.5) blur(16px);
  box-shadow: 0 -20px 40px -24px rgba(0, 0, 0, 0.95);
  transition: transform 0.25s ease;
}
.paybar.is-away { transform: translateY(110%); }
.paybar-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; max-width: 640px; margin-inline: auto; }
.paybar-total { display: grid; line-height: 1.2; min-width: 0; }
.paybar-label { font-size: 12px; color: var(--muted); }
.paybar-total strong { font-size: 1.4rem; font-weight: 600; letter-spacing: -0.025em; color: #fff; font-variant-numeric: tabular-nums; }
.paybar .btn { flex: none; min-height: 50px; padding-inline: 20px; }
@media (max-width: 959px) {
  .cart-page { padding-bottom: calc(72px + env(safe-area-inset-bottom)); }
}
@media (min-width: 960px) {
  .paybar { display: none !important; }
}

/* ---------- "Make it a complete kit" strip (home, product) ---------- */

.kit { width: 100%; margin-top: 28px; padding: clamp(16px, 3vw, 20px); border-radius: var(--radius); }
.kit-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 12px; }
.kit-title { font-size: 12px; font-weight: 600; letter-spacing: 0.16em; line-height: 1.4; text-transform: uppercase; color: var(--red-ink); }
.kit-note { font-size: 13px; color: var(--muted); }
.kit-list { list-style: none; padding: 0; margin-top: 12px; display: grid; gap: 10px; }
@media (min-width: 600px) { .kit-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.product-panel .kit-list { grid-template-columns: 1fr; }
.kit-item {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 8px 14px;
  height: 100%;
  padding: 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.025);
  color: var(--ink);
  text-decoration: none;
  transition: border-color 0.2s ease, box-shadow 0.25s ease, transform 0.3s var(--ease);
}
.kit-item:hover { border-color: rgba(255, 90, 78, 0.5); box-shadow: var(--inner-hi), 0 20px 40px -24px rgba(229, 34, 27, 0.55); transform: translateY(-2px); }
.kit-mark {
  grid-row: 1 / span 3;
  display: grid;
  place-items: center;
  width: 44px;
  height: 58px;
  border-radius: 3px;
  background: var(--paper);
  color: #111;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
  box-shadow: inset 3px 0 0 #d71914, 0 10px 20px -10px rgba(0, 0, 0, 0.9);
}
.kit-item-newsletter .kit-mark { background: rgba(69, 216, 240, 0.08); color: var(--cyan-ink); border: 1px solid rgba(69, 216, 240, 0.35); box-shadow: 0 0 20px -8px var(--cyan-glow); }
.kit-copy { display: grid; gap: 2px; min-width: 0; }
.kit-name { font-weight: 600; line-height: 1.3; letter-spacing: -0.01em; }
.kit-sub { font-size: 13px; line-height: 1.4; color: var(--muted); }
.kit-price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 6px; }
.kit-price strong { font-size: 1.2rem; font-weight: 600; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.kit-price .price-compare { font-size: 0.9rem; }
.kit-cta { align-self: end; font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--red-ink); }

/* ---------- Landing page: "Complete your AI toolkit" ---------- */

/* The bundle: five light books fanned like a hand of cards (GSAP spreads them). */

/* The newsletter: an inbox preview (paper) */

/* Access page: payment breakdown */
.receipt { margin-top: 24px; }
.receipt-rows { display: grid; gap: 6px; margin: 12px 0 0; padding: 14px 16px; border-radius: var(--radius-sm); }
.receipt-rows div { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; font-size: 15px; }
.receipt-rows dt { color: var(--ink-2); }
.receipt-rows dd { margin: 0; color: var(--ink); font-variant-numeric: tabular-nums; }
.receipt-rows .receipt-total { margin-top: 4px; padding-top: 10px; border-top: 1px solid var(--line); }
.receipt-total dt { font-weight: 600; color: var(--ink); }
.receipt-total dd { font-size: 1.25rem; font-weight: 600; letter-spacing: -0.02em; }

/* Cart add-on polish: stacked bundle cover, selected badge */
.addon-card.is-selected::before {
  content: "\2713";
  position: absolute;
  top: -11px;
  right: 18px;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: linear-gradient(180deg, #ff3b2f, #c2150f);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 0 0 3px var(--bg), 0 0 18px var(--red-glow);
}
.addon-cover { position: relative; width: 64px; isolation: isolate; }
.addon-card-bundle .addon-cover { margin: 4px 10px 0 0; }
.addon-card-bundle .addon-cover::before,
.addon-card-bundle .addon-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: 4px;
  background: #d9d3c8;
  box-shadow: 0 8px 18px -10px rgba(0, 0, 0, 0.9);
}
.addon-card-bundle .addon-cover::before { transform: translate(5px, -3px) rotate(4deg); }
.addon-card-bundle .addon-cover::after { transform: translate(10px, -5px) rotate(8deg); background: #bfb8ab; z-index: -2; }
@media (min-width: 560px) { .addon-cover { width: 72px; } }
.cart-title:focus { outline: none; }

/* ---------- My learning (library dashboard) ---------- */

.learn-main { padding-block: clamp(28px, 5vw, 64px) clamp(56px, 8vw, 96px); }
.learn-head { display: grid; gap: 10px; max-width: 720px; }
.mylearn-title { font-size: clamp(2.1rem, 1.35rem + 2.8vw, 3.5rem); line-height: 1.02; letter-spacing: -0.04em; }
.mylearn-title:focus { outline: none; }
.learn-lede { color: var(--ink-2); font-size: 1.05rem; }

.learn-stats {
  list-style: none;
  padding: 0;
  margin-top: 28px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
@media (min-width: 760px) { .learn-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-top: 36px; } }
.stat {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  padding: 18px 18px;
  border-radius: var(--radius);
  overflow: hidden;
}
.stat::after {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  top: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(69, 216, 240, 0.5), transparent);
  opacity: 0.6;
}
.stat-ring::after { background: linear-gradient(90deg, transparent, rgba(255, 90, 78, 0.8), transparent); }
.stat-body { display: grid; gap: 2px; min-width: 0; }
.stat-num { font-size: clamp(1.7rem, 1.3rem + 1.1vw, 2.3rem); font-weight: 600; line-height: 1.05; letter-spacing: -0.03em; color: var(--ink); font-variant-numeric: tabular-nums; }
.stat-label { font-size: 13px; font-weight: 500; color: var(--muted); }
.ring {
  --p: 0;
  position: relative;
  flex: none;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: conic-gradient(from -90deg, #ff6a4e, var(--red-hot) calc(var(--p) * 1%), rgba(255, 255, 255, 0.09) 0);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 6px), #000 calc(100% - 5px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 6px), #000 calc(100% - 5px));
  filter: drop-shadow(0 0 6px rgba(255, 50, 38, 0.6));
}
@media (max-width: 380px) { .ring { width: 40px; height: 40px; } .stat { padding: 14px; gap: 10px; } }

.meter {
  position: relative;
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.4);
  overflow: hidden;
}
.meter > span {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #b9130e, var(--red-hot) 70%, #ff8a6e);
  box-shadow: 0 0 12px rgba(255, 50, 38, 0.7);
  transition: width 0.4s ease;
}
.meter-lg { height: 8px; }
.meter-label { font-size: 13px; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.meter-label .muted { font-weight: 500; }

.continue {
  position: relative;
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  margin-top: 16px;
  padding: clamp(18px, 3.4vw, 34px);
  border: 1px solid rgba(255, 90, 78, 0.3);
  border-radius: 22px;
  background:
    radial-gradient(60% 120% at 0% 50%, rgba(229, 34, 27, 0.22), transparent 70%),
    radial-gradient(40% 80% at 100% 0%, rgba(69, 216, 240, 0.08), transparent 70%),
    linear-gradient(180deg, rgba(22, 26, 36, 0.9), rgba(10, 12, 17, 0.9));
  color: var(--ink);
  box-shadow: var(--inner-hi), 0 40px 80px -40px rgba(0, 0, 0, 0.95), 0 0 60px -30px rgba(229, 34, 27, 0.5);
  overflow: hidden;
}
@media (min-width: 700px) { .continue { grid-template-columns: 124px minmax(0, 1fr); gap: 32px; } }
.continue-cover { display: block; }
.continue-cover .cover { box-shadow: var(--shadow-lift), 0 24px 50px -20px rgba(229, 34, 27, 0.6); transition: transform 0.4s var(--ease); }
.continue-cover:hover .cover { transform: translateY(-3px) rotate(-1deg); }
.continue-body { display: grid; gap: 10px; justify-items: start; min-width: 0; }
.continue-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.continue-kicker::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--red-hot); box-shadow: 0 0 10px var(--red-glow); }
.continue-title { font-size: clamp(1.25rem, 1rem + 1.2vw, 1.95rem); line-height: 1.15; letter-spacing: -0.025em; overflow-wrap: anywhere; }
.continue-progress { display: grid; gap: 6px; width: min(100%, 460px); }
.continue-btn { margin-top: 4px; }
@media (max-width: 480px) {
  .continue { grid-template-columns: 64px minmax(0, 1fr); gap: 16px; align-items: start; }
  .continue-title { font-size: 1.15rem; }
  .continue-btn { justify-self: stretch; width: 100%; }
}

.shelf { margin-top: clamp(36px, 6vw, 60px); }
.shelf-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.shelf-title { font-size: clamp(1.25rem, 1.1rem + 0.6vw, 1.6rem); letter-spacing: -0.025em; line-height: 1.2; }
.shelf-meta { font-size: 12px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }

.book-grid {
  list-style: none;
  padding: 0;
  margin-top: 20px;
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 236px), 1fr));
}
.book-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
  padding: 12px 12px 18px;
  border-radius: 18px;
  transition: border-color 0.2s ease, box-shadow 0.3s ease, transform 0.35s var(--ease);
}
.book-card:hover {
  border-color: var(--line-strong);
  transform: translateY(-4px);
  box-shadow: var(--inner-hi), 0 30px 60px -30px rgba(0, 0, 0, 0.95), 0 0 40px -24px var(--red-glow);
}
.book-cover {
  position: relative;
  display: grid;
  place-items: center;
  padding: 24px 0 26px;
  border-radius: 12px;
  background:
    radial-gradient(60% 55% at 50% 100%, rgba(229, 34, 27, 0.26), transparent 70%),
    radial-gradient(50% 50% at 50% 0%, rgba(69, 216, 240, 0.06), transparent 70%),
    #07080c;
  box-shadow: inset 0 0 0 1px var(--line);
  overflow: hidden;
}
.book-cover .cover { width: 56%; transition: transform 0.4s var(--ease); }
.book-card:hover .book-cover .cover { transform: translateY(-4px) rotate(-1.5deg); }
.book-body { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; flex: 1; min-width: 0; padding-inline: 6px; }
.book-title { font-size: 1.05rem; line-height: 1.3; letter-spacing: -0.015em; overflow-wrap: anywhere; }
.book-sub {
  font-size: 14px;
  line-height: 1.45;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.book-progress { display: grid; gap: 6px; width: 100%; margin-top: 2px; }
.book-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; margin-top: auto; padding-top: 8px; }
.book-btn { min-width: 112px; }
.btn.is-disabled { opacity: 0.55; cursor: not-allowed; pointer-events: none; }
.book-card.is-soon .cover { filter: grayscale(0.7) brightness(0.8); }

.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 24px;
  padding: 2px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--ink-2);
  white-space: nowrap;
}
.status-chip-progress { color: var(--warn); border-color: var(--warn-line); background: var(--warn-bg); }
.status-chip-progress::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; box-shadow: 0 0 8px currentColor; }
.status-chip-done { color: var(--success); border-color: var(--success-line); background: var(--success-bg); }
.status-chip-soon { color: var(--muted); border-style: dashed; background: transparent; }

@media (max-width: 560px) {
  .book-grid { gap: 12px; margin-top: 14px; }
  .book-card { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 16px; padding: 12px; align-items: start; }
  .book-cover { padding: 14px 0; }
  .book-cover .cover { width: 70%; }
  .book-body { padding-inline: 0; }
  .book-actions { padding-top: 4px; }
  .book-btn { min-width: 0; }
}

/* ---------- Book page viewer (chrome is dark; the page stays white paper) ---------- */

.viewer-main {
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(60% 40% at 50% 0%, rgba(69, 216, 240, 0.05), transparent 70%),
    #050608;
}
.viewer-bar {
  position: sticky;
  top: var(--header-h);
  z-index: 40;
  background: rgba(8, 10, 14, 0.82);
  -webkit-backdrop-filter: saturate(1.5) blur(16px);
  backdrop-filter: saturate(1.5) blur(16px);
  border-bottom: 1px solid var(--line);
}
.viewer-bar-inner { display: flex; align-items: center; gap: 8px 16px; min-height: 58px; padding-block: 6px; }
.viewer-bar .back-link { flex: none; white-space: nowrap; }
.viewer-heading { flex: 1; min-width: 0; display: grid; gap: 0; }
.viewer-title {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.viewer-count { font-size: 12px; font-weight: 500; color: var(--muted); font-variant-numeric: tabular-nums; }
.viewer-bar .status-chip { flex: none; }
.viewer-line { height: 2px; background: rgba(255, 255, 255, 0.06); }
.viewer-line > span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #b9130e, var(--red-hot)); box-shadow: 0 0 10px rgba(255, 50, 38, 0.8); transition: width 0.3s ease; }
@media (max-width: 560px) {
  .viewer-bar .back-link .back-text { display: none; }
  .viewer-bar .back-link { min-width: 44px; justify-content: center; font-size: 18px; }
}

.viewer-stage {
  flex: 1;
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 20px;
  padding-block: clamp(14px, 3vw, 36px) 28px;
  touch-action: pan-y pinch-zoom;
}
.viewer-page {
  position: relative;
  display: grid;
  justify-items: center;
  width: 100%;
  max-width: 880px;
  min-height: 240px;
}
/* Fixed-aspect sheet of white paper; --page-ratio (width / height) comes from the API. */
.viewer-frame {
  --page-ratio: 0.773;
  position: relative;
  width: 100%;
  aspect-ratio: var(--page-ratio);
  overflow: hidden;
  background: #fff;
  border-radius: 3px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 40px 90px -30px rgba(0, 0, 0, 0.95), 0 0 80px -40px rgba(69, 216, 240, 0.25);
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}
/* Fit page: the whole sheet fits between the bars (--fit-h is measured in JS). */
.viewer-page.is-fit-page .viewer-frame { width: min(100%, calc(var(--fit-h, 80vh) * var(--page-ratio))); }
.viewer-sheet, .viewer-sheet img, .viewer-mark, .viewer-loading, .viewer-page-error { position: absolute; inset: 0; }
.viewer-sheet img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  -webkit-user-drag: none;
  -webkit-user-select: none;
  user-select: none;
  pointer-events: none;
}
.viewer-mark { width: 100%; height: 100%; pointer-events: none; }
.viewer-loading { display: grid; place-items: center; background: rgba(255, 255, 255, 0.35); pointer-events: none; }
.viewer-page-error { display: grid; place-content: center; justify-items: center; gap: 12px; padding: 24px; background: #fff; color: #333; text-align: center; }
.viewer-fit { flex: none; min-width: 96px; }
.viewer-count { white-space: nowrap; }
@media (max-width: 560px) {
  .viewer-fit { min-width: 0; padding-inline: 12px; font-size: 12px; }
}
/* Small phones: the end-of-book card below the page carries "Completed ✓". */
@media (max-width: 420px) {
  .viewer-bar .status-chip { display: none; }
}
.viewer-page .status-block { justify-items: center; padding-block: 64px; }

.viewer-done {
  width: 100%;
  max-width: 880px;
  display: grid;
  gap: 8px;
  justify-items: start;
  padding: clamp(20px, 4vw, 32px);
  border: 1px solid var(--success-line);
  border-radius: var(--radius);
  background:
    radial-gradient(60% 100% at 0% 0%, rgba(52, 211, 153, 0.12), transparent 70%),
    var(--glass);
  color: var(--success);
}
.viewer-done h2 { font-size: 1.3rem; letter-spacing: -0.02em; }
.viewer-done p { color: var(--ink-2); }
.viewer-done .btn { margin-top: 6px; }

.viewer-controls {
  position: sticky;
  bottom: 0;
  z-index: 40;
  background: rgba(8, 10, 14, 0.86);
  -webkit-backdrop-filter: saturate(1.5) blur(16px);
  backdrop-filter: saturate(1.5) blur(16px);
  border-top: 1px solid var(--line-strong);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.viewer-controls-inner { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 66px; max-width: 880px; margin-inline: auto; }
.viewer-nav { min-width: 104px; }
.viewer-jump { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); font-variant-numeric: tabular-nums; }
.viewer-jump .input { width: 4.4em; min-height: 44px; padding: 6px 8px; text-align: center; font-variant-numeric: tabular-nums; -moz-appearance: textfield; appearance: textfield; }
.viewer-jump .input::-webkit-outer-spin-button,
.viewer-jump .input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
@media (max-width: 420px) {
  .viewer-nav { min-width: 0; padding-inline: 14px; }
  .viewer-nav .nav-word { display: none; }
}
.viewer-message { width: 100%; max-width: 560px; margin-top: 0; }

/* The viewer is for reading on screen only. */
@media print {
  html.is-viewer body { display: none !important; }
  html.is-viewer::after {
    content: "Printing isn’t available for this book. Read it in your Sonnet Skills library.";
    display: block;
    padding: 48px;
    font: 16px/1.5 Helvetica, Arial, sans-serif;
    color: #000;
    background: #fff;
  }
}

/* ---------- Unsubscribe ---------- */

.unsub-email { overflow-wrap: anywhere; }
.unsub-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; margin-top: 24px; }
.unsub-note { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); }

/* ---------- Motion & 3D heroes (site/fx) ---------- */
/* Nothing here hides content: start states for scroll reveals are set from JS only. */

.fx-word { display: inline-block; }
.fx-canvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  opacity: 0;
  pointer-events: none;
  transition: opacity 1.1s ease;
}
.is-fx-ready > .fx-canvas { opacity: 1; }

/* Landing page: book stack. Fixed-aspect stage; the floating cover is the static fallback. */

/* Headings focused by script (for screen readers) don't need a visible ring. */
h1[tabindex="-1"]:focus,
h2[tabindex="-1"]:focus { outline: none; }

/* AI Weekly issue archive (/newsletter) */
.issues { display: grid; gap: 24px; grid-template-columns: minmax(0, 280px) minmax(0, 1fr); align-items: start; margin-top: 24px; }
.issue-list { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.issue-link { display: grid; gap: 2px; width: 100%; padding: 12px 14px; text-align: left; border: 1px solid var(--line); border-radius: 12px; background: transparent; color: inherit; cursor: pointer; font: inherit; }
.issue-link[aria-current] { border-color: var(--ink); }
.issue-link-title { font-weight: 600; }
.issue-reader { min-width: 0; }
.issue-title { margin: 0 0 4px; }
.issue-date { margin: 0 0 16px; }
.issue-frame { display: block; width: 100%; min-height: 70vh; border: 0; border-radius: 16px; background: #f6f3ee; }
@media (max-width: 760px) { .issues { grid-template-columns: 1fr; } }

/* Home: products & pricing (also what payment providers look for) */
.plans { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); margin: 24px 0 0; padding: 0; list-style: none; }
.plan { display: grid; align-content: start; gap: 8px; padding: 20px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.plan-name { margin: 0; font-size: 1.05rem; }
.plan-sub { margin: 0; color: var(--muted); font-size: 0.94rem; line-height: 1.55; }
.plan-price { margin: 6px 0 0; font-size: 1.05rem; }
.plan-price strong { font-size: 1.5rem; }
.plan-total { color: var(--muted); }
.plan-foot { margin: 18px 0 0; color: var(--muted); font-size: 0.94rem; line-height: 1.6; }

/* ---------- Book viewer: the same shell as the interactive reader ---------- */
/* Colours and type mirror src/app.css so both readers feel like one product. */
.viewer-main { min-height: 100vh; background: #14130F; --rd-ink: #14130F; --rd-line: #2A2822; --rd-text: #F7F4ED; --rd-muted: #9A9384; --rd-dim: #8E877A; --rd-coral: #E0705A; --rd-active: #22201A; }
.rd-shell { display: flex; min-height: 100vh; background: var(--rd-ink); }
.rd-side {
  flex: none; width: 244px; background: var(--rd-ink); border-right: 1px solid var(--rd-line);
  padding: 22px 16px 18px; display: flex; flex-direction: column; gap: 20px;
  position: sticky; top: 0; height: 100vh; overflow: auto;
}
.rd-shell.is-collapsed .rd-side { display: none; }
.rd-main { flex: 1; min-width: 0; min-height: 100vh; display: flex; flex-direction: column; background: #F7F4ED; }
.viewer-main .viewer-bar { top: 0; backdrop-filter: none; -webkit-backdrop-filter: none; }
.viewer-main .viewer-stage { background: #F7F4ED; }
.rd-brand { display: flex; align-items: center; gap: 11px; padding: 0 6px; text-decoration: none; }
.rd-brand-mark {
  width: 34px; height: 34px; flex: none; border: 1px solid #4A4640; border-radius: 7px; background: #1C1B16;
  display: flex; align-items: center; justify-content: center; font: 700 13px/1 Literata, Georgia, serif; color: var(--rd-text);
}
.rd-brand-text { min-width: 0; display: grid; }
.rd-brand-title { font: 600 12.5px/1.15 Archivo, system-ui, sans-serif; color: var(--rd-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rd-brand-sub { font: 400 9.5px/1.2 "JetBrains Mono", ui-monospace, monospace; color: var(--rd-muted); letter-spacing: 0.1em; margin-top: 2px; }
.rd-nav { display: flex; flex-direction: column; gap: 14px; }
.rd-group-head {
  display: flex; align-items: center; gap: 6px; width: 100%; padding: 0 8px 7px; background: none; border: 0; cursor: pointer;
  font: 400 9.5px/1 "JetBrains Mono", ui-monospace, monospace; color: var(--rd-dim); letter-spacing: 0.14em; text-align: left;
}
.rd-caret { flex: none; width: 9px; font-size: 9px; color: #6E675B; }
.rd-group-count { margin-left: auto; font: 400 9px/1 "JetBrains Mono", ui-monospace, monospace; color: #6E675B; }
.rd-group-pages { display: grid; grid-template-columns: repeat(5, 1fr); gap: 3px; padding: 0 6px; }
.rd-group[data-open="false"] .rd-group-pages { display: none; }
.rd-page-btn {
  padding: 6px 0; border: 0; border-radius: 6px; background: transparent; cursor: pointer;
  font: 400 11px/1.2 "JetBrains Mono", ui-monospace, monospace; color: #A9A296; font-variant-numeric: tabular-nums;
}
.rd-page-btn:hover { background: #1C1B16; color: var(--rd-text); }
.rd-page-btn[aria-current="true"] { background: var(--rd-active); color: var(--rd-text); box-shadow: inset 0 0 0 1px #3A362E; }
.rd-page-btn.is-read { color: #CFC8BA; }
.rd-foot { margin-top: auto; border-top: 1px solid var(--rd-line); padding-top: 15px; }
.rd-progress { display: flex; align-items: center; gap: 11px; }
.rd-ring {
  position: relative; width: 38px; height: 38px; flex: none; border-radius: 50%;
  background: conic-gradient(var(--rd-coral) 0turn var(--rd-pct, 0turn), #2E2C25 var(--rd-pct, 0turn) 1turn);
  display: grid; place-items: center;
}
.rd-ring > span {
  position: absolute; inset: 4px; border-radius: 50%; background: var(--rd-ink); display: grid; place-items: center;
  font: 500 9px/1 "JetBrains Mono", ui-monospace, monospace; color: var(--rd-text);
}
.rd-progress-text { min-width: 0; display: grid; gap: 2px; font: 500 11.5px/1.2 Archivo, system-ui, sans-serif; color: #CFC8BA; }
.rd-link { font: 400 11px/1.3 Archivo, system-ui, sans-serif; color: var(--rd-coral); text-decoration: none; }
.rd-toggle {
  flex: none; border: 1px solid #DCD4C2; background: #FFFDF9; border-radius: 8px; padding: 8px 12px;
  font: 500 12px/1 Archivo, system-ui, sans-serif; color: #3A362E; cursor: pointer; white-space: nowrap;
}
.rd-toggle:hover { background: #fff; }
.viewer-main .viewer-bar { background: #FFFDF9; border-bottom: 1px solid #E0D9C8; position: sticky; top: 0; z-index: 5; }
.viewer-main .viewer-bar-inner { display: flex; align-items: center; gap: 8px 14px; min-height: 58px; padding: 6px 22px; }
.viewer-main .viewer-title { font: 600 15px/1.25 Archivo, system-ui, sans-serif; color: #2B2820; }
.viewer-main .viewer-count { font: 400 11px/1 "JetBrains Mono", ui-monospace, monospace; color: #8C8577; }
.viewer-main .viewer-line { background: #E7E0D0; }
.viewer-main .viewer-line > span { background: var(--rd-coral); box-shadow: none; }
.viewer-main .viewer-stage { flex: 1; width: min(1180px, 100%); margin-inline: auto; padding: 28px 22px 90px; }
.viewer-main .viewer-controls { background: #FFFDF9; border-top: 1px solid #E0D9C8; }
.viewer-main .viewer-controls-inner { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 12px 22px; }
@media (max-width: 900px) {
  .rd-side { position: fixed; z-index: 30; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5); }
  .rd-shell:not(.is-open) .rd-side { display: none; }
  .viewer-main .viewer-stage { padding-inline: 12px; }
}
