:root {
  --ink: #2a2220;
  --muted: #74665e;
  --paper: #f3ead9;
  --paper-2: #fffaf0;
  --wine: #753f48;
  --wine-dark: #47262d;
  --blue: #344f69;
  --gold: #bd8e43;
  --line: #d8c8ad;
  --shadow: 0 18px 60px rgba(56, 38, 30, .12);
  --radius: 1.25rem;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  background:
    linear-gradient(rgba(80, 57, 42, .028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(80, 57, 42, .018) 1px, transparent 1px),
    var(--paper);
  background-size: 30px 30px;
}
button, input, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
img { max-width: 100%; }
:focus-visible { outline: 3px solid #1779ba; outline-offset: 4px; }

.skip-link {
  position: fixed;
  left: -9999px;
  top: 1rem;
  z-index: 100;
  border-radius: .6rem;
  padding: .8rem 1rem;
  color: #111;
  background: #fff;
}
.skip-link:focus { left: 1rem; }

.hero {
  position: relative;
  min-height: min(830px, 96svh);
  display: grid;
  align-content: space-between;
  overflow: hidden;
  color: #fff;
  background: #201a1a;
}
.hero-image, .hero-shade { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-image { object-fit: cover; object-position: center; }
.hero-shade {
  background:
    linear-gradient(90deg, rgba(19, 15, 16, .95) 0%, rgba(25, 19, 20, .8) 40%, rgba(25, 19, 20, .22) 75%),
    linear-gradient(0deg, rgba(20, 15, 16, .75), transparent 45%);
}
.topbar, .hero-copy, .hero-progress { position: relative; z-index: 2; }\n.top-links { display: flex; flex-wrap: wrap; align-items: flex-start; gap: .5rem; }
.topbar {
  width: min(1220px, calc(100% - 2rem));
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-top: max(1rem, env(safe-area-inset-top));
}
.back-link, .icon-button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  border: 1px solid rgba(255,255,255,.23);
  border-radius: 999px;
  padding: .55rem .9rem;
  color: #fff;
  background: rgba(20, 15, 16, .38);
  backdrop-filter: blur(14px);
  text-decoration: none;
  font-weight: 760;
  cursor: pointer;
}
.top-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .5rem; }
.hero-copy {
  width: min(1220px, calc(100% - 2rem));
  margin: auto;
  padding: clamp(4rem, 10vh, 8rem) 0 4rem;
}
.eyebrow, .section-number, .note-label {
  margin: 0 0 .7rem;
  color: #e3b564;
  font-size: .75rem;
  font-weight: 900;
  letter-spacing: .17em;
  text-transform: uppercase;
}
.hero h1 {
  max-width: 900px;
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(3.6rem, 10vw, 8.3rem);
  font-weight: 500;
  line-height: .86;
  letter-spacing: -.06em;
}
.hero-kicker {
  margin: 1rem 0 0;
  color: #f0c675;
  font-family: Georgia, serif;
  font-size: clamp(1.5rem, 4vw, 2.65rem);
  font-style: italic;
}
.hero-lead {
  max-width: 650px;
  margin: 1.4rem 0 0;
  color: #eee4dc;
  font-size: clamp(1rem, 2vw, 1.22rem);
  line-height: 1.65;
}
.primary-cta {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  margin-top: 2rem;
  border-radius: 999px;
  padding: .9rem 1.2rem;
  color: #231b1b;
  background: #f1cf8c;
  text-decoration: none;
  font-weight: 850;
}
.hero-progress {
  width: min(1220px, calc(100% - 2rem));
  margin: 0 auto max(1rem, env(safe-area-inset-bottom));
  display: grid;
  grid-template-columns: auto minmax(120px, 320px);
  align-items: center;
  gap: 1rem;
  color: #eee2d7;
  font-size: .8rem;
  font-weight: 750;
}
.progress-track { height: .4rem; overflow: hidden; border-radius: 99px; background: rgba(255,255,255,.2); }
#progress-bar { display: block; width: 0; height: 100%; background: #e3b564; transition: width .3s; }

main { overflow: clip; }
.story-shell, .documents-section, .sources-section {
  width: min(1160px, calc(100% - 2rem));
  margin: auto;
  padding: clamp(4rem, 8vw, 7rem) 0;
}
.section-heading { max-width: 820px; margin-bottom: 2.2rem; }
.section-heading .section-number, .question-band .section-number { color: var(--wine); }
.section-heading h2, .question-band h2 {
  margin: 0;
  font-family: Georgia, serif;
  font-size: clamp(2.4rem, 6vw, 4.8rem);
  font-weight: 500;
  line-height: .98;
  letter-spacing: -.045em;
}
.section-intro {
  margin: 1.2rem 0 0;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.7;
}
.story-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.2rem;
}
.story-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 250, 240, .78);
  box-shadow: 0 10px 35px rgba(68, 45, 34, .07);
}
.story-card img { display: block; width: 100%; aspect-ratio: 3/2; object-fit: cover; }
.story-card-copy { padding: 1.3rem; }
.story-date { margin: 0; color: var(--wine); font-size: .72rem; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.story-card h3 { margin: .45rem 0 .65rem; font-family: Georgia, serif; font-size: 1.65rem; font-weight: 600; }
.story-card p { margin: 0; color: #514641; line-height: 1.62; }
.story-source { display: block; margin-top: .85rem; color: var(--muted); font-size: .78rem; }
.method-note {
  margin: 2rem 0 0;
  border-left: 4px solid var(--gold);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1.4rem 1.5rem;
  background: #e8dcc8;
}
.method-note p:last-child { max-width: 900px; margin: 0; line-height: 1.65; }
.note-label { color: var(--wine); }

.documents-section { border-top: 1px solid var(--line); }
.document-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.2rem;
}
.document-filters { display: flex; flex-wrap: wrap; gap: .45rem; }
.document-filter {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: .55rem .9rem;
  color: var(--wine-dark);
  background: #fffaf0;
  font-weight: 800;
  cursor: pointer;
}
.document-filter.active { color: #fff; border-color: var(--wine); background: var(--wine); }
#document-progress { color: var(--muted); font-size: .84rem; font-weight: 800; }
.documents-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 1rem; }
.document-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 390px;
  overflow: hidden;
  border: 1px solid #cfbea2;
  border-radius: var(--radius);
  padding: 1.35rem;
  background: linear-gradient(145deg,#fffaf0,#eadfce);
  box-shadow: 0 10px 34px rgba(59,39,31,.07);
}
.document-card::after {
  content: "";
  position: absolute;
  right: -2rem;
  top: -2rem;
  width: 8rem;
  height: 8rem;
  border: 1px solid rgba(117,63,72,.13);
  border-radius: 50%;
}
.document-card.read { border-color: var(--gold); }
.document-card.read::before { content: "Letto"; position: absolute; right: 1rem; top: 1rem; color: var(--blue); font-size: .68rem; font-weight: 900; letter-spacing: .11em; text-transform: uppercase; }
.document-number, .document-author { margin: 0; color: var(--wine); font-size: .7rem; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
.document-author { margin-top: .55rem; color: var(--blue); }
.document-card h3 { max-width: 80%; margin: .8rem 0 .2rem; font-family: Georgia,serif; font-size: clamp(1.7rem,3vw,2.35rem); font-weight: 550; line-height: 1; }
.document-subtitle { margin: .3rem 0 1rem; color: var(--wine); font-family: Georgia,serif; font-style: italic; }
.document-card dl { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .75rem; margin: 0; }
.document-card dl div { border-top: 1px solid #d7c6aa; padding-top: .65rem; }
.document-card dt { color: var(--muted); font-size: .66rem; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.document-card dd { margin: .2rem 0 0; font-size: .83rem; line-height: 1.4; }
.document-scope { color: #554842; font-size: .84rem; line-height: 1.5; }
.document-open { align-self: flex-start; margin-top: auto; border: 0; border-radius: 999px; padding: .75rem 1rem; color: #fff; background: var(--blue); font-weight: 840; cursor: pointer; }
.textual-note { margin-top: 1.2rem; border-left: 4px solid var(--gold); border-radius: 0 1rem 1rem 0; padding: 1.1rem 1.25rem; background: #e8dcc8; }
.textual-note p { max-width: 1000px; margin: .5rem 0; line-height: 1.6; }

.document-dialog {
  width: min(930px,calc(100% - 1.5rem));
  max-height: 92svh;
  overflow: auto;
  border: 1px solid #c5ad88;
  border-radius: 1.2rem;
  padding: 0;
  color: var(--ink);
  background: #f7eedf;
  box-shadow: 0 30px 100px rgba(0,0,0,.42);
}
.document-dialog::backdrop { background: rgba(24,18,19,.8); backdrop-filter: blur(6px); }
.document-dialog .dialog-head { position: sticky; top: 0; z-index: 5; margin: 0; border-bottom: 1px solid #d4c2a5; padding: .75rem 1rem; background: rgba(247,238,223,.96); backdrop-filter: blur(12px); }
.document-dialog-label { margin: 0; color: var(--wine); font-size: .72rem; font-weight: 900; letter-spacing: .13em; text-transform: uppercase; }
.document-reader { padding: clamp(1.25rem,5vw,4rem); }
.document-reader-head { border-bottom: 1px solid var(--line); padding-bottom: 1.5rem; }
.document-reader-head h2 { margin: .7rem 0 .35rem; font-family: Georgia,serif; font-size: clamp(2.7rem,7vw,5rem); font-weight: 500; line-height: .92; letter-spacing: -.045em; }
.document-reader-subtitle { margin: 0; color: var(--wine); font-family: Georgia,serif; font-size: 1.4rem; font-style: italic; }
.document-kind { color: var(--muted); font-size: .82rem; font-weight: 780; }
.document-editorial { margin: 1.5rem 0 2.5rem; border-left: 4px solid var(--gold); padding: 1rem 1.1rem; background: #eadfce; line-height: 1.6; }
.document-body section + section { margin-top: 3rem; }
.document-body h3 { margin: 0; color: var(--wine-dark); font-family: Georgia,serif; font-size: clamp(1.75rem,4vw,2.45rem); font-weight: 560; }
.document-body p { margin: 1rem 0 0; font-family: Georgia,"Times New Roman",serif; font-size: clamp(1.08rem,2vw,1.24rem); line-height: 1.85; }
.document-apparatus, .document-questions { margin-top: 2.5rem; border-radius: 1rem; padding: 1.25rem; background: #e8dcc8; }
.document-questions { background: #e1e7e8; }
.document-apparatus h3, .document-questions h3 { margin: 0; font-family: Georgia,serif; font-size: 1.55rem; }
.document-apparatus li, .document-questions li { margin-top: .65rem; line-height: 1.55; }
.document-source { margin-top: 1.5rem; }
.document-source a { color: var(--blue); font-weight: 850; }
.document-actions { position: sticky; bottom: 0; z-index: 5; display: flex; flex-wrap: wrap; justify-content: center; gap: .45rem; border-top: 1px solid #d4c2a5; padding: .75rem; background: rgba(247,238,223,.96); backdrop-filter: blur(12px); }
.document-actions button { min-height: 44px; border: 1px solid var(--line); border-radius: 999px; padding: .6rem .85rem; color: var(--wine-dark); background: #fffaf0; font-weight: 780; cursor: pointer; }
.document-actions button:disabled { opacity: .4; cursor: not-allowed; }

.question-band {
  padding: clamp(4rem, 8vw, 7rem) max(1rem, calc((100vw - 1000px)/2));
  color: #fff;
  background:
    radial-gradient(circle at 80% 20%, rgba(196,146,75,.22), transparent 22rem),
    linear-gradient(135deg, var(--wine-dark), #25202a);
}
.question-band h2 { max-width: 900px; }
.question-band > p:last-child { max-width: 720px; color: #dfd6d8; line-height: 1.7; }

.learning-layout {
  width: min(1220px, calc(100% - 2rem));
  margin: auto;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 5rem);
  padding: 4rem 0 7rem;
}
.chapter-rail {
  position: sticky;
  top: 1rem;
  align-self: start;
  border: 1px solid var(--line);
  border-radius: 1rem;
  padding: .8rem;
  background: rgba(255,250,240,.85);
  box-shadow: 0 8px 30px rgba(64,41,31,.06);
  backdrop-filter: blur(12px);
}
.rail-toggle { display: none; }
#chapter-nav { display: grid; gap: .35rem; }
.chapter-link {
  width: 100%;
  display: grid;
  grid-template-columns: 2rem 1fr auto;
  align-items: center;
  gap: .65rem;
  min-height: 52px;
  border: 0;
  border-radius: .75rem;
  padding: .65rem .7rem;
  color: #443936;
  background: transparent;
  text-align: left;
  cursor: pointer;
}
.chapter-link:hover { background: #eee1cc; }
.chapter-link.active { color: #fff; background: var(--wine); }
.chapter-link .n { font-family: Georgia, serif; font-size: 1.25rem; }
.chapter-link .label { font-weight: 760; }
.chapter-link .done { color: var(--gold); font-size: .8rem; }
.chapter-link.active .done { color: #f5d795; }
.sources-link {
  display: block;
  margin: .75rem .7rem 0;
  border-top: 1px solid var(--line);
  padding-top: .9rem;
  color: var(--blue);
  font-weight: 780;
  text-decoration: none;
}

.lesson-stage { min-width: 0; }
.chapter-hero {
  position: relative;
  min-height: 410px;
  display: flex;
  align-items: end;
  overflow: hidden;
  border-radius: 1.5rem;
  padding: clamp(1.4rem, 4vw, 2.5rem);
  color: #fff;
  background: #251e1f;
  box-shadow: var(--shadow);
}
.chapter-hero img, .chapter-hero::after { position: absolute; inset: 0; width: 100%; height: 100%; }
.chapter-hero img { object-fit: cover; }
.chapter-hero::after { content: ""; background: linear-gradient(0deg, rgba(24,18,19,.96), rgba(24,18,19,.08) 75%); }
.chapter-hero-copy { position: relative; z-index: 2; }
.chapter-hero .section-number { color: #f1c878; }
.chapter-hero h2 { margin: 0; font-family: Georgia, serif; font-size: clamp(2.8rem, 7vw, 5.8rem); font-weight: 500; line-height: .92; letter-spacing: -.05em; }
.chapter-subtitle { margin: .8rem 0 0; color: #e7dedd; font-size: 1.12rem; }
.chapter-sources { margin: .8rem 0 0; color: #cabdbd; font-size: .78rem; }
.chapter-sources a { color: #f1c878; }

.tabs {
  position: sticky;
  top: .5rem;
  z-index: 10;
  display: flex;
  gap: .35rem;
  overflow-x: auto;
  margin: 1.2rem 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: .35rem;
  background: rgba(255,250,240,.92);
  backdrop-filter: blur(12px);
  box-shadow: 0 7px 25px rgba(48,32,25,.08);
}
.tab-button {
  min-height: 42px;
  white-space: nowrap;
  border: 0;
  border-radius: 999px;
  padding: .55rem .9rem;
  color: #5a4b46;
  background: transparent;
  font-weight: 780;
  cursor: pointer;
}
.tab-button[aria-selected="true"] { color: #fff; background: var(--wine); }
.tab-panel[hidden] { display: none; }

.lesson-text, .summary-card, .map-card, .quiz-shell {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(1.35rem, 4vw, 2.4rem);
  background: rgba(255,250,240,.88);
  box-shadow: 0 10px 38px rgba(62,40,30,.06);
}
.lesson-block + .lesson-block { margin-top: 2.3rem; }
.lesson-block h3 { margin: 0 0 .8rem; color: var(--wine-dark); font-family: Georgia, serif; font-size: clamp(1.7rem, 4vw, 2.3rem); font-weight: 600; }
.lesson-block p { margin: .8rem 0 0; font-family: Georgia, "Times New Roman", serif; font-size: clamp(1.08rem, 1.8vw, 1.22rem); line-height: 1.82; }
.highlight-button { margin-top: 1.5rem; border: 1px solid var(--line); border-radius: .65rem; padding: .7rem .9rem; color: var(--blue); background: #f4ebdc; font-weight: 760; cursor: pointer; }

.summary-card h3, .knowledge-card h3, .vocab-card h3, .map-card h3, .quiz-shell h3 { margin-top: 0; font-family: Georgia, serif; font-size: 2rem; }
.summary-card > p { font-size: 1.04rem; line-height: 1.75; }
.study-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 1rem; margin-top: 1rem; }
.knowledge-card, .vocab-card { border: 1px solid var(--line); border-radius: 1rem; padding: 1.25rem; background: #eadfce; }
.knowledge-card ul { margin: 0; padding-left: 1.2rem; }
.knowledge-card li { margin: .7rem 0; line-height: 1.5; }
.vocab-list { display: grid; gap: .8rem; margin: 0; }
.vocab-list div { border-top: 1px solid #d0bea1; padding-top: .7rem; }
.vocab-list div:first-child { border-top: 0; padding-top: 0; }
.vocab-list dt { color: var(--wine); font-weight: 850; }
.vocab-list dd { margin: .25rem 0 0; color: #544842; line-height: 1.45; }

.map-card img { display: block; width: 100%; border: 1px solid #cdbb9c; border-radius: .8rem; background: #fffdf7; cursor: zoom-in; }
.map-card p { color: var(--muted); line-height: 1.6; }
.map-open { border: 0; border-radius: 999px; padding: .75rem 1rem; color: #fff; background: var(--blue); font-weight: 780; cursor: pointer; }

.quiz-intro { color: var(--muted); line-height: 1.6; }
.formula { display: inline-block; border-radius: .45rem; padding: .35rem .55rem; color: #4b3b32; background: #eadfce; font-family: ui-monospace, monospace; font-size: .82rem; }
.quiz-question { margin: 1.3rem 0 0; border: 1px solid var(--line); border-radius: 1rem; padding: 1.1rem; background: #fffdf7; }
.quiz-question legend { padding: 0 .35rem; font-weight: 820; line-height: 1.45; }
.option { display: flex; align-items: start; gap: .65rem; margin-top: .65rem; border: 1px solid #ded0bb; border-radius: .7rem; padding: .75rem; cursor: pointer; }
.option:hover { background: #f4ebdc; }
.option input { margin-top: .2rem; accent-color: var(--wine); }
.primary-button, .quiz-submit, .recovery-submit {
  border: 0;
  border-radius: 999px;
  padding: .85rem 1.1rem;
  color: #fff;
  background: var(--wine);
  font-weight: 850;
  cursor: pointer;
}
.quiz-submit { margin-top: 1.3rem; }
.quiz-result { margin-top: 1.3rem; }
.score-card { border-radius: 1rem; padding: 1.1rem; color: #fff; background: var(--blue); }
.score-card strong { display: block; font-family: Georgia, serif; font-size: 2.2rem; }
.error-list, .recovery-list { display: grid; gap: 1rem; margin-top: 1rem; }
.error-card, .recovery-card { border-left: 4px solid #a65b54; border-radius: .7rem; padding: 1rem; background: #f3e2da; }
.recovery-card { border-color: var(--gold); background: #f5ead3; }
.recovery-card h4 { margin: 0 0 .5rem; }
.recovery-card p { margin: .45rem 0; line-height: 1.55; }
.mini-question { margin-top: .8rem; border-top: 1px solid #dbc69e; padding-top: .8rem; }
.mini-question label { display: block; margin-top: .45rem; }

.chapter-controls { display: flex; justify-content: space-between; gap: 1rem; margin-top: 1.2rem; }
.chapter-controls button { min-height: 46px; border: 1px solid var(--line); border-radius: 999px; padding: .7rem 1rem; color: var(--wine-dark); background: #fffaf0; font-weight: 820; cursor: pointer; }
.chapter-controls button:disabled { opacity: .4; cursor: not-allowed; }

.sources-section { border-top: 1px solid var(--line); }
.sources-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 1rem; }
.source-card { border: 1px solid var(--line); border-radius: 1rem; padding: 1.2rem; background: rgba(255,250,240,.8); }
.source-type { margin: 0; color: var(--wine); font-size: .68rem; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.source-card h3 { margin: .5rem 0; font-family: Georgia, serif; font-size: 1.3rem; }
.source-author { margin: 0; color: var(--muted); font-size: .84rem; }
.source-role { line-height: 1.55; }
.source-card a { color: var(--blue); font-weight: 800; }
.source-policy { margin-top: 1rem; border: 1px solid var(--line); border-radius: .8rem; padding: .9rem 1rem; background: #eadfce; }
.source-policy summary { font-weight: 850; cursor: pointer; }
.source-policy p { line-height: 1.6; }

/* Indagine storica: Eloisa donna */
.women-section {
  border-top: 1px solid var(--line);
  padding: 0 0 clamp(5rem,9vw,8rem);
  background:
    radial-gradient(circle at 6% 24%,rgba(189,142,67,.12),transparent 24rem),
    linear-gradient(180deg,#e7ddcd 0,#f3ead9 18rem,#f3ead9 100%);
}
#women-root { width: min(1220px,calc(100% - 2rem)); margin: auto; }
.women-hero {
  position: relative;
  min-height: min(720px,88svh);
  display: flex;
  align-items: end;
  overflow: hidden;
  border-radius: 0 0 2rem 2rem;
  color: #fff;
  background: #211a1c;
  box-shadow: var(--shadow);
}
.women-hero > img, .women-hero-shade { position: absolute; inset: 0; width: 100%; height: 100%; }
.women-hero > img { object-fit: cover; object-position: center 35%; }
.women-hero-shade {
  background:
    linear-gradient(90deg,rgba(27,19,21,.97) 0%,rgba(37,26,29,.82) 42%,rgba(37,26,29,.16) 80%),
    linear-gradient(0deg,rgba(26,18,20,.92),transparent 55%);
}
.women-hero-copy { position: relative; z-index: 2; max-width: 870px; padding: clamp(2rem,7vw,6rem); }
.women-hero-copy .section-number { color: #f1c878; }
.women-hero h2 { margin: 0; font-family: Georgia,serif; font-size: clamp(3.2rem,8vw,7.3rem); font-weight: 500; line-height: .86; letter-spacing: -.055em; }
.women-hero-copy > p:not(.section-number) { margin: 1rem 0 0; color: #f0c675; font-family: Georgia,serif; font-size: clamp(1.3rem,3vw,2rem); font-style: italic; }
.women-hero blockquote { max-width: 710px; margin: 1.5rem 0 0; border-left: 3px solid #e3b564; padding-left: 1.2rem; color: #f2eae6; font-size: clamp(1rem,1.8vw,1.2rem); line-height: 1.65; }
.women-nav {
  position: sticky;
  top: .45rem;
  z-index: 18;
  display: flex;
  gap: .35rem;
  overflow-x: auto;
  margin: 1rem auto 3rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: .4rem;
  background: rgba(255,250,240,.93);
  box-shadow: 0 8px 28px rgba(50,35,28,.08);
  backdrop-filter: blur(12px);
}
.women-nav a { flex: 0 0 auto; border-radius: 999px; padding: .65rem .9rem; color: var(--wine-dark); text-decoration: none; font-size: .8rem; font-weight: 820; }
.women-nav a:hover { color: #fff; background: var(--wine); }
.women-block, .women-quiz, .libera-wrap { width: min(1120px,100%); margin: clamp(4.5rem,8vw,7rem) auto 0; scroll-margin-top: 5.5rem; }
.women-block-heading { max-width: 850px; margin-bottom: 2rem; }
.women-block-heading .section-number { color: var(--wine); }
.women-block-heading h3 { margin: 0; font-family: Georgia,serif; font-size: clamp(2.35rem,5vw,4.4rem); font-weight: 500; line-height: .98; letter-spacing: -.04em; }
.women-block-heading > p:last-child { margin: 1rem 0 0; color: var(--muted); font-size: 1.05rem; line-height: 1.7; }
.method-lab { border: 1px solid #cbb897; border-radius: 1.5rem; padding: clamp(1.4rem,4vw,2.7rem); background: #fffaf0; box-shadow: 0 14px 40px rgba(53,36,28,.07); }
.method-columns { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 1rem; }
.method-columns article { border-top: 3px solid var(--gold); padding: 1rem 1.1rem; background: #eadfce; }
.method-columns h4 { margin: 0; color: var(--wine); font-family: Georgia,serif; font-size: 1.45rem; }
.method-columns p { margin-bottom: 0; line-height: 1.65; }
.evidence-legend { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: .65rem; margin-top: 1rem; }
.evidence-legend article { border: 1px solid var(--line); border-radius: .75rem; padding: .85rem; }
.evidence-legend span, .evidence-status { color: var(--wine); font-size: .67rem; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.evidence-legend p { margin: .45rem 0 0; color: var(--muted); font-size: .78rem; line-height: 1.45; }
.norm-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 1rem; }
.norm-card { border: 1px solid var(--line); border-radius: 1.2rem; padding: 1.35rem; background: rgba(255,250,240,.86); box-shadow: 0 8px 28px rgba(59,39,31,.05); }
.norm-card:first-child { grid-column: span 2; }
.card-code, .case-date { margin: 0; color: var(--wine); font-size: .7rem; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.norm-card h4, .case-card h4, .dossier-document h4, .observer-result h4, .composite-verdict h4 { margin: .55rem 0; font-family: Georgia,serif; font-size: clamp(1.6rem,3vw,2.2rem); font-weight: 580; line-height: 1.05; }
.norm-card > p:not(.card-code), .norm-card aside { line-height: 1.66; }
.norm-card aside { border-left: 3px solid var(--gold); padding: .8rem; background: #eadfce; font-size: .88rem; }
.evidence-refs { display: inline-flex; flex-wrap: wrap; gap: .3rem; margin-top: .8rem; color: var(--blue); font-size: .71rem; font-weight: 900; }
.evidence-refs a { border: 1px solid #b8c5cc; border-radius: 999px; padding: .2rem .42rem; text-decoration: none; }
.reality-block { width: 100%; border-radius: 2rem; padding: clamp(1.4rem,4vw,3rem); color: #f7f0e9; background: #272126; }
.reality-block .women-block-heading .section-number { color: #e3b564; }
.reality-block .women-block-heading > p:last-child { color: #d4c8c5; }
.case-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: .85rem; }
.case-card { position: relative; min-height: 410px; overflow: hidden; border: 1px solid #5f5054; border-radius: 1.1rem; padding: 1.2rem; background: #352c32; }
.case-number { position: absolute; right: .8rem; top: -.55rem; color: rgba(241,207,140,.12); font-family: Georgia,serif; font-size: 6rem; line-height: 1; }
.case-card .case-date { position: relative; color: #e3b564; }
.case-card h4 { position: relative; max-width: 85%; color: #fff; }
.case-role { color: #f0c675; font-family: Georgia,serif; font-style: italic; }
.case-card p:not(.case-date):not(.case-role) { color: #ddd3d2; font-size: .9rem; line-height: 1.55; }
.case-card .evidence-refs a { color: #f0c675; border-color: #67584f; }
.matrix-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 1rem; align-items: start; }
.matrix-column { overflow: hidden; border: 1px solid var(--line); border-radius: 1.2rem; background: #fffaf0; }
.matrix-label { margin: 0; padding: .9rem 1rem; color: #fff; background: var(--blue); font-size: .75rem; font-weight: 900; letter-spacing: .13em; text-transform: uppercase; }
.matrix-column.transforms { transform: translateY(-1rem); box-shadow: 0 16px 40px rgba(65,43,31,.11); }
.matrix-column.transforms .matrix-label { background: var(--wine); }
.matrix-column.refuses .matrix-label { color: #30261f; background: #d7ad64; }
.matrix-column section { padding: 1.05rem; }
.matrix-column section + section { border-top: 1px solid var(--line); }
.matrix-column h4 { margin: 0; color: var(--wine-dark); font-family: Georgia,serif; font-size: 1.3rem; }
.matrix-column p { margin: .55rem 0 0; color: #574a44; font-size: .9rem; line-height: 1.55; }
.evidence-block { width: 100%; }
.dossier-documents { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 1rem; }
.dossier-document { display: flex; flex-direction: column; border: 1px solid #c7b493; border-radius: 1.2rem; padding: 1.3rem; background: linear-gradient(145deg,#fffaf0,#ece0cc); }
.dossier-document blockquote { margin: 1rem 0; border-left: 4px solid var(--gold); padding: .8rem 1rem; color: #3e332e; background: rgba(255,255,255,.48); font-family: Georgia,serif; font-size: 1.05rem; line-height: 1.65; }
.dossier-document > p:not(.evidence-status):not(.case-date) { line-height: 1.65; }
.dossier-document-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .7rem; margin-top: auto; padding-top: 1rem; }
.dossier-document-actions > a { color: var(--blue); font-weight: 830; }
.dossier-document-actions .evidence-refs { margin: 0; }
.women-map { border: 1px solid var(--line); border-radius: 1.5rem; padding: clamp(1.2rem,4vw,2.2rem); background: #fffaf0; }
.women-map img { display: block; width: 100%; border: 1px solid #cdbb9c; border-radius: 1rem; background: #fff; cursor: zoom-in; }
.women-map .map-open { margin-top: 1rem; }
.lenses-block { width: 100%; border-radius: 2rem; padding: clamp(1.4rem,4vw,3rem); background: #e6d9c5; }
.observer-buttons { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: .6rem; }
.observer-buttons button { min-height: 90px; border: 1px solid #c7b28f; border-radius: .9rem; padding: .8rem; color: var(--wine-dark); background: #fffaf0; text-align: left; font-weight: 830; cursor: pointer; }
.observer-buttons button span { display: block; margin-bottom: .4rem; color: var(--gold); font-family: Georgia,serif; font-size: 1.35rem; }
.observer-buttons button.active { color: #fff; border-color: var(--wine); background: var(--wine); }
.observer-buttons button.active span { color: #f1cf8c; }
.observer-result { margin-top: 1rem; border-radius: 1.2rem; padding: clamp(1.2rem,3vw,2rem); color: #f5eeee; background: #2e262a; }
.observer-role { margin: 0; color: #e3b564; font-size: .7rem; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
.observer-result h4 { color: #fff; }
.observer-result > p:not(.observer-role):not(.observer-grounds) { font-family: Georgia,serif; font-size: 1.12rem; line-height: 1.7; }
.observer-result aside { border-left: 3px solid #e3b564; padding: .75rem 1rem; color: #ded3d4; background: rgba(255,255,255,.05); line-height: 1.55; }
.observer-grounds { color: #cbbfc0; font-size: .8rem; line-height: 1.55; }
.observer-result .evidence-refs a { color: #f0c675; border-color: #66575b; }
.composite-verdict { margin-top: 1rem; border: 2px solid var(--gold); border-radius: 1.2rem; padding: clamp(1.2rem,3vw,2rem); background: #fffaf0; }
.composite-verdict > p:last-child { font-family: Georgia,serif; font-size: 1.12rem; line-height: 1.75; }
.women-quiz { box-shadow: var(--shadow); }
.libera-ai { overflow: hidden; border: 1px solid #52333a; border-radius: 1.5rem; color: #fff; background: #241d20; box-shadow: 0 20px 65px rgba(34,25,28,.2); }
.libera-ai summary { min-height: 180px; display: grid; align-content: center; cursor: pointer; padding: clamp(1.4rem,5vw,3.5rem); background: radial-gradient(circle at 85%,rgba(189,142,67,.24),transparent 16rem); list-style: none; }
.libera-ai summary::-webkit-details-marker { display: none; }
.libera-ai summary span { color: #e3b564; font-size: .72rem; font-weight: 900; letter-spacing: .16em; text-transform: uppercase; }
.libera-ai summary strong { margin-top: .55rem; font-family: Georgia,serif; font-size: clamp(2.3rem,5vw,4.4rem); font-weight: 500; line-height: 1; }
.libera-ai summary small { margin-top: .7rem; color: #cfc3c5; }
.libera-ai summary::after { content: "Apri la lettera ↓"; justify-self: start; margin-top: 1.2rem; border: 1px solid #756269; border-radius: 999px; padding: .55rem .8rem; color: #f0c675; font-size: .75rem; font-weight: 820; }
.libera-ai[open] summary::after { content: "Richiudi ↑"; }
.libera-content { border-top: 1px solid #4d4045; padding: clamp(1.4rem,5vw,3.5rem); }
.libera-content .evidence-status { color: #e3b564; }
.libera-content h3 { max-width: 820px; margin: .55rem 0; font-family: Georgia,serif; font-size: clamp(2.4rem,5vw,4.5rem); font-weight: 500; line-height: .96; }
.libera-lead { max-width: 790px; color: #d8ced0; font-size: 1.05rem; line-height: 1.7; }
.reason-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .8rem; margin-top: 2rem; }
.reason-grid article { border: 1px solid #524449; border-radius: .9rem; padding: 1rem; background: rgba(255,255,255,.035); }
.reason-grid h4 { margin: 0; color: #f0c675; font-family: Georgia,serif; font-size: 1.25rem; }
.reason-grid p { margin: .6rem 0 0; color: #d8ced0; line-height: 1.6; }
.libera-content blockquote { margin: 2rem 0 0; border-left: 4px solid #e3b564; padding: 1rem 1.2rem; color: #fffaf0; font-family: Georgia,serif; font-size: clamp(1.25rem,2.7vw,1.85rem); line-height: 1.55; }

footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  border-top: 1px solid rgba(255,255,255,.12);
  padding: 2rem max(1rem, calc((100vw - 1160px)/2)) max(2rem, env(safe-area-inset-bottom));
  color: #d8d0cf;
  background: #211b1d;
  font-size: .86rem;
}
footer a { color: #f0c675; font-weight: 800; }
footer button { border: 1px solid #5f5153; border-radius: 999px; padding: .55rem .8rem; color: #ddd; background: transparent; cursor: pointer; }

.app-dialog, .map-dialog {
  width: min(680px, calc(100% - 1.5rem));
  max-height: 88svh;
  overflow: auto;
  border: 1px solid #cbb99b;
  border-radius: 1.2rem;
  padding: 1.2rem;
  color: var(--ink);
  background: var(--paper-2);
  box-shadow: 0 30px 100px rgba(0,0,0,.35);
}
.map-dialog { width: min(1100px, calc(100% - 1.5rem)); }
.app-dialog::backdrop, .map-dialog::backdrop { background: rgba(24,18,19,.72); backdrop-filter: blur(5px); }
.dialog-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.dialog-head h2 { margin: 0; font-family: Georgia, serif; font-size: 2rem; }
.dialog-head button { width: 44px; height: 44px; border: 0; border-radius: 50%; font-size: 1.5rem; cursor: pointer; }
.app-dialog label { display: block; margin: 1rem 0 .4rem; font-weight: 800; }
.app-dialog textarea, .app-dialog input[type="search"] { width: 100%; border: 1px solid #bfae94; border-radius: .7rem; padding: .8rem; color: var(--ink); background: #fff; }
.dialog-actions { display: flex; flex-wrap: wrap; gap: .65rem; margin-top: 1rem; }
.dialog-actions button { min-height: 44px; border: 1px solid var(--line); border-radius: 999px; padding: .65rem .9rem; cursor: pointer; }
.dialog-actions .primary-button { border: 0; }
.highlight-item { margin-top: .7rem; border-left: 3px solid var(--gold); padding: .7rem; background: #f1e6d5; line-height: 1.45; }
.highlight-item small { display: block; margin-top: .35rem; color: var(--muted); }
.search-results { display: grid; gap: .7rem; margin-top: 1rem; }
.search-hit { border: 1px solid var(--line); border-radius: .7rem; padding: .85rem; background: #fff; text-align: left; cursor: pointer; }
.search-hit strong { color: var(--wine); }
.map-dialog img { width: 100%; min-width: 700px; border: 1px solid var(--line); background: #fffdf7; }
.selection-tools { position: fixed; z-index: 40; left: 50%; bottom: 1.2rem; transform: translateX(-50%); }
.selection-tools button { border: 0; border-radius: 999px; padding: .75rem 1rem; color: #fff; background: var(--blue); box-shadow: 0 12px 35px rgba(0,0,0,.25); cursor: pointer; }
.toast { position: fixed; z-index: 80; left: 50%; bottom: 1.2rem; max-width: calc(100% - 2rem); transform: translate(-50%, 150%); border-radius: .7rem; padding: .8rem 1rem; color: #fff; background: #211b1d; box-shadow: 0 14px 45px rgba(0,0,0,.3); transition: transform .25s; }
.toast.show { transform: translate(-50%, 0); }

@media (max-width: 900px) {
  .learning-layout { grid-template-columns: 1fr; }
  .chapter-rail { position: sticky; top: .4rem; z-index: 20; padding: .45rem; }
  .rail-toggle { width: 100%; min-height: 46px; display: flex; justify-content: space-between; align-items: center; border: 0; border-radius: .7rem; padding: .65rem .8rem; color: #fff; background: var(--wine); font-weight: 850; }
  .rail-toggle::after { content: "⌄"; }
  #chapter-nav, .sources-link { display: none; }
  .chapter-rail.open #chapter-nav { display: grid; margin-top: .45rem; }
  .chapter-rail.open .sources-link { display: block; }
  .chapter-rail.open .rail-toggle::after { content: "⌃"; }
  .tabs { top: 4.1rem; }
  .study-grid { grid-template-columns: 1fr; }
  .evidence-legend, .observer-buttons { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .case-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .matrix-grid { grid-template-columns: 1fr; }
  .matrix-column.transforms { transform: none; }
}
@media (max-width: 680px) {
  .hero { min-height: 92svh; }
  .hero-shade { background: linear-gradient(0deg, rgba(19,15,16,.96) 0%, rgba(19,15,16,.5) 70%, rgba(19,15,16,.68)); }
  .topbar { align-items: flex-start; }\n  .top-links { flex-direction: column; }
  .icon-button span { display: none; }
  .hero-copy { padding-top: 7rem; }
  .hero-progress { grid-template-columns: 1fr; gap: .45rem; }
  .story-grid, .documents-grid, .sources-grid { grid-template-columns: 1fr; }
  .document-toolbar { align-items: flex-start; flex-direction: column; }
  .document-card { min-height: 360px; }
  .document-actions { justify-content: stretch; }
  .document-actions button { flex: 1 1 45%; }
  .chapter-hero { min-height: 360px; }
  .chapter-controls { flex-direction: column; }
  .method-columns, .norm-grid, .case-grid, .dossier-documents, .reason-grid { grid-template-columns: 1fr; }
  .norm-card:first-child { grid-column: auto; }
  .women-hero { min-height: 88svh; }
  .women-hero-shade { background: linear-gradient(0deg,rgba(27,19,21,.97),rgba(37,26,29,.55) 78%,rgba(37,26,29,.68)); }
  .women-hero-copy { padding: 2rem 1.2rem; }
  .women-nav { border-radius: .9rem; }
  .observer-buttons { grid-template-columns: 1fr 1fr; }
  footer { align-items: flex-start; flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
@media print {
  body { background: #fff; }
  .topbar, .hero-progress, .primary-cta, .chapter-rail, .tabs, .chapter-controls, footer, .selection-tools, .toast { display: none !important; }
  .hero { min-height: 0; color: #111; background: #fff; }
  .hero-image, .hero-shade { display: none; }
  .hero-copy { padding: 1rem 0; }
  .hero h1 { font-size: 4rem; }
  .hero-kicker, .hero-lead, .eyebrow { color: #333; }
  .story-shell, .documents-section, .sources-section, .learning-layout, #women-root { width: 100%; padding: 1rem 0; }
  .learning-layout { display: block; }
  .lesson-text, .summary-card, .map-card, .quiz-shell { box-shadow: none; }
  .women-nav, .observer-buttons, .women-quiz, .libera-ai summary::after { display: none !important; }
  .women-hero { min-height: 0; border-radius: 0; color: #111; background: #fff; }
  .women-hero > img, .women-hero-shade { display: none; }
  .women-hero-copy { max-width: none; padding: 1rem 0; }
  .women-hero-copy .section-number, .women-hero-copy > p:not(.section-number), .women-hero blockquote { color: #222; }
  .women-block, .libera-wrap { width: 100%; margin-top: 2rem; }
  .libera-ai { color: #111; background: #fff; box-shadow: none; }
  .libera-ai summary { min-height: 0; padding: 1rem; }
  .libera-ai:not([open]) .libera-content { display: block; }
  .libera-content { color: #111; }
  .libera-lead, .reason-grid p, .libera-content blockquote { color: #222; }
}
