/* ==========================================================================
   simonx.it — "carta e inchiostro"
   Bianco, nero, oro. Anton per i titoli, Archivo per l'interfaccia,
   Source Serif 4 per la lettura degli articoli. Angoli vivi, filetti neri,
   blocco oro sfalsato come firma.
   ========================================================================== */

@font-face { font-family: "Anton"; src: url("../fonts/anton-roman.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Archivo"; src: url("../fonts/archivo-roman.woff2") format("woff2"); font-weight: 400 800; font-stretch: 75% 100%; font-style: normal; font-display: swap; }
@font-face { font-family: "Source Serif 4"; src: url("../fonts/source-serif-4-roman.woff2") format("woff2"); font-weight: 400 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Source Serif 4"; src: url("../fonts/source-serif-4-italic.woff2") format("woff2"); font-weight: 400 700; font-style: italic; font-display: swap; }

:root {
    --ink: #000;
    --paper: #fff;
    --gold: #ffbd35;
    --gold-deep: #a8851f;
    --gold-ink: #6f5200;
    --muted: #595959;
    --rule: #000;
    --rule-soft: #d9d9d9;
    --wash: #f4f4f2;
    --danger: #a11a12;
    --on-ink-soft: rgba(255, 255, 255, .76);

    --font-display: "Anton", "Impact", "Haettenschweiler", "Arial Narrow", sans-serif;
    --font-text: "Archivo", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    --font-read: "Source Serif 4", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
    --font-mono: ui-monospace, "Cascadia Code", "SF Mono", Consolas, Menlo, monospace;

    --ease: cubic-bezier(.16, 1, .3, 1);
    --header-h: 72px;
    --gutter: clamp(1.1rem, 4vw, 2.5rem);
    --section: clamp(4rem, 9vw, 7.5rem);
    --offset: 12px;
}

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

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--header-h) + 1.5rem);
    scrollbar-color: var(--ink) var(--paper);
}

body {
    margin: 0;
    padding-top: var(--header-h);
    font-family: var(--font-text);
    font-size: 1.0625rem;
    line-height: 1.6;
    color: var(--ink);
    background: var(--paper);
    caret-color: var(--gold-deep);
    overflow-wrap: break-word;
    -webkit-font-smoothing: antialiased;
    -webkit-tap-highlight-color: rgba(255, 189, 53, .35);
}

body.is-locked { overflow: hidden; }

::selection { background: var(--gold); color: var(--ink); }

h1, h2, h3, h4 {
    margin: 0;
    font-family: var(--font-display);
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: .005em;
    line-height: .98;
    text-wrap: balance;
}
h1 { font-size: clamp(2.75rem, 8vw, 6rem); }
h2 { font-size: clamp(2.1rem, 5vw, 3.75rem); }
h3 { font-size: clamp(1.4rem, 2.4vw, 1.9rem); line-height: 1.03; }
h4 { font-size: 1.25rem; line-height: 1.05; }

p { margin: 0 0 1em; text-wrap: pretty; }
a { color: inherit; text-decoration-thickness: .08em; text-underline-offset: .18em; }
img, video { max-width: 100%; height: auto; display: block; }
ul, ol { margin: 0; }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }

:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.on-ink :focus-visible { outline-color: var(--gold); }

.wrap { width: 100%; max-width: 1240px; margin-inline: auto; padding-inline: var(--gutter); }

.visually-hidden {
    position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0;
    overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}

.skip-link {
    position: fixed; top: .5rem; left: .5rem; z-index: 300;
    padding: .7rem 1rem; background: var(--gold); color: var(--ink);
    border: 2px solid var(--ink); font-weight: 700; text-decoration: none;
    transform: translateY(-200%);
}
.skip-link:focus { transform: none; }

.ic { display: inline-block; width: 1em; height: 1em; flex: none; fill: currentColor; vertical-align: -.125em; }

main:focus { outline: none; }
[aria-pressed="true"] > .when-off, [aria-pressed="false"] > .when-on { display: none; }
.when-on, .when-off { display: grid; place-items: center; }

/* Etichette e metadati: Archivo stretto, mai maiuscolo forzato */
.meta { font-size: .92rem; font-stretch: 86%; font-weight: 600; color: var(--muted); }

/* Link con sottolineatura che si disegna */
.link-draw {
    text-decoration: none;
    background: linear-gradient(var(--gold), var(--gold)) 0 100% / 0 .22em no-repeat;
    transition: background-size .25s var(--ease);
    padding-bottom: .12em;
}
.link-draw:hover, .link-draw:focus-visible, .link-draw[aria-current] { background-size: 100% .22em; }

.text-link {
    font-weight: 700;
    text-decoration: underline;
    text-decoration-color: var(--gold);
    text-decoration-thickness: .16em;
    transition: text-decoration-color .15s;
}
.text-link:hover { text-decoration-color: var(--ink); }
.on-ink .text-link:hover { text-decoration-color: var(--paper); }

/* ---------- Bottoni: una coppia, un solo comportamento ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
    min-height: 3.1rem; padding: .7rem 1.5rem;
    border: 2px solid var(--ink); background: var(--ink); color: var(--paper);
    font-family: var(--font-display); font-size: 1.08rem; letter-spacing: .045em; line-height: 1;
    text-transform: uppercase; text-decoration: none; cursor: pointer; touch-action: manipulation;
    transition: transform .16s var(--ease), box-shadow .16s var(--ease);
}
.btn:hover { transform: translate(-3px, -3px); box-shadow: 3px 3px 0 var(--gold); }
.btn:active { transform: none; box-shadow: none; }
.btn--ghost { background: var(--paper); color: var(--ink); }
.btn--ghost:hover { box-shadow: 3px 3px 0 var(--ink); }
.btn--sm { min-height: 2.6rem; padding: .5rem 1.05rem; font-size: .98rem; }
.band .btn:hover { box-shadow: 3px 3px 0 var(--paper); }
.on-ink .btn { background: var(--gold); border-color: var(--gold); color: var(--ink); }
.on-ink .btn:hover { box-shadow: 3px 3px 0 var(--paper); }
.btn[disabled], .btn[aria-busy="true"] { opacity: .65; cursor: progress; transform: none; box-shadow: none; }

/* ---------- Testata ---------- */
.site-header {
    position: fixed; inset: 0 0 auto 0; z-index: 100; height: var(--header-h);
    background: var(--paper); border-bottom: 1px solid var(--rule);
}
.site-header__in { height: 100%; display: flex; align-items: center; gap: clamp(1rem, 2.5vw, 2rem); }
.brand { display: inline-flex; align-items: center; flex: none; }
.brand img { height: 36px; width: auto; }
.nav { margin-left: auto; display: flex; align-items: center; gap: clamp(1.1rem, 2.4vw, 2.2rem); }
.nav a {
    font-family: var(--font-display); font-size: 1.04rem; letter-spacing: .05em;
    text-transform: uppercase; padding: .35rem 0;
}
.menu-toggle {
    display: none; margin-left: auto; width: 46px; height: 46px; padding: 0;
    border: 2px solid var(--ink); background: var(--paper); cursor: pointer;
    align-items: center; justify-content: center;
}
.menu-toggle__bars { position: relative; width: 20px; height: 2px; background: var(--ink); transition: background-color .2s; }
.menu-toggle__bars::before, .menu-toggle__bars::after {
    content: ""; position: absolute; left: 0; width: 20px; height: 2px; background: var(--ink);
    transition: transform .25s var(--ease);
}
.menu-toggle__bars::before { transform: translateY(-6px); }
.menu-toggle__bars::after { transform: translateY(6px); }
.menu-toggle[aria-expanded="true"] .menu-toggle__bars { background: transparent; }
.menu-toggle[aria-expanded="true"] .menu-toggle__bars::before { transform: rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-toggle__bars::after { transform: rotate(-45deg); }

.mobile-menu {
    position: fixed; inset: var(--header-h) 0 0 0; z-index: 99;
    background: var(--paper); overflow-y: auto; overscroll-behavior: contain;
    padding: 1.5rem var(--gutter) 2.5rem; display: flex; flex-direction: column; gap: 2rem;
}
.mobile-menu ul { list-style: none; padding: 0; border-top: 1px solid var(--rule); }
.mobile-menu li { border-bottom: 1px solid var(--rule); }
.mobile-menu li a {
    display: flex; align-items: center; justify-content: space-between; min-height: 4rem;
    font-family: var(--font-display); font-size: clamp(1.7rem, 8vw, 2.4rem); text-transform: uppercase;
    text-decoration: none; letter-spacing: .01em;
}
.mobile-menu li a:active { background: var(--gold); }
.mobile-menu__actions { display: grid; gap: .75rem; }
@media (prefers-reduced-motion: no-preference) {
    .mobile-menu { animation: menu-in .28s var(--ease); }
    @keyframes menu-in { from { opacity: 0; transform: translateY(-10px); } }
}

@media (max-width: 899px) {
    :root { --header-h: 64px; }
    .nav, .nav-cta { display: none; }
    .menu-toggle { display: inline-flex; }
    .brand img { height: 32px; }
}

/* ---------- Hero (home e landing) ---------- */
.hero { border-bottom: 1px solid var(--rule); padding-block: clamp(2.5rem, 7vw, 5.5rem); }
.hero__grid {
    display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
    gap: clamp(2rem, 5vw, 4.5rem); align-items: center;
}
.hero__name { display: block; font-size: clamp(3.1rem, 9.2vw, 6rem); letter-spacing: -.005em; }
.hero__role { display: block; margin-top: .3em; font-size: clamp(1.45rem, 3.6vw, 2.5rem); letter-spacing: .015em; line-height: 1.02; }
.hero__lead { margin: 1.5rem 0 2rem; max-width: 39rem; font-size: clamp(1.1rem, 1.55vw, 1.3rem); line-height: 1.5; }
.hero__actions { display: flex; flex-wrap: wrap; gap: .8rem; }
.hero__links { margin: 1.4rem 0 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: .5rem 1.6rem; font-size: 1rem; }
.hero__links a { display: inline-flex; align-items: center; gap: .45rem; min-height: 2.75rem; font-weight: 600; }
.hero__photo { position: relative; justify-self: end; width: min(100%, 390px); }
.hero__photo::before {
    content: ""; position: absolute; inset: 0; background: var(--gold); border: 1px solid var(--ink);
    transform: translate(var(--offset), var(--offset));
}
.hero__photo img { position: relative; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 18%; border: 1px solid var(--ink); }

.hero--plain .hero__lead { max-width: 46rem; }
.hero--plain h1 { font-size: clamp(2.5rem, 6.4vw, 4.75rem); max-width: 18ch; }
.hero__facts { margin: 0 0 2rem; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: .6rem; }
.hero__facts li { border: 1px solid var(--ink); padding: .35rem .8rem; font-weight: 600; font-stretch: 88%; font-size: .98rem; }

@media (max-width: 899px) {
    .hero__grid { grid-template-columns: 1fr; gap: 1.75rem; }
    .hero__photo { order: -1; justify-self: start; width: 128px; --offset: 8px; }
    .hero__photo img { aspect-ratio: 1; }
}
@media (max-width: 520px) {
    .hero__actions .btn, .band__actions .btn, .band__in > .btn { flex: 1 1 100%; }
    .band__actions { width: 100%; }
}

@media (prefers-reduced-motion: no-preference) {
    [data-enter] > * { animation: enter .8s var(--ease) both; }
    [data-enter] > *:nth-child(2) { animation-delay: .07s; }
    [data-enter] > *:nth-child(3) { animation-delay: .14s; }
    [data-enter] > *:nth-child(4) { animation-delay: .21s; }
    [data-enter] > *:nth-child(5) { animation-delay: .28s; }
    .hero__photo::before { animation: block-in .9s .25s var(--ease) both; }
    @keyframes enter { from { opacity: 0; transform: translateY(20px); } }
    @keyframes block-in { from { transform: translate(0, 0); } }
}

/* ---------- Nastro tecnologie ---------- */
.marquee { position: relative; border-bottom: 1px solid var(--rule); overflow: hidden; }
.marquee__track {
    display: flex; gap: 3rem; width: max-content; margin: 0; padding: .95rem 0; list-style: none;
    animation: marquee 42s linear infinite;
}
.marquee__track li { font-family: var(--font-display); font-size: 1.25rem; letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; }
.marquee:hover .marquee__track, .marquee.is-paused .marquee__track { animation-play-state: paused; }
.marquee__toggle {
    position: absolute; top: 50%; right: var(--gutter); transform: translateY(-50%);
    width: 2.75rem; height: 2.75rem; display: grid; place-items: center;
    border: 1px solid var(--ink); background: var(--paper); cursor: pointer;
}
.marquee__toggle:hover { background: var(--gold); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Sezioni ---------- */
.section { padding-block: var(--section); border-bottom: 1px solid var(--rule); }
.section--tight { padding-block: clamp(2.5rem, 6vw, 4.5rem); }
.section--flush { padding-block: 0 clamp(2.5rem, 6vw, 4rem); border-bottom: 0; }
.section--flush + .section { padding-top: 0; }
.section-head {
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 1rem 3rem; align-items: end;
    margin-bottom: clamp(2rem, 5vw, 3.5rem); padding-top: 1.25rem; border-top: 6px solid var(--ink);
}
.section-head p { margin: 0; max-width: 35rem; font-size: 1.15rem; line-height: 1.5; }
.section-head--solo { grid-template-columns: 1fr; }
@media (max-width: 899px) { .section-head { grid-template-columns: 1fr; } }

.split { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: clamp(2rem, 6vw, 5rem); align-items: start; }
.split__text > p { max-width: 41rem; }
.split__text > p:first-child { font-size: 1.2rem; line-height: 1.55; font-weight: 500; }
@media (max-width: 899px) { .split { grid-template-columns: 1fr; } }

.facts { list-style: none; padding: 0; border-top: 1px solid var(--rule); }
.facts li { display: grid; grid-template-columns: 6.5rem 1fr; gap: 1.25rem; align-items: center; padding: 1.1rem 0; border-bottom: 1px solid var(--rule); }
.facts b { font-family: var(--font-display); font-weight: 400; font-size: clamp(2.6rem, 4.4vw, 3.6rem); line-height: 1; }
.facts span { font-size: 1.03rem; line-height: 1.4; }

/* Indice a righe: servizi, progetti */
.index { list-style: none; padding: 0; border-top: 1px solid var(--rule); isolation: isolate; }
.index__row {
    position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.55fr) 2.75rem;
    gap: .5rem clamp(1.5rem, 4vw, 3rem); align-items: start;
    padding: 1.4rem 0; border-bottom: 1px solid var(--rule);
}
.index__row::before {
    content: ""; position: absolute; inset: -1px calc(var(--gutter) * -.5); z-index: -1;
    background: var(--gold); opacity: 0; transition: opacity .18s;
}
.index__row h3 { font-size: clamp(1.4rem, 2.3vw, 1.85rem); }
.index__row h3 a { text-decoration: none; }
.index__row h3 a::after { content: ""; position: absolute; inset: 0; }
.index__kind { display: block; margin-top: .45rem; font-family: var(--font-text); font-size: .93rem; font-stretch: 86%; font-weight: 600; letter-spacing: 0; line-height: 1.35; text-transform: none; color: var(--muted); }
.index__row p { margin: 0; max-width: 43rem; }
.index__go { justify-self: end; width: 2.75rem; height: 2.75rem; display: grid; place-items: center; border: 1px solid var(--ink); font-size: 1.1rem; transition: transform .2s var(--ease), background-color .18s; }
.index__row:has(a):hover::before { opacity: 1; }
.index__row:has(a):hover .index__kind { color: var(--ink); }
.index__row:has(a):hover .index__go { background: var(--ink); color: var(--gold); transform: translate(3px, -3px); }
@media (max-width: 760px) {
    .index__row { grid-template-columns: minmax(0, 1fr) 2.75rem; }
    .index__row p { grid-column: 1 / -1; grid-row: 2; }
}

.tags { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.tag {
    display: inline-flex; align-items: center; min-height: 1.9rem; padding: .15rem .65rem;
    border: 1px solid var(--ink); background: var(--paper); color: var(--ink);
    font-size: .88rem; font-stretch: 86%; font-weight: 600; line-height: 1.3; text-decoration: none;
}
a.tag { position: relative; z-index: 1; transition: background-color .15s; }
a.tag:hover { background: var(--gold); }
.tags--lg .tag { min-height: 2.5rem; padding: .3rem .95rem; font-size: 1rem; }

/* ---------- Fascia oro / nera ---------- */
.band { background: var(--gold); border-bottom: 1px solid var(--rule); padding-block: clamp(3rem, 7vw, 5rem); }
.band--ink { background: var(--ink); color: var(--paper); }
.band__in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.75rem 3rem; }
.band h2 { font-size: clamp(2rem, 4.6vw, 3.4rem); }
.band p { margin: .7rem 0 0; max-width: 37rem; font-size: 1.12rem; }
.band--ink p { color: var(--on-ink-soft); }
.band__actions { display: flex; flex-wrap: wrap; gap: .8rem; }

/* ---------- Card articoli ---------- */
.post-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.6rem; list-style: none; padding: 0; }
@media (max-width: 1000px) { .post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .post-grid { grid-template-columns: 1fr; } }

.post-card {
    position: relative; height: 100%; display: flex; flex-direction: column;
    border: 1px solid var(--rule); background: var(--paper);
    transition: transform .22s var(--ease), box-shadow .22s var(--ease);
}
.post-card:hover, .post-card:focus-within { transform: translate(-4px, -4px); box-shadow: 8px 8px 0 var(--gold); }
.post-card__media { aspect-ratio: 16 / 9; overflow: hidden; border-bottom: 1px solid var(--rule); background: var(--ink); }
.post-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.post-card:hover .post-card__media img { transform: scale(1.03); }
.post-card__body { flex: 1; display: flex; flex-direction: column; gap: .75rem; padding: 1.25rem 1.35rem 1.4rem; }
.post-card h3 { font-size: clamp(1.3rem, 1.9vw, 1.6rem); line-height: 1.05; }
.post-card h3 a { text-decoration: none; }
.post-card h3 a::after { content: ""; position: absolute; inset: 0; }
.post-card p { margin: 0; font-size: .99rem; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.post-card .tags { margin-top: auto; padding-top: .35rem; }

.post-meta-line { display: flex; flex-wrap: wrap; align-items: center; gap: .2rem .85rem; margin: 0; padding: 0; list-style: none; }
.post-meta-line > * + * { padding-left: .85rem; border-left: 1px solid var(--rule-soft); }
.on-ink .post-meta-line > * + * { border-left-color: rgba(255, 255, 255, .35); }

/* ---------- Blog: testata, articolo in evidenza, filtri ---------- */
.masthead { padding-block: clamp(2.5rem, 6vw, 4.5rem) clamp(2rem, 4vw, 3rem); }
.masthead h1 { font-size: clamp(3.4rem, 11vw, 6rem); }
.masthead p { margin: 1rem 0 0; max-width: 42rem; font-size: clamp(1.1rem, 1.6vw, 1.3rem); line-height: 1.5; }

.featured {
    position: relative; display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
    border: 1px solid var(--rule); background: var(--paper);
    transition: transform .22s var(--ease), box-shadow .22s var(--ease);
}
.featured:hover, .featured:focus-within { transform: translate(-4px, -4px); box-shadow: 10px 10px 0 var(--gold); }
.featured__media { display: flex; align-items: center; overflow: hidden; border-right: 1px solid var(--rule); background: var(--ink); }
.featured__media img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; transition: transform .6s var(--ease); }
.featured:hover .featured__media img { transform: scale(1.025); }
.featured__body { display: flex; flex-direction: column; justify-content: center; gap: 1rem; padding: clamp(1.5rem, 3vw, 2.75rem); }
.featured h2 { font-size: clamp(1.8rem, 3.1vw, 2.8rem); line-height: 1.02; }
.featured h2 a { text-decoration: none; }
.featured h2 a::after { content: ""; position: absolute; inset: 0; }
.featured p { margin: 0; font-size: 1.08rem; line-height: 1.5; }
.featured__cta { display: inline-flex; align-items: center; gap: .5rem; font-family: var(--font-display); text-transform: uppercase; letter-spacing: .05em; font-size: 1.05rem; }
.featured:hover .featured__cta .ic { transform: translateX(5px); }
.featured__cta .ic { transition: transform .22s var(--ease); }
@media (max-width: 899px) {
    .featured { grid-template-columns: 1fr; }
    .featured__media { border-right: 0; border-bottom: 1px solid var(--rule); }
}

.filters { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem 2rem; margin-bottom: 1.75rem; padding-top: 1.25rem; border-top: 6px solid var(--ink); }
.filters__chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.chip {
    min-height: 2.75rem; padding: .3rem 1rem; border: 1px solid var(--ink); background: var(--paper);
    font-weight: 600; font-stretch: 88%; font-size: .98rem; cursor: pointer; transition: background-color .15s;
}
.chip:hover { background: var(--gold); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.search { position: relative; flex: 1 1 15rem; max-width: 22rem; }
.search .ic { position: absolute; left: .9rem; top: 50%; transform: translateY(-50%); pointer-events: none; }
.search input {
    width: 100%; min-height: 2.75rem; padding: .5rem .9rem .5rem 2.5rem; font: inherit;
    border: 1px solid var(--ink); border-radius: 0; background: var(--paper); color: var(--ink);
}
.search input:focus-visible { outline-offset: 0; box-shadow: 4px 4px 0 var(--gold); }
.filters__count { margin: 0 0 1.25rem; }
.empty { padding: 3rem 1.5rem; border: 1px solid var(--rule); text-align: left; }
.empty h3 { margin-bottom: .75rem; }

/* ---------- Domande frequenti ---------- */
.faq { border-top: 1px solid var(--rule); max-width: 56rem; }
.faq details { border-bottom: 1px solid var(--rule); }
.faq summary {
    list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
    padding: 1.2rem 0; font-weight: 700; font-size: 1.14rem; line-height: 1.35;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary .ic { font-size: 1.1rem; transition: transform .25s var(--ease); }
.faq summary:hover { background: linear-gradient(var(--gold), var(--gold)) 0 100% / 100% 4px no-repeat; }
.faq details[open] summary .ic { transform: rotate(45deg); }
.faq details p { margin: 0 0 1.35rem; max-width: 46rem; }

/* ---------- Moduli ---------- */
.contact { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); gap: clamp(2rem, 6vw, 5rem); align-items: start; }
@media (max-width: 899px) { .contact { grid-template-columns: 1fr; } }
.contact__list { list-style: none; padding: 0; border-top: 1px solid var(--rule); }
.contact__list li { border-bottom: 1px solid var(--rule); }
.contact__list a, .contact__list span.row {
    display: grid; grid-template-columns: 1.5rem 1fr; gap: .9rem; align-items: center; min-height: 3.6rem; padding: .6rem 0;
    text-decoration: none; font-weight: 600; font-size: 1.06rem;
}
.contact__list a:hover { background: linear-gradient(var(--gold), var(--gold)) 0 100% / 100% 4px no-repeat; }
.contact__list small { display: block; font-weight: 500; font-size: .9rem; color: var(--muted); }

.form { display: grid; gap: 1.15rem; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.15rem; }
@media (max-width: 640px) { .form__row { grid-template-columns: 1fr; } }
.field label { display: block; margin-bottom: .4rem; font-weight: 700; font-stretch: 88%; font-size: .99rem; }
.field input, .field select, .field textarea {
    width: 100%; min-height: 3.1rem; padding: .8rem .95rem; font: inherit; color: var(--ink);
    background-color: var(--paper); border: 1px solid var(--ink); border-radius: 0; appearance: none;
}
.field select {
    padding-right: 2.6rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23000' stroke-width='2' d='M2 5.5l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right .95rem center; background-size: .85rem;
}
.field textarea { min-height: 9.5rem; resize: vertical; line-height: 1.5; }
.field :is(input, select, textarea):focus-visible { outline: 3px solid var(--ink); outline-offset: 0; box-shadow: 5px 5px 0 var(--gold); }
.field :is(input, select, textarea)[aria-invalid="true"] { border-color: var(--danger); box-shadow: inset 0 0 0 1px var(--danger); }
.field__error { margin: .4rem 0 0; font-size: .93rem; font-weight: 600; color: var(--danger); }
.form__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; }
.form__note { margin: 0; }
.form__status { margin: 0; padding: .9rem 1.1rem; border: 2px solid var(--ink); font-weight: 600; }
.form__status[data-state="error"] { border-color: var(--danger); color: var(--danger); }
.form__done { padding: clamp(1.5rem, 4vw, 2.5rem); border: 2px solid var(--ink); box-shadow: 8px 8px 0 var(--gold); }
.form__done h3 { margin-bottom: .6rem; }
.form__done p { margin: 0; }

/* ---------- Piè di pagina ---------- */
.site-footer { background: var(--ink); color: var(--paper); padding-block: clamp(3rem, 7vw, 5rem) 2rem; }
.site-footer p { color: var(--on-ink-soft); font-size: .98rem; }
.footer-grid { display: grid; grid-template-columns: 1.5fr repeat(4, minmax(0, 1fr)); gap: 2.5rem 2rem; }
@media (max-width: 1000px) { .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .footer-grid > :first-child { grid-column: 1 / -1; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer h2 { font-size: 1.15rem; letter-spacing: .05em; margin-bottom: 1rem; color: var(--gold); }
.footer-brand img { height: 38px; width: auto; background: var(--paper); padding: 6px 10px; margin-bottom: 1.1rem; }
.footer-links { list-style: none; padding: 0; display: grid; gap: .1rem; }
.footer-links a { display: inline-flex; align-items: center; min-height: 2.1rem; text-decoration: none; font-size: .98rem; color: var(--on-ink-soft); transition: color .15s; }
.footer-links a:hover { color: var(--gold); text-decoration: underline; }
.footer-social { display: flex; gap: .5rem; margin-top: 1.25rem; list-style: none; padding: 0; }
.footer-social a { width: 2.75rem; height: 2.75rem; display: grid; place-items: center; border: 1px solid rgba(255, 255, 255, .5); transition: background-color .15s, color .15s, border-color .15s; }
.footer-social a:hover { background: var(--gold); color: var(--ink); border-color: var(--gold); }
.footer-zones { margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid rgba(255, 255, 255, .28); }
.footer-zones p { margin: 0; max-width: 62rem; }
.footer-zones strong { color: var(--paper); }
.footer-bottom { margin-top: 1.5rem; padding-top: 1.5rem; border-top: 1px solid rgba(255, 255, 255, .28); display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 2rem; }
.footer-bottom p { margin: 0; font-size: .92rem; }
.footer-bottom a { color: var(--paper); }

/* ==========================================================================
   Articolo
   ========================================================================== */
.progress { position: fixed; top: var(--header-h); left: 0; right: 0; z-index: 98; height: 5px; pointer-events: none; }
.progress span { display: block; height: 100%; background: var(--gold); border-bottom: 1px solid var(--ink); transform: scaleX(0); transform-origin: 0 50%; }

.post-head { padding-block: clamp(2rem, 5vw, 3.5rem) clamp(1.75rem, 3.5vw, 2.5rem); }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin: 0 0 1.6rem; padding: 0; list-style: none; font-size: .94rem; font-stretch: 88%; font-weight: 600; }
.crumbs li + li::before { content: "/"; margin-right: .5rem; color: var(--muted); }
.crumbs [aria-current] { color: var(--muted); }
.post-title { max-width: 62rem; font-size: clamp(2.2rem, 5.6vw, 4.4rem); }
.post-title.is-long { font-size: clamp(1.95rem, 4.3vw, 3.4rem); line-height: 1.01; }
.post-dek { margin: 1.4rem 0 0; max-width: 46rem; font-family: var(--font-read); font-size: clamp(1.15rem, 1.7vw, 1.4rem); line-height: 1.45; }
.post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .8rem 1.5rem; margin-top: 1.9rem; padding-top: 1.15rem; border-top: 1px solid var(--rule); }
.post-meta__author { display: inline-flex; align-items: center; gap: .65rem; font-weight: 700; text-decoration: none; }
.post-meta__author img { width: 42px; height: 42px; object-fit: cover; object-position: 50% 15%; border: 1px solid var(--ink); }
.post-meta .post-meta-line { color: var(--ink); }

.post-cover { margin-block: 0 clamp(2.25rem, 5vw, 3.75rem); }
.post-cover__frame { position: relative; margin-right: var(--offset); }
.post-cover__frame::before { content: ""; position: absolute; inset: 0; background: var(--gold); border: 1px solid var(--ink); transform: translate(var(--offset), var(--offset)); }
.post-cover img { position: relative; width: 100%; border: 1px solid var(--ink); background: var(--wash); }

.post-layout { display: grid; grid-template-columns: 3.25rem minmax(0, 44rem) minmax(0, 16rem); justify-content: space-between; gap: 2.5rem; align-items: start; padding-bottom: var(--section); }
.post-rail { grid-column: 1; grid-row: 1; position: sticky; top: calc(var(--header-h) + 2rem); display: flex; flex-direction: column; gap: .5rem; }
.post-main { grid-column: 2; grid-row: 1; min-width: 0; }
.post-toc { grid-column: 3; grid-row: 1; position: sticky; top: calc(var(--header-h) + 2rem); max-height: calc(100vh - var(--header-h) - 4rem); overflow-y: auto; padding-top: .9rem; border-top: 6px solid var(--ink); }

.rail-btn {
    position: relative; width: 3.25rem; height: 3.25rem; display: grid; place-items: center; padding: 0;
    border: 1px solid var(--ink); background: var(--paper); color: var(--ink); font-size: 1.15rem;
    text-decoration: none; cursor: pointer; touch-action: manipulation;
    transition: transform .16s var(--ease), box-shadow .16s var(--ease), background-color .16s;
}
.rail-btn:hover { background: var(--gold); transform: translate(-2px, -2px); box-shadow: 2px 2px 0 var(--ink); }
.rail-btn:active { transform: none; box-shadow: none; }
.rail-btn[aria-pressed="true"] { background: var(--ink); color: var(--gold); }
.rail-btn b { font-family: var(--font-display); font-weight: 400; font-size: 1rem; letter-spacing: .02em; }
.rail-sep { height: 1px; margin: .35rem 0; background: var(--ink); border: 0; }
.rail-btn[data-tip]::after {
    content: attr(data-tip); position: absolute; left: calc(100% + .6rem); top: 50%; transform: translateY(-50%);
    padding: .3rem .6rem; background: var(--ink); color: var(--paper); font: 600 .85rem/1.3 var(--font-text); white-space: nowrap;
    opacity: 0; pointer-events: none; transition: opacity .12s; z-index: 5;
}
.rail-btn[data-tip]:hover::after, .rail-btn[data-tip]:focus-visible::after { opacity: 1; }

.post-toc summary { list-style: none; display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: .8rem; font-family: var(--font-display); font-size: 1.15rem; letter-spacing: .04em; text-transform: uppercase; }
.post-toc summary::-webkit-details-marker { display: none; }
.post-toc summary .ic { display: none; }
.post-toc__pct { font-family: var(--font-text); font-size: .9rem; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: 0; }
.post-toc ol { list-style: none; padding: 0; display: grid; gap: 2px; }
.post-toc a { display: block; padding: .42rem .65rem; font-size: .95rem; line-height: 1.3; font-weight: 500; text-decoration: none; color: var(--muted); transition: background-color .15s, color .15s; }
.post-toc a:hover { color: var(--ink); background: var(--wash); }
.post-toc a[aria-current="true"] { background: var(--gold); color: var(--ink); font-weight: 700; }
.post-toc li.is-sub a { padding-left: 1.5rem; font-size: .9rem; }

@media (max-width: 1099px) {
    .post-layout { grid-template-columns: minmax(0, 44rem); justify-content: center; gap: 1.5rem; }
    .post-rail, .post-main, .post-toc { grid-column: 1; grid-row: auto; position: static; }
    .post-rail { flex-direction: row; flex-wrap: wrap; }
    .rail-sep { width: 1px; height: 3.25rem; margin: 0 .35rem; }
    .rail-btn[data-tip]::after { display: none; }
    .post-toc { max-height: none; overflow: visible; }
    .post-toc summary { cursor: pointer; margin-bottom: 0; padding-bottom: .9rem; }
    .post-toc[open] summary { margin-bottom: .4rem; }
    .post-toc summary .ic { display: inline-block; transition: transform .2s; }
    .post-toc[open] summary .ic { transform: rotate(180deg); }
    .post-toc__pct { display: none; }
    .post-toc ol { padding-bottom: 1rem; }
    .post-toc a { padding-block: .65rem; }
}

/* ---------- Testo dell'articolo ---------- */
.prose {
    font-family: var(--font-read); font-size: calc(1.1875rem * var(--prose-scale, 1)); line-height: 1.7;
    font-optical-sizing: auto; font-variant-numeric: oldstyle-nums proportional-nums;
}
.prose > * + * { margin-top: 1.15em; }
.prose p { margin-bottom: 0; }
.prose h2, .prose h3, .prose h4 { scroll-margin-top: calc(var(--header-h) + 1.5rem); }
.prose h2 { position: relative; margin-top: 2.3em; padding-top: .7em; border-top: 1px solid var(--rule); font-size: clamp(1.7rem, 3.2vw, 2.35rem); line-height: 1.02; }
.prose h3 { margin-top: 1.9em; font-size: clamp(1.3rem, 2.2vw, 1.6rem); line-height: 1.05; }
.prose h2 + *, .prose h3 + * { margin-top: .8em; }
.prose > :first-child { margin-top: 0; }
.prose a { text-decoration: underline; text-decoration-color: var(--gold); text-decoration-thickness: .14em; transition: background-color .15s; }
.prose a:hover { background: var(--gold); text-decoration-color: var(--ink); }
.prose ul, .prose ol { padding-left: 1.35em; }
.prose li + li { margin-top: .5em; }
.prose li::marker { color: var(--gold-deep); font-weight: 700; }
.prose blockquote { margin-inline: 0; padding: 1.1em 1.35em; border: 1px solid var(--ink); background: var(--wash); font-style: italic; }
.prose blockquote > :last-child { margin-bottom: 0; }
.prose img { max-width: 100%; height: auto; border: 1px solid var(--ink); }
.prose img[data-zoom] { cursor: zoom-in; }
.prose figure { margin-inline: 0; }
.prose hr { margin-block: 2.5em; border: 0; border-top: 1px solid var(--rule); }
.prose code { font-family: var(--font-mono); font-size: .84em; padding: .12em .38em; background: var(--wash); border: 1px solid var(--rule-soft); font-variant-numeric: normal; }
.prose pre { position: relative; overflow: auto; padding: 1.25rem 1.35rem; background: var(--ink); color: #f4f4f4; font-family: var(--font-mono); font-size: .9rem; line-height: 1.6; tab-size: 2; }
.prose pre code { padding: 0; background: none; border: 0; font-size: inherit; color: inherit; }
.code-block { position: relative; }
.code-copy { position: absolute; top: .5rem; right: .5rem; z-index: 2; min-height: 2rem; padding: .2rem .7rem; border: 1px solid rgba(255, 255, 255, .6); background: var(--ink); color: var(--paper); font: 600 .82rem/1.2 var(--font-text); cursor: pointer; }
.code-copy:hover { background: var(--gold); color: var(--ink); border-color: var(--gold); }

.heading-link { margin-left: .45rem; padding: 0 .2rem; border: 0; background: none; color: var(--gold-deep); font-size: .62em; cursor: pointer; opacity: 0; transition: opacity .15s; vertical-align: .12em; }
.prose h2:hover .heading-link, .prose h3:hover .heading-link, .heading-link:focus-visible { opacity: 1; }

.table-wrap { overflow-x: auto; border: 1px solid var(--ink); -webkit-overflow-scrolling: touch; }
.table-wrap:focus-visible { outline-offset: 2px; }
.prose table { width: 100%; min-width: 33rem; border-collapse: collapse; font-family: var(--font-text); font-size: .95rem; line-height: 1.45; font-variant-numeric: tabular-nums lining-nums; }
.prose th { padding: .75rem .95rem; background: var(--ink); color: var(--paper); text-align: left; font-weight: 700; font-stretch: 88%; vertical-align: bottom; }
.prose td { padding: .75rem .95rem; border-top: 1px solid var(--rule-soft); vertical-align: top; }
.prose tbody tr:nth-child(even) td { background: var(--wash); }
.prose td.num, .prose th.num { text-align: right; white-space: nowrap; }
.prose td:first-child { font-weight: 700; }

.prose .note { font-size: .92em; font-style: italic; color: #333; }
.prose .tldr { padding: 1.3rem 1.5rem 1.45rem; border: 1px solid var(--ink); box-shadow: 8px 8px 0 var(--gold); margin-right: 8px; font-family: var(--font-text); font-size: 1.03rem; line-height: 1.55; font-variant-numeric: normal; }
.prose .tldr h2 { margin: 0 0 .75rem; padding: 0; border: 0; font-size: 1.35rem; letter-spacing: .03em; }
.prose .tldr ul { margin-top: 0; }
.prose .tldr li::marker { color: var(--ink); }
.prose .tldr + * { margin-top: 2em; }
.prose .sources { font-family: var(--font-text); font-size: .98rem; line-height: 1.5; font-variant-numeric: normal; }

/* ---------- Grafici ---------- */
.chart { margin: 2em 0 0; padding: 1.3rem 1.4rem 1.2rem; border: 1px solid var(--ink); font-family: var(--font-text); font-variant-numeric: lining-nums; --chart: #a8851f; }
.chart .chart__title { margin: 0; font-weight: 800; font-stretch: 92%; font-size: 1.12rem; line-height: 1.3; }
.chart .chart__sub { margin: .3rem 0 1.15rem; font-size: .93rem; line-height: 1.45; color: var(--muted); }
.bars { list-style: none; margin: 0; padding: 0; display: grid; gap: .65rem; }
.prose .bars { padding-left: 0; }
.prose .bars li + li { margin-top: 0; }
.bar { display: grid; grid-template-columns: minmax(6.5rem, 10.5rem) minmax(0, 1fr); gap: .3rem 1rem; align-items: center; padding: .15rem 0; cursor: default; outline-offset: 4px; }
.bar__label { font-size: .96rem; font-weight: 600; line-height: 1.25; }
.bar__track {
    --val: 3.9rem;
    display: flex; align-items: center; gap: .55rem; padding-right: var(--val); min-height: 24px;
    background:
        linear-gradient(var(--rule-soft), var(--rule-soft)) calc(100% - var(--val)) 0 / 1px 100% no-repeat,
        repeating-linear-gradient(to right, var(--rule-soft) 0 1px, transparent 1px 25%) left / calc(100% - var(--val)) 100% no-repeat;
}
.bar__fill { flex: none; height: 20px; background: var(--chart); border-radius: 0 4px 4px 0; transform-origin: 0 50%; transition: background-color .15s; }
.bar__value { flex: none; padding: 0 .25rem; margin-left: -.25rem; background: var(--paper); font-size: .96rem; font-weight: 700; font-variant-numeric: tabular-nums lining-nums; white-space: nowrap; }
.bar:hover .bar__fill, .bar:focus-visible .bar__fill { background: var(--ink); }
.bar--na .bar__value { font-weight: 500; color: var(--muted); }
.chart .chart__axis { display: grid; grid-template-columns: minmax(6.5rem, 10.5rem) minmax(0, 1fr); gap: 0 1rem; margin: .5rem 0 0; font-size: .8rem; color: var(--muted); font-variant-numeric: tabular-nums lining-nums; }
.chart__axis span { grid-column: 2; display: flex; justify-content: space-between; padding-right: 3.9rem; }
.chart__axis i { font-style: normal; width: 0; display: flex; justify-content: center; white-space: nowrap; }
.chart__axis i:first-child { justify-content: flex-start; }
.chart__axis i:last-child { justify-content: flex-end; }
.chart .chart__src { margin: .9rem 0 0; font-size: .85rem; color: var(--muted); }
.chart__multiples { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.4rem 1.6rem; }
.chart__multiples h4 { margin: 0 0 .65rem; padding-bottom: .4rem; border-bottom: 1px solid var(--ink); font-family: var(--font-text); font-size: .96rem; font-weight: 800; font-stretch: 92%; letter-spacing: 0; line-height: 1.25; text-transform: none; }
.chart__multiples .bar { grid-template-columns: 1fr; gap: .15rem; }
.chart__multiples .bar__track { --val: 3rem; }
.chart__multiples .bar__label { font-size: .88rem; }
.chart--anim .bar__fill { transform: scaleX(0); }
.chart--anim.is-in .bar__fill { transform: none; transition: transform .9s var(--ease), background-color .15s; }
.chart--anim.is-in .bar:nth-child(2) .bar__fill { transition-delay: .08s, 0s; }
.chart--anim.is-in .bar:nth-child(3) .bar__fill { transition-delay: .16s, 0s; }
.chart--anim.is-in .bar:nth-child(4) .bar__fill { transition-delay: .24s, 0s; }
.chart--anim .bar__value { opacity: 0; }
.chart--anim.is-in .bar__value { opacity: 1; transition: opacity .4s .45s; }
@media (max-width: 720px) {
    .chart { padding: 1.1rem 1rem 1rem; }
    .chart__multiples { grid-template-columns: 1fr; }
    .bar { grid-template-columns: 1fr; gap: .15rem; }
    .chart .chart__axis { grid-template-columns: 1fr; }
    .chart .chart__axis span { grid-column: 1; }
}
.chart-tip { position: fixed; z-index: 200; max-width: 18rem; padding: .55rem .75rem; background: var(--ink); color: var(--paper); font: 500 .88rem/1.4 var(--font-text); pointer-events: none; box-shadow: 4px 4px 0 var(--gold); }
.chart-tip b { display: block; font-size: 1.05rem; font-weight: 800; }

/* ---------- Fine articolo ---------- */
.post-cta { margin-top: 3rem; padding: clamp(1.5rem, 4vw, 2.25rem); background: var(--gold); border: 1px solid var(--ink); }
.post-cta h2 { font-size: clamp(1.7rem, 3.2vw, 2.3rem); }
.post-cta p { margin: .7rem 0 1.3rem; font-size: 1.08rem; max-width: 36rem; }

.share { margin-top: 3rem; padding-top: 1.1rem; border-top: 6px solid var(--ink); }
.share h2 { margin-bottom: 1.1rem; font-size: 1.6rem; }
.share__list { display: flex; flex-wrap: wrap; gap: .6rem; list-style: none; padding: 0; }
.share-btn {
    display: inline-flex; align-items: center; gap: .55rem; min-height: 3rem; padding: .55rem 1.05rem;
    border: 1px solid var(--ink); background: var(--paper); color: var(--ink);
    font-weight: 700; font-stretch: 88%; font-size: .99rem; text-decoration: none; cursor: pointer; touch-action: manipulation;
    transition: transform .16s var(--ease), box-shadow .16s var(--ease), background-color .16s;
}
.share-btn:hover { background: var(--gold); transform: translate(-2px, -2px); box-shadow: 2px 2px 0 var(--ink); }
.share-btn:active { transform: none; box-shadow: none; }

.author { margin-top: 3rem; display: grid; grid-template-columns: 104px 1fr; gap: 1.5rem; align-items: start; padding: 1.5rem; border: 1px solid var(--ink); }
.author img { width: 104px; height: 104px; object-fit: cover; object-position: 50% 15%; border: 1px solid var(--ink); }
.author h2 { font-size: 1.6rem; margin-bottom: .5rem; }
.author p { margin: 0 0 .9rem; font-size: 1rem; }
.author__links { display: flex; flex-wrap: wrap; gap: .4rem 1.3rem; list-style: none; padding: 0; }
.author__links a { display: inline-flex; align-items: center; gap: .4rem; min-height: 2.5rem; }
@media (max-width: 560px) { .author { grid-template-columns: 1fr; } }

.pager { margin-top: 3rem; display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.pager a { display: flex; flex-direction: column; gap: .5rem; padding: 1.15rem 1.25rem; border: 1px solid var(--ink); text-decoration: none; transition: transform .2s var(--ease), box-shadow .2s var(--ease); }
.pager a:hover { transform: translate(-3px, -3px); box-shadow: 6px 6px 0 var(--gold); }
.pager a.is-next { text-align: right; align-items: flex-end; }
.pager strong { font-family: var(--font-display); font-weight: 400; font-size: 1.2rem; line-height: 1.08; text-transform: uppercase; }
.pager .meta { display: inline-flex; align-items: center; gap: .4rem; }
@media (max-width: 640px) { .pager { grid-template-columns: 1fr; } .pager a.is-next { text-align: left; align-items: flex-start; } }

/* ---------- Strumenti flottanti ---------- */
.fab-stack { position: fixed; right: max(1rem, env(safe-area-inset-right)); bottom: max(1rem, env(safe-area-inset-bottom)); z-index: 90; display: grid; gap: .5rem; }
.fab { width: 3.25rem; height: 3.25rem; display: grid; place-items: center; padding: 0; border: 2px solid var(--ink); background: var(--paper); color: var(--ink); font-size: 1.2rem; cursor: pointer; box-shadow: 4px 4px 0 var(--ink); transition: transform .16s var(--ease), box-shadow .16s var(--ease), background-color .16s, opacity .2s; }
.fab:hover { background: var(--gold); transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--ink); }
.fab:active { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--ink); }
.fab--gold { background: var(--gold); }
.fab[hidden] { display: none; }

.toast { position: fixed; left: 50%; bottom: max(1.25rem, env(safe-area-inset-bottom)); z-index: 250; transform: translate(-50%, 150%); padding: .8rem 1.2rem; background: var(--ink); color: var(--paper); border: 2px solid var(--gold); font-weight: 600; max-width: calc(100vw - 2rem); visibility: hidden; transition: transform .3s var(--ease), visibility 0s .3s; pointer-events: none; }
.toast.is-on { transform: translate(-50%, 0); visibility: visible; transition-delay: 0s; }

.quote-pop { position: absolute; z-index: 150; display: flex; background: var(--ink); box-shadow: 4px 4px 0 var(--gold); }
.quote-pop button { display: inline-flex; align-items: center; gap: .4rem; min-height: 2.6rem; padding: .3rem .8rem; border: 0; border-right: 1px solid rgba(255, 255, 255, .3); background: none; color: var(--paper); font: 600 .88rem/1 var(--font-text); cursor: pointer; }
.quote-pop button:last-child { border-right: 0; }
.quote-pop button:hover { background: var(--gold); color: var(--ink); }

.listen-bar { position: fixed; left: max(1rem, env(safe-area-inset-left)); bottom: max(1rem, env(safe-area-inset-bottom)); z-index: 91; display: flex; align-items: center; gap: .25rem; padding: .35rem .35rem .35rem .9rem; background: var(--ink); color: var(--paper); box-shadow: 4px 4px 0 var(--gold); font-weight: 600; font-size: .93rem; }
.listen-bar span { margin-right: .5rem; }
.listen-bar button { width: 2.6rem; height: 2.6rem; display: grid; place-items: center; border: 0; background: none; color: var(--paper); cursor: pointer; font-size: 1.1rem; }
.listen-bar button:hover { background: var(--gold); color: var(--ink); }
.prose .is-speaking { background: linear-gradient(var(--gold), var(--gold)) 0 100% / 100% .28em no-repeat; }

.lightbox { max-width: none; max-height: none; width: 100vw; height: 100vh; margin: 0; padding: clamp(1rem, 4vw, 3rem); border: 0; background: rgba(0, 0, 0, .92); display: none; place-items: center; overscroll-behavior: contain; }
.lightbox[open] { display: grid; }
.lightbox::backdrop { background: rgba(0, 0, 0, .6); }
.lightbox img { max-width: 100%; max-height: calc(100vh - 6rem); border: 1px solid var(--paper); cursor: zoom-out; }
.lightbox button { position: absolute; top: 1rem; right: 1rem; width: 3rem; height: 3rem; display: grid; place-items: center; border: 2px solid var(--paper); background: var(--ink); color: var(--paper); cursor: pointer; font-size: 1.1rem; }
.lightbox button:hover { background: var(--gold); color: var(--ink); border-color: var(--gold); }

/* ---------- 404 ---------- */
.lost { padding-block: clamp(3rem, 9vw, 7rem); }
.lost__code { font-family: var(--font-display); font-size: clamp(7rem, 30vw, 19rem); line-height: .8; letter-spacing: -.02em; display: inline-block; background: var(--gold); border: 1px solid var(--ink); padding: .08em .12em 0; box-shadow: var(--offset) var(--offset) 0 var(--ink); }
.lost h1 { margin-top: 2.5rem; font-size: clamp(2rem, 5vw, 3.5rem); }
.lost p { margin: 1rem 0 2rem; max-width: 36rem; font-size: 1.15rem; }

/* ---------- Riduzione del movimento e stampa ---------- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
    .marquee__track { animation: none; width: auto; flex-wrap: wrap; justify-content: center; gap: .6rem 2rem; padding-inline: var(--gutter); }
    .marquee__track [aria-hidden="true"], .marquee__toggle { display: none; }
}

@media print {
    body { padding-top: 0; font-size: 11pt; }
    .site-header, .mobile-menu, .site-footer, .progress, .post-rail, .post-toc, .fab-stack, .toast, .listen-bar, .share, .pager, .post-cta, .band, .related, .skip-link, .heading-link, .code-copy { display: none !important; }
    .post-layout { display: block; padding-bottom: 0; }
    .post-cover__frame::before { display: none; }
    .prose { font-size: 11pt; }
    .prose a { text-decoration: none; }
    .prose a[href^="http"]::after { content: " (" attr(href) ")"; font-size: .8em; word-break: break-all; }
    .prose pre { background: #fff; color: #000; border: 1px solid #000; white-space: pre-wrap; }
    .prose th { background: #fff; color: #000; border-bottom: 2px solid #000; }
    .chart, .table-wrap, .prose .tldr { break-inside: avoid; box-shadow: none; }
    .bar__fill { background: #000 !important; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
    .chart--anim .bar__fill { transform: none; }
    .chart--anim .bar__value { opacity: 1; }
}
