/* ═══════════════════════════════════════════════════════════
   SYNOD OF SOUP — THE DOCTRINE LEDGER  (Patch 5)
   ═══════════════════════════════════════════════════════════ */

:root {
  --parchment: #f7f2e8;
  --parchment-warm: #fdfaf3;
  --parchment-dark: #ebe3d2;
  --ink: #1a1410;
  --ink-soft: #2c2218;
  --ink-light: #6b5d4d;
  --ink-mute: #9a8b78;
  --gold: #b8893a;
  --gold-dark: #8a6628;
  --gold-light: #d4a85a;
  --crimson: #8b1e1e;
  --crimson-dark: #6b1414;
  --sage: #6b7a5a;
  --line: #d8cdb8;
  --line-soft: #e8dfc9;
  --white-warm: #fffcf5;

  /* Movements section uses a different accent — deeper, more cautionary */
  --movement-accent: #5a3a6b;
  --movement-accent-dark: #432a52;
  --movement-accent-bg: #f0e9f4;

  --aff: #2d5e3e; --aff-bg: #e8f0e9;
  --deny: #8b2929; --deny-bg: #f4e5e5;
  --nuanced: #8a6628; --nuanced-bg: #f4ecdd;
  --varies: #5b4d8a; --varies-bg: #ece8f4;

  --serif: 'Cormorant Garamond', 'Garamond', Georgia, serif;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  --max-w: 1240px;
  --content-w: 880px;
  --radius: 6px;
  --radius-lg: 10px;
  --shadow-sm: 0 1px 3px rgba(26,20,16,0.06);
  --shadow: 0 4px 16px rgba(26,20,16,0.08);
  --shadow-lg: 0 12px 32px rgba(26,20,16,0.12);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--parchment);
  background-image:
    radial-gradient(circle at 20% 30%, rgba(184,137,58,0.04) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(139,30,30,0.03) 0%, transparent 50%);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--gold-dark); text-decoration: none; cursor: pointer; transition: color .15s; }
a:hover { color: var(--crimson); }

.hidden { display: none !important; }

/* TOP NAV */
.topbar { background: var(--white-warm); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 100; box-shadow: var(--shadow-sm); }
.topbar-inner { max-width: var(--max-w); margin: 0 auto; padding: 16px 32px; display: flex; align-items: center; gap: 32px; }
.topbar-inner {
  flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 12px; cursor: pointer; color: var(--ink); }
.brand:hover { color: var(--crimson); }
.brand-mark { font-size: 28px; filter: sepia(20%); }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font-family: var(--serif); font-size: 22px; font-weight: 600; letter-spacing: 0.01em; }
.brand-sub { font-size: 11px; text-transform: uppercase; letter-spacing: 0.15em; color: var(--gold-dark); font-weight: 500; margin-top: 2px; }
.nav-links { display: flex; gap: 24px; margin-left: 12px; }
.nav-link { font-size: 14px; font-weight: 500; color: var(--ink-soft); letter-spacing: 0.02em; cursor: pointer; }
.nav-link:hover { color: var(--crimson); }
.topbar-auth { margin-left: auto; display: flex; gap: 10px; align-items: center; }

/* BUTTONS */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 20px; border: none; border-radius: var(--radius); font-family: var(--sans); font-size: 14px; font-weight: 600; letter-spacing: 0.01em; cursor: pointer; transition: all .15s ease; white-space: nowrap; }
.btn-lg { padding: 14px 28px; font-size: 15px; }
.btn-full { width: 100%; }
.btn-primary { background: var(--crimson); color: var(--white-warm); box-shadow: 0 2px 6px rgba(139,30,30,0.25); }
.btn-primary:hover { background: var(--crimson-dark); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(139,30,30,0.3); }
.btn-outline { background: transparent; color: var(--ink); border: 1.5px solid var(--ink-soft); }
.btn-outline:hover { background: var(--ink); color: var(--white-warm); }
.btn-ghost { background: transparent; color: var(--ink-soft); }
.btn-ghost:hover { color: var(--crimson); background: var(--parchment-dark); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.btn-sm { padding: 6px 12px; font-size: 12px; }

/* CONFIG BANNER */
.config-banner { background: linear-gradient(135deg, #fef3c7, #fde68a); border-bottom: 1px solid #d4a85a; }
.config-banner-inner { max-width: var(--max-w); margin: 0 auto; padding: 10px 32px; font-size: 13px; color: #6b4a14; }
.config-banner code { background: rgba(0,0,0,0.06); padding: 2px 6px; border-radius: 3px; font-size: 12px; }

/* HERO */
.hero { padding: 96px 32px 80px; background: linear-gradient(180deg, var(--parchment) 0%, var(--parchment-warm) 100%); position: relative; overflow: hidden; border-bottom: 1px solid var(--line); }
.hero::before { content: ''; position: absolute; top: -100px; right: -100px; width: 500px; height: 500px; background: radial-gradient(circle, rgba(184,137,58,0.08) 0%, transparent 70%); border-radius: 50%; pointer-events: none; }
.hero-inner { max-width: 900px; margin: 0 auto; position: relative; text-align: center; }
.hero-eyebrow { font-size: 12px; text-transform: uppercase; letter-spacing: 0.2em; color: var(--gold-dark); font-weight: 600; margin-bottom: 24px; }
.hero-title { font-family: var(--serif); font-size: clamp(40px, 6vw, 68px); font-weight: 500; line-height: 1.08; letter-spacing: -0.01em; color: var(--ink); margin-bottom: 24px; }
.hero-title em { font-style: italic; color: var(--crimson); font-weight: 400; }
.hero-lede { font-size: 19px; line-height: 1.6; color: var(--ink-soft); max-width: 720px; margin: 0 auto 36px; font-weight: 400; }
.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-bottom: 56px; }
.hero-stats { display: flex; justify-content: center; gap: 64px; padding-top: 40px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.hero-stat { text-align: center; }
.stat-num { font-family: var(--serif); font-size: 40px; font-weight: 600; color: var(--crimson); line-height: 1; }
.stat-lbl { font-size: 11px; text-transform: uppercase; letter-spacing: 0.15em; color: var(--ink-light); margin-top: 6px; font-weight: 500; }

/* SECTIONS */
.section-inner { max-width: var(--max-w); margin: 0 auto; padding: 80px 32px; }
.section-head { margin-bottom: 48px; max-width: 760px; }
.section-head-center { margin: 0 auto 56px; text-align: center; }
.section-eyebrow { font-size: 12px; text-transform: uppercase; letter-spacing: 0.2em; color: var(--gold-dark); font-weight: 600; margin-bottom: 12px; }
.section-title { font-family: var(--serif); font-size: clamp(32px, 4vw, 44px); font-weight: 600; line-height: 1.1; color: var(--ink); margin-bottom: 16px; }
.section-sub { font-size: 17px; color: var(--ink-light); line-height: 1.6; }

/* TOPICS SECTION */
.topics-section { background: var(--parchment-warm); border-bottom: 1px solid var(--line); }
.controls { margin-bottom: 32px; display: flex; flex-direction: column; gap: 20px; }
.search-wrap { position: relative; max-width: 560px; }
.search-icon { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--ink-light); pointer-events: none; }
.search-input { width: 100%; padding: 14px 18px 14px 46px; border: 1.5px solid var(--line); border-radius: var(--radius); font-family: var(--sans); font-size: 15px; background: var(--white-warm); color: var(--ink); transition: border-color .15s, box-shadow .15s; }
.search-input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(184,137,58,0.15); }
.cat-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.cat-pill { padding: 8px 16px; border: 1px solid var(--line); background: var(--white-warm); color: var(--ink-soft); border-radius: 100px; font-family: var(--sans); font-size: 13px; font-weight: 500; cursor: pointer; transition: all .15s; }
.cat-pill:hover { border-color: var(--gold); color: var(--crimson); }
.cat-pill.active { background: var(--ink); color: var(--white-warm); border-color: var(--ink); }

.topic-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 20px; }
.topic-card { background: var(--white-warm); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 24px; cursor: pointer; transition: all .2s ease; position: relative; overflow: hidden; }
.topic-card::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--gold); transform: scaleY(0); transform-origin: top; transition: transform .2s ease; }
.topic-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--gold); }
.topic-card:hover::before { transform: scaleY(1); }
.topic-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.topic-icon { font-size: 30px; line-height: 1; }
.cat-badge { background: var(--parchment-dark); color: var(--ink-soft); padding: 4px 10px; border-radius: 100px; font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; }
.topic-name { font-family: var(--serif); font-size: 23px; font-weight: 600; line-height: 1.2; color: var(--ink); margin-bottom: 10px; }
.topic-desc-preview { font-size: 14px; line-height: 1.55; color: var(--ink-light); margin-bottom: 16px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.topic-card-foot { padding-top: 14px; border-top: 1px solid var(--line-soft); }
.controversy-bar-mini { height: 4px; background: var(--parchment-dark); border-radius: 2px; overflow: hidden; }
.controversy-fill-mini { height: 100%; background: linear-gradient(90deg, var(--gold), var(--crimson)); transition: width .3s; }
.topic-card-meta { display: flex; justify-content: space-between; margin-top: 8px; font-size: 11px; color: var(--ink-light); text-transform: uppercase; letter-spacing: 0.08em; font-weight: 500; }

/* ═══════════════════════════════════════════════════════════
   MOVEMENTS SECTION — OUTSIDE THE CREEDS  (NEW IN PATCH 5)
   ═══════════════════════════════════════════════════════════ */

.movements-section {
  background: linear-gradient(180deg, var(--parchment) 0%, #f0eadc 100%);
  border-bottom: 1px solid var(--line);
}
.movements-eyebrow { color: var(--movement-accent); }

.movement-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 22px;
}

.movement-card {
  background: var(--white-warm);
  border: 1px solid var(--line);
  border-left: 4px solid var(--movement-accent);
  border-radius: var(--radius-lg);
  padding: 26px 24px;
  cursor: pointer;
  transition: all .2s ease;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}
.movement-card::before {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 80px; height: 80px;
  background: radial-gradient(circle at top right, rgba(90,58,107,0.06), transparent 70%);
  pointer-events: none;
}
.movement-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: var(--movement-accent);
}
.movement-card-top {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-bottom: 14px;
}
.movement-icon { font-size: 30px; line-height: 1; }
.movement-badge {
  background: var(--movement-accent-bg);
  color: var(--movement-accent-dark);
  padding: 4px 11px;
  border-radius: 100px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.movement-name {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 600;
  line-height: 1.2;
  color: var(--ink);
  margin-bottom: 6px;
}
.movement-founded {
  font-size: 12px;
  color: var(--ink-light);
  margin-bottom: 14px;
  font-style: italic;
  letter-spacing: 0.01em;
}
.movement-summary-preview {
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink-soft);
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 18px;
}
.movement-card-foot {
  padding-top: 14px;
  border-top: 1px solid var(--line-soft);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: var(--ink-light);
  letter-spacing: 0.04em;
}
.movement-adherents { font-style: italic; }
.movement-questions-tag {
  background: var(--movement-accent);
  color: var(--white-warm);
  padding: 4px 10px;
  border-radius: 100px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 10px;
}

/* MOVEMENT DETAIL VIEW */

.movement-detail-bar {
  background: linear-gradient(180deg, var(--white-warm), #fbf6ec);
  border-bottom: 1px solid var(--line);
}
.movement-detail-tag {
  background: var(--movement-accent-bg);
  color: var(--movement-accent-dark);
}

.movement-article {
  background: var(--parchment);
  min-height: 80vh;
}

.movement-head {
  margin-bottom: 36px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--line);
}
.movement-head-eyebrow {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--movement-accent);
  font-weight: 700;
  margin-bottom: 14px;
}
.movement-title {
  font-family: var(--serif);
  font-size: clamp(36px, 5vw, 52px);
  font-weight: 600;
  line-height: 1.1;
  color: var(--ink);
  margin-bottom: 22px;
  letter-spacing: -0.01em;
}
.movement-meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
  background: var(--white-warm);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 22px;
}
.movement-meta-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.movement-meta-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--ink-light);
  font-weight: 700;
}
.movement-meta-row span:last-child {
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.45;
}

.movement-summary-block {
  margin-bottom: 48px;
  background: var(--white-warm);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
}
.movement-summary {
  font-size: 17px;
  line-height: 1.75;
  color: var(--ink-soft);
}

.movement-self-block,
.movement-distinctives-block,
.movement-departures-block,
.movement-keytexts-block,
.movement-response-block {
  margin-bottom: 56px;
}

.movement-self-description {
  font-size: 16px;
  line-height: 1.75;
  color: var(--ink-soft);
}
.movement-self-description p {
  margin-bottom: 14px;
}
.movement-self-description p:last-child { margin-bottom: 0; }
.movement-self-description em {
  font-style: italic;
  color: var(--movement-accent-dark);
}

/* Distinctives — numbered cards */
.distinctives-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.distinctive-card {
  background: var(--white-warm);
  border: 1px solid var(--line);
  border-left: 3px solid var(--movement-accent);
  border-radius: var(--radius);
  padding: 22px 24px;
  display: flex;
  gap: 22px;
  align-items: flex-start;
}
.distinctive-num {
  font-family: var(--serif);
  font-size: 32px;
  font-weight: 600;
  color: var(--movement-accent);
  line-height: 1;
  flex-shrink: 0;
}
.distinctive-content { flex: 1; }
.distinctive-title {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 8px;
}
.distinctive-body {
  font-size: 15px;
  line-height: 1.7;
  color: var(--ink-soft);
}

.departures-title { color: var(--crimson); }
.movement-departures {
  background: #fbf4f4;
  border: 1px solid #e4cccc;
  border-left: 4px solid var(--crimson);
  border-radius: var(--radius);
  padding: 24px 28px;
  font-size: 15.5px;
  line-height: 1.75;
  color: var(--ink-soft);
}
.movement-departures p { margin-bottom: 14px; }
.movement-departures p:last-child { margin-bottom: 0; }
.movement-departures strong { color: var(--crimson-dark); }
.movement-departures em { font-style: italic; color: var(--ink); }

/* DISCUSSION QUESTIONS — THE CENTERPIECE */

.movement-questions-block {
  margin: 64px 0 56px;
}
.questions-banner {
  text-align: center;
  margin-bottom: 36px;
  padding: 32px 24px;
  background: linear-gradient(135deg, #fdfaf3, #f4ecdd);
  border: 1px solid var(--gold-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.questions-eyebrow {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.25em;
  color: var(--gold-dark);
  font-weight: 700;
  margin-bottom: 10px;
}
.questions-title {
  font-family: var(--serif);
  font-size: clamp(28px, 4vw, 38px);
  font-weight: 600;
  line-height: 1.15;
  color: var(--ink);
  margin-bottom: 14px;
}
.questions-sub {
  font-size: 16px;
  color: var(--ink-light);
  line-height: 1.6;
  max-width: 640px;
  margin: 0 auto;
}

.questions-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.question-card {
  background: var(--white-warm);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: box-shadow .2s;
}
.question-card.q-open { box-shadow: var(--shadow); }

.question-card-head {
  display: flex;
  gap: 20px;
  padding: 26px 28px 22px;
  align-items: flex-start;
}
.question-number {
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 700;
  color: var(--crimson);
  line-height: 1;
  flex-shrink: 0;
  padding-top: 2px;
  letter-spacing: -0.02em;
}
.question-content { flex: 1; min-width: 0; }
.question-title {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 12px;
  line-height: 1.25;
}
.question-body {
  font-size: 15.5px;
  line-height: 1.7;
  color: var(--ink-soft);
}
.question-body p { margin-bottom: 12px; }
.question-body p:last-child { margin-bottom: 0; }
.question-body strong {
  color: var(--ink);
  display: block;
  margin-top: 14px;
  font-size: 16px;
  font-weight: 600;
  font-family: var(--serif);
  font-style: italic;
}
.question-body em {
  font-style: italic;
  color: var(--crimson);
}

.question-toggle {
  width: 100%;
  background: var(--parchment-warm);
  border: none;
  border-top: 1px solid var(--line-soft);
  padding: 14px 28px;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: background .15s, color .15s;
  letter-spacing: 0.02em;
}
.question-toggle:hover { background: var(--parchment-dark); color: var(--crimson); }
.question-toggle-left { display: flex; align-items: center; gap: 12px; }
.question-toggle-icon { font-size: 14px; }
.question-activity-count {
  background: var(--ink);
  color: var(--white-warm);
  padding: 2px 9px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 700;
}
.question-activity-count.zero { background: var(--ink-mute); }
.question-chevron { font-size: 12px; transition: transform .2s; }
.question-card.q-open .question-chevron { transform: rotate(180deg); }

.question-forum-body {
  border-top: 1px solid var(--line);
  background: var(--parchment-warm);
  padding: 22px 28px;
  display: none;
}
.question-card.q-open .question-forum-body { display: block; }

/* Key texts */
.keytexts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
}
.keytext-card {
  background: var(--white-warm);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
}
.keytext-title {
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 8px;
  line-height: 1.3;
}
.keytext-desc {
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--ink-light);
}

.movement-historical-response {
  font-size: 15.5px;
  line-height: 1.75;
  color: var(--ink-soft);
}
.movement-historical-response p { margin-bottom: 14px; }
.movement-historical-response p:last-child { margin-bottom: 0; }
.movement-historical-response strong { color: var(--ink); }
.movement-historical-response em { font-style: italic; color: var(--gold-dark); }

/* New since last visit indicator */
.topic-new-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--crimson); margin-left: 8px; box-shadow: 0 0 0 3px rgba(139,30,30,0.15); vertical-align: middle; }

/* ABOUT */
.about-section { background: var(--parchment); border-bottom: 1px solid var(--line); }
.about-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 64px; align-items: start; }
.prose { font-size: 17px; line-height: 1.75; color: var(--ink-soft); margin-bottom: 20px; font-weight: 400; }
.about-aside { display: flex; flex-direction: column; gap: 16px; }
.aside-card { background: var(--white-warm); border: 1px solid var(--line); border-left: 3px solid var(--gold); padding: 22px 24px; border-radius: var(--radius); }
.aside-title { font-family: var(--serif); font-size: 18px; font-weight: 600; color: var(--ink); margin-bottom: 8px; }
.aside-card p { font-size: 14px; line-height: 1.6; color: var(--ink-light); }

/* METHOD */
.method-section { background: var(--parchment-warm); border-bottom: 1px solid var(--line); }
.method-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; }
.method-card { background: var(--white-warm); border: 1px solid var(--line); padding: 28px; border-radius: var(--radius-lg); transition: all .2s; }
.method-card:hover { border-color: var(--gold); box-shadow: var(--shadow-sm); }
.method-num { font-family: var(--serif); font-size: 28px; font-weight: 600; color: var(--gold); margin-bottom: 8px; }
.method-title { font-family: var(--serif); font-size: 20px; font-weight: 600; color: var(--ink); margin-bottom: 8px; }
.method-card p { font-size: 14px; line-height: 1.6; color: var(--ink-light); }

/* DETAIL (topic) */
.detail-bar { background: var(--white-warm); border-bottom: 1px solid var(--line); position: sticky; top: 73px; z-index: 50; }
.detail-bar-inner { max-width: var(--content-w); margin: 0 auto; padding: 14px 32px; display: flex; justify-content: space-between; align-items: center; }
.back-link { background: none; border: none; color: var(--ink-soft); font-family: var(--sans); font-size: 14px; font-weight: 500; cursor: pointer; padding: 6px 0; transition: color .15s; }
.back-link:hover { color: var(--crimson); }
.detail-category-tag { background: var(--parchment-dark); color: var(--ink-soft); padding: 5px 12px; border-radius: 100px; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; }

.detail-article { background: var(--parchment); min-height: 80vh; }
.detail-inner { max-width: var(--content-w); margin: 0 auto; padding: 48px 32px 80px; }
.detail-head { margin-bottom: 40px; }
.detail-title { font-family: var(--serif); font-size: clamp(36px, 5vw, 52px); font-weight: 600; line-height: 1.1; color: var(--ink); margin-bottom: 18px; letter-spacing: -0.01em; }
.detail-desc { font-size: 19px; line-height: 1.6; color: var(--ink-soft); margin-bottom: 32px; font-weight: 400; }

.controversy-block { margin-bottom: 28px; padding: 16px 20px; background: var(--white-warm); border: 1px solid var(--line); border-radius: var(--radius); }
.controversy-label { display: flex; justify-content: space-between; font-size: 12px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--ink-light); font-weight: 600; margin-bottom: 10px; }
.controversy-bar { height: 6px; background: var(--parchment-dark); border-radius: 3px; overflow: hidden; }
.controversy-fill { height: 100%; background: linear-gradient(90deg, var(--gold), var(--crimson)); transition: width .4s; }

.historical-note { background: linear-gradient(135deg, #fdf6e3, #faedd0); border-left: 3px solid var(--gold); padding: 18px 22px; border-radius: var(--radius); font-size: 15px; line-height: 1.65; color: var(--ink-soft); margin-bottom: 24px; }
.hist-label { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: 0.15em; color: var(--gold-dark); font-weight: 700; margin-bottom: 6px; }

.key-verses-block { margin-bottom: 32px; padding: 18px 22px; background: var(--white-warm); border: 1px solid var(--line); border-radius: var(--radius); }
.kv-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.15em; color: var(--ink-light); font-weight: 600; margin-bottom: 12px; }
.key-verses { display: flex; flex-wrap: wrap; gap: 8px; }
.verse-pill { display: inline-flex; align-items: center; background: var(--parchment-dark); border: 1px solid var(--line); color: var(--ink-soft); padding: 6px 14px; border-radius: 100px; font-size: 13px; font-weight: 500; font-family: var(--serif); }

.subtopic-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 32px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.subtopic-tab { padding: 8px 16px; background: transparent; border: 1px solid var(--line); color: var(--ink-light); border-radius: var(--radius); font-family: var(--sans); font-size: 13px; font-weight: 500; cursor: pointer; transition: all .15s; }
.subtopic-tab:hover { color: var(--ink); border-color: var(--ink-light); }
.subtopic-tab.active { background: var(--ink); color: var(--white-warm); border-color: var(--ink); }

.definition-block { background: var(--white-warm); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 28px; margin-bottom: 48px; }
.def-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.15em; color: var(--gold-dark); font-weight: 700; margin-bottom: 12px; }
.def-body { font-size: 17px; line-height: 1.75; color: var(--ink-soft); }
.def-body p { margin-bottom: 14px; }
.def-body p:last-child { margin-bottom: 0; }

.part-title { font-family: var(--serif); font-size: 32px; font-weight: 600; color: var(--ink); margin-bottom: 8px; line-height: 1.15; }
.part-sub { font-size: 15px; color: var(--ink-light); margin-bottom: 28px; }

/* DENOMINATIONS — collapsible forums */
.denom-section { margin-bottom: 56px; }
.denom-grid { display: flex; flex-direction: column; gap: 16px; }

.denom-card { background: var(--white-warm); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 0; transition: all .15s; overflow: hidden; }
.denom-card.stance-affirm  { border-left: 4px solid var(--aff); }
.denom-card.stance-deny    { border-left: 4px solid var(--deny); }
.denom-card.stance-nuanced { border-left: 4px solid var(--nuanced); }
.denom-card.stance-varies  { border-left: 4px solid var(--varies); }

.denom-card-content { padding: 26px 30px 0; }
.denom-card-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; flex-wrap: wrap; gap: 10px; }
.denom-name { font-family: var(--serif); font-size: 22px; font-weight: 600; color: var(--ink); }
.stance-badge { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; padding: 5px 12px; border-radius: 100px; }
.badge-affirm  { background: var(--aff-bg);     color: var(--aff); }
.badge-deny    { background: var(--deny-bg);    color: var(--deny); }
.badge-nuanced { background: var(--nuanced-bg); color: var(--nuanced); }
.badge-varies  { background: var(--varies-bg);  color: var(--varies); }
.denom-position { font-size: 15.5px; line-height: 1.72; color: var(--ink-soft); font-weight: 400; }
.denom-position em { font-style: italic; color: var(--crimson); }
.denom-verses { margin-top: 16px; padding-top: 14px; border-top: 1px dashed var(--line); }
.denom-verses-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--ink-light); font-weight: 600; margin-bottom: 8px; }
.denom-verses .verse-pill { font-size: 12px; padding: 4px 10px; }

.denom-forum-toggle {
  width: 100%;
  background: var(--parchment-warm);
  border: none;
  border-top: 1px solid var(--line-soft);
  padding: 14px 30px;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: background .15s, color .15s;
  letter-spacing: 0.02em;
  margin-top: 22px;
}
.denom-forum-toggle:hover { background: var(--parchment-dark); color: var(--crimson); }
.denom-forum-toggle-left { display: flex; align-items: center; gap: 10px; }
.denom-forum-icon { font-size: 16px; }
.denom-activity-count {
  background: var(--ink);
  color: var(--white-warm);
  padding: 2px 9px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 700;
}
.denom-activity-count.zero { background: var(--ink-mute); }
.denom-forum-chevron { font-size: 12px; transition: transform .2s; }
.denom-card.forum-open .denom-forum-chevron { transform: rotate(180deg); }

.denom-forum-body {
  border-top: 1px solid var(--line);
  background: var(--parchment-warm);
  padding: 22px 28px;
  display: none;
}
.denom-card.forum-open .denom-forum-body { display: block; }

.denom-forum-empty {
  font-size: 14px;
  color: var(--ink-light);
  text-align: center;
  padding: 18px;
  font-style: italic;
  background: var(--white-warm);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  margin-bottom: 16px;
}

.forum-compose { background: var(--white-warm); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; margin-bottom: 18px; }
.forum-compose .ctype-tabs { margin-bottom: 10px; padding-bottom: 10px; }
.forum-compose .ctype-tab { padding: 5px 10px; font-size: 12px; }
.forum-compose .ctype-helper { font-size: 12px; margin-bottom: 8px; padding: 0; }
.forum-compose textarea {
  width: 100%; min-height: 80px; padding: 10px; font-family: var(--sans); font-size: 14px; line-height: 1.55;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--parchment-warm); color: var(--ink);
  resize: vertical;
}
.forum-compose textarea:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(184,137,58,0.12); }
.forum-compose-bottom { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; gap: 10px; }
.forum-compose-bottom .char-count { font-size: 12px; color: var(--ink-light); }
.forum-locked { background: var(--parchment-dark); border: 1px dashed var(--ink-mute); padding: 14px; border-radius: var(--radius); text-align: center; font-size: 13px; color: var(--ink-soft); margin-bottom: 14px; }

.forum-comment-list { display: flex; flex-direction: column; gap: 10px; }

/* THREADING */
.comment-replies-wrap { margin-top: 10px; padding-left: 18px; border-left: 2px solid var(--line-soft); display: flex; flex-direction: column; gap: 8px; }
.comment-reply-item { background: var(--white-warm); border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 10px 12px; }
.comment-reply-item .comment-meta { font-size: 12px; margin-bottom: 4px; }
.comment-reply-item .comment-text { font-size: 14px; line-height: 1.55; }
.replying-to-tag { font-size: 11px; color: var(--ink-light); font-style: italic; margin-bottom: 4px; }
.replying-to-tag strong { color: var(--ink-soft); font-weight: 600; }

.reply-form-wrap { margin-top: 8px; padding: 10px; background: var(--white-warm); border: 1px solid var(--gold); border-radius: var(--radius); animation: slideDown 0.15s ease; }
@keyframes slideDown { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: translateY(0); } }
.reply-form-wrap textarea { width: 100%; min-height: 60px; padding: 8px; font-family: var(--sans); font-size: 13px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--parchment-warm); resize: vertical; }
.reply-form-wrap .form-bottom { display: flex; justify-content: space-between; align-items: center; margin-top: 6px; gap: 8px; }
.reply-form-wrap .form-bottom .btn-sm { padding: 5px 10px; font-size: 12px; }

.reply-btn { background: none; border: none; color: var(--ink-light); font-size: 12px; font-weight: 600; cursor: pointer; padding: 2px 6px; font-family: var(--sans); }
.reply-btn:hover { color: var(--crimson); }

/* RELATED */
.related-section { margin-bottom: 56px; padding-top: 24px; border-top: 1px solid var(--line); }
.related-title { font-family: var(--serif); font-size: 22px; font-weight: 600; color: var(--ink); margin-bottom: 16px; }
.related-pills { display: flex; flex-wrap: wrap; gap: 10px; }
.related-pill { padding: 10px 16px; background: var(--white-warm); border: 1px solid var(--line); color: var(--ink-soft); border-radius: var(--radius); font-family: var(--sans); font-size: 14px; font-weight: 500; cursor: pointer; transition: all .15s; }
.related-pill:hover { border-color: var(--gold); color: var(--crimson); transform: translateY(-1px); }

/* COMMENTS — open discussion */
.comments-section { padding-top: 32px; border-top: 1px solid var(--line); }
.comment-form-wrap { margin: 28px 0; }
.form-locked { background: var(--parchment-dark); border: 1px dashed var(--ink-mute); padding: 22px; border-radius: var(--radius); text-align: center; font-size: 15px; color: var(--ink-soft); }
.form-active { background: var(--white-warm); border: 1px solid var(--line); padding: 20px; border-radius: var(--radius); }
.comment-textarea { width: 100%; min-height: 110px; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; font-family: var(--sans); font-size: 15px; line-height: 1.6; color: var(--ink); background: var(--parchment-warm); resize: vertical; transition: border-color .15s, box-shadow .15s; }
.comment-textarea:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(184,137,58,0.12); }
.form-bottom { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; }
.char-count { font-size: 13px; color: var(--ink-light); }

.comment-controls { display: flex; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.select-input { padding: 9px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white-warm); font-family: var(--sans); font-size: 13px; color: var(--ink-soft); cursor: pointer; }
.select-input:focus { outline: none; border-color: var(--gold); }
.text-input { width: 100%; padding: 9px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--parchment-warm); font-family: var(--sans); font-size: 14px; color: var(--ink); transition: border-color .15s, box-shadow .15s; }
.text-input:focus, .select-input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(184,137,58,0.12); }

.comment-list { display: flex; flex-direction: column; gap: 14px; }
.comment-item { background: var(--white-warm); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 18px 20px; display: flex; gap: 14px; }
.comment-avatar { width: 38px; height: 38px; border-radius: 50%; background: linear-gradient(135deg, var(--gold), var(--gold-dark)); color: var(--white-warm); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; font-family: var(--serif); flex-shrink: 0; }
.comment-reply-item .comment-avatar { width: 28px; height: 28px; font-size: 11px; }
.comment-body { flex: 1; min-width: 0; }
.comment-meta { display: flex; gap: 8px; align-items: center; margin-bottom: 6px; flex-wrap: wrap; }
.comment-author { font-weight: 600; color: var(--ink); font-size: 14px; }
.comment-denom-tag { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; background: var(--parchment-dark); color: var(--ink-soft); padding: 3px 8px; border-radius: 100px; }
.comment-date { font-size: 12px; color: var(--ink-light); }
.comment-text { font-size: 15px; line-height: 1.6; color: var(--ink); margin-bottom: 10px; }
.comment-actions { display: flex; gap: 14px; align-items: center; }
.upvote-btn { background: none; border: 1px solid var(--line); border-radius: var(--radius); padding: 4px 10px; font-size: 13px; color: var(--ink-light); font-weight: 600; cursor: pointer; transition: all .15s; font-family: var(--sans); }
.upvote-btn:hover { border-color: var(--gold); color: var(--gold-dark); }
.upvote-btn.voted { background: var(--gold); color: white; border-color: var(--gold); }
.delete-btn { background: none; border: none; color: var(--ink-light); font-size: 12px; cursor: pointer; text-decoration: underline; font-family: var(--sans); }
.delete-btn:hover { color: var(--deny); }

/* COMMENT TYPE TABS */
.ctype-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; padding-bottom: 14px; border-bottom: 1px solid var(--line-soft); }
.ctype-tab { background: transparent; border: 1px solid var(--line); color: var(--ink-light); padding: 7px 13px; border-radius: var(--radius); font-family: var(--sans); font-size: 13px; font-weight: 500; cursor: pointer; transition: all .15s; white-space: nowrap; }
.ctype-tab:hover { color: var(--ink); border-color: var(--gold); }
.ctype-tab.active { background: var(--ink); color: var(--white-warm); border-color: var(--ink); }
.ctype-helper { font-size: 13px; color: var(--ink-light); padding: 6px 2px 10px; font-style: italic; }
.ctype-fields { margin-bottom: 12px; display: flex; flex-direction: column; gap: 10px; }
.ctype-field-row { display: flex; flex-direction: column; gap: 5px; }
.ctype-field-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--ink-light); font-weight: 600; }

.comment-type-badge { display: inline-flex; align-items: center; gap: 4px; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; padding: 3px 8px; border-radius: 100px; margin-left: 4px; }
.ctb-general      { background: #eef2f5; color: #5a6b7a; }
.ctb-responding   { background: var(--deny-bg); color: var(--deny); }
.ctb-edit         { background: var(--nuanced-bg); color: var(--nuanced); }
.ctb-verse        { background: var(--aff-bg); color: var(--aff); }
.ctb-reply        { background: #e9eef5; color: #3a5a85; }
.comment-target-line { font-size: 12px; color: var(--ink-light); margin-bottom: 6px; font-style: italic; }
.comment-target-line strong { color: var(--ink-soft); font-style: normal; font-weight: 600; }

/* EMPTY STATES */
.empty-state { text-align: center; padding: 48px 24px; color: var(--ink-light); background: var(--parchment-warm); border: 1px dashed var(--line); border-radius: var(--radius); }
.empty-state-icon { font-size: 36px; margin-bottom: 12px; opacity: 0.6; }
.loading-spinner { text-align: center; padding: 28px; color: var(--ink-light); }
.error-msg, .success-msg { padding: 10px 14px; border-radius: var(--radius); font-size: 13px; margin-top: 10px; }
.error-msg, .alert-error { background: var(--deny-bg); color: var(--deny); border: 1px solid #d4a4a4; }
.success-msg, .alert-success { background: var(--aff-bg); color: var(--aff); border: 1px solid #a4c4ad; }
.alert-error, .alert-success { padding: 10px 14px; border-radius: var(--radius); font-size: 13px; margin-bottom: 12px; }

/* USER PILL */
.user-pill { display: inline-flex; align-items: center; gap: 10px; background: var(--parchment-warm); border: 1px solid var(--line); padding: 6px 14px 6px 6px; border-radius: 100px; }
.user-avatar { width: 28px; height: 28px; border-radius: 50%; background: linear-gradient(135deg, var(--gold), var(--gold-dark)); color: var(--white-warm); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 12px; font-family: var(--serif); }
.user-pill span { font-size: 13px; font-weight: 600; color: var(--ink); }

/* MODAL */
.modal { display: none; position: fixed; inset: 0; background: rgba(26,20,16,0.65); z-index: 1000; align-items: center; justify-content: center; padding: 20px; backdrop-filter: blur(4px); }
.modal.open { display: flex; }
.modal-card { background: var(--white-warm); border-radius: var(--radius-lg); padding: 36px; width: 100%; max-width: 440px; position: relative; box-shadow: var(--shadow-lg); border: 1px solid var(--line); max-height: 90vh; overflow-y: auto; }
.modal-close { position: absolute; top: 14px; right: 16px; background: none; border: none; font-size: 20px; color: var(--ink-light); cursor: pointer; padding: 4px 8px; }
.modal-close:hover { color: var(--crimson); }
.modal-title { font-family: var(--serif); font-size: 28px; font-weight: 600; color: var(--ink); margin-bottom: 8px; }
.modal-sub { font-size: 14px; color: var(--ink-light); margin-bottom: 22px; }
.field-lbl { display: block; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; color: var(--ink-soft); margin-bottom: 6px; margin-top: 14px; }
.field-opt { font-weight: 400; text-transform: none; letter-spacing: 0; color: var(--ink-light); font-size: 11px; }
.modal .btn-full { margin-top: 22px; }
.modal-foot { text-align: center; margin-top: 18px; font-size: 13px; color: var(--ink-light); }

/* FOOTER */
.site-foot { background: var(--ink); color: var(--parchment); padding: 56px 32px; margin-top: 80px; }
.foot-inner { max-width: var(--max-w); margin: 0 auto; display: grid; grid-template-columns: auto 1fr; gap: 48px; align-items: start; }
.foot-brand { display: flex; align-items: center; gap: 14px; color: var(--parchment); }
.foot-brand .brand-mark { font-size: 32px; }
.foot-brand .brand-name { font-family: var(--serif); font-size: 22px; font-weight: 600; color: var(--parchment); }
.foot-brand .brand-sub { font-size: 11px; text-transform: uppercase; letter-spacing: 0.15em; color: var(--gold-light); margin-top: 2px; }
.foot-text p { font-size: 14px; line-height: 1.65; color: var(--parchment-dark); margin-bottom: 10px; max-width: 720px; }
.foot-meta { font-size: 12px !important; color: var(--ink-mute) !important; margin-top: 16px !important; letter-spacing: 0.02em; }

/* VERSE PILL */
.verse-pill { transition: all .15s ease; user-select: none; cursor: pointer; }
.verse-pill:hover { background: var(--gold); color: var(--white-warm); border-color: var(--gold-dark); transform: translateY(-1px); box-shadow: 0 2px 6px rgba(184,137,58,0.25); }

/* VERSE POPOVER */
.verse-popover { position: absolute; z-index: 200; width: 370px; max-width: calc(100vw - 20px); background: var(--white-warm); border: 1px solid var(--gold); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); padding: 16px 18px; font-family: var(--serif); animation: vpop 0.15s ease; pointer-events: none; }
@keyframes vpop { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: translateY(0); } }
.verse-popover-ref { font-family: var(--sans); font-size: 11px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold-dark); margin-bottom: 8px; padding-bottom: 8px; border-bottom: 1px solid var(--line-soft); }
.verse-popover-body { font-size: 15px; line-height: 1.65; color: var(--ink-soft); max-height: 240px; overflow-y: auto; margin-bottom: 10px; }
.verse-popover-foot { font-family: var(--sans); font-size: 11px; color: var(--ink-light); letter-spacing: 0.04em; border-top: 1px solid var(--line-soft); padding-top: 8px; }

/* RESPONSIVE */
@media (max-width: 880px) {
  .topbar-inner { padding: 14px 20px; gap: 16px; }
  .nav-links { display: none; }
  .brand-sub { display: none; }
  .hero { padding: 64px 20px 56px; }
  .section-inner { padding: 56px 20px; }
  .detail-inner { padding: 32px 20px 64px; }
  .detail-bar-inner { padding: 12px 20px; }
  .about-grid { grid-template-columns: 1fr; gap: 32px; }
  .hero-stats { gap: 32px; }
  .stat-num { font-size: 32px; }
  .foot-inner { grid-template-columns: 1fr; gap: 28px; padding: 0 0; }
  .site-foot { padding: 40px 20px; }
  .denom-card-content { padding: 22px 20px 0; }
  .denom-forum-toggle { padding: 12px 20px; }
  .denom-forum-body { padding: 18px 20px; }
  .modal-card { padding: 28px 22px; }
  .question-card-head { padding: 20px 20px 16px; gap: 14px; }
  .question-number { font-size: 22px; }
  .question-title { font-size: 19px; }
  .question-toggle { padding: 12px 20px; }
  .question-forum-body { padding: 18px 20px; }
  .movement-meta-grid { grid-template-columns: 1fr; }
  .distinctive-card { flex-direction: column; gap: 10px; padding: 18px; }
  .distinctive-num { font-size: 26px; }
  .movement-summary-block { padding: 22px 20px; }
}
@media (max-width: 520px) {
  .topbar-auth .btn { padding: 8px 14px; font-size: 13px; }
  .hero-title { font-size: 36px; }
  .hero-lede { font-size: 16px; }
  .hero-actions .btn { flex: 1; min-width: 0; }
  .detail-title, .movement-title { font-size: 30px; }
  .topic-grid, .movement-grid { grid-template-columns: 1fr; }
  .verse-popover { width: calc(100vw - 20px); }
  .comment-replies-wrap { padding-left: 10px; }
  .questions-title { font-size: 24px; }
}

/* ═══════════════════════════════════════════════════════════════
   PATCH 7 — Bubble formatting fix, religions, notifications
   ═══════════════════════════════════════════════════════════════ */


/* ─── BUBBLE FORMATTING FIX ──────────────────────────────────────
   The bolded final question on each card was rendering as awkward
   italic block text. Replace with a proper callout: serif weight,
   accent left border, breathing room, no italic.
   ──────────────────────────────────────────────────────────────── */
.question-body strong {
  display: block;
  margin-top: 20px;
  padding: 16px 20px;
  background: var(--parchment-warm, #f5efe2);
  border-left: 3px solid var(--gold, #b08a3f);
  border-radius: 0 6px 6px 0;
  color: var(--ink, #1a1a1a);
  font-size: 16.5px;
  font-weight: 600;
  font-family: var(--serif);
  font-style: normal;
  line-height: 1.55;
  letter-spacing: 0.01em;
}
.question-body strong::before {
  content: "“";
  display: inline;
  color: var(--gold, #b08a3f);
  font-size: 22px;
  font-weight: 700;
  line-height: 0;
  margin-right: 4px;
  vertical-align: -2px;
}
.question-body strong::after {
  content: "”";
  display: inline;
  color: var(--gold, #b08a3f);
  font-size: 22px;
  font-weight: 700;
  line-height: 0;
  margin-left: 2px;
  vertical-align: -2px;
}


/* ─── TOPBAR RIGHT (notification bell + auth) ──────────────────── */
.topbar-right {
  display: flex;
  align-items: center;
  gap: 14px;
}


/* ─── NOTIFICATION BELL ────────────────────────────────────────── */
.notif-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.notif-bell {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: transparent;
  border: 1px solid var(--line-soft, #e0d8c5);
  color: var(--ink-soft, #4a4438);
  cursor: pointer;
  transition: all 0.18s ease;
  padding: 0;
}
.notif-bell:hover {
  background: var(--parchment-warm, #f5efe2);
  color: var(--ink, #1a1a1a);
  border-color: var(--gold, #b08a3f);
}
.notif-bell.has-unread {
  color: var(--crimson, #8a2a2a);
  border-color: var(--crimson, #8a2a2a);
}
.notif-bell svg {
  display: block;
}

.notif-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: var(--crimson, #8a2a2a);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--sans, 'Inter', sans-serif);
  line-height: 1;
  border: 2px solid var(--parchment, #f9f4e8);
  box-sizing: content-box;
}

.notif-panel {
  display: none;
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 380px;
  max-height: 480px;
  background: #fff;
  border: 1px solid var(--line-soft, #e0d8c5);
  border-radius: 10px;
  box-shadow: 0 12px 36px rgba(0,0,0,0.18);
  z-index: 200;
  overflow: hidden;
  flex-direction: column;
}
.notif-panel.open {
  display: flex;
}

.notif-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line-soft, #e0d8c5);
  background: var(--parchment-warm, #f5efe2);
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 600;
  color: var(--ink, #1a1a1a);
  flex-shrink: 0;
}
.notif-mark-all {
  background: transparent;
  border: none;
  color: var(--ink-soft, #4a4438);
  font-size: 12px;
  font-family: var(--sans, 'Inter', sans-serif);
  cursor: pointer;
  text-decoration: underline;
  padding: 4px 0;
}
.notif-mark-all:hover { color: var(--crimson, #8a2a2a); }

.notif-panel-body {
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}

.notif-empty {
  padding: 28px 22px;
  color: var(--ink-soft, #4a4438);
  font-size: 13.5px;
  line-height: 1.6;
  text-align: center;
  font-family: var(--sans);
}

.notif-item {
  display: flex;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line-soft, #e0d8c5);
  background: transparent;
  border-left: 0;
  border-right: 0;
  border-top: 0;
  width: 100%;
  text-align: left;
  cursor: pointer;
  position: relative;
  transition: background 0.15s ease;
  font-family: var(--sans, 'Inter', sans-serif);
}
.notif-item:hover { background: var(--parchment-warm, #f5efe2); }
.notif-item.unread { background: rgba(176,138,63,0.06); }
.notif-item.unread:hover { background: rgba(176,138,63,0.12); }
.notif-item:last-child { border-bottom: none; }

.notif-item-icon {
  font-size: 18px;
  line-height: 1;
  margin-top: 2px;
  flex-shrink: 0;
}

.notif-item-body { flex: 1; min-width: 0; }
.notif-item-line {
  font-size: 13.5px;
  color: var(--ink, #1a1a1a);
  line-height: 1.45;
}
.notif-item-line strong { font-weight: 600; }
.notif-excerpt {
  margin-top: 4px;
  font-size: 12.5px;
  color: var(--ink-soft, #4a4438);
  font-style: italic;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.notif-item-when {
  margin-top: 5px;
  font-size: 11.5px;
  color: var(--ink-faint, #8a8270);
}

.notif-dot {
  position: absolute;
  top: 18px;
  right: 14px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--crimson, #8a2a2a);
}

/* Flash highlight when scrolled-to comment is anchored from notification */
.notif-flash {
  animation: notifFlash 2s ease-out;
}
@keyframes notifFlash {
  0%   { background: rgba(176,138,63,0.35); }
  40%  { background: rgba(176,138,63,0.25); }
  100% { background: transparent; }
}


/* ═══ RELIGIONS SECTION ═══════════════════════════════════════════
   Distinct accent: deep teal/forest green to differentiate from
   crimson (Christianity proper) and purple (movements at margin).
   ────────────────────────────────────────────────────────────── */

.religions-section {
  background: linear-gradient(180deg, #f3f4ed 0%, #ebeee4 100%);
  padding: 90px 0;
  border-top: 1px solid var(--line-soft, #e0d8c5);
}

.religions-eyebrow {
  color: #2d5547 !important;
}

.religion-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 22px;
  margin-top: 36px;
}

.religion-card {
  background: #fff;
  border: 1px solid var(--line-soft, #e0d8c5);
  border-radius: 10px;
  padding: 26px 24px;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  display: flex;
  flex-direction: column;
  border-left: 3px solid #2d5547;
}
.religion-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(45,85,71,0.18);
  border-left-color: #1f3d33;
}

.religion-icon {
  font-size: 32px;
  line-height: 1;
  margin-bottom: 14px;
}

.religion-badge {
  position: absolute;
  top: 16px;
  right: 18px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #2d5547;
  background: #e8efe9;
  padding: 4px 8px;
  border-radius: 4px;
  font-family: var(--sans, 'Inter', sans-serif);
}

.religion-name {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 600;
  color: var(--ink, #1a1a1a);
  margin-bottom: 6px;
  line-height: 1.25;
}

.religion-founded {
  font-size: 12.5px;
  color: var(--ink-faint, #8a8270);
  font-family: var(--sans, 'Inter', sans-serif);
  margin-bottom: 12px;
  letter-spacing: 0.02em;
}

.religion-summary-preview {
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink-soft, #4a4438);
  margin-bottom: 18px;
  font-family: var(--sans, 'Inter', sans-serif);
  flex: 1;
}

.religion-card-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 14px;
  border-top: 1px solid var(--line-soft, #e0d8c5);
  margin-top: auto;
}

.religion-adherents {
  font-size: 12px;
  color: var(--ink-faint, #8a8270);
  font-family: var(--sans, 'Inter', sans-serif);
}

.religion-questions-tag {
  font-size: 11.5px;
  color: #2d5547;
  font-weight: 600;
  font-family: var(--sans, 'Inter', sans-serif);
  letter-spacing: 0.02em;
}


/* ─── RELIGION DETAIL VIEW ─────────────────────────────────────── */

.religion-detail-bar {
  background: linear-gradient(180deg, #2d5547 0%, #1f3d33 100%);
}
.religion-detail-bar .back-link {
  color: rgba(255,255,255,0.92);
}
.religion-detail-bar .back-link:hover {
  color: #fff;
}
.religion-detail-tag {
  background: rgba(255,255,255,0.15);
  color: #fff !important;
  border-color: rgba(255,255,255,0.2) !important;
}

.religion-article {
  background: var(--parchment, #f9f4e8);
  padding: 60px 0 100px;
  min-height: 80vh;
}

.religion-head {
  text-align: center;
  margin-bottom: 50px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--line-soft, #e0d8c5);
}

.religion-head-eyebrow {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #2d5547;
  margin-bottom: 18px;
}

.religion-title {
  font-family: var(--serif);
  font-size: 56px;
  font-weight: 600;
  color: var(--ink, #1a1a1a);
  line-height: 1.05;
  margin-bottom: 28px;
  letter-spacing: -0.01em;
}

.religion-meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  max-width: 820px;
  margin: 0 auto;
  text-align: left;
}

.religion-meta-row {
  background: #fff;
  border: 1px solid var(--line-soft, #e0d8c5);
  border-radius: 6px;
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.religion-meta-label {
  font-family: var(--sans);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint, #8a8270);
}

.religion-meta-row span:last-child {
  font-family: var(--sans);
  font-size: 13.5px;
  color: var(--ink, #1a1a1a);
  line-height: 1.5;
}

.religion-summary-block {
  background: #fff;
  border: 1px solid var(--line-soft, #e0d8c5);
  border-left: 3px solid #2d5547;
  border-radius: 6px;
  padding: 32px 38px;
  margin-bottom: 40px;
}

.religion-summary {
  font-family: var(--serif);
  font-size: 17.5px;
  line-height: 1.75;
  color: var(--ink, #1a1a1a);
}
.religion-summary p { margin-bottom: 16px; }
.religion-summary p:last-child { margin-bottom: 0; }

.religion-core-block { margin-bottom: 50px; }

.religion-core-beliefs {
  display: grid;
  gap: 16px;
}

.religion-core-beliefs > div {
  background: #fff;
  border: 1px solid var(--line-soft, #e0d8c5);
  border-radius: 6px;
  padding: 22px 26px;
  border-left: 3px solid #2d5547;
}

.religion-core-beliefs h4 {
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 600;
  color: var(--ink, #1a1a1a);
  margin-bottom: 8px;
  line-height: 1.3;
}

.religion-core-beliefs p {
  font-family: var(--sans);
  font-size: 14.5px;
  line-height: 1.65;
  color: var(--ink-soft, #4a4438);
}

.religion-keytexts-block { margin-bottom: 50px; }

/* Reuses .keytexts-grid styling from movement section */


/* ─── COMPARISON BLOCK (contact vs divergence) ─────────────────── */

.religion-comparison-block {
  margin-bottom: 60px;
}

.comparison-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}

.comparison-column {
  background: #fff;
  border: 1px solid var(--line-soft, #e0d8c5);
  border-radius: 8px;
  padding: 28px 28px;
}

.contact-column {
  border-left: 3px solid #4a8a6f;
}
.divergence-column {
  border-left: 3px solid #8a2a2a;
}

.comparison-title {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 18px;
  line-height: 1.3;
}

.contact-title { color: #2d5547; }
.divergence-title { color: var(--crimson, #8a2a2a); }

.comparison-body {
  font-family: var(--sans);
  font-size: 14.5px;
  line-height: 1.7;
  color: var(--ink-soft, #4a4438);
}
.comparison-body p { margin-bottom: 14px; }
.comparison-body p:last-child { margin-bottom: 0; }
.comparison-body strong { color: var(--ink, #1a1a1a); }


/* ─── RELIGION QUESTIONS BANNER ─────────────────────────────────── */

.religion-questions-banner {
  background: linear-gradient(135deg, #2d5547 0%, #1f3d33 100%);
}


/* ─── RELIGION RELATION BLOCK ──────────────────────────────────── */

.religion-relation-block {
  background: #fff;
  border: 1px solid var(--line-soft, #e0d8c5);
  border-radius: 8px;
  padding: 36px 40px;
  margin-bottom: 40px;
}

.religion-historical-relation {
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.75;
  color: var(--ink-soft, #4a4438);
}
.religion-historical-relation p { margin-bottom: 16px; }
.religion-historical-relation p:last-child { margin-bottom: 0; }
.religion-historical-relation strong { color: var(--ink, #1a1a1a); }
.religion-historical-relation em { font-style: italic; color: var(--crimson, #8a2a2a); }


/* ─── RESPONSIVE ───────────────────────────────────────────────── */

@media (max-width: 820px) {
  .notif-panel {
    width: calc(100vw - 32px);
    right: -8px;
    max-width: 360px;
  }
  .religion-title { font-size: 38px; }
  .comparison-grid { grid-template-columns: 1fr; }
  .religion-summary-block { padding: 24px 22px; }
  .religion-relation-block { padding: 24px 22px; }
  .religion-meta-grid { grid-template-columns: 1fr; }
  .religions-section { padding: 60px 0; }
  .topbar-right { gap: 10px; }
  .notif-bell { width: 34px; height: 34px; }
}

@media (max-width: 480px) {
  .religion-title { font-size: 30px; }
  .religion-summary { font-size: 16px; }
  .comparison-column { padding: 22px 20px; }
  .question-body strong {
    padding: 14px 16px;
    font-size: 15.5px;
  }
}

.nav-link.active { color: var(--crimson, #8a2a2a); font-weight: 600; }

/* ═══════════════════════════════════════════════════════════════
   PATCH 9 — Gap fix, Contact card, Questions Corner
   ═══════════════════════════════════════════════════════════════ */

/* ─── Fix top gap on standalone-route sections ─────────────────── */
.movements-section,
.religions-section,
.questions-section { padding-top: 40px; }

/* ─── Contact card on About page ──────────────────────────────── */
.contact-card { position: relative; }
.contact-btn {
  display: inline-block;
  margin-top: 10px;
  padding: 8px 16px;
  background: var(--crimson, #8a2a2a);
  color: #fff;
  border-radius: 5px;
  font-family: var(--sans);
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s ease;
}
.contact-btn:hover { background: #6e1f1f; }
.coming-soon-pill {
  display: inline-block;
  margin-left: 10px;
  padding: 3px 8px;
  background: var(--parchment-warm, #f5efe2);
  color: var(--ink-faint, #8a8270);
  border: 1px solid var(--line-soft, #e0d8c5);
  border-radius: 10px;
  font-family: var(--sans);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  vertical-align: middle;
}

/* ─── Questions Corner ────────────────────────────────────────── */
.questions-section {
  background: linear-gradient(180deg, #f7f1e8 0%, #efe6d4 100%);
  padding-bottom: 90px;
}
.qc-eyebrow { color: #6a4d8c !important; }

.qc-section-h {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 18px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line-soft, #e0d8c5);
}
.qc-section-h-spaced { margin-top: 50px; }

.qc-floor {
  background: #fff;
  border: 1px solid var(--line-soft, #e0d8c5);
  border-left: 3px solid #6a4d8c;
  border-radius: 8px;
  padding: 26px 30px;
  margin-top: 30px;
}
.qc-thread-host { margin-top: 14px; }

.qc-denom-list { margin-top: 14px; display: flex; flex-direction: column; gap: 10px; }

.qc-denom {
  background: #fff;
  border: 1px solid var(--line-soft, #e0d8c5);
  border-radius: 8px;
  overflow: hidden;
}
.qc-denom[open] { border-color: #6a4d8c; }
.qc-denom-head {
  list-style: none;
  cursor: pointer;
  padding: 16px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--parchment-warm, #f5efe2);
  font-family: var(--serif);
}
.qc-denom-head::-webkit-details-marker { display: none; }
.qc-denom-name { font-size: 17px; font-weight: 600; color: var(--ink); }
.qc-denom-arrow {
  font-size: 14px;
  color: var(--ink-faint);
  transition: transform 0.2s;
}
.qc-denom[open] .qc-denom-arrow { transform: rotate(180deg); }

.qc-questions-list { padding: 8px 22px 18px; display: flex; flex-direction: column; gap: 6px; }

.qc-q {
  background: var(--parchment, #f9f4e8);
  border: 1px solid var(--line-soft, #e0d8c5);
  border-radius: 6px;
}
.qc-q[open] { background: #fff; }
.qc-q-head {
  list-style: none;
  cursor: pointer;
  padding: 12px 16px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  font-family: var(--serif);
  font-size: 15px;
  line-height: 1.45;
  color: var(--ink);
}
.qc-q-head::-webkit-details-marker { display: none; }
.qc-q-text { flex: 1; }
.qc-q-arrow {
  font-size: 18px;
  color: var(--ink-faint);
  flex-shrink: 0;
  transition: transform 0.2s;
}
.qc-q[open] .qc-q-arrow { transform: rotate(90deg); }
.qc-q-thread { padding: 6px 16px 16px; border-top: 1px solid var(--line-soft, #e0d8c5); margin-top: 4px; }

.qc-form-host { margin-bottom: 14px; }
.qc-input { width: 100%; margin-bottom: 8px; min-height: 70px; }
.qc-form-actions { display: flex; justify-content: flex-end; }
.qc-locked {
  background: var(--parchment-warm);
  border: 1px dashed var(--line-soft);
  border-radius: 6px;
  padding: 10px 14px;
  font-size: 13px;
  color: var(--ink-soft);
  font-family: var(--sans);
}

.qc-list { display: flex; flex-direction: column; gap: 10px; }
.qc-empty {
  padding: 12px 0;
  font-size: 13.5px;
  color: var(--ink-faint);
  font-family: var(--sans);
  font-style: italic;
}

.qc-item {
  display: flex;
  gap: 12px;
  padding: 12px 14px;
  background: var(--parchment-warm, #f5efe2);
  border-radius: 6px;
  font-family: var(--sans);
}
.qc-vote { display: flex; flex-direction: column; align-items: center; gap: 2px; flex-shrink: 0; }
.qc-upbtn {
  background: transparent;
  border: 1px solid var(--line-soft);
  border-radius: 4px;
  width: 28px;
  height: 28px;
  cursor: pointer;
  color: var(--ink-soft);
  font-size: 12px;
  transition: all 0.15s;
}
.qc-upbtn:hover:not(:disabled) { background: #fff; border-color: #6a4d8c; color: #6a4d8c; }
.qc-upbtn.voted { background: #6a4d8c; color: #fff; border-color: #6a4d8c; }
.qc-upbtn:disabled { opacity: 0.4; cursor: not-allowed; }
.qc-votecount { font-size: 12.5px; font-weight: 600; color: var(--ink-soft); }
.qc-body-wrap { flex: 1; min-width: 0; }
.qc-meta { font-size: 12.5px; color: var(--ink-faint); margin-bottom: 4px; display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.qc-meta strong { color: var(--ink); font-weight: 600; }
.qc-denom-tag {
  background: #fff;
  border: 1px solid var(--line-soft);
  border-radius: 3px;
  padding: 1px 6px;
  font-size: 10.5px;
  font-weight: 600;
  color: var(--ink-soft);
  letter-spacing: 0.02em;
}
.qc-when { font-style: italic; }
.qc-text { font-size: 14px; line-height: 1.55; color: var(--ink); white-space: pre-wrap; }

@media (max-width: 820px) {
  .qc-floor { padding: 20px 18px; }
  .qc-denom-head { padding: 14px 16px; }
  .qc-questions-list { padding: 6px 12px 14px; }
}

/* ─── v2 additions: per-denom body, community-question accordion, ask form ── */
.qc-denom-body { padding: 4px 22px 18px; }

.qc-subsection-label {
  font-family: var(--sans);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint, #8a8270);
  margin: 14px 0 10px;
}
.qc-subsection-label-spaced { margin-top: 28px; }

.qc-user-q-list { display: flex; flex-direction: column; gap: 6px; }

.qc-uq {
  background: var(--parchment, #f9f4e8);
  border: 1px solid var(--line-soft, #e0d8c5);
  border-radius: 6px;
}
.qc-uq[open] { background: #fff; border-color: #6a4d8c; }
.qc-uq-head {
  list-style: none;
  cursor: pointer;
  padding: 12px 14px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-family: var(--sans);
}
.qc-uq-head::-webkit-details-marker { display: none; }
.qc-vote-inline { flex-shrink: 0; }
.qc-uq-body { flex: 1; min-width: 0; }
.qc-uq-text {
  font-family: var(--serif);
  font-size: 15px;
  line-height: 1.45;
  color: var(--ink);
  margin-bottom: 4px;
}
.qc-uq-meta {
  font-size: 11.5px;
  color: var(--ink-faint);
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.qc-uq-meta strong { color: var(--ink); font-weight: 600; }
.qc-uq-answers {
  padding: 8px 14px 14px;
  border-top: 1px solid var(--line-soft);
  margin-top: 6px;
}

.qc-ask-host {
  margin-top: 14px;
  padding: 16px 18px;
  background: var(--parchment-warm, #f5efe2);
  border: 1px dashed var(--line-soft, #e0d8c5);
  border-radius: 8px;
}
.qc-ask-label {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
  margin-bottom: 8px;
}
.qc-ask-input { width: 100%; min-height: 60px; margin-bottom: 8px; }
.qc-locked-inline {
  font-family: var(--sans);
  font-size: 12.5px;
  color: var(--ink-faint);
  font-style: italic;
}

/* ═══════════════════════════════════════════════════════════════
   PATCH 10 — Legal pages, 404, empty-state CTAs
   ═══════════════════════════════════════════════════════════════ */

.legal-page {
  background: var(--parchment, #f9f4e8);
  min-height: 80vh;
  padding: 60px 0 100px;
}
.legal-inner {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 24px;
}
.legal-eyebrow {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold, #b08a3f);
  margin-bottom: 16px;
}
.legal-title {
  font-family: var(--serif);
  font-size: 48px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.1;
  margin-bottom: 14px;
  letter-spacing: -0.01em;
}
.legal-meta {
  font-family: var(--sans);
  font-size: 13px;
  color: var(--ink-faint);
  margin-bottom: 32px;
}
.legal-lede {
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.65;
  color: var(--ink-soft);
  margin-bottom: 28px;
  font-style: italic;
}
.legal-page h2 {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 600;
  color: var(--ink);
  margin-top: 36px;
  margin-bottom: 12px;
}
.legal-page p, .legal-page ul {
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.7;
  color: var(--ink-soft);
  margin-bottom: 14px;
}
.legal-page ul { padding-left: 24px; }
.legal-page li { margin-bottom: 6px; }
.legal-page a { color: var(--crimson, #8a2a2a); text-decoration: underline; }
.legal-note {
  margin-top: 40px;
  padding: 16px 20px;
  background: var(--parchment-warm, #f5efe2);
  border-left: 3px solid var(--gold, #b08a3f);
  border-radius: 0 4px 4px 0;
  font-size: 13.5px !important;
}
.legal-back {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--line-soft);
}

.legal-404 { text-align: center; padding-top: 80px; }
.legal-404 .legal-title { font-style: italic; font-size: 42px; }

/* ─── Footer secondary links ─────────────────────────────────── */
.foot-links {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  margin-top: 12px;
  font-size: 13px;
  font-family: var(--sans);
}
.foot-links a {
  color: var(--ink-soft);
  text-decoration: none;
  transition: color 0.15s;
}
.foot-links a:hover { color: var(--crimson, #8a2a2a); text-decoration: underline; }
.foot-links .sep { color: var(--line-soft); }

/* Patch 11 — flattened-reply marker */
.in-reply-to {
  font-family: var(--sans);
  font-size: 11.5px;
  color: var(--ink-faint);
  margin-bottom: 6px;
  padding: 2px 8px;
  background: var(--parchment-warm, #f5efe2);
  border-radius: 3px;
  display: inline-block;
}
.in-reply-to strong { color: var(--ink-soft); font-weight: 600; }


/* ═══════════════════════════════════════════════════════════════════════
   PATCH 12 — Discussion pages, Discuss buttons, me page
   ═══════════════════════════════════════════════════════════════════════ */

/* ─── "Discuss →" button on denom + question cards ────────────────────── */
.denom-discuss-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 14px 18px;
  background: var(--parchment-warm, #f5efe2);
  border: none;
  border-top: 1px solid var(--line-soft, #e0d8c5);
  font-family: var(--sans, 'Inter', sans-serif);
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink-soft, #4a4438);
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}
.denom-discuss-btn:hover {
  background: #efe8d4;
  color: var(--crimson, #8a2a2a);
}
.denom-discuss-btn-left {
  display: flex;
  align-items: center;
  gap: 8px;
}
.denom-discuss-icon { font-size: 14px; }
.denom-discuss-label { font-weight: 600; }
.denom-discuss-arrow {
  font-family: var(--serif);
  font-size: 13px;
  font-style: italic;
  color: var(--crimson, #8a2a2a);
  font-weight: 600;
}

/* Movement / Religion question cards (no longer accordions) */
.question-card-flat {
  background: #fff;
  border: 1px solid var(--line-soft, #e0d8c5);
  border-radius: var(--radius, 8px);
  margin-bottom: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.question-card-flat-content {
  padding: 22px 26px 18px;
}
.question-card-flat-title {
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 600;
  color: var(--ink, #1a1a1a);
  margin: 0 0 10px;
  line-height: 1.3;
}
.question-card-flat-body {
  font-family: var(--sans, 'Inter', sans-serif);
  font-size: 14.5px;
  line-height: 1.65;
  color: var(--ink-soft, #4a4438);
}
.question-card-flat-body p { margin-bottom: 10px; }
.question-card-flat-body p:last-child { margin-bottom: 0; }
.question-card-flat-body strong {
  display: block;
  margin-top: 16px;
  padding: 14px 18px;
  background: var(--parchment-warm, #f5efe2);
  border-left: 3px solid var(--gold, #b08a3f);
  border-radius: 0 6px 6px 0;
  color: var(--ink, #1a1a1a);
  font-size: 15.5px;
  font-weight: 600;
  font-family: var(--serif);
}

/* ─── DISCUSSION PAGE ─────────────────────────────────────────────────── */
#discussion-view {
  background: var(--parchment, #f9f4e8);
  min-height: 80vh;
}
.discussion-article {
  padding: 50px 0 100px;
}
.discussion-head {
  background: #fff;
  border: 1px solid var(--line-soft, #e0d8c5);
  border-radius: var(--radius-lg, 10px);
  padding: 32px 40px;
  margin-bottom: 36px;
}
.movement-discussion-head { border-left: 4px solid #6a4d8c; }
.religion-discussion-head { border-left: 4px solid #2d5547; }

.discussion-eyebrow {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-faint, #8a8270);
  margin-bottom: 12px;
}
.discussion-title {
  font-family: var(--serif);
  font-size: 36px;
  font-weight: 600;
  color: var(--ink, #1a1a1a);
  line-height: 1.15;
  margin-bottom: 18px;
  letter-spacing: -0.01em;
}
.discussion-stance {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 4px;
  font-family: var(--sans);
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 18px;
}
.discussion-position-body {
  font-family: var(--serif);
  font-size: 16.5px;
  line-height: 1.75;
  color: var(--ink, #1a1a1a);
}
.discussion-position-body p { margin-bottom: 12px; }
.discussion-position-body strong { font-weight: 600; }
.discussion-position-body em { font-style: italic; color: var(--crimson, #8a2a2a); }

.discussion-verses {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line-soft);
}
.discussion-verses-label {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 8px;
}

.discussion-section-title {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 20px;
}

.discussion-compose {
  background: #fff;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  padding: 20px 22px;
  margin-bottom: 20px;
}
.ctype-tabs-discussion {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.my-contributions-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px;
  background: var(--parchment-warm, #f5efe2);
  border: 1px solid var(--gold, #b08a3f);
  border-radius: 6px;
  font-family: var(--sans);
  font-size: 13px;
  color: var(--ink-soft);
  margin-bottom: 14px;
}
.my-jump-btn {
  background: var(--gold, #b08a3f);
  color: #fff;
  border: none;
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.my-jump-btn:hover { background: #966f2c; }

.discussion-filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line-soft);
  flex-wrap: wrap;
}
.discussion-filter-chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.discussion-chip {
  background: transparent;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  padding: 4px 12px;
  font-family: var(--sans);
  font-size: 12px;
  cursor: pointer;
  color: var(--ink-soft);
  transition: all 0.15s;
}
.discussion-chip:hover { border-color: var(--crimson, #8a2a2a); color: var(--crimson); }
.discussion-chip.active {
  background: var(--crimson, #8a2a2a);
  border-color: var(--crimson, #8a2a2a);
  color: #fff;
}
.discussion-sort {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--sans);
  font-size: 12.5px;
  color: var(--ink-soft);
}
.discussion-sort select {
  padding: 4px 8px;
  border: 1px solid var(--line-soft);
  border-radius: 4px;
  font-family: var(--sans);
  font-size: 12.5px;
  background: #fff;
}

.discussion-list { margin-top: 10px; }
.discussion-empty {
  padding: 40px 20px;
  text-align: center;
  font-family: var(--sans);
  font-size: 14px;
  color: var(--ink-faint);
  font-style: italic;
  background: var(--parchment-warm, #f5efe2);
  border-radius: 8px;
}
.discussion-locked, .discussion-error {
  padding: 24px;
  background: var(--parchment-warm);
  border: 1px dashed var(--line-soft);
  border-radius: 8px;
  text-align: center;
  font-family: var(--sans);
  color: var(--ink-soft);
}
.loading-state {
  padding: 40px;
  text-align: center;
  color: var(--ink-faint);
  font-style: italic;
}

/* ─── ME PAGE ─────────────────────────────────────────────────────────── */
#me-view {
  background: var(--parchment, #f9f4e8);
  min-height: 80vh;
}
.me-content { display: flex; flex-direction: column; gap: 16px; }
.me-empty {
  padding: 28px;
  background: #fff;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  text-align: center;
  font-family: var(--sans);
  color: var(--ink-soft);
}
.me-group {
  background: #fff;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  overflow: hidden;
}
.me-group-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  background: var(--parchment-warm, #f5efe2);
  border-bottom: 1px solid var(--line-soft);
  flex-wrap: wrap;
}
.me-group-title {
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  flex: 1;
  min-width: 0;
}
.me-group-title:hover { color: var(--crimson, #8a2a2a); text-decoration: underline; }
.me-context-tag {
  font-family: var(--sans);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-faint);
  background: #fff;
  border: 1px solid var(--line-soft);
  padding: 2px 8px;
  border-radius: 3px;
}
.me-count {
  font-family: var(--sans);
  font-size: 12px;
  color: var(--ink-faint);
}
.me-comments {
  display: flex;
  flex-direction: column;
}
.me-comment {
  padding: 14px 20px;
  text-decoration: none;
  color: inherit;
  border-bottom: 1px solid var(--line-soft);
  transition: background 0.15s;
}
.me-comment:hover { background: var(--parchment-warm, #f5efe2); }
.me-comment:last-child { border-bottom: none; }
.me-comment-meta {
  font-family: var(--sans);
  font-size: 11.5px;
  color: var(--ink-faint);
  margin-bottom: 6px;
}
.me-comment-body {
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink);
  white-space: pre-wrap;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Permalink-on-timestamp affordance */
.discussion-list .comment-date {
  position: relative;
  transition: color 0.15s;
}
.discussion-list .comment-date:hover {
  color: var(--crimson, #8a2a2a);
  text-decoration: underline;
}

/* Mobile */
@media (max-width: 820px) {
  .discussion-head { padding: 22px 22px; }
  .discussion-title { font-size: 26px; }
  .discussion-filter-bar { flex-direction: column; align-items: flex-start; }
  .my-contributions-bar { flex-direction: column; align-items: flex-start; }
  .me-group-head { gap: 8px; }
  .me-group-title { font-size: 15px; }
}

/* Patch 12 — footer link contrast fix */
.foot-links a {
  color: var(--gold, #b08a3f);
  text-decoration: none;
  font-weight: 600;
}
.foot-links a:hover {
  color: #fff;
  text-decoration: underline;
}
.foot-links .sep { color: var(--ink-faint, #8a8270); opacity: 0.5; }

/* Show me-link only when signed in */
#me-link { font-size: 13px; }


/* ═══════════════════════════════════════════════════════════════════════
   PATCH 13 — Questions Corner filter view styles
   ═══════════════════════════════════════════════════════════════════════ */

/* ─── Filter panel ─────────────────────────────────────────────────── */
.qc-filter-panel {
  background: #fff;
  border: 1px solid var(--line-soft, #e0d8c5);
  border-radius: 10px;
  padding: 22px 24px;
  margin-bottom: 22px;
}

.qc-filter-row {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 12px 0;
  border-bottom: 1px solid var(--line-soft);
}
.qc-filter-row:last-of-type { border-bottom: none; }

.qc-filter-label {
  flex: 0 0 110px;
  font-family: var(--sans);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft, #4a4438);
  padding-top: 6px;
}
.qc-filter-sublabel {
  display: block;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 500;
  font-size: 10px;
  color: var(--ink-faint);
  margin-top: 2px;
}

.qc-pills {
  flex: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  align-items: center;
}
.qc-pills-type .qc-pill { font-size: 12px; }

.qc-pill {
  background: var(--parchment, #f9f4e8);
  border: 1px solid var(--line-soft, #e0d8c5);
  border-radius: 999px;
  padding: 4px 11px;
  font-family: var(--sans);
  font-size: 11.5px;
  color: var(--ink-soft);
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.qc-pill:hover {
  border-color: var(--crimson, #8a2a2a);
  color: var(--crimson, #8a2a2a);
}
.qc-pill.active {
  background: var(--crimson, #8a2a2a);
  border-color: var(--crimson, #8a2a2a);
  color: #fff;
  font-weight: 600;
}
.qc-pill-denom.active { background: #8a2a2a; border-color: #8a2a2a; }
.qc-pill-mov { background: #f0eaf5; border-color: #d4c6e0; color: #4a3563; }
.qc-pill-mov:hover { border-color: #6a4d8c; color: #6a4d8c; }
.qc-pill-mov.active { background: #6a4d8c; border-color: #6a4d8c; color: #fff; }
.qc-pill-rel { background: #e8efe9; border-color: #c5d4c9; color: #2d5547; }
.qc-pill-rel:hover { border-color: #2d5547; }
.qc-pill-rel.active { background: #2d5547; border-color: #2d5547; color: #fff; }

.qc-pill-sep {
  display: inline-block;
  width: 1px;
  height: 18px;
  background: var(--line-soft);
  margin: 0 6px;
}

.qc-filter-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-top: 14px;
  margin-top: 6px;
  border-top: 1px solid var(--line-soft);
  flex-wrap: wrap;
}
.qc-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--sans);
  font-size: 12.5px;
  color: var(--ink-soft);
  cursor: pointer;
}
.qc-sort-control {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--sans);
  font-size: 12.5px;
  color: var(--ink-soft);
}
.qc-sort-control select {
  padding: 4px 8px;
  border: 1px solid var(--line-soft);
  border-radius: 4px;
  font-family: var(--sans);
  font-size: 12.5px;
  background: #fff;
}
.qc-clear-btn {
  background: transparent;
  border: 1px solid var(--crimson);
  color: var(--crimson);
  padding: 5px 11px;
  border-radius: 4px;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  margin-left: auto;
}
.qc-clear-btn:hover { background: var(--crimson); color: #fff; }

/* ─── Results ─────────────────────────────────────────────────────── */
.qc-results-info {
  padding: 8px 4px 14px;
  font-family: var(--sans);
  font-size: 13px;
  color: var(--ink-soft);
}
.qc-results-count { font-weight: 600; }
.qc-results-cap { color: var(--ink-faint); }
.qc-results-empty { color: var(--ink-faint); font-style: italic; }
.qc-link-btn {
  background: none; border: none; padding: 0;
  color: var(--crimson);
  text-decoration: underline;
  font: inherit; cursor: pointer;
}

.qc-results {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 14px;
}

.qc-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 18px 20px;
  background: #fff;
  border: 1px solid var(--line-soft, #e0d8c5);
  border-radius: 8px;
  text-decoration: none;
  color: inherit;
  border-left: 3px solid #8a2a2a;
  transition: transform 0.15s, box-shadow 0.15s;
}
.qc-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(0,0,0,0.08);
}
.qc-card-denom { border-left-color: #8a2a2a; }
.qc-card-mov { border-left-color: #6a4d8c; }
.qc-card-rel { border-left-color: #2d5547; }

.qc-card-head {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  align-items: center;
}
.qc-card-chip {
  font-family: var(--sans);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 2px 8px;
  border-radius: 3px;
  border: 1px solid var(--line-soft);
  background: var(--parchment, #f9f4e8);
  color: var(--ink-soft);
}
.qc-card-chip-tradition { color: var(--ink); font-weight: 700; }
.qc-card-chip-topic { background: #fff; }
.qc-card-chip-seed {
  background: #fef5e3;
  border-color: #d4b870;
  color: #8a6818;
}
.qc-card-mov .qc-card-chip-tradition { background: #f0eaf5; color: #4a3563; border-color: #d4c6e0; }
.qc-card-rel .qc-card-chip-tradition { background: #e8efe9; color: #2d5547; border-color: #c5d4c9; }

.qc-card-title {
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.4;
}

.qc-card-sample {
  font-family: var(--sans);
  font-size: 12.5px;
  color: var(--ink-soft);
  font-style: italic;
  line-height: 1.5;
  padding: 8px 12px;
  background: var(--parchment-warm, #f5efe2);
  border-left: 2px solid var(--line-soft);
  border-radius: 0 4px 4px 0;
}

.qc-card-foot {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: auto;
  padding-top: 6px;
  font-family: var(--sans);
  font-size: 11.5px;
  color: var(--ink-faint);
}
.qc-card-count {
  font-weight: 600;
  color: var(--crimson);
}
.qc-card-mov .qc-card-count { color: #6a4d8c; }
.qc-card-rel .qc-card-count { color: #2d5547; }
.qc-card-empty {
  font-style: italic;
  color: var(--ink-faint);
}

/* ═══════════════════════════════════════════════════════════════════════
   PATCH 16 — Mobile hamburger nav
   ═══════════════════════════════════════════════════════════════════════ */

.mobile-menu-btn {
  display: none;
  background: none;
  border: 1px solid var(--line-soft, #e0d8c5);
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  color: var(--ink, #1a1a1a);
  margin-right: 8px;
  transition: background 0.15s;
}
.mobile-menu-btn:hover {
  background: var(--parchment-warm, #f5efe2);
}
.mobile-menu-btn.open .hamburger-icon::before { content: '✕'; }
.mobile-menu-btn .hamburger-icon { display: inline-block; }

@media (max-width: 820px) {
  .mobile-menu-btn { display: inline-flex; align-items: center; }

  /* Hide the nav by default on mobile; show when .mobile-open is set */
  .mobile-nav-target {
    display: none !important;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 1px solid var(--line-soft, #e0d8c5);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    padding: 12px 16px;
    z-index: 200;
    flex-direction: column !important;
    gap: 4px !important;
    align-items: stretch !important;
  }
  .mobile-nav-target.mobile-open {
    display: flex !important;
  }
  .mobile-nav-target a,
  .mobile-nav-target .nav-link {
    padding: 12px 14px !important;
    border-radius: 6px;
    text-align: left !important;
    font-size: 15px !important;
    border: none !important;
  }
  .mobile-nav-target a:hover,
  .mobile-nav-target .nav-link:hover {
    background: var(--parchment-warm, #f5efe2);
  }
  .mobile-nav-target a.active,
  .mobile-nav-target .nav-link.active {
    background: var(--crimson, #8a2a2a);
    color: #fff;
  }

  /* Ensure topbar-inner is positioned for the dropdown */
  .topbar-inner { position: relative; }

  /* Compact the right side on mobile */
  .topbar-right { gap: 6px; }
  .topbar-right #me-link {
    display: none !important; /* Move to hamburger menu instead */
  }
}

@media (max-width: 480px) {
  /* Even tighter on small phones */
  .brand-title { font-size: 16px; }
  .brand-tag { display: none; }
  .topbar-right .denom-pill,
  .user-denom-pill { display: none; }
}
/* ═══════════════════════════════════════════════════════════════════════
   PATCH 18 — Open-topic cards in Questions Corner
   ═══════════════════════════════════════════════════════════════════════ */

.qc-card-open { border-left-color: #b08a3f; }  /* gold */
.qc-card-open .qc-card-chip-tradition {
  background: #fef5e3;
  color: #8a6818;
  border-color: #d4b870;
}
.qc-card-open .qc-card-count { color: #8a6818; }
.qc-card-chip-open {
  background: #fef5e3;
  border-color: #d4b870;
  color: #8a6818;
}

/* ═══════════════════════════════════════════════════════════════════════
   PATCH 20 — Mobile pill scrolling + verse/button spacing
   ═══════════════════════════════════════════════════════════════════════ */

/* Spacing fix: more breathing room between verse pills and the Discuss button */
.denom-card-content {
  padding-bottom: 22px;
}
.denom-verses {
  margin-top: 18px;
  margin-bottom: 8px;
}

/* Mobile Questions Corner pills — horizontal scroll instead of multi-row wrap */
@media (max-width: 720px) {
  .qc-filter-panel { padding: 16px 14px; }

  .qc-pills {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 6px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scroll-snap-type: x proximity;
  }
  .qc-pill, .qc-pill-sep {
    flex-shrink: 0;
    scroll-snap-align: start;
  }

  .qc-filter-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  .qc-clear-btn {
    margin-left: 0;
    align-self: flex-start;
  }
  .qc-sort-control {
    width: 100%;
    justify-content: space-between;
  }
  .qc-sort-control select { flex: 1; margin-left: 8px; }
  .qc-toggle { font-size: 13px; }
}

/* ═══════════════════════════════════════════════════════════════════════
   PATCH 21 — Profile page styles
   ═══════════════════════════════════════════════════════════════════════ */

#profile-view {
  background: var(--parchment, #f9f4e8);
  min-height: 80vh;
}
.profile-inner {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 24px;
}

.profile-section {
  background: #fff;
  border: 1px solid var(--line-soft, #e0d8c5);
  border-radius: 8px;
  padding: 22px 26px;
  margin-bottom: 18px;
}
.profile-section-title {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 6px;
}
.profile-section-help {
  font-family: var(--sans);
  font-size: 13.5px;
  color: var(--ink-soft);
  line-height: 1.55;
  margin-bottom: 14px;
}

.profile-form-row {
  display: flex;
  gap: 10px;
  align-items: stretch;
}
.profile-form-row .text-input { flex: 1; }
.profile-form-row .btn { flex-shrink: 0; }

.profile-form-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 360px;
}

.profile-feedback {
  margin-top: 10px;
  font-family: var(--sans);
  font-size: 13px;
  min-height: 16px;
}
.profile-feedback.ok { color: var(--ledger-green, #2d5547); }
.profile-feedback.err { color: var(--crimson, #8a2a2a); }

.profile-info {
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-family: var(--sans);
  font-size: 14px;
  color: var(--ink-soft);
}
.profile-info > div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line-soft);
}
.profile-info > div:last-child { border-bottom: none; }
.profile-info-label {
  font-weight: 600;
  color: var(--ink);
}

.profile-section-danger {
  border-color: #d4b0b0;
  background: #fdf6f6;
}
.profile-section-danger .profile-section-title { color: var(--crimson, #8a2a2a); }

@media (max-width: 720px) {
  .profile-form-row { flex-direction: column; }
  .profile-section { padding: 18px 18px; }
}

/* ═══════════════════════════════════════════════════════════════════════
   PATCH 27 — Profile hero, topbar nav-link polish
   ═══════════════════════════════════════════════════════════════════════ */

/* ─── Topbar: My activity + Profile links ──────────────────────────── */
#me-link,
#profile-link {
  font-family: var(--sans);
  font-size: 13px !important;
  font-weight: 500;
  color: var(--ink-soft, #4a4438);
  padding: 6px 12px;
  border-radius: 6px;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  display: inline-flex !important;
  align-items: center;
  gap: 4px;
}
#me-link:hover,
#profile-link:hover {
  background: var(--parchment-warm, #f5efe2);
  color: var(--crimson, #8a2a2a);
}
#me-link.active,
#profile-link.active {
  background: var(--crimson, #8a2a2a);
  color: #fff;
}

/* ─── Profile hero card ──────────────────────────────────────────── */
.profile-hero {
  background: linear-gradient(135deg, #fff 0%, var(--parchment-warm, #f5efe2) 100%);
  border: 1px solid var(--line-soft, #e0d8c5);
  border-left: 4px solid var(--gold, #b08a3f);
  border-radius: 10px;
  padding: 24px 28px;
  margin-bottom: 22px;
  display: flex;
  align-items: center;
  gap: 22px;
}
.profile-hero-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--gold, #b08a3f);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 600;
  flex-shrink: 0;
}
.profile-hero-info { flex: 1; min-width: 0; }
.profile-hero-eyebrow {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-faint, #8a8270);
  margin-bottom: 4px;
}
.profile-hero-name {
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 600;
  color: var(--ink, #1a1a1a);
  line-height: 1.15;
  margin: 0 0 8px;
}
.profile-hero-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-family: var(--sans);
  font-size: 12.5px;
}
.profile-hero-denom {
  background: var(--crimson, #8a2a2a);
  color: #fff;
  padding: 3px 10px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.profile-hero-email {
  color: var(--ink-soft, #4a4438);
  word-break: break-all;
}

/* ─── Section title icons spacing ─────────────────────────────── */
.profile-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
}

@media (max-width: 720px) {
  .profile-hero { flex-direction: column; text-align: center; padding: 22px 18px; }
  .profile-hero-avatar { width: 60px; height: 60px; font-size: 24px; }
  .profile-hero-name { font-size: 22px; }
  .profile-hero-meta { justify-content: center; }
}

/* ═══════════════════════════════════════════════════════════════════════
   PATCH 29 — /me comment rows: type badge + inline delete
   ═══════════════════════════════════════════════════════════════════════ */

.me-comment-row {
  display: flex;
  align-items: stretch;
  border-bottom: 1px solid var(--line-soft, #e0d8c5);
}
.me-comment-row:last-child { border-bottom: none; }

.me-comment-link {
  flex: 1;
  padding: 14px 20px;
  text-decoration: none;
  color: inherit;
  display: block;
  min-width: 0;
  transition: background 0.15s;
}
.me-comment-link:hover { background: var(--parchment-warm, #f5efe2); }

.me-comment-meta {
  font-family: var(--sans);
  font-size: 11.5px;
  color: var(--ink-faint, #8a8270);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.me-comment-type {
  background: var(--parchment-warm, #f5efe2);
  border: 1px solid var(--line-soft);
  padding: 2px 8px;
  border-radius: 3px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--ink, #1a1a1a);
}
.me-comment-body {
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.me-delete-btn {
  flex-shrink: 0;
  background: transparent;
  border: none;
  color: var(--ink-faint, #8a8270);
  padding: 0 16px;
  font-family: var(--sans);
  font-size: 12px;
  cursor: pointer;
  border-left: 1px solid var(--line-soft, #e0d8c5);
  transition: background 0.15s, color 0.15s;
}
.me-delete-btn:hover {
  background: #fdf6f6;
  color: var(--crimson, #8a2a2a);
}

@media (max-width: 720px) {
  .me-comment-row { flex-direction: column; }
  .me-delete-btn {
    border-left: none;
    border-top: 1px solid var(--line-soft);
    padding: 10px;
    text-align: right;
  }
}
/* ═══════════════════════════════════════════════════════════════════════
   PATCH 30 — Sleek single-row topbar
   ═══════════════════════════════════════════════════════════════════════ */

/* Force the unified inner row */
.topbar-inner-unified {
  display: flex !important;
  align-items: center !important;
  flex-wrap: nowrap !important;
  gap: 14px;
  padding: 10px 24px !important;
  min-height: 56px;
}

/* Brand stays compact on the left */
.topbar-inner-unified .brand {
  flex-shrink: 0;
  margin-right: auto; /* push nav to the right of brand */
}

/* Nav and auth elements take their natural width, in order */
.topbar-inner-unified > *:not(.brand) {
  flex-shrink: 0;
}

/* Compact nav links */
.topbar-inner-unified .nav-link {
  padding: 6px 11px !important;
  font-size: 13.5px !important;
}

/* My activity / Profile already styled in P27 — make them slightly smaller */
.topbar-inner-unified #me-link,
.topbar-inner-unified #profile-link {
  font-size: 12.5px !important;
  padding: 5px 10px !important;
}

/* Avatar — drastically smaller, less prominent */
.user-badge .user-avatar,
.user-pill .user-avatar,
.user-info .user-avatar,
.user-avatar {
  width: 26px !important;
  height: 26px !important;
  font-size: 11.5px !important;
  font-weight: 600;
  line-height: 26px !important;
}

/* User pill grouping — tight, low-key */
.user-badge,
.user-pill,
.user-info {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--parchment-warm, #f5efe2);
  border: 1px solid var(--line-soft, #e0d8c5);
  border-radius: 999px;
  padding: 3px 10px 3px 3px;
  font-size: 12.5px;
}

/* Denomination tag — small and quiet, not a billboard */
.user-denom-pill,
.denom-pill,
.user-info .denom-pill,
.topbar-inner-unified [class*="denom"] {
  font-size: 10px !important;
  font-weight: 600 !important;
  letter-spacing: 0.04em !important;
  padding: 2px 7px !important;
  background: transparent !important;
  color: var(--ink-soft, #4a4438) !important;
  border: none !important;
  text-transform: uppercase;
}

/* Sign out — styled as a small ghost button to match weight */
.signout-link,
.signout-btn,
.topbar-inner-unified [onclick*="signOut"]:not(.btn),
.topbar-inner-unified [onclick*="logout"]:not(.btn) {
  font-family: var(--sans);
  font-size: 12.5px;
  color: var(--ink-soft, #4a4438);
  text-decoration: none;
  cursor: pointer;
  padding: 5px 10px;
  border-radius: 6px;
  border: 1px solid transparent;
  transition: all 0.15s;
}
.signout-link:hover,
.signout-btn:hover,
.topbar-inner-unified [onclick*="signOut"]:hover,
.topbar-inner-unified [onclick*="logout"]:hover {
  background: var(--parchment-warm, #f5efe2);
  border-color: var(--line-soft, #e0d8c5);
  color: var(--crimson, #8a2a2a);
}

/* Notification bell stays compact */
#notif-wrap {
  display: inline-flex !important;
  align-items: center;
}

/* On narrow screens, hide non-essential auth elements; hamburger handles nav */
@media (max-width: 820px) {
  .topbar-inner-unified {
    gap: 8px;
    padding: 8px 14px !important;
  }
  .topbar-inner-unified #me-link,
  .topbar-inner-unified #profile-link {
    display: none !important; /* accessible via hamburger menu */
  }
  .user-denom-pill,
  .denom-pill {
    display: none !important;
  }
  .signout-link,
  .signout-btn {
    font-size: 11px;
    padding: 4px 8px;
  }
}

@media (max-width: 480px) {
  .user-badge .user-name,
  .user-pill .user-name,
  .user-info .user-name {
    display: none; /* avatar alone on tiny screens */
  }
}

/* ═══════════════════════════════════════════════════════════════════════
   PATCH 31 — Comprehensive mobile polish
   ═══════════════════════════════════════════════════════════════════════ */

/* ─── Global mobile foundation ─────────────────────────────────────── */
@media (max-width: 820px) {

  /* Stop horizontal overflow site-wide */
  html, body {
    overflow-x: hidden;
    max-width: 100vw;
  }
  * { max-width: 100%; }

  /* Touch targets: every button/link minimum 44x44 unless inline */
  button, .btn, a.btn, .nav-link {
    min-height: 44px;
    min-width: 44px;
  }

  /* ─── HERO ────────────────────────────────────────────────────── */
  .hero {
    padding: 28px 16px 32px !important;
  }
  .hero-title, h1 {
    font-size: clamp(28px, 7vw, 38px) !important;
    line-height: 1.15 !important;
    letter-spacing: -0.01em;
  }
  .hero-subtitle, .hero p {
    font-size: 14.5px !important;
    line-height: 1.6;
  }
  .hero-eyebrow {
    font-size: 10.5px !important;
    letter-spacing: 0.1em;
  }
  .hero-buttons, .hero-ctas {
    flex-direction: column;
    gap: 10px;
    width: 100%;
  }
  .hero-buttons .btn,
  .hero-ctas .btn {
    width: 100%;
  }
  .hero-stats {
    flex-direction: row;
    gap: 8px !important;
    padding: 0 8px;
    justify-content: space-between;
  }
  .hero-stat-num,
  .stat-num {
    font-size: 28px !important;
  }
  .hero-stat-label,
  .stat-label {
    font-size: 9.5px !important;
    letter-spacing: 0.04em;
  }

  /* ─── SECTION HEADS ──────────────────────────────────────────── */
  .section-inner {
    padding: 24px 16px !important;
  }
  .section-title, h2 {
    font-size: clamp(22px, 5.5vw, 28px) !important;
    line-height: 1.2;
  }
  .section-sub {
    font-size: 14px;
    line-height: 1.55;
  }
  .section-eyebrow {
    font-size: 10.5px;
    letter-spacing: 0.1em;
  }

  /* ─── SEARCH + FILTER PILLS (Ledger) ─────────────────────────── */
  .search-input,
  .text-input,
  textarea {
    font-size: 16px !important; /* prevent iOS zoom-on-focus */
  }
  .filter-pills {
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 6px;
    -webkit-overflow-scrolling: touch;
  }
  .filter-pill, .category-pill {
    flex-shrink: 0;
  }

  /* ─── TOPIC GRID (Ledger cards) ──────────────────────────────── */
  .topics-grid, .topic-grid {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }
  .topic-card {
    padding: 18px 18px !important;
  }
  .topic-card-title, .topic-name {
    font-size: 18px !important;
    line-height: 1.3;
  }
  .topic-card-summary, .topic-summary {
    font-size: 13.5px;
    line-height: 1.55;
  }

  /* ─── TOPIC DETAIL (denom cards) ─────────────────────────────── */
  .detail-bar-inner,
  .detail-inner {
    padding: 14px 16px !important;
  }
  .detail-title, .topic-detail-title {
    font-size: clamp(26px, 6.5vw, 34px) !important;
    line-height: 1.15;
  }
  .denom-grid {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }
  .denom-card {
    padding: 0 !important;
  }
  .denom-card-content {
    padding: 18px 18px 16px !important;
  }
  .denom-name {
    font-size: 17px !important;
  }
  .denom-position {
    font-size: 14px;
    line-height: 1.6;
  }
  .denom-discuss-btn {
    padding: 12px 16px !important;
    font-size: 13px !important;
  }
  .verse-pill {
    font-size: 11.5px;
    padding: 3px 8px;
  }

  /* ─── DISCUSSION PAGE ────────────────────────────────────────── */
  .discussion-article {
    padding: 24px 0 60px !important;
  }
  .discussion-head {
    padding: 20px 18px !important;
    border-radius: 8px;
  }
  .discussion-title {
    font-size: clamp(22px, 6vw, 30px) !important;
    line-height: 1.2;
  }
  .discussion-position-body {
    font-size: 15px;
    line-height: 1.65;
  }
  .discussion-section-title {
    font-size: 18px !important;
  }
  .discussion-compose {
    padding: 14px !important;
  }
  .ctype-tabs,
  .ctype-tabs-discussion {
    flex-wrap: wrap;
    gap: 4px;
  }
  .ctype-tab {
    flex: 1 1 auto;
    min-width: calc(50% - 4px);
    font-size: 12.5px !important;
    padding: 8px 6px !important;
  }
  .comment-item, .forum-comment-list .comment-item {
    padding: 14px !important;
    gap: 10px !important;
  }
  .comment-avatar {
    width: 32px !important;
    height: 32px !important;
    font-size: 12px !important;
  }
  .comment-meta {
    gap: 6px;
    flex-wrap: wrap;
    font-size: 12px;
  }
  .comment-text {
    font-size: 14.5px;
    line-height: 1.55;
  }
  .comment-actions {
    flex-wrap: wrap;
    gap: 6px;
  }

  /* ─── PROFILE PAGE ───────────────────────────────────────────── */
  .profile-inner {
    padding: 0 14px !important;
  }
  .profile-hero {
    flex-direction: column;
    text-align: center;
    padding: 20px 18px !important;
  }
  .profile-section {
    padding: 16px !important;
  }
  .profile-form-row {
    flex-direction: column;
  }
  .profile-form-row .btn {
    width: 100%;
  }

  /* ─── /me PAGE ───────────────────────────────────────────────── */
  .me-content { padding: 0 !important; }
  .me-group-head {
    padding: 12px 14px;
  }
  .me-group-title {
    font-size: 14.5px;
  }
  .me-comment-row {
    flex-direction: column;
  }
  .me-comment-link {
    padding: 12px 14px;
  }
  .me-stat-row {
    grid-template-columns: 1fr 1fr 1fr !important;
    gap: 8px;
  }
  .me-stat-num {
    font-size: 24px !important;
  }
  .me-stat-label {
    font-size: 10px !important;
  }

  /* ─── LIBRARY + ESSAY ────────────────────────────────────────── */
  .library-page,
  .essay-article {
    padding: 24px 14px 60px !important;
  }
  .library-inner,
  .essay-inner {
    padding: 0 !important;
  }
  .library-grid {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }
  .essay-title,
  .library-title {
    font-size: clamp(26px, 7vw, 36px) !important;
    line-height: 1.15 !important;
  }
  .essay-body {
    font-size: 16.5px !important;
    line-height: 1.75 !important;
  }
  .essay-body h2 {
    font-size: 22px !important;
    margin-top: 32px !important;
  }
  .essay-body h3 {
    font-size: 18.5px !important;
  }
  .essay-body blockquote {
    padding: 14px 18px;
    margin: 18px 0;
  }

  /* ─── QUESTIONS CORNER CARDS ─────────────────────────────────── */
  .qc-results {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }
  .qc-card {
    padding: 14px 16px !important;
  }
  .qc-card-title {
    font-size: 15px !important;
  }
  .qc-card-sample {
    font-size: 12px;
  }

  /* ─── MOVEMENT / RELIGION QUESTION CARDS ─────────────────────── */
  .question-card-flat-content {
    padding: 16px 18px 14px !important;
  }
  .question-card-flat-title {
    font-size: 16.5px !important;
  }
  .question-card-flat-body {
    font-size: 13.5px;
  }

  /* ─── AUTH MODAL ─────────────────────────────────────────────── */
  .modal,
  .modal-content,
  .auth-modal {
    width: calc(100vw - 24px) !important;
    max-width: 420px;
    padding: 20px !important;
  }
  .modal h1, .modal h2 {
    font-size: 22px !important;
  }

  /* ─── BUTTONS ────────────────────────────────────────────────── */
  .btn-primary, .btn-secondary {
    padding: 11px 18px !important;
    font-size: 14px !important;
  }

  /* ─── FOOTER ─────────────────────────────────────────────────── */
  footer, .footer {
    padding: 24px 16px !important;
    text-align: center;
  }
  .footer-inner {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }
}

/* Smaller phones */
@media (max-width: 480px) {
  .hero-stats {
    gap: 4px !important;
  }
  .hero-stat-num,
  .stat-num {
    font-size: 22px !important;
  }
  .hero-stat-label,
  .stat-label {
    font-size: 9px !important;
  }
  .denom-card-content {
    padding: 14px !important;
  }
  .discussion-head {
    padding: 16px 14px !important;
  }
  .comment-item {
    padding: 12px !important;
  }
}

/* ═══════════════════════════════════════════════════════════════════════
   PATCH 32 — Mobile menu account section + notif panel viewport
   ═══════════════════════════════════════════════════════════════════════ */

/* Mobile-only: separator label + account section */
@media (max-width: 820px) {
  .mobile-nav-sep {
    font-family: var(--sans);
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--ink-faint, #8a8270);
    padding: 14px 14px 6px;
    margin-top: 8px;
    border-top: 1px solid var(--line-soft, #e0d8c5);
  }

  .mobile-nav-target [data-mobile-account] {
    display: block !important;
    text-decoration: none;
    cursor: pointer;
    color: var(--ink-soft, #4a4438) !important;
  }
  .mobile-nav-target [data-mobile-account]:hover {
    background: var(--parchment-warm, #f5efe2);
    color: var(--crimson, #8a2a2a) !important;
  }
  .mobile-nav-target .mobile-signout {
    color: var(--crimson, #8a2a2a) !important;
    margin-top: 6px;
  }

  /* ─── Notification panel — fit within viewport on mobile ─── */
  .notif-panel,
  .notification-panel,
  .notifications-dropdown,
  [class*="notif"][class*="panel"],
  [class*="notif"][class*="dropdown"],
  [class*="notification"][class*="dropdown"] {
    position: fixed !important;
    top: 60px !important;
    left: 10px !important;
    right: 10px !important;
    width: auto !important;
    max-width: none !important;
    max-height: calc(100vh - 80px) !important;
    overflow-y: auto !important;
    z-index: 300 !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18) !important;
  }

  /* Notification items should wrap text properly */
  .notif-item,
  .notification-item {
    overflow-wrap: anywhere;
    word-break: break-word;
  }
}

/* Bonus: ensure topbar menu button is reachable on small screens too */
@media (max-width: 820px) {
  .mobile-menu-btn {
    margin-left: 0 !important;
    margin-right: 8px;
  }
}

/* ═══════════════════════════════════════════════════════════════════════
   PATCH 33 — Hide P32's mobile-injected items on desktop + notif fix
   ═══════════════════════════════════════════════════════════════════════ */

/* DESKTOP: hide everything P32 injected — visible only on mobile drawer */
@media (min-width: 821px) {
  [data-mobile-account],
  .mobile-nav-sep,
  .mobile-signout {
    display: none !important;
  }
}

/* MOBILE: notification panel — target by parent ID for robustness.
   The bell lives inside #notif-wrap; the panel is its child element
   (any element other than the button itself). */
@media (max-width: 820px) {
  #notif-wrap {
    position: static !important;
  }
  #notif-wrap > div,
  #notif-wrap > ul,
  #notif-wrap > section,
  #notif-wrap [class*="panel"],
  #notif-wrap [class*="dropdown"],
  #notif-wrap [class*="menu"]:not(button):not(.notif-btn):not(.bell) {
    position: fixed !important;
    top: 64px !important;
    left: 10px !important;
    right: 10px !important;
    bottom: auto !important;
    width: auto !important;
    max-width: none !important;
    min-width: 0 !important;
    max-height: calc(100vh - 84px) !important;
    overflow-y: auto !important;
    z-index: 9999 !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18) !important;
    border-radius: 10px !important;
    transform: none !important;
  }
  #notif-wrap > button,
  #notif-wrap > a {
    /* The bell itself stays as the trigger */
    position: static !important;
  }

  /* Notification items wrap and don't overflow */
  #notif-wrap li,
  #notif-wrap .notif-item,
  #notif-wrap [class*="item"] {
    overflow-wrap: anywhere;
    word-break: break-word;
    max-width: 100%;
  }
}
/* ═══════════════════════════════════════════════════════════════════════
   PATCH 34 — Keep topbar auth elements inside viewport on mobile
   ═══════════════════════════════════════════════════════════════════════ */

@media (max-width: 820px) {
  /* The unified row must respect viewport width — no overflow */
  .topbar-inner,
  .topbar-inner-unified {
    width: 100% !important;
    max-width: 100vw !important;
    overflow: hidden !important;
    padding-left: 12px !important;
    padding-right: 12px !important;
    gap: 6px !important;
  }

  /* Brand shrinks if needed, doesn't push others off */
  .brand,
  .topbar-inner-unified .brand {
    min-width: 0 !important;
    flex-shrink: 1 !important;
    overflow: hidden;
  }
  .brand-title,
  .brand-name {
    font-size: 15px !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* User badge: truncate the name, hide denom pill */
  .user-badge,
  .user-pill,
  .user-info,
  [class*="user-badge"],
  [class*="user-pill"] {
    max-width: 50vw !important;
    overflow: hidden;
    flex-shrink: 1;
  }
  .user-name,
  .user-display-name,
  [class*="user-name"] {
    max-width: 90px !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 12px !important;
  }
  .user-denom-pill,
  .denom-pill,
  [class*="denom-pill"] {
    display: none !important;
  }

  /* Sign in / Join the Synod / Sign out buttons in topbar — compact */
  .topbar-inner button,
  .topbar-inner .btn,
  .topbar-inner a.btn,
  .topbar-inner [onclick*="signOut"],
  .topbar-inner [onclick*="openModal"],
  .signout-link,
  .signout-btn,
  .signin-btn,
  .signup-btn,
  .auth-btn {
    font-size: 11.5px !important;
    padding: 5px 8px !important;
    white-space: nowrap;
    flex-shrink: 0;
    min-height: 0 !important;
    min-width: 0 !important;
  }

  /* Bell + hamburger always reachable */
  #notif-wrap,
  #mobile-menu-btn {
    flex-shrink: 0;
  }
}

/* Even smaller phones */
@media (max-width: 480px) {
  .topbar-inner,
  .topbar-inner-unified {
    padding-left: 8px !important;
    padding-right: 8px !important;
    gap: 4px !important;
  }
  .brand-title,
  .brand-name {
    font-size: 13.5px !important;
  }
  .brand-tag,
  .brand-subtitle {
    display: none !important;
  }
  .user-name {
    display: none !important; /* avatar-only on tiny screens */
  }
  .topbar-inner [onclick*="signOut"],
  .signout-link,
  .signout-btn {
    font-size: 11px !important;
    padding: 4px 6px !important;
  }
}
/* ═══════════════════════════════════════════════════════════════════════
   PATCH 35 — Restore hamburger menu, unsquash avatar
   ═══════════════════════════════════════════════════════════════════════ */

@media (max-width: 820px) {
  /* Undo the overflow:hidden that was clipping the hamburger dropdown */
  .topbar-inner,
  .topbar-inner-unified {
    overflow: visible !important;
  }

  /* Re-assert mobile nav dropdown positioning + visibility */
  .mobile-nav-target {
    z-index: 250 !important;
  }
  .mobile-nav-target.mobile-open {
    display: flex !important;
  }

  /* Avatar — never squash. Lock dimensions firmly. */
  .user-avatar,
  .user-badge .user-avatar,
  .user-pill .user-avatar,
  .user-info .user-avatar,
  [class*="user-avatar"] {
    width: 26px !important;
    min-width: 26px !important;
    height: 26px !important;
    min-height: 26px !important;
    flex-shrink: 0 !important;
    border-radius: 50% !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    line-height: 1 !important;
  }

  /* Bell button — also fixed */
  #notif-wrap > button,
  #notif-wrap > a,
  .notif-bell,
  [class*="notif-bell"] {
    flex-shrink: 0 !important;
  }
}
/* ═══════════════════════════════════════════════════════════════════════
   PATCH 36 — Notification panel content styling
   ═══════════════════════════════════════════════════════════════════════ */

/* The panel itself: background, border, no overflow ── all viewports */
#notif-wrap > div,
#notif-wrap > section,
#notif-wrap > ul,
#notif-wrap [class*="panel"],
#notif-wrap [class*="dropdown"] {
  background: #fff !important;
  border: 1px solid var(--line-soft, #e0d8c5) !important;
  border-radius: 10px !important;
  padding: 0 !important;
  font-family: var(--sans, 'Inter', sans-serif) !important;
  color: var(--ink, #1a1a1a) !important;
  overflow: hidden !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

/* Panel header (title row) */
#notif-wrap [class*="title"],
#notif-wrap [class*="header"]:not([class*="item"]),
#notif-wrap > div > h2,
#notif-wrap > div > h3,
#notif-wrap > section > h2,
#notif-wrap > section > h3 {
  font-family: var(--serif, Georgia, serif) !important;
  font-size: 15px !important;
  font-weight: 600 !important;
  font-style: normal !important;
  color: var(--ink, #1a1a1a) !important;
  margin: 0 !important;
  padding: 14px 18px !important;
  background: var(--parchment-warm, #f5efe2) !important;
  border-bottom: 1px solid var(--line-soft, #e0d8c5) !important;
  letter-spacing: 0 !important;
  line-height: 1.2 !important;
}

/* Empty state */
#notif-wrap [class*="empty"],
#notif-wrap [class*="no-notif"],
#notif-wrap p {
  padding: 22px 20px !important;
  text-align: center !important;
  font-family: var(--sans, sans-serif) !important;
  font-size: 13px !important;
  line-height: 1.55 !important;
  color: var(--ink-soft, #4a4438) !important;
  margin: 0 !important;
  font-style: normal !important;
}

/* Individual notification items */
#notif-wrap li,
#notif-wrap [class*="notif-item"],
#notif-wrap [class*="notification-item"],
#notif-wrap > div > div:not([class*="title"]):not([class*="header"]):not([class*="empty"]) {
  padding: 12px 16px !important;
  border-bottom: 1px solid var(--line-soft, #e0d8c5) !important;
  font-size: 13px !important;
  line-height: 1.5 !important;
  overflow-wrap: anywhere !important;
  word-break: break-word !important;
}
#notif-wrap li:last-child,
#notif-wrap [class*="notif-item"]:last-child {
  border-bottom: none !important;
}

#notif-wrap li:hover,
#notif-wrap [class*="notif-item"]:hover {
  background: var(--parchment-warm, #f5efe2);
  cursor: pointer;
}

/* Unread indicator */
#notif-wrap [class*="unread"] {
  background: rgba(176, 138, 63, 0.06);
  border-left: 3px solid var(--gold, #b08a3f);
}

/* Mobile: tighter padding */
@media (max-width: 480px) {
  #notif-wrap [class*="title"],
  #notif-wrap [class*="header"]:not([class*="item"]) {
    padding: 12px 14px !important;
    font-size: 14px !important;
  }
  #notif-wrap [class*="empty"],
  #notif-wrap p {
    padding: 18px 14px !important;
  }
  #notif-wrap li,
  #notif-wrap [class*="notif-item"] {
    padding: 10px 14px !important;
  }
}

/* ═══════════════════════════════════════════════════════════════════════
   PATCH 37 — Notification panel mobile (using actual class names)
   ═══════════════════════════════════════════════════════════════════════ */

@media (max-width: 820px) {
  /* Pin the panel within the viewport */
  .notif-panel,
  #notif-panel {
    position: fixed !important;
    top: 64px !important;
    left: 10px !important;
    right: 10px !important;
    bottom: auto !important;
    width: auto !important;
    max-width: none !important;
    min-width: 0 !important;
    max-height: calc(100vh - 84px) !important;
    overflow-y: auto !important;
    z-index: 9999 !important;
    transform: none !important;
    background: #fff !important;
    border: 1px solid var(--line-soft, #e0d8c5) !important;
    border-radius: 10px !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18) !important;
    padding: 0 !important;
  }

  /* All content inside wraps properly */
  .notif-panel *,
  #notif-panel * {
    max-width: 100%;
    overflow-wrap: anywhere;
    word-break: break-word;
    box-sizing: border-box;
  }

  /* Header styling — proper title row */
  .notif-panel-head {
    font-family: var(--serif, Georgia, serif) !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    font-style: normal !important;
    color: var(--ink, #1a1a1a) !important;
    margin: 0 !important;
    padding: 14px 18px !important;
    background: var(--parchment-warm, #f5efe2) !important;
    border-bottom: 1px solid var(--line-soft, #e0d8c5) !important;
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
  }

  /* Body content (empty state or list) */
  .notif-panel > *:not(.notif-panel-head) {
    padding: 18px 18px !important;
    font-family: var(--sans, sans-serif) !important;
    font-size: 13.5px !important;
    line-height: 1.55 !important;
    color: var(--ink-soft, #4a4438) !important;
    text-align: center;
  }
}
