/* ============================================================
   Bharatiya Sakshya Adhiniyam, 2023 — AIBE 2026 Study Module
   Scoped stylesheet. Everything lives under #bsa-aibe-2026 so it
   will not fight with WordPress / Elementor theme styles.
   Fonts: Fraunces (display) + Spectral (body)
   Palette: forest-green primary, parchment base, with saffron /
   sky-blue / violet / soft-red category accents.
   ============================================================ */

/* ---- Font import (safe: only @import, no global body styling) ---- */
@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,600;9..144,700;9..144,900&family=Spectral:wght@400;500;600;700&display=swap');

/* ---- Design tokens, scoped to the wrapper ---- */
#bsa-aibe-2026 {
  --green-900: #0f3d2e;
  --green-800: #14513c;
  --green-700: #1c6b4f;
  --green-500: #2e9d72;
  --green-300: #8fd3b4;
  --green-100: #e2f3ea;

  --ink: #1d2521;
  --ink-soft: #41514a;
  --parchment: #fbf7ec;
  --parchment-2: #f4eedd;
  --card: #ffffff;

  --saffron: #e88a1a;
  --saffron-soft: #fdf0dc;
  --sky: #2f7fc4;
  --sky-soft: #e3f0fa;
  --violet: #7a52c0;
  --violet-soft: #efe9fa;
  --red: #cc4b3c;
  --red-soft: #fbe6e2;

  --line: #ddd3bd;
  --shadow: 0 10px 30px rgba(15, 61, 46, 0.10);
  --shadow-sm: 0 4px 14px rgba(15, 61, 46, 0.08);
  --radius: 16px;
  --radius-sm: 10px;

  box-sizing: border-box;
  max-width: 1180px;
  margin: 0 auto;
  padding: 22px 18px 80px;
  color: var(--ink);
  font-family: 'Spectral', Georgia, 'Times New Roman', serif;
  font-size: 17px;
  line-height: 1.7;
  background:
    radial-gradient(1200px 500px at 12% -8%, var(--green-100), transparent 60%),
    radial-gradient(900px 480px at 110% 4%, var(--saffron-soft), transparent 55%),
    radial-gradient(900px 600px at 50% 120%, var(--sky-soft), transparent 60%),
    var(--parchment);
  border-radius: var(--radius);
}

#bsa-aibe-2026 *,
#bsa-aibe-2026 *::before,
#bsa-aibe-2026 *::after { box-sizing: border-box; }

#bsa-aibe-2026 h1,
#bsa-aibe-2026 h2,
#bsa-aibe-2026 h3,
#bsa-aibe-2026 h4 {
  font-family: 'Fraunces', Georgia, serif;
  line-height: 1.18;
  color: var(--green-900);
  margin: 0 0 .5em;
  letter-spacing: -.01em;
}
#bsa-aibe-2026 p { margin: 0 0 1em; }
#bsa-aibe-2026 a { color: var(--green-700); }

/* ---- Header ---- */
#bsa-aibe-2026 .bsa-header {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  padding: 34px 30px 30px;
  background:
    linear-gradient(135deg, var(--green-900), var(--green-700) 60%, var(--green-500));
  color: #f4fbf6;
  box-shadow: var(--shadow);
  border: 1px solid rgba(255,255,255,.12);
}
#bsa-aibe-2026 .bsa-header::after {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(600px 200px at 90% 0%, rgba(232,138,26,.35), transparent 60%),
    radial-gradient(500px 240px at 0% 100%, rgba(122,82,192,.30), transparent 60%);
  pointer-events: none;
}
#bsa-aibe-2026 .bsa-header h1 {
  color: #fff;
  font-size: clamp(28px, 4.4vw, 46px);
  font-weight: 900;
  margin-bottom: .15em;
  position: relative;
}
#bsa-aibe-2026 .bsa-kicker {
  display: inline-block;
  font-family: 'Spectral', serif;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  font-size: 12.5px;
  color: var(--green-100);
  background: rgba(255,255,255,.10);
  border: 1px solid rgba(255,255,255,.25);
  padding: 5px 12px;
  border-radius: 999px;
  position: relative;
}
#bsa-aibe-2026 .bsa-sub {
  font-size: 17px;
  color: #e7f5ee;
  max-width: 760px;
  position: relative;
  margin-bottom: 16px;
}
#bsa-aibe-2026 .bsa-badges { display: flex; flex-wrap: wrap; gap: 9px; position: relative; }
#bsa-aibe-2026 .bsa-badge {
  font-size: 13px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.28);
  color: #fff;
}

/* ---- Disclaimer banner ---- */
#bsa-aibe-2026 .bsa-disclaimer {
  margin: 18px 0;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  background: var(--saffron-soft);
  border: 1px solid #f0d39e;
  border-left: 5px solid var(--saffron);
  font-size: 14.5px;
  color: #7a4a09;
}

/* ---- Toolbar (print etc.) ---- */
#bsa-aibe-2026 .bsa-toolbar {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
  margin: 14px 0 6px;
}
#bsa-aibe-2026 .bsa-btn {
  font-family: 'Spectral', serif;
  font-size: 14.5px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--green-700);
  background: var(--green-700);
  color: #fff;
  padding: 9px 16px;
  border-radius: 999px;
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}
#bsa-aibe-2026 .bsa-btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); background: var(--green-800); }
#bsa-aibe-2026 .bsa-btn.ghost { background: #fff; color: var(--green-800); }
#bsa-aibe-2026 .bsa-btn.ghost:hover { background: var(--green-100); }
#bsa-aibe-2026 .bsa-btn.amber { background: var(--saffron); border-color: var(--saffron); }
#bsa-aibe-2026 .bsa-btn.amber:hover { background: #cf7813; }

/* ---- Navigation ---- */
#bsa-aibe-2026 .bsa-nav {
  position: sticky; top: 0; z-index: 30;
  margin: 16px 0 8px;
  padding: 10px;
  display: flex; flex-wrap: wrap; gap: 8px;
  background: rgba(251,247,236,.92);
  backdrop-filter: blur(6px);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
}
#bsa-aibe-2026 .bsa-nav a {
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none;
  color: var(--green-800);
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  transition: all .12s ease;
  white-space: nowrap;
}
#bsa-aibe-2026 .bsa-nav a:hover { background: var(--green-100); border-color: var(--green-300); }
#bsa-aibe-2026 .bsa-nav a.active {
  background: var(--green-700); color: #fff; border-color: var(--green-700);
}

/* ---- Jump bar ---- */
#bsa-aibe-2026 .bsa-jumpbar {
  display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 4px;
}
#bsa-aibe-2026 .bsa-jumpbar a {
  font-size: 13px; font-weight: 600; text-decoration: none;
  padding: 7px 13px; border-radius: 999px;
  color: #fff; background: var(--violet); border: 1px solid var(--violet);
  transition: transform .12s ease;
}
#bsa-aibe-2026 .bsa-jumpbar a:nth-child(2n) { background: var(--sky); border-color: var(--sky); }
#bsa-aibe-2026 .bsa-jumpbar a:nth-child(3n) { background: var(--saffron); border-color: var(--saffron); }
#bsa-aibe-2026 .bsa-jumpbar a:nth-child(5n) { background: var(--red); border-color: var(--red); }
#bsa-aibe-2026 .bsa-jumpbar a:hover { transform: translateY(-2px); }

/* ---- Section shell ---- */
#bsa-aibe-2026 .bsa-section { scroll-margin-top: 70px; margin: 30px 0; }
#bsa-aibe-2026 .bsa-section > h2 {
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 800;
  display: flex; align-items: center; gap: 10px;
  padding-bottom: 8px;
  border-bottom: 3px solid var(--green-300);
}
#bsa-aibe-2026 .bsa-section > h2 .bsa-dot {
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--saffron); flex: none;
  box-shadow: 0 0 0 4px var(--saffron-soft);
}

/* ---- Cards & callouts ---- */
#bsa-aibe-2026 .bsa-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 22px;
  box-shadow: var(--shadow-sm);
  margin: 16px 0;
}
#bsa-aibe-2026 .bsa-lead {
  font-size: 18px;
  background: var(--green-100);
  border: 1px solid var(--green-300);
  border-radius: var(--radius);
  padding: 18px 20px;
}
#bsa-aibe-2026 .bsa-grid {
  display: grid; gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

/* Coloured callout boxes */
#bsa-aibe-2026 .bsa-box { border-radius: var(--radius-sm); padding: 13px 16px; margin: 12px 0; border-left: 5px solid; font-size: 15.5px; }
#bsa-aibe-2026 .bsa-box h4 { margin: 0 0 4px; font-size: 15px; font-family: 'Spectral', serif; text-transform: uppercase; letter-spacing: .04em; }
#bsa-aibe-2026 .bsa-example   { background: var(--sky-soft);   border-color: var(--sky);     }
#bsa-aibe-2026 .bsa-example h4{ color: var(--sky); }
#bsa-aibe-2026 .bsa-trap      { background: var(--red-soft);   border-color: var(--red);     }
#bsa-aibe-2026 .bsa-trap h4   { color: var(--red); }
#bsa-aibe-2026 .bsa-take      { background: var(--green-100);  border-color: var(--green-700); }
#bsa-aibe-2026 .bsa-take h4   { color: var(--green-800); }
#bsa-aibe-2026 .bsa-note      { background: var(--violet-soft);border-color: var(--violet);  }
#bsa-aibe-2026 .bsa-note h4   { color: var(--violet); }

#bsa-aibe-2026 ul, #bsa-aibe-2026 ol { margin: 0 0 1em; padding-left: 1.25em; }
#bsa-aibe-2026 li { margin: 4px 0; }
#bsa-aibe-2026 .bsa-secref {
  font-weight: 700; color: var(--green-800);
  background: var(--green-100); padding: 1px 7px; border-radius: 6px;
  font-family: 'Spectral', serif; white-space: nowrap;
}

/* ---- Accordion ---- */
#bsa-aibe-2026 .bsa-acc { margin: 12px 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: #fff; box-shadow: var(--shadow-sm); }
#bsa-aibe-2026 .bsa-acc + .bsa-acc { margin-top: 12px; }
#bsa-aibe-2026 .bsa-acc-head {
  width: 100%; text-align: left; cursor: pointer;
  display: flex; align-items: center; gap: 12px;
  padding: 16px 18px;
  background: linear-gradient(180deg, #ffffff, var(--parchment-2));
  border: none; border-left: 6px solid var(--green-700);
  font-family: 'Fraunces', serif; font-weight: 700; font-size: 18px; color: var(--green-900);
  transition: background .15s ease;
}
#bsa-aibe-2026 .bsa-acc-head:hover { background: var(--green-100); }
#bsa-aibe-2026 .bsa-acc-head:focus-visible { outline: 3px solid var(--saffron); outline-offset: -3px; }
#bsa-aibe-2026 .bsa-acc-num {
  flex: none; width: 30px; height: 30px; border-radius: 8px;
  background: var(--green-700); color: #fff;
  display: grid; place-items: center; font-size: 14px; font-family: 'Spectral', serif;
}
#bsa-aibe-2026 .bsa-acc-title { flex: 1; }
#bsa-aibe-2026 .bsa-acc-secs { font-family: 'Spectral', serif; font-weight: 600; font-size: 12.5px; color: var(--ink-soft); }
#bsa-aibe-2026 .bsa-acc-chev { flex: none; transition: transform .25s ease; color: var(--green-700); font-size: 18px; }
#bsa-aibe-2026 .bsa-acc.open .bsa-acc-chev { transform: rotate(180deg); }
#bsa-aibe-2026 .bsa-acc-body { max-height: 0; overflow: hidden; transition: max-height .35s ease; }
#bsa-aibe-2026 .bsa-acc-inner { padding: 4px 20px 20px; }

/* ---- Tables ---- */
#bsa-aibe-2026 .bsa-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 14px 0; border-radius: var(--radius-sm); border: 1px solid var(--line); }
#bsa-aibe-2026 table { width: 100%; border-collapse: collapse; min-width: 540px; background: #fff; }
#bsa-aibe-2026 caption { caption-side: top; text-align: left; font-family: 'Fraunces', serif; font-weight: 700; color: var(--green-900); padding: 10px 12px; font-size: 17px; }
#bsa-aibe-2026 th, #bsa-aibe-2026 td { padding: 11px 13px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); font-size: 15px; }
#bsa-aibe-2026 thead th { background: var(--green-800); color: #fff; font-family: 'Spectral', serif; font-weight: 600; position: sticky; left: auto; }
#bsa-aibe-2026 tbody tr:nth-child(even) { background: var(--parchment-2); }
#bsa-aibe-2026 tbody tr:hover { background: var(--green-100); }
#bsa-aibe-2026 td .bsa-secref { font-size: 13px; }

/* ---- SVG diagram frames ---- */
#bsa-aibe-2026 .bsa-figure { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow-sm); margin: 16px 0; overflow-x: auto; }
#bsa-aibe-2026 .bsa-figure svg { display: block; width: 100%; height: auto; min-width: 620px; }
#bsa-aibe-2026 .bsa-figcap { font-size: 13.5px; color: var(--ink-soft); text-align: center; margin-top: 8px; font-style: italic; }

/* ---- MCQ ---- */
#bsa-aibe-2026 .bsa-mcq { background: #fff; border: 1px solid var(--line); border-left: 5px solid var(--sky); border-radius: var(--radius-sm); padding: 14px 16px; margin: 12px 0; }
#bsa-aibe-2026 .bsa-mcq .bsa-q { font-weight: 700; color: var(--green-900); margin-bottom: 8px; }
#bsa-aibe-2026 .bsa-mcq .bsa-qnum { color: var(--sky); font-family: 'Spectral', serif; }
#bsa-aibe-2026 .bsa-opts { list-style: none; padding: 0; margin: 0; }
#bsa-aibe-2026 .bsa-opts li { padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px; margin: 6px 0; background: var(--parchment); font-size: 15.5px; }
#bsa-aibe-2026 .bsa-opts li b { color: var(--green-800); }
#bsa-aibe-2026 .bsa-diff { display: inline-block; font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; padding: 2px 9px; border-radius: 999px; margin-left: 8px; vertical-align: middle; }
#bsa-aibe-2026 .bsa-diff.easy { background: var(--green-100); color: var(--green-800); }
#bsa-aibe-2026 .bsa-diff.mod  { background: var(--saffron-soft); color: #8a5410; }
#bsa-aibe-2026 .bsa-diff.hard { background: var(--red-soft); color: #993528; }

/* ---- Answer key ---- */
#bsa-aibe-2026 #bsa-answerkey.bsa-section .bsa-keywrap { display: none; }
#bsa-aibe-2026 #bsa-answerkey.bsa-section.show .bsa-keywrap { display: block; }
#bsa-aibe-2026 .bsa-keygroup { margin: 14px 0; }
#bsa-aibe-2026 .bsa-keygroup h3 { font-size: 19px; margin-top: 18px; }
#bsa-aibe-2026 .bsa-ans { background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--green-500); border-radius: 8px; padding: 9px 13px; margin: 7px 0; font-size: 15px; }
#bsa-aibe-2026 .bsa-ans b { color: var(--green-800); }
#bsa-aibe-2026 .bsa-keyhint { color: var(--ink-soft); font-size: 14px; }

/* ---- Q&A lists ---- */
#bsa-aibe-2026 .bsa-qa { counter-reset: qa; }
#bsa-aibe-2026 .bsa-qa li { margin: 8px 0; }
#bsa-aibe-2026 .bsa-saq, #bsa-aibe-2026 .bsa-daq { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px 18px; }

/* ---- Revision cards ---- */
#bsa-aibe-2026 .bsa-revgrid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
#bsa-aibe-2026 .bsa-revcard { border-radius: var(--radius); padding: 16px 18px; color: #fff; box-shadow: var(--shadow-sm); }
#bsa-aibe-2026 .bsa-revcard h4 { color: #fff; font-size: 16px; margin-bottom: 8px; }
#bsa-aibe-2026 .bsa-revcard ul { padding-left: 1.1em; }
#bsa-aibe-2026 .bsa-revcard li { font-size: 14.5px; }
#bsa-aibe-2026 .bsa-revcard.g { background: linear-gradient(150deg, var(--green-800), var(--green-500)); }
#bsa-aibe-2026 .bsa-revcard.b { background: linear-gradient(150deg, #1d567f, var(--sky)); }
#bsa-aibe-2026 .bsa-revcard.v { background: linear-gradient(150deg, #4f3389, var(--violet)); }
#bsa-aibe-2026 .bsa-revcard.s { background: linear-gradient(150deg, #b46410, var(--saffron)); }
#bsa-aibe-2026 .bsa-revcard.r { background: linear-gradient(150deg, #9c3729, var(--red)); }

/* ---- Back to top ---- */
#bsa-aibe-2026 .bsa-top {
  position: fixed; right: 18px; bottom: 18px; z-index: 50;
  width: 48px; height: 48px; border-radius: 50%;
  border: none; cursor: pointer;
  background: var(--green-700); color: #fff; font-size: 22px;
  box-shadow: var(--shadow);
  opacity: 0; visibility: hidden; transform: translateY(10px);
  transition: all .2s ease;
}
#bsa-aibe-2026 .bsa-top.show { opacity: 1; visibility: visible; transform: translateY(0); }
#bsa-aibe-2026 .bsa-top:hover { background: var(--green-800); }

/* ---- Footer ---- */
#bsa-aibe-2026 .bsa-footer { margin-top: 36px; padding-top: 18px; border-top: 1px solid var(--line); font-size: 13.5px; color: var(--ink-soft); text-align: center; }

/* ---- Responsive ---- */
@media (max-width: 640px) {
  #bsa-aibe-2026 { font-size: 16px; padding: 14px 12px 70px; }
  #bsa-aibe-2026 .bsa-header { padding: 24px 18px; }
  #bsa-aibe-2026 .bsa-acc-head { font-size: 16px; gap: 9px; padding: 13px 14px; }
  #bsa-aibe-2026 .bsa-acc-secs { display: none; }
  #bsa-aibe-2026 .bsa-nav { position: static; }
}

/* ---- Print ---- */
@media print {
  #bsa-aibe-2026 {
    max-width: none; background: #fff; padding: 0; color: #000;
  }
  #bsa-aibe-2026 .bsa-nav,
  #bsa-aibe-2026 .bsa-jumpbar,
  #bsa-aibe-2026 .bsa-toolbar,
  #bsa-aibe-2026 .bsa-top { display: none !important; }
  #bsa-aibe-2026 .bsa-header { color: #000; background: #fff; border: 1px solid #999; }
  #bsa-aibe-2026 .bsa-header::after { display: none; }
  #bsa-aibe-2026 .bsa-header h1,
  #bsa-aibe-2026 .bsa-kicker,
  #bsa-aibe-2026 .bsa-sub,
  #bsa-aibe-2026 .bsa-badge { color: #000; }
  #bsa-aibe-2026 .bsa-acc-body { max-height: none !important; }
  #bsa-aibe-2026 #bsa-answerkey .bsa-keywrap { display: block !important; }
  #bsa-aibe-2026 .bsa-card,
  #bsa-aibe-2026 .bsa-acc,
  #bsa-aibe-2026 .bsa-mcq,
  #bsa-aibe-2026 .bsa-figure { break-inside: avoid; box-shadow: none; }
  #bsa-aibe-2026 thead th { background: #ddd !important; color: #000 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}