/* ============================================================
   CDL WORDLE ARENA — design system
   Dark broadcast-HUD aesthetic: ink field, volt green primary,
   signal cyan / amber / red accents, team-color chips.
   ============================================================ */

:root {
  --ink: #05080f;
  --field: #0a101d;
  --panel: #0e1626;
  --panel-2: #131e33;
  --overlay: rgba(5, 8, 15, .82);
  --line: rgba(122, 162, 224, .16);
  --line-strong: rgba(122, 162, 224, .32);

  --volt: #00e68c;
  --volt-dim: #00b76f;
  --cyan: #22d3ee;
  --amber: #ffb020;
  --red: #ff4d5e;
  --violet: #a78bfa;

  --text: #e9effa;
  --muted: #93a4c0;
  --faint: #5d6f8f;

  --ok: #00e68c;
  --warn: #ffb020;
  --danger: #ff4d5e;
  --info: #22d3ee;

  --font-display: "Space Grotesk", "Segoe UI", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;

  --nav-h: 64px;
  --radius: 14px;
  --clip: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 14px 100%, 0 calc(100% - 14px));
  --clip-sm: polygon(0 0, calc(100% - 9px) 0, 100% 9px, 100% 100%, 9px 100%, 0 calc(100% - 9px));

  --shadow-glow: 0 0 24px rgba(0, 230, 140, .22);
  --shadow-panel: 0 18px 50px rgba(0, 0, 0, .45);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 16px); }

body {
  background: var(--ink);
  color: var(--text);
  font-family: var(--font-display);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  min-height: 100vh;
}

/* layered arena backdrop: grid + aurora glows + vignette */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(900px 520px at 12% -6%, rgba(0, 230, 140, .10), transparent 60%),
    radial-gradient(820px 540px at 88% 4%, rgba(34, 211, 238, .09), transparent 62%),
    radial-gradient(1000px 700px at 50% 112%, rgba(167, 139, 250, .07), transparent 60%),
    var(--ink);
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(122, 162, 224, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(122, 162, 224, .045) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse 90% 70% at 50% 30%, #000 30%, transparent 78%);
}

::selection { background: rgba(0, 230, 140, .32); color: #fff; }

/* scrollbar in the arena's own language */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--field); }
::-webkit-scrollbar-thumb { background: #1d2c47; border-radius: 6px; border: 2px solid var(--field); }
::-webkit-scrollbar-thumb:hover { background: var(--volt-dim); }
html { scrollbar-color: #1d2c47 var(--field); scrollbar-width: thin; }

img { max-width: 100%; display: block; }
a { color: var(--cyan); text-decoration: none; }
a:hover { color: var(--volt); }

h1, h2, h3, h4 { font-weight: 700; line-height: 1.15; letter-spacing: -.015em; }

.container { width: min(1180px, 92vw); margin-inline: auto; }
.mono { font-family: var(--font-mono); }
.kicker {
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--cyan);
  display: inline-flex;
  align-items: center;
  gap: .6em;
}
.kicker::before { content: ""; width: 22px; height: 2px; background: var(--cyan); box-shadow: 0 0 8px var(--cyan); }

/* ---------------- navigation ---------------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  z-index: 100;
  background: rgba(5, 8, 15, .78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav-inner { height: 100%; display: flex; align-items: center; gap: 22px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 700; letter-spacing: .02em; }
.brand:hover { color: var(--text); }
.brand-mark { width: 30px; height: 30px; flex: none; filter: drop-shadow(0 0 6px rgba(0, 230, 140, .55)); }
.brand-name { font-size: 1.02rem; }
.brand-name em { font-style: normal; color: var(--volt); }
.nav-links { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nav-links a {
  color: var(--muted);
  font-size: .86rem;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: 8px;
  position: relative;
  transition: color .18s, background .18s;
}
.nav-links a:hover { color: var(--text); background: rgba(122, 162, 224, .08); }
.nav-links a.active { color: var(--volt); }
.nav-links a.active::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: 2px; height: 2px;
  background: var(--volt); box-shadow: 0 0 8px var(--volt); border-radius: 2px;
}
/* the nav CTA is a button — its own colors must beat the plain-link gray above */
.nav-links a.btn { color: #04140c; }
.nav-links a.btn:hover { color: #04140c; background: var(--volt); }
.nav-links a.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-glow); }
.nav-links a.btn-primary:hover { color: #04140c; }
.nav-cta { margin-left: 6px; }
.sound-toggle {
  width: 38px; height: 38px; flex: none;
  display: grid; place-items: center;
  background: var(--panel); border: 1px solid var(--line); border-radius: 10px;
  color: var(--volt); cursor: pointer; transition: border-color .18s, transform .12s;
}
.sound-toggle:hover { border-color: var(--volt); transform: translateY(-1px); }
.sound-toggle.muted { color: var(--faint); }
.sound-toggle svg { width: 18px; height: 18px; }
.burger {
  display: none; width: 40px; height: 40px; margin-left: auto;
  background: var(--panel); border: 1px solid var(--line); border-radius: 10px;
  cursor: pointer; color: var(--text); font-size: 1.1rem; line-height: 1;
}
.mobile-menu {
  position: fixed; top: var(--nav-h); left: 0; right: 0; z-index: 99;
  background: rgba(8, 12, 22, .97); backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
  padding: 14px 4vw 20px;
  display: none; flex-direction: column; gap: 2px;
}
.mobile-menu.open { display: flex; }
.mobile-menu a {
  color: var(--text); font-weight: 600; padding: 12px 10px; border-radius: 10px;
  border-bottom: 1px solid rgba(122, 162, 224, .07);
}
.mobile-menu a:hover, .mobile-menu a.active { background: rgba(0, 230, 140, .08); color: var(--volt); }

/* ---------------- buttons ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-display); font-weight: 700; font-size: .92rem;
  letter-spacing: .03em;
  padding: 13px 24px;
  border: 1px solid transparent;
  cursor: pointer;
  clip-path: var(--clip-sm);
  transition: transform .14s, box-shadow .2s, background .2s, color .2s, border-color .2s;
  user-select: none;
  text-transform: uppercase;
}
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--volt); color: #04140c; box-shadow: 0 0 0 rgba(0, 230, 140, 0); }
.btn-primary:hover { background: #2bffa9; color: #04140c; box-shadow: var(--shadow-glow); transform: translateY(-2px); }
.btn-ghost { background: rgba(122, 162, 224, .06); border-color: var(--line-strong); color: var(--text); }
.btn-ghost:hover { border-color: var(--cyan); color: var(--cyan); box-shadow: 0 0 18px rgba(34, 211, 238, .18); transform: translateY(-2px); }
.btn-danger { background: rgba(255, 77, 94, .12); border-color: rgba(255, 77, 94, .5); color: var(--red); }
.btn-danger:hover { background: rgba(255, 77, 94, .22); box-shadow: 0 0 18px rgba(255, 77, 94, .25); }
.btn-sm { padding: 9px 16px; font-size: .78rem; }
.btn[disabled] { opacity: .45; cursor: not-allowed; transform: none !important; box-shadow: none !important; }

/* ---------------- panels & sections ---------------- */
.panel {
  background: linear-gradient(160deg, var(--panel-2), var(--panel) 55%);
  border: 1px solid var(--line);
  clip-path: var(--clip);
  padding: 26px;
  position: relative;
}
.panel-glow { box-shadow: var(--shadow-panel); }
.panel::before {
  content: ""; position: absolute; top: 0; left: 0; width: 56px; height: 3px;
  background: var(--volt); box-shadow: 0 0 10px var(--volt);
}
section { padding: 64px 0; position: relative; }
.sec-head { margin-bottom: 34px; }
.sec-head h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); margin-top: 10px; }
.sec-head p { color: var(--muted); max-width: 640px; margin-top: 10px; }
.section-alt { background: linear-gradient(180deg, transparent, rgba(10, 16, 29, .85) 18%, rgba(10, 16, 29, .85) 82%, transparent); }

/* ---------------- hero ---------------- */
.hero { padding: calc(var(--nav-h) + 54px) 0 40px; text-align: center; position: relative; }
.hero h1 {
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  text-transform: uppercase;
  letter-spacing: .01em;
  line-height: 1.04;
}
.hero h1 .volt { color: var(--volt); text-shadow: 0 0 34px rgba(0, 230, 140, .45); }
.hero h1 .cyan { color: var(--cyan); text-shadow: 0 0 30px rgba(34, 211, 238, .4); }
.hero-sub { color: var(--muted); font-size: clamp(1rem, 1.6vw, 1.18rem); max-width: 680px; margin: 18px auto 0; }
.hero-badges { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 22px; }

.badge {
  font-family: var(--font-mono); font-size: .7rem; letter-spacing: .14em; text-transform: uppercase;
  padding: 6px 12px; border: 1px solid var(--line-strong); border-radius: 999px;
  color: var(--muted); background: rgba(14, 22, 38, .7);
  display: inline-flex; align-items: center; gap: 7px;
}
.badge .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--volt); box-shadow: 0 0 8px var(--volt); animation: pulse 2.2s infinite; }
.badge-volt { color: var(--volt); border-color: rgba(0, 230, 140, .4); }
.badge-cyan { color: var(--cyan); border-color: rgba(34, 211, 238, .4); }
.badge-amber { color: var(--amber); border-color: rgba(255, 176, 32, .4); }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }

/* ---------------- stat tiles ---------------- */
.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.stat {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 18px; text-align: center; position: relative; overflow: hidden;
}
.stat::after { content: ""; position: absolute; inset: auto 0 0 0; height: 2px; background: linear-gradient(90deg, var(--volt), var(--cyan)); opacity: .6; }
.stat-num { font-family: var(--font-mono); font-size: 1.7rem; font-weight: 700; color: var(--volt); line-height: 1.2; }
.stat-label { font-size: .68rem; letter-spacing: .18em; text-transform: uppercase; color: var(--faint); margin-top: 4px; }

/* ---------------- game board ---------------- */
.game-shell { max-width: 760px; margin: 34px auto 0; }
.game-topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.attempts { font-family: var(--font-mono); font-size: .82rem; color: var(--muted); letter-spacing: .1em; }
.attempts b { color: var(--volt); font-size: 1.05rem; }
.countdown { font-family: var(--font-mono); font-size: .82rem; color: var(--cyan); letter-spacing: .12em; }
.countdown b { color: var(--text); }

.search-wrap { position: relative; display: flex; gap: 10px; }
.search-input {
  flex: 1; min-width: 0;
  background: var(--panel); border: 1px solid var(--line-strong);
  clip-path: var(--clip-sm);
  color: var(--text); font-family: var(--font-display); font-size: 1rem;
  padding: 14px 18px; outline: none; transition: border-color .18s, box-shadow .18s;
}
.search-input::placeholder { color: var(--faint); }
.search-input:focus { border-color: var(--volt); box-shadow: 0 0 0 1px var(--volt), 0 0 22px rgba(0, 230, 140, .18); }
.suggest {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 40;
  background: rgba(10, 16, 29, .98); border: 1px solid var(--line-strong); border-radius: 12px;
  max-height: 264px; overflow-y: auto; display: none;
  box-shadow: var(--shadow-panel); backdrop-filter: blur(10px);
}
.suggest.open { display: block; }
.suggest-item {
  display: flex; align-items: center; gap: 12px; padding: 11px 16px; cursor: pointer;
  border-bottom: 1px solid rgba(122, 162, 224, .07); color: var(--text);
}
.suggest-item:last-child { border-bottom: 0; }
.suggest-item:hover, .suggest-item.sel { background: rgba(0, 230, 140, .1); }
.suggest-item .s-name { font-weight: 700; }
.suggest-item .s-meta { margin-left: auto; font-family: var(--font-mono); font-size: .7rem; color: var(--faint); }
.suggest-empty { padding: 14px 16px; color: var(--faint); font-size: .9rem; }

.guess-table { width: 100%; border-collapse: separate; border-spacing: 0 8px; margin-top: 18px; }
.guess-table th {
  font-family: var(--font-mono); font-size: .62rem; letter-spacing: .16em; text-transform: uppercase;
  color: var(--faint); padding: 0 6px 4px; text-align: center; font-weight: 500;
}
.guess-table td { text-align: center; padding: 0 3px; }
.cell {
  background: var(--panel); border: 1px solid var(--line);
  min-height: 52px; display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-weight: 700; font-size: .92rem; padding: 8px 6px;
  clip-path: var(--clip-sm);
  transform-style: preserve-3d;
}
.cell .cell-sub { font-family: var(--font-mono); font-size: .62rem; font-weight: 400; color: inherit; opacity: .8; margin-top: 2px; }
.cell-name { font-size: .95rem; letter-spacing: .02em; }
.cell.exact { background: linear-gradient(160deg, #06d484, #00a566); border-color: transparent; color: #03130b; box-shadow: 0 0 16px rgba(0, 230, 140, .35); }
.cell.close { background: linear-gradient(160deg, #ffc14d, #e8940a); border-color: transparent; color: #1d1202; box-shadow: 0 0 14px rgba(255, 176, 32, .3); }
.cell.miss { background: #1a2438; border-color: var(--line); color: var(--muted); }
.cell.flip { animation: cellflip .5s cubic-bezier(.3, .7, .3, 1) both; }
@keyframes cellflip { 0% { transform: rotateX(90deg); opacity: 0; } 100% { transform: rotateX(0); opacity: 1; } }
.guess-row-enter { animation: rowin .35s ease both; }
@keyframes rowin { from { transform: translateY(10px); opacity: 0; } to { transform: none; opacity: 1; } }

.legend { display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; margin-top: 16px; font-size: .76rem; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 7px; }
.legend i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.legend .l-ok { background: var(--volt); } .legend .l-close { background: var(--amber); } .legend .l-miss { background: #1a2438; border: 1px solid var(--line-strong); }

/* result card */
.result-card { margin-top: 22px; text-align: center; display: none; }
.result-card.show { display: block; animation: rowin .45s ease both; }
.result-title { font-size: 1.5rem; text-transform: uppercase; letter-spacing: .04em; }
.result-title.win { color: var(--volt); text-shadow: 0 0 26px rgba(0, 230, 140, .5); }
.result-title.lose { color: var(--red); }
.result-player { font-family: var(--font-mono); font-size: 2rem; font-weight: 700; color: var(--text); margin: 8px 0 2px; }
.result-meta { color: var(--muted); font-size: .9rem; }
.result-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 18px; }
.result-stats { display: flex; gap: 26px; justify-content: center; margin-top: 18px; flex-wrap: wrap; }
.result-stats div { text-align: center; }
.result-stats b { font-family: var(--font-mono); font-size: 1.3rem; color: var(--cyan); display: block; }
.result-stats span { font-size: .66rem; letter-spacing: .16em; text-transform: uppercase; color: var(--faint); }

/* ---------------- chips & tags ---------------- */
.chip {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--font-mono); font-size: .72rem; font-weight: 600; letter-spacing: .06em;
  padding: 5px 11px; border-radius: 7px;
  border: 1px solid color-mix(in srgb, var(--team, var(--cyan)) 55%, transparent);
  color: var(--team, var(--cyan));
  background: color-mix(in srgb, var(--team, var(--cyan)) 10%, transparent);
}
.chip i { width: 8px; height: 8px; border-radius: 2px; background: var(--team, var(--cyan)); box-shadow: 0 0 7px var(--team, var(--cyan)); }
a.chip:hover { filter: brightness(1.3); color: var(--team, var(--cyan)); }
.tag { font-family: var(--font-mono); font-size: .64rem; letter-spacing: .14em; text-transform: uppercase; padding: 4px 9px; border-radius: 5px; background: rgba(34, 211, 238, .12); color: var(--cyan); border: 1px solid rgba(34, 211, 238, .3); }
.tag-roster { background: rgba(167, 139, 250, .12); color: var(--violet); border-color: rgba(167, 139, 250, .35); }
.tag-match { background: rgba(0, 230, 140, .1); color: var(--volt); border-color: rgba(0, 230, 140, .3); }
.tag-event { background: rgba(255, 176, 32, .1); color: var(--amber); border-color: rgba(255, 176, 32, .3); }

/* ---------------- cards ---------------- */
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.card-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.card-grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
.game-card {
  display: block; color: var(--text);
  background: linear-gradient(165deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line); clip-path: var(--clip);
  padding: 24px; position: relative; overflow: hidden;
  transition: transform .2s, border-color .2s, box-shadow .25s;
}
.game-card::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(320px 160px at 85% -10%, color-mix(in srgb, var(--accent, var(--volt)) 22%, transparent), transparent 70%);
  opacity: 0; transition: opacity .25s;
}
.game-card:hover { transform: translateY(-5px); border-color: color-mix(in srgb, var(--accent, var(--volt)) 60%, transparent); box-shadow: 0 16px 40px rgba(0, 0, 0, .5), 0 0 24px color-mix(in srgb, var(--accent, var(--volt)) 18%, transparent); color: var(--text); }
.game-card:hover::after { opacity: 1; }
.game-card .g-icon { font-size: 1.6rem; margin-bottom: 12px; display: block; filter: drop-shadow(0 0 10px color-mix(in srgb, var(--accent, var(--volt)) 60%, transparent)); }
.game-card h3 { font-size: 1.12rem; text-transform: uppercase; letter-spacing: .03em; }
.game-card p { color: var(--muted); font-size: .86rem; margin-top: 8px; }
.game-card .g-play { margin-top: 14px; font-family: var(--font-mono); font-size: .7rem; letter-spacing: .2em; color: var(--accent, var(--volt)); text-transform: uppercase; }

.news-card {
  display: flex; flex-direction: column; color: var(--text);
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; transition: transform .2s, border-color .2s, box-shadow .25s;
}
.news-card:hover { transform: translateY(-4px); border-color: rgba(34, 211, 238, .5); box-shadow: 0 14px 36px rgba(0, 0, 0, .5); color: var(--text); }
.news-card .n-body { padding: 20px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.news-card h3 { font-size: 1.02rem; line-height: 1.4; }
.news-card .n-excerpt { color: var(--muted); font-size: .84rem; flex: 1; }
.news-card .n-meta { display: flex; align-items: center; gap: 10px; font-family: var(--font-mono); font-size: .68rem; color: var(--faint); letter-spacing: .08em; }
.news-card .n-source { color: var(--cyan); }

.player-card {
  display: flex; align-items: center; gap: 14px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
  padding: 14px 16px; color: var(--text); transition: transform .16s, border-color .16s;
}
.player-card:hover { transform: translateY(-3px); border-color: rgba(0, 230, 140, .5); color: var(--text); }
.player-avatar {
  width: 44px; height: 44px; flex: none; border-radius: 10px; display: grid; place-items: center;
  font-family: var(--font-mono); font-weight: 700; font-size: 1rem;
  background: linear-gradient(150deg, color-mix(in srgb, var(--team, var(--volt)) 30%, var(--panel-2)), var(--panel));
  border: 1px solid color-mix(in srgb, var(--team, var(--volt)) 45%, transparent);
  color: var(--team, var(--volt));
}
.player-card .p-name { font-weight: 700; font-size: .95rem; }
.player-card .p-meta { font-family: var(--font-mono); font-size: .68rem; color: var(--faint); margin-top: 2px; }

/* ---------------- data tables ---------------- */
.data-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.data-table th {
  font-family: var(--font-mono); font-size: .64rem; letter-spacing: .16em; text-transform: uppercase;
  color: var(--faint); text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line-strong); font-weight: 500;
}
.data-table td { padding: 12px 14px; border-bottom: 1px solid var(--line); color: var(--muted); }
.data-table tr:hover td { background: rgba(122, 162, 224, .04); color: var(--text); }
.data-table td:first-child { color: var(--text); font-weight: 600; }
.data-table .num { font-family: var(--font-mono); color: var(--cyan); }

/* ---------------- prose / articles ---------------- */
.prose { max-width: 780px; }
.prose h2 { font-size: 1.5rem; margin: 38px 0 14px; color: var(--text); }
.prose h3 { font-size: 1.15rem; margin: 26px 0 10px; }
.prose p { color: #b9c6dd; margin-bottom: 16px; }
.prose ul, .prose ol { margin: 0 0 18px 22px; color: #b9c6dd; }
.prose li { margin-bottom: 8px; }
.prose strong { color: var(--text); }
.prose a { text-decoration: underline; text-underline-offset: 3px; }
.prose blockquote {
  border-left: 3px solid var(--volt); background: rgba(0, 230, 140, .06);
  padding: 14px 20px; margin: 20px 0; border-radius: 0 10px 10px 0; color: var(--muted); font-style: italic;
}
.article-hero { padding: calc(var(--nav-h) + 44px) 0 26px; }
.article-hero h1 { font-size: clamp(1.7rem, 3.6vw, 2.6rem); max-width: 860px; margin-top: 14px; }
.article-meta { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; margin-top: 18px; font-family: var(--font-mono); font-size: .72rem; color: var(--faint); letter-spacing: .08em; }
.source-box {
  margin-top: 34px; padding: 16px 20px; border: 1px dashed var(--line-strong); border-radius: 12px;
  font-size: .84rem; color: var(--muted); background: rgba(14, 22, 38, .5);
}

/* ---------------- FAQ ---------------- */
.faq details {
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
  margin-bottom: 10px; overflow: hidden;
}
.faq summary {
  cursor: pointer; padding: 17px 20px; font-weight: 700; font-size: .98rem;
  list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 14px;
  transition: color .15s;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--font-mono); color: var(--volt); font-size: 1.2rem; transition: transform .2s; }
.faq details[open] summary { color: var(--volt); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq .faq-a { padding: 0 20px 18px; color: var(--muted); font-size: .92rem; }

/* ---------------- breadcrumbs ---------------- */
.crumbs { font-family: var(--font-mono); font-size: .7rem; letter-spacing: .1em; color: var(--faint); display: flex; gap: 8px; flex-wrap: wrap; padding-top: calc(var(--nav-h) + 22px); }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--volt); }
.crumbs span::before { content: "/"; margin-right: 8px; color: var(--faint); }

/* ---------------- footer ---------------- */
.footer { border-top: 1px solid var(--line); background: rgba(8, 12, 22, .9); padding: 52px 0 30px; margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 34px; }
.footer h4 { font-family: var(--font-mono); font-size: .68rem; letter-spacing: .22em; text-transform: uppercase; color: var(--faint); margin-bottom: 14px; }
.footer a { display: block; color: var(--muted); font-size: .88rem; padding: 4px 0; }
.footer a:hover { color: var(--volt); }
.footer-desc { color: var(--faint); font-size: .84rem; margin-top: 12px; max-width: 300px; }
.footer-bottom { margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; font-family: var(--font-mono); font-size: .68rem; color: var(--faint); letter-spacing: .08em; }

/* ---------------- toast ---------------- */
.toast {
  position: fixed; bottom: 26px; left: 50%; transform: translate(-50%, 80px);
  background: rgba(10, 16, 29, .96); border: 1px solid var(--volt); color: var(--text);
  padding: 13px 24px; border-radius: 12px; font-size: .9rem; font-weight: 600; z-index: 200;
  box-shadow: 0 0 30px rgba(0, 230, 140, .25); opacity: 0; transition: transform .3s cubic-bezier(.2, .9, .3, 1.2), opacity .3s;
  pointer-events: none; max-width: 90vw; text-align: center;
}
.toast.show { transform: translate(-50%, 0); opacity: 1; }

/* ---------------- modal ---------------- */
.modal-scrim {
  position: fixed; inset: 0; z-index: 150; background: var(--overlay);
  backdrop-filter: blur(6px); display: none; align-items: center; justify-content: center; padding: 20px;
}
.modal-scrim.open { display: flex; }
.modal {
  background: linear-gradient(165deg, var(--panel-2), var(--panel)); border: 1px solid var(--line-strong);
  clip-path: var(--clip); padding: 30px; width: min(480px, 94vw); max-height: 86vh; overflow-y: auto;
  animation: rowin .3s ease both; position: relative;
}
.modal h3 { text-transform: uppercase; letter-spacing: .04em; margin-bottom: 18px; }
.modal-close { position: absolute; top: 14px; right: 16px; background: none; border: 0; color: var(--muted); font-size: 1.4rem; cursor: pointer; line-height: 1; }
.modal-close:hover { color: var(--red); }
.dist-row { display: flex; align-items: center; gap: 10px; margin-bottom: 7px; font-family: var(--font-mono); font-size: .78rem; }
.dist-row .d-label { width: 14px; color: var(--faint); }
.dist-row .d-bar { background: #1a2438; border-radius: 4px; height: 22px; min-width: 26px; display: flex; align-items: center; justify-content: flex-end; padding-right: 7px; color: var(--text); transition: width .5s ease; }
.dist-row .d-bar.hot { background: var(--volt-dim); color: #04140c; }

/* ---------------- reveal on scroll ----------------
   Hidden state only applies when JS is running (html.js set by arena.js).
   Without JS every element is fully visible — crawlers and no-JS users
   always get the complete content. */
html.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity .6s ease, transform .6s cubic-bezier(.2, .7, .3, 1); }
html.js .reveal.in { opacity: 1; transform: none; }
.reveal-d1 { transition-delay: .08s; } .reveal-d2 { transition-delay: .16s; } .reveal-d3 { transition-delay: .24s; }

/* ---------------- misc ---------------- */
.divider { height: 1px; background: linear-gradient(90deg, transparent, var(--line-strong), transparent); margin: 30px 0; }
.text-volt { color: var(--volt); } .text-cyan { color: var(--cyan); } .text-amber { color: var(--amber); } .text-red { color: var(--red); } .text-muted { color: var(--muted); }
.center { text-align: center; }
.mt-1 { margin-top: 10px; } .mt-2 { margin-top: 20px; } .mt-3 { margin-top: 34px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; align-items: start; }
.flag { font-size: 1.05em; }
.hint-box { border: 1px solid rgba(255, 176, 32, .4); background: rgba(255, 176, 32, .07); border-radius: 12px; padding: 16px 20px; color: var(--muted); font-size: .9rem; }
.hint-box b { color: var(--amber); }
.ad-slot { min-height: 90px; display: grid; place-items: center; border: 1px dashed var(--line); border-radius: 12px; color: var(--faint); font-family: var(--font-mono); font-size: .64rem; letter-spacing: .2em; margin: 26px 0; }

/* confetti canvas */
#confetti-canvas { position: fixed; inset: 0; z-index: 180; pointer-events: none; }

/* ---------------- responsive ---------------- */
@media (max-width: 960px) {
  .card-grid, .card-grid.cols-4 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .stat-row { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  .nav-links { display: none; }
  .burger { display: block; }
  .nav-cta { display: none; }
  section { padding: 46px 0; }
  .card-grid, .card-grid.cols-2, .card-grid.cols-4 { grid-template-columns: 1fr; }
  .panel { padding: 20px; }
  .guess-table th { font-size: .52rem; letter-spacing: .08em; }
  .cell { min-height: 46px; font-size: .78rem; padding: 6px 3px; }
  .cell-name { font-size: .8rem; }
  .search-wrap { flex-direction: column; }
  .search-wrap .btn { width: 100%; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .hero { padding-top: calc(var(--nav-h) + 34px); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
}

/* ============================================================
   EXTENSIONS v2 — colorblind mode, hints, calendar, name rush,
   real-name quiz, archive, articles, wide footer
   ============================================================ */

.cb-toggle {
  width: 38px; height: 38px; flex: none;
  display: grid; place-items: center;
  background: var(--panel); border: 1px solid var(--line); border-radius: 10px;
  color: var(--faint); cursor: pointer; transition: border-color .18s, transform .12s, color .18s;
}
.cb-toggle:hover { border-color: var(--cyan); transform: translateY(-1px); color: var(--cyan); }
.cb-toggle.active { color: var(--volt); border-color: rgba(0, 230, 140, .45); box-shadow: 0 0 12px rgba(0, 230, 140, .2); }
.cb-toggle svg { width: 18px; height: 18px; }

/* colorblind palette: green->blue, amber->orange, miss stays dark but lighter border */
html.cb .cell.exact { background: linear-gradient(160deg, #2f7dff, #1b5fd0); box-shadow: 0 0 16px rgba(47, 125, 255, .4); color: #fff; }
html.cb .cell.close { background: linear-gradient(160deg, #ff8a3d, #e06a1a); box-shadow: 0 0 14px rgba(255, 138, 61, .35); color: #fff; }
html.cb .cell.miss { background: #141d30; }
html.cb .legend .l-ok { background: #2f7dff; }
html.cb .legend .l-close { background: #ff8a3d; }
html.cb .d-bar.hot { background: #1b5fd0; color: #fff; }
html.cb .opt-btn.correct { background: rgba(47, 125, 255, .18); border-color: #2f7dff; }

.g-icon-svg svg { width: 32px; height: 32px; color: var(--accent, var(--volt)); filter: drop-shadow(0 0 10px color-mix(in srgb, var(--accent, var(--volt)) 55%, transparent)); }

/* hint list inside the game board */
.hint-list { margin-top: 14px; display: grid; gap: 8px; }
.hint-empty { font-family: var(--font-mono); font-size: .7rem; letter-spacing: .1em; color: var(--faint); text-align: center; padding: 4px 0; }
.hint-item {
  display: flex; align-items: center; gap: 12px;
  border: 1px solid rgba(255, 176, 32, .3); background: rgba(255, 176, 32, .06);
  border-radius: 10px; padding: 10px 14px; cursor: pointer;
}
.hint-item .hint-label { font-family: var(--font-mono); font-size: .64rem; letter-spacing: .18em; color: var(--amber); flex: none; }
.hint-item .hint-text { font-size: .88rem; color: var(--muted); }
.hint-item.revealed { cursor: default; }
.hint-item.revealed .hint-text { color: var(--text); font-weight: 600; }

/* streak calendar in stats modal */
.cal-grid { display: grid; grid-template-columns: repeat(21, 1fr); gap: 4px; }
.cal-day { width: 100%; aspect-ratio: 1; border-radius: 4px; background: #1a2438; border: 1px solid var(--line); }
.cal-day.win { background: var(--volt); border-color: transparent; box-shadow: 0 0 6px rgba(0, 230, 140, .5); }
.cal-day.loss { background: rgba(255, 77, 94, .5); border-color: transparent; }
html.cb .cal-day.win { background: #2f7dff; box-shadow: 0 0 6px rgba(47, 125, 255, .5); }
.cal-legend { display: flex; gap: 14px; margin-top: 10px; font-size: .68rem; color: var(--faint); }
.cal-legend span { display: inline-flex; align-items: center; gap: 6px; }
.cal-dot { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.cal-dot.win { background: var(--volt); }
.cal-dot.loss { background: rgba(255, 77, 94, .5); }
.cal-dot.none { background: #1a2438; border: 1px solid var(--line); }

/* result "next challenge" chips row */
#next-games { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 18px; align-items: center; }

/* shake feedback */
@keyframes shakeshake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-7px); } 75% { transform: translateX(7px); } }
.shake { animation: shakeshake .32s ease; }

/* name rush */
.rush-bar-track { height: 8px; background: #1a2438; border-radius: 6px; overflow: hidden; }
.rush-bar { height: 100%; background: linear-gradient(90deg, var(--volt), var(--cyan)); border-radius: 6px; transition: width .3s ease; }
.rush-wall { margin-top: 18px; display: flex; flex-wrap: wrap; gap: 6px; }
.rush-slot {
  font-family: var(--font-mono); font-size: .68rem; letter-spacing: .04em;
  padding: 4px 9px; border-radius: 6px; color: var(--faint);
  background: #131e33; border: 1px solid rgba(122, 162, 224, .1);
}
.rush-slot.found { color: #03130b; background: linear-gradient(160deg, #06d484, #00a566); border-color: transparent; font-weight: 700; box-shadow: 0 0 8px rgba(0, 230, 140, .4); }
html.cb .rush-slot.found { background: linear-gradient(160deg, #2f7dff, #1b5fd0); color: #fff; }
.rush-missed-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.rush-missed-list .chip { pointer-events: auto; }

/* real-name quiz */
.opt-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.opt-btn {
  display: flex; align-items: center; gap: 12px;
  background: var(--panel); border: 1px solid var(--line-strong); border-radius: 12px;
  color: var(--text); font-family: var(--font-display); font-weight: 700; font-size: .95rem;
  padding: 15px 16px; cursor: pointer; text-align: left;
  transition: border-color .15s, transform .12s, background .15s;
}
.opt-btn:hover:not([disabled]) { border-color: var(--volt); transform: translateY(-2px); }
.opt-btn[disabled] { cursor: default; opacity: .85; }
.opt-key { width: 22px; height: 22px; flex: none; display: grid; place-items: center; border-radius: 6px; background: rgba(122, 162, 224, .1); color: var(--cyan); font-size: .7rem; }
.opt-btn.correct { border-color: var(--volt); background: rgba(0, 230, 140, .12); box-shadow: 0 0 14px rgba(0, 230, 140, .2); }
.opt-btn.wrong { border-color: var(--red); background: rgba(255, 77, 94, .1); }
.rn-feedback { min-height: 24px; margin-top: 14px; text-align: center; font-family: var(--font-mono); font-size: .8rem; letter-spacing: .06em; }
.rn-feedback.ok { color: var(--volt); }
.rn-feedback.bad { color: var(--red); }

/* archive */
.arch-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; max-width: 880px; margin-inline: auto; }
.arch-card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; }
.arch-card.arch-today { border-color: rgba(0, 230, 140, .4); box-shadow: 0 0 18px rgba(0, 230, 140, .12); }
.arch-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.arch-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.arch-actions .badge { margin-left: auto; }
.arch-answer { margin-top: 10px; font-size: .88rem; color: var(--muted); min-height: 0; }
.arch-answer b { color: var(--volt); }

/* article extras */
.tldr-box {
  border-left: 3px solid var(--cyan); background: rgba(34, 211, 238, .07);
  padding: 14px 18px; border-radius: 0 10px 10px 0; margin: 6px 0 26px;
}
.tldr-box p { margin: 8px 0 0; color: var(--text); font-size: .95rem; }

/* E-E-A-T content provenance box */
.eeat-box {
  border: 1px solid var(--line-strong); border-radius: 14px;
  background: linear-gradient(165deg, rgba(19, 30, 51, .7), rgba(14, 22, 38, .5));
  padding: 20px 22px; margin: 34px 0 8px;
}
.eeat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 26px; margin-top: 14px; }
.eeat-grid > div { font-size: .84rem; color: var(--muted); line-height: 1.55; }
.eeat-grid b { display: block; font-family: var(--font-mono); font-size: .68rem; letter-spacing: .16em; text-transform: uppercase; color: var(--volt); margin-bottom: 5px; }
@media (max-width: 760px) { .eeat-grid { grid-template-columns: 1fr; } }

/* wide footer (5 columns) */
.footer-grid { grid-template-columns: 1.3fr 1fr 1fr 1fr 1fr; }
.footer-social { display: flex; gap: 10px; margin-top: 14px; }
.footer-social a {
  width: 34px; height: 34px; display: grid; place-items: center;
  border: 1px solid var(--line); border-radius: 9px; color: var(--muted); padding: 0;
}
.footer-social a:hover { color: var(--volt); border-color: var(--volt); }

@media (max-width: 1080px) {
  .footer-grid { grid-template-columns: 1fr 1fr 1fr; }
}
@media (max-width: 760px) {
  .opt-grid { grid-template-columns: 1fr; }
  .arch-grid { grid-template-columns: 1fr; }
  .cal-grid { grid-template-columns: repeat(21, 1fr); gap: 3px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .hint-item { flex-direction: column; align-items: flex-start; gap: 4px; }
}
@media (max-width: 420px) {
  .footer-grid { grid-template-columns: 1fr; }
}