.autori-app {
    --ink: var(--portale-ink, #1b2836);
    --muted: var(--portale-muted, #3e5166);
    --line: var(--portale-line, #d5e0ea);
    --navy: var(--portale-navy, #1a3654);
    --track: #e4edf5;
    --card: #ffffff;
    --page: var(--portale-page, #f3f6f9);
    --focus: var(--portale-focus, #0b5cab);
    color: var(--ink);
    background: var(--page);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 1.5rem 1.25rem 1.75rem;
    margin-bottom: 1.5rem;
    font-family: var(--portale-font, "Segoe UI", "Helvetica Neue", Arial, sans-serif);
    line-height: 1.45;
}

.autori-app * {
    box-sizing: border-box;
}

.autori-skip {
    position: absolute;
    left: 1rem;
    top: 0.75rem;
    transform: translateY(-200%);
    background: #fff;
    color: var(--navy);
    border: 2px solid var(--navy);
    border-radius: 6px;
    padding: 0.4rem 0.75rem;
    z-index: 1040;
}

.autori-skip:focus {
    transform: none;
}

.autori-header {
    border-top: 4px solid var(--navy);
    padding-top: 0.9rem;
    margin-bottom: 1.25rem;
}

.autori-eyebrow {
    margin: 0 0 0.25rem;
    color: var(--muted);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.autori-app h1 {
    margin: 0 0 0.4rem;
    font-size: 1.85rem;
    line-height: 1.2;
    color: var(--navy);
}

.autori-lead,
.autori-note,
.autori-help {
    margin: 0;
    color: var(--muted);
    max-width: 46rem;
}

.autori-summary,
.autori-filters,
.autori-panel-card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 1rem 1rem 1.1rem;
    margin-top: 1rem;
}

.autori-app h2,
.autori-app h3 {
    margin: 0 0 0.75rem;
    color: var(--navy);
    font-size: 1.05rem;
}

.autori-app h3 {
    margin-top: 1.1rem;
}

.autori-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
    margin: 0;
}

.autori-stats div {
    background: var(--page);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 0.75rem 0.9rem;
}

.autori-stats dt {
    margin: 0;
    color: var(--muted);
    font-size: 0.85rem;
    font-weight: 600;
}

.autori-stats dd {
    margin: 0.2rem 0 0;
    color: var(--navy);
    font-size: 1.6rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.autori-stats.operazioni-stats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.autori-note {
    margin-top: 0.8rem;
    font-size: 0.92rem;
}

.autori-states {
    list-style: none;
    margin: 0.4rem 0 0;
    padding: 0;
}

.autori-states li {
    display: grid;
    grid-template-columns: minmax(8rem, 13rem) minmax(6rem, 1fr) auto;
    gap: 0.75rem;
    align-items: center;
    margin-top: 0.45rem;
}

.autori-state-label,
.autori-state-n {
    font-variant-numeric: tabular-nums;
}

.autori-state-track {
    display: block;
    height: 0.55rem;
    background: var(--track);
    border-radius: 999px;
    overflow: hidden;
}

.autori-state-fill {
    display: block;
    height: 100%;
    background: var(--navy);
}

.autori-state-pct {
    color: var(--muted);
    font-size: 0.85rem;
    margin-left: 0.35rem;
}

.autori-filters {
    display: grid;
    grid-template-columns: minmax(16rem, 1.6fr) minmax(12rem, 1fr) minmax(10rem, 0.8fr) 9rem;
    gap: 0.8rem 1rem;
    align-items: end;
}

.immagini-carica {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem 1rem;
    align-items: end;
    margin: 0 0 1.2rem;
    padding: 0.9rem 1rem;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 10px;
}

.immagini-carica .autori-field {
    flex: 1 1 16rem;
}

.immagini-carica .autori-actions {
    flex: 0 0 auto;
}

.immagini-carica button {
    width: auto;
}

.immagini-carica .scheda-alert {
    flex: 1 1 100%;
}

.scheda-alert {
    margin: 0.6rem 0;
    padding: 0.6rem 0.8rem;
    color: #7a1f1f;
    background: #fff;
    border: 1px solid #7a1f1f;
    border-radius: 6px;
}

.scheda-ok {
    margin: 0.6rem 0 0;
    padding: 0.6rem 0.8rem;
    color: #145c32;
    background: #fff;
    border: 1px solid #145c32;
    border-radius: 6px;
}

.scheda-ok p,
.scheda-alert p {
    margin: 0.2rem 0;
}

.bandiera {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    max-width: 100%;
    vertical-align: middle;
}

.bandiera-svg {
    width: 1.15em;
    height: 0.78em;
    flex: 0 0 auto;
    border-radius: 1px;
    box-shadow: 0 0 0 1px rgba(26, 54, 84, 0.28);
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
}

.bandiera-solo {
    margin-left: 0.35em;
    vertical-align: -0.08em;
}

.opere-filters {
    grid-template-columns: minmax(16rem, 1.6fr) minmax(12rem, 1fr) minmax(11rem, 0.9fr) 9rem;
}

.importa-filtri {
    grid-template-columns: minmax(16rem, 36rem);
}

.filtro-colori {
    grid-column: 1 / -1;
    margin: 0;
    padding: 0;
    border: 0;
}

.filtro-colori ul {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.9rem;
    margin: 0.35rem 0 0;
    padding: 0;
    list-style: none;
}

.filtro-colori label {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.filtro-campione {
    width: 0.9rem;
    height: 0.9rem;
    border: 1px solid var(--line, #d5e0ea);
    border-radius: 2px;
}

.lista-filters,
.lista-filters-ultima {
    grid-template-columns: minmax(16rem, 1.7fr) minmax(12rem, 1fr) minmax(11rem, 0.9fr);
}

.lista-cards {
    list-style: none;
    margin: 0.4rem 0 0;
    padding: 0;
}

.lista-card {
    display: grid;
    grid-template-columns: 5.6rem minmax(0, 1fr);
    gap: 0.35rem 0.9rem;
    margin-top: 0.75rem;
    padding: 0.85rem 0.95rem;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 10px;
}

.lista-card h2 {
    margin: 0 0 0.2rem;
    color: var(--navy);
    font-size: 1.05rem;
    line-height: 1.3;
}

.lista-card p {
    margin: 0.15rem 0;
}

.lista-card a {
    color: #0f3f73;
    text-decoration: underline;
    text-underline-offset: 0.12em;
}

.lista-card h2 a {
    color: var(--navy);
    font-weight: 700;
}

.lista-descrizione {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 4;
    line-clamp: 4;
    white-space: pre-line;
}

.schede-stampa {
    --stampa-immagine: 55mm;
}

.schede-stampa .lista-card {
    grid-template-columns: minmax(0, var(--stampa-immagine)) minmax(0, 1fr);
    align-items: start;
    gap: 4mm 6mm;
    break-inside: avoid;
    page-break-inside: avoid;
    border-radius: 0;
    border-left: 0;
    border-right: 0;
    border-bottom: 0;
    border-top: 2px solid var(--navy);
    margin-top: 0;
    padding: 4mm 0 3mm;
    background: #fff;
}

.schede-per-1 .lista-card {
    min-height: 250mm;
}

.schede-per-2 .lista-card {
    min-height: 124mm;
}

.schede-stampa .opere-thumb {
    width: var(--stampa-immagine);
    height: var(--stampa-immagine);
    max-width: 100%;
}

.schede-stampa .lista-figura {
    min-height: var(--stampa-immagine);
}

.stampa-corso {
    margin: 0 0 1.5mm;
    color: var(--navy);
    font-size: 8pt;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.schede-stampa .lista-card h2,
.lista-titolo-evidenza {
    font-size: 14pt;
    line-height: 1.2;
}

.lista-titolo-evidenza {
    font-size: 18pt;
}

.lista-band {
    display: flex;
    flex-wrap: wrap;
    gap: 3mm 8mm;
    margin: 2mm 0 3mm;
    padding: 2.5mm 3mm;
    background: #e8eef5;
    border-left: 5px solid var(--navy);
}

.lista-band p {
    margin: 0;
    min-width: 28mm;
}

.lista-evidenza-label {
    display: block;
    color: var(--navy);
    font-size: 8pt;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.lista-band strong {
    display: block;
    color: var(--navy);
    font-size: 13pt;
    line-height: 1.15;
}

.lista-band-chiave strong {
    font-size: 18pt;
}

.lista-band-note {
    flex-basis: 100%;
}

.schede-stampa .lista-descrizione {
    display: block;
    overflow: hidden;
    max-height: 24mm;
    -webkit-line-clamp: unset;
    line-clamp: unset;
    white-space: pre-line;
}

.schede-per-1 .lista-descrizione {
    max-height: 70mm;
}

.stampa-config {
    margin-top: 0.6rem;
}

.stampa-campi {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 1.1rem;
    margin: 0;
    padding: 0;
    border: 0;
}

.stampa-campi legend {
    width: 100%;
    margin-bottom: 0.2rem;
    padding: 0;
    color: var(--navy);
    font-weight: 700;
}

.stampa-campi label {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    min-height: 2.2rem;
    margin: 0;
    color: var(--navy);
    font-weight: 600;
}

.stampa-campi input[type="checkbox"] {
    width: 1.15rem;
    height: 1.15rem;
    min-height: 0;
    padding: 0;
}

.opere-thumb {
    display: block;
    width: 4.5rem;
    height: 4.5rem;
    object-fit: contain;
    object-position: center;
    background: #f7fafc;
    border: 1px solid var(--line);
}

.autori-field label {
    display: block;
    margin-bottom: 0.3rem;
    font-weight: 600;
    color: var(--navy);
}

.autori-field input,
.autori-field select,
.autori-app button,
.autori-button {
    width: 100%;
    min-height: 2.6rem;
    border: 1px solid #4f657a;
    border-radius: 6px;
    background: #fff;
    color: var(--ink);
    font: inherit;
    padding: 0.35rem 0.6rem;
}

.accesso-modulo {
    max-width: 24rem;
}

.autori-help {
    margin-top: 0.3rem;
    font-size: 0.85rem;
}

.autori-actions {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}

.autori-app button,
.autori-button {
    width: auto;
    background: var(--navy);
    color: #fff;
    border-color: var(--navy);
    padding: 0.4rem 1.1rem;
    text-decoration: none;
    cursor: pointer;
}

.autori-button-secondary {
    background: #fff;
    color: var(--navy);
}

.autori-app button:hover,
.autori-button:hover {
    background: #24507a;
    color: #fff;
    text-decoration: none;
}

.autori-button-secondary:hover {
    background: #e8f0f7;
    color: var(--navy);
}

.autori-status {
    margin: 1rem 0 0.4rem;
    font-weight: 600;
    color: var(--navy);
}

.autori-scroll-hint {
    display: none;
    margin: 0 0 0.5rem;
    color: var(--muted);
    font-size: 0.9rem;
}

.autori-table-wrap {
    margin-top: 0.4rem;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 10px;
    overflow: auto;
    max-height: min(70vh, 52rem);
}

.autori-table {
    width: 100%;
    min-width: 58rem;
    border-collapse: collapse;
    background: #fff;
}

.autori-table caption {
    caption-side: top;
    text-align: left;
    padding: 0.8rem 0.9rem 0.2rem;
    font-weight: 700;
    color: var(--navy);
}

.autori-table th,
.autori-table td {
    padding: 0.7rem 0.85rem;
    text-align: left;
    vertical-align: top;
    border-bottom: 1px solid var(--line);
}

.autori-table th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #f7fafc;
    color: var(--navy);
    font-size: 0.92rem;
}

.autori-table th a {
    color: var(--navy);
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 0.15em;
}

.autori-table tbody tr:nth-child(even) {
    background: #f7fafc;
}

.autori-kicker,
.autori-missing {
    color: var(--muted);
}

.autori-kicker,
.autori-line {
    display: block;
}

.autori-name {
    display: block;
    font-weight: 700;
}

.autori-mail {
    overflow-wrap: anywhere;
}

.autori-table a {
    color: #0f3f73;
    text-decoration: underline;
    text-underline-offset: 0.12em;
}

.autori-empty {
    padding: 1.2rem 0.9rem;
}

.autori-pager {
    margin-top: 0.8rem;
}

.autori-pager ul {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
}

.autori-pager a,
.autori-pager span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.4rem;
    padding: 0.2rem 0.7rem;
    border: 1px solid #4f657a;
    border-radius: 6px;
    background: #fff;
    color: var(--navy);
    text-decoration: none;
}

.autori-pager a[aria-current="page"] {
    background: var(--navy);
    color: #fff;
    border-color: var(--navy);
}

.autori-pager [aria-disabled="true"] {
    color: var(--muted);
    background: #eef2f6;
    border-color: var(--line);
}

.autori-app :focus {
    outline: 3px solid var(--focus);
    outline-offset: 2px;
}

.autori-app :focus:not(:focus-visible) {
    outline: none;
}

.autori-app :focus-visible {
    outline: 3px solid var(--focus);
    outline-offset: 2px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@media (max-width: 960px) {
    .autori-filters,
    .autori-filters.lista-filters,
    .autori-filters.lista-filters-ultima,
    .autori-stats,
    .autori-stats.operazioni-stats {
        grid-template-columns: 1fr 1fr;
    }

    .autori-field-search {
        grid-column: 1 / -1;
    }
}

@media (max-width: 640px) {
    .autori-app {
        padding: 1rem 0.75rem 1.2rem;
    }

    .autori-filters,
    .autori-filters.lista-filters,
    .autori-filters.lista-filters-ultima,
    .autori-stats,
    .autori-stats.operazioni-stats,
    .autori-states li,
    .lista-card {
        grid-template-columns: 1fr;
    }

    .autori-scroll-hint {
        display: block;
    }
}

.scheda-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin: 0 0 0.45rem;
}

.elenco-stampa.autori-app {
    max-width: 277mm;
    margin: 0 auto 1rem;
    padding: 8mm;
    background: #fff;
}

.elenco-stampa .autori-table,
.stampa-table {
    min-width: 0;
    width: 100%;
    table-layout: fixed;
    font-size: 0.78rem;
}

.elenco-stampa .autori-table th,
.elenco-stampa .autori-table td {
    vertical-align: top;
    overflow-wrap: anywhere;
    hyphens: manual;
}

.stampa-autore {
    width: 18%;
}

.stampa-nascita {
    width: 14%;
}

.stampa-residenza {
    width: 18%;
}

.stampa-contatti {
    width: 20%;
}

.stampa-partecipazione {
    width: 16%;
}

.stampa-lingua {
    width: 14%;
}

.stampa-immagine {
    width: 8%;
}

.stampa-opera {
    width: 22%;
}

.stampa-firma {
    width: 16%;
}

.stampa-edizione {
    width: 18%;
}

.stampa-anno {
    width: 8%;
}

.stampa-tecnica {
    width: 18%;
}

.stampa-posizione {
    width: 10%;
}

.print-line,
.print-kicker {
    display: block;
}

.print-kicker {
    font-size: 0.75em;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.print-thumb {
    display: block;
    width: 14mm;
    height: 14mm;
    object-fit: contain;
    object-position: center;
}

.export-toolbar {
    margin: 0 0 0.8rem;
}

.export-toolbar .autori-actions {
    grid-column: auto;
}

a.autori-name {
    color: var(--navy);
    text-decoration: underline;
    text-underline-offset: 0.15em;
}

.autore-scheda.autori-app {
    max-width: 190mm;
    margin: 0 auto 0.75rem;
    padding: 7mm 9mm 8mm;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 0;
    color: #1a1a1a;
    font-family: var(--portale-report-font, Palatino, "Palatino Linotype", "Iowan Old Style", "Times New Roman", serif);
    font-size: 0.92rem;
    line-height: 1.25;
}

.autore-scheda .autori-header {
    border-top: 0;
    border-bottom: 2px solid var(--navy);
    padding: 0 0 0.45rem;
    margin: 0 0 1rem;
}

.autore-scheda .scheda-masthead {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 26mm;
    column-gap: 4mm;
    align-items: center;
}

.autore-scheda.autori-rapporto .scheda-masthead {
    grid-template-columns: minmax(0, 1fr);
}

.autori-rapporto .autori-stats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.rapporto-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0.2rem 0 0;
}

.rapporto-table caption {
    caption-side: top;
    text-align: left;
    padding: 0 0 0.3rem;
    font-weight: 700;
    color: var(--navy);
}

.rapporto-table th,
.rapporto-table td {
    padding: 0.28rem 0.15rem;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: baseline;
}

.rapporto-table .num {
    text-align: right;
    font-variant-numeric: tabular-nums;
    width: 5.5rem;
}

.autore-scheda .scheda-masthead > :not(.scheda-qr) {
    grid-column: 1;
}

.scheda-qr {
    grid-column: 2;
    grid-row: 1 / span 3;
    margin: 0;
    justify-self: end;
    align-self: center;
}

.scheda-qr-img {
    display: block;
    width: 24mm;
    height: 24mm;
}

.scheda-qr figcaption {
    margin: 0.08rem 0 0;
    color: var(--navy);
    font-family: var(--portale-font, "Segoe UI", "Helvetica Neue", Arial, sans-serif);
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    line-height: 1.15;
    text-align: center;
}

.autore-scheda .autori-eyebrow,
.autore-scheda h2,
.autore-scheda h5,
.autore-scheda dt {
    font-family: var(--portale-font, "Segoe UI", "Helvetica Neue", Arial, sans-serif);
}

.autore-scheda h1 {
    margin: 0;
    font-size: 1.35rem;
    line-height: 1.1;
    letter-spacing: 0;
}

.scheda-title-prefix {
    font-weight: 600;
}

.autore-scheda .autori-lead {
    max-width: none;
    margin-top: 0.12rem;
    color: var(--ink);
    font-size: 0.82rem;
}

.tag-balloons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin: 0.35rem 0 0;
    padding: 0;
    list-style: none;
}
.tag-balloon {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    border: 1px solid var(--portale-line, #d5e0ea);
    background: #fff;
    color: var(--portale-navy, #1a3654);
    border-radius: 999px;
    padding: 0.12rem 0.2rem 0.12rem 0.7rem;
}
.tag-balloon button {
    border: 0;
    background: transparent;
    color: var(--portale-navy, #1a3654);
    font: inherit;
    cursor: pointer;
    border-radius: 999px;
    padding: 0.15rem 0.45rem;
}
.tag-balloon button:focus {
    outline: 2px solid var(--portale-focus, #0b5cab);
    outline-offset: 2px;
}
.tag-suggeriti {
    min-height: 7rem;
}

.scheda-section {
    margin: 0;
}

.scheda-section + .scheda-section {
    margin-top: 1.15rem;
    padding-top: 0.7rem;
    border-top: 2px solid var(--navy);
}

.color-list {
    list-style: none;
    margin: 0.35rem 0 0;
    padding: 0;
}

.color-list li {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    margin: 0.22rem 0;
}

.color-swatch {
    display: inline-block;
    width: 1.15rem;
    height: 1.15rem;
    flex: 0 0 1.15rem;
    box-sizing: border-box;
    border: 1px solid var(--navy);
    border-radius: 2px;
}

.tavolozza {
    display: flex;
    width: 100%;
    max-width: 28rem;
    height: 1.6rem;
    margin: 0.35rem 0 0.55rem;
    border: 1px solid var(--navy);
    overflow: hidden;
}

.tavolozza-parte {
    display: block;
    height: 100%;
    min-width: 2px;
}

.autore-scheda h2 {
    margin: 0 0 0.45rem;
    padding-bottom: 0.12rem;
    border-bottom: 1px solid var(--navy);
    color: var(--navy);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.autore-scheda h3 {
    margin: 0 0 0.12rem;
    font-size: 0.95rem;
}

.scheda-anagrafica,
.edition-block,
.opera-card {
    background: transparent;
    border: 0;
    border-radius: 0;
    padding: 0;
    margin: 0;
}

.scheda-anagrafica-grid.has-photo {
    display: grid;
    grid-template-columns: 22mm minmax(0, 1fr);
    gap: 0.3rem 0.55rem;
    align-items: start;
}

.scheda-sheet {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.08rem 0.7rem;
    margin: 0;
}

.scheda-sheet > div {
    display: grid;
    grid-template-columns: 7.1rem minmax(0, 1fr);
    column-gap: 0.3rem;
    align-items: baseline;
}

.scheda-sheet > .scheda-span {
    grid-column: 1 / -1;
}

.autore-scheda dt {
    margin: 0;
    color: var(--navy);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    line-height: 1.2;
}

.autore-scheda dd {
    margin: 0;
    min-width: 0;
}

.scheda-pre {
    white-space: pre-line;
}

.scheda-bits span + span::before {
    content: " · ";
}

.scheda-photo,
.opera-image {
    display: block;
    width: auto;
    max-width: 28mm;
    max-height: 32mm;
    height: auto;
    margin: 0 0 0.15rem auto;
    border: 0;
    border-radius: 0;
    background: transparent;
    float: right;
}

.scheda-photo {
    float: none;
    max-width: 22mm;
    max-height: 28mm;
}

.autore-scheda h4,
.autore-scheda h5 {
    margin: 0;
    color: var(--navy);
}

.autore-scheda h4 {
    font-size: 1rem;
    line-height: 1.15;
}

.edition-block {
    margin-top: 0.95rem;
    padding-top: 0.4rem;
    border-top: 1px solid var(--navy);
}

.edition-title {
    margin: 0 0 0.35rem;
    padding-top: 0;
}

.opera-card {
    border-top: 1px solid #8ea3b8;
    padding-top: 0.4rem;
    margin-top: 0.65rem;
}

.opera-card::after {
    content: "";
    display: block;
    clear: both;
}

.opera-section {
    margin-top: 0.55rem;
}

.opera-section h5 {
    margin: 0 0 0.22rem;
    padding-bottom: 0.08rem;
    border-bottom: 1px solid var(--line);
    color: var(--muted);
    font-size: 0.64rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.scheda-retrieved {
    margin: 1.25rem 0 0;
    padding-top: 0.5rem;
    border-top: 2px solid var(--navy);
    color: var(--navy);
    font-family: var(--portale-font, "Segoe UI", "Helvetica Neue", Arial, sans-serif);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.03em;
}

.scheda-retrieved p {
    margin: 0;
}

@media (max-width: 640px) {
    .autore-scheda.autori-app {
        max-width: none;
        padding: 0.75rem 0.5rem;
    }

    .scheda-sheet,
    .scheda-anagrafica-grid.has-photo,
    .autore-scheda .scheda-masthead {
        grid-template-columns: 1fr;
    }

    .autori-rapporto .autori-stats {
        grid-template-columns: 1fr 1fr;
    }

    .scheda-qr {
        grid-column: 1;
        grid-row: auto;
        justify-self: start;
        margin-top: 0.25rem;
    }
}

@media print {
    @page {
        size: A4 portrait;
        margin: 9mm 11mm 11mm;
    }

    nav,
    .alert,
    .scheda-toolbar,
    .scheda-strumento,
    .immagini-carica,
    .export-toolbar,
    .autori-filters,
    .autori-summary,
    .autori-scroll-hint,
    .autori-skip,
    .autori-pager,
    .sezione-aiuto {
        display: none !important;
    }

    .color-swatch,
    .tavolozza,
    .tavolozza-parte {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    body:has(.autore-scheda),
    body:has(.elenco-stampa),
    body:has(.schede-stampa) {
        padding: 0 !important;
        background: #fff !important;
    }

    body:has(.autore-scheda) main,
    body:has(.autore-scheda) main > div,
    body:has(.elenco-stampa) main,
    body:has(.elenco-stampa) main > div,
    body:has(.schede-stampa) main,
    body:has(.schede-stampa) main > div {
        margin: 0 !important;
        padding: 0 !important;
        width: auto !important;
        max-width: none !important;
    }

    .schede-stampa.autori-app {
        max-width: none;
        margin: 0;
        padding: 0;
        border: 0;
        background: #fff;
        font-family: var(--portale-report-font, Palatino, "Palatino Linotype", "Iowan Old Style", "Times New Roman", serif);
        font-size: var(--portale-report-size, 9.5pt);
        line-height: 1.3;
    }

    .schede-stampa .autori-header,
    .schede-stampa .scheda-retrieved,
    .stampa-config {
        display: none !important;
    }

    .schede-stampa .lista-card {
        grid-template-columns: minmax(0, var(--stampa-immagine, 55mm)) minmax(0, 1fr);
        margin-top: 0;
    }

    .schede-per-1 .lista-card {
        break-after: page;
        page-break-after: always;
    }

    .schede-per-2 .lista-card:nth-child(2n) {
        break-after: page;
        page-break-after: always;
    }

    .schede-per-1 .lista-card:last-child,
    .schede-per-2 .lista-card:last-child {
        break-after: auto;
        page-break-after: auto;
    }

    .schede-stampa .opere-thumb {
        width: var(--stampa-immagine, 55mm);
        height: var(--stampa-immagine, 55mm);
    }

    .lista-band {
        color-adjust: exact;
        print-color-adjust: exact;
    }

    .schede-stampa a {
        color: #000 !important;
        text-decoration: none !important;
    }

    .elenco-stampa.autori-app {
        max-width: none;
        margin: 0;
        padding: 0;
        border: 0;
        font-family: var(--portale-report-font, Palatino, "Palatino Linotype", "Iowan Old Style", "Times New Roman", serif);
        font-size: var(--portale-list-size, 8pt);
        line-height: 1.25;
    }

    .elenco-stampa .autori-table {
        font-size: var(--portale-list-size, 8pt);
    }

    .elenco-stampa .autori-table thead {
        display: table-header-group;
    }

    .autori-table th {
        position: static;
    }

    .bandiera-svg {
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
    }

    .elenco-stampa tr,
    .print-thumb {
        break-inside: avoid;
        page-break-inside: avoid;
    }

    .elenco-stampa a {
        color: #000 !important;
        text-decoration: none !important;
    }

    .autore-scheda.autori-app {
        display: flex;
        flex-direction: column;
        min-height: 277mm;
        max-width: none;
        margin: 0;
        padding: 0;
        border: 0;
        font-size: var(--portale-report-size, 9.5pt);
        line-height: 1.2;
    }

    .scheda-retrieved {
        margin-top: auto;
        break-inside: avoid;
        page-break-inside: avoid;
    }

    .autore-scheda a {
        color: #000 !important;
        text-decoration: none !important;
    }

    .scheda-anagrafica,
    .opera-card,
    .opera-section,
    .scheda-qr {
        break-inside: avoid;
        page-break-inside: avoid;
    }

    .scheda-qr-img,
    .autori-state-fill,
    .autori-state-track {
        color-adjust: exact;
        print-color-adjust: exact;
    }

    .autore-scheda h2,
    .edition-title,
    .opera-card h4,
    .opera-section h5 {
        break-after: avoid;
        page-break-after: avoid;
    }

    .edition-block {
        break-inside: auto;
        page-break-inside: auto;
    }

    .scheda-photo,
    .opera-image {
        max-height: 24mm;
    }

    .opere-thumb {
        width: 18mm;
        height: 18mm;
    }

    body:has(.firme-stampa),
    body:has(.giuria-stampa) {
        padding: 0 !important;
        background: #fff !important;
    }

    body:has(.firme-stampa) main,
    body:has(.firme-stampa) main > div,
    body:has(.giuria-stampa) main,
    body:has(.giuria-stampa) main > div,
    .firme-stampa.autori-app,
    .giuria-stampa.autori-app {
        margin: 0 !important;
        padding: 0 !important;
        max-width: none !important;
        border: 0;
        background: #fff;
    }

    .giuria-stampa .giuria-scheda + .giuria-scheda {
        break-before: page;
        page-break-before: always;
    }

    .firme-stampa .firma-row,
    .giuria-scheda,
    .giuria-scheda tr {
        break-inside: avoid;
        page-break-inside: avoid;
    }

    .firma-line {
        border-bottom-color: #000;
    }
}

.autori-field input[type="checkbox"],
.autori-table input[type="checkbox"] {
    width: 1.15rem;
    height: 1.15rem;
    min-height: 0;
    padding: 0;
    vertical-align: middle;
}

.autori-table input.voto-punteggio {
    width: 6rem;
    min-height: 2.2rem;
}

.autori-table input.voto-nota {
    width: 100%;
    max-width: 16rem;
    min-height: 2.2rem;
}

.autori-table button {
    width: auto;
    min-height: 2.2rem;
}

.firma-line {
    display: inline-block;
    width: 100%;
    min-width: 8rem;
    height: 1.2rem;
    border-bottom: 1px solid #1a1a1a;
    vertical-align: bottom;
}

.autori-field input[type="color"] {
    width: 4.5rem;
    min-height: 2.6rem;
    padding: 0.15rem;
}

.autori-field textarea {
    width: 100%;
    min-height: 5.5rem;
    border: 1px solid #4f657a;
    border-radius: 6px;
    background: #fff;
    color: var(--ink);
    font: inherit;
    padding: 0.45rem 0.6rem;
}

.config-griglia {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
    gap: 0.8rem 1rem;
}

.config-largo {
    grid-column: 1 / -1;
}

.config-blocco {
    margin: 0 0 1rem;
    padding: 0.2rem 0 0.4rem;
    border: 0;
}

.config-blocco legend {
    margin-bottom: 0.6rem;
    padding: 0;
    color: var(--navy);
    font-size: 1.05rem;
    font-weight: 700;
}

.campo-oggi {
    margin-top: 0.35rem;
}

.ricerca-voci {
    list-style: none;
    margin: 0.75rem 0 0;
    padding: 0;
}

.ricerca-voci li {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem 0.75rem;
    align-items: center;
    margin: 0.35rem 0;
}

.aiuto-indice ul {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 1rem;
    margin: 0 0 1.2rem;
    padding: 0;
    list-style: none;
}

.aiuto-blocco {
    margin: 0 0 1rem;
    padding-top: 0.6rem;
    border-top: 1px solid var(--line);
}

.giuria-stampa.autori-app,
.firme-stampa.autori-app {
    font-family: var(--portale-report-font, Palatino, "Palatino Linotype", "Iowan Old Style", "Times New Roman", serif);
}

.giuria-passi {
    margin: 0 0 1.25rem;
    padding-left: 1.3rem;
}

.giuria-passi li {
    margin: 0.35rem 0;
}

.portale-board {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
    gap: 1rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.portale-board a {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-height: 8rem;
    padding: 1rem 1.1rem;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--navy);
    text-decoration: none;
}

.portale-board a:hover,
.portale-board a:focus {
    border-color: var(--navy);
    outline: 2px solid var(--navy);
    outline-offset: 2px;
}

.portale-board span {
    font-size: 0.78rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #4f657a;
}

.portale-board strong {
    font-size: 1.25rem;
}

.strumenti-griglia {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
    gap: 1rem;
    list-style: none;
    margin: 1rem 0 0;
    padding: 0;
}

.strumento {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1rem 1.1rem;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 8px;
}

.strumento p {
    margin: 0;
}

.strumento .strumento-azioni,
.strumento-conferma {
    margin-top: auto;
}

.strumento-conferma summary {
    display: inline-flex;
    align-items: center;
    list-style: none;
}

.strumento-conferma summary::-webkit-details-marker {
    display: none;
}

.strumento-conferma[open] summary {
    margin-bottom: 0.5rem;
}

.autori-app .strumento-pericolo {
    background: #7a1f1f;
    border-color: #7a1f1f;
}

.autori-app .strumento-pericolo:hover {
    background: #5c1717;
}

.indirizzi-etichette {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
    gap: 0.75rem;
    list-style: none;
    margin: 1rem 0 0;
    padding: 0;
}

.indirizzo-etichetta {
    display: flex;
    flex-direction: column;
    padding: 0.8rem 1rem;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 6px;
    break-inside: avoid;
    page-break-inside: avoid;
}

.indirizzo-etichetta strong {
    color: var(--navy);
    text-transform: uppercase;
}

@media print {
    .indirizzi-stampa .autori-header {
        display: none;
    }

    .indirizzi-stampa.autori-app {
        border: 0;
        padding: 0;
        background: #fff;
    }

    .indirizzi-etichette {
        grid-template-columns: 1fr 1fr;
        gap: 4mm;
    }

    .indirizzo-etichetta {
        border-radius: 0;
        border-color: #999;
    }
}

.autori-header-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.5rem;
    align-items: flex-start;
    justify-content: space-between;
}

.autori-header-row > div {
    flex: 1 1 24rem;
}

.autori-header-row > .autori-actions {
    flex: 0 1 auto;
    margin: 0;
}

.autori-dettagli {
    margin-top: 0.6rem;
}

.autori-dettagli summary {
    cursor: pointer;
    color: var(--navy);
    font-weight: 600;
}

.autori-dettagli[open] summary {
    margin-bottom: 0.4rem;
}

.immagini-carica-box {
    margin: 1rem 0 0;
}

.autori-summary.autori-summary-compatta {
    padding: 0.7rem 1rem;
}

.autori-summary-compatta h2 {
    margin-bottom: 0.5rem;
}

.autori-summary-compatta .autori-stats div {
    padding: 0.45rem 0.75rem;
}

.autori-summary-compatta .autori-stats dd {
    font-size: 1.3rem;
}

.autori-summary-compatta .autori-stats {
    grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
}

/* Wide screens: one page scroll; the column titles stay under the menu bar. */
@media (min-width: 1000px) {
    .autori-table-wrap {
        overflow: visible;
        max-height: none;
    }

    .autori-table th {
        top: var(--site-nav-h, 0px);
    }
}

.collegamenti-indice {
    position: sticky;
    top: var(--site-nav-h, 0px);
    z-index: 2;
    margin: 1rem 0 0;
    padding: 0.5rem 0;
    background: var(--page);
}

.collegamenti-indice ul {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.collegamenti-indice a {
    display: inline-flex;
    align-items: baseline;
    gap: 0.4rem;
    padding: 0.35rem 0.75rem;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--navy);
    text-decoration: none;
}

.collegamenti-indice a:hover {
    border-color: var(--navy);
}

.collegamenti-sezione {
    margin-top: 1.5rem;
    scroll-margin-top: calc(var(--site-nav-h, 0px) + 4rem);
}

.collegamenti-sezione h2 {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
}

.collegamenti-conta {
    padding: 0 0.5rem;
    background: var(--track);
    border-radius: 999px;
    font-size: 0.85rem;
    font-variant-numeric: tabular-nums;
}

.collega-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0.9rem;
    margin-top: 0.6rem;
    padding: 0.8rem 1rem;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 8px;
}

.collega-card-immagine {
    grid-template-columns: 4.5rem minmax(0, 1fr);
}

.collega-card h3 {
    margin: 0 0 0.25rem;
    font-size: 1rem;
}

.collega-card p {
    margin: 0.2rem 0;
}

.collega-senza-anteprima {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    font-size: 0.7rem;
    text-align: center;
}

.collega-proposte {
    margin: 0.5rem 0 0;
    padding: 0;
    list-style: none;
}

.collega-proposte li {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 1rem;
    align-items: center;
    justify-content: space-between;
    padding: 0.4rem 0;
    border-top: 1px solid var(--line);
}

.collega-proposte li > span {
    flex: 1 1 18rem;
}

.collega-proposte .autori-help {
    display: block;
    margin: 0;
}

.collega-proposte form,
.collega-azione {
    margin: 0;
}

.collega-manuale {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 0.6rem;
    align-items: center;
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px dashed var(--line);
}

.collega-manuale label {
    color: var(--navy);
    font-weight: 600;
}

.collega-manuale input[type="text"] {
    width: 7rem;
    min-height: 2.4rem;
    padding: 0.3rem 0.5rem;
    border: 1px solid #4f657a;
    border-radius: 6px;
    font: inherit;
}

.collega-manuale input.collega-cerca {
    flex: 1 1 18rem;
    width: auto;
}

.scelta-dialog {
    width: min(56rem, calc(100vw - 2rem));
    max-height: calc(100vh - 2rem);
    padding: 1rem 1.1rem;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--card);
    color: var(--ink);
}

.scelta-dialog::backdrop {
    background: rgba(27, 40, 54, 0.55);
}

.scelta-testa {
    display: flex;
    gap: 1rem;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.6rem;
}

.scelta-testa h2 {
    margin: 0;
}

.scelta-dialog > label {
    display: block;
    color: var(--navy);
    font-weight: 600;
}

.scelta-dialog input[type="search"] {
    width: 100%;
    min-height: 2.4rem;
    margin: 0.3rem 0 0.8rem;
    padding: 0.3rem 0.6rem;
    border: 1px solid #4f657a;
    border-radius: 6px;
    font: inherit;
}

.scelta-griglia {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(8.5rem, 1fr));
    gap: 0.6rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.autori-app .scelta-griglia button {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    width: 100%;
    height: 100%;
    padding: 0.5rem;
    background: #fff;
    color: var(--ink);
    border: 1px solid var(--line);
    text-align: center;
}

.autori-app .scelta-griglia button:hover,
.autori-app .scelta-griglia button:focus-visible {
    background: #e8f0f7;
    color: var(--ink);
    border-color: var(--navy);
}

.scelta-griglia img,
.scelta-griglia .collega-senza-anteprima {
    width: 6rem;
    height: 6rem;
    object-fit: contain;
    background: #f7fafc;
}

.scelta-griglia small {
    color: var(--muted);
    font-size: 0.78rem;
    line-height: 1.25;
}

.autori-app .collega-manuale button {
    background: #fff;
    color: var(--navy);
}

.autori-app .collega-manuale button:hover {
    background: #e8f0f7;
    color: var(--navy);
}

.collegamenti-autori {
    columns: 18rem;
    column-gap: 1.5rem;
    margin: 0.5rem 0 0;
    padding: 0;
    list-style: none;
}

.collegamenti-autori li {
    break-inside: avoid;
    padding: 0.3rem 0;
    border-bottom: 1px solid var(--line);
}

@media (prefers-reduced-motion: reduce) {
    .autori-app *,
    .autori-app *::before,
    .autori-app *::after {
        transition: none !important;
        animation: none !important;
        scroll-behavior: auto !important;
    }
}

/* Home cards: a picture for each destination. */
.portale-board .board-icona {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.6rem;
    height: 2.6rem;
    margin-bottom: 0.35rem;
    border-radius: 50%;
    background: #e8eef5;
}
.portale-board .board-icona .icon { width: 1.4rem; height: 1.4rem; fill: var(--portale-navy, #1a3654); }
.portale-board a:hover .board-icona,
.portale-board a:focus .board-icona { background: var(--portale-navy, #1a3654); }
.portale-board a:hover .board-icona .icon,
.portale-board a:focus .board-icona .icon { fill: #fff; }

/* Empty state: a small picture, the message, a hint and the way out. */
.stato-vuoto {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    padding: 1.5rem 1rem 1.25rem;
    text-align: center;
}

.stato-vuoto-figura {
    width: 7.5rem;
    height: auto;
    margin-bottom: 0.25rem;
}

.stato-vuoto-titolo {
    margin: 0;
    color: var(--navy);
    font-size: 1.1rem;
    font-weight: 700;
}

.stato-vuoto-testo {
    margin: 0;
    max-width: 30rem;
    color: var(--muted);
}

.stato-vuoto-azione {
    margin: 0.5rem 0 0;
}

.indirizzi-vuoto {
    grid-column: 1 / -1;
    background: var(--card);
    border: 1px dashed var(--line);
    border-radius: 10px;
}

.sv-ombra { fill: var(--line); opacity: 0.6; }
.sv-fondo { fill: #fff; }
.sv-bordo { fill: #fff; stroke: var(--navy); stroke-width: 2.5; stroke-linejoin: round; }
.sv-tasca { fill: #e8eef5; stroke: var(--navy); stroke-width: 2.5; stroke-linejoin: round; }
.sv-riga { stroke: #c9d6e3; stroke-width: 4; stroke-linecap: round; }
.sv-lente { fill: rgba(255, 255, 255, 0.85); stroke: var(--focus); stroke-width: 4; }
.sv-manico { stroke: var(--focus); stroke-width: 6; stroke-linecap: round; }
.sv-segno { stroke: var(--focus); stroke-width: 3; stroke-linecap: round; }

@media print {
    .stato-vuoto-figura,
    .stato-vuoto-testo,
    .stato-vuoto-azione {
        display: none;
    }
}
