:root {
  --bg-color: #f1f3f8;
  --surface: #ffffff;
  --text-primary: #1f2328;
  --text-dim: #5f6b76;
  --accent: #000080;
  --glow: rgba(0, 0, 128, 0.18);
  --border-color: #d7dce1;
  --bg: var(--bg-color);
  --text: var(--text-primary);
  --ink: var(--text-primary);
  --muted: var(--text-dim);
  --line: var(--border-color);
  --brand: var(--accent);
  --brand-soft: rgba(0, 0, 128, 0.1);
  --focus: var(--accent);
  --radius: 12px;
  --space-1: 0.375rem;
  --space-2: 0.625rem;
  --space-3: 0.875rem;
  --space-4: 1.125rem;
  --nav-w: 280px;
  --page-max: 1520px;
  /* Medium-like stack: serif reading + sans UI (Lora for body; Source Sans 3 for UI/headings). */
  --font-sans: "Source Sans 3", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-serif: "Lora", Charter, "Bitstream Charter", "Sitka Text", Cambria, Georgia, serif;
}

/* Global type: 20px root (+4px vs 16px UA default) — all rem-based font sizes scale together */
html {
  font-size: 20px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font-serif);
  line-height: 1.7;
  background: var(--bg-color);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
  text-decoration: none;
  position: relative;
  transition: color 0.3s cubic-bezier(0.2, 0, 0, 1), text-shadow 0.3s cubic-bezier(0.2, 0, 0, 1);
}

a:hover {
  color: #1a1aa3;
  text-shadow: 0 0 15px var(--glow);
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-sans);
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-bottom: 1.5rem;
}

h1 {
  font-weight: 700;
  font-size: clamp(2.1rem, 4.2vw, 3rem);
  color: var(--accent);
}

h2,
h3 {
  font-weight: 600;
}

h4,
h5,
h6 {
  font-weight: 600;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--surface);
  border: 2px solid var(--focus);
  padding: var(--space-2) var(--space-3);
  border-radius: 4px;
}

.skip-link:focus {
  left: max(1rem, env(safe-area-inset-left, 0px));
  top: max(1rem, env(safe-area-inset-top, 0px));
  z-index: 9999;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  position: relative;
  width: min(100%, var(--page-max));
  margin: 0 auto;
  padding: 0.45rem 1rem;
  background: transparent;
  color: var(--text);
  border-bottom: 0;
}

.service-header__name {
  display: inline-flex;
  align-items: center;
  color: #ffffff;
  text-decoration: none;
}

.service-header__logo {
  display: block;
  width: min(260px, 66vw);
  height: auto;
}

/* Remove legacy top header branding image/link if present. */
.site-header .service-header__name,
.site-header .service-header__logo {
  display: none !important;
}

.service-header__name:hover,
.service-header__name:focus-visible {
  color: #ffffff;
  text-decoration: none;
  text-shadow: none;
}

.top-nav {
  max-width: var(--page-max);
  margin: 0.5rem auto 0;
  padding: 0 1rem;
}

.top-nav ul {
  list-style: none;
  margin: 0;
  padding: 0.35rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
}

.top-nav a {
  display: block;
  color: var(--text);
  text-decoration: none;
  border-radius: 6px;
  padding: 0.38rem 0.55rem;
  line-height: 1.2;
}

.top-nav a:hover {
  background: rgba(212, 175, 55, 0.12);
}

.top-nav a[aria-current="page"] {
  background: var(--brand-soft);
  color: var(--brand);
  font-weight: 700;
}

.nav-drawer-toggle {
  display: none;
  border: 1px solid #b1b4b6;
  background: #ffffff;
  color: #0b0c0c;
  border-radius: 6px;
  padding: 0.45rem 0.65rem;
  font-weight: 600;
}

.nav-drawer-toggle:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.layout {
  display: grid;
  grid-template-columns: var(--nav-w) minmax(0, 1fr);
  gap: 1.5rem;
  width: min(100%, var(--page-max));
  margin: 0 auto;
  padding: 0.9rem 1rem 1.2rem;
}

.site-nav-wrap {
  min-width: 0;
  position: sticky;
  top: 0.55rem;
  align-self: start;
  max-height: calc(100dvh - 0.75rem);
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-gutter: stable;
  padding-right: 0;
}

.nav-drawer-close {
  display: none;
}

.nav-drawer-dismiss {
  display: none;
}

.site-nav {
  position: sticky;
  top: 0.75rem;
  align-self: start;
  max-height: calc(100dvh - 1.5rem);
  overflow: auto;
  scrollbar-gutter: stable;
  background: var(--bg-color);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--space-3);
}

.site-nav h2 {
  font-size: 0.95rem;
  margin: 0 0 var(--space-2);
  color: var(--muted);
  letter-spacing: 0.02em;
}

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav li + li {
  margin-top: 0.15rem;
}

.site-nav a,
.site-nav .section-toggle,
.site-nav .section-label {
  display: block;
  width: 100%;
  text-decoration: none;
  color: var(--text);
  padding: 0.4rem 0.55rem;
  border-radius: 6px;
  line-height: 1.25;
  text-align: left;
  background: transparent;
  border: 0;
  font: inherit;
  cursor: pointer;
}

.site-nav a:hover,
.site-nav .section-toggle:hover {
  background: #edf2f7;
}

.site-nav a:focus-visible,
.site-nav .section-toggle:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.site-nav .section {
  border-top: 1px solid var(--line);
  margin-top: 0.35rem;
  padding-top: 0.35rem;
}

.site-nav .section:first-child {
  border-top: 0;
  margin-top: 0;
  padding-top: 0;
}

.site-nav .section > a,
.site-nav .section > .section-toggle,
.site-nav .section > .section-label {
  font-weight: 600;
}

.site-nav .section-label {
  color: var(--muted);
}

.site-nav .subnav {
  margin-left: 0.5rem;
  padding-left: 0.55rem;
  border-left: 1px solid var(--line);
}

.site-nav .subnav .subnav {
  margin-left: 0.45rem;
  padding-left: 0.45rem;
}

.site-nav .nav-item + .nav-item {
  margin-top: 0.1rem;
}

.site-nav .section-toggle[aria-expanded="true"] {
  color: var(--brand);
}

.site-nav .section.is-active-section > .section-toggle,
.site-nav .section.is-active-section > a {
  background: var(--brand-soft);
  color: var(--brand);
}

.site-nav a[aria-current="page"] {
  background: var(--brand-soft);
  color: var(--brand);
  font-weight: 700;
}

.main-content {
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(0.9rem, 1.2vw, 1.4rem);
  overflow-wrap: anywhere;
  box-shadow: 0 10px 30px rgba(0, 42, 100, 0.08), 0 0 0 1px var(--line);
}

/* Top bar: Share (all viewports) + Menu (mobile only). */
.main-content__toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
  margin: 0 0 0.5rem;
  min-height: 2.25rem;
  position: relative;
}

.main-content__toolbar-share {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

/* End-of-article bar (DS/SD): same structure as top toolbar; in-flow, not fixed. */
.main-content__toolbar--footer {
  margin: 1.25rem 0 0;
  padding-top: 0.85rem;
  border-top: 1px solid var(--line);
}

/* Telegram — opens t.me (no embed; see _data/telegramChat.js). */
.telegram-chat {
  font-family: var(--font-sans);
}

.telegram-chat__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-height: 44px;
  min-width: 44px;
  border: 1px solid var(--border-color);
  background: var(--surface);
  color: #0088cc;
  border-radius: 999px;
  padding: 0.38rem 0.85rem;
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  line-height: 1.2;
  -webkit-tap-highlight-color: rgba(0, 136, 204, 0.12);
}

.telegram-chat__link:hover {
  background: #f0f8fc;
  border-color: #7ec8ea;
  color: #0077b3;
}

.telegram-chat__link:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.telegram-chat__icon {
  flex-shrink: 0;
  opacity: 0.95;
}

.telegram-chat__label {
  color: var(--text-primary);
}

/* PDF export (DS/SD articles): opens print dialog — user may Save as PDF. */
.article-pdf-export {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-height: 44px;
  min-width: 44px;
  border: 1px solid var(--border-color);
  background: var(--surface);
  color: var(--text-primary);
  border-radius: 999px;
  padding: 0.38rem 0.85rem;
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  line-height: 1.2;
  -webkit-tap-highlight-color: rgba(0, 0, 128, 0.1);
  touch-action: manipulation;
}

.article-pdf-export:hover {
  background: #f4f6f9;
  border-color: #c5ccd4;
}

.article-pdf-export:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.article-pdf-export__icon {
  flex-shrink: 0;
  opacity: 0.88;
}

.article-pdf-export__label {
  font-weight: 600;
}

/* Listen — Web Speech API (DS/SD essays). */
.article-tts {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-height: 44px;
  min-width: 44px;
  border: 1px solid var(--border-color);
  background: var(--surface);
  color: var(--text-primary);
  border-radius: 999px;
  padding: 0.38rem 0.85rem;
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  line-height: 1.2;
  -webkit-tap-highlight-color: rgba(0, 0, 128, 0.1);
  touch-action: manipulation;
}

.article-tts:hover {
  background: #f4f6f9;
  border-color: #c5ccd4;
}

.article-tts:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.article-tts__icon {
  flex-shrink: 0;
  opacity: 0.92;
}

.article-tts__label {
  font-weight: 600;
}

/* Listen cluster: voice, speed, and play (DS/SD essays). */
.article-tts-cluster {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
  max-width: 100%;
}

.article-tts-settings {
  display: inline-flex;
  align-items: flex-end;
  gap: 0.5rem 0.75rem;
  flex-wrap: wrap;
  font-family: var(--font-sans);
  font-size: 0.78rem;
}

.article-tts-settings__field {
  display: inline-flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}

.article-tts-settings__field--rate {
  min-width: 8.5rem;
}

.article-tts-settings__text {
  font-weight: 600;
  color: var(--muted);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.article-tts__voice {
  max-width: min(14rem, 46vw);
  min-width: 7.5rem;
  padding: 0.35rem 0.45rem;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text-primary);
  font-size: 0.78rem;
  line-height: 1.2;
}

.article-tts__voice:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.article-tts__rate-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.article-tts__rate {
  width: 5.5rem;
  min-height: 1.5rem;
  accent-color: #005ea5;
}

.article-tts__rate:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.article-tts__rate-value {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: var(--text-primary);
  min-width: 2.35rem;
  font-size: 0.8rem;
}

/* Share control (Medium-style menu). */
.share-widget {
  position: relative;
  font-family: var(--font-sans);
}

.share-widget__toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-height: 44px;
  min-width: 44px;
  border: 1px solid var(--border-color);
  background: var(--surface);
  color: var(--text-primary);
  border-radius: 999px;
  padding: 0.38rem 0.85rem;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  line-height: 1.2;
  -webkit-tap-highlight-color: rgba(0, 0, 128, 0.1);
}

.share-widget__toggle:hover {
  background: #f4f6f9;
  border-color: #c5ccd4;
}

.share-widget__toggle:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.share-widget__toggle-icon {
  flex-shrink: 0;
  opacity: 0.85;
}

.share-widget__panel {
  position: absolute;
  right: 0;
  top: calc(100% + 0.35rem);
  z-index: 120;
  min-width: 12.5rem;
  padding: 0.35rem 0;
  margin: 0;
  list-style: none;
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.12), 0 0 0 1px rgba(15, 23, 42, 0.04);
}

.share-widget__panel[hidden] {
  display: none !important;
}

.share-widget__item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.5rem 0.85rem;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 0.9rem;
  text-align: left;
  text-decoration: none;
  color: var(--text-primary);
  cursor: pointer;
  line-height: 1.35;
}

.share-widget__item:hover,
.share-widget__item:focus-visible {
  background: #edf2f7;
}

.share-widget__item:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: -2px;
}

.share-widget__item-svg {
  flex-shrink: 0;
  opacity: 0.88;
}

.share-widget__item--other {
  border-top: 1px solid var(--border-color);
  margin-top: 0.25rem;
  padding-top: 0.55rem;
}

@media (max-width: 960px) {
  .share-widget__panel {
    left: 0;
    right: auto;
  }
}

/* References heading + inline share (DS/SD long-form articles) */
.article-heading-with-share {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem 1rem;
  margin: 1.35rem 0 0.65rem;
}

.article-heading-with-share h2 {
  margin: 0;
  flex: 1 1 auto;
  min-width: min(100%, 10rem);
}

.article-heading-with-share__action {
  flex: 0 0 auto;
}

.article-heading-with-share__action .share-widget {
  display: inline-block;
}

/* Beside References: open upward so the menu does not cover the list below (hover/clicks). */
.article-heading-with-share .share-widget__panel {
  top: auto;
  bottom: calc(100% + 0.35rem);
  box-shadow: 0 -8px 28px rgba(15, 23, 42, 0.12), 0 0 0 1px rgba(15, 23, 42, 0.04);
}

@media (max-width: 960px) {
  .article-heading-with-share .share-widget__panel {
    left: auto;
    right: 0;
  }
}

/* EN | FR language switch (DS/SD footer toolbar) */
.article-lang-toggle {
  display: inline-flex;
  align-items: stretch;
  flex-wrap: nowrap;
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  overflow: hidden;
  line-height: 1;
}

.article-lang-toggle__sep {
  display: inline-flex;
  align-items: center;
  padding: 0 0.15rem;
  color: var(--muted);
  font-weight: 400;
  user-select: none;
}

.article-lang-toggle__seg {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.35rem;
  padding: 0.5rem 0.45rem;
  text-decoration: none;
  color: var(--accent);
  border: 0;
  background: transparent;
  transition: background 0.12s ease, color 0.12s ease;
}

a.article-lang-toggle__seg:hover {
  background: var(--brand-soft);
  color: var(--accent);
  text-decoration: none;
}

a.article-lang-toggle__seg:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
  z-index: 1;
}

.article-lang-toggle__seg--active {
  background: var(--brand-soft);
  color: var(--text-primary);
  cursor: default;
}

.article-lang-toggle--inline {
  margin: 0 0 1rem;
}

/* Footer toolbar: menu opens upward (near end of page / above controls). */
.main-content__toolbar--footer .share-widget__panel {
  top: auto;
  bottom: calc(100% + 0.35rem);
  box-shadow: 0 -8px 28px rgba(15, 23, 42, 0.12), 0 0 0 1px rgba(15, 23, 42, 0.04);
}

@media (max-width: 960px) {
  .main-content__toolbar--footer .share-widget__panel {
    left: auto;
    right: 0;
  }
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.breadcrumbs a {
  color: var(--brand);
}

.layout {
  width: min(100%, var(--page-max));
}

.legacy-content img,
.legacy-content video {
  max-width: 100%;
  height: auto;
}

.legacy-content iframe {
  max-width: 100%;
  border: 0;
}

/* Long code/pre blocks: horizontal scroll without widening the column (desktop-safe). */
.legacy-content pre,
.main-content pre,
.gnostic-aeons-article pre,
.medium-mirror__prose pre,
.medium-json-article-prose pre {
  overflow-x: auto;
  max-width: 100%;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  box-sizing: border-box;
}

pre code {
  word-break: normal;
  overflow-wrap: normal;
  white-space: pre;
}

:not(pre) > code,
:not(pre) > kbd,
:not(pre) > samp {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.gnostic-aeons-article iframe,
.medium-mirror__prose iframe,
.medium-json-article-prose iframe {
  max-width: 100%;
}

/* Inline SVGs in article/library HTML (not UI chrome). */
.legacy-content svg,
.gnostic-aeons-article:not(.medium-mirror) svg,
.gnostic-aeons-article .medium-mirror__prose svg,
.gnostic-aeons-article.medium-mirror .medium-json-article-prose svg {
  max-width: 100%;
  height: auto;
}

/* Harmonized body typography for legacy page content. */
.legacy-content {
  font-family: var(--font-serif);
  color: var(--text-primary);
  font-size: 1rem;
  line-height: 1.65;
}

.legacy-content p,
.legacy-content li,
.legacy-content td,
.legacy-content th,
.legacy-content blockquote,
.legacy-content dt,
.legacy-content dd {
  color: var(--text-primary);
  font-size: 1rem;
  line-height: 1.65;
}

.legacy-content h1,
.legacy-content h2,
.legacy-content h3,
.legacy-content h4,
.legacy-content h5,
.legacy-content h6 {
  color: var(--text-primary);
}

.legacy-content h1 {
  color: var(--accent);
  font-size: clamp(1.9rem, 3.1vw, 2.5rem);
}

.legacy-content h2 {
  font-size: clamp(1.45rem, 2.2vw, 1.9rem);
}

.about-treasury-page__contact-heading {
  margin-top: 1.35rem;
  margin-bottom: 0;
}

.about-treasury-page__contact-heading a {
  color: var(--accent);
  text-decoration: none;
}

.about-treasury-page__contact-heading a:hover {
  text-decoration: underline;
}

.about-treasury-page__contact-heading a:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
  border-radius: 2px;
}

.about-treasury-page__contact-email {
  margin-top: 0.5rem;
  margin-bottom: 0;
}

.about-treasury-page__contact-email a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 0.12em;
}

.about-treasury-page__contact-email a:hover {
  text-decoration-thickness: 0.08em;
}

.about-treasury-page__contact-email a:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
  border-radius: 2px;
}

.legacy-content h3 {
  font-size: clamp(1.2rem, 1.7vw, 1.5rem);
}

.legacy-content h4 {
  font-size: 1.1rem;
}

.legacy-content h5,
.legacy-content h6 {
  font-size: 1rem;
}

.gnostic-aeons-source {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
  color: var(--text-dim);
  font-size: 0.9rem;
}

/* Medium HTML mirrors (import script): align with long-form gnostic-aeons article flow. */
.medium-mirror .medium-mirror__prose {
  margin-top: 1.5rem;
  text-align: left;
}

.medium-mirror .medium-mirror__prose > p:first-child {
  margin-top: 0;
}

.medium-mirror .medium-mirror__prose p {
  margin: 0 0 1.25rem;
}

.medium-mirror .medium-mirror__prose h2,
.medium-mirror .medium-mirror__prose h3,
.medium-mirror .medium-mirror__prose h4 {
  margin: 1.5rem 0 0.75rem;
}

.medium-mirror .medium-mirror__prose figure {
  margin: 1.25rem 0;
  background: transparent;
}

.medium-mirror .medium-mirror__prose figcaption {
  margin-top: 0.5rem;
  font-size: 0.92rem;
  color: var(--text-dim);
}

.medium-mirror .medium-mirror__prose hr {
  margin: 1.75rem 0;
  border: 0;
  border-top: 1px solid var(--border-color);
}

.medium-mirror .medium-mirror__prose ul,
.medium-mirror .medium-mirror__prose ol {
  margin: 0 0 1.25rem;
  padding-left: 1.35rem;
}

.medium-mirror .medium-mirror__prose blockquote {
  margin: 1rem 0 1.25rem;
  padding-left: 1rem;
  border-left: 3px solid var(--border-color);
}

/* Medium JSON → HTML (David Senouf long-form): same article chrome as Gnostic Aeons */
.gnostic-aeons-article.medium-mirror .medium-json-article-prose > h2,
.gnostic-aeons-article.medium-mirror .medium-json-article-prose > .article-section-head > h2 {
  scroll-margin-top: 1.25rem;
  font-family: var(--font-serif, "Lora", Georgia, serif);
  font-size: clamp(1.2rem, 2.5vw, 1.45rem);
  font-weight: 700;
  line-height: 1.28;
  color: var(--text);
}

/* References / bibliography: same scale as .legacy-content h1 (article title), still h2 for outline under page h1 */
.gnostic-aeons-article.medium-mirror .medium-json-article-prose > h2.medium-json-references-section-title,
.gnostic-aeons-article.medium-mirror .medium-json-article-prose > .article-section-head > h2.medium-json-references-section-title {
  font-size: clamp(1.9rem, 3.1vw, 2.5rem);
  color: var(--accent);
  margin-top: 2rem;
}

/* Per-section Contents control (article-section-toc.js): heading row + RHS button */
.article-section-head {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.65rem;
}

.article-section-head > h2 {
  flex: 1 1 auto;
  min-width: 0;
  margin-top: inherit;
  margin-bottom: inherit;
}

/* Same row layout when the section anchor is a legacy paragraph (library long texts) */
.article-section-head > p {
  flex: 1 1 auto;
  min-width: 0;
  margin-top: inherit;
  margin-bottom: inherit;
}

.article-section-toc-wrap {
  position: relative;
  flex: 0 0 auto;
  align-self: flex-start;
  margin-top: 0.15rem;
}

.article-section-toc-btn {
  margin: 0;
  padding: 0.28rem 0.55rem;
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--text-dim, var(--muted));
  background: var(--surface-elevated, var(--brand-soft));
  border: 1px solid var(--border-color);
  border-radius: 4px;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.article-section-toc-btn:hover,
.article-section-toc-btn:focus-visible {
  color: var(--text);
  border-color: var(--accent, var(--border-color));
  outline: none;
}

.article-section-toc-btn:focus-visible {
  box-shadow: 0 0 0 2px var(--focus, var(--accent));
}

/* Full ToC preview: child of .article-section-toc-wrap so hover/focus spans button + panel */
.article-toc-popover {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% - 2px);
  z-index: 10001;
  width: min(22rem, calc(100vw - 1.5rem));
  max-height: min(70vh, 26rem);
  overflow-y: auto;
  padding: 0.65rem 0.85rem;
  margin: 0;
  font-family: var(--font-sans);
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--text);
  background: var(--surface, #fff);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.18);
  -webkit-font-smoothing: antialiased;
}

@media (hover: hover) and (pointer: fine) {
  .article-section-toc-wrap:hover .article-toc-popover {
    display: block;
  }
}

.article-section-toc-wrap:focus-within .article-toc-popover {
  display: block;
}

.article-toc-popover .gnostic-aeons-toc {
  margin: 0;
  padding: 0;
  border-left: none;
}

.article-toc-dialog {
  max-width: min(28rem, calc(100vw - 2rem));
  padding: 0;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--surface, #fff);
  color: var(--text);
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.22);
}

.article-toc-dialog::backdrop {
  background: rgba(0, 0, 0, 0.45);
}

.article-toc-dialog__title {
  margin: 0;
  padding: 1rem 1.15rem 0.5rem;
  font-family: var(--font-serif, "Lora", Georgia, serif);
  font-size: 1.2rem;
  font-weight: 700;
}

.article-toc-dialog__body {
  max-height: min(65vh, 28rem);
  overflow-y: auto;
  padding: 0.25rem 1.15rem 1rem;
}

.article-toc-dialog__body .gnostic-aeons-toc {
  margin: 0;
  padding: 0;
  border-left: none;
}

.article-toc-dialog__actions {
  padding: 0 1.15rem 1rem;
  display: flex;
  justify-content: flex-end;
}

.article-toc-dialog__close {
  padding: 0.4rem 0.85rem;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  cursor: pointer;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  background: var(--brand-soft);
  color: var(--text);
}

.article-toc-dialog__close:hover,
.article-toc-dialog__close:focus-visible {
  border-color: var(--accent);
  outline: none;
}

.article-toc-dialog__close:focus-visible {
  box-shadow: 0 0 0 2px var(--focus);
}

.gnostic-aeons-article.medium-mirror .medium-json-article-prose a.medium-ref-sup {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px dotted var(--muted);
  cursor: pointer;
}

.gnostic-aeons-article.medium-mirror .medium-json-article-prose a.medium-ref-sup--has-tip {
  cursor: help;
}

.gnostic-aeons-article.medium-mirror .medium-json-article-prose a.medium-ref-sup:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.gnostic-aeons-article.medium-mirror .medium-json-article-prose .medium-json-type9 {
  margin: 0.35rem 0 0.85rem;
  font-size: 1.02rem;
  line-height: 1.55;
  font-weight: 600;
  color: var(--text);
}

/* Medium type-13 lines are emitted as <h2> (same as type-3 sections), not centered subtitle paragraphs. */

.gnostic-aeons-article.medium-mirror .medium-json-article-prose .medium-json-toc {
  margin-bottom: 1.5rem;
}

.gnostic-aeons-article.medium-mirror .medium-json-article-prose .medium-json-simple-equiv {
  margin: 0 0 1.35rem;
  padding-left: 1.35rem;
  list-style: disc;
}

.gnostic-aeons-article.medium-mirror .medium-json-article-prose .medium-json-simple-equiv li {
  margin: 0.4rem 0;
  line-height: 1.55;
}

/* Match Gnostic Aeons figures: caption under image, centered, bold (overrides generic .medium-mirror figcaption). */
.gnostic-aeons-article.medium-mirror .medium-json-article-prose .gnostic-aeons-figure figcaption {
  display: block;
  margin-top: 0.5rem;
  text-align: center;
  font-family: var(--font-sans);
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-dim);
  line-height: 1.35;
}

.gnostic-aeons-article.medium-mirror .medium-json-article-prose .gnostic-aeons-figure figcaption a {
  font-weight: 700;
  color: inherit;
}

.gnostic-aeons-article.medium-mirror .medium-json-article-prose .medium-json-gist-table-replace {
  margin: 1.25rem 0 1.5rem;
}

.gnostic-aeons-article.medium-mirror .medium-json-article-prose .medium-json-gist-table-replace .gist-source-table {
  margin-top: 0.75rem;
}

.gnostic-aeons-article.medium-mirror .medium-json-article-prose .medium-json-gist-table-replace .gist-source-table:first-child {
  margin-top: 0;
}

.gnostic-aeons-article.medium-mirror .medium-json-article-prose .medium-json-gist-table-replace .medium-json-gist-lead {
  margin: 0 0 0.75rem;
  font-size: 0.95rem;
}

.gnostic-aeons-article.medium-mirror .medium-json-article-prose .medium-json-gist-table-replace .medium-json-gist-footnote {
  margin: 0.75rem 0 0;
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.45;
}

.gnostic-aeons-article.medium-mirror .medium-json-article-prose .medium-json-gist-table-replace td h2 {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 400;
  line-height: 1.2;
}

.gnostic-aeons-article.medium-mirror .medium-json-embed .medium-json-embed-id {
  font-size: 0.85em;
  font-weight: 600;
  word-break: break-all;
}

.gnostic-aeons-figure {
  margin: 1.25rem 0;
  text-align: center;
  background: transparent;
}

.gnostic-aeons-figure img {
  max-width: 100%;
  height: auto;
  vertical-align: middle;
  background: transparent;
}

.gnostic-aeons-figure figcaption {
  display: block;
  margin-top: 0.5rem;
  font-family: var(--font-sans);
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-dim);
  line-height: 1.35;
}

.gnostic-aeons-figure figcaption a {
  font-weight: 700;
  color: inherit;
}

.gnostic-aeons-gist-tables {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-color);
}

.gnostic-aeons-gist-tables .gist-table-title {
  font-size: 1.1rem;
  margin-top: 1.75rem;
  margin-bottom: 0.75rem;
}

.gnostic-aeons-article .gist-source-table {
  margin: 1.25rem 0 1.5rem;
}

.gnostic-aeons-article .gist-source-table .gist-table-title {
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
}

/* Long-form essays: center main title + subtitle (reuse .article-page on other articles). */
.article-page > .article-page__title,
.article-page > .article-page__byline,
.article-page > .article-page__subtitle {
  text-align: center;
}

.article-page > .article-page__byline {
  margin: 0.35rem 0 0;
  font-size: 0.92rem;
  color: var(--muted);
  font-weight: 500;
  letter-spacing: 0.02em;
}

.article-page > .article-page__byline abbr {
  text-decoration: none;
  letter-spacing: 0.04em;
}

.article-page > .article-page__byline .article-page__reading-time {
  white-space: nowrap;
}

.article-page > .article-page__subtitle {
  font-weight: 600;
  color: var(--text-primary);
  margin-top: 0.5rem;
}

.gnostic-aeons-article h1[id],
.gnostic-aeons-article h2[id],
.gnostic-aeons-article h3[id],
.gnostic-aeons-article h4[id] {
  scroll-margin-top: 5rem;
}

/* Inline citation superscripts → General References */
.gnostic-aeons-article a.article-ref {
  text-decoration: none;
  color: inherit;
  border-bottom: 1px dotted var(--muted);
}

.gnostic-aeons-article a.article-ref:hover {
  color: var(--link);
  border-bottom-color: var(--link);
}

.gnostic-aeons-article ol li[id^="ga-ref-"] {
  scroll-margin-top: 5rem;
}

/* Citation hover popover (see assets/js/article-ref-popover.js) */
.article-ref-popover {
  position: fixed;
  z-index: 10000;
  max-width: min(400px, calc(100vw - 24px));
  max-height: min(50vh, 320px);
  overflow-y: auto;
  padding: 0.75rem 1rem;
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--text-primary);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.28);
  pointer-events: auto;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
  word-wrap: break-word;
}

.article-ref-popover a {
  color: var(--link, var(--accent));
  border-bottom: none;
}

.article-ref-popover a:hover {
  text-decoration: underline;
}

.gnostic-aeons-toc {
  margin: 1rem 0 1.75rem;
  padding: 0.75rem 0 0.75rem 1rem;
  border-left: 3px solid var(--border-color);
}

.gnostic-aeons-toc__list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.gnostic-aeons-toc__list ul {
  list-style: none;
  margin: 0.35rem 0 0.5rem 0;
  padding-left: 1.15rem;
  border-left: 1px solid var(--border-color);
}

.gnostic-aeons-toc__list li {
  margin: 0.25rem 0;
}

.gnostic-aeons-toc__list a {
  text-decoration: none;
}

.gnostic-aeons-toc__list a:hover {
  text-decoration: underline;
}

.gnostic-aeons-horos-link-icon {
  font-size: 1.35rem;
  line-height: 1.2;
  display: inline-block;
}

.gnostic-aeons-md-table {
  margin: 0.75rem 0 1.5rem;
}

/* Horizontal scroll for wide tabular content (Gnostic Aeons, legacy pages). */
.table-scroll {
  display: block;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
}

.gnostic-aeons-md-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.gnostic-aeons-md-table th,
.gnostic-aeons-md-table td {
  border: 1px solid var(--border-color);
  padding: var(--space-2) var(--space-3);
  vertical-align: middle;
}

.gnostic-aeons-md-table tbody th,
.gnostic-aeons-md-table tbody td {
  text-align: left;
}

.gnostic-aeons-md-table thead th,
.gnostic-aeons-md-table thead td {
  text-align: center;
}

.gnostic-aeons-md-table thead th {
  background: var(--brand-soft);
}

/*
 * Tables: stronger bullet discs in cells (default markers can read faint in dense tabular text).
 * Exclude .gnostic-aeons-toc__list (list-style: none must win vs. table td ul specificity).
 */
.main-content table td ul:not(.gnostic-aeons-toc__list),
.main-content table th ul:not(.gnostic-aeons-toc__list) {
  list-style-type: disc;
  list-style-position: outside;
}

.main-content table td ul:not(.gnostic-aeons-toc__list) > li::marker,
.main-content table th ul:not(.gnostic-aeons-toc__list) > li::marker {
  color: var(--text);
  font-size: 1.15em;
}

/* table-tools.js: optional hide list markers per column (checkbox off) */
#main-content td.table-tools__cell--list-markers-off ul:not(.gnostic-aeons-toc__list),
#main-content td.table-tools__cell--list-markers-off ol,
#main-content th.table-tools__cell--list-markers-off ul:not(.gnostic-aeons-toc__list),
#main-content th.table-tools__cell--list-markers-off ol {
  list-style: none !important;
  list-style-type: none !important;
  padding-inline-start: 1rem;
}

#main-content td.table-tools__cell--list-markers-off ul:not(.gnostic-aeons-toc__list) > li::marker,
#main-content td.table-tools__cell--list-markers-off ol > li::marker,
#main-content th.table-tools__cell--list-markers-off ul:not(.gnostic-aeons-toc__list) > li::marker,
#main-content th.table-tools__cell--list-markers-off ol > li::marker {
  content: none;
}

/* Nested lists in cells: keep inner bullets visible (skip toc-style lists) */
.main-content table td ul:not(.gnostic-aeons-toc__list) ul > li::marker,
.main-content table th ul:not(.gnostic-aeons-toc__list) ul > li::marker {
  font-size: 1.05em;
}

/* Medium-style clap + response counts (display-only; links go to Medium). */
.medium-engagement {
  font-family: var(--font-sans);
  color: var(--text-dim);
}

.medium-engagement--inline {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 0.85rem;
  line-height: 1.2;
}

.medium-engagement__item {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
}

.medium-engagement__svg {
  flex-shrink: 0;
  color: #5c6370;
  opacity: 0.92;
}

.medium-engagement__svg--clap {
  color: #1a8917;
  opacity: 1;
}

.medium-engagement__num {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  font-size: 0.92em;
  color: var(--text-primary);
}

.medium-engagement--block {
  margin: 1.25rem 0 0.5rem;
  padding: 0.85rem 0 0;
  border-top: 1px solid var(--border-color);
  max-width: 42rem;
}

.medium-engagement__block-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
  justify-content: space-between;
}

.medium-engagement__medium-link {
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  white-space: nowrap;
}

.medium-engagement__medium-link:hover {
  text-decoration: underline;
}

.medium-engagement__note {
  margin: 0.5rem 0 0;
  font-family: var(--font-sans);
  font-size: 0.82rem;
  color: var(--text-dim);
  line-height: 1.45;
}

/* Giscus (GitHub Discussions comments) */
.giscus-comments {
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-color);
  max-width: 100%;
}

.giscus-comments__title {
  font-family: var(--font-sans);
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0 0 0.35rem;
  color: var(--text-primary);
}

.giscus-comments__lead {
  font-family: var(--font-sans);
  font-size: 0.88rem;
  color: var(--text-dim);
  margin: 0 0 1rem;
  line-height: 1.45;
}

.giscus-comments .giscus {
  width: 100%;
}

/* Author / Medium listing tables only (not Gnostic Aeons data matrices). */
.gnostic-aeons-md-table.author-medium-table th,
.gnostic-aeons-md-table.author-medium-table td {
  vertical-align: middle;
}

.author-medium-table thead th,
.author-medium-table tbody td {
  vertical-align: middle;
}

/* Article / Publication / Status (short author hubs). */
.author-medium-table:not(.author-medium-table--extended) th:nth-child(3),
.author-medium-table:not(.author-medium-table--extended) td:nth-child(3) {
  white-space: normal;
  vertical-align: middle;
  min-width: 3rem;
  max-width: 4.5rem;
  width: 1%;
}

/* David Senouf: Article, Publication (stacked), Status, Synthesis, Keywords, Medium Keywords. */
.author-medium-table.author-medium-table--extended th:nth-child(1),
.author-medium-table.author-medium-table--extended td:nth-child(1) {
  min-width: min(11rem, 22vw);
  max-width: 17rem;
  width: 18%;
  white-space: normal;
  vertical-align: middle;
}

.author-medium-table.author-medium-table--extended th:nth-child(2),
.author-medium-table.author-medium-table--extended td:nth-child(2) {
  width: 1%;
  min-width: 7.25rem;
  max-width: 10rem;
  vertical-align: middle;
  font-size: 0.88rem;
  line-height: 1.35;
}

.author-medium-table.author-medium-table--extended .author-medium-publication-stack {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.author-medium-table.author-medium-table--extended .author-medium-publication-stack__row {
  white-space: nowrap;
}

.author-medium-table.author-medium-table--extended .author-medium-publication-stack__label {
  color: var(--muted);
  font-size: 0.82em;
  display: inline-block;
  min-width: 2.35rem;
}

.author-medium-table.author-medium-table--extended .author-medium-publication-stack__row--medium-pub {
  margin-bottom: 0.2rem;
  padding-bottom: 0.25rem;
  border-bottom: 1px solid var(--line);
}

.author-medium-table.author-medium-table--extended .author-medium-publication-stack__row--medium-pub .author-medium-publication-stack__value {
  font-size: 0.92em;
}

.author-medium-table.author-medium-table--extended th:nth-child(3),
.author-medium-table.author-medium-table--extended td:nth-child(3) {
  white-space: nowrap;
  vertical-align: middle;
  /* Stacked claps + responses; narrow column */
  min-width: 5.25rem;
  max-width: 7rem;
  width: 1%;
}

/* Status: clap + chat icons stacked vertically (each row: icon + count) */
.author-medium-table .medium-engagement--inline {
  flex-direction: column;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.4rem 0;
}

.author-medium-table.author-medium-table--extended th:nth-child(4),
.author-medium-table.author-medium-table--extended td:nth-child(4) {
  white-space: normal;
  vertical-align: middle;
  min-width: 26rem;
  max-width: min(52rem, 74vw);
  font-size: 0.92rem;
  line-height: 1.45;
  color: var(--text);
}

/* Keywords + Medium Keywords: match width; space comes partly from a slightly narrower Synthesis column above. */
.author-medium-table.author-medium-table--extended th:nth-child(5),
.author-medium-table.author-medium-table--extended td:nth-child(5),
.author-medium-table.author-medium-table--extended th:nth-child(6),
.author-medium-table.author-medium-table--extended td:nth-child(6) {
  white-space: normal;
  vertical-align: middle;
  width: 14%;
  min-width: 9rem;
  max-width: min(16rem, 28vw);
  overflow-wrap: anywhere;
  word-wrap: break-word;
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--muted);
}

.author-medium-table .medium-synthesis-text {
  display: block;
}

.author-medium-table.author-medium-table--extended td:nth-child(4) {
  overflow: visible;
}

@media (max-width: 960px) {
  .author-medium-table.author-medium-table--extended th:nth-child(1),
  .author-medium-table.author-medium-table--extended td:nth-child(1) {
    min-width: 12rem;
    max-width: none;
    width: auto;
  }
}

.author-medium-table .medium-synthesis-text--missing,
.author-medium-table .medium-keywords--missing {
  color: var(--muted);
}

.author-medium-table .medium-keywords {
  display: block;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.author-medium-table .medium-topic-tags {
  display: block;
}

.author-medium-table .medium-topic-tags--missing {
  color: var(--muted);
}

/*
 * Contributions page (/contributions.html): seven columns (Author + same six as author hubs).
 * Base --extended nth-child rules assume six columns, so we remap widths 1–7 explicitly.
 */
.author-medium-table.author-medium-table--extended.author-medium-table--contributions thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  box-shadow: 0 1px 0 var(--border-color);
}

.author-medium-table.author-medium-table--extended.author-medium-table--contributions tbody tr:nth-child(even) td {
  background: rgba(0, 0, 128, 0.045);
}

.author-medium-table.author-medium-table--extended.author-medium-table--contributions th:nth-child(1),
.author-medium-table.author-medium-table--extended.author-medium-table--contributions td:nth-child(1) {
  min-width: 5.75rem;
  max-width: 10rem;
  width: 1%;
  white-space: normal;
  vertical-align: middle;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-dim);
}

.author-medium-table.author-medium-table--extended.author-medium-table--contributions th:nth-child(2),
.author-medium-table.author-medium-table--extended.author-medium-table--contributions td:nth-child(2) {
  min-width: min(11rem, 22vw);
  max-width: 17rem;
  width: 18%;
  white-space: normal;
  vertical-align: middle;
  font-size: 0.95rem;
  line-height: 1.45;
}

.author-medium-table.author-medium-table--extended.author-medium-table--contributions th:nth-child(3),
.author-medium-table.author-medium-table--extended.author-medium-table--contributions td:nth-child(3) {
  width: 1%;
  min-width: 7.25rem;
  max-width: 10rem;
  vertical-align: middle;
  font-size: 0.88rem;
  line-height: 1.35;
}

.author-medium-table.author-medium-table--extended.author-medium-table--contributions th:nth-child(4),
.author-medium-table.author-medium-table--extended.author-medium-table--contributions td:nth-child(4) {
  white-space: nowrap;
  vertical-align: middle;
  min-width: 5.25rem;
  max-width: 7rem;
  width: 1%;
}

.author-medium-table.author-medium-table--extended.author-medium-table--contributions th:nth-child(5),
.author-medium-table.author-medium-table--extended.author-medium-table--contributions td:nth-child(5) {
  white-space: normal;
  vertical-align: middle;
  min-width: 22rem;
  max-width: min(48rem, 70vw);
  font-size: 0.92rem;
  line-height: 1.45;
  color: var(--text);
}

.author-medium-table.author-medium-table--extended.author-medium-table--contributions td:nth-child(5) {
  overflow: visible;
}

.author-medium-table.author-medium-table--extended.author-medium-table--contributions th:nth-child(6),
.author-medium-table.author-medium-table--extended.author-medium-table--contributions td:nth-child(6),
.author-medium-table.author-medium-table--extended.author-medium-table--contributions th:nth-child(7),
.author-medium-table.author-medium-table--extended.author-medium-table--contributions td:nth-child(7) {
  white-space: normal;
  vertical-align: middle;
  width: 12%;
  min-width: 8rem;
  max-width: min(14rem, 24vw);
  overflow-wrap: anywhere;
  word-wrap: break-word;
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--muted);
}

@media (max-width: 960px) {
  .author-medium-table.author-medium-table--extended.author-medium-table--contributions th:nth-child(2),
  .author-medium-table.author-medium-table--extended.author-medium-table--contributions td:nth-child(2) {
    min-width: 12rem;
    max-width: none;
    width: auto;
  }
}

/* Neutralize legacy font tag color/size overrides in main text flow. */
.legacy-content font,
.legacy-content font[color],
.legacy-content font[size] {
  color: inherit !important;
  font-size: inherit;
}

/* Keep legacy scan/reference markers visually subdued. */
.legacy-content .contnote,
.legacy-content .contnote font,
.legacy-content a[name^="page_"] font,
.legacy-content a[name^="p."] font,
.legacy-content font[color="#008000" i],
.legacy-content font[color="green" i] {
  color: #5f7f5f !important;
  font-size: 0.82rem !important;
  line-height: 1.35;
}

.welcome-main-logo {
  margin: 0 0 0.4rem;
  text-align: center;
}

.welcome-main-logo img {
  max-width: 100%;
  height: auto;
}

/* Normalize crowded legacy link stacks to body scale. */
.legacy-content h6 {
  font-size: 1rem;
  line-height: 1.45;
  margin: 0.5rem 0;
}

.legacy-content h6 a,
.legacy-content h5 a {
  font-size: inherit;
}

/* Normalize tiny legacy font tags on SBJ page only. */
.legacy-content--sbj p,
.legacy-content--sbj li,
.legacy-content--sbj td {
  font-size: 1rem;
  line-height: 1.55;
}

.legacy-content--sbj font[size="-1"],
.legacy-content--sbj font[size="1"],
.legacy-content--sbj font[size="2"],
.legacy-content--sbj font[size="3"] {
  font-size: 1rem;
}

.legacy-content table {
  border-collapse: separate;
  border-spacing: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  width: 100%;
  max-width: 100%;
  margin: 0.75rem 0;
  padding: clamp(0.75rem, 1.8vw, 1.5rem);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), 0 0 0 1px var(--line);
}

/*
 * All tables in primary content: vertically center every cell.
 * !important overrides legacy valign=, inline vertical-align, and page-local <style> blocks.
 */
.main-content table th,
.main-content table td {
  vertical-align: middle !important;
}

thead th,
thead td {
  text-align: center;
}

table:not(:has(thead)) > tbody > tr:first-child th,
table:not(:has(thead)) > tbody > tr:first-child td {
  text-align: center;
}

tbody th,
tbody td {
  text-align: left;
}

.legacy-content audio,
.legacy-content video {
  border-radius: 20px;
  background: #000;
  border: 1px solid var(--line);
  margin: 20px 0;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.legacy-content audio:hover,
.legacy-content video:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px var(--glow);
}

.nav-backdrop {
  position: fixed;
  inset: 0;
  border: 0;
  margin: 0;
  padding: 0;
  background: rgba(0, 0, 0, 0.6);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 89;
}

::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-color);
}

::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
}

body.nav-open .nav-backdrop {
  opacity: 1;
  pointer-events: auto;
}

/* Tablet + mobile off-canvas nav */
@media (max-width: 960px) {
  /* Prevent accidental horizontal page scroll when legacy layout tables are wider than the viewport;
   * inner regions use overflow-x: auto / scroll where needed. */
  html {
    overflow-x: hidden;
  }

  .main-content__toolbar {
    justify-content: space-between;
    min-height: 2.6rem;
    margin: 0 0 0.65rem;
  }

  .nav-drawer-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    position: static;
    transform: none;
    min-width: 44px;
    min-height: 44px;
    -webkit-tap-highlight-color: rgba(0, 0, 128, 0.12);
  }

  .layout {
    grid-template-columns: 1fr;
    gap: 0.65rem;
    /* Minimal gutters + respect notched home-indicator / side safe areas. */
    padding: 0.5rem max(0.45rem, env(safe-area-inset-right, 0px))
      max(0.85rem, env(safe-area-inset-bottom, 0px)) max(0.45rem, env(safe-area-inset-left, 0px));
    width: 100%;
    max-width: 100%;
  }

  .top-nav {
    margin-top: 0.35rem;
  }

  .top-nav ul {
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
  }

  .top-nav a {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
  }

  .site-nav-wrap {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 90;
    width: min(86vw, 360px);
    height: 100dvh;
    max-height: 100dvh;
    transform: translateX(-105%);
    transition: transform 0.2s ease;
    padding: max(0.75rem, env(safe-area-inset-top, 0px)) max(0.65rem, env(safe-area-inset-right, 0px))
      max(0.75rem, env(safe-area-inset-bottom, 0px)) max(0.65rem, env(safe-area-inset-left, 0px));
    background: var(--bg-color);
    border-right: 1px solid var(--line);
    box-shadow: 16px 0 36px rgba(0, 0, 0, 0.25);
    max-height: none;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
  }

  .site-nav-wrap[data-open="true"] {
    transform: translateX(0);
  }

  .site-nav {
    position: static;
    max-height: calc(100dvh - 1.25rem);
  }

  .nav-drawer-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--text);
    border-radius: 6px;
    padding: 0.35rem 0.55rem;
    margin: 0 0 0.5rem;
    -webkit-tap-highlight-color: rgba(0, 0, 128, 0.12);
  }

  .nav-drawer-dismiss {
    display: none;
    position: fixed;
    top: max(0.75rem, env(safe-area-inset-top, 0px));
    right: max(0.75rem, env(safe-area-inset-right, 0px));
    z-index: 91;
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--text);
    border-radius: 6px;
    padding: 0.4rem 0.6rem;
    min-width: 44px;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    -webkit-tap-highlight-color: rgba(0, 0, 128, 0.12);
  }

  body.nav-open .nav-drawer-dismiss {
    display: inline-flex;
  }

  .main-content {
    /* Contain width; horizontal scroll lives on table wrappers, not the whole column. */
    overflow-x: hidden;
    padding: 0.65rem 0.5rem;
    border-radius: 10px;
    max-width: 100%;
  }

  .legacy-content {
    max-width: 100%;
  }

  /*
   * Nested blockquotes (Nag Hammadi, library pages) used to stack huge browser
   * default margins — body became a narrow ribbon. Flatten to welcome-like width.
   */
  .legacy-content blockquote {
    margin: 0.65rem 0;
    margin-left: 0;
    margin-right: 0;
    padding-left: 0.55rem;
    padding-right: 0.2rem;
    max-width: 100%;
    box-sizing: border-box;
    border-left: 3px solid rgba(215, 220, 225, 0.95);
  }

  .legacy-content blockquote blockquote {
    margin-left: 0;
    margin-right: 0;
    padding-left: 0.5rem;
    border-left-color: rgba(215, 220, 225, 0.65);
  }

  /* Floated legacy images no longer steal half the column on narrow screens. */
  .legacy-content img[align="left"],
  .legacy-content img[align="right"] {
    float: none;
    display: block;
    margin: 0.75rem auto;
    max-width: 100%;
    height: auto;
  }

  /* Layout tables only; tabular data tables overridden below (higher specificity). */
  body:not(.author-essay-post) .legacy-content table:not(.main-scriptures-table) {
    display: block;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    margin: 0.45rem 0;
    padding: 0.5rem 0.45rem;
    box-sizing: border-box;
  }

  /* gnostic-jung / library: drop obsolete HTML width="1100" so the wrapper does not force page overflow. */
  body:not(.author-essay-post) .legacy-content > table:not(.main-scriptures-table) {
    width: auto !important;
    min-width: 0;
    max-width: 100% !important;
  }

  /*
   * Top-level wrapper tables (.zebra, etc.): with display:block on <table>, cells
   * otherwise shrink to content — leave large side margins on mobile. Force the
   * main <td> to span the full content width.
   */
  body:not(.author-essay-post) .legacy-content > table:not(.main-scriptures-table) > tbody > tr > th,
  body:not(.author-essay-post) .legacy-content > table:not(.main-scriptures-table) > tbody > tr > td,
  body:not(.author-essay-post) .legacy-content > table:not(.main-scriptures-table) > tr > th,
  body:not(.author-essay-post) .legacy-content > table:not(.main-scriptures-table) > tr > td {
    display: block;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
  }

  /*
   * Nested data tables: span full content width; grow with content and scroll
   * inside the cell (or outer block table) instead of squashing columns.
   */
  body:not(.author-essay-post) .legacy-content table:not(.main-scriptures-table) table {
    display: table !important;
    width: max-content !important;
    min-width: 100% !important;
    max-width: none !important;
    table-layout: auto !important;
    margin-left: 0;
    margin-right: 0;
  }

  body:not(.author-essay-post) .legacy-content table:not(.main-scriptures-table) table th,
  body:not(.author-essay-post) .legacy-content table:not(.main-scriptures-table) table td {
    overflow-wrap: anywhere;
    word-break: normal;
    hyphens: manual;
    min-width: 0;
    vertical-align: middle;
  }

  /* Two-column link grids: prefer horizontal scroll to unreadable fixed columns. */
  body:not(.author-essay-post) .legacy-content table:not(.main-scriptures-table) table th:first-child,
  body:not(.author-essay-post) .legacy-content table:not(.main-scriptures-table) table td:first-child {
    width: auto;
    min-width: 5.5rem;
    max-width: 40vw;
  }

  .legacy-content .gnostic-aeons-md-table {
    max-width: 100%;
  }

  .legacy-content .gnostic-aeons-md-table .table-scroll {
    width: 100%;
    max-width: 100%;
  }

  .legacy-content .gnostic-aeons-md-table table {
    display: table;
    width: max-content;
    min-width: 100%;
    max-width: none;
    margin: 0.45rem 0;
    table-layout: auto;
  }

  .legacy-content .gist-source-table .table-scroll {
    width: 100%;
    max-width: 100%;
  }

  /* Data tables placed directly inside blockquotes (e.g. some NHL pages). */
  .legacy-content blockquote:has(> table:not(.main-scriptures-table)) {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    max-width: 100%;
  }

  .legacy-content blockquote > table:not(.main-scriptures-table) {
    display: table !important;
    width: max-content !important;
    min-width: 100% !important;
    max-width: none !important;
    table-layout: auto !important;
    margin: 0.5rem 0;
  }

  /* Section index tables live outside .legacy-content. */
  .section-nav-table__wrap {
    width: 100%;
    max-width: 100%;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
  }

  .section-nav-table__table {
    width: max-content;
    min-width: 100%;
  }

  .legacy-content iframe {
    max-width: 100%;
  }

  .legacy-content iframe[src*="youtube.com/embed"],
  .legacy-content iframe[src*="youtube-nocookie.com"] {
    height: auto;
    aspect-ratio: 16 / 9;
  }

  .search-ui__form input[type="search"] {
    min-width: 0;
    flex: 1 1 12rem;
  }

  /* 16px+ avoids iOS zoom on focus for search controls. */
  .search-ui__form select,
  .search-ui__form button,
  .v2-search-mode {
    font-size: 1rem;
  }

  .article-page > .article-page__title {
    font-size: clamp(1.35rem, 5vw, 1.95rem);
    line-height: 1.2;
    overflow-wrap: anywhere;
  }

  .article-page > .article-page__byline {
    max-width: 100%;
    padding: 0 0.35rem;
    box-sizing: border-box;
    line-height: 1.5;
    hyphens: none;
  }

  .article-page > .article-page__subtitle {
    font-size: clamp(0.95rem, 3.2vw, 1.05rem);
    padding: 0 0.25rem;
    box-sizing: border-box;
  }

  .gnostic-aeons-article h1[id],
  .gnostic-aeons-article h2[id],
  .gnostic-aeons-article h3[id],
  .gnostic-aeons-article h4[id] {
    scroll-margin-top: 4rem;
  }

  .gnostic-aeons-toc {
    padding-left: 0.65rem;
    margin-left: 0;
  }

  .gnostic-aeons-toc__list ul {
    padding-left: 0.95rem;
  }
}

/* Narrow phones: welcome search stacks cleanly; tighter essay ToC. */
@media (max-width: 480px) {
  /* Slightly smaller root so long-form text fits small screens without crowding. */
  html {
    font-size: 18px;
  }

  .layout {
    padding-inline-start: max(0.35rem, env(safe-area-inset-left, 0px));
    padding-inline-end: max(0.35rem, env(safe-area-inset-right, 0px));
  }

  .article-heading-with-share {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
  }

  .article-heading-with-share h2 {
    min-width: 0;
  }

  .article-heading-with-share__action {
    align-self: flex-end;
  }

  .search-ui__form input[type="search"] {
    flex: 1 1 100%;
    min-width: 0;
  }

  .search-ui__form select,
  .search-ui__form button {
    flex: 1 1 100%;
    min-width: 0;
  }

  .article-page > .article-page__byline {
    font-size: 0.8125rem;
    letter-spacing: 0.01em;
  }

  .gnostic-aeons-toc__list ul {
    padding-left: 0.75rem;
    margin-left: 0;
  }
}

/* Desktop: primary nav is a horizontal top bar; main column full width below. */
@media (min-width: 961px) {
  .layout {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr);
    grid-template-areas:
      "site-top-nav"
      "site-main";
    gap: 0;
    row-gap: 0;
    align-items: start;
  }

  .site-nav-wrap {
    grid-area: site-top-nav;
    position: sticky;
    top: 0;
    z-index: 120;
    width: 100%;
    max-width: none;
    max-height: none;
    min-width: 0;
    overflow: visible;
    padding: 0;
    margin: 0 0 1.15rem;
    align-self: stretch;
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
  }

  .main-content {
    grid-area: site-main;
    min-width: 0;
  }
}

/* Reusable legacy nav-style action link. */
.legacy-nav-button {
  display: inline-block;
  text-decoration: none;
  color: #0b0c0c;
  background: #ffffff;
  border: 1px solid #d8dadd;
  border-left: 4px solid #005ea5;
  border-radius: 6px;
  padding: 0.42rem 0.62rem;
  line-height: 1.3;
  font-size: 0.9rem;
  font-weight: 700;
}

.legacy-nav-button:hover,
.legacy-nav-button:focus-visible {
  background: #f3f8fc;
  border-color: #b1b4b6;
}

/* Top horizontal archive index for lectures page. */
.lecture-top-index {
  margin: 0 0 0.9rem;
  text-align: center;
}

.lecture-top-index__title {
  margin: 0 0 0.35rem;
  color: var(--accent);
  font-size: 1.02rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.lecture-top-index__links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.35rem;
  padding: 0;
  margin: 0;
  list-style: none;
}

.lecture-top-index__links a {
  display: inline-block;
  padding: 0.35rem 0.55rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font-size: 0.9rem;
  line-height: 1.25;
}

.lecture-top-index__links a:hover,
.lecture-top-index__links a:focus-visible {
  background: var(--brand-soft);
  color: var(--brand);
  text-shadow: none;
}

.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;
}

/* Selected audio lecture table module on /lectures.html. */
.lecture-audio-catalog {
  margin: 0.8rem 0 1rem;
  background: #f7faff;
  border: 1px solid #cbdaf0;
  border-radius: 14px;
  padding: 1rem;
  color: #1f3352;
}

.lecture-audio-catalog__header {
  text-align: center;
  margin-bottom: 0.8rem;
}

.lecture-audio-catalog__title {
  margin: 0;
  font-size: 1.45rem;
  color: #0b4ea2;
}

.lecture-audio-catalog__subtitle {
  margin: 0.4rem 0 0;
  color: #486b97;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.74rem;
  font-weight: 600;
}

.lecture-audio-catalog__search {
  margin: 0 0 0.9rem;
}

.lecture-audio-catalog__search-input {
  width: 100%;
  border: 1px solid #b9cee9;
  background: #ffffff;
  color: #1f3352;
  border-radius: 10px;
  padding: 0.62rem 0.8rem;
  font-size: 0.95rem;
}

.lecture-audio-catalog__search-input:focus-visible {
  outline: 2px solid #0b4ea2;
  outline-offset: 2px;
}

.lecture-audio-catalog__table-wrap {
  border: 1px solid #cbdaf0;
  border-radius: 12px;
  overflow: hidden;
  background: #ffffff;
}

.lecture-audio-catalog__table {
  width: 100%;
  border-collapse: collapse;
  margin: 0;
}

.section-nav-table {
  margin: 0 0 1.25rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  padding: 0.9rem;
}

.section-nav-table__title {
  margin: 0 0 0.7rem;
  font-size: 1.05rem;
}

.section-nav-table__wrap {
  overflow-x: auto;
}

.section-nav-table__table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.section-nav-table__table th,
.section-nav-table__table td {
  border: 1px solid var(--line);
  padding: 0.45rem 0.55rem;
  vertical-align: middle;
}

.section-nav-table__table tbody th,
.section-nav-table__table tbody td {
  text-align: left;
}

.section-nav-table__table thead th,
.section-nav-table__table thead td {
  text-align: center;
}

.section-nav-table__table th {
  background: rgba(255, 255, 255, 0.04);
}

.lecture-audio-catalog__row td {
  padding: 0.95rem 1rem;
  border-bottom: 1px solid #d9e5f6;
  vertical-align: middle;
}

.lecture-audio-catalog__row:last-child td {
  border-bottom: 0;
}

.lecture-audio-catalog__row:hover {
  background: #eef5ff;
}

.lecture-audio-catalog__lecture-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.lecture-audio-catalog__lecture-title a {
  color: #0f2f5a;
}

.lecture-audio-catalog__lecture-title a:hover {
  color: #0b4ea2;
  text-shadow: none;
}

.lecture-audio-catalog__lecture-desc {
  color: #4c6588;
  font-size: 0.9rem;
  line-height: 1.45;
}

.lecture-audio-catalog__action {
  width: 220px;
  text-align: right;
}

.lecture-audio-catalog__badge {
  display: inline-block;
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 5px;
  padding: 0.2rem 0.45rem;
  margin-bottom: 0.45rem;
}

.lecture-audio-catalog__badge--free {
  color: #0b4ea2;
  border: 1px solid #0b4ea2;
  background: rgba(11, 78, 162, 0.1);
}

.lecture-audio-catalog__badge--external {
  color: #4c6588;
  border: 1px solid #c1d3ec;
  background: rgba(11, 78, 162, 0.06);
}

.lecture-audio-catalog__btn {
  display: inline-block;
  text-decoration: none;
  background: #0b4ea2;
  color: #ffffff;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.36rem 0.68rem;
}

.lecture-audio-catalog__btn:hover,
.lecture-audio-catalog__btn:focus-visible {
  color: #ffffff;
  text-shadow: none;
  transform: translateY(-1px);
}

.lecture-audio-catalog__btn--ghost {
  background: transparent;
  color: #0b4ea2;
  border: 1px solid #0b4ea2;
}

.lecture-audio-catalog__btn--ghost:hover,
.lecture-audio-catalog__btn--ghost:focus-visible {
  color: #0b4ea2;
}

/* Main Scriptures data table skin (+ DS/SD long-form essays): matches main-scriptures.html. */
.main-scriptures-page .main-scriptures-table,
.main-scriptures-page .main-scriptures-legend,
body.author-essay-post .legacy-content table {
  width: 100%;
  border-collapse: collapse;
}

.main-scriptures-page .main-scriptures-table th,
.main-scriptures-page .main-scriptures-table td,
.main-scriptures-page .main-scriptures-legend th,
.main-scriptures-page .main-scriptures-legend td,
body.author-essay-post .legacy-content table th,
body.author-essay-post .legacy-content table td {
  padding: 0.5rem 0.6rem;
  border: 1px solid #d3dce9;
  text-align: left;
  vertical-align: middle;
  font-size: 0.94rem;
  line-height: 1.35;
}

.main-scriptures-page .main-scriptures-table thead th,
.main-scriptures-page .main-scriptures-table thead td,
.main-scriptures-page .main-scriptures-legend thead th,
.main-scriptures-page .main-scriptures-legend thead td,
body.author-essay-post .legacy-content table thead th,
body.author-essay-post .legacy-content table thead td {
  text-align: center;
}

.main-scriptures-page .main-scriptures-table thead th,
.main-scriptures-page .main-scriptures-legend thead th,
body.author-essay-post .legacy-content table thead th {
  background: #edf3fb;
  color: #163965;
}

/*
 * DS/SD gist pipe tables: “matrix” grids whose data columns are ○ (or empty).
 * First column = article / row label (left); remaining columns centered.
 * Covers injected TOC tables + cached gists (same aria-labels on any essay).
 */
body.author-essay-post .gist-source-table[aria-label="Multidimensional thematic mapping (modules I–V)"] thead th:first-child,
body.author-essay-post .gist-source-table[aria-label="KeywordMapping"] thead th:first-child,
body.author-essay-post .gist-source-table[aria-label="TransposeThematic"] thead th:first-child {
  text-align: left;
}

body.author-essay-post .gist-source-table[aria-label="Multidimensional thematic mapping (modules I–V)"] thead th:not(:first-child),
body.author-essay-post .gist-source-table[aria-label="Multidimensional thematic mapping (modules I–V)"] tbody td:not(:first-child),
body.author-essay-post .gist-source-table[aria-label="KeywordMapping"] thead th:not(:first-child),
body.author-essay-post .gist-source-table[aria-label="KeywordMapping"] tbody td:not(:first-child),
body.author-essay-post .gist-source-table[aria-label="TransposeThematic"] thead th:not(:first-child),
body.author-essay-post .gist-source-table[aria-label="TransposeThematic"] tbody td:not(:first-child) {
  text-align: center;
}

/*
 * David Senouf (DS) Medium essays: fewer heavy bolds — default <strong> to medium weight,
 * keep section labels in .medium-json-type9 slightly stronger, lighten figure captions + gist h4.
 * (Scoped via body.author-ds-post from layouts/base.njk; not applied to SD posts.)
 */
body.author-ds-post .gnostic-aeons-article .medium-mirror__prose strong,
body.author-ds-post .gnostic-aeons-article .medium-mirror__prose b {
  font-weight: 500;
}

body.author-ds-post .gnostic-aeons-article .medium-mirror__prose .medium-json-type9 {
  font-weight: 500;
}

body.author-ds-post .gnostic-aeons-article .medium-mirror__prose .medium-json-type9 strong {
  font-weight: 600;
}

body.author-ds-post .gnostic-aeons-article .medium-mirror__prose .gnostic-aeons-figure figcaption,
body.author-ds-post .gnostic-aeons-article .medium-mirror__prose .gnostic-aeons-figure figcaption a {
  font-weight: 500;
}

body.author-ds-post .gnostic-aeons-article .medium-mirror__prose .gist-source-table .gist-table-title {
  font-weight: 500;
}

/* Thematic synthesis: alphabetical list as # + title; sort/filter via table-tools.js */
body.thematic-synthesis-page .thematic-alphabetical-posts-table table {
  table-layout: fixed;
}

body.thematic-synthesis-page .thematic-alphabetical-posts-table th:first-child,
body.thematic-synthesis-page .thematic-alphabetical-posts-table td:first-child {
  width: 3.5rem;
  text-align: center;
}

/*
 * Thematic synthesis: “Reading paths and timings by module” (injected title) or gist `Thematic2`.
 * Col1–3 slightly narrower; col4 “Individual Read Times” at 30% (1.5× former 20%); col2 reading path still largest.
 */
body.thematic-synthesis-page
  .gist-source-table[aria-label="Reading paths and timings by module"]
  .gnostic-aeons-md-table
  table,
body.thematic-synthesis-page
  .gist-source-table[aria-label="Thematic2"]
  .gnostic-aeons-md-table
  table {
  table-layout: fixed;
  width: 100%;
}

body.thematic-synthesis-page
  .gist-source-table[aria-label="Reading paths and timings by module"]
  .gnostic-aeons-md-table
  th:nth-child(1),
body.thematic-synthesis-page
  .gist-source-table[aria-label="Reading paths and timings by module"]
  .gnostic-aeons-md-table
  td:nth-child(1),
body.thematic-synthesis-page
  .gist-source-table[aria-label="Thematic2"]
  .gnostic-aeons-md-table
  th:nth-child(1),
body.thematic-synthesis-page
  .gist-source-table[aria-label="Thematic2"]
  .gnostic-aeons-md-table
  td:nth-child(1) {
  width: 18%;
  vertical-align: middle;
}

body.thematic-synthesis-page
  .gist-source-table[aria-label="Reading paths and timings by module"]
  .gnostic-aeons-md-table
  th:nth-child(2),
body.thematic-synthesis-page
  .gist-source-table[aria-label="Reading paths and timings by module"]
  .gnostic-aeons-md-table
  td:nth-child(2),
body.thematic-synthesis-page
  .gist-source-table[aria-label="Thematic2"]
  .gnostic-aeons-md-table
  th:nth-child(2),
body.thematic-synthesis-page
  .gist-source-table[aria-label="Thematic2"]
  .gnostic-aeons-md-table
  td:nth-child(2) {
  width: 27%;
  vertical-align: middle;
  word-break: break-word;
}

body.thematic-synthesis-page
  .gist-source-table[aria-label="Reading paths and timings by module"]
  .gnostic-aeons-md-table
  th:nth-child(3),
body.thematic-synthesis-page
  .gist-source-table[aria-label="Reading paths and timings by module"]
  .gnostic-aeons-md-table
  td:nth-child(3),
body.thematic-synthesis-page
  .gist-source-table[aria-label="Thematic2"]
  .gnostic-aeons-md-table
  th:nth-child(3),
body.thematic-synthesis-page
  .gist-source-table[aria-label="Thematic2"]
  .gnostic-aeons-md-table
  td:nth-child(3) {
  width: 25%;
  vertical-align: middle;
}

body.thematic-synthesis-page
  .gist-source-table[aria-label="Reading paths and timings by module"]
  .gnostic-aeons-md-table
  th:nth-child(4),
body.thematic-synthesis-page
  .gist-source-table[aria-label="Reading paths and timings by module"]
  .gnostic-aeons-md-table
  td:nth-child(4),
body.thematic-synthesis-page
  .gist-source-table[aria-label="Thematic2"]
  .gnostic-aeons-md-table
  th:nth-child(4),
body.thematic-synthesis-page
  .gist-source-table[aria-label="Thematic2"]
  .gnostic-aeons-md-table
  td:nth-child(4) {
  width: 30%;
  vertical-align: middle;
}

.main-scriptures-page .ms-cat {
  display: inline-flex;
  align-items: center;
  gap: 0.34rem;
  white-space: nowrap;
  font-size: 0.84rem;
  font-weight: 700;
  line-height: 1.1;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  border: 1px solid transparent;
}

.main-scriptures-page .ms-cat__dot {
  font-size: 0.78em;
  line-height: 1;
}

.main-scriptures-page .ms-cat--gospel {
  color: #0f5b2d;
  border-color: #84d6a3;
  background: #ecfaf2;
}

.main-scriptures-page .ms-cat--treatise {
  color: #114e8d;
  border-color: #8fc0ef;
  background: #edf6ff;
}

.main-scriptures-page .ms-cat--revelation {
  color: #5a2a88;
  border-color: #bca0e7;
  background: #f5efff;
}

.main-scriptures-page .ms-cat--epistle {
  color: #715300;
  border-color: #f2d57a;
  background: #fff9e7;
}

.main-scriptures-page .ms-cat--liturgical {
  color: #8f4d06;
  border-color: #f0ba7a;
  background: #fff2e8;
}

.main-scriptures-page .ms-cat--hymns {
  color: #8c1d2f;
  border-color: #ea9ca8;
  background: #fff1f4;
}

.search-ui {
  width: 100%;
  font-family: var(--font-sans);
}

.breadcrumbs,
.top-nav,
.nav-drawer-toggle,
.nav-drawer-close,
.nav-drawer-dismiss,
.table-tools,
.section-nav-table {
  font-family: var(--font-sans);
}

.search-ui__title {
  margin: 0 0 0.5rem;
}

.search-ui__title--welcome {
  font-size: 1.28rem;
  line-height: 1.25;
}

/* G.R.S. Mead pages already have unified nav; hide duplicated legacy side menu */
.main-content--grs-mead .legacy-content > table > tbody > tr > td:first-child {
  display: none;
}

.main-content--grs-mead .legacy-content > table > tbody > tr > td {
  width: 100%;
}

.search-ui__lead,
.search-ui__status {
  margin: 0 0 0.8rem;
  color: var(--muted);
}

.search-ui__form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0 0 1rem;
}

.search-ui__form input[type="search"] {
  flex: 1 1 340px;
  min-width: 240px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.55rem 0.7rem;
  font-size: 1rem;
}

.search-ui__form select,
.v2-search-mode {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.55rem 0.7rem;
  font-size: 0.95rem;
  background: #fff;
  color: var(--ink);
}

.v2-search-mode-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.search-ui__form button {
  border: 1px solid #005ea5;
  background: #005ea5;
  color: #fff;
  border-radius: 8px;
  padding: 0.55rem 0.85rem;
  font-weight: 600;
  cursor: pointer;
}

.search-ui__results {
  margin: 0;
  padding-left: 1.2rem;
}

.search-ui__result {
  margin: 0 0 0.85rem;
}

.search-ui__result-link {
  font-size: 1.05rem;
  font-weight: 600;
}

.search-ui__result-url {
  color: #006435;
  font-size: 0.85rem;
  margin: 0.15rem 0 0.25rem;
}

.search-ui__result-snippet {
  margin: 0;
}

/* Contact (FormSubmit) */
.contact-page .contact-form {
  width: 100%;
  max-width: 40rem;
  font-family: var(--font-sans);
}

.contact-form__title {
  margin: 0 0 0.5rem;
  font-size: 1.35rem;
}

.contact-form__lead {
  margin: 0 0 1rem;
  color: var(--muted);
  line-height: 1.5;
}

.contact-form__form {
  margin: 0;
}

.contact-form__field {
  margin: 0 0 1rem;
}

.contact-form__field label {
  display: block;
  margin-bottom: 0.35rem;
  font-weight: 600;
  font-size: 0.95rem;
}

.contact-form__req {
  font-weight: 400;
  color: var(--muted);
  font-size: 0.88rem;
}

.contact-form__opt {
  font-weight: 400;
  color: var(--muted);
  font-size: 0.88rem;
}

.contact-form__hint {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.4;
}

.contact-form__attachment-warning {
  margin: 0 0 1rem;
  padding: 0.65rem 0.85rem;
  border: 1px solid #c9a227;
  border-radius: 8px;
  background: rgba(201, 162, 39, 0.12);
  font-size: 0.92rem;
  line-height: 1.45;
  color: var(--text-primary);
}

.contact-form__attachment-warning strong {
  color: var(--text-primary);
}

.contact-form__field input[type="text"],
.contact-form__field input[type="email"],
.contact-form__field textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.55rem 0.7rem;
  font-size: 1rem;
  font-family: inherit;
  background: #fff;
  color: var(--ink);
}

.contact-form__field textarea {
  resize: vertical;
  min-height: 8rem;
  line-height: 1.45;
}

.contact-form__field input:focus-visible,
.contact-form__field textarea:focus-visible {
  outline: 2px solid #005ea5;
  outline-offset: 2px;
}

.contact-form__field input[type="file"] {
  display: block;
  width: 100%;
  max-width: 100%;
  margin-top: 0.15rem;
  font-size: 0.95rem;
  color: var(--ink);
}

.contact-form__field input[type="file"]::file-selector-button {
  font: inherit;
  margin-right: 0.75rem;
  padding: 0.45rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface, #fff);
  color: var(--ink);
  cursor: pointer;
}

.contact-form__field input[type="file"]:hover::file-selector-button {
  border-color: #005ea5;
}

.contact-form__field input[type="file"]:focus-visible {
  outline: none;
}

.contact-form__field input[type="file"]:focus-visible::file-selector-button {
  outline: 2px solid #005ea5;
  outline-offset: 2px;
}

.contact-form__honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.contact-form__actions {
  margin: 1rem 0 0;
}

.contact-form__actions button {
  border: 1px solid #005ea5;
  background: #005ea5;
  color: #fff;
  border-radius: 8px;
  padding: 0.55rem 1rem;
  font-weight: 600;
  cursor: pointer;
  font-size: 1rem;
}

.contact-form__actions button:focus-visible {
  outline: 2px solid #005ea5;
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  .nav-backdrop,
  .site-nav-wrap {
    transition: none;
  }
}

/* Lectures codex sidebar */
.lecture-codex-layout {
  display: grid;
  grid-template-columns: minmax(250px, 300px) minmax(0, 1fr);
  gap: 1rem;
}

.lecture-codex-content {
  min-width: 0;
}

.lecture-codex-content table {
  margin: 0;
  width: 100%;
  max-width: none;
}

.lecture-sidebar {
  width: 100%;
  max-height: calc(100dvh - 1rem);
  position: sticky;
  top: 0.5rem;
  padding: 1.2rem 0.9rem;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(12px);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow-y: auto;
  scrollbar-width: thin;
}

.sidebar-header h3 {
  font-family: var(--font-sans);
  font-size: 1.02rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.09em;
  margin: 0 0 1rem;
}

.nav-groups {
  list-style: none;
  padding: 0;
  margin: 0;
}

.nav-group + .nav-group {
  margin-top: 0.3rem;
}

.group-title {
  cursor: pointer;
  padding: 0.45rem 0;
  font-weight: 600;
  color: var(--text-primary);
  list-style: none;
  transition: color 0.22s ease;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.group-title:hover {
  color: var(--accent);
}

.group-title .icon {
  color: var(--accent);
  margin-right: 0.35rem;
}

.nav-links {
  list-style: none;
  padding-left: 0.65rem;
  margin: 0.55rem 0 0.2rem;
  border-left: 1px solid var(--line);
}

.nav-links a {
  display: block;
  padding: 0.28rem 0;
  font-size: 0.9rem;
  color: var(--text-dim);
  transition: all 0.2s ease;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  color: #0d0d5f;
  padding-left: 0.3rem;
  text-shadow: 0 0 10px var(--glow);
}

details summary::-webkit-details-marker {
  display: none;
}

.mobile-nav-toggle {
  display: none;
}

.lit-calendar {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.75rem;
  background: var(--surface);
  margin: 1rem 0;
}

.lit-calendar__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 0.65rem;
}

.lit-calendar__month {
  margin: 0;
  font-weight: 700;
}

.lit-calendar__controls {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.lit-calendar__button {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f7f9fc;
  color: var(--text-primary);
  padding: 0.35rem 0.6rem;
  cursor: pointer;
}

.lit-calendar__button:hover {
  background: #ecf1f9;
}

.lit-calendar__grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.3rem;
}

.lit-calendar__weekday {
  text-align: center;
  font-size: 0.83rem;
  color: var(--text-dim);
  font-weight: 700;
  padding: 0.15rem 0;
}

.lit-calendar__cell {
  min-height: 2.3rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.25rem;
  padding: 0.25rem 0.35rem;
}

button.lit-calendar__cell {
  cursor: pointer;
}

.lit-calendar__cell.is-selected {
  border-color: var(--brand);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 128, 0.25);
}

.lit-calendar__cell--empty {
  background: #f5f7fa;
  border-style: dashed;
}

.lit-calendar__day {
  font-weight: 700;
}

.lit-calendar__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.2rem;
  height: 1.2rem;
  padding: 0 0.28rem;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  font-size: 0.72rem;
  line-height: 1;
}

.lit-calendar__events {
  margin-top: 0.75rem;
  border-top: 1px solid var(--line);
  padding-top: 0.65rem;
}

.lit-calendar__events h3 {
  margin: 0 0 0.45rem;
  font-size: 1rem;
}

.lit-calendar__events ul {
  margin: 0;
  padding-left: 0;
  list-style: none;
}

.lit-calendar__event-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  flex-wrap: wrap;
  padding: 0.45rem 0;
}

.lit-calendar__event-title {
  flex: 1 1 260px;
  min-width: 180px;
}

.lit-calendar__event-actions {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.lit-calendar__event-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f7f9fc;
  color: var(--text-primary);
  text-decoration: none;
  font-size: 0.85rem;
  line-height: 1;
  padding: 0.34rem 0.62rem;
}

.lit-calendar__event-action:hover {
  background: #ecf1f9;
}

.lit-calendar__event-action:focus-visible {
  outline: 2px solid #0f4c81;
  outline-offset: 2px;
}

@media (max-width: 960px) {
  .lecture-codex-layout {
    grid-template-columns: 1fr;
  }

  .lit-calendar__event-title {
    min-width: 0;
  }

  .lecture-audio-catalog__row td {
    display: block;
    width: 100%;
    text-align: left;
  }

  .lecture-audio-catalog__action {
    width: auto;
    text-align: left;
    padding-top: 0;
  }

  .mobile-nav-toggle {
    display: inline-block;
    position: fixed;
    right: 0.8rem;
    bottom: 0.8rem;
    z-index: 120;
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--text);
    border-radius: 8px;
    padding: 0.48rem 0.7rem;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
  }

  .lecture-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    z-index: 115;
    width: min(84vw, 340px);
    max-height: 100dvh;
    transform: translateX(-105%);
    transition: transform 0.2s ease;
    border-radius: 0;
  }

  .lecture-sidebar.open {
    transform: translateX(0);
  }
}

/* Dev: Medium JSON bodyModel → HTML (lex-first preview) */
.medium-json-reconstruction .medium-json-source-meta {
  font-size: 0.88rem;
  color: var(--muted, #5a6570);
  margin-bottom: 1.25rem;
}

.medium-json-reconstruction .medium-json-body .medium-json-subtitle {
  font-size: 1.15rem;
  line-height: 1.45;
  margin: 0 0 1rem;
  color: var(--text);
}

.medium-json-reconstruction .medium-json-body h3 {
  margin: 1.5rem 0 0.65rem;
  font-size: 1.35rem;
  line-height: 1.3;
}

.medium-json-reconstruction .medium-json-body h4 {
  margin: 1.15rem 0 0.5rem;
  font-size: 1.08rem;
  line-height: 1.35;
  font-weight: 600;
}

.medium-json-reconstruction .medium-json-body p,
.medium-json-reconstruction .medium-json-body li {
  line-height: 1.6;
  margin: 0 0 0.85rem;
}

.medium-json-reconstruction .medium-json-body ul {
  margin: 0 0 1rem 1.25rem;
  padding: 0;
}

.medium-json-reconstruction .medium-json-figure,
.medium-json-reconstruction .medium-json-embed {
  margin: 1rem 0;
}

.medium-json-reconstruction .medium-json-figure img,
.medium-json-reconstruction .medium-json-embed img {
  max-width: 100%;
  height: auto;
  display: block;
}

.medium-json-reconstruction .medium-json-figure figcaption {
  font-size: 0.9rem;
  margin-top: 0.5rem;
  color: var(--muted, #5a6570);
}

.medium-json-reconstruction .medium-json-embed-cap {
  font-size: 0.85rem;
  margin-top: 0.45rem;
}

/* -------------------------------------------------------------------------- */
/* Responsiveness: reduced motion, print, touch (incremental polish).         */
/* -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  a {
    transition-duration: 0.01ms !important;
    transition-delay: 0s !important;
  }

  .nav-backdrop {
    transition-duration: 0.01ms !important;
  }

  .legacy-content audio,
  .legacy-content video {
    transition-duration: 0.01ms !important;
  }

  .legacy-content audio:hover,
  .legacy-content video:hover {
    transform: none !important;
  }

  @media (max-width: 960px) {
    .site-nav-wrap,
    .lecture-sidebar {
      transition-duration: 0.01ms !important;
    }
  }
}

@media print {
  html {
    font-size: 11pt;
  }

  body {
    background: #fff !important;
    color: #000 !important;
  }

  .skip-link,
  .nav-backdrop,
  .nav-drawer-toggle,
  .nav-drawer-close,
  .nav-drawer-dismiss,
  .mobile-nav-toggle,
  .site-nav-wrap,
  .giscus-comments,
  .telegram-chat {
    display: none !important;
  }

  .main-content__toolbar {
    display: none !important;
  }

  .layout {
    display: block !important;
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .main-content {
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    border: 0 !important;
    box-shadow: none !important;
    padding: 0.5rem 0 !important;
    overflow: visible !important;
    background: #fff !important;
  }

  .legacy-content img,
  .legacy-content video,
  .gnostic-aeons-figure img {
    max-width: 100% !important;
    page-break-inside: avoid;
  }

  h1,
  h2,
  h3,
  .article-page__title {
    page-break-after: avoid;
  }

  pre,
  blockquote,
  .table-scroll,
  .gnostic-aeons-md-table {
    page-break-inside: avoid;
  }

  a {
    color: #000 !important;
    text-decoration: underline;
  }

  a[href^="http"]::after {
    content: " (" attr(href) ")";
    font-size: 0.75em;
    font-weight: 400;
    word-break: break-all;
  }

  a[href^="/"]::after,
  a[href^="#"]::after {
    content: none;
  }
}

/* Slightly faster tap response on primary controls (no 300ms delay on legacy browsers). */
.nav-drawer-toggle,
.nav-drawer-close,
.share-widget__toggle,
.telegram-chat__link {
  touch-action: manipulation;
}

/* -------------------------------------------------------------------------- */
/* Graphic home (welcome + index): alternating image / text rows (Z-pattern) */
/* -------------------------------------------------------------------------- */

body.page-home-graphic {
  /* Index + welcome + Esoteric Gnosis hub: keep this asset unless explicitly changed (1024²). */
  background-color: #e8ecf2;
  background-image:
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.42) 0%,
      rgba(255, 255, 255, 0.32) 45%,
      rgba(248, 250, 252, 0.38) 100%
    ),
    url("/images/Buddhism/Timeless%20Awareness%20Present%20Moment.jpg");
  background-size: cover;
  background-position: center 28%;
  background-repeat: no-repeat;
  background-attachment: scroll;
}

@media (min-width: 900px) {
  body.page-home-graphic {
    background-attachment: fixed;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.page-home-graphic {
    background-attachment: scroll;
  }
}

/*
 * Gnosticism & Buddhism hub (/gnosticism-and-buddhism.html): lighter page backdrop (same as default
 * graphic-home: Timeless Awareness). The former full-page nonDUality diagram is shown in the hero as logo art.
 */
body.page-home-graphic.gnosticism-buddhism-page {
  background-image:
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.48) 0%,
      rgba(255, 255, 255, 0.38) 45%,
      rgba(248, 250, 252, 0.42) 100%
    ),
    url("/images/Buddhism/Timeless%20Awareness%20Present%20Moment.jpg");
  background-size: cover;
  background-position: center 28%;
  background-repeat: no-repeat;
  background-attachment: scroll;
}

@media (min-width: 900px) {
  body.page-home-graphic.gnosticism-buddhism-page {
    background-attachment: fixed;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.page-home-graphic.gnosticism-buddhism-page {
    background-attachment: scroll;
  }
}

body.gnosticism-buddhism-page .home-graphic__hero-logo {
  width: auto;
  max-width: min(100%, 28rem);
  height: auto;
  max-height: 14rem;
  object-fit: contain;
}

.main-content--home-graphic {
  background: rgba(255, 255, 255, 0.58);
  border-color: rgba(232, 234, 237, 0.92);
  box-shadow: 0 8px 28px rgba(0, 42, 100, 0.08);
  padding: clamp(0.65rem, 1.1vw, 1rem) clamp(0.5rem, 1.5vw, 1rem);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.main-content--home-graphic .legacy-content {
  max-width: none;
}

.home-graphic {
  font-family: var(--font-sans);
  color: var(--text-primary);
}

.home-graphic__hero {
  text-align: center;
  padding: clamp(1rem, 3vw, 2rem) clamp(0.5rem, 2vw, 1.5rem) clamp(1.5rem, 4vw, 2.75rem);
  border-bottom: 1px solid var(--line);
}

.home-graphic__hero-logo-wrap {
  margin: 0 0 1rem;
}

.home-graphic__hero-logo {
  display: block;
  margin: 0 auto;
  max-width: min(100%, 320px);
  height: auto;
}

.home-graphic__hero-title {
  margin: 0 0 0.75rem;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: clamp(1.75rem, 3.2vw, 2.35rem);
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: #111;
}

.home-graphic__hero-lead {
  margin: 0 auto 1.5rem;
  max-width: 52rem;
  font-size: clamp(1rem, 1.35vw, 1.1rem);
  line-height: 1.65;
  color: var(--muted);
}

.home-graphic__search {
  text-align: left;
  max-width: 44rem;
  margin: 0 auto 1.25rem;
  padding: 1rem 1.1rem;
  background: #fafbfc;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.home-graphic__search .search-ui__title--welcome {
  color: #111;
  font-weight: 700;
}

.home-graphic__search-note {
  margin: 0.85rem 0 0;
  padding-top: 0.85rem;
  border-top: 1px solid var(--line);
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--muted);
}

.home-graphic__search-note p {
  margin: 0;
}

.home-graphic__search-note a {
  font-weight: 600;
}

.home-graphic__search-code {
  font-size: 0.85em;
  word-break: break-all;
}

.home-graphic__hero-links {
  margin: 0;
  font-size: 0.95rem;
  color: var(--muted);
}

.home-graphic__hero-sep {
  margin: 0 0.35rem;
  color: #bbb;
}

.home-graphic__text-link {
  font-weight: 600;
}

.home-graphic__feed {
  margin: 0;
}

.home-graphic__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(1.25rem, 3.5vw, 2.75rem);
  align-items: start;
  padding: clamp(1.75rem, 4vw, 3.25rem) clamp(0.25rem, 1.5vw, 0.75rem);
  border-bottom: 1px solid #eceff1;
}

.home-graphic__row:last-child {
  border-bottom: 0;
}

.home-graphic__row--reverse .home-graphic__media {
  order: 2;
}

.home-graphic__row--reverse .home-graphic__text {
  order: 1;
}

.home-graphic__media {
  min-width: 0;
}

/* Natural aspect ratio — no letterboxing from fixed aspect-ratio + object-fit: contain */
.home-graphic__img {
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
  border-radius: 4px;
}

.home-graphic__text {
  padding-top: 0.15rem;
}

.home-graphic__heading {
  margin: 0 0 0.85rem;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: clamp(1.35rem, 2.2vw, 1.65rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: #111;
}

.home-graphic__body {
  margin: 0 0 1.1rem;
  font-family: var(--font-sans);
  font-size: clamp(0.98rem, 1.2vw, 1.05rem);
  line-height: 1.65;
  color: #3d454d;
}

.home-graphic__body a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.home-graphic__body a:hover {
  color: var(--accent);
  text-decoration-thickness: 2px;
}

.home-graphic__body a:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
  border-radius: 2px;
}

.home-graphic__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 1rem;
  color: #111;
  text-decoration: none;
  border-bottom: 2px solid transparent;
  padding: 0.2rem 0;
}

.home-graphic__cta:hover {
  color: var(--accent);
  text-shadow: none;
  border-bottom-color: rgba(0, 0, 128, 0.35);
}

.home-graphic__cta:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
  border-radius: 2px;
}

.home-graphic__cta-chevron {
  font-size: 1.15em;
  line-height: 1;
  font-weight: 700;
}

.home-graphic__footer {
  padding: clamp(1.25rem, 3vw, 2rem) clamp(0.5rem, 2vw, 1rem);
  border-top: 1px solid var(--line);
  background: #fafbfc;
}

.home-graphic__footer-note {
  margin: 0 auto;
  max-width: 48rem;
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--muted);
  text-align: center;
}

.home-graphic__footer-note a {
  font-weight: 600;
}

@media (max-width: 900px) {
  .home-graphic__row {
    grid-template-columns: 1fr;
  }

  .home-graphic__row .home-graphic__media {
    order: -1;
  }

  .home-graphic__row--reverse .home-graphic__media {
    order: -1;
  }

  .home-graphic__row--reverse .home-graphic__text {
    order: 0;
  }
}

/* French mirror articles: /fr/esoteric-gnosis/… */
.fr-article__lang-switch {
  font-size: 0.95rem;
  margin-bottom: 1rem;
  color: var(--muted);
}

/* Main hub pages: photo backgrounds — veil matches welcome/index (page-home-graphic) so images read at least as dark */
body.library-page {
  /* ~2560×2114 (was 1024² Gnostic Library interior — too soft when cover-scaled) */
  background-color: #e8ecf2;
  background-image:
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.42) 0%,
      rgba(255, 255, 255, 0.32) 45%,
      rgba(248, 250, 252, 0.38) 100%
    ),
    url("/images/Gnosticism/VicesVertusMantegna.jpg");
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  /* scroll: fixed attachment often softens/scales backgrounds poorly on wide viewports */
  background-attachment: scroll;
}

/* -------------------------------------------------------------------------- */
/* Library hub (/library.html): layout, hero, nh-v2 card, scrollable tables   */
/* -------------------------------------------------------------------------- */
body.library-page .library-page__article {
  box-sizing: border-box;
  max-width: 56rem;
  margin-left: auto;
  margin-right: auto;
  padding-left: clamp(0.65rem, 3vw, 1.25rem);
  padding-right: clamp(0.65rem, 3vw, 1.25rem);
  padding-bottom: 2rem;
}

body.library-page .library-page__masthead {
  text-align: center;
  margin-bottom: 1.5rem;
}

body.library-page .library-page__title {
  font-family: var(--font-sans);
  font-size: clamp(1.45rem, 4vw, 2rem);
  font-weight: 700;
  margin: 0 0 0.5rem;
  color: var(--text);
  letter-spacing: -0.02em;
}

body.library-page .library-page__lead {
  margin: 0 auto 1rem;
  max-width: 40rem;
  font-size: 0.98rem;
  line-height: 1.55;
  color: var(--muted);
}

body.library-page .library-page__logo {
  display: block;
  margin: 0 auto;
  max-width: min(100%, 32.5rem);
  width: auto;
  height: auto;
}

body.library-page .library-page__section-title {
  font-family: var(--font-sans);
  font-size: clamp(1.15rem, 2.5vw, 1.35rem);
  font-weight: 700;
  margin: 0 0 0.85rem;
  color: var(--text);
}

body.library-page .library-page__section-title--center {
  text-align: center;
}

body.library-page .library-page__subsection-title {
  font-family: var(--font-sans);
  font-size: 1.05rem;
  font-weight: 650;
  margin: 1.35rem 0 0.65rem;
  color: var(--text);
}

body.library-page .library-page__overview {
  margin-top: 1.75rem;
}

body.library-page .library-page__prose {
  font-size: 0.98rem;
  line-height: 1.62;
  color: var(--text);
}

body.library-page .library-page__prose > p:first-child {
  margin-top: 0;
}

body.library-page .library-page__prose ul {
  margin: 0.5rem 0 1rem;
  padding-left: 1.35rem;
}

body.library-page .library-page__prose li {
  margin-bottom: 0.65rem;
}

body.library-page .library-page__callout {
  margin: 1rem 0 0;
  padding: 0.85rem 1rem;
  border-left: 4px solid var(--brand, #0b4ea2);
  background: rgba(255, 255, 255, 0.55);
  border-radius: 0 10px 10px 0;
}

body.library-page .library-page__rule {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 2rem 0;
}

body.library-page .library-page__note {
  margin-bottom: 1rem;
}

body.library-page .library-page__prose--note {
  font-size: 0.94rem;
  color: var(--muted);
}

/* nh-v2 library collections card */
body.library-page .nh-v2-library-table {
  --bg-color: #eef5ff;
  --surface: #ffffff;
  --text-primary: #0f2747;
  --text-dim: #395579;
  --accent: #0b4ea2;
  --border-color: #c8d9ef;
  --glow: rgba(11, 78, 162, 0.2);
  box-sizing: border-box;
  background-color: var(--bg-color);
  color: var(--text-primary);
  font-family: var(--font-sans);
  max-width: min(1000px, 100%);
  margin: 0 auto 1.75rem;
  padding: clamp(1.15rem, 3vw, 1.85rem) clamp(0.65rem, 3vw, 18px);
  border-radius: 16px;
}

body.library-page .nh-v2-library-table .archive-header {
  text-align: center;
  margin-bottom: 1.75rem;
}

body.library-page .nh-v2-library-table .nh-v2-library-table__title {
  font-family: var(--font-sans);
  font-size: clamp(1.75rem, 6vw, 3rem);
  margin: 0;
  color: var(--accent);
  letter-spacing: -0.03em;
  font-weight: 800;
}

body.library-page .nh-v2-library-table .subtitle {
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.35em;
  font-size: 0.8rem;
  margin: 0.65rem 0 0;
  font-weight: 600;
}

body.library-page .nh-v2-library-table .search-section {
  margin-bottom: 1.35rem;
  width: 100%;
}

body.library-page .nh-v2-library-table .search-container {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 12px 18px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

body.library-page .nh-v2-library-table .search-container:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 20px var(--glow);
}

body.library-page .nh-v2-library-table .search-icon {
  font-size: 1.3rem;
  color: var(--accent);
  margin-right: 12px;
  flex-shrink: 0;
}

body.library-page .nh-v2-library-table #librarySearch {
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 1rem;
  width: auto;
  min-width: 0;
  flex: 1 1 12rem;
  outline: none;
  font-family: var(--font-sans);
}

body.library-page .nh-v2-library-table #librarySearchMode {
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: #fff;
  color: var(--text-primary);
  font-size: 0.85rem;
  padding: 6px 8px;
}

body.library-page .nh-v2-library-table .filter-pills {
  display: flex;
  gap: 10px;
  margin-top: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

body.library-page .nh-v2-library-table .pill {
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid var(--border-color);
  color: var(--text-dim);
  padding: 6px 14px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 0.76rem;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

body.library-page .nh-v2-library-table .pill:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

body.library-page .nh-v2-library-table .pill:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

body.library-page .nh-v2-library-table .table-wrapper {
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 16px 30px rgba(11, 78, 162, 0.14);
}

body.library-page .nh-v2-library-table .nh-v2-library-table__scroll {
  width: 100%;
  max-width: 100%;
}

body.library-page .nh-v2-library-table .library-collections-table {
  width: 100%;
  min-width: min(100%, 36rem);
  border-collapse: collapse;
}

body.library-page .nh-v2-library-table .section-header td {
  background: #e6effb;
  color: var(--accent);
  padding: 14px 18px;
  font-family: var(--font-sans);
  font-weight: 900;
  font-size: 1.05rem;
  border-bottom: 2px solid #bdd2ee;
}

body.library-page .nh-v2-library-table .collection-row td {
  padding: 16px 18px;
  border-bottom: 1px solid var(--border-color);
  transition: background 0.2s ease;
  vertical-align: middle;
}

body.library-page .nh-v2-library-table .collection-row:hover {
  background: #f3f8ff;
}

body.library-page .nh-v2-library-table .collection-info {
  width: 75%;
  min-width: 0;
}

body.library-page .nh-v2-library-table .library-collections-table__meta {
  text-align: right;
  white-space: nowrap;
}

body.library-page .nh-v2-library-table .collection-title {
  font-weight: 600;
  font-size: 1.03rem;
  margin-bottom: 5px;
}

body.library-page .nh-v2-library-table .collection-title a {
  color: var(--text-primary);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
}

body.library-page .nh-v2-library-table .collection-title a:hover {
  color: var(--accent);
}

body.library-page .nh-v2-library-table .collection-title a::before {
  content: "◈";
  font-size: 0.8rem;
  color: var(--accent);
  flex-shrink: 0;
}

body.library-page .nh-v2-library-table .collection-desc {
  font-size: 0.86rem;
  color: var(--text-dim);
  padding-left: 22px;
}

body.library-page .nh-v2-library-table .entry-count {
  font-family: ui-monospace, monospace;
  font-size: 0.76rem;
  color: var(--accent);
  background: rgba(11, 78, 162, 0.1);
  padding: 4px 8px;
  border-radius: 4px;
  white-space: nowrap;
}

body.library-page .nh-v2-library-table .full-index-wrap {
  margin-top: 18px;
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 10px 20px rgba(11, 78, 162, 0.1);
}

body.library-page .nh-v2-library-table .full-index-title {
  margin: 0;
  padding: 13px 16px;
  background: #e6effb;
  color: var(--accent);
  font-family: var(--font-sans);
  font-size: 1.05rem;
  font-weight: 700;
  border-bottom: 2px solid #bdd2ee;
}

body.library-page .nh-v2-library-table .full-index-table {
  width: 100%;
  min-width: 28rem;
  border-collapse: collapse;
}

body.library-page .nh-v2-library-table .full-index-table th,
body.library-page .nh-v2-library-table .full-index-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-color);
  text-align: left;
  vertical-align: middle;
  font-size: 0.86rem;
  color: var(--text-dim);
}

body.library-page .nh-v2-library-table .full-index-table th {
  color: var(--accent);
  background: #f5f9ff;
}

body.library-page .nh-v2-library-table .full-index-table a {
  color: var(--text-primary);
  text-decoration: none;
}

body.library-page .nh-v2-library-table .full-index-table a:hover {
  color: var(--accent);
}

body.library-page .nh-v2-library-table .collection-title,
body.library-page .nh-v2-library-table .collection-desc,
body.library-page .nh-v2-library-table .full-index-table a {
  overflow-wrap: anywhere;
  word-break: break-word;
}

body.library-page .nh-v2-library-table table.full-index-table th:first-child,
body.library-page .nh-v2-library-table table.full-index-table td:first-child {
  max-width: none;
  min-width: 7.5rem;
}

/* Nested tables: undo global .legacy-content td:first-child { max-width: 40vw } on collection grid */
body.library-page .legacy-content .nh-v2-library-table .table-wrapper table td:first-child {
  max-width: none;
}

@media (max-width: 768px) {
  body.library-page .nh-v2-library-table .section-header td {
    text-align: center;
  }

  body.library-page .nh-v2-library-table .collection-info {
    width: 100% !important;
  }

  body.library-page .nh-v2-library-table .collection-row td {
    display: block;
    width: 100%;
    padding: 12px 14px;
  }

  body.library-page .nh-v2-library-table .library-collections-table__meta {
    text-align: left !important;
  }

  body.library-page .nh-v2-library-table .entry-count {
    display: inline-block;
    margin-top: 8px;
    margin-left: 22px;
  }

  body.library-page .nh-v2-library-table .full-index-table th,
  body.library-page .nh-v2-library-table .full-index-table td {
    font-size: 0.82rem;
    padding: 8px 8px;
  }
}

@media (max-width: 540px) {
  body.library-page .nh-v2-library-table .search-container {
    flex-direction: column;
    align-items: stretch;
  }

  body.library-page .nh-v2-library-table #librarySearchMode {
    width: 100%;
    max-width: 100%;
  }

  body.library-page .nh-v2-library-table .subtitle {
    letter-spacing: 0.12em;
    font-size: 0.72rem;
  }
}

body.main-scriptures-page {
  /* Sacred mandala (~2048²); distinct from library Mantegna, Gnostic Library interior, and comparative-art hubs */
  background-color: #e8ecf2;
  background-image:
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.42) 0%,
      rgba(255, 255, 255, 0.32) 45%,
      rgba(248, 250, 252, 0.38) 100%
    ),
    url("/images/Buddhism/Mandala1.jpg");
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  background-attachment: scroll;
}

body.about-treasury-page {
  /* About Treasury of Light: keep mandalabw (~1845×1794) unless explicitly changed */
  background-color: var(--bg-color);
  background-image:
    linear-gradient(rgba(241, 243, 248, 0.87), rgba(241, 243, 248, 0.91)),
    url("/images/mandalabw.jpg");
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
}

body.search-form-page {
  /* ~2560×2114 Mantegna (was 1024² Gnostic Library interior); same hi-res asset + veil as library hub */
  background-color: #e8ecf2;
  background-image:
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.42) 0%,
      rgba(255, 255, 255, 0.32) 45%,
      rgba(248, 250, 252, 0.38) 100%
    ),
    url("/images/Gnosticism/VicesVertusMantegna.jpg");
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  background-attachment: scroll;
}

/* Author hubs: light-washed hero art from each author’s on-site article images */
body.david-senouf-page {
  /* ~1400×1156 Mantegna hero (was 1024² from same post) */
  background-color: var(--bg-color);
  background-image:
    linear-gradient(rgba(241, 243, 248, 0.88), rgba(241, 243, 248, 0.92)),
    url("/images/medium/a-thematic-synthesis-of-gnosticism-buddhism-mathematics-ai-1ff7217d2d46/1_UpYiGXg0tWa9a-gJVvgv7A.jpeg");
  background-size: cover;
  background-position: center 35%;
  background-repeat: no-repeat;
}

body.sarha-desalme-page {
  /* ~1400² (was 1400×764 — higher min dimension for cover scaling) */
  background-color: var(--bg-color);
  background-image:
    linear-gradient(rgba(241, 243, 248, 0.88), rgba(241, 243, 248, 0.92)),
    url("/images/medium/horses-master-of-the-eternal-present-and-monad-consciousness-2a8ada69cb4c/1_X499BNUzGm3WJOmjYURToA.jpeg");
  background-size: cover;
  background-position: center 40%;
  background-repeat: no-repeat;
}

/* Thematic synthesis article: Gnostic–Buddhist synthesis art, same light veil family as main-scriptures */
body.thematic-synthesis-page {
  /* ~2816×1536 (was 1024² Monad/Sunyata diagram) */
  background-color: #e8ecf2;
  background-image:
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.42) 0%,
      rgba(255, 255, 255, 0.32) 45%,
      rgba(248, 250, 252, 0.38) 100%
    ),
    url("/images/Buddhism/nonDUality-B-G.png");
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  background-attachment: scroll;
}

@media (min-width: 900px) {
  body.thematic-synthesis-page {
    background-attachment: fixed;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.thematic-synthesis-page {
    background-attachment: scroll;
  }
}

/* DS standalone article: money / energy / Archons (money-energy-archon-control-synthesis.njk) */
body.money-energy-archon-page .medium-mirror__header {
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-color, #d3dce9);
}

body.money-energy-archon-page .medium-mirror__title {
  font-family: var(--font-serif, "Lora", Georgia, serif);
  font-size: clamp(1.65rem, 3.2vw, 2.15rem);
  font-weight: 700;
  line-height: 1.2;
  color: var(--text, #111);
  margin: 0 0 0.5rem;
}

body.money-energy-archon-page .medium-mirror__subtitle {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1.02rem;
  color: var(--muted, #5a6570);
  line-height: 1.45;
}

body.money-energy-archon-page .article-lead {
  font-size: 1.05rem;
  line-height: 1.65;
}

body.money-energy-archon-page .money-energy-archon-toc {
  margin: 1.5rem 0 2rem;
  padding: 1rem 1.15rem 1.1rem;
  background: var(--surface-elevated, #f4f6fa);
  border: 1px solid var(--border-color, #d3dce9);
  border-radius: 8px;
}

body.money-energy-archon-page .money-energy-archon-toc__title {
  margin: 0 0 0.65rem;
  font-size: 1rem;
  font-weight: 600;
  font-family: var(--font-sans);
}

body.money-energy-archon-page .money-energy-archon-toc ol {
  margin: 0;
  padding-left: 1.35rem;
  line-height: 1.55;
}

body.money-energy-archon-page .money-energy-archon-slide-index {
  margin: 1.5rem 0 2rem;
  padding: 1rem 1.15rem 1.15rem;
  background: var(--surface-elevated, #f4f6fa);
  border: 1px solid var(--border-color, #d3dce9);
  border-radius: 8px;
}

body.money-energy-archon-page .money-energy-archon-slide-index h2 {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
  font-weight: 600;
  font-family: var(--font-sans);
}

body.money-energy-archon-page .money-energy-archon-slide-index > p {
  margin: 0 0 0.85rem;
  font-size: 0.98rem;
  line-height: 1.5;
  color: var(--text, #111);
}

body.money-energy-archon-page .money-energy-archon-slide-index__cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem 1.5rem;
}

@media (max-width: 640px) {
  body.money-energy-archon-page .money-energy-archon-slide-index__cols {
    grid-template-columns: 1fr;
  }
}

body.money-energy-archon-page .money-energy-archon-slide-index__study {
  margin: 0 0 0.4rem;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: var(--font-sans);
}

body.money-energy-archon-page .money-energy-archon-slide-index__list {
  margin: 0;
  padding-left: 1.25rem;
  line-height: 1.5;
  font-size: 0.95rem;
}

body.money-energy-archon-page .money-energy-archon-ref {
  margin-top: 1.35rem;
}

body.money-energy-archon-page .money-energy-archon-ref:first-of-type {
  margin-top: 0.75rem;
}

body.money-energy-archon-page .money-energy-archon-ref blockquote {
  margin: 0 0 0.65rem;
  padding: 0.65rem 0 0.65rem 1rem;
  border-left: 3px solid var(--border-color, #d3dce9);
  font-style: italic;
  color: var(--text, #111);
}

body.money-energy-archon-page .money-energy-archon-ref blockquote p {
  margin: 0;
}

body.money-energy-archon-page .money-energy-archon-ref__meta {
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.5;
}

body.money-energy-archon-page .money-energy-archon-source {
  margin-top: 2.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-color, #d3dce9);
  font-size: 0.92rem;
  color: var(--muted, #5a6570);
}

/* Audiobooks hub + Altrusian Grace Media table */
body.audiobooks-hub-page .audiobooks-hub-page__list {
  margin: 1rem 0 0;
  padding-left: 1.25rem;
  line-height: 1.55;
}

body.audiobooks-agm-page .audiobooks-agm-page__vid {
  font-family: ui-monospace, monospace;
  font-size: 0.88em;
  color: var(--muted, #5a6570);
}

