/* Inter y Press Start 2P, servidas desde static/vendor/fonts (las baja
   scripts/vendor_libs.sh). Antes esta linea apuntaba a fonts.googleapis.com:
   ver la cabecera de ese script para el por que. */
@import url('../vendor/fonts/fonts.css');

/* ============================================================
   TOKENS · los mismos de la portada y de /history
   ============================================================ */
:root {
    --ink: #08080b;
    --surface: rgba(19, 19, 24, .58);
    --surface-2: rgba(13, 13, 17, .9);
    --line: rgba(255, 255, 255, .085);
    --line-soft: rgba(255, 255, 255, .045);
    --txt: #ecedf0;
    --dim: #9b9ba6;
    --dimmer: #6d6d78;
    --accent: #ff3b46;
    --accent-dim: rgba(255, 59, 70, .14);
    --accent-line: rgba(255, 59, 70, .38);
    --warm: #f5a524;
    --cool: #4ade80;
    --blue: #60a5fa;
    --r: 16px;
    --r-sm: 10px;
    --r-pill: 999px;
    --shadow: 0 22px 50px -26px rgba(0, 0, 0, .95);
    --maxw: 1160px;
    --topnav-h: 50px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background:
        radial-gradient(1100px 520px at 8% -10%, rgba(255, 59, 70, .13), transparent 62%),
        radial-gradient(900px 460px at 96% 10%, rgba(74, 168, 255, .06), transparent 60%),
        var(--ink);
    background-attachment: fixed;
    color: var(--txt);
    font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    -webkit-font-smoothing: antialiased;
    line-height: 1.5;
}

a {
    color: inherit;
}

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, .14);
    border-radius: 4px;
}

/* ============================================================
   ESTRUCTURA
   ============================================================ */
.page {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 26px 22px 90px;
}

.crumbs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 7px;
    font-size: 11.5px;
    color: var(--dimmer);
    margin-bottom: 20px;
}

.crumbs a {
    color: var(--dim);
    text-decoration: none;
}

.crumbs a:hover {
    color: var(--accent);
}

.crumbs .sep {
    opacity: .5;
}

.crumbs .here {
    color: var(--txt);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}

/* ---------------- portada de la ficha ---------------- */
.hero {
    margin-bottom: 26px;
}

.tagrow {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 7px;
    margin-bottom: 13px;
}

.pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: var(--r-pill);
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, .04);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--dim);
    text-decoration: none;
}

.pill.is-type {
    border-color: var(--accent-line);
    background: var(--accent-dim);
    color: #ffb4b8;
}

.pill.is-ok {
    border-color: rgba(74, 222, 128, .34);
    background: rgba(74, 222, 128, .1);
    color: #86efac;
}

.pill.is-warm {
    border-color: rgba(245, 165, 36, .34);
    background: rgba(245, 165, 36, .1);
    color: #fcd34d;
}

.pill svg {
    width: 11px;
    height: 11px;
}

.hero h1 {
    font-size: clamp(1.6rem, 4.4vw, 2.5rem);
    font-weight: 850;
    letter-spacing: -.03em;
    line-height: 1.12;
    margin: 0 0 14px;
    text-wrap: balance;
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 20px;
    font-size: 12.5px;
    color: var(--dim);
}

.hero-meta span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.hero-meta svg {
    width: 13px;
    height: 13px;
    color: var(--dimmer);
    flex-shrink: 0;
}

.hero-meta b {
    color: var(--txt);
    font-weight: 600;
}

/* ---------------- rejilla principal ---------------- */
.layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 20px;
    align-items: start;
}

.col {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 0;
}

.aside {
    position: sticky;
    top: calc(var(--topnav-h) + 16px);
}

.card {
    border: 1px solid var(--line);
    background: var(--surface);
    backdrop-filter: saturate(150%) blur(20px);
    -webkit-backdrop-filter: saturate(150%) blur(20px);
    border-radius: var(--r);
    padding: 18px 20px;
    box-shadow: var(--shadow);
}

.card.flush {
    padding: 0;
    overflow: hidden;
}

.card-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--dimmer);
    margin: 0 0 12px;
}

.card-label .count {
    padding: 1px 7px;
    border-radius: var(--r-pill);
    background: rgba(255, 255, 255, .07);
    color: var(--dim);
    letter-spacing: 0;
}

.relato {
    font-size: 15.5px;
    line-height: 1.72;
    color: #d9dae0;
    margin: 0;
    white-space: pre-line;
    /* El texto viene del medio: si trae un enlace pegado sin espacios,
       parte por donde sea antes que estirar la pagina. */
    overflow-wrap: anywhere;
}

/* ---------------- personas ---------------- */
.people {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.person {
    border: 1px solid var(--line-soft);
    border-radius: var(--r-sm);
    background: rgba(255, 255, 255, .025);
    padding: 13px 14px;
}

.person-head {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: .09em;
    text-transform: uppercase;
    color: var(--dim);
    margin-bottom: 9px;
}

.person-head .dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
}

.is-victims .dot {
    background: var(--blue);
}

.is-attackers .dot {
    background: var(--accent);
}

.person .origin {
    font-size: 15px;
    font-weight: 650;
    color: var(--txt);
    line-height: 1.35;
}

.person .ages {
    font-size: 12px;
    color: var(--dimmer);
    margin-top: 3px;
}

.attr {
    display: inline-block;
    margin-top: 9px;
    padding: 2px 8px;
    border-radius: var(--r-pill);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.attr.media {
    background: rgba(255, 255, 255, .05);
    color: var(--dimmer);
}

.attr.community {
    background: rgba(96, 165, 250, .12);
    color: #93c5fd;
}

/* ---------------- fuentes ---------------- */
.sources {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.source-row {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 11px 13px;
    border: 1px solid var(--line-soft);
    border-radius: var(--r-sm);
    background: rgba(255, 255, 255, .022);
    text-decoration: none;
    transition: border-color .16s ease, background .16s ease;
}

.source-row:hover {
    border-color: var(--accent-line);
    background: rgba(255, 59, 70, .06);
}

.source-row .n {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    border-radius: 6px;
    background: rgba(255, 255, 255, .06);
    color: var(--dimmer);
    font-size: 11px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
}

.source-row .who {
    min-width: 0;
    flex: 1;
}

/* El `display: block` no es decorativo: los dos son <span>, y sobre una
   caja en linea el `text-overflow` no recorta nada. Sin el, una URL
   larga se pintaba a su ancho natural, estiraba el documento por
   encima del ancho de la pantalla y sacaba scroll horizontal a toda
   la pagina en movil. */
.source-row .dom {
    display: block;
    font-size: 13.5px;
    font-weight: 700;
    color: var(--txt);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.source-row .url {
    display: block;
    font-size: 11px;
    color: var(--dimmer);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.source-row .go {
    flex-shrink: 0;
    width: 14px;
    height: 14px;
    color: var(--dimmer);
}

.no-source {
    font-size: 13px;
    color: var(--dimmer);
    margin: 0;
}

/* ---- copia archivada en archive.org [B.5] ----
   Deliberadamente discreta y en gris: es una nota al pie de la fuente, no una
   segunda fuente. Lo que tiene que leer primero quien entra sigue siendo el
   medio que publico la noticia. */
.source-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.source-copy {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-left: 33px;
    font-size: 11.5px;
    color: var(--dimmer);
    text-decoration: none;
    transition: color .16s ease;
}

.source-copy:hover {
    color: var(--txt);
    text-decoration: underline;
}

.source-copy svg {
    flex-shrink: 0;
    width: 12px;
    height: 12px;
}

.sources-note {
    margin: 12px 0 0;
    font-size: 11.5px;
    line-height: 1.55;
    color: var(--dimmer);
}

.sources-note b {
    color: var(--dim);
    font-weight: 700;
}

/* ---------------- ficha lateral ---------------- */
#mini-map {
    height: 190px;
    background: #0c1220;
}

#mini-map .leaflet-tile {
    filter: invert(100%) hue-rotate(180deg) brightness(93%) contrast(88%) saturate(85%);
}

#mini-map .leaflet-container {
    background: #0c1220;
}

.map-foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 6px 10px;
    padding: 11px 14px;
    border-top: 1px solid var(--line-soft);
}

.map-foot .coords {
    font-size: 11px;
    color: var(--dimmer);
    font-variant-numeric: tabular-nums;
}

.map-foot a {
    font-size: 11.5px;
    font-weight: 700;
    color: var(--dim);
    text-decoration: none;
    white-space: nowrap;
}

.map-foot a:hover {
    color: var(--accent);
}

.facts {
    margin: 0;
    display: flex;
    flex-direction: column;
}

.fact {
    display: flex;
    align-items: baseline;
    gap: 10px;
    padding: 9px 0;
    border-bottom: 1px solid var(--line-soft);
}

.fact:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.fact dt {
    font-size: 11.5px;
    color: var(--dimmer);
    white-space: nowrap;
    flex-shrink: 0;
}

.fact .leader {
    flex: 1;
    border-bottom: 1px dotted rgba(255, 255, 255, .12);
    transform: translateY(-3px);
    min-width: 10px;
}

.fact dd {
    margin: 0;
    font-size: 12.5px;
    font-weight: 650;
    color: var(--fv, var(--txt));
    text-align: right;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.meter {
    height: 5px;
    border-radius: var(--r-pill);
    background: rgba(255, 255, 255, .07);
    overflow: hidden;
    margin-top: 9px;
}

.meter i {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--mc, var(--accent));
}

.btn-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.btn {
    flex: 1 1 auto;
    min-width: 130px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 10px 14px;
    border-radius: var(--r-sm);
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, .035);
    color: var(--txt);
    font: inherit;
    font-size: 12.5px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: border-color .16s ease, background .16s ease, color .16s ease;
}

.btn:hover {
    border-color: rgba(255, 255, 255, .22);
    background: rgba(255, 255, 255, .06);
}

.btn svg {
    width: 14px;
    height: 14px;
}

.btn.danger {
    color: #f87171;
    border-color: rgba(239, 68, 68, .38);
    background: transparent;
}

.btn.danger:hover {
    background: rgba(239, 68, 68, .13);
    border-color: #ef4444;
}

.btn.blue {
    color: #93c5fd;
    border-color: rgba(59, 130, 246, .38);
    background: transparent;
}

.btn.blue:hover {
    background: rgba(59, 130, 246, .13);
    border-color: #3b82f6;
}

.btn.warm {
    color: #fcd34d;
    border-color: rgba(234, 179, 8, .38);
    background: transparent;
}

.btn.warm:hover {
    background: rgba(234, 179, 8, .13);
    border-color: #eab308;
}

/* ---------------- historial de moderacion ---------------- */
.edits {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.edit {
    border: 1px solid var(--line-soft);
    border-radius: var(--r-sm);
    background: rgba(255, 255, 255, .022);
    padding: 11px 13px;
    font-size: 12.5px;
}

.edit-head {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 6px;
    margin-bottom: 6px;
}

.edit-head .who {
    color: var(--blue);
    font-weight: 700;
}

.edit-head .when {
    color: var(--dimmer);
    font-size: 11px;
}

.diff {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 7px;
    margin-top: 4px;
    font-size: 12px;
}

.diff .k {
    font-weight: 800;
    font-size: 10px;
    letter-spacing: .06em;
    color: var(--dimmer);
}

.diff .old {
    color: var(--dimmer);
    text-decoration: line-through;
}

.diff .new {
    color: var(--txt);
    font-weight: 600;
}

.diff .arrow {
    color: var(--dimmer);
}

/* ---------------- casos relacionados ---------------- */
.related {
    margin-top: 42px;
}

.related-head {
    display: flex;
    align-items: baseline;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 6px;
}

.related-head h2 {
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: -.02em;
    margin: 0;
}

.related-lede {
    font-size: 13px;
    color: var(--dim);
    margin: 0 0 16px;
    max-width: 62ch;
}

.rel-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(255px, 1fr));
    gap: 12px;
}

.rel-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 15px 16px;
    border: 1px solid var(--line);
    background: var(--surface);
    border-radius: var(--r-sm);
    text-decoration: none;
    transition: border-color .16s ease, transform .16s ease, background .16s ease;
}

.rel-card:hover {
    border-color: var(--accent-line);
    background: rgba(255, 59, 70, .05);
    transform: translateY(-2px);
}

.rel-card .type {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #ffb4b8;
}

.rel-card .headline {
    font-size: 13.5px;
    font-weight: 650;
    line-height: 1.42;
    color: var(--txt);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.rel-card .foot {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 10px;
    font-size: 11px;
    color: var(--dimmer);
    margin-top: auto;
    padding-top: 4px;
}

/* La distancia es el dato nuevo que trae "Cerca de aqui", y compite en
   el pie con el sitio y la fecha: va en chapa y con el rojo de la casa
   para que se lea antes que ellos. */
.rel-card .rel-dist {
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: #ffb4b8;
    background: var(--accent-dim);
    border-radius: var(--r-pill);
    padding: 1px 8px;
    margin-left: -2px;
}

/* ---------------- cierre ---------------- */
.closing {
    margin-top: 46px;
    padding: 30px 26px;
    border: 1px solid var(--line);
    border-radius: var(--r);
    background: var(--surface-2);
    text-align: center;
}

.closing h2 {
    font-size: clamp(1.15rem, 3.4vw, 1.6rem);
    font-weight: 850;
    letter-spacing: -.025em;
    margin: 0 0 8px;
}

.closing h2 em {
    font-style: normal;
    color: var(--accent);
}

.closing p {
    font-size: 13.5px;
    color: var(--dim);
    margin: 0 auto 18px;
    max-width: 60ch;
    line-height: 1.65;
}

.closing .btn-row {
    justify-content: center;
}

.closing .btn {
    flex: 0 0 auto;
}

/* ============================================================
   MODALES DE MODERACION
   ============================================================ */
.modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(0, 0, 0, .82);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
}

.modal[hidden] {
    display: none;
}

.modal-box {
    width: 100%;
    max-width: 430px;
    max-height: calc(100vh - 36px);
    overflow-y: auto;
    border: 1px solid var(--line);
    border-radius: var(--r);
    background: #101014;
    padding: 22px;
}

.modal-box h3 {
    font-size: 1.05rem;
    font-weight: 800;
    margin: 0 0 16px;
}

.field {
    margin-bottom: 15px;
}

.field label {
    display: block;
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--dim);
    margin-bottom: 6px;
}

.field .hint {
    font-size: 11px;
    color: var(--dimmer);
    margin: 5px 0 0;
    line-height: 1.5;
}

.field input[type=text],
.field input[type=url] {
    width: 100%;
    padding: 9px 11px;
    border-radius: 8px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, .04);
    color: var(--txt);
    font: inherit;
    font-size: 13px;
    outline: none;
}

.field input:focus {
    border-color: var(--accent-line);
}

.tagbox {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 7px;
    min-height: 42px;
    border-radius: 8px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, .04);
    cursor: text;
}

.tagbox input {
    flex: 1;
    min-width: 110px;
    border: 0;
    background: transparent;
    color: var(--txt);
    font: inherit;
    font-size: 13px;
    outline: none;
}

.tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 8px;
    border-radius: 6px;
    background: rgba(255, 255, 255, .09);
    font-size: 12px;
}

.tag button {
    border: 0;
    background: transparent;
    color: var(--dimmer);
    cursor: pointer;
    font: inherit;
    padding: 0;
    line-height: 1;
}

.tag button:hover {
    color: var(--accent);
}

.ac {
    position: relative;
}

.ac-list {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 4px);
    z-index: 5;
    max-height: 170px;
    overflow-y: auto;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #16161b;
    box-shadow: var(--shadow);
}

.ac-list[hidden] {
    display: none;
}

.ac-list button {
    display: block;
    width: 100%;
    text-align: left;
    padding: 8px 11px;
    border: 0;
    background: transparent;
    color: var(--txt);
    font: inherit;
    font-size: 13px;
    cursor: pointer;
}

.ac-list button:hover {
    background: rgba(255, 255, 255, .07);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 980px) {
    .layout {
        grid-template-columns: minmax(0, 1fr);
    }

    /* En una sola columna el mapa y la ficha van DEBAJO del relato,
       que es lo que la persona ha venido a leer. */
    .aside {
        position: static;
        order: 2;
    }
}

@media (max-width: 620px) {

    .page {
        padding: 20px 14px 70px;
    }

    .card {
        padding: 15px 16px;
    }

    .people {
        grid-template-columns: 1fr;
    }

    .relato {
        font-size: 14.5px;
    }

    .rel-grid {
        grid-template-columns: 1fr;
    }

    .closing {
        padding: 24px 18px;
    }

    .btn {
        min-width: 0;
    }
}

/* Texto solo para lectores de pantalla (ver index.html). */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

/* Enlaces a las fichas de entidad (/medio/, /lugar/, /origen/...). Subrayado
   punteado y no color pleno: son enlaces de navegacion lateral, no la accion
   principal de la ficha, que es ir a la noticia original. */
.a-hub {
    color: inherit;
    text-decoration: underline dotted rgba(255, 255, 255, .28);
    text-underline-offset: 3px;
    transition: color .16s ease, text-decoration-color .16s ease;
}

.a-hub:hover {
    color: var(--accent);
    text-decoration-color: var(--accent-line);
}

.hub-chips {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 14px;
    padding-top: 13px;
    border-top: 1px solid var(--line-soft);
}

.hub-chips-label {
    font-size: 11.5px;
    color: var(--dimmer);
}

.hub-chip {
    display: inline-flex;
    padding: 4px 10px;
    border-radius: var(--r-pill);
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, .03);
    font-size: 11.5px;
    color: var(--dim);
    text-decoration: none;
    transition: border-color .16s ease, color .16s ease;
}

.hub-chip:hover {
    border-color: var(--accent-line);
    color: var(--txt);
}

/* ============================================================
   HISTORIAL DEL TITULAR · el detector de ediciones silenciosas [A.1]
   ============================================================
   El diff es la prueba, asi que se pinta como una cita y no como una
   acusacion: sin iconos de alarma, sin rojo de error, sin negrita de titular.
   Lo unico que destaca es LO QUE CAMBIO. Ver la cabecera de
   app/core/headlines.py. */

.card-sub {
    font-size: 12.5px;
    line-height: 1.55;
    color: var(--dim);
    margin: -6px 0 14px;
    max-width: 62ch;
}

.card-foot {
    font-size: 11.5px;
    color: var(--dimmer);
    margin: 14px 0 0;
}

.titulares {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.titular-fuente {
    border: 1px solid var(--line-soft);
    border-radius: var(--r-sm);
    background: rgba(255, 255, 255, .022);
    padding: 12px 14px;
}

.titular-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.titular-head .dom {
    font-size: 12.5px;
    font-weight: 700;
    color: var(--blue);
    text-decoration: none;
}

.titular-head .dom:hover {
    text-decoration: underline;
}

.titular-head .revisitas {
    font-size: 10.5px;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--dimmer);
}

.titular-igual,
.titular-bloqueado {
    margin: 0;
    font-size: 12.5px;
    line-height: 1.6;
    color: var(--dim);
}

/* El 403 no es un hueco: se ve. Pero tampoco es una acusacion, asi que va en
   el ambar de "no se pudo", no en el rojo de "esta mal". */
.titular-bloqueado {
    border-left: 2px solid rgba(245, 165, 36, .5);
    padding-left: 10px;
}

.titular-bloqueado b {
    color: var(--warm);
    font-weight: 700;
}

.titular-cambio+.titular-cambio {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--line-soft);
}

.cambio-linea {
    display: grid;
    grid-template-columns: 52px 1fr;
    gap: 8px;
    align-items: baseline;
    font-size: 13px;
    line-height: 1.6;
}

.cambio-linea+.cambio-linea {
    margin-top: 4px;
}

.cambio-linea .k {
    font-size: 9.5px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--dimmer);
}

.cambio-linea.es-antes .txt {
    color: var(--dim);
}

.cambio-linea.es-ahora .txt {
    color: var(--txt);
}

/* <del> y <ins> de verdad, no dos <span> con clases: es lo que hace que un
   lector de pantalla anuncie "texto eliminado" y "texto insertado" en vez de
   leer las dos versiones seguidas como si fueran una frase. */
.cambio-linea del {
    background: rgba(255, 59, 70, .16);
    color: #ffb4b8;
    text-decoration: line-through;
    text-decoration-thickness: 1px;
    border-radius: 3px;
    padding: 0 2px;
}

.cambio-linea ins {
    background: rgba(74, 222, 128, .16);
    color: #86efac;
    text-decoration: none;
    border-radius: 3px;
    padding: 0 2px;
}

.cambio-pie {
    margin: 8px 0 0;
    font-size: 11px;
    color: var(--dimmer);
}

.titular-aviso {
    max-width: 68ch;
}

/* ============================================================
   DATO POR DATO · la cita de la que sale cada dato [B.8]
   ============================================================
   Mismo criterio que el historial del titular: la cita es la prueba, asi que
   se pinta como una cita y no como un adorno. Lo que destaca es LA FRASE DEL
   MEDIO, no nuestra etiqueta ni nuestro boton. El «esto esta mal» va discreto
   hasta que se pasa por encima: tiene que estar siempre a mano y no gritar en
   cada linea. */

.card-audit {
    margin-left: auto;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: none;
    color: var(--blue);
    text-decoration: none;
    border-bottom: 1px dotted rgba(96, 165, 250, .45);
}

.card-audit:hover {
    color: #93c5fd;
}

.trazas {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.traza {
    border: 1px solid var(--line-soft);
    border-radius: var(--r-sm);
    background: rgba(255, 255, 255, .022);
    padding: 12px 14px;
}

.traza-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 9px;
}

.traza-head .k {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--dimmer);
}

.traza-head .v {
    font-size: 13.5px;
    font-weight: 700;
    color: var(--txt);
}

.traza-flag {
    margin-left: auto;
    padding: 3px 9px;
    border-radius: var(--r-pill);
    border: 1px solid var(--line);
    background: transparent;
    color: var(--dimmer);
    font: inherit;
    font-size: 11px;
    cursor: pointer;
    transition: color .15s, border-color .15s;
}

.traza-flag:hover {
    color: var(--accent);
    border-color: var(--accent-line);
}

.traza-cita {
    margin: 9px 0 0;
    padding-left: 11px;
    border-left: 2px solid var(--line);
    font-size: 13px;
    line-height: 1.65;
    color: #d9dae0;
    /* La cita sale del cuerpo de una noticia: si trae una URL pegada sin
       espacios, que parta antes que estirar la ficha entera. */
    overflow-wrap: anywhere;
}

.traza-fuente {
    display: inline-block;
    margin-top: 7px;
    font-size: 11px;
    color: var(--dim);
    text-decoration: none;
}

.traza-fuente:hover {
    color: var(--blue);
}

.traza-sincita,
.trazas-vacio {
    margin: 8px 0 0;
    font-size: 11.5px;
    line-height: 1.55;
    color: var(--dimmer);
}

.trazas-vacio {
    margin: 0;
    font-size: 13px;
}

.traza-foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 14px;
    padding-top: 13px;
    border-top: 1px solid var(--line-soft);
}

.traza-foot p {
    margin: 0;
    max-width: 52ch;
    font-size: 11.5px;
    line-height: 1.55;
    color: var(--dimmer);
}

/* El modal de la impugnacion reutiliza .modal y .field; lo unico que no
   existia era el textarea -ningun otro formulario de esta ficha tiene uno- y
   la linea que dice QUE dato se esta impugnando. */
.modal-sub {
    margin: -10px 0 16px;
    font-size: 12.5px;
    line-height: 1.5;
    color: var(--dim);
    overflow-wrap: anywhere;
}

.field textarea {
    width: 100%;
    padding: 9px 11px;
    border-radius: 8px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, .04);
    color: var(--txt);
    font: inherit;
    font-size: 13px;
    line-height: 1.55;
    resize: vertical;
}

.field textarea:focus,
.field input[type=url]:focus,
.field input[type=text]:focus {
    outline: none;
    border-color: rgba(96, 165, 250, .5);
}

/* El modal cuando NO hay sesion: en vez del formulario, el porque. */
.modal-gate {
    margin: 0 0 12px;
    font-size: 13px;
    line-height: 1.6;
    color: #d9dae0;
}

.modal-gate.small {
    font-size: 11.5px;
    color: var(--dimmer);
    margin-bottom: 18px;
}

/* ============================================================
   AVALES · «yo también lo vi» [Fase C]
   ============================================================
   La barra tiene DOS tramos y ese es el diseño entero: el primero es la prueba
   documental —lo que cualquiera puede ir a comprobar— y el segundo lo que
   aporta la gente. Pintarlos del mismo color los volvería un número redondo, y
   un número redondo esconde justo lo que aquí hay que enseñar: de qué vive la
   confianza de este caso. Por eso el documental va en el azul de los enlaces y
   los avales en el verde de las personas. */

.aval-bar {
    display: flex;
    height: 8px;
    border-radius: var(--r-pill);
    background: rgba(255, 255, 255, .07);
    overflow: hidden;
}

.aval-bar i {
    display: block;
    height: 100%;
    /* La transición es la que hace visible que TU clic ha movido la barra. Sin
       ella el número cambia y no se ve por qué. */
    transition: width .35s cubic-bezier(.4, 0, .2, 1);
}

.aval-bar i.doc {
    background: linear-gradient(90deg, rgba(96, 165, 250, .55), var(--blue));
}

.aval-bar i.corr {
    background: linear-gradient(90deg, rgba(74, 222, 128, .55), var(--cool));
}

.aval-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 16px;
    margin-top: 9px;
    font-size: 11.5px;
    color: var(--dim);
}

.aval-legend span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.aval-legend i {
    width: 8px;
    height: 8px;
    border-radius: 2px;
}

.aval-legend i.doc {
    background: var(--blue);
}

.aval-legend i.corr {
    background: var(--cool);
}

.aval-legend b {
    color: var(--txt);
    font-weight: 600;
}

.aval-legend .total {
    margin-left: auto;
}

.aval-state {
    margin: 14px 0 0;
    font-size: 13px;
    line-height: 1.6;
    color: var(--dim);
}

.aval-state b {
    color: var(--txt);
}

.aval-state b.ok {
    color: var(--cool);
}

/* Los escalones que avalan, NO quién avala. Ver endorsements.desglose(). El
   color lo pone la plantilla desde la escalera de app/core/levels.py, que es el
   mismo que usa /auth/portal: un aval de identidad se reconoce por el color
   antes que por el texto, y en las dos pantallas es el mismo verde. */
.aval-levels {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 12px;
}

.aval-levels:empty {
    display: none;
}

.aval-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: var(--r-pill);
    border: 1px solid color-mix(in srgb, var(--lc) 38%, transparent);
    background: color-mix(in srgb, var(--lc) 11%, transparent);
    font-size: 11.5px;
    color: var(--dim);
}

.aval-chip b {
    color: var(--lc);
    font-weight: 700;
}

.aval-btn {
    margin-top: 14px;
    color: #86efac;
    border-color: rgba(74, 222, 128, .38);
    background: transparent;
}

.aval-btn:hover {
    background: rgba(74, 222, 128, .13);
    border-color: var(--cool);
}

/* Ya avalado por quien mira. El botón cambia de significado —ahora retira— y
   tiene que verse antes de leerlo: relleno en vez de contorno. */
.aval-btn.is-on {
    background: rgba(74, 222, 128, .16);
    border-color: var(--cool);
    color: #bbf7d0;
}

.aval-btn.is-on:hover {
    background: rgba(239, 68, 68, .13);
    border-color: rgba(239, 68, 68, .5);
    color: #fca5a5;
}

.aval-btn[disabled] {
    opacity: .55;
    cursor: default;
}

#avales .hint {
    margin: 12px 0 0;
    font-size: 11px;
    line-height: 1.55;
    color: var(--dimmer);
    max-width: 62ch;
}
