/* =========================================================================
   CumpliWeb · Sistema de diseño del sitio público
   Paleta tomada del logo: azul institucional + turquesa.
   ========================================================================= */
/* Public Sans (SIL Open Font License) alojada localmente */
@font-face { font-family: "Public Sans"; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url("../fonts/public-sans-latin-wght-normal.woff2") format("woff2-variations"), url("../fonts/public-sans-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Public Sans"; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url("../fonts/public-sans-latin-ext-wght-normal.woff2") format("woff2-variations"), url("../fonts/public-sans-latin-ext-wght-normal.woff2") format("woff2");
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --navy: #04366f;
  --navy-700: #032a57;
  --navy-50: #eaf1f9;
  --teal: #009ea5;
  --teal-ink: #00747a;      /* turquesa con contraste AA para texto */
  --teal-50: #e6f6f7;
  --paper: #f3f6f9;
  --surface: #ffffff;
  --ink: #1e293b;
  --ink-2: #475569;
  --ink-3: #586477;
  --line: #dde4ec;
  --line-2: #c9d3de;
  --ok: #15803d;   --ok-bg: #dcfce7;
  --warn: #8a4b0b; --warn-bg: #fef3c7;
  --bad: #b91c1c;  --bad-bg: #fee2e2;
  --info: #075985; --info-bg: #e0f2fe;
  --muted: #475569; --muted-bg: #eef2f6;
  --r-sm: 6px; --r: 10px; --r-lg: 16px;
  --shadow: 0 1px 2px rgba(4, 54, 111, .06), 0 8px 24px rgba(4, 54, 111, .06);
  --font: "Public Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --w: 1160px;
  --gutter: 20px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 88px; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--font); font-size: 1rem; line-height: 1.6;
  font-feature-settings: "tnum" 0; text-rendering: optimizeLegibility;
}
img, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--teal-ink); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--navy); }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3, h4 { color: var(--navy); line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.015em; }
h1 { font-size: clamp(2rem, 4vw, 3.2rem); font-weight: 750; }
h2 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); font-weight: 720; }
h3 { font-size: 1.2rem; font-weight: 680; letter-spacing: -.005em; }
h4 { font-size: 1rem; font-weight: 680; }
p { margin: 0 0 1em; }
.num { font-variant-numeric: tabular-nums; }
.wrap { width: 100%; max-width: var(--w); margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--navy); color: #fff; padding: 8px 14px; border-radius: var(--r-sm); z-index: 100; }
.skip:focus { left: 8px; }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.lead { font-size: 1.15rem; color: var(--ink-2); max-width: 62ch; }
.muted { color: var(--ink-3); }
.small { font-size: .875rem; }

/* ---------------- Botones ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 44px; padding: .65em 1.15em; border-radius: var(--r-sm);
  font: inherit; font-weight: 650; font-size: .95rem; line-height: 1.2; text-decoration: none;
  border: 1.5px solid transparent; cursor: pointer; transition: background .15s, border-color .15s, color .15s;
}
.btn-primary { background: var(--navy); color: #fff; }
.btn-primary:hover { background: var(--navy-700); color: #fff; }
.btn-secondary { background: var(--surface); color: var(--navy); border-color: var(--line-2); }
.btn-secondary:hover { border-color: var(--navy); color: var(--navy); }
.btn-teal { background: var(--teal-ink); color: #fff; }
.btn-teal:hover { background: var(--navy); color: #fff; }
.btn-link { background: none; border: 0; padding: 0; min-height: 0; color: var(--teal-ink); text-decoration: underline; font-weight: 600; }
.btn[disabled] { opacity: .6; cursor: progress; }

/* ---------------- Encabezado ---------------- */
.site-head { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.96); backdrop-filter: saturate(1.4) blur(6px); border-bottom: 1px solid var(--line); }
.site-head .bar { display: flex; align-items: center; gap: 24px; min-height: 68px; }
.brand { display: inline-flex; align-items: center; flex: 0 0 auto; }
.brand img { height: 34px; width: auto; }
.nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nav a { color: var(--ink); text-decoration: none; font-weight: 560; font-size: .94rem; padding: 8px 10px; border-radius: var(--r-sm); }
.nav a:hover, .nav a[aria-current="page"] { color: var(--navy); background: var(--navy-50); }
.head-actions { display: flex; align-items: center; gap: 8px; }
.head-actions .login { color: var(--ink-2); font-weight: 560; text-decoration: none; padding: 8px 10px; font-size: .94rem; }
.menu-btn { display: none; margin-left: auto; background: none; border: 1.5px solid var(--line-2); border-radius: var(--r-sm); width: 44px; height: 44px; cursor: pointer; }
.menu-btn span { display: block; width: 18px; height: 2px; background: var(--navy); margin: 4px auto; }
@media (max-width: 980px) {
  .menu-btn { display: block; }
  .nav, .head-actions { display: none; }
  .site-head.open .nav, .site-head.open .head-actions { display: flex; }
  .site-head.open .bar { flex-wrap: wrap; padding-bottom: 14px; }
  .site-head.open .nav { order: 3; flex-direction: column; align-items: stretch; width: 100%; margin: 0; }
  .site-head.open .head-actions { order: 4; width: 100%; }
  .site-head.open .head-actions .btn { flex: 1; }
}

/* ---------------- Secciones ---------------- */
.section { padding: 72px 0; }
.section-white { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-navy { background: var(--navy); color: #dbe7f5; }
.section-navy h2, .section-navy h3 { color: #fff; }
.section-navy a { color: #7fe3e8; }
.section-head { max-width: 760px; margin-bottom: 36px; }
.section-head p { color: var(--ink-2); font-size: 1.08rem; }
@media (max-width: 720px) { .section { padding: 52px 0; } }

/* ---------------- Hero ---------------- */
.hero { padding: 56px 0 64px; background: linear-gradient(180deg, var(--surface) 0%, var(--paper) 100%); border-bottom: 1px solid var(--line); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .95fr); gap: 56px; align-items: center; }
.hero h1 { max-width: 15ch; }
.hero .lead { margin-bottom: 28px; }
.kicker { display: inline-flex; align-items: center; gap: 8px; font-weight: 650; font-size: .9rem; color: var(--teal-ink); margin-bottom: 14px; }
.kicker::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--teal); }
@media (max-width: 980px) { .hero-grid { grid-template-columns: 1fr; gap: 36px; } .hero h1 { max-width: 20ch; } }

/* Formulario de URL */
.scan { background: var(--surface); border: 1.5px solid var(--line-2); border-radius: var(--r); padding: 8px; display: flex; gap: 8px; box-shadow: var(--shadow); max-width: 600px; }
.scan:focus-within { border-color: var(--teal); }
.scan label { flex: 1; display: flex; align-items: center; gap: 2px; min-width: 0; }
.scan .pre { color: var(--ink-3); padding-left: 12px; font-size: 1.02rem; }
.scan input { flex: 1; min-width: 0; border: 0; outline: 0; font: inherit; font-size: 1.05rem; padding: 12px 6px; background: transparent; color: var(--ink); }
.scan .btn { min-height: 50px; padding: 0 1.4em; font-size: 1rem; }
.scan-note { margin-top: 12px; font-size: .88rem; color: var(--ink-3); }
.scan-error { margin-top: 12px; padding: 10px 14px; border-radius: var(--r-sm); background: var(--bad-bg); color: var(--bad); font-weight: 560; font-size: .92rem; max-width: 600px; }
@media (max-width: 560px) { .scan { flex-direction: column; } .scan .btn { width: 100%; } }

/* Franja de matriz (elemento distintivo) */
.matrix-demo { background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r); box-shadow: var(--shadow); overflow: hidden; font-size: .86rem; }
.matrix-demo .mh { display: flex; justify-content: space-between; gap: 12px; padding: 12px 16px; background: var(--navy); color: #fff; font-weight: 650; font-size: .85rem; }
.matrix-demo .mh span:last-child { color: #9fd6ff; font-weight: 500; }
.mx-row { display: grid; grid-template-columns: 52px minmax(0, 1fr) 96px; gap: 10px; padding: 11px 16px; border-top: 1px solid var(--line); align-items: start; }
.mx-row.headrow { background: var(--muted-bg); color: var(--ink-2); font-weight: 650; font-size: .76rem; border-top: 0; padding-top: 8px; padding-bottom: 8px; }
.mx-row .code { color: var(--ink-3); font-variant-numeric: tabular-nums; }
.mx-row .q { color: var(--ink); line-height: 1.35; }
.mx-row .q small { display: block; color: var(--teal-ink); font-size: .78rem; margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mx-row .ans { display: flex; gap: 4px; justify-content: flex-end; }
.mx-row .ans b { width: 30px; height: 24px; border-radius: 5px; border: 1px solid var(--line-2); display: grid; place-items: center; font-size: .68rem; font-weight: 700; color: var(--ink-3); background: #fff; }
.mx-row .ans b.on.si { background: var(--ok); border-color: var(--ok); color: #fff; }
.mx-row .ans b.on.no { background: var(--bad); border-color: var(--bad); color: #fff; }
.mx-row .ans b.on.na { background: var(--ink-3); border-color: var(--ink-3); color: #fff; }
.matrix-demo .mf { padding: 10px 16px; background: var(--paper); border-top: 1px solid var(--line); color: var(--ink-3); font-size: .8rem; }
@media (prefers-reduced-motion: no-preference) {
  .matrix-demo.play .mx-row:not(.headrow) { opacity: .35; transition: opacity .4s ease; }
  .matrix-demo.play .mx-row.lit { opacity: 1; }
  .matrix-demo.play .ans b.on { transition: background .3s ease .15s, color .3s ease .15s; }
  .matrix-demo.play .mx-row:not(.lit) .ans b.on { background: #fff; color: var(--ink-3); border-color: var(--line-2); }
}

/* ---------------- Bloques de contenido ---------------- */
.cols-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
.cols-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; }
@media (max-width: 900px) { .cols-3, .cols-2 { grid-template-columns: 1fr; gap: 24px; } }

.deliverable { padding-top: 18px; border-top: 3px solid var(--navy); }
.deliverable h3 { margin-bottom: .35em; }
.deliverable p { color: var(--ink-2); margin: 0; }
.deliverable .fmt { display: inline-block; margin-bottom: 10px; font-size: .8rem; font-weight: 700; color: var(--teal-ink); background: var(--teal-50); padding: 2px 8px; border-radius: 4px; }

.steps { list-style: none; margin: 0; padding: 0; counter-reset: s; display: grid; gap: 0; }
.steps > li { counter-increment: s; display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 16px; padding: 22px 0; border-top: 1px solid var(--line); }
.steps > li:last-child { border-bottom: 1px solid var(--line); }
.steps > li::before { content: counter(s); font-size: 1.6rem; font-weight: 750; color: var(--teal); font-variant-numeric: tabular-nums; line-height: 1.1; }
.steps h3 { margin: 0 0 .3em; font-size: 1.1rem; }
.steps p { margin: 0; color: var(--ink-2); }
.steps.compact > li { padding: 16px 0; }

/* Índice de bloques de la matriz */
.blocks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.blocks a { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; align-items: baseline; padding: 16px 4px; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.blocks a:nth-child(odd) { padding-right: 28px; }
.blocks a:nth-child(even) { padding-left: 28px; border-left: 1px solid var(--line); }
.blocks a:hover strong { color: var(--teal-ink); text-decoration: underline; }
.blocks strong { color: var(--navy); font-weight: 650; }
.blocks .count { color: var(--ink-3); font-size: .88rem; white-space: nowrap; font-variant-numeric: tabular-nums; }
.blocks a span.d { display: block; font-size: .88rem; color: var(--ink-3); margin-top: 2px; }
@media (max-width: 760px) { .blocks { grid-template-columns: 1fr; } .blocks a:nth-child(n) { padding: 14px 0; border-left: 0; } }

/* Llamado con fondo azul */
.callout { background: var(--navy); color: #dbe7f5; border-radius: var(--r-lg); padding: 40px; display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 32px; align-items: center; }
.callout h2 { color: #fff; margin-bottom: .3em; }
.callout p { margin: 0; }
.callout .scan { box-shadow: none; border-color: transparent; }
@media (max-width: 900px) { .callout { grid-template-columns: 1fr; padding: 28px 22px; } }

.note { border-left: 3px solid var(--teal); background: var(--teal-50); padding: 14px 18px; border-radius: 0 var(--r-sm) var(--r-sm) 0; color: var(--ink); font-size: .95rem; }
.note.warn { border-color: #d97706; background: var(--warn-bg); }
.note p:last-child { margin: 0; }

/* Preguntas frecuentes */
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; padding: 18px 40px 18px 0; position: relative; font-weight: 650; color: var(--navy); font-size: 1.04rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; position: absolute; right: 8px; top: 24px; width: 10px; height: 10px; border-right: 2px solid var(--ink-3); border-bottom: 2px solid var(--ink-3); transform: rotate(45deg); transition: transform .15s; }
.faq details[open] summary::after { transform: rotate(-135deg); top: 28px; }
.faq .a { padding: 0 0 18px; color: var(--ink-2); max-width: 72ch; }

/* ---------------- Páginas de guía / prosa ---------------- */
.page-head { background: var(--surface); border-bottom: 1px solid var(--line); padding: 36px 0 40px; }
.page-head h1 { max-width: 24ch; font-size: clamp(1.9rem, 3.6vw, 2.8rem); }
.page-head .lead { margin: 0; }
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; font-size: .86rem; color: var(--ink-3); margin-bottom: 18px; padding: 0; list-style: none; }
.crumbs li + li::before { content: "/"; margin-right: 6px; color: var(--line-2); }
.crumbs a { color: var(--ink-3); }
.layout-doc { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 56px; padding-top: 48px; padding-bottom: 72px; align-items: start; }
.layout-doc aside { position: sticky; top: 92px; }
@media (max-width: 1000px) { .layout-doc { grid-template-columns: 1fr; gap: 32px; } .layout-doc aside { position: static; } }
.prose { max-width: 74ch; }
.prose h2 { margin-top: 1.8em; font-size: 1.6rem; scroll-margin-top: 96px; }
.prose h3 { margin-top: 1.5em; scroll-margin-top: 96px; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1em; }
.prose li { margin-bottom: .35em; }
.prose > :first-child { margin-top: 0; }
.toc { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 18px 20px; font-size: .92rem; }
.toc h2 { font-size: .95rem; margin: 0 0 10px; color: var(--ink); letter-spacing: 0; }
.toc ol, .toc ul { margin: 0; padding-left: 1.1em; }
.toc li { margin-bottom: 6px; }
.toc a { color: var(--ink-2); text-decoration: none; }
.toc a:hover { color: var(--teal-ink); text-decoration: underline; }
.aside-cta { margin-top: 16px; background: var(--navy); color: #dbe7f5; border-radius: var(--r); padding: 20px; font-size: .92rem; }
.aside-cta strong { color: #fff; display: block; font-size: 1.05rem; margin-bottom: 6px; }
.aside-cta .btn { margin-top: 12px; width: 100%; }

/* Guía de una subsección de la matriz */
.guide { padding: 28px 0; border-top: 1px solid var(--line); }
.guide h3 { font-size: 1.25rem; margin-bottom: .2em; }
.guide .official { color: var(--ink-3); font-size: .86rem; margin-bottom: 14px; }
.facts { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 8px 20px; margin: 0 0 16px; }
.facts dt { color: var(--ink-3); font-size: .88rem; font-weight: 600; padding-top: 2px; }
.facts dd { margin: 0; }
@media (max-width: 640px) { .facts { grid-template-columns: 1fr; gap: 2px; } .facts dd { margin-bottom: 10px; } }
.qlist { list-style: none; margin: 8px 0 0; padding: 0; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); }
.qlist li { display: grid; grid-template-columns: 74px minmax(0, 1fr); gap: 12px; padding: 10px 14px; border-top: 1px solid var(--line); font-size: .93rem; }
.qlist li:first-child { border-top: 0; }
.qlist .c { color: var(--ink-3); font-variant-numeric: tabular-nums; font-size: .85rem; padding-top: 1px; }
.qlist .x { display: block; color: var(--ink-3); font-size: .85rem; margin-top: 3px; }
.qlist li.grp { background: var(--muted-bg); font-weight: 650; }
.errors { margin: 0; padding-left: 1.2em; color: var(--bad); }
.errors li span { color: var(--ink); }

/* Lista de verificación */
.check-cat { margin-top: 36px; }
.check-item { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); cursor: pointer; }
.check-item input { width: 20px; height: 20px; margin-top: 3px; accent-color: var(--teal-ink); }
.check-item strong { color: var(--ink); font-weight: 620; }
.check-item span.w { display: block; color: var(--ink-3); font-size: .88rem; }
.check-item input:checked + div strong { color: var(--ink-3); text-decoration: line-through; }
.check-progress { position: sticky; top: 68px; z-index: 5; background: var(--paper); padding: 12px 0; border-bottom: 1px solid var(--line); display: flex; gap: 16px; align-items: center; }
.meter { flex: 1; height: 8px; background: var(--line); border-radius: 99px; overflow: hidden; }
.meter span { display: block; height: 100%; background: var(--teal); border-radius: 99px; transition: width .2s; }

/* ---------------- Estados ---------------- */
.st { display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px; border-radius: 99px; font-size: .78rem; font-weight: 700; white-space: nowrap; line-height: 1.6; }
.st::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.st-ok { background: var(--ok-bg); color: var(--ok); }
.st-warn { background: var(--warn-bg); color: var(--warn); }
.st-bad { background: var(--bad-bg); color: var(--bad); }
.st-info { background: var(--info-bg); color: var(--info); }
.st-muted { background: var(--muted-bg); color: var(--muted); }

/* ---------------- Planes ---------------- */
.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border: 1px solid var(--line-2); border-radius: var(--r-lg); background: var(--surface); overflow: hidden; }
.plan { padding: 32px 28px; display: flex; flex-direction: column; }
.plan + .plan { border-left: 1px solid var(--line); }
.plan.featured { background: var(--navy); color: #dbe7f5; }
.plan.featured h3, .plan.featured .price { color: #fff; }
.plan .tag { font-size: .82rem; font-weight: 650; color: var(--teal-ink); margin-bottom: 8px; }
.plan.featured .tag { color: #7fe3e8; }
.plan .price { font-size: 2rem; font-weight: 750; color: var(--navy); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.plan .price small { font-size: .9rem; font-weight: 500; color: var(--ink-3); letter-spacing: 0; }
.plan.featured .price small { color: #b9cde4; }
.plan ul { list-style: none; padding: 0; margin: 20px 0 24px; flex: 1; }
.plan li { padding: 7px 0 7px 26px; position: relative; font-size: .95rem; }
.plan li::before { content: ""; position: absolute; left: 2px; top: 13px; width: 12px; height: 7px; border-left: 2px solid var(--teal); border-bottom: 2px solid var(--teal); transform: rotate(-45deg); }
.plan.featured .btn-primary { background: #fff; color: var(--navy); }
@media (max-width: 900px) { .plans { grid-template-columns: 1fr; } .plan + .plan { border-left: 0; border-top: 1px solid var(--line); } }

/* ---------------- Formularios ---------------- */
.form { display: grid; gap: 16px; }
.form .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 640px) { .form .row2 { grid-template-columns: 1fr; } }
.field label { display: block; font-weight: 620; font-size: .92rem; margin-bottom: 6px; color: var(--ink); }
.field input, .field select, .field textarea { width: 100%; font: inherit; padding: 11px 13px; border: 1.5px solid var(--line-2); border-radius: var(--r-sm); background: #fff; color: var(--ink); }
.field input:focus, .field select:focus, .field textarea:focus { outline: 0; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(0, 158, 165, .18); }
.field .err { color: var(--bad); font-size: .85rem; margin-top: 4px; }
.alert-ok { background: var(--ok-bg); color: var(--ok); padding: 12px 16px; border-radius: var(--r-sm); font-weight: 600; }
.alert-bad { background: var(--bad-bg); color: var(--bad); padding: 12px 16px; border-radius: var(--r-sm); font-weight: 600; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 32px; }
@media (max-width: 640px) { .panel { padding: 22px 18px; } }

/* ---------------- Informe ITA ---------------- */
.rep-head { background: var(--surface); border-bottom: 1px solid var(--line); padding: 28px 0 0; }
.rep-title { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px 32px; align-items: flex-end; }
.rep-title h1 { font-size: clamp(1.6rem, 3vw, 2.3rem); margin: 0 0 4px; }
.rep-title .meta { color: var(--ink-3); font-size: .92rem; word-break: break-all; }
.rep-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.rep-tabs { display: flex; gap: 4px; margin-top: 24px; overflow-x: auto; }
.rep-tabs a { padding: 12px 14px; font-weight: 620; color: var(--ink-2); text-decoration: none; border-bottom: 3px solid transparent; white-space: nowrap; font-size: .95rem; }
.rep-tabs a:hover { color: var(--navy); }
.rep-tabs a[aria-current="true"] { color: var(--navy); border-bottom-color: var(--teal); }
.score-panel { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 36px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 28px 32px; }
.score-dial { text-align: center; }
.score-dial .n { font-size: 4.2rem; font-weight: 780; line-height: 1; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.score-dial .of { color: var(--ink-3); font-size: .9rem; }
.score-dial .lbl { margin-top: 10px; font-weight: 700; font-size: .95rem; }
.score-panel .headline { font-size: 1.08rem; color: var(--ink); margin-bottom: 14px; }
.stack { display: flex; height: 14px; border-radius: 99px; overflow: hidden; background: var(--line); margin: 6px 0 12px; }
.stack span { display: block; height: 100%; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: .88rem; color: var(--ink-2); }
.legend b { font-variant-numeric: tabular-nums; color: var(--ink); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
@media (max-width: 760px) { .score-panel { grid-template-columns: 1fr; gap: 18px; padding: 22px 18px; } }
.tone-ok { color: var(--ok); } .tone-warn { color: var(--warn); } .tone-bad { color: var(--bad); } .tone-muted { color: var(--ink-3); }
.bg-ok { background: #22a35a; } .bg-warn { background: #e0a526; } .bg-bad { background: #dc4444; } .bg-info { background: #3b8fd1; } .bg-muted { background: #a4b1c0; }

.prio-list { display: grid; gap: 14px; }
.prio { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--bad); border-radius: var(--r); padding: 20px 22px; }
.prio.media { border-left-color: #d97706; }
.prio-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 16px; align-items: baseline; }
.prio h3 { margin: 0; font-size: 1.12rem; }
.prio .cat { color: var(--ink-3); font-size: .86rem; }
.prio .stats { font-size: .9rem; color: var(--ink-2); }
.prio details { margin-top: 10px; }
.prio summary { cursor: pointer; color: var(--teal-ink); font-weight: 620; font-size: .93rem; }
.prio .body { padding-top: 12px; }
.prio ol { margin: 6px 0 0; padding-left: 1.2em; }
.chips-inline { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.chips-inline span { font-size: .8rem; background: var(--muted-bg); color: var(--ink-2); padding: 2px 8px; border-radius: 4px; }

.cat-table { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; font-size: .93rem; }
.cat-table th { text-align: left; font-size: .8rem; color: var(--ink-3); font-weight: 650; padding: 10px 14px; background: var(--paper); border-bottom: 1px solid var(--line); }
.cat-table td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.cat-table td.n { font-variant-numeric: tabular-nums; text-align: right; width: 72px; }
.cat-table .mini { height: 8px; background: var(--line); border-radius: 99px; overflow: hidden; min-width: 80px; }
.cat-table .mini span { display: block; height: 100%; background: var(--teal); }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0 0 18px; }
.filters button { font: inherit; font-size: .88rem; font-weight: 620; padding: 7px 12px; border-radius: 99px; border: 1.5px solid var(--line-2); background: #fff; color: var(--ink-2); cursor: pointer; }
.filters button[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: #fff; }
.filters input[type="search"] { font: inherit; padding: 8px 12px; border: 1.5px solid var(--line-2); border-radius: var(--r-sm); min-width: 220px; flex: 1; max-width: 360px; }
.rcat { margin-top: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
.rcat > summary { list-style: none; cursor: pointer; padding: 16px 20px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center; }
.rcat > summary::-webkit-details-marker { display: none; }
.rcat > summary h3 { margin: 0; font-size: 1.08rem; }
.rcat > summary .sum { font-size: .85rem; color: var(--ink-3); display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.ritem { display: grid; grid-template-columns: 70px minmax(0, 1fr) 150px; gap: 14px; padding: 14px 20px; border-top: 1px solid var(--line); font-size: .93rem; }
.ritem .c { color: var(--ink-3); font-variant-numeric: tabular-nums; font-size: .85rem; }
.ritem .q { font-weight: 560; }
.ritem .why { color: var(--ink-2); font-size: .88rem; margin-top: 4px; }
.ritem .ev { font-size: .84rem; margin-top: 4px; word-break: break-all; }
.ritem .stc { text-align: right; }
.rgroup { padding: 10px 20px; background: var(--paper); border-top: 1px solid var(--line); font-weight: 680; color: var(--navy); font-size: .9rem; }
@media (max-width: 760px) { .ritem { grid-template-columns: 1fr; gap: 4px; } .ritem .stc { text-align: left; order: -1; } }

.progress-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 32px; text-align: left; }
.progress-bar { height: 10px; background: var(--line); border-radius: 99px; overflow: hidden; margin: 16px 0 10px; }
.progress-bar span { display: block; height: 100%; background: var(--teal); width: 6%; transition: width .6s ease; }
.tech-scores { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
.tech-scores div { padding: 18px 20px; }
.tech-scores div + div { border-left: 1px solid var(--line); }
.tech-scores b { display: block; font-size: 1.8rem; color: var(--navy); font-variant-numeric: tabular-nums; line-height: 1.1; }
.tech-scores span { color: var(--ink-3); font-size: .88rem; }
@media (max-width: 760px) { .tech-scores { grid-template-columns: 1fr 1fr; } .tech-scores div:nth-child(3) { border-left: 0; } .tech-scores div:nth-child(n+3) { border-top: 1px solid var(--line); } }
.finding { display: grid; grid-template-columns: 90px minmax(0, 1fr); gap: 14px; padding: 14px 0; border-top: 1px solid var(--line); font-size: .94rem; }
.finding p { margin: 2px 0 0; color: var(--ink-2); font-size: .9rem; }

.app-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.app-kpi { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px; }
.app-kpi b { display: block; font-size: 1.8rem; color: var(--navy); font-variant-numeric: tabular-nums; line-height: 1.15; }
.app-kpi span { color: var(--ink-3); font-size: .88rem; }
@media (max-width: 900px) { .app-grid { grid-template-columns: 1fr 1fr; } }

/* ---------------- Pie de página ---------------- */
.site-foot { background: var(--navy); color: #c3d4e9; padding: 56px 0 28px; font-size: .93rem; margin-top: 0; }
.site-foot a { color: #e6eef8; text-decoration: none; }
.site-foot a:hover, .site-foot .btn-link:hover { text-decoration: underline; color: #fff; }
.site-foot .btn-link { color: #e6eef8; font-weight: 400; text-decoration: none; font-size: inherit; }
.foot-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 32px; }
.foot-grid h2 { font-size: .95rem; color: #fff; margin: 0 0 12px; letter-spacing: 0; }
.foot-grid ul { list-style: none; margin: 0; padding: 0; }
.foot-grid li { margin-bottom: 8px; }
.foot-brand img { height: 46px; width: auto; background: #fff; padding: 10px 14px; border-radius: 8px; margin-bottom: 14px; }
.foot-legal { margin-top: 40px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.15); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; font-size: .84rem; color: #9fb6d3; }
@media (max-width: 860px) { .foot-grid { grid-template-columns: 1fr 1fr; } .foot-brand { grid-column: 1 / -1; } }

/* Aviso de cookies */
.consent { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 60; max-width: 560px; background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r); box-shadow: 0 12px 40px rgba(4, 54, 111, .18); padding: 18px 20px; font-size: .9rem; display: none; }
.consent.show { display: block; }
.consent p { margin: 0 0 12px; color: var(--ink-2); }
.consent .row { display: flex; gap: 8px; flex-wrap: wrap; }
.consent .btn { min-height: 38px; padding: .45em .9em; font-size: .88rem; }

@media print {
  .site-head, .site-foot, .consent, .rep-actions, .filters, .aside-cta, .menu-btn { display: none !important; }
  body { background: #fff; }
  details { display: block; } details > * { display: block; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }

/* Textos oficiales con URL largas: que no rompan el ancho en móvil */
.ritem > *, .qlist li > *, .facts dd, .prio .body { min-width: 0; }
.ritem .q, .ritem .why, .qlist li, .facts dd, .prose li, .prose p { overflow-wrap: anywhere; }
.prose .qlist { padding-left: 0; }
.prose .qlist li { margin: 0; }

/* Herramientas de administrador */
.admin-plan { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; flex-basis: 100%; margin-top: 10px; font-size: .86rem; color: var(--ink-2); }
.admin-plan select { font: inherit; padding: 6px 10px; border: 1px solid var(--line-2); border-radius: var(--r-sm); background: #fff; color: var(--ink); }
.admin-band { background: #fff7e0; border-bottom: 1px solid #f0d78c; color: #5c4200; font-size: .9rem; padding: 9px 0; }
.admin-band a { color: #5c4200; text-decoration: underline; margin-left: 6px; }
.scan:has(.admin-plan) { flex-wrap: wrap; }
.scan .admin-plan { flex: 1 1 100%; margin-top: 2px; padding: 4px 6px 2px; border-top: 1px dashed var(--line-2); }
