
/* ---------- RESET ---------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ---------- DESIGN TOKENS ---------- */
:root {
  --ink:       #2a2118;
  --muted:     #6b5d4f;
  --bg:        #fdf9f3;
  --bg-alt:    #f6ede0;
  --card:      #ffffff;
  --orange:    #d97706;
  --orange-d:  #b45309;
  --navy:      #1e3a5f;
  --navy-d:    #0f2440;
  --green:     #15803d;
  --red:       #dc2626;
  --border:    rgba(42, 33, 24, .12);

  --serif: 'Rozha One', 'Playfair Display', Georgia, serif;
  --body:  'Noto Serif Devanagari', Georgia, serif;
  --ui:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --radius:    14px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 3px rgba(42, 33, 24, .06);
  --shadow-md: 0 6px 24px rgba(42, 33, 24, .10);
}

/* ---------- BASE ---------- */
html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h, 64px) + 16px);
}

body {
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.8;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a   { color: inherit; text-decoration: none; }
ul  { list-style: none; }
button { font-family: inherit; }

/* ---------- LAYOUT ---------- */
.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}
.container-narrow {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 24px;
}

.section { padding: 72px 0; }
.section-alt {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-head { margin-bottom: 40px; }
.section-head.center { text-align: center; }
.section-head h2 {
  font-family: var(--serif);
  font-size: clamp(1.7rem, 3.6vw, 2.3rem);
  line-height: 1.25;
  font-weight: 700;
  margin-top: 8px;
  color: var(--ink);
}
.section-head p { color: var(--muted); margin-top: 10px; }

.kicker {
  font-family: var(--ui);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--orange-d);
}

/* ---------- HERO ---------- */
.hero {
  padding: calc(var(--header-h, 64px) + 68px) 0 68px;
  background:
    radial-gradient(700px 400px at 15% 0%, rgba(217,119,6,.10), transparent 65%),
    radial-gradient(600px 380px at 90% 10%, rgba(30,58,95,.08), transparent 60%),
    linear-gradient(180deg, #fffdf9 0%, var(--bg-alt) 100%);
  border-bottom: 1px solid var(--border);
  text-align: center;
}
.hero .eyebrow {
  display: inline-block;
  font-family: var(--ui);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--navy);
  background: rgba(30, 58, 95, .08);
  padding: 7px 16px;
  border-radius: 999px;
  margin-bottom: 22px;
}
.hero h1 {
  font-family: var(--serif);
  font-size: clamp(2.2rem, 5.5vw, 3.6rem);
  font-weight: 700;
  letter-spacing: -.01em;
  line-height: 1.15;
  color: var(--ink);
  margin-bottom: 14px;
}
.hero-sub {
  font-family: var(--ui);
  font-size: clamp(.95rem, 1.8vw, 1.15rem);
  font-weight: 500;
  color: var(--muted);
  max-width: 620px;
  margin: 0 auto 8px;
  line-height: 1.6;
}
.hero-byline {
  font-family: var(--serif);
  font-size: 1.05rem;
  color: var(--orange-d);
  margin-bottom: 32px;
}
.hero-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ---------- BUTTONS ---------- */
.btn {
  font-family: var(--ui);
  font-size: 14.5px;
  font-weight: 600;
  padding: 12px 26px;
  border-radius: 999px;
  border: 1.5px solid transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all .22s ease;
  text-align: center;
  justify-content: center;
}
.btn-primary {
  background: linear-gradient(135deg, var(--orange), var(--orange-d));
  color: #fff;
  box-shadow: 0 6px 18px rgba(217, 119, 6, .25);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(217, 119, 6, .32);
}
.btn-outline {
  background: var(--card);
  color: var(--ink);
  border-color: var(--border);
}
.btn-outline:hover {
  border-color: var(--orange);
  color: var(--orange-d);
  transform: translateY(-2px);
}

/* ---------- AUTHOR ---------- */
.author-grid {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 40px;
  align-items: start;
}
.author-photo {
  border-radius: var(--radius);
  overflow: hidden;
  border: 4px solid #fff;
  box-shadow: var(--shadow-md);
  background: #fff;
  margin: 0;
}
.author-photo img {
  width: 100%;
  height: auto;
  filter: sepia(.08) contrast(1.03);
}
.author-photo figcaption {
  padding: 14px 18px;
  background: linear-gradient(135deg, var(--navy), var(--navy-d));
  color: #fff;
  text-align: center;
}
.author-photo figcaption strong {
  display: block;
  font-family: var(--serif);
  font-size: 1.05rem;
  font-weight: 700;
}
.author-photo figcaption span {
  font-family: var(--ui);
  font-size: 11.5px;
  letter-spacing: .08em;
  opacity: .85;
  margin-top: 3px;
  display: inline-block;
}

.author-bio p { margin-bottom: 14px; color: #3b3128; }
.author-bio strong { color: var(--ink); }
.author-bio em {
  color: var(--orange-d);
  font-style: italic;
  font-weight: 600;
}

/* ---------- AUTHOR DETAIL CARDS ---------- */
.bio-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
  margin-top: 40px;
}
.bio-detail-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  transition: transform .25s ease, box-shadow .25s ease;
  position: relative;
  overflow: hidden;
}
.bio-detail-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 5px;
  height: 100%;
  background: linear-gradient(180deg, var(--orange), var(--orange-d));
}
.bio-detail-card:nth-child(even)::before {
  background: linear-gradient(180deg, var(--navy), #3b82f6);
}
.bio-detail-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}
.bd-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px dashed var(--border);
}
.bd-icon { font-size: 24px; flex: none; }
.bd-head h4 {
  font-family: var(--ui);
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -.01em;
}
.bio-detail-card ul { display: grid; gap: 10px; }
.bio-detail-card li {
  font-size: 14.5px;
  line-height: 1.7;
  padding-left: 22px;
  position: relative;
  color: #4a3d2c;
}
.bio-detail-card li::before {
  content: "✦";
  position: absolute;
  left: 2px; top: 3px;
  color: var(--orange);
  font-size: 12px;
}
.bio-detail-card li strong { color: var(--ink); font-weight: 700; }
.bio-detail-card li em {
  color: var(--orange-d);
  font-style: italic;
  font-weight: 500;
}

/* ---------- SUMMARY ---------- */
.summary-block h3 {
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 700;
  margin: 28px 0 12px;
  display: flex;
  align-items: baseline;
  gap: 12px;
  color: var(--ink);
}
.summary-block h3:first-child { margin-top: 0; }
.summary-block h3 .no {
  flex: none;
  font-family: var(--ui);
  font-size: 12px;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, var(--orange), var(--orange-d));
  width: 26px;
  height: 26px;
  border-radius: 8px;
  display: grid;
  place-items: center;
}
.summary-block p { margin-bottom: 12px; color: #3b3128; }

.pullquote {
  margin: 30px 0;
  padding: 22px 26px;
  background: linear-gradient(135deg, rgba(217,119,6,.08), rgba(30,58,95,.06));
  border-left: 4px solid var(--orange);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-family: var(--serif);
  font-size: 1.1rem;
  font-style: italic;
  line-height: 1.75;
  color: #2f251b;
}
.pullquote cite {
  display: block;
  margin-top: 12px;
  font-family: var(--ui);
  font-size: 12px;
  font-style: normal;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- EXPLANATION ---------- */
.explain-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  margin-bottom: 22px;
  box-shadow: var(--shadow-sm);
  transition: transform .22s ease, box-shadow .22s ease;
}
.explain-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.quote-box {
  background: rgba(30, 58, 95, .05);
  border-left: 4px solid var(--navy);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 16px 20px;
  margin-bottom: 18px;
}
.quote-tag {
  display: inline-block;
  font-family: var(--ui);
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--navy);
  margin-bottom: 8px;
}
.quote-box p {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.02rem;
  line-height: 1.85;
  color: #2f251b;
}

.explain-body p { margin-bottom: 12px; color: #3b3128; }
.explain-body strong { color: var(--ink); }
.explain-body .special {
  background: rgba(217, 119, 6, .07);
  border-left: 3px solid var(--orange);
  padding: 10px 14px;
  border-radius: 0 8px 8px 0;
  margin-top: 14px;
}

.para-no {
  display: inline-block;
  font-family: var(--ui);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  color: #fff;
  background: linear-gradient(135deg, var(--navy), var(--navy-d));
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 10px;
}

/* ---------- SHABDARTH ---------- */
.shabdarth-title {
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--ink);
  margin: 36px 0 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--border);
}
.shabdarth-title:first-of-type { margin-top: 0; }

.shabdarth-badge {
  font-family: var(--ui);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .1em;
  color: #fff;
  background: linear-gradient(135deg, var(--orange), var(--orange-d));
  padding: 6px 14px;
  border-radius: 999px;
  text-transform: uppercase;
  flex: none;
}

.word-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}
.word-item {
  background: var(--card);
  border: 1px solid var(--border);
  border-left: 4px solid var(--orange);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 12px 16px;
  box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease, border-left-color .2s ease;
}
.word-item:hover {
  transform: translateX(4px);
  box-shadow: var(--shadow-md);
  border-left-color: var(--orange-d);
}
.w-word {
  font-family: var(--serif);
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 4px;
}
.w-mean { font-size: 14px; line-height: 1.6; color: #4a3d2c; }

/* ---------- KEY POINTS ---------- */
.key-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}
.key-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
  transition: transform .25s ease, box-shadow .25s ease;
}
.key-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--orange), #f59e0b);
}
.key-card:nth-child(even)::before {
  background: linear-gradient(90deg, var(--navy), #3b82f6);
}
.key-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}
.key-card h4 {
  font-family: var(--ui);
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 14px;
  color: var(--ink);
}
.key-card ul { display: grid; gap: 8px; }
.key-card li {
  font-size: 14.5px;
  line-height: 1.65;
  padding-left: 20px;
  position: relative;
  color: #4a3d2c;
}
.key-card li::before {
  content: "▸";
  position: absolute;
  left: 4px;
  color: var(--orange);
  font-weight: 700;
}
.key-card li strong { color: var(--ink); }

/* ---------- MCQ ---------- */
.mcq-form {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px;
  box-shadow: var(--shadow-sm);
}
.q {
  padding: 22px 0;
  border-bottom: 1px dashed var(--border);
}
.q:first-child { padding-top: 0; }
.q:last-of-type { border-bottom: 0; padding-bottom: 12px; }

.q-text {
  font-size: 16.5px;
  font-weight: 600;
  margin-bottom: 14px;
  line-height: 1.6;
  display: flex;
  gap: 10px;
  color: var(--ink);
}
.q-text span {
  color: var(--orange-d);
  font-family: var(--ui);
  font-weight: 800;
  flex: none;
}

.opts { display: grid; gap: 8px; padding-left: 22px; }
.opts label {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 16px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  background: #fefcf9;
  cursor: pointer;
  font-size: 15.5px;
  line-height: 1.5;
  transition: all .18s ease;
}
.opts label:hover {
  border-color: var(--orange);
  background: rgba(217, 119, 6, .04);
}
.opts input {
  accent-color: var(--orange);
  cursor: pointer;
  flex: none;
}
.opts span {
  font-family: var(--ui);
  font-weight: 700;
  color: var(--muted);
  font-size: 13.5px;
  flex: none;
}
.opts label.correct {
  border-color: var(--green);
  background: rgba(21, 128, 61, .08);
}
.opts label.correct span { color: var(--green); }
.opts label.wrong {
  border-color: var(--red);
  background: rgba(220, 38, 38, .07);
}
.opts label.wrong span { color: var(--red); }

.explain {
  display: none;
  margin: 14px 0 0 22px;
  padding: 12px 18px;
  background: rgba(217, 119, 6, .08);
  border-left: 3px solid var(--orange);
  border-radius: 0 10px 10px 0;
  font-size: 14.5px;
  color: #4a3d2c;
  line-height: 1.7;
}
.explain.show { display: block; }

.mcq-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 26px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}
.score {
  margin-left: auto;
  font-family: var(--ui);
  font-size: 15px;
  font-weight: 700;
  color: var(--muted);
  background: var(--bg-alt);
  padding: 10px 20px;
  border-radius: 10px;
  border: 1px solid var(--border);
}
.score b { color: var(--orange-d); font-size: 18px; }

.result-banner {
  display: none;
  margin-top: 20px;
  padding: 20px 24px;
  border-radius: var(--radius-sm);
  font-family: var(--ui);
  font-size: 15px;
  line-height: 1.6;
  text-align: center;
}
.result-banner.show { display: block; animation: fadeIn .3s ease; }
.result-banner.good {
  background: rgba(21, 128, 61, .1);
  border: 1px solid rgba(21, 128, 61, .3);
  color: #14532d;
}
.result-banner.mid {
  background: rgba(217, 119, 6, .12);
  border: 1px solid rgba(217, 119, 6, .3);
  color: #78350f;
}
.result-banner.low {
  background: rgba(220, 38, 38, .08);
  border: 1px solid rgba(220, 38, 38, .25);
  color: #991b1b;
}
.result-banner .rt {
  font-size: 1.15rem;
  font-weight: 800;
  display: block;
  margin-bottom: 4px;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: none; }
}

/* ---------- Q&A ---------- */
.qa-item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 14px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .2s ease;
}
.qa-item[open] { box-shadow: var(--shadow-md); }
.qa-item summary {
  cursor: pointer;
  list-style: none;
  padding: 18px 22px 18px 50px;
  font-family: var(--ui);
  font-size: 15.5px;
  font-weight: 600;
  line-height: 1.55;
  color: var(--navy);
  position: relative;
  transition: background .2s ease;
}
.qa-item summary::-webkit-details-marker { display: none; }
.qa-item summary::before {
  content: "▶";
  position: absolute;
  left: 22px; top: 22px;
  font-size: 11px;
  color: var(--orange-d);
  transition: transform .25s ease;
}
.qa-item[open] summary::before { transform: rotate(90deg); }
.qa-item summary:hover { background: rgba(217, 119, 6, .04); }
.qa-body {
  padding: 16px 22px 22px 50px;
  font-size: 15.5px;
  line-height: 1.85;
  color: #3b3128;
  border-top: 1px solid var(--border);
}

/* ---------- BACK TO TOP ---------- */
.back-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, var(--orange), var(--orange-d));
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  display: grid;
  place-items: center;
  box-shadow: 0 6px 20px rgba(217, 119, 6, .35);
  opacity: 0;
  pointer-events: none;
  transform: translateY(20px);
  transition: all .3s ease;
  z-index: 900;
}
.back-top.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
.back-top:hover {
  transform: translateY(-3px) scale(1.06);
}

/* ---------- RESPONSIVE (content-only) ---------- */
@media (max-width: 900px) {
  .author-grid { grid-template-columns: 1fr; gap: 28px; }
  .author-photo { max-width: 300px; margin: 0 auto; }
  .bio-detail-grid { grid-template-columns: 1fr; gap: 16px; }
}

@media (max-width: 720px) {
  body { font-size: 16px; }
  .container, .container-narrow { padding: 0 18px; }
  .section { padding: 56px 0; }

  .hero {
    padding: calc(var(--header-h, 58px) + 46px) 0 52px;
  }

  .mcq-form { padding: 22px 18px; }
  .opts { padding-left: 0; }
  .explain { margin-left: 0; }
  .score { margin-left: 0; width: 100%; text-align: center; }
  .mcq-actions .btn { flex: 1; justify-content: center; }

  .qa-item summary { padding: 16px 18px 16px 44px; font-size: 15px; }
  .qa-item summary::before { left: 18px; top: 20px; }
  .qa-body { padding: 14px 18px 18px 44px; }

  .key-grid { grid-template-columns: 1fr; }
  .bio-detail-card { padding: 18px; }
  .word-grid { grid-template-columns: 1fr; }

  .shabdarth-title { font-size: 1.1rem; flex-wrap: wrap; }
  .shabdarth-badge { font-size: 11px; padding: 5px 12px; }

  .back-top { bottom: 16px; right: 16px; width: 44px; height: 44px; }
}

@media (max-width: 420px) {
  .hero-actions .btn { width: 100%; justify-content: center; }
  .opts label { font-size: 15px; }
  .q-text { font-size: 15.5px; }
}

/* ============================================================
   common-header-footer.css
   Bihar Board Class 12 Hindi — Shared Header & Footer
   
   Supported HTML structures:
   
   ── HEADER (dono index + chapter) ───────────────────────────
   <header class="site-header" id="siteHeader">
     <div class="header-inner">
       <a href="…" class="brand">
         <img class="brand-logo" src="…/logo.svg" />
         <span class="brand-words">
           <span class="brand-name">Vasmu<span class="accent">Study</span></span>
           <span class="brand-tag">Empowering Knowledge</span>
         </span>
       </a>
       <nav class="header-nav" id="headerNav">
         <a href="#author">…</a>
         <a href="…" class="donate-nav">…</a>  ← optional
       </nav>
       <button class="menu-toggle" id="menuToggle">☰</button>
     </div>
   </header>
   
   ── FOOTER v1 (chapter pages) ───────────────────────────────
   <footer class="site-footer">
     <div class="footer-inner">
       <div class="f-col">
         <div class="f-brand">
           <span class="brand-logo">वि</span>
           <div>
             <strong>Vasmu<span>Study</span></strong>
             <small>Empowering Knowledge</small>
           </div>
         </div>
         <p>…</p>
       </div>
       <div class="f-col"><h5>Sections</h5><a>…</a></div>
       <div class="f-col"><h5>Legal</h5><a>…</a></div>
     </div>
     <div class="footer-bottom">© 2026 VasmuStudy</div>
   </footer>
   
   ── FOOTER v2 (index.html) ──────────────────────────────────
   <footer class="site-footer">
     <div class="footer-inner">
       <div class="f-col">
         <div class="f-brand-wrap">
           <img class="f-logo" src="../logo.svg" />
           <div>
             <div class="f-brand">Vasmu<span class="accent">Study</span></div>
             <div class="f-tag">Empowering Knowledge</div>
           </div>
         </div>
         <p>…</p>
         <p class="f-quote">…</p>
       </div>
       …
     </div>
     <div class="f-bottom">© 2026 VasmuStudy · Founded by …</div>
   </footer>
   ============================================================ */

/* ============================================================
   1) HEADER HEIGHT VARIABLE
   Content CSS (`chapter-style.css`) isse consume karta hai.
   ============================================================ */
:root {
  --header-h: 64px;
}

/* ============================================================
   2) HEADER
   ============================================================ */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-h);
  background: rgba(253, 249, 243, .95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border, rgba(42, 33, 24, .12));
  z-index: 1000;
  transition: box-shadow .25s ease;
}
.site-header.scrolled {
  box-shadow: var(--shadow-sm, 0 1px 3px rgba(42, 33, 24, .06));
}

.header-inner {
  max-width: 1080px;
  height: 100%;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

/* ---------- Brand ---------- */
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: none;
  min-width: 0;
}

/* Sizing only — works for BOTH <img> in header and <span> in footer */
.brand-logo {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  flex: none;
  object-fit: contain;
  display: block;
}

/* Text block next to logo (index + chapter header) */
.brand-words {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
  min-width: 0;
  overflow: hidden;
}

.brand-name {
  font-family: var(--ui, "Inter", sans-serif);
  font-size: 17px;
  font-weight: 800;
  color: var(--navy, #1e3a5f);
  letter-spacing: -.02em;
  white-space: nowrap;
}
.brand-name .accent {
  color: var(--orange, #d97706);
}

.brand-tag {
  font-family: var(--ui, "Inter", sans-serif);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--muted, #6b5d4f);
  margin-top: 2px;
  white-space: nowrap;
}

/* ---------- Header nav ---------- */
.header-nav {
  display: flex;
  gap: 4px;
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.header-nav::-webkit-scrollbar { display: none; }

.header-nav a {
  font-family: var(--ui, "Inter", sans-serif);
  font-size: 13.5px;
  font-weight: 500;
  color: var(--muted, #6b5d4f);
  padding: 8px 14px;
  border-radius: 999px;
  white-space: nowrap;
  transition: color .2s ease, background .2s ease;
}
.header-nav a:hover,
.header-nav a.active {
  color: var(--orange-d, #b45309);
  background: rgba(217, 119, 6, .08);
}

/* Donate button (index.html only — harmless elsewhere) */
.header-nav a.donate-nav {
  color: #fff;
  background: #f08431;
  box-shadow: 0 4px 12px rgba(194, 65, 12, .2);
}
.header-nav a.donate-nav:hover {
  color: #fff;
  background: #e67320;
  transform: translateY(-1px);
}

/* ---------- Mobile toggle ---------- */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 22px;
  color: var(--ink, #2a2118);
  cursor: pointer;
  padding: 6px 10px;
  flex: none;
  line-height: 1;
  border-radius: 8px;
  transition: background .2s ease;
}
.menu-toggle:hover {
  background: rgba(217, 119, 6, .08);
}

/* ============================================================
   3) FOOTER
   ============================================================ */
.site-footer {
  background: #1c1610;
  color: #cbbfae;
  padding: 60px 24px 40px;
  margin-top: 40px;
}

.footer-inner {
  max-width: none;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
  gap: 36px;
  padding-bottom: 32px;
  border-bottom: 1px solid rgba(255, 255, 255, .09);
}

.f-col p {
  font-size: 14.5px;
  line-height: 1.7;
  margin-bottom: 8px;
  color: #cbbfae;
}

.f-col h5 {
  font-family: var(--ui, "Inter", sans-serif);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: #fdf9f3;
  margin-bottom: 16px;
}

.f-col a {
  display: block;
  font-family: var(--ui, "Inter", sans-serif);
  font-size: 14px;
  color: #cbbfae;
  text-decoration: none;
  padding: 5px 0;
  transition: color .2s ease;
}
.f-col a:hover {
  color: var(--orange, #d97706);
}

/* ---------- Footer brand v1 (chapter pages) ---------- */
.f-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.f-brand .brand-logo {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--orange, #d97706), var(--orange-d, #b45309));
  color: #fff;
  font-family: var(--serif, Georgia, serif);
  font-size: 20px;
  font-weight: 700;
  line-height: 1;
  border-radius: 10px;
  flex: none;
}

.f-brand > div {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.f-brand strong {
  font-family: var(--ui, "Inter", sans-serif);
  font-size: 1.2rem;
  font-weight: 800;
  color: #fdf9f3;
  letter-spacing: -.02em;
}
.f-brand strong span {
  color: var(--orange, #d97706);
}

.f-brand small {
  font-family: var(--ui, "Inter", sans-serif);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: #8b7d6c;
  margin-top: 3px;
}

/* ---------- Footer brand v2 (index.html) ---------- */
.f-brand-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}

.f-logo {
  width: 50px;
  height: 50px;
  border-radius: 10px;
  flex: none;
  object-fit: contain;
}

/* Override: inside .f-brand-wrap, .f-brand is TEXT, not flex */
.f-brand-wrap .f-brand {
  display: block;
  margin-bottom: 0;
  font-family: var(--ui, "Inter", sans-serif);
  font-size: 1.35rem;
  font-weight: 800;
  color: #fdf9f3;
  letter-spacing: -.02em;
  line-height: 1.1;
}
.f-brand-wrap .f-brand .accent {
  color: var(--orange, #d97706);
}

.f-brand-wrap .f-tag {
  font-family: var(--ui, "Inter", sans-serif);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: #8b7d6c;
  margin-top: 3px;
}

.f-quote {
  font-family: var(--body);
  font-style: italic;
  color: #a89880;
  margin-top: 12px;
  font-size: 14px;
  line-height: 1.6;
}

/* ---------- Footer bottom line ---------- */
.footer-bottom,
.f-bottom {
  max-width: 1140px;
  margin: 22px auto 0;
  text-align: center;
  font-family: var(--ui, "Inter", sans-serif);
  font-size: 12.5px;
  color: #8b7d6c;
  line-height: 1.5;
}

/* ============================================================
   4) RESPONSIVE — HEADER + FOOTER ONLY
   ============================================================ */
@media (max-width: 720px) {
  /* Shrink header height — content CSS isse consume karega */
  :root {
    --header-h: 58px;
  }

  .header-inner {
    padding: 0 18px;
    gap: 12px;
  }

  /* Hide tagline on small screens */
  .brand-tag {
    display: none;
  }

  .brand-name {
    font-size: 16px;
  }

  /* Header nav → slide-down panel */
  .header-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg, #fdf9f3);
    border-bottom: 1px solid var(--border, rgba(42, 33, 24, .12));
    flex-direction: column;
    padding: 8px 18px 16px;
    gap: 2px;
    display: none;
    box-shadow: var(--shadow-md, 0 6px 24px rgba(42, 33, 24, .10));
    overflow-x: visible;
  }
  .header-nav.open {
    display: flex;
  }
  .header-nav a {
    padding: 11px 14px;
    border-radius: 8px;
    font-size: 14px;
  }

  .menu-toggle {
    display: block;
  }

  /* Footer stacks on mobile */
  .site-footer {
    padding: 44px 20px 28px;
  }

  .footer-inner {
    grid-template-columns: 1fr 1fr;
    gap: 28px;
  }

  .footer-inner .f-col:first-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 420px) {
  .brand-name { font-size: 15.5px; }
  .brand-logo { width: 34px; height: 34px; }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}
