/*colores, tipos y medidas*/
:root {
  color-scheme: light;
  --bg: #f6f8fa;
  --surface: #ffffff;
  --surface-2: #edf1f5;
  --line: #d9e0e7;
  --fg: #14202b;
  --muted: #566270;
  --accent: #17405e;
  --accent-fg: #ffffff;
  --accent-soft: #e5edf4;
  --s0: #edf8b1;
  --s1: #7fcdbb;
  --s2: #2c7fb8;
  --s3: #253494;
  --s0-fg: #3d4a10;
  --s1-fg: #0c3a33;
  --s2-fg: #ffffff;
  --s3-fg: #ffffff;
  --sn: #e7ecf1;
  --sn-fg: #7a8794;
  --ocean: #eef3f7;
  --land: #dde3e9;
  --border-map: #ffffff;
  --st-validada: #17405e;
  --st-revision: #5f8fb8;
  --st-curso: #a9c8e3;
  --st-none: #dde3e9;
  --ok: #22764a;
  --ok-bg: #e3f1e8;
  --ok-ink: #17563a;
  --warn: #94590a;
  --warn-bg: #fbf1dd;
  --warn-ink: #6f430a;
  --crit: #a8261d;
  --overlay: rgba(8, 16, 20, 0.55);
  --shadow: 0 1px 2px rgba(20, 32, 43, 0.06), 0 8px 24px rgba(20, 32, 43, 0.08);
  --font-serif: 'Source Serif 4', Georgia, 'Times New Roman', serif;
  --font-sans: 'Source Sans 3', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-data: 'Source Sans 3', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --r: 8px;
  /* un color por pais en la comparacion, en este orden. Comprobados para daltonismo: los tres
     primeros se distinguen entre si (el radar usa como mucho tres) y los seis, cada uno del
     siguiente. --c-ink es el texto encima */
  --c1: #c2407a;
  --c2: #008a17;
  --c3: #6a4ce2;
  --c4: #d0601f;
  --c5: #257de0;
  --c6: #ec4647;
  --c-ink: #ffffff;
}
/*modo oscuro: sigue al sistema, salvo que se elija otro con el boton de arriba (cookie theme).
  Los dos bloques llevan los mismos valores; una prueba comprueba que no se separen*/
:root[data-theme='dark'] {
  color-scheme: dark;
  --bg: #0e141a;
  --surface: #161e27;
  --surface-2: #1e2832;
  --line: #2d3946;
  --fg: #e4eaf0;
  --muted: #9ba8b5;
  --accent: #7fb4e2;
  --accent-fg: #0b1824;
  --accent-soft: #1b2f43;
  --s3: #4459c9;
  --sn: #25303b;
  --sn-fg: #8e9ba8;
  --ocean: #111921;
  --land: #2a3541;
  --border-map: #111921;
  --st-validada: #7fb4e2;
  --st-revision: #4d7ea9;
  --st-curso: #34516e;
  --st-none: #2a3541;
  --ok: #5fc48e;
  --ok-bg: #15301f;
  --ok-ink: #a6e3bf;
  --warn: #e3ab4f;
  --warn-bg: #2d2412;
  --warn-ink: #f0cf96;
  --crit: #f2837a;
  --overlay: rgba(0, 0, 0, 0.65);
  --c1: #e0699b;
  --c2: #0aac23;
  --c3: #9887ef;
  --c4: #e0773a;
  --c5: #338ced;
  --c6: #eb6263;
  --c-ink: #0b1824;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(0, 0, 0, 0.3);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    color-scheme: dark;
    --bg: #0e141a;
    --surface: #161e27;
    --surface-2: #1e2832;
    --line: #2d3946;
    --fg: #e4eaf0;
    --muted: #9ba8b5;
    --accent: #7fb4e2;
    --accent-fg: #0b1824;
    --accent-soft: #1b2f43;
    --s3: #4459c9;
    --sn: #25303b;
    --sn-fg: #8e9ba8;
    --ocean: #111921;
    --land: #2a3541;
    --border-map: #111921;
    --st-validada: #7fb4e2;
    --st-revision: #4d7ea9;
    --st-curso: #34516e;
    --st-none: #2a3541;
    --ok: #5fc48e;
    --ok-bg: #15301f;
    --ok-ink: #a6e3bf;
    --warn: #e3ab4f;
    --warn-bg: #2d2412;
    --warn-ink: #f0cf96;
    --crit: #f2837a;
    --overlay: rgba(0, 0, 0, 0.65);
    --c1: #e0699b;
    --c2: #0aac23;
    --c3: #9887ef;
    --c4: #e0773a;
    --c5: #338ced;
    --c6: #eb6263;
    --c-ink: #0b1824;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(0, 0, 0, 0.3);
  }
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
[hidden] {
  display: none !important;
}
img {
  max-width: 100%;
}
body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  /* el pie va siempre abajo, aunque la pagina sea corta */
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}
body > .wrap {
  width: 100%;
}
body > main {
  flex: 1 0 auto;
}
body::before {
  content: '';
  position: fixed;
  inset: 0 0 auto;
  height: env(safe-area-inset-top, 0px);
  z-index: 30;
  background: var(--surface);
}
a {
  color: var(--accent);
}
.mono {
  font-family: var(--font-data);
  font-variant-numeric: tabular-nums;
}
.muted {
  color: var(--muted);
}
.small {
  font-size: 13px;
}
.wrap {
  max-width: 1400px;
  margin: 0 auto;
  padding-left: max(clamp(24px, 5vw, 64px), env(safe-area-inset-left, 0px));
  padding-right: max(clamp(24px, 5vw, 64px), env(safe-area-inset-right, 0px));
}
h1,
h2,
h3,
h4 {
  margin: 0;
  letter-spacing: -0.012em;
  text-wrap: balance;
}
h1,
h2 {
  font-family: var(--font-serif);
  letter-spacing: -0.01em;
}
h1 {
  font-size: clamp(23px, 2.6vw, 30px);
  line-height: 1.15;
  font-weight: 600;
}
h2 {
  font-size: 18px;
  line-height: 1.3;
  font-weight: 600;
}
h3 {
  font-size: 15px;
  font-weight: 600;
}
h4 {
  font-size: 15px;
  font-weight: 600;
}
p {
  margin: 0;
}
.eyebrow {
  font-family: var(--font-data);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
}
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
button {
  font: inherit;
  color: inherit;
}
input,
select,
textarea {
  font: inherit;
  color: var(--fg);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 10px;
  width: 100%;
}
textarea {
  resize: vertical;
  min-height: 44px;
}
label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin: 14px 0 6px;
}
.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

/*barra de arriba*/
.topbar {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 25;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.topbar .wrap {
  display: flex;
  align-items: center;
  gap: 14px 24px;
  min-height: 60px;
  flex-wrap: wrap;
  padding-block: 8px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--fg);
}
.mark {
  display: grid;
  grid-template-columns: repeat(2, 9px);
  gap: 2px;
}
.mark i {
  width: 9px;
  height: 9px;
  border-radius: 2px;
  display: block;
}
.brand b {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 18px;
  letter-spacing: -0.01em;
  display: block;
  line-height: 1.1;
}
.brand small {
  display: block;
  font-size: 11.5px;
  color: var(--muted);
  line-height: 1.2;
}
.nav {
  display: flex;
  gap: 2px;
  overflow-x: auto;
  max-width: 100%;
}
.nav a {
  padding: 7px 12px;
  border-radius: 6px;
  color: var(--muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 14px;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 6px;
}
.nav a:hover {
  color: var(--fg);
}
.nav a.on {
  color: var(--fg);
  background: var(--surface-2);
}
.count {
  font-family: var(--font-data);
  font-size: 11px;
  background: var(--accent);
  color: var(--accent-fg);
  border-radius: 10px;
  padding: 0 6px;
  line-height: 18px;
}
.role {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}
.role label {
  margin: 0;
  font-weight: 500;
  color: var(--muted);
  white-space: nowrap;
}
.role select {
  width: auto;
  padding: 6px 8px;
  font-size: 13px;
}
.banner {
  background: var(--accent-soft);
  font-size: 13px;
}
.banner .wrap {
  padding-block: 7px;
}
main {
  padding-block: 28px 56px;
  min-height: 60vh;
}
footer {
  border-top: 1px solid var(--line);
  font-size: 12.5px;
  color: var(--muted);
}
footer .wrap {
  padding-block: 18px;
  display: flex;
  gap: 8px 24px;
  flex-wrap: wrap;
  justify-content: space-between;
}

/*piezas basicas: botones, chips, tarjetas, tablas*/
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
}
.pad {
  padding: 18px;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 600;
  font-size: 14px;
  padding: 8px 14px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--fg);
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  line-height: 1.3;
}
.btn:hover {
  border-color: var(--muted);
}
.btn.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-fg);
}
.btn.primary:hover {
  filter: brightness(1.07);
}
.btn.ghost {
  background: transparent;
  border-color: transparent;
  color: var(--accent);
}
.btn.ghost:hover {
  background: var(--accent-soft);
}
.btn.sm {
  padding: 5px 10px;
  font-size: 13px;
}
.btn.danger {
  color: var(--crit);
}
.row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}
.row-end {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--fg);
  white-space: nowrap;
  line-height: 20px;
}
.pill .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex: none;
}
.tag {
  font-family: var(--font-data);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 1px dashed var(--muted);
  color: var(--muted);
  border-radius: 4px;
  padding: 0 5px;
  line-height: 17px;
  white-space: nowrap;
}
.score {
  display: inline-grid;
  place-items: center;
  min-width: 26px;
  height: 26px;
  padding: 0 6px;
  border-radius: 5px;
  font-family: var(--font-data);
  font-weight: 600;
  font-size: 13px;
  flex: none;
}
.score.lg {
  min-width: 40px;
  height: 40px;
  font-size: 18px;
  border-radius: 7px;
}
.score.xs {
  min-width: 20px;
  height: 20px;
  font-size: 11px;
  border-radius: 4px;
  padding: 0 4px;
}
.s0 {
  background: var(--s0);
  color: var(--s0-fg);
  box-shadow: inset 0 0 0 1px rgba(61, 74, 16, 0.22);
}
.s1 {
  background: var(--s1);
  color: var(--s1-fg);
}
.s2 {
  background: var(--s2);
  color: var(--s2-fg);
}
.s3 {
  background: var(--s3);
  color: var(--s3-fg);
}
.sn {
  background: var(--sn);
  color: var(--sn-fg);
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  padding: 3px 9px;
  border-radius: 5px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--fg);
  text-decoration: none;
  line-height: 1.4;
  max-width: 100%;
}
.chip .id {
  font-family: var(--font-data);
  font-size: 11.5px;
  color: var(--muted);
}
a.chip:hover {
  border-color: var(--accent);
}
.chip.warn {
  border-style: dashed;
  border-color: var(--warn);
  color: var(--warn);
  background: var(--warn-bg);
}
button.chip {
  cursor: pointer;
}
button.chip.on {
  background: var(--accent-soft);
  border-color: var(--accent);
}
.note {
  font-size: 12.5px;
  color: var(--muted);
}
.empty-box {
  border: 1px dashed var(--line);
  border-radius: var(--r);
  padding: 28px;
  text-align: left;
}

/*tira de 14 casillas de colores*/
.heatwrap {
  display: grid;
  gap: 4px;
}
.heat {
  display: grid;
  grid-template-columns: repeat(14, minmax(0, 1fr));
  gap: 3px;
}
.heat .hc {
  height: 46px;
  border-radius: 4px;
  display: grid;
  place-items: center;
  font-family: var(--font-data);
  font-weight: 600;
  font-size: 14px;
}
.heatwrap.small .hc {
  height: 30px;
  font-size: 12px;
}
.heat.codes span {
  font-family: var(--font-data);
  font-size: 11px;
  color: var(--muted);
  text-align: center;
}
.heat.blocks span {
  font-size: 11.5px;
  color: var(--muted);
  border-top: 2px solid var(--line);
  padding-top: 4px;
  line-height: 1.25;
  min-width: 0;
  overflow-wrap: anywhere;
}

/*inicio y mapa*/
.home-head {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 20px;
}
.home-head .lede {
  max-width: 62ch;
  margin-top: 8px;
  color: var(--muted);
}
.map-card {
  overflow: hidden;
  margin-bottom: 20px;
}
.map-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}
.seg {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
  flex-wrap: wrap;
}
.seg button {
  border: 0;
  background: var(--surface);
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border-right: 1px solid var(--line);
  color: var(--muted);
}
.seg button:last-child {
  border-right: 0;
}
.seg button.on {
  background: var(--accent);
  color: var(--accent-fg);
}
.map-bar select {
  width: auto;
  max-width: 100%;
  padding: 5px 8px;
  font-size: 13px;
}
.map-bar .search {
  width: 250px;
  max-width: 100%;
}
.map-bar .search input {
  padding: 6px 10px;
  font-size: 13.5px;
}
.map-wrap {
  position: relative;
  background: var(--ocean);
}
#map-svg {
  display: block;
  width: 100%;
  height: auto;
  max-height: 74vh;
  cursor: grab;
  touch-action: none;
}
#map-svg path.c {
  stroke: var(--border-map);
  stroke-width: 0.6;
  transition: fill 0.25s;
}
#map-svg path.c.has {
  cursor: pointer;
}
#map-svg path.c:hover {
  filter: brightness(0.94);
}
#map-svg path.c:focus-visible {
  outline: none;
  stroke: var(--fg);
  stroke-width: 1.5;
}
.map-msg {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 14px;
  padding: 20px;
  text-align: center;
}
.zoom-btns {
  position: absolute;
  right: 14px;
  top: 14px;
  display: grid;
  gap: 4px;
}
.zoom-btns button {
  width: 34px;
  height: 34px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: var(--surface);
  cursor: pointer;
  font-size: 17px;
  font-weight: 600;
  line-height: 1;
  box-shadow: 0 1px 2px rgba(21, 35, 43, 0.08);
}
.presets {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}
.legend {
  position: absolute;
  left: 14px;
  bottom: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  padding: 8px 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 12.5px;
  color: var(--muted);
  align-items: center;
  max-width: min(560px, calc(100% - 28px));
  box-shadow: 0 1px 2px rgba(21, 35, 43, 0.06);
}
.legend .sw {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 3px;
  vertical-align: -3px;
  margin-right: 6px;
}
.home-strip {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr) minmax(0, 1fr);
  gap: 20px;
  /* las tres tarjetas, igual de altas */
  align-items: stretch;
}
.stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.stat b {
  display: block;
  font-family: var(--font-data);
  font-size: 26px;
  font-weight: 600;
  line-height: 1.1;
}
.stat span {
  font-size: 12.5px;
  color: var(--muted);
}
.clist {
  display: grid;
  gap: 2px;
  /* el fondo al pasar el raton sobresale, pero el texto queda alineado con el titulo */
  margin: 8px -8px 0;
}
.clist a {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 7px 8px;
  border-radius: 6px;
  color: var(--fg);
  text-decoration: none;
}
.clist a:hover {
  background: var(--surface-2);
}
.clist .nm {
  display: flex;
  gap: 6px;
  align-items: center;
  min-width: 0;
}
.feed ul {
  margin: 8px 0 0;
  padding: 0;
  display: grid;
  gap: 12px;
  font-size: 13.5px;
}
.feed li {
  list-style: none;
  display: grid;
  gap: 2px;
}
.feed time {
  font-size: 12px;
  color: var(--muted);
}
.tip {
  position: fixed;
  z-index: 60;
  pointer-events: none;
  background: var(--fg);
  color: var(--surface);
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 12.5px;
  display: grid;
  gap: 2px;
  max-width: 260px;
  box-shadow: var(--shadow);
}

/*ficha de pais*/
.crumbs {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 8px;
}
.crumbs a {
  color: var(--muted);
}
.title-row {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}
.ctry-top {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 18px;
}
.ctry-meta {
  color: var(--muted);
  font-size: 13.5px;
  margin-top: 6px;
  max-width: 80ch;
}
.howto {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  background: var(--accent-soft);
  border-radius: var(--r);
  padding: 14px 18px;
  margin-bottom: 18px;
  font-size: 14px;
}
.howto p {
  max-width: 95ch;
}
.overview {
  margin-bottom: 24px;
}
.overview h2 {
  font-size: 16px;
  margin-bottom: 6px;
}
.ov-row {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.ov-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}
.ov-lvl {
  display: flex;
  gap: 10px;
  align-items: center;
  font-weight: 600;
  font-size: 14px;
}
.ov-items {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.ov-items button {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 999px;
  padding: 3px 11px;
  font-size: 13px;
  cursor: pointer;
  color: var(--fg);
}
.ov-items button:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.ov-none {
  font-size: 13px;
  color: var(--muted);
}
.qlist {
  display: grid;
  gap: 8px;
}
.q-block {
  margin-top: 18px;
}
.q-block:first-child {
  margin-top: 0;
}
.qi {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  scroll-margin-top: 90px;
}
.qi.open {
  border-color: var(--accent);
}
.q-row {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto 16px;
  gap: 14px;
  align-items: center;
  width: 100%;
  text-align: left;
  border: 0;
  background: none;
  padding: 14px 18px;
  cursor: pointer;
  border-radius: var(--r);
}
.q-row:hover {
  background: var(--surface-2);
}
.q-code {
  font-family: var(--font-data);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
}
.q-name b {
  display: block;
  font-size: 15px;
  font-weight: 600;
}
.q-name span {
  display: block;
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.35;
  margin-top: 2px;
}
.q-lvl {
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: 13.5px;
  font-weight: 500;
  white-space: nowrap;
  min-width: 190px;
}
.chev {
  color: var(--muted);
  font-size: 11px;
  transition: transform 0.2s;
}
.qi.open .chev {
  transform: rotate(180deg);
}
.q-detail {
  padding: 2px 18px 18px 72px;
  display: grid;
  gap: 12px;
}
.q-detail p {
  max-width: 80ch;
}
.kv {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  gap: 12px;
  font-size: 13.5px;
  align-items: start;
}
.kv > span {
  color: var(--muted);
  font-weight: 500;
  padding-top: 3px;
}
.prov {
  font-family: var(--font-data);
  font-size: 12.5px;
  color: var(--muted);
}
.rev-note {
  border: 1px dashed var(--warn);
  background: var(--warn-bg);
  border-radius: var(--r);
  padding: 12px 16px;
  margin-bottom: 14px;
  font-size: 13.5px;
}
.bar {
  height: 10px;
  background: var(--surface-2);
  border-radius: 5px;
  overflow: hidden;
}
.bar i {
  display: block;
  height: 100%;
  border-radius: 5px;
}
.tbl {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}
.tbl th {
  text-align: left;
  font-weight: 600;
  font-size: 12px;
  color: var(--muted);
  padding: 6px 8px;
  border-bottom: 1px solid var(--line);
}
.tbl td {
  padding: 8px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.tbl td.num,
.tbl th.num {
  text-align: right;
  font-family: var(--font-data);
  font-variant-numeric: tabular-nums;
}
.tbl tr:last-child td {
  border-bottom: 0;
}
.scroll-x {
  overflow-x: auto;
}
.checks {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 9px;
  font-size: 13.5px;
}
.checks li {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 8px;
}
.checks .ic {
  font-family: var(--font-data);
  font-weight: 700;
}
.ic.ok {
  color: var(--ok);
}
.ic.wn {
  color: var(--warn);
}
.tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 18px;
  overflow-x: auto;
}
.tabs button {
  border: 0;
  background: none;
  padding: 10px 14px;
  font-weight: 600;
  font-size: 14px;
  color: var(--muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  white-space: nowrap;
}
.tabs button.on {
  color: var(--fg);
  border-bottom-color: var(--accent);
}
.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
}
.timeline li {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.timeline .v {
  font-family: var(--font-data);
  font-weight: 600;
  font-size: 13px;
}
.progress-card {
  display: grid;
  gap: 14px;
}
.evals {
  display: grid;
  gap: 10px;
}
.eval-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 160px 60px;
  gap: 12px;
  align-items: center;
  font-size: 14px;
}
.steps3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}
.steps3 div {
  display: grid;
  gap: 4px;
  font-size: 13.5px;
  align-content: start;
}
.steps3 b {
  font-family: var(--font-data);
  color: var(--accent);
}

/*asistente de evaluar*/
.ev {
  max-width: 860px;
  margin: 0 auto;
}
.sent {
  background: var(--accent-soft);
  border-radius: var(--r);
  padding: 14px 18px;
  margin-bottom: 16px;
  font-size: 14px;
}
.drafts {
  display: grid;
  gap: 8px;
}
.draft {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.draft b {
  display: block;
  font-size: 15px;
}
.ev-head {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 20px;
}
.ev-head .sub {
  font-size: 13px;
  color: var(--muted);
  margin-top: 4px;
  max-width: 62ch;
}
.track {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}
.track .grp {
  display: flex;
  gap: 4px;
}
.track button {
  width: 30px;
  height: 30px;
  border-radius: 6px;
  border: 1.5px solid var(--line);
  background: var(--surface);
  font-family: var(--font-data);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  display: grid;
  place-items: center;
}
.track button.s0 {
  background: var(--s0);
  color: var(--s0-fg);
  border-color: transparent;
}
.track button.s1 {
  background: var(--s1);
  color: var(--s1-fg);
  border-color: transparent;
}
.track button.s2 {
  background: var(--s2);
  color: var(--s2-fg);
  border-color: transparent;
}
.track button.s3 {
  background: var(--s3);
  color: var(--s3-fg);
  border-color: transparent;
}
.track button.cur {
  outline: 2px solid var(--fg);
  outline-offset: 2px;
}
.track button.fin {
  width: auto;
  padding: 0 12px;
  font-family: var(--font-sans);
  font-size: 13px;
  color: var(--muted);
}
.track-label {
  font-size: 13px;
  color: var(--muted);
  margin: 12px 0 18px;
}
.ev-card {
  padding: 28px 32px;
}
.ev-q {
  font-size: 21px;
  line-height: 1.3;
  margin: 6px 0 8px;
  max-width: 44ch;
}
.def-d {
  font-size: 13.5px;
  color: var(--muted);
}
.def-d summary,
.helper summary {
  cursor: pointer;
  color: var(--accent);
  font-weight: 600;
  font-size: 13.5px;
}
.def-d p {
  margin-top: 6px;
  max-width: 70ch;
}
.ev-sec {
  margin-top: 24px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}
.ev-sec > h3 {
  font-size: 16px;
  margin-bottom: 12px;
}
.levels {
  display: grid;
  gap: 8px;
}
.level {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  text-align: left;
  padding: 12px 16px;
  border: 1.5px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  cursor: pointer;
}
.level:hover {
  border-color: var(--muted);
}
.level.on {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.level b {
  display: block;
  font-size: 15px;
  font-weight: 600;
}
.level .d {
  display: block;
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.4;
}
.hint {
  font-size: 12.5px;
  color: var(--muted);
  margin-top: 6px;
}
.helper {
  margin-top: 14px;
  border-radius: 8px;
  background: var(--surface-2);
  padding: 10px 14px;
}
.helper[open] {
  padding-bottom: 16px;
}
.helper textarea {
  margin-top: 10px;
}
.hq {
  margin-top: 14px;
}
.hq p {
  font-size: 13.5px;
  font-weight: 500;
  margin-bottom: 6px;
}
.sg {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 16px;
  font-size: 14px;
}
.norms {
  display: grid;
  gap: 6px;
}
.norm {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  text-align: left;
  padding: 10px 14px;
  border: 1.5px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  cursor: pointer;
}
.norm:hover {
  border-color: var(--muted);
}
.norm b {
  display: block;
  font-weight: 600;
  font-size: 14px;
}
.norm .tick {
  width: 18px;
  height: 18px;
  border: 1.5px solid var(--muted);
  border-radius: 4px;
  margin-top: 2px;
  display: grid;
  place-items: center;
  box-sizing: border-box;
}
.norm.on {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.norm.on .tick {
  background: var(--accent);
  border-color: var(--accent);
}
.norm.on .tick::after {
  content: '';
  box-sizing: border-box;
  width: 5px;
  height: 9px;
  border: solid var(--accent-fg);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg) translate(-1px, -1px);
}
.row.nowrap {
  flex-wrap: nowrap;
}
.row.nowrap input {
  flex: 1;
  min-width: 0;
}
.ev-foot {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.todo {
  display: grid;
  gap: 14px;
  margin-top: 8px;
}
.todo .lb {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 6px;
}
.link {
  display: inline;
  margin: 0;
  font-size: inherit;
  font-weight: 600;
  color: var(--accent);
  cursor: pointer;
  text-decoration: underline;
}
.ok-line {
  color: var(--ok);
  font-weight: 600;
}
.dev {
  margin-top: 10px;
  font-size: 13px;
  color: var(--warn);
  background: var(--warn-bg);
  border-radius: 6px;
  padding: 8px 12px;
}
.picker {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
.picker button {
  display: grid;
  gap: 6px;
  justify-items: start;
  text-align: left;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
}
.picker button.on {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent) inset;
  background: var(--accent-soft);
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 18px;
}
.form-grid .span2 {
  grid-column: 1/-1;
}
.check {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  font-weight: 500;
}
.check input {
  width: auto;
  margin-top: 3px;
}

/*cola de revision*/
.review-grid {
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}
.queue {
  overflow: hidden;
}
.q-head {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
}
.q-item {
  display: grid;
  gap: 3px;
  width: 100%;
  text-align: left;
  padding: 13px 16px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  cursor: pointer;
}
.q-item:last-child {
  border-bottom: 0;
}
.q-item:hover {
  background: var(--surface-2);
}
.q-item.on {
  background: var(--accent-soft);
}
.q-item.done {
  opacity: 0.6;
}
.q-title {
  font-weight: 600;
  font-size: 14px;
}
.q-sub {
  font-size: 13px;
}
.q-meta {
  font-size: 12px;
  color: var(--muted);
}
.kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 16px 0 18px;
}
.kpi {
  background: var(--surface-2);
  border-radius: 6px;
  padding: 12px;
}
.kpi b {
  display: block;
  font-family: var(--font-data);
  font-size: 22px;
  font-weight: 600;
}
.kpi span {
  font-size: 12.5px;
  color: var(--muted);
}
.mini-seg {
  display: inline-flex;
  gap: 3px;
}
.mini-seg button {
  width: 26px;
  height: 26px;
  border-radius: 5px;
  border: 1px solid var(--line);
  background: var(--surface);
  font-family: var(--font-data);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
}
.mini-seg button.on.s0 {
  background: var(--s0);
  color: var(--s0-fg);
  border-color: transparent;
}
.mini-seg button.on.s1 {
  background: var(--s1);
  color: var(--s1-fg);
  border-color: transparent;
}
.mini-seg button.on.s2 {
  background: var(--s2);
  color: var(--s2-fg);
  border-color: transparent;
}
.mini-seg button.on.s3 {
  background: var(--s3);
  color: var(--s3-fg);
  border-color: transparent;
}
.mini-seg button:not(.on) {
  background: var(--surface);
  color: var(--muted);
}
.diff {
  display: flex;
  gap: 18px;
  align-items: center;
  flex-wrap: wrap;
  margin: 16px 0;
}
.diff > div {
  display: grid;
  gap: 6px;
}
.diff .arrow {
  font-family: var(--font-data);
  color: var(--muted);
  font-size: 18px;
}
.txtdiff {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 8px;
}
.txtdiff div {
  border-radius: 6px;
  padding: 10px 12px;
  font-size: 13.5px;
}
.txtdiff .old {
  background: var(--surface-2);
}
.txtdiff .new {
  background: var(--accent-soft);
}
.sec {
  margin-top: 20px;
}
.sec > h3 {
  margin-bottom: 8px;
}
.comment {
  display: grid;
  gap: 2px;
  padding: 10px 12px;
  background: var(--surface-2);
  border-radius: 6px;
  font-size: 13.5px;
  margin-bottom: 8px;
}
.comment b {
  font-size: 12.5px;
}
.resolved {
  padding: 12px 14px;
  border-radius: 6px;
  background: var(--accent-soft);
  font-size: 14px;
  margin-top: 16px;
}
.decision {
  font-size: 12.5px;
}
.decision.agree {
  color: var(--ok);
}
.decision.cons {
  color: var(--warn);
}

/*comparar y metodologia*/
.cmp-sel {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0 20px;
}
.cmp-sel button {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  cursor: pointer;
  font-size: 13.5px;
  font-weight: 500;
}
.cmp-sel button.on {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.cmp-sel button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.cmp-rows {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
  gap: 8px 12px;
  align-items: center;
}
.cmp-rows .lb {
  font-weight: 600;
  font-size: 14px;
}
.grid2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 16px;
}
.gaps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.gaps li {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  font-size: 13.5px;
}
.scale-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 14px 0 6px;
}
.scale-grid .card {
  padding: 14px;
  display: grid;
  gap: 8px;
  align-content: start;
}
.method {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
}
.method-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  align-items: start;
}
.rules {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
  font-size: 14px;
}
.rules li {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 10px;
}
.rules .rid {
  font-family: var(--font-data);
  font-weight: 600;
  color: var(--accent);
}
.dimdefs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 24px;
  margin-top: 10px;
}
.dimdefs div {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 8px;
  font-size: 13.5px;
  padding: 6px 0;
  border-bottom: 1px solid var(--line);
}
.dimdefs .c {
  font-family: var(--font-data);
  font-weight: 600;
  color: var(--muted);
}
.lifecycle {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 10px;
  font-size: 13.5px;
}
.lifecycle .arrow {
  color: var(--muted);
  font-family: var(--font-data);
}

/*comparar: tarjetas de arriba y filas con puntos*/
.dot-off {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1.5px dashed var(--line);
  display: inline-block;
  flex: none;
}
.dot-key {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  color: var(--c-ink);
  font-family: var(--font-data);
  font-size: 10px;
  font-weight: 600;
  flex: none;
}
.dot-key.eq {
  background: var(--surface-2);
  color: var(--muted);
  font-size: 13px;
}
.cmp-glance {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.glance {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 16px 18px;
}
.glance .who {
  display: flex;
  gap: 8px;
  align-items: center;
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 10px;
}
.glance b {
  display: block;
  font-family: var(--font-data);
  font-size: 32px;
  font-weight: 600;
  line-height: 1;
}
.glance > span {
  display: block;
  font-size: 13.5px;
  color: var(--muted);
  margin-top: 4px;
}
.cmp-sum {
  font-size: 15.5px;
  line-height: 1.6;
  max-width: 85ch;
  margin: 0 0 22px;
}
.db {
  overflow: hidden;
}
.db-top {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: space-between;
  align-items: center;
  padding: 16px 18px 8px;
}
.db-top h2 {
  font-size: 16px;
}
.db-head,
.db-row {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr) 140px;
  gap: 16px;
  align-items: center;
}
.db-head {
  padding: 6px 18px 10px;
  border-bottom: 1px solid var(--line);
}
.db-scale {
  position: relative;
  height: 46px;
}
.db-scale > span {
  position: absolute;
  bottom: 0;
  transform: translateX(-50%);
  display: grid;
  justify-items: center;
  gap: 4px;
  width: 24%;
  text-align: center;
}
.db-scale > span > em {
  font-style: normal;
  font-size: 11.5px;
  color: var(--muted);
  line-height: 1.2;
}
.db-row {
  width: 100%;
  text-align: left;
  border: 0;
  background: none;
  padding: 10px 18px;
  cursor: pointer;
  border-bottom: 1px solid var(--line);
}
.db-row:hover,
.db-item.open .db-row {
  background: var(--surface-2);
}
.db-lbl > b {
  display: block;
  font-size: 14px;
  font-weight: 600;
}
.db-lbl > span {
  font-family: var(--font-data);
  font-size: 11.5px;
  color: var(--muted);
}
.db-track {
  position: relative;
  height: 30px;
}
.db-track::before {
  content: '';
  position: absolute;
  left: 12.5%;
  right: 12.5%;
  top: 50%;
  height: 2px;
  margin-top: -1px;
  background: var(--line);
}
.db-tick {
  position: absolute;
  top: 50%;
  width: 8px;
  height: 8px;
  margin: -4px 0 0 -4px;
  border-radius: 50%;
  background: var(--line);
}
.db-line {
  position: absolute;
  top: 50%;
  height: 8px;
  margin-top: -4px;
  border-radius: 4px;
  background: var(--muted);
  opacity: 0.28;
}
.db-dot {
  position: absolute;
  top: 50%;
  width: 26px;
  height: 26px;
  margin: -13px 0 0 -13px;
  border-radius: 50%;
  border: 2px solid var(--surface);
  display: grid;
  place-items: center;
  color: var(--c-ink);
  font-family: var(--font-data);
  font-size: 10px;
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(21, 35, 43, 0.25);
}
.db-gap {
  display: flex;
  gap: 6px;
  align-items: center;
  justify-content: flex-end;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
}
.db-gap.eq {
  color: var(--muted);
  font-weight: 400;
}
.db-gap .dot-key {
  width: 18px;
  height: 18px;
  font-size: 8.5px;
}
.db-bhead {
  padding: 16px 18px 6px;
  border-bottom: 1px solid var(--line);
}
.db-detail {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
  padding: 12px 18px 18px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
}
.db-detail .col {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
  display: grid;
  gap: 8px;
  align-content: start;
  font-size: 13.5px;
}
.linkbtn {
  border: 0;
  background: none;
  padding: 0;
  color: var(--accent);
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  font-size: 13.5px;
}
.linkbtn:hover {
  text-decoration: underline;
}

/*conciliacion: lo que puso cada evaluador, lado a lado*/
.conc-tools {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px 16px;
  flex-wrap: wrap;
  margin: 0 0 10px;
}
.ctog {
  display: flex;
  gap: 8px;
  align-items: center;
  border: 0;
  background: none;
  padding: 0;
  text-align: left;
  cursor: pointer;
  color: var(--fg);
  font: inherit;
}
.ctog:hover {
  color: var(--accent);
}
.ctog .chev {
  transition: transform 0.2s;
}
.ctbl tr.open .ctog {
  color: var(--accent);
  font-weight: 600;
}
.ctbl tr.open .ctog .chev {
  transform: rotate(180deg);
}
.ctbl tr.dis > td:first-child {
  box-shadow: inset 3px 0 0 var(--warn);
}
.ev-n {
  display: block;
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 4px;
  white-space: nowrap;
}
.ev-n.wn {
  color: var(--warn);
}
.ctbl tr.cdet > td {
  background: var(--surface-2);
  padding: 14px;
}
.cmpev {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.evcol {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
  display: grid;
  gap: 10px;
  align-content: start;
  font-size: 13.5px;
}
.evcol .kv {
  grid-template-columns: 120px minmax(0, 1fr);
}
.evh {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.chip .only {
  margin-left: 6px;
  font-size: 11px;
  font-weight: 600;
  color: var(--accent);
}
.cnote {
  font-size: 12.5px;
  color: var(--muted);
  margin-top: 10px;
}

/*modal y vista previa del excel*/
.overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: var(--overlay);
  display: grid;
  place-items: center;
  padding: max(16px, env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px))
    max(16px, env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
}
.modal {
  background: var(--surface);
  border-radius: 10px;
  box-shadow: var(--shadow);
  width: min(1080px, 100%);
  max-height: calc(100vh - 32px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.modal.narrow {
  width: min(620px, 100%);
}
.m-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}
.m-body {
  padding: 4px 18px 18px;
  overflow: auto;
}
.m-foot {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 18px;
  border-top: 1px solid var(--line);
  flex-wrap: wrap;
}
.fx {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 6px 12px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  background: var(--surface);
}
.fx-ref {
  min-width: 44px;
  padding: 2px 6px;
  border: 1px solid var(--line);
  border-radius: 4px;
  text-align: center;
}
.fx-f {
  font-style: italic;
  color: var(--muted);
  font-family: Georgia, serif;
}
#fx-val {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
.xl-scroll {
  overflow: auto;
  flex: 1;
  min-height: 240px;
  background: var(--surface);
}
.xl-grid {
  border-collapse: collapse;
  font-size: 12.5px;
  font-family: var(--font-sans);
}
.xl-grid th {
  position: sticky;
  top: 0;
  background: var(--surface-2);
  font-weight: 500;
  color: var(--muted);
  font-size: 11.5px;
  padding: 3px 8px;
  border: 1px solid var(--line);
  z-index: 1;
}
.xl-grid td {
  border: 1px solid var(--line);
  padding: 4px 8px;
  vertical-align: top;
  max-width: 340px;
  min-width: 60px;
  cursor: cell;
}
.xl-grid td.rn {
  background: var(--surface-2);
  color: var(--muted);
  font-size: 11.5px;
  text-align: center;
  min-width: 34px;
  position: sticky;
  left: 0;
}
.xl-grid td.hd {
  font-weight: 600;
  background: var(--accent-soft);
}
.xl-grid td.sel {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}
.xl-grid td.n {
  text-align: right;
  font-family: var(--font-data);
}
.xl-tabs {
  display: flex;
  gap: 2px;
  padding: 0 10px;
  border-top: 1px solid var(--line);
  background: var(--surface-2);
  overflow-x: auto;
}
.xl-tabs button {
  border: 0;
  background: none;
  padding: 8px 12px;
  font-size: 12.5px;
  cursor: pointer;
  color: var(--muted);
  font-family: var(--font-data);
  border-top: 2px solid transparent;
  white-space: nowrap;
}
.xl-tabs button.on {
  background: var(--surface);
  color: var(--fg);
  border-top-color: var(--accent);
}
.xl-note {
  padding: 10px 14px;
  font-size: 12.5px;
  color: var(--muted);
  border-top: 1px solid var(--line);
}
.err {
  color: var(--crit);
  font-size: 13px;
  margin-top: 6px;
}
#toasts {
  position: fixed;
  right: max(16px, env(safe-area-inset-right, 0px));
  bottom: max(16px, env(safe-area-inset-bottom, 0px));
  z-index: 70;
  display: grid;
  gap: 8px;
  max-width: min(420px, calc(100vw - 32px));
}
.toast {
  background: var(--fg);
  color: var(--bg);
  padding: 12px 14px;
  border-radius: 8px;
  font-size: 13.5px;
  box-shadow: var(--shadow);
  animation: tin 0.2s ease-out;
}
@keyframes tin {
  from {
    transform: translateY(6px);
    opacity: 0.4;
  }
  to {
    transform: none;
    opacity: 1;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}

/*numeros: nada de monospace, cifras tabulares*/
.score,
.stat b,
.glance b,
.kpi b,
.db-dot,
.dot-key,
.track button,
.q-code,
.rid,
.r-code,
.eyebrow,
.timeline .v,
.xl-grid td.n,
.fx-ref {
  font-variant-numeric: tabular-nums lining-nums;
}
.stat b,
.glance b,
.kpi b {
  font-family: var(--font-serif);
  font-weight: 600;
  letter-spacing: -0.01em;
}
.score {
  font-weight: 700;
}
/*pantallas medianas y movil*/
@media (max-width: 1080px) {
  .method-2 {
    grid-template-columns: minmax(0, 1fr);
  }
  .home-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .home-strip .stats-card {
    grid-column: 1/-1;
  }
  .review-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 720px) {
  .cmpev {
    grid-template-columns: minmax(0, 1fr);
  }
  .evcol .kv {
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
  }
  .home-strip,
  .summary,
  .grid2,
  .dimdefs,
  .form-grid,
  .steps3 {
    grid-template-columns: minmax(0, 1fr);
  }
  .scale-grid,
  .kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .picker {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .dim-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .dim-row .code {
    grid-column: 1/-1;
  }
  .dim-row .act {
    grid-column: 1/-1;
  }
  .heat .hc {
    height: 34px;
    font-size: 12px;
  }
  .heat.blocks span {
    font-size: 10px;
  }
  .txtdiff {
    grid-template-columns: minmax(0, 1fr);
  }
  .cmp-rows {
    grid-template-columns: minmax(0, 1fr);
  }
  .dist-row {
    grid-template-columns: 118px minmax(0, 1fr) 22px;
  }
  .eval-row {
    grid-template-columns: minmax(0, 1fr) 90px 44px;
  }
  .legend {
    position: static;
    max-width: none;
    border: 0;
    border-top: 1px solid var(--line);
    border-radius: 0;
    box-shadow: none;
  }
  .map-bar .search {
    width: 100%;
  }
  .ev-card {
    padding: 18px;
  }
  .ev-q {
    font-size: 18px;
  }
  .track {
    gap: 8px;
  }
  .track button {
    width: 24px;
    height: 24px;
    font-size: 10.5px;
  }
  .ov-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
  }
  .q-row {
    grid-template-columns: 32px minmax(0, 1fr) 14px;
    gap: 10px;
    padding: 12px 14px;
  }
  .q-lvl {
    grid-column: 2;
    grid-row: 2;
    min-width: 0;
  }
  .chev {
    grid-column: 3;
    grid-row: 1;
  }
  .q-detail {
    padding: 2px 14px 16px;
  }
  .kv {
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
  }
  .howto {
    flex-direction: column;
    align-items: flex-start;
  }
  .timeline li {
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
  }
  .db-head,
  .db-row {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 6px 10px;
  }
  .db-head > span:first-child,
  .db-head > span:last-child {
    display: none;
  }
  .db-head .db-scale {
    grid-column: 1/-1;
  }
  .db-scale {
    height: 26px;
  }
  .db-scale > span > em {
    display: none;
  }
  .db-lbl {
    grid-column: 1;
    grid-row: 1;
  }
  .db-gap {
    grid-column: 2;
    grid-row: 1;
  }
  .db-track {
    grid-column: 1/-1;
    grid-row: 2;
  }
  .role label {
    display: none;
  }
}

/*de un vistazo: el radar y la tabla de colores (atlas/charts.py)*/
.ov-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 340px);
  gap: 28px;
  align-items: start;
}
.ov-radar {
  margin: 0;
}
.ov-radar figcaption {
  margin-top: 10px;
}
.radar-box {
  max-width: 360px;
  margin-inline: auto;
}
.radar {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
  font-family: var(--font-data);
}
.radar .rd-ring,
.radar .rd-spoke {
  fill: none;
  stroke: var(--line);
  stroke-width: 1;
}
.radar .rd-block {
  stroke: var(--muted);
  stroke-width: 1;
  opacity: 0.5;
}
.radar .rd-tick {
  font-size: 9px;
  fill: var(--muted);
  paint-order: stroke;
  stroke: var(--surface);
  stroke-width: 3px;
  stroke-linejoin: round;
}
.radar .rd-axis {
  font-size: 11px;
  font-weight: 600;
  fill: var(--muted);
}
.radar .rd-area {
  fill: var(--k);
  fill-opacity: 0.12;
  stroke: var(--k);
  stroke-width: 2;
  stroke-linejoin: round;
}
.radar .rd-area.several {
  fill-opacity: 0.05;
}
.radar .rd-pt .v,
.rd-key .v {
  fill: var(--k);
  stroke: var(--surface);
  stroke-width: 2;
}
.radar .rd-pt .hit {
  fill: transparent;
}
.radar .rd-pt:hover .v {
  stroke: var(--fg);
}
.rd-legend {
  list-style: none;
  margin: 0 0 14px;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  font-size: 14px;
  font-weight: 600;
}
.rd-legend li {
  display: flex;
  align-items: center;
  gap: 8px;
}
.rd-key {
  width: 24px;
  height: 16px;
  overflow: visible;
  flex: none;
}
.rd-key line {
  stroke: var(--k);
  stroke-width: 2;
}
.rd-how {
  font-size: 13px;
  margin: 0 0 8px;
}
.rd-blocks {
  list-style: none;
  margin: 0 0 8px;
  padding: 0;
  display: grid;
  gap: 3px;
  font-size: 12.5px;
  color: var(--muted);
}
.rd-blocks li {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 6px;
}
.rd-note {
  font-size: 12px;
  color: var(--muted);
  margin: 0;
}
.viz {
  margin-bottom: 16px;
}
.viz h2 {
  font-size: 16px;
  margin-bottom: 12px;
}
.viz-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-bottom: 12px;
}
.viz-head h2 {
  margin: 0;
}
.viz-body {
  display: grid;
  grid-template-columns: minmax(0, 380px) minmax(0, 1fr);
  gap: 32px;
  align-items: center;
}
.viz-body .radar-box {
  margin: 0;
}
/* todas las columnas igual de anchas: los nombres de los bloques se parten en vez de ensancharlas */
.hm {
  border-collapse: separate;
  border-spacing: 2px;
  font-family: var(--font-data);
  table-layout: fixed;
  width: 830px;
}
.hm .hm-c0 {
  width: 176px;
}
.hm .hm-c {
  width: 44px;
}
.hm th {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--muted);
  text-align: center;
  padding: 2px;
}
.hm .hm-blocks th {
  font-weight: 500;
  font-size: 11px;
  line-height: 1.25;
  padding: 0 4px 5px;
  border-bottom: 1px solid var(--line);
  vertical-align: bottom;
}
/* el nombre del pais se queda a la vista al desplazar la tabla en el movil */
.hm .hm-name {
  position: sticky;
  left: 0;
  z-index: 1;
  background: var(--surface);
  text-align: left;
  padding-right: 14px;
}
.hm tbody th a {
  color: var(--fg);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
}
.hm tbody tr:hover th a {
  text-decoration: underline;
}
.hm td {
  min-width: 36px;
  height: 30px;
  text-align: center;
  border-radius: 4px;
  font-size: 12.5px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.hm-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  margin: 10px 0 0;
  font-size: 12.5px;
  color: var(--muted);
}
.hm-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/*como citar, el informe para imprimir y acerca de*/
.cite {
  margin-top: 24px;
}
.cite h2 {
  font-size: 16px;
  margin-bottom: 8px;
}
.cite-text {
  font-size: 14px;
  line-height: 1.55;
  overflow-wrap: anywhere;
  margin: 0 0 8px;
}
.cite p.small {
  margin: 4px 0 0;
}
.print-only {
  display: none;
}
.report {
  max-width: 880px;
  margin-inline: auto;
}
.report-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}
.rp-head {
  margin-bottom: 18px;
}
.rp-head h1 {
  margin: 4px 0 6px;
}
.rp-block {
  margin-top: 28px;
}
.rp-block > h2 {
  font-size: 18px;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--line);
  margin-bottom: 4px;
}
.rp-dim {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  scroll-margin-top: 90px;
}
.rp-dim:last-child {
  border-bottom: 0;
}
.rp-q {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
  margin-bottom: 10px;
}
.rp-url {
  font-size: 12px;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.rp-norms td {
  vertical-align: top;
}
.rp-foot {
  margin-top: 16px;
  font-size: 12px;
  color: var(--muted);
  overflow-wrap: anywhere;
}
/* a todo el ancho, como las demas paginas: arriba dos tarjetas lado a lado */
.about {
  display: grid;
  gap: 20px;
}
.about .home-head {
  margin-bottom: 0;
}
.about-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}
/* las dos tarjetas miden lo mismo y cada una acaba en una caja (el BibTeX, el ejemplo de cita)
   pegada al pie: lo que sobre en la mas corta queda encima de esa caja, no como hueco debajo */
.about-2 > .card {
  display: flex;
  flex-direction: column;
}
.about-2 > .card > h3 {
  margin-top: 6px; /* en flex los margenes no se juntan: con los 10 del parrafo, 16 como siempre */
}
.about-2 .pin {
  margin-top: auto;
  margin-bottom: 0;
}
.about h2 {
  font-size: 18px;
  margin-bottom: 8px;
}
.about h3 {
  font-size: 15px;
  margin: 16px 0 6px;
}
.about p {
  margin: 0 0 10px;
  line-height: 1.6;
}
.about .ref {
  padding: 10px 14px;
  background: var(--surface-2);
  border-radius: var(--r);
  font-size: 14px;
  overflow-wrap: anywhere;
}
.bibtex {
  font-size: 12px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  margin: 10px 0 0;
}
.about-list {
  margin: 0;
  padding-left: 20px;
  columns: 2;
  column-gap: 48px;
  line-height: 1.6;
}
.about-list li {
  break-inside: avoid;
  margin-bottom: 8px;
}
.method-src {
  margin-top: 10px;
  font-size: 13.5px;
  color: var(--muted);
}
@media (max-width: 1080px) {
  .about-2 {
    grid-template-columns: minmax(0, 1fr);
  }
  .about-list {
    columns: 1;
  }
}
@media (max-width: 900px) {
  .ov-grid,
  .viz-body {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (max-width: 720px) {
  .rp-q {
    grid-template-columns: 36px minmax(0, 1fr);
  }
  .rp-q .q-lvl {
    grid-column: 2;
    min-width: 0;
  }
  .hm {
    width: 760px;
  }
  .hm .hm-c0 {
    width: 112px;
  }
}

/*al imprimir o guardar como pdf: sin menus ni botones y con todo desplegado (app.js abre los
  desplegables y pasa a modo claro mientras se imprime)*/
@media print {
  @page {
    margin: 15mm 14mm;
  }
  * {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  body {
    background: #fff;
  }
  .topbar,
  footer,
  .skip,
  .flashes,
  #toasts,
  .no-print,
  .tabs,
  .crumbs,
  .btn,
  .chev,
  .zoom-btns,
  .cmp-sel a:not(.on),
  .cmp-sel .off,
  .db-top .row {
    display: none !important;
  }
  .print-only {
    display: inline;
  }
  main {
    padding-block: 0;
  }
  .wrap {
    max-width: none;
    padding-inline: 0;
  }
  .card {
    box-shadow: none;
  }
  a {
    color: inherit;
    text-decoration: none;
  }
  .report {
    max-width: none;
  }
  .ov-grid {
    grid-template-columns: minmax(0, 1fr) 250px;
  }
  .viz-body {
    grid-template-columns: 300px minmax(0, 1fr);
  }
  /* una hoja A4 es mas estrecha que el corte del movil: se recupera el formato de escritorio */
  .rp-q {
    grid-template-columns: 40px minmax(0, 1fr) auto;
  }
  .rp-q .q-lvl {
    grid-column: 3;
    grid-row: 1;
    min-width: 170px;
  }
  .kv {
    grid-template-columns: 120px minmax(0, 1fr);
    gap: 10px;
  }
  /* las respuestas largas pueden partirse entre hojas; sus piezas no */
  .viz,
  .overview,
  .cite,
  figure,
  tr,
  .kv,
  .reflist li,
  .db-row,
  .db-detail .col {
    break-inside: avoid;
  }
  h2,
  h3,
  .rp-q,
  .db-row {
    break-after: avoid;
  }
}
