/* Shared styles for the generated inner pages. The home page keeps its own inline styles. */
:root {
  color-scheme: light dark;
  --paper: #f1ede0; --paper-2: #e5dfcf; --ink: #0d2137; --muted: #53606b; --rule: #9ca09c;
  --accent: #df642f; --accent-ink: #101a24; --indigo: #0d2844; --chalk: #f6f1e4;
  --max: 68rem; --measure: 44rem;
  --serif: Georgia, "Times New Roman", serif;
  --sans: "Avenir Next", Avenir, "Helvetica Neue", Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root { --paper: #0c1c2e; --paper-2: #13283c; --ink: #f2eddf; --muted: #b9c1c5; --rule: #496071; --accent: #ec7740; --accent-ink: #0b1825; --indigo: #f2eddf; --chalk: #0c1c2e; }
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); line-height: 1.6; overflow-wrap: break-word; }
a { color: inherit; text-underline-offset: 0.18em; }
a:hover { color: var(--accent); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; line-height: 1.08; margin: 0; }
p { margin: 0 0 1rem; }
.skip-link { position: fixed; top: 1rem; left: 1rem; z-index: 20; transform: translateY(-180%); padding: 0.7rem 1rem; background: var(--accent); color: var(--accent-ink); font-weight: 800; }
.skip-link:focus { transform: translateY(0); }

.site-header { border-bottom: 1px solid var(--rule); }
.nav { width: min(100%, var(--max)); margin: 0 auto; padding: 0.9rem 1.25rem; display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.6rem 2rem; }
.wordmark { display: inline-flex; gap: 0.6rem; align-items: baseline; text-decoration: none; white-space: nowrap; }
.wordmark strong { font-family: var(--serif); font-size: 1.15rem; font-weight: 500; }
.wordmark span { font-size: 0.72rem; font-weight: 800; }
.nav-links { display: flex; flex-wrap: wrap; gap: 0.3rem 1.2rem; font-size: 0.82rem; font-weight: 800; }
.nav-links a { text-decoration: none; padding: 0.35rem 0; }
.nav-links a[aria-current] { box-shadow: 0 2px 0 var(--accent); }

main { width: min(100%, var(--max)); margin: 0 auto; padding: 1.5rem 1.25rem 4rem; }
main > *, article > * { max-width: var(--measure); }
article { max-width: none; }
.crumbs ol { list-style: none; margin: 0 0 2rem; padding: 0; display: flex; flex-wrap: wrap; gap: 0.3rem 0.5rem; font-size: 0.78rem; color: var(--muted); }
.crumbs li + li::before { content: "/"; margin-right: 0.5rem; }
.kicker { margin: 0 0 0.8rem; font-size: 0.74rem; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
h1 { font-size: clamp(2.1rem, 5.5vw, 3.6rem); letter-spacing: -0.03em; margin-bottom: 1.2rem; max-width: 52rem; text-wrap: balance; }
h2 { font-size: clamp(1.35rem, 2.6vw, 1.75rem); margin: 2.6rem 0 0.9rem; }
.lead { font-size: clamp(1.08rem, 1.7vw, 1.26rem); line-height: 1.5; }
.answer { padding-left: 1rem; border-left: 4px solid var(--accent); }

.facts { margin: 1.8rem 0; padding: 0; border-top: 1px solid var(--rule); }
.facts div { display: grid; grid-template-columns: 7.5rem 1fr; gap: 1rem; padding: 0.6rem 0; border-bottom: 1px solid var(--rule); }
.facts dt { font-size: 0.74rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); padding-top: 0.2rem; }
.facts dd { margin: 0; }

.btn { display: inline-flex; align-items: center; min-height: 2.9rem; margin-top: 0.5rem; padding: 0.7rem 1.1rem; border: 2px solid var(--indigo); background: var(--indigo); color: var(--chalk); font: inherit; font-size: 0.8rem; font-weight: 800; letter-spacing: 0.04em; text-decoration: none; cursor: pointer; }
.btn:hover { background: transparent; color: var(--indigo); }
.ext::after { content: " ↗"; }

.sources ul, .plain, .sides { margin: 0; padding-left: 1.1rem; }
.sources li, .plain li, .sides li { margin-bottom: 0.55rem; }

.seq { max-width: var(--measure); margin: 2.6rem 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.seq a { padding: 0.9rem 0; text-decoration: none; font-family: var(--serif); }
.seq a[rel="next"] { text-align: right; }
.seq a span { display: block; font-family: var(--sans); font-size: 0.7rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }

.related { max-width: none; }
.cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: 0.8rem; }
.cards a { display: flex; flex-direction: column; gap: 0.35rem; height: 100%; padding: 1rem; border: 1px solid var(--rule); background: var(--paper-2); text-decoration: none; font-size: 0.86rem; color: var(--ink); }
.cards a:hover { border-color: var(--accent); }
.cards strong { font-family: var(--serif); font-size: 1.05rem; font-weight: 500; line-height: 1.2; }
.cards span:last-child { color: var(--muted); }
.tag { font-size: 0.66rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); }


.cite { margin-top: 2.8rem; padding: 1.1rem 1.2rem 1.3rem; border: 1px solid var(--rule); }
.cite h2 { margin: 0 0 0.6rem; font-size: 1.1rem; }
.cite p { font-size: 0.9rem; }
.cite-note { color: var(--muted); }

.index { list-style: none; margin: 2rem 0 0; padding: 0; max-width: 52rem; }
.index li { padding: 1.1rem 0; border-top: 1px solid var(--rule); }
.index a { text-decoration: none; }
.index strong { font-family: var(--serif); font-size: 1.3rem; font-weight: 500; line-height: 1.2; }
.index .meta { display: block; margin-top: 0.2rem; font-size: 0.78rem; font-weight: 700; color: var(--muted); }
.index p { margin: 0.4rem 0 0; color: var(--muted); }

.log { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.log th, .log td { padding: 0.6rem 0.5rem; border: 1px solid var(--rule); text-align: left; vertical-align: top; }

.site-footer { border-top: 1px solid var(--rule); }
.footer-inner { width: min(100%, var(--max)); margin: 0 auto; padding: 2rem 1.25rem; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1.2rem 2rem; font-size: 0.84rem; }
.footer-inner p { margin: 0; }
.footer-links { display: flex; flex-wrap: wrap; gap: 0.4rem 1.2rem; font-weight: 700; }

@media (max-width: 34rem) {
  .facts div { grid-template-columns: 1fr; gap: 0.1rem; }
  .seq { grid-template-columns: 1fr; gap: 0; }
  .seq a[rel="next"] { text-align: left; border-top: 1px solid var(--rule); }
}

/* ---- home, directory, notes ---- */
.wide { max-width: none; }
.home-hero { padding: clamp(1.5rem, 5vw, 4rem) 0 1rem; }
.home-hero h1 { font-size: clamp(2.5rem, 7vw, 5rem); max-width: 16ch; }
.home-hero .lead { max-width: var(--measure); }
.search { max-width: var(--measure); margin-top: 1.6rem; }
.search label, .filters label { display: block; margin-bottom: 0.35rem; font-size: 0.74rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.search div { display: flex; gap: 0; }
.search input, .filters input, .filters select { width: 100%; min-height: 2.9rem; padding: 0.6rem 0.8rem; border: 2px solid var(--indigo); background: var(--paper); color: var(--ink); font: inherit; border-radius: 0; }
.search .btn { margin: 0; white-space: nowrap; }
.filters { display: grid; grid-template-columns: 2fr 1fr; gap: 1rem; max-width: 52rem; margin: 2rem 0 0.8rem; }
.count { font-size: 0.82rem; font-weight: 700; color: var(--muted); }
.index .tag { display: block; margin-bottom: 0.25rem; }
.index [hidden] { display: none; }
.qlist { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); gap: 0 2rem; }
.qlist li { padding: 1rem 0; border-top: 1px solid var(--rule); }
.qlist a { text-decoration: none; }
.qlist strong { font-family: var(--serif); font-size: 1.25rem; font-weight: 500; line-height: 1.2; }
.qlist p { margin: 0.4rem 0 0; color: var(--muted); font-size: 0.92rem; }
.browse { margin-bottom: 1rem; }
.dates { list-style: none; margin: 0 0 1rem; padding: 0; max-width: 52rem; }
.dates li { display: grid; grid-template-columns: 15rem 1fr; gap: 1rem; padding: 0.55rem 0; border-top: 1px solid var(--rule); }
.dates span { font-size: 0.84rem; font-weight: 700; color: var(--muted); }
.terms { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.6rem; }
.terms a { display: inline-block; padding: 0.55rem 0.9rem; border: 1px solid var(--rule); text-decoration: none; font-family: var(--serif); font-size: 1.05rem; }
.terms a:hover { border-color: var(--accent); }
.btn.alt { background: transparent; color: var(--indigo); }
.note { font-size: 0.86rem; color: var(--muted); border-left: 3px solid var(--rule); padding-left: 0.8rem; margin-top: 1rem; }
@media (max-width: 40rem) { .filters { grid-template-columns: 1fr; } .dates li { grid-template-columns: 1fr; gap: 0; } .search div { flex-direction: column; } }

/* ---- photographs and the visual timeline ---- */
.photos { display: grid; gap: 1rem; margin: 1.6rem 0; max-width: var(--measure); }
.photos.two { grid-template-columns: 1fr 1fr; max-width: 52rem; align-items: start; }
.photo { margin: 0; }
.photo img { display: block; width: 100%; height: auto; max-height: 34rem; object-fit: contain; object-position: left top; background: var(--paper-2); }
.photo figcaption { margin-top: 0.45rem; font-size: 0.82rem; line-height: 1.45; }
.credit { color: var(--muted); font-size: 0.78rem; }
.photo .credit { display: block; margin-top: 0.15rem; }
.tl { list-style: none; margin: 2.4rem 0 0; padding: 0; border-left: 3px solid var(--accent); }
.tl > li { position: relative; display: grid; grid-template-columns: 13rem 1fr; gap: 1.5rem; padding: 0 0 2.6rem 1.6rem; }
.tl > li::before { content: ""; position: absolute; left: -0.55rem; top: 0.35rem; width: 0.85rem; height: 0.85rem; border-radius: 50%; background: var(--accent); border: 3px solid var(--paper); }
.tl-when time { display: block; font-family: var(--serif); font-size: 1.15rem; line-height: 1.25; }
.tl-when span { display: block; margin-top: 0.3rem; font-size: 0.8rem; color: var(--muted); }
.tl-body { max-width: 52rem; }
.tl-body h2 { margin: 0 0 0.5rem; }
.tl-body h2 a { text-decoration: none; }
.life { list-style: none; margin: 0 0 0.6rem; padding: 0 0 0.8rem; display: grid; grid-auto-flow: column; grid-auto-columns: 12.5rem; gap: 0.9rem; overflow-x: auto; scroll-snap-type: x proximity; border-top: 3px solid var(--accent); padding-top: 1rem; }
.life li { scroll-snap-align: start; }
.life a { display: flex; flex-direction: column; gap: 0.3rem; text-decoration: none; }
.life img, .life-blank { width: 100%; height: 9.5rem; object-fit: cover; object-position: center 20%; background: var(--paper-2); }
.life-blank { display: flex; align-items: center; justify-content: center; font-family: var(--serif); font-size: 2.2rem; color: var(--muted); border: 1px solid var(--rule); }
.life-when { font-size: 0.74rem; font-weight: 800; color: var(--muted); }
.life strong { font-family: var(--serif); font-weight: 500; font-size: 1.02rem; line-height: 1.2; }
@media (max-width: 40rem) { .photos.two { grid-template-columns: 1fr; } .tl > li { grid-template-columns: 1fr; gap: 0.6rem; } }
@media (prefers-color-scheme: light) { .tag { color: #a8431a; } a:hover { color: #a8431a; } }

/* ---- full timeline, life page ---- */
.eras { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 1.6rem 0 0; }
.eras a { padding: 0.4rem 0.75rem; border: 1px solid var(--rule); font-size: 0.8rem; font-weight: 700; text-decoration: none; }
.eras a:hover { border-color: var(--accent); }
h2.era { margin: 3.2rem 0 0; padding-bottom: 0.6rem; max-width: none; font-size: clamp(1.5rem, 3vw, 2.1rem); }
.tl { margin-top: 1.2rem; }
.tl > li { padding-bottom: 1.6rem; }
.tl > li.major { padding-bottom: 2.4rem; }
.tl > li:not(.major)::before { width: 0.55rem; height: 0.55rem; left: -0.42rem; top: 0.45rem; border-width: 2px; }
.tl h3 { margin: 0 0 0.35rem; font-size: 1.12rem; line-height: 1.25; }
.tl .major h3 { font-size: clamp(1.4rem, 2.6vw, 1.8rem); }
.tl h3 a { text-decoration: none; }
.tl > li:not(.major) .tl-when time { font-family: var(--sans); font-size: 0.86rem; font-weight: 800; color: var(--muted); }
.tl-body p { margin-bottom: 0.5rem; }
.tl-body .photos { max-width: 24rem; }
.tl-body .photos.two { max-width: 40rem; }
.hero-links { display: flex; flex-wrap: wrap; gap: 0.6rem; margin: 1.2rem 0 0; }
.hero-links .btn { margin: 0; }
.life-body { max-width: var(--measure); font-size: 1.08rem; }

/* ---- the charge and the answer ---- */
.charge { color: var(--muted); }
.reply { margin: 1.2rem 0 0; padding: 1.1rem 1.2rem 0.4rem; border-left: 4px solid var(--accent); background: var(--paper-2); }
.reply-h { margin: 0 0 0.5rem; font-size: 0.74rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; }
