/* ClaseSigue – Ruta por Cali · Creado por Diego Javier Mancera Dávila */
:root {
  --azul: #123B6D;
  --azul-2: #1E5BB8;
  --turquesa: #0E8F8F;
  --turquesa-claro: #E3F4F3;
  --amarillo: #F5B731;
  --amarillo-claro: #FFF5DC;
  --rojo: #C23B2C;
  --rojo-claro: #FCE9E6;
  --verde: #1F8A4C;
  --verde-claro: #E4F4EA;
  --fondo: #F4F7FB;
  --tarjeta: #FFFFFF;
  --texto: #18222F;
  --suave: #5A6778;
  --borde: #DCE3EC;
  --sombra: 0 1px 2px rgba(18, 59, 109, .06), 0 8px 24px rgba(18, 59, 109, .08);
  --radio: 16px;
  --fs: 16px;
  font-size: var(--fs);
}
html.letra-1 { --fs: 18px; }
html.letra-2 { --fs: 20px; }
html.contraste {
  --azul: #000; --azul-2: #0033CC; --turquesa: #005A5A; --turquesa-claro: #fff;
  --amarillo: #FFD200; --amarillo-claro: #fff; --rojo: #A00000; --rojo-claro: #fff;
  --verde: #005A1E; --verde-claro: #fff; --fondo: #fff; --tarjeta: #fff;
  --texto: #000; --suave: #1a1a1a; --borde: #000; --sombra: none;
}
html.contraste .card, html.contraste .panel, html.contraste .role-card, html.contraste .btn { border: 2px solid #000; }

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0; background: var(--fondo); color: var(--texto);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.55; -webkit-font-smoothing: antialiased;
  min-height: 100vh; display: flex; flex-direction: column;
}
svg { width: 1.25em; height: 1.25em; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
#mapa { stroke: none; fill: none; stroke-width: 0; width: 100%; height: auto; }
#main:focus, #main:focus-visible { outline: none; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5rem; color: var(--azul); letter-spacing: -.01em; }
h1 { font-size: clamp(1.5rem, 1.1rem + 1.8vw, 2.25rem); }
h2 { font-size: 1.3rem; }
h3 { font-size: 1.05rem; }
p { margin: 0 0 .75rem; }
.muted { color: var(--suave); }
.hint { color: var(--suave); font-size: .875rem; display: block; margin-top: .35rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.skip { position: absolute; left: -999px; top: 0; background: var(--azul); color: #fff; padding: .6rem 1rem; z-index: 99; }
.skip:focus { left: .5rem; }
:focus-visible { outline: 3px solid var(--amarillo); outline-offset: 2px; border-radius: 6px; }

/* Barra superior */
.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .65rem clamp(1rem, 4vw, 2.5rem); background: rgba(255,255,255,.92); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--borde);
}
html.contraste .topbar { background: #fff; border-bottom: 2px solid #000; }
.brand { display: flex; align-items: center; gap: .6rem; background: none; border: 0; cursor: pointer; padding: 0; font: inherit; color: var(--azul); text-align: left; }
.brand strong { display: block; font-size: 1.15rem; }
.brand small { display: block; font-size: .75rem; color: var(--suave); margin-top: -2px; }
.a11y { display: flex; align-items: center; gap: .35rem; }
.tool {
  display: inline-flex; flex-direction: column; align-items: center; gap: 2px; min-width: 56px; padding: .35rem .5rem;
  background: none; border: 1px solid transparent; border-radius: 10px; color: var(--azul); font: inherit; font-size: .7rem; cursor: pointer;
}
.tool:hover { background: var(--turquesa-claro); }
.tool[aria-pressed="true"] { background: var(--azul); color: #fff; }
.net { display: inline-flex; align-items: center; gap: .3rem; font-size: .72rem; padding: .25rem .55rem; border-radius: 99px; background: var(--verde-claro); color: var(--verde); font-weight: 600; margin-right: .3rem; }
.net.off { background: var(--amarillo-claro); color: #8A5A00; }
.net::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }

main { flex: 1; width: 100%; max-width: 1180px; margin: 0 auto; padding: clamp(1rem, 3vw, 2rem) clamp(1rem, 4vw, 2.5rem) 2rem; outline: none; }
.view.narrow { max-width: 620px; margin: 0 auto; }
.eyebrow { display: inline-block; font-size: .78rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--turquesa); margin-bottom: .35rem; }
.lead { font-size: 1.1rem; color: var(--suave); max-width: 52ch; }

/* Botones */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 46px; padding: .6rem 1.1rem;
  border-radius: 12px; border: 1px solid transparent; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none;
  transition: transform .12s ease, background .15s ease, box-shadow .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--azul); color: #fff; box-shadow: 0 4px 12px rgba(18,59,109,.25); }
.btn-primary:hover { background: var(--azul-2); }
.btn-ghost { background: var(--tarjeta); color: var(--azul); border-color: var(--borde); }
.btn-ghost:hover { border-color: var(--azul-2); background: #F0F5FC; }
.btn.small { min-height: 38px; padding: .4rem .8rem; font-size: .875rem; }
.btn-block, .btn.block { width: 100%; }
.back { display: inline-flex; align-items: center; gap: .35rem; background: none; border: 0; color: var(--azul-2); font: inherit; font-weight: 600; cursor: pointer; padding: .3rem 0; margin-bottom: .8rem; }
.actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.25rem; }
.actions.center { justify-content: center; }

/* Tarjetas */
.card, .panel { background: var(--tarjeta); border-radius: var(--radio); box-shadow: var(--sombra); padding: clamp(1.1rem, 3vw, 1.75rem); margin-bottom: 1.25rem; border: 1px solid var(--borde); }
.card.center { text-align: center; }
.panel-title { display: block; font-size: 1.05rem; font-weight: 700; color: var(--azul); margin-bottom: .75rem; }

/* Hero */
.hero { display: grid; grid-template-columns: 1.2fr .8fr; gap: 2rem; align-items: center; background: linear-gradient(135deg, #fff 0%, var(--turquesa-claro) 100%); border-radius: 24px; padding: clamp(1.25rem, 4vw, 2.75rem); border: 1px solid var(--borde); margin-bottom: 2rem; }
.hero-img { width: 100%; max-width: 420px; height: auto; border-radius: 20px; justify-self: end; box-shadow: var(--sombra); background: #fff; }
.chips { list-style: none; padding: 0; margin: 1.25rem 0 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.chips li { display: inline-flex; align-items: center; gap: .4rem; background: #fff; border: 1px solid var(--borde); padding: .4rem .75rem; border-radius: 99px; font-size: .85rem; font-weight: 600; color: var(--azul); }
.chips svg { color: var(--turquesa); }
.section-title { margin-bottom: 1rem; }

/* Roles */
.roles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.role-card {
  display: flex; align-items: center; gap: 1rem; text-align: left; background: var(--tarjeta); border: 1px solid var(--borde); border-radius: var(--radio);
  padding: 1.1rem; box-shadow: var(--sombra); cursor: pointer; font: inherit; color: var(--texto); transition: transform .15s ease, border-color .15s ease;
}
.role-card:hover { transform: translateY(-3px); border-color: var(--azul-2); }
.role-card strong { display: block; color: var(--azul); font-size: 1.1rem; margin-bottom: .2rem; }
.role-card .role-body span { font-size: .9rem; color: var(--suave); }
.role-card .go { color: var(--azul-2); margin-left: auto; }
.role-photo { width: 72px; height: 72px; border-radius: 16px; object-fit: cover; flex-shrink: 0; background: var(--turquesa-claro); }
.role-icon { width: 72px; height: 72px; border-radius: 16px; display: grid; place-items: center; flex-shrink: 0; }
.role-icon svg { width: 36px; height: 36px; }
.role-icon.est { background: var(--amarillo-claro); color: #9A6400; }
.role-icon.big { margin: 0 auto 1rem; }
.install { display: flex; align-items: center; gap: 1rem; margin-top: 1.5rem; padding: 1rem 1.25rem; background: var(--azul); color: #fff; border-radius: var(--radio); }
.install p { margin: 0; flex: 1; }
.install .btn-primary { background: var(--amarillo); color: var(--azul); }

/* Formularios */
label { display: block; font-weight: 600; margin: 1rem 0 .35rem; color: var(--azul); }
input, textarea {
  width: 100%; font: inherit; padding: .75rem .9rem; border: 1.5px solid var(--borde); border-radius: 12px; background: #fff; color: var(--texto);
}
input:focus, textarea:focus { border-color: var(--azul-2); outline: none; box-shadow: 0 0 0 4px rgba(30,91,184,.15); }
textarea { resize: vertical; font-family: ui-monospace, Consolas, monospace; font-size: .9rem; }
.error { color: var(--rojo); font-weight: 600; min-height: 1.4em; margin: .6rem 0; }
form .btn-block { margin-top: .5rem; }
.center > .role-icon { margin-inline: auto; }
#view-ingreso .card { text-align: left; }
#view-ingreso .card > .role-icon { margin: 0 0 1rem; }

/* Mapa */
.view-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.progress-ring { display: flex; align-items: center; gap: .75rem; background: var(--tarjeta); border: 1px solid var(--borde); border-radius: 14px; padding: .6rem 1rem; box-shadow: var(--sombra); }
.progress-ring .bar { width: 160px; height: 10px; background: var(--borde); border-radius: 99px; overflow: hidden; }
.progress-ring .bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--turquesa), var(--azul-2)); border-radius: 99px; transition: width .4s ease; }
.map-wrap { position: relative; background: #EAF3EC; border-radius: 22px; border: 1px solid var(--borde); overflow: hidden; box-shadow: var(--sombra); }
#mapa { width: 100%; height: auto; display: block; }
.map-note { position: absolute; right: .8rem; bottom: .6rem; font-size: .72rem; color: var(--suave); background: rgba(255,255,255,.85); padding: .15rem .5rem; border-radius: 6px; }
.st-pin { cursor: pointer; }
.st-pin:focus { outline: none; }
.st-pin:focus .st-circle { stroke: var(--amarillo); stroke-width: 6; }
.st-pin.locked { cursor: not-allowed; }
.st-pulse { animation: pulse 1.8s ease-out infinite; transform-origin: center; transform-box: fill-box; }
@keyframes pulse { 0% { opacity: .6; transform: scale(1); } 100% { opacity: 0; transform: scale(1.9); } }
@media (prefers-reduced-motion: reduce) { .st-pulse { animation: none; } * { transition: none !important; } }
.station-list { display: grid; grid-template-columns: repeat(5, 1fr); gap: .75rem; margin-top: 1.25rem; }
.station {
  background: var(--tarjeta); border: 1px solid var(--borde); border-radius: 14px; padding: .85rem; text-align: left; font: inherit; color: var(--texto); cursor: pointer; box-shadow: var(--sombra);
  display: flex; flex-direction: column; gap: .25rem;
}
.station:disabled { cursor: not-allowed; opacity: .6; box-shadow: none; }
.station .num { font-size: .72rem; font-weight: 700; color: var(--turquesa); text-transform: uppercase; letter-spacing: .05em; }
.station strong { color: var(--azul); font-size: .95rem; }
.station .state { display: inline-flex; align-items: center; gap: .3rem; font-size: .78rem; font-weight: 600; margin-top: .2rem; }
.state.done { color: var(--verde); }
.state.next { color: #9A6400; }
.state.lock { color: var(--suave); }

/* Reto */
.reto-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; margin-bottom: 1rem; }
.reto-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 1.25rem; align-items: start; }
.objective { display: flex; gap: .75rem; background: var(--amarillo-claro); border-radius: 12px; padding: .8rem 1rem; margin-bottom: .75rem; }
.objective svg { color: #9A6400; margin-top: .15rem; }
.objective p { margin: 0; }
.concept { border: 1px solid var(--borde); border-radius: 12px; padding: .7rem 1rem; margin-bottom: .75rem; }
.concept summary { display: flex; gap: .5rem; align-items: center; font-weight: 700; color: var(--azul); cursor: pointer; }
.concept summary svg { color: var(--turquesa); }
.concept p { margin: .5rem 0 0; color: var(--suave); }
.instruction { font-weight: 600; }
.board-wrap { display: flex; flex-direction: column; align-items: center; gap: .75rem; }
.board {
  --n: 6; display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); grid-template-rows: repeat(var(--n), minmax(0, 1fr)); height: auto; gap: 4px; width: min(100%, 380px); aspect-ratio: 1;
  background: #CFD9E4; padding: 6px; border-radius: 14px; position: relative;
}
.cell { background: #fff; border-radius: 8px; position: relative; display: grid; place-items: center; min-width: 0; min-height: 0; overflow: hidden; }
.cell.block { background: repeating-linear-gradient(45deg, #F2C14E 0 7px, #3A3A3A 7px 14px); }
.cell.start { background: var(--turquesa-claro); }
.cell.goal { background: var(--amarillo-claro); box-shadow: inset 0 0 0 3px var(--amarillo); }
.cell.goal svg { color: var(--rojo); width: 55%; height: auto; aspect-ratio: 1; }
.cell.trail { background: #DCEBFF; }
.cell.crash { background: var(--rojo-claro); box-shadow: inset 0 0 0 3px var(--rojo); }
.avatar {
  position: absolute; width: calc((100% - 12px - 5 * 4px) / var(--n)); aspect-ratio: 1; display: grid; place-items: center;
  transition: left .28s ease, top .28s ease; pointer-events: none; z-index: 2;
}
.avatar span { width: 78%; height: 78%; border-radius: 50%; background: var(--azul-2); border: 3px solid #fff; box-shadow: 0 3px 8px rgba(0,0,0,.25); display: grid; place-items: center; color: #fff; font-weight: 800; font-size: .9rem; }
.avatar.shake span { animation: shake .4s; background: var(--rojo); }
@keyframes shake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
.legend { list-style: none; padding: 0; margin: 0; display: flex; gap: 1rem; font-size: .82rem; color: var(--suave); flex-wrap: wrap; justify-content: center; }
.legend li { display: inline-flex; align-items: center; gap: .35rem; }
.lg { width: 16px; height: 16px; border-radius: 4px; display: inline-block; }
.lg-start { background: var(--turquesa-claro); border: 2px solid var(--turquesa); }
.lg-goal { background: var(--amarillo-claro); border: 2px solid var(--amarillo); }
.lg-block { background: repeating-linear-gradient(45deg, #F2C14E 0 4px, #3A3A3A 4px 8px); }
.pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; max-width: 320px; margin: 0 auto 1rem; }
.arrow {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .15rem; min-height: 64px; border-radius: 14px;
  border: 1.5px solid var(--borde); background: #fff; color: var(--azul); cursor: pointer; font: inherit; box-shadow: 0 2px 0 var(--borde);
}
.arrow svg { width: 26px; height: 26px; stroke-width: 2.6; }
.arrow small { font-size: .72rem; font-weight: 600; }
.arrow:hover { border-color: var(--azul-2); background: #F0F5FC; }
.arrow:active { transform: translateY(2px); box-shadow: none; }
.counter { text-align: center; font-size: .85rem; color: var(--suave); margin-bottom: .5rem; }
.counter.over { color: var(--rojo); font-weight: 700; }
.program { list-style: none; padding: .6rem; margin: 0 0 1rem; min-height: 72px; display: flex; flex-wrap: wrap; gap: .45rem; background: var(--fondo); border: 1.5px dashed var(--borde); border-radius: 12px; counter-reset: paso; }
.program:empty::before { content: "Tu algoritmo está vacío. Agrega pasos con las flechas."; color: var(--suave); font-size: .875rem; padding: .3rem; }
.blk {
  counter-increment: paso; display: inline-flex; align-items: center; gap: .3rem; background: var(--azul); color: #fff; border-radius: 10px;
  padding: .35rem .55rem; font-weight: 700; font-size: .85rem; cursor: pointer; border: 2px solid transparent; position: relative;
}
.blk::before { content: counter(paso); font-size: .65rem; background: rgba(255,255,255,.25); border-radius: 6px; padding: 0 .3rem; }
.blk svg { width: 16px; height: 16px; stroke-width: 2.8; }
.blk .times { background: var(--amarillo); color: var(--azul); border-radius: 6px; padding: 0 .35rem; font-size: .78rem; }
.blk.sel { border-color: var(--amarillo); box-shadow: 0 0 0 3px rgba(245,183,49,.35); }
.blk.running { background: var(--turquesa); transform: scale(1.06); }
.blk.bad { background: var(--rojo); }
.blk-ctrl { display: inline-flex; gap: .2rem; margin-left: .2rem; }
.blk-ctrl button { width: 26px; height: 26px; border-radius: 7px; border: 0; background: #fff; color: var(--azul); display: grid; place-items: center; cursor: pointer; }
.blk-ctrl button svg { width: 14px; height: 14px; }
.run-row { display: flex; gap: .5rem; flex-wrap: wrap; }
.run-row .btn-primary { flex: 1; }
.feedback { margin-top: 1rem; border-radius: 12px; padding: 0; }
.feedback:not(:empty) { padding: .85rem 1rem; }
.feedback.ok { background: var(--verde-claro); color: var(--verde); }
.feedback.bad { background: var(--rojo-claro); color: var(--rojo); }
.feedback.info { background: var(--amarillo-claro); color: #7A4F00; }
.feedback strong { display: block; margin-bottom: .2rem; }
.feedback p { margin: 0; color: var(--texto); }
.kbd-hint { font-size: .78rem; color: var(--suave); margin: .9rem 0 0; }

/* Logro y modal */
.badge-big { width: 76px; height: 76px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto 1rem; background: var(--amarillo-claro); color: #B47800; }
.badge-big svg { width: 38px; height: 38px; }
.badge-big.ok { background: var(--verde-claro); color: var(--verde); }
.code { font-family: ui-monospace, Consolas, monospace; font-size: clamp(1.3rem, 1rem + 2vw, 2rem); font-weight: 800; letter-spacing: .06em; color: var(--azul); background: var(--fondo); border: 2px dashed var(--azul-2); border-radius: 14px; padding: 1rem; margin: 1rem 0; word-break: break-all; }
.modal { position: fixed; inset: 0; background: rgba(10,25,45,.55); display: grid; place-items: center; padding: 1rem; z-index: 50; }
.modal-card { background: var(--tarjeta); border-radius: 20px; padding: 1.75rem; max-width: 480px; width: 100%; text-align: center; box-shadow: 0 20px 60px rgba(0,0,0,.3); animation: pop .25s ease; }
@keyframes pop { from { transform: scale(.94); opacity: 0; } }
.stars { display: flex; justify-content: center; gap: .3rem; margin: .25rem 0 .75rem; color: var(--amarillo); }
.stars svg { width: 30px; height: 30px; }
.stars svg.on { fill: var(--amarillo); }
.stars svg.off { color: var(--borde); }
.fact { display: flex; gap: .6rem; text-align: left; background: var(--turquesa-claro); border-radius: 12px; padding: .85rem 1rem; }
.fact svg { color: var(--turquesa); margin-top: .2rem; }
.fact p { margin: 0; font-size: .92rem; }
.toast { position: fixed; left: 50%; bottom: 1.5rem; transform: translateX(-50%) translateY(150%); background: var(--azul); color: #fff; padding: .75rem 1.2rem; border-radius: 12px; font-weight: 600; transition: transform .25s ease, opacity .25s ease; z-index: 60; max-width: 90vw; opacity: 0; visibility: hidden; }
.toast.show { transform: translateX(-50%) translateY(0); opacity: 1; visibility: visible; }

/* Docente */
.doc-grid { display: grid; grid-template-columns: .85fr 1.15fr; gap: 1.25rem; align-items: start; }
.doc-tools { margin-top: 1.5rem; border-top: 1px solid var(--borde); padding-top: 1rem; display: grid; gap: .5rem; }
.empty { text-align: center; color: var(--suave); padding: 2rem 1rem; }
.empty svg { width: 48px; height: 48px; color: var(--borde); margin-bottom: .5rem; }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: .6rem; margin-bottom: 1.25rem; }
.kpi { background: var(--fondo); border-radius: 12px; padding: .8rem; }
.kpi b { display: block; font-size: 1.6rem; color: var(--azul); line-height: 1.1; }
.kpi span { font-size: .78rem; color: var(--suave); }
.bars { display: grid; gap: .5rem; margin-bottom: 1.25rem; }
.bar-row { display: grid; grid-template-columns: 130px 1fr 44px; align-items: center; gap: .6rem; font-size: .85rem; }
.bar-row .track { height: 12px; background: var(--fondo); border-radius: 99px; overflow: hidden; }
.bar-row .fill { height: 100%; background: linear-gradient(90deg, var(--turquesa), var(--azul-2)); border-radius: 99px; }
.bar-row.alert .fill { background: linear-gradient(90deg, #E9A23B, var(--rojo)); }
.alert-box { display: flex; gap: .6rem; background: var(--amarillo-claro); border-radius: 12px; padding: .8rem 1rem; margin-bottom: 1rem; font-size: .92rem; }
.alert-box svg { color: #9A6400; margin-top: .15rem; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .88rem; }
th, td { padding: .55rem .5rem; text-align: left; border-bottom: 1px solid var(--borde); }
th { color: var(--suave); font-weight: 600; font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; }
.dots { display: inline-flex; gap: 3px; }
.dots i { width: 14px; height: 14px; border-radius: 4px; background: var(--borde); display: inline-block; }
.dots i.d { background: var(--verde); }
.dots i.h { background: var(--amarillo); }
.tag { display: inline-block; padding: .15rem .5rem; border-radius: 99px; font-size: .75rem; font-weight: 700; }
.tag.ok { background: var(--verde-claro); color: var(--verde); }
.tag.mid { background: #E7EEF9; color: var(--azul-2); }
.tag.help { background: var(--rojo-claro); color: var(--rojo); }

/* Familia */
.fam-head { display: flex; align-items: center; gap: 1rem; margin-bottom: .75rem; }
.fam-head img { border-radius: 16px; object-fit: cover; background: var(--turquesa-claro); }
.steps { padding-left: 1.2rem; }
.steps li { margin-bottom: .5rem; }
.fam-res { margin-top: 1.25rem; border-top: 1px solid var(--borde); padding-top: 1.25rem; }
.fam-list { list-style: none; padding: 0; margin: 0 0 1rem; display: grid; gap: .45rem; }
.fam-list li { display: flex; gap: .6rem; align-items: flex-start; }
.fam-list svg { margin-top: .2rem; }
.fam-list .si { color: var(--verde); }
.fam-list .no { color: var(--suave); }

/* Pie */
.footer { text-align: center; padding: 1.5rem 1rem 2rem; font-size: .85rem; border-top: 1px solid var(--borde); background: var(--tarjeta); }
.footer p { margin: .2rem 0; }

#print-area { display: none; }

/* Responsive */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; }
  .hero-img { justify-self: center; max-width: 340px; }
  .roles { grid-template-columns: 1fr; }
  .reto-grid, .doc-grid { grid-template-columns: 1fr; }
  .station-list { grid-template-columns: repeat(2, 1fr); }
  .kpis { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .tool span { display: none; }
  .tool { min-width: 42px; }
  .net { font-size: 0; padding: .35rem; }
  .brand small { display: none; }
  .bar-row { grid-template-columns: 100px 1fr 40px; }
}

/* Impresión */
@media print {
  body > *:not(#print-area) { display: none !important; }
  #print-area { display: block !important; color: #000; font-family: Arial, sans-serif; }
  .pr-page { page-break-after: always; }
  .pr-head { display: flex; align-items: center; gap: 10px; border-bottom: 2px solid #000; padding-bottom: 6px; margin-bottom: 10px; }
  .pr-head img { width: 32px; height: 32px; }
  .pr-head h1 { font-size: 18pt; margin: 0; color: #000; }
  .pr-retos { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
  .pr-reto { border: 1.5px solid #000; border-radius: 8px; padding: 8px; break-inside: avoid; }
  .pr-reto h3 { margin: 0 0 4px; font-size: 11pt; color: #000; }
  .pr-reto p { font-size: 9pt; margin: 0 0 6px; }
  .pr-grid { border-collapse: collapse; margin: 0 auto 6px; }
  .pr-grid td { width: 26px; height: 26px; border: 1px solid #000; text-align: center; font-weight: bold; font-size: 10pt; padding: 0; }
  .pr-grid td.x { background: #bbb; }
  .pr-lines { border-bottom: 1px solid #000; height: 18px; }
  .pr-foot { font-size: 8pt; margin-top: 10px; }
}
