/* ============================================================
   The Prospecting Challenge - "Boardroom Conquest"
   Zero-build standalone styles (no framework).
   ============================================================ */

:root {
  --bg: #04050a;
  --panel: #0b1020;
  --ink: #e9edf6;
  --muted: #9aa3b8;
  --faint: #6b7280;
  --line: rgba(255, 255, 255, 0.10);

  --blue: #4189ff;
  --blue-deep: #1665e8;
  --green: #34d399;
  --red: #f87171;
  --amber: #fbbf24;

  /* certificate palette */
  --navy: #0a1a3a;
  --navy-deep: #050b1c;
  --gold: #d4af6a;
  --gold-soft: #e6ce97;
  --cream: #f4f1e8;

  --radius: 16px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--bg);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

.font-display {
  font-family: "Chakra Petch", ui-sans-serif, system-ui, sans-serif;
  letter-spacing: 0.01em;
}

.container { width: 100%; max-width: 980px; margin: 0 auto; padding: 0 16px; }
.app-main { position: relative; z-index: 1; padding: 28px 16px 56px; min-height: 60vh; }

a { color: inherit; }
button { font: inherit; cursor: pointer; }
img { display: block; }

/* ---------- Game board background ---------- */
.pg-board {
  position: relative;
  background:
    radial-gradient(900px 600px at 15% -10%, rgba(65, 137, 255, 0.10), transparent 60%),
    radial-gradient(800px 600px at 100% 0%, rgba(168, 85, 247, 0.08), transparent 55%),
    radial-gradient(900px 700px at 50% 120%, rgba(45, 212, 191, 0.07), transparent 60%),
    var(--bg);
}
.pg-board::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  background-image:
    linear-gradient(rgba(120, 150, 220, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(120, 150, 220, 0.05) 1px, transparent 1px);
  background-size: 46px 46px;
  -webkit-mask-image: radial-gradient(ellipse 90% 80% at 50% 25%, #000 40%, transparent 100%);
  mask-image: radial-gradient(ellipse 90% 80% at 50% 25%, #000 40%, transparent 100%);
  pointer-events: none;
}
.pg-board::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  opacity: 0.4;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.035'/%3E%3C/svg%3E");
}

/* ---------- Header / footer ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  border-bottom: 1px solid var(--line);
  background: rgba(4, 5, 10, 0.7);
  backdrop-filter: blur(10px);
}
.header-row { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.brand img { height: 26px; width: auto; }
.header-actions { display: flex; align-items: center; gap: 12px; }
.header-tag { font-size: 13px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.sound-toggle {
  display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px;
  border: 1px solid var(--line); border-radius: 9px; background: transparent; color: var(--muted);
  transition: color 0.18s ease, border-color 0.18s ease;
}
.sound-toggle:hover { color: #fff; border-color: rgba(65, 137, 255, 0.4); }
.sound-toggle.off { color: var(--faint); }
.sound-toggle svg { width: 16px; height: 16px; }
@media (max-width: 480px) { .header-tag { display: none; } }

.site-footer { position: relative; z-index: 1; border-top: 1px solid var(--line); background: rgba(15, 18, 30, 0.5); padding: 18px 0; }
.footer-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 13px; color: var(--muted); flex-wrap: wrap; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: #fff; }

/* ---------- Card frame ---------- */
.pg-card {
  position: relative;
  border-radius: var(--radius);
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0) 40%),
    linear-gradient(180deg, rgba(17, 22, 38, 0.92), rgba(7, 9, 18, 0.96));
  border: 1px solid color-mix(in srgb, var(--pg-accent, #4189ff) 45%, transparent);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.4), 0 18px 40px -22px rgba(0, 0, 0, 0.9), 0 0 28px -16px var(--pg-accent, #4189ff);
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.28s ease, border-color 0.28s ease;
}
.pg-card-hover { cursor: pointer; }
.pg-card-hover:hover {
  transform: translateY(-7px) scale(1.015);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--pg-accent, #4189ff) 30%, transparent), 0 30px 55px -24px rgba(0, 0, 0, 0.95), 0 0 46px -12px var(--pg-accent, #4189ff);
}
.pg-card-hover:disabled { cursor: default; }
.pg-holo { overflow: hidden; }
.pg-holo::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  background: linear-gradient(115deg, transparent 32%, rgba(255, 255, 255, 0.14) 46%, rgba(255, 255, 255, 0.04) 54%, transparent 66%);
  background-size: 250% 100%; background-position: -160% 0; opacity: 0; pointer-events: none; transition: opacity 0.25s ease;
}
.pg-holo:hover::after { opacity: 1; animation: pg-shimmer 1.1s ease forwards; }
@keyframes pg-shimmer { from { background-position: -160% 0; } to { background-position: 220% 0; } }

.pg-corner { position: absolute; width: 14px; height: 14px; opacity: 0.8; }

/* ---------- Animations ---------- */
@keyframes pg-deal { from { opacity: 0; transform: translateY(46px) rotateX(18deg) scale(0.92); } to { opacity: 1; transform: none; } }
.pg-deal { animation: pg-deal 0.55s cubic-bezier(0.16, 1, 0.3, 1) backwards; }
@keyframes pg-rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.pg-rise { animation: pg-rise 0.5s cubic-bezier(0.16, 1, 0.3, 1) backwards; }
@keyframes pg-float { 0%, 100% { transform: translateY(0) rotate(var(--pg-rot, 0deg)); } 50% { transform: translateY(-10px) rotate(var(--pg-rot, 0deg)); } }
.pg-float { animation: pg-float 6s ease-in-out infinite; }
@keyframes pg-stamp { 0% { opacity: 0; transform: translate(-50%, -50%) rotate(-24deg) scale(2.6); } 55% { opacity: 1; } 100% { opacity: 1; transform: translate(-50%, -50%) rotate(-11deg) scale(1); } }
.pg-stamp { animation: pg-stamp 0.42s cubic-bezier(0.2, 1.5, 0.4, 1) backwards; }
@keyframes pg-gem { from { opacity: 0; transform: scale(0) rotate(-40deg); } to { opacity: 1; transform: none; } }
.pg-gem { animation: pg-gem 0.4s cubic-bezier(0.2, 1.5, 0.4, 1) backwards; }
@keyframes pg-glow { 0%, 100% { box-shadow: 0 0 22px -8px var(--pg-accent, #4189ff); } 50% { box-shadow: 0 0 40px -4px var(--pg-accent, #4189ff); } }
.pg-glow { animation: pg-glow 3.6s ease-in-out infinite; }
@keyframes pg-bounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
.pg-bounce { animation: pg-bounce 1s ease-in-out infinite; }

@keyframes pg-xp { from { width: 0; } }
.pg-xp-fill { animation: pg-xp 0.85s cubic-bezier(0.16, 1, 0.3, 1); }
@keyframes pg-stripes { from { background-position: 0 0; } to { background-position: 28px 0; } }
.pg-stripes {
  background-image: linear-gradient(115deg, rgba(255, 255, 255, 0.22) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.22) 50%, rgba(255, 255, 255, 0.22) 75%, transparent 75%);
  background-size: 28px 28px; animation: pg-stripes 0.7s linear infinite;
}
/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: none; border-radius: 12px; padding: 12px 24px; font-weight: 700;
  transition: transform 0.18s ease, opacity 0.18s ease, background 0.18s ease;
  text-decoration: none;
}
.btn:active { transform: scale(0.96); }
.btn svg { width: 18px; height: 18px; }
.btn-block { width: 100%; }
.btn-primary { background: linear-gradient(90deg, var(--blue), var(--blue-deep)); color: #fff; box-shadow: 0 0 24px -8px var(--blue); }
.btn-primary:hover { opacity: 0.92; }
.btn-ghost { background: transparent; border: 1px solid #374151; color: #fff; }
.btn-ghost:hover { border-color: rgba(65, 137, 255, 0.5); background: rgba(31, 41, 55, 0.5); }
.btn-gold { background: rgba(251, 191, 36, 0.1); border: 1px solid rgba(229, 181, 103, 0.4); color: #fcd34d; }
.btn-gold:hover { background: rgba(251, 191, 36, 0.2); }
.btn-linkedin { background: #0a66c2; color: #fff; box-shadow: 0 0 24px -10px #0a66c2; }
.btn-linkedin:hover { background: #0958a8; }
.btn-link { background: none; border: none; color: var(--muted); display: inline-flex; align-items: center; gap: 8px; padding: 8px; font-size: 14px; }
.btn-link:hover { color: #fff; }

/* ---------- Generic helpers ---------- */
.center { text-align: center; }
.muted { color: var(--muted); }
.eyebrow { font-size: 11px; text-transform: uppercase; letter-spacing: 0.2em; color: rgba(65, 137, 255, 0.85); }
.tabular { font-variant-numeric: tabular-nums; }
.stack-sm > * + * { margin-top: 10px; }
.hidden { display: none; }

.icon-sm { width: 16px; height: 16px; }

/* ---------- HUD ---------- */
.hud { max-width: 760px; margin: 0 auto 32px; padding: 14px 18px; }
.hud-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.hud-shields { display: flex; gap: 8px; }
.shield { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.shield-box {
  display: flex; align-items: center; justify-content: center; width: 32px; height: 32px;
  border-radius: 9px; border: 1px solid #374151; background: rgba(11, 16, 32, 0.6);
  color: var(--faint); font-weight: 700; font-size: 13px; transition: all 0.3s ease;
}
.shield-box svg { width: 16px; height: 16px; }
.shield.done .shield-box { border-color: rgba(65, 137, 255, 0.7); background: rgba(65, 137, 255, 0.25); color: #bfdbfe; }
.shield.active .shield-box { border-color: var(--blue); background: rgba(65, 137, 255, 0.4); color: #fff; transform: scale(1.1); box-shadow: 0 0 18px -4px var(--blue); }
.shield-label { font-size: 10px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--faint); }
.score-gem {
  display: inline-flex; align-items: center; gap: 8px; border-radius: 12px;
  border: 1px solid rgba(251, 191, 36, 0.4); background: rgba(251, 191, 36, 0.1); padding: 6px 12px;
  color: #fde68a; font-weight: 700; font-size: 18px;
}
.score-gem svg { width: 16px; height: 16px; fill: #fcd34d; color: #fcd34d; }
.score-gem .small { color: rgba(251, 191, 36, 0.6); font-size: 12px; }
.xp-rail { margin-top: 12px; display: flex; align-items: center; gap: 8px; }
.xp-track { position: relative; height: 10px; flex: 1; border-radius: 999px; background: rgba(0, 0, 0, 0.6); border: 1px solid rgba(255, 255, 255, 0.05); overflow: hidden; }
.xp-meat { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--blue), var(--blue-deep)); transition: width 0.7s cubic-bezier(0.16, 1, 0.3, 1); }
.xp-pct { font-size: 11px; color: var(--faint); width: 38px; text-align: right; }

/* ---------- Round shared ---------- */
.round-head { text-align: center; margin-bottom: 22px; }
.round-head h2 { font-size: 22px; margin: 4px 0 0; }
.round-wrap { max-width: 640px; margin: 0 auto; }

.briefing { border-radius: 12px; border: 1px solid rgba(65, 137, 255, 0.25); background: rgba(65, 137, 255, 0.06); padding: 12px 14px; margin-bottom: 20px; }
.briefing .eyebrow { display: inline-flex; align-items: center; gap: 6px; color: #93c5fd; margin-bottom: 2px; }
.briefing p { margin: 0; font-size: 13px; color: var(--muted); }
.briefing svg { width: 14px; height: 14px; }

.feedback { border-radius: 12px; border: 1px solid; padding: 16px; margin-bottom: 16px; }
.feedback.good { border-color: rgba(52, 211, 153, 0.4); background: rgba(52, 211, 153, 0.07); }
.feedback.bad { border-color: rgba(251, 191, 36, 0.4); background: rgba(251, 191, 36, 0.06); }
.feedback .ftitle { font-weight: 700; margin: 0 0 4px; font-size: 14px; }
.feedback.good .ftitle { color: #6ee7b7; }
.feedback.bad .ftitle { color: #fcd34d; }
.feedback .ftip { display: flex; gap: 8px; align-items: flex-start; margin: 0; font-size: 14px; color: #d1d5db; }
.feedback .ftip svg { width: 16px; height: 16px; flex: 0 0 auto; margin-top: 2px; color: var(--amber); }

/* role / title card */
.role-card { max-width: 340px; margin: 0 auto 24px; }
.role-art { position: relative; height: 144px; display: flex; align-items: center; justify-content: center; transition: background 0.5s ease; }
.role-art > svg { width: 56px; height: 56px; color: rgba(147, 197, 253, 0.7); }
.role-plate { border-top: 1px solid var(--line); padding: 16px 20px; text-align: center; }
.role-plate .kicker { font-size: 10px; text-transform: uppercase; letter-spacing: 0.18em; color: var(--faint); margin: 0 0 4px; }
.role-plate .role-title { font-size: 22px; font-weight: 700; margin: 0; line-height: 1.15; }
.role-plate .role-faction { font-size: 12px; font-weight: 600; margin: 8px 0 0; }

/* sigils grid (round 1 options) */
.sigil-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 20px; }
.sigil {
  display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 8px;
  border-radius: 12px; font-size: 13px; font-weight: 600; text-align: center; color: var(--ink);
}
.sigil svg { width: 20px; height: 20px; }
.sigil.is-wrong { border-color: rgba(248, 113, 113, 0.6) !important; background: rgba(248, 113, 113, 0.15) !important; color: #fecaca; }
.sigil.is-dim { border-color: #1f2937 !important; background: rgba(17, 24, 39, 0.4) !important; color: var(--faint); opacity: 0.6; }

/* emblem / crest / portrait */
.emblem, .crest, .portrait { display: inline-flex; align-items: center; justify-content: center; color: #fff; flex: 0 0 auto; }
.emblem { border-radius: 12px; border: 1px solid; }
.emblem svg { width: 50%; height: 50%; }
.crest { border-radius: 16px; font-weight: 700; font-family: "Chakra Petch", sans-serif; }
.portrait { border-radius: 999px; font-weight: 700; font-family: "Chakra Petch", sans-serif; }

/* account card (round 2) */
.account-card { max-width: 440px; margin: 0 auto 24px; }
.account-head { display: flex; align-items: center; gap: 12px; padding: 16px; border-bottom: 1px solid var(--line); }
.account-head .acc-name { font-size: 19px; font-weight: 700; margin: 0; line-height: 1.1; }
.account-head .acc-industry { font-size: 12px; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; margin: 2px 0 0; }
.account-head svg { width: 14px; height: 14px; }
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: rgba(255,255,255,0.05); }
.stat { background: #070912; padding: 12px 16px; }
.stat .stat-label { font-size: 10px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--faint); display: inline-flex; align-items: center; gap: 6px; margin: 0 0 2px; }
.stat .stat-label svg { width: 14px; height: 14px; color: rgba(65, 137, 255, 0.7); }
.stat .stat-value { font-size: 14px; font-weight: 500; color: #e5e7eb; margin: 0; }
.signals { padding: 16px; }
.signals .kicker { font-size: 10px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--faint); margin: 0 0 8px; }
.rune { display: inline-block; border-radius: 6px; background: rgba(255,255,255,0.05); border: 1px solid var(--line); padding: 4px 10px; font-size: 12px; color: #d1d5db; margin: 0 6px 6px 0; }
.stamp {
  position: absolute; left: 50%; top: 50%; pointer-events: none;
  font-size: 34px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em;
  border: 4px solid; border-radius: 12px; padding: 8px 20px; background: rgba(5, 8, 16, 0.55);
}
.decision-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.decision { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 16px; border-radius: 12px; border: 1px solid #374151; color: var(--ink); font-weight: 700; }
.decision svg { width: 20px; height: 20px; }

/* persona hand (round 3) */
.hand { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 20px; }
.pcard { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 12px; text-align: center; color: var(--ink); }
.pcard .pwrap { position: relative; margin-top: 4px; }
.pcard .pbadge { position: absolute; right: -4px; top: -4px; border-radius: 999px; padding: 2px; display: inline-flex; }
.pcard .pbadge svg { width: 14px; height: 14px; color: #fff; }
.pcard .pname { font-size: 15px; font-weight: 700; margin: 0; line-height: 1.15; color: #fff; }
.pcard .ptitle { font-size: 12px; color: #cbd5e1; margin: 2px 0 0; line-height: 1.2; }
.pcard .ptype { margin-top: auto; border-radius: 999px; border: 1px solid; padding: 2px 10px; font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
.pcard.is-dim { opacity: 0.45; }

/* round 4 forge */
.forge-cat { padding: 16px; margin-bottom: 14px; }
.forge-cat-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.forge-cat-icon { display: flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 9px; background: rgba(65,137,255,0.15); border: 1px solid rgba(65,137,255,0.3); }
.forge-cat-icon svg { width: 14px; height: 14px; color: #93c5fd; }
.forge-cat h3 { font-size: 14px; margin: 0; }
.forge-cat .hint { font-size: 11px; color: var(--faint); margin: 0; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; border-radius: 10px; border: 1px solid #374151;
  background: rgba(17, 24, 39, 0.5); color: #d1d5db; padding: 7px 12px; font-size: 13px; font-weight: 500;
  margin: 0 8px 8px 0; transition: all 0.18s ease;
}
.chip svg { width: 14px; height: 14px; }
.chip.on { border-color: var(--blue); background: rgba(65,137,255,0.25); color: #fff; box-shadow: 0 0 16px -6px var(--blue); }
.chip.correct { border-color: rgba(52,211,153,0.6); background: rgba(52,211,153,0.15); color: #bbf7d0; }
.chip.wrong { border-color: rgba(248,113,113,0.6); background: rgba(248,113,113,0.15); color: #fecaca; }
.chip.muted-chip { border-color: #1f2937; background: rgba(17,24,39,0.4); color: var(--faint); }
.power { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.power .plabel { font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--faint); width: 96px; }
.cat-why { display: flex; gap: 6px; align-items: flex-start; margin: 12px 0 0; font-size: 12.5px; color: #cbd5e1; line-height: 1.4; }
.cat-why svg { width: 14px; height: 14px; flex: 0 0 auto; margin-top: 2px; color: var(--amber); }

/* round 3 scenario note */
.scen-note { font-size: 11px; color: var(--faint); margin: 6px 0 0; text-transform: uppercase; letter-spacing: 0.06em; }

/* round 5 doctrine */
.doctrine-card { max-width: 540px; margin: 0 auto 18px; padding: 22px 20px; text-align: center; }
.doctrine-scroll { margin-bottom: 10px; }
.doctrine-scroll svg { width: 34px; height: 34px; }
.doctrine-q { font-size: 18px; font-weight: 600; margin: 0; line-height: 1.35; color: #fff; }
.doctrine-opts { max-width: 540px; margin: 0 auto; display: flex; flex-direction: column; gap: 10px; }
.doctrine-opt { display: flex; align-items: center; gap: 12px; text-align: left; width: 100%; padding: 14px 16px; border-radius: 12px; color: var(--ink); font-size: 14px; font-weight: 500; }
.doctrine-opt .do-mark { display: inline-flex; flex: 0 0 auto; }
.doctrine-opt .do-mark svg { width: 18px; height: 18px; color: var(--faint); }
.doctrine-opt .do-mark .dot { color: #475569; }
.doctrine-opt.correct { border-color: rgba(52,211,153,0.6); background: rgba(52,211,153,0.12); color: #d1fae5; }
.doctrine-opt.correct .do-mark svg { color: #34d399; }
.doctrine-opt.wrong { border-color: rgba(248,113,113,0.6); background: rgba(248,113,113,0.12); color: #fecaca; }
.doctrine-opt.wrong .do-mark svg { color: #f87171; }
.doctrine-opt.dim { opacity: 0.5; }

/* modal: why your pick was wrong */
.modal-why { display: flex; gap: 8px; align-items: flex-start; text-align: left; font-size: 13.5px; color: #fecaca; margin: 0 0 12px; }
.modal-why svg { width: 16px; height: 16px; flex: 0 0 auto; margin-top: 2px; color: #f87171; }

/* intro doctrine panel */
.brief-card .golden { font-size: 16px; line-height: 1.5; margin: 0 0 14px; color: #fff; display: flex; gap: 8px; align-items: flex-start; }
.brief-card .golden svg { width: 18px; height: 18px; flex: 0 0 auto; margin-top: 3px; }
.order-flow { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 14px; }
.doctrine-line { display: flex; gap: 8px; align-items: flex-start; font-size: 13.5px; color: #cbd5e1; margin: 8px 0 0; line-height: 1.45; }
.doctrine-line svg { width: 16px; height: 16px; flex: 0 0 auto; margin-top: 2px; }
.check-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.check-list li { display: flex; gap: 8px; align-items: flex-start; font-size: 13.5px; color: #cbd5e1; line-height: 1.4; }
.check-list li svg { width: 15px; height: 15px; flex: 0 0 auto; margin-top: 2px; }
@media (min-width: 640px) { .check-list { grid-template-columns: 1fr 1fr; } }

/* ---------- Intro ---------- */
.intro { max-width: 900px; margin: 0 auto; }
.hero { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; margin-bottom: 56px; }
.fan { position: relative; height: 180px; width: 100%; max-width: 420px; margin-bottom: 28px; }
.fan-pos { position: absolute; left: 50%; top: 8px; }
.fan-card { position: relative; width: 112px; height: 160px; overflow: hidden; }
.fan-art { height: 96px; display: flex; align-items: center; justify-content: center; }
.fan-art svg { width: 36px; height: 36px; }
.fan-plate { border-top: 1px solid var(--line); padding: 8px; text-align: center; }
.fan-plate .fd-name { font-size: 10px; font-weight: 700; margin: 0; line-height: 1.1; }
.fan-plate .fd-tag { font-size: 8px; text-transform: uppercase; letter-spacing: 0.06em; margin: 2px 0 0; }
.pill { display: inline-flex; align-items: center; gap: 8px; border-radius: 999px; border: 1px solid rgba(65,137,255,0.3); background: rgba(65,137,255,0.1); padding: 5px 14px; font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; color: #93c5fd; margin-bottom: 16px; }
.pill svg { width: 14px; height: 14px; }
.hero h1 { font-size: clamp(34px, 6vw, 60px); font-weight: 700; letter-spacing: -0.01em; margin: 0 0 12px; text-shadow: 0 0 40px rgba(65, 137, 255, 0.35); }
.hero p.lede { font-size: 17px; color: #d1d5db; max-width: 640px; margin: 0; }
.hero .accent { color: var(--blue); font-weight: 600; }

.enter-card { max-width: 420px; margin: 0 auto 56px; padding: 24px; }
.enter-card label { display: block; text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; color: #93c5fd; margin-bottom: 8px; }
.enter-card input {
  width: 100%; border-radius: 12px; border: 1px solid #374151; background: rgba(0,0,0,0.5);
  padding: 12px 16px; color: #fff; font-size: 16px; outline: none; transition: border-color 0.2s ease;
}
.enter-card input::placeholder { color: var(--faint); }
.enter-card input:focus { border-color: var(--blue); box-shadow: 0 0 0 1px var(--blue); }
.enter-err { text-align: left; font-size: 12px; color: #f87171; margin: 8px 0 0; }
.enter-note { display: inline-flex; align-items: center; justify-content: center; gap: 6px; width: 100%; font-size: 12px; color: var(--faint); margin: 12px 0 0; }
.enter-note svg { width: 14px; height: 14px; color: var(--amber); }

.section-label { text-align: center; font-size: 12px; text-transform: uppercase; letter-spacing: 0.2em; color: var(--faint); margin: 0 0 16px; }
.quests { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 56px; }
.quest { overflow: hidden; }
.quest-art { height: 80px; display: flex; align-items: center; justify-content: center; }
.quest-art svg { width: 28px; height: 28px; }
.quest-body { border-top: 1px solid var(--line); padding: 12px; }
.quest-body .kicker { font-size: 10px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--faint); margin: 0; }
.quest-body h3 { font-size: 14px; margin: 2px 0 0; line-height: 1.1; }
.quest-body p { font-size: 12px; color: var(--muted); margin: 4px 0 0; }

.brief-card { max-width: 720px; margin: 0 auto 56px; padding: 20px 24px; text-align: left; }
.brief-card h3 { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; text-transform: uppercase; letter-spacing: 0.08em; color: #6ee7b7; margin: 0 0 8px; }
.brief-card h3 svg { width: 16px; height: 16px; }
.brief-card p { margin: 0; font-size: 15px; color: #d1d5db; }

.codex { max-width: 720px; margin: 0 auto; }
.codex-sub { text-align: center; font-size: 14px; color: var(--muted); margin: 0 0 20px; }
.codex-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 32px; }
.codex-item { display: flex; align-items: flex-start; gap: 12px; padding: 12px; }
.codex-item .ci-name { font-size: 14px; font-weight: 700; margin: 0; }
.codex-item .ci-name .ci-tag { font-size: 12px; font-weight: 400; }
.codex-item .ci-titles { font-size: 12px; color: var(--muted); margin: 2px 0 0; line-height: 1.4; }
.tiers { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px; }
.tier { display: inline-flex; align-items: center; gap: 6px; }
.tier-chip { border-radius: 9px; border: 1px solid rgba(65,137,255,0.25); background: rgba(65,137,255,0.1); padding: 4px 10px; font-size: 12px; color: #bfdbfe; }
.tier svg { width: 12px; height: 12px; color: var(--faint); }

/* ---------- Result ---------- */
.result { max-width: 640px; margin: 0 auto; text-align: center; }
.banner { max-width: 420px; margin: 0 auto 28px; padding: 28px 24px; }
.banner-medal { width: 64px; height: 64px; margin: 0 auto 12px; display: flex; align-items: center; justify-content: center; border-radius: 999px; }
.banner-medal svg { width: 32px; height: 32px; }
.banner .b-kicker { font-size: 12px; text-transform: uppercase; letter-spacing: 0.25em; margin: 0; }
.banner h2 { font-size: 26px; margin: 4px 0 0; }
.banner .b-score { margin: 8px 0 0; color: #d1d5db; }
.banner .b-score .big { font-size: 20px; font-weight: 700; color: #fcd34d; }
.report { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; text-align: left; margin-bottom: 28px; }
.report-row { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; }
.report-row .rr-name { font-size: 14px; font-weight: 700; margin: 0; }
.report-row .rr-sub { font-size: 12px; color: var(--faint); margin: 0; }
.report-row .rr-score { font-size: 14px; font-weight: 700; }
.report-row .rr-score.full { color: var(--green); }
.report-row .rr-score.partial { color: var(--amber); }
.focus { border-radius: 12px; border: 1px solid rgba(251,191,36,0.3); background: rgba(251,191,36,0.05); padding: 16px; text-align: left; }
.focus p { font-weight: 700; color: #fcd34d; margin: 0 0 4px; font-size: 14px; }
.focus ul { margin: 0; padding-left: 20px; color: #d1d5db; font-size: 14px; }
.result-actions { display: flex; flex-direction: column; gap: 12px; align-items: center; justify-content: center; margin-top: 32px; }

/* ---------- Certificate ---------- */
.cert-label { text-align: center; font-size: 12px; text-transform: uppercase; letter-spacing: 0.2em; color: rgba(252, 211, 77, 0.8); margin: 0 0 16px; }
/* The certificate is rendered to a canvas and shown as a fully zoomed-out image,
   so the preview always matches the download exactly and never mis-fits. */
.cert-frame {
  --c-gold: #A87E2D;
  position: relative; width: 100%; max-width: 940px; margin: 0 auto; line-height: 0;
  cursor: zoom-in; transition: transform 0.25s ease, box-shadow 0.25s ease;
  box-shadow: 0 40px 80px -36px rgba(0,0,0,0.9);
}
.cert-frame:hover { transform: translateY(-3px); box-shadow: 0 50px 90px -34px rgba(0,0,0,0.95); }
.cert-frame:focus-visible { outline: 2px solid var(--c-gold); outline-offset: 3px; }
.cert-preview {
  display: block; width: 100%; height: auto; aspect-ratio: 1700 / 1130;
  background: #fff; border: 1px solid #E6E9EE; object-fit: contain;
}
.cert-hint {
  position: absolute; top: 14px; right: 14px; z-index: 3; display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 11px; border-radius: 999px; font-size: 11px; font-weight: 600; letter-spacing: 0.02em; line-height: 1;
  color: #5C6675; background: rgba(255,255,255,0.92); border: 1px solid #E6E9EE;
  opacity: 0; transition: opacity 0.25s ease;
}
.cert-frame:hover .cert-hint, .cert-frame:focus-visible .cert-hint { opacity: 1; }
.cert-hint svg { width: 13px; height: 13px; }
@media (hover: none) { .cert-hint { opacity: 1; } }   /* always visible on touch */

/* Full-size lightbox shown when the certificate is clicked */
.cert-zoom {
  position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center;
  padding: clamp(16px, 4vw, 40px); cursor: zoom-out;
  background: rgba(2, 4, 10, 0.82); backdrop-filter: blur(6px);
  animation: pg-rise 0.22s ease;
}
.cert-zoom-img {
  max-width: min(1200px, 96vw); max-height: 92vh; width: auto; height: auto;
  border-radius: 0; box-shadow: 0 40px 100px -20px rgba(0, 0, 0, 0.9);
}
.cert-actions { max-width: 640px; margin: 24px auto 0; display: flex; flex-direction: column; gap: 12px; }
.cert-actions-row { display: flex; flex-direction: column; gap: 12px; }

/* ---------- Public verification screen ---------- */
.verify-wrap { max-width: 560px; margin: 24px auto; }
.verify-card { padding: 32px clamp(20px, 5vw, 40px); text-align: center; }
.verify-body { min-height: 120px; }
.verify-mark { width: 64px; height: 64px; margin: 0 auto 14px; display: flex; align-items: center; justify-content: center;
  border-radius: 999px; }
.verify-mark svg { width: 32px; height: 32px; }
.verify-mark.ok { background: rgba(52, 211, 153, 0.12); border: 2px solid #34d399; color: #34d399; }
.verify-mark.bad { background: rgba(248, 113, 113, 0.12); border: 2px solid #f87171; color: #f87171; }
.v-kicker { text-transform: uppercase; letter-spacing: 0.18em; font-size: 12px; color: var(--muted); margin: 0; }
.v-name { font-size: clamp(24px, 5vw, 32px); font-weight: 700; margin: 6px 0 2px; }
.v-sub { color: var(--muted); font-size: 14px; margin: 0 0 18px; }
.v-meta { list-style: none; padding: 0; margin: 0 auto; max-width: 360px; text-align: left; }
.v-meta li { display: flex; justify-content: space-between; gap: 16px; padding: 9px 0; border-top: 1px solid var(--line); font-size: 14px; }
.v-meta li span { color: var(--muted); }
.v-meta li b { color: var(--ink); font-weight: 600; }
.verify-cta { margin-top: 22px; }

/* ---------- Modal + celebration ---------- */
.modal-overlay {
  position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center;
  padding: 20px; background: rgba(3, 5, 12, 0.72); backdrop-filter: blur(6px);
  animation: modal-fade 0.22s ease both;
}
@keyframes modal-fade { from { opacity: 0; } to { opacity: 1; } }
.modal {
  position: relative; width: 100%; max-width: 420px; max-height: 88vh; overflow: auto;
  padding: 28px 24px 24px; text-align: center;
  animation: modal-pop 0.36s cubic-bezier(0.2, 1.3, 0.4, 1) both;
}
@keyframes modal-pop { from { opacity: 0; transform: translateY(24px) scale(0.92); } to { opacity: 1; transform: none; } }
.modal-badge { width: 56px; height: 56px; margin: 0 auto 12px; display: flex; align-items: center; justify-content: center; border-radius: 999px; border: 2px solid; }
.modal-badge svg { width: 28px; height: 28px; }
.modal-verdict { font-size: 22px; font-weight: 700; margin: 0; }
.modal.win .modal-verdict { color: #6ee7b7; }
.modal.lose .modal-verdict { color: #f87171; }
.modal-reveal { font-size: 13px; color: var(--muted); margin: 4px 0 0; }
.modal-xp { font-size: 36px; font-weight: 700; margin: 10px 0; }
.modal-xp.win { color: #fcd34d; text-shadow: 0 0 24px rgba(251, 191, 36, 0.5); animation: xp-pop 0.5s cubic-bezier(0.2, 1.5, 0.4, 1) 0.12s both; }
.modal-xp.zero { color: var(--faint); }
@keyframes xp-pop { 0% { opacity: 0; transform: scale(0.4); } 60% { transform: scale(1.18); } 100% { opacity: 1; transform: scale(1); } }
.modal-tip { display: flex; gap: 8px; align-items: flex-start; text-align: left; font-size: 14px; color: #d1d5db; margin: 0 0 18px; }
.modal-tip svg { width: 16px; height: 16px; flex: 0 0 auto; margin-top: 2px; color: var(--amber); }
.modal-confetti { position: absolute; left: 50%; top: 44px; width: 0; height: 0; pointer-events: none; }
.confetti { position: absolute; left: 0; top: 0; width: 9px; height: 9px; border-radius: 2px; animation: confetti-burst 0.95s ease-out forwards; }
@keyframes confetti-burst {
  0% { opacity: 1; transform: translate(0, 0) rotate(0) scale(1); }
  100% { opacity: 0; transform: translate(var(--tx), var(--ty)) rotate(var(--r)) scale(0.4); }
}
.score-gem.bump { animation: gem-bump 0.5s ease; }
@keyframes gem-bump { 0%, 100% { transform: scale(1); } 35% { transform: scale(1.18); } }

/* ---------- Hint bar (in-round reminder) ---------- */
.hint-bar { display: flex; gap: 8px; align-items: flex-start; max-width: 640px; margin: 0 auto 18px; padding: 10px 14px; border-radius: 12px; border: 1px solid rgba(251,191,36,0.3); background: rgba(251,191,36,0.07); color: #fde68a; font-size: 13px; line-height: 1.4; }
.hint-bar svg { width: 16px; height: 16px; flex: 0 0 auto; margin-top: 2px; color: #fbbf24; }

/* ---------- Briefing / preface ---------- */
.preface { max-width: 680px; margin: 0 auto; }
.preface-head { text-align: center; margin-bottom: 22px; }
.preface-icon { width: 60px; height: 60px; margin: 0 auto 12px; display: flex; align-items: center; justify-content: center; border-radius: 16px; border: 1px solid; }
.preface-icon svg { width: 28px; height: 28px; }
.preface-head h2 { font-size: 26px; margin: 4px 0 8px; }
.preface-lead { color: #cbd5e1; font-size: 15px; line-height: 1.5; max-width: 560px; margin: 0 auto; }
.pre-section { margin-bottom: 20px; }
.pre-h { display: flex; align-items: center; gap: 8px; font-size: 13px; text-transform: uppercase; letter-spacing: 0.08em; color: #9aa3b8; margin: 0 0 12px; }
.pre-h svg { width: 16px; height: 16px; color: #93c5fd; }
.preface-start { margin-top: 8px; }

/* label → category mapping rows */
.map-list { display: flex; flex-direction: column; gap: 8px; }
.map-row { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 10px; border: 1px solid var(--line); background: rgba(17,24,39,0.4); flex-wrap: wrap; }
.map-row svg { width: 16px; height: 16px; color: var(--faint); flex: 0 0 auto; }
.map-ll { color: #e9edf6; font-weight: 600; font-size: 14px; }
.map-ours { font-weight: 700; font-size: 14px; }

/* qualification checklist */
.qual-list { display: grid; gap: 10px; }
@media (min-width: 640px) { .qual-list { grid-template-columns: 1fr 1fr; } }
.qual-check { padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: rgba(17,24,39,0.4); }
.qc-term { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 14px; color: #fff; }
.qc-term svg { width: 15px; height: 15px; flex: 0 0 auto; }
.qc-meaning { display: block; margin-top: 4px; font-size: 13px; color: #cbd5e1; line-height: 1.45; }

/* qualification motion (round 2 briefing - the actual click-path) */
.qual-steps { display: flex; flex-direction: column; gap: 10px; }
.qual-step { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: rgba(17,24,39,0.4); }
.qs-num { flex: 0 0 auto; display: flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 999px; border: 1px solid rgba(65,137,255,0.4); background: rgba(65,137,255,0.12); color: #93c5fd; font-size: 13px; font-weight: 700; }
.qs-body { flex: 1; min-width: 0; }
.qs-do { font-weight: 700; font-size: 14px; color: #fff; margin: 0; }
.qs-how { font-size: 13px; color: #cbd5e1; margin: 3px 0 0; line-height: 1.45; }
.qs-flag { display: flex; gap: 6px; align-items: flex-start; font-size: 12.5px; color: #fca5a5; margin: 6px 0 0; line-height: 1.4; }
.qs-flag svg { width: 14px; height: 14px; flex: 0 0 auto; margin-top: 2px; color: #f87171; }
.qs-foot { display: flex; gap: 8px; align-items: center; font-size: 13.5px; color: #6ee7b7; margin: 12px 0 0; }
.qs-foot svg { width: 16px; height: 16px; flex: 0 0 auto; }

/* size rule cards */
.size-cards { display: grid; gap: 10px; }
@media (min-width: 560px) { .size-cards { grid-template-columns: 1fr 1fr; } }
.size-card { padding: 14px 16px; }
.sz-n { font-size: 13px; text-transform: uppercase; letter-spacing: 0.06em; color: #e5b567; margin: 0 0 6px; }
.size-card:nth-child(2) .sz-n { color: #fb923c; }
.sz-t { font-size: 13.5px; color: #cbd5e1; line-height: 1.45; margin: 0; }

/* product → team → poc rows */
.own-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; margin-bottom: 8px; }
.own-prod { font-size: 13.5px; color: #e9edf6; font-weight: 600; margin: 0; }
.own-team { font-size: 12px; margin: 2px 0 0; font-weight: 600; }
.own-poc { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 13px; color: #fff; flex: 0 0 auto; }
.own-poc svg { width: 15px; height: 15px; }
@media (max-width: 480px) { .own-row { flex-direction: column; align-items: flex-start; gap: 6px; } }

/* build-the-search guide rows */
.filter-guide { display: flex; flex-direction: column; gap: 8px; }
.guide-row { display: flex; gap: 12px; align-items: flex-start; padding: 10px 14px; border-radius: 10px; border: 1px solid var(--line); background: rgba(17,24,39,0.4); }
.guide-key { font-weight: 700; font-size: 13px; color: #c4b5fd; min-width: 150px; flex: 0 0 auto; }
.guide-row .qc-meaning { margin-top: 0; }
@media (max-width: 560px) { .guide-row { flex-direction: column; gap: 4px; } .guide-key { min-width: 0; } }

/* ---------- Responsive ---------- */
@media (min-width: 640px) {
  .sigil-grid { grid-template-columns: repeat(3, 1fr); }
  .hand { grid-template-columns: repeat(3, 1fr); }
  .result-actions { flex-direction: row; }
  .cert-actions-row { flex-direction: row; }
}
@media (max-width: 640px) {
  .quests { grid-template-columns: repeat(2, 1fr); }
  .codex-grid { grid-template-columns: 1fr; }
  .report { grid-template-columns: 1fr; }
  .shield-label { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .pg-deal, .pg-rise, .pg-float, .pg-stamp, .pg-gem, .pg-glow, .pg-bounce,
  .pg-xp-fill, .pg-stripes,
  .modal-overlay, .modal, .modal-xp.win, .score-gem.bump { animation: none; }
  .pg-card-hover:hover { transform: none; }
  .pg-holo:hover::after { animation: none; opacity: 0; }
  .confetti { display: none; }
  html { scroll-behavior: auto; }
}
