/* Cards Against Kim Jong Un — State Publishing House
   The site wears the deck's costume: vermilion ground, gold star, cream
   newsprint, heavy condensed stacks. /research deliberately takes it off. */

:root {
  --red:        #b01020;
  --red-ray:    #a80f1e;   /* the 1-step tonal shift that makes the starburst */
  --red-deep:   #8a0a18;
  --cream:      #f5eddc;
  --cream-ray:  #eee5d2;
  --cream-2:    #e8ddc6;
  --gold:       #e7b229;
  --gold-deep:  #c8941a;
  --ink:        #1a1614;
  --ash:        #6e665c;
  --rule:       #cdc0a6;

  --measure: 34rem;
  --page: 74rem;
  --pad: clamp(1.25rem, 4vw, 3rem);

  --display: "Archivo Black", "Arial Black", "Helvetica Neue", sans-serif;
  --body: "Archivo Narrow", "Roboto Condensed", "Liberation Sans Narrow", system-ui, sans-serif;

  color-scheme: light;
}

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

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

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font: 400 clamp(1rem, 0.96rem + 0.2vw, 1.115rem)/1.55 var(--body);
  overflow-x: hidden;
}

/* The one starburst definition the whole site shares. */
.rays {
  background:
    repeating-conic-gradient(from 0deg at 50% 118%,
      var(--ray-a) 0deg 7.5deg, var(--ray-b) 7.5deg 15deg);
}

h1, h2, h3 { font-family: var(--display); font-weight: 400; line-height: 0.94; letter-spacing: -0.015em; margin: 0; }

a { color: var(--red-deep); text-underline-offset: 0.18em; text-decoration-thickness: 0.08em; }
a:hover { color: var(--red); }

:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
  border-radius: 1px;
}

.wrap { width: min(100% - var(--pad) * 2, var(--page)); margin-inline: auto; }
.prose { max-width: var(--measure); }

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 99;
  background: var(--gold); color: var(--ink); padding: .7rem 1.1rem; font-weight: 700;
}
.skip:focus { left: 0; }

/* ── masthead ───────────────────────────────────────────────────────────── */
.masthead {
  position: relative; z-index: 3;
  display: flex; align-items: center; gap: 1rem;
  padding: 1.1rem 0 1.4rem;
}
.masthead__mark { display: flex; align-items: center; gap: .55rem; text-decoration: none; color: inherit; }
.masthead__name { font-family: var(--display); font-size: .95rem; letter-spacing: .01em; }
.masthead nav { margin-left: auto; display: flex; gap: clamp(.9rem, 3vw, 1.9rem); align-items: center; }
.masthead nav a { font-weight: 700; text-decoration: none; font-size: .95rem; }
.masthead nav a:hover { text-decoration: underline; }
.masthead--onred, .masthead--onred a { color: var(--cream); }
.masthead--onred nav a:hover { color: #fff; }

/* ── the poster hero ────────────────────────────────────────────────────── */
.poster {
  --ray-a: var(--red); --ray-b: var(--red-ray);
  position: relative;
  background-color: var(--red);
  color: var(--cream);
  padding-bottom: clamp(2.5rem, 7vw, 5rem);
}
.poster::after {
  content: ""; position: absolute; inset-inline: 0; bottom: 0; height: 6px;
  background: var(--gold);
}
.poster__grid {
  display: grid; gap: clamp(2rem, 5vw, 3.5rem);
  grid-template-columns: 1fr;
  align-items: start;
  padding-block: clamp(1.5rem, 4vw, 3rem) 0;
}
@media (min-width: 62rem) {
  .poster__grid { grid-template-columns: 1.05fr 0.95fr; align-items: center; }
}

.star { display: block; width: clamp(2.6rem, 6vw, 3.6rem); height: auto; }
.star--gold { color: var(--gold); }

.poster__title {
  font-size: clamp(3.1rem, 11.5vw, 6.4rem);
  margin-block: .8rem .1rem;
  text-transform: uppercase;
}
.poster__title span { display: block; }
.poster__title span:last-child { font-size: .62em; color: var(--gold); }

.poster__kicker {
  display: inline-block; background: var(--gold); color: var(--ink);
  font-weight: 700; font-size: clamp(.9rem, 2.4vw, 1.02rem);
  padding: .42rem .85rem; margin-top: 1.1rem;
}
.poster__blurb { max-width: 30rem; margin: 1.35rem 0 0; color: #f2d9dd; }
.poster__blurb strong { color: var(--cream); }

.poster__actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.6rem; }

/* ── buttons ────────────────────────────────────────────────────────────── */
.btn {
  display: inline-block; font-family: var(--display); font-size: 1rem;
  padding: .85rem 1.35rem; border: 3px solid transparent; cursor: pointer;
  text-decoration: none; text-transform: uppercase; letter-spacing: .01em;
  background: var(--gold); color: var(--ink); border-color: var(--gold);
  transition: transform .12s ease;
}
.btn:hover { color: var(--ink); transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn[disabled] { opacity: .55; cursor: not-allowed; transform: none; }
.btn--ghost { background: transparent; color: var(--cream); border-color: var(--cream); }
.btn--ghost:hover { background: var(--cream); color: var(--red-deep); }
.btn--ink { background: var(--ink); border-color: var(--ink); color: var(--cream); }
.btn--ink:hover { color: var(--cream); }
.btn--wide { width: 100%; text-align: center; }

/* ── the live loyalty test (hero right) ─────────────────────────────────── */
.test {
  background: var(--gold); color: var(--ink);
  border: 6px solid var(--ink);
  padding: clamp(1.25rem, 3.5vw, 1.9rem);
  box-shadow: 14px 14px 0 rgba(0,0,0,.28);
}
.test__label { font-family: var(--display); font-size: .82rem; text-transform: uppercase; }
.test__rule { height: 4px; background: var(--ink); margin: .6rem 0 1rem; }
.test__prompt { font-family: var(--display); font-size: clamp(1.55rem, 4.6vw, 2.15rem); line-height: 1.02; }
.test__count {
  font-family: var(--display); font-size: clamp(4rem, 16vw, 7rem); line-height: 1;
  text-align: center; margin: .5rem 0 .2rem; font-variant-numeric: tabular-nums;
}
.test__count[data-state="go"] { color: var(--red-deep); }
.test__status { min-height: 3.6em; margin: .4rem 0 1rem; font-size: 1.02rem; }
.test__status b { display: block; font-family: var(--display); font-size: 1.15rem; margin-bottom: .15rem; }

/* ── generic sections ───────────────────────────────────────────────────── */
.section { padding-block: clamp(3rem, 8vw, 5.5rem); }
.section--rule { border-top: 2px solid var(--rule); }
.section--dark { background: var(--ink); color: var(--cream); }
.section--dark h2 { color: var(--cream); }
.section--dark a { color: var(--gold); }

.section__head { max-width: 46rem; margin-bottom: clamp(1.6rem, 4vw, 2.6rem); }
.section__head h2 { font-size: clamp(1.9rem, 5.4vw, 3rem); text-transform: uppercase; }
.section__head p { margin: .95rem 0 0; max-width: var(--measure); color: var(--ash); }
.section--dark .section__head p { color: #bdb4a6; }

/* ── the sampler ────────────────────────────────────────────────────────── */
.sampler { display: grid; gap: clamp(1.25rem, 3.5vw, 2rem); grid-template-columns: 1fr; }
@media (min-width: 52rem) { .sampler { grid-template-columns: minmax(0,1fr) minmax(0,1.15fr); align-items: start; } }

.card {
  --ray-a: var(--red); --ray-b: var(--red-ray);
  position: relative; aspect-ratio: 825 / 1125;
  width: 100%; max-width: 21rem;
  background-color: var(--red); color: var(--cream);
  padding: clamp(1.1rem, 3.2vw, 1.6rem);
  display: flex; flex-direction: column;
  border: 1px solid rgba(0,0,0,.25);
  box-shadow: 10px 10px 0 rgba(26,22,20,.16);
}
.card--alibi { --ray-a: var(--cream); --ray-b: var(--cream-ray); background-color: var(--cream); color: var(--ink); }
.card__label { font-family: var(--display); font-size: .74rem; text-transform: uppercase; display: flex; align-items: center; gap: .45rem; }
.card__label::before { content: ""; width: 6px; height: 1.05em; background: var(--gold); }
.card--alibi .card__label::before { background: var(--red); }
.card__text { font-family: var(--display); line-height: 1.06; margin-top: .95rem; font-size: clamp(1.15rem, 3.6vw, 1.7rem); }
.card__foot { margin-top: auto; display: flex; align-items: center; gap: .5rem; font-size: .72rem; opacity: .72; font-weight: 700; }
.blank {
  display: inline-block; width: 4.6em; margin: 0 .12em;
  border-bottom: .1em solid currentColor; opacity: .5;
  vertical-align: text-bottom; height: .95em;
}
.filled { color: var(--gold); }
.card--alibi .filled, .test .filled { color: var(--red-deep); }

.card__pick { background: var(--gold); color: var(--ink); padding: .2rem .5rem; font-weight: 700; opacity: 1; }

.hand { display: grid; gap: .6rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 13.5rem), 1fr)); }
.chip {
  font: 700 .97rem/1.3 var(--body); text-align: left;
  background: var(--cream); color: var(--ink);
  border: 2px solid var(--ink); padding: .7rem .8rem; cursor: pointer;
  transition: transform .1s ease, background .1s ease;
}
.chip:hover { transform: translateY(-2px); background: #fff; }
.chip[aria-pressed="true"] { background: var(--gold); border-color: var(--gold-deep); }
.chip[disabled] { opacity: .45; cursor: not-allowed; transform: none; }

.sampler__aside { border-top: 3px solid var(--ink); padding-top: 1rem; }
.ahtoggle {
  display: flex; gap: .6rem; align-items: flex-start;
  border: 2px solid var(--ink); background: var(--cream-2);
  padding: .65rem .8rem; margin-bottom: 1rem; cursor: pointer; font-size: .95rem;
}
.ahtoggle input { margin-top: .25rem; flex: 0 0 auto; }
.ahtoggle:hover { background: var(--gold); }
.sampler__count { font-family: var(--display); font-size: .82rem; text-transform: uppercase; color: var(--ash); }

/* ── steps (a real sequence, so numbered) ───────────────────────────────── */
.steps { counter-reset: s; display: grid; gap: 1.4rem; grid-template-columns: 1fr; margin: 0; padding: 0; list-style: none; }
@media (min-width: 48rem) { .steps { grid-template-columns: repeat(2, 1fr); gap: 1.6rem 2.4rem; } }
@media (min-width: 70rem) { .steps { grid-template-columns: repeat(4, 1fr); } }
.steps li { counter-increment: s; border-top: 3px solid var(--ink); padding-top: .85rem; }
.steps li::before {
  content: counter(s); font-family: var(--display); font-size: 1.5rem;
  color: var(--red); display: block; margin-bottom: .2rem;
}
.steps h3 { font-size: 1.12rem; margin-bottom: .35rem; text-transform: uppercase; }
.steps p { margin: 0; font-size: .97rem; color: var(--ash); }

/* ── offer panels ───────────────────────────────────────────────────────── */
.offers { display: grid; gap: clamp(1.25rem, 3vw, 2rem); grid-template-columns: 1fr; }
@media (min-width: 52rem) { .offers { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 68rem) { .offers--three { grid-template-columns: repeat(3, 1fr); } }
.offer { border: 4px solid var(--ink); padding: clamp(1.35rem, 3.5vw, 2rem); display: flex; flex-direction: column; background: var(--cream); }
.offer--online { --ray-a: var(--red); --ray-b: var(--red-ray); background-color: var(--red); color: var(--cream); border-color: var(--gold); }
.offer__shot {
  display: block; width: 100%; height: auto; margin: -0.4rem 0 1rem;
  border: 2px solid var(--ink); background: var(--cream);
  /* All three product shots are rendered onto one 620x886 canvas, so the row
     lines up whatever the underlying box proportions are. */
  aspect-ratio: 620 / 886; object-fit: contain;
}
.offer--online .offer__shot { border-color: var(--gold); }

.offer h3 { font-size: clamp(1.4rem, 4vw, 1.9rem); text-transform: uppercase; }
.offer__price { font-family: var(--display); font-size: clamp(2.4rem, 7vw, 3.4rem); margin: .5rem 0 .1rem; }
.offer__note { font-size: .9rem; color: var(--ash); margin: 0 0 1.1rem; }
.offer--online .offer__note { color: #f0d2d6; }
.offer ul { list-style: none; margin: 0 0 1.5rem; padding: 0; display: grid; gap: .5rem; }
.offer li { padding-left: 1.4rem; position: relative; font-size: .99rem; }
.offer li::before { content: ""; position: absolute; left: 0; top: .52em; width: .7rem; height: .7rem; background: var(--red); }
.offer--online li::before { background: var(--gold); }
.offer .btn { margin-top: auto; }

/* ── footer ─────────────────────────────────────────────────────────────── */
.foot { background: var(--ink); color: #bdb4a6; padding-block: clamp(2.5rem, 6vw, 4rem); font-size: .93rem; }
.foot a { color: var(--gold); }
.foot__grid { display: grid; gap: 1.8rem; grid-template-columns: 1fr; }
@media (min-width: 52rem) { .foot__grid { grid-template-columns: 1.4fr 1fr; gap: 3rem; } }
.foot h2 { font-size: 1.05rem; color: var(--cream); text-transform: uppercase; margin-bottom: .6rem; }
.foot nav { display: grid; gap: .45rem; }
.foot__legal { margin-top: 2.2rem; padding-top: 1.2rem; border-top: 1px solid #3a3531; font-size: .84rem; color: #8e857a; }

/* ── the serious-mode pages (/research) ─────────────────────────────────── */
.doc { background: var(--cream); }
.doc__head { border-bottom: 3px solid var(--ink); padding-block: clamp(2rem, 5vw, 3.2rem) clamp(1.4rem, 3vw, 2rem); }
.doc__head h1 { font-size: clamp(2rem, 6vw, 3.2rem); max-width: 22ch; text-transform: none; letter-spacing: -0.02em; }
.doc__meta { margin-top: 1rem; color: var(--ash); font-size: .92rem; }
.doc__body { padding-block: clamp(2rem, 5vw, 3.2rem); }
.doc__body h2 { font-size: clamp(1.3rem, 3.6vw, 1.75rem); margin-top: 2.6rem; max-width: 28ch; }
.doc__body h2:first-of-type { margin-top: 0; }
.doc__body h3 { font-family: var(--body); font-weight: 700; font-size: 1.06rem; margin-top: 1.7rem; }
.doc__body p, .doc__body li { max-width: var(--measure); }
.doc__body p { margin: .9rem 0; }
.doc__body ul, .doc__body ol { padding-left: 1.15rem; }
.doc__body li { margin: .45rem 0; }

.lede { font-size: clamp(1.1rem, 2.6vw, 1.28rem); line-height: 1.5; color: var(--ink); }

.pull {
  border-left: 6px solid var(--red); padding: .35rem 0 .35rem 1.1rem;
  margin: 1.8rem 0; max-width: var(--measure); font-size: 1.1rem;
}
.pull cite { display: block; margin-top: .55rem; font-size: .88rem; font-style: normal; color: var(--ash); }

.figures { display: grid; gap: 1px; background: var(--rule); border: 1px solid var(--rule); margin: 1.8rem 0; grid-template-columns: 1fr; }
@media (min-width: 40rem) { .figures { grid-template-columns: repeat(3, 1fr); } }
.figure { background: var(--cream); padding: 1.1rem; }
.figure b { display: block; font-family: var(--display); font-size: clamp(1.5rem, 4.5vw, 2rem); color: var(--red-deep); line-height: 1; }
.figure span { display: block; margin-top: .45rem; font-size: .89rem; color: var(--ash); }

.callout { border: 3px solid var(--ink); padding: 1.2rem 1.3rem; margin: 2rem 0; max-width: var(--measure); background: var(--cream-2); }
.callout h3 { margin-top: 0; font-family: var(--display); font-weight: 400; text-transform: uppercase; }
.callout p:last-child { margin-bottom: 0; }

.sources { font-size: .93rem; }
.sources li { margin: .6rem 0; max-width: 46rem; }
.sources cite { font-style: normal; color: var(--ash); }

/* ── play page ──────────────────────────────────────────────────────────── */
.bar { background: var(--ink); color: var(--cream); padding: .75rem 0; font-size: .92rem; }
.bar .wrap { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }
.bar__badge { background: var(--gold); color: var(--ink); font-weight: 700; padding: .18rem .55rem; }
.bar a { color: var(--gold); }
.bar__spacer { margin-left: auto; }

.table { padding-block: clamp(1.5rem, 4vw, 2.5rem) clamp(3rem, 7vw, 4.5rem); }
.scoreline { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.4rem; }
.pill { border: 2px solid var(--ink); padding: .35rem .7rem; font-weight: 700; font-size: .92rem; }
.pill--lead { background: var(--gold); }
.pill--out { opacity: .45; text-decoration: line-through; }

.alert { border: 4px solid var(--red); background: var(--cream-2); padding: 1.1rem 1.25rem; margin-bottom: 1.5rem; max-width: 46rem; }
.alert h2 { font-size: 1.15rem; text-transform: uppercase; margin-bottom: .4rem; }
.alert p { margin: .4rem 0 0; }
.alert p:last-child { margin-bottom: 0; }

.vis-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

@media print {
  .masthead, .poster__actions, .bar, .foot nav { display: none; }
  body { background: #fff; }
}
