/*
 * /seguridad/ — solo lo que styles.css no cubre. Mismas variables y mismo
 * sistema (bordes en vez de sombras, un único acento morado).
 */

/* ---------- accesibilidad ---------- */
.skip {
  position: absolute;
  left: -9999px;
  top: 8px;
  z-index: 40;
  background: var(--graphite);
  color: var(--chalk);
  border: 1px solid var(--signal);
  border-radius: 4px;
  padding: 8px 14px;
  font-size: 14px;
}
.skip:focus { left: 16px; }

a:focus-visible,
.table-scroll:focus-visible,
.btn:focus-visible {
  outline: 2px solid var(--signal);
  outline-offset: 2px;
  border-radius: 3px;
}

section[id] { scroll-margin-top: 72px; }
code { overflow-wrap: anywhere; }

/* ---------- cabecera ---------- */
.sec-hero { padding: 72px 0 56px; }
.sec-hero h1 { font-size: clamp(2.1rem, 4.8vw, 3.1rem); max-width: 24ch; }
.sec-hero .lede { max-width: 66ch; }
.sec-hero .updated { margin-top: 16px; font-family: var(--mono); font-size: 12.5px; color: var(--silver); }

.answer { margin-top: 36px; }

.toc ul { list-style: none; margin: 28px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.toc a {
  display: inline-block;
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 0;
  color: var(--ash);
  background: var(--graphite);
  border: 1px solid var(--basalt);
  border-radius: 4px;
  padding: 8px 12px;
}
.toc a:hover { border-color: var(--pewter); color: var(--chalk); }

/* ---------- cifras ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin: 0;
  background: var(--graphite);
  border: 1px solid var(--basalt);
  border-radius: 6px;
  overflow: hidden;
}
.stats > div { padding: 20px 18px; border-right: 1px solid var(--basalt); }
.stats > div:last-child { border-right: none; }
.stats dt {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--silver);
}
.stats dd {
  margin: 8px 0 0;
  font-family: var(--display);
  font-weight: 700;
  font-size: 32px;
  line-height: 1.3;
  letter-spacing: -0.02em;
  color: var(--chalk);
}
.stats dd small {
  display: block;
  margin-top: 6px;
  font-family: var(--text);
  font-size: 12.5px;
  font-weight: 400;
  letter-spacing: 0.02em;
  line-height: 1.4;
  color: var(--silver);
}
.stats-note { margin-top: 12px; font-size: 13px; color: var(--silver); max-width: 78ch; }
@media (max-width: 860px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stats > div:nth-child(2) { border-right: none; }
  .stats > div:nth-child(-n + 2) { border-bottom: 1px solid var(--basalt); }
}

/* ---------- método ---------- */
.plain-list { margin: 10px 0 0; padding-left: 18px; display: grid; gap: 6px; font-size: 14.5px; color: var(--silver); }
.card .plain-list li { line-height: 1.5; }
.subhead { font-size: 18px; font-weight: 600; margin-top: 40px; }
.section-head + .grid-2 + .subhead { margin-top: 48px; }

/* ---------- tablas ---------- */
caption {
  caption-side: top;
  text-align: left;
  padding: 12px 18px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0;
  color: var(--silver);
  background: var(--obsidian);
  border-bottom: 1px solid var(--basalt);
}
tbody th {
  text-align: left;
  padding: 16px 18px;
  border-bottom: 1px solid var(--basalt);
  vertical-align: top;
  background: var(--graphite);
  font-weight: 600;
  color: var(--chalk);
}
tbody tr:last-child th { border-bottom: none; }
tbody td { color: var(--silver); }
tbody td.num, tbody td.idx { color: var(--ash); }
thead th { color: var(--silver); }
td.idx { font-family: var(--mono); white-space: nowrap; }
.table-scroll.compact table { min-width: 0; }
.table-scroll.wide table { min-width: 760px; }
tfoot th {
  text-align: left;
  padding: 12px 18px;
  font-size: 13px;
  color: var(--ash);
  background: var(--obsidian);
  border-top: 1px solid var(--basalt);
}
tfoot td { color: var(--ash); }

/* ---------- registro de incidentes ---------- */
.incident-list { display: grid; gap: 16px; margin-top: 32px; }
.incident-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.incident .kicker { margin-bottom: 6px; }
.incident h3 { max-width: 62ch; }
.incident .tagrow { margin-top: 0; }
.tag.muted { background: var(--obsidian); border-color: var(--basalt); color: var(--silver); }

.facts { margin: 18px 0 0; border-top: 1px solid var(--basalt); }
.facts > div {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--basalt);
}
.facts > div:last-child { border-bottom: none; padding-bottom: 0; }
.facts dt {
  padding-top: 3px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--silver);
}
.facts dd { margin: 0; font-size: 14.5px; line-height: 1.55; color: var(--silver); max-width: 72ch; }
.facts dd strong { color: var(--chalk); font-weight: 600; }
@media (max-width: 700px) {
  .facts > div { grid-template-columns: minmax(0, 1fr); gap: 4px; }
}

/* ---------- listas de límites (el contenido va en un span: ver nota) ---------- */
.limit-list li > span:last-child { min-width: 0; overflow-wrap: anywhere; }
.limit-list li strong { color: var(--chalk); font-weight: 600; }
.limit-list .mk { min-width: 1.6em; color: var(--silver); }
.limit-list a { overflow-wrap: anywhere; }

/* ---------- divulgación ---------- */
.prose { max-width: 70ch; }
.prose p { margin: 12px 0 0; color: var(--silver); font-size: 15px; line-height: 1.65; }
.prose ul { margin: 12px 0 0; padding-left: 22px; display: grid; gap: 8px; color: var(--silver); font-size: 15px; line-height: 1.65; }
.prose strong { color: var(--chalk); font-weight: 600; }
.prose a { overflow-wrap: anywhere; }

/* ---------- cierre ---------- */
.closing { max-width: 66ch; }
.closing p { margin: 0; color: var(--silver); font-size: 15px; line-height: 1.65; }
.closing .ctas { margin-top: 24px; display: flex; gap: 12px; flex-wrap: wrap; }

/* ---------- ajustes de espaciado y títulos de tarjeta ---------- */
.card .card-title { margin-top: 0; font-family: var(--display); font-size: 19px; font-weight: 600; letter-spacing: -0.025em; line-height: 1.25; color: var(--chalk); }
.stats-note.spaced { margin-top: 24px; }
.subhead.first { margin-top: 0; }
.subhead + .stats { margin-top: 16px; }
tbody th code { white-space: nowrap; }
tbody th { white-space: nowrap; }
.table-scroll.compact { max-width: 640px; }
@media (max-width: 520px) {
  .table-scroll.compact thead th,
  .table-scroll.compact tbody th,
  .table-scroll.compact tbody td,
  .table-scroll.compact tfoot th,
  .table-scroll.compact tfoot td { padding-left: 10px; padding-right: 10px; }
  .table-scroll.compact thead th { font-size: 11px; letter-spacing: 0.02em; }
  .table-scroll.compact td.num { font-size: 14px; }
  .table-scroll.compact caption { padding-left: 10px; padding-right: 10px; }
}
