/*
 * Identidad visual de sebastian.stlabs.ar: Geist Mono (titulares, 800) + Geist (texto),
 * acento menta #00ffb2, fondo casi negro #05080B (hero) y gris claro #F5F6F8 (secciones),
 * cuadrícula sutil, resplandor menta y botones píldora menta con borde negro.
 * Estructura y comportamiento heredados del formulario de Close Predict: una pregunta por
 * pantalla, contador "01 DE 18", opciones con letra, fondos intercalados y transición de círculo.
 */

:root {
  --mono: "Geist Mono", "GeistMono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --sans: "Geist", "GeistSans", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out: cubic-bezier(0.2, 0.7, 0.2, 1);
  --gutter: clamp(16px, 4vw, 56px);
  --mint: #00ffb2;
  --mint-hover: #00e09c;
  --black: #000000;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
}

/* ---------- Temas: claro, oscuro y verde. Claro y oscuro llevan degradé con manchas menta;
   el verde es menta pleno con texto oscuro. Se alternan en cada pregunta. ---------- */

body,
body[data-theme="light"] {
  --ink: #0f1419;
  --muted: #5b6570;
  --accent-ink: #007a5e; /* menta oscurecido: legible como texto sobre claro */
  --line: rgba(15, 20, 25, 0.12);
  --line-strong: rgba(15, 20, 25, 0.22);
  --option-bg: #ffffff;
  --option-hover: rgba(0, 255, 178, 0.06);
  --sel-bg: rgba(0, 255, 178, 0.14);
  --sel-line: #00c896;
  --field-bg: #ffffff;
  --field-ink: #0f1419;
  --shadow: 0 1px 2px rgba(15, 20, 25, 0.04);
  --shadow-sel: 0 8px 24px rgba(0, 160, 122, 0.12);
  --danger: #c0262d;
  --ghost-bg: #ffffff;
  --focus: #007a5e;
  --bg: linear-gradient(160deg, #ffffff 0%, #f5f6f8 50%, #e6f3ef 100%);
  --blob: rgba(0, 255, 178, 0.38);
  --grid-line: rgba(0, 180, 125, 0.42); /* verde, visible sobre blanco */
  --glow: rgba(0, 255, 178, 0.16);
  --grain-opacity: 0.035;
}

body[data-theme="dark"] {
  --ink: #f1f6f7;
  --muted: rgba(223, 235, 238, 0.68);
  --accent-ink: #00ffb2;
  --line: rgba(255, 255, 255, 0.13);
  --line-strong: rgba(255, 255, 255, 0.24);
  --option-bg: rgba(255, 255, 255, 0.035);
  --option-hover: rgba(0, 255, 178, 0.06);
  --sel-bg: rgba(0, 255, 178, 0.1);
  --sel-line: #00ffb2;
  --field-bg: rgba(255, 255, 255, 0.045);
  --field-ink: #f1f6f7;
  --shadow: none;
  --shadow-sel: 0 8px 28px rgba(0, 255, 178, 0.1);
  --danger: #ff8a8f;
  --ghost-bg: rgba(255, 255, 255, 0.06);
  --focus: #00ffb2;
  --bg: radial-gradient(ellipse 90% 65% at 50% 0%, #0b1519 0%, transparent 62%),
    linear-gradient(170deg, #05080b 0%, #071013 55%, #0a1a18 100%);
  --blob: rgba(0, 255, 178, 0.26);
  --grid-line: rgba(0, 255, 178, 0.32); /* verde sobre negro */
  --glow: rgba(0, 255, 178, 0.13);
  --grain-opacity: 0.07;
}

/* Verde pleno: fondo menta con texto casi negro; lo seleccionado va en negro. */
body[data-theme="mint"] {
  --ink: #04120e;
  --muted: rgba(4, 18, 14, 0.66);
  --accent-ink: #04120e;
  --line: rgba(4, 18, 14, 0.2);
  --line-strong: rgba(4, 18, 14, 0.34);
  --option-bg: rgba(255, 255, 255, 0.4);
  --option-hover: rgba(255, 255, 255, 0.62);
  --sel-bg: #05080b;
  --sel-line: #05080b;
  --field-bg: rgba(255, 255, 255, 0.55);
  --field-ink: #04120e;
  --shadow: none;
  --shadow-sel: 0 8px 24px rgba(4, 18, 14, 0.22);
  --danger: #8a0012;
  --ghost-bg: rgba(255, 255, 255, 0.3);
  --focus: #04120e;
  --bg: linear-gradient(160deg, #3dffc6 0%, #00ffb2 50%, #00e6a0 100%);
  --blob: rgba(255, 255, 255, 0.42);
  --grid-line: rgba(4, 18, 14, 0.12); /* sutil, integrada al verde */
  --glow: rgba(255, 255, 255, 0.3);
  --grain-opacity: 0.06;
  background-color: #00ffb2;
}

body[data-theme="mint"] .opt[aria-checked="true"],
body[data-theme="mint"] .mopt[aria-checked="true"] {
  border-color: #05080b;
  background: #05080b;
  color: #ffffff;
}

body[data-theme="mint"] .opt[aria-checked="true"] .opt-check {
  border-color: var(--mint);
  background: var(--mint);
  color: #000;
}

body[data-theme="mint"] .mopt[aria-checked="true"] {
  color: var(--mint);
}

body[data-theme="mint"] .btn-primary {
  border-color: #05080b;
  background: #05080b;
  color: var(--mint);
  box-shadow: 0 6px 18px rgba(4, 18, 14, 0.25);
}

body[data-theme="mint"] .btn-primary:hover:not(:disabled) {
  background: #000;
  box-shadow: 0 10px 26px rgba(4, 18, 14, 0.3);
}

body[data-theme="mint"] .btn-ghost:hover:not(:disabled) {
  border-color: #05080b;
  color: #05080b;
}

body[data-theme="mint"] .input:focus {
  border-color: #05080b;
  box-shadow: 0 0 0 3px rgba(4, 18, 14, 0.15);
}

body[data-theme="mint"] .eyebrow-line,
body[data-theme="mint"] .intro .question em {
  color: #05080b;
}

body[data-theme="mint"] .eyebrow-line::before {
  background: linear-gradient(90deg, transparent, rgba(4, 18, 14, 0.55));
}

body[data-theme="mint"] .eyebrow-line::after {
  background: linear-gradient(90deg, rgba(4, 18, 14, 0.55), transparent);
}

body[data-theme="mint"] .progress-fill {
  background: #05080b;
  box-shadow: none;
}

body[data-theme="mint"] .lang button[aria-pressed="true"] {
  text-decoration-color: #05080b;
}

body[data-theme="mint"] .done-foot {
  color: #05080b;
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  grid-template-rows: auto 1fr;
  background: var(--bg);
  background-color: #05080b;
  background-attachment: fixed;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body[data-theme="light"] {
  background-color: #f5f6f8;
}

::selection {
  background: var(--mint);
  color: #000;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
  text-transform: inherit;
}

/* Mayúsculas solo en los títulos principales (preguntas, portada, cierre) y en los botones. */
.question,
.btn {
  text-transform: uppercase;
}

button {
  cursor: pointer;
}

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}

/* ---------- Texturas de fondo ---------- */

.top,
.stage {
  position: relative;
  z-index: 1;
}

.top {
  grid-row: 1;
}

.stage {
  grid-row: 2;
}

.tex {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  animation: tex-in 600ms ease both;
}

@keyframes tex-in {
  from {
    opacity: 0;
  }
}

/* Cuadrícula de 56 px como el hero de la web, que se desvanece desde una esquina. */
.tex-grid {
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: var(--cell, 56px) var(--cell, 56px);
  background-position: var(--gx, 100%) var(--gy, 0%);
  -webkit-mask-image: radial-gradient(
    circle at var(--gx, 100%) var(--gy, 0%),
    #000 0%,
    #000 calc(var(--gr, 40vmax) * 0.5),
    transparent var(--gr, 40vmax)
  );
  mask-image: radial-gradient(
    circle at var(--gx, 100%) var(--gy, 0%),
    #000 0%,
    #000 calc(var(--gr, 40vmax) * 0.5),
    transparent var(--gr, 40vmax)
  );
}

/* Resplandor menta que late suave desde la esquina opuesta (como .hero-glow). */
.tex-glow {
  background: radial-gradient(
    ellipse var(--pr, 55vmax) calc(var(--pr, 55vmax) * 0.7) at var(--px, 0%) var(--py, 100%),
    var(--glow) 0%,
    transparent 70%
  );
  animation:
    tex-in 600ms ease both,
    glow-pulse 6s ease-in-out 600ms infinite;
}

@keyframes glow-pulse {
  50% {
    opacity: 0.6;
  }
}

/* Manchas que se mueven todo el tiempo: menta sobre claro y oscuro, blancas sobre verde. */
.tex-blobs {
  overflow: hidden;
}

.tex-blobs span {
  position: absolute;
  width: 48vmax;
  height: 48vmax;
  border-radius: 50%;
  background: radial-gradient(circle, var(--blob) 0%, transparent 66%);
  will-change: transform;
  animation: blob-a 19s ease-in-out infinite alternate;
}

.tex-blobs span:nth-child(1) { top: -14%; left: -10%; }
.tex-blobs span:nth-child(2) { top: 8%; right: -16%; width: 40vmax; height: 40vmax; animation-name: blob-b; animation-duration: 23s; }
.tex-blobs span:nth-child(3) { bottom: -22%; left: 28%; width: 54vmax; height: 54vmax; animation-name: blob-c; animation-duration: 27s; }
.tex-blobs span:nth-child(4) { top: 46%; left: -14%; width: 32vmax; height: 32vmax; animation-name: blob-b; animation-duration: 17s; animation-direction: alternate-reverse; }

@keyframes blob-a {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(22vw, 14vh) scale(1.15); }
  100% { transform: translate(8vw, 34vh) scale(0.9); }
}

@keyframes blob-b {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-24vw, 20vh) scale(0.85); }
  100% { transform: translate(-10vw, -12vh) scale(1.2); }
}

@keyframes blob-c {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-18vw, -26vh) scale(1.1); }
  100% { transform: translate(16vw, -10vh) scale(0.95); }
}

/* Grano muy fino en toda la pantalla. */
.tex-grain {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.5 0 0 0 0 0.5 0 0 0 0 0.5 0 0 0 1 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
  background-size: 220px 220px;
  mix-blend-mode: overlay;
  opacity: var(--grain-opacity);
}

/* Portada: cuadrícula centrada como el hero, resplandor arriba. */
body[data-tex="0"] .tex-grid {
  background-position: 50% 0;
  -webkit-mask-image: radial-gradient(ellipse 75% 65% at 50% 40%, #000, transparent);
  mask-image: radial-gradient(ellipse 75% 65% at 50% 40%, #000, transparent);
}

/* La posición y el tamaño de la cuadrícula los define app.js en cada pantalla
   (variables --gx, --gy, --cell, --gr, --px, --py, --pr). */

/* ---------- Transición: círculo que crece desde el botón ---------- */

.wipe {
  position: fixed;
  inset: 0;
  z-index: 40;
  pointer-events: none;
  will-change: clip-path;
}

/* Transición "código": lienzo con cuadraditos y caracteres que se escriben. */
.wipe-pixels {
  position: fixed;
  inset: 0;
  z-index: 40;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
}

/* Radio animable de la burbuja con borde difuso. */
@property --r {
  syntax: "<length>";
  inherits: false;
  initial-value: 0px;
}

/* El centro es sólido y el último 55 % del radio se desvanece: no se ve el borde del círculo. */
.wipe-soft {
  will-change: auto;
  -webkit-mask-image: radial-gradient(
    circle at var(--x, 50%) var(--y, 50%),
    #000 0,
    #000 calc(var(--r) * 0.45),
    rgba(0, 0, 0, 0.6) calc(var(--r) * 0.7),
    transparent var(--r)
  );
  mask-image: radial-gradient(
    circle at var(--x, 50%) var(--y, 50%),
    #000 0,
    #000 calc(var(--r) * 0.45),
    rgba(0, 0, 0, 0.6) calc(var(--r) * 0.7),
    transparent var(--r)
  );
}

/* ---------- Progreso ---------- */

.progress {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  height: 3px;
  background: rgba(0, 255, 178, 0.1);
}

.progress-fill {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #00c896, var(--mint));
  box-shadow: 0 0 12px rgba(0, 255, 178, 0.55);
  transition: width 360ms ease;
}

/* ---------- Cabecera (como el nav de la web) ---------- */

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px var(--gutter);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-family: var(--mono);
  font-weight: 800;
  font-size: 1.05rem;
}

.brand-icon {
  display: flex;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  border: 1px solid #000;
  border-radius: 10px;
  background: #000;
  color: var(--mint);
  transition: border-color 200ms var(--ease);
}

body[data-theme="dark"] .brand-icon {
  border-color: rgba(0, 255, 178, 0.35);
}

.brand-sub {
  padding-left: 10px;
  border-left: 1px solid var(--line-strong);
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.top-right {
  display: flex;
  align-items: center;
  gap: 18px;
}

.lang {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.lang button {
  padding: 6px 4px;
  border: 0;
  background: none;
  color: var(--muted);
  letter-spacing: inherit;
  transition: color 160ms ease;
}

.lang button:hover {
  color: var(--ink);
}

.lang button[aria-pressed="true"] {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--mint);
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
}







/* ---------- Escena ---------- */

.stage {
  display: grid;
  place-items: center;
  padding: 16px 20px 48px;
}

.screen {
  width: min(100%, 860px);
}

.screen:focus {
  outline: none;
}

/* Entrada escalonada: cada bloque (y cada opción o fila) aparece uno tras otro. */
.screen > *,
.opt,
.mrow {
  animation: rise 320ms var(--ease-out) both;
  animation-delay: calc(var(--i, 0) * 45ms);
}

.screen > .options-wrap,
.screen > .matrix {
  animation: none;
}

.screen.from-top > *,
.screen.from-top .opt,
.screen.from-top .mrow {
  animation-name: drop;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
}

@keyframes drop {
  from {
    opacity: 0;
    transform: translateY(-12px);
  }
}

/* Contador "01 DE 18 · Parte 1 de 4": el número actual en menta, el resto apagado. */
.meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 12px;
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--muted);
  text-transform: uppercase;
}

.meta-section {
  color: var(--accent-ink);
  letter-spacing: 0.08em;
}

.question {
  max-width: 32ch;
  margin: 14px 0 12px;
  font-family: var(--mono);
  font-size: clamp(1.5rem, 1rem + 1.7vw, 2.35rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.2;
  color: var(--ink);
  outline: none;
  text-wrap: balance;
}

body[data-theme="dark"] .question {
  text-shadow: 0 2px 24px rgba(5, 8, 11, 0.9);
}

.q-hint {
  max-width: 62ch;
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.6;
}



.screen-question .q-hint + .field,
.screen-question .question + .field,
.screen-question .question + .options-wrap,
.screen-question .question + .matrix {
  margin-top: 22px;
}

/* ---------- Portada y cierre: centrados, como el hero ---------- */

.intro,
.done {
  width: min(100%, 880px);
  text-align: center;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 22px;
  padding: 7px 14px;
  border: 1px solid rgba(0, 255, 178, 0.3);
  border-radius: 999px;
  background: rgba(0, 255, 178, 0.08);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

/* Etiqueta de portada y cierre: texto centrado sobre una línea horizontal larga. */
.eyebrow-line {
  display: flex;
  align-items: center;
  gap: 18px;
  width: min(100%, 720px);
  margin: 0 auto 26px;
  color: var(--mint);
  font-family: var(--mono);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  white-space: nowrap;
}

.eyebrow-line::before,
.eyebrow-line::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0, 255, 178, 0.6));
}

.eyebrow-line::after {
  background: linear-gradient(90deg, rgba(0, 255, 178, 0.6), transparent);
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 0 4px rgba(0, 255, 178, 0.18);
}

.intro .question,
.done .question {
  max-width: none;
  margin: 0 auto;
  font-size: clamp(2.1rem, 1rem + 4.6vw, 4rem);
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.intro .question em {
  font-style: normal;
  color: var(--mint);
}

.intro-sub {
  margin: 22px auto 0;
  color: var(--ink);
  font-size: clamp(1.08rem, 1.9vw, 1.3rem);
  font-weight: 600;
}

.lead {
  max-width: 600px;
  margin: 14px auto 0;
  color: var(--muted);
  font-size: clamp(0.98rem, 1.6vw, 1.08rem);
  line-height: 1.7;
}

.lead p {
  margin: 0 0 10px;
}

.intro .actions,
.done .actions {
  justify-content: center;
  margin-top: 30px;
}


  margin-top: 2px;
}

.done .lead {
  margin-top: 22px;
}

.done-foot {
  margin: 18px 0 0;
  color: var(--mint);
  font-family: var(--mono);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

/* ---------- Campos ---------- */

.field {
  max-width: 560px;
}

.field.wide {
  max-width: 720px;
}

.stack {
  display: grid;
  gap: 8px;
}

.label {
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
}

.label:first-child {
  margin-top: 0;
}

.input,
.textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--field-bg);
  color: var(--field-ink);
  padding: 15px 17px;
  font-size: 1rem;
  box-shadow: var(--shadow);
  outline-offset: 3px;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease;
}

.input::placeholder,
.textarea::placeholder {
  color: var(--muted);
  opacity: 0.75;
}

.input:focus,
.textarea:focus {
  border-color: var(--sel-line);
  outline: none;
  box-shadow: 0 0 0 3px rgba(0, 255, 178, 0.22);
}

.textarea {
  display: block;
  resize: none;
  min-height: 8.5em;
  max-height: 50vh;
  line-height: 1.6;
}

/* ---------- Opciones (con letra, como Close Predict; estética de las cards de la web) ---------- */

.options {
  display: grid;
  gap: 8px;
}

.options-2col {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.opt {
  display: grid;
  grid-template-columns: 1fr 24px;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 56px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  background: var(--option-bg);
  box-shadow: var(--shadow);
  color: var(--ink);
  text-align: left;
  transition:
    border-color 160ms ease,
    background 160ms ease,
    transform 160ms ease,
    box-shadow 160ms ease;
}

.opt:hover {
  border-color: var(--sel-line);
  background: var(--option-hover);
  transform: translateX(3px);
}

.opt[aria-checked="true"] {
  border-color: var(--sel-line);
  background: var(--sel-bg);
  box-shadow: var(--shadow-sel);
}

.opt-copy {
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.3;
}

.opt-check {
  display: grid;
  width: 24px;
  height: 24px;
  font-family: var(--mono);
  font-size: 0.74rem;
  font-weight: 800;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  place-items: center;
  color: transparent;
  transition:
    background 160ms ease,
    border-color 160ms ease;
}

.opt[aria-checked="true"] .opt-check {
  border-color: #000;
  background: var(--mint);
  color: #000;
}

/* Lista compacta (tecnologías): píldoras en fila que se acomodan solas. */
.options-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.options-chips .opt {
  width: auto;
  min-height: 44px;
  grid-template-columns: auto 20px;
  gap: 10px;
  padding: 8px 12px 8px 16px;
  border-radius: 999px;
}

.options-chips .opt:hover {
  transform: translateY(-1px);
}

.options-chips .opt-check {
  width: 20px;
  height: 20px;
}

/* Pregunta con varias partes: cada parte con su título chico y sus opciones. */
.group {
  display: grid;
  gap: 22px;
}

.part {
  display: grid;
  gap: 10px;
  padding: 2px 0 2px 14px;
  border-left: 2px solid var(--line);
  transition: border-color 200ms ease;
}

.part[hidden] {
  display: none;
}

.part.missing {
  border-left-color: var(--danger);
}

.part-label {
  margin: 0;
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 700;
}

.part .input.note {
  max-width: 560px;
}

.part .other {
  margin-top: 0;
}

.note-wrap {
  max-width: 560px;
  margin-top: 12px;
}

.input.note {
  padding: 12px 15px;
  font-size: 0.92rem;
}

.opt-exclusive {
  border-style: dashed;
}

.other {
  max-width: 560px;
  margin-top: 10px;
}

.other[hidden] {
  display: none;
}

/* ---------- Matriz: una fila por tema, opciones de texto ---------- */

.matrix {
  display: grid;
  gap: 8px;
}

.mrow {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  align-items: center;
  gap: 10px 14px;
  padding: 10px 12px 10px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--option-bg);
  box-shadow: var(--shadow);
  text-align: left;
  transition: border-color 200ms ease;
}

.mrow.done {
  border-color: rgba(0, 255, 178, 0.45);
}

.mrow.missing {
  border-color: var(--danger);
}

/* Escala con textos largos (nivel de habilidades): tema arriba, opciones debajo. */
.matrix.stacked .mrow {
  grid-template-columns: 1fr;
}

.matrix.stacked .mopt {
  min-height: 52px;
  font-size: 0.76rem;
}

.mrow-label {
  font-size: 0.94rem;
  font-weight: 600;
  line-height: 1.3;
}

.mrow-opts {
  display: grid;
  grid-template-columns: repeat(var(--n, 4), minmax(0, 1fr));
  gap: 6px;
}

.mopt {
  min-height: 40px;
  padding: 8px 6px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: transparent;
  color: var(--ink);
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.2;
  transition:
    background 160ms ease,
    border-color 160ms ease;
}

.mopt:hover {
  border-color: var(--sel-line);
  background: var(--option-hover);
}

.mopt[aria-checked="true"] {
  border-color: #000;
  background: var(--mint);
  color: #000;
}

/* ---------- Botones (como la web: píldora menta con borde negro) ---------- */

.actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 20px;
}

.actions-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px 16px;
}

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 48px;
  overflow: hidden;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 13px 26px;
  font-size: 0.95rem;
  font-weight: 700;
  transition:
    transform 200ms var(--ease),
    box-shadow 200ms var(--ease),
    background 200ms var(--ease),
    border-color 200ms var(--ease),
    color 200ms var(--ease);
}

.btn .icon {
  display: inline-flex;
}

.btn:disabled {
  cursor: not-allowed;
  opacity: 0.4;
}

.btn-primary {
  min-width: 190px;
  border-color: #000;
  background: var(--mint);
  color: #000;
  box-shadow: 0 2px 12px rgba(0, 255, 178, 0.25);
}

/* Brillo que cruza el botón al pasar el cursor (igual que la web). */
.btn-primary::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  transform: translateX(-100%);
  transition: transform 550ms var(--ease);
}

.btn-primary:hover:not(:disabled)::before {
  transform: translateX(100%);
}

.btn-primary:hover:not(:disabled) {
  background: var(--mint-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 255, 178, 0.28);
}

.btn-ghost {
  border-color: var(--line-strong);
  background: var(--ghost-bg);
  color: var(--ink);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.btn-ghost:hover:not(:disabled) {
  border-color: rgba(0, 255, 178, 0.5);
  color: var(--accent-ink);
  transform: translateY(-2px);
}

.btn-link {
  min-height: 40px;
  padding: 8px 4px;
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: var(--line-strong);
  text-underline-offset: 5px;
}

.btn-link:hover {
  color: var(--ink);
  text-decoration-color: var(--mint);
}

.error {
  min-height: 1.3em;
  margin: 12px 0 0;
  color: var(--danger);
  font-size: 0.84rem;
  font-weight: 500;
}

/* ---------- Varios ---------- */

.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.noscript {
  max-width: 640px;
  margin: 0 auto;
  font-family: var(--mono);
  font-size: 1.3rem;
  font-weight: 700;
}

@media (max-width: 760px) {
  .options-2col {
    grid-template-columns: 1fr;
  }
  .mrow {
    grid-template-columns: 1fr;
  }
  .mrow-opts {
    display: flex;
    flex-wrap: wrap;
  }
  .mopt {
    flex: 1 1 auto;
    padding: 8px 10px;
  }
}

@media (max-width: 620px) {
  .brand-sub {
    display: none;
  }
  .top-right {
    gap: 12px;
  }

  .stage {
    place-items: start center;
    padding: 4vh 16px 28px;
  }
  .meta-section {
    flex-basis: 100%;
    padding-left: 0;
    border-left: 0;
  }
  .question {
    margin: 10px 0 10px;
    font-size: clamp(1.35rem, 6.2vw, 1.75rem);
    line-height: 1.25;
    letter-spacing: -0.02em;
  }
  .intro .question,
  .done .question {
    font-size: clamp(1.9rem, 9vw, 2.6rem);
  }
  .q-hint {
    font-size: 0.94rem;
  }
  .options {
    gap: 7px;
  }
  .opt {
    min-height: 52px;
    padding: 9px 12px;
  }
  .opt-copy {
    font-size: 0.86rem;
  }
  .btn {
    min-height: 46px;
    padding: 11px 18px;
    font-size: 0.88rem;
  }
  .btn-primary {
    min-width: unset;
  }
  .intro .actions {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .intro .btn {
    width: 100%;
  }
  .actions {
    align-items: flex-end;
  }
  .actions-right {
    flex-direction: column-reverse;
    align-items: flex-end;
    gap: 4px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
