/* ============================================================
 * theme.css — TEMA de la guía de ángulos (capa LIBRE).
 * Leyenda (lados/vértice/abertura), dibujo de ángulos y goniómetro
 * interactivo. Andamiaje en assets/guia-components.css; variables --guia-*.
 * ============================================================ */

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

/* ===== Leyenda de color ===== */
.ang-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; }
.ang-legend .it { display: flex; gap: 8px; align-items: center; }
.ang-legend .it b { font-weight: 800; }
.ang-legend .sw { width: 17px; height: 17px; border-radius: 4px; flex: 0 0 auto; }
.ang-legend .sw.ray { background: var(--guia-navy); border: 2px solid var(--guia-navy); }
.ang-legend .sw.vtx { background: var(--guia-ink); border: 2px solid var(--guia-ink); border-radius: 50%; }
.ang-legend .sw.arc { background: rgba(245, 130, 31, .35); border: 2px solid var(--guia-orange); }

/* ===== Dibujo del ángulo (SVG estático) ===== */
.ang-visual { display: flex; flex-direction: column; align-items: center; gap: 6px; margin: 2px 0; }
.ang-visual .vcap { font-size: 15px; font-weight: 700; color: var(--guia-muted); text-align: center; max-width: 44ch; }
/* Ancho RESUELTO (viewBox + max-width): el dibujo nunca colapsa a "astilla". */
.ang-svg { width: 100%; max-width: 320px; height: auto; display: block; }

/* Dibujo dentro de un ejercicio (guiado/serie): más compacto, alineado a la izquierda. */
.guia-pitem .ang-visual { align-items: flex-start; margin: 8px 0 4px; }
.guia-pitem .ang-visual .vcap { text-align: left; font-size: 14px; }
.guia-pitem .ang-svg { max-width: 200px; }
.guia-serie-grid .ang-svg { max-width: 172px; }

/* ===== Goniómetro interactivo (se toca) ===== */
.ang-lab { display: grid; gap: 12px; padding: 16px; border: 2px solid var(--guia-ink); border-radius: 14px; background: var(--guia-cream); }
.ang-lab-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ang-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; }
.ang-inst { font-size: 15px; font-weight: 700; color: var(--guia-deep); }
.ang-stage { text-align: center; touch-action: none; }
.ang-gonio-svg { width: 100%; max-width: 340px; margin: 0 auto; cursor: grab; }
.ang-gonio-svg:active { cursor: grabbing; }
.ang-gonio-svg [data-handle] { cursor: grab; }
.ang-read { display: flex; align-items: baseline; justify-content: center; gap: 12px; flex-wrap: wrap; text-align: center; min-height: 1.6em; }
.ang-read .ang-deg { font-size: 30px; font-weight: 800; color: var(--guia-ink); }
.ang-read .ang-type { font-size: 18px; font-weight: 800; letter-spacing: .03em; padding: 2px 12px; border-radius: 999px; border: 2px solid var(--guia-ink); background: #fff; }
/* Color por tipo (refuerza la clasificación viva, mantiene contraste) */
.ang-type.t-agudo { color: #1C7A3A; }
.ang-type.t-recto { color: #C75D08; }
.ang-type.t-obtuso { color: #283891; }
.ang-type.t-llano { color: #7a3ca0; }
.ang-type.t-concavo { color: #a01243; }
.ang-type.t-completo { color: var(--guia-ink); }
.ang-type.t-nulo { color: var(--guia-muted); }
.ang-extra { font-size: 15px; line-height: 1.5; color: var(--guia-deep); text-align: center; margin: 0; }
.ang-extra .good { color: var(--guia-green-deep); font-weight: 800; }
.ang-extra .mut { color: var(--guia-muted); }
.ang-ctrl { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; }
.ang-btn { font: inherit; font-weight: 800; font-size: 17px; min-width: 64px; padding: 9px 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; }
.ang-btn.mini { min-width: 52px; padding: 9px 12px; font-size: 15px; }
.ang-btn:hover { transform: translate(-1px, -1px); box-shadow: 3px 3px 0 var(--guia-ink); }
.ang-btn:active { transform: translate(0, 0); box-shadow: 1px 1px 0 var(--guia-ink); }

/* ===== Impresión: oculta el goniómetro interactivo ===== */
@media print {
  .ang-lab { display: none !important; }
}
