:root {
  --oeste-fondo: #0e2847;
  --oeste-fondo-2: #13335a;
  --oeste-texto: #c9d5e6;
  --naranja: #e8622a;
  --naranja-boton: #c8501a;
  --naranja-suave: #fdebe2;
  --centro-fondo: #edf1f7;
  --tarjeta: #ffffff;
  --tinta: #14223b;
  --tinta-suave: #4f5e78;
  --borde: #d6deea;
  --ok: #17845a;
  --ok-suave: #e1f4ec;
  --pend: #9a6510;
  --pend-suave: #fbf0da;
  --ancho-oeste: 268px;
  --alto-dock: 66px;
  --radio: 10px;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 76px; }

body {
  margin: 0;
  font-family: "Nunito Sans", "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.62;
  color: var(--tinta);
  background: var(--centro-fondo);
  padding-bottom: calc(var(--alto-dock) + 18px);
}

img { max-width: 100%; height: auto; display: block; }

a { color: #1b4f8f; text-underline-offset: 3px; }
a:hover { color: var(--naranja-boton); }

h1, h2, h3 { font-family: "Aleo", Georgia, serif; line-height: 1.22; color: #0d1e38; }
h1 { font-size: clamp(1.7rem, 3.4vw, 2.35rem); margin: .2em 0 .45em; font-weight: 700; }
h2 { font-size: 1.36rem; margin: 0 0 .6em; font-weight: 700; }
h3 { font-size: 1.1rem; margin: 1.3em 0 .45em; font-weight: 700; }
p { margin: 0 0 1em; }

/* ---------- oeste: panel lateral ---------- */
.oeste-switch { position: absolute; opacity: 0; pointer-events: none; }

.oeste-panel {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--ancho-oeste);
  background: var(--oeste-fondo);
  color: var(--oeste-texto);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  z-index: 40;
  padding: 18px 14px 24px;
}

.oeste-marca { display: flex; align-items: center; gap: 11px; padding: 4px 6px 18px; border-bottom: 1px solid rgba(255,255,255,.09); text-decoration: none; }
.oeste-marca img { width: 40px; height: 40px; border-radius: 9px; }
.oeste-nombre { font-family: "Aleo", Georgia, serif; font-weight: 700; font-size: 1.32rem; color: #fff; letter-spacing: .01em; line-height: 1.1; }
.oeste-nombre b { color: var(--naranja); font-weight: 700; }
.oeste-etiqueta { display: block; font-family: "Nunito Sans", sans-serif; font-size: .68rem; text-transform: uppercase; letter-spacing: .12em; color: #8ea3c2; font-weight: 600; }

.oeste-titulo { margin: 20px 8px 8px; font-size: .7rem; text-transform: uppercase; letter-spacing: .14em; color: #7f95b6; font-weight: 800; }

.oeste-menu, .oeste-modulos { list-style: none; margin: 0; padding: 0; }
.oeste-menu li + li { margin-top: 2px; }

.oeste-enlace {
  display: flex; align-items: center; gap: 11px;
  padding: 9px 10px; border-radius: 8px;
  color: var(--oeste-texto); text-decoration: none; font-weight: 600; font-size: .96rem;
}
.oeste-enlace svg { width: 19px; height: 19px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.oeste-enlace:hover { background: var(--oeste-fondo-2); color: #fff; }
.oeste-enlace[aria-current="page"] { background: #fff; color: var(--oeste-fondo); box-shadow: inset 4px 0 0 var(--naranja); }

.oeste-modulos { border-left: 2px solid rgba(255,255,255,.12); margin-left: 16px; }
.oeste-modulos a { display: block; padding: 5px 12px; color: #9fb2cd; text-decoration: none; font-size: .87rem; line-height: 1.35; border-left: 2px solid transparent; margin-left: -2px; }
.oeste-modulos a:hover, .oeste-modulos a.oeste-visto { color: #fff; border-left-color: var(--naranja); }

.oeste-sello { margin-top: auto; padding: 14px 12px; border-radius: 9px; background: rgba(255,255,255,.06); font-size: .84rem; line-height: 1.45; }
.oeste-sello strong { color: #fff; display: block; font-size: .92rem; }

.oeste-velo { display: none; }

/* ---------- marco principal ---------- */
.centro-marco { margin-left: var(--ancho-oeste); min-height: 100vh; }

/* ---------- norte: barra superior ---------- */
.norte-marca { display: none; align-items: center; gap: 8px; text-decoration: none; font-family: "Aleo", Georgia, serif; font-weight: 700; font-size: 1.12rem; color: var(--oeste-fondo); }
.norte-marca img { width: 30px; height: 30px; border-radius: 7px; }
.norte-marca b { color: var(--naranja-boton); }
.norte-izq { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.norte-header {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  padding: 12px 32px; background: rgba(255,255,255,.94);
  border-bottom: 1px solid var(--borde);
  backdrop-filter: blur(6px);
}
.norte-rastro ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 4px; font-size: .88rem; color: var(--tinta-suave); }
.norte-rastro li + li::before { content: "›"; margin: 0 6px 0 2px; color: #99a6bb; }
.norte-rastro a { color: var(--tinta-suave); text-decoration: none; }
.norte-rastro a:hover { color: var(--naranja-boton); text-decoration: underline; }
.norte-rastro [aria-current] { color: var(--tinta); font-weight: 700; }
.norte-estado { display: flex; gap: 8px; flex-wrap: wrap; }
.norte-chip { display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; font-weight: 700; padding: 4px 10px; border-radius: 99px; background: #eef2f8; color: var(--tinta-suave); border: 1px solid var(--borde); white-space: nowrap; }
.norte-chip::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #8897ad; }
.norte-chip--ok { background: var(--ok-suave); color: var(--ok); border-color: #b9e2cf; }
.norte-chip--ok::before { background: var(--ok); }

/* ---------- centro: contenido ---------- */
.centro-main { padding: 26px 32px 10px; max-width: 1040px; }

.centro-cabecera { background: linear-gradient(120deg, #0e2847 0%, #173d6b 62%, #24548f 100%); color: #e6edf7; border-radius: 14px; padding: 28px 30px 26px; position: relative; overflow: hidden; }
.centro-cabecera::after { content: ""; position: absolute; right: -60px; top: -60px; width: 220px; height: 220px; border-radius: 50%; border: 34px solid rgba(232,98,42,.22); }
.centro-cabecera h1 { color: #fff; max-width: 30ch; position: relative; z-index: 1; }
.centro-cabecera p { position: relative; z-index: 1; max-width: 64ch; }
.centro-volanta { display: inline-block; font-size: .74rem; letter-spacing: .14em; text-transform: uppercase; font-weight: 800; color: #ffb48f; margin-bottom: 4px; }
.centro-firma { font-size: .86rem; color: #b5c4da; margin: 0; }
.centro-firma strong { color: #fff; }

.centro-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 18px 0 8px; padding: 0; list-style: none; }
.centro-kpi { background: var(--tarjeta); border: 1px solid var(--borde); border-radius: var(--radio); padding: 13px 15px; border-top: 3px solid var(--naranja); }
.centro-kpi-dato { display: block; font-family: "Aleo", Georgia, serif; font-size: 1.32rem; font-weight: 700; color: #0d1e38; line-height: 1.2; }
.centro-kpi-rotulo { display: block; font-size: .83rem; color: var(--tinta-suave); line-height: 1.35; margin-top: 3px; }

.centro-modulo { background: var(--tarjeta); border: 1px solid var(--borde); border-radius: 12px; margin: 18px 0; padding: 22px 26px 12px; box-shadow: 0 1px 2px rgba(16,34,64,.04); }
.centro-modulo-cab { display: flex; align-items: baseline; gap: 12px; border-bottom: 1px dashed var(--borde); padding-bottom: 10px; margin-bottom: 14px; }
.centro-modulo-cab h2 { margin: 0; }
.centro-num { flex: none; font-size: .72rem; font-weight: 800; letter-spacing: .08em; color: var(--naranja-boton); background: var(--naranja-suave); padding: 3px 8px; border-radius: 6px; }

.centro-tabla { width: 100%; overflow-x: auto; margin: 6px 0 16px; border: 1px solid var(--borde); border-radius: 9px; }
.centro-tabla table { width: 100%; border-collapse: collapse; font-size: .93rem; min-width: 460px; }
.centro-tabla th, .centro-tabla td { text-align: left; padding: 9px 12px; border-bottom: 1px solid #e6ebf3; vertical-align: top; }
.centro-tabla th { background: #f4f7fb; font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--tinta-suave); font-weight: 800; }
.centro-tabla tr:last-child td { border-bottom: 0; }
.centro-tabla td:first-child { font-weight: 700; }

.centro-badge { display: inline-block; font-size: .74rem; font-weight: 800; padding: 2px 8px; border-radius: 5px; background: var(--ok-suave); color: var(--ok); white-space: nowrap; }
.centro-badge--pend { background: var(--pend-suave); color: var(--pend); }

.centro-nota { background: #f6f8fc; border-left: 4px solid #6f8bb3; padding: 12px 16px; border-radius: 0 8px 8px 0; font-size: .95rem; margin: 6px 0 16px; }
.centro-nota--alerta { border-left-color: var(--naranja); background: #fff6f1; }

.centro-pasos { counter-reset: paso; list-style: none; padding: 0; margin: 4px 0 16px; }
.centro-pasos li { counter-increment: paso; position: relative; padding: 0 0 12px 46px; }
.centro-pasos li::before { content: counter(paso); position: absolute; left: 0; top: 0; width: 31px; height: 31px; border-radius: 8px; background: var(--oeste-fondo); color: #fff; font-weight: 800; display: grid; place-items: center; font-size: .9rem; }

.centro-lista { padding-left: 1.2em; margin: 0 0 1em; }
.centro-lista li { margin-bottom: .35em; }

.centro-barras { list-style: none; padding: 0; margin: 6px 0 18px; }
.centro-barras li { display: grid; grid-template-columns: 150px 1fr 96px; align-items: center; gap: 10px; font-size: .9rem; padding: 5px 0; }
.centro-barra { height: 10px; background: #e7ecf4; border-radius: 99px; overflow: hidden; }
.centro-barra span { display: block; height: 100%; background: linear-gradient(90deg, #24548f, var(--naranja)); border-radius: 99px; }
.centro-barras em { font-style: normal; color: var(--tinta-suave); text-align: right; font-size: .84rem; }

.centro-galeria { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 8px 0 18px; }
.centro-galeria figure { margin: 0; background: #0e2847; border-radius: 9px; overflow: hidden; }
.centro-galeria figcaption { font-size: .78rem; color: #c9d5e6; padding: 6px 9px; line-height: 1.3; }

.centro-duo { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 4px 0 16px; }
.centro-pros, .centro-contras { border: 1px solid var(--borde); border-radius: 10px; padding: 14px 16px 6px; }
.centro-pros { border-top: 4px solid var(--ok); }
.centro-contras { border-top: 4px solid #c0392b; }
.centro-pros h3, .centro-contras h3 { margin-top: 0; }

.centro-veredicto { display: grid; grid-template-columns: 120px 1fr; gap: 18px; align-items: center; background: #0e2847; color: #dfe7f3; border-radius: 12px; padding: 20px 22px; margin: 8px 0 16px; }
.centro-veredicto strong { font-family: "Aleo", Georgia, serif; font-size: 2.6rem; color: #fff; line-height: 1; display: block; text-align: center; }
.centro-veredicto small { display: block; text-align: center; color: #9fb2cd; font-size: .78rem; }
.centro-veredicto p { margin: 0; }

.centro-pregunta { border: 1px solid var(--borde); border-radius: 9px; margin: 0 0 10px; background: #fbfcfe; }
.centro-pregunta summary { cursor: pointer; padding: 12px 16px; font-weight: 800; list-style: none; position: relative; padding-right: 42px; }
.centro-pregunta summary::-webkit-details-marker { display: none; }
.centro-pregunta summary::after { content: "+"; position: absolute; right: 16px; top: 9px; font-size: 1.3rem; color: var(--naranja-boton); }
.centro-pregunta[open] summary::after { content: "–"; }
.centro-pregunta p { padding: 0 16px 6px; }

.centro-cta { display: inline-flex; align-items: center; gap: 9px; background: var(--naranja-boton); color: #fff; text-decoration: none; font-weight: 800; padding: 12px 20px; border-radius: 9px; margin: 4px 0 16px; box-shadow: 0 3px 0 #9a3a10; }
.centro-cta:hover { background: #b04512; color: #fff; }
.centro-cta svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; }
.centro-cta-pie { font-size: .82rem; color: var(--tinta-suave); margin-top: -8px; }

/* ---------- sur: pie ---------- */
.sur-footer { margin: 26px 32px 0; padding: 22px 0 10px; border-top: 1px solid var(--borde); font-size: .9rem; color: var(--tinta-suave); max-width: 1040px; }
.sur-columnas { display: grid; grid-template-columns: 1.3fr 1fr; gap: 24px; }
.sur-footer h2 { font-size: 1rem; margin-bottom: .4em; }
.sur-footer ul { list-style: none; margin: 0; padding: 0; columns: 2; }
.sur-footer ul a { color: var(--tinta-suave); }
.sur-legal { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; border-top: 1px dashed var(--borde); margin-top: 14px; padding-top: 12px; font-size: .82rem; }
.sur-edad { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; border: 2px solid #c0392b; color: #c0392b; font-weight: 800; font-size: .8rem; margin-right: 8px; vertical-align: middle; }

/* ---------- sur: barra de navegación inferior ---------- */
.sur-dock {
  position: fixed; left: var(--ancho-oeste); right: 0; bottom: 0; z-index: 35;
  height: var(--alto-dock);
  background: #fff; border-top: 1px solid var(--borde);
  box-shadow: 0 -6px 18px rgba(14,40,71,.08);
  display: flex; align-items: stretch; justify-content: center; gap: 4px; padding: 0 12px;
}
.sur-tab { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-width: 76px; padding: 6px 8px; color: var(--tinta-suave); text-decoration: none; font-size: .74rem; font-weight: 700; border-top: 3px solid transparent; cursor: pointer; }
.sur-tab svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sur-tab:hover { color: var(--oeste-fondo); }
.sur-tab[aria-current="page"] { color: var(--naranja-boton); border-top-color: var(--naranja); }
.sur-tab-cta { align-self: center; flex-direction: row; gap: 8px; background: var(--naranja-boton); color: #fff; border-radius: 10px; padding: 10px 18px; margin: 0 12px; font-size: .9rem; border: 0; box-shadow: 0 3px 0 #9a3a10; }
.sur-tab-cta:hover { color: #fff; background: #b04512; }
.sur-tab-menu { display: none; }

/* ---------- 404 ---------- */
.centro-error { text-align: center; padding: 34px 20px 26px; }
.centro-error-cod { font-family: "Aleo", Georgia, serif; font-size: 5.4rem; font-weight: 700; color: var(--naranja); line-height: 1; letter-spacing: .04em; }
.centro-error-rejilla { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; list-style: none; padding: 0; margin: 20px 0 0; text-align: left; }
.centro-error-rejilla a { display: block; background: var(--tarjeta); border: 1px solid var(--borde); border-radius: 9px; padding: 13px 15px; text-decoration: none; font-weight: 800; color: var(--tinta); }
.centro-error-rejilla a span { display: block; font-weight: 600; font-size: .84rem; color: var(--tinta-suave); }
.centro-error-rejilla a:hover { border-color: var(--naranja); }

/* ---------- adaptativo ---------- */
@media (max-width: 1023px) {
  :root { --ancho-oeste: 284px; }
  body { font-size: 16.5px; }
  .oeste-panel { transform: translateX(-100%); transition: transform .25s ease, box-shadow .25s ease; padding-bottom: calc(var(--alto-dock) + 16px); }
  .oeste-switch:checked ~ .oeste-panel { transform: translateX(0); box-shadow: 8px 0 30px rgba(0,0,0,.25); }
  .norte-marca { display: inline-flex; }
  .oeste-switch:checked ~ .oeste-velo { display: block; position: fixed; inset: 0; background: rgba(8,20,38,.5); z-index: 38; }
  .centro-marco { margin-left: 0; }
  .sur-dock { left: 0; justify-content: space-around; gap: 0; padding: 0 4px; }
  .sur-tab { min-width: 0; flex: 1; padding: 6px 2px; font-size: .7rem; }
  .sur-tab--ancho { display: none; }
  .sur-tab-menu { display: flex; }
  .sur-tab-cta { flex: 0 0 auto; flex-direction: column; gap: 1px; margin: 0 4px; padding: 7px 12px; font-size: .7rem; border-radius: 12px; transform: translateY(-10px); }
  .oeste-switch:focus-visible ~ .sur-dock .sur-tab-menu { outline: 2px solid var(--naranja); }
}

@media (max-width: 760px) {
  .norte-header { padding: 10px 16px; position: static; }
  .norte-estado { display: none; }
  .norte-izq { gap: 6px; flex-direction: column; align-items: flex-start; }
  .centro-main { padding: 16px 14px 6px; }
  .centro-cabecera { padding: 22px 18px 20px; border-radius: 12px; }
  .centro-cabecera::after { width: 140px; height: 140px; right: -50px; top: -50px; border-width: 24px; }
  .centro-modulo { padding: 18px 16px 8px; border-radius: 10px; }
  .centro-kpis { grid-template-columns: 1fr 1fr; gap: 9px; }
  .centro-kpi { padding: 10px 11px; }
  .centro-kpi-dato { font-size: 1.12rem; }
  .centro-galeria { grid-template-columns: 1fr 1fr; }
  .centro-duo { grid-template-columns: 1fr; }
  .centro-veredicto { grid-template-columns: 1fr; text-align: left; }
  .centro-barras li { grid-template-columns: 1fr 74px; }
  .centro-barras li .centro-barra { grid-column: 1 / -1; grid-row: 2; }
  .sur-footer { margin: 18px 14px 0; }
  .sur-columnas { grid-template-columns: 1fr; gap: 10px; }
  html { scroll-padding-top: 12px; }
}

.centro-procedencia { font-size: .8rem; color: var(--tinta-suave); margin: -8px 0 16px; font-style: italic; }
.centro-procedencia a { color: var(--tinta-suave); }
.centro-glosario { margin: 0 0 14px; }
.centro-glosario dt { font-weight: 800; margin-top: 12px; }
.centro-glosario dd { margin: 4px 0 0; padding-left: 14px; border-left: 3px solid var(--naranja-suave); }

@media (min-width: 761px) {
  .centro-main { margin-left: auto; margin-right: auto; max-width: 1120px; }
  .sur-footer { margin-left: auto; margin-right: auto; width: calc(100% - 64px); max-width: 1056px; }
  .norte-header { padding-left: max(32px, calc((100% - 1120px) / 2 + 32px)); padding-right: max(32px, calc((100% - 1120px) / 2 + 32px)); }
}
