/* ============================================================
   GCCDLE — Version B — Original Brand Identity
   Concept: TARGET ACQUIRED — tactical lock-on meets daily puzzle
   Typography: Unbounded 900 (wordmark) · Space Grotesk (UI) · Inter (body)
   Palette: Void black + metallic gold system
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Unbounded:wght@400;700;900&family=Space+Grotesk:wght@300;400;500;600&family=Inter:wght@400;500&display=swap');

/* ── Design tokens ── */
:root {
  /* Surfaces */
  --c-void:    #0B0D12;
  --c-surface: #111520;
  --c-raised:  #181D2B;
  --c-border:  #222840;
  --c-border-hi: #2E3650;

  /* Gold system */
  --c-gold-deep:   #C8962E;
  --c-gold-mid:    #E8B84B;
  --c-gold-bright: #F7D774;
  --c-gold-glow-sm: rgba(232, 184, 75, 0.12);
  --c-gold-glow-md: rgba(232, 184, 75, 0.22);
  --c-gold-glow-lg: rgba(232, 184, 75, 0.40);

  /* Text */
  --c-text-primary:   #F2F0EC;
  --c-text-secondary: #8891A4;
  --c-text-muted:     #4A5168;

  /* Feedback colors */
  --c-fc-correct-bg:     #192F19;
  --c-fc-correct-border: #3A7A3A;
  --c-fc-correct-text:   #7DC97D;
  --c-fc-partial-bg:     #2A1C08;
  --c-fc-partial-border: #C8962E;
  --c-fc-partial-text:   #E8B84B;
  --c-fc-wrong-bg:       #2A0E0E;
  --c-fc-wrong-border:   #7A2E2E;
  --c-fc-wrong-text:     #C97B7B;
  --c-fc-unknown-bg:     #1A1F30;
  --c-fc-unknown-border: #363D58;
  --c-fc-unknown-text:   #7A84A0;

  /* Geometry */
  --r-sm:  4px;
  --r-md:  8px;
  --r-lg:  14px;
  --r-xl:  20px;

  /* Motion */
  --dur-fast: 140ms;
  --dur-mid:  240ms;
  --dur-slow: 380ms;
  --ease:     cubic-bezier(0.22, 1, 0.36, 1);
}

/* ── Reset ── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Inter', system-ui, sans-serif;
  background-color: var(--c-void);
  color: var(--c-text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  line-height: 1.5;
}

img { max-width: 100%; display: block; }
a { color: inherit; }
button { font: inherit; }

/* ── Atmospheric layers (CSS only, no images) ── */

/* Light-column atmosphere behind content */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 65% 45% at -5% -5%,  rgba(232,184,75,0.055) 0%, transparent 65%),
    radial-gradient(ellipse 55% 45% at 108% 105%, rgba(200,150,46,0.040) 0%, transparent 65%),
    radial-gradient(ellipse 35% 28% at 50%   0%,  rgba(232,184,75,0.028) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}

/* Film-grain texture via SVG feTurbulence */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.80' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23g)'/%3E%3C/svg%3E");
  opacity: 0.032;
  pointer-events: none;
  z-index: 1;
}

/* ── Page shell ── */
.page-wrapper {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ── Navigation ── */
.nav {
  position: sticky;
  top: 0;
  z-index: 200;
  padding: 0.85rem 0;
  backdrop-filter: blur(14px) saturate(150%);
  -webkit-backdrop-filter: blur(14px) saturate(150%);
  background: rgba(11, 13, 18, 0.82);
  border-bottom: 1px solid rgba(255, 255, 255, 0.045);
}

.nav__inner {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav__logo {
  font-family: 'Unbounded', sans-serif;
  font-weight: 900;
  font-size: 1.1rem;
  letter-spacing: -0.025em;
  color: var(--c-gold-mid);
  text-decoration: none;
  flex-shrink: 0;
  transition: color var(--dur-fast);
}
.nav__logo:hover { color: var(--c-gold-bright); }
.nav__logo:focus-visible {
  outline: 2px solid var(--c-gold-mid);
  outline-offset: 4px;
  border-radius: var(--r-sm);
}

.nav__spacer { flex: 1; }

.nav__links {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  list-style: none;
}

.nav__links a {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.76rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--c-text-secondary);
  text-decoration: none;
  padding: 0.42rem 0.7rem;
  border-radius: var(--r-sm);
  transition: color var(--dur-fast), background var(--dur-fast);
  white-space: nowrap;
}
.nav__links a:hover {
  color: var(--c-text-primary);
  background: rgba(255, 255, 255, 0.05);
}
.nav__links a.is-active { color: var(--c-gold-mid); }
.nav__links a:focus-visible {
  outline: 2px solid var(--c-gold-mid);
  outline-offset: 2px;
}

.nav__stats-btn {
  background: none;
  border: 1px solid var(--c-border);
  color: var(--c-text-muted);
  border-radius: var(--r-sm);
  padding: 0.38rem 0.55rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: 0.5rem;
  transition: color var(--dur-fast), border-color var(--dur-fast), background var(--dur-fast);
  line-height: 1;
  font-size: 0.9rem;
}
.nav__stats-btn:hover {
  color: var(--c-gold-mid);
  border-color: var(--c-gold-deep);
  background: rgba(200, 150, 46, 0.07);
}
.nav__stats-btn:focus-visible {
  outline: 2px solid var(--c-gold-mid);
  outline-offset: 2px;
}

/* ── Brand lockup ── */
.brand-section {
  padding: clamp(3.5rem, 9vw, 6.5rem) 0 clamp(1.5rem, 4vw, 2.5rem);
}

.brand-section__inner {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.2rem;
}

/* ── Eyebrow ── */
.brand-eyebrow {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(0.62rem, 1.4vw, 0.76rem);
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--c-text-muted);
}
.brand-eyebrow::before {
  content: '';
  display: block;
  width: 1.8rem;
  height: 1px;
  background: var(--c-gold-deep);
  opacity: 0.55;
  flex-shrink: 0;
}

/* ── GCCDLE Wordmark — the signature stacked offset ── */
.wordmark { display: block; margin: 0; }

.wordmark__line1,
.wordmark__line2 {
  display: block;
  font-family: 'Unbounded', sans-serif;
  font-weight: 900;
  font-size: clamp(3.8rem, 13vw, 8rem);
  line-height: 0.9;
  letter-spacing: -0.035em;
}
.wordmark__line1 { color: var(--c-gold-mid); }

/* The offset is the design risk: line 2 shifts right */
.wordmark__line2 {
  color: var(--c-gold-bright);
  margin-left: clamp(1rem, 4vw, 2.8rem);
  text-shadow:
    0 0 60px rgba(247, 215, 116, 0.28),
    0 0 120px rgba(247, 215, 116, 0.10);
}

/* ── Subtitle ── */
.brand-subtitle {
  max-width: 32ch;
  font-family: 'Inter', sans-serif;
  font-size: clamp(0.95rem, 2.2vw, 1.12rem);
  line-height: 1.55;
  color: var(--c-text-secondary);
}

/* ── Signature: a guess row in the game's own feedback colors ── */
.guess-strip {
  display: flex;
  gap: clamp(0.4rem, 1.2vw, 0.6rem);
  margin-top: 0.4rem;
  perspective: 600px;
}
.guess-strip .gcell {
  width: clamp(34px, 8vw, 46px);
  height: clamp(34px, 8vw, 46px);
  border-radius: 9px;
  border: 1px solid transparent;
  transform-origin: center;
  animation: gflip 0.5s ease both;
}
.gcell--green  { background: var(--c-fc-correct-bg);  border-color: var(--c-fc-correct-border); }
.gcell--yellow { background: var(--c-fc-partial-bg);  border-color: var(--c-fc-partial-border); }
.gcell--red    { background: var(--c-fc-wrong-bg);    border-color: var(--c-fc-wrong-border); }
.gcell--gray   { background: var(--c-fc-unknown-bg);  border-color: var(--c-fc-unknown-border); }
.guess-strip .gcell:nth-child(1) { animation-delay: .05s; }
.guess-strip .gcell:nth-child(2) { animation-delay: .12s; }
.guess-strip .gcell:nth-child(3) { animation-delay: .19s; }
.guess-strip .gcell:nth-child(4) { animation-delay: .26s; }
.guess-strip .gcell:nth-child(5) { animation-delay: .33s; }
.guess-strip .gcell:nth-child(6) { animation-delay: .40s; }

@keyframes gflip {
  0%   { transform: rotateX(-90deg); opacity: 0; }
  100% { transform: rotateX(0);      opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .guess-strip .gcell { animation: none; }
}

/* ── Global hero card ── */
.global-hero {
  padding: 0 0 clamp(2rem, 5vw, 3.5rem);
}

.global-hero__card {
  position: relative;
  display: block;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-xl);
  padding: clamp(2rem, 5vw, 3.5rem) clamp(1.5rem, 4vw, 3rem);
  text-align: center;
  text-decoration: none;
  overflow: hidden;
  cursor: pointer;
  transition:
    border-color var(--dur-mid) var(--ease),
    box-shadow var(--dur-mid) var(--ease),
    transform var(--dur-mid) var(--ease);
}

/* Top gold accent line */
.global-hero__card::before {
  content: '';
  position: absolute;
  top: 0; left: 10%; right: 10%;
  height: 1.5px;
  background: linear-gradient(90deg, transparent, var(--c-gold-mid), transparent);
  opacity: 0.55;
  transition: opacity var(--dur-mid), left var(--dur-slow), right var(--dur-slow);
}

/* Radial glow behind content */
.global-hero__card::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 55% at 50% 0%,   rgba(232,184,75,0.07) 0%, transparent 70%),
    radial-gradient(ellipse 50% 40% at 50% 100%,  rgba(200,150,46,0.04) 0%, transparent 70%);
  pointer-events: none;
  transition: opacity var(--dur-mid);
}

.global-hero__card:hover {
  border-color: rgba(200, 150, 46, 0.6);
  box-shadow:
    0 0 0 1px rgba(232,184,75,0.1),
    0 0 50px rgba(232,184,75,0.10),
    0 0 100px rgba(200,150,46,0.05);
  transform: translateY(-3px);
}

.global-hero__card:hover::before {
  opacity: 1;
  left: 0;
  right: 0;
}

.global-hero__card:focus-visible {
  outline: 2px solid var(--c-gold-mid);
  outline-offset: 3px;
}

.global-hero__content {
  position: relative;
  z-index: 1;
}

.global-hero__eyebrow {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--c-gold-deep);
  margin-bottom: 0.85rem;
}

.global-hero__title {
  font-family: 'Unbounded', sans-serif;
  font-weight: 900;
  font-size: clamp(2rem, 5.5vw, 3.8rem);
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--c-gold-bright);
  text-shadow:
    0 0 50px rgba(247, 215, 116, 0.30),
    0 0 100px rgba(247, 215, 116, 0.12);
  margin-bottom: 0.55rem;
}

.global-hero__sub {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(0.85rem, 1.6vw, 0.95rem);
  color: var(--c-text-secondary);
  margin-bottom: 2rem;
}

.global-hero__meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.75rem;
  flex-wrap: wrap;
  margin-bottom: 2.25rem;
}

.global-hero__stat-num {
  display: block;
  font-family: 'Unbounded', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--c-gold-mid);
  letter-spacing: -0.02em;
  line-height: 1;
}

.global-hero__stat-label {
  display: block;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.66rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--c-text-muted);
  margin-top: 0.3rem;
}

.global-hero__meta-divider {
  width: 1px;
  height: 2.2rem;
  background: var(--c-border-hi);
  flex-shrink: 0;
}

/* ── Primary CTA button ── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--c-void);
  background: linear-gradient(135deg, var(--c-gold-mid) 0%, var(--c-gold-bright) 100%);
  border: none;
  border-radius: var(--r-md);
  padding: 0.88rem 2.1rem;
  cursor: pointer;
  text-decoration: none;
  transition:
    box-shadow var(--dur-fast),
    transform var(--dur-fast),
    filter var(--dur-fast);
  position: relative;
  z-index: 1;
}
.btn-primary:hover {
  box-shadow: 0 0 28px rgba(232,184,75,0.50), 0 4px 16px rgba(0,0,0,0.4);
  filter: brightness(1.06);
  transform: translateY(-1px);
}
.btn-primary:focus-visible {
  outline: 2px solid var(--c-gold-bright);
  outline-offset: 3px;
}

.btn-primary__arrow {
  font-style: normal;
  transition: transform var(--dur-fast);
}
.btn-primary:hover .btn-primary__arrow { transform: translateX(3px); }

/* ── Region grid ── */
.regions {
  padding-bottom: clamp(2.5rem, 6vw, 5rem);
}

.regions__heading {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--c-text-muted);
  margin-bottom: 1.1rem;
}

/* Flex (not grid) so the last row centers — 3 on top, 2 centered below
   form an upside-down trapezoid on desktop. */
.regions__grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
}
.regions__grid .region-tile { flex: 1 1 100%; }

@media (min-width: 480px) {
  .regions__grid .region-tile { flex: 0 1 calc((100% - 0.6rem) / 2); }
}

@media (min-width: 860px) {
  .regions__grid .region-tile { flex: 0 1 calc((100% - 1.2rem) / 3); }
}

/* ── Region tile ── */
.region-tile {
  position: relative;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  padding: 1.35rem 1.4rem;
  display: flex;
  align-items: center;
  gap: 1.15rem;
  text-decoration: none;
  color: inherit;
  overflow: hidden;
  transition:
    border-color var(--dur-mid) var(--ease),
    box-shadow var(--dur-mid) var(--ease),
    transform var(--dur-mid) var(--ease);
}

.region-tile::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 90% 80% at 15% 50%, rgba(232,184,75,0.05) 0%, transparent 70%);
  opacity: 0;
  transition: opacity var(--dur-mid);
  pointer-events: none;
}

.region-tile:hover {
  border-color: rgba(200,150,46,0.45);
  box-shadow: 0 0 24px rgba(200,150,46,0.08);
  transform: translateY(-2px);
}
.region-tile:hover::before { opacity: 1; }
.region-tile:focus-visible {
  outline: 2px solid var(--c-gold-mid);
  outline-offset: 2px;
}

.region-tile__emblem {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--c-gold-mid);
  transition: color .2s ease, transform .2s ease;
}
.region-tile:hover .region-tile__emblem {
  color: var(--c-gold-bright);
  transform: scale(1.06);
}

/* ── Bottom info buttons (How to Play / Data) ── */
.info-foot {
  padding: clamp(1rem, 3vw, 2rem) 0 clamp(2.5rem, 6vw, 4rem);
}
.info-foot__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  justify-content: center;
}
.info-foot__btn {
  flex: 1 1 240px;
  max-width: 360px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.2rem;
  text-align: left;
  background: var(--c-surface);
  border: 1px solid var(--c-border-hi, #2E3650);
  border-radius: var(--r-md, 12px);
  padding: 1.05rem 1.3rem;
  cursor: pointer;
  font-family: 'Space Grotesk', sans-serif;
  transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}
.info-foot__btn:hover {
  border-color: rgba(200, 150, 46, 0.5);
  transform: translateY(-2px);
  box-shadow: 0 0 24px rgba(200, 150, 46, 0.08);
}
.info-foot__btn:focus-visible {
  outline: 2px solid var(--c-gold-mid);
  outline-offset: 2px;
}
.info-foot__btn-label {
  font-weight: 600;
  font-size: 1rem;
  color: var(--c-gold-mid);
}
.info-foot__btn-sub {
  font-size: 0.78rem;
  color: var(--c-text-secondary);
}

.region-tile__body { flex: 1; min-width: 0; }

.region-tile__name {
  font-family: 'Unbounded', sans-serif;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.015em;
  color: var(--c-text-primary);
  line-height: 1.1;
  margin-bottom: 0.22rem;
}

.region-tile__cta {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.07em;
  color: var(--c-gold-deep);
  font-weight: 500;
}

.region-tile__arrow {
  color: var(--c-text-muted);
  font-size: 0.95rem;
  flex-shrink: 0;
  transition: color var(--dur-fast), transform var(--dur-fast);
}
.region-tile:hover .region-tile__arrow {
  color: var(--c-gold-mid);
  transform: translateX(4px);
}

/* ── Inner page hero ── */
.page-hero {
  padding: clamp(3rem, 8vw, 5rem) 0 clamp(1.5rem, 4vw, 2.5rem);
}

.page-hero__eyebrow {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--c-gold-deep);
  margin-bottom: 0.6rem;
}

.page-hero__title {
  font-family: 'Unbounded', sans-serif;
  font-weight: 900;
  font-size: clamp(2.4rem, 7vw, 5.2rem);
  letter-spacing: -0.04em;
  line-height: 0.95;
  color: var(--c-text-primary);
  margin-bottom: 1.25rem;
}

.page-hero__title em {
  font-style: normal;
  color: var(--c-gold-mid);
}

.page-hero__lead {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(1rem, 2vw, 1.1rem);
  color: var(--c-text-secondary);
  max-width: 54ch;
  line-height: 1.7;
}

/* ── Content sections ── */
.content-section {
  padding: clamp(2rem, 5vw, 3rem) 0;
  border-top: 1px solid var(--c-border);
}

.section-label {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.20em;
  text-transform: uppercase;
  color: var(--c-gold-deep);
  margin-bottom: 1rem;
}

.section-title {
  font-family: 'Unbounded', sans-serif;
  font-weight: 700;
  font-size: clamp(1.25rem, 3vw, 1.8rem);
  letter-spacing: -0.025em;
  color: var(--c-text-primary);
  margin-bottom: 0.9rem;
}

.section-body {
  font-family: 'Inter', sans-serif;
  font-size: 0.93rem;
  color: var(--c-text-secondary);
  line-height: 1.78;
  max-width: 66ch;
}

.section-body + .section-body { margin-top: 0.9rem; }

/* ── Categories (How to Play) ── */
.category-chips {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.6rem;
  margin-top: 1.5rem;
}

@media (min-width: 520px) {
  .category-chips { grid-template-columns: repeat(3, 1fr); }
}

.category-chip {
  background: var(--c-raised);
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  padding: 1rem 1.1rem 0.9rem;
}

.category-chip__glyph {
  font-size: 1.1rem;
  line-height: 1;
  margin-bottom: 0.45rem;
  display: block;
  /* Using text-based glyphs, no emoji */
  font-family: 'Space Grotesk', sans-serif;
  color: var(--c-gold-mid);
}

.category-chip__name {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: 0.82rem;
  color: var(--c-text-primary);
  display: block;
}

.category-chip__desc {
  font-family: 'Inter', sans-serif;
  font-size: 0.75rem;
  color: var(--c-text-muted);
  display: block;
  margin-top: 0.2rem;
}

/* ── Category rules breakdown ── */
.category-rules {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  margin-top: 1.5rem;
}

.category-rule {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  padding: 1.15rem 1.35rem;
}

.category-rule__name {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--c-gold-mid);
  margin-bottom: 0.8rem;
}

.category-rule__rows {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.category-rule__row {
  display: flex;
  align-items: baseline;
  gap: 0.85rem;
}

.feedback-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 74px;
  padding: 0.3rem 0.7rem;
  border-radius: var(--r-sm);
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: 0.7rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  flex-shrink: 0;
}

.feedback-badge--correct {
  background: var(--c-fc-correct-bg);
  border: 1px solid var(--c-fc-correct-border);
  color: var(--c-fc-correct-text);
}
.feedback-badge--partial {
  background: var(--c-fc-partial-bg);
  border: 1px solid var(--c-fc-partial-border);
  color: var(--c-fc-partial-text);
}
.feedback-badge--wrong {
  background: var(--c-fc-wrong-bg);
  border: 1px solid var(--c-fc-wrong-border);
  color: var(--c-fc-wrong-text);
}
.feedback-badge--unknown {
  background: var(--c-fc-unknown-bg);
  border: 1px solid var(--c-fc-unknown-border);
  color: var(--c-fc-unknown-text);
}

.feedback-badge-desc {
  font-family: 'Inter', sans-serif;
  font-size: 0.86rem;
  color: var(--c-text-secondary);
  line-height: 1.5;
}

/* Debut arrow badges */
.debut-arrows {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  margin-top: 0.45rem;
  flex-wrap: wrap;
}

.arrow-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: var(--c-raised);
  border: 1px solid var(--c-border-hi);
  border-radius: var(--r-sm);
  padding: 0.28rem 0.65rem;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.75rem;
  color: var(--c-text-secondary);
}

.arrow-badge .arrow { color: var(--c-gold-mid); font-weight: 700; }

/* ── Puzzle example (row preview) ── */
.example-guess {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.4rem;
  margin-top: 1.5rem;
}

@media (min-width: 600px) {
  .example-guess { grid-template-columns: repeat(6, 1fr); }
}

.example-cell {
  border-radius: var(--r-sm);
  padding: 0.65rem 0.5rem;
  text-align: center;
}

.example-cell--correct  { background: var(--c-fc-correct-bg);  border: 1px solid var(--c-fc-correct-border); }
.example-cell--partial  { background: var(--c-fc-partial-bg);  border: 1px solid var(--c-fc-partial-border); }
.example-cell--wrong    { background: var(--c-fc-wrong-bg);    border: 1px solid var(--c-fc-wrong-border); }
.example-cell--unknown  { background: var(--c-fc-unknown-bg);  border: 1px solid var(--c-fc-unknown-border); }

.example-cell__cat {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--c-text-muted);
  margin-bottom: 0.25rem;
}

.example-cell__val {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--c-text-primary);
}

/* ── Data page ── */
.stats-strip {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.7rem;
  margin-top: 1.5rem;
}

@media (min-width: 520px) {
  .stats-strip { grid-template-columns: repeat(4, 1fr); }
}

.stat-block {
  background: var(--c-raised);
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  padding: 1.2rem 1rem;
  text-align: center;
}

.stat-block__num {
  font-family: 'Unbounded', sans-serif;
  font-size: clamp(1.45rem, 3.5vw, 2.2rem);
  font-weight: 700;
  color: var(--c-gold-mid);
  letter-spacing: -0.025em;
  display: block;
  line-height: 1;
}

.stat-block__label {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--c-text-muted);
  display: block;
  margin-top: 0.4rem;
  line-height: 1.4;
}

.source-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.7rem;
  margin-top: 1.5rem;
}

@media (min-width: 560px) {
  .source-cards { grid-template-columns: repeat(2, 1fr); }
}

.source-card {
  background: var(--c-raised);
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  padding: 1.4rem 1.5rem;
}

.source-card__badge {
  display: inline-block;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 0.22rem 0.6rem;
  border-radius: var(--r-sm);
  margin-bottom: 0.75rem;
}

.source-card__badge--primary {
  background: rgba(232,184,75,0.12);
  color: var(--c-gold-mid);
  border: 1px solid rgba(232,184,75,0.25);
}

.source-card__badge--secondary {
  background: var(--c-border);
  color: var(--c-text-muted);
  border: 1px solid var(--c-border-hi);
}

.source-card__name {
  font-family: 'Unbounded', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  color: var(--c-text-primary);
  letter-spacing: -0.01em;
  margin-bottom: 0.7rem;
}

.source-card__desc {
  font-family: 'Inter', sans-serif;
  font-size: 0.84rem;
  color: var(--c-text-secondary);
  line-height: 1.7;
}

.exclude-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin-top: 1.25rem;
}

.exclude-list li {
  display: flex;
  align-items: baseline;
  gap: 0.8rem;
  font-family: 'Inter', sans-serif;
  font-size: 0.88rem;
  color: var(--c-text-secondary);
  line-height: 1.55;
  padding: 0.65rem 1rem;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-sm);
}

.exclude-list li::before {
  content: '×';
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--c-fc-wrong-border);
  flex-shrink: 0;
  line-height: 1;
}

.conflict-callout {
  background: rgba(200,150,46,0.06);
  border: 1px solid rgba(200,150,46,0.20);
  border-radius: var(--r-md);
  padding: 1.15rem 1.4rem;
  margin-top: 1.25rem;
  display: flex;
  align-items: baseline;
  gap: 0.9rem;
}

.conflict-callout__icon {
  color: var(--c-gold-mid);
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  flex-shrink: 0;
  line-height: 1;
}

.conflict-callout__text {
  font-family: 'Inter', sans-serif;
  font-size: 0.87rem;
  color: var(--c-text-secondary);
  line-height: 1.65;
}

/* ── Footer ── */
.footer {
  margin-top: auto;
  padding: clamp(1.5rem, 4vw, 2.5rem) 0;
  border-top: 1px solid var(--c-border);
}

.footer__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  text-align: center;
}

.footer__wordmark {
  font-family: 'Unbounded', sans-serif;
  font-weight: 900;
  font-size: 0.78rem;
  color: var(--c-gold-deep);
  letter-spacing: -0.01em;
}

.footer__rule {
  width: 2rem;
  height: 1px;
  background: var(--c-border-hi);
}

.footer__legal {
  font-family: 'Inter', sans-serif;
  font-size: 0.75rem;
  color: var(--c-text-muted);
  line-height: 1.7;
  max-width: 54ch;
}

/* ── Entry animations ── */
@keyframes fade-up {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

.anim-enter        { animation: fade-up 0.48s var(--ease) both; }
.anim-enter-d1     { animation: fade-up 0.48s var(--ease) 0.12s both; }
.anim-enter-d2     { animation: fade-up 0.48s var(--ease) 0.22s both; }
.anim-enter-d3     { animation: fade-up 0.48s var(--ease) 0.32s both; }

@media (prefers-reduced-motion: reduce) {
  .anim-enter,
  .anim-enter-d1,
  .anim-enter-d2,
  .anim-enter-d3 { animation: none; }
}

/* ── Utility ── */
.u-sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}


/* ============================================================
   MODAL STYLES — added for version-b-popup
   Uses native <dialog> element with showModal() API.
   Keyboard: Esc closes natively (browser handles focus trap).
   Backdrop click: detected in JS (e.target === dialog).
   Scroll lock: body overflow toggled on open/close.
   Reduced-motion: entry animation suppressed.
   ============================================================ */

/* ── Nav modal-trigger buttons (replace the nav <a> links) ── */
.nav__modal-btn {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.76rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--c-text-secondary);
  background: none;
  border: none;
  padding: 0.42rem 0.7rem;
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: color var(--dur-fast), background var(--dur-fast);
  white-space: nowrap;
  line-height: 1;
}
.nav__modal-btn:hover {
  color: var(--c-text-primary);
  background: rgba(255, 255, 255, 0.05);
}
.nav__modal-btn.is-active {
  color: var(--c-gold-mid);
}
.nav__modal-btn:focus-visible {
  outline: 2px solid var(--c-gold-mid);
  outline-offset: 2px;
}

/* ── Modal overlay (<dialog>) ── */
.modal {
  /* Reset browser dialog defaults */
  border: none;
  background: transparent;
  padding: 1.75rem 1rem 2.5rem;
  margin: 0;

  /* Full-viewport fixed overlay */
  position: fixed;
  inset: 0;
  width: 100%;
  max-width: 100%;
  height: 100%;
  max-height: 100%;

  /* Scroll long modal content within the overlay */
  overflow-y: auto;
  overflow-x: hidden;
}

/* Backdrop — dims and blurs the page behind the modal */
.modal::backdrop {
  background: rgba(11, 13, 18, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* ── Modal content container ── */
.modal__container {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-xl);
  max-width: 720px;
  width: 100%;
  margin: 0 auto;
  overflow: hidden;
  /* Subtle top accent line mirroring the global-hero card */
  position: relative;
}

.modal__container::before {
  content: '';
  position: absolute;
  top: 0; left: 10%; right: 10%;
  height: 1.5px;
  background: linear-gradient(90deg, transparent, var(--c-gold-mid), transparent);
  opacity: 0.40;
  pointer-events: none;
}

/* Entry animation for the container box */
@keyframes modal-slide-in {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal[open] .modal__container {
  animation: modal-slide-in var(--dur-mid) var(--ease) both;
}

@media (prefers-reduced-motion: reduce) {
  .modal[open] .modal__container {
    animation: none;
  }
}

/* ── Modal header (eyebrow + title + × close button) ── */
.modal__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.75rem 1.75rem 1.4rem;
  border-bottom: 1px solid var(--c-border);
}

.modal__title-area {
  flex: 1;
  min-width: 0;
}

.modal__eyebrow {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--c-gold-deep);
  margin-bottom: 0.4rem;
}

.modal__title {
  font-family: 'Unbounded', sans-serif;
  font-weight: 900;
  font-size: clamp(1.55rem, 4vw, 2.2rem);
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--c-text-primary);
}

.modal__title em {
  font-style: normal;
  color: var(--c-gold-mid);
}

/* × close button */
.modal__close {
  flex-shrink: 0;
  background: none;
  border: 1px solid var(--c-border);
  color: var(--c-text-muted);
  border-radius: var(--r-sm);
  width: 2.1rem;
  height: 2.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.25rem;
  line-height: 1;
  margin-top: 0.15rem;
  transition:
    color var(--dur-fast),
    border-color var(--dur-fast),
    background var(--dur-fast);
}
.modal__close:hover {
  color: var(--c-text-primary);
  border-color: var(--c-border-hi);
  background: rgba(255, 255, 255, 0.05);
}
.modal__close:focus-visible {
  outline: 2px solid var(--c-gold-mid);
  outline-offset: 2px;
}

/* ── Lead paragraph (hero blurb inside modal) ── */
.modal__lead {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(0.9rem, 1.8vw, 1rem);
  color: var(--c-text-secondary);
  line-height: 1.7;
  padding: 1.4rem 1.75rem 0;
}

/* ── Section padding & container adjustments inside modals ── */
/* The .content-section top border creates natural dividers.
   Tighten the clamp range slightly for the narrower modal context. */
.modal .content-section {
  padding: clamp(1.5rem, 4vw, 2.25rem) 0;
}

/* Override .container so it uses modal-appropriate side padding
   (max-width is irrelevant at 720px modal width, so reset it). */
.modal .container {
  padding-left: 1.75rem;
  padding-right: 1.75rem;
  max-width: none;
}

/* ── Modal footer (attribution line at bottom of Data modal) ── */
.modal__footer {
  padding: 1.1rem 1.75rem;
  border-top: 1px solid var(--c-border);
  font-family: 'Inter', sans-serif;
  font-size: 0.74rem;
  color: var(--c-text-muted);
  line-height: 1.6;
}
.modal__footer a {
  color: var(--c-gold-deep);
  text-decoration: none;
}
.modal__footer a:hover {
  color: var(--c-gold-mid);
}
