/* The episode, as a comic. Dark-first like the rest of the site: panels are inked in pale line on a
   night page, and flip to black line on white in light mode. Two voices, two looks: white balloons
   are the heroes' own words (verbatim from their reports), yellow captions are the narrator. */

:root {
  --c-page: #07080c;
  --c-panel: #141821;
  --c-dots: rgba(255, 255, 255, 0.05);
  --c-ink: #ece6d6;
  --c-cap: #f6cf45;
  --c-cap-ink: #17130a;
  --c-balloon: #fbfaf5;
  --c-balloon-ink: #111216;
  --c-sfx: #ffd23f;
  --c-sfx-line: #0b0c10;
  --c-red: #ff5a3c;
  --c-violet: #b9a2ff;
  --c-villain: #1c1012;
}
@media (prefers-color-scheme: light) {
  :root {
    --c-page: #e9e5da;
    --c-panel: #ffffff;
    --c-dots: rgba(0, 0, 0, 0.06);
    --c-ink: #111216;
    --c-villain: #fff1ee;
    --c-violet: #7c5ce0;
  }
}

body.comic-body { background: var(--c-page); }
.comic { max-width: 1060px; padding-top: 22px; padding-bottom: 20px; }
.comic .back { display: inline-block; margin-bottom: 14px; }

/* ---------- panels ---------- */
.panel {
  position: relative; margin: 0; background-color: var(--c-panel);
  background-image: radial-gradient(var(--c-dots) 1.2px, transparent 1.4px); background-size: 7px 7px;
  border: 3px solid var(--c-ink); border-radius: 4px; padding: 16px; overflow: hidden;
}
.page { display: grid; gap: 12px; margin-top: 28px; }
.page .grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }

/* ---------- lettering ---------- */
.cap {
  margin: 0; padding: 9px 12px; background: var(--c-cap); color: var(--c-cap-ink);
  border: 2px solid var(--c-sfx-line); font-family: var(--font-display); font-weight: 600;
  font-size: 16px; line-height: 1.4; max-width: 62ch;
}
.cap.big { font-size: clamp(18px, 2.4vw, 23px); font-weight: 700; }
.cap.cry { display: inline-block; font-weight: 700; font-size: 13.5px; letter-spacing: 0.06em; text-transform: uppercase; padding: 5px 10px; }
.narration { display: grid; gap: 10px; justify-items: start; background-color: transparent; background-image: none; border-color: transparent; padding: 0; }
.balloon {
  position: relative; margin: 0; padding: 12px 16px; background: var(--c-balloon); color: var(--c-balloon-ink);
  border: 2.5px solid var(--c-sfx-line); border-radius: 22px; font-family: var(--font-display); font-weight: 600;
  font-size: 16.5px; line-height: 1.35; text-transform: uppercase; letter-spacing: 0.01em; text-wrap: balance;
}
/* the tail points up at the speaker's portrait */
.balloon::before, .balloon::after { content: ""; position: absolute; left: 34px; width: 0; height: 0; border-style: solid; }
.balloon::before { top: -18px; border-width: 0 10px 18px 10px; border-color: transparent transparent var(--c-sfx-line) transparent; }
.balloon::after { top: -13px; left: 37px; border-width: 0 7px 14px 7px; border-color: transparent transparent var(--c-balloon) transparent; }
.balloon.villain { border-color: var(--c-red); box-shadow: 4px 4px 0 var(--c-red); }
.balloon.villain::before { border-bottom-color: var(--c-red); }

.sfx {
  position: absolute; top: 12px; right: 12px; z-index: 2; font-family: var(--font-display); font-weight: 700;
  font-size: clamp(26px, 3.6vw, 40px); line-height: 1; letter-spacing: 0.02em; color: var(--c-sfx);
  -webkit-text-stroke: 2px var(--c-sfx-line); paint-order: stroke fill; text-shadow: 3px 3px 0 var(--c-sfx-line);
  transform: rotate(-8deg) skewX(-8deg); pointer-events: none;
}
.sfx.red { color: var(--c-red); }
.sfx.violet { color: var(--c-violet); }

/* ---------- hero panels ---------- */
.hero { display: grid; gap: 14px; align-content: start; }
.hero .art { position: relative; margin: -16px -16px 0; border-bottom: 3px solid var(--c-ink); aspect-ratio: 1 / 1; overflow: hidden; background: var(--c-page); }
.hero .art img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 50%; }
/* in a wide panel the art takes the height of the words beside it, not the photo's own height */
.hero.wide .art img { position: absolute; inset: 0; }
.hero .cry { justify-self: start; margin-top: -2px; }
.hero > .balloon { margin-top: 6px; }
.hero.wide { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 20px; }
.hero.wide .art { margin: -16px 0 -16px -16px; border-bottom: 0; border-right: 3px solid var(--c-ink); aspect-ratio: 1 / 1; min-height: 0; }
.hero.wide .words { display: grid; gap: 16px; align-content: center; justify-items: start; padding: 6px 0; }
.hero.wide .words .balloon { margin-top: 8px; }


/* ---------- cover ---------- */
.cover { padding: 18px 20px 20px; display: grid; gap: 14px; background-color: #1a1030; background-image: radial-gradient(rgba(255, 210, 63, 0.12) 1.4px, transparent 1.6px), linear-gradient(160deg, #2a1650, #0d0f14 70%); background-size: 8px 8px, auto; }
.cover-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: #f2f3f7; }
.cover-top .brand { font-family: var(--font-display); font-weight: 700; font-size: 18px; letter-spacing: 0.14em; color: var(--c-sfx); }
.cover-top .issue, .cover-top .price { padding: 3px 8px; border: 2px solid #f2f3f7; }
.cover-title {
  margin: 4px 0 0; font-family: var(--font-display); font-weight: 700; text-transform: uppercase; line-height: 0.92;
  font-size: clamp(44px, 9vw, 104px); letter-spacing: -0.01em; color: var(--c-sfx); text-wrap: balance;
  -webkit-text-stroke: 3px var(--c-sfx-line); paint-order: stroke fill; text-shadow: 5px 5px 0 var(--c-sfx-line);
  transform: skewX(-6deg); transform-origin: left;
}
.cover-cast { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.cover-cast img { width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: cover; object-position: 50% 50%; border: 3px solid #0b0c10; outline: 2px solid #f2f3f7; transform: rotate(-2deg); }
.cover-cast img:nth-child(even) { transform: rotate(2deg) translateY(6px); }
.cover-cast img:last-child { outline-color: var(--c-red); }
.cover-tag { margin: 6px 0 0; justify-self: start; padding: 8px 12px; background: var(--c-red); color: #fff; border: 2px solid #0b0c10; font-family: var(--font-display); font-weight: 700; font-size: clamp(15px, 2vw, 19px); text-transform: uppercase; letter-spacing: 0.03em; transform: rotate(-1deg); }
.indicia { margin: 10px 2px 0; font-size: 12.5px; line-height: 1.5; color: var(--ink-muted); max-width: 90ch; }

/* ---------- splash panels ---------- */
.splash { display: grid; gap: 18px; justify-items: center; text-align: center; padding: 26px 18px; }
.splash .cap { justify-self: center; text-align: left; }
.splash-title {
  margin: 0; font-family: var(--font-display); font-weight: 700; text-transform: uppercase; line-height: 0.95;
  font-size: clamp(40px, 8vw, 84px); color: var(--c-sfx); -webkit-text-stroke: 3px var(--c-sfx-line);
  paint-order: stroke fill; text-shadow: 5px 5px 0 var(--c-sfx-line); transform: rotate(-3deg) skewX(-6deg);
}
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; width: 100%; max-width: 720px; }
.stat { position: relative; display: grid; justify-items: center; align-content: center; gap: 6px; padding: 30px 8px 26px; }
.stat .burst {
  position: absolute; inset: 0; margin: auto; width: min(100%, 190px); aspect-ratio: 1; z-index: 0; background: var(--c-sfx);
  clip-path: polygon(50% -2%, 58.5% 13%, 70.8% 6.8%, 73.7% 20.3%, 90.7% 17.6%, 84.2% 33.5%, 96.8% 39.3%, 88% 50%, 100.7% 61.6%, 84.2% 66.5%, 87.5% 79.9%, 73.7% 79.7%, 72.6% 96.9%, 58.5% 87%, 50% 98%, 41.5% 87%, 27.4% 96.9%, 26.3% 79.7%, 12.5% 79.9%, 15.8% 66.5%, -0.7% 61.6%, 12% 50%, 3.2% 39.3%, 15.8% 33.5%, 9.3% 17.6%, 26.3% 20.3%, 29.2% 6.8%, 41.5% 13%);
}
.stat.red .burst { background: var(--c-red); }
.stat b, .stat > span:not(.burst) { position: relative; z-index: 1; color: var(--c-cap-ink); }
.stat b { font-family: var(--font-display); font-weight: 700; font-size: clamp(40px, 6vw, 60px); line-height: 1; font-variant-numeric: tabular-nums; }
.stat > span:not(.burst) { font-family: var(--font-display); font-weight: 700; font-size: 14px; line-height: 1.2; text-transform: uppercase; max-width: 13ch; }

/* ---------- villain and later pages ---------- */
.villain .panel:not(.narration) { background-color: var(--c-villain); border-color: var(--c-red); }
.villain .hold .splash-title { color: var(--c-red); font-size: clamp(56px, 12vw, 128px); }
.later .stamp { margin: 0; padding: 4px 10px; border: 2px dashed var(--c-violet); color: var(--c-violet); font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; transform: rotate(-2deg); }
.later .panel:not(.narration) { border-color: var(--c-violet); }

/* ---------- the end ---------- */
.theend .splash-title { color: var(--c-balloon); }
.batline { margin: 0; font-family: var(--font-display); font-weight: 700; font-size: clamp(18px, 2.6vw, 24px); text-transform: uppercase; letter-spacing: 0.06em; color: var(--c-ink); }
.cap.ps { background: var(--c-balloon); font-weight: 500; }
.endcta { justify-content: center; margin: 28px 0 8px; }

/* ---------- phone ---------- */
@media (max-width: 760px) {
  .page .grid { grid-template-columns: minmax(0, 1fr); }
  .hero.wide { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .hero.wide .art { margin: -16px -16px 0; border-right: 0; border-bottom: 3px solid var(--c-ink); aspect-ratio: 1 / 1; min-height: 0; }
  .hero.wide .words { padding: 0; }
  .cover-cast { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .stats { gap: 4px; }
  .stat { padding: 22px 2px 18px; }
  .stat > span:not(.burst) { font-size: 11.5px; }
}
@media (prefers-reduced-motion: no-preference) {
  .hero:hover .sfx { transform: rotate(-12deg) skewX(-8deg) scale(1.08); transition: transform 160ms; }
}
