/* Shared vocabulary presentation; subject tokens retain TOEFL / IELTS palettes. */
body.exam-select-page:is(.exam-select-toefl-page, .exam-select-ielts-page) .qbrowser .qb-sidebar-primary {
  display: flex !important; flex-flow: row nowrap; align-items: center; justify-content: flex-start; gap: 30px; overflow-x: auto; padding-bottom: 5px; grid-template-columns: none;
}
body.exam-select-page:is(.exam-select-toefl-page, .exam-select-ielts-page) .qbrowser .qb-sidebar-primary > .qb-sidebar-section {
  flex: 0 0 auto; min-width: 0; margin: 0;
}
body.exam-select-page:is(.exam-select-toefl-page, .exam-select-ielts-page) .qbrowser .qb-sidebar-primary .qb-sidebar-item-standalone {
  display: inline-flex; flex-direction: row; align-items: center; justify-content: flex-start; gap: 7px; width: auto !important; min-height: 40px; padding: 5px 0 9px; border: 0; border-bottom: 3px solid transparent; border-radius: 0; background: transparent; color: #66788b; box-shadow: none; transform: none;
}
body.exam-select-page:is(.exam-select-toefl-page, .exam-select-ielts-page) .qbrowser .qb-sidebar-primary .qb-sidebar-item-standalone.active {
  border-bottom-color: var(--subject-primary); background: transparent; color: var(--subject-primary); box-shadow: none;
}
body.exam-select-page:is(.exam-select-toefl-page, .exam-select-ielts-page) .qbrowser .qb-sidebar-primary .qb-sidebar-item-standalone::after,
body.exam-select-page:is(.exam-select-toefl-page, .exam-select-ielts-page) .qbrowser .qb-sidebar-caption {
  display: none;
}
body.exam-select-page:is(.exam-select-toefl-page, .exam-select-ielts-page) .qbrowser .qb-sidebar-primary .qb-sidebar-item-main {
  display: inline-flex; align-items: center; gap: 7px; width: auto;
}
body.exam-select-page:is(.exam-select-toefl-page, .exam-select-ielts-page) .qbrowser .qb-sidebar-primary .qb-sidebar-item-main > span:last-child {
  padding: 0; font-size: 15px; line-height: 1.4; text-align: left;
}
body.exam-select-page:is(.exam-select-toefl-page, .exam-select-ielts-page) .qbrowser .qb-sidebar-primary .qb-sidebar-item-standalone .qb-icon {
  position: static; width: 17px; height: 17px; padding: 0; border-radius: 0; background: transparent; color: inherit; transform: none;
}
body.exam-select-page:is(.exam-select-toefl-page, .exam-select-ielts-page) .qbrowser .qb-sidebar-secondary {
  margin-top: 18px; padding: 12px 0;
}
body:is(.exam-select-toefl-page, .exam-select-ielts-page) .qbrowser:has(.vocab-panel) .vocab-panel-title {
  display: flex; align-items: baseline; gap: 4px; font-size: 20px; font-weight: 600;
}
body:is(.exam-select-toefl-page, .exam-select-ielts-page) .qbrowser:has(.vocab-panel) .vocab-panel-title-count {
  font-size: 14px; font-weight: 400; color: #94a3b8;
}
body:is(.exam-select-toefl-page, .exam-select-ielts-page) .qbrowser:has(.vocab-panel) .vu-mode-bar {
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin: 18px 0; padding: 0; background: none; border: 0; overflow: visible;
}
body:is(.exam-select-toefl-page, .exam-select-ielts-page) .qbrowser:has(.vocab-panel) .vu-mode-card,
body:is(.exam-select-toefl-page, .exam-select-ielts-page) .qbrowser:has(.vocab-panel) .vu-mode-card.active {
  display: grid; grid-template-columns: 22px minmax(0, 1fr); grid-template-areas: "icon name" "icon desc"; align-items: center; justify-content: start; gap: 5px 9px; width: 100%; min-width: 0; min-height: 62px; margin: 0; padding: 12px; border: 1px solid #e5e7eb; border-radius: 10px; background: #fff; color: #66788b; text-align: left; box-shadow: none;
}
body:is(.exam-select-toefl-page, .exam-select-ielts-page) .qbrowser:has(.vocab-panel) .vu-mode-card.active {
  border-color: rgba(var(--subject-primary-rgb), .6); background: linear-gradient(180deg, rgba(var(--subject-primary-rgb), .10), #fff); color: var(--subject-primary); box-shadow: 0 0 0 3px rgba(var(--subject-primary-rgb), .13);
}
body:is(.exam-select-toefl-page, .exam-select-ielts-page) .qbrowser:has(.vocab-panel) .vu-mode-card.active::after {
  display: none;
}
body:is(.exam-select-toefl-page, .exam-select-ielts-page) .qbrowser:has(.vocab-panel) .vu-mode-icon {
  grid-area: icon; width: 22px; font-size: 17px; text-align: center;
}
body:is(.exam-select-toefl-page, .exam-select-ielts-page) .qbrowser:has(.vocab-panel) .vu-mode-name {
  grid-area: name; min-width: 0; font-size: 14px; font-weight: 600; line-height: 1.3; color: inherit;
}
body:is(.exam-select-toefl-page, .exam-select-ielts-page) .qbrowser:has(.vocab-panel) .vu-mode-desc,
body:is(.exam-select-toefl-page, .exam-select-ielts-page) .qbrowser:has(.vocab-panel) .vu-mode-card.active .vu-mode-desc {
  grid-area: desc; display: block; visibility: visible; min-width: 0; max-width: none; font-size: 10px; line-height: 1.4; color: #7a8795; text-align: left; white-space: normal;
}
body:is(.exam-select-toefl-page, .exam-select-ielts-page) .qbrowser:has(.vocab-panel) .vu-mode-card:hover {
  border-color: rgba(var(--subject-primary-rgb), .5);
}
@media (max-width: 900px) {
body:is(.exam-select-toefl-page, .exam-select-ielts-page) .qbrowser:has(.vocab-panel) .vu-mode-bar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
body.exam-select-page:is(.exam-select-toefl-page, .exam-select-ielts-page) .qbrowser .qb-sidebar-primary { gap: 22px; }
}

.subject-vocab-browser-title { display: none; }
body:is(.exam-select-toefl-page, .exam-select-ielts-page) .qbrowser > .subject-vocab-browser-title {
  display: block; margin: 24px 28px 0; padding-left: 24px; position: relative; font-size: 20px; line-height: 1.4; color: #303746;
}
.subject-vocab-browser-title::before { content: ""; position: absolute; left: 0; top: 0; width: 24px; height: 28px; background: var(--exam-mark-url) center / contain no-repeat; }

/* Override legacy per-category font sizes for both selection states. */
body.exam-select-page:is(.exam-select-toefl-page, .exam-select-ielts-page) .qbrowser .qb-sidebar-primary .qb-sidebar-item-standalone .qb-sidebar-item-main > span:last-child,
body.exam-select-page:is(.exam-select-toefl-page, .exam-select-ielts-page) .qbrowser .qb-sidebar-primary .qb-sidebar-item-standalone.active .qb-sidebar-item-main > span:last-child {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
}
