/**
 * CBSE root hub — page-scoped. Scoped under .rbl-cbse-hub only.
 */

.rbl-cbse-hub {
  /* Phase B final: text roles + warm study surface (owner-approved Variant 2). */
  --cbse-ink: var(--rbl-ink-strong, #142238);
  --cbse-muted: var(--rbl-muted-readable, #4b5563);
  --cbse-border: var(--rbl-border-warm, #ece8e2);
  --cbse-border-strong: #e0d5cc;
  /* Accent (borders/hover). Filled white-text CTAs use Bootstrap/--rbl-cta-fill. */
  --cbse-orange: var(--rbl-cta-fill, #c2410c);
  --cbse-orange-l: var(--rbl-surface-warm-soft, #fff3ec);
  --cbse-surface: var(--rbl-surface-warm, #fcf7f1);
  --cbse-radius: 13px; /* geometry preserved in Phase B */
  color: var(--cbse-ink);
}

.rbl-cbse-hub .container {
  max-width: 1240px;
}

.rbl-cbse-section {
  padding: 2.5rem 0;
}

.rbl-cbse-section-title {
  font-family: Outfit, system-ui, sans-serif;
  font-weight: 700;
  font-size: clamp(1.35rem, 1.15rem + 0.7vw, 1.7rem);
  margin: 0 0 0.35rem;
  color: var(--cbse-ink);
}

.rbl-cbse-section-lead {
  margin: 0 0 1.35rem;
  color: var(--cbse-muted);
  font-size: 0.95rem;
  max-width: 40rem;
}

.rbl-cbse-breadcrumb {
  margin-bottom: 1.1rem;
  font-size: 0.8125rem;
  color: var(--rbl-muted-readable, #4b5563);
}
.rbl-cbse-breadcrumb a {
  color: inherit;
}

.rbl-cbse-h1 {
  font-family: Outfit, system-ui, sans-serif;
  font-weight: 800;
  font-size: clamp(1.7rem, 1.35rem + 1.1vw, 2.625rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin: 0 0 0.7rem;
  display: flex;
  flex-direction: column;
  gap: 0.08em;
  max-width: 22ch;
}

.rbl-cbse-h1-primary,
.rbl-cbse-h1-secondary {
  display: block;
}

.rbl-cbse-h1-secondary {
  white-space: nowrap;
}

.rbl-cbse-lead {
  margin: 0 0 1.15rem;
  color: var(--cbse-muted);
  font-size: 1.05rem;
  max-width: 36rem;
  line-height: 1.5;
}

/* —— Hero: full-bleed artwork canvas; live content overlays calm left —— */
/*
 * Option B Hero — desktop art is the FULL visual canvas (absolute underlay).
 * Live HTML sits over the intentional quiet left zone. No two-column split.
 */
.rbl-cbse-hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  min-height: clamp(500px, 36vw, 550px);
  padding: 0;
  /* Owner-approved warm hero wash — artwork colors unchanged. */
  background-color: var(--rbl-surface-warm, #fcf7f1);
  border-bottom: 1px solid var(--rbl-border-warm, #ece8e2);
}

.rbl-cbse-hero::before {
  content: none;
  display: none;
}

/* Single Hero <picture>: absolute full-bleed on desktop; in-flow on mobile (see ≤900). */
.rbl-cbse-hero__art {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: block;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  pointer-events: none;
  background: transparent;
}

.rbl-cbse-hero__art picture,
.rbl-cbse-hero__art-img {
  display: block;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  object-fit: cover;
  object-position: center center;
  background: transparent !important;
  box-shadow: none !important;
  border-radius: 0 !important;
}

.rbl-cbse-hero__content {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  min-height: inherit;
  width: 100%;
  max-width: 100%;
  padding: 2.35rem 0;
  box-sizing: border-box;
}

.rbl-cbse-hero__copy {
  width: 100%;
  max-width: 470px;
  padding: 0;
}

.rbl-cbse-hero .rbl-cbse-breadcrumb {
  color: #7a8796;
  margin-bottom: 0.7rem;
  font-size: 0.875rem;
}

.rbl-cbse-hero .rbl-cbse-breadcrumb a {
  color: #7a8796;
}

.rbl-cbse-hero .rbl-cbse-h1 {
  display: block;
  max-width: none;
  color: #12263f;
  font-size: clamp(1.85rem, 1.45rem + 1.1vw, 2.5rem);
  line-height: 1.15;
  letter-spacing: -0.025em;
  margin: 0 0 0.75rem;
}

.rbl-cbse-hero .rbl-cbse-h1-primary,
.rbl-cbse-hero .rbl-cbse-h1-secondary {
  display: inline;
  white-space: normal;
}

.rbl-cbse-hero .rbl-cbse-lead {
  color: #5b6b7c;
  margin-bottom: 1.2rem;
  max-width: 28rem;
  font-size: 1rem;
  line-height: 1.5;
}

.rbl-cbse-hero .rbl-cbse-search-row {
  display: flex;
  align-items: stretch;
  gap: 0.65rem;
  max-width: 100%;
}

.rbl-cbse-hero .rbl-cbse-search-input {
  background: #fff;
  border: 1px solid #d5dde6;
  border-radius: 0.75rem;
  min-height: 48px;
  box-shadow: 0 1px 2px rgba(16, 36, 62, 0.04);
}

.rbl-cbse-hero .rbl-cbse-search-btn {
  border-radius: 0.75rem;
  min-height: 48px;
  min-width: 6.5rem;
  padding-inline: 1.25rem;
  flex-shrink: 0;
  font-weight: 700;
}

.rbl-cbse-hero .rbl-cbse-shortcuts {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 1.05rem;
  gap: 0.55rem;
  max-width: 100%;
}

.rbl-cbse-hero .rbl-cbse-shortcut {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 44px;
  padding: 0.5rem 0.95rem;
  background: #fff;
  border: 1px solid #d5dde6;
  border-radius: 0.7rem;
  box-shadow: 0 1px 2px rgba(16, 36, 62, 0.04);
  color: #17365d;
  font-weight: 600;
  font-size: 0.875rem;
  white-space: nowrap;
  text-decoration: none;
}

.rbl-cbse-hero .rbl-cbse-shortcut-icon {
  display: inline-block;
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

.rbl-cbse-hero .rbl-cbse-shortcut-arrow {
  display: none;
}

.rbl-cbse-hero .rbl-cbse-shortcuts-label {
  display: none;
}

/* Stage feature cards are mobile-only; desktop art already includes them */
.rbl-cbse-stages {
  display: none;
}

.rbl-cbse-search-row {
  display: flex;
  gap: 0.65rem;
  align-items: stretch;
}

.rbl-cbse-search-field {
  position: relative;
  flex: 1;
  min-width: 0;
  display: block;
  margin: 0;
}

.rbl-cbse-search-icon {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  pointer-events: none;
  opacity: 0.7;
}

.rbl-cbse-search-input {
  width: 100%;
  min-height: 52px;
  border: 1px solid var(--cbse-border-strong);
  border-radius: 11px;
  padding: 0.5rem 0.9rem 0.5rem 2.4rem;
  font-size: 0.95rem;
  background: #fff;
}
@media (max-width: 767.98px) {
  .rbl-cbse-search-input {
    font-size: var(--rbl-fs-search, 16px);
  }
}

.rbl-cbse-search-btn {
  min-height: 52px;
  min-width: 7rem;
  flex-shrink: 0;
  border-radius: 11px;
}

.rbl-cbse-shortcuts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 0.9rem;
}

.rbl-cbse-shortcut {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 44px;
  padding: 0.55rem 1rem;
  border: 1px solid #d8e1ea;
  border-radius: 999px;
  background: #fff;
  color: var(--cbse-ink);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 700;
}

.rbl-cbse-shortcut-icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.rbl-cbse-shortcut:hover,
.rbl-cbse-shortcut:focus-visible {
  border-color: var(--cbse-orange);
  color: var(--cbse-orange);
  outline: none;
}

.rbl-cbse-shortcut:focus-visible {
  box-shadow: 0 0 0 3px rgba(217, 71, 8, 0.28);
}

/* —— Class grid —— */
.rbl-cbse-classes {
  padding-top: 2.6rem;
}

.rbl-cbse-class-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.65rem;
}

.rbl-cbse-class-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  min-height: 82px;
  padding: 0.75rem 0.5rem;
  border: 1px solid var(--cbse-border);
  border-radius: var(--cbse-radius);
  background: #fff;
  text-decoration: none;
  color: inherit;
  text-align: center;
}

.rbl-cbse-class-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 12px;
  background: #eef5ff;
  color: #1769d2;
  font-size: 1.1rem;
  font-weight: 800;
  line-height: 1;
}

.rbl-cbse-class-tile:nth-child(3n + 1) .rbl-cbse-class-badge {
  background: #ecfff4;
  color: #169a61;
}

.rbl-cbse-class-tile:nth-child(3n + 2) .rbl-cbse-class-badge {
  background: #fff6e7;
  color: #e28b00;
}

.rbl-cbse-class-tile:nth-child(3n) .rbl-cbse-class-badge {
  background: #f5efff;
  color: #7a42d8;
}

.rbl-cbse-class-ukg-icon {
  width: 40px;
  height: 40px;
}

.rbl-cbse-class-tile:hover,
.rbl-cbse-class-tile:focus-visible {
  border-color: #ffb37a;
  background: #fff8f2;
  outline: none;
}

.rbl-cbse-class-tile:focus-visible {
  box-shadow: 0 0 0 3px rgba(217, 71, 8, 0.28);
}

.rbl-cbse-class-tile--emphasis {
  border-color: #ffb37a;
  background: #fff8f2;
}

.rbl-cbse-class-name {
  font-weight: 700;
  font-size: 0.92rem;
  line-height: 1.2;
}

.rbl-cbse-class-count {
  font-size: 0.75rem;
  color: var(--cbse-muted);
  line-height: 1.2;
}

/* —— Proof —— */
.rbl-cbse-proof {
  padding: 0 0 2rem;
  background: transparent;
  border: 0;
}

.rbl-cbse-proof-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid #e0e7ee;
  border-radius: 16px;
  background: #fff;
  overflow: hidden;
}

.rbl-cbse-proof-list li {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  padding: 1.15rem 0.75rem;
  text-align: center;
  border-right: 1px solid #e7ecf1;
}

.rbl-cbse-proof-list li:last-child {
  border-right: 0;
}

.rbl-cbse-proof-icon {
  width: 32px;
  height: 32px;
}

.rbl-cbse-proof-list strong {
  font-family: Outfit, system-ui, sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
}

.rbl-cbse-proof-list span {
  font-size: 0.75rem;
  color: var(--cbse-muted);
}

/* —— Finder —— */
.rbl-cbse-finder {
  background: var(--cbse-surface);
  border-block: 1px solid #e8edf1;
}

.rbl-cbse-pathfinder-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
  gap: 0.75rem 0.85rem;
  align-items: end;
  background: #fff;
  border: 1px solid #e3e8ef;
  border-radius: 18px;
  padding: 1.1rem;
}

.rbl-cbse-pathfinder-label {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.3rem 0.4rem;
  font-weight: 700;
  font-size: 0.75rem;
  margin-bottom: 0.4rem;
}

.rbl-cbse-pathfinder-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.rbl-cbse-step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 999px;
  background: #fff1e8;
  color: var(--cbse-orange);
  font-size: 0.7rem;
  font-weight: 700;
}

.rbl-cbse-optional,
.rbl-field-required {
  font-weight: 500;
  color: var(--cbse-muted);
  font-size: 0.75rem;
}

.rbl-cbse-pathfinder .form-select {
  min-height: 46px;
  border-radius: 9px;
}

.rbl-cbse-pathfinder-btn {
  min-height: 46px;
  white-space: nowrap;
  padding-inline: 1.35rem;
  border-radius: 11px;
}

/* —— Types —— */
.rbl-cbse-type-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.75rem;
}

.rbl-cbse-type-tile {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.4rem;
  min-height: 96px;
  padding: 1rem;
  border: 1px solid #e0e6ee;
  border-radius: 14px;
  background: #fff;
  text-decoration: none;
  color: inherit;
}

.rbl-cbse-type-tile:hover,
.rbl-cbse-type-tile:focus-visible {
  border-color: var(--cbse-orange);
  outline: none;
}

.rbl-cbse-type-tile:focus-visible {
  box-shadow: 0 0 0 3px rgba(217, 71, 8, 0.28);
}

.rbl-cbse-type-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #eef6ff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.rbl-cbse-type-icon-img {
  display: block;
  width: 28px;
  height: 28px;
}

.rbl-cbse-type-name {
  font-weight: 700;
  font-size: 0.875rem;
  line-height: 1.25;
}

.rbl-cbse-type-count {
  font-size: 0.75rem;
  color: var(--cbse-muted);
}

/* —— Popular + subjects side-by-side —— */
.rbl-cbse-discover {
  background: #fff;
}

.rbl-cbse-discover-inner {
  display: grid;
  grid-template-columns: 1.35fr 0.9fr;
  gap: 1.35rem;
  align-items: start;
  padding: 0.5rem 0 1rem;
}

.rbl-cbse-discover .rbl-cbse-section {
  padding: 1.5rem 0;
}

.rbl-cbse-popular-tabs {
  display: flex;
  gap: 0.35rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--cbse-border);
}

.rbl-cbse-tab {
  appearance: none;
  border: 0;
  background: transparent;
  min-height: 44px;
  padding: 0.5rem 0.9rem;
  font-weight: 600;
  color: var(--cbse-muted);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  cursor: pointer;
}

.rbl-cbse-tab[aria-selected="true"] {
  color: var(--cbse-ink);
  border-bottom-color: var(--cbse-orange);
}

.rbl-cbse-tab:focus-visible {
  outline: 3px solid rgba(217, 71, 8, 0.28);
  outline-offset: 2px;
}

.rbl-cbse-popular-fallback-title {
  font-size: 1rem;
  font-weight: 700;
  margin: 0 0 0.75rem;
}

.rbl-cbse-popular--tabs .rbl-cbse-popular-fallback-title {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.rbl-cbse-popular--tabs .rbl-cbse-popular-panel:not(.is-active) {
  display: none;
}

.rbl-cbse-popular:not(.rbl-cbse-popular--tabs) .rbl-cbse-popular-panel + .rbl-cbse-popular-panel {
  margin-top: 1.75rem;
}

.rbl-cbse-resource-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.55rem;
}

.rbl-cbse-resource-row {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  justify-content: space-between;
  min-height: 56px;
  padding: 0.75rem 0.85rem;
  border: 1px solid #e0e6ee;
  border-radius: 12px;
  background: #fff;
  text-decoration: none;
  color: inherit;
}

.rbl-cbse-resource-row:hover,
.rbl-cbse-resource-row:focus-visible {
  border-color: var(--cbse-orange);
  outline: none;
}

.rbl-cbse-resource-row:focus-visible {
  box-shadow: 0 0 0 3px rgba(217, 71, 8, 0.28);
}

.rbl-cbse-resource-row-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-weight: 650;
  font-size: 0.875rem;
  line-height: 1.35;
}

.rbl-cbse-resource-row-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.65rem;
  margin-top: 0.3rem;
  font-size: 0.72rem;
  color: var(--cbse-muted);
}

.rbl-cbse-resource-row-type {
  font-weight: 600;
  color: var(--cbse-orange);
}

.rbl-cbse-resource-row-signal {
  flex-shrink: 0;
  font-size: 0.72rem;
  color: var(--cbse-muted);
  max-width: 7rem;
  text-align: right;
  line-height: 1.3;
}

.rbl-cbse-more {
  margin-top: 0.85rem;
}

.rbl-cbse-more-toggle {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.rbl-cbse-more-label {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.35rem 0.75rem;
  border: 1px solid var(--cbse-border);
  border-radius: 999px;
  background: #fff;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--cbse-ink);
}

.rbl-cbse-more-fewer,
.rbl-cbse-more-show-mob {
  display: none;
}

.rbl-cbse-more-toggle:checked ~ .rbl-cbse-more-label .rbl-cbse-more-show-desk,
.rbl-cbse-more-toggle:checked ~ .rbl-cbse-more-label .rbl-cbse-more-show-mob {
  display: none;
}

.rbl-cbse-more-toggle:checked ~ .rbl-cbse-more-label .rbl-cbse-more-fewer {
  display: inline;
}

.rbl-cbse-popular-panel:not(:has(.rbl-cbse-more-toggle:checked)) .rbl-cbse-resource-item--after-6 {
  display: none;
}

@media (max-width: 767.98px) {
  .rbl-cbse-popular-panel:not(:has(.rbl-cbse-more-toggle:checked)) .rbl-cbse-resource-item--after-4 {
    display: none;
  }

  .rbl-cbse-popular-panel:not(:has(.rbl-cbse-more-toggle:checked)) .rbl-cbse-resource-item--after-6 {
    display: none;
  }

  .rbl-cbse-more-show-desk {
    display: none;
  }

  .rbl-cbse-more-show-mob {
    display: inline;
  }

  .rbl-cbse-more-toggle:checked ~ .rbl-cbse-more-label .rbl-cbse-more-show-mob {
    display: none;
  }
}

.rbl-cbse-more--mob-only {
  display: none;
}

@media (max-width: 767.98px) {
  .rbl-cbse-more--mob-only {
    display: block;
  }
}

.rbl-cbse-subject-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
}

.rbl-cbse-subject-tile {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.25rem;
  min-height: 64px;
  padding: 0.8rem;
  border: 1px solid #e0e6ee;
  border-radius: 12px;
  background: #fff;
  text-decoration: none;
  color: inherit;
}

.rbl-cbse-subject-icon {
  width: 32px;
  height: 32px;
}

.rbl-cbse-subject-tile:hover,
.rbl-cbse-subject-tile:focus-visible {
  border-color: var(--cbse-orange);
  outline: none;
}

.rbl-cbse-subject-tile:focus-visible {
  box-shadow: 0 0 0 3px rgba(217, 71, 8, 0.28);
}

.rbl-cbse-subject-name {
  font-weight: 700;
  font-size: 0.875rem;
}

.rbl-cbse-subject-count {
  font-size: 0.75rem;
  color: var(--cbse-muted);
}

.rbl-cbse-subjects-more {
  margin-top: 0.85rem;
}

.rbl-cbse-subjects-more > summary {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.35rem 0.75rem;
  border: 1px solid var(--cbse-border);
  border-radius: 999px;
  cursor: pointer;
  font-weight: 600;
  list-style: none;
}

.rbl-cbse-subjects-more > summary::-webkit-details-marker {
  display: none;
}

.rbl-cbse-subject-grid--rest {
  margin-top: 0.85rem;
}

/* —— Community: final integrated desktop scene —— */
.rbl-cbse-community {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-block: 0;
  padding: 0;
  min-height: clamp(360px, 29vw, 420px);
  background: #fff9f1;
}

/* The production desktop artwork already contains the quiet left atmosphere
   and the illustrated journey on the right, so no CSS fade/mask is needed. */
.rbl-cbse-community::before {
  content: "";
  display: none;
}

.rbl-cbse-community-art {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  overflow: hidden;
  pointer-events: none;
  background: transparent;
}

.rbl-cbse-community-art picture,
.rbl-cbse-community-art-img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
}

.rbl-cbse-community-art-img {
  object-fit: cover;
  object-position: center center;
}

.rbl-cbse-community-inner {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  min-height: inherit;
  padding: 2rem 0;
}

.rbl-cbse-community-copy {
  width: 100%;
  max-width: 360px;
  padding: 0;
}

.rbl-cbse-community-copy .rbl-cbse-section-title {
  font-size: clamp(1.5rem, 1.3rem + 0.8vw, 1.95rem);
  text-wrap: balance;
}

.rbl-cbse-community-copy .rbl-cbse-section-lead {
  max-width: 34ch;
  color: #4d5f71;
}

.rbl-cbse-community-points {
  color: var(--cbse-muted);
  font-size: 0.9rem;
  margin: 0 0 1rem;
}

.rbl-cbse-community-actions .btn {
  min-height: 48px;
  border-radius: 11px;
}

/* —— Help / FAQ —— */
.rbl-cbse-help {
  padding-bottom: 2.5rem;
}

.rbl-cbse-help-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 1.75rem;
}

.rbl-cbse-help-copy {
  color: var(--cbse-muted);
  font-size: 0.95rem;
}

.rbl-cbse-help-copy p {
  margin-bottom: 0.75rem;
}

.rbl-cbse-howto {
  margin-top: 1.25rem;
}

.rbl-cbse-howto-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--cbse-ink);
  margin: 0 0 0.5rem;
}

.rbl-cbse-howto-list {
  margin: 0;
  padding-left: 1.2rem;
  color: var(--cbse-muted);
}

.rbl-cbse-howto-list li + li {
  margin-top: 0.25rem;
}

.rbl-cbse-independence {
  margin-top: 0.75rem;
}

.rbl-cbse-faq .accordion-button {
  font-weight: 600;
  font-size: 0.92rem;
}

.rbl-cbse-faq .accordion-body {
  color: var(--cbse-muted);
  font-size: 0.9rem;
}

.rbl-cbse-empty {
  color: var(--cbse-muted);
  margin: 0;
}

/* —— Responsive —— */
@media (max-width: 1199px) {
  .rbl-cbse-hero {
    min-height: clamp(460px, 42vw, 520px);
  }

  .rbl-cbse-hero__copy {
    max-width: 420px;
  }

  .rbl-cbse-hero .rbl-cbse-h1 {
    font-size: clamp(1.55rem, 1.3rem + 0.7vw, 2rem);
  }

  .rbl-cbse-hero .rbl-cbse-lead {
    margin-bottom: 1.05rem;
    font-size: 0.94rem;
  }

  .rbl-cbse-hero .rbl-cbse-shortcut {
    min-height: 42px;
    font-size: 0.8125rem;
    padding: 0.45rem 0.8rem;
  }

  .rbl-cbse-class-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .rbl-cbse-type-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1099px) {
  .rbl-cbse-discover-inner {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  /*
   * Option B mobile (frozen):
   * breadcrumb → H1 → lead → search stack → 2×2 stage cards → compact book-stack art.
   * Class 10 / Class 12 / Worksheets / Question Papers are desktop-only in the Hero.
   */
  .rbl-cbse-hero {
    display: block;
    position: relative;
    height: auto;
    min-height: 0;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow-x: clip;
    overflow-y: visible;
    padding: 1rem 0 0;
    background: #ffffff;
  }

  .rbl-cbse-hero *,
  .rbl-cbse-hero *::before,
  .rbl-cbse-hero *::after {
    box-sizing: border-box;
  }

  .rbl-cbse-hero::before {
    display: none;
  }

  .rbl-cbse-hero__content,
  .rbl-cbse-hero__content.container {
    position: relative;
    z-index: 1;
    display: block;
    width: 100%;
    max-width: 100%;
    min-height: 0;
    padding: 0 16px;
    margin: 0;
  }

  .rbl-cbse-hero__copy {
    width: 100%;
    max-width: none;
    padding: 0;
  }

  /* In-flow compact Hero art (same visual slot as approved mobile structure) */
  .rbl-cbse-hero__art {
    position: relative;
    inset: auto;
    z-index: 0;
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    margin: 13px 0 0;
    padding: 0 16px;
    box-sizing: border-box;
  }

  .rbl-cbse-hero__art picture,
  .rbl-cbse-hero__art-img {
    display: block;
    width: 100%;
    height: auto;
    max-width: 100%;
    object-fit: contain;
    object-position: center center;
    aspect-ratio: 1200 / 620;
    border: 0;
    margin: 0;
    padding: 0;
    transform: none;
  }

  .rbl-cbse-breadcrumb {
    margin-bottom: 0.45rem;
  }

  .rbl-cbse-h1 {
    max-width: 100%;
    font-size: 1.45rem;
    margin-bottom: 0.4rem;
    overflow-wrap: normal;
    word-break: normal;
    white-space: normal;
  }

  .rbl-cbse-h1-primary,
  .rbl-cbse-h1-secondary {
    display: inline;
    white-space: normal;
  }

  .rbl-cbse-lead {
    max-width: 100%;
    font-size: 0.86rem;
    margin-bottom: 0.9rem;
    line-height: 1.45;
    overflow-wrap: normal;
  }

  .rbl-cbse-hero .rbl-cbse-lead {
    margin-bottom: 0.9rem;
    color: #5b6b7c;
  }

  .rbl-cbse-hero .rbl-cbse-search {
    width: 100%;
    max-width: 100%;
  }

  /* Mobile: stacked full-width search */
  .rbl-cbse-hero .rbl-cbse-search-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
    max-width: 100%;
    gap: 8px;
    margin: 0;
  }

  .rbl-cbse-hero .rbl-cbse-search-field {
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin: 0;
  }

  .rbl-cbse-hero .rbl-cbse-search-input {
    min-width: 0;
    width: 100%;
    max-width: 100%;
    min-height: 44px;
    border-radius: 0.7rem;
  }

  .rbl-cbse-hero .rbl-cbse-search-btn {
    width: 100%;
    max-width: 100%;
    min-height: 44px;
    margin: 0;
    border-radius: 0.7rem;
  }

  /* Hide Class quick links on mobile Hero — available elsewhere on the page */
  .rbl-cbse-hero .rbl-cbse-shortcuts {
    display: none;
  }

  /* Frozen mobile feature cards */
  .rbl-cbse-stages {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    width: 100%;
    max-width: 100%;
    margin-top: 0.75rem;
    margin-bottom: 0;
  }

  .rbl-cbse-stage {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    min-width: 0;
    width: 100%;
    padding: 0.7rem 0.65rem;
    border: 1px solid #e6ebf1;
    border-radius: 0.85rem;
    background: #fff;
    box-shadow: 0 2px 8px rgba(23, 54, 93, 0.06);
    text-decoration: none;
    color: inherit;
  }

  .rbl-cbse-stage:hover,
  .rbl-cbse-stage:focus-visible {
    border-color: #c9d6e4;
    box-shadow: 0 3px 10px rgba(23, 54, 93, 0.09);
  }

  .rbl-cbse-stage-icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
  }

  .rbl-cbse-stage-copy {
    display: flex;
    flex-direction: column;
    min-width: 0;
    gap: 0.1rem;
  }

  .rbl-cbse-stage-label {
    font-size: 0.8125rem;
    font-weight: 700;
    color: #17365d;
    line-height: 1.2;
  }

  .rbl-cbse-stage-hint {
    font-size: 0.68rem;
    color: #7a8796;
    line-height: 1.25;
  }

  .rbl-cbse-section {
    padding: 1.75rem 0;
  }

  .rbl-cbse-classes {
    padding-top: 14px;
  }

  .rbl-cbse-class-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .rbl-cbse-pathfinder-steps {
    grid-template-columns: 1fr;
  }

  .rbl-cbse-pathfinder-btn {
    width: 100%;
  }

  .rbl-cbse-type-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .rbl-cbse-community {
    display: flex;
    flex-direction: column;
    min-height: 0;
    background: #fff9f1;
  }

  .rbl-cbse-community-inner {
    order: 1;
    display: block;
    min-height: 0;
    padding: 1.35rem 0 0.65rem;
  }

  .rbl-cbse-community-copy {
    max-width: none;
    padding: 0.25rem 0 0;
  }

  .rbl-cbse-community-copy .rbl-cbse-section-lead {
    max-width: none;
  }

  .rbl-cbse-community-art {
    order: 2;
    position: relative;
    inset: auto;
    width: 100%;
    height: auto;
    display: block;
    pointer-events: none;
    padding: 0;
  }

  .rbl-cbse-community-art picture,
  .rbl-cbse-community-art-img {
    width: 100%;
    height: auto;
  }

  .rbl-cbse-community-art-img {
    object-fit: contain;
    object-position: center;
  }

  .rbl-cbse-help-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 800px) {
  .rbl-cbse-community-art-img {
    aspect-ratio: 878 / 962;
  }
}

@media (max-width: 600px) {
  .rbl-cbse-proof-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .rbl-cbse-proof-list li {
    border-right: 0;
    border-bottom: 1px solid #e7ecf1;
  }

  .rbl-cbse-proof-list li:nth-child(odd) {
    border-right: 1px solid #e7ecf1;
  }

  .rbl-cbse-proof-list li:nth-last-child(-n + 2) {
    border-bottom: 0;
  }

  .rbl-cbse-h1 {
    font-size: 1.75rem;
  }

  /* Keep mobile hero H1 inside viewport (override generic hub H1 size) */
  .rbl-cbse-hero .rbl-cbse-h1 {
    font-size: 1.4rem;
  }

  .rbl-cbse-hub {
    padding-bottom: 4.5rem;
  }
}

@media (max-width: 430px) {
  .rbl-cbse-stage-hint {
    display: none;
  }

  .rbl-cbse-stage {
    padding: 0.75rem 0.55rem;
  }

  .rbl-cbse-stage-label {
    font-size: 0.78rem;
  }

  .rbl-cbse-hero__art {
    margin-top: 13px;
  }
}

@media (max-width: 360px) {
  .rbl-cbse-class-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .rbl-cbse-h1 {
    font-size: 1.6rem;
  }

  .rbl-cbse-hero {
    padding: 0.8rem 0 0;
  }

  .rbl-cbse-hero__content,
  .rbl-cbse-hero__content.container {
    padding-left: 13px;
    padding-right: 13px;
  }

  .rbl-cbse-hero__art {
    padding-left: 13px;
    padding-right: 13px;
  }

  .rbl-cbse-hero .rbl-cbse-h1 {
    font-size: 1.28rem;
  }

  .rbl-cbse-stage-label {
    font-size: 0.74rem;
  }

  .rbl-cbse-stage-icon {
    width: 32px;
    height: 32px;
  }

  .rbl-cbse-class-count {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .rbl-cbse-class-tile,
  .rbl-cbse-type-tile,
  .rbl-cbse-resource-row,
  .rbl-cbse-subject-tile {
    transition: none;
  }
}
