/* «Cuéntanos lo que viste»: la puerta unica para escribirnos (fusion del
   10-10-2026 de «Cuéntanos lo que viste» y «¿Viste un error?»). Se carga en
   todas las paginas y en index.html. El cajon lo escribe
   herramientas/apartados.py (puerta()) y lo abre comunidad.js.
   Aqui viven tambien los formularios civicos (.sv-form, .sv-campo...) que
   comparten el cajon, comunidad.html y servicios.html. */

/* Formularios */
.sv-form { background: #fff; border: 1px solid #dfe5f0; border-radius: 16px; padding: 16px 20px; display: grid; gap: 14px; }
.sv-privado { margin: 0; font-size: 14px; color: #33415c; background: #eef3fc; border-radius: 10px; padding: 9px 12px; }
.sv-campo { display: grid; gap: 4px; min-width: 0; }
.sv-campo label, .sv-et { font-weight: 700; font-size: 14.5px; color: #24324d; }
.sv-campo small { color: #5a6782; font-size: 13px; line-height: 1.45; }
.sv-campo input[type="text"], .sv-campo input[type="email"], .sv-campo input[type="url"], .sv-campo select, .sv-campo textarea {
  font: inherit; font-size: 15px; padding: 8px 10px; border-radius: 10px; border: 1px solid #c9d3e6; background: #fff; color: #142033; width: 100%; box-sizing: border-box; }
.sv-campo textarea { resize: vertical; }
.sv-campo [aria-invalid="true"], .sv-check input[aria-invalid="true"] { border-color: #b3261e; outline: 2px solid #f4c7c3; }
.sv-req { font-weight: 600; font-size: 11.5px; color: #8a1c14; background: #fdecea; border-radius: 999px; padding: 1px 7px; margin-left: 4px; vertical-align: 1px; }
.sv-acciones { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.sv-acciones a.sz-btn { text-decoration: none; }
.sz-btn:disabled { opacity: .55; cursor: not-allowed; }
.sv-error { margin: 0; background: #fdecea; color: #8a1c14; border-radius: 10px; padding: 10px 12px; font-size: 14.5px; }
.sv-resumen { margin-top: 16px; background: #f7f9fd; border: 1px solid #c9d3e6; border-radius: 16px; padding: 16px 20px; display: grid; gap: 10px; }
.sv-resumen p { margin: 0; }
.sv-res-tit { margin: 0; color: #0b2a63; font-size: 18px; }
.sv-res-texto { font-family: "JetBrains Mono", monospace; font-size: 13.5px; line-height: 1.5; width: 100%; box-sizing: border-box; border: 1px solid #dfe5f0; border-radius: 10px; padding: 10px; background: #fff; color: #142033; resize: vertical; }
.sv-sincanal { font-size: 14px; color: #4a3a12; }
.sv-estado { font-size: 14px; color: #1d5a2c; min-height: 1em; }
@media (max-width: 720px) {
  .sv-form, .sv-resumen { padding: 14px; }
}

/* Cajon */
body.pt-abierta { overflow: hidden; }
.pt-velo { position: fixed; inset: 0; background: rgba(8, 18, 40, .55); z-index: 100000; opacity: 0; transition: opacity .25s ease; }
.pt-velo.pt-visible { opacity: 1; }
.pt-velo[hidden], .pt-cajon[hidden] { display: none; }
.pt-cajon {
  position: fixed; top: 0; right: 0; bottom: 0; width: 100%; max-width: 640px; z-index: 100001;
  display: flex; flex-direction: column; background: #f4f6fb; color: #24324d;
  font-family: Inter, system-ui, sans-serif; font-size: 16px; line-height: 1.5; text-align: left;
  box-shadow: -12px 0 40px rgba(8, 18, 40, .35); border-left: 4px solid #0b2a63;
  transform: translateX(105%); transition: transform .3s cubic-bezier(.16, 1, .3, 1);
}
.pt-cajon.pt-visible { transform: none; }
.pt-cab { display: flex; gap: 14px; justify-content: space-between; align-items: flex-start; padding: 20px 22px 16px; background: #0b2a63; color: #fff; }
.pt-kicker { display: inline-block; font-size: 12.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: #ffd76a; }
.pt-tit { margin: 4px 0 6px; font-family: "Playfair Display", Georgia, serif; font-size: 28px; line-height: 1.15; color: #fff; }
.pt-sub { margin: 0; font-size: 14.5px; color: #dbe5f7; }
.pt-cerrar { flex: none; width: 38px; height: 38px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .45); background: rgba(255, 255, 255, .1); color: #fff; font-size: 18px; cursor: pointer; }
.pt-cerrar:hover, .pt-cerrar:focus-visible { background: #fff; color: #0b2a63; }
.pt-cuerpo { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 16px 18px 24px; display: grid; gap: 12px; align-content: start; }
.pt-ruta { background: #fff; border: 1px solid #dfe5f0; border-radius: 16px; overflow: hidden; }
.pt-ruta[open] { border-color: #0b2a63; box-shadow: 0 4px 16px rgba(11, 42, 99, .12); }
.pt-ruta > summary { list-style: none; cursor: pointer; display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; }
.pt-ruta > summary::-webkit-details-marker { display: none; }
.pt-ruta > summary::after { content: '▾'; margin-left: auto; color: #0b2a63; font-size: 18px; transition: transform .2s; }
.pt-ruta[open] > summary::after { transform: rotate(180deg); }
.pt-ruta > summary:hover, .pt-ruta > summary:focus-visible { background: #eef3fc; }
.pt-ico { flex: none; width: 34px; text-align: center; font-size: 26px; line-height: 1.1; }
.pt-sum { display: grid; gap: 2px; }
.pt-sum b { color: #0b2a63; font-size: 17px; }
.pt-sum span { font-size: 14px; color: #44526b; }
.pt-ruta-cuerpo { padding: 0 14px 14px; }
.pt-ruta-cuerpo .sv-form { border: 0; padding: 0; }
.pt-aviso { background: #fff3e0; color: #5a3a00; }
.pt-nota { margin: 12px 0 0; font-size: 14px; line-height: 1.55; color: #33415c; background: #eef7ef; border-radius: 10px; padding: 10px 12px; }
.pt-nota a, .pt-pie a { color: #1a56b8; font-weight: 600; }
.pt-pie { margin: 4px 2px 0; font-size: 14px; color: #44526b; }
.pt-accesos { display: flex; flex-wrap: wrap; gap: 10px; margin: 12px 0 0; }
.pt-accesos a.sz-btn { text-decoration: none; }
/* index.html no carga apartados.css: los botones del cajon, aqui. */
.pt-cajon .sz-btn { font: inherit; font-size: 14px; font-weight: 600; padding: 8px 13px; border-radius: 10px; border: 1px solid #c9d3e6; background: #fff; color: #0b2a63; cursor: pointer; text-decoration: none; }
.pt-cajon .sz-btn:hover, .pt-cajon .sz-btn:focus-visible { background: #eef3fc; border-color: #0b2a63; }
.pt-cajon .sz-btn-of { background: #0b2a63; color: #fff; border-color: #0b2a63; }
.pt-cajon .sz-btn-of:hover, .pt-cajon .sz-btn-of:focus-visible { background: #16408f; color: #fff; }
.pt-cajon .sz-btn:disabled { opacity: .55; cursor: not-allowed; }
.pt-cajon .sz-et { display: inline-block; margin-right: 6px; padding: 1px 9px; border-radius: 999px; background: #7a4b00; color: #fff; font-size: 11px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; vertical-align: 1px; }
.pt-cajon input, .pt-cajon select, .pt-cajon textarea { color-scheme: light; }
@media (max-width: 560px) {
  .pt-cab { padding: 16px 16px 14px; }
  .pt-tit { font-size: 24px; }
  .pt-cuerpo { padding: 12px 10px 20px; }
}
@media (prefers-reduced-motion: reduce) {
  .pt-cajon, .pt-velo { transition: none; }
}

/* Compartir y fe de erratas: en comunidad-*.html y, desde el 24-10-2026, tambien en el cajon. */
.cm-erratas { margin: 0; padding-left: 0; list-style: none; display: grid; gap: 12px; }
.cm-errata { display: grid; gap: 4px; padding: 0 0 12px; border-bottom: 1px solid #e6eaf2; line-height: 1.55; }
.cm-errata:last-child { border-bottom: 0; padding-bottom: 0; }
.cm-errata b { color: #0b2a63; font-size: 16px; }
.cm-errata-fecha { font-size: 12.5px; font-weight: 800; color: #5a6782; letter-spacing: .03em; }
.cm-errata-et { font-weight: 700; color: #5a6782; }
.cm-errata a { color: #1a56b8; font-weight: 600; }
.cm-compartir { background: #fff; border: 1px solid #dfe5f0; border-radius: 16px; padding: 16px 20px; display: grid; gap: 12px; line-height: 1.6; color: #24324d; }
.cm-compartir p { margin: 0; }
.cm-nota { font-size: 14px; color: #44526b; }
.pt-ruta-cuerpo .cm-compartir { border: 0; padding: 0; }
/* Con cinco rutas el cuerpo se llena: que ninguna se aplaste al abrir otra. */
.pt-cuerpo { grid-auto-rows: max-content; }
