/* Visible focus on both light and dark backgrounds; no fixed overlay obscures it. */
body :where(a,button,input,select,textarea,summary,[tabindex]):focus-visible { outline:3px solid #fff !important; outline-offset:2px !important; box-shadow:0 0 0 6px #123345 !important; }
#bde-main:focus { outline:none; }
html { scroll-padding-top:calc(var(--kpim-sticky-height,0px) + var(--wp-admin--admin-bar--height,0px) + 16px); }
:where(a,button,input,select,textarea,summary,[tabindex]) { scroll-margin-block:16px; }
main { overflow-wrap:anywhere; }
main :where(img,video,iframe) { max-width:100%; }
/* Imported post images and legacy caption widths must fit the article on mobile. */
.kpim-post-body img { max-width:100%; height:auto; }
.kpim-post-body .wp-caption { max-width:100%; }
.kpim-site-header :where(a,button), .kpim-footer a { min-height:44px; }
.kpim-footer a { max-width:100%; overflow-wrap:anywhere; white-space:normal; }
.kpim-footer .kpim-footer-office-link { display:inline-block; }
.kpim-hero .bde-button__button { font-size:1rem; white-space:normal; }
/* The nested hero holds only decorative strips and must not intercept clicks. */
.kpim-hero .kpim-hero { pointer-events:none; }
.kpim-access-help { max-width:900px; margin:0 auto; padding:56px 24px; color:#123345; font-family:Inter,Arial,sans-serif; font-size:1.0625rem; line-height:1.7; }
.kpim-access-help h1 { font-size:clamp(2rem,4vw,3rem); line-height:1.2; color:#123345; }
.kpim-access-help h2 { font-size:1.5rem; line-height:1.3; margin-top:2em; color:#123345; }
.kpim-access-help a { color:#0d5670; text-decoration:underline; text-underline-offset:3px; }
.kpim-access-help li { margin-block:.5em; }
/* Relative sizes preserve the user's browser font preference and browser zoom. */
html[data-kpim-text] { font-size:calc(100% * var(--kpim-text-scale,1)); }
/* One preference controls link/button underlines, including nested labels and hover/current states. */
html:not([data-kpim-links]) body :is(a,button,[role="button"]),
html:not([data-kpim-links]) body :is(a,button,[role="button"]) * { text-decoration:none !important; }
/* Inline prose links remain identifiable without relying on colour alone (1.4.1).
   Navigation, cards and buttons keep their existing design and preference. */
html:not([data-kpim-links]) body .kpim-access-help a,
html:not([data-kpim-links]) body .kpim-access-help a *,
html:not([data-kpim-links]) body :is(.kpim-post-body,.kpim-program-prose) :is(p,li) a,
html:not([data-kpim-links]) body :is(.kpim-post-body,.kpim-program-prose) :is(p,li) a * { text-decoration:underline !important; text-underline-offset:.2em; }
html[data-kpim-links] body :is(a,button,[role="button"]),
html[data-kpim-links] body :is(a,button,[role="button"]) * { text-decoration:underline !important; text-underline-offset:.2em; text-decoration-thickness:.1em; }
html[data-kpim-spacing] body :where(p,li,a,button,input,label,summary,h1,h2,h3,h4,h5,h6,output,.bde-text,.bde-f-text) { line-height:1.5 !important; letter-spacing:.12em !important; word-spacing:.16em !important; }
html[data-kpim-spacing] body p { margin-bottom:2em !important; }
html[data-kpim-contrast] body, html[data-kpim-contrast] body :where(div,section,article,header,footer,main,nav,aside,p,h1,h2,h3,h4,h5,h6,ul,ol,li,span,small,form,label,output,time,fieldset,legend,table,th,td,details,summary,blockquote,address,dl,dt,dd) { color:#fff !important; background-color:#101010 !important; background-image:none !important; text-shadow:none !important; }
html[data-kpim-contrast] body :where(a,a:visited) { color:#8be8ff !important; background-color:#101010 !important; background-image:none !important; }
html[data-kpim-contrast] body :where(button,input,select,textarea) { color:#fff !important; background:#101010 !important; border:2px solid #fff !important; }
html[data-kpim-contrast] body :where(button[aria-pressed="true"],a:hover,button:hover) { color:#101010 !important; background:#ffeb3b !important; }
html[data-kpim-contrast] button[aria-pressed="true"] span { color:inherit !important; background:transparent !important; }
html[data-kpim-contrast] .kpim-shape { visibility:hidden; }
/* Hero artwork also lives in pseudo-elements, including the custom medical cross.
   Match the named shapes even when the shared kpim-shape class is omitted. */
html[data-kpim-contrast] body .kpim-hero {
  --kpim-img-1:none; --kpim-img-2:none; --kpim-img-3:none;
  --kpim-img-4:none; --kpim-img-5:none; --kpim-strip-image:none;
  background:#101010 !important; color:#fff !important;
}
html[data-kpim-contrast] body .kpim-hero > .section-container {
  background:#101010 !important; color:#fff !important;
}
html[data-kpim-contrast] body .kpim-hero > .section-background-overlay,
html[data-kpim-contrast] body .kpim-hero > .section-container > .kpim-hero,
html[data-kpim-contrast] body .kpim-hero :is(.kpim-shape,.kpim-shape--1,.kpim-shape--2,.kpim-shape--3,.kpim-shape--4,.kpim-shape--5,.kpim-shape--plus),
html[data-kpim-contrast] body .kpim-hero :is(.kpim-shape,.kpim-shape--1,.kpim-shape--2,.kpim-shape--3,.kpim-shape--4,.kpim-shape--5,.kpim-shape--plus)::before,
html[data-kpim-contrast] body .kpim-hero :is(.kpim-shape,.kpim-shape--1,.kpim-shape--2,.kpim-shape--3,.kpim-shape--4,.kpim-shape--5,.kpim-shape--plus)::after,
html[data-kpim-contrast] body .kpim-hero::before,
html[data-kpim-contrast] body .kpim-hero::after {
  display:none !important; background:none !important;
  animation:none !important; transition:none !important;
  transform:none !important; filter:none !important; box-shadow:none !important;
}
html[data-kpim-contrast] body .kpim-hero .bde-button__button {
  color:#8be8ff !important; background:#101010 !important;
  border:2px solid currentColor !important;
  transition:none !important;
}
html[data-kpim-contrast] body .kpim-hero .bde-button__button:hover,
html[data-kpim-contrast] body .kpim-hero .bde-button__button:focus-visible {
  color:#101010 !important; background:#ffeb3b !important; border-color:#ffeb3b !important;
}
html[data-kpim-contrast] body .kpim-hero .bde-button__button :is(span,svg) {
  color:inherit !important; background:transparent !important;
  transition:none !important;
}
html[data-kpim-contrast] body :focus-visible { outline-color:#ffeb3b !important; box-shadow:0 0 0 6px #101010 !important; }
html[data-kpim-motion], html[data-kpim-motion] *, html[data-kpim-motion] *::before, html[data-kpim-motion] *::after { scroll-behavior:auto !important; animation:none !important; transition:none !important; }
@media (prefers-reduced-motion:reduce) { html,html *,html *::before,html *::after { scroll-behavior:auto !important; animation:none !important; transition:none !important; } }
@media (forced-colors:active) { .kpim-access { border-bottom:2px solid CanvasText; } .kpim-access button[aria-pressed="true"] { border:3px solid Highlight; } body :focus-visible { outline:3px solid Highlight !important; box-shadow:none !important; } }
/* Legacy Breakdance Div has no current builder controls; let its content reflow. */
@media (max-width:767px) { .kpim-hero > .section-container > .bde-div { width:100%; padding-inline:24px; } .kpim-hero .bde-columns, .kpim-hero .bde-column { min-width:0; } }

/* Keep the focused content reachable in short landscape/zoomed viewports. */
@media (max-height:400px) {
  html { --kpim-sticky-height:0px !important; }
  body header.kpim-site-header { position:relative !important; top:auto !important; }
}
/* Pages of results are separate controls, rather than tiny inline number links. */
body :is(.bde-posts-pagination,.bde-post-list-pagination) { display:flex; flex-wrap:wrap; gap:12px; align-items:center; }
body .bde-posts-pagination ul { display:flex; flex-wrap:wrap; gap:8px; padding:0; margin:0; list-style:none; max-width:100%; }
body :is(.bde-posts-pagination,.bde-post-list-pagination) a { display:inline-flex; align-items:center; justify-content:center; min-width:44px; min-height:44px; padding:8px 12px; border:1px solid currentColor; border-radius:6px; font-weight:600; }
body :is(.bde-posts-pagination,.bde-post-list-pagination) a:is(.is-active,[aria-current]) { border-width:3px; }

/* Search form: a persistent, labelled alternative to the main navigation. */
.kpim-site-search { display:flex; flex-direction:column; gap:10px; width:100%; min-width:0; margin:0; }
.kpim-site-search label { color:inherit; font:600 1rem/1.5 Inter,Arial,sans-serif; }
.kpim-site-search__fields { display:flex; flex-wrap:wrap; gap:12px; min-width:0; }
.kpim-site-search input { flex:1 1 160px; width:100%; min-width:0; max-width:100%; min-height:48px; padding:10px 12px; border:2px solid #607d8b; border-radius:8px; color:#183141; background:#fff; font:400 1rem/1.5 Inter,Arial,sans-serif; }
.kpim-site-search button { min-width:48px; min-height:48px; max-width:100%; padding:10px 16px; border:2px solid #fff; border-radius:8px; color:#fff; background:#005b86; font:600 1rem/1.5 Inter,Arial,sans-serif; cursor:pointer; overflow-wrap:anywhere; }
.kpim-site-search button:hover { color:#fff; background:#123345; }
body.search main .button-atom--primary { color:#fff; background:#005b86; }
body.search main .button-atom--primary:hover { color:#fff; background:#123345; }
body.search main .button-atom--primary .button-atom__text { color:inherit; }
body.search main .kpim-site-search { margin-bottom:32px; }

/* Older article galleries also reflow, retain captions, and have usable targets. */
body .kpim-post-body .gallery { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:20px; width:100%; margin:24px 0; }
body .kpim-post-body .gallery .gallery-item { float:none; width:100%; min-width:0; margin:0; text-align:left; }
body .kpim-post-body .gallery .gallery-icon a { display:block; }
body .kpim-post-body .gallery img { display:block; width:100%; height:auto; border:0; }
body .kpim-post-body .gallery figcaption { margin:8px 0 0; overflow-wrap:anywhere; }
body .kpim-post-body .gallery > br { display:none; }
@media(max-width:767px) { body .kpim-post-body .gallery { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media(max-width:479px) { body .kpim-post-body .gallery { grid-template-columns:minmax(0,1fr); } }

/* Enhanced contrast for the shared public layouts, including translated pages. */
body :is(.kpim-start-caption,.kpim-start-news-date,.kpim-start-fact) { color:#3b5666; }
body :is(.kpim-program-eyebrow,.kpim-program-heading,.kpim-program-number,.kpim-program-card-title,.kpim-program-secondary,.kpim-program-back,.kpim-program-subheading,.kpim-program-city,.kpim-start-eyebrow,.kpim-start-heading,.kpim-start-link,.kpim-start-fact-number,.kpim-start-tile-title,.kpim-start-tile-icon,.kpim-start-tile-action,.kpim-start-title,.kpim-start-news-title,.kpim-start-hero-note,.kpim-start-investment-title,.kpim-start-investment-action,.kpim-start-carousel-label,.kpim-start-program-label,.kpim-start-program-title,.kpim-start-program-action,.kpim-start-subtitle,.kpim-start-news-read-more,.kpim-cover-nav-link) { color:#00486c; }
body .kpim-program-tab:not(.kpim-program-tab-active) { color:#00486c; }

/* Keep the hero text readable independently of every current or future photo. */
html:not([data-kpim-contrast]) body .kpim-cover-copy { background-color:#f4f9fc; }
@media(min-width:1024px) {
  html:not([data-kpim-contrast]) body .kpim-cover-copy { box-shadow:0 0 24px 16px #f4f9fc; }
}
