/* ============================================================
   Patavium Medicum — the Padua comparator stratum
   Record-register single page. v6 design language.
   Warm paper · oxblood · gold · Garamond serif · mono labels.
   ============================================================ */

:root {
  --paper:      #f6f1e3;
  --paper-deep: #efe7d3;
  --card:       #fbf8ef;
  --ink:        #1c150c;
  --ink-soft:   #4a3f30;
  --ink-faint:  #7a6e58;
  --rule:       #d8cdb1;
  --rule-soft:  #e6ddc6;
  --oxblood:    #7a2e1a;
  --oxblood-dk: #5d2113;
  --gold:       #b08035;
  --gold-dk:    #8a6320;

  /* tier colours */
  --t-confirmed: #2f5e3a;
  --t-supported: #4a6b86;
  --t-observed-c:#8a6320;
  --t-candidate: #7a6e58;
  --t-falsified: #7a2e1a;

  --maxw: 1080px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'EB Garamond', 'Iowan Old Style', Garamond, Georgia, 'Times New Roman', serif;
  font-size: 19px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* paper grain */
body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background-image:
    radial-gradient(circle at 18% 12%, rgba(122,46,26,.025), transparent 60%),
    radial-gradient(circle at 82% 78%, rgba(176,128,53,.03), transparent 55%);
}

.wrap { position: relative; z-index: 1; max-width: var(--maxw); margin: 0 auto; padding: 0 48px; }

a { color: var(--oxblood); text-decoration: none; border-bottom: 1px solid var(--rule); }
a:hover { color: var(--oxblood-dk); border-bottom-color: var(--oxblood); }

/* ---------- typographic primitives ---------- */
.mono {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: .68em; letter-spacing: .09em; text-transform: uppercase;
  color: var(--ink-faint);
}

h1, h2, h3 { font-weight: 600; line-height: 1.18; }

/* ============================================================
   MASTHEAD
   ============================================================ */
.masthead {
  border-bottom: 3px double var(--oxblood);
  padding: 70px 0 38px;
  margin-bottom: 4px;
}
.masthead .kicker {
  display: block; margin-bottom: 22px;
  font-family: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
  font-size: 12px; letter-spacing: .22em; text-transform: uppercase;
  color: var(--oxblood);
}
.masthead h1 {
  font-family: 'Cormorant Garamond', 'EB Garamond', 'Iowan Old Style', Georgia, 'Times New Roman', serif;
  font-size: 76px; font-weight: 600; letter-spacing: -.01em;
  margin: 0 0 8px; color: var(--ink);
}
.masthead .latin {
  font-style: italic; font-size: 25px; color: var(--oxblood);
  font-family: 'Cormorant Garamond', serif; margin: 0 0 26px;
}
.masthead .standfirst {
  font-size: 21px; color: var(--ink-soft); max-width: 720px; margin: 0;
}
.masthead .meta-strip {
  display: flex; flex-wrap: wrap; gap: 0 40px; margin-top: 34px;
  padding-top: 22px; border-top: 1px solid var(--rule);
}
.masthead .meta-strip div { display: flex; flex-direction: column; gap: 3px; }
.masthead .meta-strip .mono { font-size: 10.5px; }
.masthead .meta-strip .val { font-size: 18px; color: var(--ink); }

/* ============================================================
   HONEST FRAME — the standing disclosure
   ============================================================ */
.frame {
  background: var(--card);
  border: 1px solid var(--rule);
  border-left: 4px solid var(--oxblood);
  padding: 32px 38px;
  margin: 46px 0;
}
.frame h2 {
  font-size: 15px; font-family: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
  letter-spacing: .12em; text-transform: uppercase; color: var(--oxblood);
  margin: 0 0 16px;
}
.frame p { margin: 0 0 14px; color: var(--ink-soft); font-size: 18.5px; }
.frame p:last-child { margin-bottom: 0; }
.frame .is, .frame .isnot { display: block; padding-left: 22px; position: relative; }
.frame .is::before  { content: "✓"; position: absolute; left: 0; color: var(--t-confirmed); font-weight: 600; }
.frame .isnot::before { content: "✗"; position: absolute; left: 0; color: var(--oxblood); font-weight: 600; }

/* ============================================================
   SECTION HEADERS
   ============================================================ */
section { margin: 64px 0; }
.sec-head { margin-bottom: 30px; }
.sec-head .num {
  font-family: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace; font-size: 13px;
  color: var(--gold-dk); letter-spacing: .14em;
}
.sec-head h2 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 40px; font-weight: 600; margin: 6px 0 10px; color: var(--ink);
}
.sec-head .lede { color: var(--ink-soft); font-size: 19px; max-width: 760px; margin: 0; }
.sec-head::after {
  content: ""; display: block; width: 64px; height: 2px;
  background: var(--gold); margin-top: 18px;
}

/* ============================================================
   TIER BAND HEADERS
   ============================================================ */
.tier-band {
  display: flex; align-items: baseline; gap: 14px;
  margin: 40px 0 18px; padding-bottom: 8px;
  border-bottom: 1px solid var(--rule);
}
.tier-band .tag {
  font-family: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace; font-size: 11px;
  letter-spacing: .12em; text-transform: uppercase;
  padding: 4px 10px; border-radius: 2px; color: #fff;
}
.tier-band .tag.confirmed { background: var(--t-confirmed); }
.tier-band .tag.supported { background: var(--t-supported); }
.tier-band .tag.observed  { background: var(--t-observed-c); }
.tier-band .tag.candidate { background: var(--t-candidate); }
.tier-band .tag.falsified { background: var(--t-falsified); }
.tier-band .what { font-size: 16px; color: var(--ink-faint); font-style: italic; }

/* ============================================================
   FINDING CAPSULES  (<details>)
   ============================================================ */
.finding {
  background: var(--card);
  border: 1px solid var(--rule);
  margin-bottom: 14px;
}
.finding[data-tier="confirmed"] { border-left: 4px solid var(--t-confirmed); }
.finding[data-tier="supported"] { border-left: 4px solid var(--t-supported); }
.finding[data-tier="observed"]  { border-left: 4px solid var(--t-observed-c); }
.finding[data-tier="candidate"] { border-left: 4px solid var(--t-candidate); }

.finding > summary {
  list-style: none; cursor: pointer; padding: 22px 28px;
  display: flex; align-items: flex-start; gap: 18px;
}
.finding > summary::-webkit-details-marker { display: none; }
.finding > summary .code {
  font-family: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace; font-size: 11px;
  color: var(--gold-dk); letter-spacing: .04em; white-space: nowrap;
  padding-top: 4px; min-width: 96px;
}
.finding > summary .claim {
  flex: 1; font-size: 19.5px; color: var(--ink); line-height: 1.45;
}
.finding > summary .chev {
  color: var(--ink-faint); font-size: 22px; transition: transform .2s ease;
  line-height: 1;
}
.finding[open] > summary .chev { transform: rotate(90deg); }
.finding[open] > summary { border-bottom: 1px solid var(--rule-soft); }

.capsule { padding: 6px 28px 26px 122px; }
.capsule .row { margin-top: 18px; }
.capsule .row .mono { display: block; margin-bottom: 5px; font-size: 10px; }
.capsule .row p { margin: 0; color: var(--ink-soft); font-size: 17.5px; }
.capsule .row.falsifier p { color: var(--oxblood-dk); font-style: italic; }
.capsule .src {
  font-family: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace; font-size: 12.5px;
  color: var(--ink-faint); word-break: break-word;
}

/* ============================================================
   FALSIFIED — the visible boundary panel
   ============================================================ */
.falsifier-panel {
  background: #f3e4dd;
  border: 1px solid #d8a895;
  border-left: 5px solid var(--t-falsified);
  padding: 34px 40px;
  margin: 30px 0;
}
.falsifier-panel .tag {
  font-family: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace; font-size: 11px;
  letter-spacing: .12em; text-transform: uppercase;
  background: var(--t-falsified); color: #fff; padding: 4px 10px;
  border-radius: 2px;
}
.falsifier-panel h3 {
  font-family: 'Cormorant Garamond', serif; font-size: 30px;
  margin: 16px 0 12px; color: var(--oxblood-dk);
}
.falsifier-panel p { margin: 0 0 12px; color: var(--ink-soft); font-size: 18.5px; }
.falsifier-panel p:last-child { margin-bottom: 0; }
.falsifier-panel .ref {
  font-family: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace; font-size: 12px;
  color: var(--t-falsified);
}

/* ============================================================
   MANUSCRIPT RECORDS TABLE
   ============================================================ */
.records { margin-top: 8px; }
.records .grp-head {
  margin: 34px 0 12px;
  display: flex; align-items: baseline; gap: 12px;
}
.records .grp-head h3 {
  font-family: 'Cormorant Garamond', serif; font-size: 25px;
  margin: 0; color: var(--ink);
}
.records .grp-head .note { font-size: 15px; color: var(--ink-faint); font-style: italic; }

table.rec {
  width: 100%; border-collapse: collapse; font-size: 16.5px;
  background: var(--card); border: 1px solid var(--rule);
}
table.rec th {
  text-align: left; font-family: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
  font-size: 10px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--ink-faint); font-weight: 500;
  padding: 11px 14px; border-bottom: 2px solid var(--rule);
  background: var(--paper-deep);
}
table.rec td {
  padding: 12px 14px; border-bottom: 1px solid var(--rule-soft);
  color: var(--ink-soft); vertical-align: top;
}
table.rec tr:last-child td { border-bottom: none; }
table.rec .shelf {
  font-family: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace; font-size: 13px; color: var(--ink);
}
table.rec .title { color: var(--ink); }
table.rec .title em { color: var(--ink-soft); }

.status {
  font-family: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace; font-size: 10.5px;
  letter-spacing: .06em; text-transform: uppercase; white-space: nowrap;
  padding: 3px 8px; border-radius: 2px; display: inline-block;
}
.status.imported   { background: #dfe9df; color: var(--t-confirmed); }
.status.canonical  { background: #dfe9df; color: var(--t-confirmed); }
.status.catalog    { background: #e8e2cf; color: var(--gold-dk); }
.status.blocked    { background: #f1ddd4; color: var(--oxblood); }

/* ============================================================
   FIGURES — the people of the orbit
   ============================================================ */
.figures {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 0;
  border: 1px solid var(--rule); background: var(--card);
}
.fig {
  padding: 16px 22px;
  border-bottom: 1px solid var(--rule-soft);
}
.fig:nth-child(odd) { border-right: 1px solid var(--rule-soft); }
.fig .name { font-size: 19px; color: var(--ink); font-weight: 500; }
.fig .dates {
  font-family: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace; font-size: 11px;
  color: var(--gold-dk); margin-left: 8px;
}
.fig .role { font-size: 15.5px; color: var(--ink-faint); font-style: italic; }
.fig .use { font-size: 15.5px; color: var(--ink-soft); margin-top: 3px; }

/* ============================================================
   COMPARATOR CROPS — the imagery, honestly labelled
   ============================================================ */
.crops {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px;
}
.crop {
  background: var(--card); border: 1px solid var(--rule);
}
.crop .frame-img {
  background: #2a241a; padding: 10px;
  display: flex; align-items: center; justify-content: center;
  min-height: 220px;
}
.crop .frame-img img {
  max-width: 100%; max-height: 300px; display: block;
  border: 1px solid rgba(0,0,0,.4);
}
.crop figcaption { padding: 14px 16px 16px; }
.crop figcaption .lbl {
  font-family: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace; font-size: 10px;
  letter-spacing: .07em; text-transform: uppercase; color: var(--oxblood);
  display: block; margin-bottom: 5px;
}
.crop figcaption .desc { font-size: 16px; color: var(--ink-soft); }
.crop figcaption .acq {
  font-family: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace; font-size: 10.5px;
  margin-top: 7px; display: inline-block;
}
.crops-note {
  margin-top: 18px; font-size: 16px; color: var(--ink-faint);
  font-style: italic; border-top: 1px solid var(--rule-soft); padding-top: 14px;
}

/* ============================================================
   GENEALOGY CHAIN
   ============================================================ */
.chain {
  background: var(--card); border: 1px solid var(--rule);
  padding: 30px 36px; margin-top: 8px;
}
.chain ol {
  list-style: none; counter-reset: step; margin: 0; padding: 0;
}
.chain li {
  counter-increment: step; position: relative;
  padding: 12px 0 12px 56px; border-bottom: 1px solid var(--rule-soft);
}
.chain li:last-child { border-bottom: none; }
.chain li::before {
  content: counter(step); position: absolute; left: 0; top: 12px;
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--paper-deep); border: 1px solid var(--gold);
  color: var(--gold-dk); font-family: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
  font-size: 13px; display: flex; align-items: center; justify-content: center;
}
.chain li .stage { color: var(--ink); font-weight: 500; }
.chain li .stage-d { color: var(--ink-soft); font-size: 16.5px; }

/* ============================================================
   FOOTER
   ============================================================ */
footer {
  margin-top: 80px; border-top: 3px double var(--oxblood);
  padding: 38px 0 70px;
}
footer .cols { display: flex; flex-wrap: wrap; gap: 48px; }
footer .col { flex: 1; min-width: 220px; }
footer .col h4 {
  font-family: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace; font-size: 11px;
  letter-spacing: .12em; text-transform: uppercase; color: var(--oxblood);
  margin: 0 0 12px;
}
footer .col p { margin: 0; font-size: 16px; color: var(--ink-soft); }
footer .colophon {
  margin-top: 34px; padding-top: 22px; border-top: 1px solid var(--rule);
  font-family: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace; font-size: 11.5px;
  color: var(--ink-faint); line-height: 1.8;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 820px) {
  .wrap { padding: 0 24px; }
  .masthead h1 { font-size: 48px; }
  .masthead { padding-top: 48px; }
  .sec-head h2 { font-size: 30px; }
  .capsule { padding-left: 28px; }
  .finding > summary { flex-wrap: wrap; }
  .finding > summary .code { min-width: 0; }
  .figures { grid-template-columns: 1fr; }
  .fig:nth-child(odd) { border-right: none; }
  .crops { grid-template-columns: 1fr; }
  table.rec { font-size: 14px; }
  table.rec th, table.rec td { padding: 8px 9px; }
}

/* ============================================================
   Merge layer — additions for thevoynich.org over the
   Patavium register. Added 2026-05-23 for the substrate-aware
   thevoynich.org / Patavium merge.
   ============================================================ */

/* ---------- grids ---------- */
.grid-2col, .grid-3col, .grid-4col {
  display: grid;
  gap: 22px;
  margin: 28px 0;
}
.grid-2col { grid-template-columns: repeat(2, 1fr); }
.grid-3col { grid-template-columns: repeat(3, 1fr); }
.grid-4col { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 880px) {
  .grid-2col, .grid-3col, .grid-4col { grid-template-columns: 1fr; }
}

/* ---------- cards ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--rule);
  padding: 22px 22px 20px;
  border-radius: 4px;
}
.card h3 {
  font-family: 'Cormorant Garamond', Garamond, serif;
  font-size: 22px;
  font-weight: 500;
  font-style: italic;
  color: var(--oxblood-dk);
  margin: 0 0 10px;
}
.card h4 {
  font-family: 'Cormorant Garamond', Garamond, serif;
  font-size: 18px;
  font-style: italic;
  color: var(--oxblood-dk);
  margin: 0 0 6px;
  font-weight: 500;
}
.card p { margin: 0 0 10px; color: var(--ink-soft); font-size: 17px; line-height: 1.55; }
.card.slim { padding: 18px 18px 14px; }
.card.link {
  display: block;
  color: inherit;
  border-bottom: 1px solid var(--rule);
  transition: border-color .15s, background .15s;
}
.card.link:hover {
  background: #fdfaf0;
  border-color: var(--oxblood);
}
.card-cta {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--oxblood);
  margin-top: 14px !important;
  font-weight: 500;
}
.card .actions { margin: 12px 0 0; }

/* ---------- actions / inline CTA ---------- */
.actions { margin: 16px 0 0; }
.action {
  display: inline-block;
  padding: 9px 18px;
  background: var(--oxblood);
  color: var(--paper);
  border: 1px solid var(--oxblood-dk);
  border-radius: 3px;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 13px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-weight: 500;
}
.action:hover { background: var(--oxblood-dk); border-color: var(--oxblood-dk); color: var(--paper); }

/* ---------- plate (full-width manuscript image) ---------- */
.plate {
  margin: 32px 0 12px;
  background: var(--card);
  padding: 14px;
  border: 1px solid var(--rule);
}
.plate img { width: 100%; height: auto; display: block; border: 1px solid var(--rule-soft); }
.plate figcaption {
  font-family: 'Cormorant Garamond', Garamond, serif;
  font-style: italic;
  font-size: 16px;
  color: var(--ink-soft);
  margin-top: 10px;
  text-align: center;
}

/* ---------- function-showcase block (live apparatus surface) ---------- */
.showcase {
  margin: 36px 0 12px;
  background: linear-gradient(180deg, #fbf8ef 0%, #f3ecd6 100%);
  border: 1px solid var(--gold);
  border-left: 4px solid var(--oxblood);
  padding: 28px 32px;
  border-radius: 4px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: center;
}
@media (max-width: 880px) {
  .showcase { grid-template-columns: 1fr; }
}
.showcase-head .kicker {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--gold-dk);
  display: block;
  margin-bottom: 6px;
}
.showcase-head h3 {
  font-family: 'Cormorant Garamond', Garamond, serif;
  font-size: 28px;
  font-style: italic;
  color: var(--ink);
  margin: 0 0 10px;
  font-weight: 500;
}
.showcase-head p { margin: 0; color: var(--ink-soft); font-size: 17.5px; max-width: 640px; }
.showcase-actions { display: flex; flex-direction: column; gap: 10px; align-items: stretch; }
.cta {
  display: inline-block;
  padding: 11px 20px;
  background: var(--card);
  color: var(--oxblood);
  border: 1px solid var(--oxblood);
  border-radius: 3px;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 13px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-weight: 500;
  text-align: center;
  white-space: nowrap;
}
.cta:hover { background: #f3ead4; color: var(--oxblood-dk); border-color: var(--oxblood-dk); }
.cta.primary { background: var(--oxblood); color: var(--paper); border-color: var(--oxblood-dk); }
.cta.primary:hover { background: var(--oxblood-dk); color: var(--paper); }

/* ---------- findings tier row ---------- */
.tier-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
  margin: 24px 0;
}
@media (max-width: 880px) {
  .tier-row { grid-template-columns: repeat(2, 1fr); }
}
.tier-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 18px 16px 16px;
  background: var(--card);
  border-radius: 4px;
  color: inherit;
  border-bottom: 3px solid var(--rule);
  transition: transform .15s, box-shadow .15s, border-color .15s;
}
.tier-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(28,21,12,0.08);
}
.tier-card .t-num {
  font-family: 'Cormorant Garamond', Garamond, serif;
  font-size: 38px;
  font-style: italic;
  font-weight: 500;
  line-height: 1;
}
.tier-card .t-label {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 500;
}
.tier-card .t-note {
  font-size: 14px;
  font-style: italic;
  color: var(--ink-faint);
  margin-top: 4px;
  line-height: 1.4;
}
.tier-card.t-confirmed { border-color: var(--t-confirmed); }
.tier-card.t-confirmed .t-num, .tier-card.t-confirmed .t-label { color: var(--t-confirmed); }
.tier-card.t-supported { border-color: var(--t-supported); }
.tier-card.t-supported .t-num, .tier-card.t-supported .t-label { color: var(--t-supported); }
.tier-card.t-candidate { border-color: var(--t-candidate); }
.tier-card.t-candidate .t-num, .tier-card.t-candidate .t-label { color: var(--t-candidate); }
.tier-card.t-observed { border-color: var(--t-observed-c); }
.tier-card.t-observed .t-num, .tier-card.t-observed .t-label { color: var(--t-observed-c); }
.tier-card.t-falsified { border-color: var(--t-falsified); }
.tier-card.t-falsified .t-num, .tier-card.t-falsified .t-label { color: var(--t-falsified); }

/* ---------- comparator imagery grid ---------- */
.comparator-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin: 22px 0 10px;
}
@media (max-width: 880px) {
  .comparator-grid { grid-template-columns: repeat(2, 1fr); }
}
.comp-tile {
  margin: 0;
  background: var(--card);
  padding: 10px;
  border: 1px solid var(--rule);
}
.comp-tile img { width: 100%; height: 220px; object-fit: cover; display: block; border: 1px solid var(--rule-soft); }
.comp-tile figcaption {
  font-family: 'Cormorant Garamond', Garamond, serif;
  font-style: italic;
  font-size: 14.5px;
  color: var(--ink-soft);
  margin-top: 8px;
  text-align: center;
  line-height: 1.35;
}

/* ---------- footer ---------- */
.footer {
  margin-top: 64px;
  padding: 28px 0 36px;
  border-top: 1px solid var(--rule);
  font-size: 14px;
  color: var(--ink-faint);
  line-height: 1.55;
}
.footer p { margin: 0 0 10px; }
.footer .contact {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--rule);
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 12.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.footer .contact a { color: var(--oxblood); border-bottom: 1px solid var(--oxblood); }
.footer .contact a:hover { background: var(--oxblood); color: #fbf8ef; }

/* ---------- section spacing ---------- */
section { margin: 56px 0; }

/* ---------- top navigation (shared across all pages of thevoynich.org) ---------- */
.topnav {
  display: flex;
  flex-wrap: wrap;
  gap: 0 28px;
  padding: 18px 0 16px;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 28px;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.topnav a {
  color: var(--ink-soft);
  border-bottom: 0;
  padding-bottom: 4px;
  position: relative;
}
.topnav a:hover { color: var(--oxblood); }
.topnav a[aria-current="page"] {
  color: var(--oxblood);
}
.topnav a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  border-bottom: 2px solid var(--oxblood);
}
.topnav .brand { color: var(--ink); font-weight: 500; margin-right: auto; }
.topnav .live {
  color: var(--gold-dk);
  font-size: 12px;
  letter-spacing: 0.06em;
}
.topnav .live::before {
  content: "●";
  color: #2f5e3a;
  margin-right: 6px;
  font-size: 10px;
  vertical-align: middle;
}
.topnav .cov-link {
  color: var(--oxblood);
  font-size: 13px;
  letter-spacing: 0.04em;
  border: 1px solid var(--oxblood);
  border-radius: 3px;
  padding: 3px 10px 4px;
}
.topnav .cov-link:hover {
  background: var(--oxblood);
  color: #fbf8ef;
}

/* ---------- record table (codicology) ---------- */
.record-table {
  background: var(--card);
  border: 1px solid var(--rule);
  padding: 4px 12px;
  border-radius: 4px;
  margin: 18px 0 10px;
}
.record-table table { width: 100%; border-collapse: collapse; }
.record-table th, .record-table td { padding: 11px 14px; vertical-align: top; border-bottom: 1px solid var(--rule-soft); text-align: left; }
.record-table th {
  width: 200px;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
  text-transform: uppercase;
  vertical-align: top;
}
.record-table td { color: var(--ink); font-size: 17px; }
.record-table tr:last-child th, .record-table tr:last-child td { border-bottom: 0; }
.record-table code { background: transparent; padding: 0; border-radius: 0; font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 0.92em; color: var(--ink); letter-spacing: 0; }

/* abbr[title] — hover tooltip for acronyms; dotted underline cues hoverability */
abbr[title] {
  text-decoration: none;
  border-bottom: 1px dotted var(--ink-faint);
  cursor: help;
  font-variant: inherit;
  letter-spacing: inherit;
}
abbr[title]:hover { border-bottom-color: var(--oxblood); color: var(--oxblood); }

/* ---------- folio grid (section cards) ---------- */
.folio-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin: 22px 0 16px;
}
@media (max-width: 880px) { .folio-grid { grid-template-columns: 1fr; } }
.folio-card {
  background: var(--card);
  border: 1px solid var(--rule);
  padding: 14px 14px 16px;
  border-radius: 4px;
}
.folio-card figure { margin: 0 0 12px; }
.folio-card figure img { width: 100%; height: 200px; object-fit: cover; object-position: top center; display: block; border: 1px solid var(--rule-soft); }
.folio-card figcaption {
  font-family: 'Cormorant Garamond', Garamond, serif;
  font-style: italic;
  font-size: 15px;
  color: var(--ink-soft);
  margin-top: 8px;
  text-align: center;
}
.folio-card figcaption .mono { background: var(--paper-deep); padding: 1px 6px; border-radius: 2px; font-style: normal; font-size: 13px; }
.folio-card p { margin: 0 0 10px; color: var(--ink-soft); font-size: 16px; line-height: 1.5; }
.folio-card .actions { margin-top: 12px; }

/* ---------- worked-example block ---------- */
.worked-block {
  background: linear-gradient(180deg, #fbf8ef 0%, #f6efd9 100%);
  border-left: 4px solid var(--gold);
  border-top: 1px solid var(--rule-soft);
  border-bottom: 1px solid var(--rule-soft);
  border-right: 1px solid var(--rule-soft);
  padding: 22px 26px;
  margin: 28px 0 8px;
  border-radius: 4px;
}
.worked-block h3 {
  font-family: 'Cormorant Garamond', Garamond, serif;
  font-size: 24px;
  font-style: italic;
  color: var(--oxblood-dk);
  margin: 0 0 12px;
  font-weight: 500;
}
.worked-block p { margin: 0 0 10px; color: var(--ink-soft); font-size: 17px; }
.worked-block p:last-child { margin-bottom: 0; }

/* ---------- finding capsule (re-use shape from Patavium) ---------- */
.finding-list { margin: 18px 0; }
.finding-row {
  display: grid;
  grid-template-columns: 130px 1fr auto;
  gap: 18px;
  align-items: baseline;
  padding: 12px 0;
  border-bottom: 1px solid var(--rule-soft);
}
.finding-row .code {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--ink-faint);
  letter-spacing: 0.04em;
}
.finding-row .claim {
  font-size: 17px;
  color: var(--ink);
  line-height: 1.5;
}
.finding-row .claim em { font-style: italic; color: var(--ink-soft); }
.finding-row .open {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 12px;
  color: var(--oxblood);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}
.finding-row:last-child { border-bottom: 0; }
@media (max-width: 880px) {
  .finding-row { grid-template-columns: 1fr; gap: 6px; }
}
.tier-section { margin: 36px 0; }
.tier-section .tier-band {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 8px;
  padding: 0 0 6px;
  border-bottom: 1px solid var(--rule);
}
.tier-section .tier-band .tier-name {
  font-family: 'Cormorant Garamond', Garamond, serif;
  font-size: 26px;
  font-style: italic;
  font-weight: 500;
}
.tier-section .tier-band .tier-count {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 13px;
  color: var(--ink-faint);
  letter-spacing: 0.06em;
}
.tier-section .tier-band .tier-meaning {
  font-size: 15px;
  font-style: italic;
  color: var(--ink-faint);
  margin-left: auto;
}
.tier-section.t-confirmed .tier-name { color: var(--t-confirmed); }
.tier-section.t-supported .tier-name { color: var(--t-supported); }
.tier-section.t-candidate .tier-name { color: var(--t-candidate); }
.tier-section.t-observed .tier-name { color: var(--t-observed-c); }
.tier-section.t-falsified .tier-name { color: var(--t-falsified); }

/* ============================================================
   § 05 — Corridor-in-time interactive
   Year scrubber + event list + 3-row genealogy SVG.
   Added 2026-05-23 per Ed's "design pieces" ask.
   ============================================================ */

.mono-kicker {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11.5px;
  letter-spacing: 0.14em;
  color: var(--ink-faint);
  text-transform: uppercase;
  font-weight: 500;
}

#corridor-time { margin: 48px 0; }

/* --- scrubber --- */
.ct-scrubber-wrap {
  background: var(--card);
  border: 1px solid var(--rule);
  padding: 28px 36px 36px;
  border-radius: 4px;
  margin-bottom: 28px;
}
.ct-scrubber-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 6px;
}
.ct-hint {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 12px;
  color: var(--ink-faint);
}
.ct-headline {
  font-family: 'Cormorant Garamond', Garamond, serif;
  font-style: italic;
  font-size: 38px;
  font-weight: 500;
  color: var(--ink);
  margin: 0 0 22px;
  line-height: 1.1;
}
.ct-year {
  font-style: normal;
  font-family: 'EB Garamond', Garamond, serif;
  font-weight: 500;
  color: var(--ink);
}
.ct-scrubber {
  position: relative;
  height: 70px;
  cursor: pointer;
  user-select: none;
  outline: none;
}
.ct-scrubber:focus .ct-scrubber-cursor {
  box-shadow: 0 0 0 3px rgba(122, 46, 26, 0.25);
}
.ct-scrubber-line {
  position: absolute;
  left: 0; right: 0; top: 50%;
  height: 2px;
  background: var(--oxblood);
  transform: translateY(-50%);
}
.ct-scrubber-cursor {
  position: absolute;
  top: 50%;
  width: 18px;
  height: 18px;
  background: var(--paper);
  border: 2px solid var(--oxblood);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  transition: left 0.05s linear;
  z-index: 4;
}
.ct-scrubber-cursor::after {
  content: "";
  position: absolute;
  top: 50%; left: 50%;
  width: 6px; height: 6px;
  background: var(--oxblood);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}
.ct-scrubber-tooltip {
  position: absolute;
  bottom: calc(50% + 20px);
  background: var(--ink);
  color: var(--paper);
  padding: 4px 10px;
  font-family: 'EB Garamond', Garamond, serif;
  font-style: italic;
  font-size: 18px;
  border-radius: 2px;
  transform: translateX(-50%);
  pointer-events: none;
  z-index: 5;
  transition: left 0.05s linear;
}
.ct-scrubber-tooltip::after {
  content: "";
  position: absolute;
  top: 100%; left: 50%;
  width: 0; height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 6px solid var(--ink);
  transform: translateX(-50%);
}
.ct-scrubber-marks {
  position: absolute;
  left: 0; right: 0; top: 0; bottom: 0;
  pointer-events: none;
}
.ct-marker {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11px;
  color: var(--ink-faint);
  white-space: nowrap;
  pointer-events: auto;
  cursor: pointer;
  text-align: center;
  z-index: 3;
}
.ct-marker .tick {
  display: block;
  width: 1px;
  height: 12px;
  background: var(--oxblood);
  margin: 0 auto 5px;
  opacity: 0.6;
}
.ct-marker.below {
  top: calc(50% + 28px);
}
.ct-marker.below .tick {
  margin: -17px auto 5px;
  height: 12px;
}
.ct-marker:hover { color: var(--oxblood); }
.ct-marker .marker-label { display: block; max-width: 140px; overflow-wrap: break-word; }
.ct-scrubber-range {
  position: absolute;
  bottom: -6px;
  left: 0; right: 0;
  display: flex;
  justify-content: space-between;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11px;
  color: var(--ink-faint);
}

/* --- split: events + genealogy --- */
.ct-split {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 36px;
}
@media (max-width: 980px) {
  .ct-split { grid-template-columns: 1fr; }
}
.ct-events-head { margin-bottom: 18px; }
.ct-events-title {
  font-family: 'Cormorant Garamond', Garamond, serif;
  font-style: italic;
  font-weight: 500;
  font-size: 30px;
  color: var(--ink);
  margin: 6px 0 12px;
  line-height: 1.15;
}
.ct-events-prose {
  color: var(--ink-soft);
  font-size: 17px;
  margin: 0 0 12px;
  line-height: 1.55;
}
.ct-events-anchor { margin: 6px 0 0; font-size: 14px; color: var(--ink-faint); }
.ct-events-anchor .mono { font-family: 'JetBrains Mono', ui-monospace, monospace; color: var(--oxblood); font-weight: 500; }

.ct-eventlist {
  list-style: none;
  padding: 0;
  margin: 22px 0 0;
  border-left: 1px solid var(--rule);
  padding-left: 0;
}
.ct-event {
  display: grid;
  grid-template-columns: 56px 1fr;
  align-items: baseline;
  gap: 14px;
  padding: 6px 0 6px 18px;
  margin-left: -1px;
  border-left: 2px solid transparent;
  transition: border-color 0.15s, color 0.15s;
  cursor: pointer;
}
.ct-event:hover { border-left-color: var(--rule); }
.ct-event.active {
  border-left-color: var(--oxblood);
}
.ct-event.active .ct-event-year { color: var(--oxblood); }
.ct-event.active .ct-event-label { color: var(--ink); }
.ct-event-dot {
  position: absolute;
  width: 10px; height: 10px;
  margin-left: -23px;
  border: 1.5px solid var(--ink-faint);
  background: var(--paper);
  border-radius: 50%;
}
.ct-event.active .ct-event-dot {
  background: var(--oxblood);
  border-color: var(--oxblood);
}
.ct-event-year {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 13px;
  color: var(--ink-faint);
  letter-spacing: 0.02em;
  transition: color 0.15s;
}
.ct-event-label {
  font-family: 'Cormorant Garamond', Garamond, serif;
  font-style: italic;
  font-size: 19px;
  color: var(--ink-faint);
  line-height: 1.35;
  transition: color 0.15s;
}

/* --- genealogy SVG --- */
.ct-genealogy svg {
  width: 100%;
  height: auto;
  margin-top: 18px;
  background: var(--card);
  border: 1px solid var(--rule);
  padding: 14px;
  border-radius: 4px;
  box-sizing: border-box;
}

/* ============================================================
   § 03 — Witness / apparatus hotspot reader
   Three-column grid: witnesses · plate · apparatus key.
   Hover any hotspot or key item — both highlight.
   Added 2026-05-23.
   ============================================================ */

#witness-reader .wr-grid {
  display: grid;
  grid-template-columns: 240px 1fr 340px;
  gap: 28px;
  align-items: start;
  margin: 22px 0 28px;
}
@media (max-width: 1100px) {
  #witness-reader .wr-grid { grid-template-columns: 200px 1fr; }
  #witness-reader .wr-key { grid-column: 1 / -1; }
}
@media (max-width: 700px) {
  #witness-reader .wr-grid { grid-template-columns: 1fr; }
}

/* --- witness picker --- */
.wr-witnesses {
  list-style: none;
  padding: 0;
  margin: 0;
}
.wr-witness {
  padding: 14px 14px 14px 16px;
  margin: 0 0 8px;
  background: transparent;
  border: 1px solid transparent;
  border-left: 2px solid var(--rule);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  border-radius: 0 3px 3px 0;
}
.wr-witness:hover { background: #f3ead4; }
.wr-witness.active {
  background: var(--card);
  border-color: var(--rule);
  border-left-color: var(--oxblood);
}
.wr-witness .ref {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 12px;
  color: var(--ink-faint);
  letter-spacing: 0.02em;
  display: block;
  margin-bottom: 4px;
}
.wr-witness .wname {
  font-family: 'Cormorant Garamond', Garamond, serif;
  font-style: italic;
  font-size: 18px;
  color: var(--ink);
  line-height: 1.25;
  display: block;
}
.wr-witness .wdate {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11.5px;
  color: var(--ink-faint);
  margin-top: 4px;
  display: block;
}

/* --- plate (image + hotspots) --- */
.wr-plate { min-width: 0; }
.wr-plate-wrap {
  position: relative;
  background: var(--paper-deep);
  border: 1px solid var(--rule);
  padding: 6px;
  border-radius: 4px;
  display: block;
}
.wr-plate-wrap img {
  width: 100%;
  height: auto;
  display: block;
  border: 1px solid var(--rule-soft);
}
.wr-hotspots {
  position: absolute;
  inset: 6px;
  pointer-events: none;
}
.wr-hot {
  position: absolute;
  width: 30px; height: 30px;
  margin-left: -15px; margin-top: -15px;
  border-radius: 50%;
  background: rgba(251,248,239,0.92);
  border: 1.5px solid var(--oxblood);
  color: var(--oxblood);
  font-family: 'EB Garamond', Garamond, serif;
  font-style: italic;
  font-size: 16px;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  pointer-events: auto;
  transition: transform 0.12s, background 0.12s, color 0.12s, box-shadow 0.12s;
  box-shadow: 0 1px 4px rgba(0,0,0,0.15);
  z-index: 2;
}
.wr-hot:hover, .wr-hot.active {
  transform: scale(1.15);
  background: var(--oxblood);
  color: var(--paper);
  z-index: 3;
  box-shadow: 0 2px 8px rgba(122,46,26,0.35);
}
.wr-platecap {
  margin-top: 10px;
  font-family: 'Cormorant Garamond', Garamond, serif;
  font-style: italic;
  text-align: left;
}

/* --- apparatus key --- */
.wr-key {
  background: var(--card);
  border: 1px solid var(--rule);
  padding: 18px 22px;
  border-radius: 4px;
}
.wr-keylist {
  list-style: none;
  padding: 0;
  margin: 14px 0 0;
  counter-reset: wrkey;
}
.wr-keyitem {
  position: relative;
  padding: 10px 0 10px 38px;
  border-bottom: 1px solid var(--rule-soft);
  cursor: pointer;
  transition: background 0.12s;
}
.wr-keyitem:last-child { border-bottom: 0; }
.wr-keyitem::before {
  counter-increment: wrkey;
  content: counter(wrkey);
  position: absolute;
  left: 0; top: 12px;
  width: 24px; height: 24px;
  border: 1px solid var(--rule);
  border-radius: 50%;
  font-family: 'EB Garamond', Garamond, serif;
  font-style: italic;
  font-size: 14px;
  color: var(--ink-faint);
  display: flex; align-items: center; justify-content: center;
  background: var(--paper);
  transition: background 0.12s, color 0.12s, border-color 0.12s;
}
.wr-keyitem:hover, .wr-keyitem.active {
  background: rgba(243,234,212,0.5);
}
.wr-keyitem.active::before, .wr-keyitem:hover::before {
  background: var(--oxblood);
  color: var(--paper);
  border-color: var(--oxblood);
}
.wr-keyitem .label {
  font-family: 'Cormorant Garamond', Garamond, serif;
  font-style: italic;
  font-size: 18px;
  color: var(--ink);
  display: block;
  margin-bottom: 4px;
  line-height: 1.25;
}
.wr-keyitem .desc {
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.5;
}

/* --- substrate-attestation blocks in the apparatus key panel --- */
.wr-keymeta {
  list-style: none;
  padding: 14px 0 4px;
  margin-top: 14px;
  border-top: 1px solid var(--rule);
}
.wr-keymeta::before { display: none; content: none; }
.wr-keymeta .mono-kicker {
  display: block;
  margin-bottom: 10px;
}
.wr-keymeta ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.wr-keymeta ul li {
  padding: 6px 0;
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--ink);
  border-bottom: 1px dotted var(--rule-soft);
}
.wr-keymeta ul li:last-child { border-bottom: 0; }
.wr-keymeta .desc {
  font-size: 13.5px;
  color: var(--ink-soft);
}
.wr-keymeta code {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 12.5px;
  background: var(--paper-deep);
  padding: 1px 6px;
  border-radius: 2px;
  color: var(--oxblood);
}
.wr-keymeta .wr-cmp {
  margin: 0;
  font-family: 'Cormorant Garamond', Garamond, serif;
  font-style: italic;
  font-size: 16px;
  color: var(--ink);
  background: rgba(176,128,53,0.08);
  padding: 8px 12px;
  border-left: 2px solid var(--gold);
}
