
: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); }
