:root {
  --paper: #f5f1e7;
  --paper-2: #ece6d5;
  --ink: #263126;
  --muted: #4b5547;
  --border: #586052;
  --rule: #c9c3b0;
  --link: #1d4a38;
  --display: 'Bodoni Moda', Georgia, serif;
  --body: 'Libre Caslon Text', Georgia, serif;
  --gutter: clamp(16px, 4vw, 40px);
}
* { box-sizing: border-box; }
html { background: var(--paper); -webkit-text-size-adjust: 100%; }
body { margin: 0; color: var(--ink); background: var(--paper); font: 400 clamp(1.0625rem, 0.98rem + .3vw, 1.1875rem)/1.7 var(--body); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--link); text-decoration: underline; text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 2px; }
.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: var(--paper); padding: .6rem 1rem; z-index: 10; }
.skip:focus { left: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* header */
.site-header { border-bottom: 1px solid var(--rule); }
.utility { max-width: 72rem; margin: 0 auto; padding: 10px var(--gutter) 0; display: flex; justify-content: flex-end; }
.topbar { max-width: 72rem; margin: 0 auto; padding: 8px var(--gutter) 10px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.logo { flex: 0 0 auto; width: auto; height: clamp(76px, 9vw, 104px); }
.brand { text-decoration: none; color: var(--ink); display: block; }
.brand-name { display: block; font: 600 clamp(1.75rem, 1.2rem + 2.4vw, 2.75rem)/1.1 var(--display); letter-spacing: -.035em; }
.brand-loc { display: block; font-size: .8125rem; letter-spacing: .4em; text-transform: uppercase; margin-top: 2px; }
.langs ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 6px; }
.langs a { display: inline-block; padding: 4px 12px; border: 1px solid var(--border); border-radius: 6px; color: var(--ink); text-decoration: none; font-size: .875rem; line-height: 1.4; min-height: 32px; }
.langs a:hover { background: rgb(255 253 247 / 80%); }
.langs a[aria-current='true'] { background: #e5e7db; box-shadow: inset 0 0 0 1px var(--ink); }
.mainnav { max-width: 72rem; margin: 0 auto; padding: 0 calc(var(--gutter) - 8px) 8px; }
.mainnav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0 4px; }
.mainnav a { display: inline-block; padding: 8px 8px; color: var(--ink); text-decoration: none; font-size: .9375rem; line-height: 1.3; border-bottom: 2px solid transparent; }
.mainnav a:hover { border-bottom-color: var(--border); }
.mainnav a[aria-current='page'] { border-bottom-color: var(--ink); text-shadow: 0 0 .5px var(--ink); }
.band { width: 100%; height: clamp(72px, 11vw, 160px); object-fit: cover; object-position: center bottom; }

/* content */
main { max-width: 72rem; margin: 0 auto; padding: clamp(24px, 4vw, 48px) var(--gutter) 8px; }
.prose { max-width: 40rem; }
h1 { margin: 0 0 .6em; font: 600 clamp(2rem, 1.4rem + 2.6vw, 3.25rem)/1.12 var(--display); letter-spacing: -.03em; }
h2 { margin: 2em 0 .5em; font: 600 clamp(1.4rem, 1.2rem + 1vw, 1.9rem)/1.2 var(--display); letter-spacing: -.02em; }
p { margin: 0 0 1.1em; }
p.lede { font-size: 1em; }
address { font-style: normal; margin: -.6em 0 1.1em; font-size: 1em; }
ul.links, ul.plain, ul.biblio { padding-left: 1.2em; margin: 0 0 1.4em; }
ul.biblio li { margin-bottom: .9em; }
.note { font-size: .9375rem; color: var(--muted); }
.person { margin-left: 0; padding-left: 1em; border-left: 2px solid var(--rule); }
.btn { display: inline-block; padding: 10px 22px; border: 1px solid var(--ink); border-radius: 6px; background: var(--ink); color: var(--paper); text-decoration: none; font: inherit; cursor: pointer; line-height: 1.4; }
.btn:hover { background: #3a4a3a; }

/* figures */
figure { margin: 1.8em 0; }
figure img { border: 1px solid var(--rule); background: #fff; }
figcaption { margin-top: .5em; font-size: .9375rem; line-height: 1.5; color: var(--muted); max-width: 40rem; }
.fig-narrow { max-width: 30rem; }
.fig-pair { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr)); gap: 1.2rem; align-items: start; margin: 1.8em 0; }
.fig-pair figure { margin: 0; }

/* timeline */
.timeline { margin: 1.2em 0; padding: 0; }
.timeline .row { display: grid; grid-template-columns: 13rem 1fr; gap: 0 1.5rem; padding: .7em 0; border-top: 1px solid var(--rule); }
.timeline .row:last-child { border-bottom: 0; }
.timeline dt { font: 600 1.0625rem/1.4 var(--display); letter-spacing: -.01em; }
.timeline dd { margin: 0; max-width: 40rem; }
.timeline-block + figure, figure + .timeline-block { margin-top: 1.2em; }

/* chart */
.chart { margin: 2.4em 0 1em; max-width: 44rem; }
.chart h2 { margin-top: 0; }
.chart table { width: 100%; border-collapse: collapse; }
.chart th, .chart td { padding: 3px 0; text-align: left; font-weight: 400; vertical-align: middle; }
.chart thead th { font-size: .875rem; color: var(--muted); border-bottom: 1px solid var(--rule); padding-bottom: 6px; }
.chart tbody th { width: 8.5rem; padding-right: 12px; }
.chart .bar-cell { display: flex; align-items: center; gap: 10px; }
.chart .bar { display: block; height: 10px; border-radius: 0 4px 4px 0; background: var(--border); min-width: 4px; }
.chart .val { font-variant-numeric: tabular-nums; }
.chart .sub { font-size: .9375rem; color: var(--muted); margin-top: .8em; }

/* map */
.mapwrap { margin: 1.8em 0; max-width: 56rem; }
.mapwrap iframe { width: 100%; height: clamp(300px, 52vw, 460px); border: 1px solid var(--border); background: var(--paper-2); }
.mapwrap p { font-size: .9375rem; color: var(--muted); margin: .5em 0 0; }

/* marker text */
.marker-text { max-width: 40rem; margin: 1.2em 0; padding: .2em 0 .2em 1.1em; border-left: 3px solid var(--border); font-style: italic; }
details.orig { max-width: 40rem; margin: .6em 0 1.4em; }
details.orig summary { cursor: pointer; }

/* form */
.contact-form { max-width: 34rem; margin: 1.4em 0 2em; }
.contact-form label { display: block; margin: 1em 0 .3em; }
.contact-form input, .contact-form textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 6px; background: #fffdf7; color: var(--ink); font: inherit; }
.contact-form textarea { min-height: 9rem; resize: vertical; }
.contact-form .cf-turnstile { margin: 1em 0; min-height: 65px; }
.contact-form .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.contact-form .btn { margin-top: 1.2em; }

/* database */
.db-tools { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 12px 16px; margin: 1.4em 0 .6em; max-width: 56rem; }
.db-tools label { display: block; font-size: .9375rem; margin-bottom: 3px; }
.db-tools input, .db-tools select { width: 100%; padding: 9px 10px; border: 1px solid var(--border); border-radius: 6px; background: #fffdf7; color: var(--ink); font: inherit; font-size: 1rem; }
.db-count { font-size: .9375rem; color: var(--muted); margin: .6em 0; }
.db-table { width: 100%; border-collapse: collapse; margin-bottom: 0; }
.db-table tbody tr:last-child td { border-bottom: 0; }
.db-table th { text-align: left; font: 600 .9375rem/1.3 var(--display); padding: 8px 10px 8px 0; border-bottom: 2px solid var(--ink); vertical-align: top; }
.db-table th span { display: block; }
.db-table th span + span { font-weight: 400; font-size: .8125rem; color: var(--muted); }
.db-table td { padding: 9px 10px 9px 0; border-bottom: 1px solid var(--rule); vertical-align: top; font-size: 1rem; line-height: 1.45; }
.db-table .nm { min-width: 6rem; }
.db-table td.gn { min-width: 9rem; }
.db-table td:last-child { white-space: nowrap; }
.db-table th { padding-right: 12px; }
.tag { display: inline-block; font-size: .8125rem; line-height: 1.2; padding: 2px 7px; margin: 0 4px 3px 0; border: 1px solid var(--border); border-radius: 10px; white-space: nowrap; }
.db-msg { padding: 1em 1.2em; border: 1px solid var(--rule); background: var(--paper-2); border-radius: 6px; max-width: 40rem; }

/* footer */
.site-footer { border-top: 1px solid var(--rule); margin-top: 0; }
.site-footer > div { max-width: 72rem; margin: 0 auto; padding: 24px var(--gutter) 40px; font-size: .9375rem; color: var(--muted); text-align: center; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 0 4px; }
.site-footer a { color: var(--ink); }
.foot-nav { margin: 0 0 8px; }
.foot-nav a { display: inline-block; padding: 8px 8px; text-decoration: none; border-bottom: 2px solid transparent; }
.foot-nav a:hover { border-bottom-color: var(--border); }
.foot-nav a[aria-current='page'] { border-bottom-color: var(--ink); }
.foot-langs { margin: 4px 0 16px; }
.foot-langs ul { gap: 6px; }
.foot-langs a { display: inline-block; padding: 4px 12px; border: 1px solid var(--border); border-radius: 6px; text-decoration: none; font-size: .875rem; line-height: 1.4; min-height: 32px; }
.foot-langs a[aria-current='true'] { background: #e5e7db; box-shadow: inset 0 0 0 1px var(--ink); }
.site-footer p { margin: 0 0 .4em; }
.site-footer .copy { margin-top: 1em; padding-top: 1em; border-top: 1px solid var(--rule); }

@media (max-width: 760px) {
  .mainnav a, .foot-nav a { padding: 12px 8px; }
  .foot-langs a { min-height: 44px; padding: 10px 16px; font-size: .9375rem; }
  .langs a { min-height: 44px; padding: 10px 16px; font-size: .9375rem; }
  .utility { justify-content: flex-start; }
  .timeline .row { grid-template-columns: 1fr; gap: 0; }
  .timeline dt { margin-bottom: .15em; }
  .db-tools { grid-template-columns: 1fr; }
  .db-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .db-table, .db-table tbody, .db-table tr, .db-table td { display: block; width: 100%; }
  .db-table tr { padding: 10px 0; border-bottom: 1px solid var(--rule); }
  .db-table tbody tr:last-child { border-bottom: 0; }
  .db-table td { border: 0; padding: 1px 0; }
  .db-table td[data-label]::before { content: attr(data-label) ': '; color: var(--muted); font-size: .875rem; }
  .db-table td.nm::before { content: none; }
  .db-table td.nm { font-weight: 600; }
  .db-table td.gn { font-weight: 400; }
  .db-table th span + span { display: none; }
  .db-table td.nm { font-size: 1.125rem; }
  .db-table td:empty { display: none; }
  .chart tbody th { width: 6.5rem; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
@media print { .band, .langs, .mainnav, .skip, .foot-nav, .foot-langs { display: none; } }

/* mobile hamburger (only when JS is running; without JS the full menu stays visible) */
.menu-btn { display: none; }
@media (max-width: 760px) {
  .utility { justify-content: space-between; align-items: center; gap: 12px; }
  .menu-btn:not([hidden]) { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 8px 14px; border: 1px solid var(--ink); border-radius: 6px; background: var(--paper); color: var(--ink); font: inherit; font-size: .9375rem; line-height: 1.2; cursor: pointer; }
  .menu-btn[aria-expanded='true'] { background: var(--ink); color: var(--paper); }
  .menu-btn .bars, .menu-btn .bars::before, .menu-btn .bars::after { display: block; width: 20px; height: 2px; background: currentcolor; border-radius: 1px; }
  .menu-btn .bars { position: relative; }
  .menu-btn .bars::before, .menu-btn .bars::after { content: ''; position: absolute; left: 0; }
  .menu-btn .bars::before { top: -6px; }
  .menu-btn .bars::after { top: 6px; }
  .menu-btn[aria-expanded='true'] .bars { background: transparent; }
  .menu-btn[aria-expanded='true'] .bars::before { top: 0; transform: rotate(45deg); }
  .menu-btn[aria-expanded='true'] .bars::after { top: 0; transform: rotate(-45deg); }
  .nav-ready .mainnav { display: none; padding: 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); background: var(--paper-2); }
  .nav-ready .mainnav.open { display: block; }
  .nav-ready .mainnav ul { display: block; }
  .nav-ready .mainnav li + li { border-top: 1px solid var(--rule); }
  .nav-ready .mainnav a { display: block; padding: 14px var(--gutter); min-height: 48px; border-bottom: 0; border-left: 4px solid transparent; font-size: 1.0625rem; }
  .nav-ready .mainnav a[aria-current='page'] { border-left-color: var(--ink); background: var(--paper); text-shadow: 0 0 .5px var(--ink); }
}
@media print { .menu-btn { display: none !important; } }
@media (max-width: 480px) {
  .utility { gap: 8px; }
  .langs ul { gap: 4px; }
  .langs a { padding: 10px 10px; }
  .menu-btn:not([hidden]) { padding: 8px 12px; }
}
@media (max-width: 380px) {
  .menu-btn:not([hidden]) { padding: 8px 12px; }
  .menu-btn .menu-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
}

@media (max-width: 760px) {
  .site-footer .foot-btn:not([hidden]) { display: flex; width: -moz-fit-content; width: fit-content; margin: 0 auto 22px; }
  .site-footer.nav-ready .foot-nav { display: none; margin: 0 0 12px; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); background: var(--paper-2); text-align: left; }
  .site-footer.nav-ready .foot-nav.open { display: block; }
  .site-footer.nav-ready .foot-nav ul { display: block; }
  .site-footer.nav-ready .foot-nav li + li { border-top: 1px solid var(--rule); }
  .site-footer.nav-ready .foot-nav a { display: block; padding: 14px var(--gutter); min-height: 48px; border-bottom: 0; border-left: 4px solid transparent; font-size: 1.0625rem; }
  .site-footer.nav-ready .foot-nav a[aria-current='page'] { border-left-color: var(--ink); background: var(--paper); }
}

@media (max-width: 340px) { h1 { font-size: 1.6rem; } }
strong { font-family: var(--display); font-weight: 600; }
