
:root {
  --bg: #f3f0e9;
  --bg-soft: #fbf8f2;
  --surface: #fffdf9;
  --surface-strong: #f7f2e9;
  --border: #d7d0c4;
  --border-strong: #b5a893;
  --text: #1d2631;
  --text-soft: #4c5a69;
  --text-muted: #6f7883;
  --brand: #203247;
  --brand-strong: #142233;
  --brand-soft: #e6edf5;
  --accent: #8b6835;
  --accent-soft: #f2eadb;
  --success: #3d7056;
  --shadow: 0 16px 38px rgba(20, 31, 45, 0.08);
  --radius: 18px;
  --radius-sm: 12px;
  --shell: 1200px;
  --font-stack: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --serif-stack: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif;
  --header-bg: linear-gradient(180deg, rgba(255,253,250,0.95), rgba(246,241,233,0.92));
  --header-border: rgba(139, 104, 53, 0.16);
  --brand-mark-start: #203247;
  --brand-mark-end: #39536f;
  --brand-mark-text: #fff9f1;
  --nav-current-bg: rgba(32, 50, 71, 0.08);
  --nav-current-border: rgba(32, 50, 71, 0.16);
  --chip-bg: #f4eee3;
  --section-bg: linear-gradient(180deg, rgba(255,255,255,0.96), rgba(250,247,242,0.88));
  --footer-bg: linear-gradient(135deg, #182635 0%, #223244 55%, #192a3a 100%);
  --footer-text: #f3ece1;
  --footer-text-soft: #d8ccbc;
  --footer-border: rgba(139, 104, 53, 0.22);
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0f1620;
  --bg-soft: #141d28;
  --surface: #16212d;
  --surface-strong: #1b2834;
  --border: #2a3948;
  --border-strong: #455769;
  --text: #edf1f5;
  --text-soft: #c6cfda;
  --text-muted: #9aa7b6;
  --brand: #eef3f8;
  --brand-strong: #f9fcff;
  --brand-soft: #213246;
  --accent: #d0aa6b;
  --accent-soft: rgba(208,170,107,0.12);
  --success: #78b194;
  --shadow: 0 18px 42px rgba(3, 8, 15, 0.35);
  --header-bg: linear-gradient(180deg, rgba(15,22,32,0.95), rgba(20,29,40,0.92));
  --header-border: rgba(208,170,107,0.12);
  --brand-mark-start: #36516c;
  --brand-mark-end: #213247;
  --brand-mark-text: #f6f1e8;
  --nav-current-bg: rgba(208,170,107,0.12);
  --nav-current-border: rgba(208,170,107,0.18);
  --chip-bg: rgba(255,255,255,0.04);
  --section-bg: linear-gradient(180deg, rgba(22,33,45,0.96), rgba(19,29,40,0.88));
  --footer-bg: linear-gradient(135deg, #0d141d 0%, #131e2a 55%, #0f1923 100%);
  --footer-text: #f1ede7;
  --footer-text-soft: #c7cfd8;
  --footer-border: rgba(208,170,107,0.12);
}


* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-stack);
  color: var(--text);
  background:
    radial-gradient(circle at top right, rgba(139,104,53,0.10), transparent 24%),
    radial-gradient(circle at top left, rgba(32,50,71,0.08), transparent 20%),
    linear-gradient(180deg, var(--bg-soft) 0%, var(--bg) 50%, var(--bg-soft) 100%);
  line-height: 1.65;
}
img { max-width: 100%; display: block; }
a { color: var(--brand-strong); text-decoration-thickness: 0.08em; text-underline-offset: 0.16em; }
a:hover { color: var(--brand); }
p, li { font-size: 1rem; }
code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  background: #f0ece5;
  border-radius: 0.35rem;
  padding: 0.1rem 0.35rem;
}
blockquote {
  margin: 1.25rem 0;
  padding: 1rem 1.15rem;
  background: var(--surface-strong);
  border-left: 4px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
blockquote.quote-block {
  font-family: var(--serif-stack);
  font-size: 1.04rem;
  color: var(--text);
}
figure { margin: 1.25rem 0; }
figcaption {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin-top: 0.55rem;
}
hr, .sidebar-divider {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 1.4rem 0;
}

.shell {
  width: min(var(--shell), calc(100% - 2rem));
  margin: 0 auto;
}
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0.75rem;
}
.skip-link:focus {
  left: 1rem;
  z-index: 1000;
  background: var(--surface);
  padding: 0.6rem 0.85rem;
  border-radius: 999px;
  box-shadow: var(--shadow);
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(18px);
  background: var(--header-bg);
  border-bottom: 1px solid var(--header-border);
}
.header-shell {
  min-height: 4.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.brand-wrap { flex: 1; }
.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
  text-decoration: none;
}
.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand-mark-start), var(--brand-mark-end));
  color: var(--brand-mark-text);
  font-weight: 700;
  letter-spacing: 0.08em;
  box-shadow: var(--shadow);
}
.brand-text-wrap { display: flex; flex-direction: column; }
.brand-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--brand);
  letter-spacing: 0.01em;
}
.brand-tagline {
  font-size: 0.88rem;
  color: var(--text-soft);
  max-width: 34rem;
}
.site-nav ul,
.branch-nav ul,
.footer-nav,
.sidebar-tag-list,
.breadcrumbs ol { list-style: none; padding: 0; margin: 0; }
.site-nav ul {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 2.55rem;
  padding: 0 0.95rem;
  border-radius: 999px;
  text-decoration: none;
  color: var(--text-soft);
  font-weight: 650;
}
.site-nav a:hover,
.site-nav a[aria-current="page"] {
  background: var(--nav-current-bg);
  color: var(--brand-strong);
  border: 1px solid var(--nav-current-border);
}
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 0.28rem;
  width: 2.9rem;
  height: 2.9rem;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 0.85rem;
  background: var(--surface);
}
.menu-toggle-bar {
  display: block;
  width: 1.25rem;
  height: 2px;
  background: var(--brand);
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.9rem;
  height: 2.9rem;
  border: 1px solid var(--border);
  border-radius: 0.9rem;
  background: var(--surface);
  color: var(--brand-strong);
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform 0.16s ease, border-color 0.16s ease, background-color 0.16s ease;
}
.theme-toggle:hover {
  transform: translateY(-1px);
  border-color: var(--nav-current-border);
  background: var(--surface-strong);
}
.theme-toggle-icon {
  font-size: 1.1rem;
  line-height: 1;
}
.site-search-panel input::-webkit-search-decoration,
.site-search-panel input::-webkit-search-cancel-button,
.site-search-panel input::-webkit-search-results-button,
.site-search-panel input::-webkit-search-results-decoration {
  -webkit-appearance: none;
}

.hero-wrap {
  padding: 1rem 0 0;
}
.breadcrumbs {
  padding-top: 1.1rem;
}
.breadcrumbs ol {
  display: flex;
  gap: 0.7rem;
  flex-wrap: wrap;
  color: var(--text-muted);
  font-size: 0.95rem;
}
.breadcrumbs li { display: inline-flex; align-items: center; gap: 0.7rem; }
.breadcrumbs li:not(:last-child)::after {
  content: "›";
  color: #b2a38f;
}
.hero {
  padding: 1rem 0 2.35rem;
}
.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0 0 0.8rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: var(--nav-current-bg);
  color: var(--brand-strong);
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.hero h1 {
  margin: 0;
  max-width: 14ch;
  font-family: var(--serif-stack);
  font-size: clamp(2.2rem, 4.5vw, 4.35rem);
  line-height: 1.05;
  color: var(--brand);
}
.hero-intro {
  max-width: 58rem;
  margin: 1rem 0 0;
  font-size: clamp(1.05rem, 1.5vw, 1.22rem);
  color: var(--text-soft);
}
.hero-actions,
.card-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 1.15rem;
}

.branch-strip {
  border-top: 1px solid rgba(191, 178, 154, 0.55);
  border-bottom: 1px solid rgba(191, 178, 154, 0.55);
  background: linear-gradient(180deg, rgba(255,250,242,0.70), rgba(247,242,233,0.82));
}
.branch-nav {
  display: flex;
  gap: 1rem;
  align-items: start;
  padding: 1rem 0;
}
.branch-nav-label {
  margin: 0;
  min-width: 8.2rem;
  font-size: 0.92rem;
  color: var(--text-muted);
  font-weight: 700;
}
.branch-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}
.branch-nav a {
  display: inline-flex;
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  text-decoration: none;
  color: var(--text-soft);
  font-size: 0.94rem;
}
.branch-nav a[aria-current="page"],
.branch-nav a:hover {
  border-color: var(--nav-current-border);
  color: var(--brand-strong);
  background: var(--surface-strong);
}

.main-wrap { padding: 2rem 0 3.5rem; }
.content-shell.has-sidebar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 2rem;
  align-items: start;
}
.page-content {
  min-width: 0;
}
.page-sidebar { order: 2; }
.sticky-panel {
  position: sticky;
  top: 6rem;
}
.sidebar-panel {
  background: var(--section-bg);
  border: 1px solid rgba(191,178,154,0.7);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.1rem 1rem;
}
.sidebar-panel h2 {
  margin: 0 0 0.75rem;
  font-size: 1rem;
}
.sidebar-panel ol {
  margin: 0;
  padding-left: 1rem;
}
.sidebar-panel li + li { margin-top: 0.35rem; }
.sidebar-panel a { text-decoration: none; }
.sidebar-small {
  margin: 0 0 0.55rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 650;
}
.sidebar-tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}
.sidebar-tag-list li {
  padding: 0.3rem 0.55rem;
  border-radius: 999px;
  background: #f4eee4;
  border: 1px solid var(--border);
  font-size: 0.82rem;
  color: var(--text-soft);
}

.content-section {
  background: var(--section-bg);
  border: 1px solid rgba(191,178,154,0.7);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem clamp(1.1rem, 2vw, 1.8rem);
}
.content-section + .content-section { margin-top: 1.2rem; }
.section-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.8rem;
}
.section-heading h2 {
  margin: 0;
  font-family: var(--serif-stack);
  font-size: clamp(1.4rem, 2vw, 2rem);
  line-height: 1.15;
  color: var(--brand);
}
.section-body > :first-child { margin-top: 0; }
.section-body > :last-child { margin-bottom: 0; }
.callout {
  padding: 1rem 1.15rem;
  border-radius: var(--radius-sm);
  border: 1px solid #dac9ab;
  background: linear-gradient(180deg, #fff8eb, #f9f1df);
}
.callout.note { color: #4c3f30; }

.cards {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 1rem;
}
.cards.three-up > .card,
.cards.search-results > .search-result { grid-column: span 4; }
.cards.two-up > .card,
.evidence-grid.two-up > .evidence-figure { grid-column: span 6; }
.cards.compact > .card { min-height: auto; }
.card,
.search-result {
  background: var(--section-bg);
  border: 1px solid rgba(191,178,154,0.78);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  padding: 1.1rem;
  min-height: 100%;
}
.card h3,
.search-result h3 {
  margin: 0.15rem 0 0.55rem;
  font-size: 1.12rem;
  line-height: 1.25;
}
.card h3 a,
.search-result h3 a {
  text-decoration: none;
  color: var(--brand-strong);
}
.card p,
.search-result p { margin: 0; }
.card p + p { margin-top: 0.5rem; }
.card-kicker,
.search-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  color: var(--accent);
}
.search-result-meta {
  display: flex;
  gap: 0.65rem;
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
  color: var(--text-muted);
  font-size: 0.88rem;
}
.search-badge {
  padding: 0.2rem 0.48rem;
  border-radius: 999px;
  background: var(--accent-soft);
}
.search-snippet { color: var(--text-soft); margin-top: 0.4rem !important; }

.evidence-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 1rem;
}
.evidence-figure {
  margin: 0;
  background: var(--section-bg);
  border: 1px solid rgba(191,178,154,0.78);
  border-radius: var(--radius-sm);
  padding: 1rem;
  box-shadow: var(--shadow);
}
.evidence-figure img {
  border-radius: 0.75rem;
  border: 1px solid rgba(191,178,154,0.65);
  background: #fff;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.9rem;
  padding: 0 1rem;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  border: 1px solid transparent;
  transition: transform 0.16s ease, background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease;
  cursor: pointer;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary {
  background: linear-gradient(135deg, var(--brand-mark-start), var(--brand-mark-end));
  color: var(--brand-mark-text);
  box-shadow: var(--shadow);
}
.btn-primary:hover { color: #fff; }
.btn-subtle {
  background: var(--surface);
  border-color: rgba(95,22,36,0.16);
  color: var(--brand-strong);
}
.btn-subtle:hover {
  background: var(--surface-strong);
  border-color: rgba(95,22,36,0.32);
}

.site-search-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.75rem;
  align-items: center;
}
.site-search-panel input {
  min-width: 0;
  width: 100%;
  min-height: 3rem;
  padding: 0 1rem;
  border-radius: 1rem;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  appearance: none;
  -webkit-appearance: none;
}
.search-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 1rem;
}
.chip-button {
  min-height: 2.35rem;
  padding: 0 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--chip-bg);
  color: var(--text-soft);
  font: inherit;
  font-size: 0.94rem;
  font-weight: 650;
  cursor: pointer;
}
.chip-button.is-active,
.chip-button:hover {
  background: var(--nav-current-bg);
  border-color: var(--nav-current-border);
  color: var(--brand-strong);
}
.search-state { color: var(--text-soft); margin: 1rem 0 0.65rem; }
.search-empty {
  padding: 1rem 1.15rem;
  border-radius: var(--radius-sm);
  background: var(--surface-strong);
  border: 1px dashed var(--border-strong);
}
.search-empty h3 { margin: 0 0 0.4rem; }
.search-results { margin-top: 1rem; }

.site-footer {
  border-top: 1px solid var(--footer-border);
  background: var(--footer-bg);
  color: var(--footer-text);
}
.footer-shell {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  padding: 2rem 0 2.2rem;
}
.footer-heading {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 800;
}
.footer-copy,
.footer-meta {
  margin: 0.45rem 0 0;
  max-width: 45rem;
  color: var(--footer-text-soft);
}
.footer-nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, max-content));
  gap: 0.55rem 1.1rem;
  align-content: start;
}
.footer-nav a {
  color: var(--footer-text);
  text-decoration: none;
}
.footer-nav a:hover { color: #fff; }

.not-found-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
}
.not-found-shell {
  max-width: 44rem;
  padding: 3rem 0;
}

@media (max-width: 1050px) {
  .content-shell.has-sidebar {
    grid-template-columns: minmax(0, 1fr);
  }
  .page-sidebar { order: 0; }
  .sticky-panel { position: static; }
}

@media (max-width: 900px) {
  .cards.three-up > .card,
  .cards.search-results > .search-result,
  .cards.two-up > .card,
  .evidence-grid.two-up > .evidence-figure { grid-column: span 6; }
  .footer-shell {
    flex-direction: column;
  }
}

@media (max-width: 760px) {
  .header-shell {
    flex-wrap: wrap;
    padding: 0.7rem 0;
  }
  .menu-toggle { display: inline-flex; }
  .site-nav {
    width: 100%;
    display: none;
  }
  .site-nav.is-open { display: block; }
  .site-nav ul {
    justify-content: stretch;
    flex-direction: column;
    align-items: stretch;
    padding: 0.4rem 0 0.2rem;
  }
  .site-nav a {
    width: 100%;
    justify-content: flex-start;
    border-radius: 0.9rem;
  }
  .brand-tagline { max-width: none; }
  .branch-nav { flex-direction: column; }
  .branch-nav-label { min-width: auto; }
}

@media (max-width: 620px) {
  .cards.three-up > .card,
  .cards.search-results > .search-result,
  .cards.two-up > .card,
  .evidence-grid.two-up > .evidence-figure { grid-column: span 12; }
  .hero h1 { max-width: none; }
  .site-search-panel { flex-direction: column; }
  .site-search-panel { grid-template-columns: 1fr; }
  .site-search-panel input,
  .site-search-panel .btn { width: 100%; }
  .hero-actions,
  .card-actions { flex-direction: column; }
}

html[data-theme="dark"] body {
  background:
    radial-gradient(circle at top right, rgba(208,170,107,0.10), transparent 22%),
    radial-gradient(circle at top left, rgba(141,179,217,0.08), transparent 18%),
    linear-gradient(180deg, var(--bg-soft) 0%, var(--bg) 50%, var(--bg-soft) 100%);
}
html[data-theme="dark"] a { color: #f0ddbc; }
html[data-theme="dark"] a:hover { color: #fff2d8; }
html[data-theme="dark"] blockquote { background: rgba(255,255,255,0.03); border-left-color: var(--accent); }
html[data-theme="dark"] code { background: rgba(255,255,255,0.06); }
html[data-theme="dark"] .menu-toggle,
html[data-theme="dark"] .theme-toggle { background: var(--surface); }
html[data-theme="dark"] .branch-strip { background: linear-gradient(180deg, rgba(19,29,40,0.78), rgba(22,33,45,0.86)); border-top-color: var(--header-border); border-bottom-color: var(--header-border); }
html[data-theme="dark"] .search-empty,
html[data-theme="dark"] .callout { background: rgba(255,255,255,0.04); border-color: var(--border); }
html[data-theme="dark"] .footer-nav a:hover { color: #ffffff; }

.brand-link:hover { text-decoration: none; }
.site-nav a { border: 1px solid transparent; }
.content-section, .sidebar-panel, .card, .search-result, .evidence-figure { backdrop-filter: blur(6px); }
.callout { background: linear-gradient(180deg, var(--accent-soft), rgba(255,255,255,0.92)); }
html[data-theme="dark"] .content-section,
html[data-theme="dark"] .sidebar-panel,
html[data-theme="dark"] .card,
html[data-theme="dark"] .search-result,
html[data-theme="dark"] .evidence-figure { border-color: var(--border); }
html[data-theme="dark"] .evidence-figure img { background: #101822; border-color: var(--border); }
html[data-theme="dark"] .btn-primary:hover { color: #ffffff; }
html[data-theme="dark"] .btn-subtle { background: var(--surface); border-color: var(--border-strong); }
html[data-theme="dark"] .btn-subtle:hover { background: var(--surface-strong); border-color: var(--nav-current-border); }
html[data-theme="dark"] .site-nav a[aria-current="page"],
html[data-theme="dark"] .site-nav a:hover { border-color: var(--nav-current-border); }
html[data-theme="dark"] .hero-intro, html[data-theme="dark"] .footer-copy, html[data-theme="dark"] .footer-meta { color: var(--text-soft); }
html[data-theme="dark"] .quote-block { color: var(--text); }

html[data-theme="dark"] .callout{background:linear-gradient(180deg,rgba(193,154,97,.16),rgba(193,154,97,.08));border-color:color-mix(in srgb,var(--accent) 52%,var(--border-strong) 48%)}
html[data-theme="dark"] .callout.note{color:#f4efe6}
html[data-theme="dark"] .callout.note strong{color:#fff7ea}


.fact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.9rem;
  margin: 1rem 0 1.25rem;
}
.fact-card {
  background: var(--surface-strong);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.95rem 1rem;
}
.fact-label {
  margin: 0 0 0.25rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.fact-value { margin: 0; color: var(--text); }
.portrait-figure {
  max-width: 320px;
  margin: 0 0 1rem;
}
.portrait-figure img {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.timeline-list {
  display: grid;
  gap: 1rem;
  margin-top: 1rem;
}
.timeline-item {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 1rem;
  padding: 1rem 1.1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.timeline-year {
  font-weight: 800;
  color: var(--accent);
  font-size: 1rem;
}
.timeline-content h3 {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
}
.timeline-content p { margin: 0; }
.comparison-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin: 1rem 0;
}
.compare-card { height: 100%; }
.source-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.95rem;
}
.step-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1rem;
}
.step-card h3 {
  margin-top: 0;
  margin-bottom: 0.4rem;
  font-size: 1rem;
}
@media (max-width: 760px) {
  .comparison-grid,
  .timeline-item {
    grid-template-columns: 1fr;
  }
}


.image-view-link { display:block; position:relative; text-decoration:none; color:inherit; }
.image-view-link img { display:block; }
.image-view-meta { margin:0.65rem 0 0; font-size:0.9rem; color: var(--text-muted); }
.image-view-link::after { content:"Open full size ↗"; position:absolute; right:0.85rem; bottom:0.85rem; background:rgba(27,43,59,0.78); color:#fff; padding:0.35rem 0.55rem; border-radius:999px; font-size:0.82rem; line-height:1; opacity:0; transition:opacity .18s ease; }
.image-view-link:hover::after, .image-view-link:focus-visible::after { opacity:1; }
.viewer-toolbar { display:flex; gap:0.75rem; flex-wrap:wrap; margin-bottom:1rem; }
.viewer-stage { overflow:auto; border:1px solid rgba(191,178,154,0.78); border-radius: var(--radius-sm); background: var(--section-bg); padding: 1rem; box-shadow: var(--shadow); }
#viewer-image { display:block; width:auto; max-width:none; height:auto; margin:0 auto; border-radius:0.75rem; border:1px solid rgba(191,178,154,0.65); background:#fff; }
.viewer-note { margin-top:0.85rem; color:var(--text-muted); font-size:0.95rem; }
@media (max-width: 720px) { .image-view-link::after { opacity:1; font-size:0.75rem; } .viewer-stage { padding:0.5rem; } }
html[data-theme="dark"] .image-view-link::after { background: rgba(244,239,230,0.9); color:#12202f; }
html[data-theme="dark"] #viewer-image { background:#101822; border-color: var(--border); }

/* 2026 streamlined responsive, accessibility, and performance refinements */
:root {
  --text-muted: #5f6772;
}
html[data-theme="dark"] {
  --text-muted: #b4bfcb;
}
.brand-mark {
  width: 2.75rem;
  height: 2.75rem;
  flex: 0 0 2.75rem;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}
.brand-logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 10px 18px rgba(20, 31, 45, 0.16));
}
html[data-theme="dark"] .brand-logo {
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.28));
}
.theme-toggle {
  position: relative;
}
.theme-toggle-icons {
  position: relative;
  display: grid;
  place-items: center;
  width: 1.125rem;
  height: 1.125rem;
}
.theme-toggle-icon {
  display: block;
  grid-area: 1 / 1;
  width: 1.125rem;
  height: 1.125rem;
}
.theme-toggle-icon-moon,
.theme-toggle-icon-sun {
  transition: opacity 0.18s ease, transform 0.18s ease;
}
.theme-toggle-icon-sun {
  opacity: 0;
  transform: scale(0.82) rotate(-18deg);
}
.theme-toggle-icon-moon {
  opacity: 1;
  transform: scale(1) rotate(0deg);
}
html[data-theme="dark"] .theme-toggle-icon-sun {
  opacity: 1;
  transform: scale(1) rotate(0deg);
}
html[data-theme="dark"] .theme-toggle-icon-moon {
  opacity: 0;
  transform: scale(0.82) rotate(18deg);
}
.hero h1 {
  text-wrap: balance;
}
@supports (text-wrap: pretty) {
  .hero h1,
  .section-heading h2,
  .page-content h1 {
    text-wrap: pretty;
  }
}
a:focus-visible,
button:focus-visible,
input:focus-visible,
.chip-button:focus-visible {
  outline: 3px solid #c79c54;
  outline-offset: 3px;
}
@supports (color: color-mix(in srgb, white 50%, black 50%)) {
  a:focus-visible,
  button:focus-visible,
  input:focus-visible,
  .chip-button:focus-visible {
    outline-color: color-mix(in srgb, var(--accent) 58%, white 42%);
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
.hero-home-layout {
  display: block;
}
.hero-home-copy {
  min-width: 0;
  max-width: min(48rem, 100%);
}
.hero-home .hero-intro {
  max-width: 48rem;
}
.hero-home-media {
  display: none;
}
.btn,
.site-nav a,
.theme-toggle,
.menu-toggle {
  min-height: 3rem;
}
.btn {
  padding: 0.3rem 1rem;
}
.branch-nav-mobile-select {
  display: none;
}
.branch-nav-mobile-select-label {
  display: block;
  margin: 0;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand-strong);
}
.branch-nav-select-wrap {
  position: relative;
}
.branch-nav-select-wrap::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 1.1rem;
  width: 0.72rem;
  height: 0.72rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-62%) rotate(45deg);
  pointer-events: none;
  color: var(--brand-strong);
}
.branch-nav-select-control {
  width: 100%;
  min-height: 3.3rem;
  padding: 0.9rem 3rem 0.9rem 1rem;
  border-radius: 1rem;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--brand-strong);
  font: inherit;
  font-weight: 700;
  line-height: 1.3;
  appearance: none;
  -webkit-appearance: none;
  box-shadow: var(--shadow);
}
.branch-nav-select-control:focus-visible,
.sidebar-panel nav a:focus-visible {
  outline: 3px solid #c79c54;
  outline-offset: 3px;
}
.card h3 a,
.search-result h3 a {
  display: flex;
  align-items: flex-start;
  width: 100%;
  min-height: 2.75rem;
  padding-block: 0.1rem;
}
@supports (content-visibility: auto) {
  .page-content > .content-section:not(:first-child) {
    content-visibility: auto;
    contain-intrinsic-size: auto 720px;
  }
  .page-sidebar {
    content-visibility: auto;
    contain-intrinsic-size: auto 320px;
  }
  .site-footer {
    content-visibility: auto;
    contain-intrinsic-size: auto 240px;
  }
}
@media (min-width: 760px) and (min-height: 640px) {
  .hero-home {
    padding-bottom: 2.35rem;
  }
  .hero-home-layout {
    display: block;
  }
  .hero-home h1 {
    max-width: min(100%, 15.4ch);
    font-size: clamp(2.7rem, 2.05rem + 2.55vw, 4.8rem);
    letter-spacing: -0.018em;
  }
  .hero-home-media {
    display: block;
    width: min(66vw, 25.5rem);
    aspect-ratio: 1 / 1;
    margin: 1.4rem auto 0;
    background: center center / contain no-repeat url("../images/resources/Westcott-Hort_Center_Image.webp");
    filter: drop-shadow(0 18px 30px rgba(20, 31, 45, 0.16));
  }
  html[data-theme="dark"] .hero-home-media {
    filter: drop-shadow(0 18px 30px rgba(0, 0, 0, 0.28));
  }
}
@media (min-width: 1040px) and (min-height: 640px) {
  .hero-home-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.34fr) minmax(250px, 0.72fr);
    align-items: center;
    gap: clamp(1.75rem, 3.5vw, 4rem);
  }
  .hero-home-copy,
  .hero-home .hero-intro {
    max-width: 49rem;
  }
  .hero-home h1 {
    max-width: min(100%, 16.5ch);
  }
  .hero-home-media {
    width: min(100%, 30.75rem);
    margin: 0;
    justify-self: end;
  }
}
@media (min-width: 1380px) and (min-height: 640px) {
  .hero-home-copy,
  .hero-home .hero-intro {
    max-width: 50rem;
  }
  .hero-home h1 {
    max-width: min(100%, 17ch);
  }
  .hero-home-media {
    width: min(100%, 32.25rem);
  }
}
@media (max-width: 1100px) {
  .brand-tagline {
    display: none;
  }
}
@media (max-width: 1050px) {
  .page-sidebar {
    order: 2;
  }
}
@media (max-width: 760px) {
  .shell {
    width: min(var(--shell), calc(100% - 1.25rem));
  }
  .header-shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 0.75rem;
    padding: 0.7rem 0;
    align-items: center;
  }
  .brand-wrap {
    min-width: 0;
  }
  .brand-link {
    min-width: 0;
    gap: 0.72rem;
  }
  .brand-mark {
    width: 2.4rem;
    height: 2.4rem;
    flex-basis: 2.4rem;
  }
  .brand-title {
    font-size: 1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .brand-tagline {
    display: none;
  }
  .theme-toggle,
  .menu-toggle {
    width: 2.75rem;
    height: 2.75rem;
  }
  .site-nav {
    grid-column: 1 / -1;
  }
  .site-nav ul {
    padding-top: 0.35rem;
  }
  .branch-nav {
    align-items: stretch;
    gap: 0.65rem;
    padding: 0.85rem 0;
  }
  .branch-nav-label {
    display: none;
  }
  .branch-nav > ul {
    display: none;
  }
  html:not(.js) .branch-nav > ul {
    display: grid !important;
    grid-template-columns: 1fr;
    gap: 0.45rem;
    overflow: visible;
    padding-bottom: 0;
    margin-right: 0;
  }
  html:not(.js) .branch-nav a {
    white-space: normal;
    min-height: 3rem;
    padding: 0.7rem 0.95rem;
    align-items: center;
  }
  html.js .branch-nav-mobile-select {
    display: grid !important;
    gap: 0.42rem;
    width: 100%;
  }
  html:not(.js) .branch-nav-mobile-select {
    display: none !important;
  }
  .main-wrap {
    padding: 1.25rem 0 2.4rem;
  }
  .content-section {
    padding: 1.15rem 0.95rem;
    background: var(--surface);
    box-shadow: 0 2px 6px rgba(20, 31, 45, 0.05);
  }
  .section-heading {
    margin-bottom: 0.6rem;
  }
  .hero {
    padding: 0.8rem 0 1.5rem;
  }
  .hero-intro {
    font-size: 1rem;
  }
  body {
    background: var(--bg);
  }
  .site-header {
    backdrop-filter: none;
    background: var(--surface);
  }
  .branch-strip {
    background: var(--bg-soft);
  }
  .sidebar-panel,
  .card,
  .search-result,
  .evidence-figure,
  .theme-toggle,
  .menu-toggle,
  .branch-nav-select-control {
    background: var(--surface);
    backdrop-filter: none;
    box-shadow: 0 2px 6px rgba(20, 31, 45, 0.05);
  }
  .callout {
    background: var(--surface-strong);
  }
  .brand-logo {
    filter: none;
  }
  .sidebar-panel nav ol {
    list-style: none;
    padding-left: 0;
    display: grid;
    gap: 0.5rem;
  }
  .sidebar-panel li + li {
    margin-top: 0;
  }
  .sidebar-panel nav a {
    display: flex;
    align-items: center;
    min-height: 3rem;
    padding: 0.7rem 0.85rem;
    border-radius: 0.9rem;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--brand-strong);
    text-decoration: none;
    line-height: 1.35;
  }
  .sidebar-panel nav a:hover {
    background: var(--surface-strong);
    border-color: var(--nav-current-border);
  }
  .card-actions {
    gap: 0.85rem;
  }
}
@supports (content-visibility: auto) {
  @media (max-width: 760px) {
    .section-body > :nth-child(n + 2) {
      content-visibility: auto;
      contain-intrinsic-size: auto 200px;
    }
    .section-body > .cards,
    .section-body > .evidence-grid,
    .section-body > .comparison-grid,
    .section-body > .timeline-list {
      contain-intrinsic-size: auto 420px;
    }
    .cards > :nth-child(n + 3),
    .evidence-grid.two-up > :nth-child(n + 2) {
      content-visibility: auto;
      contain-intrinsic-size: auto 260px;
    }
  }
}
@media (max-width: 480px) {
  .breadcrumbs {
    padding-top: 0.85rem;
  }
  .hero-kicker {
    margin-bottom: 0.65rem;
    font-size: 0.76rem;
  }
  .site-nav a {
    min-height: 2.7rem;
  }
}
