:root {
  color-scheme: light;
  --paper: #f8f5ed;
  --surface: #fffdf8;
  --ink: #252922;
  --muted: #595e54;
  --forest: #223a30;
  --forest-deep: #1b3128;
  --accent: #8d3c2e;
  --accent-hover: #732e22;
  --clay: #f3e7dc;
  --sand: #eee8da;
  --rule: #ded7c7;
  --control-rule: #bdb4a2;
  --serif: Lora, Georgia, serif;
  --sans: Manrope, system-ui, sans-serif;
  --shell: min(1180px, calc(100% - 72px));
  --head-height: 68px;
  --radius: 12px;
  --text-note: .875rem;
  --text-body: clamp(1rem, .97rem + .16vw, 1.0625rem);
  --text-lead: clamp(1.03rem, .95rem + .34vw, 1.16rem);
  --title-page: clamp(2.1rem, 1.5rem + 2.5vw, 3.65rem);
  --title-detail: clamp(1.95rem, 1.4rem + 2.3vw, 3.35rem);
  --title-section: clamp(1.43rem, 1.17rem + 1.2vw, 2.2rem);
  --title-card: clamp(1.22rem, 1.08rem + .65vw, 1.65rem);
  --page-top: clamp(18px, 2.2vw, 34px);
  --panel-padding: clamp(14px, 1.9vw, 24px);
  --reading-width: 66ch;
  font-family: var(--sans);
  background: var(--paper);
  color: var(--ink);
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: calc(var(--head-height) + 22px); }
body { display: flex; flex-direction: column; min-height: 100vh; min-height: 100svh; margin: 0; min-width: 0; }
#content { flex: 1 0 auto; min-width: 0; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
img { display: block; width: 100%; }
figure, p, h1, h2, h3, dl, dd { margin: 0; }
p { line-height: 1.65; }
h1, h2, h3 { overflow-wrap: anywhere; }
h1, h2, h3 { font-family: var(--serif); font-weight: 540; line-height: 1.16; letter-spacing: -.032em; }
h1, h2 { text-wrap: balance; }
h2 { font-size: var(--title-section); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
main:focus, #results:focus { outline: 0; }
[hidden] { display: none !important; }
.shell { width: var(--shell); margin-inline: auto; }
.icon { flex: 0 0 auto; vertical-align: middle; }
.sr-only, .skip:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.skip:focus {
  position: fixed;
  top: 10px;
  left: 14px;
  z-index: 5;
  padding: 12px 18px;
  border-radius: 6px;
  color: white;
  background: var(--forest-deep);
}
.loading { min-height: 55vh; padding-block: 80px; }
.loading h1 { margin-bottom: 14px; font-size: clamp(2rem, 5vw, 4rem); }
.loading a { margin-top: 15px; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 3;
  border-bottom: 1px solid var(--rule);
  background: var(--paper);
}
.header-inner {
  min-height: var(--head-height);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: clamp(12px, 1.9vw, 24px);
}
.brand {
  display: inline-flex;
  justify-self: start;
  align-items: center;
  gap: 11px;
  width: max-content;
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 620;
  line-height: 1;
  letter-spacing: -.05em;
}
.brand-symbol {
  width: 41px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  color: #fbf2df;
  background: var(--forest);
  border-radius: 7px;
}
.brand-symbol .icon { width: 23px; height: 23px; }
.brand small {
  display: block;
  margin-top: 4px;
  font-family: var(--sans);
  font-size: .66rem;
  letter-spacing: .055em;
  font-weight: 740;
  color: var(--muted);
}
.primary-nav { display: flex; align-items: stretch; gap: clamp(13px, 1.7vw, 25px); }
.primary-nav a {
  position: relative;
  display: grid;
  place-items: center;
  min-height: var(--head-height);
  color: var(--muted);
  white-space: nowrap;
  font-size: .935rem;
  font-weight: 770;
}
.primary-nav a:hover, .primary-nav a[aria-current] { color: var(--accent); }
.primary-nav a[aria-current]::after {
  content: '';
  position: absolute;
  bottom: -1px;
  inset-inline: 0;
  height: 2px;
  background: var(--accent);
}
.header-actions {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 7px;
}
.global-search, .global-account {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px clamp(8px, 1.2vw, 13px);
  border: 1px solid var(--control-rule);
  border-radius: 6px;
  font-size: var(--text-note);
  font-weight: 800;
}
.header-actions .icon { width: 18px; height: 18px; }
.global-search:hover, .global-search[aria-current] { background: var(--clay); border-color: var(--accent); color: var(--accent); }
.global-account { background: var(--forest); border-color: var(--forest); color: var(--surface); }
.global-account:hover, .global-account[aria-current] { background: var(--forest-deep); border-color: var(--forest-deep); }

.landing { padding-top: var(--page-top); }
.village-intro {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr);
  gap: clamp(15px, 2.7vw, 34px);
}
.village-start { min-width: 0; }
.village-start .home-find { margin-top: clamp(12px, 1.6vw, 21px); }
.village-title h1 {
  margin: 0 0 13px;
  font-size: clamp(2.65rem, .55rem + 5.1vw, 5.25rem);
  font-weight: 550;
  letter-spacing: -.05em;
  line-height: 1.02;
  text-wrap: wrap;
}
.village-title h1 em {
  display: block;
  color: var(--forest);
  font-size: .73em;
  font-weight: 490;
  letter-spacing: -.048em;
  line-height: 1.12;
}
.village-subtitle { color: var(--muted); font-size: var(--text-lead); max-width: 38ch; }
.text-link, .external-text {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  color: var(--accent);
  font-size: var(--text-note);
  font-weight: 810;
}
.text-link .icon, .external-text .icon { width: 19px; height: 19px; }
.text-link:hover, .external-text:hover { text-decoration: underline; text-underline-offset: 4px; }
.village-feature {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--sand);
}
.intro-photo {
  position: relative;
  display: block;
  flex: 1 0 auto;
  min-height: 210px;
  isolation: isolate;
  overflow: hidden;
  background: var(--forest);
}
.intro-photo img { position: absolute; inset: 0; height: 100%; object-fit: cover; object-position: center 68%; }
.intro-photo::after {
  content: '';
  position: absolute;
  inset: 49% 0 0;
  background: linear-gradient(to top, #101b13e8, transparent);
  pointer-events: none;
}
.intro-photo span {
  position: absolute;
  z-index: 1;
  inset: auto 17px 13px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 9px;
  color: white;
  font-size: var(--text-note);
  font-weight: 790;
}
.intro-photo .icon { width: 21px; height: 21px; }
.intro-photo:hover span { text-decoration: underline; text-underline-offset: 3px; }
.intro-photo:focus-visible { outline: 2px solid var(--surface); outline-offset: -6px; }
.village-invitation { padding: clamp(12px, 1.35vw, 19px) var(--panel-padding) 4px; }
.village-invitation p {
  color: var(--forest);
  font-family: var(--serif);
  font-size: clamp(1.2rem, .92rem + .9vw, 1.7rem);
  font-weight: 560;
  line-height: 1.25;
  text-wrap: pretty;
}
.village-invitation .text-link { min-height: 44px; }

.browse-form {
  --form-line: var(--rule);
  --form-ink: var(--forest);
  --form-muted: var(--muted);
  --scope-fill: var(--sand);
  --scope-border: var(--control-rule);
  --field-bg: var(--surface);
  padding: 16px 18px 12px;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--surface);
}
.home-find .browse-form {
  --form-line: #738176;
  --form-ink: #fff9ec;
  --form-muted: #e2e7dd;
  --scope-fill: #40584b;
  --scope-border: #8e9c8e;
  --field-bg: #fffdf8;
  padding: 17px clamp(15px, 2.3vw, 32px) 12px;
  border-color: var(--forest);
  background: var(--forest);
}
.search-caption { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 3px 16px; margin-bottom: 9px; }
.search-caption label { color: var(--form-ink); font-family: var(--serif); font-size: var(--title-card); font-weight: 620; }
.search-caption p { color: var(--form-muted); font-size: var(--text-note); font-weight: 650; }
.browse-search {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 56px;
  padding: 4px;
  border: 1px solid var(--control-rule);
  border-radius: 7px;
  background: var(--field-bg);
}
.browse-search:focus-within { outline: 2px solid var(--accent); outline-offset: 1px; }
.home-find .browse-search:focus-within { outline-color: #f7bf83; }
.browse-search > .icon { width: 21px; height: 21px; margin-left: 9px; color: var(--accent); }
.browse-search input {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 42px;
  padding: 3px 3px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 650;
}
.browse-search input::placeholder { color: var(--muted); opacity: 1; }
.browse-search input::-webkit-search-cancel-button { -webkit-appearance: none; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 7px 13px;
  border: 1px solid transparent;
  border-radius: 6px;
  font-size: var(--text-note);
  font-weight: 810;
  line-height: 1.3;
}
.button .icon { width: 18px; height: 18px; }
.button.primary { background: var(--accent); color: white; }
.button.primary:hover { background: var(--accent-hover); }
.button.secondary { border-color: var(--control-rule); color: var(--forest); background: var(--surface); }
.button.secondary:hover { background: var(--sand); }
.browse-search .button { min-height: 46px; padding-inline: 17px; }
.clear-query {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--muted);
}
.clear-query:hover { background: var(--sand); }
.clear-query .icon { width: 17px; height: 17px; }
.search-tools {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px 14px;
  margin-top: 8px;
}
.search-tools:not(:has(.search-scopes)), .search-tools:has(details[open]) { grid-template-columns: minmax(0, 1fr); }
.search-scopes { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }
.scope-option {
  min-height: 40px;
  padding: 4px 11px;
  border: 1px solid transparent;
  border-radius: 5px;
  color: var(--form-ink);
  background: transparent;
  font-size: var(--text-note);
  font-weight: 750;
}
.scope-option:hover { background: var(--scope-fill); }
.scope-option[aria-pressed="true"] { border-color: var(--scope-border); background: var(--scope-fill); font-weight: 850; }
.home-find :is(.scope-option, .filter-disclosure summary, .clear-button):focus-visible { outline-color: #f7bf83; }
.filter-disclosure[open] { border-top: 1px solid var(--form-line); }
.filter-disclosure summary {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 7px;
  width: fit-content;
  min-height: 40px;
  padding-inline: 4px;
  cursor: pointer;
  color: var(--form-ink);
  font-size: var(--text-note);
  font-weight: 810;
}
.filter-disclosure summary::-webkit-details-marker { display: none; }
.filter-disclosure summary > .icon { width: 17px; height: 17px; }
.filter-disclosure summary > span {
  padding: 0 6px;
  border: 1px solid var(--scope-border);
  border-radius: 4px;
  background: var(--scope-fill);
  font-size: .69rem;
}
.filter-disclosure[open] .filter-chevron { transform: rotate(180deg); }
.search-filters { display: flex; flex-wrap: wrap; align-items: end; gap: 10px 14px; padding-bottom: 9px; }
.filter-label { display: grid; gap: 5px; color: var(--form-muted); font-size: var(--text-note); font-weight: 780; }
.filter-label :is(select, input), .sort-control select {
  min-height: 44px;
  padding: 6px 8px;
  border: 1px solid var(--control-rule);
  border-radius: 5px;
  color: var(--ink);
  background: var(--surface);
  font-size: var(--text-note);
}
.filter-label :is(select, input) { width: clamp(133px, 19vw, 245px); max-width: 100%; }
.year-field input { width: 119px; }
.clear-button { min-height: 44px; padding-inline: 6px; border: 0; background: none; color: var(--form-ink); font-size: var(--text-note); font-weight: 790; }
.clear-button:hover { text-decoration: underline; text-underline-offset: 3px; }

#results { margin-top: clamp(16px, 2vw, 24px); }
.discovery { display: grid; gap: clamp(25px, 3.2vw, 44px); }
.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 7px 20px;
  padding-bottom: 12px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--rule);
}
.section-heading .text-link { min-height: 34px; }
.story-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(14px, 1.9vw, 27px); }
.story-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--surface);
  transition: border-color 160ms, background 160ms;
}
.story-card:hover { border-color: #a98c77; background: #fffaf0; }
.story-image { aspect-ratio: 2; overflow: hidden; background: var(--sand); }
.story-image img { height: 100%; object-fit: cover; transition: transform 230ms ease; }
.story-card:hover img { transform: scale(1.035); }
.story-church .story-image img { object-position: center 38%; }
.story-community .story-image img { object-position: center 69%; }
.story-people-history .story-image img { object-position: center 33%; }
.story-text { position: relative; flex: 1; padding: var(--panel-padding); padding-bottom: 39px; }
.story-text :is(h2, h3) { font-size: var(--title-card); line-height: 1.22; text-wrap: pretty; }
.story-text p { margin-top: 8px; color: var(--muted); font-size: clamp(.94rem, .91rem + .17vw, 1rem); }
.card-arrow { position: absolute; inset: auto 17px 12px auto; color: var(--accent); }
.card-arrow .icon { width: 20px; height: 20px; }
.story-card .record-meta { margin-bottom: 8px; }
.record-meta { display: block; color: var(--accent); font-size: var(--text-note); font-weight: 780; line-height: 1.48; }

.home-today {
  padding: clamp(14px, 2.2vw, 26px);
  border: 1px solid #d4d9c8;
  border-radius: var(--radius);
  background: #edf0e7;
}
.home-today .section-heading { border-color: #d4d9c8; }
.today-page .page-intro { margin-bottom: 16px; }
.today-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 4px 22px;
  margin-bottom: clamp(16px, 2.2vw, 28px);
  padding: 6px var(--panel-padding) 10px;
  border: 1px solid #d4d9c8;
  border-radius: var(--radius);
  background: #edf0e7;
}
.today-toolbar .text-link { min-height: 44px; }
.today-jumps { display: flex; flex-wrap: wrap; gap: 0 18px; }
.today-jumps .text-link { color: var(--forest); }
.today-jumps .icon { width: 15px; height: 15px; }
.today-contribute p { margin-top: -4px; color: var(--muted); font-size: var(--text-note); }
.today-photo, .video-card {
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--surface);
}
.today-image { aspect-ratio: 16 / 10; overflow: hidden; background: var(--sand); }
.home-today .today-image { aspect-ratio: 1.85; }
.today-image img { height: 100%; object-fit: cover; }
.today-copy { min-width: 0; display: grid; gap: 6px; padding: var(--panel-padding); }
.today-copy h3 { font-size: var(--title-card); line-height: 1.23; }
.today-photo .today-copy h3 { font-size: clamp(1.09rem, 1rem + .52vw, 1.42rem); }
.today-meta, .video-status, .video-meta { color: var(--muted); font-size: var(--text-note); }
.today-credits { display: flex; flex-wrap: wrap; align-items: center; gap: 0 10px; }
.today-original, .today-license { display: inline-flex; align-items: center; gap: 3px; color: var(--forest); font-weight: 750; }
.today-credits a { min-height: 34px; font-size: .82rem; }
.today-credits .today-license { color: var(--muted); }
.today-original .icon, .today-license .icon { width: 14px; height: 14px; }
.today-original:hover, .today-license:hover { text-decoration: underline; text-underline-offset: 3px; }
.today-page > section + section { margin-top: clamp(24px, 3.1vw, 40px); }
.today-video-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: clamp(14px, 1.9vw, 27px); }
.today-video-external { border-top: 3px solid var(--forest); }
.today-video .external-text { justify-self: start; }
.today-description { color: var(--muted); font-size: var(--text-body); }
.video-player { aspect-ratio: 16 / 9; background: var(--forest-deep); }
.video-player video, .video-preview { display: block; width: 100%; height: 100%; }
.video-preview { position: relative; padding: 0; border: 0; background: none; color: #fffdf8; }
.video-preview:focus-visible { outline: 3px solid #fffdf8; outline-offset: -6px; }
.video-preview img { height: 100%; object-fit: cover; }
.today-video-portrait .video-preview img { object-fit: contain; }
.today-video-portrait .video-player:has(video) { aspect-ratio: auto; }
.today-video-portrait .video-player video { height: auto; max-height: min(70svh, 35rem); object-fit: contain; }
.video-preview::after { content: ''; position: absolute; inset: 0; background: linear-gradient(transparent 42%, #1b3128b8); }
.video-preview span {
  position: absolute;
  z-index: 1;
  left: var(--panel-padding);
  bottom: var(--panel-padding);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 46px;
  padding: 8px 14px;
  border-radius: 6px;
  background: var(--forest-deep);
  font-size: var(--text-note);
  font-weight: 800;
}
.video-preview:hover span { background: var(--accent-hover); }
.video-preview span .icon { width: 16px; height: 16px; }
.places-today { display: flex; width: fit-content; }

.home-timeline { padding: clamp(14px, 2.2vw, 26px); border: 1px solid var(--rule); border-radius: var(--radius); background: var(--sand); }
.home-timeline .section-heading { border-color: #d8cdb9; }
.era-nav { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(8px, 1.2vw, 15px); }
.era-nav a {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 4px;
  padding: clamp(12px, 1.45vw, 19px);
  border: 1px solid var(--rule);
  border-radius: 8px;
  background: var(--surface);
  color: var(--forest);
}
.era-nav a:hover { border-color: #a98c77; background: #fffaf0; }
.era-nav a:hover .era-years { color: var(--accent); }
.era-years { display: flex; align-items: center; gap: 4px 8px; justify-content: space-between; font-family: var(--serif); font-size: clamp(1.12rem, 2vw, 1.67rem); font-weight: 590; }
.era-years .icon { width: 19px; height: 19px; color: var(--accent); }
.era-title { color: var(--muted); font-size: var(--text-note); font-weight: 750; line-height: 1.4; text-wrap: pretty; }
.start-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 11px 14px; }
.start-card {
  min-width: 0;
  min-height: 72px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 13px;
  border: 1px solid var(--rule);
  border-radius: 7px;
  background: var(--surface);
}
.start-card:hover { border-color: #a98c77; background: var(--clay); }
.start-card strong { display: block; font-size: .975rem; line-height: 1.36; font-weight: 800; }
.start-card small { display: block; margin-top: 3px; color: var(--muted); font-size: var(--text-note); font-weight: 640; }
.start-icon { display: grid; place-items: center; width: 36px; height: 36px; flex: 0 0 auto; border-radius: 5px; color: var(--accent); background: var(--clay); }
.start-icon .icon { width: 19px; height: 19px; }
.start-arrow { width: 18px; height: 18px; margin-left: auto; color: var(--accent); }

.material-grid { margin: 0; padding: 0; list-style: none; }
.material-grid .start-card { height: 100%; overflow-wrap: anywhere; }
.period-intro {
  display: grid;
  gap: clamp(15px, 3vw, 35px);
  align-items: center;
  padding: clamp(18px, 3.2vw, 38px);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--sand);
}
.period-illustrated { grid-template-columns: minmax(0, 1.28fr) minmax(0, 1fr); }
.period-copy { min-width: 0; }
.period-copy h1 { max-width: 21ch; margin-top: 5px; font-size: var(--title-page); line-height: 1.1; }
.period-summary { max-width: 65ch; margin-top: 12px; color: var(--muted); font-size: var(--text-lead); }
.period-timeline-link { margin-top: 13px; }
.period-cover { min-width: 0; overflow: hidden; border: 1px solid var(--rule); border-radius: 9px; background: var(--surface); }
.period-cover img { aspect-ratio: 1.72; object-fit: cover; object-position: center 40%; }
.period-cover figcaption { padding-inline: 12px; }
.period-cover .text-link { min-height: 44px; }
.period-section { margin-top: clamp(24px, 4vw, 49px); }
.period-section .story-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr)); }
.event-materials { margin-top: clamp(23px, 3vw, 35px); }
.event-materials .material-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 13.5rem), 1fr)); }

.inner-page { padding-top: var(--page-top); }
.page-intro { margin-bottom: clamp(14px, 1.8vw, 23px); }
.page-intro h1, .detail-title h1 { font-size: var(--title-page); line-height: 1.1; letter-spacing: -.04em; }
.page-intro h1 { max-width: 26ch; }
.page-intro p { margin-top: 6px; color: var(--muted); font-size: var(--text-lead); max-width: var(--reading-width); }
.browse-page .page-intro { margin-bottom: 16px; }
.page-tabs { display: flex; flex-wrap: wrap; gap: 6px 24px; border-bottom: 1px solid var(--rule); margin-bottom: 17px; }
.page-tabs a { position: relative; display: grid; place-items: center; min-height: 45px; padding-inline: 2px; color: var(--muted); font-size: .95rem; font-weight: 790; }
.page-tabs a:hover, .page-tabs a[aria-current] { color: var(--accent); }
.page-tabs a[aria-current]::after { content: ''; position: absolute; bottom: -1px; inset-inline: 0; height: 2px; background: var(--accent); }
.people-directory { padding-top: clamp(15px, 2.2vw, 30px); }
.people-directory .people-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 0 24px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--rule);
}
.people-directory .page-intro { margin: 0 0 11px; }
.people-directory .page-intro h1 { font-size: clamp(1.9rem, 1.46rem + 1.65vw, 2.95rem); }
.people-directory .page-intro p { margin-top: 5px; font-size: var(--text-note); }
.people-directory .page-tabs { gap: 0 18px; margin: 0; border: 0; }
.people-directory .page-tabs a { min-height: 44px; font-size: var(--text-note); }
.people-directory .page-tabs .people-story-link { display: inline-flex; gap: 5px; color: var(--accent); }
.people-directory .people-story-link .icon { width: 15px; height: 15px; }
.people-directory .browse-form { padding: 10px; }
.people-toolbar { display: grid; grid-template-columns: minmax(0, 1fr) minmax(155px, 230px) auto; align-items: center; gap: 8px; }
.people-toolbar > .browse-search { min-height: 48px; padding: 2px; gap: 6px; }
.people-toolbar .browse-search input, .people-toolbar .browse-search .button { min-height: 44px; }
.people-toolbar .filter-label { min-width: 0; }
.people-toolbar .filter-label select { width: 100%; min-width: 0; min-height: 48px; }
.people-filter-toggle { min-height: 48px; white-space: nowrap; }
.people-filter-toggle[aria-expanded="true"] { background: var(--sand); }
.people-filter-toggle > span { padding: 0 5px; border-radius: 4px; background: var(--sand); }
.people-filters { margin-top: 9px; padding: 10px 2px 1px; border-top: 1px solid var(--form-line); }
.filters { display: flex; flex-wrap: wrap; gap: 7px; }
.pill { display: inline-flex; align-items: center; min-height: 44px; padding: 5px 13px; border: 1px solid var(--control-rule); border-radius: 5px; background: var(--surface); color: var(--forest); font-size: var(--text-note); font-weight: 750; }
.pill.selected, .pill:hover { border-color: var(--accent); color: var(--accent); background: var(--clay); }
.timeline-controls { display: grid; grid-template-columns: minmax(96px, 155px) minmax(0, 240px) minmax(0, 220px); gap: 10px; }
.timeline-controls select { width: 100%; min-width: 0; }
.timeline-content { margin-top: 24px; }
.timeline-results { display: flex; align-items: center; flex-wrap: wrap; justify-content: space-between; gap: 5px 12px; max-width: 920px; }
.timeline-period { max-width: 920px; margin-top: 13px; }
.timeline-period + .timeline-period { margin-top: clamp(26px, 3vw, 40px); }
.timeline-period > h2 { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 14px; padding: 11px 13px; border-radius: 6px; background: var(--sand); font-size: var(--title-card); text-wrap: initial; }
.timeline-period > h2 span { flex-shrink: 0; color: var(--accent); font-family: var(--sans); font-size: var(--text-note); font-weight: 800; letter-spacing: 0; }
.timeline-empty { margin-top: 12px; color: var(--muted); }
.timeline { max-width: 920px; padding: 0; margin: 10px 0 0; list-style: none; }
.timeline li { display: grid; grid-template-columns: minmax(105px, 160px) minmax(0, 1fr); }
.timeline-date { padding: 18px 15px 14px 0; color: var(--forest); font-family: var(--serif); font-size: clamp(.9rem, 2vw, 1.28rem); font-weight: 625; }
.timeline-entry { position: relative; display: block; min-height: 100%; padding: 15px 42px 15px 22px; border-left: 1px solid #c3ac95; border-bottom: 1px solid var(--rule); }
.timeline-entry::before { content: ''; position: absolute; top: 22px; left: -5px; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); }
.timeline-entry:hover { background: var(--surface); }
.timeline-entry h3 { margin: 4px 0; font-size: var(--title-card); }
.timeline-entry p { color: var(--muted); font-size: .95rem; }
.timeline-entry .result-arrow { position: absolute; top: 20px; right: 14px; }

.figures-tools { display: flex; justify-content: space-between; align-items: end; flex-wrap: wrap; gap: 8px 20px; margin-bottom: 18px; }
.figures-tools form { width: min(100%, 300px); }
.figure-card {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: var(--panel-padding);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--surface);
}
.figure-card h2 { font-size: var(--title-card); text-wrap: pretty; }
.figure-name { display: flex; justify-content: space-between; align-items: start; gap: 8px; }
.figure-name:hover { color: var(--accent); }
.figure-name .icon { width: 19px; height: 19px; margin-top: 3px; color: var(--accent); }
.figure-period { font-size: var(--text-note); color: var(--muted); }
.figure-connection { margin-bottom: 7px; font-size: var(--text-body); }
.figure-source {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 7px;
  min-height: 44px;
  margin-top: auto;
  padding: 8px 0 0;
  border-top: 1px solid var(--rule);
  color: var(--accent);
  font-size: var(--text-note);
  font-weight: 750;
  line-height: 1.42;
  overflow-wrap: anywhere;
}
.figure-source:hover { color: var(--accent-hover); text-decoration: underline; text-underline-offset: 3px; }
.figure-source .icon { width: 15px; height: 15px; }

.result-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; margin-bottom: 10px; }
.result-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 15px; }
.result-totals { display: flex; flex-wrap: wrap; gap: 1px 12px; align-items: baseline; }
.result-count { color: var(--ink); font-size: .91rem; font-weight: 830; }
.result-range { color: var(--muted); font-size: var(--text-note); font-weight: 650; }
.sort-control select { max-width: 100%; }
.results-list { padding: 0; margin: 0; list-style: none; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--surface); }
.result-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 0 10px; padding: 0 14px 0 0; }
.result-row + .result-row { border-top: 1px solid var(--rule); }
.record-link { min-width: 0; display: flex; gap: 14px; align-items: flex-start; padding: 15px 10px 15px 16px; }
.record-link:hover .result-content strong { color: var(--accent); text-decoration: underline; text-underline-offset: 4px; }
.record-link:focus-visible { outline-offset: -3px; }
.result-type { display: grid; place-items: center; flex: 0 0 37px; height: 37px; border-radius: 6px; background: var(--clay); color: var(--accent); }
.result-type .icon { width: 19px; height: 19px; }
.result-content { flex: 1 1 auto; min-width: 0; display: grid; gap: 4px; overflow-wrap: anywhere; }
.result-content strong { font-size: clamp(1.05rem, 1rem + .23vw, 1.14rem); line-height: 1.35; font-weight: 810; }
.result-description { max-width: var(--reading-width); color: var(--muted); font-size: .95rem; line-height: 1.55; }
.result-evidence { color: var(--forest); font-size: var(--text-note); font-weight: 735; }
.result-arrow { width: 18px; height: 18px; color: var(--accent); }
.record-link .result-arrow { margin-top: 6px; }
.result-source {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
  border: 1px solid var(--control-rule);
  border-radius: 5px;
  color: var(--forest);
  font-size: var(--text-note);
  font-weight: 810;
}
.result-source:hover { border-color: var(--accent); color: var(--accent); }
.result-source .icon { width: 14px; height: 14px; }
.people-directory #results { margin-top: 13px; }
.people-directory .result-top { margin-bottom: 8px; }
.people-directory .result-actions .text-link { min-height: 44px; font-size: var(--text-note); }
.people-directory .record-link { gap: 11px; padding: 10px 8px 10px 13px; }
.people-directory .result-type { flex-basis: 31px; height: 31px; }
.people-directory .result-type .icon { width: 17px; height: 17px; }
.people-directory .result-content { gap: 2px; }
.people-directory .result-description { font-size: var(--text-note); line-height: 1.45; }
.paginate { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 9px; padding-top: 16px; color: var(--muted); font-size: var(--text-note); font-weight: 750; }
.paginate span:last-child { justify-self: end; }
.empty { display: grid; justify-items: start; gap: 10px; padding: 24px; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--surface); }
.inner-page.empty { min-height: 0; margin-top: 29px; }
.empty h1, .empty h2 { font-size: clamp(1.6rem, 3.2vw, 2.45rem); }
.empty p { color: var(--muted); }
.view-icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 6px; background: var(--clay); color: var(--accent); }

.detail-top { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 4px 14px; margin-bottom: clamp(14px, 2.2vw, 27px); }
.detail-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.detail-sources-jump { display: none; }
.back-link { display: inline-flex; align-items: center; gap: 7px; min-height: 44px; color: var(--accent); font-size: var(--text-note); font-weight: 800; }
.back-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.back-link .icon { width: 19px; height: 19px; }
.detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) clamp(230px, 25vw, 310px); align-items: start; gap: clamp(22px, 4.1vw, 52px); }
.detail-title { margin-bottom: clamp(17px, 2vw, 24px); }
.detail-title > .record-meta { margin-bottom: 7px; }
.detail-title h1 { font-size: var(--title-detail); }
.detail-ref { margin-top: 10px; color: var(--accent); font-size: 1rem; font-weight: 800; overflow-wrap: anywhere; }
.detail-summary { max-width: var(--reading-width); margin-top: 10px; color: var(--muted); font-size: var(--text-lead); }
.detail-video-jump { margin-top: 14px; }
.evidence-line { display: inline-flex; align-items: center; gap: 6px; margin-top: 12px; padding: 4px 8px; border-radius: 5px; background: var(--clay); color: var(--accent); font-size: var(--text-note); font-weight: 780; }
.evidence-line .icon { width: 16px; height: 16px; }
.detail-aside { position: sticky; top: calc(var(--head-height) + 25px); min-width: 0; }
.source-box { padding: var(--panel-padding); border: 1px solid var(--rule); border-radius: var(--radius); background: var(--surface); }
.source-box h2 { display: flex; align-items: center; gap: 8px; font-size: var(--title-card); }
.source-box h2 .icon { color: var(--accent); }
.source-box ul { padding: 0; margin: 11px 0 0; list-style: none; }
.source-box li + li { border-top: 1px solid var(--rule); }
.source-box a { min-height: 44px; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-block: 8px; color: var(--forest); font-size: var(--text-note); font-weight: 780; overflow-wrap: anywhere; }
.source-box a:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.source-box a .icon { width: 16px; height: 16px; align-self: center; }
.detail-aside > p, .source-box > p { margin-top: 13px; color: var(--muted); font-size: var(--text-note); }
.detail-image { margin-bottom: clamp(20px, 2.5vw, 32px); }
.detail-image img { width: auto; max-width: 100%; max-height: min(64vh, 34rem); margin-inline: auto; border-radius: var(--radius); }
.document-scan { padding: clamp(10px, 1.5vw, 18px); border: 1px solid var(--rule); border-radius: var(--radius); background: var(--surface); }
.document-scan img { max-height: min(78vh, 42rem); border-radius: 3px; }
.detail-image figcaption { display: flex; justify-content: center; margin-top: 6px; color: var(--muted); font-size: var(--text-note); }
.detail-image figcaption a { display: inline-flex; align-items: center; gap: 5px; }
.detail-image figcaption a:hover { text-decoration: underline; }
.detail-image figcaption .icon { width: 13px; height: 13px; }
.detail-image .scan-action { min-height: 44px; color: var(--accent); font-weight: 800; }
.article-section { padding: 0 0 22px; margin: 0 0 24px; border-bottom: 1px solid var(--rule); }
.article-section h2, .related-people h2 { margin-bottom: 9px; font-size: var(--title-card); text-wrap: pretty; }
.article-section p { max-width: var(--reading-width); color: var(--ink); font-size: var(--text-body); line-height: 1.74; }
.section-sources { display: flex; flex-wrap: wrap; gap: 4px 15px; padding: 0; margin: 8px 0 0; list-style: none; }
.section-sources a { min-height: 36px; display: inline-flex; align-items: center; gap: 4px; color: var(--accent); font-size: var(--text-note); font-weight: 780; overflow-wrap: anywhere; }
.section-sources a:hover { text-decoration: underline; text-underline-offset: 3px; }
.section-sources .icon { width: 15px; height: 15px; }
.detail-links { display: flex; flex-wrap: wrap; gap: 8px; }
.detail-cta { min-height: 44px; padding: 8px 10px; border: 1px solid var(--control-rule); border-radius: 6px; background: var(--surface); }
.article-videos { margin-top: clamp(22px, 3.5vw, 42px); }
.article-video-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 235px), 1fr)); gap: clamp(12px, 1.8vw, 22px); align-items: start; }
.article-video:focus { outline: 2px solid var(--accent); outline-offset: 4px; }
.article-video .video-player { position: relative; aspect-ratio: 16 / 10; overflow: hidden; }
.article-video .video-preview { position: absolute; inset: 0; }
#article-video-spohad .video-preview img { object-position: center 20%; }
.article-video .video-player:has(video) { aspect-ratio: auto; }
.article-video .video-player video { height: auto; max-height: min(65svh, 32rem); object-fit: contain; }
.article-video-copy { display: grid; gap: 5px; padding: var(--panel-padding); }
.article-video-copy h3 { font-size: var(--title-card); }
.article-video-copy a { color: var(--forest); font-weight: 750; text-decoration: underline; }
.record-fields { border: 1px solid var(--rule); border-radius: var(--radius); background: var(--surface); }
.record-fields > div { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); align-items: baseline; gap: 12px; padding: 12px 15px; }
.record-fields > div + div { border-top: 1px solid var(--rule); }
.record-fields dt { color: var(--muted); font-size: var(--text-note); font-weight: 780; overflow-wrap: anywhere; }
.record-fields dd { font-size: .96rem; font-weight: 660; overflow-wrap: anywhere; white-space: pre-line; }
.record-note { max-width: var(--reading-width); margin-top: 15px; color: var(--muted); font-size: .95rem; }
.related-people { margin-top: 28px; }
.roster-section { margin-bottom: 26px; }
.roster-section .section-heading { align-items: center; }
.roster-section h2 { font-size: var(--title-card); }
.roster-list { margin: 0; padding: 0; list-style: none; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--surface); }
.roster-list li { display: grid; grid-template-columns: 29px minmax(0, 1fr); align-items: start; gap: 12px; padding: 12px 13px; }
.roster-list li + li { border-top: 1px solid var(--rule); }
.roster-number { display: grid; place-items: center; height: 28px; border-radius: 5px; background: var(--clay); color: var(--accent); font-size: var(--text-note); font-weight: 800; }
.roster-list a { display: grid; grid-template-columns: minmax(0, 1fr) auto 17px; gap: 3px 10px; align-items: center; min-height: 43px; }
.roster-list a:hover strong { color: var(--accent); text-decoration: underline; }
.roster-list strong { overflow-wrap: anywhere; font-size: var(--text-body); line-height: 1.38; }
.roster-year, .roster-list small { color: var(--muted); font-size: var(--text-note); }
.roster-year { grid-column: 2; white-space: nowrap; }
.roster-list small { grid-column: 1 / -1; line-height: 1.45; }
.roster-arrow { grid-column: 3; grid-row: 1; width: 17px; height: 17px; color: var(--accent); }
.memories-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(270px, .5fr); align-items: start; gap: clamp(18px, 3.5vw, 44px); }
.memory-panel h2 { margin-bottom: 8px; font-size: var(--title-card); }
.memory-card, .memory-panel, .memory-invite { padding: var(--panel-padding); border: 1px solid var(--rule); border-radius: var(--radius); background: var(--surface); }
.memory-invite {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 14px;
  padding: 12px 14px 6px;
  border-left: 3px solid var(--forest);
}
.memory-invite h2 { color: var(--forest); font-size: clamp(1.12rem, 1rem + .5vw, 1.45rem); text-wrap: pretty; }
.memory-invite p { margin-top: 4px; color: var(--muted); font-size: var(--text-note); }
.memory-invite .button { justify-self: start; }
.memory-rules { grid-column: 1 / -1; min-width: 0; }
.memory-rules summary { width: fit-content; min-height: 36px; padding-block: 7px; color: var(--forest); cursor: pointer; font-size: var(--text-note); font-weight: 790; }
.memory-rules summary::marker { color: var(--accent); }
.memory-rules ul { margin: 0 0 8px; padding-inline-start: 1.1rem; color: var(--muted); font-size: var(--text-note); line-height: 1.5; }
.memory-rules li + li { margin-top: 4px; }
.memory-rules li::marker { color: var(--accent); }
.memory-invite + .memory-feed { margin-top: 14px; }
.memory-feed .section-heading { align-items: end; }
.memory-year-filter { display: flex; flex-wrap: wrap; align-items: end; gap: 5px 8px; }
.memory-year-filter label { display: grid; gap: 4px; color: var(--muted); font-size: var(--text-note); font-weight: 750; }
.memory-year-filter input { width: 108px; min-height: 44px; padding: 6px 8px; border: 1px solid var(--control-rule); border-radius: 5px; background: var(--surface); color: var(--ink); }
.memory-card { padding: clamp(12px, 1.5vw, 18px); }
.memory-card + .memory-card { margin-top: 10px; }
.memory-card h3 { font-size: clamp(1.125rem, 1.05rem + .36vw, 1.4rem); }
.memory-byline { display: flex; flex-wrap: wrap; gap: 2px 9px; margin: 4px 0 7px; color: var(--accent); font-size: var(--text-note); font-weight: 790; line-height: 1.45; overflow-wrap: anywhere; }
.memory-byline time { color: var(--muted); font-weight: 650; }
.memory-period { color: var(--forest); }
.memory-body { max-width: var(--reading-width); font-size: var(--text-body); line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; }
.memory-photos { display: grid; grid-template-columns: repeat(4, minmax(0, 104px)); gap: 7px; margin-top: 10px; }
.memory-photo { position: relative; display: block; aspect-ratio: 4 / 3; overflow: hidden; border-radius: 6px; background: var(--sand); cursor: zoom-in; }
.memory-photo img { position: absolute; inset: 0; height: 100%; object-fit: cover; }
.memory-photo-expand {
  position: absolute;
  inset: auto 4px 4px auto;
  display: grid;
  place-items: center;
  width: 21px;
  height: 21px;
  border-radius: 4px;
  background: rgb(27 49 40 / .9);
  color: #fffdf8;
  font-size: .85rem;
  line-height: 1;
}
.memory-photo:hover .memory-photo-expand { background: var(--accent); }
.memory-photo-viewer {
  width: min(920px, calc(100% - 24px));
  max-height: calc(100% - 24px);
  padding: 0;
  border: 1px solid var(--forest);
  border-radius: var(--radius);
  background: var(--forest-deep);
  color: var(--surface);
}
.memory-photo-viewer[open] {
  display: flex;
  flex-direction: column;
  height: min(840px, calc(100% - 24px));
  height: min(840px, calc(100dvh - 24px));
}
.memory-photo-viewer::backdrop { background: rgb(20 31 26 / .78); }
html:has(.memory-photo-viewer[open]) { overflow: hidden; }
.memory-photo-toolbar { display: flex; flex-shrink: 0; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 10px 8px 14px; }
.memory-photo-toolbar p { min-width: 0; font-size: var(--text-note); line-height: 1.35; overflow-wrap: anywhere; }
.memory-photo-viewer :focus-visible { outline-color: #f7bf83; }
.memory-photo-stage {
  display: grid;
  place-items: center;
  flex: 1 1 0;
  grid-template: minmax(0, 1fr) / minmax(0, 1fr);
  min-height: 0;
  padding-inline: 8px;
  overflow: hidden;
  overflow: clip;
  touch-action: none;
  user-select: none;
  cursor: zoom-in;
}
.memory-photo-stage img { width: 100%; height: 100%; object-fit: scale-down; }
.memory-photo-stage[data-zoomed] { cursor: grab; }
.memory-photo-stage[data-zoomed]:active { cursor: grabbing; }
.memory-photo-footer { display: flex; flex-shrink: 0; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px 18px; padding: 8px 10px 10px; }
.memory-photo-controls, .memory-photo-zoom { display: flex; align-items: center; gap: 8px; }
.memory-photo-footer .button { min-width: 44px; padding-inline: 8px; font-size: 1.15rem; line-height: 1; }
.memory-photo-zoom [data-photo-zoom-reset] { min-width: 58px; font-size: var(--text-note); font-variant-numeric: tabular-nums; }
.memory-photo-count { min-width: 10ch; text-align: center; font-size: var(--text-note); font-variant-numeric: tabular-nums; }
.memory-social { margin-top: 13px; padding-top: 8px; border-top: 1px solid var(--rule); }
.memory-social-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 5px 12px; }
.memory-reactions, .memory-emoji-options { display: flex; flex-wrap: wrap; gap: 4px; }
.memory-reaction {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 44px;
  min-height: 44px;
  padding: 4px 7px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--forest);
  font-size: 1.1rem;
  line-height: 1;
}
.memory-reaction:hover, .memory-emoji-picker summary:hover { background: var(--sand); }
.memory-reaction[aria-pressed="true"] { border-color: var(--accent); background: var(--clay); }
.memory-reaction-count, .memory-comment-count { font-size: var(--text-note); font-weight: 790; font-variant-numeric: tabular-nums; }
.memory-reaction-count:empty { display: none; }
.memory-comment-count { color: var(--muted); }
.memory-reaction-sign-in, .memory-comments > p { color: var(--muted); font-size: var(--text-note); }
.memory-comments .memory-status { color: var(--accent); }
.memory-reaction-sign-in { margin-top: 5px; }
.memory-comments { margin-top: 12px; }
.memory-comment-form { padding-bottom: 0; }
.memory-comment-form textarea { min-height: 64px; }
.memory-comment-actions { display: flex; flex-wrap: wrap; align-items: start; gap: 6px; }
.memory-emoji-picker { max-width: 100%; }
.memory-emoji-picker summary {
  display: grid;
  place-items: center;
  width: 44px;
  min-height: 44px;
  border: 1px solid var(--control-rule);
  border-radius: 6px;
  cursor: pointer;
  font-size: 1.1rem;
  list-style: none;
}
.memory-emoji-picker summary::-webkit-details-marker { display: none; }
.memory-emoji-options { margin-top: 5px; }
.memory-comments :is(.memory-status, .memory-comments-empty, .memory-comments-older) { margin-top: 9px; }
.memory-comment-list { margin: 8px 0 0; padding: 0; list-style: none; }
.memory-comment-list:empty { display: none; }
.memory-comment { padding: 8px 0; border-top: 1px solid var(--rule); }
.memory-comment-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 9px; font-size: var(--text-note); overflow-wrap: anywhere; }
.memory-comment-meta time { color: var(--muted); }
.memory-comment-delete { min-height: 44px; padding: 0 5px; border: 0; border-radius: 5px; background: none; color: var(--accent); font-weight: 750; }
.memory-comment-delete:hover { text-decoration: underline; }
.memory-comment p { white-space: pre-wrap; overflow-wrap: anywhere; }
.memory-panel > p { color: var(--muted); font-size: .95rem; margin-bottom: 10px; }
.memory-panel details { border-top: 1px solid var(--rule); }
.memory-panel summary { min-height: 44px; padding: 11px 0; cursor: pointer; color: var(--accent); font-size: .95rem; font-weight: 795; }
.memory-form { display: grid; gap: 10px; padding-bottom: 6px; }
.memory-form label { display: grid; min-width: 0; gap: 5px; font-size: var(--text-note); font-weight: 790; }
.memory-form :is(input, textarea) { width: 100%; min-width: 0; min-height: 44px; padding: 8px; border: 1px solid var(--control-rule); border-radius: 5px; background: white; color: var(--ink); font-size: 1rem; font-weight: 600; }
.memory-form textarea { resize: vertical; }
.memory-form .button { justify-self: start; }
.memory-form .button:disabled { opacity: .65; cursor: wait; }
.memory-form small, .memory-status { color: var(--muted); font-size: var(--text-note); }
.memory-form .text-link { justify-self: start; }
.memory-period-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; min-width: 0; margin: 0; padding: 7px 8px 9px; border: 1px solid var(--rule); border-radius: 6px; }
.memory-period-fields legend { padding-inline: 4px; color: var(--forest); font-size: var(--text-note); font-weight: 800; }
.memory-manage { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: start; gap: 6px 12px; margin-top: 14px; padding-top: 9px; border-top: 1px solid var(--rule); }
.memory-manage details { flex: 1 1 180px; min-width: 0; }
.memory-manage summary { min-height: 44px; padding: 10px 0; color: var(--forest); cursor: pointer; font-size: var(--text-note); font-weight: 800; }
.memory-manage .memory-form { padding-bottom: 0; }
.memory-manage .memory-delete { color: var(--accent); }
.memory-status { color: var(--accent); }
.memory-status:empty { display: none; }
.memory-author { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 10px; margin-bottom: 8px; font-size: var(--text-note); font-weight: 800; }
.memory-author > span { overflow-wrap: anywhere; }
.memory-notice { margin-bottom: 14px; padding: 8px 12px; border-left: 3px solid var(--forest); background: var(--sand); color: var(--forest); }

.google-entry { margin: 10px 0 13px; }
.google-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 44px;
  padding: 7px 12px;
  border: 1px solid #747775;
  border-radius: 6px;
  background: #fff;
  color: #1f1f1f;
  font: 560 .875rem/1.45 "Google Sans", Roboto, var(--sans);
}
.google-button img { flex: 0 0 18px; width: 18px; height: 18px; }
.google-button[href]:hover { background: #f3f6fc; }

.account-entry, .account-layout { display: grid; align-items: start; gap: clamp(18px, 3.5vw, 42px); }
.account-entry { grid-template-columns: minmax(0, 1.12fr) minmax(280px, .88fr); }
.account-welcome, .account-banner {
  min-width: 0;
  border-radius: var(--radius);
  background: radial-gradient(ellipse at top left, #345649, var(--forest-deep) 72%);
  color: #fffaf0;
}
.account-welcome { padding: clamp(23px, 4.3vw, 54px); }
.account-welcome h1 { max-width: 12ch; font-size: var(--title-page); }
.account-welcome p { max-width: 35ch; margin-top: 12px; color: #e2eae3; font-size: var(--text-lead); }
.account-read-link { display: inline-flex; align-items: center; min-height: 44px; margin-top: 8px; color: #f6deb6; font-weight: 750; }
.account-read-link:hover { text-decoration: underline; text-underline-offset: 4px; }
.account-banner { display: flex; flex-wrap: wrap; align-items: center; gap: clamp(12px, 2.2vw, 27px); padding: clamp(16px, 3.5vw, 38px); }
.account-avatar {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: clamp(48px, 6vw, 74px);
  aspect-ratio: 1;
  border: 1px solid #e1cba7;
  border-radius: 50%;
  background: #f2e6cf;
  color: var(--forest-deep);
  font-family: var(--serif);
  font-size: clamp(1.2rem, 2.25vw, 1.9rem);
  font-weight: 650;
}
.account-greeting { flex: 1 1 196px; min-width: 0; }
.account-greeting p { margin-bottom: 3px; color: #e2eae3; font-size: var(--text-note); font-weight: 700; }
.account-greeting h1 { font-size: var(--title-detail); text-wrap: pretty; }
.account-page h1[tabindex]:focus { outline: none; }
.account-banner .button { background: #f2e6cf; color: var(--forest-deep); }
.account-banner .button:hover { background: #fbefd9; }
.account-welcome a:focus-visible, .account-banner a:focus-visible { outline-color: #f7bf83; }
.account-layout { grid-template-columns: minmax(0, 1fr) minmax(250px, .48fr); margin-top: clamp(20px, 3vw, 36px); }
.account-memories .section-heading { align-items: center; }
.account-count { color: var(--muted); font-weight: 800; }
.account-empty p { color: var(--muted); }
.account-empty .text-link { margin-top: 4px; }
.account-identity { margin-bottom: 13px; }
.account-identity > div { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 3px 12px; padding: 6px 0; }
.account-identity dt { color: var(--muted); font-size: var(--text-note); }
.account-identity dd { min-width: 0; color: var(--forest); font-size: var(--text-note); font-weight: 800; overflow-wrap: anywhere; }
.account-recovery { margin-top: 9px; }
.account-recovery-note { margin-bottom: 8px; color: var(--muted); font-size: var(--text-note); overflow-wrap: anywhere; }
.account-recovery-page { max-width: 30rem; }
.account-recovery-page h1 { margin-bottom: 12px; font-size: var(--title-section); }
.account-sign-out { margin-top: 11px; padding-top: 12px; border-top: 1px solid var(--rule); }
.map-feature { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(16px, 4vw, 50px); align-items: center; margin-bottom: 24px; padding: 17px; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--surface); }
.map-image { overflow: hidden; border-radius: 7px; }
.map-feature h2 { margin-top: 4px; }
.map-feature p { margin: 8px 0 12px; color: var(--muted); font-size: var(--text-body); }
.places-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.reading-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(225px, 1fr); align-items: start; gap: clamp(20px, 4vw, 48px); }
.reading-grid > section:first-child h2 { margin: 21px 0 9px; font-size: var(--title-card); }
.reading-grid > section:first-child h2:first-child { margin-top: 0; }
.reading-grid > section:first-child p { margin-bottom: 12px; max-width: var(--reading-width); color: var(--muted); font-size: var(--text-body); }
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.16fr);
  align-items: start;
  gap: clamp(14px, 2.4vw, 28px);
}
.contact-panel { padding: var(--panel-padding); border: 1px solid var(--rule); border-radius: var(--radius); background: var(--surface); }
.contact-panel h2 { font-size: var(--title-card); }
.contact-panel p { margin-top: 8px; color: var(--muted); }
.contact-panel .contact-note { font-size: var(--text-note); }
.contact-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin-top: 13px; }
.contact-email { overflow-wrap: anywhere; color: var(--forest); }
.support-panel { border-color: #d4d9c8; background: #edf0e7; }
.contact-panel .support-free { color: var(--forest); }
.support-wallet { margin-top: 14px; padding: 0 12px 8px; border: 1px solid #d4d9c8; border-radius: 7px; background: var(--surface); }
.support-wallet summary { min-height: 44px; padding-block: 10px; color: var(--forest); font-weight: 750; cursor: pointer; }
.wallet-details { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 12px; margin: 6px 0; }
.wallet-details dt { color: var(--muted); font-size: var(--text-note); }
.wallet-details dd { margin: 2px 0 0; font-weight: 750; overflow-wrap: anywhere; }
.wallet-address { grid-column: 1 / -1; }
.wallet-address code { display: block; padding: 9px; border-radius: 5px; background: var(--sand); user-select: all; }
.support-wallet .button { margin-top: 9px; }
.support-contribute { margin-top: 14px; padding-top: 4px; border-top: 1px solid #d4d9c8; }
.support-contribute .text-link { min-height: 44px; }

.site-footer { margin-top: clamp(40px, 6vw, 86px); padding: clamp(22px, 3vw, 36px) 0; background: var(--forest-deep); color: #fff8eb; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 18px 22px; }
.footer-inner p, .site-footer .brand small { color: #dce3d7; }
.footer-inner p { margin-top: 8px; font-size: var(--text-note); font-weight: 650; }
.site-footer .brand-symbol { color: var(--forest-deep); background: #f4e9d4; }
.site-footer :focus-visible { outline-color: #f7bf83; }
.footer-inner nav { display: flex; flex-wrap: wrap; gap: 6px 21px; font-size: var(--text-note); font-weight: 735; }
.footer-inner nav a { display: grid; align-items: center; min-height: 34px; }
.footer-inner nav a:hover, .footer-inner nav a[aria-current] { text-decoration: underline; text-underline-offset: 4px; }

@media (max-width: 920px) {
  :root { --shell: calc(100% - 52px); }
  .start-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 840px) {
  :root { --head-height: 96px; }
  .header-inner { min-height: var(--head-height); grid-template-columns: 1fr auto; gap: 0 12px; padding-block: 7px 0; }
  .header-inner > .brand { align-self: center; }
  .brand-symbol { width: 35px; }
  .brand-symbol .icon { width: 20px; height: 20px; }
  .header-actions { grid-column: 2; grid-row: 1; }
  .primary-nav { grid-column: 1 / -1; justify-content: space-between; flex-wrap: wrap; gap: 0 6px; align-self: end; }
  .primary-nav a { min-height: 44px; padding-inline: 3px; font-size: clamp(.8rem, .74rem + .25vw, .92rem); }
}

@media (max-width: 760px) {
  :root { --shell: calc(100% - 32px); }
  .story-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .today-video-grid { grid-template-columns: minmax(0, 1fr); }
  .era-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .detail-grid, .reading-grid, .contact-grid, .memories-layout, .account-entry, .account-layout { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .detail-aside { position: static; }
  .detail-sources-jump { display: inline-flex; }
}

@media (max-width: 680px) {
  .people-toolbar { grid-template-columns: minmax(0, 1fr) auto; }
  .people-toolbar > .browse-search { grid-column: 1 / -1; }
  .period-illustrated { grid-template-columns: 1fr; }
  .timeline-controls { grid-template-columns: minmax(96px, 2fr) minmax(0, 3fr); }
  .timeline-controls label:last-child { grid-column: 1 / -1; }
  .village-intro { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .village-title h1 { margin-bottom: 7px; font-size: clamp(2.5rem, .8rem + 6.25vw, 3.65rem); }
  .village-title h1 em { display: inline-block; white-space: nowrap; }
  .intro-photo { flex: none; aspect-ratio: 2.65; min-height: 0; max-height: 190px; }
  .intro-photo span { inset: auto 12px 9px; }
  .intro-photo .icon { width: 19px; height: 19px; }
}

@media (max-width: 500px) {
  .primary-nav { column-gap: 3px; }
  .primary-nav a { padding-inline: 1px; }
  .memory-invite { grid-template-columns: minmax(0, 1fr); row-gap: 6px; }
  .memory-rules summary { min-height: 44px; padding-block: 10px; }
  .people-directory .people-heading { margin-bottom: 10px; }
  .people-directory .page-tabs { gap: 0 12px; }
  .people-directory .result-row { grid-template-columns: minmax(0, 1fr) auto; gap: 4px; padding-right: 7px; }
  .people-directory .record-link { padding: 9px 2px 9px 10px; }
  .people-directory .result-source { justify-self: end; margin: 0; padding-inline: 6px; }
  .header-actions .global-search { width: 44px; justify-content: center; padding-inline: 0; }
  .header-actions .global-search span { display: none; }
  .account-greeting { flex-basis: 160px; }
  .browse-form, .home-find .browse-form { padding: 10px 10px 7px; }
  .browse-search { min-height: 51px; gap: 5px; padding: 3px; }
  .browse-search input { min-height: 44px; padding-inline: 1px; }
  .browse-search > .icon { margin-left: 4px; width: 17px; height: 17px; }
  .browse-search .button { min-height: 44px; padding-inline: 10px; }
  .browse-search .button .icon { display: none; }
  .clear-query { width: 31px; min-height: 40px; }
  .search-tools { grid-template-columns: minmax(0, 1fr); gap: 2px; margin-top: 6px; }
  .scope-option { min-height: 44px; padding-inline: 5px; }
  .search-scopes { gap: 2px; }
  .filter-disclosure summary { min-height: 44px; }
  .section-heading { padding-bottom: 8px; margin-bottom: 12px; }
  .story-grid, .start-grid, .map-feature { grid-template-columns: minmax(0, 1fr); }
  .era-years { gap: 4px; }
  .era-years .icon { width: 16px; height: 16px; }
  .today-credits a { min-height: 44px; }
  .result-row { grid-template-columns: minmax(0, 1fr); padding-right: 0; }
  .record-link { padding: 12px; }
  .record-link .result-arrow, .result-type { display: none; }
  .result-source { justify-self: start; margin: 0 0 11px 12px; }
  .timeline li { grid-template-columns: minmax(66px, 83px) minmax(0, 1fr); }
  .timeline-date { padding-right: 6px; font-size: .83rem; }
  .timeline-entry { padding-left: 13px; }
  .timeline-entry .result-arrow { right: 9px; }
  .share-button { padding-inline: 8px; }
  .record-fields > div { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .roster-list li { grid-template-columns: 24px minmax(0, 1fr); gap: 8px; padding: 9px; }
  .roster-list a { grid-template-columns: minmax(0, 1fr); gap: 3px; }
  .roster-year { grid-column: 1; }
  .roster-list .roster-arrow { display: none; }
}

@media (max-width: 360px) {
  .primary-nav { column-gap: 2px; }
  .primary-nav a { font-size: .76rem; }
  .scope-option { padding-inline: 2px; }
  .search-scopes { column-gap: 1px; }
  .era-years { font-size: 1rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .001s !important; scroll-behavior: auto !important; }
}
