﻿:root {
  /* Backward-compatible aliases; canonical values live in tokens.css. */
  --orange:    var(--rbl-orange, #f76c1b);
  --orange-d:  var(--rbl-orange-d, #e05c0e);
  --orange-l:  var(--rbl-orange-l, #fff3ec);
  --ink:       var(--rbl-ink, #1f2937);
  --muted:     var(--rbl-muted, #6b7280);
  --border:    var(--rbl-border, #e5e7eb);
  --bg:        var(--rbl-bg, #f3f4f6);
  --white:     var(--rbl-white, #ffffff);
  --radius:    var(--rbl-radius, 8px);
  --radius-lg: var(--rbl-radius-lg, 12px);
  --shadow:    var(--rbl-shadow, 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.05));
}

/* â”€â”€ Base â”€â”€ */
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: var(--white);
  font-size: 15px;
  line-height: 1.6;
  margin: 0;
}
h1,h2,h3,h4,h5,h6 {
  font-family: 'Outfit', -apple-system, sans-serif;
  color: var(--ink);
}

/* Global keyboard focus: visible across links, controls, and custom widgets. */
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 3px solid var(--rbl-focus, #1d4ed8) !important;
  outline-offset: 3px;
}

.rbl-skip-link {
  position: absolute;
  left: 12px;
  top: -80px;
  z-index: 2000;
  padding: 10px 16px;
  background: var(--rbl-cta-fill, #c2410c);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  border-radius: var(--radius);
}
.rbl-skip-link:focus,
.rbl-skip-link:focus-visible {
  top: 12px;
  color: #fff;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* â”€â”€ Bootstrap primary â†’ orange â”€â”€ */
.btn-primary {
  background-color: var(--rbl-cta-fill, #c2410c) !important;
  border-color:     var(--rbl-cta-fill, #c2410c) !important;
  color: #fff !important;
  font-weight: 700;
  border-radius: var(--radius);
}
.btn-primary:hover, .btn-primary:focus {
  background-color: var(--rbl-cta-fill-hover, #9a3412) !important;
  border-color:     var(--rbl-cta-fill-hover, #9a3412) !important;
}
.btn-primary:active,
.btn-primary.active {
  background-color: var(--rbl-cta-fill-hover, #9a3412) !important;
  border-color: var(--rbl-cta-fill-hover, #9a3412) !important;
}
.btn-primary:disabled,
.btn-primary.disabled {
  opacity: .65;
  cursor: not-allowed;
  pointer-events: none;
}
.btn-outline-primary {
  color:        var(--rbl-cta-fill, #c2410c) !important;
  border-color: var(--rbl-cta-fill, #c2410c) !important;
  font-weight: 700;
  border-radius: var(--radius);
}
.btn-outline-primary:hover {
  background-color: var(--rbl-cta-fill, #c2410c) !important;
  color: #fff !important;
}

/* Shared custom buttons used by school and upload modules. */
.rbl-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--rbl-touch-min, 48px);
  padding: 10px 20px;
  border: 0;
  border-radius: var(--radius);
  font: inherit;
  font-size: .9rem;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition:
    background var(--rbl-transition-fast, 150ms ease),
    border-color var(--rbl-transition-fast, 150ms ease),
    color var(--rbl-transition-fast, 150ms ease),
    filter var(--rbl-transition-fast, 150ms ease);
}
.rbl-btn-primary {
  background: var(--rbl-cta-fill, #c2410c);
  color: #fff;
}
.rbl-btn-primary:hover,
.rbl-btn-primary:focus {
  color: #fff;
  filter: brightness(1.05);
}
.rbl-btn-primary:active {
  filter: brightness(.95);
}
.rbl-btn-secondary {
  background: var(--white);
  border: 1.5px solid var(--border);
  color: var(--ink);
}
.rbl-btn-outline {
  background: transparent;
  border: 2px solid rgba(0, 0, 0, .15);
  color: var(--ink);
}
.rbl-btn-secondary:hover,
.rbl-btn-outline:hover {
  border-color: var(--orange);
  color: var(--orange);
}
.rbl-btn:disabled,
.rbl-btn.disabled,
.rbl-btn[aria-disabled='true'] {
  opacity: .55;
  cursor: not-allowed;
  pointer-events: none;
}
.rbl-btn-sm {
  min-height: auto;
  padding: 6px 14px;
  font-size: .8rem;
}

/* â”€â”€ NAVBAR â”€â”€ */
.rbl-header {
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  overflow: visible;
  padding-top: var(--rbl-safe-top, 0px);
}
.rbl-header .container {
  display: flex;
  align-items: center;
  height: var(--rbl-header-h, 64px);
  gap: 8px;
  overflow: visible;
}
.rbl-logo {
  font-family: 'Outfit', sans-serif;
  font-size: 1.65rem;
  font-weight: 800;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -.5px;
  flex-shrink: 0;
}
.rbl-logo span { color: var(--orange); }
.rbl-logo:hover { color: var(--ink); text-decoration: none; }

.rbl-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
  list-style: none;
  padding: 0;
  margin-bottom: 0;
}
.rbl-nav li a {
  font-size: .88rem;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
  padding: 6px 12px;
  border-radius: var(--radius);
  white-space: nowrap;
  transition: color .15s, background .15s;
}
.rbl-nav > li > a:hover { color: var(--orange); background: var(--orange-l); }

/* Mega menu (redesign-style: 3 columns, hover + click) */
.rbl-nav-mega {
  position: relative;
}
.rbl-mega-trigger {
  display: inline-block;
  font-size: .88rem;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
  padding: 6px 12px;
  border-radius: var(--radius);
  white-space: nowrap;
  transition: color .15s, background .15s;
}
.rbl-mega-trigger::after {
  content: ' ▾';
  font-size: 10px;
  opacity: .55;
}
.rbl-mega-trigger:hover,
.rbl-nav-mega.is-open > .rbl-mega-trigger {
  color: var(--orange);
  background: var(--orange-l);
}
.rbl-mega-panel {
  display: none;
  position: absolute;
  top: 100%;
  left: -24px;
  margin-top: 8px;
  width: min(640px, calc(100vw - 32px));
  padding: 24px;
  gap: 24px;
  grid-template-columns: 1fr 1fr 1fr;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, .12), 0 4px 12px rgba(0, 0, 0, .06);
  z-index: 1200;
}
.rbl-mega-panel::before {
  content: '';
  position: absolute;
  top: -10px;
  left: 0;
  right: 0;
  height: 10px;
}
.rbl-nav-mega.is-open .rbl-mega-panel {
  display: grid;
}
@media (hover: hover) and (min-width: 992px) {
  .rbl-nav-mega:hover .rbl-mega-panel {
    display: grid;
  }
}
.rbl-mega-col h4 {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted);
  margin: 0 0 12px;
}
.rbl-mega-col a {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: #3d4152;
  text-decoration: none;
  padding: 5px 8px;
  margin: 0 -8px;
  border-radius: 6px;
  transition: color .1s, background .1s;
}
.rbl-mega-col a:hover {
  color: var(--orange);
  background: var(--orange-l);
}
.rbl-mega-foot {
  margin-top: 8px !important;
  font-weight: 600 !important;
  color: var(--orange) !important;
}
.rbl-mega-foot:hover {
  background: transparent !important;
  text-decoration: underline;
}
.rbl-mega-muted {
  display: block;
  font-size: 13px;
  color: var(--muted);
  padding: 5px 8px;
}

.rbl-btn-login {
  font-size: .88rem;
  font-weight: 700;
  color: var(--ink);
  border: 2px solid var(--orange);
  background: transparent;
  padding: 6px 18px;
  border-radius: var(--radius);
  text-decoration: none;
  white-space: nowrap;
  margin-left: 12px;
  transition: background .15s, color .15s;
}
.rbl-btn-login:hover { background: var(--rbl-cta-fill, #c2410c); color: #fff; text-decoration: none; }

/* Logged-in account menu (header) */
.rbl-account-menu {
  position: relative;
  margin-left: 12px;
}
.rbl-account-menu-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 2px solid var(--orange);
  background: transparent;
  color: var(--ink);
  border-radius: 999px;
  padding: 4px 12px 4px 4px;
  font-size: .88rem;
  font-weight: 700;
  cursor: pointer;
  line-height: 1.2;
}
.rbl-account-menu-btn:hover,
.rbl-account-menu.is-open .rbl-account-menu-btn {
  background: var(--orange-l);
}
.rbl-account-menu-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f76c1b, #fb923c);
  color: #fff;
  font-family: 'Outfit', sans-serif;
  font-size: .75rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.rbl-account-menu-caret { color: var(--muted); font-size: .7rem; }
.rbl-account-menu-drop {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 180px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(0,0,0,.12);
  padding: 6px;
  z-index: 200;
}
.rbl-account-menu.is-open .rbl-account-menu-drop { display: block; }
.rbl-account-menu-drop a,
.rbl-account-menu-drop .rbl-logout-btn {
  display: block;
  padding: 10px 12px;
  border-radius: 6px;
  color: var(--ink);
  text-decoration: none;
  font-size: .9rem;
  font-weight: 600;
}
.rbl-account-menu-drop a:hover,
.rbl-account-menu-drop .rbl-logout-btn:hover {
  background: var(--orange-l);
  color: var(--orange-d);
  text-decoration: none;
}
.rbl-logout-form { margin: 0; }
.rbl-logout-form--block { display: block; width: 100%; }
.rbl-logout-btn {
  width: 100%;
  background: none;
  border: 0;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
}
button.rbl-mobile-btn {
  width: 100%;
  font-family: inherit;
  cursor: pointer;
}
.rbl-account-menu-drop .rbl-account-menu-pts {
  display: block;
  padding: 8px 12px 4px;
  font-size: .75rem;
  color: var(--muted);
}

/* Mobile hamburger */
.rbl-toggler {
  display: none;
  margin-left: auto;
  background: none;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 6px 10px;
  cursor: pointer;
  flex-direction: column;
  gap: 4px;
}
.rbl-toggler span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
}
/* Mobile drawer (slide-in, redesign-style) */
.rbl-mobile-nav {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1100;
}
.rbl-mobile-nav.open { display: block; }
.rbl-mobile-nav-overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, .55);
  backdrop-filter: blur(2px);
}
.rbl-mobile-nav-drawer {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(320px, 88vw);
  max-width: 100%;
  background: var(--white);
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
  transform: translateX(100%);
  transition: transform .28s ease;
  box-shadow: -8px 0 32px rgba(0, 0, 0, .12);
}
.rbl-mobile-nav.open .rbl-mobile-nav-drawer {
  transform: translateX(0);
}
.rbl-mobile-nav-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: calc(16px + var(--rbl-safe-top, 0px)) 18px 16px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.rbl-mobile-nav-logo {
  font-family: 'Outfit', sans-serif;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--ink);
  text-decoration: none;
}
.rbl-mobile-nav-logo span { color: var(--orange); }
.rbl-mobile-nav-close {
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: var(--bg);
  color: var(--ink);
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.rbl-mobile-nav-body {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 8px 0 16px;
}
.rbl-mobile-accordion {
  border-bottom: 1px solid var(--border);
}
.rbl-mobile-accordion summary {
  list-style: none;
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
}
.rbl-mobile-accordion summary::-webkit-details-marker { display: none; }
.rbl-mobile-accordion summary::after {
  content: '▾';
  font-size: 11px;
  color: var(--muted);
  transition: transform .2s;
}
.rbl-mobile-accordion[open] summary::after {
  transform: rotate(180deg);
}
.rbl-mobile-accordion-panel {
  padding: 0 18px 14px;
}
.rbl-mobile-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted);
  margin: 10px 0 6px;
}
.rbl-mobile-accordion-panel a {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: #3d4152;
  text-decoration: none;
  padding: 10px 10px;
  margin: 0 -10px;
  border-radius: 8px;
  min-height: 44px;
  display: flex;
  align-items: center;
}
.rbl-mobile-accordion-panel a:active,
.rbl-mobile-nav-link:active {
  background: var(--orange-l);
  color: var(--orange);
}
.rbl-mobile-cta-link {
  margin-top: 8px !important;
  font-weight: 700 !important;
  color: var(--orange) !important;
}
.rbl-mobile-muted {
  display: block;
  font-size: 14px;
  color: var(--muted);
  padding: 8px 0;
}
.rbl-mobile-nav-link {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 12px 18px;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--border);
}
.rbl-mobile-nav-actions {
  flex-shrink: 0;
  padding: 14px 18px calc(14px + var(--rbl-safe-bottom, 0px));
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--white);
}
.rbl-mobile-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 16px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}
.rbl-mobile-btn--ghost {
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--border);
}
.rbl-mobile-btn--primary {
  color: #fff;
  background: var(--rbl-cta-fill, #c2410c);
  border: 1px solid var(--rbl-cta-fill, #c2410c);
}
body.rbl-nav-open { overflow: hidden; }

/* â”€â”€ HERO â”€â”€ */
.rbl-hero {
  background: var(--bg);
  padding: 60px 0 52px;
  text-align: center;
}
.rbl-hero h1 {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 800;
  color: var(--ink);
  margin-bottom: 10px;
  line-height: 1.2;
}
.rbl-hero .hero-sub {
  font-size: 1rem;
  color: var(--muted);
  margin-bottom: 28px;
}
.rbl-search-form {
  display: flex;
  max-width: 560px;
  margin: 0 auto 32px;
  box-shadow: 0 2px 12px rgba(0,0,0,.1);
  border-radius: var(--radius);
  overflow: hidden;
}
.rbl-search-form input {
  flex: 1;
  border: 1.5px solid var(--border);
  border-right: none;
  border-radius: var(--radius) 0 0 var(--radius);
  padding: 12px 18px;
  font-size: .95rem;
  font-family: inherit;
  color: var(--ink);
  background: var(--white);
  outline: none;
}
.rbl-search-form input:focus { border-color: var(--orange); }
.rbl-search-form button {
  background: var(--rbl-cta-fill, #c2410c);
  color: #fff;
  border: none;
  padding: 12px 28px;
  font-size: .95rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  border-radius: 0 var(--radius) var(--radius) 0;
  white-space: nowrap;
  transition: background .15s;
}
.rbl-search-form button:hover { background: var(--orange-d); }

/* Shared search and filter control foundation. */
.rbl-search-form--page .rbl-search-page-q,
.rbl-search-filter-field,
.rbl-hub-search-input,
.rbl-pathfinder .form-select,
.rbl-subject-grid-filter {
  min-height: var(--rbl-touch-min, 48px);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-family: inherit;
  color: var(--ink);
  background: var(--white);
  box-sizing: border-box;
  transition:
    border-color var(--rbl-transition-fast, 150ms ease),
    box-shadow var(--rbl-transition-fast, 150ms ease);
}
.rbl-school-dir-search-row .form-control,
.rbl-school-dir-sort {
  min-height: var(--rbl-touch-min, 48px);
}
.rbl-search-form--page .rbl-search-page-q:focus,
.rbl-search-filter-field:focus,
.rbl-hub-search-input:focus,
.rbl-pathfinder .form-select:focus,
.rbl-subject-grid-filter:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(247, 108, 27, .15);
}

/* Search results page — not the hero inline bar */
.rbl-search-form--page {
  display: block;
  max-width: 100%;
  margin: 0 0 24px;
  box-shadow: none;
  overflow: visible;
}
.rbl-search-form--page .rbl-search-page-q {
  width: 100%;
  padding: 14px 16px;
  font-size: 16px;
  margin-bottom: 12px;
  outline: none;
}
.rbl-search-filters {
  margin-top: 0;
}
.rbl-search-filter-field,
.rbl-search-form--page .rbl-search-submit {
  width: 100%;
  font-size: 16px;
  padding: 10px 14px;
}
.rbl-search-filter-field:focus {
  outline: none;
}
select.rbl-search-filter-field {
  appearance: auto;
  cursor: pointer;
}
.rbl-search-form--page .rbl-search-submit {
  min-height: var(--rbl-touch-min, 48px);
  border: none;
  font-weight: 700;
  padding: 12px 16px;
}

.rbl-hero-btns {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}
.rbl-cta-btn {
  display: inline-flex;
  align-items: center;
  padding: 13px 36px;
  border-radius: var(--radius);
  font-size: .95rem;
  font-weight: 700;
  text-decoration: none;
  border: 1.5px solid var(--border);
  background: var(--white);
  color: var(--ink);
  min-width: 200px;
  justify-content: center;
  transition: border-color .15s, color .15s;
}
.rbl-cta-btn:hover { border-color: var(--rbl-cta-fill, #c2410c); color: var(--rbl-cta-fill, #c2410c); text-decoration: none; }

/* â”€â”€ SECTIONS â”€â”€ */
.rbl-section       { padding: 52px 0; }
.rbl-section-bg    { background: var(--bg); }
.rbl-section-title { font-size: clamp(1.2rem, 2.5vw, 1.5rem); font-weight: 800; color: var(--ink); margin-bottom: 24px; }
.rbl-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 8px;
}
.rbl-view-all { font-size: .82rem; font-weight: 700; color: var(--orange); text-decoration: none; }
.rbl-view-all:hover { text-decoration: underline; color: var(--orange-d); }
.rbl-divider { border: none; border-top: 1px solid var(--border); margin: 0; }

/* â”€â”€ CLASS TILES â”€â”€ */
.rbl-class-tile {
  display: block;
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 10px;
  text-align: center;
  font-family: 'Outfit', sans-serif;
  font-size: .9rem;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
  box-shadow: var(--shadow);
  transition: border-color .15s, color .15s, transform .15s, box-shadow .15s;
}
.rbl-class-tile:hover {
  border-color: var(--orange);
  color: var(--orange);
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(247,108,27,.15);
  text-decoration: none;
}

/* â”€â”€ PAPER CARD â”€â”€ */
.rbl-paper-card {
  position: relative;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  height: 100%;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow);
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.rbl-paper-card:hover {
  border-color: var(--orange);
  box-shadow: 0 6px 20px rgba(247,108,27,.12);
  transform: translateY(-2px);
}
.rbl-paper-card--legacy .pc-meta {
  font-size: .78rem;
  color: var(--muted);
  margin-bottom: 14px;
}
.rbl-paper-card--legacy hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 0 0 14px;
}
.rbl-paper-card--legacy .btn-view,
.rbl-paper-card--legacy .btn-outline {
  display: block;
  width: 100%;
  background: var(--white);
  color: var(--orange);
  border: 1.5px solid var(--orange);
  border-radius: var(--radius);
  padding: 8px 0;
  font-size: .85rem;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition:
    background var(--rbl-transition-fast, 150ms ease),
    color var(--rbl-transition-fast, 150ms ease),
    border-color var(--rbl-transition-fast, 150ms ease);
}
.rbl-paper-card--legacy .btn-view:hover,
.rbl-paper-card--legacy .btn-outline:hover {
  background: var(--rbl-cta-fill, #c2410c);
  border-color: var(--rbl-cta-fill, #c2410c);
  color: #fff;
}
.rbl-paper-card--legacy .btn-view:active,
.rbl-paper-card--legacy .btn-outline:active {
  background: var(--orange-d);
  border-color: var(--orange-d);
  color: #fff;
}

/* â”€â”€ MCQ CARD â”€â”€ */
.rbl-mcq-card {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
  height: 100%;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow);
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.rbl-mcq-card:hover {
  border-color: var(--orange);
  box-shadow: 0 6px 20px rgba(247,108,27,.12);
  transform: translateY(-2px);
}
.rbl-mcq-card h3 {
  font-size: .92rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 5px;
  line-height: 1.4;
  flex-grow: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.rbl-mcq-card .mc-count { font-size: .78rem; color: var(--muted); margin-bottom: 16px; }
.rbl-mcq-card .btn-start {
  display: block;
  width: 100%;
  background: var(--rbl-cta-fill, #c2410c);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  padding: 9px 0;
  font-size: .85rem;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  margin-top: auto;
  transition: background .15s;
}
.rbl-mcq-card .btn-start:hover { background: var(--orange-d); color: #fff; }

/* â”€â”€ RESOURCE LINKS â”€â”€ */
.rbl-resource-link {
  display: block;
  padding: 13px 16px;
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  color: var(--ink);
  font-weight: 600;
  font-size: .88rem;
  text-decoration: none;
  box-shadow: var(--shadow);
  transition: border-color .15s, color .15s;
}
.rbl-resource-link:hover { border-color: var(--orange); color: var(--orange); text-decoration: none; }

/* â”€â”€ WHY RIBBLU â”€â”€ */
.rbl-why-card {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px 18px;
  text-align: center;
  height: 100%;
  box-shadow: var(--shadow);
  transition: border-color .15s, box-shadow .15s;
}
.rbl-why-card:hover { border-color: var(--orange); box-shadow: 0 4px 16px rgba(247,108,27,.1); }
.rbl-why-card .wc-stat {
  font-family: 'Outfit', sans-serif;
  font-size: 1.9rem;
  font-weight: 800;
  color: var(--orange);
  display: block;
  margin-bottom: 8px;
}
.rbl-why-card h4 { font-size: 1rem; font-weight: 700; margin-bottom: 6px; }
.rbl-why-card p  { font-size: .82rem; color: var(--muted); margin: 0; line-height: 1.6; }

/* â”€â”€ UPGRADE HOOK â”€â”€ */
.rbl-upgrade-hook {
  background: var(--white);
  border: 1.5px solid #fddcc4;
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 16px;
}
.rbl-upgrade-hook strong { font-size: .88rem; color: var(--ink); display: block; margin-bottom: 2px; }
.rbl-upgrade-hook span   { font-size: .78rem; color: var(--muted); }

/* â”€â”€ SEO BLOCK â”€â”€ */
.rbl-seo-link { color: var(--orange); text-decoration: none; }
.rbl-seo-link:hover { text-decoration: underline; }
.rbl-seo-col h6 {
  font-size: .75rem; font-weight: 800; text-transform: uppercase;
  letter-spacing: .07em; color: var(--ink); margin-bottom: 10px;
}
.rbl-seo-list { list-style: none; padding: 0; margin: 0; }
.rbl-seo-list li { margin-bottom: 6px; }
.rbl-seo-list li a { font-size: .82rem; color: var(--muted); text-decoration: none; }
.rbl-seo-list li a:hover { color: var(--orange); }

/* â”€â”€ FOOTER â”€â”€ */
.rbl-footer { background: #0f172a; color: #94a3b8; padding: 48px 0 0; }
.rbl-footer .footer-brand {
  font-family: 'Outfit', sans-serif;
  font-size: 1.5rem; font-weight: 800; color: #fff;
  display: inline-block; margin-bottom: 10px; text-decoration: none;
}
.rbl-footer .footer-brand span { color: var(--orange); }
.rbl-footer p { font-size: .82rem; line-height: 1.7; max-width: 240px; }
.rbl-footer .text-secondary,
.rbl-footer .text-muted {
  color: #cbd5e1 !important;
}
.rbl-footer .fc-head {
  font-family: 'Outfit', sans-serif;
  font-size: .75rem; font-weight: 800; color: #fff;
  text-transform: uppercase; letter-spacing: .07em; margin-bottom: 12px;
}
.rbl-footer .fc-link { display: block; font-size: .82rem; color: #94a3b8; text-decoration: none; margin-bottom: 7px; transition: color .15s; }
.rbl-footer .fc-link:hover { color: #fff; }
.rbl-footer-bottom {
  border-top: 1px solid #1e293b;
  padding: 14px 0; font-size: .77rem;
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 8px; margin-top: 16px;
}
.rbl-footer-bottom a { color: #94a3b8; text-decoration: none; }
.rbl-footer-bottom a:hover { color: #fff; }

/* â”€â”€ MOBILE BOTTOM NAV â”€â”€ */
.rbl-bottom-nav {
  display: none; position: fixed;
  bottom: 0; left: 0; right: 0;
  background: var(--white); border-top: 1px solid var(--border);
  z-index: 999; padding: 6px 0 10px;
}
.rbl-bottom-nav-inner { display: flex; justify-content: space-around; }
.rbl-bn-item {
  display: flex; flex-direction: column; align-items: center;
  gap: 2px; padding: 4px 10px; text-decoration: none;
  color: var(--muted); font-size: .6rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .04em; flex: 1;
}
.rbl-bn-item.active, .rbl-bn-item:hover { color: var(--orange); }
.rbl-bn-dot {
  width: 26px; height: 26px; background: var(--bg); border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-size: .72rem; font-weight: 800; font-family: 'Outfit', sans-serif;
}

/* â”€â”€ SEARCH MODAL â”€â”€ */
.rbl-search-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(15,23,42,.7); z-index: 1050;
  align-items: flex-start; padding: 52px 16px;
  backdrop-filter: blur(3px);
}
.rbl-search-overlay.open { display: flex; }
.rbl-search-modal {
  background: var(--white); border-radius: var(--radius-lg);
  width: 100%; max-width: 520px; margin: 0 auto;
  overflow: hidden; box-shadow: 0 20px 60px rgba(0,0,0,.22);
}
.rsm-top { display: flex; align-items: center; gap: 10px; padding: 13px 16px; border-bottom: 1px solid var(--border); }
.rsm-top input { flex: 1; border: none; outline: none; font-size: .95rem; font-family: inherit; color: var(--ink); }
.rsm-top input::placeholder { color: #9ca3af; }
.rsm-body { padding: 14px 16px; }
.rsm-label { font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 9px; }
.rsm-chips { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 14px; }
.rsm-chip {
  background: var(--bg); border: 1px solid var(--border); border-radius: 50px;
  padding: 5px 13px; font-size: .78rem; cursor: pointer; color: var(--ink); transition: .15s;
}
.rsm-chip:hover { background: var(--orange-l); border-color: var(--orange); color: var(--orange); }

/* â”€â”€ RESPONSIVE (mobile-first: ~85% mobile traffic) â”€â”€ */
@media (max-width: 991.98px) {
  .rbl-nav { display: none !important; }
  .rbl-nav-mega .rbl-mega-panel { display: none !important; }
  .rbl-btn-login.d-none { display: none !important; }
  .rbl-toggler {
    display: flex;
    margin-left: auto;
    min-width: 48px;
    min-height: 48px;
    align-items: center;
    justify-content: center;
  }
  .rbl-header .container {
    padding-left: 16px;
    padding-right: 16px;
  }
  .rbl-logo { font-size: 1.45rem; }
}

@media (max-width: 767.98px) {
  .container { padding-left: 16px; padding-right: 16px; }

  .rbl-bottom-nav {
    display: block;
    padding-bottom: calc(8px + var(--rbl-safe-bottom, 0px));
  }
  body {
    padding-bottom: calc(var(--rbl-bottom-nav-h, 64px) + var(--rbl-safe-bottom, 0px));
  }

  .rbl-hero {
    padding: 32px 0 28px;
    text-align: left;
  }
  .rbl-hero h1 {
    font-size: clamp(1.35rem, 6.5vw, 1.75rem);
    text-align: center;
  }
  .rbl-hero .hero-sub {
    text-align: center;
    font-size: .9rem;
    margin-bottom: 20px;
  }
  .rbl-search-form {
    flex-direction: column;
    max-width: none;
    margin-bottom: 20px;
    box-shadow: none;
  }
  .rbl-search-form input {
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    padding: 14px 16px;
    font-size: 16px;
    min-height: 48px;
  }
  .rbl-search-form button {
    border-radius: var(--radius);
    width: 100%;
    min-height: 48px;
    margin-top: 8px;
    font-size: 1rem;
  }
  .rbl-hero-btns {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .rbl-cta-btn {
    min-width: 0;
    width: 100%;
    min-height: 48px;
    padding: 14px 20px;
  }

  .rbl-section { padding: 32px 0; }
  .rbl-section-title { margin-bottom: 16px; }
  .rbl-section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    margin-bottom: 16px;
  }
  .rbl-section-header .rbl-section-title { margin-bottom: 0 !important; }
  .rbl-view-all { font-size: .88rem; padding: 4px 0; }

  .rbl-class-tile {
    padding: 14px 8px;
    font-size: .82rem;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .rbl-mcq-card {
    padding: 14px;
  }
  .rbl-paper-card--legacy .btn,
  .rbl-mcq-card .btn-start,
  .rbl-paper-card--legacy .btn-view,
  .rbl-paper-card--legacy .btn-outline {
    min-height: 48px;
    padding: 12px 0;
    font-size: .9rem;
  }

  .rbl-resource-link {
    padding: 14px 14px;
    min-height: 48px;
    display: flex;
    align-items: center;
  }

  .rbl-why-card { padding: 18px 14px; }
  .rbl-why-card .wc-stat { font-size: 1.5rem; }

  .rbl-upgrade-hook {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
    padding: 16px;
  }
  .rbl-upgrade-hook .btn { width: 100%; min-height: 44px; }

  .rbl-footer { padding-top: 36px; }
  .rbl-footer p { max-width: none; }
  .rbl-footer-bottom {
    flex-direction: column;
    text-align: center;
    gap: 12px;
    padding-bottom: calc(16px + var(--rbl-safe-bottom, 0px));
  }

  .rbl-search-overlay {
    padding: 16px 12px;
    align-items: flex-start;
  }
  .rbl-search-modal {
    max-width: none;
    border-radius: var(--radius-lg);
  }
  .rsm-top input { font-size: 16px; min-height: 44px; }
  .rsm-chip {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
  }
}

@media (max-width: 575.98px) {
  .rbl-section .row.g-3 > .col-6 {
    flex: 0 0 100%;
    max-width: 100%;
  }
}

/* Exam hub (/cbse, future boards) */
.rbl-hub-hero {
  background: linear-gradient(165deg, #fff8f3 0%, #ffffff 55%, #f9fafb 100%);
  padding-top: 28px;
  padding-bottom: 32px;
}
.rbl-hub-hero-title {
  font-size: clamp(1.35rem, 4.5vw, 2rem);
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 12px;
  max-width: 720px;
}
.rbl-hub-hero-sub {
  color: var(--muted);
  font-size: 1rem;
  max-width: 640px;
  margin-bottom: 22px;
}
.rbl-hub-search-row {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 640px;
}
.rbl-hub-search-input {
  width: 100%;
  padding: 14px 16px;
  font-size: 16px;
}
.rbl-hub-search-btn {
  min-height: 48px;
  font-weight: 700;
}
.rbl-hub-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}
.rbl-hub-pill {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 6px 14px;
  border-radius: 50px;
  background: var(--white);
  border: 1px solid var(--border);
  font-size: .82rem;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
}
.rbl-hub-pill:hover {
  border-color: var(--orange);
  color: var(--orange);
  background: var(--orange-l);
}
.rbl-hub-stats-wrap {
  background: var(--ink);
  color: #fff;
  padding: 20px 0;
}
.rbl-hub-stats {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.rbl-hub-stats li {
  text-align: center;
}
.rbl-hub-stats strong {
  display: block;
  font-size: 1.35rem;
  font-weight: 800;
  color: #fff;
}
.rbl-hub-stats span {
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  opacity: .75;
}
.rbl-hub-section-lead {
  color: var(--muted);
  font-size: .9rem;
  margin: -12px 0 20px;
}
.rbl-hub-class-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  height: 100%;
  min-height: 120px;
  padding: 16px 14px;
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  text-decoration: none;
  color: var(--ink);
  box-shadow: var(--shadow);
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.rbl-hub-class-card:hover {
  border-color: var(--orange);
  box-shadow: 0 6px 20px rgba(247, 108, 27, .12);
  transform: translateY(-2px);
  color: var(--ink);
}
.rbl-hub-class-card--featured {
  border-color: #fddcc4;
  background: linear-gradient(180deg, #fffaf6 0%, #fff 100%);
}
.rbl-hub-class-name {
  font-family: 'Outfit', sans-serif;
  font-size: 1.05rem;
  font-weight: 800;
}
.rbl-hub-class-count {
  font-size: .78rem;
  color: var(--muted);
  flex-grow: 1;
}
.rbl-hub-class-cta {
  font-size: .82rem;
  font-weight: 700;
  color: var(--orange);
}
.rbl-pathfinder {
  background: var(--white);
  border: 1.5px solid var(--rbl-border-strong, #cbd5e1);
  border-radius: var(--radius-lg);
  padding: var(--rbl-space-6, 24px) var(--rbl-space-5, 20px);
}
.rbl-pathfinder .form-label {
  color: var(--ink);
  font-size: .82rem;
  font-weight: 700;
  margin-bottom: 7px;
}
.rbl-pathfinder .form-select {
  border-color: var(--rbl-border-strong, #cbd5e1);
}
.rbl-pathfinder .btn {
  min-height: var(--rbl-touch-min, 48px);
}
.rbl-pathfinder .form-select:disabled {
  background-color: var(--bg);
  color: var(--muted);
  cursor: not-allowed;
}
.rbl-pathfinder .form-select:user-invalid {
  border-color: var(--rbl-danger-text, #b91c1c);
}
.rbl-field-required {
  margin-left: 4px;
  color: var(--muted);
  font-size: .72rem;
  font-weight: 600;
}
.rbl-hub-type-scroll {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 8px;
  -webkit-overflow-scrolling: touch;
}
.rbl-hub-type-card {
  flex: 0 0 200px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  min-height: var(--rbl-touch-min, 48px);
  padding: 10px 14px;
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  text-decoration: none;
  color: var(--ink);
  box-shadow: var(--shadow);
}
.rbl-hub-type-card:hover {
  color: var(--ink);
}
.rbl-hub-type-name {
  font-weight: 700;
  font-size: .95rem;
  line-height: 1.3;
}
.rbl-hub-type-count {
  font-size: .78rem;
  color: var(--muted);
  font-weight: 600;
  line-height: 1.3;
}

/* Browse-by-type cards: one brand language (no per-type colours) */
.rbl-hub-type-card--qb,
.rbl-hub-type-card--qp,
.rbl-hub-type-card--sample,
.rbl-hub-type-card--notes,
.rbl-hub-type-card--worksheet,
.rbl-hub-type-card--test,
.rbl-hub-type-card--pyp,
.rbl-hub-type-card--default,
.rbl-hub-type-card--neet-dpp,
.rbl-hub-type-card--neet-pyq,
.rbl-hub-type-card--neet-cwq,
.rbl-hub-type-card--neet-mindmap,
.rbl-hub-type-card--neet-notes {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-left: 3px solid var(--orange);
}
.rbl-hub-type-card--qb:hover,
.rbl-hub-type-card--qp:hover,
.rbl-hub-type-card--sample:hover,
.rbl-hub-type-card--notes:hover,
.rbl-hub-type-card--worksheet:hover,
.rbl-hub-type-card--test:hover,
.rbl-hub-type-card--pyp:hover,
.rbl-hub-type-card--default:hover,
.rbl-hub-type-card--neet-dpp:hover,
.rbl-hub-type-card--neet-pyq:hover,
.rbl-hub-type-card--neet-cwq:hover,
.rbl-hub-type-card--neet-mindmap:hover,
.rbl-hub-type-card--neet-notes:hover {
  background: #fffaf6;
  border-color: #d1d5db;
  border-left-color: var(--orange-d);
  color: var(--ink);
}
.rbl-hub-type-card--qb .rbl-hub-type-name,
.rbl-hub-type-card--qp .rbl-hub-type-name,
.rbl-hub-type-card--sample .rbl-hub-type-name,
.rbl-hub-type-card--notes .rbl-hub-type-name,
.rbl-hub-type-card--worksheet .rbl-hub-type-name,
.rbl-hub-type-card--test .rbl-hub-type-name,
.rbl-hub-type-card--pyp .rbl-hub-type-name,
.rbl-hub-type-card--default .rbl-hub-type-name,
.rbl-hub-type-card--neet-dpp .rbl-hub-type-name,
.rbl-hub-type-card--neet-pyq .rbl-hub-type-name,
.rbl-hub-type-card--neet-cwq .rbl-hub-type-name,
.rbl-hub-type-card--neet-mindmap .rbl-hub-type-name,
.rbl-hub-type-card--neet-notes .rbl-hub-type-name {
  color: var(--ink);
}
.rbl-hub-type-card--qb .rbl-hub-type-count,
.rbl-hub-type-card--qp .rbl-hub-type-count,
.rbl-hub-type-card--sample .rbl-hub-type-count,
.rbl-hub-type-card--notes .rbl-hub-type-count,
.rbl-hub-type-card--worksheet .rbl-hub-type-count,
.rbl-hub-type-card--test .rbl-hub-type-count,
.rbl-hub-type-card--pyp .rbl-hub-type-count,
.rbl-hub-type-card--default .rbl-hub-type-count,
.rbl-hub-type-card--neet-dpp .rbl-hub-type-count,
.rbl-hub-type-card--neet-pyq .rbl-hub-type-count,
.rbl-hub-type-card--neet-cwq .rbl-hub-type-count,
.rbl-hub-type-card--neet-mindmap .rbl-hub-type-count,
.rbl-hub-type-card--neet-notes .rbl-hub-type-count {
  color: var(--muted);
}

.rbl-hub-subject-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: 72px;
  padding: 14px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--ink);
}
.rbl-hub-subject-card:hover {
  border-color: var(--orange);
  color: var(--orange);
}
.rbl-hub-subject-name { font-weight: 700; font-size: .9rem; }
.rbl-hub-seo-copy p { margin-bottom: 14px; line-height: 1.7; }
.rbl-hub-faq .accordion-button { font-size: .9rem; font-weight: 600; }
.rbl-hub-faq .accordion-button:not(.collapsed) {
  background: var(--orange-l);
  color: var(--orange);
}

@media (min-width: 768px) {
  .rbl-hub-search-row { flex-direction: row; }
  .rbl-hub-search-input { flex: 1; }
  .rbl-hub-search-btn { width: auto; min-width: 120px; }
  .rbl-hub-stats { grid-template-columns: repeat(4, 1fr); }
}

/* Paper card interaction and content variants */
.rbl-paper-card--stretch {
  transition: border-color .15s, box-shadow .15s;
}
.rbl-paper-card--stretch:hover {
  border-color: var(--orange);
  box-shadow: 0 4px 16px rgba(247, 108, 27, .1);
  transform: translateY(-2px);
}
.rbl-paper-card-title {
  font-size: .92rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.35;
  margin: 0 0 10px;
  flex-grow: 1;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}
.rbl-paper-card-link {
  color: var(--ink);
  text-decoration: none;
}
.rbl-paper-card-link:hover {
  color: var(--orange);
}
.rbl-paper-card-stretch::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
}
.rbl-paper-snippet {
  font-size: .78rem;
  color: var(--muted);
  line-height: 1.45;
  margin: 0 0 8px;
  flex-grow: 1;
}
.rbl-paper-card-cta {
  position: relative;
  z-index: 2;
  font-size: .82rem;
  font-weight: 700;
  color: var(--orange);
  margin-top: auto;
}
.rbl-paper-card-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}
.rbl-paper-badge {
  display: inline-block;
  font-size: .7rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  line-height: 1.3;
}
.rbl-paper-badge--type {
  background: var(--orange-l);
  color: var(--orange);
}
.rbl-paper-badge--dl {
  background: #f3f4f6;
  color: var(--muted);
}
.rbl-paper-added {
  font-size: .75rem;
  color: var(--muted);
}
/* Class hub (/cbse/class-N) */
.rbl-class-intro {
  font-size: .95rem;
  line-height: 1.75;
  max-width: 820px;
}
.rbl-class-intro p {
  margin-bottom: 14px;
}
.rbl-class-intro a {
  color: var(--orange);
  font-weight: 600;
}
.rbl-hub-section-heading {
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  margin-bottom: 8px;
}
.rbl-sort-tabs {
  display: flex;
  gap: 8px;
}
.rbl-sort-tab {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 6px 14px;
  border-radius: 50px;
  border: 1.5px solid var(--border);
  font-size: .82rem;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
}
.rbl-sort-tab.is-active,
.rbl-sort-tab:hover {
  border-color: var(--orange);
  background: var(--orange-l);
  color: var(--orange);
}
.rbl-class-faq {
  padding-top: 8px;
}
.rbl-popular-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}
.rbl-popular-list-item {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}
.rbl-popular-list-item:last-child {
  border-bottom: 0;
}
.rbl-popular-list-title {
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  flex: 1 1 200px;
}
.rbl-popular-list-title:hover {
  color: var(--orange);
}
.rbl-popular-list-dl {
  font-size: .82rem;
  font-weight: 600;
  color: var(--orange);
  white-space: nowrap;
}
.rbl-subject-spotlight {
  padding: 16px 0;
  border-top: 1px solid var(--border);
}
.rbl-spotlight-list {
  margin: 0 0 12px;
  padding-left: 1.1rem;
}
.rbl-spotlight-list li {
  margin-bottom: 8px;
  line-height: 1.45;
}
.rbl-spotlight-list a {
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
}
.rbl-spotlight-list a:hover {
  color: var(--orange);
}
.rbl-paper-badge--subject {
  background: var(--rbl-info-bg, #e8f0fe);
  color: var(--rbl-info-text, #1a56db);
  border: 1px solid var(--rbl-info-border, #c7d9fc);
}
.rbl-paper-badge--answers {
  background: var(--rbl-success-bg, #ecfdf5);
  color: var(--rbl-success-text, #047857);
  border: 1px solid var(--rbl-success-border, #a7f3d0);
}

.rbl-subject-stats .rbl-stat-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  height: 100%;
  text-decoration: none;
  color: inherit;
}
.rbl-stat-card strong {
  font-family: 'Outfit', sans-serif;
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--ink);
}
.rbl-stat-card span {
  font-size: .78rem;
  color: var(--muted, #6b7280);
  line-height: 1.3;
}
.rbl-stat-card--link:hover {
  border-color: var(--orange);
  background: var(--orange-l);
}
.rbl-chapter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.rbl-chapter-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 50px;
  border: 1px solid var(--border);
  font-size: .85rem;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  background: #fff;
}
.rbl-chapter-pill:hover {
  border-color: var(--orange);
  background: var(--orange-l);
  color: var(--orange);
}
.rbl-chapter-pill-count {
  font-size: .75rem;
  font-weight: 700;
  color: var(--orange);
  background: var(--orange-l);
  padding: 2px 8px;
  border-radius: 50px;
}

/* Subject hub: sticky type filter bar (below main header) */
.rbl-type-nav-sticky {
  position: sticky;
  top: 64px;
  z-index: 90;
  padding: 10px 0 12px;
  margin-bottom: 1rem;
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
@media (max-width: 991px) {
  .rbl-type-nav-sticky {
    top: 0;
    margin-left: -12px;
    margin-right: -12px;
    padding-left: 12px;
    padding-right: 12px;
  }
}

/* Subject hub (/cbse/class-N/subject) */
.rbl-subject-hub {
  overflow-x: clip;
}
.rbl-subject-hub .rbl-section {
  padding-top: 0;
  padding-bottom: 0;
}
.rbl-subject-hero {
  border-bottom: 1px solid var(--border);
}
.rbl-subject-hero-title {
  margin-bottom: 10px;
}
.rbl-subject-hero-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  list-style: none;
  margin: 0 0 22px;
  padding: 0;
}
.rbl-subject-hero-metric {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-right: 20px;
  border-right: 1px solid var(--border);
}
.rbl-subject-hero-metric:last-child {
  border-right: 0;
  padding-right: 0;
}
.rbl-subject-hero-metric strong {
  font-family: 'Outfit', sans-serif;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--ink);
  line-height: 1.1;
}
.rbl-subject-hero-metric span {
  font-size: .78rem;
  font-weight: 600;
  color: var(--muted);
  line-height: 1.2;
}
.rbl-subject-hero-types {
  font-size: .92rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 20px;
  line-height: 1.5;
  max-width: 720px;
}
.rbl-subject-hero-intro {
  font-size: .9rem;
  line-height: 1.65;
  max-width: 720px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.rbl-subject-hero-intro p:last-child {
  margin-bottom: 0;
}
.rbl-subject-hero-chapters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin-top: 14px;
  font-size: .88rem;
}
.rbl-subject-hero-chapters-label {
  font-weight: 700;
  color: var(--muted);
}
.rbl-subject-hero-chapter-link {
  font-weight: 600;
  color: var(--orange);
  text-decoration: none;
  padding: 4px 10px;
  border-radius: 50px;
  background: var(--orange-l);
  border: 1px solid transparent;
}
.rbl-subject-hero-chapter-link:hover {
  border-color: var(--orange);
  color: var(--orange-d);
}
.rbl-subject-band {
  padding: 36px 0;
}
.rbl-subject-band--alt {
  background: #f3f4f6;
}
.rbl-subject-section-title {
  font-family: 'Outfit', sans-serif;
  font-size: clamp(1.15rem, 2.5vw, 1.45rem);
  font-weight: 800;
  color: var(--ink);
  margin-bottom: 6px;
  letter-spacing: -.02em;
}
.rbl-subject-section-lead {
  font-size: .9rem;
  color: var(--muted);
  margin-bottom: 20px;
  max-width: 640px;
}
.rbl-subject-subheading {
  font-size: .82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted);
  margin-bottom: 12px;
}
.rbl-chapter-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 18px 16px;
  min-height: 88px;
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  text-decoration: none;
  color: var(--ink);
  box-shadow: 0 2px 8px rgba(15, 23, 42, .04);
  transition: border-color .15s, box-shadow .15s, transform .15s;
  height: 100%;
}
.rbl-chapter-card:hover {
  border-color: var(--orange);
  box-shadow: 0 6px 20px rgba(247, 108, 27, .12);
  color: var(--ink);
  transform: translateY(-2px);
}
.rbl-chapter-card--featured {
  border-color: #fde4d4;
  background: linear-gradient(135deg, #fffaf6 0%, #ffffff 100%);
}
.rbl-chapter-card-icon {
  font-size: 1.5rem;
  line-height: 1;
  flex-shrink: 0;
}
.rbl-chapter-card-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.rbl-chapter-card-name {
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.3;
}
.rbl-chapter-card-meta {
  font-size: .78rem;
  font-weight: 600;
  color: var(--orange);
}
.rbl-chapter-pills--compact {
  margin-top: 4px;
}
/* Subject hub: no horizontal scroll — wrap/grid only */
.rbl-subject-hub .rbl-subject-type-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  overflow: visible;
  padding-bottom: 0;
}
.rbl-subject-hub .rbl-subject-type-grid .rbl-hub-type-card {
  flex: none;
  width: auto;
  min-width: 0;
}
@media (min-width: 576px) {
  .rbl-subject-hub .rbl-subject-type-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (min-width: 992px) {
  .rbl-subject-hub .rbl-subject-type-grid {
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 14px;
  }
}
.rbl-subject-type-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
  padding: 10px 0;
}
.rbl-subject-type-nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 5px 14px;
  border-radius: 50px;
  border: 1.5px solid var(--border);
  font-size: .8rem;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  background: #fff;
}
.rbl-subject-type-nav-link:hover {
  border-color: var(--orange);
  background: var(--orange-l);
  color: var(--orange);
}
.rbl-subject-filter-label {
  display: block;
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--muted);
  margin-bottom: 6px;
}
.rbl-subject-grid-filter {
  width: 100%;
  max-width: 420px;
  padding: 10px 14px;
  font-size: .95rem;
}
.rbl-subject-grid-filter:focus {
  outline: none;
}
.rbl-paper-card--hub .rbl-paper-card-title {
  font-size: .95rem;
  font-weight: 700;
  line-height: 1.4;
  flex-grow: 1;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}
.rbl-paper-card--hub .rbl-paper-card-badges {
  margin-bottom: 10px;
}
.rbl-paper-card--hub .rbl-paper-badge {
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .03em;
}
.rbl-paper-card--hub .rbl-paper-badge--dl {
  font-size: .72rem;
  font-weight: 700;
}
.rbl-paper-card--hub .rbl-paper-added--solo {
  font-size: .75rem;
  margin: 0 0 4px;
}

/* Sticky subject hub toolbar */
.rbl-subject-sticky-sentinel {
  height: 1px;
  margin: 0;
  padding: 0;
  border: 0;
}
.rbl-subject-sticky-bar {
  position: fixed;
  top: var(--rbl-sticky-top, 64px);
  left: 0;
  right: 0;
  z-index: 99;
  background: rgba(255, 255, 255, .97);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 2px 12px rgba(15, 23, 42, .06);
  backdrop-filter: blur(8px);
}
.rbl-subject-sticky-bar[hidden] {
  display: none !important;
}
body.rbl-subject-sticky-active {
  padding-top: 0;
}
.rbl-subject-sticky-inner {
  padding: 8px 0;
}
.rbl-subject-sticky-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  overflow: visible;
  padding-bottom: 4px;
}
.rbl-subject-sticky-link {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 4px 12px;
  border-radius: 50px;
  border: 1px solid var(--border);
  font-size: .78rem;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  white-space: normal;
  background: #fff;
}
.rbl-subject-sticky-link:hover,
.rbl-subject-sticky-link.is-active {
  border-color: #d1d5db;
  background: var(--bg);
  color: var(--ink);
}
/* Chapter pills (between types and listings) */
.rbl-chapter-pills--hub {
  gap: 10px;
}
.rbl-chapter-pills--hub .rbl-chapter-pill {
  font-size: .88rem;
  padding: 9px 16px;
}
.rbl-subject-hub .rbl-chapter-pills--hub {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  overflow: visible;
}

.rbl-chapter-topics-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.rbl-chapter-topics-list li {
  padding: 6px 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: .88rem;
  color: var(--ink);
}
.rbl-chapter-info-table {
  width: 100%;
  max-width: 520px;
  border-collapse: collapse;
  font-size: .925rem;
}
.rbl-chapter-info-table th,
.rbl-chapter-info-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}
.rbl-chapter-info-table th {
  width: 42%;
  font-weight: 600;
  color: var(--muted);
}
.rbl-chapter-info-table tr:last-child th,
.rbl-chapter-info-table tr:last-child td {
  border-bottom: 0;
}
.rbl-chapter-subject-cta {
  display: flex;
  width: 100%;
}

/* Resource type badges: informational gray only (answers stay green) */
.rbl-paper-card--hub .rbl-paper-badge[class*="rbl-paper-badge--type-"],
.rbl-paper-badge[class*="rbl-paper-badge--type-"] {
  background: var(--bg);
  color: var(--ink);
  border: 1px solid var(--border);
}
.rbl-paper-card-type-label[class*="rbl-paper-badge--type-"] {
  background: transparent;
  color: var(--ink);
  border: 0;
}

/* Related subject cards */
.rbl-related-subject-card {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: var(--rbl-touch-min, 48px);
  padding: 10px 14px;
  background: #fff;
  border: 1px solid var(--border);
  border-left-width: 3px;
  border-radius: var(--radius-lg);
  text-decoration: none;
  color: var(--ink);
  box-shadow: var(--shadow);
  transition: border-color .15s, box-shadow .15s, transform .15s;
  height: 100%;
}
.rbl-related-subject-card:hover {
  border-color: #d1d5db;
  box-shadow: 0 4px 14px rgba(15, 23, 42, .08);
  transform: translateY(-1px);
  color: var(--ink);
}
.rbl-related-subject--math { border-left-color: #3b82f6; }
.rbl-related-subject--science { border-left-color: #059669; }
.rbl-related-subject--english { border-left-color: #d97706; }
.rbl-related-subject--hindi { border-left-color: #dc2626; }
.rbl-related-subject--social { border-left-color: #7c3aed; }
.rbl-related-subject--default { border-left-color: var(--muted); }
.rbl-related-subject-icon {
  display: none;
}
.rbl-related-subject-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.rbl-related-subject-name {
  font-weight: 700;
  font-size: .95rem;
  line-height: 1.25;
}
.rbl-related-subject-count {
  font-size: .78rem;
  font-weight: 600;
  color: var(--muted);
}

/* Subject hub: use three readable columns only when the main column is wide enough. */
@media (min-width: 1200px) {
  .rbl-subject-hub .rbl-subject-resource-grid > [class*="col-md-6"] {
    flex: 0 0 auto;
    width: 33.333333%;
    max-width: 33.333333%;
  }
}
.rbl-paper-card--hub .rbl-paper-card-link {
  color: var(--ink);
  text-decoration: none;
}
.rbl-paper-card--hub .rbl-paper-card-link:hover {
  color: var(--orange);
}

@media (max-width: 767.98px) {
  .rbl-subject-hero-metrics {
    flex-wrap: wrap;
    gap: 12px 20px;
    overflow: visible;
  }
  .rbl-subject-hero-metric {
    flex: 1 1 40%;
    min-width: 120px;
    padding-right: 0;
    margin-right: 0;
    border-right: 0;
  }
  .rbl-subject-hero-intro {
    font-size: .85rem;
  }
  .rbl-subject-hub .rbl-subject-resource-grid > [class*="col-"] {
    width: 100%;
    max-width: 100%;
    flex: 0 0 100%;
  }
  .rbl-paper-card--hub {
    padding: 12px;
  }
  .rbl-subject-sticky-nav {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 2px;
  }
  .rbl-subject-sticky-nav::-webkit-scrollbar {
    display: none;
  }
  .rbl-subject-sticky-link {
    flex-shrink: 0;
    white-space: nowrap;
  }
}

.rbl-hub-class-popular .rbl-section-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 12px;
}

/* Paper detail + listing */
.rbl-breadcrumb {
  font-size: .82rem;
  color: var(--muted);
  margin-bottom: 20px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
}
.rbl-breadcrumb a {
  color: var(--muted);
  text-decoration: none;
}
.rbl-breadcrumb a:hover { color: var(--orange); }
.rbl-breadcrumb-sep { opacity: .5; }
.rbl-bc-current { color: var(--ink); font-weight: 500; }
.rbl-result-count {
  font-size: .82rem;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
}
.rbl-empty-state {
  text-align: center;
  padding: 48px 16px;
  background: var(--bg);
  border-radius: var(--radius-lg);
}
.rbl-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 28px;
  flex-wrap: wrap;
}
.rbl-page-btn {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: .88rem;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
}
.rbl-page-btn:hover {
  border-color: var(--orange);
  color: var(--orange);
}
.rbl-page-info { font-size: .85rem; color: var(--muted); }
.rbl-paper-detail {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px 20px;
  box-shadow: var(--shadow);
}
.rbl-paper-detail-title {
  font-size: clamp(1.25rem, 4vw, 1.65rem);
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 12px;
}
.rbl-paper-meta-list {
  list-style: none;
  padding: 0;
  margin: 0 0 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.rbl-paper-meta-list li {
  font-size: .8rem;
  font-weight: 600;
}
.rbl-meta-pill {
  display: inline-block;
  background: var(--bg);
  color: var(--ink);
  padding: 5px 12px;
  border-radius: 50px;
  text-decoration: none;
  transition: background .15s ease, color .15s ease;
}
a.rbl-meta-pill:hover {
  background: var(--orange-l);
  color: var(--orange);
}
.rbl-meta-pill--static {
  display: inline-block;
  background: var(--bg);
  color: var(--ink);
  padding: 5px 12px;
  border-radius: 50px;
}
.rbl-paper-hub-link-wrap { margin-top: 4px; }
.rbl-paper-hub-link {
  font-size: .9rem;
  font-weight: 600;
  color: var(--orange);
  text-decoration: none;
}
.rbl-paper-hub-link:hover { text-decoration: underline; }
.rbl-paper-source {
  font-size: .85rem;
  color: var(--muted);
}
.rbl-paper-source a {
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
}
.rbl-paper-source a:hover { color: var(--orange); }
.rbl-paper-section-title {
  font-size: 1.05rem;
  font-weight: 800;
  margin: 24px 0 10px;
}
.rbl-paper-about-body {
  font-size: .95rem;
  line-height: 1.7;
  color: #374151;
}
.rbl-paper-about-body p:last-child { margin-bottom: 0; }
.rbl-paper-preview { margin-top: 8px; }
.rbl-paper-preview-teaser {
  max-width: 280px;
  margin: 0 auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #f3f4f6;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .06);
}
.rbl-paper-preview--placeholder .rbl-paper-preview-teaser {
  max-width: 200px;
}
.rbl-paper-preview-thumb {
  display: block;
  width: 100%;
  height: auto;
  max-height: 260px;
  object-fit: contain;
  vertical-align: middle;
}
.rbl-paper-preview--placeholder .rbl-paper-preview-thumb {
  max-height: 200px;
}
.rbl-paper-preview-frame-wrap {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #f3f4f6;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, .04);
}
.rbl-paper-preview-frame {
  display: block;
  width: 100%;
  min-height: 520px;
  height: 70vh;
  max-height: 720px;
  border: 0;
  background: #fff;
}
.rbl-paper-preview-image {
  display: block;
  width: 100%;
  height: auto;
  max-height: 720px;
  object-fit: contain;
  background: #fff;
}
.rbl-paper-preview-note {
  margin-top: 10px;
  font-size: .85rem;
  color: var(--muted);
  line-height: 1.5;
}
.rbl-paper-download {
  margin: 20px 0 16px;
  padding: 20px 22px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
.rbl-paper-download-title {
  font-size: 1.15rem;
  font-weight: 800;
  margin: 0 0 8px;
  line-height: 1.35;
}
.rbl-paper-download-lead {
  font-size: .92rem;
  color: #374151;
  line-height: 1.6;
  margin: 0 0 14px;
}
.rbl-paper-download-form { margin: 0; }
.rbl-paper-download-error,
.rbl-paper-download-points-warn {
  font-size: .88rem;
  color: #b45309;
  margin: 0 0 12px;
  padding: 10px 12px;
  background: #fffbeb;
  border-radius: var(--radius);
  border: 1px solid #fde68a;
}
.rbl-paper-download-note {
  margin-top: 10px;
  font-size: .82rem;
  color: var(--muted);
}
.rbl-paper-unavailable {
  font-size: .9rem;
  margin: 16px 0;
}
.rbl-paper-stats--top {
  margin: 12px 0 4px;
}
.rbl-paper-uploader {
  list-style: none;
  margin: 14px 0 2px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.rbl-paper-uploader-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: .88rem;
  font-weight: 500;
  color: #1f2937;
  line-height: 1.35;
}
.rbl-paper-uploader-icon {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.rbl-paper-uploader-icon--person {
  color: #2563eb;
  background: #e8f0fe;
}
.rbl-paper-uploader-icon--date {
  color: #c2410c;
  background: var(--orange-l);
}
.rbl-paper-uploader-icon--docs {
  color: #047857;
  background: #ecfdf5;
}
.rbl-paper-topic-list {
  margin: 8px 0 12px;
  padding-left: 1.25rem;
  line-height: 1.6;
}
.rbl-paper-topic-list li { margin-bottom: 4px; }
.rbl-paper-chapter-cluster-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.rbl-paper-chapter-cluster-list a {
  font-weight: 600;
  color: var(--orange);
  text-decoration: none;
}
.rbl-paper-chapter-cluster-list a:hover { text-decoration: underline; }
.rbl-paper-chapter-cluster-count {
  font-size: .8rem;
  color: var(--muted);
  margin-left: 6px;
}
.rbl-paper-faq-list { display: flex; flex-direction: column; gap: 8px; }
.rbl-paper-faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0 14px;
  background: #fff;
}
.rbl-paper-faq-item summary {
  cursor: pointer;
  padding: 12px 0;
  list-style: none;
}
.rbl-paper-faq-item summary::-webkit-details-marker { display: none; }
.rbl-paper-faq-q {
  font-size: .95rem;
  font-weight: 700;
  margin: 0;
  display: inline;
}
.rbl-paper-faq-a {
  font-size: .9rem;
  line-height: 1.65;
  color: #374151;
  margin: 0 0 14px;
  padding-top: 0;
}
.rbl-paper-detail-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}
.rbl-paper-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin: 16px 0 4px;
  padding: 0;
}
.rbl-paper-toolbar-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.rbl-paper-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 40px;
  padding: 8px 14px;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 50px;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}
.rbl-paper-pill:hover,
.rbl-paper-pill:focus-visible {
  border-color: #d1d5db;
  background: var(--bg);
  outline: none;
}
.rbl-paper-pill svg {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
  stroke: currentColor;
}
.rbl-paper-preview-wrap { position: relative; }
.rbl-paper-preview-float {
  position: absolute;
  top: 48px;
  right: 10px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.rbl-paper-float-btn {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  cursor: pointer;
  color: var(--ink);
  padding: 0;
}
.rbl-paper-float-btn:hover {
  border-color: var(--orange);
  color: var(--orange);
}
.rbl-paper-float-btn svg { width: 18px; height: 18px; }
.rbl-sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 2050;
  background: rgba(15, 23, 42, 0.4);
}
.rbl-sheet-backdrop[hidden] { display: none; }
.rbl-share-popover {
  position: fixed;
  z-index: 2100;
  min-width: 200px;
  padding: 8px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.14);
}
.rbl-share-popover[hidden] { display: none; }
.rbl-share-popover-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  padding: 4px 10px 8px;
  margin: 0;
}
.rbl-share-popover button,
.rbl-share-popover a {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink);
  background: none;
  border: none;
  border-radius: 6px;
  text-decoration: none;
  cursor: pointer;
  text-align: left;
}
.rbl-share-popover button:hover,
.rbl-share-popover a:hover {
  background: var(--orange-l);
  color: var(--orange);
}
.rbl-native-share-row {
  border-top: 1px solid var(--border);
  margin-top: 4px;
  padding-top: 12px !important;
}
.rbl-more-menu {
  position: fixed;
  z-index: 2100;
  min-width: 180px;
  padding: 6px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.14);
}
.rbl-more-menu[hidden] { display: none; }
.rbl-more-menu button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 12px 14px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink);
  background: none;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  text-align: left;
}
.rbl-more-menu button:hover { background: var(--bg); }
.rbl-paper-mobile-bar {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1900;
  align-items: center;
  gap: 8px;
  padding: 10px 12px calc(10px + var(--rbl-safe-bottom, 0px));
  background: var(--white);
  border-top: 1px solid var(--border);
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.06);
}
.rbl-paper-mobile-bar--compact {
  justify-content: flex-start;
}
.rbl-paper-mobile-icon {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  color: var(--ink);
  padding: 0;
}
.rbl-paper-mobile-icon svg { width: 20px; height: 20px; }
.rbl-paper-mobile-download {
  flex: 1 1 auto;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 0.9rem;
  font-weight: 700;
  color: #fff;
  background: var(--rbl-cta-fill, #c2410c);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  padding: 0 16px;
}
.rbl-paper-mobile-download svg { width: 18px; height: 18px; }
.rbl-action-toast {
  position: fixed;
  left: 50%;
  bottom: 80px;
  transform: translateX(-50%) translateY(12px);
  z-index: 2200;
  max-width: min(92vw, 360px);
  padding: 12px 16px;
  font-size: 0.88rem;
  font-weight: 600;
  color: #fff;
  background: #1f2937;
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.rbl-action-toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.rbl-report-dialog {
  border: none;
  border-radius: var(--radius-lg);
  padding: 0;
  width: min(92vw, 440px);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.2);
}
.rbl-report-dialog::backdrop { background: rgba(15, 23, 42, 0.45); }
.rbl-report-dialog-inner { padding: 22px 20px 18px; }
.rbl-report-dialog h2 { font-size: 1.1rem; margin: 0 0 6px; }
.rbl-report-dialog-lead {
  font-size: 0.88rem;
  color: var(--muted);
  margin: 0 0 16px;
  line-height: 1.5;
}
.rbl-report-reasons {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0 0 14px;
  padding: 0;
  border: 0;
}
.rbl-report-reasons label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.9rem;
  line-height: 1.4;
  cursor: pointer;
}
.rbl-report-reasons input {
  margin-top: 3px;
  accent-color: var(--orange);
}
.rbl-report-note {
  width: 100%;
  min-height: 72px;
  padding: 10px 12px;
  font-size: 0.88rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  resize: vertical;
  margin-bottom: 16px;
}
.rbl-report-note:focus {
  outline: 2px solid var(--orange-l);
  border-color: var(--orange);
}
.rbl-report-dialog-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}
.rbl-report-dialog-actions button {
  min-height: 44px;
  padding: 10px 16px;
  font-size: 0.88rem;
  font-weight: 700;
  border-radius: var(--radius);
  cursor: pointer;
}
.rbl-report-cancel {
  background: var(--white);
  border: 1px solid var(--border);
  color: var(--ink);
}
.rbl-report-submit {
  background: var(--rbl-cta-fill, #c2410c);
  border: 1px solid var(--orange);
  color: #fff;
}
@media (max-width: 767.98px) {
  body.rbl-paper-has-mobile-bar .rbl-bottom-nav {
    display: none !important;
  }
  body.rbl-paper-has-mobile-bar {
    padding-bottom: calc(var(--rbl-paper-mobile-bar-h, 65px) + var(--rbl-safe-bottom, 0px));
  }
  .rbl-paper-toolbar--desktop { display: none; }
  .rbl-paper-mobile-bar { display: flex; }
  .rbl-paper-download-in-box { display: none; }
  .rbl-paper-preview-float { display: flex; }
  .rbl-action-toast {
    bottom: calc(var(--rbl-paper-mobile-bar-h, 65px) + var(--rbl-safe-bottom, 0px) + 16px);
  }
  .rbl-share-popover.is-mobile-sheet,
  .rbl-more-menu.is-mobile-sheet {
    left: 0 !important;
    right: 0 !important;
    top: auto !important;
    bottom: calc(var(--rbl-paper-mobile-bar-h, 65px) + var(--rbl-safe-bottom, 0px));
    width: auto;
    min-width: 0;
    margin: 0;
    transform: none !important;
    border-radius: 16px 16px 0 0;
    border-bottom: none;
    padding: 8px 8px 12px;
    box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.12);
  }
  .rbl-share-popover.is-mobile-sheet .rbl-share-popover-title,
  .rbl-more-menu.is-mobile-sheet .rbl-share-popover-title {
    padding: 8px 12px 12px;
    font-size: 0.95rem;
    text-transform: none;
    letter-spacing: 0;
    color: var(--ink);
  }
  .rbl-share-popover.is-mobile-sheet button,
  .rbl-share-popover.is-mobile-sheet a,
  .rbl-more-menu.is-mobile-sheet button {
    min-height: 48px;
    padding: 12px 14px;
    font-size: 0.95rem;
  }
}
@media (min-width: 768px) {
  .rbl-paper-preview-float { display: none; }
  .rbl-paper-mobile-bar { display: none !important; }
}
.rbl-download-btn {
  width: 100%;
  max-width: 320px;
  min-height: 48px;
  font-weight: 700;
}
.rbl-paper-stats {
  display: flex;
  gap: 16px;
  font-size: .82rem;
  color: var(--muted);
}
.rbl-paper-description {
  font-size: .95rem;
  line-height: 1.7;
  color: #374151;
  margin-bottom: 16px;
}
.rbl-paper-badges { display: flex; gap: 8px; flex-wrap: wrap; }
.rbl-badge {
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  background: var(--orange-l);
  color: var(--orange);
  padding: 4px 10px;
  border-radius: 50px;
}

/* Ad regions (F1 — reserved height, paid-member collapse via boot.js) */
.rbl-ad-region {
  overflow: hidden;
  transition: min-height 0.2s ease, margin 0.2s ease;
}
.rbl-ad-region[data-hidden='true'] {
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  display: none !important;
}
.rbl-ad-region--top { min-height: var(--rbl-ad-top-min-h, 50px); }
.rbl-ad-region--infeed {
  min-height: var(--rbl-ad-infeed-min-h, 90px);
  margin: var(--rbl-space-4, 16px) 0;
}
.rbl-ad-region--sidebar { min-height: var(--rbl-ad-sidebar-min-h, 250px); }

/* Class hub (/cbse/class-N) */
.rbl-class-hub {
  overflow-x: clip;
}
.rbl-class-hero {
  border-bottom: 1px solid var(--border);
}
.rbl-class-hero-intro {
  font-size: .9rem;
  line-height: 1.65;
  max-width: 720px;
  margin-top: 16px;
}
.rbl-class-hero-intro p:last-child {
  margin-bottom: 0;
}
.rbl-class-hero-intro--desktop {
  margin-top: 16px;
}
.rbl-class-hero-metrics-mobile {
  margin: 0 0 4px;
}
.rbl-class-hero-total {
  font-size: .88rem;
  margin: 0 0 10px;
  color: var(--muted);
  line-height: 1.4;
}
.rbl-class-hero-total strong {
  font-family: 'Outfit', sans-serif;
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--ink);
}
.rbl-class-hero-top-label {
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--muted);
  margin: 0 0 8px;
}
.rbl-class-hero-chips {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  gap: 8px;
  list-style: none;
  margin: 0 0 10px;
  padding: 0;
}
.rbl-class-hero-chips::-webkit-scrollbar {
  display: none;
}
.rbl-class-hero-chip {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 50px;
  border: 1px solid var(--border);
  background: #fff;
  font-size: .8rem;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}
.rbl-class-hero-chip span {
  font-size: .72rem;
  color: var(--muted);
  font-weight: 700;
}
.rbl-class-hero-chip:hover {
  border-color: #d1d5db;
  background: var(--bg);
  color: var(--ink);
}
.rbl-class-hero-view-all {
  display: inline-block;
  font-size: .82rem;
  font-weight: 700;
  color: var(--orange);
  text-decoration: none;
}
.rbl-class-hero-view-all:hover {
  text-decoration: underline;
}
.rbl-class-band {
  padding: 36px 0;
}
.rbl-class-band--alt {
  background: #f3f4f6;
}
.rbl-class-type-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  overflow: visible;
}
.rbl-class-type-grid .rbl-class-type-nav-card {
  width: 100%;
  min-height: 100px;
}
@media (min-width: 576px) {
  .rbl-class-type-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (min-width: 992px) {
  .rbl-class-type-grid {
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 14px;
  }
}
/* Mobile: compact type navigation (max ~2 rows) */
.rbl-class-type-nav-compact {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.rbl-class-type-nav-chip {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 2px;
  min-height: 52px;
  padding: 8px 10px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: #fff;
  text-decoration: none;
  color: var(--ink);
  font-size: .76rem;
  font-weight: 600;
  line-height: 1.25;
}
.rbl-class-type-nav-chip:hover {
  color: var(--ink);
  border-color: #d1d5db;
  background: var(--bg);
}
.rbl-class-type-nav-count {
  font-size: .7rem;
  font-weight: 700;
  color: var(--muted);
}
.rbl-class-type-nav-chip.rbl-hub-type-card--qb { background: #eff6ff; border-color: #bfdbfe; }
.rbl-class-type-nav-chip.rbl-hub-type-card--qp { background: #eff6ff; border-color: #bfdbfe; }
.rbl-class-type-nav-chip.rbl-hub-type-card--sample { background: var(--orange-l); border-color: #fed7aa; }
.rbl-class-type-nav-chip.rbl-hub-type-card--notes { background: #f0fdf4; border-color: #bbf7d0; }
.rbl-class-type-nav-chip.rbl-hub-type-card--worksheet { background: #f5f3ff; border-color: #ddd6fe; }
.rbl-class-type-nav-chip.rbl-hub-type-card--test { background: #fef2f2; border-color: #fecaca; }
/* Filter chips above Latest Resources (AJAX only) */
.rbl-class-list-type-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
  margin-bottom: 14px;
}
.rbl-class-list-type-label {
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--muted);
  margin-right: 2px;
}
.rbl-class-list-type-chip {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 4px 12px;
  border-radius: 50px;
  border: 1px solid var(--border);
  background: #fff;
  font-size: .78rem;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  font-family: inherit;
}
.rbl-class-list-type-chip:hover {
  border-color: #d1d5db;
  background: var(--bg);
}
.rbl-class-list-type-chip.is-active {
  border-color: var(--ink);
  background: var(--bg);
  color: var(--ink);
}
/* Sticky bar: search only */
.rbl-class-sticky-search--solo {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  margin: 0;
}
.rbl-class-sticky-search--solo .rbl-class-sticky-search-input {
  flex: 1;
  min-width: 0;
  min-height: 38px;
  padding: 8px 14px;
  font-size: .88rem;
  border: 1px solid var(--border);
  border-radius: 50px;
  background: var(--white);
}
.rbl-class-sticky-search--solo .rbl-class-sticky-search-btn {
  flex-shrink: 0;
  min-height: 38px;
  padding: 0 16px;
  font-size: .82rem;
  font-weight: 700;
  border: none;
  border-radius: 50px;
  background: var(--rbl-cta-fill, #c2410c);
  color: #fff;
  cursor: pointer;
}
.rbl-class-sticky-search--solo .rbl-class-sticky-search-btn:hover {
  background: var(--rbl-cta-fill-hover, #9a3412);
}
.rbl-paper-card--class-hub .rbl-paper-card-title {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.4;
  margin: 0 0 8px;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}
.rbl-paper-card--class-hub .rbl-paper-card-subline {
  font-size: .82rem;
  color: var(--muted);
  margin: 0 0 6px;
  line-height: 1.4;
}
.rbl-paper-card--class-hub .rbl-paper-card-type-label {
  font-weight: 600;
  color: var(--ink);
}
.rbl-paper-card--class-hub .rbl-paper-card-date {
  font-size: .78rem;
  color: var(--muted);
  margin: 0 0 4px;
}
.rbl-paper-card--class-hub .rbl-paper-card-dl-secondary {
  font-size: .75rem;
  font-weight: 600;
  color: var(--muted);
  margin: 0;
}
.rbl-hub-faq--premium .accordion-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 10px;
  overflow: hidden;
}
.rbl-hub-faq--premium .accordion-button {
  font-size: .95rem;
  font-weight: 700;
  padding: 16px 18px;
  line-height: 1.45;
}
.rbl-hub-faq--premium .accordion-body {
  padding: 0 18px 16px;
  line-height: 1.65;
}
.rbl-is-loading {
  opacity: .55;
  pointer-events: none;
}
@media (max-width: 767.98px) {
  .rbl-class-sticky-bar .rbl-subject-sticky-inner {
    padding: 8px 0;
  }
  #browse-by-type.rbl-class-band {
    padding: 22px 0;
  }
  #browse-by-type .rbl-subject-section-lead {
    margin-bottom: 12px;
  }
  .rbl-class-hub .rbl-class-hero .container {
    display: flex;
    flex-direction: column;
  }
  .rbl-class-hub .rbl-breadcrumb {
    order: 0;
  }
  .rbl-class-hub .rbl-hub-hero-title {
    order: 1;
    margin-bottom: 12px;
  }
  .rbl-class-hub .rbl-class-hero-search {
    order: 2;
    margin-top: 0;
    margin-bottom: 14px;
  }
  .rbl-class-hub .rbl-class-hero-metrics-mobile {
    order: 3;
  }
  .rbl-class-hub .rbl-class-hero {
    padding-top: 16px;
    padding-bottom: 20px;
  }
  .rbl-class-hub .rbl-class-band {
    padding: 28px 0;
  }
  .rbl-class-intro-section {
    padding-top: 24px;
    padding-bottom: 24px;
    background: #f9fafb;
  }
  .rbl-class-intro-section .rbl-class-hero-intro--mobile {
    margin-top: 0;
    font-size: .85rem;
  }
  .rbl-popular-mobile-hide {
    display: none !important;
  }
  .rbl-class-hub .rbl-class-resource-grid > [class*="col-"] {
    width: 100%;
    max-width: 100%;
    flex: 0 0 100%;
  }
}

/* Class type hub (/cbse/class-N/{type}) */
.rbl-class-type-hub {
  overflow-x: clip;
}
.rbl-type-hero {
  border-bottom: 1px solid var(--border);
  padding-bottom: 28px;
}
.rbl-type-hero-tagline {
  font-size: .92rem;
  line-height: 1.65;
  color: var(--muted);
  max-width: 720px;
  margin: 0 0 18px;
}
.rbl-type-hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  list-style: none;
  margin: 0 0 18px;
  padding: 0;
}
.rbl-type-hero-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-right: 24px;
  border-right: 1px solid var(--border);
}
.rbl-type-hero-stat:last-child {
  border-right: 0;
  padding-right: 0;
}
.rbl-type-hero-stat strong {
  font-family: 'Outfit', sans-serif;
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--ink);
  line-height: 1.1;
}
.rbl-type-hero-stat span {
  font-size: .78rem;
  font-weight: 600;
  color: var(--muted);
}
.rbl-type-available-subjects {
  margin-top: 4px;
}
.rbl-type-available-label {
  display: block;
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--muted);
  margin-bottom: 8px;
}
.rbl-type-subject-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.rbl-type-subject-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border-radius: 50px;
  border: 1px solid var(--border);
  background: #fff;
  font-size: .78rem;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
}
.rbl-type-subject-chip span {
  color: var(--muted);
  font-weight: 700;
}
.rbl-type-subject-chip:hover {
  border-color: #d1d5db;
  background: var(--bg);
  color: var(--ink);
}
.rbl-type-band {
  padding: 28px 0;
}
.rbl-type-band--alt {
  background: #f3f4f6;
}
.rbl-type-band--switcher {
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  background: #fafafa;
}
.rbl-type-band--search {
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
}
.rbl-type-switcher {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.rbl-type-switcher-link {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 4px 14px;
  border-radius: 50px;
  border: 1px solid var(--border);
  font-size: .78rem;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  background: #fff;
}
.rbl-type-switcher-link:hover,
.rbl-type-switcher-link.is-active {
  border-color: var(--ink);
  background: var(--bg);
  color: var(--ink);
}

/* Horizontal scroll with Google-style chevrons */
.rbl-hscroll {
  position: relative;
}
.rbl-hscroll-track {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.rbl-hscroll-track::-webkit-scrollbar {
  display: none;
}
.rbl-hscroll-btn {
  display: none;
}
.rbl-type-subject-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 100%;
  padding: 16px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: #fff;
  text-decoration: none;
  color: var(--ink);
  box-shadow: var(--shadow);
}
.rbl-type-subject-card:hover {
  color: var(--ink);
  border-color: #d1d5db;
}
.rbl-type-subject-card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}
.rbl-type-subject-card-name {
  font-weight: 700;
  font-size: 1rem;
}
.rbl-type-subject-card-count {
  font-size: .78rem;
  font-weight: 600;
  color: var(--muted);
}
.rbl-type-subject-card-topics {
  font-size: .82rem;
  color: var(--muted);
  line-height: 1.45;
}
.rbl-type-subject-card-cta {
  font-size: .82rem;
  font-weight: 700;
  color: var(--orange);
  margin-top: auto;
}
.rbl-type-intro {
  font-size: .9rem;
  line-height: 1.7;
  max-width: 820px;
}
.rbl-type-intro ul {
  margin: 0 0 1rem;
  padding-left: 1.2rem;
}
.rbl-type-related-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.rbl-type-related-links a {
  font-size: .88rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--ink, #111827);
}
.rbl-type-related-links a:hover {
  color: var(--orange, #f76c1b);
}
/* Compact topic/chapter links (type hubs) */
.rbl-type-chapter-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.rbl-type-chapter-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 12px;
  text-decoration: none;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  transition: background .15s ease, border-color .15s ease;
}
.rbl-type-chapter-link:hover {
  background: var(--bg);
  border-color: #d1d5db;
  color: var(--ink);
}
.rbl-type-chapter-link-name {
  font-size: .84rem;
  font-weight: 600;
  line-height: 1.35;
  min-width: 0;
}
.rbl-type-chapter-link-meta {
  flex-shrink: 0;
  font-size: .72rem;
  font-weight: 700;
  color: var(--muted);
}
.rbl-type-chapter-toggle {
  display: inline-block;
  margin-top: 10px;
  padding: 0;
  border: 0;
  background: none;
  font-size: .875rem;
  font-weight: 700;
  color: var(--orange);
  cursor: pointer;
  text-decoration: none;
}
.rbl-type-chapter-toggle:hover {
  text-decoration: underline;
}
@media (min-width: 768px) {
  .rbl-type-chapter-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 12px;
  }
}
/* Legacy pill layout (assessment hub inline blocks if any remain) */
.rbl-type-chapter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.rbl-type-chapter-pill {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  min-width: 140px;
  padding: 10px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: #fff;
  text-decoration: none;
  color: var(--ink);
  box-shadow: var(--shadow);
}
.rbl-type-chapter-pill:hover {
  color: var(--ink);
  border-color: #d1d5db;
  background: var(--bg);
}
.rbl-type-chapter-pill-name {
  font-size: .88rem;
  font-weight: 700;
  line-height: 1.3;
}
.rbl-type-chapter-pill-sub {
  font-size: .72rem;
  font-weight: 600;
  color: var(--muted);
}
.rbl-type-chapter-pill-count {
  font-size: .72rem;
  font-weight: 700;
  color: var(--orange-d);
}
.rbl-paper-card--type-hub .rbl-paper-card-title {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.4;
  margin: 0 0 6px;
}
.rbl-paper-card--type-hub .rbl-paper-card-subject-only {
  font-size: .82rem;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 4px;
}
.rbl-paper-card--type-hub .rbl-paper-card-cta-line {
  margin: 8px 0 0;
}
.rbl-paper-card--type-hub .rbl-paper-card-cta-link {
  font-size: .82rem;
  font-weight: 700;
  color: var(--orange);
  text-decoration: none;
}
.rbl-paper-card--type-hub .rbl-paper-card-cta-link:hover {
  text-decoration: underline;
}

/* Subject-type hub v2: assessment / practice format cards (matches subject-hub-v2 grid) */
.rbl-subject-type-hub-v2 .rbl-subject-type-grid,
.rbl-subject-type-hub-v2 .rbl-assessment-nav-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
  overflow: visible;
  padding-bottom: 0;
}
.rbl-subject-type-hub-v2 .rbl-subject-type-grid .rbl-hub-type-card,
.rbl-subject-type-hub-v2 .rbl-assessment-nav-grid .rbl-hub-type-card {
  flex: none;
  width: auto;
  min-width: 0;
  padding: 10px 12px;
  box-shadow: none;
}
.rbl-exam-type-hub--compact .rbl-assessment-nav-grid .rbl-hub-type-card--assessment {
  border-top: 2px solid #cfe0f5;
}
.rbl-exam-type-hub--compact .rbl-assessment-nav-grid .rbl-hub-type-card--assessment:hover {
  border-top-color: #b7d0ef;
}
.rbl-exam-type-hub--compact .rbl-assessment-nav-grid .rbl-hub-type-card--assessment.is-active {
  border-top-color: #9ec0e8;
}
@media (max-width: 767.98px) {
  .rbl-subject-type-hub-v2 .rbl-subject-type-grid,
  .rbl-subject-type-hub-v2 .rbl-assessment-nav-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Subject-first type hub: dense title-only resource lists */
.rbl-exam-type-hub--compact .rbl-compact-paper-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  overflow: visible;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.rbl-exam-type-hub--compact .rbl-compact-paper-list li {
  margin: 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  overflow: hidden;
}
.rbl-exam-type-hub--compact .rbl-compact-paper-list li:last-child {
  border-bottom: 1px solid var(--border);
}
.rbl-exam-type-hub--compact .rbl-compact-paper-link {
  display: block;
  padding: 12px 14px 12px 12px;
  border-left: 3px solid var(--orange);
  font-size: .95rem;
  font-weight: 600;
  line-height: 1.45;
  color: var(--ink);
  text-decoration: none;
}
.rbl-exam-type-hub--compact .rbl-compact-paper-link:hover {
  background: var(--orange-l);
  color: var(--orange-d);
  border-left-color: var(--orange-d);
}
.rbl-exam-type-hub--compact .rbl-compact-paper-list--popular {
  margin-bottom: 0;
}
.rbl-exam-type-hub--compact .rbl-paper-card--compact-list,
.rbl-exam-type-hub--compact .rbl-paper-card:has(.rbl-paper-card-title--compact) {
  padding: 0;
  border: none;
  background: transparent;
  box-shadow: none;
}
.rbl-exam-type-hub--compact .rbl-paper-card-title--compact {
  font-size: .95rem;
  font-weight: 600;
  line-height: 1.45;
  margin: 0;
}
.rbl-subject-type-hub-v2.rbl-exam-type-hub--compact .rbl-stype-v2-section {
  margin-bottom: 1.75rem;
}
.rbl-subject-type-hub-v2.rbl-exam-type-hub--compact .rbl-assessment-nav-band.rbl-stype-v2-section {
  margin-bottom: 1.75rem;
}
.rbl-exam-type-hub--compact .rbl-stype-v2-chapter-card--name-only {
  min-height: auto;
  padding: 12px 14px;
  justify-content: center;
}
.rbl-exam-type-hub--compact .rbl-stype-v2-chapter-card--name-only .rbl-stype-v2-chapter-name {
  font-size: .95rem;
  line-height: 1.4;
}
.rbl-exam-type-hub--compact .rbl-type-chapter-more {
  margin-top: 14px;
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0;
}
.rbl-exam-type-hub--compact .rbl-type-chapter-more-summary,
.rbl-exam-type-hub--compact .rbl-type-chapter-directory-summary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  color: var(--orange-d, #c2410c);
  font-weight: 600;
  font-size: .82rem;
  line-height: 1.4;
  padding: 6px 0;
  list-style: none;
  background: transparent;
  border: 0;
  box-shadow: none;
  text-decoration: none;
}
.rbl-exam-type-hub--compact .rbl-type-chapter-more-summary:hover,
.rbl-exam-type-hub--compact .rbl-type-chapter-directory-summary:hover {
  text-decoration: underline;
  color: var(--orange, #f76c1b);
}
.rbl-exam-type-hub--compact .rbl-type-chapter-more[open] .rbl-type-chapter-more-summary,
.rbl-exam-type-hub--compact .rbl-type-chapter-directory[open] .rbl-type-chapter-directory-summary {
  border-bottom: 0;
  margin-bottom: 10px;
}
.rbl-exam-type-hub--compact .rbl-type-chapter-more .rbl-subject-chapter-directory-grid {
  padding: 0;
}
.rbl-subject-type-hub-v2 .rbl-hub-type-card--assessment.is-active {
  border-color: var(--orange);
  background: var(--orange-l);
}
.rbl-exam-type-hub--compact .rbl-type-practice-filter-note {
  font-size: .88rem;
  color: var(--muted);
  margin: 0;
}

@media (max-width: 767.98px) {
  .rbl-type-hero {
    padding-bottom: 20px;
  }
  .rbl-type-hero-stats {
    gap: 12px 16px;
    margin-bottom: 0;
  }
  .rbl-type-hero-stat {
    flex: 1 1 28%;
    min-width: 90px;
    padding-right: 0;
    border-right: 0;
  }
  /* Hero subject/chapter chips — redundant with Browse by Subject/Chapter below */
  .rbl-type-available-subjects {
    display: none !important;
  }
  /* Google-style horizontal type tabs on mobile */
  .rbl-type-band--switcher {
    padding: 0;
    background: #fff;
    border-bottom: 1px solid #e8eaed;
  }
  .rbl-type-band--switcher > .container {
    padding-left: 0;
    padding-right: 0;
    max-width: 100%;
  }
  .rbl-hscroll-track {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .rbl-hscroll-track::-webkit-scrollbar {
    display: none;
  }
  .rbl-hscroll-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 50%;
    z-index: 3;
    width: 32px;
    height: 32px;
    margin: 0;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: #fff;
    color: #3c4043;
    box-shadow: 0 1px 3px rgba(60, 64, 67, .25), 0 4px 8px rgba(60, 64, 67, .12);
    transform: translateY(-50%);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .15s ease, visibility .15s ease;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }
  .rbl-hscroll-btn--prev {
    left: 6px;
  }
  .rbl-hscroll-btn--next {
    right: 6px;
  }
  .rbl-hscroll-btn:active {
    background: #f1f3f4;
  }
  .rbl-hscroll.is-overflowing::before,
  .rbl-hscroll.is-overflowing::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 40px;
    z-index: 2;
    pointer-events: none;
    opacity: 0;
    transition: opacity .15s ease;
  }
  .rbl-hscroll.is-overflowing::before {
    left: 0;
    background: linear-gradient(to right, #fff 25%, rgba(255, 255, 255, 0));
  }
  .rbl-hscroll.is-overflowing::after {
    right: 0;
    background: linear-gradient(to left, #fff 25%, rgba(255, 255, 255, 0));
  }
  .rbl-hscroll.is-overflowing.can-scroll-left:hover::before,
  .rbl-hscroll.is-overflowing.can-scroll-left.is-interacting::before,
  .rbl-hscroll.is-overflowing.can-scroll-left:focus-within::before {
    opacity: 1;
  }
  .rbl-hscroll.is-overflowing.can-scroll-right:hover::after,
  .rbl-hscroll.is-overflowing.can-scroll-right.is-interacting::after,
  .rbl-hscroll.is-overflowing.can-scroll-right:focus-within::after {
    opacity: 1;
  }
  .rbl-hscroll.is-overflowing.can-scroll-left:hover .rbl-hscroll-btn--prev,
  .rbl-hscroll.is-overflowing.can-scroll-left.is-interacting .rbl-hscroll-btn--prev,
  .rbl-hscroll.is-overflowing.can-scroll-left:focus-within .rbl-hscroll-btn--prev {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }
  .rbl-hscroll.is-overflowing.can-scroll-right:hover .rbl-hscroll-btn--next,
  .rbl-hscroll.is-overflowing.can-scroll-right.is-interacting .rbl-hscroll-btn--next,
  .rbl-hscroll.is-overflowing.can-scroll-right:focus-within .rbl-hscroll-btn--next {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }
  @media (hover: none) and (pointer: coarse) {
    .rbl-hscroll.is-overflowing.can-scroll-right .rbl-hscroll-btn--next {
      opacity: 1;
      visibility: visible;
      pointer-events: auto;
    }
    .rbl-hscroll.is-overflowing.can-scroll-right::after {
      opacity: 1;
    }
  }
  .rbl-type-switcher {
    flex-wrap: nowrap;
    overflow-x: visible;
    gap: 0;
    padding: 0 4px;
  }
  .rbl-type-switcher-link {
    position: relative;
    flex-shrink: 0;
    white-space: nowrap;
    min-height: 44px;
    padding: 10px 14px 12px;
    border: none;
    border-radius: 0;
    background: transparent;
    font-size: .84rem;
    font-weight: 500;
    color: #5f6368;
    letter-spacing: .01em;
  }
  .rbl-type-switcher-link:hover {
    color: var(--ink);
    background: transparent;
  }
  .rbl-type-switcher-link.is-active {
    color: var(--ink);
    font-weight: 600;
    background: transparent;
    border: none;
    box-shadow: none;
  }
  .rbl-type-switcher-link.is-active::after {
    content: '';
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: 0;
    height: 3px;
    background: var(--ink);
    border-radius: 3px 3px 0 0;
  }
  .rbl-type-band--search {
    padding: 16px 0;
  }
  .rbl-type-subject-chips {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 2px;
  }
  .rbl-type-subject-chips::-webkit-scrollbar {
    display: none;
  }
  .rbl-type-subject-chip {
    flex-shrink: 0;
    white-space: nowrap;
  }
}

/* Hub right sidebar (upload + activity) */
.rbl-hub-with-sidebar {
  align-items: flex-start;
}
.rbl-hub-main-column .container {
  max-width: 100%;
}
.rbl-hub-sidebar-sticky {
  position: sticky;
  top: calc(var(--rbl-sticky-top, 64px) + 16px);
}
.rbl-hub-sidebar {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.rbl-hub-sidebar-card {
  background: #fff;
  border: 1px solid var(--border, #e5e7eb);
  border-radius: var(--radius, 12px);
  padding: 18px 16px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.rbl-hub-sidebar-upload {
  text-align: center;
}
.rbl-hub-sidebar-title {
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.35;
  margin: 0 0 10px;
  color: var(--text, #111827);
}
.rbl-hub-sidebar-text {
  font-size: 0.9rem;
  color: var(--muted, #6b7280);
  margin-bottom: 14px;
}
.rbl-hub-sidebar-upload-btn {
  font-weight: 700;
  min-height: 44px;
}
.rbl-hub-sidebar-note {
  font-size: 0.8125rem;
  color: var(--muted, #6b7280);
  margin: 12px 0 8px;
  line-height: 1.45;
}
.rbl-hub-sidebar-rules {
  font-size: 0.8125rem;
  text-decoration: none;
}
.rbl-hub-activity-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.rbl-hub-activity-link {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  line-height: 1.4;
  color: var(--primary, #f76c1b);
  text-decoration: none;
}
.rbl-hub-activity-link:hover {
  text-decoration: underline;
}
.rbl-hub-activity-meta {
  display: block;
  font-size: 0.78rem;
  color: var(--muted, #6b7280);
  margin-top: 4px;
}
.rbl-hub-activity-empty {
  font-size: 0.875rem;
  color: var(--muted, #6b7280);
  margin: 0;
  line-height: 1.45;
}
.rbl-preview-banner {
  background: #1a365d;
  color: #fff;
  padding: 14px 16px;
  border-radius: var(--radius, 12px);
  font-size: 0.925rem;
}
.rbl-preview-banner a {
  color: #bee3f8;
}
.rbl-syllabus-alert {
  margin: 0.85rem 0 0;
  padding: 0.85rem 1rem;
  border-radius: var(--radius, 12px);
  border: 1px solid #f0d9a8;
  background: #fff8eb;
  color: #5c4a1f;
  font-size: 0.925rem;
  line-height: 1.5;
  max-width: 42rem;
  overflow-wrap: anywhere;
  word-wrap: break-word;
}
.rbl-syllabus-alert strong {
  color: #7a5c12;
}
.rbl-paper-detail-head .rbl-syllabus-alert {
  margin-top: 0.75rem;
  margin-bottom: 0.25rem;
}
.rbl-demo-mock-panel {
  background: #fff;
  border: 1px dashed #cbd5e1;
  border-radius: var(--radius, 12px);
  padding: 20px 18px;
}
.rbl-demo-mock-kicker {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted, #6b7280);
  margin-bottom: 8px;
}
.rbl-paper-card--placeholder {
  border: 1px solid var(--border, #e5e7eb);
  border-radius: var(--radius, 12px);
  min-height: 88px;
  background: #f9fafb;
}
@media (max-width: 991.98px) {
  .rbl-hub-sidebar-sticky {
    position: static;
  }
  .rbl-hub-sidebar-column {
    order: 2;
  }
}

/* Subject-type hub layout v2 preview (/preview/subject-type-hub-layout) */
.rbl-subject-type-hub-v2 {
  padding-bottom: 32px;
}
.rbl-subject-type-hub-v2 .rbl-hub-main-column .container {
  max-width: none;
  padding-left: 0;
  padding-right: 0;
}
.rbl-stype-v2-banner {
  border-radius: 0;
  margin-bottom: 0;
}
.rbl-stype-v2-breadcrumb {
  margin: 20px 0 16px;
}
.rbl-stype-v2-head {
  margin-bottom: 20px;
}
.rbl-stype-v2-title {
  font-family: 'Outfit', sans-serif;
  font-size: clamp(1.35rem, 2.5vw, 1.75rem);
  font-weight: 800;
  line-height: 1.25;
  margin: 0 0 10px;
  color: var(--ink, #111827);
}
.rbl-stype-v2-lead {
  font-size: .92rem;
  line-height: 1.6;
  color: var(--muted, #6b7280);
  margin: 0 0 14px;
  max-width: 640px;
}
.rbl-stype-v2-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.rbl-stype-v2-stats li {
  display: flex;
  align-items: baseline;
  gap: 6px;
}
.rbl-stype-v2-stats strong {
  font-family: 'Outfit', sans-serif;
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--ink, #111827);
}
.rbl-stype-v2-stats span {
  font-size: .78rem;
  font-weight: 600;
  color: var(--muted, #6b7280);
}
.rbl-stype-v2-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
  padding: 14px 16px;
  margin-bottom: 24px;
  background: #fafafa;
  border: 1px solid var(--border, #e5e7eb);
  border-radius: var(--radius, 12px);
}
.rbl-stype-v2-tabs-wrap {
  flex: 1 1 280px;
  min-width: 0;
}
.rbl-stype-v2-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.rbl-stype-v2-tab {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 4px 12px;
  border-radius: 50px;
  border: 1px solid var(--border, #e5e7eb);
  background: #fff;
  font-size: .75rem;
  font-weight: 600;
  color: var(--ink, #111827);
  text-decoration: none;
  white-space: nowrap;
}
.rbl-stype-v2-tab:hover {
  border-color: #fdba74;
  color: var(--orange, #f76c1b);
}
.rbl-stype-v2-tab.is-active {
  background: var(--orange, #f76c1b);
  border-color: var(--orange, #f76c1b);
  color: #fff;
}
.rbl-stype-v2-search {
  display: flex;
  flex: 1 1 220px;
  gap: 8px;
  min-width: 0;
  max-width: 360px;
}
.rbl-stype-v2-search--solo {
  max-width: 480px;
}
.rbl-stype-v2-search-input {
  flex: 1;
  min-width: 0;
  padding: 8px 12px;
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 8px;
  font-size: .875rem;
}
.rbl-stype-v2-search-btn {
  flex-shrink: 0;
  font-size: .875rem;
  font-weight: 700;
  padding: 8px 16px;
}
.rbl-stype-v2-section {
  margin-bottom: 28px;
}
.rbl-stype-v2-section--alt {
  padding: 20px 16px;
  background: #f3f4f6;
  border-radius: var(--radius, 12px);
}
.rbl-stype-v2-section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 14px;
}
.rbl-stype-v2-section-title {
  font-size: 1.05rem;
  font-weight: 800;
  margin: 0;
  color: var(--ink, #111827);
}
.rbl-stype-v2-section-lead {
  font-size: .875rem;
  color: var(--muted, #6b7280);
  margin: 0 0 14px;
}
.rbl-stype-v2-count {
  font-size: .8rem;
  font-weight: 600;
  color: var(--muted, #6b7280);
}
.rbl-stype-v2-paper-card {
  min-height: 88px;
}
.rbl-stype-v2-chapter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 200px));
  justify-content: start;
  gap: 10px;
}
.rbl-stype-v2-chapter-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 12px;
  background: #fff;
  border: 1px solid var(--border, #e5e7eb);
  border-radius: var(--radius, 12px);
  text-decoration: none;
  color: var(--ink, #111827);
  transition: border-color .15s, box-shadow .15s;
}
.rbl-stype-v2-chapter-card:hover {
  border-color: var(--orange, #f76c1b);
  box-shadow: 0 2px 8px rgba(247, 108, 27, 0.12);
}
.rbl-stype-v2-chapter-name {
  font-size: .85rem;
  font-weight: 700;
  line-height: 1.35;
}
.rbl-stype-v2-chapter-count {
  font-size: .78rem;
  font-weight: 700;
  color: var(--orange, #f76c1b);
}
.rbl-stype-v2-backlinks {
  font-size: .875rem;
  padding-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
}
.rbl-chapter-adjacent-nav {
  display: flex;
  justify-content: space-between;
  align-items: stretch;
  gap: 16px;
  margin: 8px 0 4px;
  padding: 16px 0 4px;
  border-top: 1px solid rgba(0, 0, 0, .08);
}
.rbl-chapter-adjacent-link {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-width: calc(50% - 8px);
  text-decoration: none;
  color: inherit;
}
.rbl-chapter-adjacent-link:hover .rbl-chapter-adjacent-name {
  color: var(--orange, #f76c1b);
}
.rbl-chapter-adjacent-link--next {
  margin-left: auto;
  text-align: right;
}
.rbl-chapter-adjacent-kicker {
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .02em;
  text-transform: uppercase;
  color: rgba(0, 0, 0, .55);
}
.rbl-chapter-adjacent-name {
  font-size: .95rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--ink, #1a1a1a);
}
.rbl-chapter-adjacent-spacer {
  flex: 1 1 auto;
}
@media (max-width: 575.98px) {
  .rbl-chapter-adjacent-nav {
    flex-direction: column;
    gap: 12px;
  }
  .rbl-chapter-adjacent-link,
  .rbl-chapter-adjacent-link--next {
    max-width: none;
    text-align: left;
    margin-left: 0;
  }
}
@media (max-width: 991.98px) {
  .rbl-stype-v2-tabs-wrap {
    flex: 0 0 auto;
    width: 100%;
  }
  .rbl-stype-v2-search {
    flex: 0 0 auto;
    max-width: none;
    width: 100%;
  }
  .rbl-stype-v2-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 12px;
    margin-bottom: 20px;
  }
  .rbl-stype-v2-chapter-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .rbl-stype-v2-search-btn {
    padding: 8px 14px;
    white-space: nowrap;
  }
}

/* Subject hub layout v2 (/cbse/class-N/subject) */
.rbl-subject-hub-v2 {
  padding-bottom: 32px;
}
.rbl-subject-hub-v2 .rbl-hub-main-column .container {
  max-width: none;
  padding-left: 0;
  padding-right: 0;
}
.rbl-subject-v2-intro {
  font-size: .9rem;
  line-height: 1.65;
  margin-top: 12px;
  max-width: 640px;
}
.rbl-subject-v2-intro p:last-child {
  margin-bottom: 0;
}
.rbl-subject-hub-v2 .rbl-subject-type-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
}
.rbl-subject-hub-v2 .rbl-subject-type-grid .rbl-hub-type-card {
  padding: 10px 12px;
}
.rbl-subject-v2-full-band {
  margin-top: 8px;
}
@media (max-width: 767.98px) {
  .rbl-subject-hub-v2 .rbl-stype-v2-stats {
    gap: 6px 14px;
  }
  .rbl-subject-hub-v2 .rbl-subject-type-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Exam hub layout v2 (/cbse, /imo) */
.rbl-exam-hub-v2 {
  padding-bottom: 0;
}
.rbl-exam-hub-v2-hero {
  padding: 20px 0 24px;
  border-bottom: 1px solid var(--border, #e5e7eb);
}
.rbl-exam-hub-v2-hero .rbl-stype-v2-breadcrumb {
  margin: 0 0 14px;
}
.rbl-exam-hub-v2-search .rbl-hub-search-row {
  max-width: 640px;
}
.rbl-exam-hub-v2-body {
  padding-top: 24px;
  padding-bottom: 8px;
}
.rbl-exam-hub-v2 .rbl-hub-main-column .container {
  max-width: none;
  padding-left: 0;
  padding-right: 0;
}
.rbl-exam-hub-block {
  margin-bottom: 28px;
}
.rbl-exam-hub-block--alt {
  padding: 20px 16px;
  background: #f3f4f6;
  border-radius: var(--radius, 12px);
}
.rbl-exam-hub-block--footer {
  margin-top: 8px;
  padding: 32px 0 40px;
  background: #fff;
  border-top: 1px solid var(--border, #e5e7eb);
}
.rbl-exam-hub-class-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
}
.rbl-exam-hub-class-grid .rbl-hub-class-card {
  min-height: 110px;
}
.rbl-exam-hub-type-grid,
.rbl-assessment-nav-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px;
}
.rbl-exam-hub-type-grid .rbl-hub-type-card,
.rbl-assessment-nav-grid .rbl-hub-type-card {
  flex: none;
  min-width: 0;
  width: 100%;
}
.rbl-exam-hub-subject-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}
.rbl-exam-hub-subject-grid .rbl-hub-subject-card {
  height: 100%;
  min-height: 88px;
}

.rbl-exam-hub-howto {
  padding-left: 1.25rem;
  margin-bottom: 0;
}
.rbl-exam-hub-howto li {
  margin-bottom: 0.35rem;
}

@media (max-width: 767.98px) {
  .rbl-exam-hub-v2 .rbl-popular-grid > *:nth-child(n + 5),
  .rbl-exam-hub-v2 .rbl-latest-grid > *:nth-child(n + 5) {
    display: none;
  }

  .rbl-hub-pill,
  .rbl-pathfinder .form-select,
  .rbl-pathfinder .btn,
  .rbl-view-all,
  .rbl-btn-sm {
    min-height: 48px;
  }

  .rbl-view-all {
    display: inline-flex;
    align-items: center;
  }

  .rbl-subject-hub--subject-first .rbl-subject-popular-grid > *:nth-child(n + 5) {
    display: none;
  }

  .rbl-stype-v2-chapter-count-suffix {
    display: none;
  }
}

.rbl-exam-hub-chapter-preview-group {
  margin-top: 18px;
}
.rbl-exam-hub-chapter-preview-group:first-of-type {
  margin-top: 12px;
}
.rbl-subject-chapter-directory {
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 12px;
  padding: 0;
  background: #fff;
}
.rbl-subject-chapter-directory-summary {
  cursor: pointer;
  font-weight: 700;
  padding: 14px 16px;
  list-style: none;
}
.rbl-subject-chapter-directory-summary::-webkit-details-marker {
  display: none;
}
.rbl-subject-chapter-directory[open] .rbl-subject-chapter-directory-summary {
  border-bottom: 1px solid var(--border, #e5e7eb);
}
.rbl-subject-chapter-directory-grid {
  padding: 14px 16px 16px;
}
.rbl-stype-v2-chapter-card--general {
  border-style: dashed;
}
.rbl-exam-hub-chapter-preview-grid {
  margin-bottom: 4px;
}

.rbl-exam-hub-v2 .rbl-stype-v2-section-lead {
  margin: 0 0 14px;
}
@media (min-width: 768px) {
  .rbl-exam-hub-v2-hero .rbl-hub-search-row {
    flex-direction: row;
    align-items: stretch;
  }
  .rbl-exam-hub-v2-hero .rbl-hub-search-btn {
    width: auto;
    min-width: 120px;
  }
  .rbl-hub-stats {
    grid-template-columns: repeat(4, 1fr);
  }
}
@media (max-width: 991.98px) {
  .rbl-exam-hub-type-grid,
  .rbl-assessment-nav-grid,
  .rbl-exam-hub-class-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .rbl-exam-hub-class-grid > .rbl-hub-class-card:last-child:nth-child(odd) {
    grid-column: 1 / -1;
    justify-self: center;
    width: calc(50% - 6px);
  }
}
@media (max-width: 359.98px) {
  .rbl-exam-hub-type-grid,
  .rbl-assessment-nav-grid,
  .rbl-subject-hub-v2 .rbl-subject-type-grid,
  .rbl-subject-type-hub-v2 .rbl-subject-type-grid,
  .rbl-stype-v2-chapter-grid {
    grid-template-columns: 1fr;
  }
}
@media (min-width: 992px) {
  .rbl-exam-hub-class-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
  }
  .rbl-exam-hub-class-grid > .rbl-hub-class-card {
    flex: 0 0 calc((100% - 24px) / 3);
    max-width: calc((100% - 24px) / 3);
  }
}
@media (min-width: 1200px) {
  .rbl-exam-hub-class-grid > .rbl-hub-class-card {
    flex-basis: calc((100% - 36px) / 4);
    max-width: calc((100% - 36px) / 4);
  }
}
@media (min-width: 1400px) {
  .rbl-exam-hub-class-grid > .rbl-hub-class-card {
    flex-basis: calc((100% - 48px) / 5);
    max-width: calc((100% - 48px) / 5);
  }
}

/* Class hub layout v2 (/imo/class-5, /cbse/class-10) */
.rbl-class-hub-v2 {
  padding-bottom: 0;
}
.rbl-class-hub-v2 .container {
  padding-top: 20px;
}
.rbl-class-hub-v2 .rbl-hub-main-column .container {
  max-width: none;
  padding-left: 0;
  padding-right: 0;
}
.rbl-class-hub-v2-toolbar {
  margin-bottom: 20px;
}
.rbl-class-hub-v2-toolbar .rbl-stype-v2-search {
  flex: 1 1 100%;
  max-width: none;
  width: 100%;
}
.rbl-class-hub-v2-intro {
  font-size: .9rem;
  line-height: 1.65;
  margin-top: 12px;
}
.rbl-class-hub-v2-intro p:last-child {
  margin-bottom: 0;
}
.rbl-class-hub-v2 .rbl-class-resource-grid {
  display: flex;
  flex-direction: column;
}
.rbl-class-hub-v2 .rbl-resource-row {
  padding-top: 10px;
  padding-bottom: 10px;
}
.rbl-class-hub-v2 .rbl-sort-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.rbl-class-hub-v2 .rbl-sort-tabs .rbl-stype-v2-tab {
  text-decoration: none;
}
.rbl-class-hub-v2 .rbl-sort-tabs .rbl-sort-tab.is-active {
  background: var(--orange, #f76c1b);
  border-color: var(--orange, #f76c1b);
  color: #fff;
}
.rbl-class-hub-v2-stats {
  margin-bottom: 0;
}
.rbl-class-hub-v2-stats--mobile {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 16px;
}
.rbl-class-hub-v2-stats--mobile li {
  margin: 0;
}
.rbl-class-type-hub-v2 .rbl-type-subject-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  text-decoration: none;
}
.rbl-class-assessment-index-v2 {
  padding-bottom: 0;
}
.rbl-class-assessment-index-v2 .container {
  padding-top: 20px;
}

/* Assessment hub layout v2 (/cbse/class-2/english/half-yearly) */
.rbl-assessment-hub-v2 {
  padding-bottom: 0;
}
.rbl-assessment-hub-v2 .container {
  padding-top: 20px;
}
.rbl-assessment-hub-v2 .rbl-assessment-eyebrow {
  color: var(--muted, #64748b);
  letter-spacing: 0.04em;
  margin-bottom: 8px;
}
.rbl-assessment-hub-v2-toolbar .rbl-stype-v2-tabs-wrap {
  flex: 1 1 100%;
  max-width: none;
}
.rbl-assessment-tab-count {
  opacity: 0.75;
  font-weight: 400;
}
.rbl-assessment-filter-tabs {
  flex-wrap: wrap;
}
.rbl-assessment-top-chapters a {
  color: var(--ink, #1a1a2e);
}
.rbl-assessment-top-chapters a:hover {
  color: var(--orange, #f76c1b);
}
.rbl-assessment-top-chapters a strong {
  color: inherit;
}
@media (max-width: 991.98px) {
  .rbl-assessment-hub-v2-toolbar {
    flex-direction: column;
    align-items: stretch;
    padding: 12px;
    gap: 0;
  }
  .rbl-assessment-filter-tabs {
    width: 100%;
  }
}
@media (max-width: 991.98px) {
  .rbl-class-hub-v2-toolbar {
    flex-direction: column;
    align-items: stretch;
    padding: 12px;
    gap: 0;
  }
}

/* Subject-type chapter leaf — related resource links */
.rbl-subject-leaf-hub .rbl-type-chapter-link-meta {
  font-size: .9rem;
  font-weight: 800;
  color: var(--orange, #f76c1b);
}

/* Shared library list row (default for exhaustive resource listings) */
.rbl-resource-list {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--rbl-border, var(--border, #e5e7eb));
  border-radius: var(--rbl-radius, 8px);
  overflow: hidden;
  background: var(--rbl-white, #fff);
}
.rbl-resource-list--emphasis {
  background: var(--rbl-orange-l, var(--orange-l, #fff3ec));
}
.rbl-resource-list--emphasis .rbl-resource-row {
  background: transparent;
}
.rbl-resource-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--rbl-space-3, 12px);
  min-height: var(--rbl-touch-min, 48px);
  padding: 12px 16px;
  border-left: 3px solid var(--rbl-orange, var(--orange, #f76c1b));
  border-bottom: 1px solid var(--rbl-border, var(--border, #e5e7eb));
  text-decoration: none;
  color: inherit;
  background: var(--rbl-white, #fff);
}
.rbl-resource-row:last-child {
  border-bottom: 0;
}
.rbl-resource-row:hover {
  background: var(--rbl-orange-l, var(--orange-l, #fff3ec));
  color: inherit;
}
.rbl-resource-row:focus-visible {
  background: var(--rbl-orange-l, var(--orange-l, #fff3ec));
  z-index: 1;
}
.rbl-resource-row__body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  flex: 1;
}
.rbl-resource-row__title {
  font-weight: 600;
  font-size: .95rem;
  line-height: 1.4;
  color: var(--rbl-ink, var(--ink, #1f2937));
}
.rbl-resource-row__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0;
  font-size: 13px;
  line-height: 1.35;
  color: var(--rbl-muted, var(--muted, #6b7280));
}
.rbl-resource-row__sep {
  white-space: pre;
}
.rbl-resource-row__meta-item--uploader {
  color: var(--muted);
}
.rbl-resource-row__meta-item--answers {
  color: var(--rbl-success-text, #047857);
  font-weight: 600;
}
.rbl-resource-row__chevron {
  flex-shrink: 0;
  color: var(--rbl-orange, var(--orange, #f76c1b));
  font-weight: 700;
}
@media (max-width: 767.98px) {
  .rbl-resource-row {
    padding: 12px 14px;
  }
  .rbl-resource-row__title {
    font-size: .92rem;
  }
}
