/* ============================================================
 * theme.css — TEMA de la guía de NÚMEROS COMPLEJOS (capa LIBRE).
 * Leyenda de color, dibujo del plano de Argand, plano interactivo y
 * rueda de potencias de i. Andamiaje en assets/guia-components.css;
 * variables de marca --guia-*. Los hex de aquí son del tema (SVG/plano).
 * ============================================================ */

/* ===== Leyenda de color (real / imaginaria / vector) ===== */
.nc-legend { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; background: #fff; border: 1.5px solid var(--guia-line); border-radius: 12px; padding: 10px 14px; font-size: 15px; font-weight: 600; }
.nc-legend .it { display: flex; gap: 8px; align-items: center; }
.nc-legend .it b { font-weight: 800; }
.nc-legend .sw { width: 17px; height: 17px; border-radius: 4px; flex: 0 0 auto; border: 2px solid var(--guia-ink); }
.nc-legend .sw.real { background: var(--guia-orange); }
.nc-legend .sw.imag { background: var(--guia-navy); }
.nc-legend .sw.vec { background: var(--guia-green-deep); border-radius: 50%; }

/* ===== Dibujo estático del plano (SVG) ===== */
.nc-visual { display: flex; flex-direction: column; align-items: center; gap: 6px; margin: 2px 0; }
.nc-visual .vcap { font-size: 15px; font-weight: 700; color: var(--guia-muted); text-align: center; max-width: 44ch; }
.nc-plane-svg { width: 100%; max-width: 360px; height: auto; display: block; }

/* ===== Plano de Argand interactivo ===== */
.nc-argand { display: grid; gap: 14px; padding: 16px; border: 2px solid var(--guia-ink); border-radius: 14px; background: var(--guia-cream); }
.nc-lab-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.nc-lab-flag { font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: #fff; background: var(--guia-orange); border: 2px solid var(--guia-ink); border-radius: 999px; padding: 3px 11px; white-space: nowrap; }
.nc-lab-inst { font-size: 15px; font-weight: 700; color: var(--guia-deep); }
.nc-plane-stage { text-align: center; }
.nc-plane-stage .nc-plane-svg { display: inline-block; margin: 0 auto; max-width: 100%; }
.nc-hit { cursor: pointer; transition: fill .1s; }
.nc-hit:hover { fill: rgba(245, 130, 31, .18); }

/* Lectura viva (módulo, argumento, resultado) */
.nc-readout { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; min-height: 1.6em; }
.nc-readout .big { font-size: 22px; font-weight: 800; color: var(--guia-ink); }
.nc-readout .rd { font-size: 17px; font-weight: 600; color: var(--guia-deep); }
.nc-readout .rd b { font-weight: 800; }
.nc-readout .cap { font-size: 15px; font-weight: 600; color: var(--guia-muted); max-width: 50ch; }

/* Sliders (respuesta por toque; nunca <input> de texto) */
.nc-sliders { display: grid; gap: 10px; }
.nc-srow { display: grid; grid-template-columns: minmax(86px, auto) 1fr 2.4em; align-items: center; gap: 12px; }
.nc-slab { font-size: 15px; font-weight: 800; }
.nc-srow input[type="range"] { width: 100%; height: 30px; accent-color: var(--guia-orange); cursor: pointer; }
.nc-sval { font-size: 17px; font-weight: 800; color: var(--guia-ink); text-align: right; font-variant-numeric: tabular-nums; }

/* ===== Rueda de potencias de i ===== */
.nc-powi { display: grid; gap: 14px; padding: 16px; border: 2px solid var(--guia-ink); border-radius: 14px; background: var(--guia-cream); }
.nc-powi-wheel { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.nc-face { display: flex; align-items: center; justify-content: center; padding: 12px 6px; border: 2px solid var(--guia-line); border-radius: 10px; background: #fff; font-size: 16px; font-weight: 800; color: var(--guia-deep); transition: transform .12s, border-color .12s, background .12s; }
.nc-face.on { border-color: var(--guia-orange); background: #FDEAD3; color: var(--guia-ink); transform: translateY(-2px); box-shadow: 2px 2px 0 var(--guia-ink); }
.nc-powi-read .big sup { font-size: .7em; }

/* ===== Impresión: oculta los interactivos del tema ===== */
@media print {
  .nc-argand, .nc-powi { display: none !important; }
}

/* ===== Móvil (≤540px): controles cómodos, sin overflow ===== */
@media (max-width: 540px) {
  .nc-srow { grid-template-columns: 1fr 2.2em; grid-template-areas: "lab lab" "rng val"; row-gap: 4px; }
  .nc-slab { grid-area: lab; }
  .nc-srow input[type="range"] { grid-area: rng; }
  .nc-sval { grid-area: val; }
  .nc-powi-wheel { grid-template-columns: repeat(2, 1fr); }
}
