/* Biography.guide — shared site stylesheet. V17: warm archival redesign.
   One file, cached across every page. Every public class from V2–V16.5
   still exists; visuals only were upgraded. */

:root {
  --ink: #26221a; --muted: #6e675a; --line: #e5dfd2;
  --paper: #fffcf7; --wash: #f4f1e9;
  --accent: #1e5170; --accent-ink: #ffffff;
  --gold: #a8803a; --gold-soft: #c9a25e;
  --r-sm: 8px; --r: 12px; --r-lg: 18px;
  --shadow-1: 0 1px 2px rgba(38, 34, 26, .05), 0 1px 10px rgba(38, 34, 26, .05);
  --shadow-2: 0 4px 10px rgba(24, 20, 14, .08), 0 12px 32px rgba(24, 20, 14, .10);
  --font-serif: Georgia, "Iowan Old Style", "Palatino Linotype",
                "Times New Roman", serif;
  --mask-fade: linear-gradient(90deg, transparent 0, #000 18px,
                               #000 calc(100% - 18px), transparent 100%);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; color: var(--ink); background: var(--wash);
  font: 16px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI",
        Roboto, Helvetica, Arial, sans-serif;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px;
                 border-radius: 4px; }
h1, h2, h3, .brand, .feature-name, .card .name { font-family: var(--font-serif); }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 8px; top: 8px; z-index: 100; background: var(--paper);
  color: var(--ink); padding: 10px 16px; border-radius: var(--r-sm);
  box-shadow: var(--shadow-2); }

/* ---- site chrome ---- */
.shell { max-width: 980px; margin: 0 auto; padding: 0 16px; }
header.top { background: var(--paper); border-bottom: 1px solid var(--line); }
@media (min-width: 960px) {
  header.top { position: sticky; top: 0; z-index: 60; }
}
/* Header: menu button · brand (centred) · search, on every screen. The
   sections live in the Browse dropdown — seven links never crowd the bar
   and the brand stays the centre of attention. */
header.top .shell {
  display: grid; align-items: center; column-gap: 16px; padding: 8px 16px;
  grid-template-columns: 1fr auto 1fr;
  grid-template-areas: "menu brand search";
  position: relative;
}
@media (min-width: 960px) {
  header.top .shell { max-width: 1180px; }
}
.brand { grid-area: brand; justify-self: center; font-weight: 700;
  font-size: 23px; line-height: 44px; letter-spacing: -.01em;
  color: var(--ink); white-space: nowrap; }
.brand:hover { text-decoration: none; }
.brand span { color: var(--gold); }

/* the sections: a dropdown under the Browse button */
html.js nav.top {
  position: absolute; top: 100%; left: 16px; z-index: 70;
  width: min(300px, calc(100vw - 24px));
  display: none; flex-direction: column; gap: 0; margin-top: 6px;
  padding: 6px; background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--r); box-shadow: var(--shadow-2);
}
html.js nav.top.open { display: flex; }
html.js nav.top a { display: flex; align-items: center; min-height: 46px;
  padding: 0 14px; border-radius: var(--r-sm); font-size: 16px;
  font-weight: 500; color: var(--ink); }
html.js nav.top a:hover { background: var(--wash); text-decoration: none; }
html.js nav.top a[aria-current] { background: var(--wash);
  color: var(--accent); font-weight: 700; }
/* Shop and Support sit last, marked off by a rule so they read as actions */
nav.top .nav-shop, nav.top .nav-support {
  color: var(--gold-soft); font-weight: 700; gap: 8px; }
html.js nav.top .nav-shop, html.js nav.top .nav-support {
  margin-top: 4px; padding-top: 10px; border-top: 1px solid var(--line); }
/* the pair is one group: only the first of them carries the rule */
html.js nav.top .nav-shop + .nav-support {
  margin-top: 0; padding-top: 0; border-top: 0; }
/* no JavaScript: the sections stay visible as a simple wrapped row */
html:not(.js) .nav-toggle { display: none; }
html:not(.js) nav.top { grid-column: 1 / -1; display: flex; flex-wrap: wrap;
  gap: 8px; padding: 6px 0 2px; }
html:not(.js) nav.top a { min-height: 40px; display: inline-flex;
  align-items: center; padding: 0 14px; background: var(--wash);
  border: 1px solid var(--line); border-radius: 999px; font-size: 14.5px;
  color: var(--ink); }

/* search field */
.hsearch { grid-area: search; justify-self: end; width: 240px; }
@media (min-width: 1200px) { .hsearch { width: 300px; } }
.hs-field { position: relative; }
.hs-field .ico { position: absolute; left: 14px; top: 50%; translate: 0 -50%;
  color: var(--muted); pointer-events: none; transition: color .15s; }
.hs-field:focus-within .ico { color: var(--gold); }
.hsearch input {
  -webkit-appearance: none; appearance: none; display: block;
  width: 100%; height: 44px; padding: 0 44px 0 42px;
  font: inherit; font-size: 15px; color: var(--ink);
  background: var(--wash); border: 1px solid var(--line); border-radius: 999px;
  transition: border-color .15s, box-shadow .15s, background-color .15s;
}
.hsearch input::placeholder { color: var(--muted); opacity: 1; }
.hsearch input::-webkit-search-cancel-button { -webkit-appearance: none; }
.hsearch input:hover { border-color: #d3ccbb; }
.hsearch input:focus {
  outline: 2px solid transparent;
  background: var(--paper); border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(168, 128, 58, .28);
}
.hsearch kbd {
  position: absolute; right: 12px; top: 50%; translate: 0 -50%;
  padding: 4px 7px; font-size: 12px; font-weight: 600; line-height: 1;
  color: var(--muted); background: var(--paper);
  border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 6px;
  pointer-events: none;
}
.hsearch input:focus ~ kbd,
.hsearch input:not(:placeholder-shown) ~ kbd { display: none; }
@media (hover: none) { .hsearch kbd { display: none; } }

/* header buttons: Browse on every screen, the search toggle on phones */
.nav-toggle { grid-area: menu; justify-self: start;
  display: inline-flex; align-items: center; gap: 7px;
  height: 44px; padding: 0 16px; cursor: pointer; font: inherit;
  font-size: 14.5px; font-weight: 600; color: var(--ink);
  background: var(--wash); border: 1px solid var(--line);
  border-radius: 999px; }
.nav-toggle:hover { border-color: var(--gold-soft); }
.nav-toggle[aria-expanded="true"] { background: var(--accent);
  border-color: var(--accent); color: var(--accent-ink); }

.hs-toggle { display: none; grid-area: tools; justify-self: end;
  width: 44px; height: 44px; place-items: center; cursor: pointer;
  color: var(--ink); background: var(--wash);
  border: 1px solid var(--line); border-radius: 50%; }
.hs-toggle:hover { border-color: var(--gold-soft); }
.hs-toggle[aria-expanded="true"] { background: var(--accent);
  border-color: var(--accent); color: var(--accent-ink); }
header.top:not(:has(.hsearch)) .hs-toggle { display: none !important; }

/* /search/ page keeps its own box (form.searchbox rules stay below) */
form.searchbox { display: flex; gap: 6px; }
form.searchbox input {
  border: 1px solid var(--line); border-radius: 999px; padding: 8px 16px;
  min-width: 190px; font-size: 15px; background: var(--wash); color: var(--ink);
}
form.searchbox input:focus { background: var(--paper); }
form.searchbox button {
  border: 0; background: var(--accent); color: var(--accent-ink);
  border-radius: 999px; padding: 8px 18px; cursor: pointer; font-size: 14.5px;
  font-weight: 600;
}
form.searchbox button:hover { background: #17425c; }

main { padding: 24px 0 56px; }
footer.bottom { border-top: 1px solid #2b3a49; background: #1a2530;
  color: #aeb9c4; font-size: 14px; }
footer.bottom .shell { padding: 26px 16px 30px; display: flex;
  flex-wrap: wrap; gap: 8px 22px; align-items: baseline; }
footer.bottom a { color: #dcc28a; }
footer.bottom a:hover { color: #fff; }
footer.bottom .copy { width: 100%; color: #7f8b98; font-size: 13px;
  margin-top: 6px; }
h1 { font-size: 28px; margin: 0 0 6px; line-height: 1.2; }
h2 {
  font-size: 21px; margin: 0 0 16px; padding-bottom: 10px;
  border-bottom: 1px solid var(--line); font-weight: 700;
}

/* ---- homepage hero ---- */
.hero-home {
  padding: 54px 16px 46px;
  text-align: center; margin: 0 0 26px; color: #fff;
  background:
    radial-gradient(1100px 480px at 88% -12%, rgba(201, 162, 94, .30), transparent 62%),
    radial-gradient(760px 420px at -8% 112%, rgba(46, 106, 145, .38), transparent 58%),
    linear-gradient(160deg, #1e2e3d 0%, #17242f 58%, #121c26 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .07), var(--shadow-2);
}
/* the band is full width; the words stay in a readable column */
.hero-inner { max-width: 1180px; margin: 0 auto; }
body.home main { padding-top: 0; }
.hero-eyebrow {
  color: var(--gold-soft); font-size: 12px; font-weight: 700;
  letter-spacing: .16em; text-transform: uppercase; margin: 0 0 12px;
}
.hero-home h1 {
  font-size: clamp(30px, 5.4vw, 42px); margin: 0 0 12px; color: #fff;
  line-height: 1.12;
}
.hero-sub { color: rgba(255, 255, 255, .80); max-width: 600px;
  margin: 0 auto 6px; font-size: 17px; }
.herosearch {
  display: flex; width: 100%; max-width: 580px; margin: 22px auto 16px;
  background: #fff; border-radius: 999px; padding: 6px;
  box-shadow: 0 10px 28px rgba(6, 12, 18, .35);
}
.herosearch input {
  flex: 1; min-width: 0; border: 0; background: transparent;
  padding: 10px 18px; font-size: 16.5px;
  /* the pill is always white, in both themes — so these two colours are
     fixed. var(--ink) turns near-white in dark mode: white on white, and
     the reader cannot see what they are typing (owner, 2026-09-24) */
  color: #26221a;
}
.herosearch input::placeholder { color: #6e675a; opacity: 1; }
.herosearch input:focus { outline: none; }
.herosearch button {
  border: 0; background: var(--gold-soft); color: #241c0d;
  border-radius: 999px; padding: 0 24px; min-height: 46px; cursor: pointer;
  font-size: 15px; font-weight: 700;
}
.herosearch button:hover { background: #b8904a; }
.hero-examples { display: flex; flex-wrap: wrap; gap: 8px;
  justify-content: center; margin: 4px 0 20px; }
.hero-examples a {
  color: #dfe7ee; border: 1px solid rgba(255, 255, 255, .26);
  padding: 7px 15px; border-radius: 999px; font-size: 13.5px;
}
.hero-examples a:hover { border-color: rgba(255, 255, 255, .55);
  background: rgba(255, 255, 255, .07); text-decoration: none; }
.hero-values { list-style: none; margin: 26px auto 0; padding: 0;
  max-width: 820px; display: grid; gap: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr)); text-align: left; }
.hero-values li { background: rgba(255, 255, 255, .07);
  border: 1px solid rgba(255, 255, 255, .14); border-radius: var(--r);
  padding: 14px 16px; color: rgba(255, 255, 255, .78); font-size: 14px;
  line-height: 1.45; }
.hero-values .hv-ico { display: block; font-size: 20px; margin-bottom: 4px;
  line-height: 1; }
.hero-values li b { display: block; color: #fff; font-size: 15px;
  margin-bottom: 2px; }
.hero-values a { color: #e8d7ab; font-weight: 600; }
.hero-values a:hover { color: #fff; }
@media (max-width: 720px) {
  .hero-values { grid-template-columns: 1fr; gap: 8px; }
  .hero-values li { display: flex; align-items: flex-start; column-gap: 10px;
    padding: 12px 14px; }
  .hero-values .hv-ico { margin: 2px 0 0; }
  .hero-values .hv-text { min-width: 0; }
}
.hero-stats { display: flex; flex-wrap: wrap; gap: 6px 10px;
  justify-content: center; color: rgba(255, 255, 255, .62); font-size: 13.5px;
  margin: 0; }
.hero-stats b { color: #fff; font-weight: 600; }
.hero-stats .dot { color: rgba(255, 255, 255, .35); }
.hero-stats a { color: #e8d7ab; font-weight: 600; }
.hero-stats a:hover { color: #fff; }

/* generic hero (404 + legacy pages) */
.hero {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--r-lg); box-shadow: var(--shadow-1);
  padding: 44px 28px; text-align: center; margin-bottom: 26px;
}
.hero p { color: var(--muted); max-width: 560px; margin: 8px auto 18px; }

.feature h2 { display: flex; justify-content: space-between;
  align-items: baseline; gap: 12px; }
.feature h2 .stat { font-size: 13px; font-family: -apple-system,
  BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; font-weight: 400;
  white-space: nowrap; }

/* ---- featured person ---- */
.feature-link {
  display: grid; grid-template-columns: 118px 1fr; gap: 24px;
  align-items: center; color: inherit;
}
.feature-link:hover { text-decoration: none; }
.feature-link:hover .feature-name { color: var(--accent); }
.feature-link img {
  width: 118px; height: 118px; border-radius: 50%; object-fit: cover;
  border: 4px solid var(--paper); box-shadow: var(--shadow-2);
}
.feature-name { font-size: 26px; font-weight: 700; line-height: 1.2; }
.feature-meta { color: var(--muted); font-size: 15px; margin-top: 3px; }
.feature-link p { color: var(--muted); margin: 8px 0 0; max-width: 56ch;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; }
.feature-cta { display: inline-block; margin-top: 10px; font-weight: 600; }
.feature-cta::after { content: " →"; }

/* ---- on-this-day face strip ---- */
.facelist {
  display: grid; grid-auto-flow: column; grid-auto-columns: 128px;
  gap: 14px; overflow-x: auto; scroll-snap-type: x proximity;
  padding: 4px 18px 10px; margin: 0 -18px;
  scrollbar-width: none;
  -webkit-mask-image: var(--mask-fade); mask-image: var(--mask-fade);
}
.facelist::-webkit-scrollbar { display: none; }
.face { scroll-snap-align: start; text-align: center; color: inherit;
  display: block; }
.face:hover { text-decoration: none; }
.face:hover .face-name { color: var(--accent); }
.face img { width: 88px; height: 88px; border-radius: 50%; object-fit: cover;
  display: block; margin: 0 auto 8px; border: 1px solid var(--line); }
.face-name { font-weight: 600; font-size: 14px; line-height: 1.3; }
.face-years { color: var(--muted); font-size: 12.5px; }
.face-badge { display: inline-block; margin-top: 3px; font-size: 11px;
  font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--gold); }
.subhead { font-size: 15px; font-weight: 700; margin: 18px 0 10px;
  font-family: var(--font-serif); }
.subhead:first-of-type { margin-top: 12px; }
.panel .more { margin: 16px 0 0; font-weight: 600; }
.panel .more::after { content: " →"; }

/* ---- cards, chips, panels ---- */
.grid {
  display: grid; gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}
.card {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--r); overflow: hidden; text-align: center;
  padding-bottom: 12px; display: block; color: inherit;
  box-shadow: var(--shadow-1);
  transition: transform .15s ease, box-shadow .15s ease,
             border-color .15s ease;
}
.card:hover { border-color: var(--gold-soft); text-decoration: none;
  transform: translateY(-2px); box-shadow: var(--shadow-2); }
.card img {
  /* height:auto — the width/height HTML attributes (512) would otherwise
     win over aspect-ratio and stretch the photo into a tall strip */
  width: 100%; height: auto; aspect-ratio: 1/1; object-fit: cover;
  display: block;
  background: var(--wash);
}
.card .name { font-weight: 700; margin-top: 10px; padding: 0 10px;
  font-size: 16.5px; line-height: 1.3; }
.card:hover .name { color: var(--accent); }
.card .years { color: var(--muted); font-size: 13px; margin-top: 1px; }
.card .occ { color: var(--muted); font-size: 13px; padding: 0 10px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: 999px; padding: 7px 16px; font-size: 14.5px;
  color: var(--accent); min-height: 38px; display: inline-flex;
  align-items: center; gap: 6px;
  transition: border-color .12s ease, background .12s ease;
}
.chip:hover { border-color: var(--gold-soft); background: var(--paper);
  text-decoration: none; }
.chip:active { transform: scale(.97); }
.chip small { color: var(--muted); font-weight: 400; }
.chips.az .chip { min-width: 46px; justify-content: center; padding: 7px 0; }
/* homepage twin panels (occupations + eras) */
.duo { display: grid; grid-template-columns: 1fr 1fr; gap: 22px;
  align-items: start; margin-bottom: 22px; }
.duo .panel { margin-bottom: 0; }
@media (max-width: 720px) { .duo { grid-template-columns: 1fr; gap: 16px; }
  .duo .panel { margin-bottom: 0; } }
.panel {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 22px 24px; margin-bottom: 22px;
  box-shadow: var(--shadow-1);
}
.pager { display: flex; gap: 10px; justify-content: center; margin: 26px 0;
  flex-wrap: wrap; }
.pager a, .pager span {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: 999px; padding: 9px 18px; min-height: 42px;
  display: inline-flex; align-items: center;
}
.pager a:hover { border-color: var(--gold-soft); text-decoration: none; }
.pager span { color: var(--muted); }
/* Ad slots: reserve height so a loading ad never pushes the text down
   (Cumulative Layout Shift), and collapse a slot AdSense could not fill so
   the page never shows an empty framed gap. */
.adslot { margin: 18px 0; text-align: center; }
.adslot ins.adsbygoogle { display: block; min-height: 280px; }
.adslot ins.adsbygoogle[data-ad-status="unfilled"] { display: none !important; }
@media (max-width: 640px) {
  .adslot ins.adsbygoogle { min-height: 250px; }
}
.stat { color: var(--muted); }

/* ---- person profile page ---- */
/* breadcrumbs wrap instead of fading: the old edge-fade hid the "H" */
.crumbs { font-size: 13px; color: var(--muted); margin-bottom: 14px;
  line-height: 1.6; overflow-wrap: anywhere; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--accent); }
.profile {
  position: relative;
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--r-lg); margin-bottom: 22px;
  box-shadow: var(--shadow-1);
  /* NOT overflow:hidden — that clipped the share menu. The banner clips
     itself instead, which is the only thing that needed it. */
}
/* Banner: the person's own portrait, blurred and darkened (unique mood
   per person, no ugly crop, ~10KB and already cached for the avatar) */
.band { position: relative; height: 150px; overflow: hidden;
  border-radius: var(--r-lg) var(--r-lg) 0 0;
  background: linear-gradient(135deg, #2b3a45 0%, #1d2a33 55%, #17242f 100%); }
.band-plain {
  background: linear-gradient(135deg, #ece5d4 0%, #ddd3bd 52%, #cdc4ac 100%); }
.band-photo { position: absolute; inset: -40px; background-size: cover;
  background-position: center 30%; filter: blur(28px) saturate(1.05);
  transform: scale(1.1); opacity: .85; }
.band::after { content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(23, 36, 47, .15) 0%,
                                      rgba(23, 36, 47, .45) 100%); }
.band-plain::after { display: none; }
.idblock {
  display: flex; gap: 26px; padding: 0 30px 26px; align-items: flex-start;
}
/* only the portrait overlaps the banner — the text always sits on paper */
.avatar {
  width: 168px; height: 168px; border-radius: 50%; margin-top: -84px;
  position: relative; z-index: 1;
  border: 6px solid var(--paper); object-fit: cover; background: var(--wash);
  flex-shrink: 0; box-shadow: 0 4px 18px rgba(24, 20, 14, .22);
}
.idtext { padding-top: 16px; min-width: 0; }
.idtext h1 { font-size: 36px; margin: 0; line-height: 1.12;
  letter-spacing: -.01em; overflow-wrap: anywhere; }
.idtext .years { color: var(--muted); font-size: 18px; margin-top: 4px;
  font-variant-numeric: lining-nums; }
.idtext .tagline { margin: 10px 0 0; font-size: 17px; line-height: 1.5;
  color: var(--ink); max-width: 62ch; }
.idtext .occ { margin-top: 12px; }
.idtext .occ a, .idtext .occ .pill-plain {
  display: inline-flex; align-items: center; background: var(--wash);
  border: 1px solid var(--line); border-radius: 999px; padding: 5px 13px;
  font-size: 14px; margin: 2px 5px 2px 0; min-height: 34px;
}
.idtext .occ .pill-plain { color: var(--muted); }

/* reading text: the long description is the heart of the page */
.lead { font-size: 17px; line-height: 1.65; margin: 0 0 14px; }
.description p { font-size: 17.5px; line-height: 1.75; margin: 0 0 16px;
  max-width: 70ch; }
/* Contents box for long articles: readers of a 10,000-word page must be
   able to jump, and the anchors give Google sitelink targets. */
.toc { background: var(--wash); border: 1px solid var(--line);
  border-radius: var(--r); padding: 14px 18px; margin: 0 0 20px; }
.toc b { font-size: 13px; text-transform: uppercase; letter-spacing: .05em;
  color: var(--muted); }
.toc ol { margin: 8px 0 0; padding-left: 20px; columns: 2; column-gap: 26px; }
.toc li { margin: 3px 0; break-inside: avoid; }
.toc a { font-size: 15px; }
.article-heading { font-size: 20px; margin: 26px 0 8px;
  scroll-margin-top: 90px; }
@media (max-width: 640px) { .toc ol { columns: 1; } }
.text-credit { color: var(--muted); font-size: 13px; line-height: 1.55;
  border-top: 1px solid var(--line); padding-top: 10px; margin: 6px 0 0; }
details.aka-more { display: inline; }
details.aka-more summary { display: inline; cursor: pointer; color: var(--accent);
  font-size: 13px; list-style: none; margin-left: 4px; }
details.aka-more summary::-webkit-details-marker { display: none; }
details.aka-more[open] summary { display: none; }
/* person page rails sit in the narrower main column: 3 cards per row on
   desktop instead of 2 giant ones (the homepage keeps the wider grid) */
.main-col .grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }

.prose p { margin: 0 0 12px; }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 22px; }
.fact .label {
  font-size: 12px; text-transform: uppercase; letter-spacing: .05em;
  color: var(--muted); font-weight: 600;
}
.fact .value { font-weight: 500; margin-top: 1px; }

.timeline {
  list-style: none; margin: 0; padding: 0 0 0 22px;
  border-left: 3px solid var(--line);
}
.timeline li { margin: 0 0 18px; position: relative; }
.timeline li::before {
  content: ""; position: absolute; left: -30px; top: 7px;
  width: 11px; height: 11px; border-radius: 50%;
  background: var(--gold); border: 2px solid var(--paper);
}
.timeline .year { font-weight: 700; color: var(--accent); }
.timeline .etitle { font-weight: 600; }

details.faq { border-bottom: 1px solid var(--line); padding: 10px 0; }
details.faq:last-child { border-bottom: 0; }
details.faq summary { cursor: pointer; font-weight: 600; }
details.faq p { margin: 10px 0 0; color: var(--ink); }

.media iframe, .media audio { width: 100%; border: 0; border-radius: var(--r-sm); }
.media audio { margin-top: 10px; }
.buttons { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 6px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px;                         /* icon and words, never run together */
  background: var(--accent); color: #fff; border-radius: var(--r-sm);
  padding: 10px 20px; font-weight: 600; min-height: 42px;
}
.btn:hover { background: #17425c; text-decoration: none; }
.btn.ghost {
  background: var(--wash); color: var(--accent);
  border: 1px solid var(--line);
}
.btn.ghost:hover { border-color: var(--gold-soft); background: var(--paper); }
.src { margin: 4px 0; overflow-wrap: anywhere; }
.credit { color: var(--muted); font-size: 13px; margin-top: 10px; }
.generated { color: var(--muted); font-size: 12px; margin-top: 26px; }

/* ---- V3b+V15: reading layout — facts follow About in the flow;
   desktop pins them as a sticky right column via grid + display:contents ----*/
.jump {
  position: sticky; top: 8px; z-index: 20; display: flex; gap: 4px;
  overflow-x: auto; background: var(--paper);
  border: 1px solid var(--line); border-radius: 999px;
  padding: 5px 14px; margin-bottom: 20px;
  scrollbar-width: none;
  -webkit-mask-image: var(--mask-fade); mask-image: var(--mask-fade);
}
.jump::-webkit-scrollbar { display: none; }
.jump a {
  flex-shrink: 0; color: var(--muted); font-size: 14px; font-weight: 500;
  padding: 8px 12px; border-radius: 999px; min-height: 36px;
  display: inline-flex; align-items: center; white-space: nowrap;
}
.jump a:hover { background: var(--wash); color: var(--accent);
  text-decoration: none; }

.page-grid { display: grid; grid-template-columns: minmax(0, 1fr);
  gap: 20px; }
.main-col { display: contents; }
.page-grid > section, .page-grid > .adslot { grid-column: 1; }
.page-grid section { scroll-margin-top: 64px; }
.facts-stack { grid-template-columns: 1fr; }

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  .card, .chip, .btn { will-change: transform; }
}

@media (min-width: 960px) {
  header.top { position: sticky; top: 0; z-index: 60; }
  .jump { top: 74px; }
  .page-grid section { scroll-margin-top: 86px; }
  .page-grid { grid-template-columns: minmax(0, 1fr) 300px;
    align-items: start; }
  /* the facts column scrolls with the page — never its own scrollbar */
  .aside-col { grid-column: 2; grid-row: 1 / span 40; align-self: start; }
}

@media (max-width: 640px) {


  /* hero */
  .hero-home { padding: 34px 16px 30px; }
  .hero-home h1 { font-size: clamp(27px, 7.6vw, 34px); }
  .hero-sub { font-size: 15.5px; }
  .herosearch { padding: 5px; }
  .herosearch button { padding: 0 18px; }

  /* person header: centred profile card (short banner, portrait on top) */
  .band { height: 96px; }
  .idblock { flex-direction: column; align-items: center; text-align: center;
    padding: 0 16px 20px; gap: 0; }
  .avatar { width: 112px; height: 112px; margin-top: -56px; border-width: 5px; }
  .idtext { padding-top: 10px; }
  .idtext h1 { font-size: 27px; }
  .idtext .years { font-size: 15.5px; }
  .idtext .tagline { font-size: 15.5px; margin-left: auto; margin-right: auto; }
  .idtext .occ a, .idtext .occ .pill-plain { padding: 4px 11px;
    font-size: 13px; min-height: 32px; margin: 3px 3px; }
  .description p { font-size: 16.5px; line-height: 1.7; }
  .lead { font-size: 16px; }

  .facts { grid-template-columns: 1fr; }
  .jump { top: 8px; }
  .jump a { min-height: 40px; }

  /* denser people grids on phones (2-up) */
  .grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .card .name { font-size: 14.5px; }
  .card .occ { display: none; }
  .chip, .pager a, .pager span { min-height: 44px; font-size: 15px; }
  h1 { font-size: 24px; }
  .panel { padding: 16px; }
  .feature-link { grid-template-columns: 84px 1fr; gap: 14px; }
  .feature-link img { width: 84px; height: 84px; }
  .feature-name { font-size: 20px; }
  .facelist { grid-auto-columns: 108px; gap: 12px; }
  .face img { width: 78px; height: 78px; }
}

/* ---- phones: ☰ · brand · 🔍 in one row; search opens below ---- */
@media (max-width: 959px) {
  header.top { position: sticky; top: 0; z-index: 60; }
  header.top .shell { column-gap: 8px; padding: 8px 12px;
    grid-template-areas: "menu brand tools" "search search search"; }
  .nav-toggle { width: 44px; padding: 0; justify-content: center;
    border-radius: 50%; }
  .nav-toggle span { display: none; }
  html.js .hs-toggle { display: grid; }
  .brand { font-size: 20px; }
  html.js nav.top { left: 10px; right: 10px; width: auto; }

  .hsearch { width: 100%; justify-self: stretch; }
  .hs-field { padding: 4px 4px 6px; }
  html.js .hsearch { display: grid; grid-template-rows: 0fr;
    visibility: hidden;
    transition: grid-template-rows .22s ease, visibility 0s .22s; }
  html.js .hsearch.open { grid-template-rows: 1fr; visibility: visible;
    transition: grid-template-rows .22s ease; }
  html.js .hsearch:not(.open) .hs-inner { visibility: hidden; }
  html.js .hs-inner { min-height: 0; overflow: hidden; }
  .hsearch input { font-size: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .hsearch, .hsearch input, nav.top a::after { transition: none !important; }
}

/* ---- /search/ results header ---- */
.results-head { display: flex; flex-wrap: wrap; align-items: baseline;
  justify-content: space-between; gap: 4px 16px;
  margin: 0 0 16px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.results-head[hidden] { display: none; }
.results-count { margin: 0; font-family: var(--font-serif); font-size: 18px;
  color: var(--ink); }
.results-note { margin: 0; font-size: 13.5px; color: var(--muted); }
.results-note::before { content: "✦ "; color: var(--gold); }

/* V15: answer-first + citation */
.lifespan-line { color: var(--muted); margin: 0 0 12px; }
.cite { background: var(--wash); border: 1px solid var(--line);
  border-radius: var(--r-sm); padding: 10px 14px; margin-top: 14px; }
.cite-line { font-size: 13.5px; color: var(--muted); margin: 4px 0;
  word-break: break-word; }
.cite-btn { background: var(--wash); border: 1px solid var(--line);
  border-radius: 6px; font-size: 12px; padding: 3px 10px; cursor: pointer;
  margin-left: 6px; min-height: 26px; }
.cite-btn:hover { border-color: var(--gold-soft); color: var(--accent); }

/* ---- print ---- */
@media print {
  header.top, form.searchbox, .jump, .adslot, .buttons, .generated,
  footer.bottom, .media iframe, .hero-examples, .herosearch { display: none !important; }
  body { background: #fff; font-size: 12pt; }
  .panel { border: 0; padding: 0 0 12px; break-inside: avoid;
    box-shadow: none; }
  a { color: inherit; }
  .band { height: 90px; }
}

/* V19: factual intro paragraph on listing pages (thin-content defense) */
.listing-intro {
  color: var(--muted); font-size: 16.5px; max-width: 68ch;
  margin: -4px 0 18px; line-height: 1.6;
}

/* V19: article section headings (from plaintext Wikipedia conversion) */
.prose h3.article-heading {
  font-family: var(--font-serif); font-size: 18.5px; margin: 22px 0 8px;
  color: var(--ink);
}
/* AdSense: never show an unfilled unit's empty box */
ins.adsbygoogle[data-ad-status="unfilled"] { display: none !important; }

/* ---------------------------------------------------------------- share */
/* ONE button, sitting on the cover image where the space is empty. The
   menu is a <details> panel, so it opens with no JavaScript, and nothing
   here loads a third-party widget or sets a cookie. */
.share { position: absolute; top: 12px; right: 12px; z-index: 6; }
.share > summary {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 13px; font-size: 13px; font-weight: 600;
  color: #17242f; background: rgba(255, 255, 255, .92);
  border: 1px solid rgba(255, 255, 255, .5); border-radius: 999px;
  cursor: pointer; list-style: none; user-select: none;
  backdrop-filter: blur(6px);
  box-shadow: 0 1px 6px rgba(15, 22, 28, .18);
  transition: background .15s, color .15s, transform .12s;
}
.share > summary::-webkit-details-marker { display: none; }
.share > summary::marker { content: ""; }
.share > summary:hover, .share > summary:focus-visible {
  background: #fff; transform: translateY(-1px);
}
.share[open] > summary { background: var(--accent); color: var(--accent-ink);
  border-color: var(--accent); }
.share-menu {
  position: absolute; z-index: 7; top: calc(100% + 8px); right: 0;
  min-width: 186px; padding: 6px;
  display: flex; flex-direction: column;
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--r); box-shadow: var(--shadow-2);
}
.share-menu a, .share-menu button {
  padding: 9px 12px; font: inherit; font-size: 14px; text-align: left;
  color: var(--ink); text-decoration: none; background: none;
  border: 0; border-radius: var(--r-sm); cursor: pointer;
}
.share-menu a:hover, .share-menu button:hover,
.share-menu a:focus-visible, .share-menu button:focus-visible {
  background: var(--wash);
}
@media (max-width: 640px) {
  .share { top: 10px; right: 10px; }
  .share > summary { padding: 7px 12px; }
}

/* ------------------------------------------------------------ own shop */
/* The shop card sits on top of the side column; the thank-you box where
   the article ends. One shop for the whole site — nothing per-person. */
.aside-stack { display: grid; gap: 20px; align-content: start; }
.aside-stack > .panel { margin-bottom: 0; }
/* Deep navy and gold, the site's premium colours, so it reads as an offer
   — not as an advert and not as more article text. */
.shop-card {
  position: relative; overflow: hidden; color: #fff;
  background: linear-gradient(150deg, #1e5170 0%, #173d57 52%, #10283a 100%);
  border: 1px solid #10283a;
  box-shadow: 0 10px 30px rgba(16, 40, 58, .28);
}
.shop-card::after {                  /* a soft gold glow, top right */
  content: ""; position: absolute; top: -60px; right: -60px;
  width: 180px; height: 180px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(201, 162, 94, .35), transparent 70%);
}
.shop-card > * { position: relative; }
.shop-kicker { font-size: 12px; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: #e8d7ab; }
.shop-card h2 { color: #fff; font-size: 24px; margin: 6px 0 8px;
  border: 0; padding: 0; line-height: 1.2; }
.shop-pitch { margin: 0 0 12px; color: rgba(255, 255, 255, .88);
  font-size: 14.5px; line-height: 1.5; }
.shop-includes { list-style: none; padding: 0; margin: 12px 0 16px;
  display: flex; flex-wrap: wrap; gap: 8px; }
.shop-includes li { padding: 6px 12px; border-radius: 999px; font-size: 13.5px;
  font-weight: 600; color: #fff; background: rgba(255, 255, 255, .10);
  border: 1px solid rgba(255, 255, 255, .20); }
.btn-gold, .shop-buy {
  background: linear-gradient(180deg, #d9b56e 0%, #c49a4f 100%);
  color: #1c1406; font-weight: 800; border: 0;
  box-shadow: 0 4px 14px rgba(196, 154, 79, .35);
}
.btn-gold:hover, .shop-buy:hover { background: #e2c27f; color: #1c1406; }
.shop-buy { width: 100%; font-size: 15.5px; min-height: 48px;
  text-align: center; }
.shop-note { color: rgba(255, 255, 255, .7); font-size: 12.5px;
  margin: 10px 0 0; text-align: center; line-height: 1.45; }

/* Phones: the side column falls below the article, so a slim bar under
   the name replaces the card. */
.shop-inline { display: none; }
@media (max-width: 959px) {
  #shop { display: none; }
  .shop-inline {
    display: flex; align-items: center; justify-content: space-between;
    gap: 12px; margin: 0 0 16px; padding: 12px 14px 12px 16px;
    border-radius: var(--r); color: #fff; font-size: 14px; line-height: 1.3;
    background: linear-gradient(150deg, #1e5170 0%, #10283a 100%);
    box-shadow: 0 6px 18px rgba(16, 40, 58, .25);
  }
  .shop-inline:hover { text-decoration: none; color: #fff; }
  .shop-inline-text { display: flex; flex-direction: column; min-width: 0; }
  .shop-inline-text small { color: #e8d7ab; font-size: 12px;
    font-style: italic; }
  .shop-inline-text strong { font-size: 16px; }
  .shop-inline-text span { color: rgba(255, 255, 255, .8); font-size: 13px; }
  .shop-inline-cta { flex: none; font-weight: 800; color: #1c1406;
    background: linear-gradient(180deg, #d9b56e 0%, #c49a4f 100%);
    padding: 9px 12px; border-radius: 999px; font-size: 14px;
    white-space: nowrap; }
}

/* Homepage: one wide band under the hero. */
.shop-band {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center;
  gap: 18px; margin: 0 0 24px; padding: 18px 22px;
  border-radius: var(--r-lg); color: #fff;
  background: linear-gradient(120deg, #1e5170 0%, #173d57 55%, #10283a 100%);
  box-shadow: 0 10px 28px rgba(16, 40, 58, .26);
}
.shop-band:hover { text-decoration: none; color: #fff;
  box-shadow: 0 12px 34px rgba(16, 40, 58, .34); }
.shop-band-art { font-size: 34px; line-height: 1; }
.shop-band-text { display: flex; flex-direction: column; gap: 3px;
  min-width: 0; }
.shop-band-text strong { font-family: var(--font-serif); font-size: 21px;
  font-weight: 700; }
.shop-band-text span { color: rgba(255, 255, 255, .84); font-size: 14.5px;
  line-height: 1.45; }
.shop-band-cta {
  flex: none; display: flex; flex-direction: column; align-items: center;
  gap: 2px; padding: 12px 20px; border-radius: 999px;
  background: linear-gradient(180deg, #d9b56e 0%, #c49a4f 100%);
  color: #1c1406; font-weight: 800; font-size: 15px; white-space: nowrap;
  box-shadow: 0 4px 14px rgba(196, 154, 79, .35);
}
.shop-band-cta small { font-weight: 700; font-size: 11.5px; opacity: .8; }
@media (max-width: 720px) {
  .shop-band { grid-template-columns: auto 1fr; gap: 12px 14px;
    padding: 16px 18px; text-align: left; }
  .shop-band-text strong { font-size: 18px; }
  .shop-band-text span { font-size: 13.5px; }
  .shop-band-cta { grid-column: 1 / -1; flex-direction: row; gap: 8px;
    justify-content: center; }
}

.support {
  margin-top: 26px; padding: 18px 20px; border-radius: var(--r);
  background: var(--wash); border: 1px solid var(--line);
}
.support p { margin: 0 0 12px; color: var(--ink); }
.support-actions { display: flex; flex-wrap: wrap; gap: 10px; }
@media (max-width: 640px) {
  .support-actions .btn { flex: 1 1 100%; }
}

.lead-intro { font-size: 17px; color: var(--muted); max-width: 760px;
  margin: -4px 0 22px; }
.empty-state p { margin: 0; }
.section-head { display: flex; align-items: baseline;
  justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.section-head h2 { margin: 0; }

/* ------------------------------------------------------------ dark mode */
/* The tokens flip; every rule above is written against them. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #e8e3d8; --muted: #a49c8c; --line: #343029;
    --paper: #17150f; --wash: #1f1c15;
    --accent: #7db7d8; --accent-ink: #10202b;
    --gold: #c9a25e; --gold-soft: #a8803a;
    --shadow-1: 0 1px 2px rgba(0, 0, 0, .40), 0 1px 10px rgba(0, 0, 0, .30);
    --shadow-2: 0 4px 10px rgba(0, 0, 0, .45), 0 12px 32px rgba(0, 0, 0, .40);
  }
  :root:not([data-theme="light"]) img.avatar { background: var(--wash); }
  /* an ad unit keeps its own light background: never repaint an ad */
  :root:not([data-theme="light"]) .adslot { background: transparent; }
}
:root[data-theme="dark"] {
  --ink: #e8e3d8; --muted: #a49c8c; --line: #343029;
  --paper: #17150f; --wash: #1f1c15;
  --accent: #7db7d8; --accent-ink: #10202b;
  --gold: #c9a25e; --gold-soft: #a8803a;
}

/* ------------------------------------------------------------- printing */
/* Students print biographies: drop the furniture, keep the words. */
@media print {
  /* A reader in dark mode prints pale grey on white and gets a blank-looking
     page. Put the light palette back for paper — after the dark blocks
     above, so this is the one that wins. */
  :root, :root:not([data-theme="light"]), :root[data-theme="dark"] {
    --ink: #26221a; --muted: #6e675a; --line: #e5dfd2;
    --paper: #fff; --wash: #fff;
    --accent: #2e6a91; --accent-ink: #fff;
    --gold: #a8803a; --gold-soft: #8a6a30;
  }
  .share, .jump, .adslot, .hdr-actions, .nav-toggle, .cite-btn, .support, .pack { display: none !important; }
  .band, .band-photo { display: none !important; }
  a[href^="/"]::after { content: ""; }
}
