/* ═══════════════════════════════════════════════════════════════════════════
   GOVERNA PARTICIPA — capa propia sobre el sistema compartido (styles.css).
   Manual v1.0: papel donde se lee, tinta donde se decide; el color clasifica
   (estado, capa, señal) y el latón aparece una vez, en la numeración.
   Líneas antes que cajas.
   ═══════════════════════════════════════════════════════════════════════════ */

.spacer { flex: 1; }
.num { font-family: var(--mono); text-align: right; font-variant-numeric: tabular-nums; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ── Cabecera de vista ── */
.gp-cab { padding-bottom: 6px; }
.gp-h3 { font-family: var(--serif); font-size: 17px; font-weight: 600; margin-bottom: 6px; }
.gp-demo { font-family: var(--mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--brass-soft); border: 1px solid var(--brass); border-radius: 100px; padding: 3px 9px; white-space: nowrap; }

/* ── Botones ── */
.gp-acciones { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 18px 0 4px; }
.gp-btn { display: inline-flex; align-items: center; gap: 8px; background: var(--ink); color: var(--tx-on); border: 1px solid var(--ink); border-radius: var(--r-sm); padding: 10px 16px; font: 500 13.5px var(--sans); cursor: pointer; transition: background .15s; }
.gp-btn:hover:not(:disabled) { background: var(--ink-3); }
.gp-btn:disabled, .gp-btn.off { opacity: .45; cursor: not-allowed; }
.gp-btn-2 { background: transparent; color: var(--tx); border-color: var(--line); }
.gp-btn-2:hover:not(:disabled) { background: var(--papel-hondo); }
.gp-btn-ch { padding: 6px 12px; font-size: 12.5px; background: var(--senal); border-color: var(--senal); }
.gp-btn-ch:hover:not(:disabled) { background: var(--ink); }
.gp-btn-txt { background: none; border: 0; padding: 4px 2px; color: var(--senal); font: 500 13px var(--sans); cursor: pointer; border-bottom: 1px solid transparent; }
.gp-btn-txt:hover { border-bottom-color: var(--senal); }
.gp-btn-txt:disabled { color: var(--tx-3); cursor: not-allowed; }
.gp-mini { border: 1px solid var(--line); background: var(--surface); border-radius: 5px; padding: 3px 9px; font: 500 12px var(--sans); color: var(--tx-2); cursor: pointer; }
.gp-mini:hover:not(:disabled) { border-color: var(--tx-2); color: var(--tx); }
.gp-mini:disabled { opacity: .35; cursor: default; }
:where(.gp-btn, .gp-btn-txt, .gp-mini, button, a, input, select, textarea):focus-visible { outline: 2px solid var(--brass); outline-offset: 2px; }

/* ── Ciclo (inicio) ── */
.gp-ciclo { display: grid; grid-template-columns: repeat(6, 1fr); margin: 30px 0 8px; border-top: 2px solid var(--ink); list-style: none; padding: 0; }
.gp-ciclo li { padding: 12px 12px 0 0; font-family: var(--serif); font-size: 18px; font-weight: 500; }
.gp-ciclo li span { display: block; font-family: var(--mono); font-size: 11px; color: var(--brass-soft); margin-bottom: 4px; }
@media (max-width: 720px) { .gp-ciclo { grid-template-columns: repeat(3, 1fr); row-gap: 14px; } }

/* ── Lista de ejercicios ── */
.gp-lista { list-style: none; padding: 0; border-top: 1px solid var(--line); }
.gp-lista li a { display: grid; gap: 6px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.gp-lista li a:hover .gp-lista-t { color: var(--senal); }
.gp-lista li a > div { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.gp-lista-t { font-family: var(--serif); font-size: 19px; font-weight: 600; }
.gp-lista-m { font-size: 12.5px; color: var(--tx-2); }
.gp-barra { display: block; height: 3px; background: var(--line-soft); max-width: 360px; }
.gp-barra span { display: block; height: 100%; background: var(--senal); }

/* ── Recorrido de 10 pasos ── */
.gp-recorrido { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); border-top: 1px solid var(--line); }
.gp-recorrido li a { display: flex; gap: 10px; align-items: flex-start; padding: 14px 12px 14px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; min-height: 64px; }
.gp-recorrido li a:hover { color: var(--senal); }
.gp-recorrido li.sig a { font-weight: 600; }
.gp-recorrido li.sig .gp-num { background: var(--ink); color: var(--tx-on); border-color: var(--ink); }
.gp-recorrido li.ok .gp-num { background: var(--senal-soft); border-color: var(--senal); color: var(--senal); }
@media (max-width: 1000px) { .gp-recorrido { grid-template-columns: repeat(2, 1fr); } }
.gp-num { flex: none; display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; border: 1px solid var(--line); font: 500 11px var(--mono); color: var(--tx-2); background: var(--surface); }
.gp-n { font-family: var(--mono); font-size: 10px; color: var(--tx-on-3); width: 18px; }

/* ── Cifras ── */
.gp-cifras { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); margin: 0 0 8px; }
.gp-cifras > div { padding: 16px 16px 16px 0; border-bottom: 1px solid var(--line); }
.gp-cifras dt { font-size: 12px; color: var(--tx-2); order: 2; }
.gp-cifras dd { font-family: var(--serif); font-size: 32px; font-weight: 500; line-height: 1; margin: 0 0 6px; font-variant-numeric: tabular-nums; }
.gp-cifras > div { display: flex; flex-direction: column; }
.gp-cifras dd { order: 1; }
.gp-cifras p { order: 3; font-size: 11.5px; color: var(--tx-3); margin-top: 4px; line-height: 1.4; }
@media (max-width: 900px) { .gp-cifras { grid-template-columns: repeat(2, 1fr); } }

/* ── Formularios ── */
.gp-pasos { display: flex; gap: 0; flex-wrap: wrap; margin: 22px 0 20px; border-bottom: 1px solid var(--line); }
.gp-pasos button { display: flex; gap: 8px; align-items: center; background: none; border: 0; border-bottom: 2px solid transparent; padding: 10px 14px 10px 0; margin-right: 14px; font: 500 13px var(--sans); color: var(--tx-3); cursor: pointer; }
.gp-pasos button span { font-family: var(--mono); font-size: 11px; }
.gp-pasos button.on { color: var(--tx); border-bottom-color: var(--ink); }
.gp-pasos button.ok { color: var(--senal); }
.gp-form { max-width: 820px; }
.gp-campo { display: grid; gap: 5px; margin-bottom: 14px; }
.gp-campo label { font-size: 12.5px; font-weight: 600; color: var(--tx); }
.gp-ayuda { font-size: 12px; color: var(--tx-3); line-height: 1.45; }
.gp-campo input, .gp-campo select, .gp-campo textarea, .gp-preguntas textarea, .gp-preguntas input, .gp-preguntas select, .gp-concl textarea, .gp-filtros input, .gp-filtros select, .gp-nueva input, .gp-url input, .gp-panel-form textarea, .gp-panel-form input, .gp-panel-form select {
  width: 100%; border: 0; border-bottom: 1px solid var(--line); background: transparent; padding: 8px 0; font: 14px var(--sans); color: var(--tx); border-radius: 0;
}
.gp-campo input:focus, .gp-campo textarea:focus, .gp-preguntas textarea:focus, .gp-concl textarea:focus, .gp-panel-form textarea:focus { border-bottom-color: var(--ink); outline: none; }
.gp-campo input[type="color"] { width: 64px; height: 34px; padding: 0; border: 1px solid var(--line); border-radius: 5px; }
textarea { resize: vertical; line-height: 1.5; }
.gp-marcas { display: flex; flex-wrap: wrap; gap: 8px; border: 0; padding: 0; margin: 0 0 6px; }
.gp-marcas legend { margin-bottom: 8px; }
.gp-marca { display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--line); border-radius: 100px; padding: 6px 12px; font-size: 12.5px; color: var(--tx-2); cursor: pointer; background: var(--surface); }
.gp-marca input { accent-color: var(--senal); margin: 0; }
.gp-marca.on, .gp-marca:has(input:checked) { border-color: var(--senal); color: var(--senal); background: var(--senal-soft); }
.gp-error { color: var(--st-critico); font-size: 13px; min-height: 1em; margin-top: 6px; }
.gp-error:empty { display: none; }

/* Preguntas del diseño */
.gp-preguntas { list-style: none; padding: 0; margin: 20px 0 12px; display: grid; gap: 4px; }
.gp-preguntas li { padding: 12px 0; border-top: 1px solid var(--line); display: grid; gap: 6px; }
.gp-preg-cab { display: flex; gap: 8px; align-items: center; }
.gp-preg-cab select { width: auto; font-size: 12.5px; color: var(--tx-2); }
.gp-preguntas-ver { padding-left: 18px; display: grid; gap: 8px; font-size: 14px; }
.gp-revision { display: grid; grid-template-columns: 200px 1fr; border-top: 1px solid var(--line); font-size: 13.5px; }
.gp-revision dt, .gp-revision dd { padding: 10px 0; border-bottom: 1px solid var(--line); margin: 0; }
.gp-revision dt { color: var(--tx-2); font-size: 12.5px; }
@media (max-width: 640px) { .gp-revision { grid-template-columns: 1fr; } .gp-revision dt { border-bottom: 0; padding-bottom: 0; } }

/* Asistente metodológico: un margen en latón, sin caja */
.gp-asistente { border-left: 2px solid var(--brass); padding: 4px 0 4px 16px; margin: 4px 0 14px; }
.gp-sug, .gp-tec { list-style: none; padding: 0; margin-top: 10px; display: grid; gap: 6px; font-size: 13px; }
.gp-sug li { display: flex; gap: 12px; justify-content: space-between; align-items: baseline; border-bottom: 1px dotted var(--line); padding-bottom: 6px; }
.gp-sug em { font-style: normal; font-size: 11.5px; color: var(--senal); white-space: nowrap; }
.gp-tec li { color: var(--tx-2); line-height: 1.45; }

/* ── Escucha ── */
.gp-tres { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; margin-top: 22px; }
@media (max-width: 1000px) { .gp-tres { grid-template-columns: 1fr; } }
.gp-bloque { border-top: 2px solid var(--ink); padding-top: 14px; display: grid; gap: 10px; align-content: start; }
.gp-bloque h2 { font-family: var(--serif); font-size: 19px; font-weight: 600; }
.gp-url { display: flex; gap: 8px; align-items: center; }
.gp-url input { font-family: var(--mono); font-size: 12px; }
.gp-demo-caja { border-left: 2px solid var(--brass); padding: 2px 0 2px 12px; display: grid; gap: 8px; justify-items: start; }
.gp-archivo { position: relative; overflow: hidden; width: fit-content; }
.gp-archivo input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.gp-panel-form { margin-top: 30px; border-top: 2px solid var(--senal); padding-top: 16px; display: grid; gap: 12px; max-width: 920px; }

/* ── Tablas ── */
.gp-tabla { width: 100%; border-collapse: collapse; font-size: 13px; margin: 8px 0 4px; }
.gp-tabla th { text-align: left; font: 500 10.5px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--tx-3); padding: 8px 10px 8px 0; border-bottom: 1px solid var(--ink); }
.gp-tabla td { padding: 10px 10px 10px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.gp-tabla .num { text-align: right; }
.gp-tax-acc { display: flex; gap: 6px; align-items: center; justify-content: flex-end; }
.gp-tax-acc select { border: 1px solid var(--line); border-radius: 5px; background: var(--surface); font-size: 12px; padding: 3px 4px; max-width: 130px; }
.gp-edit td, li.gp-edit { background: var(--surface-2); }
li.gp-edit { padding: 14px; border-left: 2px solid var(--ink); }
.gp-nueva { display: grid; grid-template-columns: 1fr 2fr auto; gap: 14px; align-items: end; margin-top: 14px; }
@media (max-width: 720px) { .gp-nueva { grid-template-columns: 1fr; } .gp-tax td:nth-child(3) { display: none; } .gp-tax th:nth-child(3) { display: none; } }
.gp-scroll { overflow-x: auto; }

/* ── Proceso de sistematización ── */
.gp-proceso { list-style: none; padding: 0; margin: 20px 0; display: grid; gap: 0; border-top: 1px solid var(--line); max-width: 920px; }
.gp-proceso li { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid var(--line); color: var(--tx-3); transition: color .3s; }
.gp-proceso li > span:last-child { display: grid; gap: 2px; }
.gp-proceso li b { font-weight: 600; font-size: 13.5px; }
.gp-proceso li.ok { color: var(--tx); }
.gp-proceso li.ok .gp-num { background: var(--senal); border-color: var(--senal); color: #fff; }

/* ── Capas epistémicas: el color clasifica la procedencia ── */
.gp-capa { display: inline-block; font: 500 9.5px var(--mono); letter-spacing: .08em; text-transform: uppercase; padding: 2px 7px; border-radius: 3px; border: 1px solid; vertical-align: 1px; white-space: nowrap; }
.gp-capa-o { color: var(--tx-2); border-color: var(--line); }
.gp-capa-a { color: var(--senal); border-color: var(--senal); }
.gp-capa-i { color: var(--brass-soft); border-color: var(--brass); border-style: dashed; }
.gp-capa-h { color: var(--st-ok); border-color: var(--st-ok); }
.gp-capa-c { color: #fff; background: var(--ink); border-color: var(--ink); }

/* ── Intervenciones ── */
.gp-aportes { list-style: none; padding: 0; border-top: 1px solid var(--line); }
.gp-aporte { padding: 14px 0; border-bottom: 1px solid var(--line); display: grid; gap: 6px; }
.gp-txt { font-family: var(--serif); font-size: 16px; line-height: 1.45; max-width: 75ch; }
.gp-meta { font-size: 12px; color: var(--tx-2); display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.gp-crit { color: var(--tx-3); font-size: 10.5px; }

/* ── Análisis ── */
.gp-figs { display: grid; grid-template-columns: 1fr 1fr; gap: 36px; }
@media (max-width: 1000px) { .gp-figs { grid-template-columns: 1fr; } }
.gp-fig { margin: 30px 0 0; border-top: 2px solid var(--ink); padding-top: 14px; min-width: 0; }
.gp-fig figcaption h3 { font-family: var(--serif); font-size: 19px; font-weight: 600; margin: 4px 0 14px; line-height: 1.25; }
.gp-pie { font-size: 11px; color: var(--tx-3); margin-top: 12px; line-height: 1.45; }
.gp-barras { list-style: none; padding: 0; display: grid; gap: 2px; }
.gp-barras li > button, .gp-barras li > div { display: grid; grid-template-columns: minmax(110px, 34%) 1fr 92px; gap: 12px; align-items: center; width: 100%; background: none; border: 0; padding: 6px 0; text-align: left; font: 13px var(--sans); color: var(--tx); }
.gp-barras li > button { cursor: pointer; }
.gp-barras li > button:hover .gp-b-et { color: var(--senal); }
.gp-barras li > button:hover .gp-b-pista span { background: var(--senal); }
.gp-b-pista { height: 10px; background: var(--line-soft); }
.gp-b-pista span { display: block; height: 100%; background: var(--ink); transition: width .5s; }
.gp-b-n { font: 500 12.5px var(--mono); text-align: right; }
.gp-b-n span { color: var(--tx-3); font-weight: 400; }
.gp-media { margin-top: 10px; font-size: 13px; color: var(--tx-2); }
@media (max-width: 520px) { .gp-barras li > button, .gp-barras li > div { grid-template-columns: 1fr 70px; } .gp-b-et { grid-column: 1 / -1; } }

.gp-matriz { border-collapse: collapse; font-size: 12.5px; min-width: 560px; width: 100%; }
.gp-matriz th { text-align: left; font-weight: 500; padding: 6px 8px 6px 0; border-bottom: 1px solid var(--line); }
.gp-matriz thead th { font: 500 10.5px var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--tx-2); border-bottom: 1px solid var(--ink); vertical-align: bottom; }
.gp-matriz thead th span { display: block; text-transform: none; letter-spacing: 0; color: var(--tx-3); }
.gp-matriz td { padding: 2px; border-bottom: 1px solid var(--line-soft); }
.gp-matriz td button { width: 100%; min-height: 40px; border: 0; cursor: pointer; font: 500 13px var(--mono); color: var(--tx); background: rgb(15 122 130 / var(--a)); display: grid; place-items: center; line-height: 1.1; }
.gp-matriz td button span { font-size: 10px; font-weight: 400; color: var(--tx-2); }
.gp-matriz td[style*="--a:0.6"] button, .gp-matriz td[style*="--a:0.7"] button, .gp-matriz td[style*="--a:0.8"] button, .gp-matriz td[style*="--a:0.9"] button, .gp-matriz td[style*="--a:1"] button { color: #fff; }
.gp-matriz td[style*="--a:0.6"] button span, .gp-matriz td[style*="--a:0.7"] button span, .gp-matriz td[style*="--a:0.8"] button span, .gp-matriz td[style*="--a:0.9"] button span, .gp-matriz td[style*="--a:1"] button span { color: rgba(255,255,255,.8); }
.gp-matriz td button:hover { outline: 2px solid var(--ink); outline-offset: -2px; }

.gp-tiempo { display: flex; gap: 6px; align-items: flex-end; height: 140px; overflow-x: auto; padding-bottom: 20px; }
.gp-tiempo div { flex: 1 0 32px; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; position: relative; }
.gp-tiempo span { display: block; background: var(--ink); min-height: 2px; }
.gp-tiempo em { position: absolute; bottom: -18px; left: 0; right: 0; text-align: center; font: normal 10px var(--mono); color: var(--tx-3); }

.gp-explorador { margin-top: 20px; scroll-margin-top: 70px; }
.gp-filtros { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)) auto; gap: 12px; align-items: end; margin-bottom: 14px; }
.gp-filtros label { display: grid; gap: 2px; font-size: 11px; color: var(--tx-3); }
@media (max-width: 1100px) { .gp-filtros { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 560px) { .gp-filtros { grid-template-columns: 1fr 1fr; } }

/* ── Hallazgos y conclusiones ── */
.gp-hallazgos { list-style: none; padding: 0; display: grid; gap: 0; counter-reset: h; }
.gp-hallazgo { padding: 20px 0 16px; border-top: 1px solid var(--line); display: grid; gap: 8px; counter-increment: h; }
.gp-hallazgo h3 { font-family: var(--serif); font-size: 21px; font-weight: 600; line-height: 1.25; max-width: 60ch; }
.gp-hallazgo h3::before { content: counter(h, decimal-leading-zero); font: 500 12px var(--mono); color: var(--brass-soft); margin-right: 10px; vertical-align: 3px; }
.gp-hallazgo > p { color: var(--tx-2); max-width: 75ch; font-size: 14px; }
.gp-hallazgo.est-descartado { opacity: .55; }
.gp-hallazgo.est-validado { border-top: 2px solid var(--st-ok); }
.gp-h-cab { display: flex; justify-content: space-between; gap: 10px; font: 500 10.5px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--tx-3); }
.est-validado .gp-estado { color: var(--st-ok); }
.gp-citas { list-style: none; padding: 0; display: grid; gap: 6px; }
.gp-citas li { font-family: var(--serif); font-size: 15px; color: var(--tx); border-left: 2px solid var(--line); padding-left: 12px; }
.gp-h-dl { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin: 4px 0; font-size: 13px; }
.gp-h-dl dt { margin-bottom: 4px; font: 500 10.5px var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--tx-3); }
.gp-h-dl dd { margin: 0; color: var(--tx-2); line-height: 1.45; }
@media (max-width: 900px) { .gp-h-dl { grid-template-columns: 1fr; gap: 10px; } }
.gp-nuevo-h { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 12px; max-width: 820px; }
.gp-nuevo-h summary { cursor: pointer; font-weight: 500; color: var(--senal); font-size: 13.5px; margin-bottom: 12px; }
.gp-concl { list-style: none; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 0 36px; }
.gp-concl li { padding: 16px 0; border-top: 1px solid var(--line); display: grid; gap: 6px; align-content: start; }
.gp-concl h3 { font-family: var(--serif); font-size: 17px; font-weight: 600; }
.gp-concl textarea { font-size: 13.5px; }
.gp-concl .gp-btn-txt { justify-self: start; }
@media (max-width: 900px) { .gp-concl { grid-template-columns: 1fr; } }

/* ── Informe ── */
.gp-inf-control { display: grid; grid-template-columns: 1fr 320px; gap: 36px; margin: 22px 0 28px; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.gp-inf-acc { display: grid; gap: 10px; align-content: start; }
.gp-inf-acc .gp-btn { justify-content: center; }
@media (max-width: 900px) { .gp-inf-control { grid-template-columns: 1fr; } }
.gp-seg { display: inline-flex; border: 1px solid var(--line); border-radius: var(--r-sm); overflow: hidden; }
.gp-seg button { background: var(--surface); border: 0; padding: 8px 14px; font: 500 13px var(--sans); color: var(--tx-2); cursor: pointer; }
.gp-seg button + button { border-left: 1px solid var(--line); }
.gp-seg button.on { background: var(--ink); color: var(--tx-on); }

.gp-doc-marco { background: var(--papel-hondo); padding: 34px; border-radius: var(--r); }
@media (max-width: 640px) { .gp-doc-marco { padding: 10px; } }
.gp-doc { --inst: var(--senal); background: #fff; max-width: 820px; margin: 0 auto; padding: 64px 72px; color: var(--tx); font-family: var(--serif); font-size: 15px; line-height: 1.6; box-shadow: 0 1px 2px rgba(13,31,48,.08); }
@media (max-width: 640px) { .gp-doc { padding: 28px 20px; } }
.gp-doc section { margin-bottom: 34px; }
.gp-doc h1 { font-size: 38px; line-height: 1.1; font-weight: 600; margin: 18px 0 10px; }
.gp-doc h2 { font-size: 23px; font-weight: 600; margin: 0 0 14px; padding-bottom: 8px; border-bottom: 1px solid var(--inst); }
.gp-doc h2 span { font: 500 13px var(--mono); color: var(--inst); margin-right: 12px; vertical-align: 3px; }
.gp-doc h3 { font-size: 16.5px; font-weight: 600; margin: 18px 0 6px; }
.gp-doc p { margin: 0 0 10px; }
.gp-doc ul, .gp-doc ol { padding-left: 20px; margin: 0 0 12px; }
.gp-doc li { margin-bottom: 4px; }
.gp-doc blockquote { margin: 8px 0; padding-left: 14px; border-left: 2px solid var(--inst); font-style: italic; color: var(--tx-2); }
.gp-portada { min-height: 520px; display: flex; flex-direction: column; justify-content: center; border-top: 6px solid var(--inst); padding-top: 40px; }
.gp-d-ent, .gp-d-fecha, .gp-d-firma, .gp-d-ev { font-family: var(--sans); font-size: 12px; color: var(--tx-2); }
.gp-d-ent { font-family: var(--mono); letter-spacing: .1em; text-transform: uppercase; font-size: 11px; }
.gp-d-sub { font-size: 19px; color: var(--tx-2); }
.gp-d-firma { margin-top: auto; padding-top: 60px; color: var(--tx-3); }
.gp-d-demo { font-family: var(--sans); font-size: 12px; color: var(--brass-soft); border-left: 2px solid var(--brass); padding-left: 10px; margin-top: 18px; }
.gp-dh { margin-bottom: 22px; }
.gp-dtab { width: 100%; border-collapse: collapse; font-family: var(--sans); font-size: 12px; margin: 8px 0 14px; }
.gp-dtab th { text-align: left; font-weight: 600; padding: 6px 8px; border-bottom: 1px solid var(--tx); background: var(--papel); }
.gp-dtab td { padding: 6px 8px; border-bottom: 1px solid var(--line); }
.gp-dbar { display: grid; gap: 6px; font-family: var(--sans); font-size: 12.5px; margin: 8px 0 14px; }
.gp-dbar div { display: grid; grid-template-columns: 38% 1fr 96px; gap: 10px; align-items: center; }
.gp-dbar b { display: block; height: 9px; background: var(--inst); }
.gp-dbar em { font-style: normal; font-family: var(--mono); font-size: 11.5px; text-align: right; color: var(--tx-2); }

/* ── Trazabilidad ── */
.gp-cadena { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(7, 1fr); margin: 24px 0 8px; }
.gp-cadena li { position: relative; padding: 22px 12px 0 0; display: grid; gap: 4px; align-content: start; font-size: 12.5px; color: var(--tx-3); border-top: 2px solid var(--line); }
.gp-cadena li::before { content: ""; position: absolute; top: -7px; left: 0; width: 12px; height: 12px; border-radius: 50%; background: var(--surface); border: 2px solid var(--line); }
.gp-cadena li.ok { border-top-color: var(--senal); color: var(--tx-2); }
.gp-cadena li.ok::before { background: var(--senal); border-color: var(--senal); }
.gp-cadena b { color: var(--tx); font-size: 13.5px; }
@media (max-width: 1000px) { .gp-cadena { grid-template-columns: 1fr; gap: 0; } .gp-cadena li { border-top: 0; border-left: 2px solid var(--line); padding: 0 0 16px 18px; } .gp-cadena li.ok { border-left-color: var(--senal); } .gp-cadena li::before { top: 0; left: -7px; } }
.gp-historial { list-style: none; padding: 0; border-top: 1px solid var(--line); font-size: 13px; }
.gp-historial li { display: grid; grid-template-columns: 240px 1fr; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line-soft); }
.gp-historial li span { font: 11.5px var(--mono); color: var(--tx-3); }
@media (max-width: 640px) { .gp-historial li { grid-template-columns: 1fr; gap: 2px; } }

/* ── Acceso: cuentas de demostración ── */
.gp-cuentas { display: grid; gap: 6px; }

/* ── Formulario público (lo que ve la ciudadanía) ── */
.gp-publico { --inst: var(--senal); min-height: 100vh; background: var(--papel); padding: 40px 16px 80px; }
.gp-pub-caja { max-width: 680px; margin: 0 auto; border-top: 6px solid var(--inst); padding-top: 28px; }
.gp-pub-caja h1 { font-family: var(--serif); font-size: clamp(28px, 5vw, 40px); line-height: 1.1; font-weight: 600; margin: 8px 0 14px; }
.gp-pub-caja > p { color: var(--tx-2); line-height: 1.55; margin-bottom: 12px; }
.gp-pub-ent { font: 500 11px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--inst) !important; }
.gp-pub-demo { font-size: 12.5px; color: var(--brass-soft) !important; border-left: 2px solid var(--brass); padding-left: 10px; }
.gp-pub-aviso { font-size: 13px; background: var(--surface); border-left: 2px solid var(--inst); padding: 10px 12px; }
.gp-publico form { display: grid; gap: 26px; margin-top: 24px; }
.gp-pub-car, .gp-pub-preg { border: 0; padding: 0; margin: 0; display: grid; gap: 8px; }
.gp-pub-car { grid-template-columns: 1fr 1fr; gap: 14px; }
.gp-pub-car legend { font-weight: 600; font-size: 14px; margin-bottom: 8px; }
.gp-pub-car label { display: grid; gap: 4px; font-size: 13px; color: var(--tx-2); }
.gp-pub-car select { border: 0; border-bottom: 1px solid var(--line); background: transparent; padding: 8px 0; font: 14px var(--sans); }
.gp-pub-preg legend { font-family: var(--serif); font-size: 19px; font-weight: 600; line-height: 1.3; margin-bottom: 8px; display: flex; gap: 10px; }
.gp-pub-preg legend span { font: 500 12px var(--mono); color: var(--inst); padding-top: 5px; }
.gp-pub-preg textarea { width: 100%; border: 1px solid var(--line); background: var(--surface); border-radius: var(--r-sm); padding: 12px; font: 15px var(--sans); }
.gp-pub-op { display: flex; gap: 10px; align-items: center; padding: 10px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm); font-size: 14.5px; cursor: pointer; }
.gp-pub-op input { accent-color: var(--inst); width: 18px; height: 18px; }
.gp-pub-op:has(input:checked) { border-color: var(--inst); }
.gp-pub-escala { display: flex; gap: 8px; }
.gp-pub-escala label { flex: 1; cursor: pointer; }
.gp-pub-escala input { position: absolute; opacity: 0; }
.gp-pub-escala span { display: grid; place-items: center; height: 48px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); font: 600 16px var(--mono); }
.gp-pub-escala input:checked + span { background: var(--inst); border-color: var(--inst); color: #fff; }
.gp-pub-escala input:focus-visible + span { outline: 2px solid var(--brass); outline-offset: 2px; }
.gp-pub-ayuda { font-size: 12px; color: var(--tx-3); }
.gp-publico .gp-btn { justify-self: start; padding: 13px 22px; font-size: 15px; background: var(--inst); border-color: var(--inst); }
.gp-pub-pie { margin-top: 50px; font-size: 11.5px; color: var(--tx-3) !important; }
@media (max-width: 560px) { .gp-pub-car { grid-template-columns: 1fr; } }

/* ── Impresión: sólo el informe ── */
@media print {
  @page { margin: 18mm 16mm; }
  body.gp-imprimir * { visibility: hidden; }
  body.gp-imprimir #gpDoc, body.gp-imprimir #gpDoc * { visibility: visible; }
  body.gp-imprimir #gpDoc { position: absolute; left: 0; top: 0; width: 100%; max-width: none; padding: 0; box-shadow: none; }
  body.gp-imprimir .rail, body.gp-imprimir .topbar { display: none; }
  .gp-doc section { break-inside: auto; }
  .gp-doc h2, .gp-doc h3 { break-after: avoid; }
  .gp-portada { break-after: page; min-height: 240mm; }
  .gp-dbar b, .gp-capa-c { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* Barra superior en teléfono: la miga cede, el aviso de demostración se queda */
@media (max-width: 560px) {
  .topbar .crumbs > span:nth-child(-n+2) { display: none; }
  .topbar .gp-demo { font-size: 9px; letter-spacing: .06em; padding: 3px 7px; }
}
