/* =========================================================
   COLOSSUS · Consulta de evidencias
   Breakpoints: móvil < 640px · tablet 640–1023px · escritorio ≥ 1024px
   ========================================================= */

@import url("fonts.css");

:root {
  /* Superficies */
  --bg: #F4F6F9;
  --surface: #FFFFFF;
  --soft: #EEF2F6;
  --chip: #EAEEF3;
  --step: #E3EEF4;
  --map: #E7EEF3;
  --captcha-bg: #F7F9FB;
  --video-bg: #111A26;

  /* Bordes */
  --border: #E1E6EC;
  --border-input: #C9D2DC;

  /* Texto */
  --ink: #0E1B2B;
  --ink-2: #22324A;
  --ink-3: #33445A;
  --muted: #4A5A6E;
  --placeholder: #7A8899;

  /* Marca */
  --navy: #0F2F57;
  --navy-hover: #0B2442;
  --link: #0B6A84;
  --focus: #7CC4D8;

  /* Estados */
  --warn-bg: #FFF8EB;
  --warn-border: #F1DDB4;
  --warn-ink: #6B4300;
  --ok-bg: #ECFDF3;
  --ok-ink: #05603A;
  --ok-dot: #12B76A;
  --danger: #B42318;
  --on-navy-muted: #C8D6E5;

  /* Tipografía */
  --font-sans: "Public Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  /* Radios */
  --r-sm: 8px;
  --r-md: 10px;
  --r-lg: 12px;
  --r-xl: 16px;

  /* Sombras */
  --shadow-card: 0 12px 32px rgba(15, 47, 87, 0.08);
  --shadow-seg: 0 1px 3px rgba(15, 47, 87, 0.18);

  /* Márgenes laterales de página */
  --gutter: 20px;
}
@media (min-width: 640px)  { :root { --gutter: 32px; } }
@media (min-width: 1024px) { :root { --gutter: 48px; } }
@media (min-width: 1360px) { :root { --gutter: 120px; } }

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
html, body { overflow-x: hidden; width: 100%; }
body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}
img, video, iframe { max-width: 100%; }
img { display: block; }
a { color: var(--link); }
a:hover { color: var(--navy); }
input::placeholder { color: var(--placeholder); }
:where(a, button, input, [tabindex]):focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}
.mono { font-family: var(--font-mono); }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.icon { width: 20px; height: 20px; flex-shrink: 0; }
.icon-sm { width: 16px; height: 16px; flex-shrink: 0; }

/* Visibilidad por breakpoint */
@media (max-width: 639px)  { .hide-mobile { display: none !important; } }
@media (min-width: 640px)  { .only-mobile { display: none !important; } }
@media (max-width: 1023px) { .only-desktop { display: none !important; } }
@media (min-width: 1024px) { .hide-desktop { display: none !important; } }
@media (max-width: 639px), (min-width: 1024px) { .only-tablet { display: none !important; } }

.page { min-height: 100%; display: flex; flex-direction: column; }
.page > main { flex: 1 0 auto; }

/* ---------- Header ---------- */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  height: 60px;
  padding: 0 var(--gutter);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  position: sticky; top: 0; z-index: 10;
}
@media (min-width: 640px)  { .site-header { height: 68px; } }
@media (min-width: 1024px) { .site-header { height: 72px; } }

.brand { display: flex; align-items: center; text-decoration: none; }
/* Logo real de Colossus (imagen horizontal: isotipo + palabra) */
.brand img { height: 28px; width: auto; }
@media (min-width: 640px)  { .brand img { height: 32px; } }
@media (min-width: 1024px) { .brand img { height: 36px; } }

.header-nav { display: flex; gap: 28px; font-size: 15px; font-weight: 500; }
.header-nav a { color: var(--ink-3); text-decoration: none; }
.header-nav a:hover { color: var(--navy); }

.icon-btn {
  width: 44px; height: 44px; border: 0; background: transparent;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--navy); border-radius: var(--r-md); cursor: pointer; text-decoration: none;
}
.icon-btn--bordered { border: 1px solid var(--border-input); background: var(--surface); }

/* Header móvil del resultado: atrás · logo · cerrar */
.site-header--result-mobile { padding: 0 8px; }
.site-header--result-mobile .brand img { height: 24px; }

/* ---------- Botones ---------- */
.btn {
  height: 44px; padding: 0 18px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: var(--r-md); border: 1px solid transparent;
  font: 600 15px/1 var(--font-sans); text-decoration: none; cursor: pointer;
  white-space: nowrap;
}
.btn--primary { background: var(--navy); color: #fff; }
.btn--primary:hover { background: var(--navy-hover); color: #fff; }
.btn--secondary { background: var(--surface); color: var(--navy); border-color: var(--border-input); }
.btn--secondary:hover { border-color: var(--navy); color: var(--navy); }
.btn--sm { height: 36px; padding: 0 12px; font-size: 14px; border-radius: var(--r-sm); }
.btn--md { height: 40px; padding: 0 14px; font-size: 14px; }
.btn--lg { height: 54px; font-size: 16px; font-weight: 700; width: 100%; }
.btn--on-navy { background: #fff; color: var(--navy); font-weight: 700; height: 46px; }
.btn--on-navy:hover { background: var(--soft); color: var(--navy); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }

/* ---------- Avisos ---------- */
.notice {
  display: flex; gap: 10px; align-items: flex-start;
  background: var(--warn-bg); border: 1px solid var(--warn-border);
  color: var(--warn-ink); border-radius: var(--r-md);
  padding: 12px 14px; font-size: 13px; line-height: 1.5;
}
@media (max-width: 639px) { .notice { font-size: 14px; padding: 14px; border-radius: var(--r-lg); } }
.notice .icon-sm { margin-top: 2px; }

.alert-danger {
  display: flex; gap: 10px; align-items: flex-start;
  background: #FEF2F2; border: 1px solid #FECACA;
  color: var(--danger); border-radius: var(--r-md);
  padding: 12px 14px; font-size: 14px; line-height: 1.5;
}

/* Aviso de privacidad integrado en el propio top bar (no ocupa una fila aparte) */
.header-privacy {
  flex: 1 1 auto; min-width: 0;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  height: 32px; padding: 0 14px;
  background: var(--warn-bg); border: 1px solid var(--warn-border); border-radius: 999px;
  color: var(--warn-ink); font-size: 13px; font-weight: 500;
}
.header-privacy svg { flex-shrink: 0; }
.header-privacy span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (min-width: 640px)  { .header-privacy { height: 36px; font-size: 13px; } }
@media (min-width: 1024px) { .header-privacy { height: 40px; font-size: 14px; padding: 0 18px; } }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--surface); border-top: 1px solid var(--border);
  padding: 18px var(--gutter);
  display: flex; flex-direction: column; gap: 6px;
  font-size: 13px; color: var(--muted);
}
@media (min-width: 640px) {
  .site-footer { flex-direction: row; align-items: center; justify-content: space-between; min-height: 64px; padding-block: 12px; }
}
.site-footer .operator { display: flex; align-items: center; gap: 10px; }
/* Logo real de GRUPOTIC */
.site-footer .operator img { height: 22px; width: auto; }
@media (min-width: 1024px) { .site-footer .operator img { height: 28px; } }

/* =========================================================
   PANTALLA 1 · CONSULTA
   ========================================================= */
.search-layout {
  padding: 28px var(--gutter) 32px;
  display: grid; gap: 24px;
  max-width: 1440px; width: 100%; margin: 0 auto;
}
@media (min-width: 640px) {
  .search-layout { padding-block: 48px; justify-items: center; }
  .search-layout > * { width: 100%; max-width: 560px; }
}
@media (min-width: 1024px) {
  .search-layout {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 64px; align-items: center; justify-items: stretch;
    min-height: calc(100vh - 72px - 64px); padding-block: 32px;
  }
  .search-layout > * { max-width: none; }
}
@media (min-width: 1360px) { .search-layout { gap: 96px; } }

.intro { display: flex; flex-direction: column; gap: 28px; max-width: 520px; }
@media (max-width: 1023px) { .intro { gap: 10px; } }
.intro-head { display: flex; flex-direction: column; gap: 10px; }
@media (min-width: 1024px) { .intro-head { gap: 16px; } }

.eyebrow {
  font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--link);
}
@media (min-width: 1024px) { .eyebrow { font-size: 13px; } }

.intro h1 {
  margin: 0; color: var(--navy); font-weight: 800; letter-spacing: -0.02em;
  font-size: 30px; line-height: 1.12;
}
@media (min-width: 640px)  { .intro h1 { font-size: 36px; } }
@media (min-width: 1024px) { .intro h1 { font-size: 46px; line-height: 1.08; } }

.intro p { margin: 0; color: var(--muted); font-size: 16px; line-height: 1.5; }
@media (min-width: 1024px) { .intro p { font-size: 18px; line-height: 1.55; } }

.steps { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 16px; }
.steps li { display: flex; gap: 14px; align-items: flex-start; }
.steps .num {
  width: 32px; height: 32px; flex-shrink: 0; border-radius: 50%;
  background: var(--step); color: var(--navy); font-weight: 700; font-size: 14px;
  display: flex; align-items: center; justify-content: center;
}
.steps .txt { display: flex; flex-direction: column; gap: 2px; }
.steps .txt strong { font-weight: 600; font-size: 16px; }
.steps .txt span { font-size: 15px; color: var(--muted); }

.trust { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--muted); }
.trust svg { color: #067647; }

/* Tarjeta del formulario */
.search-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-xl);
  padding: 20px; display: flex; flex-direction: column; gap: 18px;
}
@media (min-width: 1024px) {
  .search-card { justify-self: end; width: 100%; max-width: 500px; padding: 26px; gap: 14px; box-shadow: var(--shadow-card); }
  .search-card .btn--lg { height: 48px; }
  .search-card .notice { padding: 10px 12px; }
}
.search-card h2 { margin: 0; font-size: 20px; font-weight: 700; }

/* Control segmentado */
.segmented {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px;
  padding: 4px; background: var(--soft); border-radius: var(--r-md);
}
.segmented button {
  height: 44px; border: 0; border-radius: var(--r-sm); background: transparent;
  color: var(--muted); font: 600 14px/1 var(--font-sans); cursor: pointer;
}
@media (min-width: 1024px) { .segmented button { height: 42px; font-size: 15px; } }
.segmented button[aria-pressed="true"] { background: var(--surface); color: var(--navy); box-shadow: var(--shadow-seg); }

/* Campos */
.field { display: flex; flex-direction: column; gap: 8px; }
.field label { font-size: 14px; font-weight: 600; color: var(--ink-2); }
.input {
  height: 52px; width: 100%; padding: 0 16px;
  border: 1px solid var(--border-input); border-radius: var(--r-md);
  background: var(--surface); color: var(--ink);
  font: 500 16px var(--font-mono);   /* 16px evita zoom en iOS */
}
@media (min-width: 1024px) { .input { height: 50px; } }
.input:focus { border-color: var(--navy); outline: none; box-shadow: 0 0 0 3px rgba(124, 196, 216, .6); }
.input[aria-invalid="true"], .input.input-validation-error { border-color: var(--danger); }
.field-error, .field-validation-error { font-size: 13px; color: var(--danger); display: block; }

.captcha-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.captcha-img {
  flex: 1 1 auto; height: 52px; min-width: 0;
  border: 1px solid var(--border); border-radius: var(--r-md); background: var(--captcha-bg);
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.captcha-img img { max-height: 44px; width: auto; }
.captcha-refresh { width: 52px; height: 52px; }
.captcha-row .input { flex: 1 1 100%; letter-spacing: .08em; }
@media (min-width: 1024px) {
  .captcha-row { flex-wrap: nowrap; }
  .captcha-img { flex: 0 0 150px; height: 50px; }
  .captcha-refresh { width: 50px; height: 50px; }
  .captcha-row .input { flex: 1 1 auto; min-width: 0; padding: 0 14px; }
}

.check { display: flex; gap: 12px; align-items: flex-start; }
.check input { width: 22px; height: 22px; margin: 0; flex-shrink: 0; accent-color: var(--navy); }
@media (min-width: 1024px) { .check input { width: 20px; height: 20px; margin-top: 1px; } }
.check label { font-size: 14px; line-height: 1.5; color: var(--ink-3); }

/* =========================================================
   PANTALLA 2 · RESULTADO
   ========================================================= */
.result {
  padding: 24px var(--gutter) 32px;
  display: flex; flex-direction: column; gap: 20px;
  max-width: 1440px; width: 100%; margin: 0 auto;
}
@media (min-width: 640px)  { .result { padding-block: 32px 48px; gap: 24px; } }
@media (min-width: 1024px) { .result { padding-block: 36px 56px; } }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-xl); }
.card-pad { padding: 16px; }
@media (min-width: 640px)  { .card-pad { padding: 18px; } }
@media (min-width: 1024px) { .card-pad { padding: 20px; } }
.card h2 { margin: 0; font-size: 17px; font-weight: 700; }
@media (min-width: 1024px) { .card h2 { font-size: 18px; } }
.stack { display: flex; flex-direction: column; gap: 12px; }
@media (min-width: 1024px) { .stack { gap: 14px; } }

/* Encabezado del resultado */
.result-head { display: flex; flex-direction: column; gap: 10px; }
@media (min-width: 640px) {
  .result-head { flex-direction: row; align-items: flex-end; justify-content: space-between; gap: 24px; }
}
.result-head .titles { display: flex; flex-direction: column; gap: 10px; }
.ref-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.ref-label { font-size: 13px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.ref-chip {
  font: 600 13px var(--font-mono); color: var(--ink-2); background: var(--chip);
  padding: 4px 10px; border-radius: 6px; align-self: flex-start;
}
@media (min-width: 640px) { .ref-chip { font-size: 14px; } }
.result-head h1 {
  margin: 0; color: var(--navy); font-weight: 800; letter-spacing: -0.02em; line-height: 1.15;
  font-size: 28px;
}
@media (min-width: 640px)  { .result-head h1 { font-size: 32px; } }
@media (min-width: 1024px) { .result-head h1 { font-size: 36px; } }
.result-head .place { font-size: 15px; color: var(--muted); }
@media (min-width: 1024px) { .result-head .place { font-size: 16px; } }

.status {
  display: inline-flex; align-items: center; gap: 8px; align-self: flex-start;
  height: 30px; padding: 0 12px; border-radius: 999px;
  font-size: 13px; font-weight: 600; white-space: nowrap; flex-shrink: 0;
}
@media (min-width: 640px) { .status { height: 34px; padding: 0 14px; font-size: 14px; align-self: auto; } }
.status .dot { width: 8px; height: 8px; border-radius: 50%; }
.status--ok { background: var(--ok-bg); color: var(--ok-ink); }
.status--ok .dot { background: var(--ok-dot); }
.status--pending { background: var(--soft); color: var(--muted); }
.status--pending .dot { background: #8A97A8; }

/* Tarjetas de resumen */
.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 640px)  { .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .stats { gap: 16px; } }
.stat {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
  padding: 14px; display: flex; flex-direction: column; gap: 4px;
}
@media (min-width: 640px)  { .stat { padding: 16px; gap: 6px; } }
@media (min-width: 1024px) { .stat { padding: 20px; gap: 8px; border-radius: 14px; } }
.stat-label { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; color: var(--muted); }
@media (min-width: 1024px) { .stat-label { font-size: 13px; } }
.stat-label svg { display: none; }
@media (min-width: 1024px) { .stat-label svg { display: block; } }
.stat-value { font-size: 17px; font-weight: 700; }
@media (min-width: 640px)  { .stat-value { font-size: 18px; } }
@media (min-width: 1024px) { .stat-value { font-size: 22px; } }
.stat-value.mono { font-size: 15px; font-weight: 600; }
@media (min-width: 640px)  { .stat-value.mono { font-size: 16px; } }
@media (min-width: 1024px) { .stat-value.mono { font-size: 20px; } }
.stat-sub { font-size: 12px; color: var(--muted); }
@media (min-width: 640px)  { .stat-sub { font-size: 13px; } }
@media (min-width: 1024px) { .stat-sub { font-size: 14px; } }
.is-danger { color: var(--danger) !important; }
.stat-sub.is-danger { font-weight: 600; }

/* Rejilla principal: evidencia + lateral */
.main-grid { display: grid; gap: 20px; align-items: start; }
@media (min-width: 640px)  { .main-grid { gap: 24px; } }
@media (min-width: 1024px) {
  .main-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .main-grid .evidence { grid-column: span 2; }
}
.aside { display: grid; gap: 20px; }
@media (min-width: 640px) and (max-width: 1023px) { .aside { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .aside { gap: 24px; } }

/* Evidencia */
.evidence { overflow: hidden; }
.evidence-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 16px 16px 0;
}
@media (min-width: 640px) { .evidence-head { padding: 14px 18px; border-bottom: 1px solid var(--border); } }
@media (min-width: 1024px) { .evidence-head { padding: 16px 20px; } }
.evidence-head .left { display: flex; align-items: center; gap: 16px; flex: 1; justify-content: space-between; }
@media (min-width: 640px) { .evidence-head .left { flex: initial; justify-content: flex-start; } }
@media (min-width: 1024px) { .evidence-head .left { gap: 20px; } }
.evidence-actions { display: flex; gap: 8px; }

.pill-tabs { display: flex; gap: 4px; padding: 4px; background: var(--soft); border-radius: var(--r-md); }
.pill-tabs button {
  height: 36px; padding: 0 14px; border: 0; border-radius: var(--r-sm);
  background: transparent; color: var(--muted);
  font: 600 14px/1 var(--font-sans); cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px;
}
.pill-tabs button svg { display: none; }
@media (min-width: 1024px) { .pill-tabs button svg { display: block; } }
.pill-tabs button[aria-selected="true"] { background: var(--surface); color: var(--navy); box-shadow: var(--shadow-seg); }

.evidence-body { padding: 16px; display: flex; flex-direction: column; gap: 12px; }
@media (min-width: 640px)  { .evidence-body { padding: 18px; } }
@media (min-width: 1024px) { .evidence-body { padding: 20px; gap: 14px; } }
.media-frame {
  width: 100%; aspect-ratio: 16 / 9; border-radius: var(--r-md); overflow: hidden;
  background: var(--video-bg);
}
.media-frame img, .media-frame video { width: 100%; height: 100%; object-fit: cover; display: block; }
.media-frame video { object-fit: contain; background: var(--video-bg); }
.media-frame img { cursor: zoom-in; }
.media-caption { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; color: var(--muted); }
@media (min-width: 640px) { .media-caption { font-size: 14px; } }
.media-actions-mobile { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.media-actions-mobile .btn { height: 46px; font-size: 14px; }

/* Miniaturas (más de una foto) */
.thumb-row { display: flex; gap: 8px; flex-wrap: wrap; }
.thumb-row button {
  width: 64px; height: 40px; padding: 0; border-radius: 6px; overflow: hidden;
  border: 2px solid var(--border); background: none; cursor: pointer;
}
.thumb-row button[aria-current="true"] { border-color: var(--navy); }
.thumb-row img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Documentos */
.doc-item {
  display: flex; gap: 12px; align-items: center;
  padding: 12px; border: 1px solid var(--border); border-radius: var(--r-lg);
  text-decoration: none; color: inherit;
}
@media (min-width: 1024px) { .doc-item { gap: 14px; padding: 14px; } }
a.doc-item:hover { border-color: var(--navy); }
.doc-icon {
  width: 40px; height: 40px; flex-shrink: 0; border-radius: var(--r-md);
  background: var(--soft); color: var(--muted);
  display: flex; align-items: center; justify-content: center;
}
@media (min-width: 1024px) { .doc-icon { width: 44px; height: 44px; } }
.doc-item.is-available .doc-icon { background: var(--step); color: var(--navy); }
.doc-meta { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.doc-meta strong { font-size: 15px; font-weight: 600; }
.doc-meta span { font-size: 13px; color: var(--muted); }
.doc-badge {
  font-size: 12px; font-weight: 700; color: var(--muted); background: var(--soft);
  padding: 4px 8px; border-radius: 6px;
}
.doc-item.is-available .doc-badge { background: var(--ok-bg); color: var(--ok-ink); }
.doc-note { margin: 0; font-size: 13px; line-height: 1.5; color: var(--muted); }

/* Ubicación */
.map-thumb { height: 92px; border-radius: var(--r-md); background: var(--map); overflow: hidden; }
@media (min-width: 1024px) { .map-thumb { height: 132px; } }
.map-thumb svg { width: 100%; height: 100%; display: block; }
.coords { font: 500 13px var(--font-mono); color: var(--muted); }
.loc-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.loc-desktop { display: flex; flex-direction: column; gap: 4px; }
.loc-desktop strong { font-size: 15px; font-weight: 600; }
.loc-desktop .link-strong { margin-top: 10px; }
.link-strong { font-size: 14px; font-weight: 600; }

/* Detalle: infracción | propietario/vehículo (switch interno, ver .pill-tabs) — dos tarjetas
   independientes, una por columna en desktop, apiladas en mobile. Sin mecanismo de pestañas a
   nivel de tarjeta (eso ya lo resuelve .pill-tabs dentro de la segunda tarjeta, mismo componente
   que Foto/Video en Evidencia) — corregido 2026-09-24, antes eran 3 columnas con nombres/
   direcciones largas viéndose apretados. */
.details { display: grid; gap: 20px; }
@media (min-width: 640px)  { .details { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .details { gap: 24px; } }

.detail-panel { padding: 18px 16px; display: flex; flex-direction: column; gap: 16px; }
@media (min-width: 640px)  { .detail-panel { padding: 20px; } }
@media (min-width: 1024px) { .detail-panel { padding: 24px; gap: 20px; } }
.panel-title-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }

.dl { margin: 0; display: grid; gap: 16px; }
/* [hidden] del navegador y .dl tienen la misma especificidad (0,0,1,0) — sin este empate roto a
   propósito, "display:grid" de arriba le gana al display:none del atributo hidden porque se
   define después, y un <dl class="dl" hidden> queda visible igual (bug real encontrado
   2026-09-24 en el switch Propietario/Vehículo). */
.dl[hidden] { display: none; }
@media (min-width: 640px)  { .dl { gap: 14px; } }
@media (min-width: 1024px) { .dl { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 24px; } .dl .span-2 { grid-column: span 2; } }
.dl > div { display: flex; flex-direction: column; gap: 4px; }
.dl dt { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.dl dd { margin: 0; font-size: 15px; line-height: 1.45; word-break: break-word; }
.dl dd.mono { font-family: var(--font-mono); }

.reveal-btn-mobile { width: 100%; height: 44px; }

/* Banner de ayuda */
.help-banner {
  background: var(--navy); color: #fff; border-radius: var(--r-xl);
  padding: 20px; display: flex; flex-direction: column; gap: 14px;
}
@media (min-width: 640px) {
  .help-banner { flex-direction: row; align-items: center; justify-content: space-between; gap: 20px; padding: 22px 24px; }
}
@media (min-width: 1024px) { .help-banner { padding: 24px 28px; } }
.help-banner h2 { margin: 0; font-size: 17px; font-weight: 700; }
@media (min-width: 1024px) { .help-banner h2 { font-size: 18px; } }
.help-banner p { margin: 4px 0 0; font-size: 14px; line-height: 1.45; color: var(--on-navy-muted); }
@media (min-width: 1024px) { .help-banner p { font-size: 15px; } }

/* Visor ampliado */
.lightbox { border: 0; padding: 0; background: transparent; max-width: 96vw; max-height: 92vh; }
.lightbox::backdrop { background: rgba(8, 16, 28, .88); }
.lightbox img { max-width: 96vw; max-height: 86vh; border-radius: var(--r-md); }
.lightbox .close { position: fixed; top: 16px; right: 16px; background: #fff; }

/* Canales de atención */
.info-dialog {
  position: relative; border: 0; padding: 0; border-radius: var(--r-xl);
  max-width: 480px; width: calc(100vw - 40px); max-height: 82vh;
}
.info-dialog::backdrop { background: rgba(8, 16, 28, .6); }
.info-dialog .close { position: absolute; top: 10px; right: 10px; background: var(--soft); }
.info-dialog-body { padding: 28px 24px 24px; overflow-y: auto; max-height: 82vh; }
.info-dialog-body h2 { margin: 0 0 16px; font-size: 17px; color: var(--navy); }
.info-dialog-body p { margin: 0; font-size: 14px; line-height: 1.65; color: var(--ink-3); }
.info-dialog-body p strong { color: var(--navy); }

.canal-atencion { margin: 0; display: flex; flex-direction: column; gap: 18px; }
.canal-atencion .grupo { display: flex; flex-direction: column; gap: 4px; }
.canal-atencion dt {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted);
}
.canal-atencion dt .icon-sm { color: var(--link); }
.canal-atencion dd { margin: 0 0 0 24px; display: flex; flex-direction: column; gap: 3px; font-size: 14.5px; line-height: 1.5; color: var(--ink-2); }
.canal-atencion dd .sede-nombre { font-weight: 600; color: var(--ink); }
.canal-atencion dd a { font-weight: 600; }
/* Teléfonos: mismo color/peso que un link (var(--link)) pero sin ser clickeables — a propósito,
   no son un canal de contacto directo desde la web pública. */
.canal-atencion dd .tel { color: var(--link); font-weight: 600; }
.canal-atencion hr { border: 0; border-top: 1px solid var(--border); margin: 0; }

.stat, .doc-meta, .dl > div { min-width: 0; }
.stat-value, .stat-sub, .ref-chip { overflow-wrap: anywhere; }

/* ---------- Páginas secundarias (Términos, Error) ---------- */
.simple-page { padding: 28px var(--gutter) 40px; max-width: 760px; margin: 0 auto; }
.simple-page h1 { margin: 0 0 6px; color: var(--navy); font-weight: 800; letter-spacing: -.02em; font-size: 26px; }
@media (min-width: 1024px) { .simple-page h1 { font-size: 30px; } }
.simple-page .lead { margin: 0 0 20px; color: var(--muted); font-size: 15px; }
.simple-page h2 { font-size: 16px; font-weight: 700; color: var(--navy); margin: 24px 0 8px; }
.simple-page h2:first-child { margin-top: 0; }
.simple-page p, .simple-page li { font-size: 14px; line-height: 1.6; color: var(--ink-3); }
.simple-page code { font-family: var(--font-mono); font-size: 13px; }
