/* Layout corrections are scoped to the theme, including late-loaded block CSS. */
body .navigation-toggle, body .navigation-join { display: none; }
body .site-header__inner { grid-template-columns: 230px minmax(0, 1fr) auto; gap: 24px; }
body .primary-navigation__menu { gap: clamp(16px, 1.7vw, 30px); }
body .deh-container > *, body [class$="__grid"] > *, body [class$="__items"] > * { min-width: 0; }
body :is(h1, h2, h3, p, a) { overflow-wrap: anywhere; }
body :is(a, button, input, select, textarea):focus-visible { outline: 3px solid #f48221; outline-offset: 4px; }
body .skip-link:focus { clip: auto; width: auto; height: auto; margin: 0; padding: 16px 24px; top: 8px; left: 8px; z-index: 100000; background: #fff; color: #143753; white-space: normal; }
body .deh-button { padding-block: 12px; text-align: center; }
body .deh-search-form { max-width: 760px; margin-top: 32px; }
body .deh-search-form label { display: block; margin-bottom: 10px; }
body .deh-search-form > div { display: flex; gap: 12px; }
body .deh-search-form input { flex: 1; min-width: 0; min-height: 52px; padding: 12px 16px; font: inherit; border: 1px solid #879197; border-radius: 4px; }
body .deh-about__media:not(:has(img)) { min-height: 0; }
body .deh-about__media:not(:has(img)) blockquote { position: static; width: 100%; }
body .deh-about__grid:not(:has(.deh-about__media img, .deh-about__media blockquote)) { grid-template-columns: minmax(0, 1fr); }
body .deh-about__media:empty, body .deh-final-cta figure:not(:has(img)) { display: none; }
body .deh-final-cta__inner:not(:has(figure img)) { grid-template-columns: minmax(0, 1fr); padding-block: 64px; min-height: 0; }
body .deh-final-cta__inner:not(:has(figure img)) > div { max-width: 900px; }
body .deh-logo-grid__logo img { filter: none; }
body .deh-event-feature--before .deh-eyebrow, body .deh-posts-grid--dark .deh-eyebrow,
body .deh-competition-feature--after .deh-eyebrow { color: #cbd5da; }
body .deh-event-feature__grid:not(:has(.deh-event-feature__media img)),
body .deh-training-program__feature:not(:has(.deh-training-program__image img)) { grid-template-columns: minmax(0, 1fr); }
body .deh-event-feature__media:empty, body .deh-training-program__image:empty { display: none; }
body .nav-links { flex-wrap: wrap; }

@media (max-width: 1240px) {
    body .site-header { height: auto; min-height: 80px; }
    body .site-header__inner { grid-template-columns: minmax(0, 1fr) auto auto; gap: 16px; padding-block: 16px; }
    body .site-branding .custom-logo-link { width: 190px; max-width: 100%; }
    body .navigation-toggle:not([hidden]) { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 12px; background: #fff; border: 1px solid var(--deh-line); border-radius: 4px; color: var(--deh-ink); font: inherit; cursor: pointer; }
    body .navigation-toggle svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; }
    body .primary-navigation { grid-column: 1 / -1; grid-row: 2; }
    body .primary-navigation__menu { flex-wrap: wrap; justify-content: flex-start; gap: 4px 24px; }
    body .primary-navigation__menu a { display: block; padding: 12px 0; }
    body .navigation-ready .primary-navigation { display: none; }
    body .navigation-ready.navigation-open .primary-navigation { display: block; padding-top: 16px; border-top: 1px solid var(--deh-line); }
    body .site-header__actions { grid-column: 3; grid-row: 1; }
    body .site-header__actions > .deh-button { display: none; }
    body .navigation-join { display: inline-flex; margin-top: 16px; }
    body .site-footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px; }
    body .deh-home-hero__signature { position: static; align-self: flex-end; margin: 20px 0 32px; transform: none; }
    body .deh-home-hero__inner { padding-top: 72px; }
    body .deh-home-hero__proof { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
    body .deh-home-hero__proof article { padding: 0; border: 0; }
    body .deh-feature-grid__items { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    body .deh-competition-feature__before, body .deh-competition-feature__after { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    body .deh-competition-feature__copy { grid-column: 1 / -1; }
    body .deh-logo-grid__items { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
    body .deh-logo-grid__logo { border: 0; }
    body .deh-training-program__modules { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 960px) {
    :root { --deh-gutter: 24px; }
    body .deh-section, body .deh-event-feature, body .deh-competition-feature { padding-block: 64px; }
    body .deh-about__grid, body .deh-event-feature__grid, body .deh-feature-grid__header,
    body .deh-posts-grid__header, body .deh-people-grid__header, body .deh-training-program__header,
    body .deh-final-cta__inner { grid-template-columns: minmax(0, 1fr); gap: 28px; }
    body .deh-about__media { margin-bottom: 24px; }
    body .deh-about__media blockquote { width: min(80%, 520px); }
    body .deh-home-hero h1 { font-size: 60px; }
    body .deh-feature-grid__items, body .deh-posts-grid__items, body .deh-people-grid__items { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    body .deh-training-program__feature { grid-template-columns: minmax(0, 1fr); }
    body .deh-training-program__image { min-height: 0; }
    body .deh-training-program__image:empty { display: none; }
    body .deh-training-program__image img { display: block; height: 320px; }
    body .deh-final-cta__inner { padding-block: 48px; }
    body .deh-final-cta figure { height: 320px; border-radius: 12px; }
    body .deh-final-cta figure img { clip-path: none; }
    body .deh-program__hero-grid, body .deh-training__hero-grid, body .deh-competition__hero-grid, body .deh-person__header { grid-template-columns: minmax(0, 1fr); gap: 32px; }
    body .deh-person__photo { max-width: 360px; }
    body .deh-grid--3, body .deh-grid--4, body .deh-person-archive-grid,
    body .deh-program__module-grid, body .deh-competition__laureate-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 600px) {
    :root { --deh-gutter: 20px; }
    body .site-header__inner { gap: 8px; }
    body .site-branding .custom-logo-link { width: 150px; }
    body .navigation-toggle:not([hidden]) { padding: 8px; font-size: 13px; }
    body .header-search { width: 40px; height: 44px; }
    body .primary-navigation__menu { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 20px; }
    body .deh-section, body .deh-event-feature, body .deh-competition-feature, body .deh-section--tight { padding-block: 48px; }
    body .deh-heading, body .deh-archive__header h1, body .deh-entry-header h1,
    body .deh-person__header h1, body .deh-event__hero h1 { font-size: clamp(32px, 8vw, 44px); }
    body .deh-home-hero, body .deh-home-hero__inner { min-height: 0; }
    body .deh-home-hero__inner { padding-top: 48px; padding-bottom: 36px; }
    body .deh-home-hero h1 { font-size: clamp(38px, 10vw, 54px); line-height: 1.06; }
    body .deh-home-hero__lead, body .deh-lead { font-size: 16px; }
    body .deh-home-hero__signature { font-size: 24px; margin: 28px 0; }
    body .deh-home-hero__proof { grid-template-columns: minmax(0, 1fr); gap: 20px; }
    body .deh-home-hero__proof article { gap: 16px; }
    body .deh-button-row { flex-direction: column; align-items: stretch; }
    body .deh-feature-grid__items, body .deh-posts-grid__items, body .deh-people-grid__items,
    body .deh-training-program__modules, body .deh-competition-feature__before,
    body .deh-competition-feature__after, body .deh-competition-feature__steps { grid-template-columns: minmax(0, 1fr); }
    body .deh-feature-card { min-height: 0; padding: 24px; }
    body .deh-feature-card__icon { margin-bottom: 18px; }
    body .deh-about__copy { padding: 0; }
    body .deh-about__media { min-height: 0; margin-bottom: 0; }
    body .deh-about__media > img { height: 280px; }
    body .deh-about__media blockquote { position: relative; right: auto; bottom: auto; width: 100%; margin-top: 16px; padding: 24px; }
    body .deh-about__stats, body .deh-event-feature__stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
    body .deh-about__stats > div, body .deh-event-feature__stats > div { padding: 0; border: 0; }
    body .deh-event-feature__meta { flex-direction: column; gap: 12px; }
    body .deh-event-feature__media { min-height: 0; }
    body .deh-event-feature__media:empty { display: none; }
    body .deh-event-feature__media > img { height: 280px; }
    body .deh-event-feature__gallery { position: static; padding: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    body .deh-training-program__copy { padding: 28px 24px; }
    body .deh-training-program__copy h3 { font-size: 30px; }
    body .deh-training-program__stats { flex-wrap: wrap; gap: 20px; }
    body .deh-training-program__stats > div { padding: 0; border: 0; }
    body .deh-training-program__image img { height: 260px; }
    body .deh-competition-feature__photo { min-height: 0; }
    body .deh-competition-feature__photo:empty { display: none; }
    body .deh-competition-feature__photo img { display: block; height: 280px; }
    body .deh-competition-feature__winners { grid-template-columns: minmax(0, 1fr); }
    body .deh-person-card__image { height: auto; aspect-ratio: 1 / 1; }
    body .deh-posts-grid__cta, body .deh-people-grid__cta { text-align: left; }
    body .deh-logo-grid__items { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    body .deh-logo-grid__header h2 { font-size: 30px; }
    body .deh-final-cta figure { height: 260px; }
    body .site-footer { padding-top: 48px; }
    body .site-footer__grid { grid-template-columns: minmax(0, 1fr); gap: 32px; padding-bottom: 32px; }
    body .site-footer__bottom { flex-direction: column; gap: 18px; }
    body .footer-legal { flex-wrap: wrap; gap: 16px; }
    body .footer-menu a { display: inline-block; padding-block: 6px; }
    body .deh-content-card-grid, body .deh-grid--3, body .deh-grid--4, body .deh-person-archive-grid,
    body .deh-program__module-grid, body .deh-competition__laureate-grid,
    body .deh-event__meta-grid, body .deh-agenda__item { grid-template-columns: minmax(0, 1fr); }
    body .deh-program__stats, body .deh-competition__dates { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
    body .deh-program__stats > div, body .deh-competition__dates > div, body .deh-event__meta-grid > div { padding: 16px 0; border-right: 0; }
    body .deh-program__hero, body .deh-training__hero, body .deh-competition__hero,
    body .deh-event__hero, body .deh-archive-hero, body .deh-entry-header { padding-block: 48px; }
    body .deh-archive-listing, body .deh-content, body .deh-archive { padding-block: 40px; }
    body .deh-training__hero-image, body .deh-program__hero-image, body .deh-competition__hero-image { min-height: 0; }
    body .deh-training__hero-image img, body .deh-program__hero-image img, body .deh-competition__hero-image img { height: 280px; }
    body .deh-training__buy-inner { flex-direction: column; align-items: flex-start; gap: 24px; }
    body .deh-training__meta { flex-wrap: wrap; }
    body .deh-search-form > div { flex-direction: column; }
    body .deh-woo-shell { padding-block: 40px; }
    body .woocommerce ul.products, body .woocommerce div.product { grid-template-columns: minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    body *, body *::before, body *::after { transition: none !important; animation: none !important; }
}
body .deh-about__media:has(img) blockquote{position:relative;right:auto;bottom:auto;width:90%;margin:-36px 0 0 auto}body .deh-about__text p{margin:0 0 1.1em}body .deh-about__grid{align-items:start}@media(max-width:600px){body .deh-home-hero:has(.deh-home-hero__description) .deh-home-hero__inner{padding-top:44px}body .deh-about__media:has(img) blockquote{width:100%;margin:16px 0 0}}
