/*
 * Class hub V4 preview — mobile-first and isolated under .rbl-v4.
 * Visual hierarchy comes from spacing, typography and restrained surfaces.
 */
.rbl-v4 {
  --v4-bg: #f7f8fa;
  --v4-surface: #fff;
  --v4-text: #1f2937;
  --v4-muted: #667085;
  --v4-border: #e5e7eb;
  --v4-border-strong: #d6dae1;
  --v4-primary: var(--rbl-cta-fill, #c2410c);
  --v4-primary-hover: var(--rbl-cta-fill-hover, #9a3412);
  --v4-primary-soft: var(--rbl-orange-l, #fff3ec);
  min-height: 100vh;
  padding: 0 0 calc(var(--rbl-bottom-nav-h, 80px) + 24px);
  overflow-x: clip;
  background: var(--v4-bg);
  color: var(--v4-text);
  font-family: var(--rbl-font-body, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif);
  font-size: 16px;
  line-height: 1.5;
}
.rbl-v4-dialog-open { overflow: hidden; }

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

.rbl-v4-container {
  width: 100%;
  max-width: 1248px;
  margin-inline: auto;
  padding: 12px 16px 16px;
}

.rbl-v4-breadcrumb {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 12px;
  overflow-x: auto;
  color: var(--rbl-muted-readable, #4b5563);
  font-size: 13px;
  white-space: nowrap;
  scrollbar-width: none;
}
.rbl-v4-breadcrumb::-webkit-scrollbar { display: none; }
.rbl-v4-breadcrumb a { color: inherit; text-decoration: none; }
.rbl-v4-breadcrumb a:hover { color: var(--v4-primary); }

.rbl-v4-hero {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
}
.rbl-v4-eyebrow,
.rbl-v4-support-kicker {
  margin: 0;
  color: var(--v4-primary);
  font-size: 12px;
  font-weight: 750;
  letter-spacing: .07em;
  text-transform: uppercase;
}
.rbl-v4-hero h1 {
  margin: 3px 0 6px;
  color: var(--v4-text);
  font-family: var(--rbl-font-display, "Outfit", sans-serif);
  font-size: 28px;
  font-weight: 750;
  letter-spacing: -.025em;
  line-height: 1.18;
}
.rbl-v4-lead {
  max-width: 720px;
  margin: 0;
  color: var(--v4-muted);
  font-size: 14px;
  line-height: 1.5;
}
.rbl-v4-library-count {
  margin: 0;
  color: var(--v4-muted);
  font-size: 14px;
}
.rbl-v4-library-count strong {
  color: var(--v4-text);
  font-size: 16px;
  font-weight: 750;
}

.rbl-v4-search {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 50px;
  margin-bottom: 22px;
  padding: 6px 6px 6px 14px;
  border: 1px solid var(--v4-border-strong);
  border-radius: 14px;
  background: var(--v4-surface);
}
.rbl-v4-search:focus-within {
  border-color: var(--v4-primary);
  outline: 3px solid color-mix(in srgb, var(--v4-primary) 14%, transparent);
}
.rbl-v4-search svg {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  fill: none;
  stroke: var(--v4-muted);
  stroke-linecap: round;
  stroke-width: 1.8;
}
.rbl-v4-search input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--v4-text);
  font: inherit;
  font-size: 15px;
}
.rbl-v4-search input::placeholder { color: #6b7280; }
@media (max-width: 899.98px) {
  .rbl-v4-search input {
    font-size: var(--rbl-fs-search, 16px);
  }
}
.rbl-v4-search button {
  width: 44px;
  height: 40px;
  flex: 0 0 44px;
  overflow: hidden;
  border: 0;
  border-radius: 10px;
  background: var(--v4-primary);
  color: transparent;
  cursor: pointer;
  font: inherit;
  font-size: 0;
}
.rbl-v4-search button::before {
  content: "";
  display: block;
  width: 17px;
  height: 17px;
  margin: auto;
  border: 2px solid #fff;
  border-radius: 50%;
}
.rbl-v4-search button::after {
  content: "";
  display: block;
  width: 7px;
  height: 2px;
  margin: -2px 0 0 26px;
  transform: rotate(45deg);
  border-radius: 1px;
  background: #fff;
}

.rbl-v4-section {
  margin-bottom: 26px;
}
.rbl-v4-section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
}
.rbl-v4-section-head h2,
.rbl-v4-results-head h2,
.rbl-v4-support h2,
.rbl-v4-contribute h2 {
  margin: 0;
  color: var(--v4-text);
  font-family: var(--rbl-font-display, "Outfit", sans-serif);
  font-size: 21px;
  font-weight: 750;
  letter-spacing: -.015em;
  line-height: 1.25;
}
.rbl-v4-section-head p,
.rbl-v4-results-head p {
  margin: 4px 0 0;
  color: var(--v4-muted);
  font-size: 14px;
}
.rbl-v4-section-head > a {
  flex: 0 0 auto;
  color: var(--v4-primary);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.rbl-v4-subject-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.rbl-v4-subject-card {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 76px;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--v4-border);
  border-radius: 14px;
  background: var(--v4-surface);
  color: var(--v4-text);
  text-decoration: none;
}
.rbl-v4-subject-card:hover,
.rbl-v4-subject-card:focus-visible {
  border-color: color-mix(in srgb, var(--v4-primary) 45%, var(--v4-border));
  color: var(--v4-text);
}
.rbl-v4-subject-card:focus-visible {
  outline: 2px solid var(--v4-primary);
  outline-offset: 2px;
}
.rbl-v4-subject-card > span:nth-child(2) { min-width: 0; }
.rbl-v4-subject-card strong,
.rbl-v4-subject-card small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rbl-v4-subject-card strong {
  color: var(--v4-text);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
}
.rbl-v4-subject-card small {
  margin-top: 3px;
  color: var(--v4-muted);
  font-size: 12px;
  white-space: nowrap;
}
.rbl-v4-subject-icon {
  display: grid;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  place-items: center;
  border-radius: 12px;
  background: var(--v4-primary-soft);
  color: var(--v4-primary);
}
.rbl-v4-subject-icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}
.rbl-v4-card-arrow {
  display: none;
  width: 18px;
  height: 18px;
  margin-left: auto;
  fill: none;
  stroke: var(--v4-muted);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.rbl-v4-all-subjects {
  margin-top: 8px;
  border-top: 1px solid var(--v4-border);
}
.rbl-v4-all-subjects summary {
  min-height: 44px;
  padding: 11px 0;
  color: var(--v4-primary);
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
}
.rbl-v4-all-subjects > div {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding-bottom: 4px;
}
.rbl-v4-all-subjects a {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--v4-border);
  border-radius: 10px;
  background: var(--v4-surface);
  color: var(--v4-text);
  font-size: 13px;
  text-decoration: none;
}
.rbl-v4-all-subjects .rbl-v4-subject-icon {
  width: 32px;
  height: 32px;
  flex-basis: 32px;
  border-radius: 9px;
}
.rbl-v4-all-subjects .rbl-v4-subject-icon svg {
  width: 18px;
  height: 18px;
}
.rbl-v4-all-subjects-label {
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rbl-v4-all-subjects a small {
  flex: 0 0 auto;
  color: var(--v4-muted);
}

.rbl-v4-type-chips {
  display: flex;
  gap: 8px;
  max-width: 100%;
  padding: 2px 1px 5px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
}
.rbl-v4-type-chips::-webkit-scrollbar { display: none; }
.rbl-v4-type-chips a {
  min-height: 42px;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  padding: 8px 13px;
  scroll-snap-align: start;
  border: 1px solid var(--v4-border);
  border-radius: 999px;
  background: var(--v4-surface);
  color: #344054;
  font-size: 14px;
  font-weight: 650;
  text-decoration: none;
  white-space: nowrap;
}
.rbl-v4-type-chips a.is-active {
  border-color: color-mix(in srgb, var(--v4-primary) 26%, var(--v4-border));
  background: var(--v4-primary-soft);
  color: var(--v4-primary);
}

.rbl-v4-explorer {
  display: block;
  margin-top: 30px;
}
.rbl-v4-filters-desktop { display: none; }
.rbl-v4-results { min-width: 0; }
.rbl-v4-results-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}
.rbl-v4-sort-desktop { display: none; }

.rbl-v4-mobile-tools {
  position: sticky;
  top: calc(var(--rbl-sticky-top, 65px) + 4px);
  z-index: 18;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 0 -4px 12px;
  padding: 6px 4px 8px;
  background: var(--v4-bg);
}
.rbl-v4-mobile-tools form { min-width: 0; }
.rbl-v4-tool-button,
.rbl-v4-tool-select {
  width: 100%;
  height: 44px;
  border: 1px solid var(--v4-border-strong);
  border-radius: 10px;
  background: var(--v4-surface);
  color: var(--v4-text);
  font: inherit;
  font-size: 14px;
  font-weight: 700;
}
.rbl-v4-tool-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  cursor: pointer;
}
.rbl-v4-tool-button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 1.8;
}
.rbl-v4-tool-select {
  padding: 0 9px;
  cursor: pointer;
}

.rbl-v4-active-filters {
  display: flex;
  gap: 7px;
  margin-bottom: 12px;
  padding-bottom: 2px;
  overflow-x: auto;
  scrollbar-width: none;
}
.rbl-v4-active-filters::-webkit-scrollbar { display: none; }
.rbl-v4-active-filters a {
  min-height: 34px;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--v4-primary-soft);
  color: var(--v4-primary);
  font-size: 12px;
  font-weight: 650;
  text-decoration: none;
}
.rbl-v4-active-filters .rbl-v4-clear {
  background: transparent;
  color: var(--v4-muted);
}

.rbl-v4-resource-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
}
.rbl-v4-resource-card {
  display: flex;
  min-width: 0;
  min-height: 164px;
  flex-direction: column;
  padding: 15px;
  border: 1px solid var(--v4-border);
  border-radius: 14px;
  background: var(--v4-surface);
}
.rbl-v4-resource-top {
  display: flex;
  min-height: 27px;
  align-items: start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 9px;
}
.rbl-v4-resource-badge {
  display: inline-flex;
  max-width: 75%;
  min-height: 26px;
  align-items: center;
  padding: 5px 9px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--v4-primary-soft);
  color: var(--v4-primary);
  font-size: 12px;
  font-weight: 750;
  letter-spacing: .025em;
  line-height: 1.2;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}
.rbl-v4-resource-year {
  padding-top: 4px;
  color: #475467;
  font-size: 12px;
  font-weight: 700;
}
.rbl-v4-resource-title {
  display: -webkit-box;
  min-height: 43px;
  margin: 0 0 8px;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  color: var(--v4-text);
  font-family: var(--rbl-font-body, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif);
  font-size: 16px;
  font-weight: 650;
  line-height: 1.36;
}
.rbl-v4-resource-title a {
  color: inherit;
  text-decoration: none;
}
.rbl-v4-resource-title a::after {
  content: "";
  position: absolute;
}
.rbl-v4-resource-meta {
  display: flex;
  min-height: 20px;
  align-items: center;
  gap: 6px;
  margin: 0;
  overflow: hidden;
  color: var(--v4-muted);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rbl-v4-resource-meta span {
  overflow: hidden;
  text-overflow: ellipsis;
}
.rbl-v4-resource-foot {
  display: flex;
  min-height: 39px;
  align-items: end;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--v4-border);
}
.rbl-v4-resource-signal {
  color: var(--v4-muted);
  font-size: 12px;
}
.rbl-v4-resource-signal.has-answers {
  color: #047857;
  font-weight: 650;
}
.rbl-v4-resource-signal.has-answers::before { content: "✓ "; }
.rbl-v4-resource-actions {
  display: flex;
  min-width: 0;
  align-items: end;
  gap: 10px;
}
.rbl-v4-resource-proof {
  display: none;
  color: var(--v4-muted);
  font-size: 12px;
  white-space: nowrap;
}
.rbl-v4-resource-view {
  color: var(--v4-primary);
  font-size: 13px;
  font-weight: 750;
  text-decoration: none;
  white-space: nowrap;
}
.rbl-v4-resource-card:hover {
  border-color: var(--v4-border-strong);
}

.rbl-v4-pagination {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
  margin-top: 22px;
}
.rbl-v4-pagination a,
.rbl-v4-pagination > span,
.rbl-v4-pagination strong {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  color: var(--v4-muted);
  font-size: 13px;
}
.rbl-v4-pagination a {
  color: var(--v4-primary);
  font-weight: 700;
  text-decoration: none;
}
.rbl-v4-pagination a:last-child,
.rbl-v4-pagination > span:last-child { justify-content: end; }
.rbl-v4-pagination strong {
  color: var(--v4-text);
  font-weight: 700;
}

.rbl-v4-empty {
  padding: 28px 20px;
  border: 1px solid var(--v4-border);
  border-radius: 14px;
  background: var(--v4-surface);
  text-align: center;
}
.rbl-v4-empty h3 {
  margin: 0 0 6px;
  font-family: inherit;
  font-size: 18px;
}
.rbl-v4-empty p {
  margin: 0 0 14px;
  color: var(--v4-muted);
}
.rbl-v4-empty a { color: var(--v4-primary); font-weight: 700; }

.rbl-v4-filter-form {
  color: var(--v4-text);
  font-size: 14px;
}
.rbl-v4-filter-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.rbl-v4-filter-heading strong { font-size: 16px; }
.rbl-v4-filter-heading a {
  color: var(--v4-primary);
  font-size: 13px;
  font-weight: 650;
  text-decoration: none;
}
.rbl-v4-filter-form fieldset {
  min-width: 0;
  margin: 0;
  padding: 15px 0;
  border: 0;
  border-top: 1px solid var(--v4-border);
}
.rbl-v4-filter-form legend {
  float: none;
  width: auto;
  margin: 0 0 8px;
  padding: 0;
  color: var(--v4-text);
  font-size: 14px;
  font-weight: 750;
}
.rbl-v4-filter-form label {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  min-height: 36px;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: #344054;
  cursor: pointer;
}
.rbl-v4-filter-form input[type="radio"],
.rbl-v4-filter-form input[type="checkbox"] {
  width: 17px;
  height: 17px;
  margin: 0;
  accent-color: var(--v4-primary);
}
.rbl-v4-filter-form label span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rbl-v4-filter-form label small {
  color: var(--v4-muted);
  font-size: 12px;
}
.rbl-v4-filter-more {
  margin-top: 4px;
}
.rbl-v4-filter-more summary,
.rbl-v4-filter-group > summary {
  display: flex;
  min-height: 38px;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--v4-primary);
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  list-style: none;
}
.rbl-v4-filter-more summary::-webkit-details-marker,
.rbl-v4-filter-group > summary::-webkit-details-marker {
  display: none;
}
.rbl-v4-filter-more summary::after,
.rbl-v4-filter-group > summary::after {
  content: "+";
  width: 20px;
  flex: 0 0 20px;
  color: var(--v4-muted);
  font-size: 18px;
  font-weight: 400;
  text-align: center;
}
.rbl-v4-filter-more[open] summary::after,
.rbl-v4-filter-group[open] > summary::after {
  content: "−";
}
.rbl-v4-filter-more summary small,
.rbl-v4-filter-group > summary small {
  margin-left: auto;
  color: var(--v4-muted);
  font-size: 12px;
  font-weight: 500;
}
.rbl-v4-filter-group {
  padding: 9px 0;
  border-top: 1px solid var(--v4-border);
}
.rbl-v4-filter-group > fieldset {
  padding: 4px 0 2px;
  border-top: 0;
}

.rbl-v4-filter-dialog {
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: var(--v4-surface);
  color: var(--v4-text);
}
.rbl-v4-filter-dialog::backdrop { background: rgba(17, 24, 39, .48); }
.rbl-v4-drawer-head {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  min-height: 60px;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  border-bottom: 1px solid var(--v4-border);
  background: var(--v4-surface);
}
.rbl-v4-drawer-head h2 {
  margin: 0;
  font-family: var(--rbl-font-display, "Outfit", sans-serif);
  font-size: 20px;
}
.rbl-v4-drawer-head button {
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 10px;
  background: var(--v4-bg);
  color: var(--v4-text);
  cursor: pointer;
  font-size: 27px;
  line-height: 1;
}
.rbl-v4-drawer-scroll {
  height: calc(100% - 60px);
  overflow-y: auto;
  padding: 6px 16px 96px;
}
.rbl-v4-drawer-actions {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--v4-border);
  background: var(--v4-surface);
}
.rbl-v4-drawer-actions a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 0 6px;
  color: var(--v4-muted);
  font-size: 14px;
  font-weight: 650;
  text-decoration: none;
}
.rbl-v4-drawer-actions button {
  min-height: 48px;
  border: 0;
  border-radius: 10px;
  background: var(--v4-primary);
  color: #fff;
  font: inherit;
  font-size: 14px;
  font-weight: 750;
}

.rbl-v4-support,
.rbl-v4-faq,
.rbl-v4-contribute {
  margin-top: 40px;
}
.rbl-v4-support {
  padding: 20px;
  border: 1px solid var(--v4-border);
  border-radius: 14px;
  background: var(--v4-surface);
}
.rbl-v4-support h2 { margin-top: 5px; }
.rbl-v4-support-copy {
  margin-top: 10px;
  color: var(--v4-muted);
  font-size: 14px;
  line-height: 1.65;
}
.rbl-v4-support-copy p { margin: 0 0 10px; }
.rbl-v4-support-copy p:last-child { margin-bottom: 0; }
.rbl-v4-support-copy a { color: var(--v4-primary); }

.rbl-v4-faq details {
  border-top: 1px solid var(--v4-border);
}
.rbl-v4-faq details:last-child { border-bottom: 1px solid var(--v4-border); }
.rbl-v4-faq summary {
  display: flex;
  min-height: 54px;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 0;
  color: var(--v4-text);
  cursor: pointer;
  font-size: 15px;
  font-weight: 650;
  list-style: none;
}
.rbl-v4-faq summary::-webkit-details-marker { display: none; }
.rbl-v4-faq summary svg {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  fill: none;
  stroke: var(--v4-muted);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
  transition: transform .15s ease;
}
.rbl-v4-faq details[open] summary svg { transform: rotate(90deg); }
.rbl-v4-faq details > p {
  max-width: 820px;
  margin: -2px 0 16px;
  color: var(--v4-muted);
  font-size: 14px;
  line-height: 1.6;
}

.rbl-v4-contribute {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  padding: 20px;
  border: 1px solid color-mix(in srgb, var(--v4-primary) 24%, var(--v4-border));
  border-radius: 14px;
  background: var(--v4-primary-soft);
}
.rbl-v4-contribute p {
  margin: 5px 0 0;
  color: var(--v4-muted);
  font-size: 14px;
}
.rbl-v4-contribute > a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 9px 14px;
  border-radius: 9px;
  background: var(--v4-primary);
  color: #fff;
  font-size: 14px;
  font-weight: 750;
  text-decoration: none;
}

@media (min-width: 640px) {
  .rbl-v4-resource-proof { display: inline; }
  .rbl-v4-card-arrow { display: block; }
  .rbl-v4-contribute {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

@media (min-width: 768px) {
  .rbl-v4-container { padding-inline: 24px; }
  .rbl-v4-subject-card { padding: 15px; }
  .rbl-v4-all-subjects > div { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 900px) {
  .rbl-v4 {
    padding-bottom: 64px;
  }
  .rbl-v4-container {
    padding-top: 22px;
  }
  .rbl-v4-hero {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 24px;
    margin-bottom: 24px;
  }
  .rbl-v4-hero h1 { font-size: 36px; }
  .rbl-v4-lead { font-size: 16px; }
  .rbl-v4-library-count { text-align: right; }
  .rbl-v4-search {
    max-width: 900px;
    min-height: 58px;
    margin-bottom: 40px;
    padding-left: 18px;
  }
  .rbl-v4-search input { font-size: 16px; }
  .rbl-v4-search button {
    width: auto;
    height: 44px;
    flex-basis: auto;
    padding: 0 20px;
    color: #fff;
    font-size: 14px;
    font-weight: 750;
  }
  .rbl-v4-search button::before,
  .rbl-v4-search button::after { display: none; }
  .rbl-v4-section { margin-bottom: 40px; }
  .rbl-v4-section-head h2,
  .rbl-v4-results-head h2 { font-size: 24px; }
  .rbl-v4-subject-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
  .rbl-v4-subject-card { min-height: 88px; }
  .rbl-v4-subject-card strong { font-size: 15px; }
  .rbl-v4-all-subjects > div { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .rbl-v4-type-chips { flex-wrap: wrap; overflow: visible; }
  .rbl-v4-explorer {
    display: grid;
    grid-template-columns: 250px minmax(0, 1fr);
    gap: 22px;
    align-items: start;
    margin-top: 48px;
  }
  .rbl-v4-filters-desktop {
    position: sticky;
    top: calc(var(--rbl-sticky-top, 65px) + 18px);
    display: block;
    max-height: calc(100vh - var(--rbl-sticky-top, 65px) - 36px);
    padding: 16px;
    overflow-y: auto;
    border: 1px solid var(--v4-border);
    border-radius: 14px;
    background: var(--v4-surface);
  }
  .rbl-v4-mobile-tools { display: none; }
  .rbl-v4-sort-desktop {
    display: flex;
    align-items: center;
    gap: 7px;
    color: var(--v4-muted);
    font-size: 13px;
  }
  .rbl-v4-sort-desktop select {
    min-height: 42px;
    padding: 7px 10px;
    border: 1px solid var(--v4-border-strong);
    border-radius: 10px;
    background: var(--v4-surface);
    color: var(--v4-text);
    font: inherit;
    cursor: pointer;
  }
  .rbl-v4-resource-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
  .rbl-v4-resource-card { min-height: 180px; padding: 16px; }
  .rbl-v4-resource-card:hover {
    transform: translateY(-1px);
    border-color: color-mix(in srgb, var(--v4-primary) 28%, var(--v4-border));
  }
  .rbl-v4-filter-dialog { display: none; }
  .rbl-v4-support { padding: 24px; }
}

@media (min-width: 1200px) {
  .rbl-v4-explorer {
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 28px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .rbl-v4 *,
  .rbl-v4 *::before,
  .rbl-v4 *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
