/* ==============================================================
   Rifinitura editoriale/SEO: patrimonio linguistico, libri e rete
   ============================================================== */

/* La rete dei Comuni torna spaziale: sfondo blu, testi bianchi, mappa chiara. */
.home-live .home-map-section {
    position: relative;
    overflow: hidden;
    color: #fff;
    background:
        radial-gradient(circle at 8% 18%, rgba(53, 211, 155, .22), transparent 30%),
        radial-gradient(circle at 90% 12%, rgba(41, 199, 232, .20), transparent 30%),
        radial-gradient(circle at 72% 90%, rgba(139, 118, 255, .16), transparent 34%),
        linear-gradient(145deg, #06162c 0%, #0b2d56 56%, #0d4380 100%);
}

.home-live .home-map-section::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: .38;
    background-image:
        linear-gradient(rgba(255,255,255,.038) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.038) 1px, transparent 1px),
        radial-gradient(circle at 18% 28%, #fff 0 1px, transparent 1.7px),
        radial-gradient(circle at 86% 68%, var(--hl-green) 0 1px, transparent 1.8px);
    background-size: 58px 58px, 58px 58px, 118px 118px, 164px 164px;
}

.home-live .home-map-layout {
    position: relative;
    z-index: 1;
}

.home-live .home-map-copy h2,
.home-live .home-map-copy h2 strong {
    color: #fff;
}

.home-live .home-map-copy h2 strong {
    color: var(--hl-yellow);
    text-shadow: 0 0 34px rgba(242, 199, 92, .22);
}

.home-live .home-map-copy > p:not(.home-space-kicker) {
    color: rgba(255,255,255,.76);
}

.home-live .home-map-section .home-space-kicker {
    color: var(--hl-green);
}

.home-live .home-map-stats article {
    border-color: rgba(255,255,255,.7);
    background: rgba(255,255,255,.96);
    box-shadow: 0 18px 44px rgba(0, 15, 36, .23);
}

.home-live .home-map-stats strong {
    color: var(--hl-blue);
}

.home-live .home-map-stats span {
    color: var(--hl-muted);
}

.home-live .home-map-section .home-btn--dark {
    color: #fff;
    border-color: rgba(255,255,255,.26);
    background: rgba(255,255,255,.10);
    backdrop-filter: blur(12px);
    box-shadow: none;
}

.home-live .home-map-section .home-btn--dark:hover,
.home-live .home-map-section .home-btn--dark:focus {
    color: var(--hl-navy);
    background: #fff;
}

.home-live .home-map-stage {
    border-color: rgba(255,255,255,.55);
    background: #edf5fb;
    box-shadow: 0 34px 90px rgba(0, 14, 35, .34);
}

/* Libri: copertine a larghezza piena e tutti i libri vuoti paginati lato server. */
.home-live .home-books-section {
    background:
        radial-gradient(circle at 92% 8%, rgba(242, 199, 92, .18), transparent 28%),
        radial-gradient(circle at 8% 74%, rgba(29, 94, 216, .08), transparent 30%),
        linear-gradient(180deg, #fff 0%, #f4f8fd 100%);
}

.home-live .home-book-group {
    position: relative;
    margin-top: 2rem;
    padding: clamp(1.25rem, 2.6vw, 2rem);
    border: 1px solid rgba(48, 92, 139, .14);
    border-radius: 30px;
    background: rgba(255,255,255,.82);
    box-shadow: 0 24px 70px rgba(25, 60, 98, .09);
}

.home-live .home-book-group--active {
    background:
        radial-gradient(circle at 100% 0%, rgba(53, 211, 155, .11), transparent 30%),
        rgba(255,255,255,.92);
}

.home-live .home-book-group--waiting {
    margin-top: 2.6rem;
    background:
        radial-gradient(circle at 0% 0%, rgba(255, 118, 95, .10), transparent 30%),
        rgba(255,255,255,.92);
    scroll-margin-top: 110px;
}

.home-live .home-book-group__head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1.5rem;
    margin-bottom: 1.35rem;
}

.home-live .home-book-group__head > div {
    max-width: 850px;
}

.home-live .home-book-group__head span {
    color: var(--hl-blue);
    font-size: .7rem;
    font-weight: 950;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.home-live .home-book-group--waiting .home-book-group__head span {
    color: #ca563f;
}

.home-live .home-book-group__head h3 {
    margin: .45rem 0 0;
    color: var(--hl-ink);
    font-size: clamp(1.45rem, 2.45vw, 2.55rem);
    line-height: 1.05;
    letter-spacing: -.035em;
}

.home-live .home-book-group__head > p {
    flex: 0 0 auto;
    margin: 0;
    padding: .8rem 1rem;
    border-radius: 14px;
    color: var(--hl-muted);
    background: #f1f6fb;
    font-size: .78rem;
    font-weight: 800;
}

.home-live .home-book-group__head > p strong {
    display: block;
    color: var(--hl-blue);
    font-size: 1.45rem;
    line-height: 1;
}

.home-live .home-book-group--waiting .home-book-group__head > p strong {
    color: var(--hl-coral);
}

.home-live .home-book-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.2rem;
}

.home-live .home-book-card {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: minmax(230px, auto) 1fr;
    min-width: 0;
    min-height: 470px;
    overflow: hidden;
    border: 1px solid rgba(42, 86, 133, .15);
    border-radius: 25px;
    background: #fff;
    box-shadow: 0 18px 48px rgba(25, 60, 98, .10);
}

.home-live .home-book-card:hover {
    transform: translateY(-6px);
    border-color: rgba(29, 94, 216, .28);
    box-shadow: 0 30px 70px rgba(25, 60, 98, .17);
}

.home-live .home-book-cover {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-width: 0;
    min-height: 230px;
    padding: 1.35rem;
    color: #fff;
    background:
        radial-gradient(circle at 78% 18%, rgba(255,255,255,.18), transparent 23%),
        linear-gradient(145deg, #08264d 0%, #1d5ed8 68%, #29c7e8 100%);
}

.home-live .home-book-card--waiting .home-book-cover {
    background:
        radial-gradient(circle at 80% 18%, rgba(255,255,255,.15), transparent 23%),
        linear-gradient(145deg, #29364b 0%, #52657f 68%, #7d8da2 100%);
}

.home-live .home-book-cover::before {
    width: 220px;
    height: 220px;
    right: -98px;
    bottom: -116px;
}

.home-live .home-book-cover::after {
    width: 120px;
    height: 120px;
    right: -20px;
    bottom: -38px;
}

.home-live .home-book-cover__top,
.home-live .home-book-cover__foot {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .7rem;
}

.home-live .home-book-cover__top span,
.home-live .home-book-cover__top small,
.home-live .home-book-cover__foot b,
.home-live .home-book-cover__foot span {
    position: static;
}

.home-live .home-book-cover__top span {
    font-size: .67rem;
    font-weight: 950;
    letter-spacing: .14em;
}

.home-live .home-book-cover__top small,
.home-live .home-book-cover__foot span {
    color: rgba(255,255,255,.76);
    font-size: .68rem;
}

.home-live .home-book-cover__title {
    position: relative;
    z-index: 2;
    min-width: 0;
    margin: 1.3rem 0;
}

.home-live .home-book-cover__title > small {
    display: block;
    color: rgba(255,255,255,.75);
    font-size: .8rem;
}

.home-live .home-book-cover__title h3 {
    max-width: 100%;
    margin: .3rem 0 0;
    color: #fff;
    font-size: clamp(1.55rem, 2.15vw, 2.25rem);
    line-height: .98;
    letter-spacing: -.045em;
    overflow-wrap: anywhere;
    hyphens: auto;
}

.home-live .home-book-cover__title h3.is-long {
    font-size: clamp(1.35rem, 1.9vw, 1.9rem);
    line-height: 1.02;
}

.home-live .home-book-cover__title h3.is-very-long {
    font-size: clamp(1.12rem, 1.62vw, 1.62rem);
    line-height: 1.06;
}

.home-live .home-book-cover__foot b {
    display: grid;
    place-items: center;
    min-width: 40px;
    height: 30px;
    padding: 0 .55rem;
    border: 1px solid rgba(255,255,255,.28);
    border-radius: 9px;
    background: rgba(255,255,255,.10);
    font-size: .72rem;
}

.home-live .home-book-meta {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: .85rem;
    padding: 1.25rem 1.35rem 1.35rem;
}

.home-live .home-book-status {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    width: fit-content;
    padding: .42rem .65rem;
    border-radius: 999px;
    font-size: .68rem;
    font-weight: 950;
    letter-spacing: .035em;
    text-transform: uppercase;
}

.home-live .home-book-status i {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.home-live .home-book-status--active {
    color: #0a6848;
    background: rgba(53, 211, 155, .13);
}

.home-live .home-book-status--active i {
    background: var(--hl-green);
    box-shadow: 0 0 0 5px rgba(53, 211, 155, .12);
}

.home-live .home-book-status--waiting {
    color: #a34432;
    background: rgba(255, 118, 95, .12);
}

.home-live .home-book-status--waiting i {
    background: var(--hl-coral);
    box-shadow: 0 0 0 5px rgba(255, 118, 95, .10);
}

.home-live .home-book-meta > p {
    margin: 0;
    color: var(--hl-muted);
    font-size: .84rem;
    line-height: 1.55;
}

.home-live .home-book-metrics {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .65rem;
}

.home-live .home-book-metrics span {
    padding: .72rem;
    border-radius: 13px;
    color: var(--hl-muted);
    background: #f2f6fb;
    font-size: .68rem;
    font-weight: 800;
}

.home-live .home-book-metrics strong {
    display: block;
    color: var(--hl-ink);
    font-size: 1.15rem;
}

.home-live .home-book-meta > a {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: .65rem;
    margin-top: auto;
    padding: .75rem .85rem;
    border-radius: 12px;
    color: #fff;
    background: var(--hl-blue);
    font-size: .77rem;
    font-weight: 950;
    text-decoration: none;
}

.home-live .home-book-card--waiting .home-book-meta > a {
    color: #fff;
    background: #cc5b46;
}

.home-live .home-book-card--message {
    grid-column: 1 / -1;
    min-height: 0;
    grid-template-rows: auto;
    padding: 2rem;
}

.home-live .home-book-card--message span {
    color: var(--hl-blue);
    font-size: .7rem;
    font-weight: 950;
    letter-spacing: .12em;
}

.home-live .home-book-card--message h3 {
    margin: .45rem 0;
    color: var(--hl-ink);
}

.home-live .home-book-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.2rem;
    margin-top: 1.35rem;
    padding: 1rem 1.1rem;
    border: 1px solid rgba(45, 91, 139, .14);
    border-radius: 17px;
    background: #f4f8fc;
}

.home-live .home-book-pagination strong,
.home-live .home-book-pagination span {
    display: block;
}

.home-live .home-book-pagination strong {
    color: var(--hl-ink);
    font-size: .85rem;
}

.home-live .home-book-pagination span {
    margin-top: .2rem;
    color: var(--hl-muted);
    font-size: .7rem;
}

.home-live .home-book-pagination__actions {
    display: flex;
    align-items: center;
    gap: .5rem;
    flex: 0 0 auto;
}

.home-live .home-book-pagination__actions a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: .58rem .75rem;
    border: 1px solid rgba(29, 94, 216, .18);
    border-radius: 10px;
    color: var(--hl-blue);
    background: #fff;
    font-size: .75rem;
    font-weight: 950;
    text-decoration: none;
}

.home-live .home-book-pagination__actions a:hover,
.home-live .home-book-pagination__actions a:focus {
    color: #fff;
    background: var(--hl-blue);
}

/* Compagnie: sfondo blu spaziale, card bianche più leggibili e percorso visivo. */
.home-live .home-companies-section {
    position: relative;
    overflow: hidden;
    color: #fff;
    background:
        radial-gradient(circle at 14% 15%, rgba(139, 118, 255, .24), transparent 31%),
        radial-gradient(circle at 88% 76%, rgba(41, 199, 232, .21), transparent 31%),
        linear-gradient(145deg, #06162d 0%, #102d5a 58%, #174985 100%);
}

.home-live .home-companies-section::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: .36;
    background-image:
        linear-gradient(rgba(255,255,255,.034) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.034) 1px, transparent 1px);
    background-size: 58px 58px;
}

.home-live .home-companies-section .container-fluid {
    position: relative;
    z-index: 1;
}

.home-live .home-companies-section .home-space-head h2 {
    color: #fff;
}

.home-live .home-companies-section .home-space-head p:not(.home-space-kicker) {
    color: rgba(255,255,255,.76);
}

.home-live .home-companies-section .home-space-kicker {
    color: var(--hl-green);
}

.home-live .home-companies-section .home-orbit {
    border-color: rgba(255,255,255,.15);
}

.home-live .home-companies-section .home-btn--dark {
    color: #fff;
    border-color: rgba(255,255,255,.26);
    background: rgba(255,255,255,.10);
    box-shadow: none;
    backdrop-filter: blur(12px);
}

.home-live .home-companies-section .home-btn--dark:hover,
.home-live .home-companies-section .home-btn--dark:focus {
    color: var(--hl-navy);
    background: #fff;
}

.home-live .home-company-grid {
    position: relative;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.15rem;
}

.home-live .home-company-grid::before {
    content: "";
    position: absolute;
    z-index: -1;
    top: 48px;
    right: 6%;
    left: 6%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(105,239,189,.5), rgba(41,199,232,.5), transparent);
    box-shadow: 0 0 18px rgba(53,211,155,.26);
}

.home-live .home-company-card {
    position: relative;
    min-height: 330px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,.68);
    border-top: 4px solid var(--hl-green);
    border-radius: 23px;
    color: var(--hl-ink);
    background: rgba(255,255,255,.97);
    box-shadow: 0 24px 60px rgba(0, 16, 40, .25);
}

.home-live .home-company-card::after {
    content: "";
    position: absolute;
    right: -55px;
    bottom: -55px;
    width: 130px;
    height: 130px;
    border: 1px dashed rgba(29, 94, 216, .13);
    border-radius: 50%;
    animation: home-spin 18s linear infinite;
}

.home-live .home-company-card:nth-child(2n) {
    border-top-color: var(--hl-cyan);
}

.home-live .home-company-card:nth-child(3n) {
    border-top-color: var(--hl-yellow);
}

.home-live .home-company-card:hover {
    transform: translateY(-7px);
    border-color: rgba(255,255,255,.9);
    background: #fff;
    box-shadow: 0 34px 75px rgba(0, 18, 45, .32);
}

.home-live .home-company-emblem {
    width: 64px;
    height: 64px;
    color: #08724f;
    border-color: rgba(53, 211, 155, .38);
    background: radial-gradient(circle, rgba(105,239,189,.34), rgba(53,211,155,.06) 72%);
}

.home-live .home-company-emblem i {
    border-color: rgba(29,94,216,.24);
}

.home-live .home-company-rank {
    color: #117b58;
}

.home-live .home-company-card h3 {
    color: var(--hl-ink);
    font-size: 1.45rem;
}

.home-live .home-company-card p {
    color: var(--hl-muted);
    font-size: .86rem;
}

.home-live .home-company-metrics span {
    border: 1px solid rgba(45, 91, 139, .08);
    color: var(--hl-muted);
    background: #f1f6fb;
}

.home-live .home-company-metrics b {
    color: var(--hl-ink);
}

.home-live .home-company-card > a {
    position: relative;
    z-index: 2;
    width: fit-content;
    padding: .65rem .78rem;
    border-radius: 11px;
    color: #fff;
    background: var(--hl-blue);
}

/* Sfida: nello stato "ancora fermi" lo stemma mantiene la stessa dignità visiva. */
.home-live .home-waiting-list .home-waiting-identity {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    align-items: center;
    gap: .8rem;
    flex: 1 1 auto;
    min-width: 0;
}

.home-live .home-waiting-list .home-challenge-crest {
    display: grid;
    place-items: center;
    grid-row: auto;
    flex: 0 0 46px;
    width: 46px;
    height: 46px;
    overflow: hidden;
    border: 1px solid rgba(52,96,142,.16);
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 8px 20px rgba(27,64,102,.10);
}

.home-live .home-waiting-list .home-challenge-crest img {
    display: block;
    width: 100%;
    height: 100%;
    padding: 4px;
    object-fit: contain;
}

body .home-live .home-waiting-list .home-challenge-crest > i {
    display: grid;
    place-items: center;
    grid-row: auto;
    width: 100%;
    height: 100%;
    border-radius: 0;
    color: var(--hl-blue);
    background: #edf4ff;
    box-shadow: none;
    font-size: 1rem;
    font-style: normal;
    font-weight: 950;
}

.home-live .home-waiting-list .home-waiting-identity > span:last-child {
    min-width: 0;
}

.home-live .home-waiting-list .home-waiting-identity b,
.home-live .home-waiting-list .home-waiting-identity small {
    display: block;
}

@media (max-width: 1199px) {
    .home-live .home-book-grid,
    .home-live .home-company-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767px) {
    .home-live .home-map-section,
    .home-live .home-companies-section {
        background-position: center;
    }

    .home-live .home-book-group {
        padding: 1rem;
        border-radius: 22px;
    }

    .home-live .home-book-group__head,
    .home-live .home-book-pagination {
        align-items: flex-start;
        flex-direction: column;
    }

    .home-live .home-book-group__head > p {
        width: 100%;
    }

    .home-live .home-book-grid,
    .home-live .home-company-grid {
        grid-template-columns: 1fr;
    }

    .home-live .home-book-card {
        grid-template-columns: 1fr;
        grid-template-rows: minmax(220px, auto) 1fr;
        min-height: 0;
    }

    .home-live .home-book-cover {
        min-height: 220px;
    }

    .home-live .home-book-pagination__actions {
        width: 100%;
        flex-wrap: wrap;
    }

    .home-live .home-book-pagination__actions a {
        flex: 1 1 auto;
    }

    .home-live .home-company-grid::before {
        display: none;
    }

    .home-live .home-waiting-list > a {
        align-items: stretch;
    }

    .home-live .home-waiting-list .home-waiting-identity {
        width: 100%;
    }
}

/* Percorso narrativo della home: ogni sezione conduce alla successiva. */
.home-flow-section {
    position: relative;
    scroll-margin-top: 104px;
}

.home-flow-next {
    position: relative;
    z-index: 8;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .8rem;
    width: min(720px, calc(100% - 2rem));
    margin: clamp(2rem, 4vw, 3.25rem) auto 0;
    padding: .35rem 0;
    border: 0;
    color: #123f78;
    background: transparent;
    box-shadow: none;
    text-decoration: none;
    transition: color .2s ease, transform .2s ease;
}

.home-flow-next::before,
.home-flow-next::after {
    content: "";
    flex: 1 1 90px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(18, 63, 120, .34));
}

.home-flow-next::after {
    background: linear-gradient(90deg, rgba(18, 63, 120, .34), transparent);
}

.home-flow-next:hover,
.home-flow-next:focus-visible {
    color: #0b315e;
    transform: translateY(-2px);
}

.home-flow-next__copy {
    display: flex;
    align-items: baseline;
    gap: .55rem;
    min-width: 0;
}

.home-flow-next__eyebrow {
    color: currentColor;
    font-size: .65rem;
    font-weight: 900;
    letter-spacing: .12em;
    line-height: 1;
    text-transform: uppercase;
    opacity: .72;
}

.home-flow-next__title {
    color: inherit;
    font-size: .86rem;
    font-weight: 850;
    line-height: 1.15;
}

.home-flow-next__arrow {
    position: relative;
    display: grid;
    place-items: center;
    flex: 0 0 30px;
    width: 30px;
    height: 30px;
    border: 1px solid currentColor;
    border-radius: 50%;
    font-style: normal;
    opacity: .82;
    transition: transform .2s ease, opacity .2s ease;
}

.home-flow-next__arrow::before {
    content: "";
    width: 7px;
    height: 7px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: translateY(-2px) rotate(45deg);
}

.home-flow-next.is-return .home-flow-next__arrow::before {
    transform: translateY(2px) rotate(225deg);
}

.home-flow-next:hover .home-flow-next__arrow,
.home-flow-next:focus-visible .home-flow-next__arrow {
    opacity: 1;
    transform: translateY(3px);
}

.home-flow-next.is-return:hover .home-flow-next__arrow,
.home-flow-next.is-return:focus-visible .home-flow-next__arrow {
    transform: translateY(-3px);
}

.campaign-hero.home-flow-section {
    padding-bottom: clamp(1.6rem, 3vw, 2.6rem);
}

.campaign-hero .home-flow-next {
    margin-top: 0;
}

.campaign-hero .home-flow-next,
.home-diversi .home-flow-next,
.home-movement .home-flow-next,
.home-companies-section .home-flow-next,
#comuni-aderenti .home-flow-next,
.home-final-action .home-flow-next {
    color: #fff;
}

.campaign-hero .home-flow-next::before,
.home-diversi .home-flow-next::before,
.home-movement .home-flow-next::before,
.home-companies-section .home-flow-next::before,
#comuni-aderenti .home-flow-next::before,
.home-final-action .home-flow-next::before {
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .42));
}

.campaign-hero .home-flow-next::after,
.home-diversi .home-flow-next::after,
.home-movement .home-flow-next::after,
.home-companies-section .home-flow-next::after,
#comuni-aderenti .home-flow-next::after,
.home-final-action .home-flow-next::after {
    background: linear-gradient(90deg, rgba(255, 255, 255, .42), transparent);
}

.home-final-action .home-flow-next {
    margin-bottom: clamp(1.5rem, 3vw, 2.5rem);
}

@media (max-width: 767px) {
    .home-flow-section {
        scroll-margin-top: 82px;
    }

    .home-flow-next {
        width: calc(100% - 1.5rem);
        margin-top: 1.6rem;
        gap: .58rem;
    }

    .home-flow-next::before,
    .home-flow-next::after {
        flex-basis: 34px;
    }

    .home-flow-next__copy {
        display: grid;
        gap: .18rem;
        text-align: center;
    }

    .home-flow-next__title {
        max-width: 180px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .home-flow-next__arrow {
        flex-basis: 28px;
        width: 28px;
        height: 28px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .home-flow-next,
    .home-flow-next__arrow {
        transition: none;
    }
}

/* Separazione tra le sezioni della home.
   Nessun gradiente: la sezione successiva si appoggia alla precedente
   come un foglio leggermente sovrapposto, con ombra solo sul bordo superiore. */
.home-flow-section {
    position: relative;
    isolation: isolate;
}

.home-flow-section + .home-flow-section {
    z-index: 2;
    margin-top: -1px;
    box-shadow:
        0 -16px 30px rgba(2, 15, 35, .20),
        0 -4px 10px rgba(2, 15, 35, .12),
        0 -1px 0 rgba(255, 255, 255, .10);
}

/* Evita che eventuali elementi creati da versioni precedenti del JS
   continuino a mostrare raccordi cromatici dopo un aggiornamento parziale. */
.home-flow-blend,
.home-flow-incoming {
    display: none !important;
}

@media (max-width: 767px) {
    .home-flow-section + .home-flow-section {
        box-shadow:
            0 -11px 22px rgba(2, 15, 35, .18),
            0 -3px 8px rgba(2, 15, 35, .10),
            0 -1px 0 rgba(255, 255, 255, .08);
    }
}

/* Home libri: due tab paritarie, ricerca indipendente e paginazione server-side. */
.home-live .home-books-browser {
    position: relative;
    margin-top: clamp(1.5rem, 3vw, 2.5rem);
    border: 1px solid rgba(16, 46, 91, .12);
    border-radius: 28px;
    background: rgba(255, 255, 255, .9);
    box-shadow: 0 24px 70px rgba(8, 31, 68, .11);
    overflow: hidden;
}

.home-live .home-books-browser.is-loading {
    pointer-events: none;
}

.home-live .home-books-browser.is-loading::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 20;
    background: rgba(247, 249, 253, .72);
    backdrop-filter: blur(2px);
}

.home-live .home-books-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border-bottom: 1px solid rgba(16, 46, 91, .12);
    background: #eef3fa;
}

.home-live .home-books-tab {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 82px;
    padding: 1rem clamp(1rem, 2.5vw, 2rem);
    color: #17365f;
    text-decoration: none;
    font-weight: 800;
    border-right: 1px solid rgba(16, 46, 91, .1);
    transition: background-color .2s ease, color .2s ease, box-shadow .2s ease;
}

.home-live .home-books-tab:last-child {
    border-right: 0;
}

.home-live .home-books-tab::after {
    content: '';
    position: absolute;
    left: 1rem;
    right: 1rem;
    bottom: 0;
    height: 4px;
    border-radius: 4px 4px 0 0;
    background: transparent;
}

.home-live .home-books-tab strong {
    display: grid;
    place-items: center;
    min-width: 46px;
    height: 34px;
    padding: 0 .65rem;
    border-radius: 999px;
    background: rgba(23, 54, 95, .1);
    font-size: .88rem;
}

.home-live .home-books-tab:hover,
.home-live .home-books-tab:focus-visible {
    background: #fff;
    color: #0d2e59;
}

.home-live .home-books-tab.is-active {
    background: #fff;
    color: #0b2e5d;
    box-shadow: inset 0 -1px #fff;
}

.home-live .home-books-tab.is-active::after {
    background: #e85d3f;
}

.home-live .home-books-tab.is-active strong {
    color: #fff;
    background: #123f77;
}

.home-live .home-books-panel {
    margin: 0;
    padding: clamp(1.25rem, 3vw, 2.25rem);
    border: 0;
    border-radius: 0;
    box-shadow: none;
    background: #fff;
}

.home-live .home-books-panel[hidden] {
    display: none !important;
}

.home-live .home-books-toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, .8fr);
    align-items: end;
    gap: 1.25rem 2rem;
    margin-bottom: 1.4rem;
}

.home-live .home-books-toolbar__eyebrow {
    display: block;
    margin-bottom: .35rem;
    color: #d34d32;
    font-size: .72rem;
    font-weight: 900;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.home-live .home-books-toolbar h3 {
    max-width: 760px;
    margin: 0;
    color: #102e58;
    font-size: clamp(1.2rem, 2.2vw, 1.75rem);
    line-height: 1.12;
}

.home-live .home-books-search {
    min-width: 0;
}

.home-live .home-books-search > label {
    display: block;
    margin-bottom: .45rem;
    color: #355271;
    font-size: .78rem;
    font-weight: 800;
}

.home-live .home-books-search__field {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: .5rem;
    align-items: center;
}

.home-live .home-books-search__field input {
    width: 100%;
    min-width: 0;
    height: 44px;
    padding: 0 .9rem;
    border: 1px solid rgba(16, 46, 91, .2);
    border-radius: 12px;
    color: #102e58;
    background: #f7f9fc;
    outline: 0;
}

.home-live .home-books-search__field input:focus {
    border-color: #1f5d9a;
    box-shadow: 0 0 0 3px rgba(31, 93, 154, .13);
    background: #fff;
}

.home-live .home-books-search__field button,
.home-live .home-books-search__field a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 44px;
    padding: 0 .9rem;
    border: 0;
    border-radius: 12px;
    font-size: .82rem;
    font-weight: 850;
    text-decoration: none;
    white-space: nowrap;
}

.home-live .home-books-search__field button {
    color: #fff;
    background: #123f77;
}

.home-live .home-books-search__field a {
    color: #123f77;
    background: #e9eff7;
}

.home-live .home-books-panel .home-book-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.home-live .home-books-panel .home-book-pagination {
    margin-top: 1.4rem;
}

.home-live .home-books-loading {
    position: absolute;
    z-index: 21;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    padding: .8rem 1rem;
    border-radius: 999px;
    color: #fff;
    background: #123f77;
    font-size: .82rem;
    font-weight: 800;
    box-shadow: 0 12px 30px rgba(8, 31, 68, .2);
}

.home-live .home-books-browser.is-loading .home-books-loading {
    display: block !important;
}

@media (max-width: 991.98px) {
    .home-live .home-books-toolbar {
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .home-live .home-books-panel .home-book-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 767.98px) {
    .home-live .home-books-browser {
        margin-inline: -.15rem;
        border-radius: 20px;
    }

    .home-live .home-books-tabs {
        grid-template-columns: 1fr;
    }

    .home-live .home-books-tab {
        min-height: 64px;
        padding: .85rem 1rem;
        border-right: 0;
        border-bottom: 1px solid rgba(16, 46, 91, .1);
    }

    .home-live .home-books-tab:last-child {
        border-bottom: 0;
    }

    .home-live .home-books-tab::after {
        left: 0;
        top: .7rem;
        bottom: .7rem;
        right: auto;
        width: 4px;
        height: auto;
        border-radius: 0 4px 4px 0;
    }

    .home-live .home-books-panel {
        padding: 1rem;
    }

    .home-live .home-books-search__field {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .home-live .home-books-search__field a {
        grid-column: 1 / -1;
        height: 38px;
    }

    .home-live .home-books-panel .home-book-pagination {
        align-items: stretch;
    }

    .home-live .home-books-panel .home-book-pagination__actions {
        width: 100%;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* ==============================================================
   Home: filtri autocomplete, paginazioni numeriche e flussi a tab
   ============================================================== */
.home-live .home-autocomplete {
    position: relative;
    min-width: 0;
}

.home-live .home-autocomplete__list {
    position: absolute;
    z-index: 80;
    top: calc(100% + 7px);
    left: 0;
    right: 0;
    max-height: 250px;
    overflow-y: auto;
    padding: .45rem;
    border: 1px solid rgba(16, 46, 91, .18);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 18px 48px rgba(8, 31, 68, .2);
    overscroll-behavior: contain;
}

.home-live .home-autocomplete__list[hidden] {
    display: none !important;
}

.home-live .home-autocomplete__list button {
    display: block;
    width: 100%;
    padding: .7rem .78rem;
    border: 0;
    border-radius: 9px;
    color: #17365f;
    background: transparent;
    font-size: .82rem;
    font-weight: 720;
    line-height: 1.25;
    text-align: left;
}

.home-live .home-autocomplete__list button:hover,
.home-live .home-autocomplete__list button:focus-visible,
.home-live .home-autocomplete__list button.is-active {
    color: #fff;
    background: #123f77;
    outline: 0;
}

.home-live .home-number-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: .35rem;
}

.home-live .home-number-pagination a,
.home-live .home-number-pagination > span:not(.home-number-pagination__ellipsis) {
    display: inline-grid;
    place-items: center;
    min-width: 38px;
    height: 38px;
    padding: 0 .55rem;
    border: 1px solid rgba(16, 46, 91, .15);
    border-radius: 10px;
    color: #123f77;
    background: #fff;
    font-size: .82rem;
    font-weight: 850;
    text-decoration: none;
}

.home-live .home-number-pagination a:hover,
.home-live .home-number-pagination a:focus-visible {
    color: #fff;
    border-color: #123f77;
    background: #123f77;
}

.home-live .home-number-pagination > span.is-current {
    color: #fff;
    border-color: #e85d3f;
    background: #e85d3f;
    box-shadow: 0 8px 18px rgba(232, 93, 63, .22);
}

.home-live .home-number-pagination__ellipsis {
    display: inline-grid;
    place-items: center;
    min-width: 24px;
    height: 38px;
    color: #6c7f96;
    font-weight: 900;
}

.home-live .home-book-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.home-live .home-book-pagination > div:first-child {
    display: flex;
    flex-direction: column;
    gap: .15rem;
    color: #61738a;
    font-size: .76rem;
}

.home-live .home-book-pagination > div:first-child strong {
    color: #123f77;
    font-size: .86rem;
}

.home-live .home-stream-browser {
    position: relative;
    margin-top: clamp(1.5rem, 3vw, 2.4rem);
    overflow: hidden;
    border: 1px solid rgba(255,255,255,.15);
    border-radius: 28px;
    background: rgba(7, 24, 51, .78);
    box-shadow: 0 28px 70px rgba(0, 12, 34, .28);
    backdrop-filter: blur(16px);
}

.home-live .home-stream-browser.is-loading {
    pointer-events: none;
}

.home-live .home-stream-browser.is-loading::after {
    content: '';
    position: absolute;
    z-index: 90;
    inset: 0;
    background: rgba(5, 20, 43, .68);
    backdrop-filter: blur(2px);
}

.home-live .home-stream-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border-bottom: 1px solid rgba(255,255,255,.12);
    background: rgba(2, 15, 35, .5);
}

.home-live .home-stream-tab {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    min-height: 72px;
    padding: .9rem clamp(.8rem, 2vw, 1.4rem);
    border-right: 1px solid rgba(255,255,255,.1);
    color: rgba(255,255,255,.72);
    font-size: .84rem;
    font-weight: 820;
    line-height: 1.15;
    text-decoration: none;
}

.home-live .home-stream-tab:last-child {
    border-right: 0;
}

.home-live .home-stream-tab::after {
    content: '';
    position: absolute;
    left: 1rem;
    right: 1rem;
    bottom: 0;
    height: 4px;
    border-radius: 4px 4px 0 0;
    background: transparent;
}

.home-live .home-stream-tab strong {
    display: grid;
    place-items: center;
    min-width: 44px;
    height: 32px;
    padding: 0 .55rem;
    border-radius: 999px;
    color: #dce9f7;
    background: rgba(255,255,255,.1);
    font-size: .76rem;
}

.home-live .home-stream-tab:hover,
.home-live .home-stream-tab:focus-visible,
.home-live .home-stream-tab.is-active {
    color: #fff;
    background: rgba(255,255,255,.08);
}

.home-live .home-stream-tab.is-active::after {
    background: var(--hl-yellow);
}

.home-live .home-stream-tab.is-active strong {
    color: #092850;
    background: var(--hl-yellow);
}

.home-live .home-stream-panel {
    padding: clamp(1.15rem, 2.7vw, 2rem);
}

.home-live .home-stream-toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(340px, .9fr);
    align-items: end;
    gap: 1rem 2rem;
    margin-bottom: 1.25rem;
}

.home-live .home-stream-toolbar__eyebrow {
    display: block;
    margin-bottom: .35rem;
    color: var(--hl-green);
    font-size: .7rem;
    font-weight: 950;
    letter-spacing: .13em;
    text-transform: uppercase;
}

.home-live .home-stream-panel--audio .home-stream-toolbar__eyebrow {
    color: #61d8ef;
}

.home-live .home-stream-panel--varianti .home-stream-toolbar__eyebrow {
    color: var(--hl-yellow);
}

.home-live .home-stream-toolbar h3 {
    margin: 0;
    color: #fff;
    font-size: clamp(1.25rem, 2.1vw, 1.85rem);
    line-height: 1.08;
    letter-spacing: -.025em;
}

.home-live .home-stream-toolbar p {
    margin: .45rem 0 0;
    color: rgba(255,255,255,.66);
    font-size: .86rem;
}

.home-live .home-stream-search > label {
    display: block;
    margin-bottom: .45rem;
    color: rgba(255,255,255,.75);
    font-size: .75rem;
    font-weight: 800;
}

.home-live .home-stream-search__field {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: .45rem;
}

.home-live .home-stream-search__field input {
    width: 100%;
    min-width: 0;
    height: 44px;
    padding: 0 .9rem;
    border: 1px solid rgba(255,255,255,.18);
    border-radius: 12px;
    color: #0f315b;
    background: #fff;
    outline: 0;
}

.home-live .home-stream-search__field input:focus {
    border-color: #66d7ef;
    box-shadow: 0 0 0 3px rgba(102, 215, 239, .16);
}

.home-live .home-stream-search__field button,
.home-live .home-stream-search__field a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 44px;
    padding: 0 .85rem;
    border: 0;
    border-radius: 12px;
    font-size: .8rem;
    font-weight: 850;
    text-decoration: none;
}

.home-live .home-stream-search__field button {
    color: #092850;
    background: var(--hl-yellow);
}

.home-live .home-stream-search__field a {
    color: #fff;
    background: rgba(255,255,255,.11);
}

.home-live .home-stream-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(230px, 1fr));
    gap: .85rem;
    overflow-x: auto;
    padding: .15rem .1rem .75rem;
    scroll-snap-type: x proximity;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,.28) transparent;
}

.home-live .home-stream-card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 230px;
    min-height: 310px;
    overflow: hidden;
    padding: 1rem;
    border: 1px solid rgba(255,255,255,.13);
    border-radius: 20px;
    color: #fff;
    background:
        radial-gradient(circle at 92% 8%, rgba(53, 211, 155, .16), transparent 26%),
        rgba(255,255,255,.07);
    scroll-snap-align: start;
}

.home-live .home-stream-card--audio {
    background:
        radial-gradient(circle at 90% 10%, rgba(41, 199, 232, .18), transparent 28%),
        rgba(255,255,255,.07);
}

.home-live .home-stream-card--varianti {
    background:
        radial-gradient(circle at 90% 10%, rgba(242, 199, 92, .17), transparent 28%),
        rgba(255,255,255,.07);
}

.home-live .home-stream-card__signal {
    position: relative;
    width: 42px;
    height: 42px;
    margin-bottom: .9rem;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,.28);
}

.home-live .home-stream-card__signal i {
    position: absolute;
    inset: 7px;
    border: 1px solid rgba(255,255,255,.22);
    border-radius: 50%;
}

.home-live .home-stream-card__signal i:nth-child(2) { inset: 13px; }
.home-live .home-stream-card__signal i:nth-child(3) { inset: 18px; background: var(--hl-green); border: 0; }
.home-live .home-stream-card--varianti .home-stream-card__signal i:nth-child(3) { background: var(--hl-yellow); }

.home-live .home-stream-card__type {
    color: var(--hl-green);
    font-size: .66rem;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.home-live .home-stream-card--audio .home-stream-card__type { color: #61d8ef; }
.home-live .home-stream-card--varianti .home-stream-card__type { color: var(--hl-yellow); }

.home-live .home-stream-card h4 {
    margin: .55rem 0 .45rem;
    color: #fff;
    font-size: 1.12rem;
    line-height: 1.08;
    overflow-wrap: anywhere;
}

.home-live .home-stream-card > p {
    margin: 0 0 1rem;
    color: rgba(255,255,255,.68);
    font-size: .8rem;
    line-height: 1.45;
}

.home-live .home-stream-card__territory {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    margin-top: auto;
    padding-top: .8rem;
    border-top: 1px solid rgba(255,255,255,.1);
}

.home-live .home-stream-card__territory a {
    color: #fff;
    font-size: .78rem;
    font-weight: 850;
    text-decoration: none;
}

.home-live .home-stream-card__territory small {
    color: rgba(255,255,255,.56);
}

.home-live .home-stream-card__territory b {
    padding: .25rem .45rem;
    border-radius: 999px;
    color: #092850;
    background: var(--hl-yellow);
    font-size: .62rem;
}

.home-live .home-stream-card__author {
    display: flex;
    flex-wrap: wrap;
    gap: .25rem .38rem;
    margin-top: .55rem;
    color: rgba(255,255,255,.55);
    font-size: .7rem;
}

.home-live .home-stream-card__author a,
.home-live .home-stream-card__author strong {
    color: #fff;
    font-weight: 850;
    text-decoration: underline;
    text-decoration-color: rgba(255,255,255,.28);
    text-underline-offset: 3px;
}

.home-live .home-stream-card__audio {
    width: 100%;
    margin-bottom: .85rem;
}

.home-live .home-stream-card--empty {
    justify-content: center;
    grid-column: 1 / -1;
    min-width: min(100%, 500px);
}

.home-live .home-stream-card--empty > span {
    color: var(--hl-yellow);
    font-size: .7rem;
    font-weight: 900;
    letter-spacing: .1em;
}

.home-live .home-stream-card--empty > a {
    align-self: flex-start;
    margin-top: .35rem;
    color: #092850;
    padding: .65rem .8rem;
    border-radius: 10px;
    background: var(--hl-yellow);
    font-size: .78rem;
    font-weight: 850;
    text-decoration: none;
}

.home-live .home-stream-footer {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 1rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255,255,255,.11);
}

.home-live .home-stream-footer > div:first-child {
    display: flex;
    flex-direction: column;
    color: rgba(255,255,255,.55);
    font-size: .7rem;
}

.home-live .home-stream-footer > div:first-child strong {
    color: #fff;
    font-size: .82rem;
}

.home-live .home-stream-footer .home-number-pagination a,
.home-live .home-stream-footer .home-number-pagination > span:not(.home-number-pagination__ellipsis) {
    color: #fff;
    border-color: rgba(255,255,255,.16);
    background: rgba(255,255,255,.08);
}

.home-live .home-stream-footer .home-number-pagination > span.is-current {
    color: #092850;
    border-color: var(--hl-yellow);
    background: var(--hl-yellow);
}

.home-live .home-stream-footer__all {
    color: #fff;
    font-size: .78rem;
    font-weight: 850;
    text-decoration: none;
}

.home-live .home-stream-footer__all:hover,
.home-live .home-stream-footer__all:focus-visible {
    color: var(--hl-yellow);
}

.home-live .home-stream-loading {
    position: absolute;
    z-index: 91;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    padding: .75rem .95rem;
    border-radius: 999px;
    color: #092850;
    background: var(--hl-yellow);
    font-size: .78rem;
    font-weight: 850;
}

.home-live .home-stream-browser.is-loading .home-stream-loading {
    display: block !important;
}

@media (max-width: 1199.98px) {
    .home-live .home-stream-toolbar {
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .home-live .home-stream-grid {
        grid-template-columns: repeat(5, minmax(260px, 34vw));
    }
}

@media (max-width: 767.98px) {
    .home-live .home-autocomplete__list {
        max-height: 210px;
    }

    .home-live .home-book-pagination {
        align-items: flex-start;
        flex-direction: column;
    }

    .home-live .home-number-pagination {
        justify-content: flex-start;
    }

    .home-live .home-stream-browser {
        margin-inline: -.15rem;
        border-radius: 20px;
    }

    .home-live .home-stream-tabs {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
    }

    .home-live .home-stream-tab {
        flex: 0 0 72%;
        min-height: 62px;
        border-right: 1px solid rgba(255,255,255,.1);
        scroll-snap-align: start;
    }

    .home-live .home-stream-panel {
        padding: 1rem;
    }

    .home-live .home-stream-search__field {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .home-live .home-stream-search__field a {
        grid-column: 1 / -1;
        height: 38px;
    }

    .home-live .home-stream-grid {
        grid-template-columns: repeat(5, minmax(82vw, 82vw));
        margin-inline: -.15rem;
    }

    .home-live .home-stream-card {
        min-width: 82vw;
        min-height: 290px;
    }

    .home-live .home-stream-footer {
        grid-template-columns: 1fr;
        align-items: start;
    }

    .home-live .home-stream-footer__all {
        padding-top: .2rem;
    }
}
