/* ==========================================================================
   MARVDLE — cover page styles
   Extracted from index.html so cover-specific CSS lives with the rest of
   the stylesheets and is searchable / lintable across the project.
   ========================================================================== */

/* ============================================================
   COVER PAGE — laid out like an actual newsstand comic cover
   ============================================================ */

.cover {
    position: relative;
    z-index: 2;
    max-width: 1180px;
    margin: 1.25rem auto;
    background: var(--paper-hi);
    border: 5px solid var(--ink);
    box-shadow: 12px 12px 0 var(--ink);
    padding: 0;
    overflow: hidden;
    display: grid;
    grid-template-rows: auto 1fr auto auto auto;
    /* iOS Safari respects the modern clip variant more reliably than hidden
       when the element has a heavy box-shadow extending past the viewport. */
    overflow-x: clip;
}

/* ---- 1) Square issue / price corners — absolute over the hero so they
   sit at the top corners of the unified dark section. ---- */
.hero-corner {
    position: absolute;
    top: 0;
    z-index: 5;
    width: 92px;
    height: 92px;
    box-sizing: border-box;
    padding: 0.45rem 0.5rem;
    font-family: var(--display);
    letter-spacing: 0.06em;
    line-height: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    text-align: center;
}
.hero-corner b { font-size: 1.05rem; line-height: 1; }
.hero-corner small { font-size: 0.72rem; letter-spacing: 0.1em; }
.hero-corner small#daily-countdown {
    /* Match the rest of the corner — display font, ink color. */
    font-family: var(--display);
    font-size: 1rem;
    letter-spacing: 0.06em;
}

.hero-corner--issue {
    left: 0;
    background: var(--red);
    color: var(--paper);
    border-right: 4px solid var(--ink);
    border-bottom: 4px solid var(--ink);
}
.hero-corner--price {
    right: 0;
    background: var(--yellow);
    color: var(--ink);
    border-left: 4px solid var(--ink);
    border-bottom: 4px solid var(--ink);
}

/* MARVDLE masthead at the top of the hero — wordmark above, tagline below. */
.hero-masthead {
    position: relative;
    z-index: 4;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 1rem 7rem 1.2rem;
    min-width: 0;
}
.hero-logo {
    font-family: var(--display);
    font-size: clamp(4rem, 11vw, 8.5rem);
    color: var(--red);
    -webkit-text-stroke: 4px var(--ink);
    paint-order: stroke fill;
    letter-spacing: 0.005em;
    line-height: 0.82;
    text-shadow: 6px 6px 0 var(--ink);
}
.hero-logo b { font-weight: 400; color: var(--yellow); }
.hero-subtag {
    font-family: var(--display);
    color: var(--ink);
    background: var(--yellow);
    border: 3px solid var(--ink);
    box-shadow: 4px 4px 0 var(--ink);
    padding: 0.35rem 0.9rem 0.3rem;
    letter-spacing: 0.2em;
    font-size: clamp(1.1rem, 2vw, 1.7rem);
    white-space: nowrap;
}

/* ---- 2) HERO ART panel — masthead at top, mystery card centered,
   narrate caption pinned at the bottom. ---- */
.cover-hero {
    position: relative;
    background:
        /* warm hot-spot at top-left */
        radial-gradient(circle at 20% 30%, rgba(255,236,164,0.12) 0, transparent 55%),
        /* bright sparkle "stars" — sparse, two offset grids for variety */
        radial-gradient(circle, rgba(255,255,255,0.5) 1.8px, transparent 2.4px) 0 0/96px 96px,
        radial-gradient(circle, rgba(255,236,164,0.45) 1.4px, transparent 2px) 48px 48px/96px 96px,
        /* dim micro-stars for depth */
        radial-gradient(circle, rgba(255,255,255,0.18) 0.9px, transparent 1.3px) 12px 22px/32px 32px,
        radial-gradient(circle, rgba(255,255,255,0.14) 0.7px, transparent 1.1px) 28px 6px/32px 32px,
        var(--blue-deep);
    color: var(--paper);
    /* Bottom padding reserves room for the absolutely-positioned narrate
       (~84px + 2rem offset) plus a small breathing gap below the card. */
    padding: 0 1.6rem 9rem;
    overflow: hidden;
    border-bottom: 4px solid var(--ink);
    min-height: 0;
}

/* Stage — in-flow wrapper that sits right below the masthead. Sizes to
   the card; the halo lives inside as an absolutely-positioned backdrop
   so the two always share the same center. Everything scales with vw. */
.hero-stage {
    position: relative;
    width: clamp(130px, 20vw, 240px);
    margin: 1.5rem auto 0;
    z-index: 2;
}

/* Halftone burst behind the card. Absolutely positioned so growing it
   never changes the spacing of the card or anything else nearby. */
.hero-stage .halo {
    position: absolute;
    left: 50%; top: 50%;
    transform: translate(-50%, -50%);
    width: clamp(260px, 40vw, 480px);
    height: clamp(260px, 40vw, 480px);
    background:
        radial-gradient(circle, var(--yellow) 0 38%, transparent 40%),
        repeating-conic-gradient(from 0deg,
            var(--yellow-hot) 0 6deg, transparent 6deg 12deg);
    border-radius: 50%;
    opacity: 0.92;
    filter: drop-shadow(0 0 0 var(--ink));
    z-index: 2;
    pointer-events: none;
}

/* The mystery silhouette panel — in flow inside .hero-stage, filling
   its width so the stage's bounds == the card's bounds. */
.mystery-frame {
    position: relative;
    z-index: 3;
    width: 100%;
    border: 4px solid var(--ink);
    background: var(--paper-hi);
    box-shadow: 8px 8px 0 var(--ink);
    padding: 0.5rem;
    transform: rotate(-2deg);
}
.mystery-frame .mf-img {
    aspect-ratio: 4/5;
    border: 2px solid var(--ink);
    background:
        radial-gradient(circle at 30% 35%, rgba(214,32,44,0.35), transparent 55%),
        radial-gradient(circle, rgba(255,236,164,0.18) 1px, transparent 1.5px) 0 0/6px 6px,
        var(--ink);
    position: relative;
    overflow: hidden;
}
.mystery-frame .mf-img::after {
    content: '?';
    position: absolute;
    inset: 0;
    display: flex; align-items: center; justify-content: center;
    font-family: var(--display);
    /* Glyph scales with the card so it always fills the frame nicely. */
    font-size: clamp(8rem, 20vw, 14rem);
    color: var(--yellow);
    -webkit-text-stroke: clamp(4px, 0.55vw, 7px) var(--ink);
    paint-order: stroke fill;
    line-height: 1;
    text-shadow: clamp(4px, 0.7vw, 9px) clamp(4px, 0.7vw, 9px) 0 var(--red);
    transform: translateX(-9%) rotate(-6deg);
    z-index: 2;
}
.mystery-frame .mf-cap {
    margin-top: 0.5rem;
    font-family: var(--display);
    text-align: center;
    color: var(--ink);
    font-size: clamp(0.7rem, 0.95vw, 1.05rem);
    letter-spacing: 0.08em;
}

/* On-cover narrator caption — styled as a white chat bubble with a tail
   pointing up toward the mystery card. */
.cover-narrate {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) rotate(-1deg);
    width: min(560px, 80%);
    background: var(--paper-hi);
    border: 3px solid var(--ink);
    border-radius: 1.6rem;
    padding: 0.85rem 1.25rem 0.9rem;
    font-family: var(--hand);
    font-weight: 700;
    font-size: 1rem;
    color: var(--ink);
    box-shadow: 5px 5px 0 var(--ink);
    z-index: 5;
    text-align: center;
}
.cover-narrate b { font-family: var(--display); letter-spacing: 0.08em; color: var(--red); }
/* Chat-bubble tail — black outline + white fill, pointing up toward the card. */
.cover-narrate::before {
    content: '';
    position: absolute;
    top: -16px;
    left: 50%;
    margin-left: -10px;
    border: 9px solid transparent;
    border-bottom-color: var(--ink);
}
.cover-narrate::after {
    content: '';
    position: absolute;
    top: -10px;
    left: 50%;
    margin-left: -7px;
    border: 6px solid transparent;
    border-bottom-color: var(--paper-hi);
}

/* ---- 3) CTA strip ---- */
.cover-ctas {
    background: var(--paper);
    padding: 1.4rem 1.6rem;
    border-bottom: 4px solid var(--ink);
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 1.4rem;
}
@media (max-width: 800px) { .cover-ctas { grid-template-columns: 1fr; } }

.cta-narrate {
    font-family: var(--hand);
    font-weight: 700;
    font-size: 1rem;
    line-height: 1.25;
}
.cta-narrate b { font-family: var(--display); letter-spacing: 0.08em; color: var(--red); font-weight: 400; }

.cta-stack {
    display: flex;
    gap: 0.7rem;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: center;
}

/* ---- Comic-book "DAILY CHALLENGE" hero button ---- */
.cbtn--hero {
    position: relative;
    overflow: visible;
    z-index: 1;
    font-size: 1.35rem;
    padding: 1.05rem 1.7rem 0.9rem;
    isolation: isolate;
    animation: hero-wiggle 2.6s ease-in-out infinite;
}
.cbtn--hero .hero-label {
    position: relative;
    z-index: 3;
    display: inline-flex; align-items: center; gap: 0.4rem;
    -webkit-text-stroke: 1.2px var(--ink);
    paint-order: stroke fill;
    text-shadow: 2px 2px 0 var(--ink);
}
/* radiating sun-burst halo behind the button */
.cbtn--hero .hero-bursts {
    position: absolute;
    inset: -22px;
    z-index: -1;
    background:
        repeating-conic-gradient(from 0deg,
            var(--yellow-hot) 0 8deg,
            transparent 8deg 16deg);
    border-radius: 50%;
    filter: drop-shadow(0 0 0 var(--ink));
    opacity: 0.85;
    animation: hero-spin 9s linear infinite, hero-pulse 1.4s ease-in-out infinite;
    pointer-events: none;
    -webkit-mask: radial-gradient(circle, #000 38%, rgba(0,0,0,0.85) 50%, transparent 70%);
            mask: radial-gradient(circle, #000 38%, rgba(0,0,0,0.85) 50%, transparent 70%);
}
/* drop-shadow ring + pulsating halo */
.cbtn--hero::before {
    content: '';
    position: absolute;
    inset: -10px;
    z-index: -2;
    background: radial-gradient(circle, var(--yellow-hot) 0 35%, rgba(246,198,50,0.6) 50%, transparent 72%);
    filter: blur(2px);
    animation: hero-pulse 1.4s ease-in-out infinite;
    pointer-events: none;
}
/* halftone dots over the button surface for printed feel */
.cbtn--hero::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    background:
        radial-gradient(circle, rgba(0,0,0,0.18) 1.2px, transparent 1.6px) 0 0/5px 5px;
    mix-blend-mode: multiply;
    opacity: 0.55;
}
.cbtn--hero:hover {
    background: var(--yellow);
    color: var(--ink);
    transform: translate(-2px, -2px) rotate(-1deg);
    box-shadow: 9px 9px 0 var(--ink);
}
.cbtn--hero:hover .hero-label {
    -webkit-text-stroke: 1.2px var(--ink);
    text-shadow: 2px 2px 0 var(--red);
}

/* the rotating star "ZAPS" bouncing around the button */
.cbtn--hero .hero-zap {
    position: absolute;
    z-index: 4;
    font-family: var(--display);
    color: var(--yellow-hot);
    -webkit-text-stroke: 1.5px var(--ink);
    paint-order: stroke fill;
    line-height: 1;
    pointer-events: none;
    text-shadow: 2px 2px 0 var(--ink);
}
.cbtn--hero .zap-1 { top: -16px;  left: -14px;  font-size: 1.4rem; animation: hero-blink 1.1s steps(2,end) infinite; }
.cbtn--hero .zap-2 { top: -14px;  right: -10px; font-size: 1.05rem; animation: hero-blink 0.9s steps(2,end) infinite 0.45s; color: var(--paper); }
.cbtn--hero .zap-3 { bottom: -14px; right: 32%; font-size: 1.15rem; animation: hero-blink 1.3s steps(2,end) infinite 0.7s; }

@keyframes hero-pulse {
    0%, 100% { opacity: 0.55; transform: scale(1); }
    50%      { opacity: 1;    transform: scale(1.06); }
}
@keyframes hero-spin {
    to { transform: rotate(360deg); }
}
@keyframes hero-wiggle {
    0%, 100% { transform: rotate(-1deg); }
    50%      { transform: rotate(1deg); }
}
@keyframes hero-blink {
    0%, 100% { opacity: 1;   transform: scale(1) rotate(0deg); }
    50%      { opacity: 0.2; transform: scale(0.6) rotate(35deg); }
}
@media (prefers-reduced-motion: reduce) {
    .cbtn--hero,
    .cbtn--hero .hero-bursts,
    .cbtn--hero::before,
    .cbtn--hero .hero-zap { animation: none !important; }
}

/* ---- 4) HOW-IT-WORKS strip = "Stan's Soapbox" ---- */
.soapbox {
    background: var(--paper-hi);
    padding: 1.6rem 1.6rem 1.8rem;
    border-bottom: 4px solid var(--ink);
    display: grid;
    grid-template-columns: 270px 1fr;
    gap: 1.4rem;
}
@media (max-width: 800px) { .soapbox { grid-template-columns: 1fr; } }

.soapbox-head {
    background: var(--red);
    color: var(--paper);
    border: 3px solid var(--ink);
    box-shadow: 5px 5px 0 var(--ink);
    padding: 0.9rem 0.9rem 1rem;
    transform: rotate(-1.5deg);
    text-align: center;
    align-self: start;
}
.soapbox-head h3 {
    font-family: var(--display);
    font-size: 2rem;
    letter-spacing: 0.04em;
    line-height: 0.9;
}
.soapbox-head p {
    font-family: var(--hand);
    font-weight: 700;
    font-size: 0.95rem;
    margin-top: 0.3rem;
}

.soapbox-body {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 1rem;
    align-items: stretch;
}
@media (max-width: 700px) { .soapbox-body { grid-template-columns: 1fr; } }

.soapbox-text {
    border: 3px solid var(--ink);
    background: var(--paper);
    padding: 1rem 1.1rem;
    box-shadow: 4px 4px 0 var(--ink);
}
.soapbox-text p {
    font-size: 0.95rem;
    line-height: 1.45;
    margin-bottom: 0.55rem;
}
.soapbox-text p:last-child { margin-bottom: 0; }
.soapbox-text b {
    font-family: var(--display);
    letter-spacing: 0.08em;
    color: var(--red);
    font-weight: 400;
}

.color-key {
    border: 3px solid var(--ink);
    background: var(--paper);
    box-shadow: 4px 4px 0 var(--ink);
    overflow: hidden;
}
.color-key .ck-tag {
    background: var(--ink); color: var(--paper);
    font-family: var(--display); letter-spacing: 0.12em;
    padding: 0.3rem 0.8rem; font-size: 0.85rem;
}
.color-key .ck-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.45rem 0.8rem;
    border-bottom: 2px dashed var(--ink);
    font-family: var(--body);
    font-weight: 700;
    font-size: 0.85rem;
}
.color-key .ck-row:last-child { border-bottom: none; }
.color-key .ck-row em {
    font-style: normal; font-family: var(--hand); font-weight: 700; opacity: 0.7;
    margin-left: 0.4rem;
}
.ck-swatch {
    width: 28px; height: 28px; border: 2.5px solid var(--ink);
    display: inline-flex; align-items: center; justify-content: center;
    font-family: var(--display); font-size: 1.1rem; line-height: 1;
    font-weight: 700;
}
.ck-swatch.correct   { background: radial-gradient(circle, rgba(0,0,0,0.20) 1.1px, transparent 1.5px) 0 0/4px 4px, var(--green); color: var(--paper); }
.ck-swatch.partial   { background: radial-gradient(circle, rgba(0,0,0,0.22) 1.1px, transparent 1.5px) 0 0/4px 4px, var(--yellow); color: var(--ink); }
.ck-swatch.incorrect { background: radial-gradient(circle, rgba(0,0,0,0.18) 1.1px, transparent 1.5px) 0 0/4px 4px, var(--red); color: var(--paper); }

/* Inline mark glyphs used inside "The Grade" copy to mirror cell symbols.
   Specificity bumped to .key-mark.mk-* so the colors win over .soapbox-text b
   (which forces every <b> in the soapbox to var(--red)). */
.key-mark {
    display: inline-flex;
    align-items: center; justify-content: center;
    width: 1.4em; height: 1.4em;
    border: 2px solid var(--ink);
    font-family: var(--display); font-weight: 700;
    line-height: 1;
    transform: translateY(0.15em);
    margin: 0 1px;
    font-size: 0.95em;
    letter-spacing: 0;
}
.key-mark.mk-correct   { background: radial-gradient(circle, rgba(0,0,0,0.20) 1.1px, transparent 1.5px) 0 0/4px 4px, var(--green);  color: var(--paper); }
.key-mark.mk-partial   { background: radial-gradient(circle, rgba(0,0,0,0.22) 1.1px, transparent 1.5px) 0 0/4px 4px, var(--yellow); color: var(--ink); }
.key-mark.mk-incorrect { background: radial-gradient(circle, rgba(0,0,0,0.18) 1.1px, transparent 1.5px) 0 0/4px 4px, var(--red);    color: var(--paper); }

/* ---- 5) Cover footer — barcode + comics code + credits ---- */
.cover-foot {
    background: var(--ink);
    color: var(--paper);
    padding: 1rem 1.2rem;
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 1rem;
    align-items: center;
}
.barcode {
    background: var(--paper-hi);
    color: var(--ink);
    padding: 0.45rem 0.6rem 0.35rem;
    border: 2px solid var(--paper-hi);
    width: 150px;
    font-family: var(--mono);
    font-size: 0.65rem;
    letter-spacing: 0.05em;
}
.barcode .lines {
    height: 36px;
    background-image:
        linear-gradient(90deg,
            var(--ink) 0 1px, transparent 1px 3px,
            var(--ink) 3px 6px, transparent 6px 8px,
            var(--ink) 8px 9px, transparent 9px 12px,
            var(--ink) 12px 14px, transparent 14px 17px,
            var(--ink) 17px 18px, transparent 18px 21px,
            var(--ink) 21px 24px, transparent 24px 25px,
            var(--ink) 25px 28px, transparent 28px 30px);
    background-size: 30px 100%;
    margin-bottom: 3px;
}
.barcode .num { display: flex; justify-content: space-between; }

.foot-cred {
    text-align: center;
    font-family: var(--display);
    letter-spacing: 0.18em;
    color: var(--yellow);
    font-size: 0.85rem;
}
.foot-cred small { display: block; color: var(--paper); opacity: 0.7; font-family: var(--body); letter-spacing: 0.05em; font-weight: 400; font-size: 0.7rem; margin-top: 3px; }

.cca {
    width: 70px; height: 70px;
    border-radius: 50%;
    border: 3px solid var(--paper-hi);
    background: var(--paper-hi);
    color: var(--ink);
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    font-family: var(--display);
    font-size: 0.55rem;
    line-height: 1;
    letter-spacing: 0.04em;
    text-align: center;
    transform: rotate(-3deg);
    padding: 4px;
}
.cca b { font-size: 0.9rem; letter-spacing: 0.05em; }
.cca small { font-size: 0.4rem; opacity: 0.7; }

/* ---- corner page-shelf decorations ---- */
.page-marks {
    position: absolute;
    z-index: 6;
    pointer-events: none;
}
.page-marks.tl { top: 8px; left: 8px; }
.page-marks.tr { top: 8px; right: 8px; }
.page-marks.bl { bottom: 8px; left: 8px; }
.page-marks.br { bottom: 8px; right: 8px; }
.page-marks .regmark { width: 18px; height: 18px; opacity: 0.45; }
.page-marks .regmark::before { width: 1.5px; }
.page-marks .regmark::after  { height: 1.5px; }
.page-marks .regmark > i { inset: 3px; border-width: 1.5px; }

/* ============================================================
   COVER FLAIR — comic-book ambient effects in the page margins
   that "emanate" from the cover edges. Only visible on viewports
   wide enough to render beside the 1180px-max cover without
   overlapping it; otherwise hidden entirely.
   ============================================================ */
.cover-flair {
    position: fixed;
    inset: 0;
    z-index: 1;          /* below .cover (z 2), above body texture */
    pointer-events: none;
    overflow: hidden;
}
@media (max-width: 1480px) {
    .cover-flair { display: none; }
}
@media (prefers-reduced-motion: reduce) {
    .cover-flair * { animation: none !important; }
}

/* ---- side speed-lines that auto-fill the gap between viewport
       edge and the cover, fading out toward the page edge ---- */
.cover-flair__rays {
    position: absolute;
    top: 0; bottom: 0;
    width: max(0px, calc((100vw - 1180px) / 2 - 1rem));
    background-image: repeating-linear-gradient(
        var(--rays-angle, 75deg),
        transparent 0 14px,
        var(--ink) 14px 16px,
        transparent 16px 36px);
    opacity: 0.13;
}
.cover-flair__rays--left {
    left: 0;
    --rays-angle: 105deg;
    -webkit-mask: linear-gradient(to right, transparent 0%, black 92%);
            mask: linear-gradient(to right, transparent 0%, black 92%);
    animation: flair-rays-drift-l 9s linear infinite;
}
.cover-flair__rays--right {
    right: 0;
    --rays-angle: 75deg;
    -webkit-mask: linear-gradient(to left, transparent 0%, black 92%);
            mask: linear-gradient(to left, transparent 0%, black 92%);
    animation: flair-rays-drift-r 9s linear infinite;
}
@keyframes flair-rays-drift-l {
    from { background-position:   0 0; }
    to   { background-position: -36px 0; }
}
@keyframes flair-rays-drift-r {
    from { background-position:   0 0; }
    to   { background-position:  36px 0; }
}

/* ---- halftone burst clouds anchored just outside the cover ---- */
.cover-flair__halftone {
    position: absolute;
    width: 320px; height: 320px;
    border-radius: 50%;
    background:
        radial-gradient(circle at center,
            transparent 0 35%,
            var(--paper-lo) 36% 38%,
            transparent 39% 100%),
        radial-gradient(circle, var(--ink) 1.4px, transparent 2px) 0 0/8px 8px;
    -webkit-mask: radial-gradient(circle, black 30%, transparent 70%);
            mask: radial-gradient(circle, black 30%, transparent 70%);
    opacity: 0.35;
    animation: flair-halo 7s ease-in-out infinite;
}
.cover-flair__halftone--left  { top: 30%; left:  max(-80px, calc(50% - 590px - 240px)); }
.cover-flair__halftone--right { top: 55%; right: max(-80px, calc(50% - 590px - 240px)); animation-delay: -3.5s; }
@keyframes flair-halo {
    0%, 100% { transform: scale(1)   rotate(0deg);   opacity: 0.30; }
    50%      { transform: scale(1.08) rotate(8deg);  opacity: 0.45; }
}

/* ============================================================
   MOBILE — narrow-viewport fixes (<= 500px)
   The cover is designed as a magazine spread with multiple
   absolute / wide-grid sections. Below ~500px those sections
   start blowing past the viewport. The rules below: (a) let grid
   children shrink, (b) downsize wordmarks / bursts, (c) drop the
   noisier strap text, (d) keep the hero's silhouette and CTA
   stack readable.
   ============================================================ */
@media (max-width: 500px) {
    /* CRITICAL: stop the cover's implicit grid column from expanding to
       max-content of its widest child. Without this, the entire .cover
       grid track widens to ~420px on a 375px viewport because at least
       one section (logo / banner / etc) has un-shrinkable content. */
    .cover {
        grid-template-columns: minmax(0, 1fr);
        margin: 0.5rem;             /* room for box-shadow without scroll */
        box-shadow: 6px 6px 0 var(--ink);   /* lighter shadow on mobile */
        max-width: calc(100vw - 1rem);
    }

    /* The cover-flair decorations are big fixed-position rays that hang in
       the page margins next to the desktop cover. On a phone there's no
       space beside the cover, and the rays can push the viewport sideways
       on iOS even with overflow-x: hidden. Hide them entirely. */
    .cover-flair { display: none; }

    /* Body's bottom-right fingerprint smudge is 280×280 — overkill at
       phone width and can be trimmed for performance. */
    body::after { width: 180px; height: 180px; }

    /* allow every flex/grid child of the cover containers to shrink
       below its intrinsic content width — otherwise they push past
       the viewport regardless of overflow: hidden on .cover */
    .cover-hero,
    .cover-ctas,
    .cover-ctas > *,
    .soapbox,
    .soapbox > *,
    .soapbox-body,
    .soapbox-body > * { min-width: 0; }

    /* ---- 1) hero corners + masthead — shrink the squares + wordmark
       so the layout fits between the two corners on narrow phones. */
    .hero-corner { width: 64px; height: 64px; padding: 0.35rem 0.3rem; gap: 2px; }
    .hero-corner b { font-size: 1rem; }
    .hero-corner small { font-size: 0.55rem; }
    .hero-masthead {
        gap: 0.4rem;
        padding: 0.6rem 4.5rem 0.7rem;
    }
    .hero-logo {
        font-size: clamp(2.4rem, 14vw, 4.5rem);
        -webkit-text-stroke-width: 2.5px;
        text-shadow: 3px 3px 0 var(--ink);
    }
    .hero-subtag {
        font-size: 0.85rem;
        letter-spacing: 0.12em;
        padding: 0.3rem 0.7rem 0.25rem;
        border-width: 2.5px;
        box-shadow: 3px 3px 0 var(--ink);
    }

    /* ---- 2) hero body — narrower padding; the stage + halo scale via
       clamp() so no per-viewport overrides are needed. ---- */
    .cover-hero { padding: 0 0.7rem 7rem; }
    .mystery-frame { box-shadow: 5px 5px 0 var(--ink); }

    .cover-narrate {
        font-size: 0.78rem;
        padding: 0.5rem 0.7rem;
        bottom: 0.8rem;
        width: min(320px, 90%);
    }

    /* ---- 3) CTAs ---- */
    .cover-ctas { padding: 1rem 0.8rem; gap: 0.8rem; }
    .cta-stack { justify-content: center; }
    .cta-stack .cbtn { font-size: 0.95rem; padding: 0.65rem 0.9rem; }
    .cbtn--hero { font-size: 1.05rem !important; padding: 0.7rem 1rem !important; }

    /* ---- 4) Soapbox header / body shrink ---- */
    .soapbox { padding: 1.1rem 0.9rem 1.3rem; gap: 1rem; }
    .soapbox-head h3 { font-size: 1.5rem; }
    .soapbox-text p { font-size: 0.9rem; }
    .color-key .ck-row { font-size: 0.78rem; }
    .color-key .ck-row em { font-size: 0.78rem; }

    /* ---- 5) Footer: stack barcode / credits / approval seal ---- */
    .cover-foot {
        grid-template-columns: 1fr;
        gap: 0.8rem;
        padding: 1rem 0.8rem;
        justify-items: center;
        text-align: center;
    }
    .foot-cred { font-size: 0.8rem; }
    .barcode { order: 3; }       /* visual order: credits, seal, barcode */
    .cca { order: 2; }
    .foot-cred { order: 1; }
}
