/* ==========================================================================
   Sistema visual del portal.
   Las variables de color y tipografia se inyectan desde la configuracion del
   sitio en el layout, de modo que la marca sea un parametro y no una constante.
   ========================================================================== */

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--font-family);
    font-size: 16px;
    line-height: 1.6;
    color: var(--ink);
    background: var(--canvas);
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 .5em; font-weight: 650; letter-spacing: -.01em; }
h1 { font-size: clamp(1.8rem, 1.3rem + 2vw, 2.6rem); }
h2 { font-size: clamp(1.35rem, 1.1rem + 1vw, 1.8rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }

.container { width: min(1180px, 100% - 2.5rem); margin-inline: auto; }
.container-narrow { width: min(760px, 100% - 2.5rem); margin-inline: auto; }

.stack > * + * { margin-top: 1rem; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.tiny { font-size: .8rem; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.visually-hidden {
    position: absolute; width: 1px; height: 1px; overflow: hidden;
    clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

/* ------------------------------------------------------------------ header */

.site-header {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    position: sticky; top: 0; z-index: 50;
}

.site-header__inner {
    display: flex; align-items: center; gap: 1.5rem;
    min-height: 68px;
}

.brand { display: flex; align-items: center; gap: .6rem; font-weight: 700; font-size: 1.05rem; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand__mark { width: 34px; height: 34px; flex: 0 0 auto; }
.brand__name { display: flex; flex-direction: column; line-height: 1.1; }
.brand__tagline { font-size: .68rem; font-weight: 500; color: var(--muted); letter-spacing: .02em; }

.site-nav { display: flex; gap: 1.35rem; margin-left: auto; align-items: center; }
.site-nav a { color: var(--ink); font-size: .93rem; font-weight: 500; }
.site-nav a:hover { color: var(--primary); text-decoration: none; }
.site-nav__cta { margin-left: .25rem; }

.nav-toggle {
    display: none; background: none; border: 1px solid var(--border);
    border-radius: 10px; padding: .5rem .65rem; cursor: pointer; margin-left: auto;
}

@media (max-width: 900px) {
    .nav-toggle { display: block; }
    .site-nav {
        display: none; position: absolute; top: 68px; left: 0; right: 0;
        background: var(--surface); border-bottom: 1px solid var(--border);
        flex-direction: column; align-items: stretch; gap: 0; padding: .5rem 1.25rem 1rem;
    }
    .site-nav.is-open { display: flex; }
    .site-nav a { padding: .7rem 0; border-bottom: 1px solid var(--border); }
    .site-nav .btn { margin-top: .75rem; text-align: center; }
}

/* ------------------------------------------------------------------ botones */

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
    padding: .62rem 1.15rem; border-radius: 999px; border: 1px solid transparent;
    font-size: .93rem; font-weight: 600; cursor: pointer; transition: .15s ease;
    font-family: inherit; text-decoration: none;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: none; }
.btn--primary { background: var(--primary); color: #fff; }
.btn--primary:hover { background: var(--primary-dark); color: #fff; }
.btn--ghost { background: transparent; color: var(--primary); border-color: var(--border); }
.btn--ghost:hover { border-color: var(--primary); background: var(--primary-soft); }
.btn--accent { background: var(--accent); color: #fff; }
.btn--accent:hover { filter: brightness(.94); color: #fff; }
.btn--block { width: 100%; }
.btn--sm { padding: .4rem .85rem; font-size: .84rem; }
.btn--danger { background: var(--risk); color: #fff; }

/* ------------------------------------------------------------------ tarjetas */

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}
.card--pad { padding: 1.35rem; }
.card--hover { transition: box-shadow .18s ease, transform .18s ease; }
.card--hover:hover { box-shadow: 0 12px 30px -18px rgba(16, 40, 34, .45); transform: translateY(-2px); }

.panel {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 1.5rem;
}

.grid { display: grid; gap: 1.25rem; }
.grid--3 { grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }

/* --------------------------------------------------------------------- hero */

.hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    color: #fff;
    background:
        radial-gradient(120% 90% at 85% 0%, rgba(72, 168, 140, .38) 0%, rgba(72, 168, 140, 0) 55%),
        linear-gradient(155deg, #17705c 0%, #0f5645 48%, #0b3f34 100%);
    padding: clamp(2.5rem, 2rem + 4vw, 4.25rem) 0 clamp(4rem, 3rem + 5vw, 6rem);
}

/* Trama topografica: da textura sin competir con el texto. */
.hero::before {
    content: "";
    position: absolute; inset: 0;
    background-image:
        repeating-linear-gradient(115deg, rgba(255, 255, 255, .05) 0 1px, transparent 1px 46px),
        repeating-linear-gradient(65deg, rgba(255, 255, 255, .04) 0 1px, transparent 1px 62px);
    opacity: .8;
    z-index: -1;
}

.hero__glow {
    position: absolute;
    width: 46rem; height: 46rem;
    top: -18rem; right: -14rem;
    background: radial-gradient(circle, rgba(126, 217, 187, .32) 0%, rgba(126, 217, 187, 0) 68%);
    border-radius: 50%;
    z-index: -1;
    animation: heroGlow 16s ease-in-out infinite alternate;
}
@keyframes heroGlow {
    from { transform: translate3d(0, 0, 0) scale(1); }
    to   { transform: translate3d(-3rem, 2rem, 0) scale(1.12); }
}

.hero__grid {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
    grid-template-areas:
        "copy art"
        "buscador buscador"
        "cifras cifras";
    column-gap: clamp(1.5rem, 1rem + 3vw, 3.5rem);
    align-items: center;
}
.hero__copy { grid-area: copy; }
.hero__art { grid-area: art; }
.hero .searchbar { grid-area: buscador; }
.hero__stats { grid-area: cifras; }

@media (max-width: 940px) {
    .hero__grid {
        grid-template-columns: minmax(0, 1fr);
        grid-template-areas: "copy" "art" "buscador" "cifras";
    }
    .hero__art { margin-top: 1.5rem; }
}

.hero__eyebrow {
    display: inline-flex; align-items: center; gap: .55rem;
    font-size: .82rem; font-weight: 600; letter-spacing: .01em;
    padding: .35rem .85rem .35rem .6rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, .12);
    border: 1px solid rgba(255, 255, 255, .18);
    color: rgba(255, 255, 255, .92);
    margin-bottom: 1.1rem;
}
.hero__pulse {
    width: .5rem; height: .5rem; border-radius: 50%;
    background: #7ee0b8;
    box-shadow: 0 0 0 0 rgba(126, 224, 184, .7);
    animation: heroPulse 2.4s ease-out infinite;
}
@keyframes heroPulse {
    0%   { box-shadow: 0 0 0 0 rgba(126, 224, 184, .65); }
    70%  { box-shadow: 0 0 0 .55rem rgba(126, 224, 184, 0); }
    100% { box-shadow: 0 0 0 0 rgba(126, 224, 184, 0); }
}

.hero h1 { color: #fff; max-width: 19ch; font-size: clamp(2rem, 1.4rem + 2.6vw, 3.15rem); }

/* El enfasis va en un tono calido solido, no en un degradado: sobre el verde
   profundo un degradado que empieza claro pierde legibilidad justo en la palabra
   que mas importa. El subrayado se dibuja solo, despues del titulo. */
.hero h1 em {
    font-style: normal;
    color: #ffd07a;
    position: relative;
    white-space: nowrap;
}
.hero h1 em::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: -.12em;
    height: .1em;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(255, 208, 122, .25) 0%, #ffd07a 35%, #7ee0b8 100%);
    transform: scaleX(0);
    transform-origin: left;
    animation: subrayar .8s cubic-bezier(.22, .9, .3, 1) .55s forwards;
}
@keyframes subrayar { to { transform: scaleX(1); } }
.hero__lead { font-size: 1.06rem; max-width: 56ch; color: rgba(255, 255, 255, .88); }

.hero__stats { display: flex; flex-wrap: wrap; gap: 2.5rem; margin-top: 1.9rem; }
.hero__stat strong { display: block; font-size: 1.9rem; line-height: 1.1; font-variant-numeric: tabular-nums; }
.hero__stat span { font-size: .85rem; color: rgba(255, 255, 255, .78); }

/* Curva que empalma con el fondo de la pagina. */
.hero__wave {
    position: absolute; left: 0; right: 0; bottom: -1px;
    color: var(--canvas);
    line-height: 0;
    pointer-events: none;
}
.hero__wave svg { width: 100%; height: clamp(38px, 5vw, 74px); display: block; }

/* --------------------------------------------------------- ilustracion hero */

.hero__art { position: relative; }
.hero__scene {
    width: 100%; height: auto;
    border-radius: 28px;
    box-shadow: 0 40px 70px -40px rgba(0, 0, 0, .75);
    animation: heroFlotar 9s ease-in-out infinite;
}
@keyframes heroFlotar {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-12px); }
}

/* Ficha de muestra: lo que el portal promete, dicho con el mismo lenguaje visual
   que usan las fichas reales. */
.hero-ficha {
    position: absolute;
    left: -1.75rem;
    bottom: -1.25rem;
    width: min(16.5rem, 68%);
    background: var(--surface);
    color: var(--ink);
    border-radius: 18px;
    padding: .95rem 1.05rem 1.05rem;
    box-shadow: 0 30px 55px -25px rgba(0, 0, 0, .55);
    animation: heroFlotar 9s ease-in-out infinite;
    animation-delay: -4.5s;
}
.hero-ficha__head {
    display: flex; align-items: baseline; justify-content: space-between; gap: .75rem;
    padding-bottom: .6rem; margin-bottom: .6rem;
    border-bottom: 1px solid var(--border);
}
.hero-ficha__type { font-weight: 650; font-size: .95rem; }
.hero-ficha__price { font-weight: 700; color: var(--primary); font-size: .95rem; white-space: nowrap; }

.hero-ficha__list { list-style: none; margin: 0; padding: 0; display: grid; gap: .42rem; }
/* El relleno va hacia atras, no hacia adelante: si la animacion se interrumpe o el
   navegador no la corre, la linea queda visible igual. Nada de la ficha depende de
   que una animacion termine. */
.hero-ficha__item {
    display: flex; align-items: center; gap: .5rem;
    font-size: .845rem; color: var(--muted);
    animation: fichaEntra .5s ease-out backwards;
}
.hero-ficha__item:nth-child(1) { animation-delay: .75s; }
.hero-ficha__item:nth-child(2) { animation-delay: .95s; }
.hero-ficha__item:nth-child(3) { animation-delay: 1.15s; }
.hero-ficha__item:nth-child(4) { animation-delay: 1.35s; }
@keyframes fichaEntra {
    from { opacity: 0; transform: translateX(-.6rem); }
    to   { opacity: 1; transform: none; }
}
.hero-ficha__dot { width: .5rem; height: .5rem; border-radius: 50%; flex: none; }
.hero-ficha__item--good .hero-ficha__dot { background: var(--good); }
.hero-ficha__item--warn .hero-ficha__dot { background: var(--warn); }

.hero-ficha__meter { margin-top: .85rem; }
.hero-ficha__bar { height: .38rem; border-radius: 999px; background: var(--primary-soft); overflow: hidden; }
.hero-ficha__bar span {
    display: block; height: 100%; width: var(--nivel, 0%);
    border-radius: inherit;
    background: linear-gradient(90deg, var(--primary) 0%, var(--good) 100%);
    transform-origin: left;
    animation: fichaBarra 1.1s cubic-bezier(.22, .9, .3, 1) 1.5s backwards;
}
@keyframes fichaBarra { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.hero-ficha__score { display: block; margin-top: .4rem; font-size: .76rem; color: var(--muted); }

/* En una columna la ilustracion ya ocupa todo el ancho: si la ficha siguiera
   sobresaliendo por la izquierda se saldria de la pantalla. Va despues de la regla
   base a proposito, no antes: con la misma especificidad manda la ultima. */
@media (max-width: 940px) {
    .hero-ficha {
        left: 1rem;
        bottom: -1rem;
        width: min(17rem, calc(100% - 2rem));
    }
}

/* ------------------------------------------------------- entrada escalonada */

.reveal { animation: revelar .7s cubic-bezier(.2, .8, .3, 1) both; }
.reveal--1 { animation-delay: .07s; }
.reveal--2 { animation-delay: .14s; }
.reveal--3 { animation-delay: .1s; }
.reveal--4 { animation-delay: .22s; }
.reveal--5 { animation-delay: .3s; }
@keyframes revelar {
    from { opacity: 0; transform: translateY(1.1rem); }
    to   { opacity: 1; transform: none; }
}

/* Quien pide menos movimiento ve la misma pagina, quieta. */
@media (prefers-reduced-motion: reduce) {
    .hero__glow, .hero__pulse, .hero__scene, .hero-ficha, .hero h1 em::after,
    .hero-ficha__item, .hero-ficha__bar span, .reveal {
        animation: none !important;
        opacity: 1 !important;
        transform: none !important;
    }
}

/* ----------------------------------------------------------------- buscador */

.searchbar {
    background: var(--surface); border-radius: var(--radius);
    padding: 1rem; margin-top: 2rem;
    box-shadow: 0 20px 45px -30px rgba(0, 0, 0, .6);
}
.searchbar__row { display: grid; grid-template-columns: 1.6fr 1fr 1fr auto; gap: .75rem; }
@media (max-width: 800px) { .searchbar__row { grid-template-columns: 1fr; } }

.searchbar__chips { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .85rem; }

/* ---------------------------------------------------------------- formulario */

label { display: block; font-size: .85rem; font-weight: 600; margin-bottom: .3rem; color: var(--ink); }

input[type=text], input[type=email], input[type=password], input[type=number],
input[type=search], input[type=tel], input[type=url], select, textarea {
    width: 100%; padding: .6rem .8rem; font-size: .95rem; font-family: inherit;
    border: 1px solid var(--border); border-radius: 10px; background: var(--surface);
    color: var(--ink); transition: border-color .15s ease, box-shadow .15s ease;
}
input:focus, select:focus, textarea:focus {
    outline: none; border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-soft);
}
textarea { min-height: 140px; resize: vertical; line-height: 1.55; }
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%235d6b68' d='M1 1l5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right .8rem center; padding-right: 2rem; }

.field { margin-bottom: 1.1rem; }
.field__hint { font-size: .8rem; color: var(--muted); margin-top: .3rem; }
.field-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 1rem; }

.check { display: flex; align-items: flex-start; gap: .55rem; font-weight: 500; font-size: .9rem; margin-bottom: .55rem; }
.check input { width: auto; margin-top: .2rem; flex: 0 0 auto; }
.check label { margin: 0; font-weight: 500; }

.checkgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: .35rem 1.25rem; }

.validation-summary-errors, .field-validation-error, .text-danger {
    color: var(--risk); font-size: .85rem;
}
.validation-summary-errors ul { margin: .4rem 0 0; padding-left: 1.1rem; }

fieldset { border: none; padding: 0; margin: 0 0 2rem; }
legend { font-weight: 650; font-size: 1.05rem; padding: 0; margin-bottom: .25rem; }

/* --------------------------------------------------------------- indicadores */

.badge {
    display: inline-flex; align-items: center; gap: .35rem;
    padding: .2rem .6rem; border-radius: 999px;
    font-size: .76rem; font-weight: 600; line-height: 1.5;
    border: 1px solid transparent; white-space: nowrap;
}
.badge__dot { width: .5rem; height: .5rem; border-radius: 50%; background: currentColor; flex: 0 0 auto; }

.tone-good { background: #e8f5ee; color: var(--good); border-color: #c6e6d5; }
.tone-warn { background: #fdf3e0; color: var(--warn); border-color: #f2ddb6; }
.tone-risk { background: #fdecec; color: var(--risk); border-color: #f4cdcd; }
.tone-unknown { background: #eef1f0; color: var(--muted); border-color: var(--border); }

.badges { display: flex; flex-wrap: wrap; gap: .4rem; }

.chip {
    display: inline-flex; align-items: center; gap: .3rem;
    padding: .35rem .8rem; border-radius: 999px; font-size: .82rem;
    border: 1px solid var(--border); background: var(--surface); color: var(--ink);
}
.chip:hover { border-color: var(--primary); color: var(--primary); text-decoration: none; }
.chip--active { background: var(--primary); border-color: var(--primary); color: #fff; }

/* --------------------------------------------------- indice de transparencia */

.meter { display: flex; align-items: center; gap: .75rem; }
.meter__track {
    flex: 1; height: 8px; border-radius: 999px; background: #e7ecea; overflow: hidden;
}
.meter__fill { height: 100%; border-radius: 999px; transition: width .4s ease; }
.meter__fill--good { background: var(--good); }
.meter__fill--warn { background: var(--warn); }
.meter__fill--risk { background: var(--risk); }
.meter__value { font-weight: 700; font-size: .95rem; min-width: 3.2rem; text-align: right; }

.transparency-list { list-style: none; margin: 0; padding: 0; }
.transparency-list li {
    display: flex; gap: .7rem; padding: .7rem 0; border-bottom: 1px solid var(--border);
}
.transparency-list li:last-child { border-bottom: none; }
.transparency-list__icon { flex: 0 0 1.25rem; font-weight: 700; line-height: 1.5; }
.transparency-list__icon--yes { color: var(--good); }
.transparency-list__icon--no { color: var(--muted); }
.transparency-list__label { font-weight: 600; font-size: .9rem; }
.transparency-list__detail { font-size: .85rem; color: var(--muted); }

/* ------------------------------------------------------------ tarjeta aviso */

.listing-card { display: flex; flex-direction: column; height: 100%; }
.listing-card__media { position: relative; aspect-ratio: 16 / 10; background: var(--primary-soft); }
.listing-card__media img { width: 100%; height: 100%; object-fit: cover; }
.listing-card__flag {
    position: absolute; left: .7rem; top: .7rem;
    backdrop-filter: blur(4px);
}
.listing-card__score {
    position: absolute; right: .7rem; top: .7rem;
    background: rgba(255, 255, 255, .95); border-radius: 999px;
    padding: .2rem .6rem; font-size: .75rem; font-weight: 700;
}
.listing-card__body { padding: 1rem 1.1rem 1.2rem; display: flex; flex-direction: column; flex: 1; }
.listing-card__price { font-size: 1.22rem; font-weight: 700; line-height: 1.2; }
.listing-card__price-alt { font-size: .82rem; color: var(--muted); }
.listing-card__title {
    font-size: .98rem; font-weight: 600; margin: .5rem 0 .3rem; color: var(--ink);
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.listing-card__title:hover { color: var(--primary); text-decoration: none; }
.listing-card__place { font-size: .85rem; color: var(--muted); }
.listing-card__features { font-size: .84rem; color: var(--muted); margin-top: .45rem; }
.listing-card__legal { margin-top: .8rem; padding-top: .8rem; border-top: 1px solid var(--border); }

/* ----------------------------------------------------------- ficha detallada */

.listing-hero { display: grid; grid-template-columns: 1.7fr 1fr; gap: 1.5rem; }
@media (max-width: 950px) { .listing-hero { grid-template-columns: 1fr; } }

.gallery { display: grid; gap: .5rem; grid-template-columns: repeat(4, 1fr); }
.gallery__main { grid-column: 1 / -1; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: var(--primary-soft); }
.gallery__main img { width: 100%; height: 100%; object-fit: cover; }
.gallery__thumb { aspect-ratio: 4 / 3; border-radius: 10px; overflow: hidden; cursor: pointer; border: 2px solid transparent; background: none; padding: 0; }
.gallery__thumb img { width: 100%; height: 100%; object-fit: cover; }
.gallery__thumb--active { border-color: var(--primary); }

.legal-block { border-left: 3px solid var(--border); padding-left: 1rem; margin-bottom: 1.1rem; }
.legal-block--good { border-color: var(--good); }
.legal-block--warn { border-color: var(--warn); }
.legal-block--risk { border-color: var(--risk); }
.legal-block--unknown { border-color: var(--border); }
.legal-block__title { font-weight: 650; font-size: .95rem; margin-bottom: .15rem; }
.legal-block__text { font-size: .88rem; color: var(--muted); margin: 0; }

.spec-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1rem 1.5rem; }
.spec { border-top: 1px solid var(--border); padding-top: .6rem; }
.spec__label { font-size: .78rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.spec__value { font-weight: 650; }

.sticky-box { position: sticky; top: 88px; }

/* ------------------------------------------------------------------ layout */

.page { padding: 2.25rem 0 3.5rem; }
.page__header { margin-bottom: 1.75rem; }

.layout-split { display: grid; grid-template-columns: 290px 1fr; gap: 1.75rem; align-items: start; }
@media (max-width: 1000px) { .layout-split { grid-template-columns: 1fr; } }

.filters { position: sticky; top: 88px; }
.filters__group { border-bottom: 1px solid var(--border); padding: 1rem 0; }
.filters__group:first-child { padding-top: 0; }
.filters__group:last-child { border-bottom: none; }
.filters__legend { font-size: .82rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-bottom: .6rem; font-weight: 600; }

.breadcrumbs { font-size: .82rem; color: var(--muted); margin-bottom: .85rem; }
.breadcrumbs a { color: var(--muted); }
.breadcrumbs span + span::before { content: " / "; padding: 0 .3rem; }

.toolbar { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; justify-content: space-between; margin-bottom: 1.25rem; }

.pager { display: flex; gap: .4rem; justify-content: center; margin-top: 2.5rem; flex-wrap: wrap; }
.pager a, .pager span {
    min-width: 2.4rem; text-align: center; padding: .45rem .7rem;
    border: 1px solid var(--border); border-radius: 10px; font-size: .88rem; background: var(--surface);
}
.pager .is-current { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 600; }

.empty { text-align: center; padding: 3.5rem 1.5rem; color: var(--muted); }

.alert { padding: .85rem 1.1rem; border-radius: 10px; font-size: .9rem; margin-bottom: 1.25rem; }
.alert--ok { background: #e8f5ee; color: var(--good); border: 1px solid #c6e6d5; }
.alert--error { background: #fdecec; color: var(--risk); border: 1px solid #f4cdcd; }
.alert--info { background: var(--primary-soft); color: var(--primary-dark); border: 1px solid #c9e0d8; }

table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th, td { text-align: left; padding: .6rem .7rem; border-bottom: 1px solid var(--border); vertical-align: top; }
th { font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.table-wrap { overflow-x: auto; }

/* ---------------------------------------------------------------- mensajeria */

.thread { display: flex; flex-direction: column; gap: .85rem; }
.message { max-width: 78%; padding: .8rem 1rem; border-radius: 14px; font-size: .92rem; }
.message--in { background: var(--surface); border: 1px solid var(--border); align-self: flex-start; }
.message--out { background: var(--primary-soft); border: 1px solid #c9e0d8; align-self: flex-end; }
.message__meta { font-size: .75rem; color: var(--muted); margin-top: .35rem; }
.message--flagged { border-color: var(--warn); }

/* --------------------------------------------------------------------- pie */

.site-footer {
    background: var(--primary-dark); color: rgba(255, 255, 255, .82);
    padding: 3rem 0 2rem; margin-top: 3rem; font-size: .9rem;
}
.site-footer a { color: rgba(255, 255, 255, .82); }
.site-footer a:hover { color: #fff; }
.site-footer h4 { color: #fff; font-size: .85rem; text-transform: uppercase; letter-spacing: .06em; margin-bottom: .8rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: .45rem; }
.site-footer__bottom {
    margin-top: 2.25rem; padding-top: 1.5rem; border-top: 1px solid rgba(255, 255, 255, .16);
    display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; font-size: .82rem;
}

/* -------------------------------------------------------------------- otros */

.prose { max-width: 68ch; }
.prose h2 { margin-top: 2.25rem; }
.prose ul { padding-left: 1.2rem; }
.prose li { margin-bottom: .4rem; }

.callout {
    background: var(--primary-soft); border-left: 3px solid var(--primary);
    padding: 1rem 1.25rem; border-radius: 0 10px 10px 0; margin: 1.5rem 0;
}

.analysis { margin-top: 1rem; }
.analysis__item { display: flex; gap: .6rem; padding: .6rem 0; border-bottom: 1px solid var(--border); }
.analysis__item:last-child { border-bottom: none; }

@media print {
    .site-header, .site-footer, .btn, .filters { display: none; }
}
