/* ==========================================================
   Uni-ted Together · TecnoChallenge 2026 · Resultado 7
   Enfoque docente · fondos claros de bajo estímulo + acero pizarra
   ========================================================== */

:root {
  --bg: #F5F6F7;
  --bg-2: #ECEEF0;
  --surface: #FFFFFF;
  --surface-2: #F0F2F4;
  --line: rgba(108, 117, 130, 0.22);
  --line-strong: rgba(108, 117, 130, 0.5);
  --slate: #6C7582;
  --slate-dark: #49515C;
  --slate-soft: #E6E9EC;
  --text: #16191D;
  --muted: #5B636D;
  --faint: #959CA6;

  --ok: #4F6B5E;
  --radius: 14px;
  --ease: cubic-bezier(.2, .7, .1, 1);
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
main { position: relative; z-index: 1; overflow-x: clip; }
img, svg { display: block; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
.mono { font-family: var(--mono); font-size: 0.75rem; letter-spacing: 0.02em; }
.wrap { width: min(1200px, 100% - 32px); margin-inline: auto; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--mono); font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--slate);
}
.eyebrow .dot { width: 6px; height: 6px; border: 1px solid var(--slate); border-radius: 50%; }
.lead { color: var(--muted); font-size: clamp(1rem, 1.3vw, 1.15rem); max-width: 50ch; }

h1, h2, h3 { font-weight: 500; letter-spacing: -0.025em; line-height: 1.05; }
h2 { font-size: clamp(2rem, 4.4vw, 3.6rem); max-width: 20ch; }
h3 { font-size: clamp(1.5rem, 2.4vw, 2.1rem); }

/* ---------- Navegación ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 12px clamp(16px, 3vw, 36px);
  background: linear-gradient(to bottom, rgba(245, 246, 247, 0.92), rgba(245, 246, 247, 0));
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.nav-brand img { height: 30px; width: auto; }
.nav-links { display: flex; gap: 4px; padding: 4px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255, 255, 255, 0.75); }
.nav-links a {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 14px; border-radius: 999px; font-size: 0.85rem; color: var(--muted);
  transition: color .3s var(--ease), background .3s var(--ease);
}
.nav-links a span { font-family: var(--mono); font-size: 0.7rem; color: var(--faint); }
.nav-links a:hover, .nav-links a.active { color: var(--text); background: var(--slate-soft); }
.nav-links a.active span { color: var(--slate); }
.nav-tag { font-family: var(--mono); font-size: 0.7rem; color: var(--faint); letter-spacing: 0.06em; }
.progress { position: fixed; inset: 0 0 auto 0; height: 2px; z-index: 60; }
.progress span { display: block; height: 100%; width: 100%; background: var(--slate); transform-origin: 0 50%; transform: scaleX(0); }

/* ---------- Escena 3D ---------- */
#scene { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 0; pointer-events: none; }

/* ---------- 01 · Hero ---------- */
.hero {
  position: relative; height: 100vh; min-height: 560px;
  display: flex; align-items: center;
  padding: 0 clamp(16px, 6vw, 96px);
}
.hero-grid {
  position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 80px 80px;
  opacity: 0.45;
  mask-image: radial-gradient(ellipse at 70% 50%, #000 0%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at 70% 50%, #000 0%, transparent 70%);
}
.hero-stage { position: relative; display: grid; width: 100%; max-width: 1200px; margin-inline: auto; }
.hero-block { grid-area: 1 / 1; align-self: center; max-width: 660px; }
.hero-q {
  margin-top: 22px;
  font-size: clamp(2.5rem, 5.4vw, 4.8rem);
  font-weight: 500; letter-spacing: -0.04em; line-height: 1.0;
}
.hero-q .line { display: block; overflow: hidden; padding-bottom: 0.08em; }
.hero-q .line > span { display: inline-block; }
.hero-a {
  margin-top: 28px; overflow: hidden;
  font-size: clamp(1.25rem, 2.3vw, 1.9rem); font-weight: 400; letter-spacing: -0.02em;
  color: var(--slate-dark); max-width: 30ch;
}
.hero-a span { display: inline; background: linear-gradient(var(--slate), var(--slate)) 0 100% / 100% 1px no-repeat; padding-bottom: 4px; }
.hero-block-2 { visibility: hidden; }
.hero-c-title { margin: 22px 0 22px; font-size: clamp(2.2rem, 4.6vw, 4rem); max-width: 15ch; }
.hero-c-title em { font-style: normal; color: var(--slate); }
.conditions { list-style: none; margin-top: 28px; border-top: 1px solid var(--line); max-width: 540px; }
.conditions li {
  display: flex; align-items: baseline; gap: 18px;
  padding: 16px 0; border-bottom: 1px solid var(--line);
  font-size: clamp(1rem, 1.4vw, 1.2rem);
}
.conditions .mono { color: var(--slate); }
.hero-foot {
  position: absolute; left: clamp(16px, 6vw, 96px); right: clamp(16px, 6vw, 96px); bottom: 28px;
  display: flex; justify-content: space-between; align-items: center; color: var(--faint);
}
.fig-label b { font-weight: 500; color: var(--muted); }
.scroll-cue { display: flex; align-items: center; gap: 10px; }
.scroll-cue i { width: 1px; height: 28px; background: var(--line-strong); position: relative; overflow: hidden; }
.scroll-cue i::after {
  content: ""; position: absolute; left: 0; top: -40%; width: 1px; height: 40%;
  background: var(--slate-dark); animation: cue 2.2s var(--ease) infinite;
}
@keyframes cue { to { top: 100%; } }

/* ---------- 02 · Contraste ---------- */
.contrast { position: relative; }
.compare-pin {
  min-height: 100vh; display: flex; align-items: center;
  padding: 96px 0 48px;
  background: linear-gradient(to bottom, rgba(245, 246, 247, 0) 0%, rgba(245, 246, 247, 0.9) 16%, rgba(245, 246, 247, 0.9) 100%);
}
.sec-head { display: grid; gap: 18px; margin-bottom: clamp(28px, 4vh, 48px); }
.compare { border-top: 1px solid var(--line); }
.compare-head {
  display: grid; grid-template-columns: 1fr 80px 1fr; gap: 20px; align-items: center;
  padding: 14px 0; border-bottom: 1px solid var(--line);
  font-family: var(--mono); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--faint);
}
.compare-head > div:last-child { color: var(--slate-dark); }
.compare-count { text-align: center; color: var(--faint); }
.cc-now { color: var(--slate-dark); }
.crow {
  display: grid; grid-template-columns: 1fr 80px 1fr; gap: 20px; align-items: center;
  padding: clamp(10px, 1.8vh, 18px) 0; border-bottom: 1px solid var(--line);
}
.cl, .cr { position: relative; display: grid; grid-template-columns: 140px 1fr; gap: 16px; align-items: baseline; }
.cl p, .cr p { font-size: clamp(1rem, 1.45vw, 1.25rem); letter-spacing: -0.01em; }
.cl .k { color: var(--faint); }
.cl .st {
  background: linear-gradient(var(--slate), var(--slate)) 0 58% / 0% 1px no-repeat;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}
.cr { padding: 12px 16px; margin: -12px 0; border: 1px solid transparent; border-radius: 10px; }
.cr .k { color: var(--slate-dark); }
.cm { width: 80px; height: 20px; fill: none; stroke: var(--slate); stroke-width: 1.2; stroke-linecap: round; stroke-linejoin: round; }

/* Gráfico de carga */
.workload { padding: 18vh 0 6vh; }
.workload-head { display: grid; gap: 18px; margin-bottom: 40px; }
.chart { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: clamp(16px, 3vw, 36px); }
.chart-svg { width: 100%; height: auto; overflow: visible; }
.chart-svg .axis path { fill: none; stroke: var(--line-strong); stroke-width: 1; }
.chart-svg .ticks text { font-family: var(--mono); font-size: 13px; fill: var(--faint); }
.chart-svg .line-trad { fill: none; stroke: #B4BAC2; stroke-width: 2; stroke-linejoin: round; }
.chart-svg .line-uni { fill: none; stroke: var(--slate-dark); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.chart-svg .note circle { stroke-width: 2; fill: var(--surface); }
.chart-svg .note-trad circle { stroke: var(--faint); }
.chart-svg .note-uni circle { stroke: var(--slate-dark); }
.chart-svg .note text { font-family: var(--sans); font-size: 15px; fill: var(--muted); }
.chart-svg .note-uni text { fill: var(--slate-dark); font-weight: 500; }
.chart figcaption { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 0.85rem; color: var(--muted); }
.legend { display: inline-flex; align-items: center; gap: 8px; }
.legend i { width: 22px; height: 0; border-top: 2px solid; }
.lg-trad { border-color: #B4BAC2 !important; }
.lg-uni { border-color: var(--slate-dark) !important; }
.caption-note { margin-left: auto; color: var(--faint); }

/* Viabilidad: tarjetas apiladas */
.pillars-head { padding: 16vh 0 7vh; display: grid; gap: 18px; }
.pillars { position: relative; padding-bottom: 12vh; }
.pillar {
  position: sticky; top: 14vh;
  display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(24px, 4vw, 64px); align-items: center;
  min-height: 60vh; margin-bottom: 10vh;
  padding: clamp(24px, 4vw, 56px);
  background: var(--surface); border: 1px solid var(--line); border-radius: 22px;
  transform-origin: 50% 0;
  box-shadow: 0 -18px 50px rgba(22, 25, 29, 0.06);
}
.pillar:nth-child(2) { top: calc(14vh + 22px); }
.pillar:nth-child(3) { top: calc(14vh + 44px); }
.pillar-n { color: var(--slate); text-transform: uppercase; letter-spacing: 0.06em; }
.pillar h3 { margin: 16px 0 18px; }
.pillar p { color: var(--muted); max-width: 44ch; font-size: 1.05rem; }
.specs { display: grid; grid-template-columns: 1fr 1fr; margin-top: 32px; border-top: 1px solid var(--line); }
.specs div { padding: 14px 0; }
.specs dt { font-family: var(--mono); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--faint); }
.specs dd { margin-top: 4px; font-size: 0.95rem; }
.pillar-art { width: 100%; height: auto; max-height: 44vh; }
.pillar-art .draw { fill: none; stroke: #B7BDC5; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.pillar-art .draw.accent { stroke: var(--slate-dark); stroke-width: 1.8; }

/* ---------- 03 · Impacto ODS ---------- */
.impact { position: relative; padding: 14vh 0 0; }
.impact-head { margin-bottom: 48px; }
.ods-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.ods {
  position: relative; overflow: hidden;
  display: grid; grid-template-columns: auto 1fr; gap: 28px; align-items: start;
  padding: clamp(24px, 3vw, 40px); background: var(--surface); border: 1px solid var(--line); border-radius: 22px;
}
.ods-num {
  font-size: clamp(6rem, 11vw, 9.5rem); font-weight: 600; line-height: 0.8; letter-spacing: -0.06em;
  color: transparent; -webkit-text-stroke: 1.5px var(--slate);
}
.ods-tag { color: var(--slate); text-transform: uppercase; letter-spacing: 0.06em; }
.ods h3 { margin: 12px 0 14px; font-size: clamp(1.35rem, 2vw, 1.75rem); }
.ods-meta { font-size: 0.95rem; color: var(--muted); padding: 12px 14px; background: var(--surface-2); border-radius: 10px; }
.ods-meta b { display: block; font-family: var(--mono); font-size: 0.72rem; font-weight: 500; color: var(--slate-dark); letter-spacing: 0.04em; margin-bottom: 2px; }
.ods-list { list-style: none; margin-top: 16px; display: grid; gap: 8px; }
.ods-list li { position: relative; padding-left: 18px; font-size: 0.95rem; }
.ods-list li::before { content: ""; position: absolute; left: 0; top: 0.68em; width: 9px; height: 1px; background: var(--slate); }

.flow { margin-top: 56px; }
.flow-svg { width: 100%; height: auto; overflow: visible; }
.flow-line { fill: none; stroke: var(--slate); stroke-width: 1.5; }
.flow-node circle { fill: var(--surface); stroke: var(--line-strong); stroke-width: 1.5; }
.flow-node.accent circle { stroke: var(--slate-dark); stroke-width: 2; }
.flow-node text { font-family: var(--sans); font-size: 16px; fill: var(--muted); text-anchor: middle; }
.flow-node.accent text { fill: var(--text); font-weight: 500; }
.flow-icons path, .flow-icons circle { fill: none; stroke: var(--slate-dark); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

.manifesto { padding: 18vh 0 22vh; }
.manifesto-text {
  font-size: clamp(1.8rem, 4vw, 3.4rem); font-weight: 400; letter-spacing: -0.03em; line-height: 1.15;
  max-width: 26ch;
}
.manifesto-text .w { opacity: 0.14; }

/* ---------- 04 · Simulador ---------- */
.sim { position: relative; background: var(--bg-2); border-top: 1px solid var(--line); padding: 12vh 0 14vh; }
.sim-head { margin-bottom: 40px; }
.sim-head h2 { font-size: clamp(2rem, 3.6vw, 3rem); max-width: 22ch; }
.sim-layout { display: grid; grid-template-columns: 280px 1fr; gap: 28px; align-items: start; }

.guide { position: sticky; top: 90px; padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.guide-title { color: var(--slate); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 18px; }
.steps { list-style: none; display: grid; gap: 4px; counter-reset: s; }
.steps li { display: grid; grid-template-columns: 22px 1fr; gap: 12px; padding: 10px 0; position: relative; }
.steps li:not(:last-child)::after { content: ""; position: absolute; left: 10.5px; top: 36px; bottom: -8px; width: 1px; background: var(--line); }
.steps li i {
  counter-increment: s; width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--line-strong);
  display: grid; place-items: center; font-style: normal; font-family: var(--mono); font-size: 0.68rem; color: var(--muted);
  transition: all .4s var(--ease); background: var(--surface);
}
.steps li i::before { content: counter(s); }
.steps li b { display: block; font-weight: 500; font-size: 0.92rem; }
.steps li span { display: block; font-size: 0.8rem; color: var(--faint); }
.steps li.current i { border-color: var(--slate-dark); color: var(--text); box-shadow: 0 0 0 4px rgba(108, 117, 130, 0.16); }
.steps li.done i { background: var(--slate); border-color: var(--slate); color: #fff; }
.steps li.done i::before { content: "✓"; }
.steps li.done b { color: var(--muted); }
.guide-actions { display: flex; gap: 8px; margin-top: 20px; }
.guide-note { margin-top: 14px; font-size: 0.75rem; color: var(--faint); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 38px; padding: 0 16px; border-radius: 10px; font-size: 0.85rem; font-weight: 500;
  transition: background .25s var(--ease), border-color .25s var(--ease), color .25s var(--ease);
}
.btn svg { width: 12px; height: 12px; fill: currentColor; }
.btn-primary { background: var(--text); color: #fff; flex: 1; min-width: 0; padding: 0 12px; white-space: nowrap; }
.btn-primary:hover { background: #2B3036; }
.btn-primary.running { background: var(--slate); }
.btn-ghost { border: 1px solid var(--line-strong); color: var(--muted); padding: 0 10px; flex: none; }
.btn-ghost:hover { color: var(--text); border-color: var(--slate); }

/* Dispositivo */
.device {
  position: relative; border-radius: 16px; overflow: hidden;
  border: 1px solid #D3D7DC; background: #F7F8F9;
  box-shadow: 0 40px 100px rgba(22, 25, 29, 0.14), 0 0 0 6px rgba(108, 117, 130, 0.07);
}
.device-bar { display: flex; align-items: center; gap: 14px; height: 40px; padding: 0 14px; background: #E9EBED; border-bottom: 1px solid #DDE0E4; color: var(--muted); }
.dots { display: flex; gap: 6px; }
.dots i { width: 10px; height: 10px; border-radius: 50%; background: #CDD1D6; }
.url { flex: 1; text-align: center; padding: 4px 12px; background: #F7F8F9; border-radius: 6px; max-width: 380px; margin-inline: auto; color: var(--muted); }
.device-status { min-width: 110px; text-align: right; color: var(--slate); }

.portal { display: grid; grid-template-columns: 200px 1fr; height: 660px; color: var(--text); font-size: 14px; }
.p-side { display: flex; flex-direction: column; gap: 22px; padding: 18px 14px; background: #fff; border-right: 1px solid #E2E5E8; }
.p-brand { display: flex; align-items: center; gap: 10px; padding: 0 6px; }
.p-brand img { width: 30px; height: 30px; padding: 4px; border-radius: 8px; background: #16191D; object-fit: contain; }
.p-brand b { display: block; font-weight: 600; font-size: 0.9rem; }
.p-brand span { display: block; font-size: 0.7rem; color: var(--muted); }
.p-nav { display: grid; gap: 2px; }
.p-nav button {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 9px 10px; border-radius: 8px; color: var(--muted); font-size: 0.86rem; text-align: left;
  transition: background .2s, color .2s;
}
.p-nav button svg, .p-top svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linejoin: round; stroke-linecap: round; flex: none; }
.p-nav button:hover { background: var(--surface-2); color: var(--text); }
.p-nav button.active { background: var(--surface-2); color: var(--text); font-weight: 500; }
.p-badge[hidden] { display: none; }
.p-badge { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--slate); color: #fff; font-style: normal; font-size: 0.7rem; display: grid; place-items: center; }
.p-user { margin-top: auto; display: flex; gap: 10px; align-items: center; padding: 10px 6px 0; border-top: 1px solid #E2E5E8; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--slate-soft); color: var(--slate-dark); display: grid; place-items: center; font-size: 0.72rem; font-weight: 600; flex: none; }
.p-user b { display: block; font-size: 0.82rem; font-weight: 500; }
.p-user span { display: block; font-size: 0.7rem; color: var(--muted); }

.p-main { position: relative; display: flex; flex-direction: column; min-width: 0; overflow: hidden; }
.p-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 22px; border-bottom: 1px solid #E2E5E8; background: #fff; }
.p-course b { display: block; font-size: 0.9rem; font-weight: 600; }
.p-course span { display: block; font-size: 0.74rem; color: var(--muted); }
.p-bell { position: relative; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 8px; color: var(--muted); }
.p-bell:hover { background: var(--surface-2); }
.p-bell em { position: absolute; top: 4px; right: 3px; min-width: 15px; height: 15px; padding: 0 4px; border-radius: 8px; background: var(--text); color: #fff; font-style: normal; font-size: 0.6rem; display: grid; place-items: center; }
.p-bell em.zero { display: none; }
.p-view { flex: 1; overflow-y: auto; padding: 22px 24px 30px; scroll-behavior: smooth; }
.p-view::-webkit-scrollbar { width: 8px; }
.p-view::-webkit-scrollbar-thumb { background: #D5D9DD; border-radius: 4px; }

/* Bloques del panel */
.pv-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 18px; }
.pv-head h3 { font-size: 1.4rem; letter-spacing: -0.02em; font-weight: 600; }
.pv-head p { color: var(--muted); font-size: 0.84rem; margin-top: 4px; }
.pv-kicker { font-family: var(--mono); font-size: 0.68rem; color: var(--slate); text-transform: uppercase; letter-spacing: 0.08em; }
.panel { padding: 16px 18px; background: #fff; border: 1px solid #E2E5E8; border-radius: 12px; }
.panel h4 { font-size: 0.85rem; font-weight: 600; margin-bottom: 12px; display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.panel h4 small { font-weight: 400; font-size: 0.72rem; color: var(--faint); font-family: var(--mono); }

.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 12px; }
.kpi { padding: 14px; background: #fff; border: 1px solid #E2E5E8; border-radius: 12px; }
.kpi span { display: block; font-size: 0.72rem; color: var(--muted); }
.kpi b { display: block; margin-top: 4px; font-size: 1.55rem; font-weight: 600; letter-spacing: -0.02em; line-height: 1.1; }
.kpi small { display: inline-flex; align-items: center; gap: 4px; margin-top: 4px; font-size: 0.7rem; color: var(--ok); }
.kpi small.neutral { color: var(--faint); }

.dash-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 12px; margin-bottom: 12px; }
.bars-chart { width: 100%; height: 170px; overflow: visible; }
.bars-chart .bar { fill: #D5DAE0; }
.bars-chart .bar.prac { fill: var(--slate); }
.bars-chart .bar:hover { fill: var(--slate-dark); }
.bars-chart text { font-family: var(--mono); font-size: 9px; fill: var(--faint); }
.bars-chart .val { fill: var(--muted); font-size: 9px; }
.bars-chart .grid { stroke: #EDEFF1; stroke-width: 1; }
.chart-legend { display: flex; gap: 14px; margin-top: 8px; font-size: 0.72rem; color: var(--muted); }
.chart-legend i { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; }
.chart-tip { position: absolute; pointer-events: none; padding: 6px 9px; border-radius: 6px; background: var(--text); color: #fff; font-size: 0.72rem; white-space: nowrap; opacity: 0; transform: translate(-50%, -110%); transition: opacity .15s; z-index: 6; }

.eng { display: grid; gap: 12px; }
.eng-row { display: grid; grid-template-columns: 1fr auto; gap: 6px 10px; font-size: 0.8rem; }
.eng-row em { font-style: normal; font-family: var(--mono); font-size: 0.72rem; color: var(--muted); }
.eng-row .track { grid-column: 1 / -1; height: 6px; border-radius: 3px; background: var(--slate-soft); overflow: hidden; }
.eng-row .track i { display: block; height: 100%; width: 0; background: var(--slate); border-radius: 3px; }

.next-panel { margin-bottom: 12px; }
.next { display: grid; grid-template-columns: 1fr auto; gap: 14px; align-items: center; }
.next h5 { font-size: 0.95rem; font-weight: 600; margin: 4px 0 2px; }
.next p { font-size: 0.78rem; color: var(--muted); }
.enrol { text-align: right; }
.enrol b { display: block; font-size: 1.5rem; font-weight: 600; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.enrol span { font-size: 0.72rem; color: var(--muted); }
.enrol-bar { grid-column: 1 / -1; height: 4px; border-radius: 2px; background: var(--slate-soft); overflow: hidden; }
.enrol-bar i { display: block; height: 100%; background: var(--slate); transition: width .4s var(--ease); }
.pending { font-size: 0.78rem; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.pending::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #C9A85C; }

.tag { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 8px; border-radius: 6px; background: var(--slate-soft); color: var(--slate-dark); font-family: var(--mono); font-size: 0.64rem; text-transform: uppercase; letter-spacing: 0.06em; }
.tag.dark { background: var(--text); color: #fff; }
.tag.okt { background: #E4ECE8; color: var(--ok); }

/* Banco de contactos */
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.chip { height: 30px; padding: 0 12px; border-radius: 15px; border: 1px solid #E2E5E8; background: #fff; font-size: 0.78rem; color: var(--muted); }
.chip:hover { border-color: var(--slate); color: var(--text); }
.chip.active { background: var(--text); border-color: var(--text); color: #fff; }
.contacts { display: grid; gap: 8px; }
.contact {
  display: grid; grid-template-columns: 40px 1fr auto; gap: 14px; align-items: center; width: 100%; text-align: left;
  padding: 12px 14px; background: #fff; border: 1px solid #E2E5E8; border-radius: 12px;
  transition: border-color .2s, box-shadow .25s var(--ease);
}
.contact:hover { border-color: #C3C8CE; box-shadow: 0 8px 20px rgba(22, 25, 29, 0.05); }
.contact.req { border-left: 3px solid var(--slate); }
.c-av { width: 40px; height: 40px; border-radius: 50%; background: var(--slate-soft); color: var(--slate-dark); display: grid; place-items: center; font-weight: 600; font-size: 0.8rem; }
.contact h5 { font-size: 0.9rem; font-weight: 600; }
.contact p { font-size: 0.76rem; color: var(--muted); }
.c-meta { display: flex; flex-wrap: wrap; gap: 4px 10px; margin-top: 4px; font-size: 0.72rem; color: var(--faint); }
.c-side { display: grid; justify-items: end; gap: 6px; }
.c-req { font-size: 0.7rem; color: var(--slate-dark); font-weight: 500; }

/* Evaluación de la sesión */
.session-head { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; margin-bottom: 12px; }
.live { display: inline-flex; align-items: center; gap: 6px; font-size: 0.72rem; color: var(--ok); font-weight: 500; }
.live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--ok); animation: blink 1.6s infinite; }
@keyframes blink { 50% { opacity: .25; } }
.groups { display: grid; gap: 8px; }
.group { display: grid; grid-template-columns: 1fr auto auto; gap: 14px; align-items: center; padding: 12px 14px; background: #fff; border: 1px solid #E2E5E8; border-radius: 12px; }
.group h5 { font-size: 0.88rem; font-weight: 600; }
.group p { font-size: 0.74rem; color: var(--muted); }
.file { display: inline-flex; align-items: center; gap: 6px; font-size: 0.74rem; color: var(--muted); }
.file i { font-style: normal; font-family: var(--mono); font-size: 0.56rem; padding: 3px 4px; border-radius: 3px; background: var(--slate-soft); color: var(--slate-dark); }
.grade-pill { font-family: var(--mono); font-size: 0.8rem; font-weight: 500; padding: 6px 10px; border-radius: 8px; background: #E4ECE8; color: var(--ok); }
.session-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 14px; padding: 14px; border: 1px dashed #CDD2D7; border-radius: 12px; font-size: 0.8rem; color: var(--muted); }
.session-foot b { color: var(--text); }

.pbtn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 34px; padding: 0 14px; border-radius: 8px; font-size: 0.8rem; font-weight: 500;
  background: var(--text); color: #fff; transition: background .2s, opacity .2s; white-space: nowrap;
}
.pbtn:hover { background: #2E343B; }
.pbtn.secondary { background: #fff; color: var(--text); border: 1px solid #E2E5E8; }
.pbtn.secondary:hover { border-color: var(--slate); }
.pbtn[disabled] { opacity: 0.35; pointer-events: none; }
.pbtn svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.pbtn.block { width: 100%; height: 42px; }
.pbtn.sm { height: 30px; padding: 0 10px; font-size: 0.76rem; }

/* Drawer */
.drawer {
  position: absolute; top: 0; right: 0; bottom: 0; width: min(400px, 100%); z-index: 5;
  background: #fff; border-left: 1px solid #E2E5E8; box-shadow: -24px 0 60px rgba(22, 25, 29, 0.1);
  transform: translateX(105%); transition: transform .5s var(--ease); display: flex; flex-direction: column;
}
.drawer.open { transform: translateX(0); }
.dr-head { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 1px solid #E2E5E8; }
.icon-btn { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; color: var(--muted); }
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.icon-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }
.dr-body { flex: 1; overflow-y: auto; padding: 20px; }
.dr-person { display: flex; gap: 14px; align-items: center; margin-bottom: 16px; }
.dr-person .c-av { width: 52px; height: 52px; font-size: 1rem; }
.dr-body h4 { font-size: 1.1rem; font-weight: 600; line-height: 1.25; letter-spacing: -0.015em; }
.dr-body .who { font-size: 0.8rem; color: var(--muted); }
.proposal { padding: 14px; border-radius: 12px; background: var(--surface-2); margin-bottom: 16px; }
.proposal h6 { font-family: var(--mono); font-weight: 400; font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--slate); margin-bottom: 6px; }
.proposal b { display: block; font-size: 0.95rem; margin-bottom: 4px; }
.proposal p { font-size: 0.8rem; color: var(--muted); }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: #E2E5E8; border: 1px solid #E2E5E8; border-radius: 10px; overflow: hidden; margin-bottom: 16px; }
.facts div { background: #fff; padding: 10px 12px; }
.facts dt { font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); font-family: var(--mono); }
.facts dd { font-size: 0.84rem; font-weight: 500; margin-top: 2px; }
.dr-sec { margin-bottom: 16px; }
.dr-sec h6 { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); font-family: var(--mono); font-weight: 400; margin-bottom: 8px; }
.dr-sec ul { list-style: none; display: grid; gap: 6px; }
.dr-sec li { position: relative; padding-left: 16px; font-size: 0.84rem; }
.dr-sec li::before { content: ""; position: absolute; left: 0; top: 0.6em; width: 7px; height: 1px; background: var(--slate); }
.dr-foot { padding: 16px 20px; border-top: 1px solid #E2E5E8; display: grid; gap: 8px; }
.dr-foot small { text-align: center; color: var(--muted); font-size: 0.72rem; }

/* Modal y rúbrica */
.modal {
  position: absolute; inset: 40px 0 0 0; z-index: 20; display: grid; place-items: center; padding: 16px;
  background: rgba(22, 25, 29, 0.28); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
  opacity: 0; visibility: hidden; transition: opacity .3s var(--ease), visibility .3s;
}
.modal.open { opacity: 1; visibility: visible; }
.modal-card {
  width: min(560px, 100%); max-height: 100%; overflow-y: auto; padding: 22px 24px; border-radius: 16px; background: #fff; color: var(--text);
  box-shadow: 0 30px 80px rgba(22, 25, 29, 0.25);
  transform: translateY(12px) scale(.98); transition: transform .4s var(--ease);
}
.modal.open .modal-card { transform: none; }
.modal-card.narrow { width: min(380px, 100%); text-align: center; }
.modal-card h4 { font-size: 1.1rem; font-weight: 600; margin-bottom: 4px; }
.modal-card > p { font-size: 0.82rem; color: var(--muted); margin-bottom: 14px; }
.rb-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.timer { font-family: var(--mono); font-size: 0.75rem; color: var(--slate-dark); padding: 5px 8px; border-radius: 6px; background: var(--surface-2); white-space: nowrap; }
.rubric { display: grid; gap: 10px; margin-bottom: 14px; }
.crit { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; align-items: center; padding-bottom: 10px; border-bottom: 1px solid #EEF0F2; }
.crit-name { font-size: 0.84rem; font-weight: 500; }
.crit-name small { display: block; font-weight: 400; font-size: 0.72rem; color: var(--faint); }
.levels { display: flex; gap: 4px; }
.levels button { height: 30px; min-width: 38px; padding: 0 8px; border-radius: 7px; border: 1px solid #E2E5E8; font-size: 0.72rem; color: var(--muted); transition: all .15s; }
.levels button:hover { border-color: var(--slate); color: var(--text); }
.levels button.on { background: var(--text); border-color: var(--text); color: #fff; }
.comments { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.comments button { height: 28px; padding: 0 10px; border-radius: 14px; border: 1px solid #E2E5E8; font-size: 0.74rem; color: var(--muted); }
.comments button.on { border-color: var(--slate); background: var(--slate-soft); color: var(--text); }
.rb-foot { display: grid; grid-template-columns: auto 1fr; gap: 16px; align-items: center; }
.rb-grade { font-size: 2.2rem; font-weight: 600; letter-spacing: -0.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.rb-grade small { font-size: 0.9rem; color: var(--muted); font-weight: 400; }
.ok-mark { width: 64px; height: 64px; margin: 6px auto 16px; border-radius: 50%; border: 1px solid var(--ok); display: grid; place-items: center; }
.ok-mark svg { width: 28px; height: 28px; fill: none; stroke: var(--ok); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 30; stroke-dashoffset: 30; animation: tick .6s .1s var(--ease) forwards; }
@keyframes tick { to { stroke-dashoffset: 0; } }

/* Toasts */
.toasts { position: absolute; right: 16px; bottom: 16px; z-index: 30; display: grid; gap: 8px; pointer-events: none; }
.toast { display: flex; align-items: center; gap: 10px; min-width: 240px; max-width: 330px; padding: 12px 14px; border-radius: 10px; background: var(--text); color: #fff; font-size: 0.8rem; box-shadow: 0 14px 40px rgba(22, 25, 29, 0.3); }
.toast svg { width: 16px; height: 16px; flex: none; fill: none; stroke: #C9CED4; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.toast small { display: block; color: #A9B0B9; font-size: 0.72rem; }

/* Pista del siguiente paso */
.hint { position: relative; }
.hint::after { content: ""; position: absolute; inset: -4px; border-radius: inherit; pointer-events: none; border: 1.5px solid var(--slate); animation: hint 1.6s ease-out infinite; }
@keyframes hint { 0% { opacity: .9; transform: scale(1); } 100% { opacity: 0; transform: scale(1.04); } }

/* Cursor de la demo */
.cursor { position: absolute; left: 0; top: 0; z-index: 40; width: 26px; height: 26px; pointer-events: none; opacity: 0; }
.cursor svg { width: 100%; height: 100%; fill: #16191D; stroke: #fff; stroke-width: 1.4; stroke-linejoin: round; filter: drop-shadow(0 4px 8px rgba(0, 0, 0, .25)); }
.cursor::before { content: ""; position: absolute; left: -14px; top: -14px; width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--slate); opacity: 0; transform: scale(.4); }
.cursor.click::before { animation: ripple .5s ease-out; }
@keyframes ripple { 0% { opacity: 1; transform: scale(.4); } 100% { opacity: 0; transform: scale(1.4); } }

/* ---------- Footer y capítulos ---------- */
.footer { position: relative; z-index: 1; border-top: 1px solid var(--line); background: var(--surface); padding: 36px 0; color: var(--muted); font-size: 0.9rem; }
.footer-inner { display: flex; align-items: center; gap: 24px; }
.footer-logo { width: 64px; height: 64px; }
.footer b { color: var(--text); }
.footer-inner p.mono { color: var(--faint); margin-top: 4px; }
.footer-keys { margin-left: auto; color: var(--faint); }

.chapters { position: fixed; right: 22px; top: 50%; transform: translateY(-50%); z-index: 40; display: grid; gap: 14px; }
.chapters a { display: flex; align-items: center; justify-content: flex-end; gap: 10px; flex-direction: row-reverse; }
.chapters i { width: 7px; height: 7px; border-radius: 50%; border: 1px solid var(--slate); transition: all .3s var(--ease); }
.chapters span { font-family: var(--mono); font-size: 0.68rem; color: var(--muted); opacity: 0; transform: translateX(6px); transition: all .3s var(--ease); }
.chapters a:hover span, .chapters a.active span { opacity: 1; transform: none; }
.chapters a.active i { background: var(--slate-dark); border-color: var(--slate-dark); transform: scale(1.3); }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .sim-layout { grid-template-columns: 1fr; }
  .guide { position: relative; top: 0; }
  .steps { grid-template-columns: repeat(4, 1fr); gap: 8px; }
  .steps li { grid-template-columns: 1fr; padding: 0; }
  .steps li::after { display: none; }
  .steps li span { display: none; }
  .steps li b { font-size: 0.78rem; }
  .guide-actions { max-width: 360px; }
  .ods-grid { grid-template-columns: 1fr; }
  .kpis { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
  .nav-tag, .chapters { display: none; }
  .crow, .compare-head { grid-template-columns: 1fr; gap: 8px; }
  .compare-head > div:nth-child(2), .compare-head > div:last-child, .cm { display: none; }
  .cl, .cr { grid-template-columns: 110px 1fr; }
  .cr { margin: 0; }
  .pillar { grid-template-columns: 1fr; min-height: auto; }
  .pillar-art { max-height: 180px; }
  .portal { grid-template-columns: 1fr; grid-template-rows: auto 1fr; height: 720px; }
  .p-side { flex-direction: row; align-items: center; gap: 8px; padding: 8px; border-right: 0; border-bottom: 1px solid #E2E5E8; overflow-x: auto; }
  .p-brand div, .p-user { display: none; }
  .p-nav { display: flex; gap: 2px; }
  .p-nav button { width: auto; white-space: nowrap; }
  .dash-grid { grid-template-columns: 1fr; }
  .group { grid-template-columns: 1fr auto; }
  .group .file { display: none; }
  .footer-inner { flex-wrap: wrap; }
  .footer-keys { display: none; }
  .flow-node text { font-size: 22px; }
  .caption-note { margin-left: 0; }
}
@media (max-width: 560px) {
  .nav-links a { padding: 6px 9px; font-size: 0.78rem; }
  .nav-links a span { display: none; }
  .nav-brand img { height: 22px; }
  .compare-pin { padding-top: 80px; }
  .crow { padding: 8px 0; }
  .cl p, .cr p { font-size: 0.95rem; }
  .cl, .cr { grid-template-columns: 1fr; gap: 2px; }
  .ods { grid-template-columns: 1fr; gap: 8px; }
  .ods-num { font-size: 5rem; }
  .p-view { padding: 18px 14px 28px; }
  .p-course span { display: none; }
  .steps li b { display: none; }
  .url { display: none; }
  .crit { grid-template-columns: 1fr; }
  .levels button { min-width: 0; flex: 1; }
  .contact { grid-template-columns: 36px 1fr; }
  .c-side { grid-column: 1 / -1; justify-items: start; grid-auto-flow: column; }
}

@media (max-width: 480px) {
  .nav { justify-content: center; }
  .nav-brand { display: none; }
}
