/* KipSlide / KSDS — точковий адаптер для обраних каталогів.
 * Скоповано на body[data-page]: /courses та інші сторінки не змінюються.
 * Палітра лише Light / Ivory / Dark (Exo 2 + Onest), без фіолету й неону.
 */

body[data-page="teacher.educational-process"],
body[data-page="teacher.methodical-work"],
body[data-page="education.library"],
body[data-page="data-hub.sources"] {
  --cv-ink: var(--ksds-color-text-primary);
  --cv-mu: var(--ksds-color-text-secondary);
  --cv-blue: var(--ksds-color-accent);
  --cv-focus: var(--ksds-color-focus-ring);
  --cv-line: var(--ksds-color-border-subtle);
  --cv-cover-accent: var(--ksds-color-border-default);
  --cv-cover-base: var(--ksds-color-surface-elevated);
  --cv-action-start: var(--ksds-color-primary-hover);
  --cv-action-end: var(--ksds-color-primary);
  --cv-action-ink: var(--ksds-color-on-primary);
  --cv-catalog-panel: linear-gradient(145deg, var(--ksds-color-surface-elevated), var(--ksds-color-surface-muted));
  --cv-section-gap: clamp(24px, 2.7vw, 34px);
}

body[data-page="teacher.educational-process"] main,
body[data-page="teacher.methodical-work"] main,
body[data-page="education.library"] main,
body[data-page="data-hub.sources"] main {
  width: min(1160px, 100% - 40px) !important;
  max-width: 1160px !important;
  margin: 0 auto;
  padding: 0 0 48px !important;
  color: var(--cv-ink);
  font: 400 16px/1.6 var(--cv-fb);
}

body[data-page="teacher.educational-process"] main :is(h1, h2, h3, h4),
body[data-page="teacher.methodical-work"] main :is(h1, h2, h3, h4),
body[data-page="education.library"] main :is(h1, h2, h3, h4),
body[data-page="data-hub.sources"] main :is(h1, h2, h3, h4) {
  color: var(--cv-ink);
  font-family: "Exo 2", Montserrat, sans-serif;
  letter-spacing: 0;
}

/* Спільний старт каталогів — той самий hero,_search і напрями, що й на /courses. */
body[data-page="teacher.educational-process"] .cv-feature,
body[data-page="teacher.methodical-work"] .cv-feature,
body[data-page="education.library"] .cv-feature,
body[data-page="data-hub.sources"] .cv-feature {
  min-height: clamp(300px, 34vw, 430px);
  margin: 12px 0 20px;
  padding: clamp(20px, 4vw, 48px);
  border: 0 !important;
  border-radius: 32px !important;
  background: var(--cv-catalog-panel) !important;
  box-shadow: none !important;
  align-content: end;
}

body[data-page="teacher.educational-process"] .cv-feature__visual::after,
body[data-page="teacher.methodical-work"] .cv-feature__visual::after,
body[data-page="education.library"] .cv-feature__visual::after,
body[data-page="data-hub.sources"] .cv-feature__visual::after {
  background:
    linear-gradient(90deg, rgb(0 0 0 / .8), rgb(0 0 0 / .32)),
    linear-gradient(0deg, rgb(0 0 0 / .6), transparent);
}

body[data-page="teacher.educational-process"] .cv-feature__visual :is(img, video),
body[data-page="teacher.methodical-work"] .cv-feature__visual :is(img, video),
body[data-page="education.library"] .cv-feature__visual :is(img, video),
body[data-page="data-hub.sources"] .cv-feature__visual :is(img, video) {
  border-radius: inherit;
}

body[data-page="teacher.educational-process"] .catalog-hero-play,
body[data-page="teacher.methodical-work"] .catalog-hero-play,
body[data-page="education.library"] .catalog-hero-play,
body[data-page="data-hub.sources"] .catalog-hero-play {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px;
  align-items: start;
}

body[data-page="teacher.educational-process"] .sbox.courses-search-box,
body[data-page="teacher.methodical-work"] .sbox.courses-search-box,
body[data-page="education.library"] .sbox.courses-search-box,
body[data-page="data-hub.sources"] .sbox.courses-search-box {
  padding: 16px;
  border: 1px solid var(--cv-line);
  border-radius: 20px;
  background: var(--cv-catalog-panel) !important;
  box-shadow: none !important;
}

body[data-page="teacher.educational-process"] .courses-search-row,
body[data-page="teacher.methodical-work"] .courses-search-row,
body[data-page="education.library"] .courses-search-row,
body[data-page="data-hub.sources"] .courses-search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  background: none !important;
}

body[data-page="teacher.educational-process"] .courses-search-row label,
body[data-page="teacher.methodical-work"] .courses-search-row label,
body[data-page="education.library"] .courses-search-row label,
body[data-page="data-hub.sources"] .courses-search-row label {
  display: flex;
  align-items: center;
  min-width: 0;
  padding: 0 12px;
  border-radius: 14px;
  background: var(--ksds-color-surface-muted) !important;
  box-shadow: none !important;
  color: var(--cv-ink);
}

body[data-page="teacher.educational-process"] .courses-search-row input,
body[data-page="teacher.methodical-work"] .courses-search-row input,
body[data-page="education.library"] .courses-search-row input,
body[data-page="data-hub.sources"] .courses-search-row input {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--cv-ink);
  font: 500 15px/1.4 var(--cv-fb);
}

body[data-page="teacher.educational-process"] .courses-search-row input::placeholder,
body[data-page="teacher.methodical-work"] .courses-search-row input::placeholder,
body[data-page="education.library"] .courses-search-row input::placeholder,
body[data-page="data-hub.sources"] .courses-search-row input::placeholder {
  color: var(--cv-mu);
}

body[data-page="teacher.educational-process"] .cv-search-glyph,
body[data-page="teacher.methodical-work"] .cv-search-glyph,
body[data-page="education.library"] .cv-search-glyph,
body[data-page="data-hub.sources"] .cv-search-glyph {
  display: none;
}

body[data-page="teacher.educational-process"] .cv-search-submit,
body[data-page="teacher.methodical-work"] .cv-search-submit,
body[data-page="education.library"] .cv-search-submit,
body[data-page="data-hub.sources"] .cv-search-submit {
  display: inline-flex !important;
  align-items: center;
  gap: 8px;
}

body[data-page="teacher.educational-process"] .courses-search-row .nb.main,
body[data-page="teacher.methodical-work"] .courses-search-row .nb.main,
body[data-page="education.library"] .courses-search-row .nb.main,
body[data-page="data-hub.sources"] .courses-search-row .nb.main {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 16px;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--cv-action-start), var(--cv-action-end)) !important;
  box-shadow: none;
  color: var(--cv-action-ink);
  font: 700 14px/1.3 var(--cv-fb);
}

body[data-page="teacher.educational-process"] .cv-direction-section,
body[data-page="teacher.methodical-work"] .cv-direction-section,
body[data-page="education.library"] .cv-direction-section,
body[data-page="data-hub.sources"] .cv-direction-section {
  min-width: 0;
}

body[data-page="teacher.educational-process"] .cv-direction-section h2.t,
body[data-page="teacher.methodical-work"] .cv-direction-section h2.t,
body[data-page="education.library"] .cv-direction-section h2.t,
body[data-page="data-hub.sources"] .cv-direction-section h2.t {
  margin: 0 0 12px;
  font: 700 clamp(22px, 2.6vw, 30px)/1.2 "Exo 2", Montserrat, sans-serif;
}

body[data-page="teacher.educational-process"] .cv-direction-grid,
body[data-page="teacher.methodical-work"] .cv-direction-grid,
body[data-page="education.library"] .cv-direction-grid,
body[data-page="data-hub.sources"] .cv-direction-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 128px), 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

body[data-page="teacher.educational-process"] .cv-direction-grid li,
body[data-page="teacher.methodical-work"] .cv-direction-grid li,
body[data-page="education.library"] .cv-direction-grid li,
body[data-page="data-hub.sources"] .cv-direction-grid li {
  min-width: 0;
}

body[data-page="teacher.educational-process"] .cv-direction-grid a,
body[data-page="teacher.methodical-work"] .cv-direction-grid a,
body[data-page="education.library"] .cv-direction-grid a,
body[data-page="data-hub.sources"] .cv-direction-grid a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 76px;
  height: 100%;
  padding: 12px 8px;
  border: 1px solid var(--cv-line);
  border-radius: 16px;
  background:
    radial-gradient(ellipse at 45% 0%, color-mix(in srgb, var(--cv-blue) 18%, transparent), transparent 85%),
    var(--cv-catalog-panel);
  box-shadow: none;
  color: var(--cv-ink);
  text-align: center;
  font: 600 14px/1.25 var(--cv-fb);
  text-decoration: none;
  overflow-wrap: anywhere;
}

body[data-page="teacher.educational-process"] .cv-direction-grid a:hover,
body[data-page="teacher.methodical-work"] .cv-direction-grid a:hover,
body[data-page="education.library"] .cv-direction-grid a:hover,
body[data-page="data-hub.sources"] .cv-direction-grid a:hover {
  border-color: var(--cv-blue);
  text-decoration: none;
}

body[data-page="teacher.educational-process"] .cv-direction-grid a[aria-current="true"],
body[data-page="teacher.methodical-work"] .cv-direction-grid a[aria-current="true"],
body[data-page="education.library"] .cv-direction-grid a[aria-current="true"],
body[data-page="data-hub.sources"] .cv-direction-grid a[aria-current="true"] {
  border-color: transparent;
  background: linear-gradient(135deg, var(--cv-action-start), var(--cv-action-end));
  color: var(--cv-action-ink);
}

body[data-page="teacher.educational-process"] .cv-direction-grid i,
body[data-page="teacher.methodical-work"] .cv-direction-grid i,
body[data-page="education.library"] .cv-direction-grid i,
body[data-page="data-hub.sources"] .cv-direction-grid i {
  font-size: 1.35rem;
}

body[data-page="teacher.educational-process"] :is(a, button, input, select, summary):focus-visible,
body[data-page="teacher.methodical-work"] :is(a, button, input, select, summary):focus-visible,
body[data-page="education.library"] :is(a, button, input, select, summary):focus-visible,
body[data-page="data-hub.sources"] :is(a, button, input, select, summary):focus-visible {
  outline: 2px solid var(--cv-focus, var(--cv-blue));
  outline-offset: 2px;
}

/* ---------------- /teacher/educational-process ---------------- */
body[data-page="teacher.educational-process"] .teacher-section-page {
  padding-top: 0;
  padding-bottom: 0;
  color: var(--cv-ink);
}

body[data-page="teacher.educational-process"] .library-catalog-heading {
  margin: 0 0 12px;
  padding: 0;
}

body[data-page="teacher.educational-process"] .library-catalog-heading h1 {
  margin: 0;
  padding: 0;
  background: none !important;
  font: 700 clamp(28px, 3.2vw, 38px)/1.15 "Exo 2", Montserrat, sans-serif;
}

body[data-page="teacher.educational-process"] :is(.library-results, .teacher-unified-intro, .teacher-catalog-result-count) {
  color: var(--cv-mu);
  font: 500 14px/1.5 var(--cv-fb);
}

body[data-page="teacher.educational-process"] .teacher-unified-intro {
  max-width: 900px;
  margin: 0 0 20px;
  font-size: 15px;
}

body[data-page="teacher.educational-process"] .teacher-eyebrow {
  color: var(--cv-mu);
  font: 600 13px/1.3 var(--cv-fb);
  letter-spacing: 0;
}

body[data-page="teacher.educational-process"] .teacher-topics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr));
  gap: 12px;
  margin: 0 0 20px;
  padding: 0;
}

body[data-page="teacher.educational-process"] .teacher-topics a {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 6px;
  min-height: 86px;
  padding: 14px;
  border: 1px solid var(--cv-line);
  border-radius: 16px;
  background:
    radial-gradient(ellipse at 20% 0%, color-mix(in srgb, var(--cv-blue) 18%, transparent), transparent 85%),
    var(--cv-catalog-panel);
  box-shadow: none;
  color: var(--cv-ink);
  font: 600 15px/1.35 var(--cv-fb);
  transition: border-color .2s, transform .2s;
}

body[data-page="teacher.educational-process"] .teacher-topics a:hover {
  border-color: var(--cv-blue);
  transform: translateY(-2px);
  text-decoration: none;
}

body[data-page="teacher.educational-process"] .teacher-topics a i {
  color: var(--cv-blue);
  font-size: 1.2rem;
}

body[data-page="teacher.educational-process"] .teacher-unified-search--catalog {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 8px;
  margin: 0 0 20px;
  padding: 16px;
  border: 1px solid var(--cv-line) !important;
  border-radius: 20px !important;
  background: var(--cv-catalog-panel) !important;
  box-shadow: none !important;
}

body[data-page="teacher.educational-process"] .teacher-unified-search--catalog .teacher-unified-search__field {
  min-width: 0;
}

body[data-page="teacher.educational-process"] .teacher-unified-search--catalog label {
  display: block;
  margin-bottom: 6px;
  color: var(--cv-mu);
  font: 600 13px/1.3 var(--cv-fb);
}

body[data-page="teacher.educational-process"] .teacher-unified-search--catalog .teacher-unified-search__control {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 12px;
  border-radius: 14px;
  background: var(--ksds-color-surface-muted);
  box-shadow: none;
}

body[data-page="teacher.educational-process"] .teacher-unified-search--catalog .teacher-unified-search__control i {
  flex: 0 0 auto;
  color: var(--cv-mu);
}

body[data-page="teacher.educational-process"] .teacher-unified-search--catalog input {
  width: 100%;
  min-width: 0;
  min-height: 42px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  color: var(--cv-ink);
  font: 500 14px/1.4 var(--cv-fb);
}

body[data-page="teacher.educational-process"] .teacher-unified-search--catalog input::placeholder {
  color: var(--cv-mu);
}

body[data-page="teacher.educational-process"] .teacher-unified-search--catalog .library-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--cv-action-start), var(--cv-action-end)) !important;
  box-shadow: none;
  color: var(--cv-action-ink) !important;
  font: 700 14px/1.3 var(--cv-fb);
}

body[data-page="teacher.educational-process"] .teacher-catalog-layout {
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 20px;
  align-items: start;
}

body[data-page="teacher.educational-process"] .teacher-catalog-main {
  min-width: 0;
}

body[data-page="teacher.educational-process"] .teacher-catalog-section-heading {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin: 0 0 14px;
}

body[data-page="teacher.educational-process"] .teacher-catalog-section-heading h2 {
  margin: 0;
  font: 700 clamp(22px, 2.6vw, 30px)/1.2 "Exo 2", Montserrat, sans-serif;
}

body[data-page="teacher.educational-process"] .teacher-catalog-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

body[data-page="teacher.educational-process"] .teacher-catalog-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  min-height: 0;
  padding: 16px;
  border: 0 !important;
  border-radius: 20px !important;
  background: var(--cv-catalog-panel) !important;
  box-shadow: none !important;
  color: var(--cv-ink);
  font-family: var(--cv-fb);
  transition: border-color .2s, transform .2s, box-shadow .2s;
}

body[data-page="teacher.educational-process"] .teacher-catalog-card:hover {
  transform: translateY(-3px);
  border-color: var(--cv-blue) !important;
  box-shadow: 0 10px 24px rgb(20 46 61 / .08) !important;
}

body[data-page="teacher.educational-process"] .teacher-catalog-card-top {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  margin: 0;
}

body[data-page="teacher.educational-process"] .teacher-catalog-file-icon {
  display: grid;
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  place-items: center;
  border: 0;
  border-radius: 14px;
  background: var(--ksds-color-surface-muted);
  box-shadow: none;
  color: var(--cv-blue);
  font-size: 22px;
}

body[data-page="teacher.educational-process"] .teacher-catalog-card-label {
  max-width: 100%;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--ksds-color-surface-muted);
  box-shadow: none;
  color: var(--cv-ink);
  font: 600 12px/1.3 var(--cv-fb);
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

body[data-page="teacher.educational-process"] .teacher-catalog-card h3 {
  margin: 0;
  font: 700 18px/1.3 "Exo 2", Montserrat, sans-serif;
  overflow-wrap: anywhere;
}

body[data-page="teacher.educational-process"] .teacher-catalog-card h3 a {
  color: var(--cv-ink);
  text-decoration: none;
}

body[data-page="teacher.educational-process"] .teacher-catalog-card h3 a:hover {
  color: var(--cv-blue);
  text-decoration: underline;
  text-underline-offset: 4px;
}

body[data-page="teacher.educational-process"] .teacher-catalog-card p {
  margin: 0;
  color: var(--cv-mu);
  font: 400 14px/1.5 var(--cv-fb);
}

body[data-page="teacher.educational-process"] .teacher-catalog-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid var(--cv-line);
  color: var(--cv-mu);
  font: 600 12px/1.4 var(--cv-fb);
}

body[data-page="teacher.educational-process"] .teacher-catalog-card-link {
  margin-top: 4px;
  padding: 8px 12px;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--cv-action-start), var(--cv-action-end));
  box-shadow: none;
  color: var(--cv-action-ink);
  font: 700 13px/1.3 var(--cv-fb);
}

body[data-page="teacher.educational-process"] :is(.teacher-catalog-sidebar-panel, .teacher-catalog-sidebar-note, .teacher-catalog-resource, .teacher-empty) {
  padding: 16px;
  border: 1px solid var(--cv-line);
  border-radius: 20px;
  background: var(--cv-catalog-panel);
  box-shadow: none;
}

body[data-page="teacher.educational-process"] :is(.teacher-catalog-sidebar-panel, .teacher-catalog-sidebar-note, .teacher-catalog-resource, .teacher-empty) h2 {
  font: 700 16px/1.35 "Exo 2", Montserrat, sans-serif;
}

body[data-page="teacher.educational-process"] .teacher-catalog-side-nav a {
  border-radius: 12px;
  color: var(--cv-ink);
  font: 600 14px/1.4 var(--cv-fb);
}

body[data-page="teacher.educational-process"] .teacher-catalog-side-nav a.is-current {
  background: linear-gradient(135deg, var(--cv-action-start), var(--cv-action-end));
  box-shadow: none;
  color: var(--cv-action-ink);
}

body[data-page="teacher.educational-process"] :is(.teacher-catalog-sidebar-note p, .teacher-catalog-resource p, .teacher-catalog-resource > span, .teacher-empty p) {
  color: var(--cv-mu);
  font: 400 13px/1.55 var(--cv-fb);
}

body[data-page="teacher.educational-process"] .teacher-catalog-resource-list {
  display: grid;
  gap: 10px;
}

body[data-page="teacher.educational-process"] .teacher-catalog-resources {
  margin-top: var(--cv-section-gap);
  padding-top: var(--ksds-space-6, 24px);
  border-top: 1px solid var(--cv-line);
}

body[data-page="teacher.educational-process"] .teacher-catalog-resource {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

body[data-page="teacher.educational-process"] .teacher-catalog-resource h3 {
  margin: 0 0 6px;
  font: 700 16px/1.35 "Exo 2", Montserrat, sans-serif;
}

body[data-page="teacher.educational-process"] .teacher-catalog-resource h3 a {
  color: var(--cv-ink);
  text-decoration: none;
}

body[data-page="teacher.educational-process"] .teacher-catalog-all-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 12px;
  background: var(--ksds-color-surface-muted);
  color: var(--cv-blue);
  font: 600 14px/1.3 var(--cv-fb);
  text-decoration: none;
}

body[data-page="teacher.educational-process"] .library-active-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  align-items: center;
  padding: 10px 14px;
  border-radius: 14px;
  background: var(--ksds-color-surface-muted);
  color: var(--cv-mu);
  font: 500 13px/1.4 var(--cv-fb);
}

body[data-page="teacher.educational-process"] .library-active-filters .library-link {
  color: var(--cv-blue);
  font-weight: 700;
}

/* ---------------- /teacher/methodical-work ---------------- */
body[data-page="teacher.methodical-work"] .teacher-methodical-page {
  color: var(--cv-ink);
}

body[data-page="teacher.methodical-work"] .teacher-methodical-hero {
  min-height: clamp(300px, 34vw, 430px);
  margin: 12px 0 20px;
  padding: clamp(20px, 4vw, 48px);
  border: 0 !important;
  border-radius: 32px !important;
  background: var(--cv-catalog-panel) !important;
  box-shadow: none !important;
  align-content: center;
}

body[data-page="teacher.methodical-work"] .teacher-methodical-hero h1 {
  margin: 0;
  font: 500 clamp(28px, 3.2vw, 42px)/1.15 "Exo 2", Montserrat, sans-serif;
  letter-spacing: -.01em;
}

body[data-page="teacher.methodical-work"] .teacher-methodical-hero h1 span {
  color: var(--cv-ink);
  opacity: 1;
  transform: none;
  animation: none;
}

body[data-page="teacher.methodical-work"] .teacher-methodical-hero__rule {
  width: 64px;
  height: 4px;
  margin: 16px 0;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--cv-action-start), var(--cv-action-end));
  animation: none;
}

body[data-page="teacher.methodical-work"] .teacher-methodical-hero__copy > p {
  color: var(--cv-mu);
  font: 400 15px/1.65 var(--cv-fb);
}

body[data-page="teacher.methodical-work"] .teacher-eyebrow {
  color: var(--cv-mu);
  font: 600 13px/1.3 var(--cv-fb);
  letter-spacing: 0;
}

body[data-page="teacher.methodical-work"] .teacher-methodical-doc {
  border: 1px solid var(--cv-blue);
  background: var(--cv-catalog-panel);
  box-shadow: none;
}

body[data-page="teacher.methodical-work"] .teacher-methodical-doc::before {
  background: var(--cv-blue);
}

body[data-page="teacher.methodical-work"] .teacher-methodical-doc::after {
  box-shadow: 0 15px 0 var(--cv-line), 0 30px 0 var(--cv-line);
}

body[data-page="teacher.methodical-work"] .teacher-methodical-doc:nth-child(1) {
  background: linear-gradient(145deg, var(--ksds-color-surface-elevated), var(--ksds-color-surface-muted));
}

body[data-page="teacher.methodical-work"] .teacher-methodical-doc:nth-child(3) > i {
  background: var(--cv-blue);
}

body[data-page="teacher.methodical-work"] .teacher-methodical-directions {
  margin: var(--cv-section-gap) 0 22px;
}

body[data-page="teacher.methodical-work"] .teacher-methodical-directions__grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
}

body[data-page="teacher.methodical-work"] .teacher-methodical-directions__grid > a {
  min-height: 132px;
  padding: 16px;
  border: 0 !important;
  border-radius: 20px !important;
  background: var(--cv-catalog-panel) !important;
  box-shadow: none !important;
  color: var(--cv-ink);
}

body[data-page="teacher.methodical-work"] .teacher-methodical-directions__grid > a:nth-child(4n + 1),
body[data-page="teacher.methodical-work"] .teacher-methodical-directions__grid > a:nth-child(4n + 2),
body[data-page="teacher.methodical-work"] .teacher-methodical-directions__grid > a:nth-child(4n + 3),
body[data-page="teacher.methodical-work"] .teacher-methodical-directions__grid > a:nth-child(4n) {
  --direction-accent: var(--cv-blue);
}

body[data-page="teacher.methodical-work"] .teacher-methodical-directions__grid > a:nth-child(4n + 2) {
  --direction-accent: var(--ksds-color-secondary);
}

body[data-page="teacher.methodical-work"] .teacher-methodical-directions__grid > a:nth-child(4n + 4) {
  --direction-accent: var(--cv-action-start);
}

body[data-page="teacher.methodical-work"] .teacher-methodical-directions__grid > a > i {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--ksds-color-surface-muted);
  color: var(--direction-accent);
  font-size: 22px;
}

body[data-page="teacher.methodical-work"] .teacher-methodical-directions__grid strong {
  font: 700 16px/1.35 "Exo 2", Montserrat, sans-serif;
}

body[data-page="teacher.methodical-work"] .teacher-methodical-directions__grid small {
  color: var(--cv-mu);
  font: 400 13px/1.5 var(--cv-fb);
}

body[data-page="teacher.methodical-work"] .teacher-methodical-direction-arrow {
  top: 14px;
  right: 14px;
  opacity: 1;
  transform: none;
  color: var(--direction-accent);
}

body[data-page="teacher.methodical-work"] .teacher-unified-search--catalog {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 8px;
  margin: 0 0 20px;
  padding: 16px;
  border: 1px solid var(--cv-line) !important;
  border-radius: 20px !important;
  background: var(--cv-catalog-panel) !important;
  box-shadow: none !important;
}

body[data-page="teacher.methodical-work"] .teacher-unified-search--catalog .teacher-unified-search__field {
  min-width: 0;
}

body[data-page="teacher.methodical-work"] .teacher-unified-search--catalog label {
  display: block;
  margin-bottom: 6px;
  color: var(--cv-mu);
  font: 600 13px/1.3 var(--cv-fb);
}

body[data-page="teacher.methodical-work"] .teacher-unified-search--catalog .teacher-unified-search__control {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 12px;
  border-radius: 14px;
  background: var(--ksds-color-surface-muted);
  box-shadow: none;
}

body[data-page="teacher.methodical-work"] .teacher-unified-search--catalog .teacher-unified-search__control i {
  color: var(--cv-mu);
}

body[data-page="teacher.methodical-work"] .teacher-unified-search--catalog input {
  width: 100%;
  min-width: 0;
  min-height: 42px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  color: var(--cv-ink);
  font: 500 14px/1.4 var(--cv-fb);
}

body[data-page="teacher.methodical-work"] .teacher-unified-search--catalog input::placeholder {
  color: var(--cv-mu);
}

body[data-page="teacher.methodical-work"] .teacher-unified-search--catalog .library-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--cv-action-start), var(--cv-action-end)) !important;
  box-shadow: none;
  color: var(--cv-action-ink) !important;
  font: 700 14px/1.3 var(--cv-fb);
}

body[data-page="teacher.methodical-work"] :is(.teacher-methodical-section-heading h2, .teacher-methodical-cta h2) {
  font: 700 clamp(22px, 2.6vw, 30px)/1.2 "Exo 2", Montserrat, sans-serif;
}

body[data-page="teacher.methodical-work"] :is(.teacher-methodical-section-heading > p, .teacher-methodical-cta p) {
  color: var(--cv-mu);
  font: 400 14px/1.55 var(--cv-fb);
}

body[data-page="teacher.methodical-work"] :is(.teacher-methodical-panel, .teacher-methodical-phase-panel, .teacher-methodical-cta) {
  border: 0;
  border-radius: 20px;
  background: var(--cv-catalog-panel);
  box-shadow: none;
}

body[data-page="teacher.methodical-work"] .teacher-methodical-phases > button {
  color: var(--cv-ink);
}

body[data-page="teacher.methodical-work"] .teacher-methodical-phase-icon {
  border-color: var(--cv-line);
  background: var(--ksds-color-surface-muted);
  color: var(--cv-mu);
}

body[data-page="teacher.methodical-work"] .teacher-methodical-phases > button[aria-selected="true"] .teacher-methodical-phase-icon {
  border-color: var(--cv-action-start);
  background: linear-gradient(135deg, var(--cv-action-start), var(--cv-action-end));
  box-shadow: none;
  color: var(--cv-action-ink);
}

body[data-page="teacher.methodical-work"] .teacher-methodical-phase-panel h3 {
  color: var(--cv-ink);
  font: 700 18px/1.3 "Exo 2", Montserrat, sans-serif;
}

body[data-page="teacher.methodical-work"] .teacher-methodical-phase-panel li {
  border: 0;
  border-radius: 14px;
  background: var(--ksds-color-surface-muted);
  color: var(--cv-ink);
  font: 500 13px/1.5 var(--cv-fb);
}

body[data-page="teacher.methodical-work"] .teacher-methodical-cycle-controls {
  color: var(--cv-mu);
  font: 500 12px/1.4 var(--cv-fb);
}

body[data-page="teacher.methodical-work"] .teacher-methodical-cycle-controls button {
  border: 1px solid var(--cv-line);
  border-radius: 12px;
  background: var(--ksds-color-surface-muted);
  color: var(--cv-ink);
  font: 600 12px/1.3 var(--cv-fb);
}

body[data-page="teacher.methodical-work"] .teacher-methodical-quality legend {
  color: var(--cv-ink);
  font: 700 16px/1.3 "Exo 2", Montserrat, sans-serif;
}

body[data-page="teacher.methodical-work"] .teacher-methodical-quality fieldset label {
  border: 1px solid var(--cv-line);
  border-radius: 14px;
  background: var(--ksds-color-surface-muted);
  color: var(--cv-ink);
  font: 500 13px/1.5 var(--cv-fb);
}

body[data-page="teacher.methodical-work"] .teacher-methodical-quality fieldset input:checked + span {
  border-color: var(--cv-action-start);
  background: var(--cv-action-start);
}

body[data-page="teacher.methodical-work"] .teacher-methodical-quality-ring__value {
  stroke: var(--cv-blue);
}

body[data-page="teacher.methodical-work"] .teacher-methodical-quality-ring strong {
  color: var(--cv-ink);
  font-family: "Exo 2", Montserrat, sans-serif;
}

body[data-page="teacher.methodical-work"] .teacher-methodical-quality-score > p {
  color: var(--cv-mu);
  font: 500 12px/1.5 var(--cv-fb);
}

body[data-page="teacher.methodical-work"] .teacher-methodical-outline li {
  border-left-color: var(--cv-blue);
  border-radius: 16px;
  background: var(--cv-catalog-panel);
}

body[data-page="teacher.methodical-work"] .teacher-methodical-outline li > span {
  color: var(--cv-blue);
}

body[data-page="teacher.methodical-work"] .teacher-methodical-outline li strong {
  color: var(--cv-ink);
  font: 700 14px/1.35 "Exo 2", Montserrat, sans-serif;
}

body[data-page="teacher.methodical-work"] .teacher-methodical-outline li small {
  color: var(--cv-mu);
  font: 400 12px/1.5 var(--cv-fb);
}

body[data-page="teacher.methodical-work"] .teacher-methodical-cta > a {
  border: 0;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--cv-action-start), var(--cv-action-end));
  color: var(--cv-action-ink);
  font: 700 14px/1.3 var(--cv-fb);
}

/* ---------------- /education/library ---------------- */
body[data-page="education.library"] .cv-crumbs,
body[data-page="data-hub.sources"] .cv-crumbs {
  color: var(--cv-mu);
  font: 500 13px/1.4 var(--cv-fb);
}

body[data-page="education.library"] .cv-crumbs a,
body[data-page="data-hub.sources"] .cv-crumbs a {
  color: var(--cv-mu);
  text-decoration: none;
}

body[data-page="education.library"] .cv-crumbs a:hover,
body[data-page="data-hub.sources"] .cv-crumbs a:hover {
  color: var(--cv-blue);
}

body[data-page="education.library"] .hub-catalog-filters {
  margin: 0 0 20px;
  padding: 20px;
  border: 0 !important;
  border-radius: 20px !important;
  background: var(--cv-catalog-panel) !important;
  box-shadow: none !important;
}

body[data-page="education.library"] .hub-catalog-filters .form-label {
  color: var(--cv-mu);
  font: 600 13px/1.3 var(--cv-fb);
}

body[data-page="education.library"] .hub-catalog-filters :is(.form-control, .form-select) {
  min-height: 44px;
  border: 0 !important;
  border-radius: 14px !important;
  background: var(--ksds-color-surface-muted) !important;
  box-shadow: none !important;
  color: var(--cv-ink) !important;
  font: 500 14px/1.4 var(--cv-fb) !important;
}

body[data-page="education.library"] .hub-catalog-filters :is(.form-control, .form-select)::placeholder {
  color: var(--cv-mu);
}

body[data-page="education.library"] .hub-catalog-filters .btn-primary {
  border: 0;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--cv-action-start), var(--cv-action-end)) !important;
  box-shadow: none;
  color: var(--cv-action-ink) !important;
  font: 700 14px/1.3 var(--cv-fb);
}

body[data-page="education.library"] .hub-catalog-filters .btn-outline-secondary {
  border: 1px solid var(--cv-line) !important;
  border-radius: 14px;
  background: var(--ksds-color-surface-muted) !important;
  box-shadow: none;
  color: var(--cv-ink) !important;
  font: 600 14px/1.3 var(--cv-fb);
}

body[data-page="education.library"] [data-live-search-region] > p {
  margin: 0 0 14px;
  color: var(--cv-mu);
  font: 500 14px/1.5 var(--cv-fb);
}

body[data-page="education.library"] [data-live-search-region] .row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

body[data-page="education.library"] [data-live-search-region] .row > :is(article, [class*="col-"]) {
  width: auto;
  max-width: none;
  margin: 0;
  padding: 0;
}

body[data-page="education.library"] [data-live-search-region] .card {
  min-height: 100%;
  padding: 18px;
  border: 0 !important;
  border-radius: 20px !important;
  background: var(--cv-catalog-panel) !important;
  box-shadow: none !important;
  color: var(--cv-ink);
}

body[data-page="education.library"] [data-live-search-region] .card h2 {
  margin: 0 0 10px;
  font: 700 18px/1.3 "Exo 2", Montserrat, sans-serif;
  overflow-wrap: anywhere;
}

body[data-page="education.library"] [data-live-search-region] .card h2 a {
  color: var(--cv-ink);
  text-decoration: none;
}

body[data-page="education.library"] [data-live-search-region] .card h2 a:hover {
  color: var(--cv-blue);
  text-decoration: underline;
  text-underline-offset: 4px;
}

body[data-page="education.library"] [data-live-search-region] .card p,
body[data-page="education.library"] [data-live-search-region] .card .small,
body[data-page="education.library"] [data-live-search-region] .card small {
  color: var(--cv-mu);
  font: 400 14px/1.55 var(--cv-fb);
}

body[data-page="education.library"] [data-live-search-region] .card .small,
body[data-page="education.library"] [data-live-search-region] .card small {
  font-size: 12px;
  font-weight: 600;
}

body[data-page="education.library"] .mt-4 :is(.pagination, .page-link) {
  border-color: var(--cv-line);
  border-radius: 12px;
  color: var(--cv-ink);
}

/* ---------------- /data-hub/sources ---------------- */
body[data-page="data-hub.sources"] main > a:first-of-type {
  display: inline-flex;
  align-items: center;
  margin: 0 0 16px;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--ksds-color-surface-muted);
  color: var(--cv-blue);
  font: 600 13px/1.3 var(--cv-fb);
  text-decoration: none;
}

body[data-page="data-hub.sources"] main > header {
  margin: 0 0 20px !important;
}

body[data-page="data-hub.sources"] .hub-admin-eyebrow {
  color: var(--cv-mu);
  font: 600 13px/1.3 var(--cv-fb);
}

body[data-page="data-hub.sources"] main > header h1 {
  margin: 0 0 10px;
  font: 700 clamp(28px, 3.2vw, 38px)/1.15 "Exo 2", Montserrat, sans-serif;
}

body[data-page="data-hub.sources"] main > header .lead {
  color: var(--cv-mu);
  font: 400 15px/1.65 var(--cv-fb);
}

body[data-page="data-hub.sources"] .row.g-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

body[data-page="data-hub.sources"] .row.g-3 > article {
  width: auto;
  max-width: none;
  margin: 0;
  padding: 0;
}

body[data-page="data-hub.sources"] .hub-reference-card {
  min-height: 100%;
  padding: 18px;
  border: 0 !important;
  border-radius: 20px !important;
  background: var(--cv-catalog-panel) !important;
  box-shadow: none !important;
  color: var(--cv-ink);
}

body[data-page="data-hub.sources"] .hub-reference-card-top {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

body[data-page="data-hub.sources"] :is(.hub-reference-type, .hub-reference-status) {
  padding: 5px 10px;
  border: 0;
  border-radius: 999px;
  background: var(--ksds-color-surface-muted);
  box-shadow: none;
  color: var(--cv-ink);
  font: 600 12px/1.3 var(--cv-fb);
}

body[data-page="data-hub.sources"] .hub-reference-status.is-pending {
  color: var(--cv-mu);
}

body[data-page="data-hub.sources"] .hub-reference-card h2 {
  margin: 0 0 10px;
  font: 700 18px/1.3 "Exo 2", Montserrat, sans-serif;
  overflow-wrap: anywhere;
}

body[data-page="data-hub.sources"] .hub-reference-card p {
  color: var(--cv-mu);
  font: 400 14px/1.55 var(--cv-fb);
}

body[data-page="data-hub.sources"] .hub-reference-card p a {
  color: var(--cv-blue);
  font-weight: 600;
  text-decoration: none;
}

body[data-page="data-hub.sources"] .hub-reference-card p a:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* ---------------- Адаптив ---------------- */
@media (max-width: 991.98px) {
  body[data-page="teacher.educational-process"] .teacher-catalog-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  body[data-page="teacher.educational-process"] .teacher-catalog-sidebar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
  }

  body[data-page="teacher.methodical-work"] .teacher-methodical-directions__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body[data-page="education.library"] [data-live-search-region] .row,
  body[data-page="data-hub.sources"] .row.g-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  body[data-page="teacher.educational-process"] .catalog-hero-play,
  body[data-page="teacher.methodical-work"] .catalog-hero-play,
  body[data-page="education.library"] .catalog-hero-play,
  body[data-page="data-hub.sources"] .catalog-hero-play {
    grid-template-columns: minmax(0, 1fr);
  }

  body[data-page="teacher.educational-process"] :is(.courses-search-row, .teacher-unified-search--catalog),
  body[data-page="teacher.methodical-work"] :is(.courses-search-row, .teacher-unified-search--catalog) {
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
  }

  body[data-page="teacher.educational-process"] .teacher-unified-search--catalog .library-button,
  body[data-page="teacher.methodical-work"] .teacher-unified-search--catalog .library-button {
    width: 100%;
  }

  body[data-page="teacher.educational-process"] .catalog-hero-play .courses-search-row .nb.main,
  body[data-page="teacher.methodical-work"] .catalog-hero-play .courses-search-row .nb.main,
  body[data-page="education.library"] .catalog-hero-play .courses-search-row .nb.main,
  body[data-page="data-hub.sources"] .catalog-hero-play .courses-search-row .nb.main {
    width: 100%;
  }
}

@media (max-width: 599px) {
  body[data-page="teacher.educational-process"] .teacher-topics,
  body[data-page="teacher.educational-process"] .teacher-catalog-grid,
  body[data-page="teacher.educational-process"] .teacher-catalog-sidebar,
  body[data-page="teacher.methodical-work"] .teacher-methodical-directions__grid,
  body[data-page="education.library"] [data-live-search-region] .row,
  body[data-page="data-hub.sources"] .row.g-3 {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (prefers-reduced-motion: reduce) {
  body[data-page="teacher.educational-process"] .teacher-topics a,
  body[data-page="teacher.educational-process"] .teacher-catalog-card,
  body[data-page="teacher.methodical-work"] .teacher-methodical-directions__grid > a {
    transform: none !important;
  }
}

/* ---------------- /library (електронна бібліотека) ---------------- */
:root[data-theme] body[data-page="library.index"] {
  --cv-ink: var(--ksds-color-text-primary);
  --cv-mu: var(--ksds-color-text-secondary);
  --cv-blue: var(--ksds-color-accent);
  --cv-focus: var(--ksds-color-focus-ring);
  --cv-line: var(--ksds-color-border-subtle);
  --cv-cover-accent: var(--ksds-color-border-default);
  --cv-cover-base: var(--ksds-color-surface-elevated);
  --cv-action-start: var(--ksds-color-primary-hover);
  --cv-action-end: var(--ksds-color-primary);
  --cv-action-ink: var(--ksds-color-on-primary);
  --cv-catalog-panel: linear-gradient(145deg, var(--ksds-color-surface-elevated), var(--ksds-color-surface-muted));
  --cv-section-gap: clamp(24px, 2.7vw, 34px);
}

body[data-page="library.index"] main {
  width: min(1160px, calc(100% - 40px)) !important;
  max-width: 1160px !important;
  margin: 0 auto;
  padding: 0 0 48px !important;
  color: var(--cv-ink);
  font: 400 16px/1.6 var(--cv-fb);
}

body[data-page="library.index"] main :is(h1, h2, h3, h4) {
  color: var(--cv-ink);
  font-family: "Exo 2", Montserrat, sans-serif;
  letter-spacing: 0;
}

body[data-page="library.index"] .library-bento :is(p, span, label, a, strong, small, kbd, input, button, i) {
  font-family: var(--cv-fb) !important;
}

body[data-page="library.index"] .cv-feature {
  min-height: clamp(300px, 34vw, 430px);
  margin: 12px 0 20px;
  padding: clamp(20px, 4vw, 48px);
  border: 0 !important;
  border-radius: 32px !important;
  background: var(--cv-catalog-panel) !important;
  box-shadow: none !important;
  align-content: end;
}

body[data-page="library.index"] .cv-feature__visual::after {
  background:
    linear-gradient(90deg, rgb(0 0 0 / .8), rgb(0 0 0 / .32)),
    linear-gradient(0deg, rgb(0 0 0 / .6), transparent);
}

body[data-page="library.index"] .cv-feature__visual :is(img, video) {
  border-radius: inherit;
}

body[data-page="library.index"] .catalog-hero-play {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px;
  align-items: start;
}

body[data-page="library.index"] .sbox.courses-search-box {
  padding: 16px;
  border: 1px solid var(--cv-line);
  border-radius: 20px;
  background: var(--cv-catalog-panel) !important;
  box-shadow: none !important;
}

body[data-page="library.index"] .courses-search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  background: none !important;
}

body[data-page="library.index"] .courses-search-row label {
  display: flex;
  align-items: center;
  min-width: 0;
  padding: 0 12px;
  border-radius: 14px;
  background: var(--ksds-color-surface-muted) !important;
  box-shadow: none !important;
  color: var(--cv-ink);
}

body[data-page="library.index"] .courses-search-row input {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--cv-ink);
  font: 500 15px/1.4 var(--cv-fb);
}

body[data-page="library.index"] .courses-search-row input::placeholder {
  color: var(--cv-mu);
}

body[data-page="library.index"] .cv-search-glyph {
  display: none;
}

body[data-page="library.index"] .cv-search-submit {
  display: inline-flex !important;
  align-items: center;
  gap: 8px;
}

body[data-page="library.index"] .courses-search-row .nb.main {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 16px;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--cv-action-start), var(--cv-action-end)) !important;
  box-shadow: none;
  color: var(--cv-action-ink);
  font: 700 14px/1.3 var(--cv-fb);
}

body[data-page="library.index"] .cv-direction-section {
  min-width: 0;
}

body[data-page="library.index"] .cv-direction-section h2.t {
  margin: 0 0 12px;
  font: 700 clamp(22px, 2.6vw, 30px)/1.2 "Exo 2", Montserrat, sans-serif;
}

body[data-page="library.index"] .cv-direction-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 128px), 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

body[data-page="library.index"] .cv-direction-grid li {
  min-width: 0;
}

body[data-page="library.index"] .cv-direction-grid a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 76px;
  height: 100%;
  padding: 12px 8px;
  border: 1px solid var(--cv-line);
  border-radius: 16px;
  background:
    radial-gradient(ellipse at 45% 0%, color-mix(in srgb, var(--cv-blue) 18%, transparent), transparent 85%),
    var(--cv-catalog-panel);
  box-shadow: none;
  color: var(--cv-ink);
  text-align: center;
  font: 600 14px/1.25 var(--cv-fb);
  text-decoration: none;
  overflow-wrap: anywhere;
}

body[data-page="library.index"] .cv-direction-grid a:hover {
  border-color: var(--cv-blue);
  text-decoration: none;
}

body[data-page="library.index"] .cv-direction-grid a[aria-current="true"] {
  border-color: transparent;
  background: linear-gradient(135deg, var(--cv-action-start), var(--cv-action-end));
  color: var(--cv-action-ink);
}

body[data-page="library.index"] .cv-direction-grid i {
  font-size: 1.35rem;
}

body[data-page="library.index"] :is(a, button, input, select, summary):focus-visible {
  outline: 2px solid var(--cv-focus, var(--cv-blue));
  outline-offset: 2px;
}

:root[data-theme] body[data-page="library.index"] .library-bento.library-page {
  --library-text: var(--cv-ink);
  --library-muted: var(--cv-mu);
  --library-accent: var(--cv-blue);
  --lb-ink: var(--cv-ink);
  --lb-muted: var(--cv-mu);
  --lb-line: var(--cv-line);
  --lb-accent: var(--cv-blue);
  --lb-on-accent: var(--cv-action-ink);
  --lb-tile: var(--ksds-color-surface-elevated);
  --lb-soft: var(--ksds-color-surface-muted);
  --lb-field: var(--ksds-color-surface-muted);
}

body[data-page="library.index"] .library-bento .lb-tile:not(.lb-count-tile),
body[data-page="library.index"] .library-bento .lb-sort-tile nav a,
body[data-page="library.index"] .library-bento .lb-type,
body[data-page="library.index"] .library-bento .lb-active-filters a,
body[data-page="library.index"] .library-bento .lb-book-open,
body[data-page="library.index"] .library-bento .lb-pagination .page-link {
  border-color: var(--cv-line) !important;
  background: var(--cv-catalog-panel) !important;
  background-image: var(--cv-catalog-panel) !important;
  box-shadow: none !important;
}

body[data-page="library.index"] .library-bento .lb-type[aria-current] {
  border-color: transparent !important;
  background: linear-gradient(135deg, var(--cv-action-start), var(--cv-action-end)) !important;
  background-image: linear-gradient(135deg, var(--cv-action-start), var(--cv-action-end)) !important;
  color: var(--cv-action-ink) !important;
}

body[data-page="library.index"] .library-bento .lb-type[aria-current] :is(i, strong) {
  color: var(--cv-action-ink) !important;
}

body[data-page="library.index"] .library-bento .lb-sort-tile nav a[aria-current] {
  border-color: var(--cv-blue) !important;
  color: var(--cv-blue) !important;
}

body[data-page="library.index"] .library-bento .lb-search-input {
  border: 1px solid var(--cv-line) !important;
  border-radius: 18px;
  background: var(--ksds-color-surface-muted) !important;
  background-image: none !important;
  box-shadow: none !important;
}

body[data-page="library.index"] .library-bento .lb-search-input:focus-within {
  border-color: var(--cv-blue) !important;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--cv-blue) 14%, transparent) !important;
}

body[data-page="library.index"] .library-bento #library-search {
  color: var(--cv-ink) !important;
  font: 500 15px/1.4 var(--cv-fb);
}

body[data-page="library.index"] .library-bento .lb-search-label,
body[data-page="library.index"] .library-bento .lb-search-help,
body[data-page="library.index"] .library-bento .lb-tile-label,
body[data-page="library.index"] .library-bento .lb-intro,
body[data-page="library.index"] .library-bento .lb-results-heading > span,
body[data-page="library.index"] .library-bento .lb-author,
body[data-page="library.index"] .library-bento .lb-book-meta,
body[data-page="library.index"] .library-bento .lb-subject,
body[data-page="library.index"] .library-bento .lb-catalog-note {
  color: var(--cv-mu) !important;
}

body[data-page="library.index"] .library-bento .lb-eyebrow,
body[data-page="library.index"] .library-bento .lb-book-type,
body[data-page="library.index"] .library-bento .lb-type-top > i,
body[data-page="library.index"] .library-bento .lb-format,
body[data-page="library.index"] .library-bento .lb-book-open,
body[data-page="library.index"] .library-bento .lb-active-filters .lb-reset,
body[data-page="library.index"] .library-bento .lb-clear {
  color: var(--cv-blue) !important;
}

body[data-page="library.index"] .library-bento .lb-clear {
  background: var(--ksds-color-surface-muted) !important;
  box-shadow: none !important;
}

body[data-page="library.index"] .library-bento .lb-submit {
  border: 0 !important;
  border-radius: 14px !important;
  background: linear-gradient(135deg, var(--cv-action-start), var(--cv-action-end)) !important;
  background-image: linear-gradient(135deg, var(--cv-action-start), var(--cv-action-end)) !important;
  box-shadow: none !important;
  color: var(--cv-action-ink) !important;
  font: 700 14px/1.3 var(--cv-fb);
}

body[data-page="library.index"] .library-bento .lb-book h3 a {
  color: var(--cv-ink);
}

body[data-page="library.index"] .library-bento .lb-book h3 a:hover {
  color: var(--cv-blue);
}

body[data-page="library.index"] .lb-breadcrumbs {
  color: var(--cv-mu) !important;
  font: 500 13px/1.4 var(--cv-fb);
}

body[data-page="library.index"] .lb-breadcrumbs a {
  color: var(--cv-blue) !important;
}

:root[data-theme] body[data-page="library.index"] .library-bento .lb-pagination .page-link {
  color: var(--cv-ink) !important;
  border-color: var(--cv-line) !important;
  background: var(--cv-catalog-panel) !important;
  background-image: var(--cv-catalog-panel) !important;
  box-shadow: none !important;
}

:root[data-theme] body[data-page="library.index"] .library-bento .lb-pagination .page-item.active .page-link {
  color: var(--cv-action-ink) !important;
  border-color: transparent !important;
  background: linear-gradient(135deg, var(--cv-action-start), var(--cv-action-end)) !important;
  background-image: linear-gradient(135deg, var(--cv-action-start), var(--cv-action-end)) !important;
  box-shadow: none !important;
}

@media (max-width: 720px) {
  body[data-page="library.index"] .catalog-hero-play {
    grid-template-columns: minmax(0, 1fr);
  }

  body[data-page="library.index"] .courses-search-row {
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
  }

  body[data-page="library.index"] .courses-search-row .nb.main {
    width: 100%;
  }
}

@media (max-width: 650px) {
  body[data-page="library.index"] main {
    width: calc(100% - 32px) !important;
  }
}

@media (max-width: 420px) {
  body[data-page="library.index"] main {
    width: calc(100% - 24px) !important;
  }
}
