/* The IT Guy: web reader
   Palette sampled from the artwork: aged paper, ink, brick red, mustard, teal, wood brown. */

@font-face {
  font-family: "Bangers";
  src: url("../fonts/Bangers-Regular.ttf") format("truetype");
  font-display: swap;
}
@font-face {
  font-family: "Courier Prime";
  src: url("../fonts/CourierPrime-Regular.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Courier Prime";
  src: url("../fonts/CourierPrime-Bold.ttf") format("truetype");
  font-weight: 700;
  font-display: swap;
}

:root {
  --paper: #f1e4c3;
  --paper-light: #f8efd9;
  --paper-deep: #e6d3a8;
  --ink: #231f1a;
  --ink-soft: #4a4033;
  --red: #b5452b;
  --red-deep: #8e3420;
  --mustard: #d9a521;
  --teal: #3f7f86;
  --brown: #7a4a2a;

  --display: "Bangers", "Impact", "Arial Narrow Bold", sans-serif;
  --body: "Courier Prime", "Courier New", ui-monospace, monospace;

  --gutter: clamp(16px, 4vw, 48px);
  --masthead-h: 64px;
  --shadow: 6px 6px 0 var(--ink);
  --radius: 4px;

  /* Paper grain: tiny inline SVG noise, no image files */
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .35 0 0 0 0 .25 0 0 0 0 .12 0 0 0 .09 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  /* Halftone dot screen */
  --halftone: radial-gradient(circle, rgb(122 74 42 / 0.16) 1.3px, transparent 1.7px);

  color-scheme: light;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--paper);
  background-image: var(--grain);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1rem;
  line-height: 1.55;
  overflow-x: hidden;
}

/* Halftone fading in from the corners, like a worn print */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background-image: var(--halftone);
  background-size: 11px 11px;
  -webkit-mask-image: radial-gradient(circle at 0 0, #000 0, transparent 38%), radial-gradient(circle at 100% 100%, #000 0, transparent 40%);
  mask-image: radial-gradient(circle at 0 0, #000 0, transparent 38%), radial-gradient(circle at 100% 100%, #000 0, transparent 40%);
}

img { max-width: 100%; display: block; }
a { color: var(--red-deep); }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; }
/* Headings receive focus programmatically on view change (for screen readers); don't draw a ring on them */
[tabindex="-1"]:focus, [tabindex="-1"]:focus-visible { outline: none; }
[hidden] { display: none !important; }

.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
.skip-link {
  position: absolute; left: 8px; top: -60px; z-index: 100;
  background: var(--ink); color: var(--paper); padding: 8px 14px; font-weight: 700;
}
.skip-link:focus { top: 8px; }

/* ---------- Masthead ---------- */
.masthead {
  position: sticky; top: 0; z-index: 20;
  height: var(--masthead-h);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 0 var(--gutter);
  background: var(--paper-light);
  background-image: var(--grain);
  border-bottom: 3px solid var(--ink);
  box-shadow: 0 3px 0 var(--paper), 0 5px 0 var(--ink);
}
.logo { display: flex; align-items: baseline; gap: 10px; text-decoration: none; color: var(--ink); }
.logo-word {
  font-family: var(--display); font-size: 2rem; line-height: 1; letter-spacing: 0.02em;
  color: var(--paper-light);
  text-shadow: -1.5px -1.5px 0 var(--ink), 1.5px -1.5px 0 var(--ink), -1.5px 1.5px 0 var(--ink), 1.5px 1.5px 0 var(--ink), 3px 3px 0 var(--red), 4.5px 4.5px 0 var(--ink);
}
.logo-issue {
  font-family: var(--display); font-size: 0.95rem; letter-spacing: 0.06em;
  background: var(--ink); color: var(--mustard); padding: 1px 7px 0; transform: rotate(-3deg);
}
.nav { display: flex; gap: clamp(10px, 2.5vw, 28px); align-items: center; }
.nav a {
  font-family: var(--display); font-size: 1.2rem; letter-spacing: 0.06em;
  color: var(--ink); text-decoration: none; padding: 4px 2px; border-bottom: 3px solid transparent;
}
.nav a:hover, .nav a[aria-current="page"] { border-bottom-color: var(--red); }
.nav .nav-pdf { background: var(--red); color: var(--paper-light); padding: 3px 10px 1px; border: 2px solid var(--ink); box-shadow: 3px 3px 0 var(--ink); }
.nav .nav-pdf:hover { background: var(--red-deep); }

main { outline: none; }
.view { padding: clamp(24px, 5vw, 56px) var(--gutter) 64px; max-width: 1280px; margin: 0 auto; }

/* ---------- Shared type & buttons ---------- */
.title-3d {
  font-family: var(--display); font-weight: 400; margin: 0;
  font-size: clamp(3.4rem, 9vw, 6.6rem); line-height: 0.9; letter-spacing: 0.02em;
  color: var(--paper-light);
  text-shadow:
    -2px -2px 0 var(--ink), 2px -2px 0 var(--ink), -2px 2px 0 var(--ink), 2px 2px 0 var(--ink),
    5px 5px 0 var(--red), 7px 7px 0 var(--ink);
}
.title-3d-red { color: var(--red); text-shadow: 3px 3px 0 var(--ink); font-size: clamp(2.6rem, 7vw, 4.6rem); }
.page-title { font-family: var(--display); font-weight: 400; font-size: clamp(2.6rem, 6vw, 4rem); margin: 0; line-height: 1; color: var(--red); text-shadow: 3px 3px 0 var(--ink); letter-spacing: 0.02em; }
.section-title { font-family: var(--display); font-weight: 400; font-size: 2rem; letter-spacing: 0.04em; margin: 0 0 20px; display: flex; align-items: center; gap: 16px; }
.section-title::after { content: ""; flex: 1; height: 0; border-top: 3px solid var(--ink); border-bottom: 1px solid var(--ink); padding-top: 3px; }
.section-title span { background: var(--ink); color: var(--paper); padding: 2px 14px 0; transform: rotate(-1.5deg); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--display); font-size: 1.3rem; letter-spacing: 0.05em; line-height: 1.1;
  padding: 11px 20px 9px; min-height: 48px;
  border: 3px solid var(--ink); border-radius: var(--radius);
  box-shadow: 4px 4px 0 var(--ink);
  color: var(--ink); text-decoration: none; cursor: pointer;
  transition: transform 0.08s ease, box-shadow 0.08s ease;
}
.btn:hover { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--ink); }
.btn:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--ink); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: 0.4; cursor: not-allowed; transform: none; box-shadow: 2px 2px 0 var(--ink); }
.btn-mustard { background: var(--mustard); }
.btn-red { background: var(--red); color: var(--paper-light); }
.btn-paper { background: var(--paper-light); }
.btn-small { font-size: 1.1rem; padding: 8px 14px 6px; min-height: 44px; }

.link-btn { background: none; border: 0; padding: 0; cursor: pointer; color: var(--red-deep); text-decoration: underline; font-family: var(--body); font-size: 0.85rem; }

/* ---------- Cover view ---------- */
.hero { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 64px); align-items: center; }
.hero-art { margin: 0; position: relative; transform: rotate(-1.5deg); }
.hero-art img { border: 4px solid var(--ink); box-shadow: 10px 10px 0 var(--ink); background: var(--paper-deep); height: auto; }
/* Sits on the frame's bottom-right corner, mostly outside the art, so no part of the original cover is hidden */
.sticker {
  position: absolute; right: -52px; bottom: -48px; width: 112px; height: 112px;
  display: grid; place-content: center; text-align: center;
  font-family: var(--display); font-size: 1rem; line-height: 0.95; letter-spacing: 0.04em; color: var(--ink);
  background: var(--mustard); transform: rotate(12deg);
  clip-path: polygon(50% 0%,57.8% 10.8%,69.1% 3.8%,72.2% 16.7%,85.4% 14.6%,83.3% 27.8%,96.2% 30.9%,89.2% 42.2%,100% 50%,89.2% 57.8%,96.2% 69.1%,83.3% 72.2%,85.4% 85.4%,72.2% 83.3%,69.1% 96.2%,57.8% 89.2%,50% 100%,42.2% 89.2%,30.9% 96.2%,27.8% 83.3%,14.6% 85.4%,16.7% 72.2%,3.8% 69.1%,10.8% 57.8%,0% 50%,10.8% 42.2%,3.8% 30.9%,16.7% 27.8%,14.6% 14.6%,27.8% 16.7%,30.9% 3.8%,42.2% 10.8%);
  filter: drop-shadow(3px 3px 0 var(--ink));
}
.sticker b { display: block; font-weight: 400; font-size: 1.9rem; }
.kicker { font-weight: 700; color: var(--teal); text-transform: uppercase; letter-spacing: 0.08em; margin: 0 0 12px; font-size: 0.9rem; }
.tagline { font-family: var(--display); font-size: clamp(1.5rem, 3vw, 2rem); letter-spacing: 0.03em; line-height: 1.1; margin: 26px 0 8px; color: var(--ink); }
.blurb { margin: 0 0 26px; max-width: 46ch; }
.cta-row { display: flex; flex-wrap: wrap; gap: 14px; }
.continue { margin: 16px 0 0; font-weight: 700; }
.continue a { font-weight: 700; }
.download-chip {
  margin-top: 26px; display: inline-flex; gap: 12px; align-items: center;
  padding: 10px 16px; text-decoration: none; color: var(--ink);
  border: 2px dashed var(--ink); background: rgb(248 239 217 / 0.7);
}
.download-chip:hover { background: var(--paper-light); border-style: solid; }
.download-chip b { display: block; font-size: 0.98rem; }
.download-chip small { display: block; color: var(--ink-soft); }
.download-icon { font-size: 1.8rem; line-height: 1; color: var(--red); font-weight: 700; }

.cast { margin-top: clamp(48px, 8vw, 88px); }
.cast-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px; }
.cast-card { background: var(--paper-light); border: 3px solid var(--ink); box-shadow: var(--shadow); padding: 18px 20px; position: relative; }
.cast-card h3 { font-family: var(--display); font-weight: 400; font-size: 2rem; margin: 0; letter-spacing: 0.03em; line-height: 1; }
.cast-card .role { margin: 4px 0 10px; font-weight: 700; color: var(--teal); }
.cast-card p { margin: 0; }
.cast-card:nth-child(1) { border-top: 10px solid var(--red); }
.cast-card:nth-child(2) { border-top: 10px solid var(--teal); }

.teaser-strip { margin-top: clamp(48px, 8vw, 80px); }
.inside-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px 28px; }
.inside-list a { display: flex; gap: 12px; align-items: baseline; text-decoration: none; color: var(--ink); padding: 6px 0; border-bottom: 1px dotted var(--ink-soft); }
.inside-list a:hover .t { color: var(--red); }
.inside-list .n { font-family: var(--display); font-size: 1.15rem; background: var(--ink); color: var(--paper); padding: 0 6px; min-width: 2.2em; text-align: center; }
.inside-list .t { font-weight: 700; }
.inside-list .done { margin-left: auto; color: var(--teal); font-size: 0.8rem; font-weight: 700; }

/* ---------- Library view ---------- */
.library-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 36px; }
.library-sub { margin: 10px 0 0; font-weight: 700; color: var(--teal); }
.progress-card { background: var(--paper-light); border: 2px solid var(--ink); padding: 12px 16px; min-width: 240px; box-shadow: 4px 4px 0 var(--ink); }
.progress-card p { margin: 0 0 8px; font-weight: 700; }
.meter { height: 12px; border: 2px solid var(--ink); background: var(--paper); margin-bottom: 8px; }
.meter span { display: block; height: 100%; width: 0; background: repeating-linear-gradient(-45deg, var(--red) 0 6px, var(--red-deep) 6px 12px); transition: width 0.3s ease; }

.library-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 270px), 1fr)); gap: 36px 30px; }
.card {
  display: flex; flex-direction: column; height: 100%;
  background: var(--paper-light); border: 3px solid var(--ink); box-shadow: var(--shadow);
  text-decoration: none; color: var(--ink); position: relative;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.library-grid li:nth-child(odd) .card { transform: rotate(-0.7deg); }
.library-grid li:nth-child(even) .card { transform: rotate(0.6deg); }
.library-grid .card:hover, .library-grid .card:focus-visible { transform: translate(-2px, -3px) rotate(0); box-shadow: 9px 9px 0 var(--ink); }
.card-art {
  aspect-ratio: 4 / 3; border-bottom: 3px solid var(--ink); padding: 10px;
  background-color: var(--paper-deep); background-image: var(--halftone); background-size: 9px 9px;
  display: grid; place-items: center; overflow: hidden;
}
.card-art img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(3px 3px 0 rgb(35 31 26 / 0.85)); }
.card-body { padding: 14px 16px 16px; }
.card-no { font-family: var(--display); font-size: 1.05rem; letter-spacing: 0.06em; color: var(--paper-light); background: var(--red); padding: 1px 8px 0; display: inline-block; border: 2px solid var(--ink); }
.library-grid li:nth-child(even) .card-no { background: var(--teal); }
.card h2 { font-family: var(--display); font-weight: 400; font-size: 1.75rem; line-height: 1.05; letter-spacing: 0.03em; margin: 10px 0 6px; }
.card p { margin: 0; font-size: 0.92rem; color: var(--ink-soft); }
.stamp {
  position: absolute; top: 18px; right: 14px; z-index: 1;
  font-family: var(--display); font-size: 1.3rem; letter-spacing: 0.1em; color: var(--red);
  border: 3px double var(--red); padding: 0 8px; transform: rotate(-12deg);
  background: rgb(248 239 217 / 0.85); mix-blend-mode: multiply;
}

.pdf-banner {
  margin-top: 64px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px 28px;
  background: var(--ink); color: var(--paper); padding: 24px 28px; border: 3px solid var(--ink);
  box-shadow: 8px 8px 0 var(--red);
  background-image: radial-gradient(circle, rgb(217 165 33 / 0.22) 1.4px, transparent 1.8px); background-size: 10px 10px;
}
.pdf-banner h2 { font-family: var(--display); font-weight: 400; font-size: 2.2rem; margin: 0; color: var(--mustard); letter-spacing: 0.03em; line-height: 1; }
.pdf-banner p { margin: 6px 0 0; max-width: 52ch; }

/* ---------- Reader view ---------- */
.view-reader { padding-top: 16px; padding-bottom: 40px; max-width: 1480px; }
.reader {
  display: grid; grid-template-rows: auto minmax(0, 1fr) auto; gap: 12px;
  height: calc(100dvh - var(--masthead-h) - 40px); min-height: 420px;
}
.reader-bar { display: flex; align-items: center; gap: 12px; }
.reader-title { font-family: var(--display); font-weight: 400; font-size: clamp(1.4rem, 3vw, 2.1rem); letter-spacing: 0.03em; margin: 0; line-height: 1.05; flex: 1; min-width: 0; outline: none; }
.reader-no { background: var(--red); color: var(--paper-light); padding: 1px 8px 0; margin-right: 8px; border: 2px solid var(--ink); font-size: 0.75em; vertical-align: 0.15em; }
.reader-count { font-weight: 700; white-space: nowrap; }

.stage {
  position: relative; overflow: hidden; display: flex; align-items: center; justify-content: center;
  background-color: var(--paper-deep); background-image: var(--halftone); background-size: 10px 10px;
  border: 3px solid var(--ink); box-shadow: inset 0 0 0 6px var(--paper-light), inset 0 0 0 8px var(--ink);
  padding: 18px; touch-action: pan-y; cursor: zoom-in; user-select: none; -webkit-user-select: none;
}
.stage.is-zoomed { touch-action: none; cursor: grab; }
.stage.is-panning { cursor: grabbing; }
.stage img {
  max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain;
  box-shadow: 6px 6px 0 var(--ink); outline: 2px solid var(--ink);
  transform-origin: 50% 50%; will-change: transform; -webkit-user-drag: none;
  transition: opacity 0.15s ease;
}
.stage img.is-loading { opacity: 0.25; }
.stage.is-animating img { transition: transform 0.18s ease, opacity 0.15s ease; }

.rotate-hint {
  position: absolute; left: 12px; right: 12px; bottom: 12px; margin: 0; z-index: 2;
  display: flex; gap: 10px; align-items: center; justify-content: center;
  background: var(--ink); color: var(--paper); padding: 8px 12px; font-size: 0.85rem; font-weight: 700;
}
.rotate-hint .link-btn { color: var(--mustard); }

.reader-progress { flex: 1; height: 10px; border: 2px solid var(--ink); background: var(--paper-light); min-width: 40px; }
.reader-progress span { display: block; height: 100%; background: var(--mustard); transition: width 0.25s ease; }
.tool-group { display: flex; gap: 6px; align-items: center; }
.icon-btn {
  display: inline-grid; place-items: center; width: 44px; height: 44px; flex: none;
  background: var(--paper-light); border: 2px solid var(--ink); box-shadow: 3px 3px 0 var(--ink);
  font-family: var(--body); font-weight: 700; font-size: 1.6rem; line-height: 1; color: var(--ink); cursor: pointer; text-decoration: none;
}
.icon-btn svg { width: 22px; height: 22px; fill: currentColor; }
.icon-btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.icon-btn[aria-pressed="true"] { background: var(--mustard); }
.zoom-level { min-width: 64px; height: 44px; border: 2px solid var(--ink); background: var(--paper); font-weight: 700; cursor: pointer; }

.transcript { margin-top: 28px; background: var(--paper-light); border: 2px solid var(--ink); padding: 0 18px; max-width: 900px; }
.transcript summary { cursor: pointer; font-family: var(--display); font-size: 1.3rem; letter-spacing: 0.04em; padding: 12px 0; }
.transcript ol { margin: 0 0 16px; padding-left: 22px; }
.transcript li { margin: 4px 0; }
.transcript .who { font-weight: 700; color: var(--red-deep); }

/* Fullscreen + iOS fallback ("immersive" class when the Fullscreen API is unavailable) */
.reader:fullscreen { height: 100vh; padding: 12px; background: var(--ink); color: var(--paper); }
.reader:fullscreen .stage { background-color: #15120f; box-shadow: none; border-color: #15120f; }
.reader:fullscreen .reader-title, .reader:fullscreen .reader-count { color: var(--paper); }
body.is-immersive { overflow: hidden; }
body.is-immersive .reader {
  position: fixed; inset: 0; z-index: 50; height: 100dvh; min-height: 0; padding: 10px;
  padding-top: max(10px, env(safe-area-inset-top)); padding-bottom: max(10px, env(safe-area-inset-bottom));
  background: var(--ink); color: var(--paper);
}
body.is-immersive .stage { background-color: #15120f; box-shadow: none; border-color: #15120f; }

/* ---------- End view ---------- */
.view-end { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; align-items: center; }
.end-card {
  background: var(--paper-light); border: 3px solid var(--ink); box-shadow: 10px 10px 0 var(--ink); padding: clamp(22px, 4vw, 40px);
  background-image: repeating-conic-gradient(from 0deg at 50% 50%, rgb(217 165 33 / 0.12) 0 6deg, transparent 6deg 14deg);
}
.end-card .tagline { margin-top: 18px; }
.end-card .cta-row { margin-top: 24px; }
.credit { margin: 24px 0 0; }
.back-cover { margin: 0; transform: rotate(1.2deg); }
.back-cover img { border: 4px solid var(--ink); box-shadow: 10px 10px 0 var(--ink); height: auto; }
.back-cover figcaption { margin-top: 14px; font-size: 0.85rem; color: var(--ink-soft); text-align: center; }

/* ---------- Support The IT Guy (voluntary donations) ----------
   Styled like a README "## Support" section, printed on comic paper. */
.support-slot { margin-top: clamp(48px, 8vw, 80px); }
.view-end .support-slot { grid-column: 1 / -1; margin-top: 16px; }
.support {
  background: var(--paper-light); background-image: var(--grain);
  border: 4px solid var(--ink); box-shadow: 10px 10px 0 var(--red);
  position: relative;
}
.support-head {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 12px 22px 10px; border-bottom: 3px solid var(--ink);
  background: var(--mustard);
  background-image: radial-gradient(circle, rgb(35 31 26 / 0.14) 1.2px, transparent 1.6px); background-size: 8px 8px;
}
.support-hash { font-weight: 700; font-size: 1.4rem; color: var(--red-deep); }
.support-title { margin: 0; font-family: var(--display); font-weight: 400; font-size: clamp(1.8rem, 4vw, 2.5rem); letter-spacing: 0.03em; line-height: 1; }
.support-tag {
  margin-left: auto; font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em;
  border: 2px solid var(--ink); background: var(--paper-light); padding: 1px 8px; border-radius: 999px;
}
.support-body {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 18px 30px; align-items: center;
  padding: 24px 26px 26px;
}
.support-message { font-family: var(--display); font-size: clamp(1.35rem, 2.6vw, 1.75rem); letter-spacing: 0.02em; line-height: 1.15; margin: 0 0 12px; }
.support-note { margin: 10px 0 0; font-size: 0.92rem; color: var(--ink-soft); max-width: 60ch; }

/* shields.io-style badges, like the ones at the top of a README */
.shields { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
.shield { display: inline-flex; font-size: 0.75rem; line-height: 1; border: 2px solid var(--ink); box-shadow: 2px 2px 0 var(--ink); }
.shield b, .shield i { padding: 4px 7px 3px; font-style: normal; }
.shield b { background: var(--ink); color: var(--paper); font-weight: 700; }
.shield i { font-weight: 700; color: var(--paper-light); }
.shield-red { background: var(--red); }
.shield-teal { background: var(--teal); }
.shield-mustard { background: var(--mustard); color: var(--ink) !important; }

/* C:\COFFEE mug, drawn in CSS */
.support-mug { position: relative; width: 96px; padding-top: 22px; margin-right: 14px; }
.support-mug .steam { position: absolute; top: 0; left: 14px; font-weight: 700; color: var(--ink-soft); letter-spacing: 0.15em; transform: rotate(-4deg); }
.support-mug .mug {
  display: grid; place-items: center; width: 92px; height: 96px;
  background: var(--paper); border: 4px solid var(--ink); border-radius: 4px 4px 16px 16px;
  box-shadow: 5px 5px 0 var(--ink); position: relative; transform: rotate(-4deg);
}
.support-mug .mug::after {
  content: ""; position: absolute; right: -24px; top: 20px; width: 22px; height: 38px;
  border: 4px solid var(--ink); border-left: 0; border-radius: 0 16px 16px 0;
}
.support-mug .mug span { font-weight: 700; font-size: 0.68rem; letter-spacing: 0.02em; }

.support-cta { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.btn-support {
  background: var(--red); color: var(--paper-light); font-size: 1.5rem; padding: 14px 24px 12px; min-height: 56px;
  white-space: nowrap; box-shadow: 5px 5px 0 var(--ink);
}
.btn-support:hover { background: var(--red-deep); transform: translate(-1px, -1px) rotate(-1deg); box-shadow: 6px 6px 0 var(--ink); }
.support-dest { color: var(--ink-soft); font-size: 0.78rem; }

.footer-support a { font-weight: 700; }
.ext-note { font-size: 0.78rem; }

@media (max-width: 860px) {
  .support-body { grid-template-columns: auto minmax(0, 1fr); }
  .support-cta { grid-column: 1 / -1; align-items: stretch; text-align: center; }
}
@media (max-width: 560px) {
  .support { box-shadow: 6px 6px 0 var(--red); }
  .support-head { padding: 10px 14px 8px; }
  .support-tag { margin-left: 0; }
  .support-body { grid-template-columns: 1fr; padding: 18px 16px 20px; }
  .support-mug { display: none; }
  .btn-support { white-space: normal; font-size: 1.35rem; }
}

/* ---------- Footer ---------- */
.site-footer { border-top: 3px double var(--ink); padding: 22px var(--gutter) 30px; text-align: center; font-size: 0.85rem; color: var(--ink-soft); }
.site-footer p { margin: 4px 0; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; }
  .hero-art { max-width: 640px; margin: 0 auto; }
  .sticker { right: -18px; bottom: -40px; }
  .view-end { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  :root { --masthead-h: 56px; --shadow: 4px 4px 0 var(--ink); }
  .logo-word { font-size: 1.55rem; }
  .logo-issue { display: none; }
  .nav a { font-size: 1.05rem; }
  .sticker { display: none; } /* no room outside the art on phones; the kicker already says "Free to read" */
  .cta-row .btn { flex: 1 1 100%; }
  .hero-art img { box-shadow: 6px 6px 0 var(--ink); }
  .view-reader { padding-left: 10px; padding-right: 10px; }
  .reader { gap: 8px; height: calc(100dvh - var(--masthead-h) - 24px); min-height: 360px; }
  .stage { padding: 16px 14px; }
  .btn-label { display: none; }
  .btn-small { min-width: 48px; padding: 8px 10px 6px; }
  .reader-progress { display: none; }
  .reader-bottom { justify-content: space-between; }
  .zoom-level { min-width: 54px; }
  .icon-btn { width: 42px; height: 42px; }
  .reader-count { font-size: 0.85rem; }
}
@media (max-width: 380px) {
  .tool-group [data-action="zoom-out"], .tool-group [data-action="zoom-in"] { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

@media print {
  .masthead, .site-footer, .reader-bar, .cta-row, .pdf-banner, .download-chip, .support-slot { display: none !important; }
}
