/* =========================================================
   CAREPLANCOMPASS — LIBRARY RESULTS + ITEM DETAIL RESULTS
   Applies to:
   /library.php
   /item.php

   Flow:
   Explainer page
   → curated Library lane
   → item card
   → item.php detail
   → gate/access route
========================================================= */


/* =========================================================
   PAGE BASE
========================================================= */

.library-page,
.item-viewer-page {
  background: #f6f8fb;
  color: #172033;
}

.library-page .section,
.item-viewer-page .section,
.item-viewer-page .item-viewer-section {
  padding: 56px 0;
}

.library-page .container,
.item-viewer-page .container {
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
}

.library-page a,
.item-viewer-page a {
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}


/* =========================================================
   LIBRARY RESULTS SECTION
========================================================= */

.library-results-section {
  background:
    radial-gradient(circle at top left, rgba(36, 79, 158, 0.08), transparent 32%),
    #f6f8fb;
  padding-top: 52px;
}

.library-results-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}

.library-kicker {
  margin: 0 0 8px;
  color: #244f9e;
  font-size: 0.76rem;
  font-weight: 950;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.library-results-header h2 {
  margin: 0;
  color: #0f2b63;
  font-size: clamp(1.85rem, 3vw, 2.85rem);
  line-height: 1.04;
  letter-spacing: -0.04em;
}

.library-results-header p {
  max-width: 760px;
  margin: 12px 0 0;
  color: #4c5d76;
  font-size: 1rem;
  line-height: 1.65;
}


/* =========================================================
   LIBRARY SEARCH PANEL
========================================================= */

.library-tools {
  margin: 22px 0 26px;
}

.library-search-panel {
  display: grid;
  grid-template-columns: minmax(260px, 0.85fr) minmax(320px, 1.15fr);
  gap: 22px;
  align-items: center;
  padding: 24px;
  border: 1px solid #d9e2f1;
  border-radius: 28px;
  background: #ffffff;
  box-shadow: 0 18px 44px rgba(20, 40, 80, 0.08);
}

.library-search-panel__copy h3 {
  margin: 0;
  color: #0f2b63;
  font-size: clamp(1.25rem, 2vw, 1.7rem);
  line-height: 1.12;
}

.library-search-panel__copy p:not(.library-kicker) {
  margin: 10px 0 0;
  color: #4c5d76;
  line-height: 1.6;
}

.library-search-panel__controls {
  display: grid;
  gap: 10px;
}

.library-search-label {
  color: #0f2b63;
  font-size: 0.9rem;
  font-weight: 900;
}

.library-search-box {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 8px;
  border: 1px solid #cfdaf0;
  border-radius: 999px;
  background: #f8fafc;
}

.library-search-box span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: #eaf1ff;
  color: #244f9e;
  font-weight: 950;
}

.library-search-box input {
  width: 100%;
  min-height: 38px;
  border: 0;
  background: transparent;
  color: #172033;
  font-size: 0.96rem;
  outline: none;
}

.library-search-box input::placeholder {
  color: #7a889b;
}

.library-search-box button {
  min-height: 36px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: #244f9e;
  color: #ffffff;
  font-size: 0.82rem;
  font-weight: 900;
  cursor: pointer;
}

.library-search-box button:hover,
.library-search-box button:focus {
  background: #0f2b63;
}

.library-search-count {
  margin: 0;
  color: #4c5d76;
  font-size: 0.92rem;
  line-height: 1.45;
}


/* =========================================================
   ITEM GRID — LIBRARY RESULTS
========================================================= */

.item-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  align-items: stretch;
}

.library-page .item-card[hidden] {
  display: none !important;
}

.item-card {
  min-width: 0;
}

.item-card__link {
  display: block;
  height: 100%;
  color: inherit;
  text-decoration: none;
}

.item-card__frame {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  overflow: hidden;
  border: 1px solid #d9e2f1;
  border-radius: 26px;
  background: #ffffff;
  box-shadow: 0 14px 36px rgba(20, 40, 80, 0.08);
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    border-color 160ms ease;
}

.item-card__link:hover .item-card__frame,
.item-card__link:focus .item-card__frame {
  transform: translateY(-3px);
  border-color: rgba(36, 79, 158, 0.34);
  box-shadow: 0 22px 52px rgba(20, 40, 80, 0.14);
}

.item-card__topline {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  padding: 16px 16px 0;
}

.item-card__number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  background: #f1f5fb;
  color: #4c5d76;
  font-size: 0.78rem;
  font-weight: 900;
}

.item-card__badge {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: 7px 10px;
  border-radius: 999px;
  background: #eaf1ff;
  color: #244f9e;
  font-size: 0.72rem;
  font-weight: 950;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

.item-card[data-layer="cpn"] .item-card__badge {
  background: #eaf1ff;
  color: #244f9e;
}

.item-card[data-layer="bundle"] .item-card__badge {
  background: #eef6ec;
  color: #2f6f3a;
}

.item-card[data-layer="qr"] .item-card__badge {
  background: #fff4df;
  color: #8a5a00;
}

.item-card[data-layer="white-paper"] .item-card__badge {
  background: #f1edff;
  color: #5636a3;
}

.item-card[data-layer="kaja"] .item-card__badge {
  background: #fff0f4;
  color: #9a3150;
}

.item-card[data-layer="pro-tools"] .item-card__badge,
.item-card[data-layer="mbs"] .item-card__badge {
  background: #e8f7f7;
  color: #0d6870;
}

.item-card__visual {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 4 / 3;
  margin: 14px 16px 0;
  overflow: hidden;
  border-radius: 20px;
  background: linear-gradient(135deg, #f8fafc, #eef4ff);
  border: 1px solid #e2e9f5;
}

.item-card__visual img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #ffffff;
}

.item-card__visual--placeholder {
  background:
    radial-gradient(circle at top left, rgba(36, 79, 158, 0.16), transparent 38%),
    linear-gradient(135deg, #0f2b63, #244f9e);
  color: #ffffff;
  padding: 24px;
  text-align: center;
}

.item-card__visual--placeholder span {
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.82rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.item-card__body {
  display: grid;
  gap: 10px;
  padding: 18px 18px 10px;
}

.item-card__title {
  margin: 0;
  color: #0f2b63;
  font-size: 1.08rem;
  line-height: 1.18;
  letter-spacing: -0.015em;
}

.item-card__description {
  margin: 0;
  color: #4c5d76;
  font-size: 0.92rem;
  line-height: 1.55;
}

.item-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.item-card__meta span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 9px;
  border-radius: 999px;
  background: #f1f5fb;
  color: #4c5d76;
  font-size: 0.78rem;
  font-weight: 850;
}

.item-card__actions {
  margin-top: auto;
  padding: 0 18px 18px;
}

.item-card__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 42px;
  padding: 10px 14px;
  border-radius: 999px;
  background: #244f9e;
  color: #ffffff;
  font-size: 0.88rem;
  font-weight: 950;
  line-height: 1.1;
  text-align: center;
  box-shadow: 0 12px 24px rgba(36, 79, 158, 0.22);
}

.item-card__button--disabled {
  background: #7a889b;
}


/* =========================================================
   LIBRARY EMPTY STATE
========================================================= */

.library-empty,
.library-empty-search {
  margin-top: 24px;
  padding: 28px;
  border: 1px dashed #cfdaf0;
  border-radius: 26px;
  background: #ffffff;
  text-align: center;
  box-shadow: 0 14px 32px rgba(20, 40, 80, 0.06);
}

.library-empty[hidden],
.library-empty-search[hidden] {
  display: none !important;
}

.library-empty h2,
.library-empty-search h3 {
  margin: 0;
  color: #0f2b63;
  font-size: 1.4rem;
}

.library-empty p,
.library-empty-search p {
  margin: 10px auto 0;
  max-width: 620px;
  color: #4c5d76;
  line-height: 1.6;
}


/* =========================================================
   ITEM DETAIL PAGE — HERO
   Some !important rules are intentional because item.php still
   contains an inline <style> block.
========================================================= */

.item-viewer-page {
  background: #f6f8fb !important;
}

.item-viewer-hero {
  padding: 54px 0 34px !important;
}

.item-viewer-grid {
  display: grid !important;
  grid-template-columns: minmax(280px, 0.9fr) minmax(320px, 1.1fr) !important;
  gap: 34px !important;
  align-items: start !important;
}

.item-viewer-media,
.item-viewer-panel,
.item-content-card,
.item-included-card,
.item-reference-card,
.item-bundle-feature-card,
.item-finale-shell {
  border: 1px solid #d9e2f1 !important;
  border-radius: 28px !important;
  background: #ffffff !important;
  box-shadow: 0 18px 46px rgba(20, 40, 80, 0.09) !important;
}

.item-viewer-media {
  padding: 18px !important;
}

.item-viewer-image {
  width: 100% !important;
  max-height: 620px !important;
  display: block !important;
  border-radius: 22px !important;
  object-fit: contain !important;
  background: #ffffff !important;
}

.item-viewer-placeholder {
  min-height: 440px !important;
  border-radius: 22px !important;
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.16), transparent 34%),
    linear-gradient(135deg, #0f2b63, #244f9e) !important;
  color: #ffffff !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  padding: 34px !important;
  text-align: center !important;
}

.item-viewer-placeholder span {
  color: rgba(255, 255, 255, 0.82) !important;
  text-transform: uppercase !important;
  letter-spacing: 0.11em !important;
  font-size: 0.78rem !important;
  font-weight: 950 !important;
}

.item-viewer-placeholder strong {
  margin-top: 12px !important;
  font-size: clamp(1.8rem, 4vw, 3rem) !important;
  line-height: 1.05 !important;
}

.item-viewer-panel {
  padding: 32px !important;
}

.item-viewer-panel .eyebrow,
.item-section-eyebrow {
  margin: 0 0 10px !important;
  color: #244f9e !important;
  font-size: 0.76rem !important;
  font-weight: 950 !important;
  letter-spacing: 0.09em !important;
  text-transform: uppercase !important;
}

.item-viewer-panel h1 {
  margin: 0 !important;
  color: #0f2b63 !important;
  font-size: clamp(2.05rem, 4vw, 3.65rem) !important;
  line-height: 0.98 !important;
  letter-spacing: -0.055em !important;
}

.item-viewer-preview {
  margin: 18px 0 0 !important;
  color: #43546f !important;
  font-size: 1.05rem !important;
  line-height: 1.72 !important;
}

.item-viewer-facts {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 12px !important;
  margin: 24px 0 !important;
}

.item-viewer-fact {
  padding: 14px !important;
  border: 1px solid #d9e2f1 !important;
  border-radius: 18px !important;
  background: #f8fafc !important;
}

.item-viewer-fact span {
  display: block !important;
  color: #6a7890 !important;
  font-size: 0.72rem !important;
  font-weight: 950 !important;
  letter-spacing: 0.07em !important;
  text-transform: uppercase !important;
}

.item-viewer-fact strong {
  display: block !important;
  margin-top: 5px !important;
  color: #0f2b63 !important;
  font-size: 0.94rem !important;
}

.item-viewer-actions {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 12px !important;
  margin: 22px 0 18px !important;
}

.item-disclaimer {
  margin: 0 !important;
  padding: 14px 16px !important;
  border-radius: 18px !important;
  background: #eef6ec !important;
  color: #30445f !important;
  font-size: 0.92rem !important;
  line-height: 1.55 !important;
}


/* =========================================================
   ITEM PAGE BUTTONS
========================================================= */

.cprx-btn,
.item-finale-tool__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 16px;
  border: 1px solid #cfdaf0;
  border-radius: 999px;
  background: #ffffff;
  color: #244f9e;
  font-size: 0.9rem;
  font-weight: 950;
  line-height: 1.1;
  text-align: center;
  text-decoration: none;
  box-shadow: 0 8px 20px rgba(20, 40, 80, 0.08);
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.cprx-btn--secure,
.item-viewer-actions .cprx-btn:first-child,
.item-finale-actions .cprx-btn:first-child {
  background: #244f9e;
  color: #ffffff;
  border-color: #244f9e;
  box-shadow: 0 12px 26px rgba(36, 79, 158, 0.24);
}

.cprx-btn--secondary {
  background: #ffffff;
  color: #244f9e;
  border-color: #cfdaf0;
}

.cprx-btn:hover,
.cprx-btn:focus,
.item-finale-tool__button:hover,
.item-finale-tool__button:focus {
  transform: translateY(-1px);
  box-shadow: 0 16px 28px rgba(20, 40, 80, 0.15);
}


/* =========================================================
   RECOMMENDED BUNDLE FEATURE
========================================================= */

.item-bundle-feature-section {
  padding-top: 18px !important;
}

.item-bundle-feature-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px;
  align-items: center;
  padding: 26px !important;
  background:
    radial-gradient(circle at top left, rgba(36, 79, 158, 0.10), transparent 36%),
    #ffffff !important;
}

.item-bundle-feature-copy h2 {
  margin: 0;
  color: #0f2b63;
  font-size: clamp(1.35rem, 2.4vw, 2.05rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.item-bundle-feature-copy p {
  margin: 12px 0 0;
  color: #4c5d76;
  line-height: 1.65;
}

.item-mini-list,
.item-mini-list--inline,
.item-finale-includes {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.item-mini-list span,
.item-finale-includes span {
  display: inline-flex;
  padding: 7px 10px;
  border-radius: 999px;
  background: #f1f5fb;
  color: #4c5d76;
  font-size: 0.8rem;
  font-weight: 850;
}


/* =========================================================
   ITEM DETAILS / DESCRIPTION
========================================================= */

.item-content-card,
.item-included-card,
.item-reference-card {
  padding: 30px !important;
}

.item-content-card h2,
.item-included-card h2,
.item-reference-card h2,
.item-finale-header h2 {
  margin: 0 0 14px !important;
  color: #0f2b63 !important;
  font-size: clamp(1.45rem, 2.4vw, 2.2rem) !important;
  line-height: 1.08 !important;
  letter-spacing: -0.035em !important;
}

.item-long-description,
.item-content-card p,
.item-included-card p,
.item-reference-card p {
  color: #4c5d76;
  line-height: 1.7;
}

.item-description-premium {
  display: grid;
  gap: 20px;
}

.item-description-group {
  display: grid;
  gap: 16px;
}

.item-description-group__header h3 {
  margin: 0;
  color: #0f2b63;
  font-size: 1.22rem;
}

.item-description-group__header p {
  margin: 8px 0 0;
  color: #4c5d76;
  line-height: 1.6;
}

.item-description-card-list {
  display: grid;
  gap: 12px;
}

.item-description-card {
  overflow: hidden;
  border: 1px solid #d9e2f1;
  border-radius: 20px;
  background: #f8fafc;
}

.item-description-card summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 18px;
  color: #0f2b63;
  font-weight: 950;
}

.item-description-card summary::-webkit-details-marker {
  display: none;
}

.item-description-card summary::after {
  content: "+";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: #244f9e;
  color: #ffffff;
  flex: 0 0 auto;
}

.item-description-card[open] summary::after {
  content: "–";
}

.item-description-card__body {
  border-top: 1px solid #d9e2f1;
  padding: 16px 18px;
  background: #ffffff;
}

.item-description-card__body p {
  margin: 0 0 12px;
  color: #4c5d76;
  line-height: 1.68;
}

.item-description-card__body p:last-child {
  margin-bottom: 0;
}

.item-description-card__body ul {
  margin: 0;
  padding-left: 20px;
  color: #4c5d76;
}

.item-keywords {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}

.item-keywords span {
  display: inline-flex;
  padding: 7px 11px;
  border-radius: 999px;
  background: #eaf1ff;
  color: #244f9e;
  font-size: 0.8rem;
  font-weight: 900;
}


/* =========================================================
   BUNDLE CONTENTS
========================================================= */

.item-included-grid {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 12px !important;
  margin-top: 18px !important;
}

.item-included-row {
  padding: 15px !important;
  border: 1px solid #d9e2f1 !important;
  border-radius: 18px !important;
  background: #f8fafc !important;
}

.item-included-row span {
  display: block !important;
  color: #244f9e !important;
  font-size: 0.72rem !important;
  font-weight: 950 !important;
  letter-spacing: 0.07em !important;
  text-transform: uppercase !important;
}

.item-included-row strong {
  display: block !important;
  margin-top: 6px !important;
  color: #0f2b63 !important;
  line-height: 1.25 !important;
}


/* =========================================================
   ITEM FINALE / NEXT STEP HUB
========================================================= */

.item-finale-section {
  padding-top: 28px !important;
}

.item-finale-shell {
  padding: 30px !important;
}

.item-finale-header {
  max-width: 820px;
  margin-bottom: 24px;
}

.item-finale-header p:not(.item-section-eyebrow) {
  margin: 0;
  color: #4c5d76;
  line-height: 1.65;
}

.item-finale-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.85fr);
  gap: 18px;
  align-items: stretch;
}

.item-finale-bundle,
.item-finale-action-card,
.item-finale-panel,
.item-finale-close {
  border: 1px solid #d9e2f1;
  border-radius: 24px;
  background: #f8fafc;
  box-shadow: 0 10px 26px rgba(20, 40, 80, 0.06);
}

.item-finale-bundle {
  padding: 24px;
  background:
    radial-gradient(circle at top left, rgba(36, 79, 158, 0.12), transparent 36%),
    #f7fbff;
}

.item-finale-bundle__badge {
  display: inline-flex;
  width: fit-content;
  padding: 7px 10px;
  border-radius: 999px;
  background: #244f9e;
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 950;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.item-finale-bundle h3,
.item-finale-action-card h3,
.item-finale-panel h3,
.item-finale-close h3 {
  margin: 12px 0 0;
  color: #0f2b63;
  font-size: 1.2rem;
  line-height: 1.16;
}

.item-finale-bundle p,
.item-finale-action-card p,
.item-finale-panel p,
.item-finale-close p {
  margin: 10px 0 0;
  color: #4c5d76;
  line-height: 1.62;
}

.item-finale-action-stack {
  display: grid;
  gap: 14px;
}

.item-finale-action-card {
  padding: 22px;
}

.item-finale-action-card span {
  color: #244f9e;
  font-size: 0.75rem;
  font-weight: 950;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.item-finale-action-card--soft {
  background: #ffffff;
}

.item-finale-actions,
.item-finale-close__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.item-finale-trust-grid {
  display: grid;
  gap: 16px;
  margin-top: 18px;
}

.item-finale-panel {
  padding: 24px;
}

.item-finale-panel__header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: start;
  margin-bottom: 18px;
}

.item-finale-panel__header span {
  display: inline-flex;
  padding: 7px 10px;
  border-radius: 999px;
  background: #eaf1ff;
  color: #244f9e;
  font-size: 0.8rem;
  font-weight: 900;
  white-space: nowrap;
}

.item-finale-tool-list {
  display: grid;
  gap: 10px;
}

.item-finale-tool {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border: 1px solid #d9e2f1;
  border-radius: 18px;
  background: #ffffff;
}

.item-finale-tool small {
  display: block;
  margin-bottom: 4px;
  color: #244f9e;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.item-finale-tool strong {
  display: block;
  color: #0f2b63;
  line-height: 1.25;
}

.item-finale-more-tools {
  margin-top: 12px;
}

.item-finale-more-tools summary {
  cursor: pointer;
  color: #244f9e;
  font-weight: 950;
}

.item-finale-evidence-snapshot {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.item-finale-evidence-snapshot div {
  padding: 14px;
  border-radius: 18px;
  background: #ffffff;
  border: 1px solid #d9e2f1;
}

.item-finale-evidence-snapshot strong {
  display: block;
  color: #0f2b63;
}

.item-finale-methodology a {
  color: #244f9e;
  font-weight: 950;
}

.item-finale-reference-accordion {
  margin-top: 16px;
  overflow: hidden;
  border: 1px solid #d9e2f1;
  border-radius: 20px;
  background: #ffffff;
}

.item-finale-reference-accordion summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 16px 18px;
  color: #0f2b63;
  font-weight: 950;
}

.item-finale-reference-accordion summary::-webkit-details-marker {
  display: none;
}

.item-finale-reference-list {
  margin: 0;
  padding: 18px 22px 18px 42px;
  border-top: 1px solid #d9e2f1;
  color: #4c5d76;
  line-height: 1.65;
}

.item-finale-reference-list li {
  margin-bottom: 12px;
}

.item-finale-reference-list a {
  color: #244f9e;
  font-weight: 950;
}

.item-finale-close {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  margin-top: 18px;
  padding: 24px;
  background: #0f2b63;
}

.item-finale-close .item-section-eyebrow,
.item-finale-close h3,
.item-finale-close p {
  color: #ffffff !important;
}

.item-finale-close p {
  opacity: 0.86;
}


/* =========================================================
   LEGACY REFERENCE CARD SUPPORT
========================================================= */

.item-reference-card--accordion {
  max-width: 1040px;
  margin: 0 auto;
}

.item-reference-intro {
  color: #4c5d76;
  line-height: 1.7;
}

.item-reference-accordion {
  border: 1px solid #d9e2f1 !important;
  border-radius: 20px !important;
  background: #f8fafc !important;
  overflow: hidden !important;
}

.item-reference-accordion summary {
  cursor: pointer !important;
  color: #0f2b63 !important;
  font-weight: 950 !important;
}


/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width: 1100px) {
  .item-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .library-search-panel,
  .item-viewer-grid,
  .item-finale-grid,
  .item-bundle-feature-card,
  .item-finale-close {
    grid-template-columns: 1fr !important;
  }

  .item-finale-evidence-snapshot {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .library-page .section,
  .item-viewer-page .section,
  .item-viewer-page .item-viewer-section {
    padding: 38px 0;
  }

  .library-search-panel,
  .item-viewer-panel,
  .item-content-card,
  .item-included-card,
  .item-reference-card,
  .item-bundle-feature-card,
  .item-finale-shell,
  .item-finale-bundle,
  .item-finale-action-card,
  .item-finale-panel,
  .item-finale-close {
    padding: 22px !important;
    border-radius: 24px !important;
  }

  .item-grid,
  .item-viewer-facts,
  .item-included-grid {
    grid-template-columns: 1fr !important;
  }

  .library-search-box {
    grid-template-columns: 1fr;
    border-radius: 22px;
  }

  .library-search-box span {
    display: none;
  }

  .library-search-box button,
  .cprx-btn,
  .item-finale-tool__button {
    width: 100%;
  }

  .item-card__visual {
    aspect-ratio: 16 / 10;
  }

  .item-viewer-actions,
  .item-finale-actions,
  .item-finale-close__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .item-finale-tool {
    grid-template-columns: 1fr;
  }

  .item-finale-panel__header {
    flex-direction: column;
  }
}
/* =========================================================
   FIX — #library-results ANCHOR LANDING
   Keeps filtered Library result links from hiding under header
   or landing too tightly at the top of the section.
========================================================= */

#library-results,
.library-results-section {
  scroll-margin-top: 145px;
}

.library-results-section {
  position: relative;
  padding-top: 72px;
}

/* When a URL lands directly on #library-results, give the
   visitor a clearer visual landing area. */
#library-results:target {
  outline: none;
}

#library-results:target .library-results-header,
#library-results:target .library-search-panel {
  animation: cpc-library-anchor-settle 420ms ease-out both;
}

@keyframes cpc-library-anchor-settle {
  from {
    transform: translateY(-8px);
    opacity: 0.72;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Mobile sticky header needs slightly less offset. */
@media (max-width: 760px) {
  #library-results,
  .library-results-section {
    scroll-margin-top: 110px;
  }

  .library-results-section {
    padding-top: 48px;
  }
}
/* =========================================================
   HARD FIX — LIBRARY FILTERED LINK LANDING
   For:
   /library.php?q=...#library-results
   /library.php?type=...#library-results
========================================================= */

html {
  scroll-padding-top: 150px;
}

#library-results {
  scroll-margin-top: 150px;
}

.library-results-section {
  scroll-margin-top: 150px;
  padding-top: 86px !important;
}

.library-results-section::before {
  content: "";
  display: block;
  height: 1px;
  margin-top: -1px;
}

@media (max-width: 760px) {
  html {
    scroll-padding-top: 115px;
  }

  #library-results,
  .library-results-section {
    scroll-margin-top: 115px;
  }

  .library-results-section {
    padding-top: 58px !important;
  }
}
/* =========================================================
   LIBRARY STATIC INTRO PAGE FIX
   Fixes the top /content/library.html area before #library-results
========================================================= */

.library-page > .section:not(.library-results-section),
.library-page main > .section:not(.library-results-section) {
  padding: 48px 0 !important;
}

.library-page .section:not(.library-results-section) .container {
  width: min(1160px, calc(100% - 32px)) !important;
  margin: 0 auto !important;
}

/* Main intro image/hero images */
.library-page .section:not(.library-results-section) img {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 26px;
}

/* Prevent huge banner-style images from taking over */
.library-page .section:not(.library-results-section) img[src*="compass"],
.library-page .section:not(.library-results-section) img[src*="library"],
.library-page .section:not(.library-results-section) img[src*="book"],
.library-page .section:not(.library-results-section) img[src*="guide"],
.library-page .section:not(.library-results-section) img[src*="support"] {
  width: 100%;
  max-height: 360px;
  object-fit: cover;
  box-shadow: 0 18px 44px rgba(20, 40, 80, 0.10);
}

/* If the intro has loose image + text blocks, make them feel intentional */
.library-page .section:not(.library-results-section) .card,
.library-page .section:not(.library-results-section) article,
.library-page .section:not(.library-results-section) .support-card {
  border: 1px solid #d9e2f1;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 14px 36px rgba(20, 40, 80, 0.08);
}

/* Fix unformatted text */
.library-page .section:not(.library-results-section) h1,
.library-page .section:not(.library-results-section) h2,
.library-page .section:not(.library-results-section) h3 {
  color: #0f2b63;
  letter-spacing: -0.035em;
}

.library-page .section:not(.library-results-section) h1 {
  max-width: 820px;
  margin: 14px 0 14px;
  font-size: clamp(2rem, 4.6vw, 4rem);
  line-height: 1;
}

.library-page .section:not(.library-results-section) h2 {
  max-width: 780px;
  margin: 0 0 14px;
  font-size: clamp(1.6rem, 3vw, 2.55rem);
  line-height: 1.06;
}

.library-page .section:not(.library-results-section) h3 {
  margin: 0 0 8px;
  font-size: 1.12rem;
  line-height: 1.2;
}

.library-page .section:not(.library-results-section) p,
.library-page .section:not(.library-results-section) li {
  max-width: 760px;
  color: #43546f;
  font-size: 1rem;
  line-height: 1.68;
}

.library-page .section:not(.library-results-section) p {
  margin: 0 0 14px;
}

/* Eyebrow labels */
.library-page .section:not(.library-results-section) .section-eyebrow,
.library-page .section:not(.library-results-section) .library-kicker,
.library-page .section:not(.library-results-section) p:first-child {
  color: #244f9e;
  font-size: 0.76rem;
  font-weight: 950;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

/* Make loose benefit lists into cards when they are inside common grids */
.library-page .section:not(.library-results-section) .grid-2,
.library-page .section:not(.library-results-section) .grid-3,
.library-page .section:not(.library-results-section) .grid-4 {
  display: grid;
  gap: 16px;
  margin-top: 22px;
}

.library-page .section:not(.library-results-section) .grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.library-page .section:not(.library-results-section) .grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.library-page .section:not(.library-results-section) .grid-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

/* Button cleanup */
.library-page .section:not(.library-results-section) .btn,
.library-page .section:not(.library-results-section) a.btn,
.library-page .section:not(.library-results-section) .button,
.library-page .section:not(.library-results-section) a[class*="btn"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 16px;
  border-radius: 999px;
  background: #244f9e;
  color: #ffffff;
  font-size: 0.9rem;
  font-weight: 900;
  text-decoration: none;
  box-shadow: 0 12px 26px rgba(36, 79, 158, 0.22);
}

/* Keep secondary buttons readable */
.library-page .section:not(.library-results-section) .btn-secondary,
.library-page .section:not(.library-results-section) a.btn-secondary {
  background: #ffffff;
  color: #244f9e;
  border: 1px solid #cfdaf0;
}

/* Fix intro sections that are too narrow or floating left */
.library-page .section:not(.library-results-section) > .container > * {
  max-width: none;
}

/* Make the first static section feel like a proper Library hero */
.library-page > .section:first-of-type {
  padding-top: 38px !important;
}

.library-page > .section:first-of-type .container {
  display: grid;
  gap: 22px;
}

.library-page > .section:first-of-type img {
  width: 100%;
  max-height: 340px;
  object-fit: cover;
}

/* Add breathing room before actual database results */
.library-results-section {
  margin-top: 12px;
  border-top: 1px solid #d9e2f1;
}

/* Mobile */
@media (max-width: 900px) {
  .library-page .section:not(.library-results-section) .grid-2,
  .library-page .section:not(.library-results-section) .grid-3,
  .library-page .section:not(.library-results-section) .grid-4 {
    grid-template-columns: 1fr;
  }

  .library-page .section:not(.library-results-section) img[src*="compass"],
  .library-page .section:not(.library-results-section) img[src*="library"],
  .library-page .section:not(.library-results-section) img[src*="book"],
  .library-page .section:not(.library-results-section) img[src*="guide"],
  .library-page .section:not(.library-results-section) img[src*="support"] {
    max-height: 260px;
  }
}

@media (max-width: 680px) {
  .library-page > .section:not(.library-results-section),
  .library-page main > .section:not(.library-results-section) {
    padding: 34px 0 !important;
  }

  .library-page .section:not(.library-results-section) h1 {
    font-size: clamp(2rem, 10vw, 3rem);
  }

  .library-page .section:not(.library-results-section) p,
  .library-page .section:not(.library-results-section) li {
    font-size: 0.96rem;
  }
}
/* =========================================================
   HARD CARD FIX — STATIC LIBRARY INTRO CONTENT
   Purpose:
   Turns the loose /content/library.html sections into designed panels
   even when the HTML does not already use card/support-card wrappers.
========================================================= */

/* Each static Library section becomes a contained panel */
.library-page > .section:not(.library-results-section) > .container {
  width: min(1160px, calc(100% - 32px)) !important;
  margin: 0 auto !important;
  padding: 30px !important;
  border: 1px solid #d9e2f1 !important;
  border-radius: 30px !important;
  background: #ffffff !important;
  box-shadow: 0 18px 46px rgba(20, 40, 80, 0.08) !important;
}

/* Give space between static panels */
.library-page > .section:not(.library-results-section) {
  padding: 34px 0 !important;
}

/* First static section gets hero treatment */
.library-page > .section:first-of-type > .container {
  display: grid !important;
  gap: 20px !important;
  background:
    radial-gradient(circle at top left, rgba(36, 79, 158, 0.10), transparent 34%),
    linear-gradient(135deg, #ffffff 0%, #f7fbff 100%) !important;
}

/* Hero image should be inside the card, not acting like raw page art */
.library-page > .section:first-of-type img {
  width: 100% !important;
  max-height: 320px !important;
  object-fit: cover !important;
  border-radius: 24px !important;
  border: 1px solid #d9e2f1 !important;
  box-shadow: 0 14px 34px rgba(20, 40, 80, 0.10) !important;
}

/* Headings */
.library-page > .section:not(.library-results-section) h1,
.library-page > .section:not(.library-results-section) h2 {
  max-width: 860px !important;
  margin: 0 0 14px !important;
  color: #0f2b63 !important;
  line-height: 1.04 !important;
  letter-spacing: -0.045em !important;
}

.library-page > .section:not(.library-results-section) h1 {
  font-size: clamp(2.1rem, 4.6vw, 4rem) !important;
}

.library-page > .section:not(.library-results-section) h2 {
  font-size: clamp(1.65rem, 3vw, 2.55rem) !important;
}

.library-page > .section:not(.library-results-section) h3 {
  margin: 0 0 8px !important;
  color: #0f2b63 !important;
  font-size: 1.12rem !important;
  line-height: 1.18 !important;
}

/* Normal paragraphs */
.library-page > .section:not(.library-results-section) p {
  max-width: 820px !important;
  margin: 0 0 14px !important;
  color: #43546f !important;
  font-size: 1rem !important;
  line-height: 1.65 !important;
}

/* Eyebrow-style first small labels */
.library-page > .section:not(.library-results-section) p:first-child,
.library-page > .section:not(.library-results-section) .section-eyebrow,
.library-page > .section:not(.library-results-section) .library-kicker {
  color: #244f9e !important;
  font-size: 0.76rem !important;
  font-weight: 950 !important;
  letter-spacing: 0.09em !important;
  text-transform: uppercase !important;
}

/* Turn loose “benefit” paragraphs with bold text into cards */
.library-page > .section:not(.library-results-section) p:has(strong),
.library-page > .section:not(.library-results-section) p:has(b) {
  display: block !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 18px 20px !important;
  border: 1px solid #d9e2f1 !important;
  border-radius: 22px !important;
  background: #f8fafc !important;
  box-shadow: 0 10px 26px rgba(20, 40, 80, 0.06) !important;
}

/* Keep strong labels looking like card headings */
.library-page > .section:not(.library-results-section) p strong,
.library-page > .section:not(.library-results-section) p b {
  display: block !important;
  margin-bottom: 6px !important;
  color: #0f2b63 !important;
  font-size: 1rem !important;
  line-height: 1.22 !important;
}

/* If the file has loose groups of articles/divs, card them */
.library-page > .section:not(.library-results-section) article,
.library-page > .section:not(.library-results-section) .support-card,
.library-page > .section:not(.library-results-section) .card {
  padding: 22px !important;
  border: 1px solid #d9e2f1 !important;
  border-radius: 24px !important;
  background: #f8fafc !important;
  box-shadow: 0 10px 28px rgba(20, 40, 80, 0.06) !important;
}

/* Make loose lists look like card grids */
.library-page > .section:not(.library-results-section) ul,
.library-page > .section:not(.library-results-section) ol {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 14px !important;
  max-width: none !important;
  margin: 20px 0 0 !important;
  padding: 0 !important;
  list-style: none !important;
}

.library-page > .section:not(.library-results-section) li {
  margin: 0 !important;
  padding: 18px 20px !important;
  border: 1px solid #d9e2f1 !important;
  border-radius: 22px !important;
  background: #f8fafc !important;
  color: #43546f !important;
  font-size: 0.96rem !important;
  line-height: 1.6 !important;
  box-shadow: 0 10px 26px rgba(20, 40, 80, 0.06) !important;
}

/* If the intro has several direct paragraphs after a heading, give them grid behavior */
.library-page > .section:not(.library-results-section) > .container > h2 ~ p:has(strong),
.library-page > .section:not(.library-results-section) > .container > h1 ~ p:has(strong),
.library-page > .section:not(.library-results-section) > .container > img ~ p:has(strong) {
  display: block !important;
}

/* Button row cleanup */
.library-page > .section:not(.library-results-section) a.btn,
.library-page > .section:not(.library-results-section) .btn,
.library-page > .section:not(.library-results-section) a[class*="btn"],
.library-page > .section:not(.library-results-section) a[href*="care-compass"],
.library-page > .section:not(.library-results-section) a[href*="library.php"] {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 42px !important;
  padding: 10px 16px !important;
  margin: 6px 8px 6px 0 !important;
  border-radius: 999px !important;
  background: #244f9e !important;
  color: #ffffff !important;
  font-size: 0.9rem !important;
  font-weight: 900 !important;
  text-decoration: none !important;
  box-shadow: 0 12px 26px rgba(36, 79, 158, 0.22) !important;
}

/* Secondary-style links when there are multiple buttons */
.library-page > .section:not(.library-results-section) a.btn-secondary {
  background: #ffffff !important;
  color: #244f9e !important;
  border: 1px solid #cfdaf0 !important;
}

/* Results section remains separate and clean */
.library-results-section {
  margin-top: 20px !important;
}

/* Mobile */
@media (max-width: 760px) {
  .library-page > .section:not(.library-results-section) > .container {
    padding: 22px !important;
    border-radius: 24px !important;
  }

  .library-page > .section:not(.library-results-section) ul,
  .library-page > .section:not(.library-results-section) ol {
    grid-template-columns: 1fr !important;
  }

  .library-page > .section:not(.library-results-section) a.btn,
  .library-page > .section:not(.library-results-section) .btn,
  .library-page > .section:not(.library-results-section) a[class*="btn"],
  .library-page > .section:not(.library-results-section) a[href*="care-compass"],
  .library-page > .section:not(.library-results-section) a[href*="library.php"] {
    width: 100% !important;
    margin-right: 0 !important;
  }
}
/* =========================================================
   LIBRARY — MOVE FULL COLLECTION UNDER HERO
   Keeps the Library hero first, then shows database results,
   then shows the remaining explainer/static sections.
========================================================= */

.library-page {
  display: flex;
  flex-direction: column;
}

/* Default: static library sections go after the full collection */
.library-page > .section {
  order: 30;
}

/* Keep the first Library hero section first */
.library-page > .section:first-of-type {
  order: 10;
}

/* Move Full Collection directly under the hero */
.library-page > .library-results-section {
  order: 20;
}

/* Keep all remaining static/explainer sections after the results */
.library-page > .section:not(:first-of-type):not(.library-results-section) {
  order: 30;
}
/* =========================================================
   LIBRARY — COMPACT PAGE SPACING
========================================================= */

.library-page > .section:not(.library-results-section) {
  padding-top: 22px !important;
  padding-bottom: 22px !important;
}

.library-page > .section:not(.library-results-section) > .container {
  padding: 24px !important;
}

.library-results-section {
  padding-top: 34px !important;
  padding-bottom: 42px !important;
}

.library-results-section + .section {
  margin-top: 0 !important;
}

/* Keep the first hero tighter */
.library-page > .section:first-of-type {
  padding-top: 22px !important;
  padding-bottom: 16px !important;
}

/* Bottom guide/support card should not feel like a second hero */
.library-page .library-guide-close img {
  max-height: 220px !important;
  object-fit: cover !important;
}

/* =========================================================
   LIBRARY — SAMPLE SHELF
========================================================= */

.library-sample-section {
  padding: 28px 0 !important;
}

.library-sample-section .container {
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
}

.library-sample-header {
  max-width: 820px;
  margin-bottom: 20px;
}

.library-sample-header h2 {
  margin: 0;
  color: #0f2b63;
  font-size: clamp(1.65rem, 3vw, 2.45rem);
  line-height: 1.04;
  letter-spacing: -0.04em;
}

.library-sample-header p {
  margin: 12px 0 0;
  color: #43546f;
  font-size: 1rem;
  line-height: 1.65;
}

.library-sample-section .item-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.library-layer-jump-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.library-layer-jump-row a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 7px 12px;
  border-radius: 999px;
  background: #eaf1ff;
  color: #244f9e;
  font-size: 0.82rem;
  font-weight: 900;
  text-decoration: none;
}

.library-layer-jump-row a:hover,
.library-layer-jump-row a:focus {
  background: #244f9e;
  color: #ffffff;
}

@media (max-width: 1100px) {
  .library-sample-section .item-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .library-sample-section .item-grid {
    grid-template-columns: 1fr;
  }

  .library-layer-jump-row a {
    width: 100%;
  }
}

/* =========================================================
   LIBRARY — HIDE FULL COLLECTION UNTIL SEARCH/FILTER
========================================================= */

.library-results-grid[hidden] {
  display: none !important;
}

.library-results-grid {
  display: block;
}

/* =========================================================
   LIBRARY — DIRECT PAGE + SAMPLE SHELF + CLOSED FULL GRID
========================================================= */

.library-page--direct > .section > .container {
  width: min(1160px, calc(100% - 32px)) !important;
  margin: 0 auto !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.library-page--direct .library-direct-hero {
  order: 10 !important;
  padding: 28px 0 !important;
}

.library-page--direct .library-sample-section {
  order: 20 !important;
  padding: 20px 0 !important;
}

.library-page--direct .library-results-section {
  order: 30 !important;
  padding: 28px 0 42px !important;
}

.library-page--direct .library-care-compass-close {
  order: 40 !important;
  padding: 20px 0 34px !important;
}

.library-direct-hero__card,
.library-sample-shell,
.library-care-compass-close__card {
  overflow: hidden;
  border: 1px solid #d9e2f1;
  border-radius: 28px;
  background: #ffffff;
  box-shadow: 0 18px 46px rgba(20, 40, 80, 0.08);
}

.library-direct-hero__card {
  display: grid;
  grid-template-columns: minmax(280px, 0.92fr) minmax(0, 1.08fr);
  align-items: stretch;
}

.library-direct-hero__media img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 300px;
  max-height: 360px;
  object-fit: cover;
}

.library-direct-hero__copy,
.library-sample-shell,
.library-care-compass-close__copy {
  padding: 30px;
}

.library-direct-hero__copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.library-direct-hero__copy h1,
.library-sample-header h2,
.library-care-compass-close__copy h2 {
  margin: 0;
  color: #0f2b63;
  line-height: 1.02;
  letter-spacing: -0.045em;
}

.library-direct-hero__copy h1 {
  font-size: clamp(2rem, 4.2vw, 3.6rem);
}

.library-sample-header h2,
.library-care-compass-close__copy h2 {
  font-size: clamp(1.55rem, 3vw, 2.35rem);
}

.library-direct-hero__copy p:not(.library-kicker),
.library-sample-header p,
.library-care-compass-close__copy p:not(.library-kicker) {
  margin: 14px 0 0;
  color: #43546f;
  font-size: 1rem;
  line-height: 1.65;
}

.library-direct-hero__actions,
.library-care-compass-close__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.library-sample-header {
  max-width: 820px;
  margin-bottom: 20px;
}

.library-sample-section .item-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.library-layer-jump-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.library-layer-jump-row a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 7px 12px;
  border-radius: 999px;
  background: #eaf1ff;
  color: #244f9e;
  font-size: 0.82rem;
  font-weight: 900;
  text-decoration: none;
}

.library-layer-jump-row a:hover,
.library-layer-jump-row a:focus {
  background: #244f9e;
  color: #ffffff;
}

.library-results-grid[hidden],
.library-results-grid .item-card[hidden] {
  display: none !important;
}

.library-results-grid {
  display: block;
}

.library-care-compass-close__card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.72fr);
  align-items: stretch;
}

.library-care-compass-close__copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.library-care-compass-close__media img {
  display: block;
  width: 100%;
  height: 100%;
  max-height: 260px;
  object-fit: cover;
}

@media (max-width: 1100px) {
  .library-sample-section .item-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .library-direct-hero__card,
  .library-care-compass-close__card {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .library-direct-hero__copy,
  .library-sample-shell,
  .library-care-compass-close__copy {
    padding: 22px;
  }

  .library-sample-section .item-grid {
    grid-template-columns: 1fr;
  }

  .library-direct-hero__actions,
  .library-care-compass-close__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .library-direct-hero__actions .btn,
  .library-care-compass-close__actions .btn,
  .library-layer-jump-row a {
    width: 100%;
  }
}
/* =========================================================
   LIBRARY — BROCHURE PAGE
========================================================= */

.library-page--brochure {
  background: #f6f8fb;
}

.library-page--brochure > .section {
  padding: 26px 0 !important;
}

.library-page--brochure > .section > .container {
  width: min(1160px, calc(100% - 32px)) !important;
  margin: 0 auto !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.library-brochure-hero__card,
.library-brochure-panel,
.library-brochure-close__card {
  overflow: hidden;
  border: 1px solid #d9e2f1;
  border-radius: 30px;
  background: #ffffff;
  box-shadow: 0 18px 46px rgba(20, 40, 80, 0.08);
}

.library-brochure-hero__card {
  display: grid;
  grid-template-columns: minmax(280px, 0.95fr) minmax(0, 1.05fr);
  align-items: stretch;
}

.library-brochure-hero__image img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 350px;
  object-fit: cover;
}

.library-brochure-hero__copy,
.library-brochure-panel,
.library-brochure-close__copy {
  padding: 34px;
}

.library-brochure-hero__copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.library-brochure-hero__copy h1,
.library-brochure-section-head h2,
.library-brochure-close__copy h2 {
  margin: 0;
  color: #0f2b63;
  line-height: 1.02;
  letter-spacing: -0.045em;
}

.library-brochure-hero__copy h1 {
  font-size: clamp(2.15rem, 4.4vw, 3.8rem);
}

.library-brochure-section-head h2,
.library-brochure-close__copy h2 {
  font-size: clamp(1.65rem, 3vw, 2.45rem);
}

.library-brochure-hero__copy p:not(.library-kicker),
.library-brochure-section-head p,
.library-brochure-close__copy p:not(.library-kicker) {
  margin: 14px 0 0;
  color: #43546f;
  font-size: 1rem;
  line-height: 1.65;
}

.library-brochure-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.library-brochure-section-head {
  max-width: 820px;
  margin-bottom: 22px;
}

.library-brochure-section-head--row {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: end;
  max-width: none;
}

.library-brochure-small-link {
  color: #244f9e;
  font-weight: 900;
  text-decoration: none;
  white-space: nowrap;
}

.library-brochure-process-grid,
.library-brochure-layer-grid,
.library-brochure-feature-grid {
  display: grid;
  gap: 16px;
}

.library-brochure-process-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.library-brochure-layer-grid,
.library-brochure-feature-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.library-brochure-process-grid article,
.library-brochure-layer-grid a,
.library-brochure-feature-card {
  min-height: 100%;
  padding: 20px;
  border: 1px solid #d9e2f1;
  border-radius: 24px;
  background: #f8fafc;
  box-shadow: 0 10px 26px rgba(20, 40, 80, 0.06);
}

.library-brochure-process-grid article span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  margin-bottom: 12px;
  border-radius: 999px;
  background: #244f9e;
  color: #ffffff;
  font-weight: 950;
}

.library-brochure-layer-grid a {
  display: flex;
  flex-direction: column;
  color: inherit;
  text-decoration: none;
}

.library-brochure-layer-grid a > span,
.library-brochure-mini-label {
  width: fit-content;
  margin: 0 0 10px;
  padding: 6px 10px;
  border-radius: 999px;
  background: #eaf1ff;
  color: #244f9e;
  font-size: 0.72rem;
  font-weight: 950;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.library-brochure-process-grid h3,
.library-brochure-layer-grid h3,
.library-brochure-feature-card h3 {
  margin: 0;
  color: #0f2b63;
  font-size: 1.08rem;
  line-height: 1.2;
}

.library-brochure-process-grid p,
.library-brochure-layer-grid p,
.library-brochure-feature-card p {
  margin: 10px 0 0;
  color: #4c5d76;
  font-size: 0.94rem;
  line-height: 1.58;
}

.library-brochure-layer-grid strong {
  margin-top: auto;
  padding-top: 14px;
  color: #244f9e;
  font-size: 0.9rem;
}

.library-brochure-feature-card {
  display: flex;
  flex-direction: column;
}

.library-brochure-feature-card a {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 38px;
  margin-top: auto;
  padding: 9px 14px;
  border-radius: 999px;
  background: #244f9e;
  color: #ffffff;
  font-size: 0.86rem;
  font-weight: 900;
  text-decoration: none;
}

.library-results-grid[hidden],
.library-results-grid .item-card[hidden] {
  display: none !important;
}

.library-results-grid {
  display: block;
}

.library-brochure-close__card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.75fr);
  align-items: stretch;
}

.library-brochure-close__copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.library-brochure-close__image img {
  display: block;
  width: 100%;
  height: 100%;
  max-height: 280px;
  object-fit: cover;
}

@media (max-width: 1100px) {
  .library-brochure-process-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .library-brochure-layer-grid,
  .library-brochure-feature-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .library-brochure-hero__card,
  .library-brochure-close__card {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .library-page--brochure > .section {
    padding: 18px 0 !important;
  }

  .library-brochure-hero__copy,
  .library-brochure-panel,
  .library-brochure-close__copy {
    padding: 22px;
  }

  .library-brochure-process-grid,
  .library-brochure-layer-grid,
  .library-brochure-feature-grid {
    grid-template-columns: 1fr;
  }

  .library-brochure-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .library-brochure-actions .btn,
  .library-brochure-feature-card a {
    width: 100%;
  }

  .library-brochure-section-head--row {
    display: block;
  }

  .library-brochure-small-link {
    display: inline-flex;
    margin-top: 12px;
  }

  .library-brochure-hero__image img,
  .library-brochure-close__image img {
    min-height: 220px;
    max-height: 260px;
  }
}
/* =========================================================
   LIBRARY — SEARCH RESULT GOVERNOR
   Shows 5 results first, then reveals more by button.
========================================================= */

.library-load-more-wrap[hidden] {
  display: none !important;
}

.library-load-more-wrap {
  display: flex;
  justify-content: center;
  margin-top: 22px;
}

.library-load-more-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 20px;
  border: 1px solid #244f9e;
  border-radius: 999px;
  background: #244f9e;
  color: #ffffff;
  font-size: 0.92rem;
  font-weight: 950;
  cursor: pointer;
  box-shadow: 0 12px 26px rgba(36, 79, 158, 0.22);
}

.library-load-more-button:hover,
.library-load-more-button:focus {
  background: #0f2b63;
  border-color: #0f2b63;
}

@media (max-width: 700px) {
  .library-load-more-button {
    width: 100%;
  }
}