/* ==========================================================================
   SENDERO · AVISOS
   Sistema visual del módulo editorial: listado, artículo, adjuntos, consulta
   vecinal y mesa de redacción.

   Carga SIEMPRE después de /css/app.css. No redefine la marca ni los
   componentes base (botones, campos, sidebar, topbar, avatares): solo añade
   la capa editorial del módulo y reutiliza los tokens existentes.

   Referencias: public/css/app.css · docs/MARCA.md · docs/DISENO-AVISOS.md
   ========================================================================== */

/* --------------------------------------------------------------------------
   0. Puente de tokens
   Mismos nombres y valores que app.css. Existe para que una maqueta aislada
   (design/avisos/preview.html) pueda abrirse sin el resto del shell; al
   cargarse después de app.css es un no-op. No es una segunda paleta.
   -------------------------------------------------------------------------- */
:root {
  --navy: #0c1d2e;
  --navy-800: #12293d;
  --navy-700: #1a3850;
  --navy-600: #24506f;
  --gold: #a9824a;
  --gold-600: #8f6b38;
  --gold-200: #e9d9bb;
  --gold-100: #f5ecdb;
  --paper: #f3f0e9;
  --surface: #ffffff;
  --surface-2: #faf8f3;
  --surface-3: #f0ece3;
  --line: #e5dfd3;
  --line-strong: #d3cbba;
  --ink: #16202a;
  --ink-2: #2c3946;
  --muted: #5f6c77;
  --muted-2: #87929b;
  --ok: #1d6b4b;
  --ok-bg: #e7f2ec;
  --warn: #97620f;
  --warn-bg: #fbf0da;
  --info: #2b5b8a;
  --info-bg: #e8f0f8;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --display: 'Archivo', 'Inter', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, monospace;
  --r-sm: 8px;
  --r: 12px;
  --r-lg: 16px;
  --r-xl: 22px;
  --shadow-1: 0 1px 2px rgba(22, 32, 42, .05), 0 1px 1px rgba(22, 32, 42, .03);
  --shadow-2: 0 4px 16px -4px rgba(22, 32, 42, .12), 0 1px 3px rgba(22, 32, 42, .06);
  --topbar-h: 62px;
}

/* --------------------------------------------------------------------------
   1. Raíz del módulo
   Medidas locales (no son color): rail de la publicación, ritmo y radios.
   -------------------------------------------------------------------------- */
.avisos-page,
.article,
.editor-shell {
  --av-rail: 320px;
  --av-gap: 32px;
  --av-radius: 16px;
  --av-kicker: 9.5px;
  --av-rule: rgba(169, 130, 74, .34);
  min-width: 0;
}

/* Kicker editorial reutilizado en listado, artículo y related. */
.aviso-kicker {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  font-family: var(--sans);
  font-size: var(--av-kicker);
  font-weight: 650;
  line-height: 1.2;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--gold-600);
}
.aviso-kicker::before {
  content: '';
  width: 5px;
  height: 5px;
  flex: none;
  border-radius: 1px;
  background: currentColor;
}
.aviso-kicker .sep {
  color: var(--line-strong);
  font-weight: 400;
}
.aviso-kicker .is-muted {
  color: var(--muted);
}

/* Etiqueta sobre portada. Sin rojo: el rojo está reservado a pánico. */
.aviso-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid rgba(233, 217, 187, .34);
  background: rgba(10, 25, 40, .62);
  color: #f4efe4;
  font-family: var(--sans);
  font-size: 9.5px;
  font-weight: 650;
  letter-spacing: .1em;
  line-height: 1.4;
  text-transform: uppercase;
  white-space: nowrap;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.aviso-tag svg { width: 11px; height: 11px; }
.aviso-tag--fixed {
  background: var(--gold-200);
  border-color: var(--gold-200);
  color: var(--navy);
}
.aviso-tag--priority {
  background: var(--navy);
  border-color: rgba(233, 217, 187, .4);
  color: var(--gold-200);
}
.aviso-tag--draft {
  background: var(--surface-3);
  border-color: var(--line-strong);
  color: var(--muted);
}

/* Enlace de sección con flecha. */
.aviso-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 600;
  color: var(--navy-600);
  white-space: nowrap;
}
.aviso-link svg { width: 14px; height: 14px; transition: transform .16s ease; }
.aviso-link:hover { color: var(--navy); }
.aviso-link:hover svg { transform: translateX(2px); }

/* --------------------------------------------------------------------------
   2. Cabecera de la publicación (.avisos-hero)
   Regla de periódico arriba, edición a la derecha, cifras al pie.
   -------------------------------------------------------------------------- */
.avisos-hero {
  position: relative;
  border-top: 2px solid var(--navy);
  border-bottom: 1px solid var(--line);
  padding: 15px 0 14px;
  margin-bottom: 0;
}
.avisos-hero-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}
.avisos-hero-top .eyebrow {
  font-size: 10px;
  letter-spacing: .17em;
  color: var(--navy-700);
}
.avisos-edition {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: .02em;
  color: var(--gold-600);
  white-space: nowrap;
}
.avisos-edition .dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--gold);
}
.avisos-hero-main {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 26px;
  margin-top: 7px;
}
.avisos-hero-title {
  font-family: var(--display);
  font-size: 44px;
  font-weight: 600;
  line-height: .98;
  letter-spacing: -.038em;
  color: var(--navy);
}
.avisos-hero-dek {
  max-width: 66ch;
  margin-top: 7px;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--muted);
}
.avisos-hero-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: none;
  padding-bottom: 2px;
}
.avisos-hero-stats {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 12px;
  font-size: 11.5px;
  color: var(--muted);
}
.avisos-stat {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  white-space: nowrap;
}
.avisos-stat strong {
  font-family: var(--mono);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--navy);
  letter-spacing: -.02em;
}
.avisos-stats-rule {
  width: 1px;
  height: 11px;
  background: var(--line-strong);
}
.avisos-updated {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--muted-2);
}
.avisos-updated .live-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 3px rgba(29, 107, 75, .1);
}

/* --------------------------------------------------------------------------
   3. Barra de búsqueda y filtros (.avisos-toolbar)
   -------------------------------------------------------------------------- */
.avisos-toolbar {
  position: sticky;
  top: var(--topbar-h);
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 14px 0 18px;
  padding: 9px 10px;
  background: rgba(255, 255, 255, .92);
  border: 1px solid var(--line);
  border-radius: 12px;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.avisos-buscador {
  position: relative;
  flex: 1 1 240px;
  max-width: 330px;
  min-width: 0;
}
.avisos-buscador > svg {
  position: absolute;
  left: 11px;
  top: 50%;
  width: 15px;
  height: 15px;
  transform: translateY(-50%);
  color: var(--muted-2);
  pointer-events: none;
}
.avisos-buscador .input {
  height: 34px;
  padding-left: 32px;
  padding-right: 42px;
  font-size: 12.5px;
  background: var(--surface-2);
  border-color: transparent;
}
.avisos-buscador .input:focus { background: var(--surface); }
.avisos-kbd {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  padding: 1px 5px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface);
  font-family: var(--mono);
  font-size: 9.5px;
  color: var(--muted-2);
  pointer-events: none;
}
.avisos-filtros {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-wrap: wrap;
  min-width: 0;
}
.aviso-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 10px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 550;
  line-height: 1;
  cursor: pointer;
  white-space: nowrap;
  transition: background .14s, color .14s, border-color .14s;
}
.aviso-chip:hover { background: var(--surface-3); color: var(--ink-2); }
.aviso-chip.is-active {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
}
.aviso-chip .chip-count {
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 500;
  color: var(--muted-2);
}
.aviso-chip.is-active .chip-count { color: rgba(233, 217, 187, .82); }
.aviso-chip .chip-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--gold);
}
.avisos-toolbar .select {
  height: 32px;
  width: auto;
  min-width: 128px;
  padding: 0 30px 0 10px;
  border-color: transparent;
  background-color: var(--surface-2);
  font-size: 12px;
  background-position: right 10px center;
}
.avisos-toolbar-spacer { flex: 1 1 0; min-width: 0; }
.avisos-count {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--muted-2);
  white-space: nowrap;
}
.avisos-toolbar-end {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

/* --------------------------------------------------------------------------
   4. Retícula de la publicación: columna principal + rail de consulta
   -------------------------------------------------------------------------- */
.avisos-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--av-rail);
  gap: var(--av-gap);
  align-items: start;
}
.avisos-main { min-width: 0; }
.avisos-aside {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* --------------------------------------------------------------------------
   5. Destacado (.avisos-feature)
   Portada 16:9 + gradiente, categoría sobre imagen, titular grande.
   -------------------------------------------------------------------------- */
.avisos-feature {
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(0, 1fr);
  align-items: stretch;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--av-radius);
  overflow: hidden;
  box-shadow: var(--shadow-1);
  min-width: 0;
  transition: border-color .16s ease, box-shadow .16s ease;
}
.avisos-feature:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-2);
}
.avisos-feature .aviso-cover {
  min-height: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 0;
}
.avisos-feature .aviso-cover::after {
  background:
    linear-gradient(180deg, rgba(9, 22, 35, .04) 0%, rgba(9, 22, 35, .02) 45%, rgba(9, 22, 35, .62) 100%),
    radial-gradient(90% 70% at 70% 40%, rgba(169, 130, 74, .22), transparent 70%);
}
.avisos-feature .aviso-cover .cover-tags {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 12px;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.avisos-feature-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  padding: 20px 22px 18px;
}
.avisos-feature .aviso-kicker { margin-bottom: 9px; }
.avisos-feature-title {
  margin: 0;
  font-family: var(--display);
  font-size: 27px;
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -.028em;
  color: var(--navy);
}
.avisos-feature-title a:hover { color: var(--navy-600); }
.avisos-feature-excerpt {
  margin-top: 10px;
  font-size: 13px;
  line-height: 1.58;
  color: var(--ink-2);
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.avisos-feature-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 14px;
  padding-top: 0;
}
.avisos-feature .aviso-meta { margin-top: 0; }

/* --------------------------------------------------------------------------
   6. Portadas ilustradas
   Todas son SVG duotono navy/latón; la clase fija el fondo y el encuadre.
   -------------------------------------------------------------------------- */
.aviso-cover {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 12px;
  background:
    radial-gradient(120% 120% at 78% 12%, rgba(169, 130, 74, .3), transparent 58%),
    linear-gradient(160deg, #12293d 0%, #0c1d2e 58%, #071523 100%);
  isolation: isolate;
}
.aviso-cover::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, transparent 52%, rgba(8, 20, 32, .34) 100%);
}
.aviso-cover .cover-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.aviso-cover .cover-tags {
  position: absolute;
  z-index: 2;
  left: 10px;
  right: 10px;
  top: 10px;
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  pointer-events: none;
}
.aviso-cover .cover-tags--bottom {
  top: auto;
  bottom: 9px;
}
.aviso-cover .cover-initials {
  position: absolute;
  z-index: 2;
  right: 12px;
  bottom: 10px;
  font-family: var(--display);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .2em;
  color: rgba(233, 217, 187, .62);
  text-transform: uppercase;
}
.aviso-cover--wire::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  opacity: .25;
  background-image: repeating-linear-gradient(135deg, rgba(255, 255, 255, .08) 0 1px, transparent 1px 9px);
  pointer-events: none;
}

/* --------------------------------------------------------------------------
   7. Rejilla y tarjetas de aviso (.avisos-grid / .aviso-card)
   Densas pero con aire: portada 16:9, cuerpo de 4 piezas, meta al pie.
   -------------------------------------------------------------------------- */
.avisos-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 16px;
}
.aviso-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  transition: border-color .16s ease, transform .16s ease, box-shadow .16s ease;
}
.aviso-card:hover {
  border-color: var(--line-strong);
  transform: translateY(-2px);
  box-shadow: var(--shadow-2);
}
.aviso-card.is-unread { box-shadow: inset 2px 0 0 var(--gold); }
.aviso-card.is-unread:hover { box-shadow: inset 2px 0 0 var(--gold), var(--shadow-2); }
.aviso-card .aviso-cover { border-radius: 0; }
.aviso-card-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
  padding: 13px 14px 12px;
}
.aviso-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}
.aviso-unread {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--gold-600);
  white-space: nowrap;
}
.aviso-unread::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--gold);
}
.aviso-title {
  margin-top: 7px;
  font-family: var(--display);
  font-size: 17px;
  font-weight: 600;
  line-height: 1.22;
  letter-spacing: -.022em;
  color: var(--navy);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.aviso-card:hover .aviso-title { color: var(--navy-600); }
.aviso-excerpt {
  margin-top: 6px;
  font-size: 12.2px;
  line-height: 1.52;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.aviso-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  min-width: 0;
  font-size: 10.5px;
  line-height: 1.4;
  color: var(--muted);
}
.aviso-meta .meta-author {
  font-weight: 600;
  color: var(--ink-2);
  white-space: nowrap;
}
.aviso-meta .meta-dot {
  width: 2px;
  height: 2px;
  flex: none;
  border-radius: 50%;
  background: var(--line-strong);
}
.aviso-meta .meta-date {
  font-family: var(--mono);
  font-size: 10px;
  white-space: nowrap;
}
.aviso-meta .meta-read {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--muted);
  white-space: nowrap;
}
.aviso-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
  padding-top: 10px;
}
.aviso-card-foot .aviso-meta { gap: 5px; }
.aviso-card-arrow {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  flex: none;
  border-radius: 50%;
  color: var(--muted-2);
  transition: background .14s, color .14s;
}
.aviso-card-arrow svg { width: 13px; height: 13px; }
.aviso-card:hover .aviso-card-arrow {
  background: var(--gold-100);
  color: var(--gold-600);
}

/* --------------------------------------------------------------------------
   8. Rail: piezas auxiliares de la publicación
   -------------------------------------------------------------------------- */
.avisos-rail-card {
  min-width: 0;
  padding: 14px 16px 15px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
}
.avisos-rail-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.avisos-rail-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  font-weight: 650;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
}
.avisos-rail-title svg { width: 13px; height: 13px; color: var(--gold-600); }
.avisos-rail-link {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--navy-600);
  white-space: nowrap;
}
.avisos-rail-link:hover { text-decoration: underline; }

/* Ficha breve del comité al pie del rail. */
.comite-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-2);
}
.comite-card .avatar {
  width: 32px;
  height: 32px;
  font-size: 10.5px;
  background: var(--gold-100);
  color: var(--gold-600);
}
.comite-card .comite-main { min-width: 0; flex: 1; }
.comite-card .comite-name {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.comite-card .comite-role {
  margin-top: 1px;
  font-size: 10px;
  color: var(--muted);
}
.comite-card .comite-action {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex: none;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--navy-700);
}
.comite-card .comite-action svg { width: 14px; height: 14px; }
.comite-card .comite-action:hover { border-color: var(--navy-600); color: var(--navy); }

/* --------------------------------------------------------------------------
   9. Adjuntos (.attachment-list / .attachment)
   Sin rojo: el tipo de archivo se indica con forma + etiqueta, no con color.
   -------------------------------------------------------------------------- */
.attachment-list {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.attachment {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
  min-width: 0;
  border-top: 1px solid var(--line);
  color: inherit;
}
.attachment:first-child { border-top: 0; padding-top: 2px; }
.attachment:last-child { padding-bottom: 2px; }
.attachment:hover .attachment-name { color: var(--navy-600); }
.attachment-icon {
  position: relative;
  display: grid;
  place-items: center;
  width: 32px;
  height: 38px;
  flex: none;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  background: var(--surface-2);
  color: var(--navy-700);
}
.attachment-icon::after {
  content: '';
  position: absolute;
  top: -1px;
  right: -1px;
  width: 8px;
  height: 8px;
  border-left: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
  background: var(--surface);
  border-radius: 0 4px 0 2px;
}
.attachment-icon svg { width: 14px; height: 14px; }
.attachment-icon .ext {
  position: absolute;
  bottom: 2px;
  left: 0;
  right: 0;
  font-family: var(--mono);
  font-size: 6.5px;
  font-weight: 600;
  letter-spacing: .04em;
  text-align: center;
  color: var(--muted);
}
.attachment-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.attachment-name {
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.attachment-meta {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
  font-family: var(--mono);
  font-size: 9.5px;
  line-height: 1.3;
  color: var(--muted);
}
.attachment-meta .meta-dot {
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: var(--line-strong);
}
.attachment-action {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  flex: none;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: var(--muted-2);
  cursor: pointer;
}
.attachment-action svg { width: 14px; height: 14px; }
.attachment:hover .attachment-action { border-color: var(--line); background: var(--surface-2); color: var(--navy-700); }

/* Vista de documento: miniatura de la primera página + datos. */
.attachment--feature {
  grid-template-columns: 62px minmax(0, 1fr) auto;
  align-items: start;
  gap: 11px;
  padding: 10px 0;
}
.attachment-preview {
  position: relative;
  display: block;
  width: 62px;
  height: 82px;
  flex: none;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: #fff;
  overflow: hidden;
  box-shadow: 0 2px 6px -2px rgba(22, 32, 42, .22);
}
.attachment-preview::before {
  content: '';
  position: absolute;
  inset: 6px 7px auto;
  height: 22px;
  background:
    repeating-linear-gradient(180deg, var(--line) 0 1.5px, transparent 1.5px 5px);
}
.attachment-preview::after {
  content: 'PDF';
  position: absolute;
  left: 7px;
  bottom: 5px;
  font-family: var(--mono);
  font-size: 7px;
  font-weight: 700;
  letter-spacing: .06em;
  color: var(--gold-600);
}
.attachment-preview .preview-rule {
  position: absolute;
  left: 7px;
  right: 7px;
  height: 1px;
  background: var(--line);
}
.attachment-preview .preview-rule:nth-child(1) { top: 34px; }
.attachment-preview .preview-rule:nth-child(2) { top: 40px; }
.attachment-preview .preview-rule:nth-child(3) { top: 46px; width: 60%; }
.attachment--feature .attachment-body { padding-top: 1px; }
.attachment--feature .attachment-name { white-space: normal; font-size: 12.5px; }
.attachment--feature .attachment-meta { font-size: 10px; }
.attachment--feature .attachment-action { margin-top: 2px; }

/* --------------------------------------------------------------------------
   10. Consulta vecinal (.poll-card)
   Barra como relleno de la opción: se lee el porcentaje sin tapar el texto.
   -------------------------------------------------------------------------- */
.poll-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 15px 16px 13px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
}
.poll-card::before {
  content: '';
  position: absolute;
  left: 16px;
  right: 16px;
  top: 0;
  height: 2px;
  border-radius: 0 0 2px 2px;
  background: linear-gradient(90deg, var(--gold), var(--gold-200));
}
.poll-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 3px;
}
.poll-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 9.5px;
  font-weight: 650;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--gold-600);
}
.poll-eyebrow svg { width: 12px; height: 12px; }
.poll-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2.5px 7px;
  border-radius: 999px;
  background: var(--gold-100);
  color: var(--gold-600);
  font-size: 9.5px;
  font-weight: 650;
  letter-spacing: .06em;
  text-transform: uppercase;
  white-space: nowrap;
}
.poll-badge svg { width: 10px; height: 10px; }
.poll-badge--voted { background: var(--ok-bg); color: var(--ok); }
.poll-badge--closed { background: var(--surface-3); color: var(--muted); }
.poll-question {
  margin-top: 8px;
  font-family: var(--display);
  font-size: 18.5px;
  font-weight: 600;
  line-height: 1.18;
  letter-spacing: -.024em;
  color: var(--navy);
}
.poll-desc {
  margin-top: 5px;
  font-size: 10.8px;
  line-height: 1.45;
  color: var(--muted);
}
.poll-options {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-top: 11px;
}
.poll-option {
  position: relative;
  display: grid;
  grid-template-columns: 15px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  cursor: pointer;
  overflow: hidden;
  transition: border-color .14s ease, background .14s ease;
}
.poll-option:hover { border-color: var(--line-strong); background: var(--surface-2); }
.poll-option > * { position: relative; z-index: 1; }
.poll-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.poll-mark {
  position: relative;
  width: 15px;
  height: 15px;
  flex: none;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: var(--surface);
  transition: border-color .14s, background .14s;
}
.poll-mark::after {
  content: '';
  position: absolute;
  left: 4px;
  top: 4px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--gold-200);
  opacity: 0;
  transform: scale(.6);
  transition: opacity .14s, transform .14s;
}
.poll-label {
  font-size: 11.5px;
  line-height: 1.32;
  color: var(--ink-2);
  min-width: 0;
}
.poll-result {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: -.02em;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.poll-bar {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  z-index: 0;
  width: var(--pct, 0%);
  background: rgba(26, 56, 80, .07);
  border-right: 1px solid rgba(26, 56, 80, .1);
  pointer-events: none;
  transition: width .5s ease;
}
.poll-option.is-selected {
  border-color: var(--navy-700);
  background: var(--surface);
}
.poll-option.is-selected .poll-mark {
  border-color: var(--navy);
  background: var(--navy);
}
.poll-option.is-selected .poll-mark::after {
  opacity: 1;
  transform: none;
  background: var(--gold-200);
}
.poll-option.is-selected .poll-label { font-weight: 600; color: var(--navy); }
.poll-option.is-selected .poll-bar {
  background: linear-gradient(90deg, rgba(169, 130, 74, .3), rgba(169, 130, 74, .12));
  border-right-color: rgba(169, 130, 74, .42);
}
.poll-option.is-selected .poll-result { color: var(--gold-600); font-weight: 600; }
.poll-option:has(.poll-input:checked) { border-color: var(--navy-700); }
.poll-option:has(.poll-input:checked) .poll-mark { border-color: var(--navy); background: var(--navy); }
.poll-option:has(.poll-input:checked) .poll-mark::after { opacity: 1; transform: none; background: var(--gold-200); }
.poll-option:has(.poll-input:checked) .poll-label { font-weight: 600; color: var(--navy); }
.poll-option:has(.poll-input:checked) .poll-bar {
  background: linear-gradient(90deg, rgba(169, 130, 74, .3), rgba(169, 130, 74, .12));
  border-right-color: rgba(169, 130, 74, .42);
}
.poll-option:has(.poll-input:checked) .poll-result { color: var(--gold-600); font-weight: 600; }
.poll-input:focus-visible ~ .poll-mark {
  outline: 2px solid var(--navy-600);
  outline-offset: 2px;
}
.poll-actions { margin-top: 10px; }
.poll-actions .btn { height: 32px; font-size: 12px; border-radius: 7px; }
.poll-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
  padding-top: 9px;
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 9.5px;
  line-height: 1.4;
  color: var(--muted);
}
.poll-meta strong { color: var(--ink-2); font-weight: 600; }
.poll-meta .meta-note {
  font-family: var(--sans);
  font-size: 9.5px;
  color: var(--muted);
}
.poll-note {
  margin-top: 8px;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-2);
  font-size: 10px;
  line-height: 1.4;
  color: var(--muted);
}
.poll-note--voted { background: var(--ok-bg); border-color: transparent; color: var(--ok); }
.poll-note--closed { background: var(--surface-3); border-color: transparent; color: var(--muted); }
.poll-closed {
  background: var(--surface-2);
  border-color: var(--line);
}
.poll-closed::before { background: var(--line-strong); }
.poll-closed .poll-option {
  cursor: default;
  background: transparent;
}
.poll-closed .poll-option:hover { border-color: var(--line); background: transparent; }
.poll-closed .poll-bar { background: rgba(26, 56, 80, .05); }
.poll-closed .poll-question { color: var(--ink-2); }
.poll-closed .poll-result { color: var(--muted); }
.poll-closed .poll-option.is-selected {
  border-color: var(--navy-700);
  background: var(--surface);
}
.poll-closed .poll-option.is-selected .poll-bar {
  background: linear-gradient(90deg, rgba(26, 56, 80, .1), rgba(26, 56, 80, .04));
  border-right-color: rgba(26, 56, 80, .2);
}
.poll-closed .poll-option.is-selected .poll-result { color: var(--navy); }
.poll-closed .poll-mark { border-color: var(--line-strong); background: var(--surface-3); }
.poll-closed .poll-option.is-selected .poll-mark { background: var(--navy-700); border-color: var(--navy-700); }

/* --------------------------------------------------------------------------
   11. Artículo (.article)
   Cabecera de revista, cuerpo de 720 px y rail de 320 px.
   -------------------------------------------------------------------------- */
.article { min-width: 0; }
.article-head {
  max-width: 900px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}
.article-kicker {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.article-kicker .aviso-kicker { font-size: 10px; }
.article-kicker .aviso-tag {
  background: var(--gold-100);
  border-color: var(--gold-200);
  color: var(--gold-600);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
.article-title {
  max-width: 20ch;
  margin-top: 11px;
  font-family: var(--display);
  font-size: 46px;
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -.038em;
  color: var(--navy);
  text-wrap: balance;
}
.article-dek {
  max-width: 64ch;
  margin-top: 12px;
  font-size: 16.5px;
  line-height: 1.5;
  color: var(--ink-2);
}
.article-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 17px;
  font-size: 11px;
  color: var(--muted);
}
.article-meta .avatar {
  width: 30px;
  height: 30px;
  font-size: 10px;
  background: var(--navy);
  color: var(--gold-200);
}
.article-meta .meta-name {
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.25;
  color: var(--ink);
}
.article-meta .meta-sub {
  display: block;
  margin-top: 1px;
  font-size: 9.5px;
  font-weight: 400;
  letter-spacing: .02em;
  color: var(--muted-2);
}
.article-meta .meta-sep { color: var(--line-strong); }
.article-meta .meta-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--muted);
  white-space: nowrap;
}
.article-meta .meta-item svg { width: 12px; height: 12px; }
.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 720px) var(--av-rail);
  gap: 48px;
  justify-content: space-between;
  align-items: start;
  margin-top: 24px;
}
.article-body { min-width: 0; }
.article-cover {
  position: relative;
  margin: 0 0 10px;
  background: transparent;
}
.article-cover .aviso-cover {
  border-radius: var(--av-radius);
  overflow: hidden;
  box-shadow: var(--shadow-1);
}
.article-cover .cover-tags { top: auto; bottom: 12px; left: 14px; }
.article-cover figcaption {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 2px 0;
  font-size: 10.5px;
  line-height: 1.4;
  color: var(--muted);
}
.article-cover figcaption .credit {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .06em;
  text-transform: uppercase;
  white-space: nowrap;
}

/* Rail del artículo */
.article-aside {
  position: sticky;
  top: calc(var(--topbar-h) + 18px);
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}
.article-aside .avisos-rail-card { padding: 14px 15px 15px; }
.article-aside .avisos-rail-title { font-size: 10px; }

/* Compartir */
.article-share {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
}
.article-share-label {
  font-size: 9.5px;
  font-weight: 650;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-right: 2px;
}
.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 28px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  font-family: var(--sans);
  font-size: 10.5px;
  font-weight: 550;
  color: var(--ink-2);
  cursor: pointer;
  white-space: nowrap;
}
.share-btn svg { width: 13px; height: 13px; color: var(--muted); }
.share-btn:hover { border-color: var(--line-strong); background: var(--surface-2); color: var(--navy); }
.share-btn:hover svg { color: var(--navy-600); }
.share-btn--icon { width: 28px; padding: 0; justify-content: center; }
.share-btn.is-done { border-color: var(--ok); color: var(--ok); }
.share-btn.is-done svg { color: var(--ok); }

/* --------------------------------------------------------------------------
   12. Prosa del aviso (.article-body / .prose)
   Medida cómoda: 720 px, 16.5 px, interlínea 1.7.
   -------------------------------------------------------------------------- */
.prose {
  max-width: 720px;
  font-family: var(--sans);
  font-size: 16.5px;
  line-height: 1.7;
  color: var(--ink-2);
  text-wrap: pretty;
}
.prose > p { margin: 0 0 18px; }
.prose > p:last-child { margin-bottom: 0; }
.prose .lead {
  font-size: 18px;
  line-height: 1.62;
  color: var(--ink);
}
.prose .lead::first-letter {
  float: left;
  margin: 5px 7px 0 0;
  font-family: var(--display);
  font-size: 52px;
  font-weight: 600;
  line-height: .82;
  color: var(--navy);
}
.prose h2 {
  margin: 34px 0 10px;
  font-family: var(--display);
  font-size: 25px;
  font-weight: 600;
  line-height: 1.16;
  letter-spacing: -.028em;
  color: var(--navy);
}
.prose h3 {
  margin: 26px 0 8px;
  font-family: var(--display);
  font-size: 19px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -.018em;
  color: var(--navy);
}
.prose h2 + p,
.prose h3 + p { margin-top: 0; }
.prose strong { font-weight: 650; color: var(--ink); }
.prose em { font-style: italic; }
.prose a {
  color: var(--navy-600);
  font-weight: 550;
  text-decoration: underline;
  text-decoration-color: var(--gold);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.prose a:hover { color: var(--navy); text-decoration-color: var(--navy); }
.prose ul,
.prose ol {
  margin: 6px 0 20px;
  padding-left: 22px;
}
.prose ul { list-style: none; padding-left: 18px; }
.prose ul > li {
  position: relative;
  margin-bottom: 7px;
  padding-left: 8px;
}
.prose ul > li::before {
  content: '';
  position: absolute;
  left: -10px;
  top: .72em;
  width: 5px;
  height: 5px;
  border-radius: 1px;
  background: var(--gold);
}
.prose ol { list-style: none; counter-reset: aviso; padding-left: 26px; }
.prose ol > li {
  position: relative;
  margin-bottom: 8px;
  counter-increment: aviso;
}
.prose ol > li::before {
  content: counter(aviso) ".";
  position: absolute;
  left: -24px;
  top: 0;
  width: 20px;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.95;
  color: var(--gold-600);
  text-align: right;
}
.prose li > ul,
.prose li > ol { margin-top: 6px; margin-bottom: 2px; }
.prose blockquote {
  margin: 26px 0;
  padding: 4px 0 4px 22px;
  border-left: 2px solid var(--gold);
  font-family: var(--display);
  font-size: 20px;
  font-weight: 500;
  line-height: 1.42;
  letter-spacing: -.015em;
  color: var(--navy);
}
.prose blockquote p { margin: 0 0 10px; }
.prose blockquote cite {
  display: block;
  font-family: var(--sans);
  font-size: 10px;
  font-style: normal;
  font-weight: 600;
  letter-spacing: .1em;
  line-height: 1.4;
  text-transform: uppercase;
  color: var(--muted);
}
.prose figure { margin: 26px 0; }
.prose figure img,
.prose figure svg { border-radius: 10px; }
.prose figcaption {
  margin-top: 7px;
  font-size: 10.5px;
  line-height: 1.45;
  color: var(--muted-2);
}
.prose hr {
  margin: 34px 0;
  border: 0;
  border-top: 1px solid var(--line);
}
.prose code {
  padding: 1px 5px;
  border-radius: 4px;
  background: var(--surface-3);
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--navy-700);
}
.prose pre {
  margin: 22px 0;
  padding: 15px 17px;
  border-radius: 10px;
  background: var(--navy);
  color: #e9eef3;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.65;
  overflow-x: auto;
}
.prose pre code { padding: 0; background: none; color: inherit; font-size: inherit; }
.prose .table-scroll {
  margin: 8px 0 24px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  line-height: 1.45;
}
.prose table caption {
  caption-side: top;
  padding: 9px 12px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
  font-size: 9.5px;
  font-weight: 650;
  letter-spacing: .1em;
  text-align: left;
  text-transform: uppercase;
  color: var(--muted);
}
.prose th {
  padding: 8px 12px;
  border-bottom: 1px solid var(--line-strong);
  background: var(--surface-2);
  font-size: 9.5px;
  font-weight: 650;
  letter-spacing: .08em;
  text-align: left;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}
.prose td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.prose tbody tr:last-child td { border-bottom: 0; }
.prose td.num,
.prose th.num {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  text-align: right;
  white-space: nowrap;
}
.prose tr.is-total td {
  border-top: 1px solid var(--line-strong);
  background: var(--surface-2);
  font-weight: 650;
  color: var(--navy);
}
.prose .note {
  margin: 24px 0;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-left: 2px solid var(--gold);
  border-radius: 0 8px 8px 0;
  background: var(--surface-2);
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--muted);
}
.prose .note strong { color: var(--ink); }

/* Avisos relacionados */
.related {
  margin-top: 38px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.related-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.related-title {
  font-family: var(--display);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -.02em;
  color: var(--navy);
}
.related-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.related-card {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-width: 0;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface);
  transition: border-color .14s ease, background .14s ease;
}
.related-card:hover { border-color: var(--line-strong); background: var(--surface-2); }
.related-cover {
  position: relative;
  display: block;
  width: 74px;
  height: 58px;
  border-radius: 7px;
  overflow: hidden;
  background: var(--navy);
}
.related-cover svg { width: 100%; height: 100%; }
.related-body { min-width: 0; }
.related-body .aviso-kicker { font-size: 8.5px; letter-spacing: .11em; }
.related-body .aviso-kicker::before { width: 4px; height: 4px; }
.related-card-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-top: 4px;
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--navy);
}
.related-card:hover .related-card-title { color: var(--navy-600); }
.related-card-meta {
  margin-top: 3px;
  font-family: var(--mono);
  font-size: 9px;
  color: var(--muted);
}

/* --------------------------------------------------------------------------
   13. Mesa de redacción (.editor-*)
   Herramienta de trabajo: cabecera de documento, toolbar pegada, papel claro,
   panel de publicación y adjuntos a la derecha.
   -------------------------------------------------------------------------- */
.editor-shell {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow-1);
}
.editor-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  padding: 18px 22px 15px;
  border-bottom: 1px solid var(--line);
}
.editor-head-main { min-width: 0; }
.editor-head .eyebrow { font-size: 9.5px; color: var(--gold-600); }
.editor-title {
  margin-top: 4px;
  font-family: var(--display);
  font-size: 24px;
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -.03em;
  color: var(--navy);
}
.editor-sub {
  margin-top: 4px;
  font-size: 11.5px;
  line-height: 1.45;
  color: var(--muted);
}
.editor-head-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.editor-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-right: 4px;
  font-family: var(--mono);
  font-size: 9.5px;
  color: var(--muted-2);
  white-space: nowrap;
}
.editor-status .dot-ok {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--ok);
}
.editor-tabs {
  display: flex;
  align-items: stretch;
  gap: 2px;
  padding: 0 16px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  overflow-x: auto;
  scrollbar-width: none;
}
.editor-tabs::-webkit-scrollbar { display: none; }
.editor-tab {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 11px 11px 10px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 550;
  color: var(--muted);
  white-space: nowrap;
  cursor: pointer;
}
.editor-tab svg { width: 14px; height: 14px; flex: none; opacity: .75; }
.editor-tab:hover { color: var(--ink); }
.editor-tab.is-active {
  border-bottom-color: var(--navy);
  color: var(--navy);
  font-weight: 600;
}
.editor-tab.is-active svg { opacity: 1; color: var(--gold-600); }
.editor-tab .tab-count {
  padding: 0 5px;
  border-radius: 4px;
  background: var(--surface-3);
  font-family: var(--mono);
  font-size: 9px;
  line-height: 15px;
  color: var(--muted);
}
.editor-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 342px;
  align-items: stretch;
  min-width: 0;
}
.editor-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  border-right: 1px solid var(--line);
}
.editor-toolbar {
  position: sticky;
  top: var(--topbar-h);
  z-index: 18;
  display: flex;
  align-items: center;
  gap: 2px;
  flex-wrap: wrap;
  padding: 6px 10px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, .95);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.tool-btn {
  display: inline-grid;
  place-items: center;
  min-width: 28px;
  height: 28px;
  padding: 0 6px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  font-family: var(--sans);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink-2);
  cursor: pointer;
}
.tool-btn svg { width: 14px; height: 14px; flex: none; }
.tool-btn:hover { background: var(--surface-3); }
.tool-btn.is-active { background: var(--surface-3); border-color: var(--line); }
.tool-btn .tb-h2 { font-size: 10.5px; letter-spacing: -.02em; }
.tool-sep {
  width: 1px;
  height: 16px;
  margin: 0 4px;
  background: var(--line);
}
.toolbar-spacer { flex: 1 1 0; }
.toolbar-mode {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--mono);
  font-size: 9px;
  color: var(--muted-2);
  white-space: nowrap;
}
.toolbar-mode .dot-ok { width: 4px; height: 4px; border-radius: 50%; background: var(--ok); }
.editor-content {
  flex: 1 1 auto;
  min-height: 468px;
  padding: 24px 34px 18px;
  background: var(--surface);
}
.editor-title-input {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  font-family: var(--display);
  font-size: 31px;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -.032em;
  color: var(--navy);
}
.editor-title-input::placeholder { color: var(--line-strong); }
.editor-title-input:focus { outline: none; }
.editor-dek-input {
  display: block;
  width: 100%;
  margin-top: 8px;
  padding: 0;
  border: 0;
  background: transparent;
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.5;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.editor-dek-input:focus { outline: none; }
.editor-body {
  margin-top: 20px;
  max-width: 640px;
  min-height: 280px;
  font-size: 15px;
  line-height: 1.7;
  color: var(--ink-2);
  outline: none;
}
.editor-body p { margin: 0 0 14px; }
.editor-body h2 {
  margin: 22px 0 8px;
  font-family: var(--display);
  font-size: 19px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -.02em;
  color: var(--navy);
}
.editor-body h3 {
  margin: 18px 0 6px;
  font-family: var(--display);
  font-size: 15px;
  font-weight: 600;
  color: var(--navy);
}
.editor-body ul { list-style: none; padding-left: 16px; margin: 0 0 14px; }
.editor-body ul li { position: relative; margin-bottom: 5px; }
.editor-body ul li::before {
  content: '';
  position: absolute;
  left: -10px;
  top: .72em;
  width: 4px;
  height: 4px;
  border-radius: 1px;
  background: var(--gold);
}
.editor-body blockquote {
  margin: 16px 0;
  padding-left: 14px;
  border-left: 2px solid var(--gold);
  font-family: var(--display);
  font-size: 15.5px;
  line-height: 1.45;
  color: var(--navy);
}
.editor-body a {
  color: var(--navy-600);
  text-decoration: underline;
  text-decoration-color: var(--gold);
  text-underline-offset: 2px;
}
.editor-body table {
  width: 100%;
  margin: 12px 0 16px;
  border-collapse: collapse;
  font-size: 12.5px;
  line-height: 1.4;
}
.editor-body th {
  padding: 6px 8px;
  border-bottom: 1px solid var(--line-strong);
  background: var(--surface-2);
  font-size: 8.5px;
  font-weight: 650;
  letter-spacing: .08em;
  text-align: left;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}
.editor-body td {
  padding: 6px 8px;
  border-bottom: 1px solid var(--line);
  color: var(--ink-2);
}
.editor-body td.num { font-family: var(--mono); text-align: right; white-space: nowrap; }
.editor-body tr:last-child td { border-bottom: 0; }
.editor-caret {
  display: inline-block;
  width: 1.5px;
  height: 17px;
  margin-left: 1px;
  vertical-align: -3px;
  background: var(--navy);
  animation: avisoCaret 1.1s steps(1) infinite;
}
@keyframes avisoCaret { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }
.editor-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin: 0 34px;
  padding: 10px 0 14px;
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 9.5px;
  color: var(--muted-2);
}
.editor-foot .saved { display: inline-flex; align-items: center; gap: 5px; }
.editor-foot .saved svg { width: 12px; height: 12px; color: var(--ok); }

/* Panel lateral de publicación y adjuntos */
.editor-side {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  padding: 14px;
  background: var(--surface-2);
}
.editor-panel {
  min-width: 0;
  padding: 12px 13px 13px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 11px;
}
.editor-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}
.editor-panel-title {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 9px;
  font-weight: 650;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
}
.editor-panel-title svg { width: 12px; height: 12px; color: var(--gold-600); }
.editor-panel-link {
  font-size: 9.5px;
  font-weight: 600;
  color: var(--navy-600);
  white-space: nowrap;
}
.editor-panel .field { gap: 4px; }
.editor-panel .label { font-size: 8.5px; letter-spacing: .1em; color: var(--muted); }
.editor-panel .field + .field { margin-top: 9px; }
.editor-panel .input,
.editor-panel .select {
  height: 32px;
  padding: 0 9px;
  border-radius: 7px;
  font-size: 11.5px;
  background: var(--surface);
}
.editor-panel .select { padding-right: 26px; background-position: right 8px center; }
.editor-panel .check {
  align-items: center;
  gap: 7px;
  font-size: 11.5px;
  font-weight: 500;
}
.editor-panel .check input { width: 14px; height: 14px; margin-top: 0; }
.editor-panel .check small { font-size: 9.5px; margin-top: 0; }
.editor-row-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.segmented--sm { width: 100%; border-radius: 7px; padding: 2px; }
.segmented--sm button {
  flex: 1;
  padding: 4px 2px;
  border-radius: 5px;
  font-size: 10px;
  font-weight: 550;
  text-align: center;
}
.editor-divider { height: 1px; margin: 10px 0; background: var(--line); }
.editor-label-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 9px;
}

/* Portada del aviso en el editor */
.cover-preview {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--navy);
}
.cover-preview .cover-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.cover-preview-actions {
  position: absolute;
  left: 6px;
  right: 6px;
  bottom: 6px;
  z-index: 2;
  display: flex;
  gap: 4px;
}
.cover-preview-actions .btn {
  height: 24px;
  padding: 0 7px;
  border-radius: 5px;
  font-size: 9.5px;
  background: rgba(255, 255, 255, .92);
  border-color: transparent;
  color: var(--navy);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}
.cover-preview-actions .btn svg { width: 11px; height: 11px; }
.cover-preview-actions .btn:last-child { margin-left: auto; width: 24px; padding: 0; justify-content: center; }
.cover-preview-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 5px;
  font-family: var(--mono);
  font-size: 8.5px;
  color: var(--muted-2);
}

/* Filas de adjuntos del editor */
.attach-row {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) 20px;
  align-items: center;
  gap: 8px;
  padding: 7px 0;
  border-top: 1px solid var(--line);
}
.attach-row:first-of-type { border-top: 0; }
.attach-row-icon {
  display: grid;
  place-items: center;
  width: 24px;
  height: 28px;
  flex: none;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: var(--surface-2);
  color: var(--navy-700);
}
.attach-row-icon svg { width: 11px; height: 11px; }
.attach-row-body { min-width: 0; }
.attach-row-name {
  font-size: 10.5px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.attach-row-meta {
  margin-top: 1px;
  font-family: var(--mono);
  font-size: 8.5px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.attach-row-remove {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--muted-2);
  cursor: pointer;
}
.attach-row-remove svg { width: 12px; height: 12px; }
.attach-row-remove:hover { background: var(--surface-3); color: var(--ink); }
.attach-add {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 100%;
  margin-top: 8px;
  padding: 7px;
  border: 1px dashed var(--line-strong);
  border-radius: 7px;
  background: transparent;
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 550;
  color: var(--muted);
  cursor: pointer;
}
.attach-add svg { width: 12px; height: 12px; }
.attach-add:hover { border-color: var(--navy-600); color: var(--navy); background: var(--surface-2); }

/* Vista previa en el listado */
.editor-preview {
  min-width: 0;
  padding: 10px 11px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 11px;
}
.editor-preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 8.5px;
  font-weight: 650;
  letter-spacing: .11em;
  text-transform: uppercase;
  color: var(--muted);
}
.editor-preview-head .aviso-link { font-size: 9px; }
.editor-preview-card {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  min-width: 0;
}
.editor-preview-thumb {
  position: relative;
  width: 70px;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 5px;
  background: var(--navy);
}
.editor-preview-thumb .cover-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.editor-preview-body { min-width: 0; }
.editor-preview-body .aviso-kicker { font-size: 7.5px; letter-spacing: .1em; }
.editor-preview-body .aviso-kicker::before { width: 3px; height: 3px; }
.editor-preview-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-top: 2px;
  font-size: 10px;
  font-weight: 600;
  line-height: 1.25;
  color: var(--navy);
}
.editor-preview-note {
  margin-top: 7px;
  font-size: 8.5px;
  line-height: 1.4;
  color: var(--muted-2);
}

/* --------------------------------------------------------------------------
   14. Estado vacío (.avisos-empty)
   -------------------------------------------------------------------------- */
.avisos-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 52px 28px 48px;
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--av-radius);
}
.avisos-empty-icon {
  position: relative;
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  margin-bottom: 15px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--surface-2);
  color: var(--muted);
}
.avisos-empty-icon::after {
  content: '';
  position: absolute;
  inset: -5px;
  border-radius: 19px;
  border: 1px solid rgba(169, 130, 74, .22);
}
.avisos-empty-icon svg { width: 23px; height: 23px; }
.avisos-empty-title {
  font-family: var(--display);
  font-size: 21px;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -.025em;
  color: var(--navy);
}
.avisos-empty-text {
  max-width: 44ch;
  margin-top: 7px;
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--muted);
}
.avisos-empty-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 16px;
}
.avisos-empty-suggest {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 18px;
  font-size: 10.5px;
  color: var(--muted-2);
}
.avisos-empty-suggest .aviso-chip {
  height: 26px;
  padding: 0 8px;
  border-color: var(--line);
  font-size: 10.5px;
}

/* --------------------------------------------------------------------------
   15. Responsive: 1440 → 1024 → 390, sin scroll horizontal
   -------------------------------------------------------------------------- */
@media (max-width: 1240px) {
  .avisos-page, .article, .editor-shell { --av-rail: 300px; --av-gap: 24px; }
  .article-layout { gap: 32px; }
  .editor-grid { grid-template-columns: minmax(0, 1fr) 318px; }
  .avisos-feature-title { font-size: 25px; }
}

@media (max-width: 1100px) {
  .avisos-layout { grid-template-columns: minmax(0, 1fr); }
  .avisos-aside {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
  }
  .avisos-aside .comite-card { display: none; }
  .article-layout { grid-template-columns: minmax(0, 1fr); gap: 26px; }
  .article-aside {
    position: static;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
  }
  .article-aside .article-share { grid-column: 1 / -1; }
  .article-body { max-width: 760px; }
  .prose { max-width: 720px; }
  .editor-grid { grid-template-columns: minmax(0, 1fr); }
  .editor-main { border-right: 0; }
  .editor-side {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border-top: 1px solid var(--line);
    align-items: start;
  }
  .editor-side .editor-preview { grid-column: 1 / -1; }
}

@media (max-width: 900px) {
  .avisos-hero-title { font-size: 38px; }
  .avisos-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .avisos-feature { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .avisos-feature-title { font-size: 23px; }
  .avisos-feature-excerpt { -webkit-line-clamp: 3; }
  .article-title { font-size: 40px; }
  .related-grid { grid-template-columns: minmax(0, 1fr); }
  .related-card { grid-template-columns: 94px minmax(0, 1fr); }
  .related-cover { width: 94px; height: 64px; }
  .avisos-toolbar { position: static; }
}

@media (max-width: 760px) {
  .avisos-hero { padding-top: 12px; }
  .avisos-hero-top .eyebrow { font-size: 9px; letter-spacing: .14em; }
  .avisos-hero-title { font-size: 34px; }
  .avisos-hero-dek { font-size: 12.5px; }
  .avisos-hero-main { display: block; }
  .avisos-hero-actions { margin-top: 10px; padding-bottom: 0; }
  .avisos-updated { margin-left: 0; }
  .avisos-toolbar { padding: 8px; gap: 8px; }
  .avisos-buscador { flex-basis: 100%; max-width: none; order: 1; }
  .avisos-kbd { display: none; }
  .avisos-filtros { order: 2; width: 100%; overflow-x: auto; flex-wrap: nowrap; padding-bottom: 2px; scrollbar-width: none; }
  .avisos-toolbar-end { order: 3; margin-left: 0; width: 100%; justify-content: space-between; }
  .avisos-toolbar-end .select { margin-left: auto; }
  .avisos-filtros::-webkit-scrollbar { display: none; }
  .aviso-chip { flex: none; }
  .avisos-feature { grid-template-columns: minmax(0, 1fr); }
  .avisos-feature .aviso-cover { aspect-ratio: 16 / 9; min-height: 0; }
  .avisos-feature-body { padding: 16px 17px 15px; }
  .avisos-feature-title { font-size: 25px; }
  .avisos-feature-excerpt { -webkit-line-clamp: 4; }
  .avisos-feature-foot { padding-top: 12px; }
  .avisos-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .avisos-aside { grid-template-columns: minmax(0, 1fr); }
  .article-head { padding-bottom: 16px; }
  .article-title { font-size: 33px; }
  .article-dek { font-size: 15px; }
  .article-layout { margin-top: 18px; }
  .article-aside { grid-template-columns: minmax(0, 1fr); }
  .article-cover figcaption { display: block; }
  .article-cover figcaption .credit { display: block; margin-top: 2px; }
  .prose { font-size: 16px; line-height: 1.7; }
  .prose .lead { font-size: 16.5px; }
  .prose .lead::first-letter { font-size: 46px; }
  .prose h2 { font-size: 23px; margin-top: 30px; }
  .prose blockquote { font-size: 18px; padding-left: 18px; }
  .prose table { font-size: 12px; }
  .prose th, .prose td { padding: 7px 9px; }
  .editor-content { padding: 20px 18px 14px; }
  .editor-title-input { font-size: 25px; }
  .editor-dek-input { font-size: 13px; }
  .editor-foot { margin: 0 18px; }
  .editor-side { grid-template-columns: minmax(0, 1fr); padding: 12px; }
  .editor-head { padding: 15px 16px 12px; gap: 12px; }
  .editor-head-actions { width: 100%; }
  .editor-head-actions .btn { flex: 1; }
  .editor-status { order: -1; width: 100%; margin: 0 0 2px; }
  .avisos-hero-stats { gap: 10px; }
  .avisos-stats-rule { display: none; }
}

@media (max-width: 560px) {
  .avisos-grid { grid-template-columns: minmax(0, 1fr); gap: 10px; margin-top: 12px; }
  .aviso-card {
    display: grid;
    grid-template-columns: 112px minmax(0, 1fr);
    align-items: stretch;
  }
  .aviso-card .aviso-cover {
    height: 100%;
    aspect-ratio: auto;
    border-radius: 0;
  }
  .aviso-card .aviso-cover .cover-tags { left: 7px; top: 7px; right: 7px; }
  .aviso-card .aviso-cover .aviso-tag { padding: 2px 5px; font-size: 8px; letter-spacing: .06em; }
  .aviso-card .aviso-cover .aviso-tag svg { width: 9px; height: 9px; }
  .aviso-card-body { padding: 11px 12px 10px; }
  .aviso-title { margin-top: 5px; font-size: 15px; }
  .aviso-excerpt { font-size: 11.5px; -webkit-line-clamp: 2; }
  .aviso-card-foot { padding-top: 7px; }
  .aviso-unread { font-size: 8px; }
  .avisos-feature-title { font-size: 23px; }
  .avisos-hero-title { font-size: 31px; }
  .avisos-edition { font-size: 9px; }
  .avisos-updated { font-size: 9.5px; }
  .article-title { font-size: 29px; }
  .article-dek { font-size: 14px; }
  .article-meta { gap: 7px; }
  .article-meta .meta-item.meta-hide-sm { display: none; }
  .poll-card { padding: 13px 13px 11px; }
  .poll-option { grid-template-columns: 15px minmax(0, 1fr) auto; }
  .poll-label { font-size: 11px; }
  .poll-question { font-size: 17px; }
  .avisos-empty { padding: 38px 18px 34px; }
  .avisos-empty-title { font-size: 18px; }
  .avisos-page, .article, .editor-shell { --av-rail: 100%; }
  .prose .table-scroll { border-radius: 8px; }
  .attachment--feature { grid-template-columns: 54px minmax(0, 1fr) auto; }
  .attachment-preview { width: 54px; height: 72px; }
  .related-card { grid-template-columns: 82px minmax(0, 1fr); }
  .related-cover { width: 82px; height: 56px; }
  .editor-tabs { padding: 0 8px; }
  .editor-tab { padding: 10px 8px 9px; font-size: 11px; }
  .editor-tab svg { display: none; }
  .editor-toolbar {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-mask-image: linear-gradient(90deg, #000 0, #000 93%, transparent 100%);
    mask-image: linear-gradient(90deg, #000 0, #000 93%, transparent 100%);
  }
  .editor-toolbar::-webkit-scrollbar { display: none; }
  .editor-toolbar .toolbar-spacer,
  .editor-toolbar .toolbar-mode { display: none; }
  .editor-toolbar .tool-btn,
  .editor-toolbar .tool-sep { flex: none; }
  .article-meta .meta-sep { display: none; }
}

@media (max-width: 400px) {
  .avisos-hero-title { font-size: 29px; }
  .avisos-hero-stats { font-size: 10.5px; gap: 8px; }
  .avisos-stat strong { font-size: 11.5px; }
  .aviso-card { grid-template-columns: 96px minmax(0, 1fr); }
  .aviso-card .aviso-cover .aviso-tag { font-size: 7.5px; padding: 1.5px 4px; }
  .article-title { font-size: 27px; }
  .prose { font-size: 15.5px; }
  .prose .lead::first-letter { font-size: 40px; margin-right: 7px; }
  .prose h2 { font-size: 21px; }
  .prose h3 { font-size: 17px; }
  .poll-label { font-size: 10.5px; }
  .poll-result { font-size: 10px; }
  .editor-title-input { font-size: 22px; }
  .editor-toolbar { padding: 5px 6px; }
  .tool-btn { min-width: 26px; height: 26px; }
  .article-share { padding: 10px 11px; }
  .share-btn span { display: none; }
  .share-btn { width: 28px; padding: 0; justify-content: center; }
}

/* --------------------------------------------------------------------------
   16. Accesibilidad, movimiento y print
   -------------------------------------------------------------------------- */
.avisos-page :focus-visible,
.article :focus-visible,
.editor-shell :focus-visible {
  outline: 2px solid var(--navy-600);
  outline-offset: 2px;
}
.aviso-card:focus-within,
.related-card:focus-within { border-color: var(--navy-600); }

@media (prefers-reduced-motion: reduce) {
  .aviso-card,
  .aviso-card-arrow,
  .aviso-link svg,
  .poll-bar,
  .poll-mark::after,
  .editor-caret { transition: none; animation: none; }
}

@media print {
  .avisos-toolbar,
  .avisos-aside,
  .article-aside,
  .article-share,
  .related,
  .editor-side,
  .editor-toolbar { display: none !important; }
  .article-head { max-width: none; border-bottom: 0; }
  .article-layout { display: block; }
  .article-cover { break-inside: avoid; }
  .prose { max-width: none; font-size: 11pt; }
  .prose h2, .prose h3 { break-after: avoid; }
  .prose table { break-inside: avoid; }
}

/* --------------------------------------------------------------------------
   17. Compatibilidad con el marcado del servidor
   Las vistas nuevas (server/views/avisos.js y avisosAdmin.js) usan variantes
   propias sobre el mismo contrato. Esta capa las viste sin tocar app.css ni
   las vistas; todo va con selectores acotados para no alterar la maqueta.
   -------------------------------------------------------------------------- */

/* 17.1 Listado servido por Express ---------------------------------------- */
form.avisos-buscador {
  display: flex;
  align-items: center;
  gap: 6px;
  position: relative;
  flex: 1 1 300px;
  max-width: 440px;
  min-width: 0;
}
form.avisos-buscador > svg {
  position: absolute;
  left: 11px;
  top: 50%;
  width: 15px;
  height: 15px;
  transform: translateY(-50%);
  color: var(--muted-2);
  pointer-events: none;
}
form.avisos-buscador input[type="search"] {
  flex: 1 1 auto;
  min-width: 0;
  height: 34px;
  padding: 0 10px 0 32px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: var(--surface-2);
  font-family: var(--sans);
  font-size: 12.5px;
  color: var(--ink);
}
form.avisos-buscador input[type="search"]::placeholder { color: var(--muted-2); }
form.avisos-buscador input[type="search"]:focus {
  outline: none;
  border-color: var(--navy-600);
  background: var(--surface);
  box-shadow: 0 0 0 3px rgba(36, 80, 111, .12);
}
form.avisos-buscador .btn { flex: none; height: 32px; }
.aviso-filtro {
  display: inline-flex;
  align-items: center;
  height: 30px;
  padding: 0 10px;
  border: 1px solid transparent;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 550;
  line-height: 1;
  color: var(--muted);
  white-space: nowrap;
  transition: background .14s, color .14s;
}
.aviso-filtro:hover { background: var(--surface-3); color: var(--ink-2); }
.aviso-filtro.is-active { background: var(--navy); color: #fff; }
.avisos-paginacion {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 24px;
}
.avisos-empty > .empty { padding: 0; }
.avisos-empty .empty-icon { background: var(--surface-2); }

/* Portadas reales: img + fallback mientras no hay portada cargada. */
.aviso-cover > img {
  z-index: 0;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
}
.aviso-cover-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 5px;
  padding: 16px;
  overflow: hidden;
  background:
    radial-gradient(120% 120% at 78% 12%, rgba(169, 130, 74, .26), transparent 58%),
    linear-gradient(160deg, #12293d 0%, #0c1d2e 60%, #071523 100%);
}
.aviso-cover-fallback::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 43%;
  width: clamp(42px, 6vw, 70px);
  aspect-ratio: 1;
  border: 1px solid rgba(233, 217, 187, .3);
  box-shadow: 0 0 0 9px rgba(233, 217, 187, .03);
  transform: translate(-50%, -50%) rotate(45deg);
  pointer-events: none;
}
.aviso-cover-fallback::after {
  content: '';
  position: absolute;
  right: -52px;
  bottom: -70px;
  width: 210px;
  height: 210px;
  border: 1px solid rgba(233, 217, 187, .18);
  border-radius: 50%;
  box-shadow: 0 0 0 26px rgba(233, 217, 187, .035), 0 0 0 56px rgba(233, 217, 187, .02);
  pointer-events: none;
}
.aviso-cover-fallback > span { position: relative; z-index: 2; }
.aviso-cover-fallback img {
  width: 40%;
  max-width: 120px;
  opacity: .5;
}
.cover-fallback-kicker {
  font-family: var(--sans);
  font-size: 8.5px;
  font-weight: 650;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--gold-200);
}
.cover-fallback-title {
  max-width: 24ch;
  font-family: var(--display);
  font-size: 17px;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -.02em;
  color: #f5f1e7;
}
.cover-fallback-brand {
  margin-top: 1px;
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(233, 217, 187, .52);
}
.aviso-card .cover-fallback-title { display: none; }
.aviso-card .cover-fallback-brand { display: none; }
.avisos-feature .cover-fallback-title { font-size: 25px; max-width: 20ch; }
.aviso-cover-lg .cover-fallback-kicker { font-size: 9.5px; }
.aviso-cover-lg .cover-fallback-brand { display: block; }
.aviso-cover-shade {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(9, 22, 35, .02) 45%, rgba(9, 22, 35, .5) 100%);
  pointer-events: none;
}
.avisos-feature .aviso-cover { min-height: 0; }
.aviso-cover > .aviso-tag {
  position: absolute;
  left: 10px;
  bottom: 10px;
  z-index: 2;
}
.aviso-cover > .aviso-tag.aviso-tag-poll {
  left: auto;
  right: 10px;
  bottom: 10px;
}
.aviso-tag-alta {
  background: var(--gold-200);
  border-color: var(--gold-200);
  color: var(--navy);
}
.aviso-tag-urgente {
  background: var(--navy);
  border-color: rgba(233, 217, 187, .42);
  color: var(--gold-200);
}
.aviso-tag-poll {
  background: rgba(10, 25, 40, .66);
  border-color: rgba(233, 217, 187, .34);
  color: #f4efe4;
}
.aviso-pin {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-left: 5px;
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--gold-100);
  color: var(--gold-600);
  font-size: 8.5px;
  font-weight: 650;
  letter-spacing: .06em;
  vertical-align: 1px;
}
.aviso-file-count {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--mono);
  font-size: 9.5px;
  color: var(--muted-2);
}
.avisos-feature .aviso-excerpt {
  margin-top: 10px;
  font-size: 13px;
  line-height: 1.58;
  -webkit-line-clamp: 4;
}
.avisos-feature .aviso-meta { margin-top: 12px; padding-top: 0; }
.avisos-feature-cta {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--navy-600);
}
.avisos-feature-cta svg { width: 14px; height: 14px; }
.avisos-feature:hover .avisos-feature-cta { color: var(--navy); }
.avisos-feature .aviso-title { -webkit-line-clamp: unset; }
a.aviso-card, a.avisos-feature, a.related-card { text-decoration: none; }
/* El punto del servidor trae "·" como texto; la maqueta usa un span vacío. */
.aviso-meta .meta-dot:not(:empty) {
  width: auto;
  height: auto;
  flex: none;
  border-radius: 0;
  background: transparent;
  color: var(--line-strong);
  font-size: 10px;
  line-height: 1;
}

.avisos-stats {
  display: flex;
  align-items: baseline;
  gap: 18px;
  flex-wrap: wrap;
  margin: 0 0 16px;
  font-size: 11.5px;
  line-height: 1.4;
  color: var(--muted);
}
.avisos-stats span {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  white-space: nowrap;
}
.avisos-stats strong {
  font-family: var(--mono);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: -.02em;
  color: var(--navy);
}

/* 17.2 Artículo servido por Express --------------------------------------- */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  z-index: 60;
  pointer-events: none;
}
.reading-progress > span {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--gold), var(--gold-200));
}
.article-back {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 10px;
  font-size: 12px;
  color: var(--muted);
}
.article-back:hover { color: var(--ink); }
.article-back svg { width: 14px; height: 14px; }
.article-priority { color: var(--gold-600); font-weight: 650; }
.article-meta .author-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px 3px 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-2);
  font-size: 10.5px;
  font-weight: 600;
  color: var(--ink-2);
}
.article-meta .author-chip svg { width: 13px; height: 13px; color: var(--gold-600); }
.article-meta > span:not(.author-chip) { font-size: 10.5px; color: var(--muted); }
.article-meta .article-edit {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
  font-size: 10.5px;
  font-weight: 600;
  color: var(--navy-600);
}
.article-meta .article-edit svg { width: 13px; height: 13px; }
.article > .article-cover {
  max-width: 900px;
  margin: 0 0 24px;
}
.article-cover img { max-height: 560px; }
.article > .article-cover img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: var(--av-radius);
  box-shadow: var(--shadow-1);
}
.article-body > .attachment-list {
  margin: 26px 0;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}
.article-body > .attachment-list .attachment:first-child { padding-top: 2px; }
.article-body > .poll-card {
  max-width: 600px;
  margin: 26px 0;
}
.article-body > .article-share { margin-top: 26px; }
.article-body > .prose + .article-tags { margin-top: 20px; }
.article-tags {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.article-tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-2);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--muted);
}
.article-body > .prose + .attachment-list { margin-top: 24px; }
.article-aside .aside-card {
  min-width: 0;
  padding: 14px 15px 15px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}
.aside-eyebrow {
  font-size: 9px;
  font-weight: 650;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--gold-600);
}
.aside-author {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 7px;
  font-size: 11.5px;
  color: var(--ink);
}
.aside-author > svg { color: var(--gold-600); flex: none; }
.aside-author strong { display: block; font-weight: 600; }
.aside-author small { display: block; margin-top: 1px; font-size: 9.5px; color: var(--muted); }
.aside-help p { margin: 7px 0 0; font-size: 10.5px; line-height: 1.5; color: var(--muted); }
.aside-help .btn { margin-top: 10px; }
.aside-card .related-grid {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: 5px;
}
.aside-card .related-card {
  display: block;
  padding: 9px 0;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
}
.aside-card .related-card:first-child { border-top: 0; padding-top: 4px; }
.aside-card .related-card:hover { background: transparent; }
.related-kicker {
  font-size: 8.5px;
  font-weight: 650;
  letter-spacing: .11em;
  text-transform: uppercase;
  color: var(--gold-600);
}
.related-title {
  margin-top: 3px;
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--navy);
}
.related-card:hover .related-title { color: var(--navy-600); }
.related-meta {
  margin-top: 2px;
  font-family: var(--mono);
  font-size: 9px;
  color: var(--muted);
}
/* Visor de documentos */
dialog.doc-preview {
  width: min(920px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  padding: 0;
  border: 0;
  border-radius: 14px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-3);
}
dialog.doc-preview::backdrop { background: rgba(12, 29, 46, .58); }
.doc-preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  font-family: var(--display);
  font-size: 15px;
  font-weight: 600;
}
.doc-preview-body {
  height: min(62vh, 560px);
  background: var(--surface-2);
  overflow: auto;
}
.doc-preview-body iframe,
.doc-preview-body img {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  object-fit: contain;
  background: var(--surface);
}
.doc-preview-body p { padding: 24px; }
.doc-preview-foot {
  display: flex;
  justify-content: flex-end;
  padding: 10px 16px;
  border-top: 1px solid var(--line);
}

/* 17.3 Consulta servida por Express (barra como pista, no como relleno) --- */
.poll-option:has(> .poll-option-main) {
  grid-template-columns: 16px minmax(0, 1fr) auto;
  grid-template-areas:
    "input main result"
    "input main count";
  align-items: start;
  column-gap: 9px;
  row-gap: 3px;
  padding: 9px 11px;
  min-height: 0;
}
.poll-option:has(> .poll-option-main) > input {
  grid-area: input;
  width: 15px;
  height: 15px;
  margin: 2px 0 0;
  accent-color: var(--navy);
}
.poll-option-main {
  grid-area: main;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.poll-option-main .poll-option-label {
  font-size: 11.5px;
  line-height: 1.32;
  color: var(--ink-2);
}
.poll-option:has(> .poll-option-main) > .poll-result {
  grid-area: result;
  align-self: start;
  padding-top: 1px;
}
.poll-option:has(> .poll-option-main) > .poll-count {
  grid-area: count;
  justify-self: end;
  font-family: var(--mono);
  font-size: 8.5px;
  color: var(--muted);
  white-space: nowrap;
}
.poll-option-main .poll-bar {
  position: relative;
  inset: auto;
  display: block;
  width: 100%;
  height: 5px;
  border: 0;
  border-radius: 3px;
  background: var(--surface-3);
  overflow: hidden;
}
.poll-option-main .poll-bar > span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: 3px;
  background: var(--navy-700);
  transition: width .4s ease;
}
.poll-option.is-selected .poll-option-main .poll-bar > span { background: var(--gold); }
.poll-option.is-selected .poll-option-main .poll-option-label { font-weight: 600; color: var(--navy); }
.poll-option.is-selected .poll-count { color: var(--gold-600); }
.poll-option:has(input:disabled) { cursor: default; }
.poll-option:has(input:disabled):hover { border-color: var(--line); background: var(--surface); }
.poll-status {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2.5px 7px;
  border-radius: 999px;
  font-size: 9.5px;
  font-weight: 650;
  letter-spacing: .06em;
  text-transform: uppercase;
  white-space: nowrap;
}
.poll-status.is-live { background: var(--ok-bg); color: var(--ok); }
.poll-status.is-closed { background: var(--surface-3); color: var(--muted); }
.poll-option-main .poll-bar { border-right: 0; }

/* 17.4 Adjuntos con el marcado del servidor ------------------------------ */
.attachment-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 8px;
}
.attachment-head .section-title { margin-bottom: 0; }
.attachment-list { margin: 0; }
.attachment {
  width: 100%;
  text-align: left;
  font: inherit;
  color: inherit;
  background: transparent;
}
button.attachment { cursor: pointer; }
button.attachment .attachment-action {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 3px;
  width: auto;
  height: auto;
  padding: 0 2px;
  font-size: 10px;
  font-weight: 550;
  color: var(--muted);
  white-space: nowrap;
}
.attachment .attachment-name { display: flex; flex-direction: column; gap: 2px; }
.attachment .attachment-name .attachment-meta { font-weight: 400; }

/* 17.5 Mesa de redacción con el marcado del servidor --------------------- */
.editor-grid > form.editor-main {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  padding: 16px;
  border-right: 1px solid var(--line);
  background: var(--surface-2);
}
.editor-grid > .editor-side {
  padding: 14px;
  border-left: 0;
  background: var(--surface-2);
}
.editor-card {
  min-width: 0;
  padding: 15px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}
.editor-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.editor-card-head h2 {
  margin-top: 2px;
  font-family: var(--display);
  font-size: 18px;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -.02em;
  color: var(--navy);
}
.editor-eyebrow {
  font-size: 9px;
  font-weight: 650;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--gold-600);
}
.editor-label-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}
.editor-card .form { gap: 13px; }
.editor-card .form-grid { gap: 12px 14px; }
.editor-card .editor-toolbar {
  position: sticky;
  top: calc(var(--topbar-h) + 8px);
  z-index: 15;
  flex-wrap: wrap;
  margin-bottom: 2px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(255, 255, 255, .96);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.editor-btn {
  display: inline-grid;
  place-items: center;
  min-width: 30px;
  height: 30px;
  padding: 0 5px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--ink-2);
  cursor: pointer;
}
.editor-btn svg { width: 15px; height: 15px; }
.editor-btn:hover { background: var(--surface-3); }
.editor-sep {
  width: 1px;
  height: 16px;
  margin: 0 4px;
  flex: none;
  background: var(--line);
}
.editor-card .editor-content {
  flex: none;
  min-height: 300px;
  max-height: none;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  font-size: 15px;
  line-height: 1.7;
  color: var(--ink-2);
  overflow-wrap: anywhere;
}
.editor-card .editor-content:focus {
  outline: none;
  border-color: var(--navy-600);
  box-shadow: 0 0 0 3px rgba(36, 80, 111, .12);
}
.editor-card .editor-content h2 {
  margin: 20px 0 7px;
  font-family: var(--display);
  font-size: 19px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -.02em;
  color: var(--navy);
}
.editor-card .editor-content h3 {
  margin: 16px 0 6px;
  font-family: var(--display);
  font-size: 15px;
  font-weight: 600;
  color: var(--navy);
}
.editor-card .editor-content p { margin: 0 0 12px; }
.editor-card .editor-content p:last-child { margin-bottom: 0; }
.editor-card .editor-content ul,
.editor-card .editor-content ol { margin: 0 0 12px; padding-left: 18px; }
.editor-card .editor-content ul { list-style: none; }
.editor-card .editor-content ul > li { position: relative; margin-bottom: 4px; }
.editor-card .editor-content ul > li::before {
  content: '';
  position: absolute;
  left: -10px;
  top: .72em;
  width: 4px;
  height: 4px;
  border-radius: 1px;
  background: var(--gold);
}
.editor-card .editor-content ol { list-style: decimal; }
.editor-card .editor-content blockquote {
  margin: 14px 0;
  padding-left: 14px;
  border-left: 2px solid var(--gold);
  font-family: var(--display);
  font-size: 15.5px;
  line-height: 1.45;
  color: var(--navy);
}
.editor-card .editor-content a {
  color: var(--navy-600);
  text-decoration: underline;
  text-decoration-color: var(--gold);
  text-underline-offset: 2px;
}
.editor-card .editor-content table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.editor-card .editor-content th,
.editor-card .editor-content td { padding: 6px 8px; border-bottom: 1px solid var(--line); text-align: left; }
.check-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 12px;
  font-size: 12px;
  cursor: pointer;
}
.check-row input { width: 15px; height: 15px; margin: 2px 0 0; accent-color: var(--navy); flex: none; }
.check-row small { display: block; margin-top: 1px; font-size: 10.5px; color: var(--muted); }
.editor-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.attach-list { display: flex; flex-direction: column; }
.attach-icon {
  display: grid;
  place-items: center;
  width: 24px;
  height: 28px;
  flex: none;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: var(--surface-2);
  color: var(--navy-700);
}
.attach-icon svg { width: 11px; height: 11px; }
.attach-name { min-width: 0; font-size: 10.5px; line-height: 1.3; }
.attach-name strong { display: block; font-weight: 600; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.attach-name small { display: block; margin-top: 1px; font-family: var(--mono); font-size: 8.5px; color: var(--muted); }
.editor-card .cover-preview {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 8px;
}
.cover-preview-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px dashed var(--line-strong);
  background: var(--surface-2);
  color: var(--muted);
  font-size: 10px;
}
.cover-preview-empty svg { width: 22px; height: 22px; color: var(--muted-2); }
.poll-admin { min-width: 0; }
.poll-admin-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 0;
  border-top: 1px solid var(--line);
  font-size: 11px;
}
.poll-admin-row strong { font-family: var(--mono); font-weight: 600; color: var(--navy); }
.editor-help {
  min-width: 0;
  padding: 12px 14px;
  border: 1px dashed var(--line-strong);
  border-radius: 12px;
}
.editor-help p { margin-top: 4px; }
.editor-tab span {
  display: inline-grid;
  place-items: center;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 4px;
  background: var(--surface-3);
  font-family: var(--mono);
  font-size: 8.5px;
  color: var(--muted);
}

/* 17.6 Administración: filas de publicaciones ---------------------------- */
.admin-avisos-list { display: flex; flex-direction: column; min-width: 0; }
.admin-aviso-row {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border-top: 1px solid var(--line);
  min-width: 0;
}
.admin-aviso-row:first-child { border-top: 0; }
.admin-aviso-cover {
  display: grid;
  place-items: center;
  width: 84px;
  height: 56px;
  overflow: hidden;
  border-radius: 8px;
  background: var(--navy);
}
.admin-aviso-cover img { width: 100%; height: 100%; object-fit: cover; }
.admin-aviso-cover img[src$="logo-sendero.png"] { width: 66%; height: 66%; object-fit: contain; opacity: .8; }
.admin-aviso-main { min-width: 0; }
.admin-aviso-actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }

/* 17.7 Ajustes móviles de las variantes del servidor --------------------- */
@media (max-width: 1100px) {
    .editor-grid > form.editor-main { border-right: 0; }
}
@media (max-width: 760px) {
  form.avisos-buscador { max-width: none; }
  .avisos-stats { gap: 12px; font-size: 10.5px; }
  .avisos-stats strong { font-size: 11.5px; }
  .article > .article-cover { max-width: none; margin-bottom: 18px; }
  .article-body > .poll-card { max-width: none; }
  .article-body > .attachment-list { padding: 12px 13px; }
  .editor-grid > form.editor-main { padding: 12px; }
  .editor-grid > .editor-side { padding: 12px; }
  .admin-aviso-row { grid-template-columns: 64px minmax(0, 1fr); gap: 10px; padding: 10px 12px; }
  .admin-aviso-cover { width: 64px; height: 44px; }
  .admin-aviso-actions { grid-column: 2; justify-content: flex-start; }
}
@media (max-width: 420px) {
  .article-meta .article-edit { margin-left: 0; }
  .article-meta .author-chip { max-width: 100%; }
}

/* Roles y permisos */
.permisos-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 8px;
}
.permiso-group {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 11px 13px;
  background: var(--surface-2);
}
.permiso-group h3 {
  margin: 0 0 6px;
  font-size: 10px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--gold-600);
}
.permiso-row { margin: 5px 0; align-items: flex-start; }
.permiso-row small { display: block; margin-top: 1px; }
@media (max-width: 800px) {
  .permisos-grid { grid-template-columns: minmax(0, 1fr); }
}
