:root {
  --bg: #fbf3e4;
  --paper: #fdf8ec;
  --ink: #2e1d10;
  --ink-2: #5c3b22;
  --rule: #c9a577;
  --rule-2: #e4ccab;
  --accent: #6b3e1f;
  --pull: #8b5a30;
}
* { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.6 ui-serif, "Iowan Old Style", "Apple Garamond", Georgia, "Times New Roman", serif;
  -webkit-text-size-adjust: 100%;
}
body {
  background:
    repeating-linear-gradient(
      0deg,
      transparent 0,
      transparent 38px,
      rgba(139, 90, 48, 0.04) 38px,
      rgba(139, 90, 48, 0.04) 39px
    ),
    var(--bg);
}
a { color: var(--accent); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--pull); }

.frame {
  max-width: 720px;
  margin: 2rem auto;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 2px;
  padding: 3.25rem 2.5rem 2.5rem;
  box-shadow:
    0 0 0 6px var(--bg),
    0 0 0 7px var(--rule-2),
    0 4px 30px rgba(46, 29, 16, 0.12);
}
@media (max-width: 600px) {
  .frame {
    margin: 1rem auto;
    padding: 2.25rem 1.4rem 2rem;
    box-shadow:
      0 0 0 4px var(--bg),
      0 0 0 5px var(--rule-2);
  }
}

.crest {
  text-align: center;
  font-family: ui-serif, Georgia, serif;
  font-size: 0.78rem;
  letter-spacing: 0.32em;
  color: var(--accent);
  text-transform: uppercase;
  margin: 0 0 1rem;
}
.crest::before, .crest::after {
  content: "";
  display: inline-block;
  width: 28px;
  height: 1px;
  background: var(--accent);
  vertical-align: middle;
  margin: 0 0.6rem;
  opacity: 0.6;
}

h1 {
  font-family: ui-serif, "Iowan Old Style", Georgia, serif;
  font-size: clamp(1.8rem, 5.5vw, 2.5rem);
  line-height: 1.15;
  letter-spacing: -0.005em;
  margin: 0 0 0.4rem;
  text-align: center;
  color: var(--ink);
}
.subtitle {
  text-align: center;
  font-style: italic;
  color: var(--ink-2);
  font-size: 1rem;
  margin: 0 0 2rem;
  letter-spacing: 0.02em;
}

/* ---- Official seal (circular) ---- */
.seal {
  display: block;
  width: 132px;
  height: 132px;
  margin: 0.25rem auto 1.4rem;
}
.seal text { fill: var(--accent); }

/* ---- Site navigation ---- */
.nav {
  text-align: center;
  margin: 0 0 0.5rem;
  font-family: ui-serif, Georgia, serif;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  line-height: 2.1;
}
.nav a {
  color: var(--ink-2);
  text-decoration: none;
  padding: 0 0.1rem;
  white-space: nowrap;
}
.nav a:hover { color: var(--accent); text-decoration: underline; }
.nav a[aria-current="page"] { color: var(--ink); text-decoration: underline; text-decoration-thickness: 1px; }
.nav .sep { color: var(--rule); margin: 0 0.45rem; }

.rule {
  border: 0;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--rule), transparent);
  margin: 2.25rem 0;
}

h2 {
  font-family: ui-serif, "Iowan Old Style", Georgia, serif;
  font-size: 1.45rem;
  margin: 2.25rem 0 0.85rem;
  color: var(--ink);
  border-bottom: 1px solid var(--rule-2);
  padding-bottom: 0.4rem;
}
h3 {
  font-family: ui-serif, "Iowan Old Style", Georgia, serif;
  font-size: 1.05rem;
  margin: 1.5rem 0 0.5rem;
  color: var(--ink-2);
  letter-spacing: 0.01em;
}

p { margin: 0 0 1.1rem; }

.lead {
  font-style: italic;
  color: var(--ink-2);
  text-align: center;
  max-width: 38rem;
  margin: 0 auto 1.6rem;
}

.first-letter::first-letter {
  font-family: ui-serif, "Iowan Old Style", Georgia, serif;
  font-size: 3.1rem;
  line-height: 0.9;
  float: left;
  margin: 0.1rem 0.55rem 0 0;
  color: var(--accent);
  font-weight: 700;
}

/* ---- FAQ ---- */
.faq dt {
  font-weight: 600;
  color: var(--ink);
  margin-top: 1rem;
}
.faq dt:first-of-type { margin-top: 0.25rem; }
.faq dd {
  margin: 0.2rem 0 0;
  color: var(--ink-2);
  font-style: italic;
}

/* ---- Damages ---- */
.damages {
  margin: 1rem 0 1.25rem 1.25rem;
  padding: 0;
}
.damages li {
  margin: 0.3rem 0;
  color: var(--ink);
}

/* ---- In Memoriam plaque ---- */
.plaque {
  margin: 1.5rem auto;
  max-width: 420px;
  border: 1px solid var(--accent);
  border-radius: 4px;
  padding: 1.25rem 1.5rem;
  background: rgba(255, 255, 255, 0.4);
  text-align: center;
}
.plaque .name {
  font-family: ui-serif, Georgia, serif;
  font-size: 1.15rem;
  color: var(--ink);
  margin: 0 0 0.65rem;
  font-style: italic;
}
.plaque .specs {
  font-family: ui-monospace, "Courier New", monospace;
  font-size: 0.84rem;
  color: var(--ink-2);
  line-height: 1.7;
  text-align: left;
  display: inline-block;
}
.plaque .specs b { color: var(--ink); }
.plaque .accession {
  margin-top: 0.8rem;
  font-family: ui-monospace, "Courier New", monospace;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  color: var(--pull);
}

.caption {
  text-align: center;
  font-size: 0.82rem;
  color: var(--ink-2);
  font-style: italic;
  margin-top: -0.4rem;
}

.figure {
  text-align: center;
  margin: 1.5rem auto;
}
.bottle-svg {
  display: inline-block;
  width: 100px;
  height: 170px;
  cursor: help;
}

/* ---- Wax stamp ---- */
.wax {
  display: block;
  width: 96px;
  height: 96px;
  margin: 1.75rem auto 0.5rem;
  transform: rotate(-7deg);
}

/* ---- Accession catalog table ---- */
.catalog {
  width: 100%;
  border-collapse: collapse;
  font-family: ui-monospace, "Courier New", monospace;
  font-size: 0.8rem;
  margin: 1rem 0 1.25rem;
}
.catalog th, .catalog td {
  text-align: left;
  padding: 0.45rem 0.6rem;
  border-bottom: 1px solid var(--rule-2);
  vertical-align: top;
}
.catalog th {
  color: var(--ink);
  border-bottom: 1px solid var(--rule);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 0.72rem;
}
.catalog td:first-child { color: var(--pull); white-space: nowrap; }
.catalog td { color: var(--ink-2); }

/* ---- Definition-style lists (provenance, hours, etc.) ---- */
.ledger {
  margin: 1rem 0 1.25rem;
}
.ledger dt {
  font-family: ui-monospace, "Courier New", monospace;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  color: var(--pull);
  margin-top: 0.85rem;
}
.ledger dt:first-of-type { margin-top: 0; }
.ledger dd {
  margin: 0.15rem 0 0;
  color: var(--ink);
}

/* ---- The Collection (holdings list) ---- */
.holdings { list-style: none; margin: 1rem 0 1.25rem; padding: 0; }
.holdings li {
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--rule-2);
}
.holdings li:last-child { border-bottom: 0; }
.holdings .h-title { color: var(--ink); }
.holdings .h-note { display: block; font-size: 0.86rem; color: var(--ink-2); font-style: italic; }

/* ---- Bibliography ---- */
.biblio { margin: 1rem 0 1.25rem; padding: 0; list-style: none; }
.biblio li {
  text-indent: -1.4rem;
  padding-left: 1.4rem;
  margin: 0 0 0.9rem;
  color: var(--ink);
}
.biblio cite { font-style: italic; }

/* ---- Press coverage ---- */
.press { margin: 1rem 0 1.25rem; }
.press blockquote {
  margin: 0 0 1.25rem;
  padding: 0 0 0 1.1rem;
  border-left: 2px solid var(--rule);
}
.press blockquote p { margin: 0 0 0.35rem; font-style: italic; color: var(--ink); }
.press blockquote cite {
  font-style: normal;
  font-size: 0.82rem;
  color: var(--ink-2);
  letter-spacing: 0.03em;
}

/* ---- Visitor's log ---- */
.visitlog {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  margin: 1rem 0 1.25rem;
}
.visitlog td {
  padding: 0.4rem 0.6rem 0.4rem 0;
  border-bottom: 1px solid var(--rule-2);
  vertical-align: top;
}
.visitlog td:first-child {
  font-family: ui-monospace, "Courier New", monospace;
  font-size: 0.76rem;
  color: var(--pull);
  white-space: nowrap;
}
.visitlog .vname { color: var(--ink); }
.visitlog .vnote { display: block; font-style: italic; color: var(--ink-2); font-size: 0.84rem; }

/* ---- Footnotes ---- */
sup.fn {
  font-size: 0.7rem;
  line-height: 0;
  vertical-align: super;
}
sup.fn a { text-decoration: none; color: var(--accent); }
sup.fn a:hover { text-decoration: underline; }
.footnotes {
  margin: 2.5rem 0 0;
  padding-top: 1rem;
  border-top: 1px solid var(--rule-2);
  font-size: 0.82rem;
  color: var(--ink-2);
  line-height: 1.55;
}
.footnotes ol { margin: 0; padding-left: 1.4rem; }
.footnotes li { margin: 0 0 0.6rem; }
.footnotes li:target { color: var(--ink); }

/* ---- Signature ---- */
.signature {
  margin-top: 2rem;
  text-align: right;
  font-style: italic;
  color: var(--ink-2);
}

/* ---- Footer ---- */
.footer {
  margin-top: 3rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--rule-2);
  text-align: center;
  font-size: 0.82rem;
  color: var(--ink-2);
  letter-spacing: 0.04em;
  line-height: 1.7;
}
.footer a { color: var(--accent); }
.footer .meta { display: block; margin-top: 0.5rem; font-size: 0.76rem; color: var(--pull); letter-spacing: 0.03em; }
.footer .onview { display: block; margin-top: 0.5rem; font-size: 0.76rem; font-style: italic; }
.footer .counter { display: block; margin-top: 0.5rem; font-size: 0.76rem; }
