:root {
  --rock: #e8ebea;        /* calcare chiaro */
  --rock-2: #dde2e1;
  --paper: #f6f7f6;
  --ink: #17201f;         /* ardesia */
  --ink-2: #4a5654;
  --line: #c3cbc9;
  --chalk: #ffffff;
  --rope: #b8471f;        /* corda, usata con parsimonia */
  --rope-soft: #f1d9cf;
  --carab: #1f5d74;       /* moschettone anodizzato */
  --contour: rgba(23, 32, 31, .14);

  --f-display: "Big Shoulders Display", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  --f-body: "Source Serif 4", Georgia, "Times New Roman", serif;
  --f-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  --gutter: clamp(16px, 4vw, 48px);
  --maxw: 1180px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --rock: #141a19; --rock-2: #1b2321; --paper: #101514; --ink: #e6ebe9; --ink-2: #a3afac;
    --line: #2f3a38; --chalk: #1c2422; --rope: #e2734b; --rope-soft: #3a231b; --carab: #6fb3cc;
    --contour: rgba(230, 235, 233, .10); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --rock: #141a19; --rock-2: #1b2321; --paper: #101514; --ink: #e6ebe9; --ink-2: #a3afac;
  --line: #2f3a38; --chalk: #1c2422; --rope: #e2734b; --rope-soft: #3a231b; --carab: #6fb3cc;
  --contour: rgba(230, 235, 233, .10); color-scheme: dark;
}

* { box-sizing: border-box; }
body { background: var(--paper); color: var(--ink); font-family: var(--f-body); font-size: 17px; line-height: 1.6; }
a { color: inherit; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--carab); outline-offset: 3px; border-radius: 2px; }
.wrap { max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.mono { font-family: var(--f-mono); font-size: .78rem; letter-spacing: .06em; text-transform: uppercase; }

/* Nav */
.nav { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5; background: color-mix(in srgb, var(--rock) 88%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.nav .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 12px; }
.brand { font-family: var(--f-display); font-weight: 800; font-size: 1.35rem; letter-spacing: .02em; text-transform: uppercase; text-decoration: none; display: flex; align-items: baseline; gap: 10px; }
.brand small { font-family: var(--f-mono); font-weight: 400; font-size: .68rem; color: var(--ink-2); letter-spacing: .08em; }
.nav ul { list-style: none; display: flex; gap: 22px; margin: 0; padding: 0; }
.nav ul a { text-decoration: none; font-family: var(--f-mono); font-size: .76rem; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); }
.nav ul a:hover { color: var(--ink); }
@media (max-width: 760px) { .nav ul { display: none; } .brand small { display: none; } }

/* Hero */
.hero { position: relative; background: var(--rock); border-bottom: 1px solid var(--line); overflow: hidden; }
.hero canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.hero .wrap { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: clamp(24px, 5vw, 72px); align-items: end; padding-block: clamp(48px, 9vw, 112px) clamp(40px, 6vw, 72px); }
.eyebrow { color: var(--rope); margin: 0 0 18px; display: flex; gap: 12px; align-items: center; }
.eyebrow::before { content: ""; width: 28px; height: 2px; background: var(--rope); }
h1 { font-family: var(--f-display); font-weight: 900; text-transform: uppercase; font-size: clamp(3.4rem, 11vw, 8.6rem); line-height: .86; letter-spacing: -.005em; margin: 0; text-wrap: balance; }
h1 .thin { font-weight: 600; color: var(--ink-2); }
.lede { max-width: 34em; font-size: clamp(1.05rem, 1.6vw, 1.22rem); margin: 28px 0 0; color: var(--ink); }
.ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.btn { font-family: var(--f-mono); font-size: .8rem; letter-spacing: .06em; text-transform: uppercase; text-decoration: none; padding: 13px 20px; border: 1.5px solid var(--ink); display: inline-flex; gap: 10px; align-items: center; }
.btn.primary { background: var(--ink); color: var(--paper); }
.btn.primary:hover { background: var(--rope); border-color: var(--rope); }
.btn:not(.primary):hover { background: var(--chalk); }

/* Grade ladder */
.ladder { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column-reverse; gap: 2px; min-width: 200px; }
.ladder li { display: grid; grid-template-columns: 3.4rem 1fr; align-items: center; gap: 12px; }
.ladder .g { font-family: var(--f-display); font-weight: 800; font-size: 1.5rem; line-height: 1; text-align: right; }
.ladder .bar { position: relative; height: 30px; display: flex; align-items: center; padding-left: 10px; background: var(--chalk); border-left: 3px solid var(--ink); font-family: var(--f-mono); font-size: .72rem; color: var(--ink-2); white-space: nowrap; }
.ladder li:last-child .bar { border-left-color: var(--rope); background: var(--rope-soft); color: var(--ink); }
.ladder-cap { grid-column: 1 / -1; margin: 10px 0 0; color: var(--ink-2); text-align: right; }
.ladder-box { display: flex; flex-direction: column; }
@media (max-width: 760px) {
  .hero .wrap { grid-template-columns: minmax(0, 1fr); }
  .ladder-cap { text-align: left; }
}

/* Intro */
.intro { padding-block: clamp(56px, 8vw, 104px); }
.intro .wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: clamp(24px, 5vw, 72px); }
.kicker { font-family: var(--f-display); font-weight: 800; text-transform: uppercase; font-size: clamp(1.8rem, 3.4vw, 2.6rem); line-height: 1; margin: 0; text-wrap: balance; }
.intro p { max-width: 36em; margin: 0 0 1.1em; }
.intro p:first-of-type::first-letter { font-family: var(--f-display); font-weight: 900; float: left; font-size: 4.2em; line-height: .8; margin: .06em .1em 0 0; color: var(--rope); }
.facts { display: flex; flex-wrap: wrap; gap: 10px 28px; margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--line); color: var(--ink-2); }
.facts b { color: var(--ink); font-weight: 500; }
@media (max-width: 760px) { .intro .wrap { grid-template-columns: minmax(0, 1fr); } }

/* Timeline */
.timeline { background: var(--rock); border-block: 1px solid var(--line); padding-block: clamp(56px, 8vw, 96px); }
.sec-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 16px; margin-bottom: 36px; }
.sec-head h2 { font-family: var(--f-display); font-weight: 900; text-transform: uppercase; font-size: clamp(2.4rem, 6vw, 4.2rem); line-height: .9; margin: 0; }
.sec-head p { margin: 0; max-width: 28em; color: var(--ink-2); }

.axis { position: relative; margin-bottom: 40px; }
.bands { display: flex; height: 54px; border: 1.5px solid var(--ink); }
.band { appearance: none; border: 0; border-right: 1.5px solid var(--ink); background: var(--chalk); color: var(--ink); cursor: pointer; font-family: var(--f-display); font-weight: 800; font-size: 1.2rem; padding: 0; min-width: 0; display: flex; align-items: center; justify-content: center; transition: background .2s, color .2s; }
.band:last-child { border-right: 0; }
.band:hover, .band[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.ticks { position: relative; height: 26px; font-family: var(--f-mono); font-size: .7rem; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.ticks span { position: absolute; top: 6px; transform: translateX(-50%); }
.ticks span::before { content: ""; position: absolute; left: 50%; top: -6px; width: 1px; height: 5px; background: var(--ink-2); }
.ticks span:first-child { transform: none; }
.ticks span:first-child::before { left: 0; }
.ticks span:last-child { transform: translateX(-100%); }
.ticks span:last-child::before { left: auto; right: 0; }
.axis-note { margin: 4px 0 0; color: var(--ink-2); }

.phases { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border-top: 1.5px solid var(--ink); border-left: 1.5px solid var(--ink); }
.phase { border-right: 1.5px solid var(--ink); border-bottom: 1.5px solid var(--ink); background: var(--paper); padding: 22px 22px 24px; display: grid; grid-template-rows: auto auto 1fr auto; gap: 10px; transition: background .25s; scroll-margin-top: 90px; }
.phase.is-active { background: var(--chalk); box-shadow: inset 0 0 0 3px var(--rope); }
.phase-top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.roman { font-family: var(--f-display); font-weight: 900; font-size: 2.6rem; line-height: 1; }
.years { color: var(--ink-2); font-variant-numeric: tabular-nums; }
.phase h3 { font-family: var(--f-display); font-weight: 800; text-transform: uppercase; font-size: 1.5rem; line-height: 1.02; margin: 0; text-wrap: balance; }
.phase p { margin: 0; font-size: .97rem; color: var(--ink); }
.phase .key { font-size: .9rem; color: var(--ink-2); border-left: 2px solid var(--line); padding-left: 12px; }
.phase .key em { color: var(--ink); font-style: italic; }
.phase-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-top: 12px; border-top: 1px dashed var(--line); }
.grade { font-family: var(--f-mono); font-size: .74rem; letter-spacing: .04em; color: var(--ink-2); }
.grade b { font-family: var(--f-display); font-weight: 800; font-size: 1.25rem; letter-spacing: 0; color: var(--rope); margin-left: 4px; }
.more { font-family: var(--f-mono); font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; color: var(--carab); text-decoration: none; }
.more:hover { text-decoration: underline; }
@media (max-width: 980px) { .phases { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .ticks .t-opt { display: none; } .phases { grid-template-columns: minmax(0, 1fr); } .band { font-size: .95rem; } }

/* Materiali e tecniche */
.gear { padding-block: clamp(56px, 8vw, 96px); border-bottom: 1px solid var(--line); }
.gear-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px 28px; }
.gear-col { display: grid; grid-template-rows: auto auto 1fr auto; gap: 12px; min-width: 0; }
.gear-col h3 { font-family: var(--f-display); font-weight: 800; text-transform: uppercase; font-size: 1.6rem; line-height: 1; margin: 0; padding-bottom: 10px; border-bottom: 1.5px solid var(--ink); }
.gear-col > p { margin: 0; font-size: .95rem; color: var(--ink-2); }
.steps { list-style: none; margin: 0; padding: 0 0 0 14px; border-left: 2px solid var(--line); display: grid; gap: 14px; align-content: start; }
.steps li { position: relative; display: grid; gap: 2px; }
.steps li::before { content: ""; position: absolute; left: -20px; top: .45em; width: 10px; height: 10px; border-radius: 50%; background: var(--paper); border: 2px solid var(--ink); }
.steps li:last-child::before { background: var(--rope); border-color: var(--rope); }
.steps .when { font-family: var(--f-mono); font-size: .74rem; letter-spacing: .04em; color: var(--rope); font-variant-numeric: tabular-nums; }
.steps .what { font-size: .95rem; line-height: 1.4; }
@media (max-width: 980px) { .gear-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .gear-grid { grid-template-columns: minmax(0, 1fr); gap: 28px; } .gear-col { grid-template-rows: auto auto auto; } .gear-col .steps { display: none; } }

/* Protagonisti teaser */
.people { padding-block: clamp(56px, 8vw, 96px); }
.people ol { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px 24px; }
.people li { display: grid; gap: 4px; padding-top: 14px; border-top: 1.5px solid var(--ink); }
.people .yr { color: var(--rope); }
.people .nm { font-family: var(--f-display); font-weight: 800; text-transform: uppercase; font-size: 1.45rem; line-height: 1.05; }
.people .nt { font-size: .93rem; color: var(--ink-2); }
.people .all { margin-top: 32px; }
@media (max-width: 900px) { .people ol { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .people ol { grid-template-columns: minmax(0, 1fr); } }

footer { border-top: 1px solid var(--line); background: var(--rock-2); padding-block: 36px 44px; font-size: .9rem; color: var(--ink-2); }
footer .wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; }
footer p { margin: 0 0 .6em; max-width: 38em; }
footer a { color: var(--ink); }
@media (max-width: 760px) { footer .wrap { grid-template-columns: minmax(0, 1fr); } }

/* Mappa del sito */
.map-head { background: var(--rock); border-bottom: 1px solid var(--line); padding-block: clamp(40px, 7vw, 80px) clamp(32px, 5vw, 56px); }
.map-head h1 { font-size: clamp(3rem, 9vw, 6.4rem); }
.map-head p { margin: 18px 0 0; max-width: 36em; color: var(--ink-2); }
.map-head .crumbs { margin: 0 0 18px; }
.crumbs a { color: var(--carab); text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.map-body { padding-block: clamp(40px, 6vw, 72px); display: grid; gap: clamp(36px, 5vw, 56px); }
.map-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 36px 28px; }
.map-sec { min-width: 0; }
.map-sec h2 { font-family: var(--f-display); font-weight: 800; text-transform: uppercase; font-size: 1.7rem; line-height: 1; margin: 0; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 12px; padding-bottom: 10px; border-bottom: 1.5px solid var(--ink); }
.map-sec h2 .n { font-family: var(--f-mono); font-weight: 400; font-size: .74rem; color: var(--ink-2); letter-spacing: .04em; text-transform: none; }
.map-sec h3 { font-family: var(--f-mono); font-weight: 500; font-size: .76rem; letter-spacing: .06em; text-transform: uppercase; color: var(--rope); margin: 18px 0 6px; }
.map-list { list-style: none; margin: 0; padding: 0; }
.map-list li { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 7px 0; border-bottom: 1px dashed var(--line); font-size: .97rem; line-height: 1.35; }
.map-list li .url { font-family: var(--f-mono); font-size: .72rem; color: var(--ink-2); white-space: nowrap; }
.map-list li.idx { font-weight: 600; }
.people-map { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 28px; }
.people-map .map-list li { font-size: .93rem; padding: 5px 0; }
.people-map li.new::after { content: "nuova"; font-family: var(--f-mono); font-size: .66rem; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-2); border: 1px solid var(--line); padding: 1px 5px; }
.map-note { margin: 14px 0 0; font-size: .88rem; color: var(--ink-2); }
@media (max-width: 900px) { .people-map { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .map-row, .people-map { grid-template-columns: minmax(0, 1fr); } .map-list li .url { white-space: normal; text-align: right; } }
.foot-links { list-style: none; margin: 0 0 14px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 22px; }
.foot-links a { font-family: var(--f-mono); font-size: .76rem; letter-spacing: .06em; text-transform: uppercase; text-decoration: none; color: var(--ink); }
.foot-links a:hover { color: var(--rope); }


/* ===== Componenti comuni a tutte le pagine interne ===== */
html { scroll-padding-top: 80px; }
body { margin: 0; }
.skip { position: absolute; left: -9999px; top: 0; background: var(--ink); color: var(--paper); padding: 8px 12px; z-index: 10; }
.skip:focus { left: 12px; top: 12px; }
.nav ul a[aria-current="page"] { color: var(--ink); box-shadow: 0 2px 0 var(--rope); }

/* Menu mobile */
.menu { display: none; position: relative; }
.menu summary { list-style: none; cursor: pointer; font-family: var(--f-mono); font-size: .76rem; letter-spacing: .06em; text-transform: uppercase; border: 1.5px solid var(--ink); padding: 7px 12px; }
.menu summary::-webkit-details-marker { display: none; }
.menu[open] summary { background: var(--ink); color: var(--paper); }
.menu ul { display: flex !important; flex-direction: column; gap: 0 !important; position: absolute; right: 0; top: calc(100% + 8px); background: var(--paper); border: 1.5px solid var(--ink); min-width: 230px; padding: 6px 0 !important; }
.menu ul a { display: block; padding: 10px 16px; font-size: .8rem; color: var(--ink); }
.menu ul a:hover { background: var(--rock); }
@media (max-width: 1020px) { .nav .desk { display: none; } .menu { display: block; } .brand small { display: none; } }

/* Testata delle pagine interne */
.page-head { position: relative; background: var(--rock); border-bottom: 1px solid var(--line); overflow: hidden; }
.page-head canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.page-head .wrap { position: relative; padding-block: clamp(32px, 6vw, 72px) clamp(28px, 4.5vw, 52px); }
.page-head h1 { font-size: clamp(2.6rem, 8vw, 5.6rem); line-height: .9; overflow-wrap: anywhere; hyphens: auto; }
.page-head .sub { font-family: var(--f-display); font-weight: 600; text-transform: uppercase; color: var(--ink-2); font-size: clamp(1.1rem, 2.4vw, 1.6rem); margin: 10px 0 0; }
.page-head .lede { margin-top: 20px; }
.crumbs { margin: 0 0 18px; color: var(--ink-2); }
.crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 8px; }
.crumbs li + li::before { content: "›"; margin-right: 8px; color: var(--ink-2); }
.head-meta { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 22px; color: var(--ink-2); }
.head-meta b { color: var(--ink); font-weight: 500; }
.tag { display: inline-block; font-family: var(--f-mono); font-size: .7rem; letter-spacing: .05em; text-transform: uppercase; text-decoration: none; border: 1px solid var(--line); padding: 3px 8px; color: var(--ink-2); background: var(--chalk); }
a.tag:hover { border-color: var(--ink); color: var(--ink); }
.roman-big { font-family: var(--f-display); font-weight: 900; font-size: clamp(4rem, 12vw, 9rem); line-height: .8; color: var(--rope); float: right; margin: 0 0 0 24px; }

/* Corpo con colonna laterale */
.article { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: clamp(28px, 5vw, 64px); padding-block: clamp(40px, 6vw, 72px); align-items: start; }
.article.single { grid-template-columns: minmax(0, 1fr); max-width: 820px; }
@media (max-width: 900px) { .article { grid-template-columns: minmax(0, 1fr); } .article aside { order: -1; } }
.prose { max-width: 40em; min-width: 0; }
.prose > p:first-child { font-size: 1.12rem; }
.prose > p:first-child::first-letter { font-family: var(--f-display); font-weight: 900; float: left; font-size: 4em; line-height: .8; margin: .06em .1em 0 0; color: var(--rope); }
.prose h2 { font-family: var(--f-display); font-weight: 800; text-transform: uppercase; font-size: clamp(1.6rem, 3vw, 2.1rem); line-height: 1; margin: 2.2em 0 .7em; padding-bottom: 8px; border-bottom: 1.5px solid var(--ink); }
.prose h3 { font-family: var(--f-mono); font-weight: 500; font-size: .8rem; letter-spacing: .06em; text-transform: uppercase; color: var(--rope); margin: 1.8em 0 .5em; }
.prose p, .prose li { overflow-wrap: break-word; }
.prose a, .rich a { color: var(--carab); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.prose a:hover, .rich a:hover { color: var(--rope); }
.prose a[href*="glossario"] { color: inherit; text-decoration-style: dotted; text-decoration-color: var(--carab); }
.prose blockquote { margin: 1.8em 0; padding: 4px 0 4px 22px; border-left: 3px solid var(--rope); font-size: 1.15rem; font-style: italic; }
.prose blockquote p { margin: 0 0 .4em; }
.prose blockquote cite { display: block; font-style: normal; font-family: var(--f-mono); font-size: .74rem; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-2); }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin-bottom: .4em; }

/* Riquadro laterale */
.facts-box { border: 1.5px solid var(--ink); background: var(--chalk); position: sticky; top: 84px; }
@media (max-width: 900px) { .facts-box { position: static; } }
.facts-box h2 { font-family: var(--f-mono); font-weight: 500; font-size: .74rem; letter-spacing: .06em; text-transform: uppercase; margin: 0; padding: 10px 16px; background: var(--ink); color: var(--paper); }
.facts-box dl { margin: 0; padding: 6px 16px 14px; }
.facts-box dt { font-family: var(--f-mono); font-size: .68rem; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); margin-top: 12px; }
.facts-box dd { margin: 2px 0 0; font-size: .95rem; line-height: 1.4; }
.facts-box dd a { color: var(--carab); }
.facts-box .tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.facts-box .big { font-family: var(--f-display); font-weight: 800; font-size: 1.9rem; line-height: 1; color: var(--rope); }

/* Sezioni sotto l'articolo */
.band-sec { border-top: 1px solid var(--line); padding-block: clamp(40px, 6vw, 64px); }
.band-sec.alt { background: var(--rock); }
.band-sec h2.sec-title { font-family: var(--f-display); font-weight: 900; text-transform: uppercase; font-size: clamp(1.9rem, 4.5vw, 3rem); line-height: .95; margin: 0 0 24px; }
.steps.wide { padding-left: 18px; max-width: 46em; }
.steps.wide .what { font-size: 1rem; }

/* Griglia di schede */
.cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: 28px 24px; }
.card { display: grid; gap: 4px; align-content: start; padding-top: 14px; border-top: 1.5px solid var(--ink); text-decoration: none; color: inherit; }
.card .yr { color: var(--rope); }
.card .nm { font-family: var(--f-display); font-weight: 800; text-transform: uppercase; font-size: 1.45rem; line-height: 1.05; }
.card .nt { font-size: .93rem; color: var(--ink-2); line-height: 1.45; }
a.card:hover .nm { color: var(--rope); }
a.card:hover { border-top-color: var(--rope); }
.cards.big .nm { font-size: 1.8rem; }
.phase-group { margin-bottom: clamp(40px, 6vw, 64px); scroll-margin-top: 90px; }
.phase-group > header { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 18px; margin-bottom: 20px; }
.phase-group > header h2 { font-family: var(--f-display); font-weight: 900; text-transform: uppercase; font-size: clamp(1.7rem, 4vw, 2.6rem); line-height: 1; margin: 0; }
.phase-group > header h2 a { text-decoration: none; }
.phase-group > header h2 a:hover { color: var(--rope); }
.phase-group > header .years { color: var(--ink-2); }

/* Filtri */
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0 0 28px; }
.filters .lab { color: var(--ink-2); margin-right: 6px; }
.chip { appearance: none; cursor: pointer; font-family: var(--f-mono); font-size: .72rem; letter-spacing: .05em; text-transform: uppercase; padding: 7px 11px; border: 1.5px solid var(--line); background: var(--chalk); color: var(--ink); }
.chip:hover { border-color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.search { font: inherit; font-size: .95rem; padding: 8px 12px; border: 1.5px solid var(--line); background: var(--chalk); color: var(--ink); min-width: min(100%, 260px); }
.search:focus { outline: 2px solid var(--carab); outline-offset: 1px; }
.count { color: var(--ink-2); margin: 0 0 18px; }
[hidden] { display: none !important; }

/* Linea del tempo completa */
.tl { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--line); max-width: 52em; }
.tl-year { position: relative; padding: 0 0 6px 26px; }
.tl-year > h3 { font-family: var(--f-display); font-weight: 800; font-size: 1.6rem; line-height: 1; margin: 22px 0 8px; font-variant-numeric: tabular-nums; }
.tl-year > h3::before { content: ""; position: absolute; left: -7px; top: 30px; width: 12px; height: 12px; border-radius: 50%; background: var(--paper); border: 2px solid var(--ink); }
.tl-year ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.tl-ev { display: grid; grid-template-columns: 6.5em minmax(0, 1fr); gap: 4px 14px; padding: 8px 0; border-bottom: 1px dashed var(--line); }
.tl-ev .d { font-family: var(--f-mono); font-size: .74rem; color: var(--rope); padding-top: 3px; font-variant-numeric: tabular-nums; }
.tl-ev .t { font-size: .98rem; line-height: 1.45; }
.tl-ev .o { grid-column: 2; font-family: var(--f-mono); font-size: .7rem; letter-spacing: .04em; text-transform: uppercase; }
.tl-ev .o a { color: var(--carab); text-decoration: none; }
.tl-ev .o a:hover { text-decoration: underline; }
.tl-blocks { list-style: none; margin: 0; padding: 0; }
.tl-block + .tl-block { margin-top: 36px; }
.tl-phase { margin: 0; padding: 10px 0 10px 18px; border-left: 4px solid var(--rope); background: var(--rock); font-family: var(--f-display); font-weight: 800; text-transform: uppercase; font-size: 1.3rem; max-width: 52em; }
.tl-phase a { text-decoration: none; }
.tl-phase a:hover { color: var(--rope); }
.tl-phase .mono { font-weight: 400; color: var(--ink-2); margin-left: 8px; }
@media (max-width: 520px) { .tl-ev { grid-template-columns: minmax(0, 1fr); } .tl-ev .o { grid-column: 1; } }

/* Glossario */
.gloss-index { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 30px; }
.gloss-index a { font-family: var(--f-display); font-weight: 800; font-size: 1.2rem; text-decoration: none; width: 2em; text-align: center; border: 1px solid var(--line); background: var(--chalk); }
.gloss-index a:hover { border-color: var(--ink); color: var(--rope); }
.prose dl { margin: 0; }
.prose dt { font-family: var(--f-display); font-weight: 800; text-transform: uppercase; font-size: 1.35rem; line-height: 1.1; margin-top: 26px; padding-top: 14px; border-top: 1px solid var(--line); scroll-margin-top: 90px; }
.prose dt:target { color: var(--rope); }
.prose dd { margin: 6px 0 0; }
.prose .letter { font-family: var(--f-display); font-weight: 900; font-size: 2.6rem; color: var(--rope); margin: 40px 0 0; line-height: 1; scroll-margin-top: 90px; }

/* Fonti */
.src-list { list-style: none; margin: 0; padding: 0; }
.src-list li { padding: 10px 0; border-bottom: 1px dashed var(--line); font-size: .96rem; line-height: 1.45; overflow-wrap: anywhere; }
.src-list li a { color: var(--carab); }
.src-list .where { display: block; margin-top: 3px; font-family: var(--f-mono); font-size: .68rem; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-2); }
.src-list .where a { color: var(--ink-2); }

/* Pagina precedente / successiva */
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border-top: 1.5px solid var(--ink); border-bottom: 1.5px solid var(--ink); }
.pager a { display: grid; gap: 4px; padding: 20px var(--gutter); text-decoration: none; }
.pager a:hover { background: var(--chalk); }
.pager a:hover .nm { color: var(--rope); }
.pager .next { text-align: right; border-left: 1.5px solid var(--ink); }
.pager .nm { font-family: var(--f-display); font-weight: 800; text-transform: uppercase; font-size: 1.3rem; line-height: 1.05; }
.pager .lab { color: var(--ink-2); }
.pager span.empty { display: block; }
@media (max-width: 560px) { .pager { grid-template-columns: 1fr; } .pager .next { border-left: 0; border-top: 1.5px solid var(--ink); } }

/* Indice di sezione: righe */
.rows { list-style: none; margin: 0; padding: 0; border-top: 1.5px solid var(--ink); }
.rows li a { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 8px 28px; padding: 22px 0; border-bottom: 1px solid var(--line); text-decoration: none; }
.rows li a:hover h3 { color: var(--rope); }
.rows h3 { font-family: var(--f-display); font-weight: 800; text-transform: uppercase; font-size: 1.7rem; line-height: 1; margin: 0; }
.rows p { margin: 0; color: var(--ink-2); }
@media (max-width: 680px) { .rows li a { grid-template-columns: minmax(0, 1fr); } }

.home-link-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
footer .brandline { font-family: var(--f-display); font-weight: 800; font-size: 1.3rem; text-transform: uppercase; color: var(--ink); margin: 0 0 8px; }
.phase a.more { align-self: end; }

/* Pulsante "torna in cima" */
.to-top { position: fixed; right: max(16px, env(safe-area-inset-right, 0px) + 16px); bottom: max(16px, env(safe-area-inset-bottom, 0px) + 16px); z-index: 20; width: 48px; height: 48px; display: flex; align-items: center; justify-content: center; background: var(--ink); color: var(--paper); border: 1.5px solid var(--ink); box-shadow: 0 6px 18px rgb(0 0 0 / .18); text-decoration: none; opacity: 0; visibility: hidden; transform: translateY(10px); transition: opacity .25s, transform .25s, visibility .25s, background .2s, border-color .2s; }
.to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.to-top:hover, .to-top:focus-visible { background: var(--rope); border-color: var(--rope); color: #fff; }
.to-top:focus-visible { outline: 2px solid var(--rope); outline-offset: 3px; }
@media (max-width: 680px) { .to-top { width: 44px; height: 44px; } }
@media (prefers-reduced-motion: reduce) { .to-top { transition: none; } }

/* Selettore tema chiaro/scuro */
:root[data-theme="light"] { color-scheme: light; }
.nav .wrap { justify-content: flex-start; }
.brand { margin-right: auto; }
.theme-toggle { flex: none; width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; padding: 0; background: transparent; color: var(--ink); border: 1.5px solid var(--ink); cursor: pointer; transition: background .2s, color .2s, border-color .2s; }
.theme-toggle:hover { background: var(--ink); color: var(--paper); }
.theme-toggle .ico-sun { display: none; }
.theme-toggle.is-dark .ico-sun { display: block; }
.theme-toggle.is-dark .ico-moon { display: none; }
@media (prefers-reduced-motion: reduce) { .theme-toggle { transition: none; } }

