:root {
  --bg: #060b16;
  --bg2: #0c1528;
  --ink: #e8f4ff;
  --muted: #8aa0b8;
  --cyan: #22d3ee;
  --cyan-dim: rgba(34, 211, 238, 0.14);
  --lime: #a3e635;
  --magenta: #f472b6;
  --orange: #fb923c;
  --line: rgba(148, 163, 184, 0.22);
  --card: rgba(12, 21, 40, 0.82);
  --radius: 22px;
  --font: "Manrope", system-ui, sans-serif;
  --display: "Orbitron", "Manrope", sans-serif;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(1200px 700px at 80% -10%, rgba(34, 211, 238, 0.18), transparent 55%),
    radial-gradient(900px 600px at 0% 100%, rgba(244, 114, 182, 0.12), transparent 50%),
    linear-gradient(180deg, var(--bg), #04070f 70%, #02040a);
  overflow-x: hidden;
}

#fxBg {
  position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: 0.55;
}

/* Modo claro: pick / quiz / resultado */
body.is-light {
  color: #0f172a;
  background: #f1f5f9 !important;
}
body.is-light #fxBg { display: none !important; opacity: 0 !important; }
body.is-light .topbar--solid {
  background: rgba(255, 255, 255, 0.96) !important;
  border-bottom: 1px solid #d7dee8 !important;
  color: #0f172a;
}
body.is-light .brand { color: #0f172a; }
body.is-light .panel {
  background: #ffffff;
  border-color: #d7dee8;
  color: #0f172a;
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.08);
}
body.is-light .panel-title { color: #0b1220; }
body.is-light .panel-lead,
body.is-light .disclaimer { color: #334155; }
body.is-light .kicker { color: #0891b2; }
body.is-light .name-row label { color: #475569; }
body.is-light .name-row input {
  background: #f8fafc;
  border-color: #94a3b8;
  color: #0f172a;
}
body.is-light .test-card {
  background: #ffffff;
  border-color: #cbd5e1;
  color: #0f172a;
}
body.is-light .test-card p { color: #475569; }
body.is-light .tag { color: #475569; border-color: #cbd5e1; background: #f8fafc; }
body.is-light .free-banner {
  background: #ecfeff;
  border-color: #67e8f9;
  color: #0e7490;
}
body.is-light .btn--tiny {
  color: #0f172a;
  background: #eef2f7;
  border-color: #cbd5e1;
}
body.is-light .result-score { color: #0891b2; text-shadow: none; }
body.is-light .result-score-label,
body.is-light .result-diag { color: #334155; }
body.is-light .result-tips {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: #0f172a;
}
body.is-light .result-tips ul { color: #334155; }
body.is-light .bar { color: #0f172a; }
body.is-light .bar i { background: #e2e8f0; }

.view { position: relative; z-index: 1; min-height: 100dvh; }
.view[hidden] { display: none !important; }

.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem 1.25rem; gap: 1rem;
}
.topbar--solid {
  position: sticky; top: 0; z-index: 20;
  background: rgba(6, 11, 22, 0.82);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.brand {
  display: inline-flex; align-items: center; gap: 0.65rem;
  color: var(--ink); text-decoration: none;
  font-family: var(--display); font-weight: 700; letter-spacing: 0.06em; font-size: 0.82rem;
}
.brand img { border-radius: 10px; box-shadow: 0 0 0 1px rgba(34,211,238,.35), 0 8px 24px rgba(34,211,238,.2); }
.brand--static { pointer-events: none; }
.pill {
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--cyan); background: var(--cyan-dim); border: 1px solid rgba(34,211,238,.35);
  padding: 0.4rem 0.75rem; border-radius: 999px;
}

/* HERO */
.view--hero {
  display: grid; grid-template-rows: auto 1fr;
  min-height: 100dvh; color: #fff;
}
.hero-video {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; z-index: 0;
}
.hero-veil {
  position: absolute; inset: 0; z-index: 1;
  background:
    linear-gradient(180deg, rgba(4,8,18,.35) 0%, rgba(4,8,18,.55) 45%, rgba(4,8,18,.92) 100%),
    radial-gradient(circle at 50% 40%, transparent 20%, rgba(0,0,0,.45) 80%);
}
.view--hero .topbar,
.view--hero .hero-copy { position: relative; z-index: 2; }
.hero-copy {
  align-self: end; padding: clamp(1.5rem, 5vw, 4rem);
  max-width: 720px;
  animation: rise .9s cubic-bezier(.2,.8,.2,1) both;
}
.kicker {
  margin: 0 0 .6rem; font-family: var(--display); font-size: .72rem;
  letter-spacing: .14em; text-transform: uppercase; color: var(--cyan);
}
.hero-copy h1 {
  margin: 0; font-family: var(--display); font-weight: 800;
  font-size: clamp(1.8rem, 5.5vw, 3.4rem); line-height: 1.08; letter-spacing: .02em;
  text-shadow: 0 10px 40px rgba(0,0,0,.55);
}
.lead { margin: 1rem 0 0; color: #cfe7f7; font-size: clamp(1rem, 2.2vw, 1.15rem); line-height: 1.5; max-width: 38ch; }
.cta-row { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.5rem; }

.btn {
  appearance: none; border: 0; cursor: pointer;
  font-family: var(--font); font-weight: 700; font-size: .95rem;
  border-radius: 999px; padding: .9rem 1.35rem;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn--primary {
  color: #041018; background: linear-gradient(135deg, #67e8f9, #22d3ee 45%, #a3e635);
  box-shadow: 0 12px 40px rgba(34,211,238,.35);
}
.btn--ghost {
  color: #fff; background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.28); backdrop-filter: blur(8px);
}
.btn--stop:disabled,
.btn:disabled {
  opacity: 0.38;
  cursor: not-allowed;
  transform: none;
  pointer-events: none;
}
.btn--stop:not(:disabled) {
  border-color: rgba(248, 113, 113, 0.55);
  color: #fecaca;
  background: rgba(248, 113, 113, 0.14);
}
.btn--tiny {
  padding: .45rem .8rem; font-size: .78rem; border-radius: 12px;
  color: var(--ink); background: rgba(255,255,255,.06); border: 1px solid var(--line);
}
.btn--choice {
  width: 100%; text-align: left; border-radius: 16px; padding: 1rem 1.1rem;
  background: rgba(255,255,255,.04); border: 1px solid var(--line); color: var(--ink);
  display: grid; gap: .2rem;
}
.btn--choice:hover { border-color: rgba(34,211,238,.55); background: var(--cyan-dim); }
.btn--choice.is-correct { border-color: rgba(163,230,53,.7); background: rgba(163,230,53,.12); }
.btn--choice.is-wrong { border-color: rgba(248,113,113,.7); background: rgba(248,113,113,.1); }
.btn--choice small { color: var(--muted); font-weight: 500; }

.panel {
  width: min(1100px, calc(100% - 2rem));
  margin: 1rem auto 3rem; padding: clamp(1.25rem, 3vw, 2rem);
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); backdrop-filter: blur(16px);
  animation: rise .55s cubic-bezier(.2,.8,.2,1) both;
}
.panel-title {
  margin: 0; font-family: var(--display); font-size: clamp(1.4rem, 3vw, 2rem); letter-spacing: .03em;
}
.panel-lead { color: var(--muted); line-height: 1.55; max-width: 62ch; }
.name-row { margin: 1.25rem 0 1.5rem; }
.name-row label { display: grid; gap: .4rem; font-size: .8rem; color: var(--muted); max-width: 320px; }
.name-row input {
  border-radius: 14px; border: 1px solid var(--line); background: rgba(0,0,0,.28);
  color: var(--ink); padding: .85rem 1rem; font: inherit;
}
.name-row input:focus { outline: 2px solid rgba(34,211,238,.45); border-color: transparent; }

.test-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1rem;
}
.test-card {
  position: relative; overflow: hidden; text-align: left; cursor: pointer;
  border-radius: 20px; padding: 1.15rem 1.15rem 1.25rem;
  border: 1px solid var(--line); background: linear-gradient(160deg, rgba(255,255,255,.05), rgba(255,255,255,.02));
  color: inherit; font: inherit;
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.test-card:hover {
  transform: translateY(-4px);
  border-color: rgba(34,211,238,.5);
  box-shadow: 0 16px 40px rgba(34,211,238,.12);
}
.test-card__emoji {
  font-size: 1.8rem; width: 3rem; height: 3rem; display: grid; place-items: center;
  border-radius: 14px; background: var(--cyan-dim); margin-bottom: .85rem;
}
.test-card h3 {
  margin: 0; font-family: var(--display); font-size: 1rem; letter-spacing: .04em;
}
.test-card p { margin: .45rem 0 0; color: var(--muted); font-size: .88rem; line-height: 1.4; }
.test-card__meta {
  margin-top: .9rem; display: flex; gap: .5rem; flex-wrap: wrap;
}
.tag {
  font-size: .68rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  padding: .28rem .55rem; border-radius: 999px; border: 1px solid var(--line); color: var(--muted);
}
.tag--hot { color: var(--cyan); border-color: rgba(34,211,238,.4); background: var(--cyan-dim); }
.disclaimer { margin: 1.5rem 0 0; color: var(--muted); font-size: .8rem; line-height: 1.45; }

/* QUIZ */
.quiz-shell { width: min(860px, calc(100% - 1.5rem)); margin: 1rem auto 3rem; }
.quiz-meta { display: flex; align-items: center; gap: .75rem; color: var(--muted); font-weight: 600; font-size: .85rem; }
.progress {
  height: 8px; border-radius: 999px; background: rgba(255,255,255,.06);
  border: 1px solid var(--line); overflow: hidden; margin-bottom: 1rem;
}
.progress i {
  display: block; height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--cyan), var(--lime));
  transition: width .35s ease;
}
.view--quiz {
  background: #f4f7fb;
}
.topbar--quiz {
  background: rgba(255, 255, 255, 0.92) !important;
  border-bottom-color: #d7dee8 !important;
  color: #0f172a;
}
.topbar--quiz .brand,
.topbar--quiz .quiz-meta { color: #0f172a; }
.topbar--quiz .btn--tiny {
  color: #0f172a; background: #eef2f7; border-color: #cbd5e1;
}
.quiz-shell .progress {
  background: #e2e8f0; border-color: #cbd5e1;
}

.quiz-stage {
  background: #ffffff;
  border: 1px solid #d7dee8;
  border-radius: var(--radius);
  padding: clamp(1.1rem, 3vw, 1.75rem);
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.08);
  min-height: 420px;
  animation: rise .4s ease both;
  color: #0f172a;
  position: relative;
}
.q-prompt {
  margin: 0 0 1rem;
  font-size: clamp(1.2rem, 2.8vw, 1.55rem);
  font-weight: 800;
  line-height: 1.35;
  color: #0b1220;
}
.q-hint { margin: -.35rem 0 1rem; color: #334155; font-size: .95rem; line-height: 1.45; }
.choices { display: grid; gap: .7rem; }
.quiz-stage .btn--choice {
  background: #f8fafc;
  border: 1.5px solid #94a3b8;
  color: #0f172a;
  font-weight: 700;
}
.quiz-stage .btn--choice:hover {
  border-color: #0891b2;
  background: #ecfeff;
  color: #0f172a;
}
.quiz-stage .btn--choice.is-correct {
  border-color: #16a34a !important;
  background: #dcfce7 !important;
  color: #14532d !important;
}
.quiz-stage .btn--choice.is-wrong {
  border-color: #dc2626 !important;
  background: #fee2e2 !important;
  color: #7f1d1d !important;
}
.quiz-stage .likert button {
  background: #f8fafc;
  border: 1.5px solid #94a3b8;
  color: #0f172a;
}
.quiz-stage .likert button:hover,
.quiz-stage .likert button.is-on {
  border-color: #0891b2;
  background: #ecfeff;
  color: #0e7490;
}
.quiz-stage .likert-labels { color: #475569; }
.likert--words {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: .45rem;
}
.likert--words button {
  display: grid; gap: .2rem; place-items: center;
  padding: .7rem .35rem; min-height: 4.2rem; font-size: .72rem; line-height: 1.15;
}
.likert--words button strong { font-size: 1.05rem; }
.q-card { display: grid; gap: .35rem; }
.q-actions { margin-top: 1.15rem; display: flex; flex-wrap: wrap; gap: .65rem; }
.quiz-stage .challenge__hud { color: #334155; }
.quiz-stage .challenge__hud strong { color: #0891b2; }
.quiz-stage .kicker { color: #0891b2; }
.quiz-stage .panel-title { color: #0f172a; }
.quiz-stage .panel-lead { color: #334155; }
.quiz-stage .studio {
  border-color: #67e8f9;
  background: #030712;
}
.likert {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: .5rem;
}
.likert button {
  border-radius: 14px; border: 1px solid var(--line); background: rgba(255,255,255,.04);
  color: var(--ink); padding: .85rem .4rem; font-weight: 700; cursor: pointer;
}
.likert button:hover, .likert button.is-on {
  border-color: rgba(34,211,238,.55); background: var(--cyan-dim); color: var(--cyan);
}
.likert-labels {
  display: flex; justify-content: space-between; color: var(--muted); font-size: .75rem; margin-top: .4rem;
}

.challenge {
  display: grid; gap: 1rem;
}
.challenge__hud {
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  font-size: .85rem; color: var(--muted);
}
.challenge__hud strong { color: var(--cyan); font-family: var(--display); }
.studio {
  position: relative; border-radius: 18px; overflow: hidden;
  border: 1px solid rgba(34,211,238,.35);
  background:
    linear-gradient(180deg, rgba(34,211,238,.08), transparent 40%),
    #030712;
  min-height: 280px; box-shadow: inset 0 0 60px rgba(34,211,238,.08);
}
.studio canvas { display: block; width: 100%; height: 280px; touch-action: none; cursor: crosshair; }
.studio__hint {
  position: absolute; left: 12px; bottom: 12px; right: 12px;
  pointer-events: none; font-size: .8rem; color: #cfe7f7;
  text-shadow: 0 2px 10px #000;
}

/* RESULT */
.result-panel { text-align: center; }
.result-score {
  font-family: var(--display); font-size: clamp(2.5rem, 8vw, 4.5rem); color: var(--cyan);
  margin: .5rem 0; text-shadow: 0 0 40px rgba(34,211,238,.35);
}
.result-bars { display: grid; gap: .65rem; text-align: left; margin: 1.5rem auto; max-width: 480px; }
.bar {
  display: grid; grid-template-columns: 110px 1fr 48px; gap: .6rem; align-items: center; font-size: .85rem;
}
.bar i {
  display: block; height: 10px; border-radius: 999px; background: rgba(255,255,255,.08); overflow: hidden;
}
.bar i b {
  display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--magenta), var(--cyan));
  transition: width 1s cubic-bezier(.2,.8,.2,1);
}
.result-actions { display: flex; flex-wrap: wrap; gap: .75rem; justify-content: center; margin-top: 1.5rem; }

/* WIN MODAL */
.win {
  position: fixed; inset: 0; z-index: 99990;
  display: grid; place-items: center; padding: 1rem;
  background: rgba(2, 6, 14, 0.72); backdrop-filter: blur(8px);
}
.win[hidden] { display: none !important; }
.win__fw { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.win__card {
  position: relative; z-index: 2; width: min(420px, 100%);
  background: linear-gradient(180deg, #122038, #0a1324);
  border: 1px solid rgba(34,211,238,.4); border-radius: 28px;
  padding: 1.75rem 1.4rem 1.5rem; text-align: center; box-shadow: var(--shadow);
  animation: pop .45s cubic-bezier(.2,1.2,.3,1) both;
}
.win__burst { position: absolute; inset: 0; pointer-events: none; overflow: hidden; border-radius: 28px; }
.win__kicker { margin: 0; color: var(--lime); font-family: var(--display); font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; }
.win__card h2 { margin: .5rem 0; font-family: var(--display); font-size: 1.5rem; }
.win__card p { color: var(--muted); margin: 0 0 1.25rem; }

@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes pop {
  from { opacity: 0; transform: scale(.86); }
  to { opacity: 1; transform: scale(1); }
}

/* Briefing + semáforo */
.brief {
  display: grid; gap: .85rem; animation: rise .4s ease both; color: #0f172a;
}
.brief .kicker { color: #0891b2; }
.brief .q-prompt { color: #0b1220; margin-bottom: .25rem; }
.brief__label {
  margin: 0 0 .35rem; font-size: .72rem; font-weight: 800; letter-spacing: .1em;
  text-transform: uppercase; color: #0e7490;
}
.brief__how, .brief__rules {
  padding: .9rem 1rem; border-radius: 16px; background: #f0f9ff; border: 1px solid #bae6fd;
}
.brief__hint {
  margin: 0; color: #0f172a; font-size: 1.05rem; font-weight: 650; line-height: 1.45;
}
.brief__tips {
  margin: 0; padding-left: 1.15rem; color: #1e293b; line-height: 1.55; font-size: .95rem;
}
.brief__tips li { margin: .35rem 0; font-weight: 600; }
.brief__next {
  margin: 0; padding: .75rem .9rem; border-radius: 14px;
  background: #ecfccb; border: 1px solid #bef264; color: #365314; font-weight: 700; font-size: .92rem;
}
.brief .btn { width: 100%; max-width: 320px; justify-self: start; }

.semaforo {
  position: absolute; inset: 0; z-index: 40;
  display: grid; place-items: center;
  background: rgba(15, 23, 42, 0.92);
  border-radius: var(--radius);
  backdrop-filter: blur(8px);
}
.semaforo__panel {
  display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap; justify-content: center;
  padding: 1.5rem;
}
.semaforo__box {
  width: 88px; padding: 14px 12px; border-radius: 28px;
  background: #111827; border: 3px solid #334155;
  display: grid; gap: 10px; box-shadow: 0 16px 40px rgba(0,0,0,.45);
}
.semaforo__light {
  width: 56px; height: 56px; border-radius: 50%;
  opacity: .22; filter: grayscale(.3);
  transition: opacity .2s ease, transform .2s ease, box-shadow .2s ease;
}
.semaforo__light--red { background: #ef4444; }
.semaforo__light--yellow { background: #facc15; }
.semaforo__light--green { background: #22c55e; }
.semaforo__light.is-on {
  opacity: 1; filter: none; transform: scale(1.08);
  box-shadow: 0 0 28px currentColor;
}
.semaforo__light--red.is-on { box-shadow: 0 0 32px #ef4444; }
.semaforo__light--yellow.is-on { box-shadow: 0 0 32px #facc15; }
.semaforo__light--green.is-on { box-shadow: 0 0 36px #22c55e; }
.semaforo__copy { text-align: center; min-width: 200px; }
.semaforo__num {
  margin: 0; font-family: var(--display);
  font-size: clamp(3rem, 10vw, 5rem); font-weight: 800; color: #fff;
}
.semaforo__num.is-pop { animation: pop .35s cubic-bezier(.2,1.2,.3,1); }
.semaforo__sub {
  margin: .35rem 0 0; font-family: var(--display); letter-spacing: .06em;
  text-transform: uppercase; color: #a3e635; font-size: .85rem;
}

.free-banner {
  margin: 1rem 0 0; padding: .75rem 1rem; border-radius: 14px;
  border: 1px solid rgba(34,211,238,.35); background: var(--cyan-dim);
  color: #cff9fe; font-size: .9rem; font-weight: 600;
}
.result-badge {
  display: inline-block; margin: .75rem 0 0; padding: .35rem .75rem; border-radius: 999px;
  font-size: .75rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
}
.result-badge--free { background: rgba(163,230,53,.15); color: var(--lime); border: 1px solid rgba(163,230,53,.4); }
.result-badge--paid { background: rgba(34,211,238,.15); color: var(--cyan); border: 1px solid rgba(34,211,238,.4); }
.result-score-label { margin: 0; color: var(--muted); font-size: .9rem; }
.result-diag {
  margin: .65rem auto 0; max-width: 36rem; font-size: .95rem; font-weight: 650; line-height: 1.45;
  padding: .75rem 1rem; border-radius: 14px; background: #ecfeff; border: 1px solid #a5f3fc; color: #0e7490;
}
.result-dims-title {
  margin: 0 0 .75rem; font-size: .95rem; font-weight: 800; color: #0f172a; text-align: left;
}
.result-tips {
  text-align: left; margin: 1.5rem auto; max-width: 520px;
  padding: 1rem 1.1rem; border-radius: 16px; border: 1px solid var(--line); background: rgba(255,255,255,.03);
}
.result-tips h3 { margin: 0 0 .5rem; font-size: 1rem; }
.result-tips ul { margin: 0; padding-left: 1.1rem; color: var(--muted); line-height: 1.5; }
.result-link {
  color: var(--ink) !important; border: 1px solid var(--line); text-decoration: none;
  display: inline-flex; align-items: center; justify-content: center;
}

/* Paywall */
.pay {
  position: fixed; inset: 0; z-index: 99995;
  display: grid; place-items: center; padding: 1rem;
  background: rgba(2, 6, 14, 0.78); backdrop-filter: blur(10px);
}
.pay[hidden] { display: none !important; }
.pay__card {
  width: min(440px, 100%); background: linear-gradient(180deg, #122038, #0a1324);
  border: 1px solid rgba(34,211,238,.4); border-radius: 28px;
  padding: 1.6rem 1.35rem; box-shadow: var(--shadow); animation: pop .4s ease both;
}
.pay__label { display: grid; gap: .4rem; margin: 1.1rem 0 .5rem; font-size: .8rem; color: var(--muted); }
.pay__label input {
  border-radius: 14px; border: 1px solid var(--line); background: rgba(0,0,0,.28);
  color: var(--ink); padding: .85rem 1rem; font: inherit;
}
.pay__err { min-height: 1.2em; color: #fca5a5; font-size: .85rem; margin: .25rem 0 .75rem; }
.pay__actions { display: flex; flex-wrap: wrap; gap: .65rem; }

/* Courses catalog */
.course-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem; margin-top: 1.25rem;
}
.course-card {
  border-radius: 20px; padding: 1.2rem; border: 1px solid var(--line);
  background: linear-gradient(160deg, rgba(255,255,255,.05), rgba(255,255,255,.02));
  display: grid; gap: .55rem; align-content: start;
}
.course-card h3 { margin: 0; font-family: var(--display); font-size: 1.05rem; letter-spacing: .03em; }
.course-card p { margin: 0; color: var(--muted); font-size: .9rem; line-height: 1.45; }
.course-card ul { margin: 0; padding-left: 1.1rem; color: #c9d7e8; font-size: .85rem; line-height: 1.45; }
.course-card .btn { margin-top: .35rem; justify-self: start; text-decoration: none; }

@media (max-width: 900px) {
  .quiz-shell { width: min(100%, calc(100% - 1rem)); margin: .75rem auto 2.5rem; }
  .quiz-stage {
    min-height: min(70dvh, 520px);
    padding: 1rem 1rem 1.25rem;
    border-radius: 18px;
  }
  .topbar--quiz {
    flex-wrap: wrap;
    gap: .5rem .75rem;
    padding: .65rem .85rem;
  }
  .topbar--quiz .quiz-meta {
    width: 100%;
    order: 3;
    font-size: .78rem;
  }
  .q-prompt { font-size: clamp(1.1rem, 4.6vw, 1.4rem); }
  .studio { min-height: 220px; }
  .studio canvas { height: min(42vw, 240px); min-height: 200px; }
  .semaforo__panel { flex-direction: column; gap: 1rem; padding: 1rem; }
  .semaforo__box { width: 76px; padding: 12px 10px; }
  .semaforo__light { width: 48px; height: 48px; }
  .test-grid { grid-template-columns: 1fr; }
  .cta-row { width: 100%; }
  .cta-row .btn { flex: 1 1 auto; justify-content: center; text-align: center; }
}

@media (max-width: 640px) {
  .likert--words { grid-template-columns: 1fr; gap: .5rem; }
  .likert--words button {
    grid-template-columns: 2.2rem 1fr;
    justify-items: start;
    text-align: left;
    min-height: 3.1rem;
    padding: .8rem .95rem;
    font-size: .92rem;
    gap: .65rem;
  }
  .likert { grid-template-columns: 1fr; }
  .likert button { padding: .85rem 1rem; font-size: .95rem; }
  .quiz-stage .btn--choice {
    padding: .95rem 1rem;
    font-size: .95rem;
    border-radius: 14px;
    white-space: normal;
  }
  .studio canvas { height: 210px; }
  .challenge__hud { font-size: .8rem; }
  .hero-copy { padding-bottom: 2.5rem; }
  .brief__how, .brief__rules { padding: .8rem .85rem; }
  .brief__hint { font-size: .98rem; }
  .panel { padding: 1.1rem 1rem 1.4rem; margin: .75rem; width: auto; }
  .name-row { grid-template-columns: 1fr; }
  .pay__card { padding: 1.25rem 1rem; border-radius: 22px; }
  .pay__actions .btn { width: 100%; justify-content: center; }
}

@media (max-width: 380px) {
  .quiz-stage { padding: .85rem; min-height: 0; }
  .btn { padding: .8rem 1.05rem; font-size: .9rem; }
  .studio canvas { height: 180px; }
}
