/* CHI brand palette — from concordiahistoricalinstitute.org child theme:
   navy #252d40 (structure), red #e02928 (links/logo), lavender #978fbb
   (secondary accents). Fonts per their site: Roboto Condensed headings,
   Open Sans body, Lora serif for reading text. */
:root {
  --chi-navy: #252d40; --chi-red: #e02928; --chi-lavender: #978fbb;
  --ink: #252d40; --paper: #f6f6f8; --card: #ffffff; --line: #d9dbe3;
  --muted: #5d6373; --mark: #f5e08a;
  --heading-font: 'Roboto Condensed', 'Arial Narrow', sans-serif;
  --ui-font: 'Open Sans', Arial, Helvetica, sans-serif;
  --reading-font: 'Lora', Georgia, 'Times New Roman', serif;
}
* { box-sizing: border-box; }
body {
  margin: 0; color: var(--ink); background: var(--paper);
  font: 15px/1.6 var(--ui-font);
}
h1, h2, h3 { font-family: var(--heading-font); letter-spacing: .01em;
  color: var(--chi-navy); }
a { color: var(--chi-red); }
.site-header {
  display: flex; align-items: center; gap: 1.2rem; flex-wrap: wrap;
  padding: .7rem 1.2rem; background: var(--card);
  border-bottom: 3px solid var(--chi-navy);
}
.brand { display: flex; align-items: center; gap: .8rem;
  text-decoration: none; color: var(--chi-navy); }
.brand img { height: 44px; width: auto; display: block; }
.brand .brand-sub {
  font-family: var(--heading-font); font-size: 1.15rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .06em; color: var(--chi-navy);
  border-left: 2px solid var(--line); padding-left: .8rem;
}
.quick-search { margin-left: auto; display: flex; gap: .4rem; }
.quick-search input { padding: .4rem .6rem; border: 1px solid var(--line);
  min-width: 240px; font: inherit; }
button { font: 700 .85rem/1.4 var(--heading-font); text-transform: uppercase;
  letter-spacing: .05em; padding: .45rem 1rem; background: var(--chi-navy);
  color: #fff; border: 0; cursor: pointer; }
button:hover { background: var(--chi-red); }
main { max-width: 1500px; margin: 0 auto; padding: 1.2rem; }
.site-footer { padding: 1rem 1.2rem; color: var(--muted); font-size: .85rem;
  border-top: 3px solid var(--chi-navy); margin-top: 2rem;
  background: var(--card); }

.pub-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px,1fr));
  gap: 1rem; }
.card { background: var(--card); border: 1px solid var(--line);
  border-top: 3px solid var(--chi-navy); padding: 1rem 1.2rem; }
.card h3 { margin: .1rem 0 .3rem; }
.series-note { color: var(--muted); font-size: .9rem; }

/* The dated chain under a showcase item that covers a run of years rather
   than a single page. Each line is one step, linked to its own page. */
.showcase-chain { list-style: none; margin: .7rem 0 .1rem; padding: 0 0 0 .8rem;
  border-left: 2px solid var(--line); color: var(--muted); font-size: .9rem; }
.showcase-chain li { margin: .3rem 0; }
.showcase-chain a { font-family: var(--heading-font); font-weight: 700;
  white-space: nowrap; }
.badge { display: inline-block; font-size: .7rem; letter-spacing: .05em;
  padding: .12rem .5rem; border: 1px solid var(--line); border-radius: 2px;
  background: #eef0f4; color: var(--chi-navy); text-transform: uppercase;
  font-family: var(--heading-font); font-weight: 700; }
.badge.human { background: #e2ede2; border-color: #b8d2b8; color: #2c522c; }
.badge.machine { background: #fdeaea; border-color: #f0bcbc; color: #a01f1f; }
.badge.place { background: var(--chi-navy); border-color: var(--chi-navy);
  color: #fff; }

table.inventory { border-collapse: collapse; width: 100%; background: var(--card); }
.inventory th, .inventory td { border: 1px solid var(--line); padding: .45rem .7rem;
  text-align: left; }
.inventory th { background: var(--chi-navy); color: #fff;
  font-family: var(--heading-font); font-size: .78rem;
  text-transform: uppercase; letter-spacing: .06em; font-weight: 700; }
.gap { color: var(--chi-red); font-weight: 600; }

/* page viewer */
.viewer-grid { display: grid; grid-template-columns: minmax(380px, 1.15fr) 1fr 1fr;
  gap: 1rem; align-items: start; }
/* A monolingual publication (the LCMS convention volumes) has one text panel,
   not a German/English pair, so the scan takes the room the absent panel
   would have had rather than leaving a gap where it used to be. */
.viewer-grid.single-text { grid-template-columns: minmax(380px, 1.3fr) 1fr; }
@media (max-width: 1100px) { .viewer-grid { grid-template-columns: 1fr; }
  .viewer-grid.single-text { grid-template-columns: 1fr; } }
#seadragon { height: 78vh; background: var(--chi-navy); border: 1px solid var(--line); }
.text-panel { background: var(--card); border: 1px solid var(--line);
  border-top: 3px solid var(--chi-navy);
  height: 78vh; overflow-y: auto; padding: 1rem 1.2rem; }
.text-panel h2 { margin-top: 0; font-size: 1rem; display: flex; gap: .6rem;
  align-items: center; flex-wrap: wrap; }
.text-panel pre { white-space: pre-wrap; margin: 0;
  font: 1.02rem/1.65 var(--reading-font); }
.pager { display: flex; gap: .35rem; flex-wrap: wrap; margin: .8rem 0; }
.pager a, .pager span.cur { padding: .15rem .6rem; border: 1px solid var(--line);
  text-decoration: none; font-family: var(--heading-font); font-weight: 700; }
.pager span.cur { background: var(--chi-red); border-color: var(--chi-red);
  color: #fff; }

mark { background: var(--mark); padding: 0 .1em; }
.hit { margin-bottom: 1rem; }
.hit .cite { color: var(--muted); font-size: .88rem; }
.crumbs { color: var(--muted); font-size: .9rem; margin-bottom: .6rem; }
.crumbs a { color: inherit; }

/* English gloss under a German article title in the issue Contents table.
   The German is the record; the gloss is a finding aid, so it reads as
   secondary — same reason /articles labels the index AI-proposed. */
.title-en {
  display: block;
  font-size: 0.88em;
  color: var(--muted);
  font-style: italic;
  margin-top: 0.15em;
}

/* ---- /curiosities: documented oddities found while correcting the scans.
   A reading page, not a browsing page, so it takes a narrow measure inside
   the wide `main` the catalog views use. */
.cur-toc, .cur-item, .cur-foot, .cur-intro { max-width: 46rem; }
.cur-item { margin: 0 0 2.4rem; }
.cur-item h2 { margin: 0 0 .2rem; font-size: 1.35rem; }
.cur-item h3 { margin: 1.4rem 0 .3rem; font-size: 1rem;
  text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.cur-item p { max-width: 46rem; }
.cur-dek { margin: 0 0 .9rem; color: var(--muted);
  font: italic 1.05rem/1.5 var(--reading-font); }

.cur-toc { background: var(--card); border: 1px solid var(--line);
  border-top: 3px solid var(--chi-navy); padding: .8rem 1.2rem;
  margin: 1.4rem 0 2rem; }
.cur-toc ol { margin: 0; padding-left: 1.2rem; }
.cur-toc li { margin: .2rem 0; }
.cur-toc a { text-decoration: none; }
.cur-toc a:hover { text-decoration: underline; }

/* The German is the record; the translation is the finding aid. Same
   hierarchy as .title-en on the issue Contents table. */
.cur-quote { margin: 1rem 0; padding: .7rem 0 .7rem 1.1rem;
  border-left: 3px solid var(--chi-lavender); }
.cur-quote p { margin: 0; }
.cur-de { font: 1.02rem/1.6 var(--reading-font); }
.cur-en { margin-top: .5rem !important; color: var(--muted);
  font: italic 1.02rem/1.55 var(--reading-font); }
.cur-src { margin-top: .5rem !important; color: var(--muted);
  font-size: .85rem; }
.cur-cite { color: var(--muted); font-size: .88rem; white-space: nowrap; }

.cur-tablewrap { overflow-x: auto; max-width: 46rem; margin: 1rem 0; }
.cur-table { border-collapse: collapse; background: var(--card); width: 100%; }
.cur-table th, .cur-table td { border: 1px solid var(--line);
  padding: .4rem .7rem; text-align: left; }
.cur-table th { background: var(--chi-navy); color: #fff;
  font-family: var(--heading-font); font-size: .78rem;
  text-transform: uppercase; letter-spacing: .04em; }
.cur-table td:last-child { font-family: var(--reading-font); }

.cur-foot { border-top: 1px solid var(--line); padding-top: .9rem;
  margin-top: 2.5rem; }

/* ---- /register: the journal's own cumulative subject index, made clickable. */
.reg-intro, .reg-foot { max-width: 46rem; }
.reg-filter { display: flex; gap: .5rem; align-items: center; margin: 1.2rem 0; }
.reg-filter input { padding: .45rem .7rem; border: 1px solid var(--line);
  min-width: min(28rem, 70vw); font: inherit; }
.reg-clear { font-size: .85rem; }
.reg-block { margin: 2rem 0; }
.reg-block h2 { margin: 0 0 .2rem; font-size: 1.2rem; }
.reg-title { margin: 0; font: 1rem/1.4 var(--reading-font); }
.reg-credit { margin: .3rem 0 1rem; color: var(--muted);
  font: italic .9rem/1.45 var(--reading-font); max-width: 46rem; }
/* Two columns of short entries read far better than one long ribbon. */
.reg-list { columns: 2 22rem; column-gap: 2.5rem; margin: 0; }
.reg-list dt { break-inside: avoid; font-weight: 600; margin-top: .5rem;
  font-family: var(--reading-font); }
.reg-list dd { break-inside: avoid; margin: 0 0 .1rem; font-size: .92rem; }
.reg-sub { font-weight: 400; color: var(--muted); font-style: italic; }
.reg-dead { color: var(--muted); text-decoration: line-through dotted; }
@media (max-width: 640px) { .reg-list { columns: 1; } }

/* ---- /lexikon: Eckhardt's Homiletisches Reallexikon (1907), made clickable.
   Shares .reg-filter and .reg-dead with /register on purpose — a dead
   citation must look the same wherever the archive shows one. */
.lex-intro, .lex-foot, .lex-counts { max-width: 46rem; }
.lex-counts { margin-bottom: .2rem; }

/* Letter bar. A letter with no headwords is not a link and says why on hover:
   the M–S volume is not held, and silently omitting those letters would look
   like Eckhardt had no entries there. */
.lex-bar { display: flex; flex-wrap: wrap; gap: .25rem; align-items: center;
  margin: 1.4rem 0 1.6rem; }
.lex-bar a, .lex-bar span.lex-bar-none {
  font-family: var(--heading-font); font-weight: 700; font-size: .95rem;
  padding: .1rem .55rem; border: 1px solid var(--line); text-decoration: none;
  background: var(--card); }
.lex-bar a.cur { background: var(--chi-red); border-color: var(--chi-red);
  color: #fff; }
.lex-bar span.lex-bar-none { color: var(--line); background: transparent;
  border-color: transparent; }
.lex-bar .reg-clear { margin-left: .6rem; font-family: var(--ui-font);
  font-weight: 400; border: 0; }

.lex-letter { margin: 1.6rem 0; }
.lex-letter h2 { margin: 0 0 .4rem; font-size: 1.1rem; color: var(--chi-red);
  border-bottom: 1px solid var(--line); }
.lex-heads { columns: 4 15rem; column-gap: 2rem; list-style: none;
  margin: 0; padding: 0; }
.lex-heads li { break-inside: avoid; margin: .1rem 0;
  font-family: var(--reading-font); }
.lex-n { color: var(--muted); font-family: var(--ui-font); font-size: .8rem; }

.lex-group { margin: 2rem 0; }
.lex-group h2 { margin: 0 0 .5rem; font-size: 1.3rem;
  border-bottom: 2px solid var(--chi-navy); padding-bottom: .2rem; }
.lex-group h2 a { text-decoration: none; color: inherit; }

.lex-entry { background: var(--card); border: 1px solid var(--line);
  border-left: 3px solid var(--chi-lavender); padding: .8rem 1.1rem;
  margin: 0 0 .9rem; }
.lex-entry h3 { margin: 0 0 .4rem; font-size: 1.02rem; }
.lex-no { color: var(--chi-red); }
.lex-de { margin: 0; font: 1.02rem/1.6 var(--reading-font);
  white-space: pre-wrap; max-width: 46rem; }

/* The German is the record; the translation is the finding aid — same
   hierarchy as .title-en and .cur-en elsewhere on the site. */
.lex-en { margin: .7rem 0 0; padding-left: .9rem;
  border-left: 3px solid var(--line); max-width: 46rem; }
.lex-en p { margin: 0; font: 1.0rem/1.55 var(--reading-font);
  color: var(--muted); }
.lex-en-label { margin: 0 0 .25rem !important; }

.lex-refs { list-style: none; display: flex; flex-wrap: wrap; gap: .35rem .9rem;
  margin: .7rem 0 0; padding: 0; font-size: .92rem; }
.lex-refs li { display: flex; align-items: baseline; gap: .25rem; }
.lex-ref { white-space: nowrap; font-family: var(--reading-font); }
.lex-where { font-size: .68rem; text-transform: uppercase; letter-spacing: .05em;
  color: var(--muted); font-family: var(--heading-font); }
.lex-unparsed { color: var(--muted); font-style: italic;
  border-bottom: 1px dotted var(--chi-red); }
.lex-norefs { margin: .6rem 0 0; }
.lex-src { margin: .6rem 0 0; color: var(--muted); font-size: .78rem; }
.lex-foot { border-top: 1px solid var(--line); padding-top: .9rem;
  margin-top: 2.5rem; color: var(--muted); font-size: .9rem; }
@media (max-width: 640px) { .lex-heads { columns: 1; } }

/* The article a cited page falls inside, shown after the citation on
   /lexikon. Secondary to the citation itself: the volume-and-page reference
   is Eckhardt's, the article title is our AI-proposed index. */
.lex-art { color: var(--muted); font-size: .85rem; font-style: italic;
  text-decoration: none; }
.lex-art:hover { text-decoration: underline; }

/* The reverse note on /page: which Reallexikon entries cite this page. Sits
   at the top of the German panel in the site's muted-note voice. */
.lex-cited { margin: 0 0 .7rem; padding: .45rem .7rem;
  background: #eef0f4; border-left: 3px solid var(--chi-lavender); }
.lex-cited a { font-family: var(--reading-font); }
.lex-section-head { margin: 1.4rem 0 .3rem; font-size: 1.25rem;
  border-bottom: 2px solid var(--chi-navy); padding-bottom: .2rem; }

/* ---- /essays: finished pieces written from the archive. A reading page,
   same narrow measure as /curiosities. Links into the archive (/page/N) are
   the point of hosting them here, so they stay visibly red. */
.essay-intro, .essay-card, .essay { max-width: 46rem; }
.essay-card { background: var(--card); border: 1px solid var(--line);
  border-top: 3px solid var(--chi-navy); padding: .9rem 1.2rem; margin: 1.2rem 0; }
.essay-card h2 { margin: 0 0 .2rem; font-size: 1.3rem; }
.essay-card h2 a { text-decoration: none; color: var(--chi-navy); }
.essay-card h2 a:hover { color: var(--chi-red); }
.essay h1 { margin-bottom: .2rem; }
.essay-sub { margin: 0 0 .3rem; font: 1.15rem/1.4 var(--reading-font); color: var(--ink); }
.essay-meta { margin: 0 0 .6rem; color: var(--muted); font-size: .9rem; }
.essay-links { margin: 0 0 1.2rem; font-size: .92rem; font-weight: 600; }
.essay-links a { text-decoration: none; }
.essay-dek { color: var(--muted); font: italic 1.05rem/1.5 var(--reading-font); }
.essay-body { font: 1.05rem/1.65 var(--reading-font); }
.essay-body h2 { font-size: 1.25rem; margin: 2rem 0 .5rem; }
.essay-body blockquote { margin: 1rem 0; padding: .4rem 0 .4rem 1.1rem;
  border-left: 3px solid var(--chi-lavender); }
.essay-body figure { margin: 1.6rem 0; }
.essay-body figure img { max-width: 100%; height: auto; display: block;
  border: 1px solid var(--line); background: #fff; }
.essay-body figcaption { font: .88rem/1.45 var(--ui-font); color: var(--muted); margin-top: .4rem; }
.essay-body table { border-collapse: collapse; font: .9rem/1.4 var(--ui-font); width: 100%; margin: 1rem 0; }
.essay-body th, .essay-body td { border-bottom: 1px solid var(--line); padding: .35rem .5rem;
  text-align: left; vertical-align: top; }
.essay-body th { background: var(--chi-navy); color: #fff; }
.essay-tablewrap { overflow-x: auto; }
.essay-colophon { margin-top: 2rem; padding-top: .8rem; border-top: 1px solid var(--line);
  color: var(--muted); font-size: .88rem; }
