/* Approved hybrid composition with accessible microinteractions */
:root,
:root[data-theme="dark"] {
  --bg: #100e0f;
  --surface: #181617;
  --surface-alt: #201e1f;
  --fg: #f5f5f7;
  --muted: #a0a0a5;
  --border: #2a2829;
  --accent: var(--wes-red);
  --wes-red: #c51230;
  --ink: #f5f5f7;
  --paper: #100e0f;
  --reading-border: #2a2829;
  --reading-muted: #a0a0a5;
  --card-bg: #181617;
  --hover-bg: rgba(255, 255, 255, 0.08);
  --display: Georgia, "Times New Roman", serif;
  --headline: "Archivo Black", Georgia, serif;
  --motion-ease: cubic-bezier(0.16, 1, 0.3, 1);
  --motion-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
  --motion-fast: 160ms;
  --motion-base: 240ms;
  --motion-slow: 360ms;
}

:root[data-theme="light"],
body.theme-light {
  --bg: #ffffff;
  --surface: #f7f7f9;
  --surface-alt: #f0f0f3;
  --fg: #100e0f;
  --muted: #555555;
  --border: #e2e2e5;
  --accent: var(--wes-red);
  --wes-red: #c51230;
  --ink: #100e0f;
  --paper: #ffffff;
  --reading-border: #e2e2e5;
  --reading-muted: #555555;
  --card-bg: #f8f8fa;
  --hover-bg: #f4f4f7;
}

body, .site-header, .site-menu, .site-footer, .reading-surface, .utility-page {
  transition: background-color var(--motion-base) ease, color var(--motion-base) ease, border-color var(--motion-base) ease;
}

/* Reading Progress Bar */
.reading-progress-track {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: transparent;
  z-index: 999;
  pointer-events: none;
}
.reading-progress-bar {
  height: 100%;
  width: 0%;
  background: var(--wes-red);
  transition: width 60ms linear;
}

:focus-visible { outline: 3px solid var(--paper); outline-offset: 5px; }
a { overflow-wrap: break-word; }
.wordmark-period { color: var(--fg); }

/* Header Navigation & Hover Animations */
.primary-nav a {
  position: relative;
  transition: color 0.2s ease;
}
.primary-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 4px;
  width: 0%;
  height: 2px;
  background: var(--wes-red);
  transition: width 0.22s var(--motion-ease);
}
.primary-nav a:hover {
  color: var(--wes-red) !important;
  text-decoration: none;
}
.primary-nav a:hover::after {
  width: 100%;
}

.environment {
  display: grid;
  grid-template-columns: minmax(0, .44fr) minmax(0, .56fr);
  column-gap: clamp(24px, 3.5vw, 64px);
  row-gap: 0;
  aspect-ratio: auto;
  padding: 44px var(--gutter) 58px;
  align-items: center;
}
.environment-title {
  position: static;
  width: auto;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.environment-title h1 {
  font: 400 clamp(44px, 4.8vw, 84px)/1.04 var(--headline);
  letter-spacing: -.055em;
  text-wrap: balance;
  overflow-wrap: normal;
}
.environment-title p {
  font: 400 clamp(19px, 1.5vw, 23px)/1.4 var(--signage);
  max-width: 28ch;
  margin-top: 6px;
}
.environment-title .selected-story {
  position: static;
  margin-top: 24px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
  width: 100%;
}
.selected-story-body {
  transition: opacity 0.16s ease, transform 0.16s var(--motion-ease);
}
.selected-story-body.is-switching {
  opacity: 0;
  transform: translateY(4px);
}
.environment-title .selected-story h2,
.environment:has(.subject-chemistry[aria-pressed="true"]) .selected-story h2 {
  font: 400 clamp(24px, 2.2vw, 34px)/1.15 var(--signage);
  letter-spacing: 0;
  max-width: 32ch;
  text-wrap: pretty;
  overflow-wrap: normal;
}
.environment-title .selected-story p { font-size: 18px; margin: 12px 0 8px; }
.environment-title .selected-story .read-link { font-size: 20px; }
.environment-title .environment-note {
  position: static;
  font: 400 15px/1.6 var(--body);
  color: var(--muted);
  max-width: 36ch;
  margin-top: 4px;
}

/* Tree & Cardinal Composition with Interactive Motion */
.tree-composition {
  position: relative;
  width: 100%;
  aspect-ratio: 1600 / 1100;
  z-index: auto;
  margin: 0;
  align-self: center;
}
.tree {
  width: 100%;
  height: auto;
  transition: filter 0.3s ease;
}
.tree-cardinal {
  position: absolute;
  left: 28.5175%;
  top: 19.78181818%;
  width: 15.725%;
  height: auto;
  inset-inline-start: 28.5175%;
  inset-block-start: 19.78181818%;
  inline-size: 15.725%;
  z-index: 4;
  pointer-events: auto !important;
  cursor: pointer;
  filter: drop-shadow(0 0 2px rgba(255, 255, 255, 0.85)) drop-shadow(0 3px 10px rgba(0, 0, 0, 0.22));
  transform: none !important;
  transition: filter 0.25s ease;
}
.tree-cardinal:hover {
  transform: none !important;
  filter: drop-shadow(0 0 3px rgba(255, 255, 255, 0.95)) drop-shadow(0 6px 16px rgba(197, 18, 48, 0.38));
}
.tree-cardinal:active {
  transform: none !important;
}

[data-theme="dark"] .tree-cardinal {
  filter: drop-shadow(0 0 2px rgba(255, 255, 255, 0.45)) drop-shadow(0 4px 14px rgba(0, 0, 0, 0.6));
}
[data-theme="dark"] .tree-cardinal:hover {
  filter: drop-shadow(0 0 3px rgba(255, 255, 255, 0.7)) drop-shadow(0 6px 18px rgba(197, 18, 48, 0.5));
}

/* Articulated cardinal animation with perched anchor */
#cardinal-feet {
  transform: none !important;
}

.tree-cardinal:hover #cardinal-head,
.tree-composition:has(.subject-field:hover) #cardinal-head {
  animation: none !important;
  transform: rotate(12deg) translate(2px, -1px) !important;
}

.tree-cardinal:hover #cardinal-crest,
.tree-composition:has(.subject-field:hover) #cardinal-crest {
  animation: none !important;
  transform: rotate(-16deg) translateY(-3px) scaleY(1.08) !important;
}

.tree-cardinal:hover #cardinal-tail,
.tree-composition:has(.subject-field:hover) #cardinal-tail {
  animation: none !important;
  transform: rotate(-8deg) !important;
}

.tree-cardinal:hover #cardinal-body,
.tree-composition:has(.subject-field:hover) #cardinal-body {
  animation: none !important;
  transform: scale(1.025) !important;
}

.tree-composition:has(.subject-chemistry:hover) .tree {
  filter: drop-shadow(0 0 16px rgba(197, 18, 48, 0.3));
}
.tree-composition:has(.subject-math:hover) .tree {
  filter: drop-shadow(0 0 16px rgba(197, 18, 48, 0.3));
}

.tree-composition .subject-controls {
  display: block;
  margin: 0;
  padding: 0;
  border: none;
  position: static;
}
/* Naturalist Specimen Callouts */
.tree-composition .subject {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: auto;
  min-height: 44px;
  padding: 6px 2px 8px;
  font: 500 clamp(18px, 1.5vw, 24px) / 1.15 var(--signage);
  letter-spacing: 0.02em;
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  color: var(--muted) !important;
  z-index: 2;
  cursor: pointer;
  text-align: left;
  text-shadow: 0 1px 4px var(--bg), 0 0 8px var(--bg);
  transition: color var(--motion-fast) ease, transform var(--motion-fast) var(--motion-ease);
}
.tree-composition .subject-number {
  font-family: var(--mono, monospace);
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  color: var(--wes-red) !important;
  letter-spacing: 0.05em;
  align-self: flex-start;
  margin-top: 3px;
  text-shadow: 0 1px 3px var(--bg);
}
.tree-composition .subject-arrow {
  font-size: 18px;
  line-height: 1;
  margin-left: 4px;
  display: inline-block;
  color: var(--muted);
  text-shadow: 0 1px 3px var(--bg);
  transition: transform var(--motion-fast) var(--motion-ease), color var(--motion-fast) ease;
}
.tree-composition .subject::after {
  display: none !important;
}
.tree-composition .subject .subject-text {
  position: relative;
  display: inline-block;
}
.tree-composition .subject .subject-text::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0;
  height: 2.5px;
  background: var(--wes-red);
  border-radius: 2px 2px 0 0;
  transition: width var(--motion-fast) cubic-bezier(0.2, 0, 0, 1), background-color var(--motion-fast) ease;
}
.tree-composition .subject:hover {
  background: transparent !important;
  color: var(--fg) !important;
  transform: translateY(-2px);
  box-shadow: none !important;
  border: none !important;
}
.tree-composition .subject:hover .subject-arrow {
  color: var(--wes-red);
  transform: translate(3px, -2px);
}
.tree-composition .subject:hover .subject-text::after {
  width: 100%;
  background: rgba(197, 18, 48, 0.45);
}
.tree-composition .subject:active {
  transform: translateY(0);
}
.tree-composition .subject[aria-pressed="true"] {
  background: transparent !important;
  color: var(--fg) !important;
  font-weight: 700 !important;
  box-shadow: none !important;
  border: none !important;
}
.tree-composition .subject[aria-pressed="true"] .subject-arrow {
  color: var(--fg);
  transform: translate(2px, -2px);
}
.tree-composition .subject[aria-pressed="true"] .subject-text::after {
  width: 100% !important;
  background: var(--wes-red) !important;
}
.tree-composition .subject[aria-pressed="true"]:hover {
  background: transparent !important;
  color: var(--fg) !important;
  transform: translateY(-2px);
  box-shadow: none !important;
}
.tree-composition .subject:focus-visible {
  outline: 2px solid var(--wes-red);
  outline-offset: 4px;
}
.tree-composition .subject-field {
  left: -2%;
  top: 50%;
}
.tree-composition .subject-chemistry {
  right: 2%;
  top: 18%;
  left: auto;
}
.tree-composition .subject-math {
  right: 2%;
  top: 58%;
  left: auto;
  max-width: 28%;
}

/* Links & Directional Buttons */
.read-link {
  gap: 18px;
  max-width: 100%;
  display: inline-flex;
  align-items: center;
  transition: color 0.2s ease, background-color 0.2s ease;
}
.read-link span {
  display: inline-block;
  transition: transform 0.22s var(--motion-ease), color 0.2s ease;
}
.read-link:hover {
  color: var(--wes-red) !important;
  text-decoration: none;
}
.read-link:hover span {
  transform: translate(4px, -3px);
  color: var(--wes-red);
}

.round-link {
  display: grid;
  place-items: center;
  transition: transform 0.24s var(--motion-bounce),
              background-color 0.2s ease,
              color 0.2s ease,
              border-color 0.2s ease,
              box-shadow 0.2s ease;
}
.round-link:hover {
  transform: scale(1.12) rotate(15deg);
  background: var(--wes-red) !important;
  border-color: var(--wes-red) !important;
  color: #ffffff !important;
  box-shadow: 0 6px 20px rgba(197, 18, 48, 0.35);
}
.round-link:active {
  transform: scale(0.96);
}

.reading-directory { padding-top: 80px; }
.directory-heading { margin-bottom: 70px; }
.directory-heading h2 { font-size: clamp(42px, 5.3vw, 84px); }
.directory-feature { margin-left: 22%; padding-top: 32px; padding-bottom: 65px; }
.directory-feature h3 {
  font: 400 clamp(42px, 5.2vw, 84px)/1.08 var(--display);
  letter-spacing: -.045em;
  text-wrap: balance;
}
.directory-feature .directory-meta { font-size: 18px; margin-bottom: 24px; }
.directory-feature h3 a,
.research-entry h3 a,
.directory-essay h3 a {
  transition: color 0.2s ease;
}
.directory-feature h3 a:hover,
.research-entry h3 a:hover {
  color: var(--wes-red) !important;
  text-decoration: underline;
}
.directory-essay h3 a:hover {
  text-decoration: underline;
}
.directory-research {
  display: block;
  width: 78%;
  margin: 26px 0 88px;
  padding: 36px 0 0;
  border-top: 1px solid var(--border);
}
.research-entry h3 {
  font: 400 clamp(35px, 3.8vw, 61px)/1.12 var(--signage);
  max-width: 38ch;
  text-wrap: pretty;
}
.research-entry > p:not(.directory-meta) { max-width: 52ch; }
.directory-essay {
  display: block;
  margin: 0;
  padding: clamp(30px, 5vw, 80px);
  border: 0;
  background: var(--wes-red);
  color: var(--paper);
  transition: box-shadow 0.25s ease;
}
.directory-essay:hover {
  box-shadow: inset 0 0 0 4px rgba(255, 255, 255, 0.35);
}
.directory-essay h3 {
  font: 400 clamp(50px, 7.2vw, 116px)/1.01 var(--headline);
  letter-spacing: -.055em;
}
.directory-essay p { max-width: 50ch; }
.directory-essay .directory-meta { font-size: 20px; }
.directory-essay .read-link:hover { color: var(--paper) !important; background: oklch(.36 .13 20.4248); }

/* The cover, navigation, prose, and evidence share one consistent themed surface. */
.article-route, .utility-route { background: var(--bg); color: var(--fg); }
.article-route .site-header, .utility-route .site-header { border-color: var(--border); }
.article-route .utility, .utility-route .utility { background: transparent; color: var(--fg); }
.article-route .utility:hover, .utility-route .utility:hover { background: var(--hover-bg); color: var(--wes-red); }
.article-route .site-menu, .utility-route .site-menu { background: var(--surface); border-color: var(--border); }
.article-route :focus-visible, .utility-route :focus-visible { outline-color: var(--wes-red); }
.article-route .site-footer, .utility-route .site-footer { background: var(--surface); color: var(--fg); border-top-color: var(--border); }
.article-route .site-footer :focus-visible, .utility-route .site-footer :focus-visible { outline-color: var(--fg); }
.article-cover { padding-top: 36px; padding-bottom: 44px; background: var(--bg); color: var(--fg); }
.article-cover h1 {
  font: 400 clamp(40px, 5.2vw, 80px)/1.1 var(--display);
  letter-spacing: -.04em;
  max-width: 23ch;
  text-wrap: balance;
  overflow-wrap: normal;
  color: var(--fg);
}
.article-cover.research-cover h1 {
  font: 400 clamp(34px, 4.2vw, 66px)/1.13 var(--signage);
  letter-spacing: -.01em;
  max-width: 38ch;
  text-wrap: balance;
  overflow-wrap: normal;
  color: var(--fg);
}
.article-cover .article-context { margin-top: 24px; color: var(--muted); }
.article-cover .draft-notice { border-color: var(--border); max-width: none; }
.article-cover .draft-notice p { color: var(--muted); }
.reading-surface { padding-top: 30px; background: var(--bg); color: var(--fg); }
.reading-grid {
  max-width: 1320px;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: clamp(36px, 5vw, 80px);
}
.chapter-map { border-color: var(--border); position: sticky; top: 24px; }
.chapter-map li:nth-child(2), .chapter-map li:nth-child(3) { margin-left: 0; padding-left: 0; border: 0; }
.chapter-map a {
  font-size: 22px;
  position: relative;
  transition: color 0.2s ease, padding-left 0.2s var(--motion-ease);
  color: var(--fg);
}
.chapter-map a:hover {
  padding-left: 8px;
  color: var(--wes-red) !important;
  text-decoration: none;
}
.chapter-map a[aria-current="true"] {
  font-weight: 700;
  color: var(--wes-red) !important;
  padding-left: 10px;
  border-left: 3px solid var(--wes-red);
}
.chapter-map a span { color: var(--muted); }
.chapter-map a[aria-current="true"] span { color: var(--wes-red); }

.article-body p { font-size: 20px; line-height: 1.75; max-width: 65ch; color: var(--fg); }
.article-body .sample-label { border-color: var(--border); font-size: 18px; color: var(--muted); }
.reading-section { margin-bottom: 80px; }
.reading-section h2 { font-weight: 400; margin-bottom: 28px; color: var(--fg); }
.adjacent-evidence { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; }
.adjacent-evidence p { font-size: 20px; color: var(--muted); }
.evidence-space { background: var(--surface); border: 1px solid var(--border); color: var(--fg); }
.evidence-space strong { font-weight: 400; color: var(--fg); }
.article-body .evidence-space p { font-size: 16px; line-height: 1.6; color: var(--muted); }
.evidence figcaption { font-size: 16px; line-height: 1.65; color: var(--muted); }
.register, .article-body .article-end { border-color: var(--border); }
.register summary { color: var(--fg); }
.register summary:hover { background: var(--surface-alt); color: var(--wes-red); }
.reading-surface .read-link { white-space: normal; text-align: left; color: var(--fg); }
.reading-surface .read-link:hover, .utility-page .read-link:hover { background: var(--surface-alt); color: var(--wes-red); }
.utility-page { background: var(--bg); color: var(--fg); min-height: 65vh; padding: 60px var(--gutter) 100px; }
.utility-page h1, .utility-page h2, .result-item h2 { font-weight: 400; color: var(--fg); }
.utility-page p { color: var(--muted); }
.utility-art { max-width: 560px; margin: 44px 0; }
.utility-art img { width: 100%; height: auto; }
.utility-art figcaption { color: var(--muted); }
.utility-page .utility-draft { border-block: 1px solid var(--border); padding: 18px 0; color: var(--fg); }
.result-item { border-color: var(--border); }
.result-item h2 a { color: var(--fg); text-decoration: none; }
.result-item h2 a:hover { color: var(--wes-red); }
.result-item p:not(.result-excerpt) { color: var(--wes-red); }
.utility-page .result-item h2 a { display: inline-block; min-height: 44px; overflow-wrap: break-word; }

/* Responsive Grid */
@media (max-width: 1100px) {
  .primary-nav { display: none; }
  .environment-title h1 { font-size: clamp(38px, 4.6vw, 56px); }
  .tree-composition .subject { padding: 6px 10px; font-size: clamp(14px, 1.3vw, 18px); }
  .reading-grid { grid-template-columns: 170px minmax(0, 1fr); gap: 30px; }
}
@media (max-width: 900px) {
  .environment { display: flex; flex-direction: column; align-items: stretch; padding-top: 34px; }
  .environment-title { padding: 0; }
  .environment-title h1 { font-size: clamp(44px, 7.4vw, 67px); }
  .environment-title p { max-width: 35ch; margin-top: 14px; }
  .tree-composition { margin: 26px 0 20px; }
  .tree-composition .subject-controls {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-top: 18px;
  }
  .tree-composition .subject {
    position: static;
    min-height: 54px;
    font-size: 20px;
    padding: 10px 12px;
    box-shadow: none;
    max-width: none;
    width: 100%;
  }
  .environment-title .environment-note { order: 2; margin-top: 12px; }
  .environment-title .selected-story { order: 3; margin-top: 20px; padding-top: 20px; }
  .reading-grid { grid-template-columns: 1fr; }
  .chapter-map { position: static; }
  .chapter-map ol { display: flex; flex-wrap: wrap; gap: 4px 22px; }
  .directory-feature { margin-left: 12%; }
  .directory-research { width: 90%; }
}
@media (max-width: 600px) {
  :root { --gutter: 20px; }
  .environment { padding-bottom: 40px; }
  .environment-title h1 { font-size: clamp(40px, 11.2vw, 65px); letter-spacing: -.055em; }
  .environment-title p { font-size: 21px; }
  .tree-composition .subject-controls { grid-template-columns: 1fr; gap: 10px; }
  .tree-composition .subject { min-height: 64px; font-size: 24px; padding: 14px 16px; }
  .tree-composition .subject-number { font-size: 14px; }
  .tree-composition .subject-math br { display: none; }
  .environment-title .selected-story h2,
  .environment:has(.subject-chemistry[aria-pressed="true"]) .selected-story h2 { font-size: 30px; }
  .directory-heading h2 { font-size: 46px; }
  .directory-feature { margin-left: 0; padding-bottom: 48px; }
  .directory-feature h3 { font-size: clamp(36px, 10vw, 54px); }
  .directory-feature h3 br { display: none; }
  .directory-research { width: 100%; margin-top: 16px; margin-bottom: 55px; }
  .research-entry h3 { font-size: 37px; }
  .directory-essay { padding: 30px 22px 36px; }
  .directory-essay h3 { font-size: clamp(39px, 10.8vw, 62px); }
  .directory-essay .directory-meta { font-size: 19px; }
  .article-cover h1 { font-size: clamp(38px, 10.4vw, 58px); line-height: 1.12; }
  .article-cover.research-cover h1 { font-size: clamp(32px, 8.6vw, 46px); line-height: 1.15; }
  .article-cover .draft-notice { margin-top: 26px; }
  .reading-surface { padding-top: 20px; }
  .article-body p, .adjacent-evidence p { font-size: 19px; line-height: 1.75; }
  .adjacent-evidence { grid-template-columns: 1fr; gap: 20px; }
  .reading-section { margin-bottom: 55px; }
  .data-table th, .data-table td { font-size: 15px; }
  .utility-page h1 { font-size: clamp(42px, 11vw, 64px); }
}
@media (max-width: 360px) {
  :root { --gutter: 16px; }
  .environment-title h1 { font-size: 38px; }
  .directory-heading h2 { font-size: 40px; }
  .directory-feature h3 { font-size: 36px; }
  .research-entry h3 { font-size: 34px; }
  .directory-essay { padding-inline: 18px; }
  .directory-essay h3 { font-size: 38px; }
  .subject { font-size: 24px; padding-inline: 14px; }
  .reference-grid { grid-template-columns: 1fr; }
}

/* Logo & Seal Identity System */
.header-logo {
  width: clamp(34px, 3vw, 42px);
  height: clamp(34px, 3vw, 42px);
  border-radius: 50%;
  flex-shrink: 0;
  display: block;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.18);
  transition: transform 0.3s var(--motion-bounce), box-shadow 0.25s ease;
}
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.wordmark:hover .header-logo {
  transform: scale(1.12) rotate(-5deg);
  box-shadow: 0 0 0 2px var(--wes-red), 0 4px 14px rgba(197, 18, 48, 0.3);
}
.wordmark-text {
  display: inline;
}

/* Navigation Drawer & Toggle Microinteractions */
#menu-toggle span {
  display: inline-block;
  transition: transform var(--motion-base) var(--motion-ease);
}
#menu-toggle:hover span {
  transform: scale(1.25);
  color: var(--wes-red);
}
#menu-toggle[aria-expanded="true"] span {
  transform: rotate(45deg);
}
.site-menu:not([hidden]) {
  animation: menuSlideDown var(--motion-base) var(--motion-ease) forwards;
}
@keyframes menuSlideDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Header Action Utilities & Theme Toggle Microinteraction */
.header-actions .utility,
.site-header .utility {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 12px;
  border-radius: 4px;
  gap: 8px;
  border: 1px solid transparent;
  transition: background-color var(--motion-fast) var(--ease-academic),
              border-color var(--motion-fast) var(--ease-academic),
              color var(--motion-fast) var(--ease-academic);
}

/* Icon-only Theme Toggle */
.theme-toggle {
  width: 40px;
  height: 40px;
  min-height: 40px !important;
  max-height: 40px !important;
  padding: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 4px;
  border: 1px solid transparent;
  color: inherit;
  background: transparent;
  cursor: pointer;
  flex-shrink: 0;
}

.theme-toggle .theme-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  transition: color var(--motion-fast) var(--ease-academic),
              transform var(--motion-fast) var(--ease-academic);
}

.theme-toggle .theme-icon svg {
  display: block;
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: currentColor;
  transition: transform var(--motion-fast) var(--ease-academic);
}

.theme-toggle .theme-icon svg.icon-system,
.theme-toggle .theme-icon svg.icon-sun {
  fill: none;
}

.theme-toggle:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.16);
  color: var(--wes-red);
}

.theme-toggle:hover .theme-icon {
  color: var(--wes-red);
  transform: scale(1.08);
}

.theme-toggle:active .theme-icon {
  transform: scale(0.92);
}

[data-theme="light"] .theme-toggle {
  color: #100e0f;
}

[data-theme="light"] .theme-toggle:hover {
  background: #f4f4f7;
  border-color: #e2e2e5;
  color: var(--wes-red);
}

[data-theme="dark"] .theme-toggle {
  color: #f5f5f7;
}

[data-theme="dark"] .theme-toggle:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
  color: var(--wes-red);
}

/* Site Menu Brand Header */
.menu-brand {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 16px;
  padding-bottom: 18px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.menu-logo {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.2);
  transition: transform 0.3s var(--motion-bounce);
}
.menu-brand:hover .menu-logo {
  transform: scale(1.08) rotate(3deg);
}
.menu-title {
  display: block;
  font: 700 20px/1.2 var(--signage);
  color: var(--chalk);
  letter-spacing: 0.02em;
}
.menu-sub {
  display: block;
  font: 400 14px/1.3 var(--serif);
  color: var(--muted);
}

/* Search Form Input & Filter Microinteractions */
.search-form input {
  transition: border-color var(--motion-fast) ease, box-shadow var(--motion-fast) ease;
}
.search-form input:focus {
  outline: none;
  border-color: var(--wes-red) !important;
  box-shadow: 0 0 0 3px rgba(197, 18, 48, 0.25);
}
/* Editorial Underline Tab Navigation */
.filter-nav {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(16px, 2.5vw, 36px);
  margin-bottom: 36px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0;
}
.filter-nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 10px 4px 14px;
  min-height: 44px;
  font: 400 clamp(20px, 1.8vw, 24px) / 1.2 var(--signage);
  letter-spacing: 0.02em;
  color: var(--muted) !important;
  background: transparent !important;
  border: none !important;
  text-decoration: none !important;
  transition: color var(--motion-fast) ease;
}
.filter-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 0;
  height: 3px;
  background: var(--wes-red);
  border-radius: 2px 2px 0 0;
  transition: width var(--motion-fast) cubic-bezier(0.2, 0, 0, 1), background-color var(--motion-fast) ease;
}
.filter-nav a:hover {
  color: var(--fg) !important;
  background: transparent !important;
  border: none !important;
  text-decoration: none !important;
  transform: none !important;
}
.filter-nav a:hover::after {
  width: 100%;
  background: rgba(197, 18, 48, 0.4);
}
.filter-nav a[aria-current="page"] {
  color: var(--fg) !important;
  font-weight: 700 !important;
  background: transparent !important;
  border: none !important;
  text-decoration: none !important;
}
.filter-nav a[aria-current="page"]::after {
  width: 100% !important;
  background: var(--wes-red) !important;
}
.filter-nav a:focus-visible {
  outline: 2px solid var(--wes-red);
  outline-offset: 4px;
}
#search-results {
  transition: opacity var(--motion-fast) ease;
}

/* Footer Identity */
.footer-brand-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
}
.footer-logo {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.2);
  transition: transform 0.3s var(--motion-bounce);
}
.footer-brand:hover .footer-logo {
  transform: scale(1.08) rotate(-3deg);
}
.footer-seal-name {
  font: 400 14px/1.4 var(--serif);
  color: var(--muted);
  margin: 0;
}

/* Article Publisher Imprint */
.breadcrumb a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.breadcrumb-logo {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: inline-block;
  vertical-align: middle;
}
.article-publication-imprint {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font: 700 13px/1.2 var(--signage);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--reading-muted);
  margin-bottom: 16px;
}
.imprint-seal {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.1);
}


/* Current Issue Marker Bar */
.issue-bar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 8px var(--gutter);
  font: 400 15px/1.3 var(--signage);
  letter-spacing: 0.02em;
}
.issue-bar-inner {
  max-width: 1760px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.issue-bar-status {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.issue-badge {
  background: var(--wes-red);
  color: #ffffff !important;
  font: 700 11px/1 var(--mono, monospace);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 8px;
  border-radius: 2px;
}
.issue-volume {
  color: var(--fg);
  font-weight: 500;
}
.issue-bar-link {
  color: var(--muted);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 15px;
  transition: color var(--motion-fast) ease;
}
.issue-bar-link:hover {
  color: var(--wes-red);
}

/* Editorial Board Masthead Grid */
.masthead-division {
  margin-top: 42px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}
.masthead-division-title {
  font: 600 clamp(22px, 2vw, 28px)/1.2 var(--display);
  letter-spacing: -0.02em;
  color: var(--fg);
  margin-bottom: 18px;
}
.masthead-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 14px;
}
.person-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 2px;
  transition: border-color var(--motion-fast) ease, background-color var(--motion-fast) ease;
}
.person-card:hover {
  border-color: var(--wes-red);
}
.person-avatar {
  width: 38px;
  height: 38px;
  flex-basis: 38px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  color: var(--wes-red);
  font: 700 12px/38px var(--mono, monospace);
  text-align: center;
  letter-spacing: 0.05em;
}
.person-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.person-name {
  font: 600 16px/1.2 var(--display);
  letter-spacing: -0.01em;
  color: var(--fg);
  overflow-wrap: break-word;
}
.person-role {
  font: 400 13px/1.3 var(--signage);
  letter-spacing: 0.02em;
  color: var(--muted);
}

/* Result Item Metadata & Excerpts */
.result-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font: 400 15px/1.3 var(--signage);
  letter-spacing: 0.02em;
  color: var(--muted);
  margin: 6px 0 10px;
}
.meta-tag {
  color: var(--wes-red) !important;
  font-weight: 600;
}
.meta-sep {
  opacity: 0.5;
  font-size: 11px;
}
.meta-date, .meta-time, .meta-division {
  color: var(--muted);
}
.result-item p.result-excerpt,
[data-theme="light"] .result-item p.result-excerpt,
[data-theme="dark"] .result-item p.result-excerpt {
  font-size: 17px;
  line-height: 1.6;
  color: var(--fg) !important;
  opacity: 0.88;
  max-width: 68ch;
  margin-top: 4px;
}

/* Footer Navigation Architecture */
.footer-columns {
  grid-column: 2 / -1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
}
.footer-col-title {
  font: 600 18px/1.3 var(--display);
  letter-spacing: -0.02em;
  color: var(--fg);
  margin-bottom: 12px;
}
.footer-col nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.footer-col nav a {
  font: 400 17px/1.3 var(--signage);
  color: var(--muted);
  text-decoration: none;
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  transition: color var(--motion-fast) ease;
}
.footer-col nav a:hover {
  color: var(--wes-red);
}
@media (max-width: 900px) {
  .footer-columns {
    grid-column: 1 / -1;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
  }
}
@media (max-width: 600px) {
  .footer-columns {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

/* About Page Hero Seal */
.about-hero-seal {
  display: flex;
  align-items: center;
  gap: 36px;
  padding: 32px;
  margin: 28px 0 40px;
  background: rgba(0, 0, 0, 0.03);
  border: 1px solid var(--reading-border);
  border-radius: 8px;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.about-hero-seal:hover {
  border-color: var(--wes-red) !important;
  box-shadow: 0 8px 24px rgba(197, 18, 48, 0.12);
}
.official-seal {
  width: clamp(140px, 18vw, 220px);
  height: clamp(140px, 18vw, 220px);
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08), 0 0 0 1px rgba(0, 0, 0, 0.08);
  transition: transform 0.35s var(--motion-bounce), box-shadow 0.3s ease;
}
.about-hero-seal:hover .official-seal {
  transform: scale(1.06) rotate(2deg);
  box-shadow: 0 10px 28px rgba(197, 18, 48, 0.25);
}
.seal-caption strong {
  display: block;
  font: 700 22px/1.2 var(--signage);
  color: var(--reading-ink);
  letter-spacing: -0.01em;
  margin-bottom: 8px;
}
.seal-caption p {
  font: 400 17px/1.55 var(--reading-serif);
  color: var(--reading-muted);
  margin: 0;
}

/* Archive & Submit Page Imprints */
.archive-volume-header, .submit-imprint {
  display: flex;
  align-items: center;
  gap: 20px;
  margin: 20px 0;
}
.volume-seal, .submit-seal {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s var(--motion-bounce);
}
.archive-volume-header:hover .volume-seal,
.submit-imprint:hover .submit-seal {
  transform: scale(1.1) rotate(-3deg);
}
.archive-volume-header h2 {
  margin: 0 0 4px;
}
.archive-volume-header p, .submit-imprint p {
  margin: 0;
}

@media (max-width: 600px) {
  .header-logo { width: 30px; height: 30px; }
  .wordmark { gap: 8px; }
  .about-hero-seal {
    flex-direction: column;
    text-align: center;
    gap: 20px;
    padding: 24px 18px;
  }
  .official-seal { width: 140px; height: 140px; }
  .archive-volume-header, .submit-imprint {
    gap: 14px;
  }
  .volume-seal, .submit-seal {
    width: 36px;
    height: 36px;
  }
}

/* ==========================================================================
   Pure White Modern Light Theme (Explicit Overrides)
   ========================================================================== */
[data-theme="light"] body,
body.theme-light {
  background-color: #ffffff;
  color: #100e0f;
}

[data-theme="light"] .site-header {
  background: #ffffff;
  border-bottom: 1px solid #e2e2e5;
}
[data-theme="light"] .wordmark {
  color: #100e0f;
}
[data-theme="light"] .wordmark-period {
  color: var(--wes-red);
}
[data-theme="light"] .primary-nav a,
[data-theme="light"] .header-actions .utility {
  color: #100e0f;
}
[data-theme="light"] .header-actions .utility:hover {
  background: #f4f4f7;
  border-color: #e2e2e5;
  color: var(--wes-red);
}
[data-theme="light"] .site-menu {
  background: #ffffff;
  border-bottom: 1px solid #e2e2e5;
}
[data-theme="light"] .menu-brand {
  border-bottom: 1px solid #e2e2e5;
}
[data-theme="light"] .menu-title {
  color: #100e0f;
}
[data-theme="light"] .menu-sub {
  color: #555555;
}
[data-theme="light"] .site-menu a {
  color: #100e0f;
}
[data-theme="light"] .site-menu a:hover {
  color: var(--wes-red);
}
[data-theme="light"] .environment-title h1 {
  color: #100e0f;
}
[data-theme="light"] .environment-title p {
  color: #333333;
}
[data-theme="light"] .environment-title .environment-note {
  color: #666666;
}
[data-theme="light"] .environment-title .selected-story {
  border-top-color: #e2e2e5;
}
[data-theme="light"] .environment-title .selected-story h2 {
  color: #100e0f;
}
[data-theme="light"] .environment-title .selected-story p {
  color: var(--wes-red);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 14px;
}
[data-theme="light"] .environment-title .selected-story .read-link {
  color: #100e0f;
}

/* Light Theme Tree & Subject Button Overrides */
[data-theme="light"] .tree-composition .subject {
  background: transparent !important;
  color: #555358 !important;
  border: none !important;
  box-shadow: none !important;
  text-shadow: 0 1px 4px rgba(255, 255, 255, 0.8), 0 0 8px rgba(255, 255, 255, 0.9);
}
[data-theme="light"] .tree-composition .subject:hover {
  background: transparent !important;
  color: #100e0f !important;
  box-shadow: none !important;
}
[data-theme="light"] .tree-composition .subject:hover .subject-arrow {
  color: var(--wes-red);
}
[data-theme="light"] .tree-composition .subject[aria-pressed="true"] {
  background: transparent !important;
  color: #100e0f !important;
  box-shadow: none !important;
  border: none !important;
}
[data-theme="light"] .tree-composition .subject[aria-pressed="true"]:hover {
  background: transparent !important;
  color: #100e0f !important;
  box-shadow: none !important;
}

[data-theme="light"] .reading-directory {
  background: #ffffff;
}
[data-theme="light"] .directory-heading h2,
[data-theme="light"] .directory-feature h3 a,
[data-theme="light"] .directory-research h3 a,
[data-theme="light"] .directory-essay h3 a {
  color: #100e0f;
}
[data-theme="light"] .directory-meta {
  color: var(--wes-red);
}
[data-theme="light"] .feature-under p,
[data-theme="light"] .research-entry p,
[data-theme="light"] .directory-essay p {
  color: #333333;
}
[data-theme="light"] .round-link {
  border-color: #100e0f;
  color: #100e0f;
}
[data-theme="light"] .round-link:hover {
  background: #100e0f;
  color: #ffffff;
}
[data-theme="light"] .directory-feature,
[data-theme="light"] .directory-research,
[data-theme="light"] .directory-essay {
  border-top-color: #e2e2e5;
}
[data-theme="light"] .site-footer {
  background: #f8f8fa !important;
  border-top-color: #e2e2e5 !important;
  color: #100e0f !important;
}
[data-theme="light"] .footer-brand {
  color: #100e0f !important;
}
[data-theme="light"] .footer-seal-name {
  color: #555555 !important;
}
[data-theme="light"] .footer-tagline {
  color: #100e0f !important;
}
[data-theme="light"] .site-footer nav a {
  color: #100e0f !important;
}
[data-theme="light"] .site-footer nav a:hover {
  color: var(--wes-red) !important;
}
[data-theme="light"] .footer-colophon {
  color: #666666 !important;
}

/* Light Theme Article & Reading Surfaces */
[data-theme="light"].article-route,
[data-theme="light"].utility-route,
[data-theme="light"] .article-route,
[data-theme="light"] .utility-route,
[data-theme="light"] .reading-surface,
[data-theme="light"] .utility-page {
  background: #ffffff !important;
  color: #100e0f !important;
}
[data-theme="light"] .article-cover {
  background: #ffffff !important;
  border-bottom: 1px solid #e2e2e5 !important;
}
[data-theme="light"] .article-cover h1 {
  color: #100e0f !important;
}
[data-theme="light"] .article-context {
  color: #555555 !important;
}
[data-theme="light"] .breadcrumb a {
  color: #555555 !important;
}
[data-theme="light"] .breadcrumb a:hover {
  color: var(--wes-red) !important;
}
[data-theme="light"] .chapter-map {
  border-top-color: var(--wes-red) !important;
}
[data-theme="light"] .chapter-map h2 {
  color: #100e0f !important;
}
[data-theme="light"] .chapter-map a {
  color: #100e0f !important;
}
[data-theme="light"] .chapter-map a:hover {
  background: #f4f4f7 !important;
  color: var(--wes-red) !important;
}
[data-theme="light"] .chapter-map a[aria-current="true"] {
  color: var(--wes-red) !important;
  border-left-color: var(--wes-red) !important;
}
[data-theme="light"] .chapter-map a span {
  color: #777777 !important;
}
[data-theme="light"] .chapter-map a[aria-current="true"] span {
  color: var(--wes-red) !important;
}
[data-theme="light"] .reading-section h2 {
  color: #100e0f !important;
}
[data-theme="light"] .article-body p {
  color: #100e0f !important;
}
[data-theme="light"] .sample-label {
  border-color: #e2e2e5 !important;
  color: #555555 !important;
}
[data-theme="light"] .evidence-space {
  background: #f7f7f9 !important;
  border: 1px solid #e2e2e5 !important;
  color: #100e0f !important;
}
[data-theme="light"] .evidence-space > span {
  color: var(--wes-red) !important;
}
[data-theme="light"] .evidence-space strong {
  color: #100e0f !important;
}
[data-theme="light"] .evidence-space p {
  color: #333333 !important;
}
[data-theme="light"] .evidence figcaption {
  color: #555555 !important;
}
[data-theme="light"] .data-table {
  color: #100e0f !important;
}
[data-theme="light"] .data-table caption {
  color: #555555 !important;
}
[data-theme="light"] .data-table th {
  background: #f4f4f7 !important;
  border-bottom: 1px solid #e2e2e5 !important;
  color: #100e0f !important;
}
[data-theme="light"] .data-table td {
  border-bottom: 1px solid #e2e2e5 !important;
  color: #100e0f !important;
}
[data-theme="light"] .register {
  border-color: #e2e2e5 !important;
}
[data-theme="light"] .register summary {
  color: #100e0f !important;
}
[data-theme="light"] .register summary:hover {
  background: #f4f4f7 !important;
  color: var(--wes-red) !important;
}
[data-theme="light"] .register-content {
  background: #ffffff !important;
}
[data-theme="light"] .reference-grid li {
  border-bottom: 1px solid #e2e2e5 !important;
  color: #333333 !important;
}
[data-theme="light"] .return-link {
  color: #100e0f !important;
}
[data-theme="light"] .return-link:hover {
  background: #f4f4f7 !important;
  color: var(--wes-red) !important;
}
[data-theme="light"] .article-publication-imprint {
  color: #666666 !important;
  border-color: #e2e2e5 !important;
}

/* Light Theme Utility Pages */
[data-theme="light"] .utility-page h1,
[data-theme="light"] .utility-page h2 {
  color: #100e0f !important;
}
[data-theme="light"] .utility-page p {
  color: #333333 !important;
}
[data-theme="light"] .search-form label {
  color: #100e0f !important;
}
[data-theme="light"] .search-form input {
  background: #ffffff !important;
  border: 1px solid #100e0f !important;
  color: #100e0f !important;
}
[data-theme="light"] .search-form input:focus {
  border-color: var(--wes-red) !important;
  box-shadow: 0 0 0 3px rgba(197, 18, 48, 0.15) !important;
}
[data-theme="light"] .primary-button {
  background: #100e0f !important;
  border: 1px solid #100e0f !important;
  color: #ffffff !important;
}
[data-theme="light"] .primary-button:hover {
  background: var(--wes-red) !important;
  border-color: var(--wes-red) !important;
  color: #ffffff !important;
}
[data-theme="light"] .filter-nav a {
  border: none !important;
  background: transparent !important;
  color: #555358 !important;
  text-decoration: none !important;
}
[data-theme="light"] .filter-nav a:hover {
  color: #100e0f !important;
  border: none !important;
  background: transparent !important;
}
[data-theme="light"] .filter-nav a[aria-current="page"] {
  color: #100e0f !important;
  border: none !important;
  background: transparent !important;
}
[data-theme="light"] .result-item {
  border-top: 1px solid #e2e2e5 !important;
}
[data-theme="light"] .result-item h2 a {
  color: #100e0f !important;
}
[data-theme="light"] .result-item h2 a:hover {
  color: var(--wes-red) !important;
}
[data-theme="light"] .result-item p:not(.result-excerpt) {
  color: var(--wes-red) !important;
}
[data-theme="light"] .empty-state {
  border-block: 1px solid #e2e2e5 !important;
}
[data-theme="light"] .empty-state h2 {
  color: #100e0f !important;
}
[data-theme="light"] .empty-state p {
  color: #555555 !important;
}
[data-theme="light"] .about-hero-seal {
  background: #f8f8fa !important;
  border: 1px solid #e2e2e5 !important;
}
[data-theme="light"] .about-hero-seal .seal-caption strong {
  color: #100e0f !important;
}
[data-theme="light"] .about-hero-seal .seal-caption p {
  color: #555555 !important;
}
[data-theme="light"] .archive-volume-header,
[data-theme="light"] .submit-imprint {
  border-bottom: 1px solid #e2e2e5 !important;
}
[data-theme="light"] .archive-volume-header h2 {
  color: #100e0f !important;
}
[data-theme="light"] .archive-volume-header p,
[data-theme="light"] .submit-imprint p {
  color: #333333 !important;
}
[data-theme="light"] .plain-list li {
  color: #333333 !important;
  border-bottom: 1px solid #e2e2e5 !important;
}
[data-theme="light"] .plain-list strong {
  color: #100e0f !important;
}
[data-theme="light"] .read-link {
  color: #100e0f !important;
  border-bottom-color: #100e0f !important;
}
[data-theme="light"] .read-link:hover {
  background: #f4f4f7 !important;
  color: var(--wes-red) !important;
}

/* ==========================================================================
   Midnight Dark Theme (Explicit Overrides)
   ========================================================================== */
[data-theme="dark"] body {
  background-color: #100e0f;
  color: #f5f5f7;
}

[data-theme="dark"] .site-header {
  background: #100e0f !important;
  border-bottom: 1px solid #2a2829 !important;
}
[data-theme="dark"] .wordmark {
  color: #f5f5f7 !important;
}
[data-theme="dark"] .wordmark-period {
  color: var(--wes-red) !important;
}
[data-theme="dark"] .primary-nav a,
[data-theme="dark"] .header-actions .utility {
  color: #f5f5f7 !important;
}
[data-theme="dark"] .primary-nav a:hover,
[data-theme="dark"] .header-actions .utility:hover {
  color: var(--wes-red) !important;
}
[data-theme="dark"] .header-actions .utility:hover {
  background: rgba(255, 255, 255, 0.1) !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
}
[data-theme="dark"] .site-menu {
  background: #181617 !important;
  border-bottom: 1px solid #2a2829 !important;
}
[data-theme="dark"] .menu-brand {
  border-bottom: 1px solid #2a2829 !important;
}
[data-theme="dark"] .menu-title {
  color: #f5f5f7 !important;
}
[data-theme="dark"] .menu-sub {
  color: #a0a0a5 !important;
}
[data-theme="dark"] .site-menu a {
  color: #f5f5f7 !important;
}
[data-theme="dark"] .site-menu a:hover {
  color: var(--wes-red) !important;
}
[data-theme="dark"] .environment-title h1 {
  color: #f5f5f7 !important;
}
[data-theme="dark"] .environment-title p {
  color: #d5d5d8 !important;
}
[data-theme="dark"] .environment-title .environment-note {
  color: #a0a0a5 !important;
}
[data-theme="dark"] .environment-title .selected-story {
  border-top-color: #2a2829 !important;
}
[data-theme="dark"] .environment-title .selected-story h2 {
  color: #f5f5f7 !important;
}
[data-theme="dark"] .environment-title .selected-story p {
  color: var(--wes-red) !important;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 14px;
}
[data-theme="dark"] .environment-title .selected-story .read-link {
  color: #f5f5f7 !important;
}
[data-theme="dark"] .environment-title .selected-story .read-link:hover {
  color: var(--wes-red) !important;
  background: #181617 !important;
}

/* Dark Theme Tree & Subject Button Overrides */
[data-theme="dark"] .tree-composition .subject {
  background: transparent !important;
  color: #a09fa6 !important;
  border: none !important;
  box-shadow: none !important;
  text-shadow: 0 1px 4px #100e0f, 0 0 8px #100e0f;
}
[data-theme="dark"] .tree-composition .subject:hover {
  background: transparent !important;
  color: #f5f5f7 !important;
  box-shadow: none !important;
}
[data-theme="dark"] .tree-composition .subject:hover .subject-arrow {
  color: var(--wes-red);
}
[data-theme="dark"] .tree-composition .subject[aria-pressed="true"] {
  background: transparent !important;
  color: #f5f5f7 !important;
  box-shadow: none !important;
  border: none !important;
}
[data-theme="dark"] .tree-composition .subject[aria-pressed="true"]:hover {
  background: transparent !important;
  color: #ffffff !important;
  box-shadow: none !important;
}

[data-theme="dark"] .reading-directory {
  background: #100e0f;
}
[data-theme="dark"] .directory-heading h2,
[data-theme="dark"] .directory-feature h3 a,
[data-theme="dark"] .directory-research h3 a,
[data-theme="dark"] .directory-essay h3 a {
  color: #f5f5f7;
}
[data-theme="dark"] .directory-heading h2 a:hover,
[data-theme="dark"] .directory-feature h3 a:hover,
[data-theme="dark"] .directory-research h3 a:hover,
[data-theme="dark"] .directory-essay h3 a:hover {
  color: var(--wes-red);
}
[data-theme="dark"] .directory-meta {
  color: var(--wes-red);
}
[data-theme="dark"] .feature-under p,
[data-theme="dark"] .research-entry p,
[data-theme="dark"] .directory-essay p {
  color: #d5d5d8;
}
[data-theme="dark"] .round-link {
  border-color: #f5f5f7;
  color: #f5f5f7;
}
[data-theme="dark"] .round-link:hover {
  background: #f5f5f7;
  color: #100e0f;
}
[data-theme="dark"] .directory-feature,
[data-theme="dark"] .directory-research,
[data-theme="dark"] .directory-essay {
  border-top-color: #2a2829;
}
[data-theme="dark"] .site-footer {
  background: #181617 !important;
  border-top-color: #2a2829 !important;
  color: #f5f5f7 !important;
}
[data-theme="dark"] .footer-brand {
  color: #f5f5f7 !important;
}
[data-theme="dark"] .footer-seal-name {
  color: #a0a0a5 !important;
}
[data-theme="dark"] .footer-tagline {
  color: #f5f5f7 !important;
}
[data-theme="dark"] .site-footer nav a {
  color: #f5f5f7 !important;
}
[data-theme="dark"] .site-footer nav a:hover {
  color: var(--wes-red) !important;
}
[data-theme="dark"] .footer-colophon {
  color: #888890 !important;
}

/* Dark Theme Article & Reading Surfaces */
[data-theme="dark"].article-route,
[data-theme="dark"].utility-route,
[data-theme="dark"] .article-route,
[data-theme="dark"] .utility-route,
[data-theme="dark"] .reading-surface,
[data-theme="dark"] .utility-page {
  background: #100e0f !important;
  color: #f5f5f7 !important;
}
[data-theme="dark"] .article-cover {
  background: #100e0f !important;
  border-bottom: 1px solid #2a2829 !important;
}
[data-theme="dark"] .article-cover h1 {
  color: #ffffff !important;
}
[data-theme="dark"] .article-context {
  color: #a0a0a5 !important;
}
[data-theme="dark"] .breadcrumb a {
  color: #a0a0a5 !important;
}
[data-theme="dark"] .breadcrumb a:hover {
  color: var(--wes-red) !important;
}
[data-theme="dark"] .chapter-map {
  border-top-color: var(--wes-red) !important;
}
[data-theme="dark"] .chapter-map h2 {
  color: #ffffff !important;
}
[data-theme="dark"] .chapter-map a {
  color: #d5d5d8 !important;
}
[data-theme="dark"] .chapter-map a:hover {
  background: #181617 !important;
  color: var(--wes-red) !important;
}
[data-theme="dark"] .chapter-map a[aria-current="true"] {
  color: var(--wes-red) !important;
  border-left-color: var(--wes-red) !important;
}
[data-theme="dark"] .chapter-map a span {
  color: #888890 !important;
}
[data-theme="dark"] .chapter-map a[aria-current="true"] span {
  color: var(--wes-red) !important;
}
[data-theme="dark"] .reading-section h2 {
  color: #ffffff !important;
}
[data-theme="dark"] .article-body p {
  color: #e4e4e8 !important;
}
[data-theme="dark"] .sample-label {
  border-color: #2a2829 !important;
  color: #a0a0a5 !important;
}
[data-theme="dark"] .evidence-space {
  background: #181617 !important;
  border: 1px solid #2a2829 !important;
  color: #f5f5f7 !important;
}
[data-theme="dark"] .evidence-space > span {
  color: var(--wes-red) !important;
}
[data-theme="dark"] .evidence-space strong {
  color: #ffffff !important;
}
[data-theme="dark"] .evidence-space p {
  color: #d5d5d8 !important;
}
[data-theme="dark"] .evidence figcaption {
  color: #a0a0a5 !important;
}
[data-theme="dark"] .data-table {
  color: #f5f5f7 !important;
}
[data-theme="dark"] .data-table caption {
  color: #a0a0a5 !important;
}
[data-theme="dark"] .data-table th {
  background: #201e1f !important;
  border-bottom: 1px solid #2a2829 !important;
  color: #ffffff !important;
}
[data-theme="dark"] .data-table td {
  border-bottom: 1px solid #2a2829 !important;
  color: #e4e4e8 !important;
}
[data-theme="dark"] .register {
  border-color: #2a2829 !important;
}
[data-theme="dark"] .register summary {
  color: #ffffff !important;
}
[data-theme="dark"] .register summary:hover {
  background: #1e1c1d !important;
  color: var(--wes-red) !important;
}
[data-theme="dark"] .register-content {
  background: #100e0f !important;
}
[data-theme="dark"] .reference-grid li {
  border-bottom: 1px solid #2a2829 !important;
  color: #d5d5d8 !important;
}
[data-theme="dark"] .return-link {
  color: #f5f5f7 !important;
}
[data-theme="dark"] .return-link:hover {
  background: #1e1c1d !important;
  color: var(--wes-red) !important;
}
[data-theme="dark"] .article-publication-imprint {
  color: #888890 !important;
  border-color: #2a2829 !important;
}

/* Dark Theme Utility Pages */
[data-theme="dark"] .utility-page h1,
[data-theme="dark"] .utility-page h2 {
  color: #ffffff !important;
}
[data-theme="dark"] .utility-page p {
  color: #d5d5d8 !important;
}
[data-theme="dark"] .search-form label {
  color: #f5f5f7 !important;
}
[data-theme="dark"] .search-form input {
  background: #181617 !important;
  border: 1px solid #3a383a !important;
  color: #ffffff !important;
}
[data-theme="dark"] .search-form input:focus {
  border-color: var(--wes-red) !important;
  box-shadow: 0 0 0 3px rgba(197, 18, 48, 0.25) !important;
}
[data-theme="dark"] .primary-button {
  background: #f5f5f7 !important;
  border: 1px solid #f5f5f7 !important;
  color: #100e0f !important;
}
[data-theme="dark"] .primary-button:hover {
  background: var(--wes-red) !important;
  border-color: var(--wes-red) !important;
  color: #ffffff !important;
}
[data-theme="dark"] .filter-nav a {
  border: none !important;
  background: transparent !important;
  color: #a09fa6 !important;
  text-decoration: none !important;
}
[data-theme="dark"] .filter-nav a:hover {
  color: #f7f6f5 !important;
  border: none !important;
  background: transparent !important;
}
[data-theme="dark"] .filter-nav a[aria-current="page"] {
  color: #f7f6f5 !important;
  border: none !important;
  background: transparent !important;
}
[data-theme="dark"] .result-item {
  border-top: 1px solid #2a2829 !important;
}
[data-theme="dark"] .result-item h2 a {
  color: #ffffff !important;
}
[data-theme="dark"] .result-item h2 a:hover {
  color: var(--wes-red) !important;
}
[data-theme="dark"] .result-item p:not(.result-excerpt) {
  color: var(--wes-red) !important;
}
[data-theme="dark"] .empty-state {
  border-block: 1px solid #2a2829 !important;
}
[data-theme="dark"] .empty-state h2 {
  color: #ffffff !important;
}
[data-theme="dark"] .empty-state p {
  color: #a0a0a5 !important;
}
[data-theme="dark"] .about-hero-seal {
  background: #181617 !important;
  border: 1px solid #2a2829 !important;
}
[data-theme="dark"] .about-hero-seal .seal-caption strong {
  color: #ffffff !important;
}
[data-theme="dark"] .about-hero-seal .seal-caption p {
  color: #a0a0a5 !important;
}
[data-theme="dark"] .archive-volume-header,
[data-theme="dark"] .submit-imprint {
  border-bottom: 1px solid #2a2829 !important;
}
[data-theme="dark"] .archive-volume-header h2 {
  color: #ffffff !important;
}
[data-theme="dark"] .archive-volume-header p,
[data-theme="dark"] .submit-imprint p {
  color: #d5d5d8 !important;
}
[data-theme="dark"] .plain-list li {
  color: #d5d5d8 !important;
  border-bottom: 1px solid #2a2829 !important;
}
[data-theme="dark"] .plain-list strong {
  color: #ffffff !important;
}
[data-theme="dark"] .read-link {
  color: #f5f5f7 !important;
  border-bottom-color: #f5f5f7 !important;
}
[data-theme="dark"] .read-link:hover {
  background: #181617 !important;
  color: var(--wes-red) !important;
}

/* Strict Reduced Motion Contract */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .reading-progress-track {
    display: none !important;
  }
  .tree-composition .subject:hover,
  .tree-composition .subject[aria-pressed="true"]:hover,
  .round-link:hover,
  .read-link:hover span,
  .tree-composition .subject:hover .subject-arrow,
  .tree-cardinal:hover,
  .tree-composition:has(.subject-field:hover) .tree-cardinal,
  #menu-toggle:hover span,
  #menu-toggle[aria-expanded="true"] span,
  .theme-toggle:hover span,
  .theme-toggle:hover .theme-icon,
  .theme-toggle:hover .theme-icon svg,
  .official-seal:hover {
    transform: none !important;
  }
}

/* ==========================================================================
   Button & Link Hover Animations: Strict Arrow Underline Suppression
   ========================================================================== */

/* 1. Global Reset on Action Buttons & Controls */
.utility,
.utility:hover,
.header-actions .utility,
.header-actions .utility:hover,
.issue-bar-link,
.issue-bar-link:hover,
.read-link,
.read-link:hover,
.round-link,
.round-link:hover,
.return-link,
.return-link:hover,
.tree-composition .subject,
.tree-composition .subject:hover {
  text-decoration: none !important;
}

/* 2. Text Label Underline on Hover (Only the Text, Never the Arrow) */
.utility:hover .btn-text,
.header-actions .utility:hover .btn-text,
[data-theme="light"] .header-actions .utility:hover .btn-text,
[data-theme="dark"] .header-actions .utility:hover .btn-text,
.issue-bar-link:hover .btn-text {
  text-decoration: underline !important;
  text-decoration-thickness: 2px !important;
  text-underline-offset: 3px !important;
  text-decoration-color: var(--wes-red) !important;
}

/* 3. Universal Arrow Neutralization: Absolutely No Underline or Border on Arrows */
.btn-arrow,
.subject-arrow,
.utility .btn-arrow,
.utility span[aria-hidden="true"],
.issue-bar-link .btn-arrow,
.issue-bar-link span[aria-hidden="true"],
.read-link .btn-arrow,
.read-link span[aria-hidden="true"],
.return-link .btn-arrow,
.round-link,
a span[aria-hidden="true"]:not(.wordmark-period) {
  text-decoration: none !important;
  text-decoration-line: none !important;
  border-bottom: none !important;
  display: inline-block !important;
}

/* 4. Arrow Hover Kinetic Microinteractions (Lift & Translate Without Underline) */
.utility .btn-arrow,
.issue-bar-link .btn-arrow {
  display: inline-block;
  transition: transform var(--motion-fast) var(--motion-ease);
}
.utility:hover .btn-arrow,
.issue-bar-link:hover .btn-arrow {
  transform: translate(2px, -2px);
}

/* 5. Read-Link Redefinition (Underline Under Text Only, Border Removed from Container) */
.read-link {
  border-bottom: none !important;
  text-decoration: none !important;
}
[data-theme="light"] .read-link,
[data-theme="dark"] .read-link {
  border-bottom: none !important;
}
.read-link .btn-text {
  border-bottom: 1px solid currentColor;
  padding-bottom: 2px;
  transition: border-color var(--motion-fast) ease;
}
.read-link:hover .btn-text {
  border-bottom-color: var(--wes-red) !important;
}

/* 6. Strict Reduced Motion Guard */
@media (prefers-reduced-motion: reduce) {
  .utility:hover .btn-arrow,
  .issue-bar-link:hover .btn-arrow,
  .read-link:hover .btn-arrow,
  .read-link:hover span {
    transform: none !important;
  }
}
