/* ==========================================================================
   AcaDrop Ciencia Interactiva — Motor de curvatura de Alcubierre
   Hoja de estilos principal (Zero CDN, responsiva, accesible, modo proyector e impresión)
   ========================================================================== */

:root {
  --bg-deep: #040c1b;
  --bg-navy: #07152e;
  --surface-1: rgba(10, 26, 52, 0.82);
  --surface-2: rgba(14, 34, 66, 0.92);
  --surface-hover: rgba(20, 48, 92, 0.92);
  --border-subtle: rgba(56, 189, 248, 0.2);
  --border-strong: rgba(34, 211, 238, 0.55);

  --cyan: #22d3ee;
  --cyan-bright: #38e8ff;
  --electric: #3b82f6;
  --magenta: #e879f9;
  --magenta-deep: #ec4899;

  --text-primary: #f1f5f9;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;

  --ok: #34d399;
  --warn: #fbbf24;
  --err: #fb7185;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --shadow-glow: 0 12px 36px rgba(2, 8, 23, 0.65), 0 0 0 1px rgba(56, 189, 248, 0.12);
  --font-sans: 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, Roboto, Helvetica, Arial, sans-serif;
}

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

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background: radial-gradient(circle at 20% 10%, #0b2247 0%, var(--bg-deep) 58%, #020712 100%);
  color: var(--text-primary);
  font-family: var(--font-sans);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.hidden {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 8px;
  background: var(--cyan);
  color: #031124;
  padding: 8px 14px;
  border-radius: 6px;
  font-weight: 700;
  z-index: 1000;
}
.skip-link:focus {
  left: 12px;
}

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

/* ==================== TOPBAR ==================== */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(5, 16, 36, 0.88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
}

.topbar-inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.brand-logo {
  display: block;
  width: 34px;
  height: 34px;
}

.brand-text {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.brand-name {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #ffffff;
}

.brand-sep {
  color: rgba(148, 163, 184, 0.45);
}

.brand-sub {
  font-size: 0.98rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 15px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.94rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.nav-btn:hover {
  color: #ffffff;
  background: rgba(56, 189, 248, 0.1);
}

.nav-btn.is-active {
  color: #ffffff;
  background: rgba(34, 211, 238, 0.14);
  border-color: rgba(34, 211, 238, 0.55);
  box-shadow: 0 0 18px rgba(34, 211, 238, 0.18);
}

.nav-btn-classroom {
  border-color: rgba(34, 211, 238, 0.45);
  color: #e0f2fe;
}

.icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.icon-btn:hover {
  background: rgba(56, 189, 248, 0.12);
  color: #fff;
}

.menu-wrapper {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 240px;
  background: #081833;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.65);
  padding: 6px;
  z-index: 60;
}

.dropdown-item {
  width: 100%;
  text-align: left;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.88rem;
  padding: 9px 12px;
  border-radius: 7px;
  cursor: pointer;
}
.dropdown-item:hover {
  background: rgba(34, 211, 238, 0.14);
}
.dropdown-danger {
  color: #fda4af;
}
.dropdown-divider {
  border: none;
  border-top: 1px solid rgba(148, 163, 184, 0.2);
  margin: 4px 0;
}

/* ==================== MAIN CONTAINER & SIMULATOR LAYOUT ==================== */
.app-main {
  max-width: 1440px;
  margin: 0 auto;
  padding: 18px 20px 24px;
}

.simulator-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 375px;
  gap: 20px;
  align-items: start;
}

.sim-main-col {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}

.eyebrow {
  margin: 0 0 4px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cyan);
}

.hero-copy h1 {
  margin: 0 0 6px;
  font-size: clamp(1.6rem, 2.7vw, 2.35rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: #ffffff;
}

.hero-subtitle {
  margin: 0;
  max-width: 760px;
  font-size: 0.97rem;
  color: var(--text-secondary);
}

/* ==================== CANVAS STAGE ==================== */
.canvas-stage {
  position: relative;
  width: 100%;
  height: clamp(340px, 50vh, 490px);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  background: #030b1a;
  box-shadow: var(--shadow-glow);
}

#warp-canvas {
  display: block;
  width: 100%;
  height: 100%;
}

/* Leyenda de curvatura (fiel al mockup) */
.curvature-legend {
  position: absolute;
  left: 14px;
  bottom: 14px;
  background: rgba(5, 16, 36, 0.78);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(56, 189, 248, 0.22);
  border-radius: 10px;
  padding: 10px 12px;
  pointer-events: none;
}

.legend-title {
  font-size: 0.76rem;
  font-weight: 700;
  color: #e2e8f0;
  margin-bottom: 8px;
  line-height: 1.25;
}

.legend-body {
  display: flex;
  align-items: stretch;
  gap: 10px;
}

.legend-bar {
  width: 12px;
  border-radius: 999px;
  background: linear-gradient(180deg, #22d3ee 0%, #3b82f6 50%, #ec4899 100%);
  box-shadow: 0 0 12px rgba(34, 211, 238, 0.35);
}

.legend-labels {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.73rem;
  color: var(--text-secondary);
}

.legend-labels strong {
  color: #ffffff;
  margin-right: 3px;
}

/* Barra de controles interactivos sobre el canvas */
.canvas-toolbar {
  position: absolute;
  right: 12px;
  bottom: 12px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  background: rgba(5, 16, 36, 0.84);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(56, 189, 248, 0.26);
  border-radius: 11px;
  padding: 6px 8px;
}

.tool-chip {
  background: rgba(15, 36, 72, 0.85);
  border: 1px solid rgba(56, 189, 248, 0.28);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 5px 9px;
  border-radius: 7px;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.tool-chip:hover {
  background: rgba(34, 211, 238, 0.18);
  border-color: var(--cyan);
}

.tool-chip.is-active {
  background: rgba(34, 211, 238, 0.22);
  border-color: var(--cyan);
  color: #ffffff;
}

.tool-slider-group {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.76rem;
  color: var(--text-secondary);
  padding: 0 4px;
}

.tool-slider-group input[type="range"] {
  width: 78px;
  accent-color: var(--cyan);
}

.tool-zoom-group {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.tool-val {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--cyan);
  min-width: 34px;
  text-align: center;
}

/* ==================== CONCEPT STRIP (3 COLUMNAS INFERIORES) ==================== */
.concept-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.concept-card {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  background: var(--surface-1);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 13px 14px;
}

.concept-icon {
  color: var(--cyan);
  flex-shrink: 0;
  margin-top: 2px;
}

.concept-card h2 {
  margin: 0 0 4px;
  font-size: 0.94rem;
  font-weight: 700;
  color: #ffffff;
}

.concept-card p {
  margin: 0;
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.42;
}

/* ==================== RIGHT CONTROL PANEL ==================== */
.control-panel {
  background: var(--surface-1);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(56, 189, 248, 0.28);
  border-radius: var(--radius-lg);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: var(--shadow-glow);
}

.panel-block {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.panel-block + .panel-block {
  padding-top: 14px;
  border-top: 1px solid rgba(148, 163, 184, 0.16);
}

.panel-heading {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--cyan);
}

.panel-heading-between {
  justify-content: space-between;
}

.panel-heading-inline {
  display: flex;
  align-items: center;
  gap: 8px;
}

.panel-heading h2 {
  margin: 0;
  font-size: 0.98rem;
  font-weight: 700;
  color: #ffffff;
}

.select-input,
.text-input {
  width: 100%;
  background: rgba(6, 18, 40, 0.92);
  border: 1px solid rgba(56, 189, 248, 0.32);
  border-radius: 9px;
  color: #ffffff;
  font-family: inherit;
  font-size: 0.9rem;
  padding: 9px 11px;
}

.select-input:focus,
.text-input:focus {
  border-color: var(--cyan);
}

.custom-distance-box {
  background: rgba(8, 24, 52, 0.72);
  border: 1px dashed rgba(34, 211, 238, 0.4);
  border-radius: 10px;
  padding: 10px;
}

.field-label {
  display: block;
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 5px;
  font-weight: 600;
}

.custom-distance-row {
  display: grid;
  grid-template-columns: 1fr 110px;
  gap: 8px;
}

.quick-dest-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.quick-dest-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 4px;
  padding: 10px 6px;
  border-radius: 10px;
  background: rgba(7, 21, 44, 0.82);
  border: 1px solid rgba(56, 189, 248, 0.22);
  color: var(--text-primary);
  font-family: inherit;
  cursor: pointer;
  transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

.quick-dest-card:hover {
  border-color: rgba(34, 211, 238, 0.65);
  background: rgba(14, 38, 76, 0.92);
}

.quick-dest-card.is-selected {
  border-color: var(--cyan);
  background: rgba(14, 52, 88, 0.75);
  box-shadow: 0 0 16px rgba(34, 211, 238, 0.24);
}

.dest-icon {
  color: var(--cyan);
}

.dest-name {
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.2;
}

.dest-dist {
  font-size: 0.71rem;
  color: var(--text-muted);
  line-height: 1.2;
}

.panel-note {
  margin: 0;
  font-size: 0.77rem;
  color: var(--text-muted);
  line-height: 1.42;
}

.orbital-tag {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(251, 191, 36, 0.16);
  color: #fde68a;
  font-weight: 700;
  font-size: 0.71rem;
  margin-right: 4px;
}

.source-tag {
  color: #7dd3fc;
}

/* Slider de velocidad */
.speed-slider-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.speed-slider-row input[type="range"] {
  flex: 1;
  accent-color: var(--cyan);
  cursor: pointer;
}

.speed-badge {
  min-width: 64px;
  text-align: center;
  padding: 5px 10px;
  border-radius: 8px;
  background: rgba(6, 20, 44, 0.95);
  border: 1px solid var(--border-strong);
  color: #ffffff;
  font-weight: 800;
  font-size: 0.92rem;
}

.panel-formula {
  margin: 0;
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.info-circle-btn {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1px solid rgba(56, 189, 248, 0.45);
  background: rgba(34, 211, 238, 0.1);
  color: var(--cyan);
  font-weight: 800;
  font-size: 0.78rem;
  cursor: pointer;
}

.info-popover {
  background: rgba(7, 25, 54, 0.96);
  border: 1px solid rgba(34, 211, 238, 0.45);
  border-radius: 9px;
  padding: 9px 11px;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

/* Botón CTA principal (cian vibrante fiel al mockup) */
.btn-primary-cta {
  width: 100%;
  padding: 12px 16px;
  border-radius: 11px;
  border: none;
  background: linear-gradient(90deg, #1ad1e8 0%, #38bdf8 100%);
  color: #031526;
  font-family: inherit;
  font-size: 0.98rem;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 8px 24px rgba(34, 211, 238, 0.28);
  transition: transform 0.14s ease, filter 0.14s ease;
}

.btn-primary-cta:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.btn-inline {
  width: auto;
}

.btn-secondary {
  padding: 9px 14px;
  border-radius: 9px;
  border: 1px solid rgba(56, 189, 248, 0.42);
  background: rgba(14, 38, 76, 0.78);
  color: #e0f2fe;
  font-family: inherit;
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
}
.btn-secondary:hover,
.btn-secondary.is-active {
  background: rgba(34, 211, 238, 0.22);
  border-color: var(--cyan);
}

.btn-ghost {
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: transparent;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.84rem;
  cursor: pointer;
}
.btn-ghost:hover {
  color: #fff;
  border-color: var(--cyan);
}

/* KPIs comparativos */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.kpi-card {
  background: rgba(6, 18, 40, 0.85);
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: 11px;
  padding: 11px 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.kpi-card-highlight {
  border-color: rgba(34, 211, 238, 0.65);
  background: linear-gradient(160deg, rgba(12, 46, 82, 0.85) 0%, rgba(7, 22, 48, 0.92) 100%);
  box-shadow: 0 0 20px rgba(34, 211, 238, 0.16);
}

.kpi-label {
  font-size: 0.75rem;
  color: var(--text-secondary);
  line-height: 1.25;
}

.kpi-value {
  font-size: 1.32rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.15;
}

.kpi-value-cyan {
  color: var(--cyan-bright);
}

.kpi-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* Gráfica comparativa */
.comparison-details summary {
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--cyan);
  margin-bottom: 8px;
  user-select: none;
}

.comparison-chart {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-top: 6px;
}

.chart-row {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.chart-row-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.chart-row.is-active .chart-row-meta {
  color: var(--cyan-bright);
  font-weight: 700;
}

.chart-track {
  height: 7px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.16);
  overflow: hidden;
}

.chart-bar {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #3b82f6, #60a5fa);
  transition: width 0.25s ease;
}

.chart-row.is-warp .chart-bar {
  background: linear-gradient(90deg, #22d3ee, #e879f9);
}

.chart-row.is-active .chart-bar {
  box-shadow: 0 0 10px rgba(34, 211, 238, 0.65);
}

/* ==================== SECCIONES APRENDE, ACTIVIDADES, CLASE ==================== */
.section-container {
  max-width: 1220px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.section-header h2 {
  margin: 0 0 6px;
  font-size: clamp(1.45rem, 2.4vw, 2rem);
  color: #fff;
}

.section-lead {
  margin: 0;
  color: var(--text-secondary);
  max-width: 780px;
}

.section-header-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  flex-wrap: wrap;
}

.epistemic-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.epistemic-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  border: 1px solid transparent;
}

.badge-proven {
  background: rgba(52, 211, 153, 0.15);
  color: #6ee7b7;
  border-color: rgba(52, 211, 153, 0.4);
}
.badge-theoretical {
  background: rgba(56, 189, 248, 0.15);
  color: #7dd3fc;
  border-color: rgba(56, 189, 248, 0.4);
}
.badge-hypothetical {
  background: rgba(232, 121, 249, 0.15);
  color: #f0abfc;
  border-color: rgba(232, 121, 249, 0.4);
}
.badge-didactic {
  background: rgba(251, 191, 36, 0.15);
  color: #fde68a;
  border-color: rgba(251, 191, 36, 0.4);
}

.learn-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.learn-card {
  background: var(--surface-1);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.learn-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.learn-order {
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--cyan);
}

.learn-card h3 {
  margin: 0;
  font-size: 1.12rem;
  color: #fff;
}

.learn-summary {
  margin: 0;
  font-weight: 600;
  color: #e0f2fe;
  font-size: 0.92rem;
}

.learn-body p {
  margin: 0 0 8px;
  font-size: 0.89rem;
  color: var(--text-secondary);
}

.learn-takeaway {
  margin-top: auto;
  padding: 10px 12px;
  border-radius: 9px;
  background: rgba(34, 211, 238, 0.08);
  border-left: 3px solid var(--cyan);
  font-size: 0.84rem;
  color: #e2e8f0;
}

.references-box {
  background: var(--surface-1);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 18px 20px;
}

.references-box h3 {
  margin: 0 0 12px;
  color: #fff;
}

.references-list {
  margin: 0;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ref-citation {
  margin: 0;
  font-size: 0.9rem;
  color: #f1f5f9;
}

.ref-meta {
  margin: 2px 0 0;
  font-size: 0.8rem;
  color: var(--text-muted);
}
.ref-meta span {
  color: var(--cyan);
}

/* ==================== ACTIVIDADES ==================== */
.progress-panel {
  min-width: 280px;
  background: var(--surface-1);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.progress-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.progress-track {
  height: 10px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.2);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--cyan), var(--magenta));
  transition: width 0.25s ease;
}

.progress-sub {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.activities-columns {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 18px;
}

.column-title {
  margin: 0 0 12px;
  font-size: 1.1rem;
  color: var(--cyan);
}

.activities-stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.activity-card {
  background: var(--surface-1);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.activity-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.activity-step {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.status-pill {
  font-size: 0.74rem;
  font-weight: 700;
  padding: 2px 9px;
  border-radius: 999px;
}
.pill-ok {
  background: rgba(52, 211, 153, 0.2);
  color: #6ee7b7;
}
.pill-err {
  background: rgba(251, 113, 133, 0.2);
  color: #fda4af;
}

.activity-question {
  margin: 0;
  font-size: 0.98rem;
  color: #fff;
}

.activity-prompt {
  margin: 0;
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.options-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.option-btn {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  text-align: left;
  padding: 10px 12px;
  border-radius: 9px;
  border: 1px solid rgba(56, 189, 248, 0.22);
  background: rgba(6, 18, 40, 0.8);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.87rem;
  cursor: pointer;
}

.option-btn:hover {
  border-color: var(--cyan);
  background: rgba(14, 40, 80, 0.9);
}

.option-btn.is-correct {
  border-color: var(--ok);
  background: rgba(16, 185, 129, 0.16);
}

.option-btn.is-wrong {
  border-color: var(--err);
  background: rgba(244, 63, 94, 0.16);
}

.option-letter {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: rgba(56, 189, 248, 0.18);
  color: var(--cyan);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.78rem;
  flex-shrink: 0;
}

.calc-input-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.calc-number-input {
  max-width: 165px;
}

.calc-unit-tag {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--cyan);
}

.calc-hint {
  margin: 0;
  font-size: 0.82rem;
  color: #fde68a;
  background: rgba(251, 191, 36, 0.1);
  border-radius: 8px;
  padding: 8px 10px;
}

.activity-feedback {
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 0.84rem;
}
.feedback-ok {
  background: rgba(52, 211, 153, 0.14);
  border: 1px solid rgba(52, 211, 153, 0.4);
  color: #a7f3d0;
}
.feedback-err {
  background: rgba(251, 113, 133, 0.14);
  border: 1px solid rgba(251, 113, 133, 0.4);
  color: #fecdd3;
}

/* ==================== MODO CLASE ==================== */
.classroom-toolbar-card {
  background: var(--surface-1);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.classroom-actions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.classroom-quick-controls {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  align-items: end;
}

.classroom-quick-btns {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.guides-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.classroom-guide-card,
.discussion-card {
  background: var(--surface-1);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
}

.guide-level {
  font-size: 0.74rem;
  font-weight: 800;
  color: var(--cyan);
  text-transform: uppercase;
}

.classroom-guide-card h4 {
  margin: 6px 0 8px;
  font-size: 1rem;
  color: #fff;
}

.guide-objective {
  margin: 0 0 10px;
  font-size: 0.86rem;
  color: var(--text-secondary);
}

.guide-steps,
.discussion-list {
  margin: 0;
  padding-left: 18px;
  color: var(--text-secondary);
  font-size: 0.88rem;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.print-only-header {
  display: none;
}

/* ==================== FOOTER BANNER & MODAL ==================== */
.rigor-banner {
  border-top: 1px solid rgba(56, 189, 248, 0.22);
  background: rgba(4, 13, 29, 0.92);
  padding: 12px 20px;
}

.rigor-banner-inner {
  max-width: 1440px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 0.85rem;
}

.rigor-warning {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #e2e8f0;
  font-weight: 600;
}

.rigor-warning svg {
  color: var(--cyan);
  flex-shrink: 0;
}

.rigor-meta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 0.8rem;
}

.link-btn {
  background: none;
  border: none;
  padding: 0;
  color: var(--cyan);
  font-family: inherit;
  font-size: inherit;
  cursor: pointer;
  text-decoration: underline;
}

.offline-pill {
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(52, 211, 153, 0.16);
  color: #6ee7b7;
  font-weight: 700;
  font-size: 0.72rem;
}
.offline-pill.is-offline {
  background: rgba(251, 191, 36, 0.2);
  color: #fde68a;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(2, 8, 22, 0.78);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 100;
}

.modal-card {
  width: 100%;
  max-width: 600px;
  background: #081833;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.75);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.modal-header h2 {
  margin: 0;
  font-size: 1.2rem;
  color: #fff;
}

.modal-body p {
  margin: 0 0 10px;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* ==================== MODO PROYECTOR (ALTO CONTRASTE) ==================== */
body.projector-mode {
  font-size: 112%;
  background: #020814;
}
body.projector-mode .hero-subtitle,
body.projector-mode .concept-card p,
body.projector-mode .panel-note {
  color: #f1f5f9;
}
body.projector-mode .control-panel,
body.projector-mode .concept-card,
body.projector-mode .canvas-stage {
  border-color: rgba(34, 211, 238, 0.65);
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 1080px) {
  .simulator-layout {
    grid-template-columns: 1fr;
  }
  .learn-grid,
  .activities-columns,
  .guides-grid,
  .classroom-quick-controls {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .topbar-inner {
    flex-wrap: wrap;
    padding: 10px 14px;
  }
  .brand-sub,
  .brand-sep {
    display: none;
  }
  .main-nav {
    order: 3;
    width: 100%;
    justify-content: space-between;
  }
  .nav-btn {
    padding: 7px 10px;
    font-size: 0.84rem;
  }
  .concept-strip {
    grid-template-columns: 1fr;
  }
  .canvas-stage {
    height: 330px;
  }
  .curvature-legend {
    display: none;
  }
  .canvas-toolbar {
    left: 8px;
    right: 8px;
    bottom: 8px;
    justify-content: center;
  }
}

/* ==================== IMPRESIÓN (GUÍA DOCENTE) ==================== */
@media print {
  body {
    background: #ffffff !important;
    color: #0f172a !important;
  }
  .topbar,
  .no-print,
  .rigor-banner,
  #view-simulador,
  #view-aprende,
  #view-actividades {
    display: none !important;
  }
  #view-clase {
    display: block !important;
  }
  .print-only-header {
    display: block;
    border-bottom: 2px solid #0f172a;
    margin-bottom: 16px;
    padding-bottom: 8px;
  }
  .classroom-guide-card,
  .discussion-card {
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    color: #0f172a !important;
    break-inside: avoid;
  }
  .classroom-guide-card h4,
  .column-title,
  .guide-objective,
  .guide-steps,
  .discussion-list {
    color: #0f172a !important;
  }
}
