/* Midrash site — warm parchment, ink, gold. Mobile-first. */

:root {
  --parchment: #f3ead8;
  --parchment-deep: #e6d7bc;
  --paper: #fbf6ec;
  --card: #fffcf5;
  --ink: #221b13;
  --ink-soft: #4a3f32;
  --ink-faint: #6f6456;
  --gold: rgb(215, 173, 100);
  --gold-deep: #8d6424;
  --gold-line: rgba(215, 173, 100, 0.6);
  --rule: #d7c8ab;
  --shadow: 0 10px 30px rgba(50, 32, 10, 0.08);
  --missing: #7c2f2a;
  --serif-display: "Cormorant Garamond", "Cormorant", Palatino, "Palatino Linotype", serif;
  --serif-small: "Cormorant SC", "Cormorant Garamond", serif;
  --serif-body: "Source Serif 4", "Source Serif Pro", Georgia, "Times New Roman", serif;
  --sans: "Source Sans 3", "Source Sans Pro", "Segoe UI", sans-serif;
  --hebrew: "Frank Ruhl Libre", "Times New Roman", serif;
  --max: 72rem;
  --narrow: 44rem;
  --radius: 0.75rem;
}

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

html {
  font-size: 100%;
  scroll-behavior: smooth;
  background: var(--parchment);
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(1200px 500px at 50% -10%, rgba(255, 252, 244, 0.9), transparent 60%),
    radial-gradient(800px 400px at 100% 0%, rgba(215, 173, 100, 0.12), transparent 50%),
    var(--parchment);
  font-family: var(--serif-body);
  font-size: 1.0625rem;
  line-height: 1.7;
  min-height: 100vh;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--gold-deep); text-underline-offset: 0.15em; }
a:hover { color: var(--ink); }
:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

.wrap {
  width: min(var(--max), calc(100% - 2rem));
  margin-inline: auto;
}
.wrap--narrow { width: min(var(--narrow), calc(100% - 2rem)); }

/* Header */
.site-header {
  padding: 1rem 0 0.85rem;
  border-bottom: 1px solid var(--gold-line);
  background: rgba(251, 246, 236, 0.75);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 20;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.brand {
  text-decoration: none;
  color: inherit;
  min-width: 0;
}
.brand-name {
  font-family: var(--serif-small);
  font-weight: 600;
  font-size: 0.92rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-deep);
  margin: 0;
}
.brand-mark {
  display: block;
  width: 3.5rem;
  height: 2px;
  background: var(--gold);
  margin: 0.35rem 0 0.25rem;
}
.brand-sub {
  margin: 0;
  font-family: var(--serif-display);
  font-style: italic;
  font-size: 0.95rem;
  color: var(--ink-soft);
}
.nav {
  display: flex;
  align-items: center;
  gap: 0.9rem 1.1rem;
  flex-wrap: wrap;
  font-family: var(--sans);
  font-size: 0.92rem;
}
.nav a { color: var(--ink-soft); text-decoration: none; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); }

.audience-switch {
  display: flex;
  border: 1px solid var(--gold-line);
  border-radius: 999px;
  overflow: hidden;
  background: var(--paper);
}
.audience-switch button {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--ink-soft);
  font-family: var(--sans);
  font-size: 0.78rem;
  padding: 0.4rem 0.7rem;
  cursor: pointer;
  line-height: 1.2;
}
.audience-switch button[aria-pressed="true"] {
  background: var(--ink);
  color: var(--parchment);
}

/* Hero — tagline, then the prominent path intro, then videos */
.hero {
  padding: 1.5rem 0 1rem;
  text-align: center;
}
.hero-tagline {
  margin: 0 auto 0.9rem;
  max-width: 40rem;
  color: var(--ink-soft);
  font-family: var(--serif-display);
  font-size: 1.12rem;
  font-style: italic;
  line-height: 1.4;
}
.hero h1 {
  font-family: var(--serif-display);
  font-weight: 500;
  font-size: clamp(1.8rem, 5vw, 3rem);
  line-height: 1.15;
  margin: 0 0 0.6rem;
}
.hero .lede {
  margin: 0 auto 1.4rem;
  max-width: 34rem;
  color: var(--ink-soft);
  font-size: 1.05rem;
  line-height: 1.5;
}
.path-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
  text-align: left;
}
.path-card {
  display: block;
  text-align: left;
  text-decoration: none;
  color: inherit;
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 1.25rem 1.3rem 1.35rem;
  box-shadow: var(--shadow);
  cursor: pointer;
  font: inherit;
  width: 100%;
}
.path-card:hover, .path-card:focus-visible {
  border-color: var(--gold);
  box-shadow: 0 12px 32px rgba(141, 100, 36, 0.14);
}
.path-eyebrow {
  font-family: var(--serif-small);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-deep);
  display: block;
  margin-bottom: 0.35rem;
}
.path-card h2 {
  font-family: var(--serif-display);
  font-weight: 600;
  font-size: 1.55rem;
  margin: 0 0 0.35rem;
  line-height: 1.2;
}
.path-card p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.98rem;
}
.path-card[aria-pressed="true"] {
  border-color: var(--gold);
  box-shadow: inset 0 0 0 1px var(--gold);
}
.chosen-bar {
  display: none;
  margin: 0.75rem 0 0;
  font-family: var(--sans);
  font-size: 0.92rem;
  color: var(--ink-soft);
  text-align: center;
}
.hero.has-audience .chosen-bar { display: block; }
.chosen-bar button {
  appearance: none;
  border: 0;
  background: none;
  color: var(--gold-deep);
  font: inherit;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 0.15em;
  padding: 0;
}

/* Browse */
.browse {
  padding: 0.15rem 0 3rem;
}
.browse-tools .section-title {
  margin: 0.55rem 0 0.4rem;
}
.section-title {
  font-family: var(--serif-small);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.75rem;
  color: var(--gold-deep);
  margin: 1.6rem 0 0.7rem;
}
.filter-row { display: block; }
.search-meta { margin: 0.45rem 0 0.15rem; }
.search-box {
  position: relative;
}
.search-box input {
  width: 100%;
  font-family: var(--serif-body);
  font-size: 1.05rem;
  padding: 0.75rem 1rem 0.75rem 2.6rem;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: var(--card);
  color: var(--ink);
}
.search-box input::placeholder { color: var(--ink-faint); }
.search-icon {
  position: absolute;
  left: 0.95rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gold-deep);
  pointer-events: none;
}
.filters { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.pill {
  appearance: none;
  border: 1px solid var(--rule);
  background: var(--paper);
  color: var(--ink-soft);
  font-family: var(--sans);
  font-size: 0.82rem;
  padding: 0.28rem 0.7rem;
  border-radius: 999px;
  cursor: pointer;
  text-decoration: none;
  line-height: 1.3;
}
.pill:hover { border-color: var(--gold); color: var(--ink); }
.pill.is-on, .pill[aria-pressed="true"] {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--parchment);
}
.search-meta {
  font-family: var(--sans);
  font-size: 0.9rem;
  color: var(--ink-faint);
  margin: 1rem 0 0.6rem;
}
.search-meta:empty { display: none; }

/* Cards — video-first */
.videos-heading { margin-top: 0.15rem; }
.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.15rem;
  margin-top: 0.55rem;
}
.video-card,
.essay-card {
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow);
  min-height: 100%;
}
.video-card:hover,
.essay-card:hover { border-color: var(--gold); }
.video-card:hover .thumb-play { transform: scale(1.06); }
.thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #1a140e;
  overflow: hidden;
}
.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.thumb-play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
  background: linear-gradient(to top, rgba(20, 14, 8, 0.35), transparent 45%);
  transition: transform 0.15s ease;
}
.play-icon {
  width: 3rem;
  height: 3rem;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.35));
}
.play-icon-bg { fill: rgba(34, 27, 19, 0.78); }
.play-icon-tri { fill: #fbf6ec; }
.card-watch .play-icon {
  width: 1.05rem;
  height: 1.05rem;
  filter: none;
}
.card-watch .play-icon-bg { fill: var(--gold-deep); }
.card-watch .play-icon-tri { fill: var(--parchment); }
.channel-badge,
.side-badge {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  z-index: 1;
  font-family: var(--sans);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.18rem 0.45rem;
  border-radius: 999px;
  background: rgba(251, 246, 236, 0.94);
  color: var(--ink);
  box-shadow: 0 1px 4px rgba(0,0,0,0.18);
}
.channel-badge--backstory {
  background: rgba(34, 27, 19, 0.86);
  color: var(--parchment);
}
.side-badge {
  left: auto;
  right: 0.5rem;
  background: rgba(215, 173, 100, 0.95);
  color: var(--ink);
}
.card-body { padding: 0.85rem 1rem 1rem; flex: 1; display: flex; flex-direction: column; }
.card-kicker {
  font-family: var(--serif-small);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-deep);
  margin: 0 0 0.25rem;
}
.card-body h2 {
  font-family: var(--serif-display);
  font-weight: 600;
  font-size: 1.22rem;
  line-height: 1.25;
  margin: 0 0 0.4rem;
}
.card-watch {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0 0 0.35rem;
  font-family: var(--sans);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--gold-deep);
}
.badge-summary {
  margin: 0 0 0.4rem;
  font-family: var(--sans);
  font-size: 0.72rem;
  color: var(--ink-faint);
}
.card-tags {
  margin-top: auto;
  font-family: var(--sans);
  font-size: 0.78rem;
  color: var(--ink-faint);
}
.badge-alt {
  display: inline-block;
  margin-top: 0.45rem;
  font-family: var(--sans);
  font-size: 0.75rem;
  color: var(--gold-deep);
}

/* Video page */
.video-page { padding: 1.3rem 0 3rem; }
.embed-wrap {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #111;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.embed-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.video-kicker {
  font-family: var(--serif-small);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.72rem;
  color: var(--gold-deep);
  margin: 1.15rem 0 0.35rem;
}
.video-page h1 {
  font-family: var(--serif-display);
  font-weight: 500;
  font-size: clamp(1.6rem, 4.5vw, 2.55rem);
  line-height: 1.15;
  margin: 0 0 0.4rem;
}
.yt-title {
  color: var(--ink-soft);
  font-style: italic;
  margin: 0 0 1rem;
  font-size: 1.02rem;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0 0 1.25rem;
}
.btn {
  appearance: none;
  border: 1px solid var(--gold);
  background: transparent;
  color: var(--gold-deep);
  font-family: var(--sans);
  font-size: 0.88rem;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.btn:hover { background: var(--gold); color: var(--ink); }
.versions {
  background: rgba(215, 173, 100, 0.12);
  border: 1px solid var(--gold-line);
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
  margin: 0 0 1.5rem;
}
.versions h2 {
  font-family: var(--serif-small);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-deep);
  margin: 0 0 0.4rem;
}
.versions ul { margin: 0; padding: 0; list-style: none; }
.versions li { margin: 0.25rem 0; }
.versions a { font-family: var(--sans); font-size: 0.95rem; }

.written-summary {
  margin-top: 1.6rem;
  padding-top: 1.3rem;
  border-top: 1px solid var(--gold-line);
}
.summary-header { margin: 0 0 1.15rem; }
.summary-eyebrow {
  font-family: var(--serif-small);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-deep);
  margin: 0 0 0.3rem;
}
.summary-header h2 {
  font-family: var(--serif-display);
  font-weight: 600;
  font-size: 1.55rem;
  margin: 0 0 0.35rem;
  line-height: 1.2;
}
.summary-lede {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.98rem;
}
.writeup { margin-top: 0.5rem; }
.writeup .prose p,
.writeup .prose li { margin: 0 0 1rem; }
.writeup h2 {
  font-family: var(--serif-display);
  font-weight: 600;
  font-size: 1.45rem;
  margin: 1.8rem 0 0.7rem;
  line-height: 1.25;
}
.writeup blockquote {
  margin: 0 0 1.15rem;
  padding: 0.15rem 0 0.15rem 1rem;
  border-left: 2px solid var(--gold);
  color: var(--ink-soft);
  font-style: italic;
}
.he, .hebrew {
  font-family: var(--hebrew);
  font-size: 1.22rem;
  line-height: 1.8;
  direction: rtl;
  text-align: right;
  margin: 0 0 1.15rem;
}
.notes {
  margin-top: 2.4rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--gold-line);
}
.notes h2 {
  font-family: var(--serif-small);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.78rem;
  color: var(--gold-deep);
  margin: 0 0 0.9rem;
}
.notes .prose { font-size: 0.95rem; color: var(--ink-soft); }
.missing {
  background: rgba(124, 47, 42, 0.1);
  color: var(--missing);
  font-style: italic;
  font-family: var(--sans);
  font-size: 0.86em;
  padding: 0 0.2em;
  border-radius: 0.2em;
}

.placeholder-box {
  margin-top: 2.2rem;
  padding: 1.1rem 1.15rem;
  border: 1px dashed var(--rule);
  border-radius: var(--radius);
  background: rgba(255, 252, 245, 0.6);
}
.placeholder-box h2 {
  font-family: var(--serif-display);
  font-size: 1.25rem;
  margin: 0 0 0.4rem;
}
.placeholder-box p {
  margin: 0;
  color: var(--ink-faint);
  font-size: 0.95rem;
}

/* About */
.page-prose { padding: 2rem 0 3.5rem; }
.page-prose h1 {
  font-family: var(--serif-display);
  font-weight: 500;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  margin: 0 0 1rem;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--gold-line);
  padding: 1.5rem 0 2.2rem;
  text-align: center;
  color: var(--ink-faint);
  font-size: 0.92rem;
}
.site-footer .credit {
  font-family: var(--serif-small);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-deep);
  font-size: 0.78rem;
  margin: 0 0 0.35rem;
}

.empty {
  padding: 1.5rem 0;
  color: var(--ink-faint);
  font-style: italic;
}

@media (min-width: 720px) {
  .hero { padding: 1.5rem 0 0.85rem; }
  .hero-tagline { font-size: 1.2rem; margin-bottom: 0.85rem; }
  .hero .lede { font-size: 1.08rem; margin-bottom: 1.15rem; }
  .path-grid { grid-template-columns: 1fr 1fr; gap: 1.15rem; }
  .path-card { padding: 1.1rem 1.2rem 1.15rem; }

  /* Slim toolbar so the video grid starts right under the path cards. */
  .videos-heading { margin: 0.15rem 0 0.45rem; }
  .browse-tools { margin-bottom: 0.35rem; }
  .browse-tools .search-box { margin-bottom: 0.4rem; }
  .filter-row {
    display: flex;
    flex-wrap: nowrap;
    gap: 1.1rem 1.4rem;
    align-items: center;
  }
  .filter-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
  }
  .filter-group .section-title { margin: 0; white-space: nowrap; }
  .filter-group--topics { flex: 1; }
  .filter-group--topics .topic-cloud {
    flex-wrap: wrap;
    row-gap: 0.28rem;
  }
  .card-grid { grid-template-columns: 1fr 1fr; margin-top: 0.7rem; }
  body { font-size: 1.125rem; }
}

@media (min-width: 1080px) {
  .filter-group--topics .topic-cloud {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 0.15rem;
  }
}

@media (min-width: 1080px) {
  .card-grid { grid-template-columns: 1fr 1fr 1fr; }
}

/* Print / Save as PDF */
@media print {
  body { background: #fff; color: #000; font-size: 11pt; }
  .site-header, .site-footer, .actions, .versions, .placeholder-box, .audience-switch, .nav {
    display: none !important;
  }
  .embed-wrap { display: none; }
  .print-video-url { display: block !important; }
  a { color: #000; text-decoration: none; }
  .writeup a::after { content: " (" attr(href) ")"; font-size: 0.85em; color: #444; }
  .wrap, .wrap--narrow { width: 100%; }
  .missing { background: none; border-bottom: 1px dotted #7c2f2a; }
}
.print-video-url { display: none; font-size: 0.9rem; color: var(--ink-soft); margin: 0.4rem 0 1rem; }

.channel-line {
  margin: 0 0 1rem;
  font-family: var(--sans);
  font-size: 0.92rem;
  color: var(--ink-soft);
}

/* Author display:flex was overriding the hidden attribute, so search could not hide cards. */
.video-card[hidden], .essay-card[hidden] { display: none !important; }

.pill { white-space: nowrap; flex: 0 0 auto; }
.audience-switch { flex: 0 0 auto; }
.audience-switch button { white-space: nowrap; }

.topic-cloud {
  max-height: none;
  overflow: visible;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.search-box .search-icon svg {
  display: block;
  width: 1.05rem;
  height: 1.05rem;
}

@media (max-width: 719px) {
  .audience-switch button {
    font-size: 0.72rem;
    padding: 0.35rem 0.55rem;
  }
  .header-inner { row-gap: 0.55rem; }
}


/* Mobile: keep the intro prominent, then get the video grid on screen quickly. */
@media (max-width: 719px) {
  .site-header { padding: 0.65rem 0 0.55rem; }
  .brand-name { font-size: 0.82rem; letter-spacing: 0.1em; }
  .brand-sub { font-size: 0.85rem; }
  .brand-mark { margin: 0.22rem 0 0.15rem; }
  .nav { gap: 0.55rem 0.75rem; font-size: 0.86rem; }
  .header-inner { gap: 0.4rem 0.6rem; }

  .hero { padding: 0.85rem 0 0.7rem; }
  .hero-tagline { font-size: 0.98rem; margin-bottom: 0.7rem; line-height: 1.35; }
  .hero h1 { font-size: 1.55rem; margin-bottom: 0.35rem; }
  .hero .lede { font-size: 0.92rem; margin-bottom: 0.8rem; line-height: 1.4; }
  .path-grid { grid-template-columns: 1fr 1fr; gap: 0.55rem; }
  .path-card { padding: 0.7rem 0.7rem 0.75rem; }
  .path-eyebrow { font-size: 0.58rem; letter-spacing: 0.1em; margin-bottom: 0.18rem; }
  .path-card h2 { font-size: 1.05rem; margin-bottom: 0.2rem; }
  .path-card p { font-size: 0.75rem; line-height: 1.35; }

  .browse { padding: 0 0 2.4rem; }
  .browse-tools .section-title,
  .section-title { margin: 0.45rem 0 0.25rem; font-size: 0.68rem; }
  .videos-heading { margin: 0.15rem 0 0.4rem; }
  .search-box input { font-size: 0.95rem; padding: 0.5rem 0.85rem 0.5rem 2.3rem; }
  .search-meta { margin: 0.35rem 0 0.1rem; }
  .filters { gap: 0.3rem; }
  .pill { font-size: 0.72rem; padding: 0.18rem 0.5rem; }
  .topic-cloud {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 0.3rem;
    padding-bottom: 0.2rem;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
  }
  .card-grid { gap: 0.85rem; margin-top: 0.45rem; }
  .card-body { padding: 0.7rem 0.85rem 0.85rem; }
  .card-body h2 { font-size: 1.12rem; }
  .wrap { width: min(var(--max), calc(100% - 1.5rem)); }
  .audience-switch button {
    font-size: 0.7rem;
    padding: 0.32rem 0.5rem;
  }
  .play-icon { width: 2.6rem; height: 2.6rem; }
}

@media (max-width: 430px) {
  .path-card p { display: none; }
  .path-card { padding: 0.65rem 0.65rem 0.7rem; }
}


/* ------------------------------------------------------------------
   Mockup only: Old City arches hero. Not used on the live site.
   ------------------------------------------------------------------ */
body.home-arches {
  --hero-ivory: #fff8ec;
  --hero-ivory-soft: rgba(255, 248, 236, 0.92);
}

body.home-arches .site-header--over-hero {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: linear-gradient(180deg, rgba(10, 6, 3, 0.72) 0%, rgba(10, 6, 3, 0.28) 70%, transparent 100%);
  border-bottom-color: transparent;
  backdrop-filter: blur(2px);
}
body.home-arches .site-header--over-hero.is-scrolled {
  background: rgba(251, 246, 236, 0.94);
  border-bottom: 1px solid var(--gold-line);
  backdrop-filter: blur(8px);
}
body.home-arches .site-header--over-hero.is-scrolled .brand-name {
  color: var(--gold-deep);
}
body.home-arches .site-header--over-hero.is-scrolled .brand-sub,
body.home-arches .site-header--over-hero.is-scrolled .nav a {
  color: var(--ink-soft);
}
body.home-arches .site-header--over-hero.is-scrolled .nav a:hover,
body.home-arches .site-header--over-hero.is-scrolled .nav a[aria-current="page"] {
  color: var(--ink);
}
body.home-arches .site-header--over-hero.is-scrolled .audience-switch {
  background: var(--paper);
  border-color: var(--gold-line);
}
body.home-arches .site-header--over-hero.is-scrolled .audience-switch button {
  color: var(--ink-soft);
}
body.home-arches .site-header--over-hero.is-scrolled .audience-switch button[aria-pressed="true"] {
  background: var(--ink);
  color: var(--parchment);
}
body.home-arches .site-header--over-hero .brand-name {
  color: var(--gold);
}
body.home-arches .site-header--over-hero .brand-sub {
  color: var(--hero-ivory-soft);
}
body.home-arches .site-header--over-hero .nav a {
  color: var(--hero-ivory-soft);
}
body.home-arches .site-header--over-hero .nav a:hover,
body.home-arches .site-header--over-hero .nav a[aria-current="page"] {
  color: var(--hero-ivory);
}
body.home-arches .site-header--over-hero .audience-switch {
  background: rgba(16, 9, 4, 0.45);
  border-color: rgba(215, 173, 100, 0.55);
}
body.home-arches .site-header--over-hero .audience-switch button {
  color: var(--hero-ivory-soft);
}
body.home-arches .site-header--over-hero .audience-switch button[aria-pressed="true"] {
  background: var(--gold);
  color: var(--ink);
}

.hero--arches {
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: stretch;
  padding: 0;
  text-align: center;
  color: var(--hero-ivory);
  overflow: hidden;
  background: #140c08;
}
.hero-art {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background: #140c08;
}
.hero-art img {
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: 50% 46%;
  transform: scale(1.05);
  transform-origin: 50% 46%;
  filter: sepia(0.32) saturate(0.95) contrast(1.1) brightness(0.78);
  animation: hero-kenburns 32s ease-in-out alternate infinite;
}
@keyframes hero-kenburns {
  from { transform: scale(1.05); }
  to   { transform: scale(1.14); }
}
.hero-art::before {
  /* Warm amber/gold wash over the black-and-white stone */
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(168, 112, 42, 0.28) 0%, rgba(120, 72, 22, 0.12) 40%, rgba(80, 44, 12, 0.2) 100%);
  mix-blend-mode: color;
  pointer-events: none;
}
.hero-art::after {
  /* Dark/warm vignette: keep the arch's dark center behind the headline,
     and hold a readable field for the type. */
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 58% 62% at 50% 46%, rgba(12, 7, 3, 0.12) 0%, rgba(12, 7, 3, 0.42) 48%, rgba(8, 5, 2, 0.72) 100%),
    linear-gradient(180deg, rgba(10, 6, 3, 0.58) 0%, rgba(10, 6, 3, 0.16) 26%, rgba(10, 6, 3, 0.22) 52%, rgba(8, 5, 2, 0.82) 100%),
    linear-gradient(90deg, rgba(12, 7, 3, 0.5) 0%, transparent 22%, transparent 78%, rgba(12, 7, 3, 0.5) 100%);
  pointer-events: none;
}

.hero--arches .hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex: 1 1 auto;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 6.6rem 0 1.6rem;
  width: min(var(--max), calc(100% - 2rem));
}
.hero--arches .hero-top {
  padding-top: 0.2rem;
}
.hero--arches .hero-channel {
  margin: 0 0 0.3rem;
  font-family: var(--serif-small);
  font-weight: 600;
  font-size: clamp(0.82rem, 1.7vw, 1.08rem);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.8);
}
.hero--arches .hero-credit {
  margin: 0 0 0.85rem;
  font-family: var(--serif-small);
  font-weight: 600;
  font-size: clamp(0.72rem, 1.4vw, 0.92rem);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.8);
}
.hero--arches .hero-credit::before {
  content: "";
  display: block;
  width: 3.2rem;
  height: 1px;
  background: var(--gold);
  margin: 0 auto 0.7rem;
  opacity: 0.9;
}
.hero--arches .hero-tagline {
  margin: 0 auto;
  max-width: 38rem;
  color: var(--hero-ivory-soft);
  font-family: var(--serif-display);
  font-size: clamp(1.02rem, 2.1vw, 1.28rem);
  font-style: italic;
  line-height: 1.4;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.85), 0 0 28px rgba(0, 0, 0, 0.45);
}
.hero--arches .hero-center {
  padding: 1.1rem 0 1.2rem;
}
.hero--arches h1 {
  color: var(--hero-ivory);
  font-size: clamp(2rem, 5.6vw, 3.65rem);
  margin: 0 auto 0.7rem;
  max-width: 16ch;
  text-shadow: 0 2px 28px rgba(0, 0, 0, 0.9), 0 0 48px rgba(0, 0, 0, 0.5);
}
.hero--arches .lede {
  color: var(--hero-ivory-soft);
  font-size: clamp(0.98rem, 1.7vw, 1.12rem);
  max-width: 34rem;
  margin: 0 auto;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.85);
}
.hero--arches .path-grid {
  width: 100%;
  margin: 0;
}
.hero--arches .path-card {
  color: var(--ink);
  background: rgba(255, 252, 245, 0.96);
  backdrop-filter: blur(8px);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.32);
}
.hero--arches .path-card h2 {
  color: var(--ink);
}
.hero--arches .path-card p {
  color: var(--ink-soft);
}
.hero--arches .path-eyebrow {
  color: var(--gold-deep);
}
.hero--arches .chosen-bar {
  color: var(--hero-ivory-soft);
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.7);
}
.hero--arches .chosen-bar button {
  color: var(--gold);
}

@media (prefers-reduced-motion: reduce) {
  .hero-art img {
    animation: none;
    transform: scale(1.06);
  }
}

/* Desktop: give the arch room, keep type in the dark center */
@media (min-width: 720px) {
  .hero--arches .hero-content {
    padding: 6.8rem 0 2rem;
  }
  .hero--arches .hero-center {
    padding: 0.6rem 0 1.4rem;
  }
  .hero--arches .path-grid {
    grid-template-columns: 1fr 1fr;
    gap: 1.15rem;
  }
}

/* Mobile: keep every key line readable inside a 390x844 viewport */
@media (max-width: 719px) {
  body.home-arches .site-header--over-hero {
    padding: 0.55rem 0 0.5rem;
  }
  .hero--arches .hero-content {
    padding: 6.4rem 0 1.1rem;
    width: min(var(--max), calc(100% - 1.5rem));
  }
  .hero--arches .hero-channel {
    letter-spacing: 0.12em;
  }
  .hero--arches .hero-credit {
    margin-bottom: 0.65rem;
  }
  .hero--arches .hero-credit::before {
    margin-bottom: 0.5rem;
  }
  .hero--arches .hero-tagline {
    font-size: 0.98rem;
    line-height: 1.35;
  }
  .hero--arches .hero-center {
    padding: 0.85rem 0 0.9rem;
  }
  .hero--arches h1 {
    font-size: 1.7rem;
    margin-bottom: 0.4rem;
  }
  .hero--arches .lede {
    font-size: 0.9rem;
    line-height: 1.4;
    margin-bottom: 0;
  }
  .hero--arches .path-grid {
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
  }
  .hero--arches .path-card {
    padding: 0.65rem 0.65rem 0.7rem;
  }
  .hero-art img {
    object-position: 50% 44%;
    transform-origin: 50% 44%;
  }
}

@media (max-width: 430px) {
  .hero--arches .path-card p { display: none; }
}

/* Nov 22: make the channel name on the path cards prominent */
.hero--arches .path-eyebrow {
  font-size: 1.32rem;
  letter-spacing: 0.05em;
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 0.45rem;
}
@media (max-width: 719px) {
  .hero--arches .path-eyebrow { font-size: 0.74rem; letter-spacing: 0.04em; margin-bottom: 0.25rem; }
}
/* Nov 22: cards are channel name + one description line */
.hero--arches .path-card p { font-size: 1.08rem; line-height: 1.45; }
@media (max-width: 719px) {
  .hero--arches .path-card p { display: block; font-size: 0.78rem; line-height: 1.35; }
}
/* Nov 22 8:45: bigger channel name, small question sitting right above the cards */
.hero--arches .hero-channel { font-size: clamp(1.25rem, 3vw, 2.1rem); letter-spacing: 0.12em; margin-bottom: 0.7rem; }
.hero--arches .hero-content { justify-content: flex-start; }
.hero--arches .hero-center { margin-top: auto; padding: 0 0 0.9rem; }
.hero--arches h1 { font-size: clamp(1.35rem, 2.8vw, 2rem); max-width: none; margin-bottom: 0; }
@media (max-width: 719px) {
  .hero--arches .hero-channel { font-size: 1.15rem; letter-spacing: 0.06em; }
  .hero--arches h1 { font-size: 1.3rem; }
  .hero--arches .hero-center { padding: 0 0 0.6rem; }
}
.hero--arches .hero-channel { line-height: 1.25; }
.hero--arches .hero-channel-sub { display: inline-block; margin-top: 0.35rem; font-size: 0.6em; letter-spacing: 0.14em; }
/* Unified card text: one color, one size (t427u) */
.hero--arches .path-card .path-eyebrow,
.hero--arches .path-card p{font-family:var(--serif-small);font-size:1.3rem;line-height:1.35;font-weight:700;letter-spacing:0.01em;text-transform:none;color:var(--gold-deep);margin:0}
@media (max-width:719px){
.hero--arches .path-card .path-eyebrow,
.hero--arches .path-card p{display:block;font-size:0.82rem;line-height:1.3}
}

/* t429u dramatic headline */
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}
.hero--arches .hero-top{padding-top:clamp(1.2rem,6vh,3.6rem)}
.hero--arches .hero-channel{
  margin:0 auto;
  max-width:none;
  font-family:var(--serif-display);
  font-weight:700;
  font-size:clamp(2.05rem,4.4vw,3.55rem);
  line-height:1.06;
  letter-spacing:0.005em;
  text-transform:none;
  color:#e2bd78;
  text-shadow:none;
  filter:drop-shadow(0 2px 2px rgba(0,0,0,.6)) drop-shadow(0 6px 26px rgba(0,0,0,.75)) drop-shadow(0 0 22px rgba(215,173,100,.16));
}
.hero--arches .hero-channel .hl{
  display:block;
  text-wrap:balance;
  background:linear-gradient(180deg,#f6e2b0 0%,#e7c27d 38%,#c9993f 62%,#e9c987 100%);
  -webkit-background-clip:text;background-clip:text;
  -webkit-text-fill-color:transparent;color:transparent;
}
.hero--arches .hero-rule{
  display:block;width:clamp(4rem,9vw,7rem);height:1px;margin:0.32em auto 0.3em;
  background:linear-gradient(90deg,transparent,rgba(226,189,120,.95),transparent);
}
.hero--arches .hero-orn{
  font-size:0.42em;vertical-align:0.3em;letter-spacing:0;padding:0 0.35em;
  -webkit-text-fill-color:#d7ad64;color:#d7ad64;
}
@media (max-width:719px){
  .hero--arches .hero-channel{font-size:1.9rem;line-height:1.06;letter-spacing:0}
  .hero--arches .hero-top{padding-top:1.1rem}
}

/* ------------------------------------------------------------------
   Library at scale (demo): typeahead, popular chips, parsha accordions,
   paged grid. Added for the 180 video preview.
   ------------------------------------------------------------------ */
.lib-search { position: relative; margin-bottom: 0.4rem; }
.lib-search .search-box input { font-size: 1.05rem; }
.suggest {
  position: absolute; left: 0; right: 0; top: calc(100% + 0.35rem); z-index: 30;
  margin: 0; padding: 0.35rem; list-style: none;
  background: var(--card); border: 1px solid var(--rule); border-radius: 0.9rem;
  box-shadow: 0 18px 40px rgba(50, 32, 10, 0.18);
  max-height: 22rem; overflow-y: auto;
}
.suggest-item {
  display: flex; align-items: baseline; gap: 0.6rem;
  padding: 0.5rem 0.65rem; border-radius: 0.6rem; cursor: pointer;
  font-family: var(--sans); font-size: 0.95rem; color: var(--ink);
}
.suggest-item:hover, .suggest-item.is-active { background: var(--parchment); }
.s-kind {
  flex: 0 0 3.6rem; font-family: var(--serif-small); font-size: 0.7rem; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--gold-deep);
}
.s-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.s-label em { font-style: normal; color: var(--ink-faint); font-size: 0.85em; }
.s-n { color: var(--ink-faint); font-size: 0.8rem; }
.suggest-all .s-label { color: var(--gold-deep); }

.chip-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 0.6rem; margin: 0.65rem 0 0.2rem; }
.chip-row .chip-label { margin: 0; }
.chip-row .filters { flex-wrap: wrap; gap: 0.4rem; }
.all-topics {
  font-family: var(--sans); font-size: 0.85rem; font-weight: 600; color: var(--gold-deep);
  text-decoration: none; border-bottom: 1px solid var(--gold-line); white-space: nowrap;
}
.all-topics::after { content: " \203A"; }

.by-parsha { margin: 0.9rem 0 0.4rem; }
.by-parsha > .section-title { margin: 0 0 0.45rem; }
.books { display: grid; grid-template-columns: 1fr; gap: 0.45rem; }
.book {
  background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius);
  box-shadow: 0 4px 14px rgba(50, 32, 10, 0.05);
}
.book[open] { border-color: var(--gold); }
.book > summary {
  list-style: none; cursor: pointer; display: flex; align-items: baseline; gap: 0.6rem;
  padding: 0.7rem 1rem; flex-wrap: wrap;
}
.book > summary::-webkit-details-marker { display: none; }
.book-name { font-family: var(--serif-display); font-weight: 700; font-size: 1.35rem; color: var(--ink); line-height: 1.1; }
.book-sub { font-family: var(--serif-small); font-size: 0.8rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--gold-deep); }
.book-count { margin-left: auto; font-family: var(--sans); font-size: 0.82rem; color: var(--ink-faint); }
.book-chev {
  width: 0.55rem; height: 0.55rem; border-right: 2px solid var(--gold-deep); border-bottom: 2px solid var(--gold-deep);
  transform: rotate(45deg) translateY(-2px); transition: transform 0.15s ease; align-self: center;
}
.book[open] .book-chev { transform: rotate(-135deg); }
.parsha-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(11.5rem, 1fr)); gap: 0.4rem;
  padding: 0 0.8rem 0.85rem;
}
.parsha-btn {
  appearance: none; text-align: left; cursor: pointer;
  display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto auto; column-gap: 0.5rem;
  padding: 0.5rem 0.65rem; border: 1px solid var(--rule); border-radius: 0.6rem;
  background: var(--paper); color: var(--ink); font-family: var(--sans);
}
.parsha-btn:hover { border-color: var(--gold); }
.parsha-btn[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--parchment); }
.parsha-btn[aria-pressed="true"] .p-theme, .parsha-btn[aria-pressed="true"] .p-n { color: var(--gold); }
.p-name { font-family: var(--serif-display); font-weight: 700; font-size: 1.08rem; line-height: 1.15; }
.p-theme { grid-column: 1; font-size: 0.74rem; color: var(--ink-faint); line-height: 1.25; }
.p-n {
  grid-column: 2; grid-row: 1 / span 2; align-self: center;
  min-width: 1.7rem; text-align: center; font-size: 0.78rem; font-weight: 600; color: var(--gold-deep);
  border: 1px solid var(--gold-line); border-radius: 999px; padding: 0.05rem 0.4rem;
}
.parsha-btn--all { background: transparent; border-style: dashed; }
.parsha-btn--all .p-name { font-size: 1rem; align-self: center; grid-row: 1 / span 2; }

.lib-status { font-family: var(--sans); font-size: 0.95rem; color: var(--ink-soft); margin: 1rem 0 0.3rem; }
.lib-status .sep { color: var(--gold-deep); margin: 0 0.2rem; }
.clear-btn {
  appearance: none; border: 0; background: none; padding: 0; cursor: pointer;
  font: inherit; font-weight: 600; color: var(--gold-deep); text-decoration: underline; text-underline-offset: 3px;
}
.tag-link { cursor: pointer; }
.tag-link:hover { color: var(--gold-deep); text-decoration: underline; }
.lib-more { text-align: center; margin: 1.4rem 0 0.4rem; }
.more-btn {
  appearance: none; cursor: pointer; font-family: var(--sans); font-weight: 600; font-size: 0.95rem;
  padding: 0.65rem 1.6rem; border-radius: 999px; border: 1px solid var(--gold-deep);
  background: var(--card); color: var(--gold-deep);
}
.more-btn:hover { background: var(--gold-deep); color: var(--parchment); }
.more-btn[hidden] { display: none; }
.thumb--sample {
  display: grid; place-items: center;
  background: repeating-linear-gradient(135deg, #e9dcc3 0 12px, #e2d2b4 12px 24px);
}
.sample-mark {
  font-family: var(--serif-small); letter-spacing: 0.14em; text-transform: uppercase; font-size: 0.8rem;
  color: var(--gold-deep); background: var(--card); padding: 0.3rem 0.7rem; border-radius: 999px; border: 1px dashed var(--gold-deep);
}
.video-card--sample { opacity: 0.85; box-shadow: none; }
.demo-note { font-family: var(--sans); font-size: 0.78rem; color: var(--ink-faint); text-align: center; margin-top: 1.2rem; }

@media (min-width: 720px) {
  .books { grid-template-columns: 1fr 1fr; align-items: start; grid-auto-flow: row dense; }
  .book[open] { grid-column: 1 / -1; }
}
@media (min-width: 1080px) {
  .books { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 719px) {
  .chip-row { flex-wrap: wrap; }
  .chip-row .filters { flex-wrap: wrap; overflow: visible; }
  .book > summary { padding: 0.6rem 0.8rem; gap: 0.4rem; }
  .book-name { font-size: 1.2rem; }
  .book-count { font-size: 0.75rem; }
  .parsha-grid { grid-template-columns: 1fr 1fr; padding: 0 0.6rem 0.7rem; gap: 0.35rem; }
  .parsha-btn { padding: 0.45rem 0.5rem; }
  .p-name { font-size: 0.98rem; }
  .p-theme { font-size: 0.68rem; }
  .lib-status { font-size: 0.88rem; }
  .suggest-item { font-size: 0.88rem; padding: 0.5rem; }
  .s-kind { flex-basis: 3.1rem; font-size: 0.62rem; }
}

/* Topic index page */
.topics-page { padding: 1.4rem 0 3rem; }
.topics-page h1 { font-family: var(--serif-display); font-weight: 700; font-size: clamp(2rem, 4vw, 2.8rem); margin: 0 0 0.3rem; }
.topics-lede { font-family: var(--sans); color: var(--ink-soft); margin: 0 0 1rem; }
.az-nav { display: flex; flex-wrap: wrap; gap: 0.3rem; margin: 0.6rem 0 1.2rem; position: sticky; top: 0; background: var(--parchment); padding: 0.5rem 0; z-index: 5; }
.az-nav a {
  font-family: var(--serif-display); font-weight: 700; font-size: 1.05rem; text-decoration: none; color: var(--gold-deep);
  width: 2rem; height: 2rem; display: grid; place-items: center; border: 1px solid var(--rule); border-radius: 0.4rem; background: var(--card);
}
.az-nav a:hover { border-color: var(--gold); }
.az-group { margin: 0 0 1.4rem; scroll-margin-top: 4rem; }
.az-letter { font-family: var(--serif-display); font-weight: 700; font-size: 2rem; color: var(--gold-deep); border-bottom: 1px solid var(--gold-line); margin: 0 0 0.5rem; line-height: 1.2; }
.az-list { list-style: none; margin: 0; padding: 0; columns: 3 15rem; column-gap: 1.5rem; }
.az-list li { break-inside: avoid; padding: 0.22rem 0; }
.az-list a { font-family: var(--serif-body); color: var(--ink); text-decoration: none; }
.az-list a:hover { color: var(--gold-deep); text-decoration: underline; }
.az-n { font-family: var(--sans); font-size: 0.78rem; color: var(--ink-faint); margin-left: 0.3rem; }
.az-cat { font-family: var(--sans); font-size: 0.72rem; color: var(--gold-deep); margin-left: 0.35rem; }
.topic-filter { margin: 0 0 0.5rem; max-width: 26rem; }
@media (max-width: 719px) {
  .az-list { columns: 2 9rem; column-gap: 1rem; }
  .az-nav a { width: 1.75rem; height: 1.75rem; font-size: 0.95rem; }
  .az-cat { display: none; }
}

/* ------------------------------------------------------------------
   Ask: one box for parsha, keyword or question (preview)
   ------------------------------------------------------------------ */
.ask-hint { font-family: var(--sans); font-size: 0.85rem; color: var(--ink-faint); margin: 0.5rem 0 0; }
.ask-hint .sep { color: var(--gold-deep); margin: 0 0.15rem; }
.ask-example {
  appearance: none; border: 0; background: none; padding: 0; cursor: pointer; font: inherit;
  color: var(--gold-deep); text-decoration: underline; text-decoration-color: var(--gold-line); text-underline-offset: 3px;
}
.lib-answer {
  margin: 0.9rem 0 0.4rem; padding: 1.1rem 1.25rem 1.2rem; background: var(--card);
  border: 1px solid var(--gold-line); border-left: 4px solid var(--gold); border-radius: var(--radius); box-shadow: var(--shadow);
}
.lib-answer[hidden] { display: none; }
.ans-label { font-family: var(--serif-small); font-size: 0.75rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold-deep); margin: 0 0 0.2rem; }
.ans-q { font-family: var(--serif-display); font-weight: 700; font-size: 1.45rem; line-height: 1.2; margin: 0 0 0.6rem; color: var(--ink); }
.ans-loading { font-family: var(--sans); color: var(--ink-faint); font-style: italic; margin: 0; }
.ans-ai { margin: 0 0 0.8rem; }
.ans-ai-text { font-family: var(--serif-body); font-size: 1.05rem; line-height: 1.55; margin: 0 0 0.5rem; }
.ans-cite { font-family: var(--sans); font-size: 0.7rem; font-weight: 700; color: var(--gold-deep); margin-left: 0.1rem; }
.ans-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.75rem; }
.ans-src { display: grid; grid-template-columns: 1.7rem 1fr; gap: 0.6rem; padding-top: 0.75rem; border-top: 1px solid var(--rule); }
.ans-src:first-child { border-top: 0; padding-top: 0.2rem; }
.ans-n {
  width: 1.6rem; height: 1.6rem; border-radius: 50%; display: grid; place-items: center;
  font-family: var(--sans); font-size: 0.78rem; font-weight: 700; color: var(--parchment); background: var(--gold-deep);
}
.ans-where { font-family: var(--sans); font-size: 0.75rem; color: var(--ink-faint); margin: 0; text-transform: uppercase; letter-spacing: 0.05em; }
.ans-title { font-family: var(--serif-display); font-weight: 700; font-size: 1.15rem; line-height: 1.25; margin: 0.1rem 0 0.25rem; }
.ans-title a { color: var(--ink); text-decoration: none; }
.ans-title a:hover { color: var(--gold-deep); text-decoration: underline; }
.ans-quote { font-family: var(--serif-body); font-size: 0.98rem; line-height: 1.5; color: var(--ink-soft); margin: 0 0 0.35rem; }
.ans-quote mark { background: rgba(215, 173, 100, 0.35); color: inherit; padding: 0 0.1em; border-radius: 2px; }
.ans-go { font-family: var(--sans); font-size: 0.85rem; font-weight: 600; color: var(--gold-deep); }
.ans-parsha { font-family: var(--serif-small); font-size: 0.7rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-faint); margin-left: 0.4rem; }
.ans-beyond {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem 1rem; margin: 0.2rem 0 0.6rem;
  padding: 0.85rem 1rem; background: var(--parchment); border-radius: 0.6rem;
}
.ans-beyond p { margin: 0; flex: 1 1 18rem; font-family: var(--serif-body); font-size: 1.05rem; color: var(--ink); }
.ans-beyond .more-btn { padding: 0.5rem 1.6rem; }
.ans-outside { margin: 0.2rem 0 0.6rem; padding: 0.85rem 1rem; border: 1px dashed var(--gold-deep); border-radius: 0.6rem; }
.ans-outside-off { margin: 0; font-family: var(--sans); font-size: 0.9rem; color: var(--ink-soft); }
.ans-near { margin-top: 0.4rem; }
.ans-near > summary { cursor: pointer; font-family: var(--sans); font-size: 0.85rem; color: var(--ink-faint); margin-bottom: 0.6rem; }
@media (max-width: 719px) {
  .lib-answer { padding: 0.9rem 0.9rem 1rem; }
  .ans-q { font-size: 1.2rem; }
  .ans-title { font-size: 1.05rem; }
  .ans-quote { font-size: 0.92rem; }
  .ask-hint { font-size: 0.8rem; line-height: 1.5; }
}

/* Sentence linked from a search answer */
mark.hl-target { background: rgba(215, 173, 100, 0.45); color: inherit; padding: 0.05em 0.1em; border-radius: 3px; box-shadow: 0 0 0 2px rgba(215, 173, 100, 0.35); }
.ans-ai-text a.ans-cite { text-decoration: none; }
.ans-ai-text a.ans-cite:hover { text-decoration: underline; }
/* clickable citation numbers in AI answers */
.ans-ai a.ans-cite { text-decoration: none; margin-left: 2px; font-size: 0.78rem; }
.ans-ai a.ans-cite sup { font-size: 1em; vertical-align: 0.45em; line-height: 1; font-weight: 600; color: var(--gold-deep, #8a5a12); padding: 0 2px; border-radius: 3px; background: rgba(176, 122, 40, 0.12); }
.ans-ai a.ans-cite:hover sup, .ans-ai a.ans-cite:focus-visible sup { background: rgba(176, 122, 40, 0.28); text-decoration: underline; }
/* go-beyond offer and Sefaria-linked outside answers */
.ans-beyond-sub { display: block; margin-top: 0.25rem; font-family: var(--sans); font-size: 0.85rem; color: var(--ink-soft); }
.ans-beyond .ans-beyond-yes { background: var(--gold-deep, #8a5a12); color: #fff; border-color: var(--gold-deep, #8a5a12); font-weight: 600; }
.ans-beyond .ans-beyond-yes:hover, .ans-beyond .ans-beyond-yes:focus-visible { filter: brightness(1.1); outline: 2px solid var(--gold-deep, #8a5a12); outline-offset: 2px; }
.ans-outside-label { color: #7a3b1d; font-weight: 700; }
.ans-outside-note { margin: 0.15rem 0 0.5rem; font-family: var(--sans); font-size: 0.85rem; color: var(--ink-soft); }
.ans-outside .ans-ai-text a.ans-cite { text-decoration: none; margin-left: 2px; font-size: 0.78rem; }
.ans-outside .ans-ai-text a.ans-cite sup { font-size: 1em; vertical-align: 0.45em; line-height: 1; font-weight: 600; color: var(--gold-deep, #8a5a12); padding: 0 2px; border-radius: 3px; background: rgba(176, 122, 40, 0.12); }
.ans-sources { margin: 0.6rem 0 0; padding-left: 1.4rem; font-family: var(--sans); font-size: 0.9rem; }
.ans-sources li { margin: 0.35rem 0; }
.ans-sources a { color: var(--gold-deep, #8a5a12); font-weight: 600; }
.ans-src-quote { display: block; color: var(--ink-soft); font-family: var(--serif-body); font-size: 0.95rem; line-height: 1.45; }
/* the magnifier is a clickable search button */
.search-box .search-go { pointer-events: auto; appearance: none; background: none; border: 0; padding: 0.4rem; margin: 0; left: 0.55rem; border-radius: 999px; cursor: pointer; line-height: 0; color: var(--gold-deep); z-index: 2; }
.search-box .search-go:hover, .search-box .search-go:focus-visible { background: rgba(176, 122, 40, 0.14); outline: none; }
.search-box .search-go:focus-visible { box-shadow: 0 0 0 2px var(--gold-deep); }
