/* ==================================================================
   The Buzz Nepal — E-Paper archive & flipbook reader
   Built on Bootstrap 5.3 (grid, buttons, utilities) + custom identity
   Palette: white + one flat red (#CE181E). No gradients anywhere.
   ================================================================== */

/* ---------- tokens ---------- */
:root {
  color-scheme: light;               /* single light theme: white + red */
  --ground: #ffffff;
  --surface: #ffffff;
  --surface-2: rgba(206, 24, 30, .04);
  --ink: #1c1517;
  --ink-2: #4d4245;
  --muted: #8a7a7d;
  --line: rgba(206, 24, 30, .15);
  --red: #CE181E;               /* the one brand colour — nothing else is coloured */
  --red-bright: #CE181E;        /* kept as aliases so older rules keep working */
  --red-deep: #CE181E;
  --red-soft: rgba(206, 24, 30, .10);
  --red-tint: rgba(206, 24, 30, .06);
  --shadow-1: 0 1px 2px rgba(206, 24, 30, .08), 0 8px 24px -12px rgba(206, 24, 30, .28);
  --shadow-2: 0 2px 4px rgba(206, 24, 30, .12), 0 24px 48px -20px rgba(206, 24, 30, .5);

  /* reader chrome: white room with flat red bars */
  --rd-ground: #ffffff;
  --rd-panel: rgba(255, 255, 255, .94);
  --rd-line: rgba(206, 24, 30, .14);
  --rd-ink: #1c1517;
  --rd-muted: #8a7a7d;

  --font-display: 'Anton', 'Impact', 'Arial Narrow', sans-serif;
  --font-body: 'Archivo', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

}

/* ---------- base ---------- */
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
body.reader-open { overflow: hidden; }
img { max-width: 100%; height: auto; }
a { color: var(--red); text-decoration: none; }
a:hover { color: var(--red-deep); }
:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; }

.eyebrow {
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 .5rem;
}
.eyebrow-red { color: var(--red); }

/* ---------- buttons ---------- */
.btn { font-family: var(--font-body); font-weight: 600; border-radius: 4px; }
.btn-red {
  background: var(--red);
  border: 1px solid var(--red-deep);
  box-shadow: 0 6px 16px -8px rgba(206, 24, 30, .6);
  color: #fff;
  padding: .7rem 1.25rem;
  display: inline-flex; align-items: center; gap: .5rem;
}
.btn-red:hover, .btn-red:focus {
  background: var(--red);
  border-color: var(--red);
  filter: brightness(.92);
  color: #fff;
  box-shadow: 0 10px 22px -10px rgba(206, 24, 30, .7);
}
.btn-ghost {
  background: #fff;
  border: 1px solid var(--red);
  color: var(--red);
  padding: .7rem 1.25rem;
}
.btn-ghost:hover { background: var(--red-tint); border-color: var(--red-deep); color: var(--red-deep); }
.btn-outline-red {
  border: 1px solid var(--red);
  color: var(--red);
  padding: .3rem .8rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  font-size: .72rem;
}
.btn-outline-red:hover { background: var(--red); border-color: var(--red-deep); color: #fff; }

/* ---------- header ---------- */
.site-header {
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 6px 20px -14px rgba(206, 24, 30, .35);
  position: sticky;
  top: 0;
  z-index: 50;
  padding-block: .8rem;
  transition: padding .3s ease, box-shadow .3s ease;
}
.site-header.is-scrolled {
  padding-block: .4rem;
  box-shadow: 0 10px 28px -16px rgba(206, 24, 30, .45);
}
.site-header::after {
  content: "";
  display: block;
  position: absolute;
  left: 0; right: 0; bottom: -4px;
  height: 4px;
  background: var(--red);
}
.brand { display: inline-flex; align-items: center; gap: .9rem; }
.brand img {
  width: 120px; height: auto; display: block;
  transition: width .3s cubic-bezier(.2, .7, .2, 1);
}
.site-header.is-scrolled .brand img { width: 84px; }
.brand-tag {
  font-family: var(--font-display);
  font-size: 1.05rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--red);
  padding-left: .9rem;
  border-left: 2px solid var(--red-soft);
  line-height: 1;
}
.btn-back {
  display: inline-flex; align-items: center; gap: .45rem;
  border: 1px solid var(--red);
  color: var(--red);
  background: #fff;
  padding: .5rem .9rem .5rem .7rem;
  border-radius: 999px;
  font-size: .9rem;
  white-space: nowrap;
}
.btn-back:hover { background: var(--red); border-color: var(--red-deep); color: #fff; }
.btn-back svg { transition: transform .2s ease; }
.btn-back:hover svg { transform: translateX(-3px); }

/* ---------- archive head (flat red hero) ---------- */
.archive-head {
  padding-block: 3.5rem 5.5rem;
  margin-bottom: -3.5rem;
  background-color: var(--red);
  color: #fff;
  position: relative;
  overflow: hidden;
}
.archive-head .container-xl { position: relative; z-index: 1; }
.archive-head .eyebrow { color: rgba(255, 255, 255, .8); }
.display-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(3rem, 8vw, 6rem);
  line-height: .95;
  letter-spacing: .01em;
  text-transform: uppercase;
  margin: 0 0 1rem;
  text-wrap: balance;
}
.display-title em { font-style: normal; color: transparent; -webkit-text-stroke: 1.5px #fff; }
.lede { font-size: 1.1rem; color: rgba(255, 255, 255, .9); max-width: 36em; margin: 0; }

/* hero decorations */
.hero-mark {
  position: absolute; right: -2%; bottom: -22%;
  font-family: var(--font-display);
  font-size: clamp(14rem, 34vw, 30rem);
  line-height: 1;
  text-transform: lowercase;
  letter-spacing: -.02em;
  color: rgba(255, 255, 255, .07);
  -webkit-text-stroke: 1px rgba(255, 255, 255, .12);
  pointer-events: none;
  user-select: none;
}
.hero-orb {
  position: absolute; border-radius: 50%;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, .22);
  pointer-events: none;
  animation: float 9s ease-in-out infinite;
}
.hero-orb-1 { width: 260px; height: 260px; right: 18%; top: -80px; }
.hero-orb-2 { width: 160px; height: 160px; right: 6%; top: 45%; animation-delay: -4s; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-16px); } }
.hero-pill {
  display: inline-flex; align-items: center; gap: .5rem;
  background: rgba(255, 255, 255, .16);
  border: 1px solid rgba(255, 255, 255, .35);
  backdrop-filter: blur(6px);
  color: #fff;
  font-size: .78rem; font-weight: 600; letter-spacing: .04em;
  padding: .35rem .85rem .35rem .6rem;
  border-radius: 999px;
  margin: 0 0 1.1rem;
}
.pulse-dot {
  width: 8px; height: 8px; border-radius: 50%; background: #fff;
  box-shadow: 0 0 0 0 rgba(255,255,255,.6);
  animation: pulse 2s ease-out infinite;
}
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(255,255,255,.6); } 100% { box-shadow: 0 0 0 10px rgba(255,255,255,0); } }
.hero-perks {
  list-style: none; padding: 0; margin: 1.4rem 0 0;
  display: flex; flex-wrap: wrap; gap: .5rem 1.4rem;
  color: rgba(255,255,255,.92); font-size: .9rem; font-weight: 500;
}
.hero-fan {
  position: relative;
  height: 400px;
  display: flex; align-items: flex-end; justify-content: center;
}
.fan-cover {
  position: absolute; bottom: 0; left: 50%;
  width: 220px; aspect-ratio: 527 / 790;
  padding: 0; border: 0; background: #fff;
  border-radius: 4px;
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 30px 50px -20px rgba(0, 0, 0, .35), 0 0 0 1px rgba(255,255,255,.35);
  transform-origin: 50% 110%;
  transform: translateX(-50%) rotate(calc((var(--n) - 1) * 12deg)) translateY(calc((var(--n) - 1) * (var(--n) - 1) * 10px));
  transition: transform .35s cubic-bezier(.2, .7, .2, 1), box-shadow .35s ease;
  z-index: calc(3 - var(--n));
}
.fan-cover:nth-child(2) { z-index: 4; }
.fan-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.fan-cover:hover, .fan-cover:focus-visible {
  transform: translateX(-50%) rotate(calc((var(--n) - 1) * 12deg)) translateY(-14px);
  z-index: 9;
  box-shadow: 0 40px 60px -22px rgba(0, 0, 0, .45), 0 0 0 1px rgba(255,255,255,.6);
}
.fan-cover:focus-visible { outline-color: #fff; }
.hero-perks li { display: inline-flex; align-items: center; gap: .45rem; }
.hero-perks svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; background: rgba(255,255,255,.18); border-radius: 50%; padding: 3px; }

/* ---------- covers (shared) ---------- */
.cover-btn {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  aspect-ratio: 527 / 790;
  border-radius: 3px;
  box-shadow: var(--shadow-1);
  transform: perspective(1000px) rotateY(0) translateY(0);
  transition: transform .35s cubic-bezier(.2, .7, .2, 1), box-shadow .35s ease;
  overflow: hidden;
  isolation: isolate;
}
.cover-btn img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cover-btn::after {           /* spine edge */
  content: "";
  position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
  background: rgba(0, 0, 0, .10);
  pointer-events: none;
}
.cover-hint {
  position: absolute;
  left: 50%; bottom: 1rem;
  transform: translate(-50%, 8px);
  background: var(--red);
  color: #fff;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: .45rem .8rem;
  border-radius: 999px;
  white-space: nowrap;
  opacity: 0;
  transition: opacity .25s ease, transform .25s ease;
  pointer-events: none;
}
.cover-btn:hover, .cover-btn:focus-visible {
  transform: perspective(1000px) rotateY(-7deg) translateY(-6px);
  box-shadow: var(--shadow-2);
}
.cover-btn:hover .cover-hint, .cover-btn:focus-visible .cover-hint { opacity: 1; transform: translate(-50%, 0); }

/* ---------- featured ---------- */
.featured { padding-block: 0 3rem; position: relative; z-index: 2; }
.featured-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  position: relative;
  box-shadow: var(--shadow-2);
}
.featured-card::before {
  content: "";
  position: absolute; left: 0; top: 0; bottom: 0; width: 6px;
  background: var(--red);
}
.featured-num {                   /* giant outlined issue number */
  position: absolute; right: 1.5rem; bottom: -.18em;
  font-family: var(--font-display);
  font-size: clamp(9rem, 22vw, 20rem);
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1.5px rgba(206, 24, 30, .14);
  pointer-events: none; user-select: none;
  z-index: 0;
}
.featured-card .row { position: relative; z-index: 1; }
.featured-stack {                 /* stacked sheets behind the cover */
  position: relative;
  margin: 1.75rem 1.5rem 1.75rem 2rem;
  max-width: 320px;
}
.featured-stack::before, .featured-stack::after {
  content: "";
  position: absolute; inset: 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 3px;
  box-shadow: var(--shadow-1);
  z-index: 0;
}
.featured-stack::before { transform: rotate(-3deg) translate(-8px, 6px); }
.featured-stack::after  { transform: rotate(2.5deg) translate(9px, 4px); }
.featured-cover { position: relative; z-index: 1; margin: 0; width: auto; }
.featured-body { padding: 2rem 2rem 2rem 1rem; }
.badge-new {
  display: inline-block;
  background: var(--red);
  color: #fff;
  font-size: .62rem; font-weight: 700; letter-spacing: .12em;
  padding: .2rem .5rem;
  border-radius: 3px;
  margin-right: .6rem;
  vertical-align: 1px;
}
.featured-facts {
  list-style: none; padding: 0; margin: 0 0 1.5rem;
  display: flex; flex-wrap: wrap; gap: .75rem;
}
.featured-facts li {
  display: flex; flex-direction: column;
  min-width: 7.5em;
  padding: .6rem .9rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.fact-val { font-family: var(--font-display); font-size: 1.35rem; line-height: 1; color: var(--red); font-variant-numeric: tabular-nums; }
.fact-key { font-size: .68rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin-top: .3rem; }
.btn-lg-cta { padding-inline: 1.4rem; }
.cta-arrow { margin-left: .1rem; transition: transform .2s ease; }
.btn-lg-cta:hover .cta-arrow { transform: translateX(4px); }
.featured-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1;
  text-transform: uppercase;
  margin: 0 0 .6rem;
  text-wrap: balance;
}
.featured-meta { color: var(--muted); font-size: .9rem; margin: 0 0 1rem; font-variant-numeric: tabular-nums; }
.featured-blurb { color: var(--ink-2); max-width: 52em; margin: 0 0 1.5rem; }
@media (max-width: 767.98px) {
  .featured-stack { margin: 1.5rem auto 0; max-width: 260px; }
  .featured-body { padding: 1.5rem; }
}

/* ---------- ticker ---------- */
.ticker {
  overflow: hidden;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #fff;
  margin-bottom: 3.5rem;
}
.ticker-track {
  display: flex; align-items: center; gap: 2rem;
  width: max-content;
  padding-block: .8rem;
  animation: ticker 36s linear infinite;
}
.ticker:hover .ticker-track { animation-play-state: paused; }
.ticker-track span {
  font-family: var(--font-display);
  font-size: 1.05rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink);
  white-space: nowrap;
}
.ticker-track i {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--red);
  flex: none;
}
@keyframes ticker { to { transform: translateX(-50%); } }

/* ---------- section headings ---------- */
.section-head { text-align: center; margin-bottom: 2rem; }
.section-kicker {
  display: inline-flex; align-items: center; gap: .6rem;
  font-size: .72rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 .5rem;
}
.section-kicker span {
  font-family: var(--font-display);
  font-size: .95rem; letter-spacing: .04em;
  color: var(--red);
  padding-right: .6rem;
  border-right: 2px solid var(--red-soft);
}
.section-head .section-title { font-size: clamp(1.6rem, 3vw, 2.2rem); }

/* ---------- perks strip ---------- */
.perks { padding-block: 0 3.5rem; }
.perk {
  height: 100%;
  padding: 1.4rem 1.5rem;
  border-radius: 10px;
  background: #fff;
  border: 1px solid var(--line);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.perk:hover { transform: translateY(-4px); box-shadow: var(--shadow-1); border-color: rgba(206, 24, 30, .35); }
.perk-icon {
  display: grid; place-items: center;
  width: 44px; height: 44px;
  border-radius: 10px;
  background: var(--red);
  color: #fff;
  box-shadow: 0 8px 18px -8px rgba(206, 24, 30, .7);
  margin-bottom: .9rem;
}
.perk-icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.perk h3 { font-family: var(--font-display); font-weight: 400; font-size: 1.25rem; text-transform: uppercase; letter-spacing: .03em; margin: 0 0 .35rem; }
.perk p { margin: 0; color: var(--ink-2); font-size: .92rem; }

/* ---------- issues grid ---------- */
.issues { padding-block: 0 4rem; }
.count-pill {
  display: inline-block;
  font-family: var(--font-body);
  font-size: .72rem; font-weight: 700; letter-spacing: .06em;
  color: var(--red);
  background: var(--red-soft);
  border-radius: 999px;
  padding: .25rem .7rem;
  margin-left: .6rem;
  vertical-align: middle;
  text-transform: uppercase;
}
.issues-toolbar {
  display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 1rem;
  border-bottom: 2px solid var(--red);
  padding-bottom: .75rem;
  margin-bottom: 2rem;
}
.section-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.6rem;
  text-transform: uppercase;
  letter-spacing: .03em;
  margin: 0;
}
.year-filter { display: flex; gap: .4rem; flex-wrap: wrap; }
.chip {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-2);
  border-radius: 999px;
  padding: .3rem .9rem;
  font-size: .82rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.chip:hover { border-color: var(--red); color: var(--red); background: var(--red-tint); }
.chip.is-active { background: var(--red); border-color: var(--red-deep); color: #fff; }

.issue-card {
  display: flex; flex-direction: column; gap: 1rem; height: 100%;
  padding: .9rem .9rem 1rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.issue-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-1); border-color: rgba(206, 24, 30, .35); }
.issue-card .cover-btn { border-radius: 4px; }
.issue-meta { display: flex; flex-direction: column; flex: 1; }
.issue-meta .eyebrow { color: var(--red); }
.issue-meta .eyebrow { margin-bottom: .25rem; }
.issue-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.35rem;
  text-transform: uppercase;
  letter-spacing: .02em;
  margin: 0 0 .2rem;
  line-height: 1.1;
}
.issue-headline { color: var(--ink-2); font-size: .92rem; margin: 0 0 .8rem; }
.issue-foot {
  margin-top: auto;
  display: flex; align-items: center; justify-content: space-between; gap: .5rem;
  padding-top: .7rem;
  border-top: 1px solid var(--line);
}
.issue-pages { font-size: .8rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.ribbon {
  position: absolute; top: .75rem; left: 0;
  background: var(--red);
  color: #fff;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  padding: .3rem .7rem .3rem .6rem;
  clip-path: polygon(0 0, 100% 0, calc(100% - 7px) 50%, 100% 100%, 0 100%);
}

/* ---------- advertise CTA ---------- */
.cta-band { padding-block: 0 4rem; }
.cta-card {
  position: relative; overflow: hidden;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.5rem 2rem;
  padding: 2.25rem 2.5rem;
  border-radius: 14px;
  color: #fff;
  background-color: var(--red);
  box-shadow: 0 30px 50px -30px rgba(206, 24, 30, .7);
}
.cta-card::after {
  content: "";
  position: absolute; right: -60px; top: -60px;
  width: 260px; height: 260px; border-radius: 50%;
  border: 40px solid rgba(255,255,255,.08);
  pointer-events: none;
}
.cta-text { position: relative; z-index: 1; max-width: 34em; }
.cta-text .eyebrow { color: rgba(255,255,255,.8); }
.cta-text h2 { font-family: var(--font-display); font-weight: 400; font-size: clamp(1.6rem, 3vw, 2.4rem); text-transform: uppercase; line-height: 1.05; margin: 0 0 .5rem; }
.cta-text p { margin: 0; color: rgba(255,255,255,.9); }
.cta-actions { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: .6rem; }
.btn-white { background: #fff; border: 1px solid #fff; color: var(--red); padding: .7rem 1.25rem; box-shadow: 0 8px 18px -10px rgba(0,0,0,.4); }
.btn-white:hover { background: #fff; color: var(--red-deep); border-color: var(--red-tint); }
.btn-outline-white { background: transparent; border: 1px solid rgba(255,255,255,.7); color: #fff; padding: .7rem 1.25rem; }
.btn-outline-white:hover { background: rgba(255,255,255,.14); border-color: #fff; color: #fff; }
@media (max-width: 575.98px) { .cta-card { padding: 1.75rem 1.5rem; } }

/* ---------- scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s cubic-bezier(.2, .7, .2, 1); transition-delay: calc(var(--i, 0) * 60ms); }
.reveal.is-in { opacity: 1; transform: none; }
.archive-head .reveal:nth-child(2) { transition-delay: 80ms; }
.archive-head .reveal:nth-child(3) { transition-delay: 160ms; }
.archive-head .reveal:nth-child(4) { transition-delay: 240ms; }
.archive-head .reveal:nth-child(5) { transition-delay: 320ms; }

/* ---------- footer (flat red) ---------- */
.site-footer {
  background: var(--red);
  border-top: 4px solid #fff;
  box-shadow: 0 -1px 0 var(--line);
  padding-block: 2.5rem;
  color: rgba(255, 255, 255, .88);
  font-size: .9rem;
}
.footer-logo {
  width: 96px; height: auto; margin-bottom: .75rem; display: block;
  background: #fff; padding: 5px 8px; border-radius: 4px; box-sizing: content-box;
}
.site-footer { position: relative; overflow: hidden; }
.site-footer .container-xl { position: relative; z-index: 1; }
.footer-tag { margin: 0 0 .5rem; max-width: 34em; }
.footer-sub { margin: 0; font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; color: rgba(255,255,255,.65); }
.footer-head {
  font-family: var(--font-display);
  font-size: 1rem; letter-spacing: .1em; text-transform: uppercase;
  color: #fff; margin: 0 0 .6rem;
  padding-bottom: .4rem;
  border-bottom: 1px solid rgba(255,255,255,.25);
}
.footer-links { display: flex; flex-direction: column; gap: .4rem; }
.footer-links a { color: rgba(255,255,255,.88); transition: color .15s ease, transform .15s ease; }
.footer-links a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.footer-bottom {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 1.5rem;
  margin-top: 2rem; padding-top: 1.2rem;
  border-top: 1px solid rgba(255,255,255,.2);
  font-size: .8rem; color: rgba(255,255,255,.7);
}

/* ---------- back to top ---------- */
.to-top {
  position: fixed; right: 1.25rem; bottom: 1.25rem;
  width: 46px; height: 46px; border-radius: 50%;
  border: 0;
  background: var(--red);
  color: #fff;
  box-shadow: 0 12px 24px -10px rgba(206, 24, 30, .7);
  display: grid; place-items: center;
  cursor: pointer;
  z-index: 60;
  animation: rise .3s ease;
}
.to-top svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.to-top:hover { transform: translateY(-3px); }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }

/* ==================================================================
   Reader — white room, flat red toolbars
   ================================================================== */
.reader {
  position: fixed; inset: 0;
  z-index: 1000;
  background: var(--rd-ground);
  color: var(--rd-ink);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto auto;
  grid-template-columns: minmax(0, 1fr);
  --rbtn: 40px;
}
.reader[hidden] { display: none; }
.reader-top :focus-visible, .reader-bottom :focus-visible { outline-color: #fff; outline-offset: 1px; }

.reader-top, .reader-bottom {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .55rem 1rem;
  background: var(--red);
  color: #fff;
  position: relative;
  z-index: 2;
}
.reader-top { border-bottom: 1px solid rgba(0, 0, 0, .15); box-shadow: 0 4px 14px -8px rgba(206, 24, 30, .6); }
.reader-bottom { border-top: 1px solid rgba(0, 0, 0, .15); box-shadow: 0 -4px 14px -8px rgba(206, 24, 30, .6); }
.reader-brand { display: flex; align-items: center; gap: .9rem; min-width: 0; }
.reader-brand img { background: #fff; padding: 4px 6px; border-radius: 3px; width: 72px; height: auto; flex: none; box-shadow: 0 2px 6px rgba(0,0,0,.2); }
.reader-titles { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.reader-title { font-weight: 600; font-size: .95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.reader-sub { font-size: .75rem; color: rgba(255, 255, 255, .8); letter-spacing: .06em; text-transform: uppercase; }
.reader-actions, .pager, .tools { display: flex; align-items: center; gap: .25rem; }

.rbtn {
  width: var(--rbtn); height: var(--rbtn);
  display: inline-grid; place-items: center;
  border: 0; border-radius: 6px;
  background: transparent;
  color: #fff;
  cursor: pointer;
  transition: background .15s ease, color .15s ease;
}
.rbtn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.rbtn:hover { background: rgba(255,255,255,.18); color: #fff; }
.rbtn[aria-pressed="true"] { background: #fff; color: var(--red); }
.rbtn:disabled { opacity: .3; cursor: default; background: transparent; }
.rbtn-close:hover { background: #fff; color: var(--red-deep); }
.tool-sep { width: 1px; height: 22px; background: rgba(255,255,255,.35); margin-inline: .4rem; }
.zoom-level { font-size: .8rem; color: rgba(255,255,255,.85); min-width: 3.2em; text-align: center; font-variant-numeric: tabular-nums; }

.page-indicator { display: flex; align-items: center; gap: .35rem; margin-inline: .35rem; }
.page-input {
  width: 4.2em;
  text-align: center;
  background: #fff;
  border: 1px solid rgba(0,0,0,.1);
  color: var(--red-deep);
  font-weight: 600;
  border-radius: 6px;
  padding: .3rem .2rem;
  font-size: .9rem;
  font-variant-numeric: tabular-nums;
}
.page-input:focus { outline: 2px solid #fff; outline-offset: 1px; border-color: transparent; }
.page-total { font-size: .9rem; color: rgba(255,255,255,.85); font-variant-numeric: tabular-nums; }

/* stage */
.reader-stage {
  position: relative;
  min-height: 0;
  min-width: 0;
  display: flex;
  overflow: auto;
  overscroll-behavior: contain;
  touch-action: pan-x pan-y;
  scrollbar-width: thin;
  scrollbar-color: rgba(206,24,30,.35) transparent;
}
.reader-stage.is-zoomed { cursor: grab; }
.book-wrap { margin: auto; flex: none; position: relative; }
.nav-arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  z-index: 20;
  width: 52px; height: 52px;
  border: 0; border-radius: 50%;
  background: #fff;
  color: var(--red);
  box-shadow: 0 6px 18px -8px rgba(206, 24, 30, .5), 0 0 0 1px var(--line);
  display: grid; place-items: center;
  cursor: pointer;
  transition: background .15s ease, color .15s ease, opacity .2s ease;
}
.nav-arrow svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.nav-arrow:hover { background: var(--red); color: #fff; }
.nav-arrow:disabled { opacity: 0; pointer-events: none; }
.nav-prev { left: .75rem; }
.nav-next { right: .75rem; }
.reader-stage.is-zoomed .nav-arrow { position: fixed; }
@media (max-width: 767.98px) { .nav-arrow { display: none; } }

/* book */
.book {
  position: relative;
  width: 100%; height: 100%;
  display: flex;
  perspective: 2600px;
  opacity: 0;
  transition: opacity .35s ease;
}
.book.is-ready { opacity: 1; }
.book[data-mode="single"] { overflow: hidden; border-radius: 2px; }
.book[data-mode="single"] .page-left, .book[data-mode="single"] .spine { display: none; }
.page {
  position: relative;
  width: var(--page-w); height: var(--page-h);
  background: #fff;
  flex: none;
  box-shadow: 0 30px 60px -24px rgba(0, 0, 0, .3), 0 0 0 1px rgba(206, 24, 30, .08);
}
.page.is-empty { visibility: hidden; }
.face {
  position: absolute; inset: 0;
  background: #fff;
  overflow: hidden;
}
.face img { width: 100%; height: 100%; display: block; object-fit: contain; user-select: none; -webkit-user-drag: none; }
.face.is-loading {
  background: var(--red-soft);
  animation: shimmer 1.4s ease-in-out infinite;
}
@keyframes shimmer { 0%, 100% { opacity: 1; } 50% { opacity: .45; } }
.face.is-blank { background: transparent; }
.page-num { display: none; }

/* gutter shading */
.page-left::after, .page-right::after {
  content: ""; position: absolute; top: 0; bottom: 0; width: 9%;
  pointer-events: none; z-index: 2;
}
.page-left::after  { right: 0; width: 3%; background: rgba(0, 0, 0, .10); }
.page-right::after { left: 0;  width: 3%; background: rgba(0, 0, 0, .10); }
.book[data-mode="single"] .page-right::after { display: none; }
.spine {
  position: absolute; left: 50%; top: 0; bottom: 0; width: 2px; margin-left: -1px;
  background: rgba(0,0,0,.35); z-index: 3; pointer-events: none;
}
.book.at-start .page-left::after { display: none; }

/* the turning sheet */
.sheet {
  position: absolute; top: 0;
  width: var(--page-w); height: var(--page-h);
  transform-style: preserve-3d;
  z-index: 10;
  will-change: transform;
  pointer-events: none;
}
.sheet-next { left: var(--page-w); transform-origin: left center; }
.sheet-prev { left: 0; transform-origin: right center; }
.book[data-mode="single"] .sheet-next,
.book[data-mode="single"] .sheet-prev { left: 0; transform-origin: left center; }
.sheet-face {
  position: absolute; inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  background: #fff;
  overflow: hidden;
  box-shadow: 0 0 40px rgba(0, 0, 0, .18);
}
.sheet-back { transform: rotateY(180deg); }
.sheet-face .face { position: absolute; inset: 0; }
.sheet-shade {
  position: absolute; inset: 0; opacity: 0; pointer-events: none; z-index: 3;
}
.sheet-face .sheet-shade { background: rgba(0, 0, 0, .28); }
.book.is-flipping .page { box-shadow: 0 30px 60px -24px rgba(0, 0, 0, .3); }

/* loading overlay */
.reader-loading {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1rem;
  background: #fff;
  z-index: 30;
  transition: opacity .4s ease, visibility .4s;
  padding: 1rem;
  text-align: center;
}
.reader-loading.is-done { opacity: 0; visibility: hidden; pointer-events: none; }
.loading-cover { width: 120px; aspect-ratio: 527/790; box-shadow: 0 20px 40px -14px rgba(206,24,30,.6); border-radius: 2px; overflow: hidden; background: #fff; }
.loading-cover img { width: 100%; height: 100%; object-fit: cover; }
.loading-text { margin: 0; color: var(--rd-muted); font-size: .9rem; max-width: 30em; }
.reader-loading.is-error .loading-text { color: var(--red-deep); }
.loading-bar { width: min(280px, 70vw); height: 4px; background: var(--red-soft); border-radius: 2px; overflow: hidden; }
.loading-bar span { display: block; height: 100%; width: 0; background: var(--red); transition: width .3s ease; }
.reader-loading.is-error .loading-bar { display: none; }

/* thumbnails */
.reader-thumbs {
  background: var(--rd-panel);
  border-top: 1px solid var(--rd-line);
  backdrop-filter: blur(8px);
  padding: .6rem .75rem;
}
.reader-thumbs[hidden] { display: none; }
.thumbs-track {
  display: flex; gap: .6rem;
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(206,24,30,.35) transparent;
  padding-bottom: .25rem;
}
.thumb {
  flex: none;
  width: 58px;
  border: 0; padding: 0; background: none;
  color: var(--rd-muted);
  cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: .25rem;
  font-size: .7rem;
  font-variant-numeric: tabular-nums;
}
.thumb-img {
  display: block; width: 58px; aspect-ratio: 2/3;
  background: var(--red-soft);
  box-shadow: 0 2px 8px -3px rgba(206,24,30,.35);
  border-radius: 2px; overflow: hidden;
  outline: 2px solid transparent; outline-offset: 1px;
  transition: outline-color .15s ease, transform .15s ease;
}
.thumb-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb:hover .thumb-img { transform: translateY(-2px); outline-color: rgba(206,24,30,.4); }
.thumb.is-current .thumb-img { outline-color: var(--red); }
.thumb.is-current { color: var(--red); font-weight: 600; }

/* toast */
.reader-toast {
  position: absolute; left: 50%; bottom: 5.5rem;
  transform: translate(-50%, 10px);
  background: var(--red); color: #fff;
  box-shadow: 0 8px 20px -8px rgba(206,24,30,.6);
  padding: .5rem .9rem;
  border-radius: 999px;
  font-size: .85rem; font-weight: 600;
  opacity: 0; pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
  z-index: 40;
}
.reader-toast.show { opacity: 1; transform: translate(-50%, 0); }

/* small screens */
@media (max-width: 575.98px) {
  .reader { --rbtn: 36px; }
  .reader-top, .reader-bottom { padding: .45rem .5rem; }
  .reader-brand img { display: none; }
  .reader-bottom { flex-wrap: wrap; justify-content: center; }
  .tools .zoom-level { display: none; }
  .btn-back span { display: none; }
  .btn-back { padding: .5rem .6rem; }
  .archive-head { padding-block: 2.5rem 4.5rem; margin-bottom: -3rem; }
}

/* motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .cover-btn, .btn-back svg, .cover-hint, .book, .reader-loading, .reveal, .issue-card, .perk, .cta-arrow { transition: none; }
  .face.is-loading, .hero-orb, .pulse-dot, .ticker-track, .to-top { animation: none; }
  .fan-cover, .site-header, .brand img { transition: none; }
  .reveal { opacity: 1; transform: none; }
}
