/* ══════════════════════════════════════════════════════════════
   GuruSadda — Shared Theme (Deep Red + Gold)
   ══════════════════════════════════════════════════════════════ */

/* ── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* Primary (deep saffron-red) palette */
  --saffron-100: #fdf1f0;
  --saffron-200: #f5d0cd;
  --saffron-300: #c56258;
  --saffron-400: #a52a2a;
  --saffron-500: #8B0000;
  --saffron-600: #6b0000;
  --saffron-700: #4a0000;

  /* Gold accent palette */
  --green-100: #fdf8eb;
  --green-200: #f5e6b3;
  --green-300: #d4af37;
  --green-400: #c9a32e;
  --green-500: #b8952a;
  --green-600: #9e7b1a;
  --green-700: #1a1a1a;

  /* Neutral palette */
  --bg:         #fdfbf7;
  --bg-card:    #ffffff;
  --bg-alt:     #f4f4f4;
  --text:       #222;
  --text-muted: #555;
  --text-dim:   #888;
  --border:     #e0e0e0;
  --border-light:#eee;

  /* Semantic */
  --accent:       var(--saffron-500);
  --accent-hover: var(--saffron-400);
  --accent-green: var(--green-500);
  --radius:       6px;
  --radius-sm:    4px;
  --shadow:       0 4px 10px rgba(0,0,0,.05);
  --shadow-lg:    0 8px 24px rgba(0,0,0,.08);
  --font:         'Hind', 'Noto Serif Devanagari', system-ui, sans-serif;
  --font-heading: 'Noto Serif Devanagari', serif;
  --max-w:        1200px;
  --max-w-narrow: 820px;
}

html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100dvh;
  line-height: 1.9;
  font-size: 18px;
  letter-spacing: 0.3px;
}

a { color: var(--accent); text-decoration: none; transition: color .2s; }
a:hover { color: var(--accent-hover); }

img { max-width: 100%; display: block; }

/* ── Utility ───────────────────────────────────────────────── */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 24px; }
.container-narrow { max-width: var(--max-w-narrow); margin: 0 auto; padding: 0 24px; }
.text-center { text-align: center; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

/* ══════════════════════════════════════════════════════════════
   NAVIGATION
   ══════════════════════════════════════════════════════════════ */
.navbar {
  background: #fff;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}
.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0;
  padding-bottom: 0;
  height: 64px;
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}
.nav-brand-icon {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.nav-brand-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.nav-brand-text {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--saffron-500);
  letter-spacing: .3px;
}
.nav-brand-text span {
  color: var(--green-300);
}

.nav-links {
  display: flex;
  gap: 8px;
  list-style: none;
}
.nav-links a {
  color: var(--text);
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: .88rem;
  font-weight: 500;
  transition: all .2s;
  text-decoration: none;
}
.nav-links a:hover,
.nav-links a.active {
  color: var(--saffron-500);
}
.nav-links a.active {
  background: var(--saffron-100);
}

/* Hamburger */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  font-size: 24px;
  cursor: pointer;
  padding: 4px;
}

/* ══════════════════════════════════════════════════════════════
   HERO
   ══════════════════════════════════════════════════════════════ */
.hero {
  background: linear-gradient(135deg, #1a1a1a 0%, #2c2c2c 50%, var(--saffron-700) 100%);
  color: #fff;
  padding: 80px 24px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '🕉';
  position: absolute;
  font-size: 300px;
  opacity: .04;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  user-select: none;
}
.hero h1 {
  font-family: var(--font-heading);
  font-size: 2.8rem;
  font-weight: 700;
  margin-bottom: 16px;
  text-shadow: 0 2px 8px rgba(0,0,0,.2);
  line-height: 1.3;
  text-align: left;
}
.hero h1 span { color: var(--green-300); }
.hero p {
  font-size: 1.15rem;
  margin: 0 0 32px;
  opacity: .9;
  line-height: 1.7;
  text-align: left;
}
.hero-inner {
  display: flex;
  align-items: center;
  gap: 48px;
  max-width: 1100px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}
.hero-text {
  flex: 1;
  min-width: 0;
}
.hero-image {
  flex: 0 0 auto;
  max-width: 440px;
  width: 100%;
}
.hero-image img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius-lg, 16px);
}
.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  position: relative;
  z-index: 2;
}

/* ══════════════════════════════════════════════════════════════
   BUTTONS
   ══════════════════════════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: .95rem;
  font-weight: 600;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all .3s;
  text-decoration: none;
}
.btn-primary {
  background: var(--saffron-500);
  color: #fff;
  border-color: var(--saffron-500);
}
.btn-primary:hover {
  background: #1a1a1a;
  border-color: #1a1a1a;
  color: #fff;
}
.btn-outline {
  background: transparent;
  color: #fff;
  border-color: rgba(255,255,255,.4);
}
.btn-outline:hover {
  background: rgba(255,255,255,.1);
  border-color: #fff;
  color: #fff;
}
.btn-green {
  background: var(--green-500);
  color: #fff;
  border-color: var(--green-500);
}
.btn-green:hover {
  background: var(--green-600);
  border-color: var(--green-600);
  color: #fff;
}

/* ══════════════════════════════════════════════════════════════
   SECTION HEADERS
   ══════════════════════════════════════════════════════════════ */
.section { padding: 64px 0; }
.section-alt { background: var(--bg-alt); }

.section-header {
  text-align: center;
  margin-bottom: 48px;
}
.section-header h2 {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 700;
  color: var(--saffron-500);
  margin-bottom: 8px;
}
.section-header .accent-line {
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--saffron-500), var(--green-300));
  margin: 12px auto 16px;
  border-radius: 2px;
}
.section-header p {
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 auto;
}

/* ══════════════════════════════════════════════════════════════
   CARDS
   ══════════════════════════════════════════════════════════════ */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 28px;
}
.card {
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border-light);
  overflow: hidden;
  transition: transform .25s, box-shadow .25s;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.card-img {
  height: 180px;
  background: linear-gradient(135deg, #1a1a1a, var(--saffron-500));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 64px;
  position: relative;
}
.card-img::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0; right: 0;
  height: 40px;
  background: linear-gradient(transparent, var(--bg-card));
}
.card-body { padding: 20px 24px 24px; }
.card-tag {
  display: inline-block;
  background: var(--green-100);
  color: var(--green-600);
  font-size: .72rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 12px;
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: .5px;
}
.card-body h3 {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
  line-height: 1.4;
}
.card-body h3 a { color: inherit; }
.card-body h3 a:hover { color: var(--accent); }
.card-body p {
  color: var(--text-muted);
  font-size: .88rem;
  line-height: 1.6;
  margin-bottom: 14px;
}
.card-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: .78rem;
  color: var(--text-dim);
}
.card-meta span {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Scripture stat cards */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}
.stat-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border-light);
  padding: 28px 24px;
  text-align: center;
  transition: transform .2s;
}
.stat-card:hover { transform: translateY(-3px); }
.stat-icon { font-size: 40px; margin-bottom: 12px; }
.stat-number {
  font-size: 2rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 4px;
}
.stat-label { color: var(--text-muted); font-size: .85rem; }

/* ══════════════════════════════════════════════════════════════
   BLOG LIST PAGE
   ══════════════════════════════════════════════════════════════ */
.blog-header {
  background: linear-gradient(135deg, #1a1a1a, #2c2c2c);
  color: #fff;
  padding: 48px 24px;
  text-align: center;
  border-bottom: 3px solid var(--green-300);
}
.blog-header h1 { font-family: var(--font-heading); font-size: 2.2rem; font-weight: 700; margin-bottom: 8px; }
.blog-header p { opacity: .85; max-width: 500px; margin: 0 auto; }

.blog-filters {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
  padding: 20px 0;
}
.filter-btn {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 7px 20px;
  font-family: var(--font);
  font-size: .85rem;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  transition: all .2s;
}
.filter-btn:hover,
.filter-btn.active {
  background: var(--saffron-500);
  color: #fff;
  border-color: var(--saffron-500);
}

/* Blog article cards */
.blog-card {
  display: flex;
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border-light);
  overflow: hidden;
  transition: transform .2s, box-shadow .2s;
  margin-bottom: 20px;
}
.blog-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}
.blog-card-accent {
  width: 6px;
  flex-shrink: 0;
  background: linear-gradient(180deg, var(--saffron-500), var(--green-300));
}
.blog-card-body {
  padding: 20px 24px;
  flex: 1;
}
.blog-card-body h2 {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 8px;
  line-height: 1.4;
}
.blog-card-body h2 a { color: var(--text); }
.blog-card-body h2 a:hover { color: var(--accent); }
.blog-card-body p {
  color: var(--text-muted);
  font-size: .88rem;
  line-height: 1.6;
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.blog-card-footer {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: .78rem;
  color: var(--text-dim);
}
.badge-scripture {
  background: var(--green-100);
  color: var(--green-600);
  padding: 3px 10px;
  border-radius: 10px;
  font-weight: 600;
  font-size: .72rem;
}

/* ══════════════════════════════════════════════════════════════
   SCRIPTURE DETAIL / ARTICLE PAGE
   ══════════════════════════════════════════════════════════════ */
.article-header {
  background: linear-gradient(135deg, #1a1a1a, #2c2c2c);
  color: #fff;
  padding: 48px 24px;
  border-bottom: 3px solid var(--green-300);
}
.article-header .breadcrumb {
  font-size: .82rem;
  margin-bottom: 12px;
  opacity: .75;
}
.article-header .breadcrumb a { color: var(--green-300); }
.article-header h1 { font-family: var(--font-heading); font-size: 2rem; font-weight: 700; margin-bottom: 8px; }
.article-header .article-meta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  font-size: .85rem;
  opacity: .85;
}

.article-content {
  max-width: var(--max-w-narrow);
  margin: 0 auto;
  padding: 40px 24px 60px;
}
.verse-block {
  background: var(--bg-card);
  border-left: 4px solid var(--saffron-500);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 20px 24px;
  margin-bottom: 24px;
  box-shadow: var(--shadow);
}
.verse-number {
  display: inline-block;
  background: var(--saffron-100);
  color: var(--saffron-600);
  font-size: .72rem;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 10px;
  margin-bottom: 10px;
}
.verse-shloka-title {
  font-family: var(--font-heading);
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--saffron-700);
  line-height: 1.75;
  text-align: center;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 2px solid var(--border-light);
  white-space: pre-wrap;
}
.verse-sanskrit {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--saffron-700);
  line-height: 1.9;
  margin-bottom: 14px;
  white-space: pre-wrap;
}
.verse-text {
  font-size: 1.15rem;
  color: var(--text);
  line-height: 1.9;
  white-space: pre-wrap;
  margin-bottom: 12px;
}
/* Bold Hindi/translation text when no Sanskrit shloka is present */
.verse-block:not(:has(.verse-shloka-title)):not(:has(.verse-sanskrit)) .verse-text:first-of-type {
  font-weight: 700;
  font-size: 1.4rem;
}
.verse-speaker {
  display: inline-block;
  background: var(--green-100);
  color: var(--green-600);
  font-size: .72rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 8px;
  margin-bottom: 8px;
}

/* Table of contents sidebar */
.article-layout {
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 40px;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 40px 24px 60px;
}
.article-toc {
  position: sticky;
  top: 84px;
  align-self: start;
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border-light);
  padding: 20px;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
}
.article-toc h4 {
  font-family: var(--font-heading);
  font-size: .85rem;
  font-weight: 700;
  color: var(--saffron-500);
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: .5px;
}
.article-toc a {
  display: block;
  padding: 5px 0;
  font-size: .82rem;
  color: var(--text-muted);
  border-left: 2px solid transparent;
  padding-left: 12px;
  transition: all .2s;
}
.article-toc a:hover,
.article-toc a.active {
  color: var(--accent);
  border-left-color: var(--accent);
}

/* ══════════════════════════════════════════════════════════════
   CHATBOT SECTION (on homepage)
   ══════════════════════════════════════════════════════════════ */
.chat-promo {
  display: flex;
  align-items: center;
  gap: 48px;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}
.chat-promo-text { flex: 1; }
.chat-promo-text h2 {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 700;
  color: var(--saffron-500);
  margin-bottom: 12px;
}
.chat-promo-text p {
  color: var(--text-muted);
  margin-bottom: 24px;
  line-height: 1.7;
}
.chat-promo-visual {
  flex: 1;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}
.mini-chat-bubble {
  padding: 10px 16px;
  border-radius: var(--radius);
  font-size: .85rem;
  margin-bottom: 10px;
  max-width: 80%;
}
.mini-chat-bubble.user {
  background: var(--saffron-500);
  color: #fff;
  margin-left: auto;
  border-top-right-radius: 4px;
}
.mini-chat-bubble.bot {
  background: var(--green-100);
  color: var(--text);
  border-top-left-radius: var(--radius-sm);
}

/* ══════════════════════════════════════════════════════════════
   FOOTER
   ══════════════════════════════════════════════════════════════ */
.footer {
  background: #1a1a1a;
  color: rgba(255,255,255,.8);
  padding: 48px 0 24px;
  border-top: 3px solid var(--green-300);
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}
.footer h4 {
  color: var(--green-300);
  font-family: var(--font-heading);
  font-size: .9rem;
  font-weight: 700;
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: .5px;
}
.footer p { font-size: .85rem; line-height: 1.7; opacity: .8; }
.footer-links { list-style: none; }
.footer-links li { margin-bottom: 8px; }
.footer-links a {
  color: rgba(255,255,255,.7);
  font-size: .85rem;
  transition: color .2s;
}
.footer-links a:hover { color: var(--green-300); }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  padding-top: 20px;
  text-align: center;
  font-size: .78rem;
  opacity: .6;
}

/* ══════════════════════════════════════════════════════════════
   CHAT PAGE (full chat interface)
   ══════════════════════════════════════════════════════════════ */
.chat-page {
  display: flex;
  flex-direction: column;
  height: calc(100dvh - 64px);
}
.chat-wrapper {
  flex: 1;
  overflow-y: auto;
  padding: 24px 16px 140px;
  scroll-behavior: smooth;
}
.chat-container {
  max-width: var(--max-w-narrow);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* Welcome */
.chat-welcome {
  text-align: center;
  padding: 60px 20px 20px;
  animation: fadeUp .5s ease;
}
.chat-welcome-icon { font-size: 56px; margin-bottom: 16px; }
.chat-welcome h2 {
  font-family: var(--font-heading);
  font-size: 1.5rem; font-weight: 700;
  color: var(--accent); margin-bottom: 8px;
}
.chat-welcome p {
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 480px;
  margin: 0 auto 28px;
}
.suggestions {
  display: flex; flex-wrap: wrap; gap: 10px;
  justify-content: center; max-width: 600px; margin: 0 auto;
}
.suggestion-btn {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 8px 16px;
  color: var(--text);
  font-size: .82rem;
  cursor: pointer;
  transition: all .2s;
  font-family: var(--font);
}
.suggestion-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--saffron-100);
}

/* Scripture Access Gate */
.scripture-access-gate {
  display: none;
  position: fixed; inset: 0; z-index: 900;
  background: rgba(20, 5, 5, 0.82);
  backdrop-filter: blur(6px);
  align-items: center; justify-content: center;
}
.scripture-gate-box {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 48px 40px;
  max-width: 440px; width: 90%;
  text-align: center;
  box-shadow: 0 24px 80px rgba(0,0,0,.5);
}
.scripture-gate-box .gate-icon { font-size: 3rem; margin-bottom: 16px; }
.scripture-gate-box h2 { font-size: 1.5rem; margin-bottom: 10px; color: var(--accent); }
.scripture-gate-box p { color: var(--text-muted); font-size: .95rem; line-height: 1.7; margin-bottom: 28px; }
.scripture-gate-login-btn {
  display: inline-flex; align-items: center; gap: 10px;
  background: #fff; color: #333;
  border: 1px solid #ddd; border-radius: 8px;
  padding: 11px 24px; font-size: .95rem;
  cursor: pointer; font-family: var(--font);
  transition: box-shadow .2s;
}
.scripture-gate-login-btn:hover { box-shadow: 0 4px 16px rgba(0,0,0,.15); }

/* Messages */
.message { display: flex; gap: 12px; animation: fadeUp .35s ease; }
.message.user { flex-direction: row-reverse; }
.avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; flex-shrink: 0; margin-top: 2px;
}
.message.bot .avatar { background: transparent; overflow: hidden; padding: 0; }
.avatar-img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; display: block; }
.message.user .avatar { background: var(--saffron-500); }

.bubble {
  max-width: 85%;
  padding: 14px 18px;
  border-radius: var(--radius);
  line-height: 1.65;
  font-size: .92rem;
  white-space: pre-wrap;
  word-break: break-word;
}
.message.bot .bubble {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-top-left-radius: var(--radius-sm);
}
.message.bot .bubble h2,
.message.bot .bubble h3,
.message.bot .bubble h4 { margin-top: 14px; margin-bottom: 8px; }
.message.bot .bubble h2:first-child,
.message.bot .bubble h3:first-child,
.message.bot .bubble h4:first-child { margin-top: 0; }
.message.bot .bubble strong { color: var(--saffron-500); }
.message.bot .bubble em { color: var(--green-600); font-style: italic; }
.message.bot .bubble ul { margin: 8px 0; }
.message.bot .bubble li { margin-left: 20px; margin-bottom: 4px; }
.message.bot .bubble table { margin: 12px 0; border-collapse: collapse; width: 100%; }
.message.bot .bubble th {
  background: rgba(139,0,0,.06);
  padding: 8px; text-align: left; font-weight: 600;
  border-bottom: 1px solid var(--border);
  color: var(--saffron-500);
}
.message.bot .bubble td { padding: 8px; border-bottom: 1px solid var(--border-light); }
.message.bot .bubble blockquote {
  border-left: 3px solid var(--accent);
  padding-left: 12px; margin: 8px 0;
  color: var(--text-muted); font-style: italic;
}
.message.bot .bubble pre {
  background: var(--saffron-100);
  padding: 10px 12px; border-radius: 6px;
  overflow-x: auto; margin: 8px 0;
  font-size: .8rem; border: 1px solid var(--border-light);
}
.message.bot .bubble a { color: var(--accent); text-decoration: underline; }
.message.user .bubble {
  background: var(--saffron-500);
  border-top-right-radius: var(--radius-sm);
  color: #fff;
}

.sources { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 6px; }
.source-tag {
  background: rgba(139,0,0,.06);
  border: 1px solid rgba(139,0,0,.2);
  color: var(--saffron-500);
  font-size: .72rem; padding: 4px 10px;
  border-radius: 14px; font-weight: 500;
}
.warning-badge {
  margin-top: 8px;
  background: rgba(180,40,40,.08);
  border: 1px solid rgba(180,40,40,.25);
  color: #b83232;
  font-size: .72rem; padding: 4px 10px;
  border-radius: 14px; display: inline-block;
}
.depth-badge {
  display: inline-block;
  background: rgba(200,93,10,.08);
  border: 1px solid rgba(200,93,10,.22);
  color: var(--accent);
  font-size: .65rem; padding: 2px 8px;
  border-radius: 10px; margin-bottom: 8px;
  font-weight: 500; letter-spacing: .3px;
}

.typing { display: flex; gap: 5px; padding: 6px 0 2px; }
.typing span {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--text-dim);
  animation: bounce 1.4s infinite ease-in-out;
}
.typing span:nth-child(2) { animation-delay: .16s; }
.typing span:nth-child(3) { animation-delay: .32s; }

/* Chat input */
.chat-input-area {
  position: fixed; bottom: 0; left: 0; right: 0;
  background: linear-gradient(transparent, var(--bg) 24px);
  padding: 16px; z-index: 10;
}
.depth-toggle {
  max-width: var(--max-w-narrow);
  margin: 0 auto 6px;
  display: flex; gap: 6px;
  justify-content: center;
}
.depth-btn {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 5px 14px;
  color: var(--text-muted);
  font-size: .75rem;
  font-family: var(--font);
  cursor: pointer;
  transition: all .2s;
  display: flex; align-items: center; gap: 5px;
}
.depth-btn:hover { border-color: var(--accent); color: var(--text); }
.depth-btn.active {
  background: rgba(200,93,10,.12);
  border-color: var(--accent);
  color: var(--accent);
  font-weight: 600;
}
.input-row {
  max-width: var(--max-w-narrow);
  margin: 0 auto;
  display: flex; gap: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 6px 6px 6px 18px;
  transition: border-color .2s;
}
.input-row:focus-within { border-color: var(--accent); }
.input-row textarea {
  flex: 1; background: none; border: none; outline: none;
  color: var(--text); font-family: var(--font);
  font-size: .95rem; resize: none;
  max-height: 120px; line-height: 1.5; padding: 8px 0;
}
.input-row textarea::placeholder { color: var(--text-dim); }
.send-btn {
  width: 42px; height: 42px;
  border-radius: var(--radius-sm);
  border: none;
  background: var(--saffron-500);
  color: #fff; font-size: 18px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .2s, transform .15s;
  flex-shrink: 0;
}
.send-btn:hover { background: var(--saffron-400); }
.send-btn:active { transform: scale(.94); }
.send-btn:disabled { opacity: .4; cursor: not-allowed; }

.input-footer {
  max-width: var(--max-w-narrow);
  margin: 6px auto 0;
  font-size: .68rem;
  color: var(--text-dim);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

/* ══════════════════════════════════════════════════════════════
   ABOUT PAGE
   ══════════════════════════════════════════════════════════════ */
.about-content { max-width: var(--max-w-narrow); margin: 0 auto; padding: 48px 24px; }
.about-content h2 { font-family: var(--font-heading); color: var(--saffron-500); margin-bottom: 12px; }
.about-content p { color: var(--text-muted); margin-bottom: 20px; }
.scripture-list { list-style: none; }
.scripture-list li {
  padding: 16px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
  display: flex; gap: 16px; align-items: center;
}
.scripture-list .emoji { font-size: 28px; }
.scripture-list h3 { font-size: 1rem; margin-bottom: 2px; color: var(--text); }
.scripture-list p { font-size: .82rem; color: var(--text-muted); margin: 0; }

/* ══════════════════════════════════════════════════════════════
   SCROLLBAR
   ══════════════════════════════════════════════════════════════ */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-dim); }

/* ══════════════════════════════════════════════════════════════
   ANIMATIONS
   ══════════════════════════════════════════════════════════════ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes bounce {
  0%, 80%, 100% { transform: scale(0); }
  40% { transform: scale(1); }
}

/* ══════════════════════════════════════════════════════════════
   PAGINATION
   ══════════════════════════════════════════════════════════════ */
.pagination {
  display: flex;
  gap: 6px;
  justify-content: center;
  padding: 32px 0;
}
.pagination button {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  font-family: var(--font);
  font-size: .85rem;
  cursor: pointer;
  transition: all .2s;
  color: var(--text);
}
.pagination button:hover,
.pagination button.active {
  background: var(--saffron-500);
  color: #fff;
  border-color: var(--saffron-500);
}

/* ══════════════════════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════════════════════ */
@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .chat-promo { flex-direction: column; gap: 32px; }
  .article-layout { grid-template-columns: 1fr; }
  .article-toc { position: static; }
  .hero-inner { flex-direction: column; gap: 36px; }
  .hero-image { flex: none; max-width: 560px; width: 100%; margin: 0 auto; }
  .hero h1, .hero p { text-align: center; }
  .hero-actions { justify-content: center; }
}

@media (max-width: 650px) {
  html { font-size: 14px; }
  .hero h1 { font-size: 2rem; }
  .hero { padding: 40px 16px; }
  .hero-inner { flex-direction: column; gap: 32px; }
  .hero-image { flex: none; max-width: 100%; width: 100%; }
  .hero h1, .hero p { text-align: center; }
  .hero-actions { justify-content: center; }
  .navbar .container { height: 56px; }
  .nav-links { display: none; }
  .nav-links.show {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 56px; left: 0; right: 0;
    background: #fff;
    padding: 12px;
    border-bottom: 2px solid var(--green-300);
    gap: 4px;
    box-shadow: var(--shadow);
  }
  .nav-toggle { display: block; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .card-grid { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .blog-card { flex-direction: column; }
  .blog-card-accent { width: 100%; height: 4px; }
  .bubble { max-width: 92%; padding: 12px 14px; }
  .depth-btn { padding: 4px 10px; font-size: .7rem; }
}

/* ══════════════════════════════════════════════════════════════
   AUTH — navbar + login gate
   ══════════════════════════════════════════════════════════════ */
.auth-nav-area {
  display: flex;
  align-items: center;
  min-width: 120px;
  justify-content: flex-end;
}

/* Google sign-in button (navbar) */
.auth-login-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  color: #444;
  border: 1.5px solid #dadce0;
  border-radius: 6px;
  padding: 7px 14px;
  font-size: .82rem;
  font-family: var(--font);
  font-weight: 600;
  cursor: pointer;
  transition: box-shadow .18s, border-color .18s;
  white-space: nowrap;
}
.auth-login-btn:hover {
  box-shadow: 0 2px 8px rgba(0,0,0,.12);
  border-color: #bbb;
}

/* User info (navbar — logged in) */
.auth-user-info {
  display: flex;
  align-items: center;
  gap: 8px;
}
.auth-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--saffron-500);
  flex-shrink: 0;
}
.auth-avatar-initials {
  background: var(--saffron-500);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .85rem;
  font-weight: 700;
}
.auth-user-name {
  font-size: .82rem;
  font-weight: 600;
  color: var(--text);
  max-width: 90px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.auth-signout-btn {
  background: none;
  border: 1.5px solid var(--border);
  border-radius: 6px;
  padding: 4px 10px;
  font-size: .75rem;
  font-family: var(--font);
  color: var(--text-muted);
  cursor: pointer;
  transition: background .15s, color .15s;
}
.auth-signout-btn:hover {
  background: var(--saffron-100);
  color: var(--saffron-700);
  border-color: var(--saffron-500);
}

/* Credit badge (navbar) */
.auth-credit-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: var(--saffron-100);
  color: var(--saffron-700);
  border: 1px solid var(--saffron-500);
  border-radius: 20px;
  padding: 3px 10px;
  font-size: .75rem;
  font-weight: 700;
  white-space: nowrap;
  cursor: default;
  transition: background .2s;
}
.auth-credit-badge.auth-credit-low {
  background: #fff1f1;
  color: #b83232;
  border-color: #e57373;
}

/* Credit display (chat input footer) */
.credit-display {
  font-size: .78rem;
  font-weight: 600;
  color: var(--saffron-700);
  white-space: nowrap;
}
.credit-display.credit-low {
  color: #b83232;
}

/* ── Depth cost badge ───────────────────────────────────────── */
.depth-cost {
  font-size: .65rem;
  opacity: .7;
  margin-left: 2px;
}

/* ── Follow-up Suggestions ──────────────────────────────────── */
.followup-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  align-items: center;
}
.followup-label {
  font-size: .75rem;
  color: var(--text-muted);
  font-weight: 600;
  margin-right: 4px;
}
.followup-btn {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 6px 14px;
  color: var(--text);
  font-size: .78rem;
  font-family: var(--font);
  cursor: pointer;
  transition: all .2s;
  line-height: 1.3;
}
.followup-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(200,93,10,.06);
}

/* ── Chat Login Gate ────────────────────────────────────────── */
.auth-gate {
  position: fixed;
  inset: 64px 0 0 0;
  z-index: 98;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(253, 251, 247, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.auth-gate-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  box-shadow: 0 20px 60px rgba(0,0,0,.15);
  padding: 48px 40px;
  max-width: 420px;
  width: 90%;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
.auth-gate-icon {
  font-size: 3rem;
  line-height: 1;
}
.auth-gate-card h2 {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}
.auth-gate-card p {
  font-size: .95rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0;
}
.auth-gate-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  color: #3c4043;
  border: 1.5px solid #dadce0;
  border-radius: 8px;
  padding: 12px 24px;
  font-size: 1rem;
  font-family: var(--font);
  font-weight: 600;
  cursor: pointer;
  margin-top: 8px;
  transition: box-shadow .18s, border-color .18s;
  width: 100%;
  justify-content: center;
}
.auth-gate-btn:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,.12);
  border-color: #aaa;
}
.auth-gate-note {
  font-size: .78rem;
  color: var(--text-muted);
  margin: 0;
}

@media (max-width: 650px) {
  .auth-user-name { display: none; }
  .auth-gate { inset: 56px 0 0 0; }
  .auth-gate-card { padding: 32px 20px; }
}
