:root {
  color-scheme: light;
  --page-top: #f9f5ec;
  --page-glow: rgba(176, 126, 64, 0.2);
  --grid-vertical: rgba(176, 126, 64, 0.08);
  --grid-horizontal: rgba(176, 126, 64, 0.06);
  --surface: rgba(255, 251, 242, 0.72);
  --surface-strong: var(--mm-vellum);
  --ink: var(--text);
  --muted: var(--text-muted);
  --green: var(--mm-laurel);
  --green-light: var(--mm-laurel-light);
  --green-accent: var(--mm-laurel);
  --gold: var(--mm-gold-deep);
  --gold-soft: var(--border);
  --border: rgba(75, 58, 39, 0.14);
  --shadow: rgba(45, 35, 24, 0.12);
  /* --green is laurel in BOTH themes, so its foreground must stay light in
     both. Do NOT point this at --on-button: that token pairs with --button,
     which brand tokens flip to gold in dark mode, making --on-button dark
     and putting near-black text on a dark green fill (1.2:1). */
  --on-green: var(--mm-vellum);
  --avatar-surface: rgba(255, 250, 240, 0.8);
  --avatar-shadow: rgba(14, 42, 40, 0.7);
  --book-border: rgba(176, 126, 64, 0.22);
  --book-wash: rgba(14, 42, 40, 0.11);
  --book-surface-start: rgba(255, 250, 240, 0.94);
  --book-surface-end: rgba(247, 242, 231, 0.86);
  --book-shadow: rgba(45, 35, 24, 0.3);
  --cover-shadow: rgba(22, 17, 12, 0.62);
  --secondary-border: rgba(176, 126, 64, 0.4);
  --secondary-border-hover: rgba(176, 126, 64, 0.7);
  --secondary-surface: rgba(255, 250, 240, 0.7);
  --story-surface: rgba(255, 251, 243, 0.72);
  --story-surface-hover: rgba(255, 251, 243, 0.94);
  --story-border-hover: rgba(14, 42, 40, 0.28);
  --creator-surface: rgba(255, 250, 240, 0.5);
  --social-surface: rgba(14, 42, 40, 0.055);
  --social-chip: rgba(255, 250, 240, 0.52);
  --social-chip-hover: rgba(255, 250, 240, 0.9);
  --divider-halo: rgba(244, 241, 232, 0.88);
  --divider-line: rgba(130, 90, 39, 0.72);
  --link-decoration: rgba(176, 126, 64, 0.58);
  --story-ring-one: rgba(176, 126, 64, 0.05);
  --story-ring-two: rgba(176, 126, 64, 0.025);
  /* Focus rings need 3:1 against the page (WCAG 1.4.11). Gold at 90% alpha
     composites to 2.75:1 on parchment, so use solid gold-deep (5.4:1). */
  --focus: var(--mm-gold-deep);
  --display: var(--mm-display);
  --body: var(--mm-body);
  --radius: 22px;
  --radius-small: 16px;
  --shell: 760px;
  --transition: 180ms ease;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: var(--mm-night);
  --bg-deep: var(--mm-night-deep);
  --page-top: var(--mm-night-raise);
  --page-glow: rgba(216, 165, 104, 0.12);
  --grid-vertical: rgba(216, 165, 104, 0.045);
  --grid-horizontal: rgba(216, 165, 104, 0.035);
  --surface: rgba(30, 27, 22, 0.88);
  --surface-strong: var(--mm-night-raise);
  --ink: var(--mm-ink-inv);
  --muted: var(--mm-muted-inv);
  --green: var(--mm-laurel);
  --green-light: var(--mm-laurel-light);
  --accent-cool: var(--mm-verdigris);
  --green-accent: var(--accent-cool);
  --gold: var(--mm-gold);
  --gold-soft: rgba(216, 165, 104, 0.28);
  --border: rgba(210, 185, 142, 0.16);
  --shadow: rgba(0, 0, 0, 0.42);
  --avatar-surface: rgba(30, 27, 22, 0.9);
  --avatar-shadow: rgba(0, 0, 0, 0.45);
  --book-border: rgba(216, 165, 104, 0.3);
  --book-wash: rgba(122, 174, 166, 0.12);
  --book-surface-start: rgba(30, 27, 22, 0.97);
  --book-surface-end: rgba(15, 13, 10, 0.94);
  --book-shadow: rgba(0, 0, 0, 0.56);
  --cover-shadow: rgba(0, 0, 0, 0.78);
  --secondary-border: rgba(216, 165, 104, 0.52);
  --secondary-border-hover: rgba(246, 193, 132, 0.82);
  --secondary-surface: rgba(30, 27, 22, 0.8);
  --story-surface: rgba(30, 27, 22, 0.82);
  --story-surface-hover: rgba(30, 27, 22, 0.97);
  --story-border-hover: rgba(122, 174, 166, 0.32);
  --creator-surface: rgba(30, 27, 22, 0.82);
  --social-surface: rgba(122, 174, 166, 0.08);
  --social-chip: rgba(30, 27, 22, 0.88);
  --social-chip-hover: rgba(30, 27, 22, 0.96);
  --divider-halo: rgba(23, 20, 16, 0.92);
  --divider-line: rgba(216, 165, 104, 0.7);
  --link-decoration: rgba(216, 165, 104, 0.62);
  --story-ring-one: rgba(216, 165, 104, 0.09);
  --story-ring-two: rgba(216, 165, 104, 0.045);
  --focus: var(--mm-gold-bright);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: var(--mm-night);
    --bg-deep: var(--mm-night-deep);
    --page-top: var(--mm-night-raise);
    --page-glow: rgba(216, 165, 104, 0.12);
    --grid-vertical: rgba(216, 165, 104, 0.045);
    --grid-horizontal: rgba(216, 165, 104, 0.035);
    --surface: rgba(30, 27, 22, 0.88);
    --surface-strong: var(--mm-night-raise);
    --ink: var(--mm-ink-inv);
    --muted: var(--mm-muted-inv);
    --green: var(--mm-laurel);
    --green-light: var(--mm-laurel-light);
    --accent-cool: var(--mm-verdigris);
    --green-accent: var(--accent-cool);
    --gold: var(--mm-gold);
    --gold-soft: rgba(216, 165, 104, 0.28);
    --border: rgba(210, 185, 142, 0.16);
    --shadow: rgba(0, 0, 0, 0.42);
    --avatar-surface: rgba(30, 27, 22, 0.9);
    --avatar-shadow: rgba(0, 0, 0, 0.45);
    --book-border: rgba(216, 165, 104, 0.3);
    --book-wash: rgba(122, 174, 166, 0.12);
    --book-surface-start: rgba(30, 27, 22, 0.97);
    --book-surface-end: rgba(15, 13, 10, 0.94);
    --book-shadow: rgba(0, 0, 0, 0.56);
    --cover-shadow: rgba(0, 0, 0, 0.78);
    --secondary-border: rgba(216, 165, 104, 0.52);
    --secondary-border-hover: rgba(246, 193, 132, 0.82);
    --secondary-surface: rgba(30, 27, 22, 0.8);
    --story-surface: rgba(30, 27, 22, 0.82);
    --story-surface-hover: rgba(30, 27, 22, 0.97);
    --story-border-hover: rgba(122, 174, 166, 0.32);
    --creator-surface: rgba(30, 27, 22, 0.82);
    --social-surface: rgba(122, 174, 166, 0.08);
    --social-chip: rgba(30, 27, 22, 0.88);
    --social-chip-hover: rgba(30, 27, 22, 0.96);
    --divider-halo: rgba(23, 20, 16, 0.92);
    --divider-line: rgba(216, 165, 104, 0.7);
    --link-decoration: rgba(216, 165, 104, 0.62);
    --story-ring-one: rgba(216, 165, 104, 0.09);
    --story-ring-two: rgba(216, 165, 104, 0.045);
    --focus: var(--mm-gold-bright);
  }
}

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

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  font-family: var(--body);
  color: var(--ink);
  background:
    radial-gradient(circle at 50% -8rem, var(--page-glow), transparent 34rem),
    linear-gradient(180deg, var(--page-top) 0%, var(--bg) 40%, var(--bg-deep) 100%);
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  content: "";
  pointer-events: none;
  opacity: 0.16;
  background-image:
    linear-gradient(90deg, transparent 49.85%, var(--grid-vertical) 50%, transparent 50.15%),
    linear-gradient(transparent 49.85%, var(--grid-horizontal) 50%, transparent 50.15%);
  background-size: 80px 80px;
  -webkit-mask-image: linear-gradient(to bottom, black, transparent 75%);
  mask-image: linear-gradient(to bottom, black, transparent 75%);
}

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

a {
  color: inherit;
}

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 20;
  padding: 0.72rem 1rem;
  border-radius: 999px;
  color: var(--on-green);
  background: var(--green);
  transform: translateY(-180%);
  transition: transform var(--transition);
}

.skip-link:focus {
  transform: translateY(0);
}

.shell {
  width: min(calc(100% - 2rem), var(--shell));
  margin-inline: auto;
}

.profile {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 1rem;
  align-items: center;
  padding: 1.2rem 0 1.15rem;
  text-align: left;
}

.profile-title {
  margin: 0;
  font-family: var(--body);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  line-height: 1.2;
  color: var(--gold);
}

.avatar-frame {
  display: block;
  width: 72px;
  margin: 0;
  padding: 4px;
  border: 1px solid var(--gold-soft);
  border-radius: 50%;
  background: var(--avatar-surface);
  box-shadow: 0 16px 36px -24px var(--avatar-shadow);
}

.avatar {
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  border-radius: 50%;
  object-fit: cover;
}

.eyebrow,
.card-kicker,
.story-type {
  margin: 0;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.17em;
  text-transform: uppercase;
  color: var(--gold);
}

h1,
h2,
.story-card strong {
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: -0.025em;
}

.profile-intro {
  margin: 0.3rem 0 0;
  font-size: 0.9rem;
  color: var(--muted);
}

.featured-book {
  position: relative;
  display: grid;
  grid-template-columns: 155px minmax(0, 1fr);
  gap: clamp(1.25rem, 3.5vw, 1.7rem);
  align-items: start;
  padding: clamp(1.15rem, 2.7vw, 1.4rem);
  border: 1px solid var(--book-border);
  border-top: 4px solid var(--green-accent);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 100% 0, var(--book-wash), transparent 46%),
    linear-gradient(145deg, var(--book-surface-start), var(--book-surface-end));
  box-shadow: 0 20px 54px -42px var(--book-shadow);
}

.book-cover-wrap {
  position: relative;
  width: min(100%, 155px);
  margin-inline: auto;
}

.book-cover-picture {
  display: block;
}

.book-cover-wrap::after {
  position: absolute;
  inset: 7% -7% -4% 12%;
  z-index: -1;
  content: "";
  border-radius: 12px;
  background: var(--green);
  opacity: 0.14;
}

.book-cover {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 5 / 8;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 26px 42px -22px var(--cover-shadow);
}

.book-copy h2,
.merch-copy h2,
.creator-section h2,
.section-heading h2 {
  margin: 0.45rem 0 0;
  font-size: clamp(2rem, 4.5vw, 2.75rem);
  line-height: 0.94;
  text-wrap: balance;
}

.book-hook {
  margin: 0.65rem 0 0;
  font-family: var(--display);
  font-size: 1.22rem;
  font-weight: 600;
  line-height: 1.15;
  color: var(--green-accent);
}

.book-description {
  margin: 0.45rem 0 0;
  font-size: 0.86rem;
  color: var(--muted);
}

.book-quote {
  max-width: 34rem;
  margin: clamp(1.35rem, 3.5vw, 1.85rem) auto 0;
  padding: 0;
  border-left: 0;
  font-family: var(--display);
  font-size: clamp(0.92rem, 2.2vw, 1rem);
  font-style: italic;
  line-height: 1.42;
  text-align: center;
  text-wrap: balance;
  color: var(--muted);
}

.book-quote p {
  margin: 0;
}

.book-quote footer {
  margin-top: 0.45rem;
  font-family: var(--body);
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-align: center;
  text-transform: uppercase;
  color: var(--gold);
}

.section-divider-after-book {
  margin-top: clamp(1.35rem, 3.5vw, 1.85rem);
}

.book-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 0.85rem;
}

.button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  padding: 0.68rem 1rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  transition:
    transform var(--transition),
    background-color var(--transition),
    border-color var(--transition),
    box-shadow var(--transition);
}

.button:hover {
  transform: translateY(-2px);
}

.button-primary {
  color: var(--on-green);
  background: var(--green);
  box-shadow: 0 14px 26px -20px var(--green);
}

.button-primary:hover {
  background: var(--green-light);
}

.button-secondary {
  border-color: var(--secondary-border);
  background: var(--secondary-surface);
}

.button-secondary:hover {
  border-color: var(--secondary-border-hover);
  background: var(--surface-strong);
}

.label-compact {
  display: none;
}

.button-dark-outline {
  margin-top: 1rem;
  border-color: rgba(255, 250, 240, 0.38);
  color: var(--on-green);
  background: transparent;
}

.button-dark-outline:hover {
  border-color: rgba(255, 250, 240, 0.76);
  background: rgba(255, 255, 255, 0.07);
}

.book-explore {
  display: grid;
  grid-template-columns: auto auto auto;
  align-items: center;
  justify-content: start;
  column-gap: 0.7rem;
  row-gap: 0.3rem;
  margin-top: 0.9rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border);
}

.book-meta-link,
.book-explore .book-more summary {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.76rem;
  font-weight: 600;
  line-height: 1.2;
  color: var(--muted);
  text-decoration: none;
}

.book-meta-label {
  text-decoration: underline;
  text-decoration-color: var(--gold-soft);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
}

.book-meta-icon {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 0.6rem;
  height: 0.6rem;
  text-decoration: none;
}

.book-meta-chevron {
  width: 0.42rem;
  height: 0.42rem;
  border-right: 1.25px solid var(--gold);
  border-bottom: 1.25px solid var(--gold);
  transform: rotate(45deg);
  transition: transform 220ms cubic-bezier(0.22, 1, 0.36, 1);
}

.book-more[open] .book-meta-chevron {
  transform: rotate(-135deg);
}

.book-meta-arrow {
  width: auto;
  color: var(--gold);
  font-size: 0.95rem;
  line-height: 1;
  transform: translateY(0.04em);
}

.book-meta-link:hover,
.book-explore .book-more summary:hover {
  color: var(--ink);
}

.book-more {
  margin-top: 0;
}

.book-explore .book-more {
  display: contents;
}

.book-explore .book-more summary {
  grid-column: 1;
  grid-row: 1;
}

.book-meta-link-sample {
  grid-column: 2;
  grid-row: 1;
}

.book-meta-link-qa {
  grid-column: 3;
  grid-row: 1;
}

.book-explore .book-more-panel {
  grid-column: 1 / -1;
  grid-row: 2;
  overflow: hidden;
  padding-top: 0.15rem;
}

.book-more summary {
  cursor: pointer;
  list-style: none;
}

.book-more summary::-webkit-details-marker {
  display: none;
}

.book-more summary:focus-visible {
  border-radius: 2px;
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.retailer-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.35rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  background: var(--secondary-surface);
  transition:
    transform var(--transition),
    border-color var(--transition),
    box-shadow var(--transition);
}

.retailer-link:not(:last-child)::after {
  content: none;
}

.book-more-panel {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.65rem;
  padding: 0.35rem 0 0.2rem;
  overflow: hidden;
  transform-origin: top;
}

.retailer-link:hover {
  border-color: var(--gold-soft);
  transform: translateY(-2px);
  box-shadow: 0 10px 20px -16px var(--shadow);
}

.text-link,
.browse-link {
  font-weight: 600;
  text-decoration-color: var(--link-decoration);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
}

.text-link {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  margin-top: 0.25rem;
  font-size: 0.86rem;
}

.content-section {
  padding-block: 0;
}

.section-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  margin-block: clamp(2.1rem, 5.5vw, 2.9rem);
}

.section-divider::before,
.section-divider::after {
  width: 2.6rem;
  height: 1px;
  content: "";
}

.section-divider::before {
  background: linear-gradient(90deg, transparent, var(--divider-line));
}

.section-divider::after {
  background: linear-gradient(90deg, var(--divider-line), transparent);
}

.section-divider span {
  width: 6px;
  height: 6px;
  border: 1px solid var(--focus);
  background: var(--green-accent);
  box-shadow: 0 0 0 3px var(--divider-halo);
  transform: rotate(45deg);
}

.section-heading {
  max-width: 620px;
  margin-bottom: 1.25rem;
  padding-left: 1rem;
  border-left: 3px solid var(--green-accent);
}

.section-heading > p:last-child {
  margin: 0.8rem 0 0;
  color: var(--muted);
}

.stories-intro strong {
  color: var(--green-accent);
}

.story-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.story-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-small);
  text-decoration: none;
  background: var(--story-surface);
  transition:
    transform var(--transition),
    border-color var(--transition),
    box-shadow var(--transition),
    background-color var(--transition);
}

.story-media {
  aspect-ratio: 3 / 2;
  overflow: hidden;
  border-radius: calc(var(--radius-small) - 1px) calc(var(--radius-small) - 1px) 0 0;
}

.story-media picture {
  display: block;
  height: 100%;
}

.story-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform var(--transition);
}

.story-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 1.35rem;
}

.story-body::before {
  width: 2.75rem;
  height: 2px;
  margin-bottom: 0.8rem;
  background: linear-gradient(90deg, var(--gold), var(--green-accent));
  content: "";
}

.story-card::after {
  display: none;
}

.story-card:hover {
  border-color: var(--story-border-hover);
  background: var(--story-surface-hover);
  transform: translateY(-3px);
  box-shadow: 0 20px 36px -30px var(--shadow);
}

.story-card:hover .story-media img {
  transform: scale(1.03);
}

.story-type {
  max-width: 15rem;
  color: var(--gold);
}

.story-card strong {
  display: block;
  margin-top: 0.55rem;
  font-size: clamp(1.7rem, 4vw, 2.05rem);
  line-height: 0.96;
}

.story-deck {
  margin-top: 0.65rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.story-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 1;
  margin-top: auto;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--green-accent);
}

.story-cta span {
  transition: transform var(--transition);
}

.story-card:hover .story-cta span {
  transform: translate(2px, -2px);
}

.browse-link {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  margin-top: 1.2rem;
  color: var(--green-accent);
}

.merch-card {
  display: grid;
  grid-template-columns: minmax(180px, 0.82fr) minmax(0, 1.18fr);
  align-items: stretch;
  overflow: hidden;
  border-radius: var(--radius);
  color: #f8f0e4;
  background: var(--green);
  box-shadow: 0 26px 60px -42px rgba(14, 42, 40, 0.85);
}

.merch-media {
  min-height: 270px;
}

.merch-media img {
  width: 100%;
  height: 100%;
}

.merch-media img {
  object-fit: cover;
}

.merch-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: clamp(1.5rem, 4vw, 2.35rem);
}

.merch-copy .card-kicker {
  color: var(--gold);
}

.merch-copy p:not(.card-kicker) {
  max-width: 390px;
  margin: 0.85rem 0 0;
  color: rgba(255, 250, 240, 0.76);
}

.creator-card {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(220px, 0.65fr);
  margin-top: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-small);
  background: var(--creator-surface);
}

.creator-section {
  padding: clamp(1.35rem, 4vw, 2rem);
}

.creator-section p:not(.eyebrow) {
  max-width: 520px;
  margin: 0.7rem 0 0;
  color: var(--muted);
}

.social-nav {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 1.35rem;
  border-left: 1px solid var(--border);
  text-align: center;
  background: var(--social-surface);
}

.social-nav > p {
  margin: 0 0 0.85rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.social-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.55rem;
}

.social-links a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
  background: var(--social-chip);
  transition:
    border-color var(--transition),
    background-color var(--transition),
    transform var(--transition);
}

.social-links a:hover {
  border-color: rgba(176, 126, 64, 0.55);
  background: var(--social-chip-hover);
  transform: translateY(-2px);
}

.site-footer {
  margin-top: clamp(3rem, 7vw, 4.25rem);
  color: rgba(255, 250, 240, 0.78);
  background:
    radial-gradient(circle at 50% 0, rgba(176, 126, 64, 0.13), transparent 28rem),
    var(--green);
}

:root[data-theme="dark"] body {
  background:
    radial-gradient(circle at 82% -6rem, rgba(122, 174, 166, 0.09), transparent 26rem),
    radial-gradient(circle at 50% -8rem, var(--page-glow), transparent 34rem),
    linear-gradient(180deg, var(--page-top) 0%, var(--bg) 40%, var(--bg-deep) 100%);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) body {
    background:
      radial-gradient(circle at 82% -6rem, rgba(122, 174, 166, 0.09), transparent 26rem),
      radial-gradient(circle at 50% -8rem, var(--page-glow), transparent 34rem),
      linear-gradient(180deg, var(--page-top) 0%, var(--bg) 40%, var(--bg-deep) 100%);
  }
}

:root[data-theme="dark"] .site-footer {
  color: var(--muted);
  background:
    radial-gradient(circle at 50% 0, rgba(216, 165, 104, 0.08), transparent 24rem),
    radial-gradient(ellipse at 50% 100%, rgba(12, 44, 41, 0.42), transparent 72%),
    linear-gradient(180deg, #1a1712 0%, #121916 58%, var(--bg-deep) 100%);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .site-footer {
    color: var(--muted);
    background:
      radial-gradient(circle at 50% 0, rgba(216, 165, 104, 0.08), transparent 24rem),
      radial-gradient(ellipse at 50% 100%, rgba(12, 44, 41, 0.42), transparent 72%),
      linear-gradient(180deg, #1a1712 0%, #121916 58%, var(--bg-deep) 100%);
  }
}

:root[data-theme="dark"] .merch-card {
  background: linear-gradient(145deg, var(--mm-night-raise) 0%, #152220 52%, var(--mm-night) 100%);
  border: 1px solid rgba(122, 174, 166, 0.22);
  box-shadow: 0 26px 60px -42px rgba(0, 0, 0, 0.65);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .merch-card {
    background: linear-gradient(145deg, var(--mm-night-raise) 0%, #152220 52%, var(--mm-night) 100%);
    border: 1px solid rgba(122, 174, 166, 0.22);
    box-shadow: 0 26px 60px -42px rgba(0, 0, 0, 0.65);
  }
}

:root[data-theme="dark"] .book-cover-wrap::after {
  background: var(--green);
  opacity: 0.22;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .book-cover-wrap::after {
    background: var(--green);
    opacity: 0.22;
  }
}

.footer-inner {
  width: min(calc(100% - 2rem), var(--shell));
  margin-inline: auto;
  padding: 1.7rem 0 2rem;
  text-align: center;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.25rem 1.1rem;
}

.footer-nav a {
  position: relative;
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  color: var(--mm-vellum);
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
}

.footer-nav a:not(:last-child)::after {
  position: absolute;
  right: -0.65rem;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: rgba(217, 189, 125, 0.58);
  content: "";
}

.footer-nav a:hover {
  color: #e3c77e;
}

.footer-theme {
  display: flex;
  justify-content: center;
  margin: 0.55rem 0 0.85rem;
}

.theme-toggle[hidden] {
  display: none;
}

.theme-toggle {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.5rem 0.85rem;
  border: 1px solid rgba(255, 250, 240, 0.24);
  border-radius: 999px;
  color: var(--on-green);
  cursor: pointer;
  font: 600 0.76rem/1 var(--body);
  background: rgba(255, 250, 240, 0.06);
  transition:
    border-color var(--transition),
    background-color var(--transition),
    transform var(--transition);
}

.theme-toggle:hover {
  border-color: rgba(229, 196, 119, 0.72);
  background: rgba(255, 250, 240, 0.11);
  transform: translateY(-1px);
}

.theme-toggle-icon {
  width: 1rem;
  color: var(--focus);
  font-size: 0.95rem;
  line-height: 1;
}

.footer-copyright {
  margin: 0;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 250, 240, 0.12);
  font-family: var(--display);
  font-size: 1rem;
}

.footer-copyright span {
  font-style: italic;
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 4px;
}

@media (max-width: 680px) {
  .profile {
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 0.8rem;
    padding: 1rem 0;
  }

  .avatar-frame {
    width: 64px;
  }

  .profile-intro {
    max-width: 30rem;
    font-size: 0.8rem;
    line-height: 1.35;
  }

  .merch-card {
    grid-template-columns: clamp(96px, 31vw, 132px) minmax(0, 1fr);
  }

  .featured-book {
    grid-template-columns: clamp(84px, 26vw, 108px) minmax(0, 1fr);
    grid-template-areas:
      ". kicker"
      "cover intro"
      "actions actions"
      "explore explore";
    gap: 0.9rem;
    align-items: start;
    text-align: left;
  }

  .book-copy {
    display: contents;
  }

  .book-cover-wrap {
    grid-area: cover;
    align-self: center;
    width: 100%;
    margin: 0;
  }

  .featured-book .card-kicker {
    grid-area: kicker;
  }

  .book-intro {
    grid-area: intro;
  }

  .book-actions {
    display: grid;
    grid-area: actions;
    justify-content: stretch;
  }

  .book-explore {
    grid-area: explore;
    grid-template-columns: 1fr;
    row-gap: 0.35rem;
  }

  .book-explore .book-more summary,
  .book-meta-link-sample,
  .book-meta-link-qa {
    grid-column: 1;
  }

  .book-explore .book-more summary {
    grid-row: 1;
  }

  .book-explore .book-more-panel {
    grid-row: 2;
  }

  .book-meta-link-sample {
    grid-row: 3;
  }

  .book-meta-link-qa {
    grid-row: 4;
  }

  .book-copy h2 {
    font-size: clamp(1.8rem, 8vw, 2.35rem);
  }

  .book-hook {
    font-size: 1.15rem;
  }

  .book-description {
    margin-top: 0.35rem;
    font-size: 0.84rem;
    line-height: 1.45;
  }

  .book-actions .button {
    width: 100%;
  }

  .story-grid {
    grid-template-columns: 1fr;
  }

  .merch-media {
    min-height: 100%;
    aspect-ratio: auto;
  }

  .merch-copy {
    align-items: flex-start;
    padding: 1.25rem;
    text-align: left;
  }

  .merch-copy h2 {
    font-size: clamp(1.8rem, 8vw, 2.35rem);
  }

  .merch-copy p:not(.card-kicker) {
    margin-top: 0.55rem;
    font-size: 0.88rem;
  }

  .button-dark-outline {
    width: 100%;
    margin-top: 0.8rem;
    padding-inline: 0.75rem;
    font-size: 0.85rem;
  }

  .creator-card {
    grid-template-columns: 1fr;
  }

  .creator-section {
    text-align: center;
  }

  .creator-section p:not(.eyebrow) {
    margin-inline: auto;
  }

  .social-nav {
    border-top: 1px solid var(--border);
    border-left: 0;
  }

  .footer-inner {
    width: min(calc(100% - 1.5rem), var(--shell));
  }
}

@media (min-width: 560px) and (max-width: 680px) {
  .book-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .label-full {
    display: none;
  }

  .label-compact {
    display: inline;
  }
}

@media (max-width: 420px) {
  .footer-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.25rem 0.75rem;
  }

  .footer-nav a {
    justify-content: center;
  }

  .footer-nav a::after {
    display: none;
  }

  .footer-copyright {
    display: grid;
    gap: 0.15rem;
  }
}

@media (max-width: 390px) {
  .shell {
    width: min(calc(100% - 1.25rem), var(--shell));
  }

  .featured-book {
    padding: 1.15rem;
  }

  .book-actions {
    display: grid;
  }

  .button {
    width: 100%;
  }

  .story-body {
    padding: 1.15rem;
  }

}

@media (prefers-contrast: more) {
  :root {
    --border: rgba(75, 58, 39, 0.34);
  }

  :root[data-theme="dark"] {
    --border: rgba(229, 196, 119, 0.48);
  }

  .button,
  .story-card,
  .creator-card,
  .social-links a,
  .theme-toggle {
    border-width: 2px;
  }
}

@media (forced-colors: active) {
  .section-divider span,
  .story-card::after,
  .book-cover-wrap::after {
    display: none;
  }

  .button,
  .theme-toggle,
  .social-links a {
    border: 1px solid ButtonText;
  }
}

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

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
