:root {
  --carta: #f2ede3;
  --inchiostro: #1f1c18;
  --inchiostro-2: #5d554a;
  --ferro: #8a3a1b;
  --linea: rgba(31, 28, 24, 0.16);
  --serif: 'EB Garamond', Georgia, serif;
  --lapidario: 'Cinzel', Georgia, serif;
  --sans: 'DM Sans', system-ui, sans-serif;
  --gutter: clamp(16px, 6vw, 96px);
}

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

html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--inchiostro);
  background-color: var(--carta);
  font-family: var(--serif);
  font-size: clamp(17px, 1.15vw, 20px);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
h1, h2, h3 { font-family: var(--lapidario); font-weight: 500; margin: 0; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.en { color: var(--inchiostro-2); font-style: italic; }
.eyebrow { font-family: var(--sans); font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--inchiostro-2); margin: 0 0 1.2rem; }

.top {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 2rem;
  padding: 16px var(--gutter);
  background: var(--carta);
  border-bottom: 1px solid var(--linea);
  font-family: var(--sans);
  font-size: 0.8rem;
}
.brand { text-decoration: none; margin-right: auto; font-weight: 500; }
.top nav { display: flex; gap: 1.6rem; }
.top nav a { text-decoration: none; color: var(--inchiostro-2); }
.top nav a:hover { color: var(--ferro); }

main > section { padding: 12vh var(--gutter); border-bottom: 1px solid var(--linea); }
.hero { max-width: 52rem; }
.hero h1 { font-size: clamp(2.4rem, 6vw, 5rem); line-height: 1; margin-bottom: 2rem; }
.hero p { margin: 0 0 1rem; }
.section-head { max-width: 40rem; margin-bottom: 3rem; }
.section-head h2 { font-size: clamp(2rem, 4vw, 3.4rem); line-height: 1.05; margin-bottom: 1.2rem; }
.section-head p { margin: 0 0 1rem; }
.note { font-size: 0.85em; color: var(--inchiostro-2); max-width: 46rem; }
.note a { color: var(--ferro); }

.table-wrap { overflow-x: auto; margin: 0 calc(var(--gutter) * -1); padding: 0 var(--gutter); }
table { width: 100%; min-width: 720px; border-collapse: collapse; }
th, td { text-align: left; padding: 1rem 1rem 1rem 0; border-bottom: 1px solid var(--linea); vertical-align: baseline; }
th { font-family: var(--sans); font-weight: 400; font-size: 0.68rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--inchiostro-2); }
td.num { font-family: var(--sans); font-size: 0.9rem; white-space: nowrap; }
td .roman { font-family: var(--lapidario); color: var(--ferro); }
.profile { width: 100%; height: auto; margin: 4rem 0 2rem; overflow: visible; }
.profile .area { fill: rgba(91, 58, 34, 0.12); }
.profile .line { fill: none; stroke: var(--inchiostro); stroke-width: 1.2; }
.profile .tick { stroke: var(--linea); }
.profile text { font-family: var(--sans); font-size: 11px; fill: var(--inchiostro-2); letter-spacing: 0.06em; }
.profile .dot { fill: var(--ferro); }

.gallery { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 3rem 2rem; }
.gallery li { text-align: center; }
.gallery svg { width: 100%; max-width: 150px; height: auto; color: var(--ferro); }
.gallery li:not(.is-done) svg { color: var(--inchiostro-2); opacity: 0.55; }
.gallery h3 { font-size: 1rem; margin-top: 0.8rem; }
.gallery p { margin: 0.2rem 0 0; font-family: var(--sans); font-size: 0.7rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--inchiostro-2); }

.fires { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 2rem 4rem; max-width: 52rem; margin-bottom: 4rem; }
.fires h3 { font-size: 1.3rem; }
.fires__lead { margin: 0.3rem 0 1rem; color: var(--inchiostro-2); }
.fires ol, .fires ul { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--linea); }
.fires li { padding: 0.7rem 0; border-bottom: 1px solid var(--linea); }
.fires .roman { display: inline-block; width: 2.2rem; font-family: var(--lapidario); color: var(--ferro); }
.fires ul li::before { content: '·'; display: inline-block; width: 2.2rem; color: var(--ferro); }

.cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1px; background: var(--linea); border: 1px solid var(--linea); }
.cards li { background: var(--carta); padding: 2rem 1.6rem; display: flex; flex-direction: column; gap: 0.6rem; }
.cards h3 { font-size: 1.15rem; }
.cards p { margin: 0; }
.status { margin-top: auto !important; padding-top: 0.8rem; font-family: var(--sans); font-size: 0.68rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ferro); }
.link { background: none; border: 0; border-bottom: 1px solid currentColor; padding: 0; font: inherit; color: var(--ferro); cursor: pointer; }

.timeline { list-style: none; margin: 0; padding: 0; max-width: 46rem; border-left: 1px solid var(--linea); }
.timeline li { position: relative; display: grid; grid-template-columns: 11rem 1fr; gap: 1.2rem; padding: 0 0 1.6rem 1.6rem; }
.timeline li::before { content: ''; position: absolute; left: -5px; top: 0.55em; width: 9px; height: 9px; border-radius: 50%; background: var(--ferro); }
.timeline .when { font-family: var(--lapidario); color: var(--ferro); font-size: 0.95rem; padding-top: 0.15em; }
.timeline p { margin: 0; }
@media (max-width: 720px) { .timeline li { grid-template-columns: 1fr; gap: 0.2rem; } }

.foot { padding: 2rem var(--gutter); font-family: var(--sans); font-size: 0.72rem; color: var(--inchiostro-2); }

@media (max-width: 720px) {
  .top nav { display: none; }
}
