/* ============================================================
   Aaron Voitus — house style
   EB Garamond + Archivo Narrow; bone paper, iron-gall ink,
   oxblood accent. Feszty panorama as ground.
   ============================================================ */

:root {
  --ground:      #E5E3DB;
  --surface:     #EFEDE6;
  --ink:         #292620;
  --ink-soft:    #4E4940;
  --ink-mute:    #77705F;
  --rule:        #C4BFB1;
  --rule-faint:  #D3CFC3;
  --accent:      #7B2024;
  --accent-soft: #9A4B45;
  --hatch:       rgba(41, 38, 32, 0.055);
  --focus:       #7B2024;

  /* veils over the painting */
  --veil-flat:   rgba(229, 227, 219, 0.34);
  --veil-deep:   rgba(229, 227, 219, 0.93);
  --veil-mid:    rgba(229, 227, 219, 0.62);
  --band-veil:   rgba(229, 227, 219, 0.88);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ground:      #141310;
    --surface:     #1C1A16;
    --ink:         #E0DACC;
    --ink-soft:    #B5AE9D;
    --ink-mute:    #8B8373;
    --rule:        #37332B;
    --rule-faint:  #2B2822;
    --accent:      #C56B5F;
    --accent-soft: #D89183;
    --hatch:       rgba(224, 218, 204, 0.05);
    --focus:       #D89183;

    --veil-flat:   rgba(20, 19, 16, 0.56);
    --veil-deep:   rgba(20, 19, 16, 0.95);
    --veil-mid:    rgba(20, 19, 16, 0.74);
    --band-veil:   rgba(20, 19, 16, 0.9);
  }
}

:root[data-theme="dark"] {
  --ground:      #141310;
  --surface:     #1C1A16;
  --ink:         #E0DACC;
  --ink-soft:    #B5AE9D;
  --ink-mute:    #8B8373;
  --rule:        #37332B;
  --rule-faint:  #2B2822;
  --accent:      #C56B5F;
  --accent-soft: #D89183;
  --hatch:       rgba(224, 218, 204, 0.05);
  --focus:       #D89183;

  --veil-flat:   rgba(20, 19, 16, 0.56);
  --veil-deep:   rgba(20, 19, 16, 0.95);
  --veil-mid:    rgba(20, 19, 16, 0.74);
  --band-veil:   rgba(20, 19, 16, 0.9);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: "EB Garamond", Garamond, "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  font-size: 19px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  font-variant-numeric: oldstyle-nums;
}

img { max-width: 100%; }

.wrap {
  max-width: 61rem;
  margin: 0 auto;
  padding-left: 28px;
  padding-right: 28px;
}

@media (max-width: 560px) {
  body { font-size: 18px; }
  .wrap { padding-left: 18px; padding-right: 18px; }
}

/* ---------- utility face ---------- */
.label {
  font-family: "Archivo Narrow", "Helvetica Neue", Arial, sans-serif;
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-variant-numeric: tabular-nums;
}

.muted { color: var(--ink-mute); }

a.plain {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
a.plain:hover { color: var(--accent-soft); }

:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }

/* ============================================================
   HOME
   ============================================================ */

.hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  flex-direction: column;
  isolation: isolate;
  background-image: url("feszty.jpg");
  background-size: cover;
  background-position: 58% 28%;
  background-repeat: no-repeat;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(to bottom,
      var(--veil-mid) 0%,
      var(--veil-flat) 22%,
      var(--veil-flat) 40%,
      var(--veil-mid) 66%,
      var(--veil-deep) 92%);
}

.hero-inner {
  /* auto side margins on a column flex item suppress stretch, so the wrapper
     would otherwise size to its content instead of the 61rem measure. */
  width: 100%;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 48px;
  padding-block: 26px 34px;
}

.wordmark {
  font-family: "Archivo Narrow", Arial, sans-serif;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
  align-self: flex-start;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  gap: 22px;
  max-width: 40rem;
}

h1.motto {
  font-size: clamp(2.6rem, 8.6vw, 5.4rem);
  font-weight: 500;
  line-height: 1.0;
  letter-spacing: -0.014em;
  margin: 0;
  text-wrap: balance;
}

.gloss { display: flex; flex-direction: column; gap: 6px; }

.gloss .translation {
  font-size: 1.12rem;
  font-style: italic;
  color: var(--ink-soft);
  margin: 0;
}

.gloss .attribution { color: var(--ink-mute); margin: 0; }

.standfirst {
  max-width: 31rem;
  font-size: 1.06rem;
  color: var(--ink-soft);
  margin: 0;
}

/* index of sections, as a ruled register.
   auto-fit so the row holds four, five or more entries without rewriting rules;
   each entry carries its own rule above it rather than a divider between. */
.index-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 0 26px;
}

.index-list a {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 15px 0 18px;
  border-top: 1px solid var(--rule);
  text-decoration: none;
  color: var(--ink);
  transition: color 140ms ease;
}

.index-list a .num { color: var(--accent); }
.index-list a .name { font-size: 1.1rem; line-height: 1.22; }
.index-list a .note { font-size: 0.88rem; color: var(--ink-mute); line-height: 1.3; }
.index-list a:hover .name { color: var(--accent); }

@media (max-width: 560px) {
  .index-list { grid-template-columns: 1fr; }
  .index-list a { border-top: none; border-bottom: 1px solid var(--rule-faint); }
  .index-list a:first-child { border-top: 1px solid var(--rule); }
  .hero { min-height: auto; }
  .hero-inner { gap: 36px; padding-block: 22px 30px; min-height: 86vh; }
}

/* ============================================================
   SECTION PAGES
   ============================================================ */

.page-band {
  position: relative;
  background-image: url("feszty-band.jpg");
  background-size: cover;
  background-position: center 42%;
  border-bottom: 1px solid var(--rule);
  isolation: isolate;
}

.page-band::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(to bottom,
    var(--veil-mid) 0%,
    var(--veil-flat) 34%,
    var(--veil-mid) 70%,
    var(--band-veil) 100%);
}

.band-inner {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 60px;
  min-height: 300px;
  padding-block: 22px 26px;
}

.topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px 26px;
}

nav.sections { display: flex; flex-wrap: wrap; gap: 4px 22px; }

nav.sections a {
  font-family: "Archivo Narrow", Arial, sans-serif;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--ink-mute);
  text-decoration: none;
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
  transition: color 140ms ease, border-color 140ms ease;
}

nav.sections a:hover,
nav.sections a:focus-visible { color: var(--accent); border-bottom-color: var(--accent); }
nav.sections a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--accent); }

.band-title { display: flex; flex-direction: column; gap: 10px; max-width: 40rem; }

.band-title .eyebrow { color: var(--accent); }

.band-title h1 {
  font-size: clamp(2.1rem, 6vw, 3.5rem);
  font-weight: 500;
  line-height: 1.04;
  letter-spacing: -0.012em;
  margin: 0;
  text-wrap: balance;
}

.band-title h1 .hu {
  display: block;
  font-size: 0.9rem;
  font-style: italic;
  color: var(--ink-mute);
  letter-spacing: 0;
  margin-top: 8px;
}

/* --- body of a section page --- */
main { padding-block: 0; }

.lede {
  padding-block: 44px 12px;
  font-size: 1.2rem;
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 36rem;
  margin: 0;
}

.block {
  display: grid;
  grid-template-columns: 9.5rem 1fr;
  gap: 0 40px;
  padding-block: 40px;
  border-bottom: 1px solid var(--rule-faint);
  align-items: start;
}

.block:last-of-type { border-bottom: 1px solid var(--rule); }

.margin-col {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-top: 9px;
}

.margin-col .label { color: var(--ink-mute); }

.numeral {
  font-size: 1.05rem;
  color: var(--accent);
  letter-spacing: 0.08em;
}

.meta-pair { display: flex; flex-direction: column; gap: 2px; }

.meta-pair dt {
  font-family: "Archivo Narrow", Arial, sans-serif;
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin: 0;
}

.meta-pair dd {
  margin: 0;
  font-size: 0.94rem;
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
  line-height: 1.35;
}

.block-body { display: flex; flex-direction: column; gap: 16px; }

.block-body h2 {
  font-size: clamp(1.4rem, 3.2vw, 1.8rem);
  font-weight: 500;
  line-height: 1.16;
  margin: 0;
  text-wrap: balance;
}

.block-body h3 {
  font-family: "Archivo Narrow", Arial, sans-serif;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin: 0;
}

.block-body p { margin: 0; max-width: 36rem; }

.pull {
  border-left: 2px solid var(--accent);
  padding-left: 18px;
  font-style: italic;
  color: var(--ink-soft);
  max-width: 32rem;
}

/* ordered/unordered prose lists */
.plainlist {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 36rem;
}

.plainlist li {
  display: grid;
  grid-template-columns: 6.5rem 1fr;
  gap: 18px;
  align-items: baseline;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--rule-faint);
}

.plainlist li:last-child { border-bottom: none; padding-bottom: 0; }
.plainlist li > .label { color: var(--ink-mute); }
.plainlist li > span:last-child { color: var(--ink-soft); }

/* --- specimen catalogue record --- */
.specimen {
  background: var(--surface);
  border: 1px solid var(--rule);
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 36rem;
}

.specimen-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 10px;
}

.specimen-head .label:first-child { color: var(--accent); }
.specimen-head .shelfmark { color: var(--ink-mute); }

.record {
  display: grid;
  grid-template-columns: 7.5rem 1fr;
  gap: 9px 20px;
  margin: 0;
}

.record dt {
  font-family: "Archivo Narrow", Arial, sans-serif;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-mute);
  padding-top: 5px;
  margin: 0;
}

.record dd { margin: 0; font-size: 0.98rem; color: var(--ink-soft); line-height: 1.45; }
.record dd em { color: var(--ink-mute); }

.specimen-note {
  font-size: 0.9rem;
  font-style: italic;
  color: var(--ink-mute);
  margin: 0;
  border-top: 1px dashed var(--rule);
  padding-top: 12px;
}

/* ============================================================
   FOOTER
   ============================================================ */

footer.colophon {
  display: grid;
  grid-template-columns: 9.5rem 1fr;
  gap: 0 40px;
  align-items: start;
  padding-block: 42px 60px;
}

.colophon-body { display: flex; flex-direction: column; gap: 16px; max-width: 34rem; }
.colophon-body p { margin: 0; font-size: 0.98rem; color: var(--ink-soft); }

.theme-toggle {
  font-family: "Archivo Narrow", Arial, sans-serif;
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  background: transparent;
  color: var(--ink-mute);
  border: 1px solid var(--rule);
  padding: 7px 13px;
  cursor: pointer;
  align-self: flex-start;
  transition: color 140ms ease, border-color 140ms ease;
}

.theme-toggle:hover { color: var(--accent); border-color: var(--accent); }

.home-return {
  padding-block: 0 0;
  border-top: 1px solid var(--rule-faint);
}

@media (max-width: 720px) {
  .block,
  footer.colophon {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .margin-col {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 10px 26px;
    padding-top: 0;
    align-items: baseline;
  }
  .record { grid-template-columns: 1fr; gap: 3px; }
  .record dt { padding-top: 8px; }
  .plainlist li { grid-template-columns: 1fr; gap: 4px; }
  .band-inner { min-height: 240px; gap: 44px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* ============================================================
   BOOK PAGE — cover, purchase, author portrait
   ============================================================ */

.book-layout {
  display: grid;
  grid-template-columns: minmax(0, 15rem) minmax(0, 1fr);
  gap: 36px 44px;
  align-items: start;
  max-width: 44rem;
}

.cover-figure { margin: 0; display: flex; flex-direction: column; gap: 10px; }

.cover-figure img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--rule);
  box-shadow: 0 2px 3px rgba(0,0,0,0.10), 0 14px 32px rgba(0,0,0,0.16);
}

.cover-figure figcaption {
  display: flex;
  flex-direction: column;
  gap: 5px;
  color: var(--ink-mute);
}

.cover-figure figcaption .label { color: var(--ink-mute); font-size: 0.6rem; }

.credit {
  font-size: 0.86rem;
  font-style: italic;
  line-height: 1.45;
  color: var(--ink-mute);
}

.credit em { font-style: normal; }

.book-details { display: flex; flex-direction: column; gap: 20px; }

.book-details .book-title {
  font-size: clamp(1.5rem, 3.4vw, 1.95rem);
  font-weight: 500;
  line-height: 1.14;
  margin: 0;
}

.book-details .book-sub {
  margin: 6px 0 0;
  font-style: italic;
  color: var(--ink-soft);
  font-size: 1.04rem;
  line-height: 1.4;
}

.spec {
  display: grid;
  grid-template-columns: 6.5rem 1fr;
  gap: 8px 20px;
  margin: 0;
  padding-top: 4px;
  border-top: 1px solid var(--rule-faint);
}

.spec dt {
  font-family: "Archivo Narrow", Arial, sans-serif;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-mute);
  padding-top: 6px;
  margin: 0;
}

.spec dd { margin: 0; font-size: 0.98rem; color: var(--ink-soft); line-height: 1.42; }

a.buy {
  display: inline-flex;
  align-items: baseline;
  gap: 12px;
  align-self: flex-start;
  font-family: "Archivo Narrow", Arial, sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ground);
  background: var(--accent);
  border: 1px solid var(--accent);
  padding: 12px 20px;
  transition: background 140ms ease, color 140ms ease;
}

a.buy:hover { background: transparent; color: var(--accent); }
a.buy .arrow { font-family: "EB Garamond", Garamond, serif; font-size: 0.95rem; letter-spacing: 0; }

/* author */
.author-layout {
  display: grid;
  grid-template-columns: minmax(0, 13rem) minmax(0, 1fr);
  gap: 28px 40px;
  align-items: start;
  max-width: 44rem;
}

.portrait-figure { margin: 0; display: flex; flex-direction: column; gap: 10px; }

.portrait-figure img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--rule);
  filter: saturate(0.92);
}

.portrait-figure figcaption {
  font-family: "Archivo Narrow", Arial, sans-serif;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--ink-mute);
  line-height: 1.5;
}

.author-text { display: flex; flex-direction: column; gap: 14px; }
.author-text p { margin: 0; max-width: 34rem; }

.tofill { color: var(--ink-mute); font-style: italic; }

@media (max-width: 720px) {
  .book-layout,
  .author-layout { grid-template-columns: 1fr; gap: 24px; }
  .cover-figure { max-width: 17rem; }
  .portrait-figure { max-width: 14rem; }
}

/* ============================================================
   MANUSCRIPT PHOTOGRAPHS · PROCESS · METHOD NOTE
   ============================================================ */

.photo-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  max-width: 40rem;
}

.photo-figure { margin: 0; display: flex; flex-direction: column; gap: 8px; }

.photo-figure img {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 4;
  max-width: 100%;
  object-fit: cover;
  border: 1px solid var(--rule);
  filter: saturate(0.9);
}

.photo-figure figcaption {
  font-family: "Archivo Narrow", Arial, sans-serif;
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-mute);
  line-height: 1.45;
}

@media (max-width: 700px) { .photo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 380px) { .photo-grid { grid-template-columns: 1fr; } }

/* numbered process — the steps really are a sequence */
ol.steps {
  list-style: none;
  counter-reset: step;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  max-width: 36rem;
  border-top: 1px solid var(--rule-faint);
}

ol.steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 2.6rem 1fr;
  gap: 20px;
  padding-block: 15px;
  border-bottom: 1px solid var(--rule-faint);
  align-items: baseline;
}

ol.steps li::before {
  content: counter(step, decimal-leading-zero);
  font-family: "Archivo Narrow", Arial, sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

ol.steps li .step-name {
  display: block;
  font-family: "Archivo Narrow", Arial, sans-serif;
  font-size: 0.64rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-bottom: 3px;
}

ol.steps li .step-text { color: var(--ink-soft); font-size: 0.99rem; line-height: 1.5; }

.note-panel {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-left: 3px solid var(--accent);
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 36rem;
}

.note-panel .note-head {
  font-family: "Archivo Narrow", Arial, sans-serif;
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0;
}

.note-panel p { margin: 0; font-size: 0.99rem; color: var(--ink-soft); line-height: 1.55; }
.note-panel p strong { color: var(--ink); font-weight: 600; }

@media (max-width: 560px) {
  ol.steps li { grid-template-columns: 2.2rem 1fr; gap: 14px; }
}

/* ============================================================
   CATALOGUE PLATES
   ============================================================ */

.plate {
  display: grid;
  grid-template-columns: minmax(0, 17rem) minmax(0, 1fr);
  gap: 28px 40px;
  align-items: start;
  max-width: 44rem;
}

.plate-figure { margin: 0; display: flex; flex-direction: column; gap: 10px; }

.plate-figure img {
  display: block;
  width: 100%;
  height: auto;
  background: #fff;
  border: 1px solid var(--rule);
  box-shadow: 0 1px 2px rgba(0,0,0,0.08), 0 10px 24px rgba(0,0,0,0.10);
}

.plate-figure figcaption {
  font-family: "Archivo Narrow", Arial, sans-serif;
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-mute);
  line-height: 1.5;
}

.plate-text { display: flex; flex-direction: column; gap: 15px; }
.plate-text p { margin: 0; max-width: 34rem; }

.plate-title {
  font-size: clamp(1.3rem, 3vw, 1.65rem);
  font-weight: 500;
  line-height: 1.18;
  margin: 0;
}

.plate-sub {
  margin: 6px 0 0;
  font-style: italic;
  color: var(--ink-soft);
  font-size: 1rem;
  line-height: 1.42;
}

.inscription {
  border-left: 2px solid var(--rule);
  padding-left: 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-width: 32rem;
}

.inscription .latin { font-style: italic; font-size: 1.02rem; margin: 0; }
.inscription .gloss-en { font-size: 0.94rem; color: var(--ink-mute); margin: 0; }

@media (max-width: 720px) {
  .plate { grid-template-columns: 1fr; gap: 22px; }
  .plate-figure { max-width: 18rem; }
}

/* ============================================================
   LIGHTBOX — click any plate or photograph to enlarge
   Deliberately single-look: a dark room around the sheet, in
   either theme, so the paper is judged against a neutral ground.
   ============================================================ */

.zoomable { cursor: zoom-in; }

/* The [hidden] attribute is only display:none in the browser's own
   stylesheet, which any author rule outranks — so display:flex below would
   keep the overlay on screen after close(). This restores it explicitly. */
.lightbox[hidden] { display: none !important; }

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 32px 24px 26px;
  background: rgba(14, 13, 11, 0.94);
  cursor: zoom-out;
}

.lightbox img {
  display: block;
  max-width: min(100%, 1100px);
  max-height: 78vh;
  width: auto;
  height: auto;
  object-fit: contain;
  background: #F4F2EC;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.55);
  cursor: default;
}

.lightbox figure {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  max-width: 100%;
}

.lightbox figcaption {
  font-family: "EB Garamond", Garamond, Georgia, serif;
  font-size: 0.95rem;
  font-style: italic;
  line-height: 1.45;
  color: #CFC8B8;
  text-align: center;
  max-width: 34rem;
  cursor: default;
}

.lightbox-close {
  position: absolute;
  top: 16px;
  right: 18px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "EB Garamond", Garamond, Georgia, serif;
  font-size: 1.6rem;
  line-height: 1;
  color: #CFC8B8;
  background: transparent;
  border: 1px solid rgba(207, 200, 184, 0.35);
  cursor: pointer;
  transition: color 140ms ease, border-color 140ms ease;
}

.lightbox-close:hover { color: #F4F2EC; border-color: rgba(244, 242, 236, 0.8); }
.lightbox-close:focus-visible { outline: 2px solid #D89183; outline-offset: 3px; }

.lightbox-hint {
  font-family: "Archivo Narrow", Arial, sans-serif;
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(207, 200, 184, 0.55);
  cursor: default;
}

body.lightbox-open { overflow: hidden; }

@media (max-width: 560px) {
  .lightbox { padding: 56px 14px 20px; }
  .lightbox img { max-height: 70vh; }
}

/* two faces of one leaf, shown together */
.plate-duo {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  max-width: 34rem;
}

.plate-duo .plate-figure img { box-shadow: 0 1px 2px rgba(0,0,0,0.07), 0 6px 16px rgba(0,0,0,0.09); }

@media (max-width: 480px) { .plate-duo { grid-template-columns: 1fr; } }

/* a wide plate (a map) reads better above its text than beside it */
.plate-wide { grid-template-columns: 1fr; max-width: 38rem; }
.plate-wide .plate-figure { max-width: 100%; }

/* ============================================================
   TRAVELS — a place set beside its engraved view
   ============================================================ */

.then-now {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  align-items: start;
  max-width: 38rem;
}

.then-now .era {
  display: block;
  font-family: "EB Garamond", Garamond, Georgia, serif;
  font-size: 1rem;
  font-style: italic;
  color: var(--ink-soft);
  margin: 0 0 9px;
  padding-bottom: 7px;
  border-bottom: 1px solid var(--rule-faint);
}

.then-now > div { display: flex; flex-direction: column; }

.figure-wide { max-width: 38rem; }

@media (max-width: 560px) {
  .then-now { grid-template-columns: 1fr; }
}

/* ============================================================
   THE LETTER — a document that is a voice rather than an object.
   Deliberately breaks the register idiom used everywhere else on
   the site: book measure, no marginal metadata column, longer
   leading. The difference in treatment is itself information.
   ============================================================ */

.letter-intro {
  max-width: 34rem;
  padding-block: 40px 0;
}

.letter-intro p { margin: 0 0 14px; }

.lang-switch {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  align-items: baseline;
  margin: 30px 0 0;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--rule-faint);
  max-width: 32rem;
}

.lang-switch a { color: var(--accent); }
.lang-switch .current { color: var(--ink-mute); }

.content-note {
  border-left: 2px solid var(--accent);
  padding-left: 16px;
  margin: 34px 0 0;
  max-width: 32rem;
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--ink-mute);
}

.letter {
  max-width: 33rem;
  margin: 52px 0 64px;
}

.letter p {
  margin: 0 0 1.1em;
  font-size: 1.06rem;
  line-height: 1.74;
  text-align: justify;
  hyphens: auto;
  -webkit-hyphens: auto;
}

.letter .salutation {
  font-style: italic;
  font-size: 1.22rem;
  text-align: center;
  margin: 0 0 1.7em;
  hyphens: manual;
}

.letter .valediction {
  font-style: italic;
  text-align: left;
  margin: 2em 0 0.3em;
  hyphens: manual;
}

.letter .signature {
  font-size: 1.2rem;
  font-weight: 600;
  text-align: right;
  margin: 0;
  hyphens: manual;
}

/* the passages her own typewriter struck out — kept, not smoothed over */
.struck {
  font-style: italic;
  font-size: 0.88em;
  color: var(--ink-mute);
}

/* where one sheet of the original typescript ends and the next begins */
.leaf-break {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 2.1em 0;
}

.leaf-break::before,
.leaf-break::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--rule-faint);
}

.leaf-break .label { color: var(--ink-mute); white-space: nowrap; }

.letter-rule {
  width: 7rem;
  height: 1px;
  background: var(--rule);
  margin: 3em auto 2.2em;
}

.dream-head {
  font-family: "Archivo Narrow", Arial, sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-mute);
  text-align: center;
  margin: 0 0 1.4em;
}

.letter .dream { font-style: italic; }

.letter-end {
  text-align: center;
  font-style: italic;
  font-size: 0.92rem;
  color: var(--ink-mute);
  margin: 2.6em 0 0 !important;
  hyphens: manual;
}

/* the eight sheets, shown small and opened in the lightbox */
.sheet-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  max-width: 40rem;
}

.sheet-grid .plate-figure img { background: #fff; }

@media (max-width: 700px) { .sheet-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* justified text needs room; below this it does more harm than good */
@media (max-width: 560px) {
  .letter p { text-align: left; }
  .letter { margin-top: 40px; }
}
