.content-page { background: var(--paper); }

.library-hero { padding: 88px 0 78px; color: var(--ink); background: var(--blue-soft); }
.library-hero h1, .article-hero h1 { margin: 0; font-family: var(--display); font-size: clamp(2.6rem, 5vw, 4.5rem); font-weight: 400; line-height: 1.12; letter-spacing: -.04em; }
.library-hero > .container > p:last-child { max-width: 650px; margin: 24px 0 0; color: var(--muted); font-size: 1.02rem; }
.content-library { padding: 40px 0 110px; background: var(--white); }
.library-tools { position: sticky; top: 88px; z-index: 35; display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 22px; padding: 17px 0; background: rgba(255,255,255,.97); border-bottom: 1px solid var(--line); }
.search-field { position: relative; max-width: 430px; }
.search-field input { width: 100%; min-height: 48px; padding: 10px 44px 10px 16px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); background: var(--paper); font: inherit; }
.search-field input:focus { border-color: var(--blue); outline: 2px solid rgba(20,107,196,.18); }
.search-field svg { position: absolute; right: 15px; top: 14px; width: 20px; height: 20px; color: var(--muted); }
.filter-buttons { display: flex; border: 1px solid var(--line); }
.filter-buttons button { min-height: 42px; padding: 8px 14px; border: 0; color: var(--muted); background: transparent; font-size: .875rem; font-weight: 750; cursor: pointer; }
.filter-buttons button + button { border-left: 1px solid var(--line); }
.filter-buttons button.active { color: var(--white); background: var(--blue); }
.result-count { margin: 0; color: var(--muted); font-size: .875rem; white-space: nowrap; }
.result-count strong { color: var(--ink); }

.editorial-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 38px 24px; padding-top: 42px; }
.editorial-card[hidden] { display: none; }
.editorial-image { position: relative; overflow: hidden; display: grid; place-items: center; aspect-ratio: 16 / 9; background: var(--blue-soft); }
.editorial-image img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.editorial-card:hover .editorial-image img { transform: scale(1.025); }
.editorial-image > span:not(.editorial-placeholder) { position: absolute; left: 12px; top: 12px; padding: 5px 9px; color: var(--white); background: rgba(21,54,83,.9); font-size: .875rem; font-weight: 800; }
.editorial-placeholder { width: 100%; height: 100%; display: grid; place-items: center; color: var(--blue); font-family: var(--display); font-size: 1rem; font-weight: 700; letter-spacing: .13em; }
.editorial-card-body { position: relative; padding: 18px 36px 0 0; }
.editorial-card-body > p { margin: 0 0 7px; color: var(--blue); font-size: .875rem; font-weight: 800; letter-spacing: .1em; }
.editorial-card h2 { margin: 0; color: var(--ink); font-family: var(--display); font-size: 1.35rem; font-weight: 400; line-height: 1.18; }
.card-arrow { position: absolute; right: 3px; top: 36px; color: var(--blue); }
.empty-results { padding: 70px 0; color: var(--muted); text-align: center; }

.article-layout { padding: 66px 0 110px; background: var(--white); }
.breadcrumb { display: inline-block; margin-bottom: 48px; padding-bottom: 3px; border-bottom: 1px solid currentColor; color: var(--blue-dark); font-size: .875rem; font-weight: 750; }
.article-hero { max-width: 1010px; }
.article-hero h1 { max-width: 980px; color: var(--ink); font-size: clamp(2.3rem, 4.5vw, 4.1rem); }
.article-cover { overflow: hidden; margin: 44px 0 0; aspect-ratio: 16 / 8; background: var(--blue-soft); }
.article-cover img { width: 100%; height: 100%; object-fit: cover; }
.article-main { max-width: 1010px; display: grid; grid-template-columns: minmax(0,1fr) 255px; gap: 72px; padding-top: 58px; }
.article-body { min-width: 0; color: var(--text); font-size: 1.01rem; line-height: 1.82; }
.article-body h2, .article-body h3, .article-body h4 { margin: 2em 0 .7em; color: var(--blue-dark); font-family: var(--display); font-weight: 400; line-height: 1.22; }
.article-body h2 { font-size: 2rem; }
.article-body h3 { font-size: 1.55rem; }
.article-body p { margin: 0 0 1.35em; }
.article-body ul, .article-body ol { margin: 0 0 1.5em; padding-left: 1.3em; }
.article-body a { color: var(--blue-dark); text-decoration: underline; text-underline-offset: 3px; }
.article-body figure { display: grid; justify-items: center; margin: 34px 0; }
.article-body figure img, .migrated-text img { width: auto; max-width: 100%; height: auto; }
.article-body table { width: 100%; border-collapse: collapse; }
.article-body th, .article-body td { padding: 10px; border: 1px solid var(--line); text-align: left; }
.article-aside { align-self: start; position: sticky; top: 126px; }
.aside-card { display: grid; padding: 20px; border: 1px solid var(--line); background: var(--paper); }
.aside-card span { color: var(--muted); font-size: .875rem; letter-spacing: .1em; }
.aside-card strong { margin-top: 5px; color: var(--ink); font-family: var(--display); font-size: 1.05rem; font-weight: 400; }
.tag-list { display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0 0; padding: 0; list-style: none; }
.tag-list li { padding: 5px 8px; color: var(--blue-dark); background: var(--blue-soft); font-size: .875rem; font-weight: 700; }
.aside-callout { margin-top: 20px; padding: 22px; border: 1px solid var(--line); border-radius: 14px; color: var(--ink); background: var(--blue-soft); }
.aside-callout p { color: var(--muted); font-size: .875rem; line-height: 1.55; }
.aside-callout a { color: var(--blue-dark); font-size: .875rem; font-weight: 800; text-decoration: underline; text-underline-offset: 3px; }
.video-consent { position: relative; overflow: hidden; margin: 34px 0; aspect-ratio: 16 / 9; display: grid; place-items: center; background: linear-gradient(rgba(21,54,83,.22),rgba(21,54,83,.36)), var(--video-poster, none) center/cover, var(--ink); }
.video-play { display: inline-flex; align-items: center; gap: 15px; max-width: 390px; margin: 16px; padding: 16px 19px; border: 0; color: var(--ink); background: var(--white); text-align: left; cursor: pointer; box-shadow: var(--shadow); }
.video-play .play-icon { flex: 0 0 auto; width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; color: var(--white); background: var(--blue); font-size: .875rem; }
.video-play span:last-child { display: grid; }
.video-play strong { font-size: .88rem; }
.video-play small { margin-top: 2px; color: var(--muted); font-size: .875rem; }
.video-consent iframe, .video-consent video { width: 100%; height: 100%; border: 0; }
.video-consent video { object-fit: contain; background: #000; }
.article-pagination { max-width: 1010px; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 68px; padding-top: 28px; border-top: 1px solid var(--line); }
.article-pagination a { display: grid; padding: 18px; border: 1px solid var(--line); background: var(--paper); }
.article-pagination a:last-child { text-align: right; }
.article-pagination span { color: var(--muted); font-size: .875rem; }
.article-pagination strong { margin-top: 4px; color: var(--ink); font-family: var(--display); font-size: .95rem; font-weight: 400; }

.gallery-section { padding-top: 88px; padding-bottom: 106px; background: var(--white); }
.gallery-heading { max-width: 740px; margin-bottom: 40px; }
.gallery-heading > p:last-child { color: var(--muted); }
.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px 20px; }
.gallery-item { margin: 0; }
.gallery-open { overflow: hidden; width: 100%; aspect-ratio: 4 / 3; display: block; padding: 0; border: 0; background: var(--blue-soft); cursor: zoom-in; }
.gallery-open img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.gallery-open:hover img { transform: scale(1.025); }
.gallery-item figcaption { margin-top: 9px; color: var(--muted); font-size: .875rem; }
.clinical-gallery { background: var(--blue-soft); }
.gallery-dialog { position: fixed; inset: 0; width: min(94vw,1200px); max-width: none; max-height: 94vh; padding: 44px 18px 18px; border: 0; background: var(--white); box-shadow: var(--shadow); }
.gallery-dialog::backdrop { background: rgba(12,34,52,.85); }
.gallery-dialog img { max-width: 100%; max-height: calc(94vh - 90px); margin: auto; object-fit: contain; }
.gallery-dialog p { margin: 10px 0 0; color: var(--muted); font-size: .875rem; text-align: center; }
.dialog-close { position: absolute; right: 12px; top: 8px; width: 36px; height: 36px; border: 0; background: transparent; color: var(--ink); font-size: 1.8rem; cursor: pointer; }

@media (max-width: 900px) {
  .editorial-grid, .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .library-tools { grid-template-columns: 1fr auto; }
  .filter-buttons { grid-row: 2; grid-column: 1 / -1; justify-self: start; }
  .article-main { grid-template-columns: 1fr; gap: 42px; }
  .article-aside { position: static; display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
  .aside-callout { margin-top: 0; }
}

@media (max-width: 680px) {
  .library-hero { padding: 58px 0; }
  .library-hero h1 { font-size: 2.8rem; }
  .content-library { padding-top: 20px; }
  .library-tools { top: 76px; grid-template-columns: 1fr auto; }
  .filter-buttons { width: 100%; overflow-x: auto; }
  .filter-buttons button { flex: 0 0 auto; }
  .editorial-grid, .gallery-grid { grid-template-columns: 1fr; }
  .article-layout { padding-top: 40px; }
  .breadcrumb { margin-bottom: 35px; }
  .article-hero h1 { font-size: 2.4rem; }
  .article-cover { margin-top: 32px; aspect-ratio: 16 / 10; }
  .article-main { padding-top: 38px; }
  .article-aside { grid-template-columns: 1fr; }
  .article-pagination { grid-template-columns: 1fr; }
  .article-pagination a:last-child { text-align: left; }
}
/* Light surfaces and readable, sentence-case editorial typography. */
.editorial-image, .article-cover, .gallery-open, .article-pagination a, .aside-card { border-radius: 14px; }
.filter-buttons { overflow: hidden; border-radius: 10px; }
.video-consent, .video-play, .gallery-dialog { border-radius: 14px; }
.article-body h2 { font-size: 1.8rem; }
.editorial-card h2 { font: 600 1.125rem/1.4 var(--body); }
.library-hero { padding: 65px 0; }
.gallery-heading h2 { margin: 0; font: 400 clamp(2rem,3vw,3rem)/1.15 var(--display); }
.article-cover { max-height: 440px; }
.breadcrumb { color: var(--blue-dark); }
.tag-list li { border-radius: 6px; }
