/* ==========================================================
   Assessment Canal Moderno — Sintec
   Alto contraste (modo creativo): negro + azules Sintec, gradiente Electric<->Classic, patrón del isotipo.
   Reglas: Bebas Neue (display) + Montserrat (texto), 2 colores de texto
   (--ink, --muted); el azul solo marca acento y selección.
   ========================================================== */
:root {
  /* Paleta Sintec (Brandbook 2026) */
  --electric: #0108ff;   /* Electric Blue */
  --indigo: #0053e2;     /* Trust Indigo */
  --classic: #162279;    /* Classic Blue */
  --cyan: #00c2ff;
  --gray: #e5e6e7;

  --bg: #000000;          /* Nivel 0 */
  --bg-raise: #111629;    /* Nivel 2: elemento elevado */
  --surface: #0a0d1a;     /* Nivel 1 */
  --ink: #ffffff;
  --muted: #b0bce6;
  --line: rgba(255, 255, 255, .12);
  --line-strong: rgba(255, 255, 255, .3);
  --accent: var(--electric);
  --accent-ink: #ffffff;
  /* Gradientes aprobados: Electric Blue <-> Classic Blue */
  --grad: linear-gradient(90deg, #162279 0%, #0108ff 100%);
  --grad-btn: linear-gradient(135deg, #0108ff 0%, #162279 130%);
  --grad-v: linear-gradient(0deg, #162279 0%, #0108ff 100%);
  --fill: var(--indigo);
  --fill-soft: rgba(22, 34, 121, .9);
  --lv0: #2b3150; --lv1: #162279; --lv2: #0053e2; --lv3: #0108ff; --lv4: #00c2ff;

  /* Display: Bebas Neue (fallback web de All Round Gothic) · Texto: Montserrat */
  --display: "Bebas Neue", "Montserrat", sans-serif;
  --serif: "Montserrat", Arial, sans-serif;
  --sans: var(--serif);
  --mono: var(--serif);
  --pattern: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%2284%22%20height%3D%2284%22%20viewBox%3D%220%200%2084%2084%22%3E%3Cg%20fill%3D%22none%22%20stroke%3D%22%23ffffff%22%20stroke-opacity%3D%22.07%22%20stroke-width%3D%221%22%3E%3Cpolygon%20points%3D%2242.0%2C20.0%2061.1%2C31.0%2061.1%2C53.0%2042.0%2C64.0%2022.9%2C53.0%2022.9%2C31.0%22/%3E%3Cpolygon%20points%3D%2248.8%2C21.1%2063.5%2C37.4%2056.7%2C58.3%2035.2%2C62.9%2020.5%2C46.6%2027.3%2C25.7%22/%3E%3C/g%3E%3C/svg%3E");
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  font-variant-numeric: tabular-nums;
  overflow-x: hidden;
}
button { font: inherit; color: inherit; }

/* Fondo: brillo azul + retícula + hexágonos */
.bg-layer { position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(880px 620px at 100% -12%, rgba(1, 8, 255, .5), transparent 62%),
    radial-gradient(760px 560px at 100% -12%, rgba(22, 34, 121, .7), transparent 75%),
    linear-gradient(180deg, #000000 0%, #0a0d1a 100%); }
.bg-layer::before { content: ""; position: absolute; inset: 0; background-image: var(--pattern); background-size: 84px 84px;
  mask-image: linear-gradient(200deg, #000 0%, transparent 55%); -webkit-mask-image: linear-gradient(200deg, #000 0%, transparent 55%); }
.bg-hex { position: absolute; right: -140px; top: -110px; width: 640px; opacity: .55; }
.bg-hex polygon { fill: none; stroke: rgba(1, 8, 255, .7); stroke-width: 1.4; }
.bg-hex polygon.inner { fill: rgba(1, 8, 255, .07); stroke: rgba(255, 255, 255, .22); }
.accent { color: var(--cyan); }
.hexagon { clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); }
::selection { background: var(--accent); color: #fff; }

/* ---------- Layout ---------- */
.app { max-width: 920px; margin: 0 auto; padding: 18px 28px 64px; }
.topbar { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand img { height: 84px; display: block; margin: -20px 0 -20px -14px; }
.counter { font-family: var(--mono); font-size: 13px; color: var(--muted); letter-spacing: .04em; }
.counter b { color: var(--ink); font-weight: 700; }

.progress { height: 2px; background: var(--line); margin: 4px 0 56px; position: relative; }
.progress i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--grad); transition: width .4s ease; }
.progress[hidden] { display: block; visibility: hidden; }

/* ---------- Tipografía ---------- */
h1, h2, h3 { font-family: var(--serif); font-weight: 700; letter-spacing: -.02em; margin: 0; }
.display { font-family: var(--display); font-weight: 400; font-size: clamp(64px, 10vw, 112px); line-height: .92; letter-spacing: .01em; }
.q-title { font-size: clamp(24px, 3.3vw, 31px); line-height: 1.2; max-width: 760px; margin-bottom: 10px; }
.q-help { color: var(--muted); margin: 0 0 36px; max-width: 640px; }
.label { font-family: var(--mono); font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }

/* ---------- Botones ---------- */
.btn {
  cursor: pointer; border: 1px solid transparent; border-radius: 999px;
  padding: 13px 26px; font-weight: 600; font-size: 15px;
  display: inline-flex; align-items: center; gap: 10px;
  transition: background .15s, border-color .15s, opacity .15s;
}
.btn-primary { background: var(--grad-btn); color: var(--accent-ink); box-shadow: 0 10px 28px -12px rgba(1,8,255,.9); }
.btn-primary:hover:not(:disabled) { filter: brightness(1.08); }
.btn-primary:disabled { background: transparent; box-shadow: none; border-color: var(--line); color: var(--muted); cursor: not-allowed; }
.btn-ghost { background: transparent; border-color: var(--line-strong); color: var(--ink); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-text { background: none; border: 0; padding: 13px 0; color: var(--muted); cursor: pointer; }
.btn-text:hover { color: var(--ink); }
.btn-link { background: none; border: 0; padding: 0; color: var(--muted); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; font-size: 14px; }
.btn-link:hover { color: var(--ink); }

.q-nav { display: flex; justify-content: space-between; align-items: center; margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--line); }

/* ---------- Bienvenida ---------- */
.welcome .display { margin: 8px 0 22px; }
.welcome .sub { font-family: var(--serif); font-weight: 500; font-size: clamp(18px, 2.2vw, 22px); line-height: 1.4; color: var(--ink); max-width: 560px; margin: 0 0 56px; }
.facts { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-bottom: 40px; }
.fact { padding: 22px 24px 24px 0; }
.fact + .fact { padding-left: 24px; border-left: 1px solid var(--line); }
.fact .ic { width: 32px; height: 32px; margin-bottom: 14px; display: block; }
.fact .k { font-family: var(--serif); font-weight: 700; font-size: 19px; margin-bottom: 6px; }
.fact p { margin: 0; color: var(--muted); font-size: 14px; }
.welcome-foot { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; }
.welcome-foot .label { text-transform: none; letter-spacing: 0; font-size: 13px; }

/* ---------- 1. Slider ---------- */
.range { -webkit-appearance: none; appearance: none; width: 100%; height: 2px; margin: 14px 0; background: linear-gradient(90deg, #162279, #0108ff) 0/var(--pct, 0%) 100% no-repeat, var(--line-strong); height: 4px; border-radius: 4px; outline: none; cursor: pointer; }
.range::-webkit-slider-thumb { -webkit-appearance: none; width: 20px; height: 20px; background: #fff; border: 4px solid var(--accent); border-radius: 50%; }
.range::-moz-range-thumb { width: 14px; height: 14px; background: #fff; border: 4px solid var(--accent); border-radius: 50%; }
.range.untouched::-webkit-slider-thumb { border-color: var(--muted); }
.range.untouched::-moz-range-thumb { border-color: var(--muted); }
.ticks { display: grid; grid-template-columns: repeat(5, 1fr); margin-top: 6px; }
.ticks button { background: none; border: 0; cursor: pointer; color: var(--muted); font-size: 13px; padding: 4px 0; text-align: center; }
.ticks button:first-child { text-align: left; } .ticks button:last-child { text-align: right; }
.ticks button.on { color: var(--ink); }
.ticks button span { font-family: var(--mono); margin-right: 6px; }
.slider-desc { min-height: 120px; margin-top: 34px; padding-top: 22px; border-top: 1px solid var(--line); }
.slider-desc h3 { font-size: 22px; margin-bottom: 8px; display: flex; align-items: center; gap: 12px; }
.slider-desc p { margin: 0; max-width: 640px; }

/* Número de nivel (sustituye a las insignias) */
.lv-badge { display: inline-grid; place-items: center; width: 28px; height: 32px; font-family: var(--mono); font-size: 13px; color: #fff; background: var(--lv0); clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); }
.lv-1 { background: var(--lv1); } .lv-2 { background: var(--lv2); } .lv-3 { background: var(--lv3); } .lv-4 { background: var(--lv4); color: #060a2c; }

/* ---------- 2. Opciones en columnas ---------- */
.level-cards { display: grid; grid-template-columns: repeat(5, 1fr); border-top: 1px solid var(--line); }
.level-card { text-align: left; cursor: pointer; background: none; border: 0; border-top: 3px solid transparent; margin-top: -2px; padding: 20px 18px 24px; display: flex; flex-direction: column; gap: 10px; transition: border-color .15s, background .15s; }
.level-card + .level-card { border-left: 1px solid var(--line); }
.level-card:hover { background: var(--bg-raise); }
.level-card.on { border-top-color: #0108ff; background: linear-gradient(180deg, rgba(1,8,255,.28), rgba(22,34,121,0)); }
.level-card h4 { margin: 0; font-family: var(--serif); font-weight: 600; font-size: 17px; line-height: 1.25; }
.level-card p { margin: 0; color: var(--muted); font-size: 14px; }

/* ---------- Filas tipo tabla (3, 7, 8) ---------- */
.hex-row, .freq-row, .pct-row { display: grid; align-items: center; gap: 20px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.hex-row:first-of-type, .freq-row:first-child, .pct-row:first-child { border-top: 1px solid var(--line); }
.hex-legend { display: grid; grid-template-columns: 1fr 260px 140px; gap: 20px; padding-bottom: 10px; }
.hex-legend .hl { display: grid; grid-template-columns: repeat(5, 1fr); text-align: center; }
.hex-legend span { font-size: 12px; color: var(--muted); }
.hex-row { grid-template-columns: 1fr 260px 140px; }
.lbl { font-size: 15px; }
.hexes { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; }
.hexes { justify-items: center; }
.hex { width: 40px; height: 46px; border: 0; background: rgba(255,255,255,.08); cursor: pointer; font-family: var(--mono); font-size: 13px; color: var(--muted); clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); transition: background .12s, color .12s, transform .12s; }
.hex:hover { background: rgba(255,255,255,.16); color: var(--ink); transform: scale(1.08); }
.hex.fill { background: rgba(22, 34, 121, .9); color: var(--ink); }
.hex.sel { background: #0108ff; color: #fff; transform: scale(1.1); }
.hex-row .val { font-size: 14px; text-align: right; }
.hex-row .val.empty { color: var(--muted); }

/* ---------- Arrastrar ---------- */
.dz-item { touch-action: none; user-select: none; cursor: grab; display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: var(--bg-raise); border: 1px solid var(--line); border-radius: 0; font-size: 14px; transition: border-color .15s; }
.dz-item:hover { border-color: var(--line-strong); }
.dz-item .grip { color: var(--muted); display: grid; flex-shrink: 0; } .dz-item .grip svg { width: 12px; height: 12px; }
.dz-item.selected { border-color: #0108ff; box-shadow: 0 0 0 3px rgba(1,8,255,.3); }
.dz-placeholder { opacity: .25; }
.dz-ghost { position: fixed; left: 0; top: 0; z-index: 1000; pointer-events: none; border-color: var(--accent); cursor: grabbing; }
.dz-zone { transition: background .15s, border-color .15s; }
.dz-zone.dz-over { border-color: #0108ff !important; background: rgba(1,8,255,.08); }

/* ---------- 4. Secuencia ---------- */
.seq { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.seq-col h5, .bucket h5 { margin: 0 0 12px; font-weight: 600; font-size: 13px; color: var(--muted); }
.seq-pool, .seq-lane { display: flex; flex-direction: column; gap: 6px; min-height: 300px; padding: 10px; border: 1px dashed var(--line-strong); }
.seq-lane { counter-reset: step; border-style: solid; border-color: var(--line); padding-left: 44px; }
.seq-lane .dz-item { counter-increment: step; position: relative; }
.seq-lane .dz-item::before { content: counter(step); position: absolute; left: -36px; width: 24px; height: 24px; border-radius: 50%; background: #0108ff; display: grid; place-items: center; font-family: var(--mono); font-size: 12px; color: #fff; }
.seq-empty { color: var(--muted); font-size: 14px; margin: auto; pointer-events: none; }
.seq-pool.empty::after { content: "Sin etapas pendientes"; color: var(--muted); font-size: 14px; margin: auto; }
.seq-none { margin-top: 14px; }

/* ---------- 5. Columnas ---------- */
.bucket-pool { display: flex; flex-wrap: wrap; gap: 6px; min-height: 58px; padding: 10px; border: 1px dashed var(--line-strong); margin-bottom: 28px; }
.bucket-pool.empty::after { content: "Todo acomodado"; color: var(--muted); font-size: 14px; margin: auto; }
.buckets { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); }
.bucket { padding: 16px 12px 12px; min-height: 240px; display: flex; flex-direction: column; cursor: pointer; border: 1px solid transparent; }
.bucket + .bucket { border-left-color: var(--line); }
.bucket h5 { display: flex; flex-direction: column; gap: 2px; }
.bucket h5 .t { font-family: var(--serif); font-size: 17px; color: var(--ink); }
.bucket h5 .d { font-size: 13px; }
.bucket h5 .lv-badge { display: none; }
.bucket-list { display: flex; flex-direction: column; gap: 6px; flex: 1; }
.bucket-list .dz-item { font-size: 13px; padding: 10px; }

/* ---------- 6. Dropdown ---------- */
.dd-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px 32px; }
.dd-field label, .field > label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.dd { position: relative; }
.dd.open, .dd-field:has(.dd.open), .field:has(.dd.open) { position: relative; z-index: 60; }
.dd-btn { width: 100%; text-align: left; cursor: pointer; background: none; border: 0; border-bottom: 1px solid var(--line-strong); padding: 10px 28px 10px 0; display: flex; gap: 10px; align-items: baseline; font-size: 15px; min-height: 46px; position: relative; }
.dd-btn:hover, .dd.open .dd-btn { border-bottom-color: var(--ink); }
.dd-btn .ph { color: var(--muted); }
.dd-btn .chev { position: absolute; right: 0; top: 50%; transform: translateY(-50%); color: var(--muted); display: grid; }
.dd-btn .chev svg { width: 16px; height: 16px; }
.dd-btn .lv-badge { display: none; }
.dd-list { display: none; position: absolute; left: 0; right: 0; top: calc(100% + 4px); background: var(--bg-raise); border: 1px solid var(--line-strong); max-height: 320px; overflow: auto; }
.dd.open .dd-list { display: block; }
.dd-opt { display: flex; gap: 12px; align-items: baseline; width: 100%; text-align: left; background: none; border: 0; padding: 11px 14px; cursor: pointer; font-size: 14px; }
.dd-opt + .dd-opt { border-top: 1px solid var(--line); }
.dd-opt:hover, .dd-opt:focus { background: rgba(255,255,255,.07); outline: none; }
.dd-opt.on { color: var(--cyan); }
.dd-opt.on .lv-badge { color: var(--cyan); }

/* ---------- 7. Porcentajes ---------- */
.pct-row { grid-template-columns: 1fr 90px; gap: 4px 24px; padding: 20px 0; }
.pct-row .lbl small { display: block; color: var(--muted); font-size: 13px; margin-top: 2px; }
.pct-val { grid-row: span 2; font-family: var(--serif); font-weight: 700; font-size: 34px; text-align: right; font-variant-numeric: tabular-nums; }
.pct-val.na { font-family: var(--mono); font-size: 14px; color: var(--muted); }
.pct-ctrl { display: flex; align-items: center; gap: 24px; }
.pct-row.disabled .range { opacity: .25; pointer-events: none; }
.toggle { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); cursor: pointer; white-space: nowrap; user-select: none; }
.toggle input { display: none; }
.toggle .sw { width: 14px; height: 14px; border: 1px solid var(--line-strong); }
.toggle input:checked + .sw { background: var(--grad); border-color: transparent; }

/* ---------- 8. Frecuencia ---------- */
.freq-row { grid-template-columns: 1fr 420px; }
.chips { display: grid; grid-template-columns: repeat(5, 1fr); border: 1px solid var(--line-strong); }
.chip { background: none; border: 0; cursor: pointer; padding: 9px 4px; font-size: 13px; color: var(--muted); white-space: nowrap; }
.chip + .chip { border-left: 1px solid var(--line-strong); }
.chip:hover { color: var(--ink); }
.chip.on { background: var(--grad); color: #fff; }

/* ---------- 9. Checklist ---------- */
.checks { display: grid; grid-template-columns: 1fr 1fr; column-gap: 32px; border-top: 1px solid var(--line); }
.check-card { display: flex; gap: 14px; align-items: flex-start; text-align: left; background: none; border: 0; border-bottom: 1px solid var(--line); padding: 16px 0; cursor: pointer; }
.check-card .box { width: 16px; height: 16px; margin-top: 3px; border: 1px solid var(--line-strong); flex-shrink: 0; display: grid; place-items: center; }
.check-card .box svg { width: 11px; height: 11px; opacity: 0; color: #fff; }
.check-card.on .box { background: var(--grad); border-color: transparent; }
.check-card.on .box svg { opacity: 1; }
.check-card h4 { margin: 0 0 2px; font-weight: 600; font-size: 15px; }
.check-card p { margin: 0; color: var(--muted); font-size: 13px; }
.check-card.none { grid-column: 1 / -1; }
.check-card.none h4 { font-weight: 400; color: var(--muted); }
.check-meter { display: none; }
.check-meter .bar { display: none; }

/* ---------- 10. Barras ---------- */
.eq { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); }
.eq-col { padding: 20px 16px 4px; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.eq-col + .eq-col { border-left: 1px solid var(--line); }
.eq-col h4 { margin: 0; font-family: var(--serif); font-weight: 600; font-size: 17px; line-height: 1.25; min-height: 2.5em; }
.eq-col p { margin: 0; color: var(--muted); font-size: 13px; min-height: 3em; }
.eq-col .lvname { font-size: 14px; min-height: 1.4em; }
.eq-col .lvname.empty { color: var(--muted); }
.eq-bar { display: flex; flex-direction: column-reverse; gap: 3px; width: 100%; max-width: 120px; cursor: ns-resize; touch-action: none; user-select: none; }
.eq-seg { height: 30px; border: 1px solid var(--line-strong); font-family: var(--mono); font-size: 12px; color: var(--muted); display: flex; align-items: center; padding-left: 8px; }
.eq-seg.fill { background: var(--fill-soft); border-color: transparent; color: var(--ink); }
.eq-seg.top { background: var(--grad); border-color: transparent; color: #fff; }

/* ---------- Registro ---------- */
.reg { max-width: 600px; }
.reg .q-help { margin-bottom: 40px; }
.field { margin-bottom: 28px; }
.field > label em { font-style: normal; }
.input { width: 100%; background: none; border: 0; border-bottom: 1px solid var(--line-strong); border-radius: 0; color: var(--ink); font: inherit; font-size: 15px; padding: 10px 0; outline: none; }
.input:focus { border-bottom-color: var(--ink); }
.input.err { border-bottom-color: #e0533d; }
.input::placeholder { color: var(--muted); opacity: .7; }
.field-note { font-size: 13px; color: var(--muted); margin-top: 8px; }
.field-note.err { color: #e0533d; }
.fn-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.fn-chip { background: none; border: 1px solid var(--line-strong); padding: 7px 12px; font-size: 13px; cursor: pointer; color: var(--ink); border-radius: 0; }
.fn-chip:hover { border-color: var(--ink); }
.fn-chip.on { background: var(--grad); border-color: transparent; color: #fff; }
.consent { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; color: var(--muted); cursor: pointer; margin: 8px 0 0; }
.consent input { appearance: none; -webkit-appearance: none; width: 16px; height: 16px; border: 1px solid var(--line-strong); margin: 3px 0 0; flex-shrink: 0; cursor: pointer; }
.consent input:checked { background: var(--grad); border-color: transparent; }
.email-warn { margin-top: 12px; padding: 2px 0 2px 14px; border-left: 2px solid #0108ff; font-size: 14px; }
.email-warn .sub { color: var(--muted); font-size: 13px; margin-top: 2px; }
.email-warn .acts { display: flex; gap: 18px; margin-top: 8px; }
.email-warn .acts button { background: none; border: 0; padding: 0; cursor: pointer; font-size: 14px; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.email-warn .acts button.primary { color: var(--ink); }
.ext-block { margin-bottom: 28px; }

/* ---------- Resultados ---------- */
.res-top { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; padding-bottom: 40px; border-bottom: 1px solid var(--line); }
.res-score .big { font-family: var(--display); font-weight: 400; font-size: clamp(120px, 16vw, 176px); line-height: .85; margin: 18px 0 8px; color: var(--cyan); }
.res-score .big small { font-size: .28em; color: var(--muted); letter-spacing: .02em; }
.res-score .lvl { font-family: var(--serif); font-weight: 700; font-size: 26px; margin-bottom: 22px; display: flex; align-items: center; gap: 12px; }
.res-score .lvl .t { color: var(--ink); }
.res-score .lvl .lv-badge { width: 38px; height: 44px; font-size: 16px; }
.scale { display: grid; grid-template-columns: repeat(5, 1fr); gap: 3px; }
.scale div { height: 4px; background: var(--line-strong); }
.scale div.on { background: var(--fill-soft); }
.scale div.cur { background: #0108ff; }
.scale-lbl { display: grid; grid-template-columns: repeat(5, 1fr); gap: 3px; margin-top: 8px; font-size: 12px; color: var(--muted); }
.res-note { color: var(--muted); font-size: 14px; margin: 22px 0 0; }
.res-radar svg { width: 100%; max-width: 420px; display: block; margin: 0 auto; overflow: visible; }
.radar-grid polygon { fill: none; stroke: var(--line); }
.radar-axis { stroke: var(--line); }
.radar-area { fill: rgba(1, 8, 255, .38); stroke: #0108ff; stroke-width: 2; }
.radar-dot { fill: #fff; stroke: var(--accent); stroke-width: 2; }
.radar-lbl { fill: var(--ink); font-size: 12px; font-family: var(--sans); }
.radar-val { fill: var(--muted); font-size: 12px; font-family: var(--mono); }
.res-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; padding-top: 40px; }
.res-block h3 { font-size: 20px; margin-bottom: 16px; }
.res-block h3::before, .sl-col h3::before { content: ""; display: block; width: 48px; height: 1px; background: rgba(1, 8, 255, .9); margin-bottom: 12px; }
.res-block h3 + .pbar, .res-block h3 + .insight { border-top: 1px solid var(--line); }
.pbar { display: grid; grid-template-columns: 1fr 120px 36px; gap: 16px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.pbar .track { height: 6px; background: var(--line); border-radius: 6px; overflow: hidden; }
.pbar .track i { display: block; height: 100%; background: var(--grad); border-radius: 6px; }
.pbar b { font-family: var(--mono); font-weight: 400; text-align: right; }
.res-block .gap { margin-top: 36px; }
.insight { display: grid; grid-template-columns: 1fr auto; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.insight span { color: var(--muted); }
.insight b { font-family: var(--mono); font-weight: 400; }
.res-foot { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--line); }
.res-foot p { margin: 0; max-width: 560px; }
.save-status { font-size: 13px; color: var(--muted); margin-top: 28px; }

.loading { padding: 80px 0; }
.loading p { color: var(--muted); }

.admin-fab { position: fixed; right: 16px; bottom: 16px; display: flex; gap: 8px; z-index: 100; }
.admin-fab .btn { padding: 9px 14px; font-size: 13px; background: var(--bg-raise); }

.fade-in { animation: fadeIn .35s ease both; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .level-cards, .eq { grid-template-columns: 1fr 1fr; }
  .level-card + .level-card, .eq-col + .eq-col { border-left: 0; }
  .level-card, .eq-col { border-bottom: 1px solid var(--line); }
  .buckets { grid-template-columns: 1fr 1fr; }
  .res-top, .res-grid { grid-template-columns: 1fr; }
  .freq-row { grid-template-columns: 1fr; gap: 10px; }
}
@media (max-width: 640px) {
  .app { padding: 12px 16px 48px; }
  .brand img { height: 68px; margin: -16px 0 -16px -11px; }
  .progress { margin-bottom: 36px; }
  .facts { grid-template-columns: 1fr; }
  .fact, .fact + .fact { padding: 18px 0; border-left: 0; }
  .fact + .fact { border-top: 1px solid var(--line); }
  .level-cards { grid-template-columns: 1fr; }
  .seq, .dd-grid, .checks { grid-template-columns: 1fr; }
  .hex-legend { display: none; }
  .hex-row { grid-template-columns: 1fr; gap: 10px; }
  .hex-row .val { text-align: left; }
  .chip { font-size: 11px; white-space: normal; }
  .ticks button { font-size: 11px; }
  .ticks button span { display: block; margin: 0; }
  .pbar { grid-template-columns: 1fr 80px 32px; }
}
/* ---------- PDF: una lámina 16:9 horizontal (13.333 × 7.5 in, igual que PowerPoint) ---------- */
.slide { display: none; }
@page { size: 13.333in 7.5in; margin: 0; }
@media print {
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  html, body { width: 13.333in; height: 7.5in; overflow: hidden; background: #060a2c; }
  .bg-layer, .topbar, .progress, .admin-fab, #view > section > :not(.slide) { display: none !important; }
  .app { max-width: none; margin: 0; padding: 0; }
  .fade-in { animation: none; }

  .slide { display: grid; grid-template-rows: 48px 1fr 32px; gap: 24px; width: 13.333in; height: 7.5in; overflow: hidden;
    padding: 36px 72px 30px; font-size: 9pt; break-inside: avoid; page-break-after: avoid;
    background:
      radial-gradient(7in 5in at 100% -15%, rgba(1, 8, 255, .5), transparent 62%),
      radial-gradient(6in 4.5in at 100% -15%, rgba(22, 34, 121, .7), transparent 75%),
      linear-gradient(200deg, rgba(0, 0, 0, 0) 0%, #05070f 55%),
      var(--pattern) 0 0 / 84px 84px,
      linear-gradient(180deg, #000000 0%, #0a0d1a 100%); }
  .sl-head { display: flex; justify-content: space-between; align-items: center; }
  .sl-head img { height: 82px; margin: -18px 0 -18px -15px; }
  .sl-title { text-align: right; display: flex; flex-direction: column; gap: 2pt; }
  .sl-title b { font-family: var(--display); font-weight: 400; font-size: 24pt; letter-spacing: .02em; line-height: 1; }
  .sl-title span { color: var(--muted); font-size: 9pt; font-weight: 300; }
  .sl-body { display: grid; grid-template-columns: 4fr 4fr 4fr; gap: 36px; min-height: 0; }
  .sl-col { min-height: 0; }
  .sl-col h3 { font-size: 10.5pt; margin: 14px 0 4px; }
  .sl-col h3::before { margin-bottom: 8px; }
  .slide .res-score .label { font-size: 8pt; }
  .slide .res-score .big { font-size: 96pt; margin: 2pt 0 4pt; }
  .slide .res-score .lvl { font-size: 14pt; margin-bottom: 8pt; gap: 8pt; }
  .slide .res-score .lvl .lv-badge { width: 26px; height: 30px; font-size: 11pt; }
  .slide .scale-lbl { font-size: 7pt; }
  .slide .insight, .slide .pbar { padding: 3pt 0; font-size: 8.5pt; }
  .slide .pbar { grid-template-columns: 1fr .85in .28in; gap: 10pt; }
  .slide .pbar span { white-space: nowrap; }
  .slide .pbar .track { height: 5px; }
  .sl-radar { display: grid; place-items: center; min-height: 0; }
  .sl-radar svg { width: 112%; max-height: 5in; overflow: visible; }
  .sl-foot { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; color: var(--muted); font-size: 8pt; font-weight: 300; border-top: 2px solid #0108ff; padding-top: 8px; }
  .sl-foot span:nth-child(2) { text-align: center; }
  .sl-foot span:last-child { text-align: right; }
}
