/* ════════════════════════════════════════════════════════════
   Make America Literate Again — styles
   Tokens first, then layout, then components, then pages.
   ════════════════════════════════════════════════════════════ */

:root {
  --bg: #f6f3ff;
  --surface: #ffffff;
  --surface-2: #ede7ff;
  --text: #1b1340;
  --muted: #5f5887;
  --line: rgba(27, 19, 64, 0.10);

  --pink: #ff2d87;
  --violet: #6b2bff;
  --yellow: #ffc629;
  --teal: #00c9b7;
  --ink: #1b1340;

  --grad: linear-gradient(100deg, var(--pink), var(--violet));
  --shadow-sm: 0 2px 10px rgba(60, 30, 140, 0.08);
  --shadow: 0 16px 40px -14px rgba(60, 30, 140, 0.35);
  --shadow-lg: 0 30px 70px -24px rgba(60, 30, 140, 0.5);

  --font-display: 'Bricolage Grotesque', 'Arial Rounded MT Bold', 'Avenir Next', system-ui, sans-serif;
  --font-body: 'DM Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

  --header-h: 66px;
  --gutter: clamp(16px, 4vw, 32px);
  --pad: max(var(--gutter), calc((100vw - 1240px) / 2 + var(--gutter)));
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #120c2b;
    --surface: #1d1640;
    --surface-2: #2a2158;
    --text: #f5f2ff;
    --muted: #b1a9d8;
    --line: rgba(255, 255, 255, 0.09);
    --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.3);
    --shadow: 0 16px 40px -14px rgba(0, 0, 0, 0.6);
    --shadow-lg: 0 30px 70px -24px rgba(0, 0, 0, 0.75);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #120c2b;
  --surface: #1d1640;
  --surface-2: #2a2158;
  --text: #f5f2ff;
  --muted: #b1a9d8;
  --line: rgba(255, 255, 255, 0.09);
  --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.3);
  --shadow: 0 16px 40px -14px rgba(0, 0, 0, 0.6);
  --shadow-lg: 0 30px 70px -24px rgba(0, 0, 0, 0.75);
  color-scheme: dark;
}

/* ── Base ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
:root {
  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
html { scroll-padding-top: calc(env(safe-area-inset-top, 0px) + var(--header-h) + 12px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.05; margin: 0; letter-spacing: -0.02em; }
button { font: inherit; }
:focus-visible { outline: 3px solid var(--pink); outline-offset: 3px; border-radius: 10px; }
.container { width: 100%; max-width: 1240px; margin-inline: auto; padding-inline: var(--gutter); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
#view { outline: none; min-height: 60vh; }

/* ── Buttons & chips ──────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-weight: 700; font-size: 15px; line-height: 1.2;
  padding: 13px 20px; border-radius: 999px; border: 0; cursor: pointer;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(1px); }
.btn--light { background: #fff; color: var(--ink); box-shadow: 0 10px 24px -10px rgba(0, 0, 0, .45); }
.btn--ghost { background: rgba(255, 255, 255, .14); color: #fff; box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .45); }
.btn--ghost:hover { background: rgba(255, 255, 255, .24); }
.btn--dark { background: var(--text); color: var(--bg); }
.btn--amazon {
  background: var(--yellow); color: var(--ink);
  box-shadow: 0 4px 0 #d89f00;
  padding: 11px 18px; font-size: 14px;
}
.btn--amazon:hover { box-shadow: 0 6px 0 #d89f00; }
.btn--amazon:active { box-shadow: 0 1px 0 #d89f00; }

.chip-link {
  padding: 7px 13px; border-radius: 999px; background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line); font-weight: 700; font-size: 14px;
  transition: background .2s, color .2s, transform .2s;
}
.chip-link:hover { background: var(--text); color: var(--bg); transform: translateY(-2px); }

/* ── Header ───────────────────────────────────────────────── */
.site-header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(1.6) blur(14px);
  -webkit-backdrop-filter: saturate(1.6) blur(14px);
  border-bottom: 1px solid var(--line);
}
.header__inner { display: flex; align-items: center; gap: 14px; height: var(--header-h); }
.logo { display: flex; align-items: center; gap: 10px; flex: none; }
.logo__stack { display: flex; align-items: flex-end; gap: 3px; height: 34px; }
.logo__stack i { display: block; width: 9px; border-radius: 3px; transition: transform .3s ease; }
.logo__stack i:nth-child(1) { height: 30px; background: var(--pink); }
.logo__stack i:nth-child(2) { height: 34px; background: var(--violet); }
.logo__stack i:nth-child(3) { height: 26px; background: var(--yellow); transform: rotate(14deg); transform-origin: bottom left; }
.logo:hover .logo__stack i:nth-child(3) { transform: rotate(0); }
.logo:hover .logo__stack i:nth-child(1) { transform: translateY(-4px); }
.logo__text { display: flex; flex-direction: column; gap: 2px; font-family: var(--font-display); line-height: 1.05; }
.logo__text b { font-size: 19px; font-weight: 800; color: var(--text); letter-spacing: -0.02em; }
.logo__slogan { font-size: 11px; font-weight: 700; color: var(--muted); letter-spacing: 0; }
@media (max-width: 360px) { .logo__slogan { display: none; } }
.header__nav { display: none; gap: 2px; margin-left: auto; }
.header__nav a {
  padding: 8px 14px; border-radius: 999px; font-weight: 700; font-size: 14px; color: var(--muted);
  transition: background .2s, color .2s;
}
.header__nav a:hover, .header__nav a.is-active { background: var(--surface-2); color: var(--text); }
.header__search {
  margin-left: auto; display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 16px; border-radius: 999px; background: var(--text); color: var(--bg);
  font-weight: 700; font-size: 14px; transition: transform .2s;
}
.header__search:hover { transform: scale(1.04); }
.header__search svg { width: 17px; height: 17px; }
@media (min-width: 940px) {
  .header__nav { display: flex; }
  .header__search { margin-left: 6px; }
}
@media (max-width: 380px) { .header__search span { display: none; } }

/* ── Hero ─────────────────────────────────────────────────── */
.hero { position: relative; isolation: isolate; padding-top: clamp(36px, 7vw, 88px); }
.hero__blobs { position: absolute; inset: 0; overflow: hidden; z-index: -1; pointer-events: none; }
.hero__blobs i { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .45; }
.hero__blobs i:nth-child(1) { width: 440px; height: 440px; background: var(--pink); top: -160px; left: -140px; }
.hero__blobs i:nth-child(2) { width: 400px; height: 400px; background: var(--violet); top: -80px; right: -160px; }
.hero__blobs i:nth-child(3) { width: 320px; height: 320px; background: var(--yellow); bottom: 60px; left: 42%; opacity: .28; }
.hero__inner { position: relative; z-index: 5; display: flex; flex-direction: column; align-items: center; text-align: center; }

/* The signature moment: the headline is a row of book spines */
.hero__title {
  font-size: clamp(42px, 9.6vw, 116px);
  font-weight: 800; letter-spacing: -0.045em; line-height: 1.02;
  max-width: 11.5em; margin: 0 0 22px;
}
.spine {
  display: inline-block; position: relative;
  padding: .06em .3em .1em; margin: .06em .02em;
  border-radius: .14em;
  box-shadow: 0 .12em 0 rgba(27, 19, 64, .22), 0 .3em .6em -.2em rgba(27, 19, 64, .35);
  background-image: linear-gradient(90deg,
    transparent .16em, rgba(255, 255, 255, .38) .16em .2em, transparent .2em calc(100% - .2em),
    rgba(255, 255, 255, .38) calc(100% - .2em) calc(100% - .16em), transparent calc(100% - .16em));
  animation: shelve .7s cubic-bezier(.2, 1.4, .4, 1) backwards;
  animation-delay: var(--d);
}
.spine--0 { background-color: var(--pink); color: #fff; --r: -3deg; }
.spine--1 { background-color: var(--violet); color: #fff; --r: 2deg; }
.spine--2 { background-color: var(--yellow); color: var(--ink); --r: -1.5deg; }
.spine--3 { background-color: var(--teal); color: var(--ink); --r: 3deg; }
.spine { transform: rotate(var(--r)); transition: transform .3s ease; }
.spine:hover { transform: rotate(0) translateY(-.06em); }
@keyframes shelve {
  from { opacity: 0; transform: translateY(-.6em) rotate(calc(var(--r) * -4)); }
  to { opacity: 1; transform: rotate(var(--r)); }
}
.hero__sub { font-family: var(--font-body); font-weight: 400; letter-spacing: 0; line-height: 1.55; font-size: clamp(17px, 2.1vw, 21px); color: var(--muted); max-width: 36em; margin: 0 0 28px; }
.hero__try { margin-top: 18px; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); font-weight: 600; }

/* Cover marquee */
.marquee {
  margin-top: clamp(36px, 6vw, 64px); overflow: hidden; padding: 18px 0 30px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
}
.marquee__track { display: flex; gap: 18px; width: max-content; animation: marquee 70s linear infinite; }
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee__item { width: clamp(96px, 13vw, 148px); flex: none; transition: transform .35s ease; }
.marquee__item:nth-child(odd) { transform: translateY(12px) rotate(-2deg); }
.marquee__item:nth-child(even) { transform: rotate(2deg); }
.marquee__item:hover { transform: translateY(-8px) scale(1.05); }
@keyframes marquee { to { transform: translateX(calc(-50% - 9px)); } }

/* ── Search ───────────────────────────────────────────────── */
.search {
  position: relative; display: flex; align-items: center; gap: 6px;
  width: 100%; max-width: 680px; text-align: left;
  background: var(--surface); border-radius: 999px; padding: 7px 7px 7px 20px;
  box-shadow: var(--shadow), inset 0 0 0 2px var(--line);
  transition: box-shadow .2s ease, transform .2s ease;
}
.search:focus-within { box-shadow: var(--shadow-lg), inset 0 0 0 2.5px var(--pink); transform: translateY(-2px); }
.search > svg { flex: none; width: 22px; height: 22px; color: var(--muted); }
.search input {
  flex: 1; min-width: 0; border: 0; background: transparent; outline: none;
  font: 500 18px var(--font-body); color: var(--text); padding: 12px 6px;
}
.search input::placeholder { color: var(--muted); opacity: .85; }
.search input::-webkit-search-cancel-button { display: none; }
.search__btn {
  flex: none; border: 0; border-radius: 999px; cursor: pointer;
  background: var(--grad); color: #fff; font-weight: 800; font-size: 16px;
  padding: 14px 24px; transition: transform .15s, filter .2s;
}
.search__btn:hover { filter: brightness(1.08); transform: scale(1.03); }
.search--md { max-width: 620px; }
.search--md input { font-size: 17px; padding: 10px 6px; }
.search--md .search__btn { padding: 12px 20px; font-size: 15px; }
@media (max-width: 520px) {
  .search { padding-left: 18px; }
  .search > svg { display: none; }
  .search input { font-size: 16px; }
  .search__btn { padding: 12px 16px; font-size: 15px; }
}
.search__drop {
  position: absolute; top: calc(100% + 10px); left: 0; right: 0; z-index: 40;
  background: var(--surface); border-radius: 22px; padding: 8px;
  box-shadow: var(--shadow-lg), inset 0 0 0 1px var(--line);
  max-height: min(70vh, 520px); overflow-y: auto;
}
.drop__item { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 14px; }
.drop__item:hover, .drop__item:focus-visible { background: var(--surface-2); outline: none; }
.drop__item b { display: block; font-weight: 700; line-height: 1.25; }
.drop__item small { display: block; color: var(--muted); font-size: 13px; line-height: 1.3; }
.drop__thumb { width: 40px; flex: none; }
.drop__thumb .cover { border-radius: 6px; }
.drop__all { display: block; text-align: center; padding: 10px; margin-top: 4px; font-weight: 800; color: var(--violet); border-radius: 14px; }
.drop__all:hover { background: var(--surface-2); }
.drop__empty { padding: 16px; color: var(--muted); font-weight: 500; }

/* ── Genre pills ──────────────────────────────────────────── */
.genre-pills { display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none; padding-block: 6px 4px; }
.genre-pills::-webkit-scrollbar { display: none; }
.gpill {
  flex: none; display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 20px; border-radius: 999px; color: #fff; font-weight: 800; font-size: 15px;
  background: linear-gradient(120deg, var(--g1), var(--g2));
  box-shadow: 0 10px 22px -12px var(--g1);
  transition: transform .2s ease;
}
.gpill:hover { transform: translateY(-3px) rotate(-1.5deg); }
@media (min-width: 940px) { .genre-pills { justify-content: center; } }

/* ── Shelves ──────────────────────────────────────────────── */
.shelf { margin-top: clamp(34px, 5vw, 56px); }
.shelf__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.shelf h2 { font-size: clamp(23px, 3.2vw, 34px); font-weight: 800; display: flex; align-items: center; gap: 10px; }
.shelf__emoji { font-size: .8em; }
.shelf__actions { display: flex; align-items: center; gap: 8px; flex: none; }
.link-more { font-weight: 800; font-size: 14px; color: var(--violet); padding: 6px 4px; }
.link-more:hover { text-decoration: underline; text-underline-offset: 3px; }
.arrow {
  display: none; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  border: 0; background: var(--surface); color: var(--text); box-shadow: inset 0 0 0 1px var(--line);
  font-size: 24px; line-height: 1; cursor: pointer; transition: background .2s, color .2s;
}
.arrow:hover { background: var(--text); color: var(--bg); }
@media (hover: hover) and (min-width: 760px) { .arrow { display: grid; } }
.shelf__track {
  display: flex; gap: clamp(14px, 2vw, 22px);
  overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory; scroll-padding-inline: var(--pad);
  padding: 14px var(--pad) 22px; scrollbar-width: none;
}
.shelf__track::-webkit-scrollbar { display: none; }
.shelf__track > * { flex: none; scroll-snap-align: start; }

/* ── Cover (generated or real) ────────────────────────────── */
.cover {
  position: relative; aspect-ratio: 2 / 3; border-radius: 10px; overflow: hidden;
  color: #fff; container-type: inline-size; isolation: isolate;
  box-shadow: 0 12px 26px -12px rgba(20, 10, 60, .6), 0 2px 4px rgba(20, 10, 60, .15);
  background: var(--c2);
}
.cover__bg { position: absolute; inset: 0; background: linear-gradient(160deg, var(--c1), var(--c2)); filter: hue-rotate(var(--hue, 0deg)); }
.cover__bg::before, .cover__bg::after { content: ''; position: absolute; inset: 0; }
.cover--p0 .cover__bg::before { background: radial-gradient(circle at 76% 24%, var(--c3) 0 22%, transparent 22.5%); opacity: .9; }
.cover--p0 .cover__bg::after { background: radial-gradient(circle at 76% 24%, transparent 0 30%, rgba(255, 255, 255, .22) 30.5% 32%, transparent 32.5%); }
.cover--p1 .cover__bg::before { background: repeating-linear-gradient(135deg, rgba(255, 255, 255, .12) 0 8cqi, transparent 8cqi 16cqi); }
.cover--p1 .cover__bg::after { background: linear-gradient(0deg, var(--c3) 0 5%, transparent 5%); }
.cover--p2 .cover__bg::before { background: radial-gradient(rgba(255, 255, 255, .3) 1.2px, transparent 1.8px) 0 0 / 10px 10px; }
.cover--p2 .cover__bg::after { background: linear-gradient(to top, transparent 44%, var(--c3) 44% 46.5%, transparent 46.5%); }
.cover--p3 .cover__bg::before { background: repeating-radial-gradient(circle at 0 100%, transparent 0 10cqi, rgba(255, 255, 255, .15) 10cqi 11.5cqi); }
.cover--p3 .cover__bg::after { background: radial-gradient(ellipse at 100% 0, var(--c3), transparent 58%); opacity: .75; }
.cover::before { /* spine */
  content: ''; position: absolute; inset: 0 auto 0 0; width: 7%; z-index: 3; pointer-events: none;
  background: linear-gradient(90deg, rgba(0, 0, 0, .3), rgba(255, 255, 255, .14) 65%, transparent);
}
.cover::after { /* shine sweep on hover */
  content: ''; position: absolute; inset: 0; z-index: 4; pointer-events: none;
  background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, .38) 45%, transparent 60%);
  transform: translateX(-130%); transition: transform .8s ease;
}
a:hover .cover::after { transform: translateX(130%); }
.cover__content {
  position: relative; z-index: 2; height: 100%;
  display: flex; flex-direction: column; padding: 9cqi 8cqi 9cqi 12cqi;
  text-shadow: 0 1px 14px rgba(0, 0, 0, .25);
}
.cover__series { font-size: 6.6cqi; font-weight: 700; letter-spacing: .06em; opacity: .9; max-width: 72%; line-height: 1.15; }
.cover__title {
  margin-top: auto; font-family: var(--font-display); font-weight: 800;
  font-size: 12.5cqi; line-height: .98; letter-spacing: -0.02em;
  display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden;
  overflow-wrap: break-word; hyphens: auto;
}
.cover__author { margin-top: 5cqi; font-size: 7cqi; font-weight: 700; opacity: .92; }
.cover__num {
  position: absolute; top: 6cqi; right: 6cqi; z-index: 5;
  min-width: 18cqi; height: 18cqi; padding: 0 4cqi; border-radius: 999px;
  display: grid; place-items: center; background: #fff; color: var(--ink);
  font: 800 9.5cqi var(--font-display); box-shadow: 0 4px 10px rgba(0, 0, 0, .25);
}
.cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 3; }

/* ── Series card ──────────────────────────────────────────── */
.scard { display: block; width: clamp(138px, 34vw, 188px); }
.scard__cover { position: relative; transition: transform .35s cubic-bezier(.2, .8, .2, 1); }
.scard:hover .scard__cover, .scard:focus-visible .scard__cover { transform: translateY(-8px) rotate(-1.5deg); }
.scard:focus-visible { outline: none; }
.scard:focus-visible .cover { outline: 3px solid var(--pink); outline-offset: 3px; }
.scard__count {
  position: absolute; right: 7px; top: 7px; z-index: 6;
  background: rgba(12, 8, 30, .74); color: #fff; font-size: 12px; font-weight: 700;
  padding: 3px 9px; border-radius: 999px; backdrop-filter: blur(6px);
}
.scard__info { padding: 12px 2px 0; }
.scard h3 { font-size: 17px; font-weight: 700; line-height: 1.15; }
.scard p { margin: 4px 0 0; color: var(--muted); font-size: 14px; line-height: 1.3; }
.scard .scard__hint { color: var(--violet); font-weight: 700; font-size: 13px; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 28px 18px; }
.grid .scard { width: auto; }
@media (min-width: 760px) { .grid { grid-template-columns: repeat(auto-fill, minmax(176px, 1fr)); gap: 36px 24px; } }

/* ── Featured card ────────────────────────────────────────── */
.fcard {
  position: relative; isolation: isolate; overflow: hidden;
  width: min(86vw, 580px); min-height: 270px;
  display: grid; grid-template-columns: 1fr 44%; gap: 8px; align-items: center;
  padding: clamp(22px, 3vw, 30px); border-radius: 30px; color: #fff;
  background: linear-gradient(135deg, var(--c1), var(--c2));
  box-shadow: var(--shadow); transition: transform .35s ease;
}
.fcard::before { content: ''; position: absolute; inset: 0; z-index: -1; background: radial-gradient(circle at 88% 12%, var(--c3), transparent 52%); opacity: .55; }
.fcard:hover { transform: translateY(-6px); }
.fcard__by { font-size: 14px; font-weight: 700; opacity: .85; }
.fcard h3 { font-size: clamp(25px, 3.6vw, 36px); font-weight: 800; margin: 6px 0 10px; letter-spacing: -0.03em; }
.fcard p { margin: 0 0 18px; font-size: 15px; opacity: .92; line-height: 1.45; }
.fcard__cta { display: inline-flex; background: #fff; color: var(--ink); font-weight: 800; font-size: 14px; padding: 10px 16px; border-radius: 999px; }
@media (max-width: 480px) {
  .fcard { grid-template-columns: 1fr; min-height: 0; }
  .fcard .fan { order: -1; min-height: 190px; }
  .fcard .fan__item { width: 34%; }
}

/* Fanned covers (featured + series hero) */
.fan { position: relative; min-height: 220px; height: 100%; }
.fan__item { position: absolute; top: 50%; left: 50%; width: 58%; transition: transform .45s cubic-bezier(.2, .8, .2, 1); }
.fan__item--0 { transform: translate(-50%, -52%); z-index: 3; }
.fan__item--1 { transform: translate(-12%, -48%) rotate(11deg); z-index: 2; }
.fan__item--2 { transform: translate(-88%, -48%) rotate(-11deg); z-index: 1; }
.fcard:hover .fan__item--1, .fan--hero:hover .fan__item--1 { transform: translate(0%, -46%) rotate(16deg); }
.fcard:hover .fan__item--2, .fan--hero:hover .fan__item--2 { transform: translate(-100%, -46%) rotate(-16deg); }
.fcard:hover .fan__item--0 { transform: translate(-50%, -56%); }

/* ── Author card ──────────────────────────────────────────── */
.acard { display: block; width: clamp(118px, 28vw, 150px); text-align: center; }
.avatar {
  --size: clamp(96px, 23vw, 128px);
  width: var(--size); height: var(--size); margin: 0 auto; border-radius: 50%;
  display: grid; place-items: center; flex: none;
  font: 800 calc(var(--size) * .34) var(--font-display); letter-spacing: -0.03em; color: #fff;
  background: linear-gradient(135deg, var(--c1), var(--c2));
  box-shadow: 0 0 0 5px var(--bg), 0 0 0 7px var(--c1), var(--shadow);
  transition: transform .3s ease;
}
.acard:hover .avatar { transform: scale(1.06) rotate(-5deg); }
.acard h3 { font-size: 16px; font-weight: 700; margin-top: 16px; }
.acard p { margin: 3px 0 0; font-size: 13px; color: var(--muted); }
.avatar--sm { --size: 40px; margin: 0; box-shadow: none; }
.shelf--authors .shelf__track { padding-top: 18px; }
.author-row { display: flex; flex-wrap: wrap; gap: 24px; margin-bottom: 12px; }

/* ── Band ─────────────────────────────────────────────────── */
.band { margin-top: clamp(48px, 7vw, 88px); }
.band__inner {
  position: relative; overflow: hidden; isolation: isolate;
  border-radius: 34px; padding: clamp(28px, 5vw, 60px);
  background: var(--ink); color: #fff;
}
:root[data-theme="dark"] .band__inner { background: var(--surface-2); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .band__inner { background: var(--surface-2); } }
.band__inner::before {
  content: ''; position: absolute; right: -80px; top: -80px; width: 320px; height: 320px; z-index: -1;
  border-radius: 50%; background: var(--grad); filter: blur(40px); opacity: .55;
}
.band h2 { font-size: clamp(30px, 5vw, 58px); font-weight: 800; letter-spacing: -0.035em; max-width: 13em; }
.band p { font-size: 17px; opacity: .85; max-width: 34em; margin: 14px 0 26px; }
.band__stats { display: flex; flex-wrap: wrap; gap: clamp(20px, 5vw, 56px); }
.band__stats b { display: block; font: 800 clamp(34px, 5vw, 52px) var(--font-display); color: var(--yellow); line-height: 1; }
.band__stats span { font-size: 14px; font-weight: 600; opacity: .8; }

/* ── Footer ───────────────────────────────────────────────── */
.site-footer { margin-top: clamp(56px, 8vw, 96px); border-top: 1px solid var(--line); padding: 34px 0 44px; color: var(--muted); font-size: 14px; }
.footer__inner { display: grid; gap: 28px 40px; grid-template-columns: 1fr; }
@media (min-width: 760px) { .footer__inner { grid-template-columns: 1fr auto 2fr; } }
.footer__slogan { font-family: var(--font-display); font-weight: 800; color: var(--pink); }
.footer__col h2 { font-size: 13px; font-family: var(--font-body); font-weight: 800; color: var(--text); margin: 0 0 10px; letter-spacing: 0; }
.footer__col { display: flex; flex-direction: column; gap: 7px; }
.footer__links { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 7px 18px; }
.footer__col a:hover { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.footer__brand { font-family: var(--font-display); font-size: 18px; color: var(--text); }
.footer__inner p { margin: 4px 0 0; }
.footer__nav { display: flex; flex-wrap: wrap; gap: 8px 18px; font-weight: 700; }
.footer__nav a:hover { color: var(--text); }
.footer__disclosure { grid-column: 1 / -1; font-size: 13px; font-weight: 600; }

/* ── Series page ──────────────────────────────────────────── */
.sp-hero {
  position: relative; isolation: isolate; overflow: hidden; color: #fff;
  background: linear-gradient(135deg, var(--c1), var(--c2));
  padding: clamp(24px, 4vw, 48px) 0 clamp(40px, 6vw, 72px);
}
.sp-hero::before {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(circle at 85% 20%, var(--c3), transparent 42%),
    radial-gradient(rgba(255, 255, 255, .12) 1.2px, transparent 1.8px) 0 0 / 16px 16px;
  opacity: .6;
}
.sp-hero__inner { display: grid; gap: 20px; align-items: center; }
@media (min-width: 860px) { .sp-hero__inner { grid-template-columns: 1.25fr 1fr; gap: 40px; } }
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: 14px; font-weight: 700; opacity: .85; }
.crumbs a:hover { text-decoration: underline; text-underline-offset: 3px; }
.sp-title { font-size: clamp(38px, 7vw, 78px); font-weight: 800; letter-spacing: -0.045em; line-height: .95; margin: 14px 0 10px; }
.sp-title__sub { display: block; font-size: .5em; letter-spacing: -0.03em; margin-top: .12em; opacity: .92; }
.sp-author { font-size: 18px; font-weight: 600; margin: 0; }
.sp-author a { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.sp-stats { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0; }
.sp-stats li {
  background: rgba(255, 255, 255, .16); backdrop-filter: blur(8px);
  padding: 6px 13px; border-radius: 999px; font-size: 14px; font-weight: 700;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .22);
}
.sp-desc { font-size: 17px; max-width: 36em; margin: 0 0 24px; opacity: .95; }
.sp-ctas { display: flex; flex-wrap: wrap; gap: 10px; }
.fan--hero { min-height: 300px; order: -1; }
.fan--hero .fan__item { width: clamp(118px, 34%, 210px); }
@media (min-width: 860px) { .fan--hero { min-height: 400px; order: 0; } }

.order { padding-top: clamp(32px, 5vw, 56px); }
.order__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.order__head h2 { font-size: clamp(30px, 4.4vw, 46px); font-weight: 800; letter-spacing: -0.035em; }
.tabs { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: 999px; background: var(--surface-2); }
.tab { border: 0; background: transparent; color: var(--muted); font-weight: 700; font-size: 14px; padding: 9px 16px; border-radius: 999px; cursor: pointer; transition: background .2s, color .2s; }
.tab.is-active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
.order__note { color: var(--muted); font-size: 16px; margin: 10px 0 26px; min-height: 1px; max-width: 42em; }

.booklist { list-style: none; margin: 0; padding: 0; position: relative; display: grid; gap: 18px; }
.booklist::before {
  content: ''; position: absolute; left: 22.5px; top: 30px; bottom: 30px; width: 3px; border-radius: 3px;
  background: linear-gradient(var(--c1), var(--c2)); opacity: .35;
}
.booklist.is-swapping .book { animation: swapIn .4s ease both; }
@keyframes swapIn { from { opacity: 0; transform: translateY(8px); } }
.book { display: grid; grid-template-columns: 48px 1fr; gap: 14px; align-items: start; }
.book__step {
  position: relative; z-index: 1; margin-top: 16px;
  width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center;
  font: 800 20px var(--font-display); color: #fff;
  background: linear-gradient(135deg, var(--c1), var(--c2));
  box-shadow: 0 0 0 5px var(--bg), 0 8px 16px -6px var(--c1);
}
.book__card {
  display: grid; grid-template-columns: clamp(86px, 21vw, 132px) 1fr; gap: clamp(14px, 2.5vw, 26px);
  background: var(--surface); border-radius: 24px; padding: clamp(12px, 2vw, 18px);
  box-shadow: var(--shadow-sm), inset 0 0 0 1px var(--line);
  transition: transform .3s ease, box-shadow .3s ease;
}
.book__card:hover { transform: translateX(4px); box-shadow: var(--shadow), inset 0 0 0 1px var(--line); }
.book__cover .cover { transition: transform .35s ease; }
.book__card:hover .book__cover .cover { transform: rotate(-3deg) scale(1.03); }
.book__body { min-width: 0; align-self: center; }
.book__meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 8px; }
.tag { font-size: 12px; font-weight: 800; padding: 4px 10px; border-radius: 999px; background: var(--surface-2); color: var(--text); }
.tag--year { background: transparent; color: var(--muted); padding-inline: 2px; }
.tag--prequel { background: #ffe8a3; color: #5e4200; }
.tag--novella { background: #c6f6ee; color: #00524a; }
.tag--spin-off { background: #ffd3e6; color: #86003e; }
.tag--companion { background: #e1d6ff; color: #3a1a99; }
.tag--collection { background: #d6ecff; color: #0b4a86; }
.book h3 { font-size: clamp(19px, 2.4vw, 25px); font-weight: 800; letter-spacing: -0.025em; margin-bottom: 6px; }
.book p { margin: 0 0 16px; color: var(--muted); font-size: 15px; max-width: 42em; }
.arc {
  padding-left: 62px; margin-top: 8px;
  font: 800 clamp(18px, 2vw, 21px) var(--font-display); color: var(--text);
  position: relative;
}
.arc::before { content: ''; position: absolute; left: 16px; top: 50%; width: 16px; height: 16px; border-radius: 50%; transform: translateY(-50%); background: var(--c3); box-shadow: 0 0 0 5px var(--bg); }
.callout { margin: 26px 0 0; padding: 16px 20px; border-radius: 20px; background: var(--surface-2); font-weight: 600; display: flex; gap: 10px; align-items: center; }
.disclosure { font-size: 12px; color: var(--muted); margin: 18px 0 0; }
.disclosure--hero { color: rgba(255, 255, 255, .85); margin-top: 14px; }
@media (max-width: 560px) {
  .book { grid-template-columns: 34px 1fr; gap: 8px; }
  .book__step { width: 34px; height: 34px; font-size: 15px; margin-top: 12px; box-shadow: 0 0 0 4px var(--bg); }
  .booklist::before { left: 15.5px; }
  .book p { font-size: 14px; margin-bottom: 14px; }
  .arc { padding-left: 42px; }
  .arc::before { left: 9px; }
  .book__card:hover { transform: none; }
}

/* ── Search / genre / empty ───────────────────────────────── */
.page-head { padding-top: clamp(28px, 5vw, 56px); }
.page-head h1 { font-size: clamp(34px, 6vw, 62px); font-weight: 800; letter-spacing: -0.04em; overflow-wrap: anywhere; }
.page-head__search { margin-top: 20px; }
.results { margin-top: clamp(26px, 4vw, 40px); }
.section-title { font-size: clamp(21px, 2.6vw, 28px); font-weight: 800; margin: 12px 0 20px; display: flex; align-items: center; gap: 10px; }
.section-title .count { font: 800 14px var(--font-body); background: var(--surface-2); padding: 3px 10px; border-radius: 999px; }
.genre-hero {
  color: #fff; padding: clamp(36px, 6vw, 72px) 0;
  background: linear-gradient(120deg, var(--g1), var(--g2));
  border-radius: 0 0 clamp(28px, 5vw, 48px) clamp(28px, 5vw, 48px);
}
.genre-hero__emoji { font-size: clamp(44px, 7vw, 64px); display: block; }
.genre-hero h1 { font-size: clamp(42px, 8vw, 88px); font-weight: 800; letter-spacing: -0.045em; margin: 8px 0 10px; }
.genre-hero p { font-size: 18px; opacity: .92; margin: 0; max-width: 32em; }
.empty { text-align: center; padding: 20px 0 36px; }
.empty h1, .empty h2 { font-size: clamp(26px, 4vw, 40px); font-weight: 800; }
.empty p { color: var(--muted); }
.empty__big { font-size: 56px; margin: 0; }
.empty--page { padding-top: clamp(48px, 8vw, 96px); display: flex; flex-direction: column; align-items: center; gap: 8px; }

/* ── Motion preferences ───────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .marquee__track { animation: none; }
}

/* ── SEO content sections (same look and feel) ──────────── */
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: 999px; font-weight: 800; transition: top .2s; }
.skip-link:focus { top: calc(env(safe-area-inset-top, 0px) + 10px); }
.crumbs [aria-current] { opacity: .8; }
.crumbs--dark { color: var(--muted); opacity: 1; }
.genre-hero .crumbs { margin-bottom: 14px; }
.intro { padding-top: clamp(32px, 5vw, 56px); max-width: 1240px; }
.intro h2, .faq h2, .explore h2 { font-size: clamp(24px, 3.4vw, 34px); font-weight: 800; letter-spacing: -0.03em; margin-bottom: 14px; }
.intro p { font-size: 17px; max-width: 46em; margin: 0 0 14px; color: var(--text); }
.intro strong { font-weight: 700; }
.order { padding-top: clamp(20px, 3vw, 32px); }
.faq { margin-top: clamp(40px, 6vw, 64px); }
.faq__item { background: var(--surface); border-radius: 22px; padding: 18px 22px; margin-bottom: 12px; box-shadow: var(--shadow-sm), inset 0 0 0 1px var(--line); max-width: 52em; }
.faq__item h3 { font-size: 19px; font-weight: 800; margin-bottom: 6px; }
.faq__item p { margin: 0; color: var(--muted); }
.explore { margin-top: clamp(36px, 5vw, 56px); }
.explore__links { display: flex; flex-wrap: wrap; gap: 10px; }
.author-head__row { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; margin-top: 14px; }
.author-head .avatar { margin: 0; --size: clamp(84px, 16vw, 120px); }
.author-head p { font-size: 17px; color: var(--muted); margin: 10px 0 0; max-width: 40em; }
.author-head p a, .titlelist a, .titlelist__more a, .intro a { color: var(--violet); font-weight: 700; }
.author-series { display: grid; grid-template-columns: auto 1fr; gap: clamp(18px, 4vw, 40px); align-items: start; margin-top: clamp(32px, 5vw, 48px); }
.author-series h2 { font-size: clamp(22px, 3vw, 30px); font-weight: 800; margin-bottom: 12px; }
.titlelist { margin: 0; padding-left: 1.4em; display: grid; gap: 6px; font-size: 16px; }
.titlelist span { color: var(--muted); }
.titlelist__more { color: var(--muted); }
@media (max-width: 560px) { .author-series { grid-template-columns: 1fr; } }

/* ── Worth Reading (standalone recommendations) ─────────── */
.recs-top { margin-top: clamp(28px, 4vw, 48px); }
.rfeature {
  position: relative; isolation: isolate; overflow: hidden;
  display: grid; grid-template-columns: clamp(150px, 30%, 280px) 1fr; gap: clamp(20px, 4vw, 48px); align-items: center;
  padding: clamp(22px, 4vw, 44px); border-radius: 34px; color: #fff;
  background: linear-gradient(135deg, var(--c1), var(--c2));
  box-shadow: var(--shadow-lg), 0 0 0 4px var(--yellow);
}
.rfeature::before { content: ''; position: absolute; inset: 0; z-index: -1; opacity: .6;
  background: radial-gradient(circle at 90% 10%, var(--c3), transparent 45%), radial-gradient(rgba(255,255,255,.12) 1.2px, transparent 1.8px) 0 0 / 16px 16px; }
.rfeature__cover .cover { transform: rotate(-4deg); transition: transform .4s cubic-bezier(.2,.8,.2,1); box-shadow: 0 30px 50px -20px rgba(0,0,0,.6); }
.rfeature:hover .rfeature__cover .cover { transform: rotate(0) scale(1.03); }
.rfeature__badge {
  display: inline-flex; align-items: center; gap: 6px; background: var(--yellow); color: var(--ink);
  font: 800 14px var(--font-body); padding: 7px 14px; border-radius: 999px; box-shadow: 0 4px 0 #d89f00; transform: rotate(-2deg);
}
.rfeature__badge--hero { margin: 16px 0 4px; }
.rfeature h2 { font-size: clamp(32px, 5.5vw, 60px); font-weight: 800; letter-spacing: -0.04em; margin: 16px 0 8px; }
.rfeature h2 a:hover { text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 6px; }
.rfeature__by { margin: 0; font-size: 17px; font-weight: 600; opacity: .92; }
.rfeature__by span { font-weight: 800; }
.rfeature__blurb { font-size: clamp(16px, 1.8vw, 19px); max-width: 34em; margin: 14px 0 22px; opacity: .95; }
.rfeature__ctas { display: flex; flex-wrap: wrap; gap: 10px; }
@media (max-width: 600px) {
  .rfeature { grid-template-columns: 1fr; text-align: left; }
  .rfeature__cover { width: 56%; margin: 0 auto; }
}
.rgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 18px; }
.rcard {
  display: grid; grid-template-columns: clamp(96px, 26%, 130px) 1fr; gap: 18px; align-items: start;
  background: var(--surface); border-radius: 24px; padding: 16px;
  box-shadow: var(--shadow-sm), inset 0 0 0 1px var(--line); transition: transform .3s ease, box-shadow .3s ease;
}
.rcard:hover { transform: translateY(-4px); box-shadow: var(--shadow), inset 0 0 0 1px var(--line); }
.rcard__cover .cover { transition: transform .35s ease; }
.rcard:hover .rcard__cover .cover { transform: rotate(-3deg) scale(1.03); }
.rcard h3 { font-size: 21px; font-weight: 800; letter-spacing: -0.02em; margin: 10px 0 2px; }
.rcard h3 a:hover { color: var(--violet); }
.rcard__by { margin: 0; color: var(--muted); font-weight: 600; font-size: 14px; }
.rcard__blurb { margin: 10px 0 14px; color: var(--muted); font-size: 15px; }
.rec-hero__cover { width: clamp(170px, 40%, 300px); margin: 0 auto; transform: rotate(4deg); order: -1; }
@media (min-width: 860px) { .rec-hero__cover { order: 0; } }
.rec-subtitle { font-family: var(--font-display); font-weight: 700; font-size: clamp(17px, 2vw, 22px); margin: 0 0 8px; opacity: .92; }
.cover--square { aspect-ratio: 1 / 1; }
.rfeature__badge--sm { font-size: 12px; padding: 5px 11px; margin: 0 6px 8px 0; box-shadow: 0 3px 0 #d89f00; }
.rcard__body .tag { display: inline-block; margin-bottom: 4px; }
.disclosure.container { margin-left: auto; margin-right: auto; }
