.medlit-education-page, .medlit-library {
    --medlit-ink: #173e48;
    --medlit-muted: #526971;
    --medlit-teal: #116a73;
    --medlit-line: #dae7e9;
    background: #fff;
}
.medlit-education-page #primary.medlit-education-main { width: 100%; margin: 0; padding: 0; border: 0; }
.medlit-education-page #content > .ast-container { max-width: 1280px; padding-inline: 32px; }
.medlit-education-shell { color: var(--medlit-ink); padding-block: 48px 72px; font-size: 17px; line-height: 1.7; }
.medlit-education-shell h1, .medlit-education-shell h2, .medlit-education-shell h3 { color: var(--medlit-ink); font-family: inherit; font-weight: 650; letter-spacing: -.035em; }
.medlit-education-shell p { margin: 0 0 1em; }
.medlit-education-shell .medlit-eyebrow { color: var(--medlit-teal); font-size: 12px; font-weight: 700; letter-spacing: .13em; line-height: 1.5; text-transform: uppercase; margin-bottom: 14px; }
.medlit-library-banner { line-height: 0; }
.medlit-library-banner img { display: block; width: 100%; height: var(--medlit-banner-height, 520px); object-fit: cover; }
/* Narrow screens: keep the photo's proportions instead of a very tall crop. */
@media (max-width: 640px) { .medlit-library-banner img { height: min(var(--medlit-banner-height, 520px), 70vw); } }
.medlit-library-hero { background: var(--ast-global-color-5, #e4f3f6); border: 1px solid #e1efec; border-radius: 24px; padding: 54px 56px; display: grid; grid-template-columns: 1.3fr 1fr; align-items: center; gap: 32px; overflow: hidden; }
.medlit-eyebrow-pill { display: inline-block; background: #fff; border: 1px solid #d6e8e3; border-radius: 40px; padding: 8px 14px; }
.medlit-library-hero h1 { font-size: clamp(42px, 5vw, 68px); line-height: 1.1; margin: 6px 0 20px; }
.medlit-heading-dot { color: #e9aa56; }
.medlit-library-intro { color: var(--medlit-muted); max-width: 550px; font-size: 18px; }
.medlit-library-intro p:last-child { margin-bottom: 24px; }
.medlit-education-shell a.medlit-button { display: inline-flex; justify-content: center; align-items: center; gap: 32px; background: var(--medlit-teal); color: white; text-decoration: none; border: 1px solid var(--medlit-teal); border-radius: 8px; padding: 12px 19px; font-size: 15px; font-weight: 600; transition: background .2s; }
.medlit-education-shell a.medlit-button:hover { background: #0c5158; color: #fff; }
.medlit-hero-art { position: relative; height: 270px; display: grid; place-items: center; }
.medlit-art-ring { position: absolute; width: 260px; height: 260px; border: 1px solid #bfdad3; border-radius: 50%; }
.medlit-art-ring::after { content: ''; position: absolute; inset: 25px; border: 1px dashed #bfdad3; border-radius: 50%; }
.medlit-art-book { z-index: 1; width: 150px; height: 165px; display: grid; place-items: center; background: #116a73; color: #fff; border-radius: 20px; transform: rotate(-9deg); box-shadow: 12px 14px 0 #badbd1; }
.medlit-art-book svg { width: 94px; height: 94px; }
.medlit-library { margin-top: 60px; }
.medlit-library-heading { display: flex; justify-content: space-between; gap: 20px; align-items: end; margin-bottom: 28px; }
.medlit-library-heading .medlit-eyebrow { margin-bottom: 8px; }
.medlit-library-heading h2 { font-size: 34px; margin: 0; line-height: 1.2; }
.medlit-topic-count { color: var(--medlit-muted); font-size: 14px; border: 1px solid var(--medlit-line); border-radius: 30px; padding: 5px 13px; white-space: nowrap; }
.medlit-topic-search { margin: 0 0 28px; }
.medlit-topic-search label { display: block; color: var(--medlit-ink); font-size: 15px; font-weight: 600; margin-bottom: 10px; }
.medlit-search-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.medlit-search-input { position: relative; flex: 1 1 260px; min-width: 0; }
.medlit-search-input svg { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); width: 21px; height: 21px; color: var(--medlit-muted); pointer-events: none; }
.medlit-topic-search input[type="search"] { box-sizing: border-box; width: 100%; min-height: 48px; margin: 0; padding: 12px 16px 12px 48px; border: 1px solid #b9cfd0; border-radius: 8px; color: var(--medlit-ink); background: #fff; font: inherit; font-size: 16px; line-height: 1.4; box-shadow: none; transition: none; animation: none; }
.medlit-topic-search input::placeholder { color: var(--medlit-muted); opacity: 1; }
.medlit-topic-search button { min-height: 48px; padding: 12px 24px; border: 1px solid var(--medlit-teal); border-radius: 8px; background: var(--medlit-teal); color: #fff; font: inherit; font-size: 15px; font-weight: 600; line-height: 1.4; }
.medlit-topic-search button:hover { background: #0c5158; }
.medlit-topic-search input[type="search"]:focus { border-color: var(--medlit-teal); box-shadow: none; outline: 2px solid transparent; outline-offset: 2px; }
.medlit-topic-search button:focus-visible, .medlit-topic-search .medlit-clear-search:focus-visible { outline: 2px solid var(--medlit-teal); outline-offset: 2px; }
.medlit-clear-search { color: var(--medlit-teal); font-size: 14px; text-underline-offset: 3px; }
.medlit-topic-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.medlit-topic-card { --medlit-card-bg: #e3f0ee; --medlit-card-color: #216c68; border: 1px solid var(--medlit-line); border-radius: 16px; overflow: hidden; background: #fff; transition: box-shadow .2s, transform .2s; }
.medlit-topic-card:hover { transform: translateY(-4px); box-shadow: 0 12px 28px #173e4812; }
.medlit-palette-0 { --medlit-card-bg: #e3f0ee; --medlit-card-color: #216c68; }
.medlit-palette-1 { --medlit-card-bg: #f0eaf4; --medlit-card-color: #765783; }
.medlit-palette-2 { --medlit-card-bg: #faf0db; --medlit-card-color: #896120; }
.medlit-palette-3 { --medlit-card-bg: #e7f0f9; --medlit-card-color: #3e668a; }
.medlit-topic-card .medlit-card-link { display: flex; flex-direction: column; height: 100%; color: inherit; text-decoration: none; }
.medlit-card-visual { height: 172px; position: relative; overflow: hidden; background: var(--medlit-card-bg); }
.medlit-topic-image { width: 100%; height: 100%; object-fit: cover; display: block; }
.medlit-card-number { position: absolute; top: 14px; left: 16px; font-size: 12px; font-weight: 700; letter-spacing: .1em; color: var(--medlit-card-color); background: #ffffffd9; border-radius: 6px; padding: 3px 8px; }
.medlit-illustration { height: 100%; min-height: 150px; width: 100%; position: relative; display: grid; place-items: center; color: var(--medlit-card-color); background: var(--medlit-card-bg); overflow: hidden; }
.medlit-illustration-icon { width: 90px; height: 90px; background: #ffffffb3; border: 1px solid #ffffff; border-radius: 25px; display: grid; place-items: center; transform: rotate(-7deg); }
.medlit-illustration-icon svg { width: 48px; height: 48px; transform: rotate(7deg); }
.medlit-card-body { display: flex; flex-direction: column; flex: 1; padding: 23px; }
.medlit-card-body h3 { font-size: 21px; line-height: 1.35; margin-bottom: 12px; }
.medlit-card-body p { color: var(--medlit-muted); font-size: 14px; line-height: 1.65; }
.medlit-card-cta { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 16px; border-top: 1px solid #edf1f2; color: var(--medlit-teal); font-weight: 650; font-size: 13px; }
.medlit-card-cta > span { font-size: 21px; }
.medlit-library-note { display: flex; gap: 18px; align-items: center; background: #faf7ef; border: 1px solid #efe8d8; border-radius: 12px; padding: 22px 28px; margin-top: 36px; color: #625b4b; }
.medlit-library-note > svg { flex-shrink: 0; width: 28px; height: 28px; }
.medlit-library-note p { margin: 0; font-size: 15px; }
.medlit-breadcrumb { margin: 0 0 28px; font-size: 14px; }
.medlit-language-switcher { display: flex; justify-content: flex-end; gap: 4px; margin-bottom: 24px; font-size: 13px; line-height: 1.5; }
.medlit-language-switcher a, .medlit-language-switcher > span { display: inline-flex; justify-content: center; align-items: center; min-width: 44px; min-height: 40px; padding: 8px; border-radius: 8px; text-decoration: none; font-weight: 600; }
.medlit-language-switcher a { color: var(--medlit-teal); }
.medlit-language-switcher a:hover { background: #edf6f5; }
.medlit-language-switcher a[aria-current="page"] { background: var(--medlit-teal); color: #fff; }
.medlit-language-switcher > span { color: #7a898d; background: #f5f7f7; }
.medlit-breadcrumb a { text-decoration: none; color: var(--medlit-teal); }
.medlit-section-container { display: flex; flex-direction: column; min-width: 0; }
.medlit-section-hero { display: grid; grid-template-columns: 1.4fr 1fr; border: 1px solid var(--medlit-line); border-radius: 20px; overflow: hidden; }
.medlit-section-heading { padding: 44px; align-self: center; }
.medlit-section-heading h1 { font-size: clamp(30px, 3.3vw, 46px); line-height: 1.18; margin: 0 0 20px; overflow-wrap: anywhere; }
.medlit-section-description { color: var(--medlit-muted); font-size: 17px; }
.medlit-section-description p:last-child { margin-bottom: 0; }
.medlit-section-visual { min-height: 280px; }
.medlit-section-visual .medlit-illustration-icon { width: 130px; height: 130px; border-radius: 34px; }
.medlit-section-visual .medlit-illustration-icon svg { width: 70px; height: 70px; }
.medlit-section-body { width: 100%; min-width: 0; }
.medlit-video-section { margin-top: 54px; }
.medlit-video-section > h2, .medlit-quiz-section > h2 { margin: 0 0 24px; font-size: 30px; }
.medlit-video-placeholder { display: flex; flex-direction: column; justify-content: center; align-items: center; min-height: 300px; padding: 32px; text-align: center; border: 1px dashed #b9cfd0; background: #f5f9f8; border-radius: 14px; }
.medlit-play-symbol { display: grid; place-items: center; width: 64px; height: 64px; font-size: 36px; color: var(--medlit-teal); border: 1px solid #c7dfd9; border-radius: 50%; background: #fff; margin-bottom: 20px; }
.medlit-video-placeholder h3 { font-size: 23px; margin-bottom: 8px; }
.medlit-video-placeholder p { color: var(--medlit-muted); font-size: 15px; margin: 0; }
.medlit-video-embed { width: 100%; aspect-ratio: 16 / 9; background: #f0f5f4; border-radius: 14px; overflow: hidden; }
.medlit-video-embed iframe, .medlit-video-embed video, .medlit-video-embed .wp-video { width: 100% !important; height: 100% !important; border: 0; }
.medlit-learning-content { margin-top: 40px; overflow-wrap: anywhere; }
.medlit-quiz-section { width:100%; min-width:0; margin-top:40px; }
.medlit-quiz-section .h5p-iframe-wrapper, .medlit-quiz-section iframe.h5p-iframe { width:100%; max-width:100%; }
.medlit-learning-content > :last-child { margin-bottom: 0; }
.medlit-section-footer { margin-top: 48px; padding-top: 28px; border-top: 1px solid var(--medlit-line); display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; }
.medlit-section-footer p { color: var(--medlit-muted); font-size: 15px; margin: 0; }
.medlit-education-shell a.medlit-button-secondary { background: #fff; color: var(--medlit-teal); }
.medlit-education-shell a.medlit-button-secondary:hover { background: #edf6f5; color: var(--medlit-teal); }
.medlit-education-shell a:focus-visible { outline: 3px solid #c7822d; outline-offset: 4px; }
.medlit-empty { padding: 28px; border: 1px dashed var(--medlit-line); border-radius: 12px; }
@media (max-width: 1000px) {
    .medlit-library-hero { padding: 40px 32px; grid-template-columns: 1.4fr 1fr; }
    .medlit-topic-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .medlit-art-ring { width: 210px; height: 210px; }
    .medlit-section-heading { padding: 32px; }
}
@media (max-width: 640px) {
    .medlit-education-page #content > .ast-container { padding-inline: 20px; }
    .medlit-education-shell { padding-block: 24px 40px; }
    .medlit-library-hero { padding: 30px 24px 8px; grid-template-columns: 1fr; gap: 0; border-radius: 18px; }
    .medlit-library-intro { font-size: 16px; }
    .medlit-hero-art { height: 230px; width: 260px; max-width: 100%; margin-inline: auto; }
    .medlit-art-book { width: 116px; height: 130px; }
    .medlit-art-book svg { width: 74px; height: 74px; }
    .medlit-library { margin-top: 38px; }
    .medlit-library-heading h2 { font-size: 28px; }
    .medlit-library-heading .medlit-eyebrow { font-size: 10px; }
    .medlit-topic-count { font-size: 12px; }
    .medlit-topic-grid { grid-template-columns: 1fr; gap: 20px; }
    .medlit-card-visual { height: 160px; }
    .medlit-card-body { padding: 22px; }
    .medlit-library-note { align-items: start; padding: 20px; }
    .medlit-section-hero { grid-template-columns: 1fr; }
    .medlit-section-heading { padding: 28px 24px; }
    .medlit-section-visual { min-height: 200px; height: 200px; }
    .medlit-section-visual .medlit-illustration-icon { width: 100px; height: 100px; }
    .medlit-section-visual .medlit-illustration-icon svg { width: 54px; height: 54px; }
    .medlit-video-section { margin-top: 36px; }
    .medlit-video-section > h2, .medlit-quiz-section > h2 { font-size: 26px; }
    .medlit-video-placeholder { padding: 24px 16px; min-height: 250px; }
}
@media (prefers-reduced-motion: reduce) {
    .medlit-topic-card, .medlit-education-shell a.medlit-button { transition: none; }
    .medlit-topic-card:hover { transform: none; }
}
