/* SPIDER PC Telar — sistema visual compartido (candidato y consola).
   Concepto: un telar. Índigo de tinte natural, hilo crudo y un solo hilo de oro
   (la lanzadera) que marca el avance. Sin fuentes externas: CSP 'self'. */

:root {
  --fondo: #151c3f;
  --superficie: #1e2650;
  --superficie-2: #27305f;
  --linea: #343e74;
  --texto: #e8e3d6;
  --texto-2: #a9aecb;
  --oro: #e2a93b;
  --oro-texto: #1a1f3f;
  --granza: #e0705c;
  --bien: #7fb59a;
  --sombra: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 12px 30px -18px rgba(5, 8, 25, 0.9);
  --serif: "Palatino Linotype", Palatino, "Book Antiqua", "Iowan Old Style", Georgia, serif;
  --sans: system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --radio-s: 6px;
  --radio-m: 12px;
  color-scheme: dark;
}

@media (prefers-color-scheme: light) {
  :root:not([data-tema="oscuro"]) {
    --fondo: #eef0f6;
    --superficie: #ffffff;
    --superficie-2: #f4f5fa;
    --linea: #d5d9e8;
    --texto: #1a2147;
    --texto-2: #535a7e;
    --oro: #a8700f;
    --oro-texto: #ffffff;
    --granza: #b3412e;
    --bien: #2f7a57;
    --sombra: 0 1px 2px rgba(26, 33, 71, 0.06), 0 10px 24px -16px rgba(26, 33, 71, 0.35);
    color-scheme: light;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--fondo);
  color: var(--texto);
  font: 16px/1.55 var(--sans);
  min-height: 100vh;
}
/* Trama de fondo: hilos de urdimbre muy tenues. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    repeating-linear-gradient(90deg, rgba(232, 227, 214, 0.035) 0 1px, transparent 1px 7px),
    repeating-linear-gradient(0deg, rgba(232, 227, 214, 0.02) 0 1px, transparent 1px 9px);
  z-index: 0;
}
main, header, footer { position: relative; z-index: 1; }

h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.2; margin: 0 0 0.5em; letter-spacing: 0.005em; }
h1 { font-size: clamp(1.7rem, 4.5vw, 2.4rem); }
h2 { font-size: 1.35rem; }
h3 { font-size: 1.1rem; }
p { margin: 0 0 0.9em; }
a { color: var(--oro); }
.secundario { color: var(--texto-2); }
.oculto { display: none !important; }

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

/* -- botones ------------------------------------------------------------ */
button, .boton {
  font: inherit;
  font-weight: 600;
  border-radius: var(--radio-s);
  border: 1px solid var(--linea);
  background: var(--superficie-2);
  color: var(--texto);
  padding: 0.7em 1.15em;
  min-height: 48px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
}
button:hover:not(:disabled) { border-color: var(--texto-2); }
button:disabled { opacity: 0.45; cursor: not-allowed; }
.primario { background: var(--oro); border-color: var(--oro); color: var(--oro-texto); }
.primario:hover:not(:disabled) { filter: brightness(1.06); border-color: var(--oro); }
.discreto { background: transparent; }

/* -- formularios ---------------------------------------------------------- */
label { display: block; font-weight: 600; margin: 0.9em 0 0.3em; }
input:not([type]), input[type="text"], input[type="date"], input[type="email"], input[type="password"], input[type="number"], input[type="tel"], select, textarea {
  font: inherit;
  width: 100%;
  color: var(--texto);
  background: var(--superficie-2);
  border: 1px solid var(--linea);
  border-radius: var(--radio-s);
  padding: 0.65em 0.8em;
  min-height: 46px;
}
textarea { min-height: 9em; resize: vertical; line-height: 1.5; }
.casilla { display: flex; gap: 0.7em; align-items: flex-start; font-weight: 400; margin: 0.8em 0; cursor: pointer; }
.casilla input { width: 22px; height: 22px; margin-top: 0.15em; accent-color: var(--oro); flex: none; }

.aviso { border-left: 3px solid var(--granza); padding: 0.6em 0.9em; background: var(--superficie); border-radius: 0 var(--radio-s) var(--radio-s) 0; }
.nota { border-left: 3px solid var(--oro); padding: 0.6em 0.9em; background: var(--superficie); border-radius: 0 var(--radio-s) var(--radio-s) 0; }
