/* ============================================================
   ILLNESS NARRATIVES IN MACEDONIAN LITERATURE — ARCHIVE
   Main Stylesheet
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;1,300;1,400&family=Inter:wght@300;400;500&family=Jost:wght@200;300;400;500&display=swap');

@font-face {
  font-family: 'Lazar 1389';
  src: local('Lazar 1389'), local('Lazar1389');
  font-display: swap;
}

:root {
  --site-font: 'Lazar 1389', 'Times New Roman', serif;
  /* Hyperlinks — distinct hues by role */
  --link-prose: #246b8f;
  --link-prose-hover: #184a63;
  --link-prose-visited: #6e4a8c;
  --link-external: #0d6b5c;
  --link-external-hover: #094a40;
  --link-corpus-readmore: #b45309;
  --link-corpus-readmore-hover: #7c2d12;
  --link-cobiss: #5c3daf;
  --link-cobiss-hover: #3d2877;
  /* Shared by `.site-footer` and main site `.index-nav` */
  --nav-footer-bg: rgba(13, 21, 42, 0.98);
}

/* === RESET & BASE === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body, button, input, select, textarea, option {
  font-family: var(--site-font) !important;
}

html { scroll-behavior: smooth; }

html.index-nav-revealed {
  scroll-padding-top: 76px;
}

body {
  font-family: var(--site-font);
  background: #fff;
  color: #1a1008;
  overflow-x: hidden;
  line-height: 1.6;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

body[data-page="index"] {
  background: #f3eefb;
}

img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }

/* Prose / panel links (not nav, cards-as-buttons, or CTA pills) */
.medical-text-panel a[href],
.medical-feature-modal-body a[href] {
  color: var(--link-prose);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color 0.15s ease;
}
.medical-text-panel a[href]:hover,
.medical-text-panel a[href]:focus-visible,
.medical-feature-modal-body a[href]:hover,
.medical-feature-modal-body a[href]:focus-visible {
  color: var(--link-prose-hover);
}
.medical-text-panel a[href]:visited,
.medical-feature-modal-body a[href]:visited {
  color: var(--link-prose-visited);
}

.medical-text-panel a[href^="http"],
.medical-feature-modal-body a[href^="http"] {
  color: var(--link-external);
}
.medical-text-panel a[href^="http"]:hover,
.medical-text-panel a[href^="http"]:focus-visible,
.medical-feature-modal-body a[href^="http"]:hover,
.medical-feature-modal-body a[href^="http"]:focus-visible {
  color: var(--link-external-hover);
}
.medical-text-panel a[href^="http"]:visited,
.medical-feature-modal-body a[href^="http"]:visited {
  color: #3d7a6c;
}
button {
  cursor: pointer;
  font-family: var(--site-font);
  border-radius: 14px;
}

/* === NAVIGATION === */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fff;
  border-bottom: 2px solid #1a1008;
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-logo {
  font-family: 'Cormorant Garamond', serif;
  font-size: 18px;
  font-weight: 400;
  color: #1a1008;
  letter-spacing: 0.02em;
}

.nav-links {
  display: flex;
  gap: 32px;
  align-items: center;
}

.nav-public {
  gap: 24px;
}

.nav-public .nav-links {
  flex: 1;
  justify-content: flex-start;
}

.nav-public .lang-switch {
  margin-left: auto;
  flex-shrink: 0;
}
main div div div .contact-title {
  color:#094a40 !important;
  font-size: 10px !important;
  padding-left: 30px !important;
}
h1#contact-title.about-title.about-title--plain{
color:rgb(212, 169, 104) !important;
  font-size: 30px !important;
  padding-left: 160px !important;
  margin-bottom:20px ;
}
/* Cluster of five primary nav tabs (home/corpus + about links); centered as one unit */
.index-nav-tabs-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  align-self: center;
  flex-wrap: wrap;
  gap: 40px;
  justify-content: center;
  min-width: 0;
}

.index-nav .index-nav-center-cluster {
  align-self: center;
}

body[data-page="index"] .index-nav-end,
body:not([data-page="index"]) .index-nav-end {
  display: contents;
}

/* Index: navbar fixed, hidden until user scrolls (cf. full-bleed hero) */
body[data-page="index"] .index-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 300;
  width: 100%;
  max-width: none;
  margin: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  justify-content: stretch;
  align-items: center;
  column-gap: 38px;
  padding: 12px 22px;
  padding-left: 8px;
  border-bottom: 1px solid transparent;
  background: var(--nav-footer-bg);
  box-shadow: 0 10px 34px rgba(0, 0, 0, 0.18);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-100%);
  transition:
    opacity 0.5s ease,
    transform 0.55s cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0s linear 0.55s,
    border-color 0.3s ease;
  pointer-events: none;
}

body[data-page="index"] .index-nav.index-nav--visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  border-bottom-color: rgba(255, 255, 255, 0.06);
  transition:
    opacity 0.45s ease,
    transform 0.5s cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0s,
    border-color 0.3s ease;
  pointer-events: auto;
}

body[data-page="index"] .index-nav-links-wrap {
  flex: 0 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  align-self: center;
  justify-content: flex-start;
}

body[data-page="index"] .index-nav-tabs-row {
  grid-column: 2;
  justify-self: center;
}

body[data-page="index"] .index-nav .nav-links {
  flex: 0 1 auto;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 40px;
  align-items: center;
}

body[data-page="index"] .index-nav .nav-link {
  font-size: 12px;
  letter-spacing: 0.08em;
  line-height: 1.25;
}

body[data-page="index"] .index-nav .lang-switch {
  position: absolute;
  top: 50%;
  right: 14px;
  transform: translateY(-50%);
  z-index: 2;
  margin-left: 0;
  flex-shrink: 0;
  border-color: rgba(246, 238, 222, 0.14);
  background: rgba(255, 255, 255, 0.04);
}

/* Center cluster: scrolled brand title */
body[data-page="index"] .index-nav-center-cluster {
  grid-row: 1;
  padding-left: 20px;
  transition: opacity 0.1s ease, visibility 0.1s ease;
}

body[data-page="index"] .index-nav-center-title {
  box-sizing: border-box;
  padding: 0 4px;
  text-align: center;
  font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #1a1008;
  line-height: 1.3;
  white-space: normal;
  pointer-events: none;
}

body[data-page="index"] .index-nav-about-link {
  flex-shrink: 0;
  font-size: 13px;
  letter-spacing: 0.08em;
  line-height: 1.25;
  text-transform: uppercase;
  white-space: nowrap;
}

body[data-page="index"] .index-nav-brand--flying {
  opacity: 0 !important;
  visibility: hidden !important;
}

body[data-page="index"] .index-nav--compact {
  padding-left: 8px;
  padding-right: 22px;
}

body[data-page="index"] .index-nav--compact .index-nav-center-cluster {
  opacity: 1;
  visibility: visible;
}

body[data-page="index"] .index-nav--compact .index-nav-center-title {
  text-align: left;
  padding-left: 0;
}

/* When not compact but visible: center cluster visually hidden */
body[data-page="index"] .index-nav--visible:not(.index-nav--compact) .index-nav-center-cluster {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  pointer-events: none;
  visibility: hidden;
}

body[data-page="corpus"] .index-nav,
body[data-page="about"] .index-nav,
body[data-page="author"] .index-nav,
body[data-page="contact"] .index-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 300;
  width: 100%;
  max-width: none;
  margin: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  justify-content: stretch;
  align-items: center;
  column-gap: 38px;
  padding: 12px 22px;
  padding-left: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: var(--nav-footer-bg);
  box-shadow: 0 10px 34px rgba(0, 0, 0, 0.18);
}

body[data-page="corpus"] .index-nav-tabs-row,
body[data-page="about"] .index-nav-tabs-row,
body[data-page="author"] .index-nav-tabs-row,
body[data-page="contact"] .index-nav-tabs-row {
  grid-column: 2;
  justify-self: center;
}

body[data-page="corpus"] .index-nav-links-wrap,
body[data-page="about"] .index-nav-links-wrap,
body[data-page="author"] .index-nav-links-wrap,
body[data-page="contact"] .index-nav-links-wrap {
  min-width: 0;
  display: flex;
  align-items: center;
  align-self: center;
  justify-content: flex-start;
}

body[data-page="corpus"] .index-nav .nav-links,
body[data-page="about"] .index-nav .nav-links,
body[data-page="author"] .index-nav .nav-links,
body[data-page="contact"] .index-nav .nav-links {
  flex: 0 1 auto;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 40px;
  align-items: center;
}

body[data-page="corpus"] .index-nav-center-cluster,
body[data-page="about"] .index-nav-center-cluster,
body[data-page="author"] .index-nav-center-cluster,
body[data-page="contact"] .index-nav-center-cluster {
  grid-column: 1;
  justify-self: start;
  justify-content: flex-start;
  display: flex;
  align-items: center;
  min-width: 0;
  max-width: min(calc(100vw - 300px), 30rem);
  opacity: 1;
  visibility: visible;
}

body[data-page="corpus"] .index-nav .lang-switch,
body[data-page="about"] .index-nav .lang-switch,
body[data-page="author"] .index-nav .lang-switch,
body[data-page="contact"] .index-nav .lang-switch {
  position: absolute;
  top: 50%;
  right: 14px;
  transform: translateY(-50%);
  z-index: 2;
  margin-left: 0;
  flex-shrink: 0;
  border-color: rgba(246, 238, 222, 0.14);
  background: rgba(255, 255, 255, 0.04);
}

body[data-page="corpus"] .index-nav .nav-link,
body[data-page="about"] .index-nav .nav-link,
body[data-page="author"] .index-nav .nav-link,
body[data-page="contact"] .index-nav .nav-link {
  font-size: 12px;
  letter-spacing: 0.08em;
  line-height: 1.25;
}

body[data-page="corpus"] .index-nav-center-title,
body[data-page="about"] .index-nav-center-title,
body[data-page="author"] .index-nav-center-title,
body[data-page="contact"] .index-nav-center-title {
  font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding-top: -14px !important;
  margin-top: -105px !important;
  margin-left: 20px !important;
}

body[data-page="corpus"] .index-nav-about-link,
body[data-page="about"] .index-nav-about-link,
body[data-page="contact"] .index-nav-about-link,
body[data-page="author"] .index-nav-about-link {
  flex-shrink: 0;
  font-size: 13px;
  letter-spacing: 0.08em;
  line-height: 1.25;
  text-transform: uppercase;
  white-space: nowrap;
}

/* Author page: natural letter-spacing for body copy and chrome */
body[data-page="author"] .index-nav .nav-link,
body[data-page="author"] .index-nav-about-link,
body[data-page="author"] .lang-btn,
body[data-page="author"] .intro-split-section,
body[data-page="author"] .site-footer .footer-copy,
body[data-page="author"] .site-footer .footer-contact-info a,
body[data-page="author"] .mobile-nav-toggle {
  letter-spacing: normal;
}

body[data-page="biography"] .index-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 300;
  width: 100%;
  max-width: none;
  margin: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  justify-content: stretch;
  align-items: center;
  column-gap: 38px;
  padding: 12px 22px;
  padding-left: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: var(--nav-footer-bg);
  box-shadow: 0 10px 34px rgba(0, 0, 0, 0.18);
}

body[data-page="biography"] .index-nav-tabs-row {
  grid-column: 2;
  justify-self: center;
  display: flex;
  align-items: center;
  gap: 40px;
  flex-wrap: wrap;
  justify-content: center;
  min-width: 0;
}

body[data-page="biography"] .index-nav-links-wrap {
  min-width: 0;
  display: flex;
  align-items: center;
  align-self: center;
  justify-content: flex-start;
}

body[data-page="biography"] .index-nav-center-cluster {
  grid-column: 1;
  justify-self: start;
  justify-content: flex-start;
  display: flex;
  align-items: center;
  max-width: min(calc(100vw - 300px), 30rem);
  opacity: 1;
  visibility: visible;
}

body[data-page="biography"] .index-nav .nav-links {
  flex: 0 1 auto;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 40px;
  align-items: center;
}

body[data-page="biography"] .index-nav .lang-switch {
  position: absolute;
  top: 50%;
  right: 14px;
  transform: translateY(-50%);
  z-index: 2;
  margin-left: 0;
  flex-shrink: 0;
  border-color: rgba(246, 238, 222, 0.14);
  background: rgba(255, 255, 255, 0.04);
}

body[data-page="biography"] .index-nav .nav-link {
  font-size: 12px;
  letter-spacing: 0.08em;
  line-height: 1.25;
}

body[data-page="biography"] .index-nav-center-title {
  box-sizing: border-box;
  padding: 0 4px 0 0;
  text-align: left;
  font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #1a1008;
  line-height: 1.3;
  white-space: normal;
}

body[data-page="biography"] .index-nav-about-link {
  flex-shrink: 0;
  font-size: 11px;
  letter-spacing: 0.08em;
  line-height: 1.25;
  text-transform: uppercase;
  white-space: nowrap;
}

body[data-page="biography"] .about-header {
  margin-top: 72px;
}

body[data-page="corpus"] .corpus-main {
  padding-top: calc(1.5rem + 72px);
}

body[data-page="about"] .about-header {
  margin-top: 72px;
}

body[data-page="about"] .about-title {
  color: #d4a968;
}

@media (prefers-reduced-motion: reduce) {
  body[data-page="index"] .index-nav {
    transition: opacity 0.2s ease, visibility 0.2s;
  }
  body[data-page="index"] .index-nav.index-nav--visible {
    transform: translateY(0);
    transition: opacity 0.2s ease, visibility 0s;
  }

  .reading-room-cards .medical-feature-grid {
    scroll-behavior: auto;
  }

  .reading-room-cards .medical-feature-card {
    transition: none;
  }

  .reading-room-cards .medical-feature-card:hover,
  .reading-room-cards .medical-feature-card:focus-within,
  .reading-room-cards .medical-feature-card.is-open {
    transform: none;
    box-shadow: none !important;
  }

  .reading-room-cards .medical-feature-photo {
    transition: none;
  }

  .reading-room-cards .medical-feature-card:hover .medical-feature-photo,
  .reading-room-cards .medical-feature-card:focus-within .medical-feature-photo,
  .reading-room-cards .medical-feature-card.is-open .medical-feature-photo {
    transform: none;
  }
}

.lang-switch {
  display: inline-flex;
  border: 1.5px solid rgba(26,16,8,0.25);
  border-radius: 0;
  overflow: hidden;
}

.lang-btn {
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: none;
  border-radius: 0;
  background: transparent;
  color: #1a1008;
  padding: 7px 12px;
}

.lang-btn.active {
  background: #1a1008;
  color: #fff;
}

.editor-admin {
  background: #fff7d6;
  border-bottom: 2px solid #1a1008;
  padding: 14px 20px;
}

.editor-admin-inner {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.editor-admin-title {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #1a1008;
}

.editor-admin-note {
  max-width: 960px;
  margin: 8px auto 0;
  font-size: 12px;
  color: #5a4030;
}

.editable-active .editable {
  outline: 1px dashed rgba(26,16,8,0.45);
  outline-offset: 3px;
  cursor: text;
}

.editable:focus {
  outline: 2px solid #ffd740;
  background: rgba(255, 232, 112, 0.12);
}

.nav-link {
  font-size: 11px;
  font-weight: 300;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #1a1008;
  background: none;
  border: none;
  transition: opacity 0.18s;
  padding: 0;
}
.nav-link:hover { opacity: 0.45; }
.nav-link.active { font-weight: 500; border-bottom: 1.5px solid #1a1008; padding-bottom: 2px; }

/* === HERO === */
.hero {
  position: relative;
  width: 100%;
  height: 580px;
  overflow: hidden;
}

body[data-page="index"] .hero.hero-splash {
  background: #1a1f28;
  height: auto;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

/* Swap the layered gradients for a photo: e.g. background-image: url('your-hero.jpg'); background-size: cover; */
.hero-splash-bg {
  position: absolute;
  inset: 0;
  background-color: #2a3344;
  background-image:
    linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0)),
    radial-gradient(circle at 18% 22%, rgba(255, 255, 255, 0.12) 0, rgba(255, 255, 255, 0.12) 7px, transparent 8px),
    radial-gradient(circle at 72% 55%, rgba(244, 157, 33, 0.15) 0, transparent 45%),
    linear-gradient(145deg, #5a6578 0%, #3d4a5c 38%, #1e2633 100%);
  background-size: cover;
  background-position: center;
  transform: scale(1.02);
}

.hero-splash-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(10, 12, 18, 0.45) 0%,
    rgba(10, 12, 18, 0.35) 40%,
    rgba(10, 12, 18, 0.55) 100%
  );
  pointer-events: none;
}

.hero-splash-inner {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 920px;
  margin: 0 auto;
  padding: clamp(2rem, 6vw, 4rem) clamp(1.5rem, 5vw, 3rem);
  text-align: center;
}

.hero-splash-heading {
  margin: 0;
  font-weight: 400;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

.hero-splash-primary-lines {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(1.25rem, 3vw, 2rem);
}

.hero-splash-line {
  display: block;
  margin: 0;
  max-width: 32ch;
  color: #fff;
  text-shadow: 0 2px 40px rgba(0, 0, 0, 0.35);
}

.hero-splash-line--lead {
  font-family: 'Times New Roman t', 'Segoe UI', system-ui, sans-serif;
  font-weight: 600;
  font-size: clamp(1.4rem, 4.2vw, 2.45rem);
  line-height: 1.2;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #d4a968;
  max-width: none;
  white-space: nowrap;
}

.hero-splash-line--lead-hidden {
  opacity: 0 !important;
  visibility: hidden !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  pointer-events: none !important;
  line-height: 0 !important;
  font-size: 0 !important;
}

/* Nav mode: title lives in navbar; secondary splash lines hidden smoothly */
body.index-state-nav .hero-splash-line--sub,
body.index-state-nav .hero-splash-line--accent {
  opacity: 0 !important;
  max-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  pointer-events: none !important;
  visibility: hidden !important;
  transition: opacity 0.08s ease, max-height 0.08s ease, visibility 0.08s ease;
}
.hero-splash-line--accent{
  font-family: 'Times New Roman t', Times, serif !important; 
  font-style: italic !important;
}
body.index-state-hero .hero-splash-line--sub,
body.index-state-hero .hero-splash-line--accent {
  transition: opacity 0.08s ease, max-height 0.08s ease, visibility 0.08s ease;
}

body.index-state-nav .hero-splash-hint,
body.index-state-nav .hero-scroll-arrow {
  opacity: 0;
  transition: opacity 0.35s ease;
}

body.index-state-hero .hero-splash-hint,
body.index-state-hero .hero-scroll-arrow {
  opacity: 1;
  transition: opacity 0.4s ease;
}

/* One-frame layout for measuring reverse flight target (no flash) */
body.index-measure-only .hero-splash-line--sub,
body.index-measure-only .hero-splash-line--accent {
  opacity: 0 !important;
  visibility: hidden !important;
  height: 0 !important;
  margin: 0 !important;
  overflow: hidden !important;
}

.hero-splash-line--sub {
  font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
  font-weight: 300;
  font-size: clamp(0.95rem, 2.1vw, 1.125rem);
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.88);
  max-width: 40ch;
}

.hero-splash-line--accent {
  font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
  font-weight: 500;
  font-size: clamp(1.125rem, 2.8vw, 1.5rem);
  letter-spacing: 0.04em;
  color: #ffe870;
}

.hero-splash-hint {
  position: absolute;
  bottom: clamp(1.25rem, 4vw, 2.5rem);
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  margin: 0;
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
  pointer-events: none;
}

.hero-scroll-arrow {
  position: absolute;
  left: 50%;
  bottom: clamp(1.25rem, 4vw, 2.5rem);
  transform: translateX(-50%);
  z-index: 2;
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: heroScrollArrowFloat 1.9s ease-in-out infinite;
  transition: opacity 0.4s ease, transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.hero-scroll-arrow:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.48);
  transform: translateX(-50%) translateY(-2px);
}

.hero-scroll-arrow-icon {
  font-size: 30px;
  line-height: 1;
}

@keyframes heroScrollArrowFloat {
  0%, 100% {
    transform: translateX(-50%) translateY(0);
  }
  50% {
    transform: translateX(-50%) translateY(6px);
  }
}

body[data-page="index"] .index-main {
  position: relative;
  z-index: 1;
  background: #f3eefb;
  overflow: hidden;
  transition: opacity 0.7s ease, transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Initial load: keep homepage content hidden under hero headings */
body.index-state-hero .index-main {
  opacity: 0;
  transform: translateY(34px);
  pointer-events: none;
}

/* On scroll: reveal full page content */
body.index-state-nav .index-main {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* Curtain opening effect for index content reveal */
body[data-page="index"] .index-main::before,
body[data-page="index"] .index-main::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 50%;
  background: #141b41;
  z-index: 3;
  pointer-events: none;
  transition: transform 0.9s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.45s ease;
}

body[data-page="index"] .index-main::before {
  left: 0;
  transform: translateX(0);
}

body[data-page="index"] .index-main::after {
  right: 0;
  transform: translateX(0);
}

body.index-state-nav .index-main::before {
  transform: translateX(-102%);
  opacity: 0;
}

body.index-state-nav .index-main::after {
  transform: translateX(102%);
  opacity: 0;
}

@media (prefers-reduced-motion: reduce) {
  body[data-page="index"] .index-main,
  body[data-page="index"] .index-main::before,
  body[data-page="index"] .index-main::after {
    transition: none;
  }
}

/* === INTRO SPLIT (above archive): scroll-driven --intro-reveal 0…1, resets off-screen === */
.intro-split-section {
  --intro-reveal: 0;
  background: #fff;
  border-top: 1px solid rgba(26, 16, 8, 0.06);
  position: relative;
  z-index: 2;
}

/* About page (and similar): two-column intro always visible, no scroll scrub */
.intro-split-section--static {
  --intro-reveal: 1;
}

body[data-page="author"] .intro-split-section.intro-split-section--static,
body[data-page="about"] .intro-split-section.intro-split-section--static {
  background: var(--nav-footer-bg);
  border-top: none;
}

body[data-page="author"] .intro-split-section.intro-split-section--static {
  padding-top: calc(1.25rem + 56px);
}

body[data-page="author"] .author-page-hero-banner {
  display: none;
}

@media (max-width: 700px) {
  body[data-page="author"] .author-page-hero-banner {
    display: block;
  }

  body[data-page="author"] .author-page-hero-banner.about-header.about-header--minimal {
    margin-top: 0;
    padding-top: calc(1.25rem + 56px);
    padding-bottom: 1.25rem;
  }

  body[data-page="author"] .author-page-hero-banner .about-title {
    color: #d4a968;
    margin-top: 0 !important;
  }

  body[data-page="author"] .intro-split-section.intro-split-section--static {
    padding-top: clamp(0.75rem, 2vw, 1.25rem);
  }
}

body[data-page="author"] .site-intro-panel,
body[data-page="about"] .site-intro-panel {
  position: relative;
  max-width: min(880px, calc(100vw - 2.5rem));
  margin-inline: auto;
  padding: clamp(2rem, 4.5vw, 3.2rem);
  border: 1px solid rgba(229, 193, 132, 0.18);
  border-radius: 28px;
  background:
    linear-gradient(110deg, rgba(6, 17, 38, 0.94), rgba(9, 20, 44, 0.98)),
    radial-gradient(circle at 0% 100%, rgba(48, 107, 172, 0.2), transparent 28%);
  box-shadow: 0 26px 80px rgba(0, 0, 0, 0.32), inset 0 0 0 1px rgba(255, 255, 255, 0.025);
  overflow: hidden;
}

body[data-page="author"] .site-intro-panel .intro-split-body--about,
body[data-page="about"] .site-intro-panel .intro-split-body--about {
  max-width: 850px;
  margin-inline: 0;
  padding-top: 0;
}

body[data-page="author"] .site-intro-panel .intro-split-text,
body[data-page="about"] .site-intro-panel .intro-split-text {
  color: rgba(247, 239, 228, 0.95);
}

body[data-page="author"] .site-intro-panel .intro-split-body--about > .contact-page-intro__divider--ornate:first-of-type,
body[data-page="about"] .site-intro-panel .intro-split-body--about > .contact-page-intro__divider--ornate:first-of-type {
  margin-top: 0;
  margin-bottom: clamp(1rem, 2.5vw, 1.5rem);
}

.intro-split-section--static .intro-split-frame {
  opacity: 1;
  transform: none;
}

.intro-split-section--static .intro-split-hline--top,
.intro-split-section--static .intro-split-hline--bottom {
  transform: scaleX(1);
  animation: none;
}

.intro-split-inner {
  overflow: visible;
}

.intro-split-frame {
  max-width: min(1120px, calc(100vw - 2.5rem));
  margin: 0 auto;
  padding: clamp(1.75rem, 4vw, 2.75rem) 0;
  opacity: var(--intro-reveal);
  transform: translateY(calc((1 - var(--intro-reveal)) * 32px));
  will-change: opacity, transform;
}

.intro-split-rule-block {
  position: relative;
  width: 100%;
}

.intro-split-hline {
  height: 0;
  border: none;
  border-top: 1.5px solid #1a1008;
  width: 100%;
  margin: 0;
  padding: 0;
}

@keyframes introSplitHlineGrow {
  from {
    transform: scaleX(0);
  }
  to {
    transform: scaleX(1);
  }
}

/* Horizontal rules: 1s auto grow from center when section enters view (not scroll-scrubbed) */
.intro-split-hline--top,
.intro-split-hline--bottom {
  transform-origin: 50% 50%;
  transform: scaleX(0);
}

.intro-split-section--hline-animate .intro-split-hline--top,
.intro-split-section--hline-animate .intro-split-hline--bottom {
  animation: introSplitHlineGrow 1s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.intro-split-hline--bottom {
  margin-top: clamp(1.75rem, 4vw, 2.75rem);
}

.intro-split-body {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: clamp(2rem, 5vw, 3rem);
  align-items: start;
  padding-top: clamp(1.25rem, 3vw, 2rem);
}

.intro-split-text--left {
  grid-column: 1;
  grid-row: 1;
}

.intro-split-text--right {
  grid-column: 2;
  grid-row: 1;
}

.intro-split-text {
  font-size: clamp(13px, 1.35vw, 15px);
  font-weight: 300;
  line-height: 1.75;
  color: #1a1008;
  margin: 0;
}
p.intro-split-text{
  font-size: 20px !important;
}
.intro-split-body--about {
  grid-template-columns: 1fr;
  max-width: min(880px, calc(100vw - 2.5rem));
  margin-inline: auto;
  row-gap: clamp(1rem, 2vw, 1.35rem);
}

.intro-split-body--about .intro-split-text {
  grid-column: 1;
}

/* Bottom rule aligns with centered about column when not full-bleed */
.intro-split-rule-block > .intro-split-body.intro-split-body--about ~ .intro-split-hline--bottom {
  max-width: min(880px, calc(100vw - 2.5rem));
  margin-left: auto;
  margin-right: auto;
}

.about-curator {
  grid-column: 1;
  margin-top: clamp(1.75rem, 4vw, 2.5rem);
  padding-top: clamp(1.5rem, 3vw, 2rem);
  border-top: 1.5px solid rgba(26, 16, 8, 0.12);
}

.about-curator-heading {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(1.35rem, 2.5vw, 1.65rem);
  font-weight: 500;
  color: #1a1008;
  margin: 0 0 1rem;
  line-height: 1.2;
}

.about-curator-text {
  margin-bottom: 0.85rem;
}

.about-curator-text:last-child {
  margin-bottom: 0;
}

@media (max-width: 720px) {
  .intro-split-body {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
    row-gap: clamp(1.25rem, 4vw, 1.75rem);
    padding-top: clamp(1rem, 3vw, 1.5rem);
  }

  .intro-split-text--left {
    grid-column: 1;
    grid-row: 1;
  }

  .intro-split-text--right {
    grid-column: 1;
    grid-row: 2;
  }
}

@media (prefers-reduced-motion: reduce) {
  .intro-split-section {
    --intro-reveal: 1;
  }

  .intro-split-frame {
    opacity: 1;
    transform: none;
  }

  .intro-split-hline--top,
  .intro-split-hline--bottom {
    transform: scaleX(1);
    animation: none;
  }

  .intro-split-section--hline-animate .intro-split-hline--top,
  .intro-split-section--hline-animate .intro-split-hline--bottom {
    animation: none;
  }
}

.hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-content {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
}

.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: 62% 38%;
  min-height: 560px;
  align-items: stretch;
}

.hero-copy-card {
  grid-column: 2;
  min-height: 560px;
  padding: 120px 44px 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 2;
  background: #fff;
}

.hero-photo-block {
  grid-column: 1;
  min-height: 560px;
  display: flex;
  align-items: stretch;
  justify-content: stretch;
}

.hero-photo-stack {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-height: 100%;
}

.hero-visual-frame {
  width: 100%;
  min-height: 560px;
  border-radius: 0;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.16), rgba(255,255,255,0.02)),
    radial-gradient(circle at 18% 18%, rgba(255,255,255,0.30) 0, rgba(255,255,255,0.30) 6px, transparent 7px),
    radial-gradient(circle at 26% 22%, rgba(244,157,33,0.42) 0, rgba(244,157,33,0.42) 3px, transparent 4px),
    radial-gradient(circle at 33% 28%, rgba(143,199,57,0.45) 0, rgba(143,199,57,0.45) 4px, transparent 5px),
    linear-gradient(135deg, #6d7d92 0%, #44556a 34%, #242e3d 100%);
  position: relative;
  overflow: hidden;
}

.hero-visual-frame::before,
.hero-visual-frame::after {
  content: "";
  position: absolute;
  border-radius: 26px;
  background: rgba(255,255,255,0.10);
  transform-origin: center;
}

.hero-visual-frame::before {
  width: 280px;
  height: 420px;
  left: 44px;
  bottom: -38px;
  transform: rotate(8deg);
}

.hero-visual-frame::after {
  width: 260px;
  height: 260px;
  right: 68px;
  top: 38px;
  transform: rotate(-8deg);
}

.eyebrow {
  font-weight: 200;
  font-size: 10px;
  letter-spacing: 0.44em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.72);
  margin-bottom: 1.2rem;
}

.hero-title {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 300;
  font-size: 56px;
  line-height: 1;
  color: #fff;
  margin-bottom: 0.6rem;
  text-shadow: 0 2px 40px rgba(0,0,0,0.30);
}

.hero-title-kicker,
.hero-title-main {
  display: block;
}

.hero-title-kicker {
  font-size: 0.42em;
  letter-spacing: 0.02em;
  margin-bottom: 0;
}

.hero-title-main {
  font-size: 1.24em;
  line-height: 0.94;
  letter-spacing: 0.01em;
  margin-bottom: 0;
}

.hero-title-note {
  display: block;
  font-family: 'Inter', 'Segoe UI', sans-serif;
  font-size: 24px;
  font-weight: 500;
  line-height: 1.14;
  letter-spacing: 0.01em;
  margin-top: 0;
}

.hero-title em {
  font-style: italic;
  color: #ffe870;
}

.hero-sub {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 19px;
  color: rgba(255,255,255,0.88);
  margin-bottom: 2.4rem;
  max-width: 480px;
  line-height: 1.55;
  text-shadow: 0 1px 12px rgba(0,0,0,0.28);
}

.cta-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 2rem;
}

.btn-white {
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  background: #fff;
  color: #1a1008;
  border: none;
  padding: 14px 36px;
  border-radius: 2px;
  transition: background 0.2s;
}
.btn-white:hover { background: #ffe870; }

.btn-ghost {
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  background: transparent;
  color: #fff;
  border: 2px solid rgba(255,255,255,0.7);
  padding: 14px 36px;
  border-radius: 2px;
  transition: all 0.2s;
}
.btn-ghost:hover { background: rgba(255,255,255,0.15); border-color: #fff; }

.hero-btn-secondary {
  color: #1a1008;
  border-color: rgba(26,16,8,0.22);
  background: rgba(255,255,255,0.42);
}

.hero-btn-secondary:hover {
  background: rgba(255,255,255,0.84);
  border-color: rgba(26,16,8,0.30);
}

/* === LEGEND SECTION === */
.legend-section {
  background: #ffffff;
  padding: 2.4rem 2rem 3.8rem;
  border-bottom: none;
  overflow: hidden;
}

.legend-section-header {
  text-align: center;
  margin-bottom: 1.5rem;
  padding: 0 1.25rem;
}

.legend-section-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(28px, 4.2vw, 52px);
  line-height: 1.05;
  font-weight: 400;
  color: #141b41;
  letter-spacing: 0.02em;
}

.legend-carousel-shell {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(0.35rem, 2vw, 0.85rem);
  width: min(100%, 1220px);
  margin: 0 auto;
}

.legend-carousel-arrow {
  flex: 0 0 auto;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 999px;
  border: 1px solid rgba(26, 16, 8, 0.14);
  background: rgba(255, 255, 255, 0.72);
  color: rgba(13, 21, 42, 0.45);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.legend-carousel-arrow:hover,
.legend-carousel-arrow:focus-visible {
  color: rgba(13, 21, 42, 0.75);
  border-color: rgba(212, 169, 104, 0.55);
  background: rgba(255, 253, 249, 0.95);
  outline: none;
}

.legend-carousel-toolbar {
  display: flex;
  justify-content: center;
  margin-top: 0.65rem;
}

.legend-carousel-pause {
  flex: 0 0 auto;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  border-radius: 999px;
  border: 1px solid rgba(26, 16, 8, 0.14);
  background: rgba(255, 255, 255, 0.72);
  color: rgba(13, 21, 42, 0.45);
  font-size: 0.95rem;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.legend-carousel-pause:hover,
.legend-carousel-pause:focus-visible {
  color: rgba(13, 21, 42, 0.75);
  border-color: rgba(212, 169, 104, 0.55);
  background: rgba(255, 253, 249, 0.95);
  outline: none;
}

.legend-carousel-pause.is-paused {
  color: rgba(212, 169, 104, 0.95);
}

.section-label {
  font-weight: 200;
  font-size: 10px;
  letter-spacing: 0.44em;
  text-transform: uppercase;
  color: rgba(26,16,8,0.38);
  text-align: center;
  margin-bottom: 2rem;
}

.legend-carousel {
  flex: 1 1 auto;
  width: min(100%, 1180px);
  margin: 0 auto;
  overflow: hidden;
  padding: 1rem 0;
  min-width: 0;
}

.legend-track {
  position: relative;
  width: 100%;
  min-height: 260px;
}

.legend-card {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  min-height: 260px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  padding: clamp(1.7rem, 4vw, 2.6rem) clamp(1.8rem, 5vw, 4rem);
  background:
    radial-gradient(ellipse at 92% 42%, rgba(212, 169, 104, 0.1), transparent 22%),
    linear-gradient(180deg, #fffdf9 0%, #f6f1e8 100%);
  border: 1.5px solid rgba(212, 169, 104, 0.55);
  border-radius: 22px;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  box-shadow: 0 18px 36px rgba(13, 21, 42, 0.16);
  transition: opacity 0.45s ease, transform 0.45s ease, box-shadow 0.45s ease, border-color 0.45s ease;
}

.legend-card::before {
  content: "";
  width: 18px;
  height: 18px;
  margin-bottom: 0.2rem;
  border-radius: 999px;
  background: #0d152a;
  box-shadow: 38px 8px 0 -8px rgba(212, 169, 104, 0.55);
}

.legend-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: url('./assets/quote-feather-bg.png') right -2% center / auto 118% no-repeat;
  opacity: 0.82;
  pointer-events: none;
  z-index: 0;
}

.legend-card-text,
.legend-card::before {
  position: relative;
  z-index: 1;
}

.legend-card-text::before {
  content: "“";
  position: absolute;
  left: 0;
  top: 0.08rem;
  color: rgba(212, 169, 104, 0.82);
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(56px, 7vw, 82px);
  line-height: 0.7;
  pointer-events: none;
}

.legend-card.active {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
  border-color: #d4a968;
  box-shadow: 0 24px 48px rgba(13, 21, 42, 0.2);
  z-index: 2;
}

.legend-card:hover {
  border-color: rgba(26,16,8,0.22);
}

.legend-card .orb {
  display: none;
}

.legend-card-text {
  max-width: 920px;
  padding-left: clamp(3rem, 7vw, 5rem);
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(19px, 2.4vw, 27px);
  font-style: italic;
  font-weight: 400;
  color: #151d36;
  line-height: 1.42;
  overflow: visible;
  display: block;
  -webkit-line-clamp: unset;
  line-clamp: unset;
}

.legend-card-quote {
  display: block;
}

.legend-card-author {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  margin-top: 1.35rem;
  color: #0D152AFA;
  font-style: normal;
  font-weight: 600;
  font-size: 0.9em;
}

.legend-card-author::before {
  content: "";
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  border-radius: 999px;
  border: 1.5px solid #d4a968;
  background: url('./assets/quote-feather-icon.png') center / cover no-repeat;
  box-shadow: 0 0 0 1px rgba(13, 21, 42, 0.18);
}

.legend-corpus-preview {
  max-width: 560px;
  margin: 2.2rem auto 0;
  display: grid;
  gap: 1.15rem;
  justify-items: center;
  text-align: center;
  color: #1a1008;
}

.legend-corpus-preview-image {
  position: relative;
  width: 300px;
  height: 190px;
}

.legend-corpus-preview-cover {
  position: absolute;
  width: 128px;
  height: 176px;
  border-radius: 20px;
  border: 2px solid rgba(26,16,8,0.14);
  background-size: cover;
  background-position: center;
  box-shadow: 0 22px 42px rgba(26,16,8,0.16);
  transition: transform 0.28s ease, box-shadow 0.28s ease;
}

.legend-corpus-preview-cover--main {
  left: 86px;
  top: 0;
  z-index: 3;
}

.legend-corpus-preview-cover--secondary {
  left: 6px;
  top: 12px;
  z-index: 1;
  transform: rotate(-10deg);
}

.legend-corpus-preview-cover--tertiary {
  right: 6px;
  top: 12px;
  z-index: 2;
  transform: rotate(10deg);
}

.legend-corpus-preview:hover .legend-corpus-preview-cover--main {
  transform: translateY(-4px);
}

.legend-corpus-preview:hover .legend-corpus-preview-cover--secondary {
  transform: rotate(-14deg) translate(-4px, -2px);
}

.legend-corpus-preview:hover .legend-corpus-preview-cover--tertiary {
  transform: rotate(14deg) translate(4px, -2px);
}

.legend-corpus-preview-label {
  font-size: 18px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #6c4f3c;
}

.reading-room-section {
  max-width: none;
  width: 100%;
  margin: 0 auto;
  padding: 3rem 0 0;
  background: #f8f7f4;
  border-top: 1px solid rgba(184, 164, 126, 0.45);
}

.reading-room-header {
  text-align: center;
  margin-bottom: 2rem;
  padding: 0 1.5rem;
}

.reading-room-kicker {
  display: none;
}

.reading-room-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(42px, 6vw, 76px);
  line-height: 0.95;
  font-weight: 400;
  color: #1a2a44;
}

.archive-visit-section {
  position: relative;
  overflow: hidden;
  min-height: min(75vw, 760px);
  padding: clamp(4rem, 10vw, 7rem) 1.5rem;
  display: grid;
  place-items: center;
  background:
    linear-gradient(180deg, rgba(20, 27, 65, 0.18), rgba(20, 27, 65, 0.5)),
    url('./assets/visit-corpus-background.png') center / cover no-repeat #0f1724;
}

.archive-visit-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.16), rgba(20, 27, 65, 0.42) 58%);
  pointer-events: none;
}

.archive-visit-inner {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
}

.reading-room-archive-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  padding: 1.2rem 2.2rem;
  border-radius: 999px;
  border: 1px solid rgba(20, 27, 65, 0.22);
  background: #141b41;
  color: #ffffff;
  box-shadow: 0 18px 42px rgba(20, 27, 65, 0.18);
  font-size: 13px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.reading-room-archive-btn:hover,
.reading-room-archive-btn:focus-visible {
  background: #306bac;
  box-shadow: 0 24px 54px rgba(20, 27, 65, 0.24);
  transform: translateY(-2px);
}

.reading-room-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  align-items: stretch;
}

.reading-room-cards {
  min-width: 0;
  width: 100%;
}

.reading-room-cards .medical-feature-section {
  background: transparent;
  padding: 0;
  width: 100%;
}

body[data-page="index"] .reading-room-carousel-shell {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(0.35rem, 2vw, 0.85rem);
  width: 100%;
  max-width: 1320px;
  margin-inline: auto;
}

body[data-page="index"] .reading-room-carousel-shell .medical-feature-grid {
  flex: 1 1 auto;
  min-width: 0;
}

@media (min-width: 701px) {
  body[data-page="index"] .reading-room-carousel-shell {
    display: block;
  }

  body[data-page="index"] .reading-room-cards .reading-room-carousel-shell > .legend-carousel-arrow {
    display: none !important;
  }
}

.reading-room-cards .medical-feature-grid {
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 clamp(1rem, 3.5vw, 2.5rem) 2.75rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1rem, 2vw, 1.35rem);
  align-items: stretch;
}

@media (min-width: 1024px) {
  .reading-room-cards .medical-feature-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (min-width: 701px) {
  .reading-room-cards .medical-feature-card {
    height: 100%;
  }
}

.reading-room-cards .medical-feature-card {
  aspect-ratio: auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
  width: 100%;
  align-self: stretch;
  border: none !important;
  outline: none;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 6px 28px rgba(26, 42, 68, 0.09);
  overflow: visible;
  transition: transform 0.32s ease, box-shadow 0.32s ease;
  transform-origin: center center;
}

.reading-room-cards .medical-feature-card:hover,
.reading-room-cards .medical-feature-card:focus-within,
.reading-room-cards .medical-feature-card.is-open {
  transform: translateY(-4px);
  z-index: 2;
  border: none !important;
  box-shadow: 0 14px 40px rgba(26, 42, 68, 0.14) !important;
}

.reading-room-cards .medical-feature-trigger {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  color: inherit;
}

/* Image band: top corners match card; icon overlaps image + body */
.reading-room-cards .medical-feature-visual {
  flex: 0 0 auto;
  position: relative;
  display: block;
  width: 100%;
  height: clamp(200px, 22vw, 260px);
  overflow: hidden;
  min-height: 0;
  aspect-ratio: auto;
  box-sizing: border-box;
  border: none;
  outline: none;
  box-shadow: none;
  border-radius: 12px 12px 0 0;
}

.reading-room-cards .medical-feature-icon {
  position: absolute;
  left: 1rem;
  bottom: -26px;
  z-index: 3;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #7b8368;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 18px rgba(26, 42, 68, 0.16);
  pointer-events: none;
}

.reading-room-cards .medical-feature-icon-svg {
  display: block;
  flex-shrink: 0;
}

.reading-room-cards .medical-feature-visual::after {
  content: none;
}

.reading-room-cards .medical-feature-photo {
  width: 100%;
  height: 100%;
  max-width: none;
  display: block;
  margin: 0;
  padding: 0;
  border: none;
  outline: none;
  box-shadow: none;
  object-fit: cover;
  object-position: center;
  transition: transform 0.5s ease;
}

.reading-room-cards .medical-feature-card:hover .medical-feature-photo,
.reading-room-cards .medical-feature-card:focus-within .medical-feature-photo,
.reading-room-cards .medical-feature-card.is-open .medical-feature-photo {
  transform: scale(1.04);
}

.reading-room-cards .medical-feature-summary {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  padding: 2.1rem 1.2rem 1.25rem;
  overflow: visible;
}

.reading-room-cards .medical-feature-kicker {
  display: none;
}

.reading-room-cards .medical-feature-title {
  flex-shrink: 0;
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(1.15rem, 1.35vw, 1.45rem);
  font-weight: 600;
  line-height: 1.2;
  display: block;
  padding: 0 0 0.65rem;
  margin: 0 0 0.75rem;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  color: #1a2a44;
  border-bottom: 1px solid #b8a47e;
}

.reading-room-cards .medical-feature-card--holland .medical-feature-title {
  font-size: clamp(0.58rem, 1.85vw, 0.92rem);
  line-height: 1.18;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  hyphens: auto;
  overflow-wrap: anywhere;
}

.medical-feature-modal-dialog--holland .medical-feature-modal-title {
  font-size: clamp(22px, 3.8vw, 46px);
  line-height: 1.05;
  letter-spacing: 0.02em;
  overflow-wrap: anywhere;
}

body[data-page="biography"] .about-title.about-title--plain {
  font-size: clamp(1.25rem, 4.2vw, 2.2rem);
  line-height: 1.12;
  overflow-wrap: anywhere;
}



body[data-page="biography"] .biography-main .welcome-holland-title {
  font-size: clamp(1.2rem, 3.8vw, 1.85rem);
  line-height: 1.12;
  overflow-wrap: anywhere;
}

.reading-room-cards .medical-feature-preview {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  overflow: visible;
  -webkit-overflow-scrolling: touch;
  font-family: 'Inter', 'Jost', system-ui, sans-serif !important;
  font-size: 0.9rem;
  font-weight: 400;
  line-height: 1.65;
  color: #4a5568;
  opacity: 1;
  transform: none;
  margin-bottom: 1.1rem;
}

.reading-room-cards .medical-feature-card:hover .medical-feature-preview,
.reading-room-cards .medical-feature-card:focus-within .medical-feature-preview,
.reading-room-cards .medical-feature-card.is-open .medical-feature-preview {
  max-height: none;
  opacity: 1;
  transform: none;
}

.reading-room-cards .medical-feature-cta {
  margin-top: auto;
  flex-shrink: 0;
  width: 100%;
  min-height: 46px;
  padding: 0.65rem 1rem;
  font-family: 'Inter', 'Jost', system-ui, sans-serif !important;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #b8a47e;
  background: transparent;
  border: 1px solid #b8a47e;
  border-radius: 4px;
  box-shadow: none;
  transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.reading-room-cards .medical-feature-cta::after {
  content: '\203A';
  margin-left: 0.4em;
  font-size: 1.05em;
  line-height: 1;
}

.reading-room-cards .medical-feature-card.is-open .medical-feature-cta {
  background: rgba(184, 164, 126, 0.12);
  color: #8a7a58;
  border-color: #a8936a;
}

.reading-room-cards .medical-feature-cta:hover,
.reading-room-cards .medical-feature-cta:focus-visible {
  background: rgba(184, 164, 126, 0.1);
  color: #9a865c;
  border-color: #a89470;
}

.reading-room-cards .medical-feature-cta:focus-visible {
  outline: 2px solid rgba(26, 42, 68, 0.35);
  outline-offset: 2px;
}

.reading-room-corpus {
  position: relative;
  min-height: 640px;
  border-radius: 30px;
  overflow: hidden;
  display: grid;
  place-items: center;
  padding: 2rem;
  background:
    radial-gradient(circle at 50% 20%, rgba(255,255,255,0.9), rgba(255,255,255,0) 34%),
    linear-gradient(180deg, #eef3ff 0%, #dfe9ff 100%);
  border: 1px solid rgba(20, 27, 65, 0.14);
  box-shadow: 0 24px 70px rgba(20, 27, 65, 0.12);
  overscroll-behavior: contain;
}

.reading-room-corpus-label {
  position: absolute;
  left: 50%;
  bottom: 2rem;
  z-index: 8;
  transform: translateX(-50%);
  padding: 0.9rem 1.35rem;
  border-radius: 999px;
  background: #141b41;
  color: #ffffff;
  font-size: 14px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  white-space: nowrap;
  box-shadow: 0 14px 36px rgba(20, 27, 65, 0.2);
}

.corpus-cover-flow {
  position: relative;
  width: min(360px, 100%);
  height: 520px;
  display: block;
  perspective: 1200px;
  touch-action: pan-y;
}

.reading-room-cover {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 190px;
  aspect-ratio: 0.73;
  border-radius: 18px;
  border: 2px solid rgba(20, 27, 65, 0.14);
  background: #fff center / cover no-repeat;
  box-shadow: 0 24px 56px rgba(20, 27, 65, 0.22);
  opacity: 0;
  transform: translate(-50%, -50%) translateY(0) scale(0.86);
  transition: transform 0.42s cubic-bezier(0.33, 1, 0.68, 1), opacity 0.42s ease, filter 0.42s ease;
  will-change: transform, opacity;
  color: #ffffff;
  cursor: pointer;
}

.reading-room-cover::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 44%;
  border-radius: 0 0 16px 16px;
  background: linear-gradient(180deg, rgba(20, 27, 65, 0), rgba(20, 27, 65, 0.76));
  opacity: 0;
  transition: opacity 0.25s ease;
}

.reading-room-cover-title {
  position: absolute;
  left: 0.85rem;
  right: 0.85rem;
  bottom: 0.8rem;
  z-index: 2;
  font-size: 13px;
  line-height: 1.18;
  text-align: center;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.42);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.reading-room-cover.is-active {
  z-index: 5;
  opacity: 1;
  transform: translate(-50%, -50%) translateY(0) scale(1.1);
  filter: saturate(1.05);
}

.reading-room-cover.is-prev {
  z-index: 4;
  opacity: 0.76;
  transform: translate(-50%, -50%) translateY(-128px) scale(0.92);
  filter: saturate(0.9);
}

.reading-room-cover.is-next {
  z-index: 4;
  opacity: 0.76;
  transform: translate(-50%, -50%) translateY(128px) scale(0.92);
  filter: saturate(0.9);
}

.reading-room-cover.is-far-prev {
  z-index: 3;
  opacity: 0.44;
  transform: translate(-50%, -50%) translateY(-228px) scale(0.74);
  filter: blur(0.4px) saturate(0.75);
}

.reading-room-cover.is-far-next {
  z-index: 3;
  opacity: 0.44;
  transform: translate(-50%, -50%) translateY(228px) scale(0.74);
  filter: blur(0.4px) saturate(0.75);
}

.reading-room-cover.is-hidden {
  z-index: 1;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -50%) translateY(0) scale(0.62);
}

.reading-room-cover:hover,
.reading-room-cover:focus-visible {
  opacity: 1;
  z-index: 10;
  filter: saturate(1.08);
}

.reading-room-cover:hover::after,
.reading-room-cover:focus-visible::after,
.reading-room-cover:hover .reading-room-cover-title,
.reading-room-cover:focus-visible .reading-room-cover-title {
  opacity: 1;
  transform: translateY(0);
}

.reading-room-cover.is-active:hover,
.reading-room-cover.is-active:focus-visible {
  transform: translate(-50%, -50%) translateY(-10px) scale(1.2);
}

.reading-room-cover.is-prev:hover,
.reading-room-cover.is-prev:focus-visible {
  transform: translate(-50%, -50%) translateY(-140px) scale(1.02);
}

.reading-room-cover.is-next:hover,
.reading-room-cover.is-next:focus-visible {
  transform: translate(-50%, -50%) translateY(140px) scale(1.02);
}

.reading-room-cover.is-far-prev:hover,
.reading-room-cover.is-far-prev:focus-visible {
  transform: translate(-50%, -50%) translateY(-240px) scale(0.84);
}

.reading-room-cover.is-far-next:hover,
.reading-room-cover.is-far-next:focus-visible {
  transform: translate(-50%, -50%) translateY(240px) scale(0.84);
}

.homepage-feature-layout {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1.5rem 3rem;
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(300px, 0.9fr);
  gap: 1.4rem;
  align-items: start;
}

.homepage-feature-main,
.homepage-feature-side {
  min-width: 0;
}

.homepage-feature-main .welcome-holland {
  max-width: none;
  margin: 0;
  padding: 0;
  grid-template-columns: minmax(210px, 0.62fr) minmax(0, 1fr);
  gap: 1.1rem;
}

.homepage-feature-main .welcome-holland-card {
  min-height: 100%;
  max-height: 620px;
  padding: 22px 24px;
  overflow: hidden;
}

.homepage-feature-main .welcome-holland-media {
  grid-template-rows: 1fr;
  gap: 0;
}

.homepage-feature-main .welcome-holland-image {
  height: 100%;
  min-height: 620px;
  object-fit: cover;
}

.homepage-feature-main .welcome-holland-image:last-child {
  display: none;
}

.homepage-feature-main .welcome-holland-kicker {
  margin-bottom: 10px;
}

.homepage-feature-main .welcome-holland-title {
  font-size: 34px;
  margin-bottom: 8px;
}

.homepage-feature-main .welcome-holland-author {
  margin-bottom: 14px;
}

.homepage-feature-main .welcome-holland-copy {
  overflow: hidden;
}

.homepage-feature-main .welcome-holland-copy p {
  font-size: 14px;
  line-height: 1.62;
  margin-bottom: 10px;
}

.homepage-feature-main .welcome-holland-copy p:nth-of-type(n + 7) {
  display: none;
}

.homepage-feature-side .medical-feature-section {
  background: transparent;
  padding: 0;
}

.homepage-feature-side .medical-feature-grid {
  max-width: none;
  margin: 0;
  grid-template-columns: 1fr;
  gap: 1.2rem;
}

.homepage-feature-side .medical-feature-card {
  border-radius: 24px;
}

.homepage-feature-side .medical-feature-visual {
  aspect-ratio: 2.2 / 1;
}

.homepage-feature-side .medical-feature-summary {
  padding: 1rem 1rem 1.05rem;
}

.homepage-feature-side .medical-feature-title {
  font-size: clamp(27px, 2.5vw, 38px);
}

.homepage-feature-side .medical-feature-preview {
  font-size: 14px;
  line-height: 1.55;
}

.homepage-feature-side .medical-feature-cta {
  min-height: 46px;
  padding: 0.75rem 1rem;
  font-size: 13px;
}

.orbs-row {
  margin: 0 auto;
}

.orb {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 3px solid rgba(0,0,0,0.08);
  transition: transform 0.22s, box-shadow 0.22s;
}
.legend-card:hover .orb {
  transform: scale(1.12);
  box-shadow: 0 8px 28px rgba(0,0,0,0.20);
}

/* === WELCOME TO HOLLAND FEATURE === */
.welcome-holland {
  max-width: 1180px;
  margin: 0 auto;
  padding: 3.5rem 2rem 4rem;
  display: grid;
  grid-template-columns: minmax(280px, 420px) minmax(0, 1fr);
  gap: 2rem;
  align-items: stretch;
}

.welcome-holland-media {
  display: grid;
  grid-template-rows: auto auto;
  gap: 1rem;
}

.welcome-holland-image {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 18px;
  border: 2px solid rgba(26,16,8,0.2);
  box-shadow: 0 20px 48px rgba(26,16,8,0.18);
}

.welcome-holland-image:last-child {
  background: transparent;
}

.welcome-holland-card {
  background: linear-gradient(180deg, #fff 0%, #f7f1e8 100%);
  border: 1.5px solid rgba(26,16,8,0.16);
  border-radius: 24px;
  padding: 28px 30px;
  box-shadow: 0 18px 42px rgba(26,16,8,0.08);
  height: 100%;
  display: flex;
  flex-direction: column;
}

.welcome-holland-kicker {
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #8a7055;
  margin-bottom: 14px;
}

.welcome-holland-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 42px;
  line-height: 0.95;
  font-weight: 500;
  color: #1a1008;
  margin-bottom: 10px;
}

.welcome-holland-author {
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #6c4f3c;
  margin-bottom: 20px;
}

.welcome-holland-copy p {
  font-size: 15px;
  line-height: 1.75;
  color: #2e2219;
  margin-bottom: 14px;
}

.welcome-holland-copy {
  flex: 1;
  overflow: visible;
}

.welcome-holland-reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s ease, transform 0.7s ease;
  will-change: opacity, transform;
}

.welcome-holland-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .welcome-holland-reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

.welcome-holland-copy--en {
  display: none;
}

html[lang="en"] .welcome-holland-copy--mk {
  display: none;
}

html[lang="en"] .welcome-holland-copy--en {
  display: block;
}

/* === ARCHIVE SECTION === */
.archive-section {
  background: #f5f0e8;
  padding: 3.5rem 2rem 4rem;
}

.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  max-width: 960px;
  margin: 0 auto 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid #1a1008;
}

.section-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 32px;
  font-weight: 300;
  color: #1a1008;
}

.section-count {
  font-size: 10px;
  font-weight: 200;
  letter-spacing: 0.28em;
  color: #8a7055;
}

/* === FILTER BAR === */
.filter-row {
  max-width: 960px;
  margin: 0 auto 2rem;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.fbtn {
  font-size: 10px;
  font-weight: 300;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  background: transparent;
  color: #5a4030;
  border: 1.5px solid rgba(26,16,8,0.25);
  padding: 8px 20px;
  border-radius: 2px;
  transition: all 0.18s;
}
.fbtn.active,
.fbtn:hover {
  background: #1a1008;
  color: #fff;
  border-color: #1a1008;
}

.add-book-wrap {
  max-width: 960px;
  margin: 0 auto 1.8rem;
}

.add-book-toolbar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.add-book-form {
  margin-top: 12px;
  padding: 14px;
  border: 1.5px solid rgba(26,16,8,0.18);
  background: #fff;
  border-radius: 4px;
}

.add-book-form.hidden {
  display: none;
}

.add-book-note {
  font-size: 11px;
  color: #8a7055;
  margin-bottom: 12px;
}

.add-book-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 12px;
  margin-bottom: 10px;
}

.add-book-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.add-book-form label span {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #5a4030;
}

.add-book-form input,
.add-book-form select,
.add-book-form textarea {
  border: 1px solid rgba(26,16,8,0.25);
  border-radius: 2px;
  padding: 8px 10px;
  font-size: 13px;
  font-family: 'Jost', sans-serif;
  color: #1a1008;
}

.add-book-form textarea {
  resize: none;
}

.add-book-form .full {
  margin-bottom: 12px;
}

.add-book-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.add-book-danger {
  color: #1a1008;
  border-color: rgba(26,16,8,0.35);
}

.book-card {
  position: relative;
}

.delete-card-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1px solid rgba(26,16,8,0.4);
  background: #fff;
  color: #1a1008;
  font-size: 14px;
  line-height: 1;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

.delete-mode .delete-card-btn {
  display: inline-flex;
}

.delete-mode .book-card .delete-card-btn {
  background: #1a1008;
  color: #fff;
  border-color: #1a1008;
  cursor: pointer;
}

/* === BOOK CARDS === */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 22px;
  max-width: 960px;
  margin: 0 auto;
}

.book-card {
  background: #fff;
  border: 2px solid #1a1008;
  border-radius: 4px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
}
.book-card:hover {
  transform: translateY(-4px);
  box-shadow: 6px 6px 0 #1a1008;
}

.new-card-highlight {
  animation: newCardPulse 1.2s ease;
}

@keyframes newCardPulse {
  0% { box-shadow: 0 0 0 0 rgba(255, 216, 64, 0.9); }
  70% { box-shadow: 0 0 0 14px rgba(255, 216, 64, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 216, 64, 0); }
}

.card-band { height: 8px; width: 100%; flex-shrink: 0; }

.card-cover {
  width: 100%;
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.card-cover img { width: 100%; height: 100%; object-fit: cover; }

.cover-placeholder {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 12px;
  color: rgba(26,16,8,0.32);
  text-align: center;
  padding: 1rem;
  line-height: 1.6;
}

.card-body {
  padding: 14px 16px 18px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 9px;
}

.tag {
  font-size: 9px;
  font-weight: 400;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 2px;
  border: 1px solid rgba(26,16,8,0.2);
  color: #5a4030;
}

.card-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 22px;
  font-weight: 400;
  color: #1a1008;
  line-height: 1.22;
  margin-bottom: 3px;
}

.card-author {
  font-size: 13px;
  font-weight: 200;
  color: #8a7055;
  margin-bottom: 10px;
  letter-spacing: 0.05em;
}

.card-desc {
  font-size: 14px;
  font-weight: 300;
  color: #5a4030;
  line-height: 1.65;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
}

.illness-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  margin-right: 5px;
  vertical-align: middle;
  flex-shrink: 0;
}

.card-footer {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(26,16,8,0.10);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-type-badge {
  font-size: 10px;
  font-weight: 300;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: #8a7055;
}

.card-read-btn {
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: #1a1008;
  color: #fff;
  border: none;
  padding: 6px 14px;
  border-radius: 2px;
  transition: background 0.18s;
}
.card-read-btn:hover { background: #3a2810; }

/* === MEDICAL FEATURE CARDS === */
.medical-feature-section {
  background: #1a1008;
  padding: 3.5rem 2rem 4rem;
}

.medical-feature-grid {
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.6rem;
  align-items: stretch;
}

.medical-feature-card {
  display: flex;
  flex-direction: column;
  border-radius: 30px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.12);
  background: linear-gradient(180deg, rgba(20,27,65,0.9) 0%, rgba(48,107,172,0.72) 100%);
  box-shadow: 0 24px 60px rgba(0,0,0,0.28);
  transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
}

.medical-feature-card:hover,
.medical-feature-card:focus-within,
.medical-feature-card.is-open {
  transform: scale(1.025);
  box-shadow: 0 30px 74px rgba(0,0,0,0.34);
  border-color: rgba(255,232,112,0.34);
}

.medical-feature-trigger {
  width: 100%;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  color: #fff;
  text-align: left;
}

.medical-feature-visual {
  position: relative;
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
}

.medical-feature-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(15, 10, 6, 0.05) 0%, rgba(15, 10, 6, 0.18) 45%, rgba(15, 10, 6, 0.72) 100%);
}

.medical-feature-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.55s ease;
}

.medical-feature-card:hover .medical-feature-photo,
.medical-feature-card:focus-within .medical-feature-photo,
.medical-feature-card.is-open .medical-feature-photo {
  transform: scale(1.07);
}

.medical-feature-summary {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.8rem;
  padding: 1.35rem 1.35rem 1.45rem;
}

.medical-feature-kicker {
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.62);
}

.medical-feature-title {
  display: inline-block;
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(38px, 4vw, 56px);
  line-height: 0.95;
  font-weight: 400;
  color: #fff;
  padding: 0.18em 0.32em 0.24em;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 18px;
  background: rgba(20, 27, 65, 0.24);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.16);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.medical-feature-preview {
  font-size: 16px;
  line-height: 1.7;
  color: rgba(255,255,255,0.86);
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transform: translateY(10px);
  transition: max-height 0.35s ease, opacity 0.28s ease, transform 0.28s ease;
}

.medical-feature-card:hover .medical-feature-preview {
  max-height: 8rem;
  opacity: 1;
  transform: translateY(0);
}

.medical-feature-cta {
  margin-top: auto;
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  padding: 0.9rem 1.1rem;
  border-radius: 999px;
  border: 1px solid rgba(255,232,112,0.34);
  background: linear-gradient(135deg, rgba(255,232,112,0.2), rgba(255,166,77,0.22));
  color: #fff6cb;
  font-size: 14px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.medical-feature-card.is-open .medical-feature-cta {
  background: #ffe870;
  color: #1a1008;
}

.medical-text-panel {
  display: none;
}

.medical-text-panel p {
  margin: 0;
}

.medical-feature-modal-open {
  overflow: hidden;
}

.medical-feature-modal {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: grid;
  place-items: center;
  padding: clamp(1rem, 3vw, 2rem);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.24s ease, visibility 0.24s ease;
}

.medical-feature-modal[aria-hidden="false"] {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.medical-feature-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(9, 8, 7, 0.58);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.medical-feature-modal-dialog {
  position: relative;
  z-index: 1;
  width: min(980px, calc(100vw - 2rem));
  max-height: calc(100vh - 2rem);
  overflow: auto;
  scrollbar-color: rgba(214, 185, 150, 0.72) rgba(255, 255, 255, 0.08);
  scrollbar-width: thin;
  border-radius: 30px;
  border: 1px solid rgba(214, 185, 150, 0.26);
  background:
    radial-gradient(circle at 12% 0%, rgba(214, 185, 150, 0.08), transparent 30%),
    linear-gradient(180deg, rgba(32, 28, 24, 0.98) 0%, rgba(24, 21, 18, 0.99) 100%);
  box-shadow: 0 34px 100px rgba(0,0,0,0.56);
}

.medical-feature-modal-dialog::-webkit-scrollbar {
  width: 12px;
}

.medical-feature-modal-dialog::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
}

.medical-feature-modal-dialog::-webkit-scrollbar-thumb {
  background: rgba(214, 185, 150, 0.72);
  border: 3px solid rgba(24, 21, 18, 0.99);
  border-radius: 999px;
}

.medical-feature-modal-content {
  padding: clamp(3.2rem, 6vw, 5rem) clamp(2rem, 7vw, 4.6rem) clamp(3rem, 6vw, 4.5rem);
}

.medical-feature-modal-close {
  position: sticky;
  top: 1.35rem;
  margin: 1.35rem 1.35rem -4.35rem auto;
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  border: 1px solid rgba(214, 185, 150, 0.24);
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  color: #fff;
  font-size: 36px;
  line-height: 1;
  z-index: 2;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.medical-feature-modal-close:hover,
.medical-feature-modal-close:focus-visible {
  background: rgba(214, 185, 150, 0.14);
  border-color: rgba(214, 185, 150, 0.44);
  transform: scale(1.03);
}

.medical-feature-modal-kicker {
  position: relative;
  display: inline-block;
  margin: 0 0 1.25rem;
  padding-bottom: 0.85rem;
  font-size: 14px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: #d6b996;
}

.medical-feature-modal-kicker::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 58px;
  height: 2px;
  background: #d6b996;
}

.medical-feature-modal-title {
  margin: 0 0 1.7rem;
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(52px, 8vw, 86px);
  line-height: 0.98;
  font-weight: 400;
  color: #f8f3ed;
}

.medical-feature-modal-body {
  display: grid;
  gap: 1.35rem;
  max-width: 780px;
  color: rgba(248, 243, 237, 0.92);
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(20px, 2.35vw, 27px);
  line-height: 1.55;
}

.medical-feature-modal-body p {
  margin: 0;
}

.medical-feature-modal-body strong {
  display: inline-block;
  margin-bottom: 0.3rem;
  color: #ffffff;
  font-size: 0.95em;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.biography-modal-copy {
  display: grid;
  gap: 1rem;
}

.biography-modal-copy--en {
  display: none;
}

html[lang="en"] .biography-modal-copy--mk {
  display: none;
}

html[lang="en"] .biography-modal-copy--en {
  display: grid;
}

.btn-yellow {
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  background: #ffe870;
  color: #1a1008;
  border: none;
  padding: 14px 36px;
  border-radius: 2px;
  transition: background 0.2s;
}
.btn-yellow:hover { background: #ffd740; }

/* === QUOTE FOOTER === */
.quote-footer {
  background: #1a1008;
  padding: 4rem 2rem;
  text-align: center;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.quote-text {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-weight: 300;
  font-size: 24px;
  color: #ffe870;
  max-width: 600px;
  margin: 0 auto 1rem;
  line-height: 1.55;
}

.quote-attr {
  font-size: 10px;
  font-weight: 200;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.30);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* === CORPUS PAGE === */
.corpus-page {
  background: #111933 url('./assets/corpus-page-background.png') center / cover fixed no-repeat;
  zoom: 100%;
}

.corpus-main {
  max-width: 1320px;
  margin: 0 auto;
  padding: 1.5rem 3rem 4rem;
}

.corpus-header {
  margin-bottom: 1.2rem;
}

.corpus-title {
  font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #0b7fbe;
}

.corpus-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 0.8rem 0 1.35rem;
  margin-bottom: 0.65rem;
  border-bottom: 1px solid rgba(26,16,8,0.12);
}

.corpus-control-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.corpus-control-search {
  flex: 1;
  min-width: 220px;
}

.corpus-search-input {
  width: 100%;
  border: 1px solid rgba(26,16,8,0.28);
  border-radius: 14px;
  background: #fff;
  color: #1a1008;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.02em;
  padding: 11px 14px;
}

.corpus-search-input::placeholder {
  color: #8a7b70;
}

.corpus-select {
  min-width: 210px;
  border: 1px solid rgba(26,16,8,0.28);
  border-radius: 14px;
  background: #fff;
  color: #1a1008;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 11px 14px;
}

.corpus-select--small {
  min-width: 150px;
}

.corpus-count {
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.06em;
  color: #4c4036;
  white-space: nowrap;
}

.corpus-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 2rem 1.55rem;
}

.corpus-card {
  min-width: 0;
  cursor: pointer;
  background: #fff;
  border-radius: 14px;
  padding: 1rem 1rem 1.2rem;
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 10px 32px rgba(15, 15, 20, 0.06);
  transition: box-shadow 0.22s ease, transform 0.22s ease;
}

.corpus-card:hover {
  box-shadow: 0 18px 48px rgba(15, 15, 20, 0.1);
  transform: translateY(-3px);
}

.corpus-cover {
  position: relative;
  width: 100%;
  aspect-ratio: 0.73;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 10px;
  box-shadow: 0 8px 22px rgba(18, 12, 8, 0.07);
  margin-bottom: 0.85rem;
  overflow: hidden;
}

.corpus-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.corpus-card-type {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: #0b7fbe;
  margin-bottom: 0.35rem;
}

.corpus-card-title {
  font-size: 27px;
  font-weight: 500;
  line-height: 1.25;
  color: #1a1008;
  margin-bottom: 0.3rem;
}

.corpus-card-author {
  font-size: 15px;
  font-weight: 300;
  color: #5d5045;
}

.corpus-cobiss-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--link-cobiss);
  transition: color 0.2s ease, opacity 0.2s ease, transform 0.2s ease;
}

.corpus-cobiss-link:hover,
.corpus-cobiss-link:focus-visible {
  color: var(--link-cobiss-hover);
  opacity: 1;
  transform: translateY(-1px);
}

.corpus-cobiss-link--modal {
  width: auto;
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 0;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.corpus-cobiss-link[hidden] {
  display: none;
}

.corpus-modal-open {
  overflow: hidden;
}

.corpus-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: none;
}

.corpus-modal[aria-hidden="false"] {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.corpus-to-top {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(20, 27, 65, 0.35);
  border-radius: 999px;
  background: #ffffff;
  color: #141b41;
  font-size: 20px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(20, 27, 65, 0.18);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease, background 0.2s ease;
  z-index: 450;
}

.corpus-to-top:hover {
  background: #98b9f2;
}

.corpus-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

.corpus-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 8, 8, 0.74);
}

.corpus-modal-panel {
  position: relative;
  z-index: 1;
  width: min(1120px, calc(100vw - 2rem));
  max-height: calc(100vh - 2rem);
  margin: 0;
  flex-shrink: 1;
  background: #fff;
  border-radius: 12px;
  border: 1px solid rgba(212, 169, 104, 0.45);
  border-top: 4px solid #d4a968;
  box-shadow: 0 32px 90px rgba(0, 0, 0, 0.28);
  overflow-x: hidden;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  padding: 0;
}

.corpus-modal-topbar {
  display: none;
}

.corpus-modal-bottom-action {
  position: absolute;
  left: 1rem;
  bottom: 1rem;
  z-index: 3;
}

.corpus-modal-back {
  border: 1px solid rgba(212, 169, 104, 0.58);
  background: #fff;
  border-radius: 999px;
  color: #8a622c;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 7px 14px;
  cursor: pointer;
}

.corpus-modal-back:hover {
  border-color: #d4a968;
  background: #fff8eb;
}

.corpus-modal-layout {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  gap: 0;
  align-items: stretch;
}

.corpus-modal-cover-wrap {
  position: relative;
  background:
    radial-gradient(circle at 50% 18%, rgba(212, 169, 104, 0.2), transparent 42%),
    #fff;
  min-height: 520px;
  display: flex;
  flex-direction: column;
  padding: 0 0 1.5rem;
}

.corpus-modal-carousel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 0.5rem 1rem 0;
  flex-shrink: 0;
}

.corpus-modal-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid rgba(212, 169, 104, 0.45);
  background: #fff8eb;
  color: #8a622c;
  cursor: pointer;
  border-radius: 6px;
  transition: color 0.15s ease, background 0.15s ease;
}

.corpus-modal-arrow:hover {
  color: #1a1008;
  background: #d4a968;
}

.corpus-modal-arrow:disabled {
  opacity: 0.35;
  cursor: default;
  pointer-events: none;
}

.corpus-modal-arrow-icon {
  display: block;
}

.corpus-modal-carousel {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 360px;
  padding: 0.35rem 0 0;
}

.corpus-modal-carousel-viewport {
  flex: 1;
  width: 100%;
  min-height: 320px;
  overflow: hidden;
  position: relative;
}

.corpus-modal-carousel-track {
  display: flex;
  flex-direction: row;
  width: 300%;
  height: 100%;
  transform: translateX(-33.333333%);
  transition: transform 0.52s cubic-bezier(0.33, 1, 0.68, 1);
  will-change: transform;
}

.corpus-modal-carousel-track--instant {
  transition: none !important;
}

.corpus-modal-slide {
  flex: 0 0 33.333333%;
  max-width: 33.333333%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  padding: 0.25rem 0.5rem;
}

.corpus-modal-slide-inner {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.corpus-modal-cover {
  aspect-ratio: 0.73;
  border-radius: 10px;
  border: 2px solid rgba(212, 169, 104, 0.48);
  background: #f0f0f0 center / cover no-repeat;
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.12), 0 0 0 8px rgba(212, 169, 104, 0.08);
}

.corpus-modal-cover--slide {
  width: min(280px, 82%);
  max-width: 100%;
}

.corpus-modal-meta {
  background: linear-gradient(180deg, #f7f1e7 0%, #f2f2f2 100%);
  padding: 2rem 2.25rem 2.25rem;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 0;
  min-height: 0;
  opacity: 1;
  transition: opacity 0.42s ease;
}

.corpus-modal-meta.corpus-modal-meta--text-hide {
  opacity: 0;
  pointer-events: none;
}

.corpus-modal-row {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.4rem;
  padding: 1rem 0;
  border-bottom: 1px solid rgba(212, 169, 104, 0.24);
}

.corpus-modal-row:first-child {
  padding-top: 0.25rem;
}

.corpus-modal-row:last-child {
  border-bottom: none;
}

.corpus-modal-row--description {
  flex: 0 0 auto;
  min-height: 0;
}

.corpus-modal-label {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #a87835;
  margin: 0;
}

.corpus-modal-value {
  font-size: 17px;
  line-height: 1.4;
  font-weight: 400;
  color: #1a1a1a;
  margin: 0;
}

.corpus-modal-value--title {
  font-size: clamp(1.45rem, 2.8vw, 1.85rem);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: #8a622c;
}

.corpus-modal-value--description {
  font-size: 15px;
  line-height: 1.55;
  font-weight: 400;
  color: #555;
  white-space: pre-line;
}

.corpus-modal-value--description.corpus-modal-value--description-expanded {
  text-align: justify;
  hyphens: auto;
  -webkit-hyphens: auto;
}

.corpus-read-more-btn {
  align-self: flex-start;
  margin-top: 0.45rem;
  border: none;
  border-radius: 0;
  background: transparent;
  color: var(--link-corpus-readmore);
  font-size: 14px;
  letter-spacing: 0.02em;
  text-transform: none;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.2s ease, opacity 0.2s ease;
}

.corpus-read-more-btn:hover,
.corpus-read-more-btn:focus-visible {
  background: transparent;
  color: var(--link-corpus-readmore-hover);
  transform: none;
}

.corpus-read-more-btn[hidden] {
  display: none;
}

/* === PAGE FOOTER === */
.site-footer {
  background: var(--nav-footer-bg);
  padding: 2rem 3rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  border-top: 1px solid rgba(255,255,255,0.06);
  flex-shrink: 0;
}

/* Pin footer to the bottom on short pages; extra space stays above */
body > .site-footer {
  margin-top: auto;
}

.footer-logo {
  font-family: 'Cormorant Garamond', serif;
  font-size: 15px;
  font-weight: 300;
  color: rgba(255,255,255,0.45);
}

.footer-copy {
  font-size: 10px;
  font-weight: 200;
  letter-spacing: 0.14em;
  color: rgba(255,255,255,0.22);
}

.footer-left {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.footer-contact-info {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.35rem;
  font-style: normal;
}

/* Match adjacent footer typography; base color follows `.site-footer .footer-contact-info a` */
.footer-contact-info a {
  font-size: 12px;
  letter-spacing: 0.06em;
  text-decoration: none;
  transition: color 0.15s ease;
}

.site-footer .footer-contact-info a:hover,
.site-footer .footer-contact-info a:focus-visible {
  color: rgba(255, 255, 255, 0.92);
}

/* === STORY PAGE === */
.story-hero {
  background: #f5f0e8;
  padding: 3rem 2rem 2.5rem;
  border-bottom: 2px solid #1a1008;
}

.story-hero-inner {
  max-width: 860px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 3rem;
  align-items: start;
}

.story-cover {
  width: 200px;
  min-height: 280px;
  border: 2px solid #1a1008;
  border-radius: 4px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
}

.story-cover img { width: 100%; height: 100%; object-fit: cover; }

.story-cover-ph {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 13px;
  color: rgba(26,16,8,0.28);
  text-align: center;
  padding: 1.5rem;
  line-height: 1.6;
}

.story-meta { display: flex; flex-direction: column; gap: 0.8rem; }

.story-colour-bar {
  height: 6px;
  width: 80px;
  border-radius: 3px;
  margin-bottom: 0.4rem;
}

.story-tags { display: flex; gap: 6px; flex-wrap: wrap; }

.story-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 42px;
  font-weight: 300;
  line-height: 1.08;
  color: #1a1008;
}

.story-author-line {
  font-size: 14px;
  font-weight: 200;
  color: #8a7055;
  letter-spacing: 0.06em;
}

.story-illness-line {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 300;
  color: #5a4030;
}

.story-body {
  max-width: 860px;
  margin: 0 auto;
  padding: 3rem 2rem 4rem;
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 3rem;
  align-items: start;
}

.story-description {
  font-family: 'Cormorant Garamond', serif;
  font-size: 20px;
  font-weight: 300;
  color: #2a1c0a;
  line-height: 1.65;
  margin-bottom: 2rem;
}

.story-section-label {
  font-size: 10px;
  font-weight: 300;
  letter-spacing: 0.36em;
  text-transform: uppercase;
  color: rgba(26,16,8,0.38);
  margin-bottom: 0.8rem;
}

.story-curator-note {
  font-size: 14px;
  font-weight: 300;
  color: #5a4030;
  line-height: 1.72;
  border-left: 3px solid #ffe870;
  padding-left: 1.2rem;
  background: #fffde8;
  padding: 1.2rem 1.4rem;
  border-radius: 0 4px 4px 0;
  margin-bottom: 2.5rem;
}

.story-sidebar {
  position: sticky;
  top: 90px;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.sidebar-card {
  background: #f5f0e8;
  border: 1.5px solid rgba(26,16,8,0.15);
  border-radius: 4px;
  padding: 1.2rem;
}

.sidebar-card-label {
  font-size: 9px;
  font-weight: 300;
  letter-spacing: 0.36em;
  text-transform: uppercase;
  color: rgba(26,16,8,0.38);
  margin-bottom: 0.8rem;
}

.biblio-row {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-size: 12px;
  font-weight: 300;
  color: #5a4030;
  line-height: 1.6;
}

.biblio-key { font-weight: 400; color: #1a1008; }

.related-card {
  background: #fff;
  border: 1.5px solid rgba(26,16,8,0.12);
  border-radius: 4px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: all 0.18s;
}
.related-card:hover { border-color: #1a1008; }

.related-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }

.related-info { display: flex; flex-direction: column; }
.related-title { font-family: 'Cormorant Garamond', serif; font-size: 14px; color: #1a1008; }
.related-sub { font-size: 10px; font-weight: 200; color: #8a7055; }

/* === ABOUT PAGE === */
.about-header {
  background: #1a1008;
  padding: 4rem 2rem;
  text-align: center;
  zoom:75% !important;
}

.about-title {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 300;
  font-size: 52px;
  color: #fff;
  margin-bottom: 0.8rem;
  margin-top: 40px !important;
}

.about-title em { font-style: italic; color: #ffe870; }

.about-tagline {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 18px;
  color: rgba(255,255,255,0.55);
  max-width: 520px;
  margin: 0 auto;
  line-height: 1.55;
}

.about-header--minimal {
  padding: 2.75rem 1.5rem 2rem;
}

.about-title--plain {
  margin-bottom: 0;
}

.about-body {
  max-width: 740px;
  margin: 0 auto;
  padding: 4rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

.about-block-label {
  font-size: 10px;
  font-weight: 300;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: rgba(26,16,8,0.38);
  margin-bottom: 1rem;
  display: block;
}

.about-block-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 28px;
  font-weight: 300;
  color: #1a1008;
  margin-bottom: 1rem;
  line-height: 1.25;
}

.about-block-text {
  font-size: 15px;
  font-weight: 300;
  color: #4a3420;
  line-height: 1.78;
}

.about-separator {
  height: 2px;
  background: #1a1008;
  width: 100%;
}

.methodology-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.method-item {
  background: #f5f0e8;
  border: 1.5px solid rgba(26,16,8,0.12);
  border-radius: 4px;
  padding: 1.4rem;
}

.method-number {
  font-family: 'Cormorant Garamond', serif;
  font-size: 36px;
  font-weight: 300;
  color: rgba(26,16,8,0.12);
  margin-bottom: 0.4rem;
}

.method-title {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #1a1008;
  margin-bottom: 0.6rem;
}

.method-text {
  font-size: 12px;
  font-weight: 300;
  color: #5a4030;
  line-height: 1.68;
}

.ethics-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.ethics-item {
  border-left: 3px solid #ffe870;
  padding: 0.8rem 1.2rem;
  background: #fffde8;
  border-radius: 0 4px 4px 0;
}

.ethics-q {
  font-size: 13px;
  font-weight: 500;
  color: #1a1008;
  margin-bottom: 0.4rem;
}

.ethics-a {
  font-size: 12px;
  font-weight: 300;
  color: #5a4030;
  line-height: 1.65;
}

/* === RESPONSIVE === */
@media (max-width: 700px) {
  .nav { padding: 16px 20px; }
  .nav-links { gap: 12px; }
  .nav-public {
    align-items: flex-start;
    flex-wrap: wrap;
  }
  .nav-public .nav-links {
    flex-wrap: wrap;
  }
  .nav-public .lang-switch {
    margin-left: 0;
  }
  body[data-page="index"] .index-nav {
    padding: 11px 14px;
    gap: 12px;
  }
  body[data-page="index"] .index-nav .nav-links {
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 40px;
  }
  body[data-page="index"] .index-nav .nav-link {
    font-size: 12px;
    letter-spacing: 0.1em;
  }
  body[data-page="index"] .index-nav--compact .index-nav-center-cluster {
    max-width: min(calc(100vw - 180px), 22rem);
  }
  body[data-page="index"] .index-nav--compact .index-nav-center-title {
    font-size: 11px;
    letter-spacing: 0.1em;
  }
  body[data-page="index"] .index-nav-about-link {
    font-size: 10px;
  }
  body[data-page="corpus"] .index-nav,
  body[data-page="about"] .index-nav,
  body[data-page="contact"] .index-nav,
  body[data-page="author"] .index-nav {
    padding: 11px 14px;
    gap: 12px;
  }
  body[data-page="corpus"] .index-nav .nav-links,
  body[data-page="about"] .index-nav .nav-links,
  body[data-page="contact"] .index-nav .nav-links,
  body[data-page="author"] .index-nav .nav-links {
    gap: 40px;
  }
  body[data-page="corpus"] .index-nav-about-link,
  body[data-page="about"] .index-nav-about-link,
  body[data-page="contact"] .index-nav-about-link,
  body[data-page="author"] .index-nav-about-link {
    font-size: 11px;
  }
  .hero-splash-inner {
    padding: 2rem 1.25rem 3rem;
  }
  .hero-splash-hint {
    bottom: 1rem;
  }
  .hero-scroll-arrow {
    bottom: 1rem;
    width: 52px;
    height: 52px;
  }
  .hero-grid {
    grid-template-columns: 1fr;
    min-height: 0;
    gap: 20px;
  }
  .hero-copy-card {
    grid-column: 1;
    min-height: auto;
    padding: 34px 24px 28px;
    order: 2;
  }
  .hero-photo-block {
    grid-column: 1;
    min-height: 240px;
    order: 1;
  }
  .hero-visual-frame {
    min-height: 240px;
  }
  .hero-title { font-size: 34px; }
  .hero-title-kicker { font-size: 0.5em; }
  .hero-title-main { font-size: 1.3em; }
  .hero-title-note { font-size: 22px; }
  .hero-sub { font-size: 16px; }
  .legend-carousel {
    padding-top: 0.5rem;
  }
  .legend-track {
    min-height: 320px;
  }
  .legend-card {
    width: 100%;
    min-height: 320px;
    padding: 22px 20px;
    border-radius: 22px;
  }
  .legend-card-text {
    font-size: 14px;
    overflow: visible;
    display: block;
    -webkit-line-clamp: unset;
    line-clamp: unset;
  }
  .legend-corpus-preview {
    margin-top: 1.75rem;
  }
  .legend-corpus-preview-image {
    width: 240px;
    height: 154px;
  }
  .legend-corpus-preview-cover {
    width: 102px;
    height: 140px;
  }
  .homepage-feature-layout {
    grid-template-columns: 1fr;
    gap: 1.6rem;
    padding: 2.1rem 1rem 3rem;
  }
  .homepage-feature-main .welcome-holland {
    grid-template-columns: 1fr;
    gap: 1.2rem;
    padding: 0;
  }
  .homepage-feature-main .welcome-holland-card {
    max-height: none;
    padding: 20px 18px;
  }
  .homepage-feature-main .welcome-holland-media {
    grid-template-rows: none;
    max-width: 520px;
    margin: 0 auto;
  }
  .homepage-feature-main .welcome-holland-image {
    min-height: 0;
    height: auto;
  }
  .homepage-feature-main .welcome-holland-image:last-child {
    display: block;
  }
  .homepage-feature-main .welcome-holland-copy p:nth-of-type(n + 7) {
    display: block;
  }
  .homepage-feature-side .medical-feature-section {
    padding: 0;
  }
  .reading-room-section {
    padding: 2.4rem 0 0;
  }
  .reading-room-archive-btn {
    width: min(100%, 320px);
  }
  .reading-room-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }
  body[data-page="index"] .reading-room-carousel-shell {
    padding-inline: clamp(0.5rem, 3vw, 1rem);
    box-sizing: border-box;
    gap: clamp(0.35rem, 1.5vw, 0.55rem);
    max-width: 100%;
  }
  body[data-page="index"]
    .reading-room-cards
    .reading-room-carousel-shell
    > .legend-carousel-arrow.reading-room-carousel-arrow {
    position: relative;
    z-index: 2;
    flex-shrink: 0;
    box-shadow: 0 4px 14px rgba(26, 42, 68, 0.12);
  }
  .reading-room-cards .medical-feature-grid {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    grid-template-columns: unset;
    max-width: none;
    margin: 0;
    gap: 0;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    scroll-padding-inline: 0;
    padding-left: 0;
    padding-right: 0;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
  }

  .reading-room-cards .medical-feature-card {
    flex: 0 0 100%;
    width: 100%;
    min-width: 100%;
    max-width: 100%;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    box-sizing: border-box;
  }

  .reading-room-cards .medical-feature-card--carousel-clone {
    pointer-events: none;
    user-select: none;
  }

  .reading-room-cards .medical-feature-visual {
    height: clamp(200px, 52vw, 280px);
  }
  .reading-room-corpus {
    min-height: 520px;
    padding: 1.5rem 1rem;
  }
  .corpus-cover-flow {
    height: 410px;
  }
  .reading-room-cover {
    width: 150px;
  }
  .reading-room-cover.is-prev {
    transform: translate(-50%, -50%) translateY(-100px) scale(0.9);
  }
  .reading-room-cover.is-next {
    transform: translate(-50%, -50%) translateY(100px) scale(0.9);
  }
  .reading-room-cover.is-far-prev {
    transform: translate(-50%, -50%) translateY(-178px) scale(0.72);
  }
  .reading-room-cover.is-far-next {
    transform: translate(-50%, -50%) translateY(178px) scale(0.72);
  }
  body[data-page="biography"] .index-nav {
    padding: 11px 14px;
    gap: 12px;
  }
  body[data-page="biography"] .index-nav .nav-links,
  body[data-page="biography"] .index-nav-tabs-row {
    gap: 40px;
  }
  .welcome-holland {
    grid-template-columns: 1fr;
    gap: 1.2rem;
    padding: 2.6rem 1rem 3rem;
  }
  .welcome-holland-media {
    grid-template-rows: none;
    max-width: 520px;
    margin: 0 auto;
  }
  .welcome-holland-card {
    padding: 20px 18px;
    border-radius: 16px;
  }
  .welcome-holland-title {
    font-size: 34px;
  }
  body[data-page="biography"] .about-title.about-title--plain {
    font-size: clamp(1rem, 4.6vw, 1.7rem);
    line-height: 1.12;
  }
  body[data-page="biography"] .welcome-holland-title {
    font-size: clamp(1rem, 4vw, 1.5rem);
    line-height: 1.12;
  }
  .welcome-holland-copy p {
    font-size: 14px;
  }
  .medical-feature-section {
    padding: 2.6rem 1rem 3rem;
  }
  .medical-feature-grid {
    grid-template-columns: 1fr;
    gap: 1.2rem;
  }
  .medical-feature-card {
    border-radius: 22px;
  }
  .medical-feature-summary {
    padding: 1.15rem 1.1rem 1.2rem;
  }
  .medical-feature-title {
    font-size: 42px;
  }
  .medical-feature-preview,
  .medical-text-panel {
    font-size: 15px;
  }
  .medical-text-panel {
    padding: 0 1.1rem 1.2rem;
  }
  .medical-feature-modal {
    padding: 0.75rem;
  }
  .medical-feature-modal-dialog {
    width: calc(100vw - 1.5rem);
    max-height: calc(100vh - 1.5rem);
    border-radius: 20px;
  }
  .medical-feature-modal-content {
    padding: 3.5rem 1.2rem 1.5rem;
  }
  .medical-feature-modal-close {
    top: 0.6rem;
    width: 48px;
    height: 48px;
    margin: 0.6rem 0.6rem -3rem auto;
    font-size: 30px;
  }
  .medical-feature-modal-title {
    font-size: 42px;
  }
  .medical-feature-modal-dialog--holland .medical-feature-modal-title {
    font-size: clamp(17px, 4.4vw, 28px);
    line-height: 1.08;
  }
  .medical-feature-modal-body {
    font-size: 18px;
  }
  .add-book-grid { grid-template-columns: 1fr; }
  .story-hero-inner { grid-template-columns: 1fr; }
  .story-cover { width: 100%; min-height: 200px; }
  .story-body { grid-template-columns: 1fr; }
  .story-sidebar { position: static; }
  .corpus-main { padding: 1rem 1rem 3rem; }
  .corpus-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.4rem 0.9rem;
  }
  .corpus-card-title { font-size: 15px !important;  font-weight: bold;}
  .corpus-controls { align-items: flex-start; }
  .corpus-control-right {
    width: 100%;
    justify-content: space-between;
  }
  .corpus-control-search {
    width: 100%;
  }
  .corpus-select,
  .corpus-select--small,
  .corpus-search-input {
    min-width: 0;
    width: 100%;
  }
  .corpus-modal-panel {
    width: calc(100vw - 1rem);
    max-width: 100%;
    margin: 0;
    max-height: calc(100vh - 1rem - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
  }

  .corpus-modal-bottom-action {
    left: 0.75rem;
    bottom: 0.75rem;
  }
  .corpus-modal-layout {
    grid-template-columns: 1fr;
  }
  .corpus-modal-cover-wrap {
    min-height: 300px;
    padding-bottom: 1rem;
  }
  .corpus-modal-carousel {
    min-height: 240px;
    padding: 0.25rem 0 0;
  }
  .corpus-modal-carousel-viewport {
    min-height: 220px;
  }
  .corpus-modal-cover--slide {
    width: min(200px, 88%);
  }
  .corpus-modal-meta {
    padding: 1.25rem 1.1rem 1.5rem;
  }
  .corpus-modal-row {
    padding: 0.75rem 0;
  }
  .corpus-modal-row--description {
    flex: 0 0 auto;
    min-height: 0;
  }
  .corpus-modal-value {
    font-size: 16px;
  }
  .corpus-modal-value--title {
    font-size: 1.35rem;
  }
  .corpus-modal-value--description {
    font-size: 14px;
    line-height: 1.5;
  }
  .methodology-grid { grid-template-columns: 1fr; }
  .about-title { font-size: 36px; }
  .site-footer { flex-direction: column; text-align: center; }
  .footer-contact-info { align-items: center; }
}

/* === CONTACT PAGE (layout + form; navbar matches corpus/about) === */
body[data-page="contact"] {
  background: #f3f4f6;
  color: #111827;
}

body[data-page="contact"] .contact-page-main {
  font-family: 'Inter', 'Segoe UI', system-ui, sans-serif !important;
}

body[data-page="contact"] .contact-page-main input,
body[data-page="contact"] .contact-page-main textarea,
body[data-page="contact"] .contact-page-main button {
  font-family: 'Inter', 'Segoe UI', system-ui, sans-serif !important;
}

.contact-page-main {
  padding: calc(1.5rem + 72px) 1.5rem 3rem;
  min-height: 58vh;
}

.contact-page-inner {
  max-width: 1120px;
  margin: 0 auto;
}

.contact-page-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 3.5rem);
  align-items: start;
}

.contact-page-title {
  font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
  font-size: clamp(2rem, 4.5vw, 3.1rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.08;
  color: #0a0a0a;
  margin: 0;
}

.contact-page-lead {
  font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
  font-size: clamp(15px, 1.4vw, 17px);
  font-weight: 400;
  line-height: 1.65;
  color: #4b5563;
  margin: 1.25rem 0 0;
  max-width: 38ch;
}

.contact-page-highlight {
  margin-top: 2rem;
}

.contact-page-email,
.contact-page-phone {
  display: block;
  font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
  font-weight: 700;
  font-size: clamp(1.15rem, 2vw, 1.5rem);
  color: #0a0a0a;
  text-decoration: none;
  margin-top: 0.35rem;
}

.contact-page-email:first-of-type {
  margin-top: 0;
}

.contact-page-email:hover,
.contact-page-phone:hover {
  opacity: 0.55;
}

.contact-page-hours {
  font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
  font-size: 13px;
  color: #6b7280;
  margin: 0.65rem 0 0;
}

.contact-page-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  margin-top: 1.85rem;
  padding: 14px 22px 14px 26px;
  border-radius: 999px;
  background: #0a0a0a;
  color: #fff;
  text-decoration: none;
  font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.contact-page-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.22);
}

.contact-page-cta-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #fff;
  color: #0a0a0a;
  font-size: 1rem;
  line-height: 1;
}

.contact-page-social {
  margin: 1.5rem 0 0;
}

.contact-page-linkedin {
  font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: #0a0a0a;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.contact-page-linkedin:hover {
  opacity: 0.6;
}

.contact-page-success {
  font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.55;
  color: #166534;
  background: #ecfdf5;
  border: 1px solid #bbf7d0;
  border-radius: 14px;
  padding: 0.85rem 1rem;
  margin: 0 0 1rem;
}
body[data-page="contact"] .contact-page-intro__header::after {
  content: none !important;
  display: none !important;
}
.contact-page-form-card {
  background: #fff;
  border-radius: 28px;
  padding: clamp(1.5rem, 3.2vw, 2.35rem);
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.08);
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.contact-page-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact-page-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.contact-page-field {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.contact-page-field--full {
  width: 100%;
}

.contact-page-label {
  font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: #374151;
}

.contact-page-input,
.contact-page-textarea {
  font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
  font-size: 14px;
  color: #111827;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 12px 14px;
  background: #fafafa;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.contact-page-input:focus,
.contact-page-textarea:focus {
  outline: none;
  border-color: #0a0a0a;
  background: #fff;
}

.contact-page-textarea {
  resize: vertical;
  min-height: 140px;
}

.contact-page-form-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 0.5rem;
}

.contact-page-submit {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  border: none;
  border-radius: 999px;
  padding: 13px 22px 13px 26px;
  background: #0a0a0a;
  color: #fff;
  font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.contact-page-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.2);
}

.contact-page-submit-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #fff;
  color: #0a0a0a;
  font-size: 1rem;
  line-height: 1;
}

body[data-page="contact"] .contact-page-footer {
  background: transparent;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  margin-top: 2rem;
}

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

  .contact-page-form-actions {
    justify-content: stretch;
  }

  .contact-page-submit {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 700px) {
  .contact-page-form-row {
    grid-template-columns: 1fr;
  }

  .contact-page-main {
    padding: calc(1rem + 72px) 1rem 3rem;
  }
}

/* === GLOBAL BLUE PALETTE THEME OVERRIDE === */
:root {
  --palette-1: #141b41;
  --palette-2: #306bac;
  --palette-3: #6f9ceb;
  --palette-4: #98b9f2;
  --palette-5: #918ef4;

  --theme-bg: #ffffff;
  --theme-surface: #ffffff;
  --theme-surface-soft: #eef3ff;
  --theme-text: var(--palette-1);
  --theme-text-muted: #3f5f8f;
  --theme-accent: var(--palette-2);
  --theme-accent-strong: var(--palette-1);
  --theme-accent-soft: var(--palette-5);
  --theme-border: rgba(20, 27, 65, 0.2);
}

body {
  background: var(--theme-bg);
  color: var(--theme-text);
}

body[data-page="index"] {
  background: #f3eefb;
}

/* Editor toolbar only — public nav uses `.index-nav` tokens below */
.nav:not(.index-nav) {
  background: rgba(255, 255, 255, 0.94);
  border-bottom-color: var(--theme-border);
}

.nav-link,
.nav-logo,
.index-nav-center-title,
.footer-logo,
.about-title,
.section-title,
h1, h2, h3, h4 {
  color: var(--theme-text);
}

.site-footer,
.about-header,
.corpus-header {
  background: var(--nav-footer-bg);
}

.site-footer .footer-logo,
.site-footer .footer-copy,
.site-footer .footer-contact-info a,
.about-title,
.about-subtitle {
  color: #ffffff;
}

.btn-yellow,
.btn-white:hover,
.card-read-btn,
.contact-page-submit,
.contact-page-cta {
  background: var(--palette-2);
  border-color: var(--palette-2);
  color: #ffffff;
}

.btn-yellow:hover,
.card-read-btn:hover,
.contact-page-submit:hover,
.contact-page-cta:hover {
  background: var(--palette-1);
  border-color: var(--palette-1);
}

.lang-switch,
.book-card,
.legend-card,
.welcome-holland-card,
.medical-text-panel,
.related-card,
.contact-page-form {
  background: var(--theme-surface);
  border-color: var(--theme-border);
}

.medical-feature-card .medical-text-panel {
  background: transparent;
  border-color: transparent;
}

.section-label,
.welcome-holland-author,
.biblio-sub,
.corpus-modal-label,
.footer-copy {
  color: var(--theme-text-muted);
}

.hero-splash-scrim {
  background: linear-gradient(
    180deg,
    rgba(20, 27, 65, 0.35) 0%,
    rgba(20, 27, 65, 0.62) 58%,
    rgba(20, 27, 65, 0.78) 100%
  );
}

.hero-splash-line--accent,
.about-title em {
  color: #d4a968;
}

.legend-card:nth-child(5n + 1) .orb { background: var(--palette-1) !important; }
.legend-card:nth-child(5n + 2) .orb { background: var(--palette-2) !important; }
.legend-card:nth-child(5n + 3) .orb { background: var(--palette-3) !important; }
.legend-card:nth-child(5n + 4) .orb { background: var(--palette-4) !important; }
.legend-card:nth-child(5n + 5) .orb { background: var(--palette-5) !important; }

/* Corpus heading tweaks requested */
body[data-page="corpus"] .corpus-header {
  background: transparent;
  text-align: center;
}

body[data-page="corpus"] .corpus-title {
  text-align: center;
}

/* Corpus catalogue layout */
body[data-page="corpus"] {
  background-color: #111933;
  background-image: url('./assets/corpus-page-background.png');
  background-position: center;
  background-size: cover;
  background-attachment: fixed;
}

body[data-page="corpus"] .index-nav {
  background: var(--nav-footer-bg);
  border-bottom-color: rgba(255, 255, 255, 0.06);
  box-shadow: 0 10px 34px rgba(0, 0, 0, 0.18);
}

body[data-page="corpus"] .index-nav .nav-link,
body[data-page="corpus"] .index-nav-center-title,
body[data-page="corpus"] .index-nav-about-link {
  color: rgba(246, 238, 222, 0.92);
}

body[data-page="corpus"] .index-nav .lang-switch {
  border-color: rgba(246, 238, 222, 0.14);
  background: rgba(255, 255, 255, 0.04);
}

body[data-page="corpus"] .index-nav .lang-btn {
  color: rgba(246, 238, 222, 0.86);
}

body[data-page="corpus"] .index-nav .lang-btn.active {
  background: #e5c184;
  color: #1f1b16;
}

body[data-page="corpus"] .corpus-main {
  max-width: 1120px;
  padding: calc(1.8rem + 54px) 1.5rem 5rem;
}

body[data-page="corpus"] .corpus-header {
  display: none;
}

body[data-page="corpus"] .corpus-controls {
  display: grid;
  grid-template-columns: 145px minmax(300px, 1fr) auto;
  column-gap: 16px;
  row-gap: 12px;
  align-items: center;
  margin-bottom: 2rem;
  padding: 0;
  border-bottom: none;
}

body[data-page="corpus"] .corpus-control-right {
  display: grid;
  grid-template-columns: minmax(145px, 150px) auto;
  align-items: center;
  gap: 12px;
}

body[data-page="corpus"] .corpus-select,
body[data-page="corpus"] .corpus-search-input {
  min-height: 34px;
  border: 1px solid rgba(29, 23, 17, 0.12);
  border-radius: 12px;
  background: #f5efe3;
  color: #2a2118;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.12);
}

body[data-page="corpus"] .corpus-search-input {
  padding: 9px 16px;
}

body[data-page="corpus"] .corpus-select {
  width: 100%;
  padding: 8px 15px;
}

body[data-page="corpus"] .corpus-control-left .corpus-select {
  min-width: 0;
  width: 145px;
}

body[data-page="corpus"] .corpus-count {
  color: #d4a968;
  font-size: 12px;
}

body[data-page="corpus"] .corpus-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 2rem 1.1rem;
}

body[data-page="corpus"] .corpus-card {
  background: #f5efe3;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  padding: 14px 14px 22px;
  box-shadow: 0 22px 48px rgba(3, 7, 18, 0.22);
}

body[data-page="corpus"] .corpus-card:hover {
  box-shadow: 0 28px 62px rgba(3, 7, 18, 0.3);
}

body[data-page="corpus"] .corpus-cover {
  border: none;
  border-radius: 8px;
  margin-bottom: 1rem;
  box-shadow: none;
}

body[data-page="corpus"] .corpus-cover img {
  border-radius: 8px;
}

body[data-page="corpus"] .corpus-card-type {
  color: #a98a55;
  font-size: 12px;
  letter-spacing: 0.08em;
}

body[data-page="corpus"] .corpus-card-title {
  color: #1d1711;
  font-size: 24px;
  line-height: 1.22;
}

body[data-page="corpus"] .corpus-card-author {
  color: #5f5142;
  font-size: 14px;
}

@media (max-width: 900px) {
  body[data-page="corpus"] .corpus-controls {
    grid-template-columns: 1fr;
  }

  body[data-page="corpus"] .corpus-control-right {
    grid-template-columns: 1fr auto;
  }

  body[data-page="corpus"] .corpus-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Shared navbar: match the Corpus tab across the site */
body:not([data-page="index"]) .index-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 300;
  width: 100%;
  max-width: none;
  margin: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  justify-content: stretch;
  align-items: center;
  column-gap: 38px;
  padding: 12px 22px;
  padding-left: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: var(--nav-footer-bg);
  box-shadow: 0 10px 34px rgba(0, 0, 0, 0.18);
}

body:not([data-page="index"]) .index-nav-tabs-row {
  grid-column: 2;
  justify-self: center;
}

body:not([data-page="index"]) .index-nav-links-wrap {
  min-width: 0;
  display: flex;
  align-items: center;
  align-self: center;
  justify-content: flex-start;
}

body:not([data-page="index"]) .index-nav .nav-links {
  flex: 0 1 auto;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 40px;
  align-items: center;
}

body:not([data-page="index"]) .index-nav-center-cluster {
  grid-column: 1;
  justify-self: start;
  justify-content: flex-start;
  display: flex;
  align-items: center;
  min-width: 0;
  max-width: min(calc(100vw - 300px), 30rem);
  opacity: 1;
  visibility: visible;
}

body[data-page="index"] .index-nav,
body:not([data-page="index"]) .index-nav {
  background: var(--nav-footer-bg);
  border-bottom-color: rgba(255, 255, 255, 0.06);
}

body[data-page="index"] .index-nav .nav-link,
body[data-page="index"] .index-nav-about-link,
body:not([data-page="index"]) .index-nav .nav-link,
body:not([data-page="index"]) .index-nav-about-link {
  color: rgba(246, 238, 222, 0.92);
}

body[data-page="index"] .index-nav-center-title,
body:not([data-page="index"]) .index-nav-center-title {
  color: #d4a968;
}

body:not([data-page="index"]) .index-nav-center-title {
  text-align: left;
  padding-left: 0;
  padding-right: 4px;
}

body[data-page="index"] .index-nav .nav-link.active,
body:not([data-page="index"]) .index-nav .nav-link.active {
  padding-bottom: 0;
  border-bottom: none;
  box-shadow: none;
  position: relative;
}

body:not([data-page="index"]) .index-nav .lang-switch,
body[data-page="index"] .index-nav .lang-switch {
  position: absolute;
  top: 50%;
  right: 14px;
  transform: translateY(-50%);
  z-index: 2;
  margin-left: 0;
  flex-shrink: 0;
  border-color: rgba(246, 238, 222, 0.14);
  background: rgba(255, 255, 255, 0.04);
}

body:not([data-page="index"]) .index-nav .lang-btn,
body[data-page="index"] .index-nav .lang-btn {
  color: rgba(246, 238, 222, 0.86);
}

body:not([data-page="index"]) .index-nav .lang-btn.active,
body[data-page="index"] .index-nav .lang-btn.active {
  background: #e5c184;
  color: #1f1b16;
}

body[data-page="index"] .index-nav {
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  justify-content: stretch;
  width: 100%;
  align-items: center;
  column-gap: 38px;
  padding: 12px 22px;
  padding-left: 8px;
}

body[data-page="index"] .index-nav .nav-links {
  gap: 40px;
}

body[data-page="index"] .index-nav .nav-link {
  font-size: 12px;
  letter-spacing: 0.08em;
  line-height: 1.25;
}

body[data-page="index"] .index-nav--compact .index-nav-center-cluster {
  max-width: min(calc(100vw - 300px), 30rem);
}

body[data-page="index"] .index-nav-center-title {
  font-size: 12px;
  letter-spacing: 0.14em;
  line-height: 1.3;
}

body[data-page="index"] .index-nav-about-link {
  font-size: 11px;
  letter-spacing: 0.08em;
  line-height: 1.25;
}

body[data-page="story"] .index-nav + div {
  margin-top: 72px;
}

body[data-page="about"] .index-nav .nav-link.active {
  border-bottom: none;
  padding-bottom: 0;
  box-shadow: none;
}

body[data-page="about"] .index-nav .nav-link.active::after {
  content: none;
  display: none;
}

body[data-page="about"] .about-header.about-header--minimal {
  margin-top: 0;
  padding-top: calc(1.25rem + 56px);
  padding-bottom: 1.25rem;
}

/* Contact page: dark editorial card layout */
body[data-page="contact"] {
  background:
    radial-gradient(circle at 6% 82%, rgba(111, 156, 235, 0.16), transparent 28%),
    radial-gradient(circle at 84% 12%, rgba(212, 169, 104, 0.1), transparent 30%),
    #071329;
  color: #f7efe4;
}

body[data-page="contact"] .contact-page-main {
  min-height: calc(100vh - 70px);
  padding: calc(2rem + 72px) clamp(1rem, 3vw, 2rem) 2rem;
  font-family: var(--site-font) !important;
}

body[data-page="contact"] .contact-page-main input,
body[data-page="contact"] .contact-page-main textarea,
body[data-page="contact"] .contact-page-main button {
  font-family: var(--site-font) !important;
}

body[data-page="contact"] .contact-page-inner {
  position: relative;
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(2rem, 4.5vw, 3.2rem);
  border: 1px solid rgba(229, 193, 132, 0.18);
  border-radius: 28px;
  background:
    linear-gradient(110deg, rgba(6, 17, 38, 0.94), rgba(9, 20, 44, 0.98)),
    radial-gradient(circle at 0% 100%, rgba(48, 107, 172, 0.2), transparent 28%);
  box-shadow: 0 26px 80px rgba(0, 0, 0, 0.32), inset 0 0 0 1px rgba(255, 255, 255, 0.025);
  overflow: hidden;
}

body[data-page="contact"] .contact-page-inner::before {
  content: none;
}

body[data-page="contact"] .contact-page-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(280px, 0.95fr) minmax(360px, 1fr);
  gap: clamp(2rem, 7vw, 6rem);
  align-items: center;
}

body[data-page="contact"] .contact-page-intro {
  position: relative;
  padding-left: clamp(2rem, 5vw, 3.5rem);
  min-height: 0;
}

body[data-page="contact"] .contact-page-intro__vine {
  position: absolute;
  left: 0;
  top: 0.25rem;
  bottom: 0.5rem;
  width: 32px;
  pointer-events: none;
  opacity: 0.92;
}

body[data-page="contact"] .contact-page-intro__vine svg {
  display: block;
  width: 100%;
  height: 100%;
  max-height: 200px;
}

body[data-page="contact"] .contact-page-intro__header {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}

body[data-page="contact"] .contact-page-intro__header::after {
  content: "";
  position: absolute;
  pointer-events: none;
  left: -6px;
  top: 24%;
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: rgba(229, 193, 132, 0.45);
  box-shadow:
    62px 52px 0 0 rgba(229, 193, 132, 0.28),
    14px 118px 0 0 rgba(229, 193, 132, 0.22);
}

body[data-page="contact"] .contact-page-credentials-heading {
  margin: 0 0 0.55rem;
  width: 100%;
  font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  text-align: center;
  color: rgba(229, 193, 132, 0.92);
  line-height: 1.3;
}

body[data-page="contact"] .contact-page-intro__divider--ornate,
body[data-page="author"] .contact-page-intro__divider--ornate,
body[data-page="about"] .contact-page-intro__divider--ornate {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin: 0 auto 1.1rem;
  width: 100%;
  max-width: min(100%, 22rem);
}

body[data-page="contact"] .contact-page-intro__rule-line,
body[data-page="author"] .contact-page-intro__rule-line,
body[data-page="about"] .contact-page-intro__rule-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(229, 193, 132, 0.55) 12%,
    rgba(229, 193, 132, 0.85) 50%,
    rgba(229, 193, 132, 0.55) 88%,
    transparent
  );
}

body[data-page="contact"] .contact-page-intro__rule-diamond,
body[data-page="author"] .contact-page-intro__rule-diamond,
body[data-page="about"] .contact-page-intro__rule-diamond {
  flex: 0 0 auto;
  width: 6px;
  height: 6px;
  transform: rotate(45deg);
  background: #e5c184;
  box-shadow: 0 0 14px rgba(229, 193, 132, 0.65);
}

body[data-page="author"] .site-intro-panel > .contact-page-intro__divider--ornate:last-child,
body[data-page="about"] .site-intro-panel > .contact-page-intro__divider--ornate:last-child {
  margin-top: clamp(1.5rem, 3.5vw, 2.25rem);
  margin-bottom: 0;
}

body[data-page="contact"] .contact-page-intro__divider--short {
  width: clamp(5rem, 28vw, 7.5rem);
  height: 1px;
  margin: 0.55rem auto 0;
  background: linear-gradient(90deg, #e5c184, rgba(229, 193, 132, 0.35));
}

body[data-page="contact"] .contact-page-intro__title {
  margin: 0;
  max-width: 20ch;
  text-align: center;
  color: #fbf4ec;
  font-family: 'Cormorant Garamond', var(--site-font);
  font-size: clamp(2.15rem, 4.6vw, 3.15rem);
  font-weight: 300;
  letter-spacing: -0.02em;
  line-height: 1.05;
  text-shadow: 0 10px 28px rgba(0, 0, 0, 0.25);
}

body[data-page="contact"] .contact-page-info-cards {
  list-style: none;
  margin: 1.85rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  position: relative;
  z-index: 1;
}

body[data-page="contact"] .contact-info-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.95rem 1.1rem;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(4, 14, 34, 0.55);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

body[data-page="contact"] .contact-info-card__orb {
  flex-shrink: 0;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.35);
}

body[data-page="contact"] .contact-info-card__orb--email {
  background: linear-gradient(145deg, #d4a948, #9a7320);
}

body[data-page="contact"] .contact-info-card__orb--phone {
  background: linear-gradient(145deg, #34d399, #0d9268);
}

body[data-page="contact"] .contact-info-card__orb--linkedin {
  background: linear-gradient(145deg, #5b9cf5, #1e5bb8);
}

body[data-page="contact"] .contact-info-card__icon {
  font-size: 18px;
  line-height: 1;
}

body[data-page="contact"] .contact-info-card__linkedin-mark {
  font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
}

body[data-page="contact"] .contact-info-card__body {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
  text-align: left;
}

body[data-page="contact"] .contact-info-card__label {
  font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(247, 239, 228, 0.55);
}

body[data-page="contact"] .contact-info-card__value {
  font-family: var(--site-font);
  font-size: clamp(1rem, 1.65vw, 1.12rem);
  font-weight: 400;
  letter-spacing: 0.01em;
  text-decoration: none;
  transition: color 0.2s ease, opacity 0.2s ease;
  word-break: break-word;
}

body[data-page="contact"] .contact-info-card__value--email {
  color: #9ec9ff;
}

body[data-page="contact"] .contact-info-card__value--phone {
  color: #7dd3b0;
}

body[data-page="contact"] .contact-info-card__value--linkedin {
  color: #79b4f5;
}

body[data-page="contact"] .contact-info-card__value--email:hover,
body[data-page="contact"] .contact-info-card__value--email:focus-visible {
  color: #cfe4ff;
}

body[data-page="contact"] .contact-info-card__value--phone:hover,
body[data-page="contact"] .contact-info-card__value--phone:focus-visible {
  color: #b8f0d8;
}

body[data-page="contact"] .contact-info-card__value--linkedin:hover,
body[data-page="contact"] .contact-info-card__value--linkedin:focus-visible {
  color: #a9d0ff;
}

body[data-page="contact"] .contact-page-cta,
body[data-page="contact"] .contact-page-submit {
  min-height: 58px;
  border: 1px solid rgba(229, 193, 132, 0.72);
  border-radius: 999px;
  background: #101b38;
  color: #fbf4ec;
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  box-shadow: 0 13px 26px rgba(0, 0, 0, 0.32), inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

body[data-page="contact"] .contact-page-cta {
  margin-top: 1.35rem;
  padding: 0.75rem 1rem 0.75rem 1.8rem;
  gap: 1.4rem;
}

body[data-page="contact"] .contact-page-cta:hover,
body[data-page="contact"] .contact-page-submit:hover {
  background: #172447;
  border-color: #e5c184;
  transform: translateY(-2px);
}

body[data-page="contact"] .contact-page-cta-icon,
body[data-page="contact"] .contact-page-submit-icon {
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: #e5c184;
  color: #101b38;
  font-size: 18px;
}

body[data-page="contact"] .contact-page-form-card {
  position: relative;
  overflow: hidden;
  padding: clamp(1.7rem, 3vw, 2.35rem);
  border: 2px solid rgba(229, 193, 132, 0.55);
  border-radius: 28px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.88), rgba(245, 238, 227, 0.96)),
    #f5efe5;
  box-shadow: 0 22px 55px rgba(0, 0, 0, 0.28), inset 0 0 0 1px rgba(255, 255, 255, 0.7);
}

body[data-page="contact"] .contact-page-form-card::after {
  content: "";
  position: absolute;
  right: -18px;
  bottom: 18px;
  width: 180px;
  height: 250px;
  background: url('./assets/quote-feather-bg.png') right bottom / contain no-repeat;
  opacity: 0.14;
  pointer-events: none;
}

body[data-page="contact"] .contact-page-form {
  position: relative;
  z-index: 1;
  gap: 1rem;
  background: transparent;
}

body[data-page="contact"] .contact-page-form-row {
  width: 100%;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  justify-content: center;
}

body[data-page="contact"] .contact-page-field {
  min-width: 0;
}

body[data-page="contact"] .contact-page-label {
  color: #181628;
  font-family: var(--site-font);
  font-size: 14px;
  font-weight: 400;
}

body[data-page="contact"] .contact-page-input,
body[data-page="contact"] .contact-page-textarea {
  width: 100%;
  border: 1px solid rgba(29, 23, 17, 0.14);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.48);
  color: #181628;
  font-family: var(--site-font);
  font-size: 16px;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.035);
}

body[data-page="contact"] .contact-page-input {
  min-height: 48px;
}

body[data-page="contact"] .contact-page-textarea {
  min-height: 138px;
}

body[data-page="contact"] .contact-page-input:focus,
body[data-page="contact"] .contact-page-textarea:focus {
  border-color: rgba(229, 193, 132, 0.85);
  background: rgba(255, 255, 255, 0.74);
  box-shadow: 0 0 0 3px rgba(229, 193, 132, 0.2);
}

body[data-page="contact"] .contact-page-form-actions {
  justify-content: flex-end;
  margin-top: 0.2rem;
}

body[data-page="contact"] .contact-page-submit {
  padding: 0.75rem 0.85rem 0.75rem 1.8rem;
  gap: 1.2rem;
}

body[data-page="contact"] .contact-page-success {
  position: relative;
  z-index: 1;
  border-color: rgba(22, 101, 52, 0.22);
  background: rgba(236, 253, 245, 0.8);
}

body[data-page="contact"] .contact-page-footer {
  background: #071329;
  border-top: 1px solid rgba(229, 193, 132, 0.12);
}

body[data-page="contact"] .contact-page-footer .footer-logo,
body[data-page="contact"] .contact-page-footer .footer-copy {
  color: rgba(251, 244, 236, 0.62);
}

body[data-page="contact"] .contact-page-footer .footer-contact-info a {
  color: rgba(251, 244, 236, 0.62);
  text-decoration: none;
}

body[data-page="contact"] .contact-page-footer .footer-contact-info a:hover,
body[data-page="contact"] .contact-page-footer .footer-contact-info a:focus-visible {
  color: rgba(251, 244, 236, 0.88);
}

@media (max-width: 900px) {
  body[data-page="contact"] .contact-page-inner {
    padding: 1.4rem;
  }

  body[data-page="contact"] .contact-page-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  body[data-page="contact"] .contact-page-intro {
    padding-left: 3.1rem;
  }
}

@media (max-width: 700px) {
  body[data-page="index"] .index-nav .nav-link,
  body[data-page="index"] .index-nav--compact .index-nav-center-title,
  body[data-page="index"] .index-nav-about-link {
    font-size: 12px;
  }

  body[data-page="index"] .index-nav--compact .index-nav-center-title {
    letter-spacing: 0.14em;
  }

  body[data-page="contact"] .contact-page-main {
    padding: calc(1.2rem + 72px) 0.75rem 1.5rem;
  }

  body[data-page="contact"] .contact-page-inner {
    border-radius: 22px;
  }

  body[data-page="contact"] .contact-page-intro__title {
    font-size: clamp(2.35rem, 8vw, 3.4rem);
  }

  body[data-page="contact"] .contact-page-form-row {
    grid-template-columns: 1fr;
  }

  body[data-page="contact"] .contact-page-form-actions,
  body[data-page="contact"] .contact-page-submit {
    width: 100%;
  }

  body[data-page="contact"] .contact-page-submit {
    justify-content: space-between;
  }
}

/* Final navbar sizing alignment */
body[data-page="index"] .index-nav,
body:not([data-page="index"]) .index-nav {
  min-height: 56px;
  padding-block: 12px;
  box-sizing: border-box;
}

@media (min-width: 701px) {
  body[data-page="index"] .index-nav-center-title,
  body:not([data-page="index"]) .index-nav-center-title {
    white-space: nowrap;
  }

  .index-nav-tabs-row {
    flex-wrap: nowrap;
  }
}

body[data-page="index"] .index-nav .nav-link,
body[data-page="index"] .index-nav-about-link,
body:not([data-page="index"]) .index-nav .nav-link,
body:not([data-page="index"]) .index-nav-about-link,
body[data-page="index"] .index-nav-center-title,
body:not([data-page="index"]) .index-nav-center-title {
  line-height: 1.25;
}

/* Mobile navigation and phone layout refinements */
.mobile-nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 42px;
  padding: 0.45rem 0.7rem;
  border: 1px solid rgba(229, 193, 132, 0.38);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: #f6eede;
  font-family: var(--site-font);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
}

.mobile-nav-toggle-bars {
  display: inline-flex;
  flex-direction: column;
  gap: 4px;
}

.mobile-nav-toggle-bars span {
  display: block;
  width: 18px;
  height: 1.5px;
  border-radius: 999px;
  background: currentColor;
  transition: transform 0.18s ease, opacity 0.18s ease;
}

.mobile-nav-open .mobile-nav-toggle-bars span:nth-child(1) {
  transform: translateY(5.5px) rotate(45deg);
}

.mobile-nav-open .mobile-nav-toggle-bars span:nth-child(2) {
  opacity: 0;
}

.mobile-nav-open .mobile-nav-toggle-bars span:nth-child(3) {
  transform: translateY(-5.5px) rotate(-45deg);
}

@media (max-width: 700px) {
  body[data-page="index"] .index-nav,
  body:not([data-page="index"]) .index-nav {
    height: auto;
    min-height: 54px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    justify-content: stretch;
    align-items: center;
    column-gap: 0.75rem;
    row-gap: 0.35rem;
    padding: 0.45rem 0.8rem;
  }

  body[data-page="index"] .index-nav-center-cluster,
  body[data-page="index"] .index-nav--compact .index-nav-center-cluster,
  body:not([data-page="index"]) .index-nav-center-cluster {
    grid-column: 1;
    grid-row: 1;
    justify-self: start;
    max-width: none;
    opacity: 1;
    visibility: visible;
  }

  body[data-page="index"] .index-nav-center-title,
  body:not([data-page="index"]) .index-nav-center-title {
    max-width: 58vw;
    padding: 0;
    text-align: left;
    font-size: 11px;
    letter-spacing: 0.1em;
    white-space: normal;
  }

  .mobile-nav-toggle {
    display: inline-flex;
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
    align-self: center;
  }

  body[data-page="index"] .index-nav-tabs-row,
  body[data-page="index"] .index-nav-end,
  body:not([data-page="index"]) .index-nav-tabs-row,
  body:not([data-page="index"]) .index-nav-end {
    display: none;
    grid-column: 1 / -1;
    justify-self: stretch;
    width: 100%;
    margin: 0;
    padding: 0.7rem 0 0;
  }

  body[data-page="index"] .index-nav.mobile-nav-open .index-nav-tabs-row,
  body[data-page="index"] .index-nav.mobile-nav-open .index-nav-end,
  body:not([data-page="index"]) .index-nav.mobile-nav-open .index-nav-tabs-row,
  body:not([data-page="index"]) .index-nav.mobile-nav-open .index-nav-end {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.55rem;
  }

  body[data-page="index"] .index-nav-tabs-row,
  body:not([data-page="index"]) .index-nav-tabs-row {
    grid-row: 2;
  }

  body[data-page="index"] .index-nav-end,
  body:not([data-page="index"]) .index-nav-end {
    grid-row: 3;
    flex-direction: column;
    align-items: stretch;
    gap: 0.55rem;
  }

  /* Compact desktop grid uses columns 1 + 3; undo that here so the open menu is one column */
  body[data-page="index"] .index-nav.index-nav--compact .index-nav-tabs-row,
  body:not([data-page="index"]) .index-nav.index-nav--compact .index-nav-tabs-row {
    grid-column: 1 / -1;
    justify-self: stretch;
  }

  body[data-page="index"] .index-nav.index-nav--compact .index-nav-end,
  body:not([data-page="index"]) .index-nav.index-nav--compact .index-nav-end {
    grid-column: 1 / -1;
    justify-self: stretch;
  }

  body[data-page="index"] .index-nav-links-wrap,
  body:not([data-page="index"]) .index-nav-links-wrap {
    width: 100%;
    max-width: none;
    align-self: stretch;
    align-items: stretch;
  }

  body[data-page="index"] .index-nav .nav-links,
  body:not([data-page="index"]) .index-nav .nav-links {
    width: 100%;
    min-width: 0;
    flex-direction: column;
    align-items: stretch;
    align-self: stretch;
    gap: 0.55rem;
  }

  body[data-page="index"] .index-nav .nav-link,
  body[data-page="index"] .index-nav-about-link,
  body:not([data-page="index"]) .index-nav .nav-link,
  body:not([data-page="index"]) .index-nav-about-link {
    display: block;
    min-height: 42px;
    padding: 0.75rem 0;
    border: none;
    border-radius: 0;
    background: transparent;
    border-bottom: 1px solid rgba(246, 238, 222, 0.1);
    white-space: normal;
    text-align: left;
    width: 100%;
    max-width: none;
    box-sizing: border-box;
  }

  body[data-page="index"] .index-nav .nav-link.active,
  body:not([data-page="index"]) .index-nav .nav-link.active {
    border-color: transparent;
    border-bottom-color: rgba(229, 193, 132, 0.55);
    padding-bottom: 0.75rem;
  }

  body[data-page="index"] .index-nav .lang-switch,
  body:not([data-page="index"]) .index-nav .lang-switch {
    position: static;
    top: auto;
    transform: none;
    align-self: flex-start;
    margin-top: 0.1rem;
  }

  .nav:not(.index-nav) {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.6rem;
    align-items: center;
    padding: 0.75rem 1rem;
  }

  .nav:not(.index-nav) .nav-logo {
    min-width: 0;
    font-size: 16px;
  }

  .nav:not(.index-nav) .mobile-nav-toggle {
    color: #1a1008;
    border-color: rgba(26, 16, 8, 0.22);
    background: rgba(255, 255, 255, 0.7);
  }

  .nav:not(.index-nav) .nav-links {
    display: none;
    grid-column: 1 / -1;
    flex-direction: column;
    align-items: stretch;
    gap: 0.55rem;
    width: 100%;
    padding-top: 0.4rem;
  }

  .nav:not(.index-nav).mobile-nav-open .nav-links {
    display: flex;
  }

  .nav:not(.index-nav) .nav-link {
    min-height: 42px;
    padding: 0.75rem 0;
  }

  .editor-admin {
    padding: 1rem;
  }

  .editor-admin-inner,
  .filter-row,
  .add-book-toolbar,
  .cta-row {
    align-items: stretch;
    flex-direction: column;
  }

  .fbtn,
  .btn-white,
  .btn-ghost,
  .btn-yellow {
    width: 100%;
    justify-content: center;
    min-height: 44px;
  }

  .hero-splash-heading {
    max-width: 96vw;
  }

  .hero-splash-line--lead {
    font-size: clamp(1.7rem, 6vw, 2.1rem) !important;
    letter-spacing: 0.12em;
  }

  .hero-splash-line--sub {
    font-size: clamp(0.95rem, 5.8vw, 1.65rem);
  }

  .hero-splash-line--accent {
    font-size: clamp(0.82rem, 4.8vw, 1.25rem);
  }

  .legend-section,
  .archive-section,
  .about-strip {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .reading-room-cards .medical-feature-summary {
    min-height: 0;
    padding: 1.85rem 0.95rem 1.1rem;
  }

  body[data-page="index"] .reading-room-cards .medical-feature-title {
    font-size: clamp(1.05rem, 4.8vw, 1.28rem);
    line-height: 1.18;
  }

  body[data-page="index"] .reading-room-cards .medical-feature-card--holland .medical-feature-title {
    font-size: clamp(0.62rem, 3.2vw, 0.82rem);
    letter-spacing: 0.05em;
    line-height: 1.14;
  }

  body[data-page="index"] .reading-room-cards .medical-feature-preview {
    font-size: 14px;
    line-height: 1.55;
  }

  body[data-page="index"] .reading-room-cards .medical-feature-cta {
    min-height: 44px;
    padding: 0.55rem 0.75rem;
    font-size: 10px;
    letter-spacing: 0.12em;
  }

  .medical-feature-title {
    font-size: clamp(1.65rem, 9.5vw, 2.25rem);
  }

  body[data-page="index"] .reading-room-title {
    font-size: clamp(2rem, 12vw, 3.1rem);
  }

  body[data-page="index"] .medical-feature-kicker,
  body[data-page="index"] .medical-feature-cta {
    font-size: 11px;
  }

  body[data-page="index"] .legend-card-text,
  body[data-page="index"] .medical-feature-preview {
    font-size: 15px;
    line-height: 1.58;
  }

  .medical-feature-modal-body {
    font-size: 14px;
    line-height: 1.62;
  }

  body[data-page="corpus"] .corpus-main,
  .corpus-main {
    padding: calc(1rem + 56px) 1rem 3rem;
  }

  body[data-page="corpus"] .corpus-controls,
  .corpus-controls {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  body[data-page="corpus"] .corpus-control-left .corpus-select,
  body[data-page="corpus"] .corpus-control-right,
  .corpus-control-left,
  .corpus-control-right,
  .corpus-control-search {
    width: 100%;
  }

  body[data-page="corpus"] .corpus-control-right,
  .corpus-control-right {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .corpus-count {
    white-space: normal;
  }

  /* Phones: avoid 0-height covers if aspect-ratio is ignored */
  .corpus-cover {
    min-height: clamp(160px, 48vw, 260px);
  }

  .corpus-modal-panel {
    width: calc(100vw - 0.75rem);
    max-width: 100%;
    max-height: calc(100dvh - 0.75rem - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
    margin: 0;
  }

  .corpus-modal-bottom-action {
    position: static;
    padding: 0 1rem 1rem;
  }

  .corpus-modal-back {
    width: 100%;
    min-height: 44px;
  }

  body[data-page="story"] .index-nav + div {
    margin-top: 56px;
    padding: 10px 1rem !important;
    overflow-x: auto;
    white-space: nowrap;
  }

  .story-hero {
    padding: 2rem 1rem;
  }

  .story-hero-inner,
  .story-body {
    gap: 1.4rem;
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .story-title {
    font-size: clamp(2rem, 12vw, 2.7rem);
  }

  .story-author-line {
    letter-spacing: 0.02em;
  }

  .story-section-label,
  .sidebar-card-label {
    letter-spacing: 0.22em;
  }

  .story-cover {
    max-width: 260px;
    margin: 0 auto;
  }

  .methodology-grid,
  .contact-page-grid {
    grid-template-columns: 1fr;
  }

  body[data-page="contact"] .contact-page-main {
    padding: calc(1rem + 56px) 0.75rem 1.5rem;
  }

  body[data-page="contact"] .contact-page-inner {
    padding: 1.1rem;
  }

  body[data-page="contact"] .contact-page-intro {
    padding-left: 0;
  }

  body[data-page="contact"] .contact-page-intro__vine {
    display: none;
  }

  body[data-page="contact"] .contact-info-card__value {
    overflow-wrap: anywhere;
  }

  .site-footer {
    gap: 1rem;
    padding: 1.4rem 1rem;
  }
}

@media (max-width: 480px) {
  body[data-page="index"] .index-nav-center-title,
  body:not([data-page="index"]) .index-nav-center-title {
    max-width: 50vw;
    font-size: 10px;
  }

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

  .mobile-nav-toggle {
    width: 44px;
    padding: 0;
  }

  .legend-card {
    padding: 18px 16px;
  }

  .legend-card-text {
    font-size: 12px;
  }

  .reading-room-title,
  .archive-visit-title,
  .about-title {
    font-size: clamp(1.65rem, 10vw, 2.25rem);
  }

  body[data-page="index"] .hero-splash-line--lead {
    font-size: clamp(1.02rem, 5.7vw, 1.55rem);
    letter-spacing: 0.055em;
  }

  body[data-page="index"] .hero-splash-line--sub {
    font-size: clamp(0.82rem, 5vw, 1.25rem);
  }

  body[data-page="index"] .hero-splash-line--accent {
    font-size: clamp(0.72rem, 4vw, 1rem);
  }

  body[data-page="index"] .reading-room-kicker,
  body[data-page="index"] .reading-room-cards .medical-feature-preview {
    font-size: 12px;
  }

  body[data-page="index"] .legend-card-text {
    font-size: 13px;
    line-height: 1.58;
  }

  body[data-page="index"] .reading-room-cards .medical-feature-title {
    font-size: clamp(0.95rem, 4.2vw, 1.18rem);
  }

  body[data-page="index"] .reading-room-cards .medical-feature-card--holland .medical-feature-title {
    font-size: clamp(0.56rem, 2.85vw, 0.76rem);
    letter-spacing: 0.04em;
  }

  .corpus-grid,
  .cards-grid {
    grid-template-columns: 1fr;
  }

  body[data-page="corpus"] .corpus-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem 0.7rem;
  }

  .corpus-card-title {
    font-size: 12px;
  }

  .corpus-modal-cover-wrap {
    min-height: 260px;
  }

  .corpus-modal-carousel,
  .corpus-modal-carousel-viewport {
    min-height: 210px;
  }

  .corpus-modal-cover--slide {
    width: min(170px, 76%);
  }

  .corpus-modal-meta {
    padding: 1rem;
  }

  .story-body {
    padding-top: 2rem;
    padding-bottom: 2.8rem;
  }

  .story-cover {
    width: min(100%, 220px);
    min-height: 300px;
  }

  body[data-page="contact"] .contact-page-intro__title {
    font-size: clamp(2.1rem, 9vw, 2.85rem);
  }

  body[data-page="contact"] .contact-info-card__value {
    font-size: 0.95rem;
  }
}

/* Index nav: 18px typography (must follow responsive blocks) */
body[data-page="index"] .index-nav .nav-link,
body[data-page="index"] .index-nav-about-link,
body[data-page="index"] .index-nav-center-title,
body:not([data-page="index"]) .index-nav .nav-link,
body:not([data-page="index"]) .index-nav-about-link,
body:not([data-page="index"]) .index-nav-center-title {
  font-size: 18px;
}

body[data-page="index"] .index-nav .lang-btn,
body:not([data-page="index"]) .index-nav .lang-btn {
  font-size: 18px;
  padding: 10px 16px;
}

/* Desktop: true vertical centering — symmetric line boxes + underline without inset shadow */
@media (min-width: 701px) {
  body[data-page="index"] .index-nav .nav-link,
  body:not([data-page="index"]) .index-nav .nav-link,
  body[data-page="index"] .index-nav-about-link,
  body:not([data-page="index"]) .index-nav-about-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    padding-block: 0.35rem;
    box-sizing: border-box;
  }

  body[data-page="index"] .index-nav-center-title,
  body:not([data-page="index"]) .index-nav-center-title {
    display: flex;
    align-items: center;
    line-height: 1;
    padding-block: 0.35rem;
    box-sizing: border-box;
  }

  body[data-page="index"] .index-nav .nav-link.active::after,
  body:not([data-page="index"]) .index-nav .nav-link.active::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 2px;
    background: #d4a968;
    pointer-events: none;
  }

  body[data-page="about"] .index-nav .nav-link.active::after {
    content: none;
    display: none;
  }
}

/* FINAL DESKTOP NAVBAR FIX — keep logo animation target unchanged */
@media (min-width: 701px) {
  body[data-page="index"] .index-nav,
  body:not([data-page="index"]) .index-nav {
    height: 64px;
    min-height: 64px;
    padding-top: 0;
    padding-bottom: 0;
    align-items: center;
  }

  body[data-page="index"] .index-nav-tabs-row,
  body:not([data-page="index"]) .index-nav-tabs-row,
  body[data-page="index"] .index-nav-links-wrap,
  body:not([data-page="index"]) .index-nav-links-wrap,
  body[data-page="index"] .index-nav .nav-links,
  body:not([data-page="index"]) .index-nav .nav-links {
    height: 100%;
    display: flex;
    align-items: center;
  }

  body[data-page="index"] .index-nav .nav-link,
  body:not([data-page="index"]) .index-nav .nav-link,
  body[data-page="index"] .index-nav-about-link,
  body:not([data-page="index"]) .index-nav-about-link {
    height: 64px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding-top: 0;
    padding-bottom: 0;
    line-height: 1;
    box-sizing: border-box;
  }

  /* IMPORTANT: do NOT give the animated logo target height:64px */
  body[data-page="index"] .index-nav-center-cluster,
  body:not([data-page="index"]) .index-nav-center-cluster {
    align-self: center;
    display: flex;
    align-items: center;
  }

  body[data-page="index"] .index-nav-center-title,
  body:not([data-page="index"]) .index-nav-center-title {
    height: auto;
    min-height: 0;
    display: inline-block;
    padding-top: 0;
    padding-bottom: 0;
    line-height: 1.3;
  }

  body[data-page="index"] .index-nav .nav-link.active,
  body:not([data-page="index"]) .index-nav .nav-link.active {
    position: relative;
  }

  body[data-page="index"] .index-nav .nav-link.active::after,
  body:not([data-page="index"]) .index-nav .nav-link.active::after {
    bottom: 12px;
  }

  body[data-page="index"] .index-nav .lang-switch,
  body:not([data-page="index"]) .index-nav .lang-switch {
    top: 50%;
    transform: translateY(-50%);
  }
}
