/* Securis Risk Intelligence — hoja de estilos. Sistema de diseño: DESIGN.md (tokens, tipografía, componentes).
   Radio 0, filetes de 1 px, sin sombras ni gradientes. Todo el CSS en archivo (CSP: style-src 'self'). */

@font-face { font-family: "Instrument Sans"; src: url("../fonts/instrument-sans.woff2") format("woff2-variations"), url("../fonts/instrument-sans.woff2") format("woff2");
             font-weight: 400 700; font-stretch: 75% 100%; font-display: swap; }
@font-face { font-family: "Plex Mono"; src: url("../fonts/plex-mono-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Plex Mono"; src: url("../fonts/plex-mono-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }

:root {
  --ink: #0B0C0E;  --ink-2: #121417;
  --rule-d: #26292E;  --rule-d2: #1B1E22;
  --text-d: #ECEDEE;  --mute-d: #858B94;
  --paper: #EEEFF0;  --paper-2: #E4E6E8;
  --rule-l: #C9CDD2;
  --text-l: #0B0C0E;  --mute-l: #5A6068;
  --lede-d: #B9BDC3;  --body-l: #2B3036;
  --sans: "Instrument Sans", "Helvetica Neue", Arial, sans-serif;
  --mono: "Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --gut: clamp(16px, 4vw, 56px);
  --max: 1440px;
  --risk-bajo-d: #7FA892;      --risk-bajo-l: #3F6E58;
  --risk-moderado-d: #D2A94A;  --risk-moderado-l: #7D5F0E;
  --risk-alto-d: #E0813F;      --risk-alto-l: #A04E12;
  --risk-critico-d: #EE5A5F;   --risk-critico-l: #B3262B;
}

/* Superficies: cada sección fija su propio juego de variables semánticas. */
.surface-d, .sec.dark, .top, .foot, .hero, .kpis {
  --bg: var(--ink); --bg2: var(--ink-2); --fg: var(--text-d); --mute: var(--mute-d);
  --rule: var(--rule-d); --rule2: var(--rule-d2); --strong: var(--text-d); --lede: var(--lede-d);
  --risk-bajo: var(--risk-bajo-d); --risk-moderado: var(--risk-moderado-d); --risk-alto: var(--risk-alto-d); --risk-critico: var(--risk-critico-d);
  --m0:#121417; --m1:#1B1E22; --m2:#26292E; --m3:#3A3E44; --m4:#4A4F57; --m5:#5D636B; --m6:#6D737B; --m7:#8D939B; --m8:#B9BDC3; --m9:#ECEDEE;
  --mk-stroke: var(--ink);
  --brand-risk: #6FA3E0;
}
.surface-l, .sec.light, html[data-theme="light"] main {
  --bg: var(--paper); --bg2: var(--paper-2); --fg: var(--text-l); --mute: var(--mute-l);
  --rule: var(--rule-l); --rule2: var(--rule-l); --strong: var(--text-l); --lede: var(--body-l);
  --risk-bajo: var(--risk-bajo-l); --risk-moderado: var(--risk-moderado-l); --risk-alto: var(--risk-alto-l); --risk-critico: var(--risk-critico-l);
  --m0:#E4E6E8; --m1:#C9CDD2; --m2:#B9BDC3; --m3:#8D939B; --m4:#6D737B; --m5:#5D636B; --m6:#4A4F57; --m7:#3A3E44; --m8:#26292E; --m9:#0B0C0E;
  --mk-stroke: var(--paper);
  --brand-risk: #2B5C9E;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg, var(--ink)); color: var(--fg, var(--text-d)); font-family: var(--sans); font-size: 17px; line-height: 1.55; font-weight: 400; -webkit-font-smoothing: antialiased; }
body.surface-l { background: var(--paper); }
::selection { background: var(--text-d); color: var(--ink); }
.surface-l ::selection, .sec.light ::selection { background: var(--text-l); color: var(--paper); }
a { color: inherit; text-decoration-color: var(--rule); text-underline-offset: 3px; }
a:hover { text-decoration-color: currentColor; }
:focus-visible { outline: 1px solid currentColor; outline-offset: 4px; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.skip { position: absolute; left: -9999px; top: 0; background: var(--text-d); color: var(--ink); padding: 12px 16px; z-index: 100; font-family: var(--mono); font-size: 12px; }
.skip:focus { left: 0; }
.wrap { max-width: var(--max); margin: 0 auto; padding-left: var(--gut); padding-right: var(--gut); }
.mono { font-family: var(--mono); font-weight: 500; letter-spacing: .04em; font-size: 12px; text-transform: uppercase; }
.label { font-family: var(--mono); font-size: 11.5px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--mute); margin: 0 0 12px; }
.label .sl { opacity: .5; }
/* Wordmark: Securis con el color de texto de la superficie, Risk con el color de marca. */
.b-sec { color: var(--fg); }
.b-risk { color: var(--brand-risk); }
.dim, .dim-t { color: var(--mute); }
.dim-l { color: var(--mute-l); }
.mute, .mute-t { color: var(--mute); }
.mute-l { color: var(--mute-l); }
.tnum { font-variant-numeric: tabular-nums; }
.sp { margin-top: clamp(32px, 4vw, 56px); }

/* Titulares: Instrument Sans condensada, peso 500, interlínea ≈ 1 */
.h1, .h2, .h3, .h1-s, .h2-d { font-family: var(--sans); font-weight: 500; margin: 0; color: var(--strong, var(--text-d)); }
.h1 { font-size: clamp(42px, 5.2vw, 84px); font-stretch: 75%; line-height: .95; letter-spacing: -.025em; }
.h1-s { font-size: clamp(40px, 5vw, 72px); font-stretch: 80%; line-height: 1; letter-spacing: -.02em; margin: 8px 0 12px; }
.h1-d { font-size: clamp(40px, 5vw, 72px); font-stretch: 80%; line-height: 1; letter-spacing: -.02em; margin: 8px 0 12px; color: var(--text-l); }
.h2 { font-size: clamp(34px, 4.4vw, 68px); font-stretch: 82%; line-height: 1; letter-spacing: -.02em; max-width: 17em; }
.h3 { font-size: clamp(24px, 2.2vw, 32px); font-stretch: 85%; line-height: 1.05; letter-spacing: -.015em; }
.h2-d { font-size: 24px; letter-spacing: -.01em; line-height: 1.2; border-top: 1px solid var(--text-l); padding-top: 14px; margin: 40px 0 14px; color: var(--text-l); }
.dim { font-weight: 500; }
.lede { font-size: clamp(16px, 1.25vw, 19px); color: var(--lede); max-width: 30em; margin: 20px 0 0; }
p { margin: 0 0 14px; }

/* Botones */
.btn { display: inline-flex; align-items: center; gap: 14px; height: 48px; padding: 0 20px; font-family: var(--mono); font-size: 12px; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; text-decoration: none; border: 1px solid var(--text-d); background: transparent; color: var(--text-d); cursor: pointer; transition: background .2s, color .2s, border-color .2s; border-radius: 0; }
.btn .arr { font-family: var(--sans); font-size: 16px; letter-spacing: 0; }
.btn-solid { background: var(--text-d); color: var(--ink); }
.btn-solid:hover { background: transparent; color: var(--text-d); }
.btn-line { color: var(--fg, var(--text-d)); border-color: var(--rule-d); }
.btn-line:hover { border-color: var(--fg, var(--text-d)); }
.sec.light .btn-solid, .surface-l .btn-solid { background: var(--text-l); color: var(--paper); border-color: var(--text-l); }
.sec.light .btn-solid:hover, .surface-l .btn-solid:hover { background: transparent; color: var(--text-l); }
.sec.light .btn-line, .surface-l .btn-line { border-color: var(--rule-l); }
.btn-sm { height: 36px; padding: 0 14px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

/* Cabecera */
.top { position: sticky; top: 0; z-index: 50; height: 64px; background: rgba(11,12,14,.86); backdrop-filter: saturate(140%) blur(10px); -webkit-backdrop-filter: saturate(140%) blur(10px); border-bottom: 1px solid var(--rule-d2); color: var(--text-d); }
.top-in { height: 64px; display: flex; align-items: center; gap: 28px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--text-d); text-decoration: none; }
.brand .sym { width: 30px; height: auto; flex: none; }
.brand .wm { width: 92px; height: auto; margin-top: 2px; flex: none; }
/* "Risk": Instrument Sans (la misma fuente de los títulos del sitio principal), con la altura de versal del wordmark. */
.b-risk-wm { font-family: var(--sans); font-weight: 600; font-size: 29px; line-height: 1; letter-spacing: -.01em; color: var(--brand-risk); margin-left: -2px; position: relative; top: 1px; }
.foot-wm { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 12px; margin: 0 0 10px; color: var(--text-d); }
.foot-wm .wm { width: 92px; height: auto; flex: none; }
.b-int { font-family: var(--sans); font-weight: 500; font-size: 29px; line-height: 1; letter-spacing: -.01em; color: var(--text-d); position: relative; top: 1px; }
@media (max-width: 640px) {
  .hero-tag { display: block; margin-top: 6px; }
  .hero-tag .sl { display: none; }
  .foot-wm { gap: 2px 10px; }
  .foot-wm .wm { width: 80px; }
  .foot-wm .b-risk-wm, .foot-wm .b-int { font-size: 25px; }
}
@media (max-width: 360px) {
  .brand .wm { width: 80px; }
  .b-risk-wm { font-size: 25px; }
}
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.nav { display: flex; gap: 22px; margin-left: auto; }
.nav a { font-size: 14px; letter-spacing: .01em; color: var(--mute-d); text-decoration: none; transition: color .2s; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--text-d); }
.top-r { display: flex; align-items: center; gap: 16px; }
.status { display: inline-flex; align-items: center; gap: 8px; color: var(--mute-d); font-size: 11px; }
.dot { width: 7px; height: 7px; background: var(--text-d); display: inline-block; animation: blink 2.4s steps(1, end) infinite; }
@keyframes blink { 0%, 60% { opacity: 1; } 61%, 100% { opacity: .15; } }
.menu { display: none; margin-left: auto; position: relative; }
.menu summary { list-style: none; cursor: pointer; border: 1px solid var(--rule-d); padding: 8px 14px; color: var(--text-d); }
.menu summary::-webkit-details-marker { display: none; }
.menu-in { position: absolute; right: 0; top: 52px; width: 240px; background: var(--ink); border: 1px solid var(--rule-d); display: flex; flex-direction: column; }
.menu-in a { padding: 14px 16px; border-bottom: 1px solid var(--rule-d2); text-decoration: none; color: var(--text-d); }
@media (max-width: 1080px) { .nav a:nth-child(n+4) { display: none; } .status { display: none; } }
@media (max-width: 860px) { .nav, .top-r { display: none; } .menu { display: block; } }

/* Secciones */
.sec { padding: clamp(80px, 11vw, 160px) 0; background: var(--bg); color: var(--fg); }
.sec.tight { padding: clamp(40px, 5vw, 72px) 0 clamp(64px, 8vw, 110px); }
.sec.dark { background: var(--ink); }
.sec.light { background: var(--paper); }
.sec-head { margin-bottom: clamp(48px, 6vw, 88px); }

/* Hero */
.hero { background: var(--ink); padding: clamp(40px, 6vw, 88px) 0 clamp(48px, 6vw, 80px); border-bottom: 1px solid var(--rule-d2); }
.hero-in { display: grid; grid-template-columns: 5fr 6fr; gap: clamp(24px, 4vw, 64px); align-items: center; }
.hero-r { margin: 0; position: relative; border: 1px solid var(--rule-d); background: var(--ink); padding: 16px; }
.cap-l { color: var(--mute-d); margin: 12px 0 0; font-size: 10.5px; letter-spacing: .1em; }
@media (max-width: 860px) { .hero-in { grid-template-columns: 1fr; } }

/* KPIs */
.kpis { background: var(--ink); border-bottom: 1px solid var(--rule-d2); }
.kpi-row { display: grid; grid-template-columns: repeat(4, 1fr); }
.kpi { padding: 28px 24px 28px 0; border-left: 1px solid var(--rule-d2); padding-left: 24px; }
.kpi:first-child { border-left: 0; padding-left: 0; }
.kpi-n { font-size: clamp(36px, 4vw, 56px); font-stretch: 78%; font-weight: 500; letter-spacing: -.02em; line-height: 1; margin: 4px 0 8px; font-variant-numeric: tabular-nums; }
@media (max-width: 860px) { .kpi-row { grid-template-columns: 1fr 1fr; } .kpi:nth-child(3) { border-left: 0; padding-left: 0; } }

/* Capacidades */
.caps { border-top: 1px solid var(--text-l); }
.cap { display: grid; grid-template-columns: 3fr 5fr 4fr; gap: clamp(24px, 4vw, 64px); padding: 28px 0; border-bottom: 1px solid var(--rule-l); text-decoration: none; color: var(--text-l); transition: background .2s; }
.cap:hover { background: var(--paper-2); }
.cap-d { color: var(--mute-l); margin: 0; }
.cap-e p { margin: 0 0 4px; }
.sec.dark .caps { border-top-color: var(--text-d); }
@media (max-width: 860px) { .cap { grid-template-columns: 1fr; gap: 12px; } }

/* Aviso */
.notice { background: var(--ink); color: var(--text-d); border: 1px solid var(--rule-d); padding: clamp(28px, 4vw, 48px); display: grid; grid-template-columns: 3fr 9fr; gap: clamp(24px, 4vw, 64px); }
.sec.dark .notice { background: var(--ink-2); }
.notice-t { font-size: clamp(17px, 1.5vw, 21px); margin: 0 0 14px; }
.notice-s { font-size: 15px; color: var(--mute-d); margin: 0; }
@media (max-width: 860px) { .notice { grid-template-columns: 1fr; gap: 12px; } }

/* Mapa */
.map { width: 100%; height: auto; display: block; max-height: 78vh; }
.mp { fill-rule: evenodd; stroke: var(--rule-d2); stroke-width: .4; transition: stroke .15s; cursor: pointer; }
.surface-l .mp, .sec.light .mp, html[data-theme="light"] .mp { stroke: var(--paper); stroke-width: .5; }
.mp:hover { stroke: var(--text-d); stroke-width: 1.2; }
.sec.light .mp:hover, html[data-theme="light"] .mp:hover { stroke: var(--ink); }
.mp.i0 { fill: var(--m0); } .mp.i1 { fill: var(--m1); } .mp.i2 { fill: var(--m2); } .mp.i3 { fill: var(--m3); } .mp.i4 { fill: var(--m4); }
.mp.i5 { fill: var(--m5); } .mp.i6 { fill: var(--m6); } .mp.i7 { fill: var(--m7); } .mp.i8 { fill: var(--m8); } .mp.i9 { fill: var(--m9); }
.mp.nf { fill: url(#nf); }
.mp.out { opacity: .28; }
.mp.hl { stroke: var(--text-d); stroke-width: 1.8; }
.sec.light .mp.hl { stroke: var(--ink); }
.dp { stroke: rgba(236,237,238,.3); stroke-width: .6; pointer-events: none; }
.sec.light .dp, html[data-theme="light"] .dp { stroke: rgba(11,12,14,.35); }
.mk { stroke: var(--mk-stroke); stroke-width: .8; pointer-events: none; }
.mk-a { fill: var(--risk-alto); }
.mk-c { fill: var(--risk-critico); }
.mk-ring { stroke: var(--risk-critico); stroke-width: 1; pointer-events: none; }
.inset { stroke: var(--rule-d); stroke-width: 1; }
.map-t { font-family: var(--mono); font-size: 7px; letter-spacing: .12em; fill: var(--mute-d); }
.map-grid { display: grid; grid-template-columns: 8fr 4fr; gap: clamp(24px, 4vw, 64px); margin-top: 32px; align-items: start; }
.map-fig { margin: 0; }
.map-side .toplist { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--text-d); counter-reset: n; }
.toplist li { border-bottom: 1px solid var(--rule-d2); }
.toplist a { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 10px 0; text-decoration: none; }
.toplist a:hover span:first-child { text-decoration: underline; }
.toplist .mute-t { grid-column: 1; font-size: 13px; }
.toplist .mono { grid-row: 1 / span 2; grid-column: 2; align-self: center; font-size: 18px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips a, .filters a, .tabs a { border: 1px solid var(--rule-d); padding: 6px 10px; font-size: 13px; text-decoration: none; color: var(--mute-d); transition: color .2s, border-color .2s; }
.chips a:hover, .filters a:hover, .tabs a:hover { color: var(--text-d); border-color: var(--text-d); }
.chips a[aria-current="true"], .filters a[aria-current="true"], .tabs a[aria-current="true"] { background: var(--text-d); color: var(--ink); border-color: var(--text-d); }
.tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 24px; }
.filters { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 24px 0 16px; }
.filters .label { margin: 0 8px 0 0; }
@media (max-width: 860px) { .map-grid { grid-template-columns: 1fr; } }

/* Leyenda */
.legend { margin-top: 16px; }
.ramp { display: grid; grid-template-columns: repeat(10, 1fr); height: 10px; border: 1px solid var(--rule); }
.ramp .r.i0 { background: var(--m0); } .ramp .r.i1 { background: var(--m1); } .ramp .r.i2 { background: var(--m2); } .ramp .r.i3 { background: var(--m3); } .ramp .r.i4 { background: var(--m4); }
.ramp .r.i5 { background: var(--m5); } .ramp .r.i6 { background: var(--m6); } .ramp .r.i7 { background: var(--m7); } .ramp .r.i8 { background: var(--m8); } .ramp .r.i9 { background: var(--m9); }
.ramp-l { display: flex; justify-content: space-between; color: var(--mute); font-size: 10px; margin: 4px 0 12px; }
.lv-list { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px 20px; }
.swatch-nf { display: inline-block; width: 14px; height: 14px; border: 1px solid var(--rule-d); border-style: dashed; background: var(--ink-2); vertical-align: -2px; margin-right: 8px; }

/* Niveles: forma + etiqueta; color solo en marcador y etiqueta */
.lvl { display: inline-flex; align-items: center; gap: 8px; }
.lv-bajo { color: var(--risk-bajo, var(--risk-bajo-d)); } .lv-moderado { color: var(--risk-moderado, var(--risk-moderado-d)); }
.lv-alto { color: var(--risk-alto, var(--risk-alto-d)); } .lv-critico { color: var(--risk-critico, var(--risk-critico-d)); }
.lvm { flex: none; } .lvm .hollow { fill: var(--bg, var(--ink)); }
.badge { display: inline-block; border: 1px solid var(--rule); padding: 1px 6px; font-size: 9.5px; letter-spacing: .1em; color: var(--mute); vertical-align: 1px; }
.chip-s { display: inline-block; border: 1px solid var(--rule); padding: 1px 6px; font-size: 10px; margin: 1px 0; }

/* Índice */
.idx { display: flex; align-items: baseline; gap: 10px; }
.idx-n { font-size: clamp(72px, 9vw, 128px); font-stretch: 75%; font-weight: 500; line-height: .9; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.idx-nf { color: var(--mute); }
.idx-of { color: var(--mute); }
.idx-meta { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 10px 0 8px; align-items: center; }
.mun-top { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(24px, 4vw, 64px); align-items: start; margin-top: 28px; }
.mun-map { margin: 0; border: 1px solid var(--rule-d); padding: 8px; }
.op-idx { margin-top: 28px; padding-top: 16px; border-top: 1px solid var(--rule-d); }
.big-s { font-size: 32px; font-stretch: 80%; }
@media (max-width: 860px) { .mun-top { grid-template-columns: 1fr; } }

/* Tablas */
.tbl-wrap { position: relative; overflow-x: auto; margin: 20px 0; border-top: 1px solid var(--strong); }
.tbl { width: 100%; border-collapse: collapse; font-size: 15px; min-width: 560px; }
.tbl.tbl-s { min-width: 0; }
.tbl th { font-family: var(--mono); font-size: 11.5px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--mute); text-align: left; padding: 12px 12px 12px 0; border-bottom: 1px solid var(--rule); white-space: nowrap; }
.tbl td { padding: 12px 12px 12px 0; border-bottom: 1px solid var(--rule2); vertical-align: top; }
.tbl .r { text-align: right; padding-right: 0; padding-left: 12px; }
.tbl .c { text-align: center; }
.tbl tbody tr:hover td { background: var(--bg2); }
.tbl a { text-decoration-color: var(--rule); }
.reg td { height: 44px; border: 1px solid var(--rule-l); padding: 8px; }
.reg th { border: 1px solid var(--rule-l); padding: 8px; }
.pager { display: flex; gap: 24px; margin: 8px 0 24px; }
.hbars { list-style: none; margin: 0; padding: 0; }
.hbars li { display: grid; grid-template-columns: 8fr 6fr auto; gap: 12px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--rule); font-size: 14px; }
.hb-t svg { width: 100%; height: 6px; display: block; } .hb-bar { fill: var(--strong); }
.hb-v { font-size: 12px; }
.results { list-style: none; padding: 0; margin: 24px 0; border-top: 1px solid var(--text-d); }
.results li { display: flex; gap: 16px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--rule-d2); }
.results li a { font-size: 19px; }
.results .lvl { margin-left: auto; }

/* Gráficas */
.charts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px clamp(24px, 4vw, 56px); margin-top: 20px; }
.chart-fig { margin: 0; }
.chart { width: 100%; height: auto; display: block; }
.ch-grid { stroke: var(--rule); stroke-width: 1; }
.ch-txt { font-family: var(--mono); font-size: 10px; fill: var(--mute); letter-spacing: .06em; text-transform: uppercase; }
.ch-line { stroke: var(--strong); stroke-width: 1.5; stroke-linejoin: round; }
.ch-cmp { stroke: var(--mute); stroke-width: 1; stroke-dasharray: 6 5; }
.ch-area { fill: var(--strong); opacity: .06; }
.ch-dot { fill: var(--strong); }
.ch-val { font-family: var(--mono); font-size: 11px; font-weight: 500; fill: var(--strong); }
.ch-bar { fill: var(--strong); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 4vw, 64px); margin-top: 32px; }
@media (max-width: 860px) { .charts, .two { grid-template-columns: 1fr; } }
.graph { width: 100%; height: auto; margin: 24px 0; }
.g-edge { stroke: var(--text-d); opacity: .45; }
.g-node { font-family: var(--sans); font-size: 13px; fill: var(--text-d); }
.g-node:hover { text-decoration: underline; }
.g-dot { fill: var(--text-d); }
.matrix { width: 100%; max-width: 420px; height: auto; margin: 12px 0; }
.mx-c { stroke: var(--text-l); stroke-width: .6; }
.mx-c.t0 { fill: var(--paper-2); } .mx-c.t1 { fill: #C9CDD2; } .mx-c.t2 { fill: #8D939B; } .mx-c.t3 { fill: #3A3E44; }
.mx-c.mx-row { stroke-width: 2; stroke: var(--text-l); }
.mx-t { font-family: var(--mono); font-size: 9px; font-weight: 500; letter-spacing: .08em; fill: var(--text-l); }
.mx-c.t3 + .mx-t, .mx-c.t2 + .mx-t { fill: var(--text-l); }
.mx-c.t3 + .mx-t { fill: var(--paper); }
.mx-ring { stroke: var(--paper); stroke-width: 1; }
.mx-ax { font-family: var(--mono); font-size: 10px; letter-spacing: .1em; fill: var(--mute-l); }

/* Honestidad del dato */
.datafoot { margin-top: 20px; border-top: 1px solid var(--rule); padding-top: 10px; }
.df-line { margin: 0 0 4px; color: var(--mute); font-size: 10.5px; letter-spacing: .06em; line-height: 1.5; text-transform: uppercase; }
.warnband, .warnband-l { border: 1px solid var(--risk-moderado, var(--risk-moderado-d)); color: var(--risk-moderado, var(--risk-moderado-d)); padding: 8px 12px; margin: 8px 0; font-size: 11px; }
.warnband-l { border-color: var(--rule-l); color: var(--mute-l); }
.warn-s { color: var(--risk-moderado-d); font-size: 10px; }

/* Formularios */
.narrow { max-width: 560px; margin-left: 0; }
.form { display: grid; gap: 8px; margin: 28px 0; }
.form.inline { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); align-items: end; gap: 12px 16px; }
.form .label { margin: 12px 0 0; }
.form.inline .label { margin: 0 0 4px; grid-column: auto; }
input[type="text"], input[type="email"], input[type="password"], input[type="search"], select { width: 100%; height: 48px; padding: 0 14px; background: var(--ink-2); border: 1px solid var(--rule-d); color: var(--text-d); font: inherit; border-radius: 0; }
input:focus, select:focus { border-color: var(--text-d); outline: none; }
.surface-l input, .sec.light input, .surface-l select, html[data-theme="light"] input, html[data-theme="light"] select { background: var(--paper); color: var(--text-l); border-color: var(--rule-l); }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; color: var(--mute-d); margin: 12px 0; }
.check input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--text-d); flex: none; }
.search { display: grid; grid-template-columns: 1fr auto; gap: 8px 12px; align-items: end; margin-top: 28px; max-width: 640px; }
.search .label { grid-column: 1 / -1; margin: 0; }
.keybox { background: var(--ink-2); border: 1px solid var(--rule-d); padding: 12px 14px; word-break: break-all; text-transform: none; letter-spacing: .02em; }
.acct-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 4vw, 64px); margin-top: 32px; }
@media (max-width: 860px) { .acct-grid { grid-template-columns: 1fr; } }
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border: 1px solid var(--rule-d); margin: 40px 0; }
.plan { padding: 28px; border-left: 1px solid var(--rule-d); display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.plan:first-child { border-left: 0; }
.plan-p { font-size: clamp(32px, 3.4vw, 48px); font-stretch: 78%; font-weight: 500; letter-spacing: -.02em; line-height: 1; margin: 4px 0; }
@media (max-width: 860px) { .plans { grid-template-columns: 1fr; } .plan { border-left: 0; border-top: 1px solid var(--rule-d); } .plan:first-child { border-top: 0; } }

/* Documento / informe (superficie clara) */
.doc-in { max-width: 860px; margin-left: 0; }
.doc, .report { color: var(--body-l); }
.doc p, .doc li, .report p, .report li { max-width: 42em; }
.dash { list-style: none; padding: 0; margin: 0 0 16px; }
.dash li { position: relative; padding-left: 24px; margin-bottom: 8px; max-width: 42em; }
.dash li::before { content: ""; position: absolute; left: 0; top: .85em; width: 8px; height: 1px; background: currentColor; }
.report { padding-top: 32px; padding-bottom: 64px; }
.rep-head { border-bottom: 1px solid var(--text-l); padding-bottom: 24px; }
.rep-head .sym { width: 44px; color: var(--text-l); }
.rep-head p { margin: 4px 0; }
.rep-actions { margin: 24px 0; }

/* Pie */
.foot { background: var(--ink); border-top: 1px solid var(--rule-d2); color: var(--text-d); padding-top: 56px; }
.foot-in { display: grid; grid-template-columns: 5fr 3fr 3fr 3fr; gap: clamp(24px, 4vw, 64px); padding-bottom: 48px; }
.foot-brand .sym { width: 52px; display: block; margin-bottom: 14px; }
.foot-brand p { margin: 0 0 6px; }
.foot-col { display: flex; flex-direction: column; gap: 8px; }
.foot-col a { font-size: 14px; color: var(--mute-d); text-decoration: none; }
.foot-col a:hover { color: var(--text-d); }
.foot-legal { border-top: 1px solid var(--rule-d2); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding-top: 18px; padding-bottom: 28px; color: var(--mute-d); }
.foot-legal p { margin: 0; font-size: 11px; }
.made { display: inline-flex; align-items: center; gap: 8px; }
.flag { display: inline-block; }
@media (max-width: 1100px) { .foot-in { grid-template-columns: 1fr 1fr 1fr; } .foot-brand { grid-column: 1 / -1; } }
@media (max-width: 860px) { .foot-in { grid-template-columns: 1fr; } }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }

/* Impresión: informes claros, sin cabecera ni pie */
@page { size: A4; margin: 20mm; }
@media print {
  body, .surface-d { background: #fff; color: #000; }
  .top, .foot, .noprint, .skip { display: none !important; }
  .report { padding: 0; }
  .tbl-wrap { overflow: visible; }
  a { text-decoration: none; }
}

/* Columnas contiguas: una cifra alineada a la derecha seguida de texto necesita aire */
.tbl th.r + th:not(.r), .tbl td.r + td:not(.r) { padding-left: 18px; }

/* Capa de coca: celdas de 1 km² en el color de marca, tres intensidades. No capturan el cursor para no tapar los municipios. */
.cc { fill: var(--brand-risk); pointer-events: none; }
.cc0 { opacity: .45; } .cc1 { opacity: .75; } .cc2 { opacity: 1; }
.cc-sw { display: inline-block; width: 12px; height: 12px; background: var(--brand-risk); vertical-align: -2px; margin-right: 8px; }
.cc-sw0 { opacity: .45; } .cc-sw1 { opacity: .75; }

/* Fondo satelital (NASA GIBS): el coloreado por municipio se vuelve translúcido para dejar ver la imagen. */
.sat-img { pointer-events: none; }
.inset-bg { fill: var(--ink); }
.map.sat .mp { fill-opacity: .55; stroke: rgba(236,237,238,.3); stroke-width: .35; }
.map.sat .mp.i0 { fill-opacity: .06; }
.map.sat .mp.nf { fill-opacity: .3; }
.map.sat .mp.out { opacity: .4; }
.map.sat .dp { stroke: rgba(236,237,238,.75); stroke-width: .8; }
.bases { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 16px; }
.bases .label { margin: 0 6px 0 0; }

/* Informes y comparador: documento de lectura y de impresión. */
.rep-cover { border-bottom: 2px solid var(--text-l); padding-bottom: 28px; }
.rep-wm, .rep-wm .b-int { color: var(--fg); }
.rep-wm { margin: 0 0 28px; display: none; }
.rep-meta { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px 24px; margin: 28px 0 0; }
.rep-meta .wide { grid-column: 1 / -1; }
.rep-meta dt { font-family: var(--mono); font-size: 10.5px; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; color: var(--mute); }
.rep-meta dd { margin: 3px 0 0; font-size: 14px; }
.rep-sec { margin-top: 44px; }
.rep-sec h2 { border-bottom: 1px solid var(--rule); padding-bottom: 8px; }
.rep-kpis { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--text-l); border-bottom: 1px solid var(--rule); margin: 18px 0 26px; }
.kpi { padding: 16px 16px 14px 0; }
.kpi + .kpi { padding-left: 18px; border-left: 1px solid var(--rule); }
.kpi p { margin: 0; }
.kpi-v { font-family: var(--sans); font-size: 46px; line-height: 1; font-weight: 600; letter-spacing: -.01em; margin: 6px 0 10px !important; }
.rep-finds { padding-left: 20px; }
.rep-finds li { margin: 0 0 12px; max-width: 62em; }
.rep-map .map { max-height: 560px; }
.rep-foot-fixed { display: none; }
.cmp-form { display: grid; grid-template-columns: repeat(4, 1fr) auto; gap: 14px; align-items: end; margin: 26px 0 10px; }
.cmp-form input { width: 100%; min-width: 0; }
.cmp-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 26px 44px; }
.cmp-bars { margin: 0; }
.cmp-bars figcaption { margin-bottom: 6px; }
.cmp-tbl tr.grp th { text-align: left; padding-top: 22px; color: var(--mute); }
.cmp-max { font-weight: 700; background: color-mix(in srgb, var(--fg) 9%, transparent); }
.ms { stroke: var(--strong); stroke-width: 1.8; stroke-linejoin: round; }
.ms1 { stroke-dasharray: 8 4; } .ms2 { stroke-dasharray: 2 3; stroke-width: 2.4; } .ms3 { stroke-dasharray: 10 3 2 3; }
.ms-legend { display: flex; flex-wrap: wrap; gap: 8px 26px; list-style: none; padding: 0; margin: 10px 0 0; }
.ms-legend li { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.ms-legend svg { width: 40px; height: 8px; flex: none; }
@media (max-width: 760px) {
  .rep-meta { grid-template-columns: 1fr 1fr; }
  .rep-kpis { grid-template-columns: 1fr 1fr; }
  .kpi:nth-child(3) { border-left: 0; padding-left: 0; }
  .kpi:nth-child(n+3) { border-top: 1px solid var(--rule); }
  .kpi-v { font-size: 38px; }
  .cmp-grid { grid-template-columns: 1fr; }
  .cmp-form { grid-template-columns: 1fr; }
}
@media (min-width: 761px) and (max-width: 1100px) { .cmp-form { grid-template-columns: repeat(2, 1fr); } }
@page { size: A4; margin: 14mm 14mm 18mm; }
@media print {
  body { font-size: 10.5pt; }
  .rep-sec { margin-top: 26px; }
  .rep-sec h2 { break-after: avoid; }
  .chart-fig, .tbl, .kpi, .avoid-break, .cmp-bars, .rep-map { break-inside: avoid; }
  .rep-kpis { grid-template-columns: repeat(4, 1fr); }
  .rep-meta { grid-template-columns: repeat(4, 1fr); }
  .cmp-grid { grid-template-columns: repeat(2, 1fr); }
  .rep-map .map { max-height: 105mm; }
  .rep-wm { display: flex; }
  .cmp-max { background: #e6e6e6 !important; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  .sat-img { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  .rep-foot-fixed { display: block; position: fixed; bottom: 0; left: 0; right: 0; font: 8px var(--mono); letter-spacing: .06em; text-transform: uppercase; color: #555; border-top: 1px solid #bbb; padding-top: 4px; }
}

/* Analítica: radar de percentiles y dispersión. */
.radar { width: 100%; max-width: 520px; height: auto; display: block; margin: 0 auto; }
.rd-fill { fill: var(--strong); fill-opacity: .1; }
.sc-p { fill: var(--mute); opacity: .55; }
.sc-hl { fill: var(--brand-risk); stroke: var(--fg); stroke-width: 1.2; }
.callout { border: 1px solid var(--rule); border-left: 3px solid var(--text-l); padding: 14px 18px; margin: 18px 0; background: color-mix(in srgb, var(--fg) 3%, transparent); }
.callout p { margin: 0 0 6px; max-width: 70em; }
.callout p:last-child { margin: 0; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 28px 44px; align-items: start; }
@media (max-width: 860px) { .two-col { grid-template-columns: 1fr; } }
.rep-end { margin-top: 56px; padding-top: 18px; border-top: 2px solid var(--text-l); }
.rep-end p { margin: 0 0 6px; }
.cmp-yes { color: var(--fg); font-weight: 600; }
.spark { width: 110px; height: 26px; vertical-align: middle; display: inline-block; }
.reg td { height: 34px; }
.kpi { min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 380px) { .kpi-v { font-size: 30px; } .kpi + .kpi { padding-left: 12px; } }
