/* ============================================================
 * theme.css — TEMA de la guía de IDENTIDADES TRIGONOMÉTRICAS (capa LIBRE).
 * Estilos de los widgets propios (prefijo idt-): probador (identidad/ecuación),
 * demostrador (stepper por toque), dibujos del concepto (círculo de radio 1,
 * fichas recíprocas) y leyenda de color. Andamiaje en assets/guia-components.css;
 * usar variables --guia-* (no hardcodear hex). Pisos de letra: lectura ≥17,
 * apoyo ≥15, etiquetas MAYÚSCULAS ≥13. Tap ≥44px.
 * ============================================================ */

/* ===== Reaseguro de longitud en el hero ===== */
.guia-reassure { font-size: 15px; line-height: 1.5; color: var(--guia-muted); margin: 2px 0 0; }

/* ===== Lead de cualquier widget ===== */
.idt-wg-lead { font-size: 16px; line-height: 1.5; color: var(--guia-deep); font-weight: 600; margin: 0 0 12px; }

/* ===== Leyenda de color ===== */
.idt-legend { display: flex; gap: 18px; 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; }
.idt-legend .it { display: flex; gap: 8px; align-items: center; }
.idt-legend .it b { font-weight: 800; }
.idt-legend .sw { width: 17px; height: 17px; border-radius: 5px; flex: 0 0 auto; }
.idt-legend .sw.obj { background: var(--guia-orange); border: 2px solid var(--guia-deep); }
.idt-legend .sw.sub { background: var(--guia-navy); border: 2px solid var(--guia-navy); }
.idt-legend .sw.cx { background: repeating-linear-gradient(135deg, #fff, #fff 3px, var(--guia-muted) 3px, var(--guia-muted) 4px); border: 2px solid var(--guia-muted); }

/* ===== Clave de color dentro del demostrador ===== */
.idt-key { display: flex; flex-wrap: wrap; gap: 7px 14px; margin: 0; font-size: 13px; font-weight: 700; }
.idt-key .kk { display: inline-flex; align-items: center; gap: 6px; }
.idt-key .kk::before { content: ""; width: 14px; height: 14px; border-radius: 4px; flex: 0 0 auto; }
.idt-key .kk.sub { color: var(--guia-navy); } .idt-key .kk.sub::before { background: var(--guia-navy); }
.idt-key .kk.cx { color: var(--guia-muted); } .idt-key .kk.cx::before { background: repeating-linear-gradient(135deg, #fff, #fff 3px, var(--guia-muted) 3px, var(--guia-muted) 4px); border: 1.5px solid var(--guia-muted); }

/* ===== Tarjeta base de widget ===== */
.idt-prob, .idt-dem, .idt-tool, .idt-armar {
  display: grid; gap: 12px; padding: 16px;
  border: 2px solid var(--guia-ink); border-radius: 14px; background: var(--guia-cream);
  margin: 2px 0;
}

/* ===================================================================
 * Armar (idt-10): construir una fórmula por piezas, por toque.
 * Reusa .idt-eq (fórmula viva), .idt-panel, .idt-opts, .idt-fb, .idt-done.
 * =================================================================== */
.idt-armar .idt-opts .guia-opt { font-size: 17px; }

/* ===================================================================
 * Probador: ¿identidad o ecuación?
 * =================================================================== */
.idt-prob-expr { font-size: clamp(20px, 2.4vw, 24px); text-align: center; background: #fff; border: 2px solid var(--guia-ink); border-radius: 12px; padding: 14px 12px; overflow-x: auto; }
.idt-prob-angs { display: flex; flex-wrap: wrap; gap: 8px; }
.idt-ang { font: inherit; font-weight: 800; font-size: 16px; min-height: 44px; padding: 8px 16px; border: 2px solid var(--guia-ink); border-radius: 10px; background: #fff; color: var(--guia-ink); cursor: pointer; box-shadow: 2px 2px 0 var(--guia-ink); transition: transform .1s, box-shadow .1s; }
.idt-ang:hover:not(.used) { transform: translate(-1px, -1px); box-shadow: 3px 3px 0 var(--guia-ink); border-color: var(--guia-orange); }
.idt-ang:active:not(.used) { transform: translate(0, 0); box-shadow: 1px 1px 0 var(--guia-ink); }
.idt-ang.used { background: var(--guia-cream); color: var(--guia-muted); box-shadow: none; cursor: default; }
.idt-prob-log { list-style: none; margin: 0; padding: 0; display: grid; gap: 5px; }
.idt-prob-log li { font-size: 16px; font-weight: 600; padding: 7px 12px; border-radius: 8px; border: 1.5px solid var(--guia-line); background: #fff; }
.idt-prob-log li.ok { color: var(--guia-green-deep); border-color: var(--guia-green); background: #e9f6ee; }
.idt-prob-log li.bad { color: #a01243; border-color: #e3a9bf; background: #fcecf1; }
.idt-prob-verdict { font-size: 17px; font-weight: 800; color: var(--guia-deep); margin: 0; min-height: 1.4em; opacity: 0; transition: opacity .2s; }
.idt-prob-verdict.show { opacity: 1; }
.idt-prob-verdict.ok { color: var(--guia-green-deep); }
.idt-prob-verdict.bad { color: #a01243; }

/* ===================================================================
 * Demostrador: expresión viva + panel de pasos + traza.
 * =================================================================== */
.idt-goal { font-size: 16px; font-weight: 600; color: var(--guia-ink); margin: 0; }
.idt-goal-x { font-weight: 800; color: var(--guia-deep); }
.idt-eq { font-size: clamp(20px, 2.4vw, 24px); text-align: center; background: #fff; border: 2px solid var(--guia-line); border-radius: 12px; padding: 14px 12px; overflow-x: auto; }
.idt-eq.is-op { border-color: var(--guia-navy); background: #f6f8fc; }
.idt-flash { animation: idt-pop .45s ease; }
@keyframes idt-pop { 0% { transform: scale(.96); } 60% { transform: scale(1.03); } 100% { transform: scale(1); } }
.idt-panel { display: grid; gap: 10px; }
.idt-prompt { font-size: 17px; line-height: 1.45; font-weight: 700; color: var(--guia-ink); margin: 0; }
.idt-opts { display: flex; flex-wrap: wrap; gap: 8px; }
.idt-fb { font-size: 16px; line-height: 1.45; margin: 0; min-height: 1.2em; }
.idt-fb.ok { color: var(--guia-green-deep); font-weight: 700; }
.idt-fb.miss { color: #a01243; font-weight: 700; }
.idt-done { font-size: 18px; font-weight: 800; color: var(--guia-green-deep); text-align: center; background: #e6f5ec; border: 2px solid var(--guia-green); border-radius: 12px; padding: 14px; margin: 0; }
.idt-trace { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.idt-trace li { font-size: 17px; text-align: center; color: var(--guia-muted); background: #fff; border: 1.5px solid var(--guia-line); border-radius: 8px; padding: 7px 10px; overflow-x: auto; }
.idt-trace li.op { background: #f6f8fc; border: 1.5px dashed #c5cde6; }
.idt-trace li.res { color: var(--guia-ink); font-weight: 600; }

/* ===================================================================
 * Herramienta libre (riel): biblioteca de identidades por demostrar.
 * =================================================================== */
.idt-step-lbl { font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: var(--guia-deep); margin: 2px 0 0; }
.idt-chips { display: flex; flex-wrap: wrap; gap: 10px; }
.idt-chip { font: inherit; font-weight: 800; font-size: 16px; min-height: 44px; padding: 10px 16px; border: 2px solid var(--guia-ink); border-radius: 12px; background: #fff; color: var(--guia-ink); cursor: pointer; box-shadow: 2px 2px 0 var(--guia-ink); transition: transform .1s, box-shadow .1s; }
.idt-chip:hover { transform: translate(-1px, -1px); box-shadow: 3px 3px 0 var(--guia-ink); border-color: var(--guia-orange); }
.idt-chip:active { transform: translate(0, 0); box-shadow: 1px 1px 0 var(--guia-ink); }
.idt-chip.active { background: var(--guia-orange); color: #fff; border-color: var(--guia-ink); }
.idt-tool-body { display: grid; gap: 12px; }
.idt-tool-body .idt-dem { border: none; padding: 0; background: transparent; margin: 0; }

/* ===================================================================
 * renderVisual: círculo de radio 1 (SVG propio).
 * =================================================================== */
.idt-visual { display: grid; justify-items: center; gap: 6px; background: #fff; border: 1.5px solid var(--guia-line); border-radius: 12px; padding: 14px; }
.idt-cap { font-size: 15px; color: var(--guia-muted); font-weight: 600; margin: 0; text-align: center; }
.idt-uc svg { width: 100%; max-width: 260px; height: auto; display: block; }
.idt-uc-axis { stroke: var(--guia-line); stroke-width: 1.5; }
.idt-uc-circle { fill: none; stroke: var(--guia-ink); stroke-width: 2; }
.idt-uc-tri { fill: rgba(245, 130, 31, .12); stroke: var(--guia-orange); stroke-width: 1.5; }
.idt-uc-sq { fill: none; stroke: var(--guia-muted); stroke-width: 1.3; }
.idt-uc-rad { stroke: var(--guia-deep); stroke-width: 2.5; }
.idt-uc-pt { fill: var(--guia-deep); }
.idt-uc-lab { font-size: 13px; font-weight: 700; fill: var(--guia-ink); }
.idt-uc-lab.x { fill: var(--guia-deep); }
.idt-uc-lab.y { fill: var(--guia-deep); }
.idt-uc-lab.r { fill: var(--guia-orange); font-weight: 800; }
.idt-uc-pt-lab { font-size: 13px; font-weight: 800; fill: var(--guia-deep); }

/* ===== Fichas de recíprocas ===== */
.idt-recip { gap: 8px; }
.idt-rc-row { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; width: 100%; max-width: 320px; }
.idt-rc-a, .idt-rc-b { font-size: 17px; font-weight: 700; padding: 8px 12px; border-radius: 10px; text-align: center; }
.idt-rc-a { background: var(--guia-cream); border: 2px solid var(--guia-ink); color: var(--guia-ink); }
.idt-rc-b { background: #fff; border: 1.5px solid var(--guia-line); color: var(--guia-deep); }
.idt-rc-eq { font-size: 18px; font-weight: 800; color: var(--guia-muted); }

/* ===== Impresión: oculta los interactivos ===== */
@media print {
  .idt-prob, .idt-dem, .idt-tool { display: none !important; }
  .idt-visual { break-inside: avoid; }
}

/* ===== Movimiento reducido ===== */
@media (prefers-reduced-motion: reduce) {
  .idt-flash { animation: none; }
  .idt-ang, .idt-chip { transition: none; }
}
