/* BOU Question Bank — Bangla-first styling */

:root {
  --bou-primary: #0b5e3b;   /* deep green */
  --bou-primary-2: #0d7d4d;

  /* Homepage palette — the printed course module: green board, teal board,
     marigold exam stamp, on a paper-cool canvas. */
  --bou-ink: #0e2019;
  --bou-teal: #12586b;
  --bou-teal-2: #17708a;
  --bou-marigold: #b8651a;
  --bou-canvas: #e9eeea;
  --bou-line: #d7e0d8;

  /* Type roles: a Bangla text serif for voice, the sans for reading,
     mono for BOU course codes (BEC-5304) which are read like part numbers. */
  --bou-display: "Tiro Bangla", "Noto Serif Bengali", Georgia, serif;
  --bou-mono: "IBM Plex Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
}

body {
  /* Noto Sans Bengali first, then sensible Bangla/Latin fallbacks */
  font-family: "Noto Sans Bengali", "Hind Siliguri", "SolaimanLipi",
               "Kalpurush", "Segoe UI", system-ui, -apple-system, sans-serif;
  line-height: 1.7;
  background-color: #f7f9fb;
}

/* Comfortable reading for Bangla content blocks */
.bangla-text {
  line-height: 1.9;
  word-break: break-word;
}

.question-body {
  font-weight: 500;
  line-height: 2;
}

/* Navbar / footer */
.bou-navbar {
  background-color: var(--bou-primary);
}
/* Bootstrap's navbar-dark links default to ~55% white, which looks faded on
   the green bar. Brighten them so the menu is clearly readable. */
.bou-navbar .navbar-nav .nav-link {
  color: rgba(255, 255, 255, .92);
  font-weight: 500;
}
.bou-navbar .navbar-nav .nav-link:hover,
.bou-navbar .navbar-nav .nav-link:focus {
  color: #fff;
}
.bou-navbar .navbar-nav .nav-link.active,
.bou-navbar .navbar-nav .show > .nav-link {
  color: #fff;
  font-weight: 600;
}
.bou-footer {
  background-color: #0a2a1d;
  color: #cfe8db;
}
/* Bootstrap's .text-muted is a dark grey — unreadable on the dark footer. */
.bou-footer .text-muted { color: #9ab8a8 !important; }

/* Hero */
.bou-hero {
  background: linear-gradient(135deg, var(--bou-primary), var(--bou-primary-2));
  color: #fff;
}
.bou-hero .btn-primary {
  background-color: #fff;
  color: var(--bou-primary);
  border-color: #fff;
  font-weight: 600;
}

/* Cards */
.program-card,
.subject-card {
  transition: transform .12s ease, box-shadow .12s ease;
  color: inherit;
}
.program-card:hover,
.subject-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 .5rem 1rem rgba(0, 0, 0, .12) !important;
}

.subject-card .card-header {
  border-bottom: none;
}

/* ---- App-style bottom navigation (mobile) ---- */
.bou-bottomnav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1030;
  display: flex;
  background: #ffffff;
  border-top: 1px solid #e3e6ea;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, .06);
  padding-bottom: env(safe-area-inset-bottom); /* iPhone home-indicator gap */
}
.bou-bottomnav .bn-item {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: .4rem .15rem .35rem;
  font-size: .72rem;
  line-height: 1.15;
  color: #5a6b62;
  text-decoration: none;
}
.bou-bottomnav .bn-item .bn-ic { font-size: 1.2rem; }
.bou-bottomnav .bn-item.active { color: var(--bou-primary); font-weight: 600; }
.bou-bottomnav .bn-item:active { background: #f1f4f2; }

/* Leave room above the bottom bar so content isn't hidden behind it */
@media (max-width: 991.98px) {
  body { padding-bottom: 62px; }
  .bou-footer { margin-bottom: 0; }
}

/* App-like polish on phones: tighter brand, comfy tap targets */
@media (max-width: 575.98px) {
  .navbar-brand img { width: 30px; height: 30px; }
  .navbar-brand span { font-size: 1.05rem; }
  .subject-card, .program-card { border-radius: .9rem; }
}

/* ===========================================================================
   Homepage
   The site serves exactly two semesters, so the page is built around that one
   choice: two "boards" (5th / 6th) holding their course list, followed by the
   countdown to the next paper in the 2026 routine. Everything is prefixed
   .hm- so it cannot collide with the shared card/hero styles above.
   =========================================================================== */

/* A single line of identity above the exam band — the countdown is the hero,
   this just says whose question bank it is. */
.hm-masthead { max-width: 42rem; padding: .25rem 0 1.25rem; }
.hm-find { max-width: 42rem; margin-bottom: 2.5rem; }
.hm-eyebrow {
  font-size: .85rem;
  color: var(--bou-primary);
  font-weight: 600;
  margin-bottom: .75rem;
  padding-bottom: .6rem;
  border-bottom: 2px solid var(--bou-marigold);
  display: inline-block;
}
.hm-title {
  font-family: var(--bou-display);
  font-size: clamp(1.6rem, 4.5vw, 2.3rem);
  line-height: 1.3;
  color: var(--bou-ink);
  margin: 0;
}
.hm-lede {
  font-size: 1.05rem;
  color: #47564e;
  max-width: 34rem;
  margin-bottom: 1.5rem;
}

/* Search: one field, full width on phones — the primary way in for anyone who
   already knows the subject they need. */
.hm-search { display: flex; gap: .5rem; flex-wrap: wrap; }
.hm-search-input {
  flex: 1 1 16rem;
  min-width: 0;
  padding: .7rem 1rem;
  font-size: 1rem;
  font-family: inherit;
  color: var(--bou-ink);
  background: #fff;
  border: 1px solid var(--bou-line);
  border-radius: .7rem;
}
.hm-search-input:focus {
  outline: 2px solid var(--bou-primary);
  outline-offset: 1px;
  border-color: transparent;
}
.hm-search-btn {
  padding: .7rem 1.5rem;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  background: var(--bou-primary);
  border: 0;
  border-radius: .7rem;
  cursor: pointer;
}
.hm-search-btn:hover { background: var(--bou-primary-2); }

/* The exam band — the page's opening statement while the session runs. One
   paper, its date, and the clock running down to it. */
.hm-exam {
  position: relative;
  overflow: hidden;
  color: #fff;
  background: linear-gradient(105deg, #0a4b30 0%, #0b5e3b 45%, #12586b 100%);
  border-radius: 1.1rem;
  padding: 1.6rem 1.5rem;
  margin-bottom: 3rem;
}
/* A single marigold rule along the top edge: the exam-stamp accent. */
.hm-exam::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: var(--bou-marigold);
}
.hm-exam p { margin: 0; }

.hm-exam-label {
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .01em;
  color: #f2c078;
  margin-bottom: .35rem !important;
}
.hm-exam-subject {
  font-family: var(--bou-display);
  font-size: clamp(1.5rem, 4.5vw, 2.1rem);
  line-height: 1.35;
  margin: 0 0 .5rem;
}
.hm-exam-subject a { color: #fff; text-decoration: none; }
.hm-exam-subject a:hover { text-decoration: underline; }

.hm-exam-when {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: .3rem .9rem;
  font-size: .9rem;
  color: rgba(255, 255, 255, .82);
}
.hm-exam-when strong {
  font-family: var(--bou-mono);
  font-size: 1.05rem;
  color: #fff;
}
.hm-exam-code {
  font-family: var(--bou-mono);
  font-size: .75rem;
  padding: .1rem .45rem;
  border-radius: .35rem;
  background: rgba(255, 255, 255, .14);
}

/* Live countdown: four cells that tick every second. */
.hm-countdown {
  margin-top: 1.2rem !important;
  padding-top: 1.1rem;
  border-top: 1px solid rgba(255, 255, 255, .22);
  font-weight: 600;
  color: #f2c078;
}
.hm-countdown--live { display: flex; flex-wrap: wrap; gap: 1.6rem; }
.hm-cd-cell { display: flex; flex-direction: column; line-height: 1.15; }
.hm-cd-cell b {
  font-family: var(--bou-mono);
  font-size: clamp(1.8rem, 6vw, 2.6rem);
  font-weight: 500;
  color: #fff;
  font-variant-numeric: tabular-nums;
}
.hm-cd-cell span {
  font-size: .72rem;
  font-weight: 400;
  color: rgba(255, 255, 255, .7);
}

.hm-exam-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  margin-top: 1.3rem !important;
}
.hm-exam-cta,
.hm-exam-alt {
  padding: .55rem 1.15rem;
  border-radius: .6rem;
  font-family: inherit;
  font-weight: 600;
  font-size: .95rem;
  line-height: 1.5;
  text-decoration: none;
  cursor: pointer;
}
.hm-exam-cta { background: #fff; color: var(--bou-primary); border: 1px solid #fff; }
.hm-exam-cta:hover { background: #eef4ef; color: var(--bou-primary); }
.hm-exam-alt {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, .45);
  color: #fff;
}
.hm-exam-alt:hover { background: rgba(255, 255, 255, .12); color: #fff; }

/* ---- The two semester boards -------------------------------------------- */

.hm-doors {
  display: grid;
  gap: 1.25rem;
  margin-bottom: 3rem;
}
@media (min-width: 880px) {
  .hm-doors { grid-template-columns: 1fr 1fr; gap: 1.5rem; }
}

.hm-door {
  background: #fff;
  border: 1px solid var(--bou-line);
  border-radius: 1rem;
  overflow: hidden;
  animation: hm-rise .45s cubic-bezier(.2, .7, .3, 1) backwards;
  animation-delay: calc(var(--hm-delay, 0) * .09s);
}
@keyframes hm-rise {
  from { opacity: 0; transform: translateY(12px); }
}

.hm-door-head {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 1.1rem 1.25rem;
  color: #fff;
  background: var(--hm-tone, var(--bou-primary));
}
.hm-door--a { --hm-tone: linear-gradient(100deg, #0b5e3b, #0d7d4d 92%); }
.hm-door--b { --hm-tone: linear-gradient(100deg, #12586b, #17708a 92%); }

/* The ordinal is the board's stamp: set large in the display serif. */
.hm-door-ord {
  font-family: var(--bou-display);
  font-size: 2.6rem;
  line-height: 1;
  padding: .35rem .7rem .5rem;
  border: 2px solid rgba(255, 255, 255, .55);
  border-radius: .6rem;
}
.hm-door-headings { flex: 1 1 8rem; }
.hm-door-title {
  font-family: var(--bou-display);
  font-size: 1.35rem;
  margin: 0;
  line-height: 1.4;
}
.hm-door-meta {
  margin: 0;
  font-size: .9rem;
  color: rgba(255, 255, 255, .85);
}
.hm-door-exam {
  margin: 0;
  text-align: right;
  font-size: .85rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, .85);
}
.hm-door-exam strong {
  display: block;
  font-family: var(--bou-mono);
  font-size: 1rem;
  color: #fff;
}

.hm-list { list-style: none; margin: 0; padding: 0; }
.hm-list li + li { border-top: 1px solid var(--bou-line); }

.hm-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: .35rem .75rem;
  padding: .7rem 1.25rem;
  text-decoration: none;
  color: var(--bou-ink);
}
.hm-row:hover, .hm-row:focus-visible { background: var(--bou-canvas); }
.hm-row:focus-visible { outline: 2px solid var(--bou-primary); outline-offset: -2px; }
.hm-row-code {
  font-family: var(--bou-mono);
  font-size: .78rem;
  letter-spacing: .02em;
  color: #4c5b53;
  background: var(--bou-canvas);
  border-radius: .35rem;
  padding: .15rem .45rem;
}
.hm-row-name { font-weight: 500; }
.hm-row-count {
  font-size: .82rem;
  color: var(--bou-primary);
  font-weight: 600;
  white-space: nowrap;
}
.hm-row-count--empty { color: #7d8a83; font-weight: 400; }

/* ---- Countdown to the next papers --------------------------------------- */

.hm-section-title {
  font-family: var(--bou-display);
  font-size: 1.5rem;
  color: var(--bou-ink);
  margin: 0;
}
.hm-routine { margin-bottom: 3rem; }
.hm-routine-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}
.hm-routine-all { font-weight: 600; text-decoration: none; }
.hm-routine-all:hover { text-decoration: underline; }

.hm-tickets { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }
@media (min-width: 880px) {
  .hm-tickets { grid-template-columns: 1fr 1fr; gap: .75rem 1.5rem; }
}
.hm-ticket {
  background: #fff;
  border: 1px solid var(--bou-line);
  border-left: 4px solid var(--bou-line);
  border-radius: .7rem;
  overflow: hidden;
}
.hm-ticket:hover { border-left-color: var(--bou-primary); }
.hm-ticket-in {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: .25rem 1rem;
  padding: .85rem 1rem .85rem 1.15rem;
  text-decoration: none;
  color: inherit;
}
.hm-ticket-in:focus-visible { outline: 2px solid var(--bou-primary); outline-offset: -3px; }
.hm-ticket-when { grid-column: 1; display: flex; flex-wrap: wrap; gap: .1rem .6rem; align-items: baseline; }
.hm-ticket-date { font-family: var(--bou-mono); font-weight: 500; color: var(--bou-ink); }
.hm-ticket-day { font-size: .85rem; color: #6b7a72; }
.hm-ticket-what { grid-column: 1; display: flex; flex-wrap: wrap; gap: .3rem .6rem; align-items: baseline; }
.hm-ticket-subject { font-weight: 600; color: var(--bou-ink); }
.hm-ticket-tags { display: flex; gap: .4rem; flex-wrap: wrap; }
.hm-ticket-code,
.hm-ticket-sem {
  font-size: .75rem;
  padding: .1rem .45rem;
  border-radius: .35rem;
  background: var(--bou-canvas);
  color: #4c5b53;
}
.hm-ticket-code { font-family: var(--bou-mono); }
.hm-ticket-left {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
  text-align: right;
  font-size: .9rem;
  font-weight: 600;
  color: #6b7a72;
  white-space: nowrap;
}
.hm-ticket:hover .hm-ticket-subject { text-decoration: underline; }

/* ---- Quiet closing tiles ------------------------------------------------- */

.hm-tiles { display: grid; gap: 1rem; }
@media (min-width: 720px) {
  .hm-tiles { grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); }
}
.hm-tile {
  display: flex;
  flex-direction: column;
  gap: .35rem;
  padding: 1.1rem 1.15rem;
  background: #fff;
  border: 1px solid var(--bou-line);
  border-radius: .9rem;
  text-decoration: none;
  color: var(--bou-ink);
}
.hm-tile:hover { border-color: var(--bou-primary); }
.hm-tile-title { font-family: var(--bou-display); font-size: 1.15rem; }
.hm-tile-body { font-size: .92rem; color: #55635b; }
.hm-tile-link { margin-top: .35rem; font-weight: 600; color: var(--bou-primary); }

.hm-empty {
  background: #fff;
  border: 1px dashed var(--bou-line);
  border-radius: 1rem;
  padding: 2rem 1.25rem;
  margin-bottom: 3rem;
}
.hm-empty h2 { font-family: var(--bou-display); font-size: 1.4rem; }

@media (prefers-reduced-motion: reduce) {
  .hm-door { animation: none; }
}

/* ===========================================================================
   Exam routine page — same materials as the homepage: green/teal semester
   blocks, mono paper codes, marigold for what is closest in time.
   =========================================================================== */

.rt-masthead { padding: .25rem 0 1.25rem; max-width: 44rem; }
.rt-title {
  font-family: var(--bou-display);
  font-size: clamp(1.6rem, 4.5vw, 2.3rem);
  line-height: 1.3;
  color: var(--bou-ink);
  margin: 0;
}
.rt-sub {
  margin: .3rem 0 0;
  font-family: var(--bou-mono);
  font-size: .9rem;
  color: #6b7a72;
}

/* Count + semester filter, sitting above the timeline. */
.rt-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .75rem 1rem;
  margin-bottom: 1.25rem;
}
.rt-bar-stat { margin: 0; font-size: .92rem; color: #6b7a72; }
.rt-bar-stat strong { font-family: var(--bou-mono); color: var(--bou-ink); }

.rt-tabs {
  display: flex;
  gap: .5rem;
  overflow-x: auto;
  scrollbar-width: none;
}
.rt-tabs::-webkit-scrollbar { display: none; }
.rt-tab {
  flex: 0 0 auto;
  padding: .4rem 1rem;
  font-family: inherit;
  font-size: .92rem;
  font-weight: 600;
  color: #55625b;
  background: #fff;
  border: 1px solid var(--bou-line);
  border-radius: 999px;
  cursor: pointer;
}
.rt-tab:hover { border-color: var(--bou-primary); color: var(--bou-primary); }
.rt-tab.is-active {
  background: var(--bou-primary);
  border-color: var(--bou-primary);
  color: #fff;
}
.rt-tab-count { opacity: .75; font-size: .85em; }

/* ---- Timeline -----------------------------------------------------------
   The routine is time, so it is drawn as time: one rail down the page, months
   as headings, each paper a card hanging off its date. */

.rt-timeline { margin-bottom: 3rem; }
.rt-month + .rt-month { margin-top: 2rem; }
.rt-month-title {
  font-family: var(--bou-display);
  font-size: 1.05rem;
  color: #6b7a72;
  margin: 0 0 .9rem;
  padding-bottom: .4rem;
  border-bottom: 1px solid var(--bou-line);
}

.rt-days { list-style: none; margin: 0; padding: 0; }
.rt-day {
  position: relative;
  display: grid;
  grid-template-columns: 3.4rem 1fr;
  gap: 1rem;
  padding-bottom: .8rem;
}
/* The rail: a hairline running through the date column. */
.rt-day::before {
  content: "";
  position: absolute;
  top: .3rem;
  bottom: -.2rem;
  inset-inline-start: 1.65rem;
  width: 2px;
  background: var(--bou-line);
}
.rt-day:last-child::before { bottom: auto; height: 1.2rem; }

.rt-date {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding-top: .35rem;
  background: #f7f9fb;
}
.rt-date-d {
  font-family: var(--bou-mono);
  font-size: 1.35rem;
  line-height: 1;
  color: var(--bou-ink);
}
.rt-date-day { font-size: .7rem; color: #8b968f; }

.rt-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .5rem 1rem;
  padding: .8rem 1rem;
  background: #fff;
  border: 1px solid var(--bou-line);
  border-inline-start: 4px solid var(--rt-tone, var(--bou-primary));
  border-radius: .7rem;
  text-decoration: none;
  color: var(--bou-ink);
}
.rt-card--a { --rt-tone: var(--bou-primary); }
.rt-card--b { --rt-tone: var(--bou-teal); }
.rt-card:hover { border-color: var(--rt-tone, var(--bou-primary)); color: var(--bou-ink); }
.rt-card:hover .rt-subject { text-decoration: underline; }

.rt-card-main { display: flex; flex-direction: column; gap: .35rem; min-width: 0; }
.rt-subject { font-weight: 600; font-size: 1.02rem; }
.rt-tags { display: flex; flex-wrap: wrap; gap: .35rem; }
.rt-ses,
.rt-sem {
  font-size: .75rem;
  padding: .1rem .45rem;
  border-radius: .35rem;
  white-space: nowrap;
}
.rt-ses--am { background: #fdf1e2; color: #a4570f; }
.rt-ses--pm { background: #e7eef5; color: #2b5578; }
.rt-sem { background: var(--bou-canvas); color: #5b6a62; }

.rt-left {
  font-family: var(--bou-mono);
  font-size: .9rem;
  font-weight: 500;
  color: #6b7a72;
  white-space: nowrap;
}
/* The soonest paper still ahead gets the marigold. */
.rt-day:not(.is-past) ~ .rt-day .rt-left { color: #6b7a72; }
.rt-day:not(.is-past) .rt-left { color: var(--bou-marigold); }
.rt-day:not(.is-past) ~ .rt-day:not(.is-today) .rt-left { color: #6b7a72; }
.rt-day.is-past { opacity: .5; }
.rt-day.is-past .rt-left { color: #8b968f; }
.rt-day.is-today .rt-card { border-color: var(--bou-marigold); box-shadow: 0 0 0 2px rgba(184, 101, 26, .15); }

.rt-notes {
  background: #fff;
  border: 1px solid var(--bou-line);
  border-radius: 1rem;
  padding: 1.5rem 1.35rem;
}
.rt-notes ul { margin: 1rem 0 0; padding-inline-start: 1.1rem; line-height: 1.95; }
.rt-notes li::marker { color: var(--bou-marigold); }

@media (max-width: 460px) {
  .rt-day { grid-template-columns: 2.9rem 1fr; gap: .7rem; }
  .rt-day::before { inset-inline-start: 1.4rem; }
  .rt-date-d { font-size: 1.15rem; }
}

/* Print: the schedule alone, on paper. */
@media print {
  .hm-exam, .rt-bar, .bou-navbar, .bou-footer, .bou-bottomnav { display: none !important; }
  .rt-card { break-inside: avoid; border-inline-start-width: 2px; }
  .rt-date { background: transparent; }
}

/* ===========================================================================
   Subject page — the question list. The header is the same board as the
   homepage semester panels; below it the questions are a numbered sheet.
   =========================================================================== */

/* Header: a masthead, not a banner. The colour is a rule under the title, so
   the questions start near the top of the screen instead of below a slab. */
.sb-head {
  padding: .25rem 0 1.1rem;
  margin-bottom: 1.5rem;
  border-bottom: 3px solid var(--sb-tone, var(--bou-primary));
}
.sb-head--a { --sb-tone: var(--bou-primary); }
.sb-head--b { --sb-tone: var(--bou-teal); }

.sb-eyebrow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .35rem .7rem;
  margin: 0 0 .5rem;
  font-size: .82rem;
  color: #61706a;
}
.sb-code {
  font-family: var(--bou-mono);
  font-size: .78rem;
  padding: .1rem .45rem;
  border-radius: .35rem;
  color: #fff;
  background: var(--sb-tone, var(--bou-primary));
}
.sb-en { color: #7b8a83; }

.sb-head-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: .5rem 1rem;
}
.sb-title {
  font-family: var(--bou-display);
  font-size: clamp(1.6rem, 5vw, 2.3rem);
  line-height: 1.3;
  color: var(--bou-ink);
  margin: 0;
}
.sb-count {
  margin: 0;
  font-size: .95rem;
  color: #61706a;
  white-space: nowrap;
}
.sb-count strong {
  font-family: var(--bou-mono);
  font-size: 1.2rem;
  color: var(--sb-tone, var(--bou-primary));
}
.sb-desc { margin: .6rem 0 0; color: #55635b; max-width: 42rem; }

.sb-meta { display: flex; flex-wrap: wrap; gap: .6rem; margin: .9rem 0 0; }
.sb-exam {
  display: inline-flex;
  align-items: baseline;
  gap: .4rem;
  padding: .35rem .75rem;
  border-radius: .5rem;
  background: #fff;
  border: 1px solid var(--bou-line);
  font-size: .88rem;
  color: #55635b;
  text-decoration: none;
}
.sb-exam strong { font-family: var(--bou-mono); color: var(--bou-ink); }
.sb-exam-left { color: var(--bou-marigold); font-weight: 600; }
.sb-exam:hover { border-color: var(--sb-tone, var(--bou-primary)); }
.sb-print {
  padding: .35rem .75rem;
  font: inherit;
  font-size: .88rem;
  color: #55635b;
  background: #fff;
  border: 1px solid var(--bou-line);
  border-radius: .5rem;
  cursor: pointer;
}
.sb-print:hover { border-color: var(--sb-tone, var(--bou-primary)); }

/* ---- The question sheet --------------------------------------------------
   Read like a printed suggestion sheet: hairline-separated entries, the
   number set in the display serif, the question itself doing the talking.
   Two columns once there is room, so a whole paper fits on one screen. */

/* Two panels side by side: রচনামূলক left, সংক্ষিপ্ত right. Each is its own
   numbered sheet, so the numbers mean "nth broad question", not "nth row". */
.sb-panels {
  display: grid;
  gap: 2rem;
  margin-bottom: 2rem;
}
@media (min-width: 900px) {
  .sb-panels { grid-template-columns: 1fr 1fr; gap: 2.5rem; align-items: start; }
  /* A third type (MCQ) runs full width beneath the pair. */
  .sb-panel--mcq { grid-column: 1 / -1; }
}

.sb-panel-title {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-family: var(--bou-display);
  font-size: 1.15rem;
  color: var(--bou-ink);
  margin: 0 0 .35rem;
  padding-bottom: .5rem;
  border-bottom: 2px solid var(--sb-tone, var(--bou-primary));
}
.sb-panel-count {
  font-family: var(--bou-mono);
  font-size: .8rem;
  padding: .05rem .45rem;
  border-radius: .3rem;
  background: var(--bou-canvas);
  color: #5b6a62;
}
.sb-panel-empty {
  margin: .9rem 0 0;
  padding: 1rem;
  font-size: .92rem;
  color: #6b7a72;
  background: #fff;
  border: 1px dashed var(--bou-line);
  border-radius: .7rem;
}

.sb-sheet { list-style: none; margin: 0; padding: 0; }
.sb-q { break-inside: avoid; }

.sb-q-in {
  display: grid;
  grid-template-columns: 2.2rem 1fr;
  gap: .2rem .8rem;
  padding: .85rem .5rem .85rem 0;
  border-bottom: 1px solid var(--bou-line);
  text-decoration: none;
  color: var(--bou-ink);
}
/* Marker on the left edge, no size change — the row must not jump on hover. */
.sb-q-in:hover {
  background: #fff;
  box-shadow: inset 3px 0 0 var(--sb-tone, var(--bou-primary));
}
.sb-q-in:focus-visible { outline: 2px solid var(--bou-primary); outline-offset: -2px; }

.sb-q-num {
  font-family: var(--bou-display);
  font-size: 1.15rem;
  line-height: 1.75;
  color: var(--bou-marigold);
  text-align: end;
}
.sb-q-text {
  font-size: 1.05rem;
  font-weight: 500;
  line-height: 1.75;
}
.sb-q-meta {
  grid-column: 2;
  display: flex;
  flex-wrap: wrap;
  gap: .3rem;
  margin-top: .35rem;
}
.sb-tag {
  font-size: .72rem;
  padding: .05rem .45rem;
  border-radius: .3rem;
  background: var(--bou-canvas);
  color: #5b6a62;
}
.sb-tag--answer { background: #e6f2ea; color: var(--bou-primary); font-weight: 600; }

.sb-foot {
  font-size: .9rem;
  color: #6b7a72;
  border-top: 1px dashed var(--bou-line);
  padding-top: 1rem;
}

@media (max-width: 460px) {
  .sb-q-in { grid-template-columns: 1.7rem 1fr; gap: .2rem .55rem; }
  .sb-q-text { font-size: 1rem; }
}

/* Print / save-as-PDF: just the paper. */
@media print {
  .bou-navbar, .bou-footer, .bou-bottomnav, .d-print-none { display: none !important; }
  body { background: #fff; padding: 0; }
  main.container { padding: 0 !important; max-width: none; }
  .sb-head { border-bottom-color: #333; }
  .sb-panels { display: block; }
  .sb-panel + .sb-panel { margin-top: 1.5rem; }
  .sb-q-in { padding-inline: 0; break-inside: avoid; }
  a { color: inherit; text-decoration: none; }
}

/* ---- 404 ---------------------------------------------------------------- */

.err-page { max-width: 34rem; padding: 2rem 0 3rem; }
.err-code {
  font-family: var(--bou-mono);
  font-size: 3.5rem;
  line-height: 1;
  color: var(--bou-marigold);
  margin: 0;
}
.err-title {
  font-family: var(--bou-display);
  font-size: clamp(1.5rem, 4.5vw, 2rem);
  color: var(--bou-ink);
  margin: .6rem 0 .5rem;
}
.err-text { color: #55635b; margin-bottom: 1.5rem; }
.err-actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-bottom: 2rem; }
/* The primary button borrows the exam-band style but needs dark text here. */
.err-actions .hm-exam-cta { background: var(--bou-primary); color: #fff; border-color: var(--bou-primary); }
.err-actions .hm-exam-cta:hover { background: var(--bou-primary-2); color: #fff; }
.err-alt {
  padding: .55rem 1.15rem;
  border: 1px solid var(--bou-line);
  border-radius: .6rem;
  background: #fff;
  color: var(--bou-primary);
  font-weight: 600;
  font-size: .95rem;
  text-decoration: none;
}
.err-alt:hover { border-color: var(--bou-primary); }
.err-search { max-width: 30rem; }

/* Make Bootstrap primary follow the BOU green */
.btn-primary {
  --bs-btn-bg: var(--bou-primary);
  --bs-btn-border-color: var(--bou-primary);
  --bs-btn-hover-bg: var(--bou-primary-2);
  --bs-btn-hover-border-color: var(--bou-primary-2);
  --bs-btn-active-bg: var(--bou-primary-2);
}
.badge.bg-primary { background-color: var(--bou-primary) !important; }
a { color: var(--bou-primary); }
