/* Expertise Stage 3 v1.5.4: follow-up polish for Alexander Rusetskiy's
   6 Nov acceptance notes. Loaded after 1.5.3 + legacy acceptance plugin.
   Never changes navigation positions, submission handlers or body layout. */

/* Headings, text measures and vertical rhythm. */
body.home .section h2,
body.home .section h3,
.e3-shell :is(h1,h2,h3) {
  text-wrap: balance;
  overflow-wrap: break-word;
}
body.home .section .lead,
body.home .section .muted,
.e3-shell .e3-lead { text-wrap: pretty; }
body.home .section h2 { line-height: 1.19 !important; }
body.home .section .lead { max-width: 73ch; }
body.home #materials .material-copy h3 { max-width: 66ch !important; }
body.home #materials .material-copy .muted { max-width: 72ch !important; }
body.home #materials .material-list > .material { gap: 20px !important; }
body.home .section .card h3 { line-height: 1.28 !important; }

/* Desktop gets distinct but consistent section shelves; no excess white space. */
@media (min-width: 801px) {
 body.home .section:not(.hero) { padding-top: 64px !important; padding-bottom: 64px !important; }
 body.home #partners.section { padding-top: 60px !important; padding-bottom: 60px !important; }
 body.home #contact .split { gap: 24px !important; }
}
body.home .section.standard .standard-band { margin-bottom: 0 !important; }
body.home #materials .material-list > .material > .wp-block-buttons { margin-top: 34px !important; }
body.home #materials .material-list > .material .wp-block-button__link {
  min-height:44px !important;
  line-height: 1.3 !important;
  font-weight: 500 !important;
}
body.home .news button[data-e3-news-more] {font-weight: 500 !important;}

/* All seven partner cards share optical dimensions. Brand images are kept
   authentic but muted in grayscale to fit the graphite/red design system. */
body.home #partners .e3-partner-card { padding: 18px 22px !important; }
body.home #partners .e3-partner-card img.e3-partner-logo {
  display: block !important;
  width: 100% !important;
  height: 78px !important;
  min-height: 0 !important;
  max-width: 232px !important;
  max-height: 78px !important;
  object-fit: contain !important;
  object-position: center center !important;
  filter: grayscale(1) contrast(1.1);
  opacity: 0.9 !important;
  transition: filter .18s, opacity .18s;
}
body.home #partners .e3-partner-card:hover img.e3-partner-logo,
body.home #partners .e3-partner-card:focus-visible img.e3-partner-logo {
  filter: grayscale(0);
  opacity: 1 !important;
}
body.home #partners .e3-partner-card .e3-partner-name {
  text-align: center;
  max-width: 25ch;
}

/* Unified keyboard focus and form typographic rhythm, without changing
   dimensions of any checkbox, form field or global navigation. */
body.home #contact .contact-form :is(input:not([type=hidden]), textarea, select) {font: inherit;}
body.home #contact .contact-form select {min-height: 48px; padding-right: 40px;}
body.home #contact .contact-form button[type="submit"] {font-weight: 500;}
body.home :is(.e3-partner-card,.e3-home-news-card, button, a.button):focus-visible {
  outline: 3px solid #ff3b21 !important;
  outline-offset: 4px !important;
}
@media (max-width: 800px) {
 body.home .section:not(.hero) { padding-top: 48px !important; padding-bottom: 48px !important; }
 body.home #partners .e3-partner-card img.e3-partner-logo {height: 68px !important; max-height: 68px !important;}
}
@media (max-width: 540px) {
 body.home .section:not(.hero) { padding-top: 36px !important; padding-bottom: 36px !important; }
 body.home #partners .e3-partner-card img.e3-partner-logo {height: 64px !important; max-height: 64px !important;}
 body.home #contact .split > form.contact-form {max-width:100% !important;}
}
@media (prefers-reduced-motion: reduce) {
 body.home #partners .e3-partner-card img.e3-partner-logo {transition:none;}
}


/* v1.5.5 — official TPP system caduceus + readable TPP Russia name.
   Same footprint and monochrome optical weight as the other partners.
   The editorial media-library override stays authoritative. */
.e3-partners-grid .e3-tpp-lockup {
  display:flex !important;
  flex-direction:row !important;
  justify-content:center !important;
  align-items:center !important;
  gap:12px !important;
  width:100% !important;
  min-height:78px !important;
  margin:0 auto !important;
}
.e3-partners-grid .e3-tpp-mark {
  display:block !important;
  flex:0 0 48px !important;
  width:48px !important;
  height:75px !important;
  min-width:0 !important;
  min-height:0 !important;
  max-width:48px !important;
  max-height:75px !important;
  object-fit:contain !important;
  filter:grayscale(1) contrast(1.15);
  opacity:.9;
  transition:filter .18s ease,opacity .18s ease;
}
.e3-partners-grid .e3-tpp-wordmark {
  display:block !important;
  max-width:135px;
  color:#23282E !important;
  font-family:Commissioner,Arial,sans-serif;
  font-size:21px !important;
  font-weight:700 !important;
  line-height:1.16 !important;
  letter-spacing:-.025em;
  text-align:left !important;
  text-wrap:balance;
}
.e3-partners-grid .e3-partner-card:hover .e3-tpp-mark,
.e3-partners-grid .e3-partner-card:focus-visible .e3-tpp-mark {
  filter:grayscale(0);
  opacity:1;
}
@media(max-width:800px) {
  .e3-partners-grid .e3-tpp-lockup { min-height:68px !important;gap:8px !important; }
  .e3-partners-grid .e3-tpp-mark {flex-basis:42px !important;width:42px !important;max-width:42px !important;height:64px !important;max-height:64px !important;}
  .e3-partners-grid .e3-tpp-wordmark {font-size:18px !important;max-width:125px;}
}
@media(max-width:540px) {
  .e3-partners-grid .e3-tpp-lockup {min-height:64px !important;gap:6px !important;}
  .e3-partners-grid .e3-tpp-mark {flex-basis:34px !important;width:34px !important;max-width:34px !important;height:56px !important;max-height:56px !important;}
  .e3-partners-grid .e3-tpp-wordmark {font-size:15px !important;max-width:100px;}
}

/* Expertise v1.5.6 — explicit client acceptance fixes 07.11.2026.
   Loaded LAST, scoped to known pages. No generic form-input width changes. */

/* 1. Small devices: 320px must not squeeze three audience/news cards into
   2 columns. At 768px all 3 fit in a full row (no 2+1 orphan). */
@media (min-width: 721px) and (max-width: 1000px) {
  body.home .audience .grid-three,
  body.home .news .grid,
  body.home .news .e3-144-news-grid {
    display:grid !important;
    grid-template-columns:repeat(3,minmax(0,1fr)) !important;
    gap:16px !important;
    align-items:start !important;
  }
}
@media (max-width: 720px) {
  body.home .audience .grid-three,
  body.home .news .grid,
  body.home .news .e3-144-news-grid {
    display:grid !important;
    grid-template-columns:minmax(0,1fr) !important;
    grid-auto-rows:auto !important;
    align-items:start !important;
    gap:16px !important;
  }
}
body.home .audience .grid-three > *,
body.home .news .grid > *,
body.home .news .e3-144-news-grid > * {
  min-width:0 !important;
  max-width:100% !important;
  height:auto !important;
  min-height:0 !important;
  overflow-wrap:normal !important;
  word-break:normal !important;
  hyphens:auto;
}
body.home .audience .card :is(h3,p,a),
body.home .news :is(h3,p,a) {
  overflow-wrap:normal !important;
  word-break:normal !important;
  hyphens:auto;
}

/* 2-3. Standard band: eliminate cumulative 64+64px gap and mobile overflow;
   preserve original 2-column layout when there is enough width. */
body.home .section.audience {padding-bottom:40px !important;}
body.home .section.standard {
  padding-top:0 !important;
  padding-bottom:48px !important;
  margin-top:0 !important;
}
body.home .section.standard > .container {min-width:0 !important;}
body.home .section.standard .standard-band {
  margin:0 !important;
  padding:24px 28px !important;
  min-width:0 !important;
  max-width:100% !important;
  box-sizing:border-box !important;
  gap:24px !important;
  align-items:center !important;
}
body.home .section.standard :is(.standard-copy, .wp-block-buttons) {min-width:0 !important;}
body.home .section.standard .wp-block-button__link {
  box-sizing:border-box !important;
  max-width:100% !important;
  padding:11px 18px !important;
}
@media (max-width: 700px) {
  body.home .section.audience {padding-bottom:28px !important;}
  body.home .section.standard {padding-top:0 !important;padding-bottom:36px !important;}
  body.home .section.standard .standard-band {
    display:flex !important;
    flex-direction:column !important;
    align-items:stretch !important;
    padding:20px 18px !important;
    gap:14px !important;
  }
  body.home .section.standard .standard-copy {width:100% !important;min-width:0 !important;}
  body.home .section.standard .wp-block-buttons {
    display:flex !important;
    flex-wrap:wrap !important;
    width:100% !important;
    max-width:100% !important;
    gap:10px !important;
  }
  body.home .section.standard .wp-block-button {min-width:0 !important;max-width:100% !important;}
  body.home .section.standard .wp-block-button__link {
    display:inline-block !important;
    white-space:normal !important;
    overflow-wrap:normal !important;
    word-break:normal !important;
    hyphens:auto;
    padding:11px 14px !important;
  }
}

/* 4-5. Consistent spacing and internal padding. Keep the already-approved
   knowledge card grid, newsletter/news animations and header untouched. */
body.home .section h2::before {margin-bottom:24px !important;}
body.home .audience .card,
body.home #services .grid-four > .service {padding:24px !important;}
body.home .news .news-body {padding:24px !important;}
body.home #partners .e3-partner-card {padding:20px 24px !important;}
body.home .grid {gap:20px !important;}
@media (min-width: 1100px) {
  body.home #contact > .container {
    max-width:1240px !important;
    width:calc(100% - 48px) !important;
  }
}
@media (max-width:800px) {
  body.home #contact > .container {width:calc(100% - 32px) !important;}
}

/* 7. Readable UI microcopy on white and AA-contrast assessment controls. */
.e3-assessment-figma .e3-muted,
.e3-assessment-figma .e3-kicker,
.e3-assessment-figma .e3-assessment-result-figma p {
  color:#4b525b !important;
}
.e3-assessment-figma .e3-assessment-questions legend > span {color:#4b525b !important;}
.e3-assessment-figma button[type=submit],
.e3-assessment-figma .e3-button-primary {background:#23282e !important;color:#fff !important;}
.e3-assessment-figma .e3-radio-scale input:focus-visible + span {
  outline:3px solid #b52a19 !important;outline-offset:3px !important;
}

/* 8. Seven partners: preserve four equal cards in the first row, but let the
   last three share all available space rather than leaving a blank column.
   Image itself stays optically capped even when its card grows. */
@media (min-width: 541px) {
  body.home #partners .e3-partners-grid {
    display:flex !important;
    flex-wrap:wrap !important;
    gap:20px !important;
    justify-content:center !important;
  }
  body.home #partners .e3-partner-card {
    flex-grow:1 !important;
    flex-shrink:1 !important;
  }
}
body.home #partners .e3-partner-logo,
body.home #partners .e3-tpp-lockup {margin-left:auto !important;margin-right:auto !important;}

/* 9. CTA controls: consistent padding without affecting the whole site. */
body.home .hero .wp-block-button__link,
body.home #services .wp-block-button__link,
.e3-services-figma .e3-actions > a {
  padding:11px 18px !important;
  line-height:1.35 !important;
  box-sizing:border-box !important;
}

/* 10. Independent service inquiry: heading above form, full-width and same
   left edge as content. The form submission / validation markup is unchanged. */
main.e3-services-figma section#contact.ex-split {
  display:grid !important;
  grid-template-columns:minmax(0,1fr) !important;
  gap:26px !important;
  align-items:stretch !important;
  box-sizing:border-box !important;
}
main.e3-services-figma section#contact.ex-split > div {
  width:100% !important;
  min-width:0 !important;
  max-width:none !important;
}
main.e3-services-figma section#contact.ex-split form.contact-form {
  display:grid !important;
  grid-template-columns:repeat(2,minmax(0,1fr)) !important;
  column-gap:20px !important;
  row-gap:16px !important;
  box-sizing:border-box !important;
  width:100% !important;
  max-width:100% !important;
  margin:0 !important;
}
main.e3-services-figma section#contact.ex-split form.contact-form > label {
  min-width:0 !important;
  max-width:100% !important;
}
main.e3-services-figma section#contact.ex-split form.contact-form > label:has(textarea),
main.e3-services-figma section#contact.ex-split form.contact-form > label.consent,
main.e3-services-figma section#contact.ex-split form.contact-form > button[type=submit],
main.e3-services-figma section#contact.ex-split form.contact-form > .form-status {
  grid-column:1 / -1 !important;
}
main.e3-services-figma section#contact.ex-split form.contact-form > label.consent > input[type=checkbox] {
  width:18px !important;height:18px !important;min-width:18px !important;
  max-width:18px !important;flex:0 0 18px !important;margin-top:2px !important;
}
@media (max-width:700px) {
  main.e3-services-figma section#contact.ex-split {gap:18px !important;}
  main.e3-services-figma section#contact.ex-split form.contact-form {
    grid-template-columns:minmax(0,1fr) !important;
    padding:20px !important;
  }
}

/* 11. Joining the Association: explanatory heading then one accessible
   application form underneath, no second generic contact form. */
main.e3-join-landing-figma .e3-landing-hero-grid,
main.e3-join-figma .e3-landing-hero-grid,
main.e3-figma-page .e3-landing-hero-grid:has(.e3-join-form) {
  display:grid !important;
  grid-template-columns:minmax(0,1fr) !important;
  gap:26px !important;
  align-items:start !important;
}
main.e3-figma-page .e3-landing-hero-grid:has(.e3-join-form) > div,
main.e3-figma-page .e3-landing-hero-grid:has(.e3-join-form) .e3-landing-form {
  width:100% !important;
  max-width:none !important;
  min-width:0 !important;
}
main.e3-figma-page .e3-landing-hero-grid:has(.e3-join-form) .e3-landing-form {
  box-sizing:border-box !important;
  padding:30px !important;
}
@media (max-width:700px) {
  main.e3-figma-page .e3-landing-hero-grid:has(.e3-join-form) {gap:18px !important;}
  main.e3-figma-page .e3-landing-hero-grid:has(.e3-join-form) .e3-landing-form {padding:20px !important;}
}

/* 12. Knowledge page screenshot: remove 2 x huge section paddings
   from the gap between intro and filter tabs. */
main.e3-knowledge-figma section.ex-hero {
  padding-top:44px !important;
  padding-bottom:22px !important;
  margin-bottom:0 !important;
}
main.e3-knowledge-figma section.ex-knowledge {
  padding-top:18px !important;
  margin-top:0 !important;
  padding-bottom:56px !important;
}
main.e3-knowledge-figma .e3-knowledge-filter {margin-top:0 !important;}

/* 13. Assessment screenshot: intro and question list now form one coherent
   sequence. Inline question numbers align consistently with text. */
main.e3-assessment-figma > section.e3-hero {
  padding-top:42px !important;
  padding-bottom:20px !important;
  margin-bottom:0 !important;
}
main.e3-assessment-figma > section.e3-section {
  padding-top:16px !important;
  margin-top:0 !important;
}
main.e3-assessment-figma .e3-assessment-questions fieldset {
  display:block !important;
  margin:0 !important;
  padding:22px 0 !important;
  min-width:0 !important;
}
main.e3-assessment-figma .e3-assessment-questions legend {
  display:block !important;
  position:relative !important;
  width:100% !important;
  max-width:100% !important;
  padding:0 0 0 34px !important;
  box-sizing:border-box !important;
  font-weight:500 !important;
  white-space:normal !important;
  line-height:1.45 !important;
}
main.e3-assessment-figma .e3-assessment-questions legend > span {
  display:block !important;
  position:absolute !important;
  left:0 !important;
  top:4px !important;
  margin:0 !important;
  min-width:24px !important;
  text-align:left !important;
}
main.e3-assessment-figma .e3-assessment-questions .e3-radio-scale {
  display:flex !important;
  justify-content:flex-start !important;
  margin-top:16px !important;
  width:auto !important;
}

/* Smoothly aligned footer top/bottom padding. */
.site-footer {padding-top:40px !important;padding-bottom:40px !important;}

/* Assessment teaser on the homepage: Alexander explicitly measured insufficient
   contrast for the "10 вопросов · 5 минут" eyebrow and red CTA. */
body.home .assessment .eyebrow {
  color:#454c54 !important;
  font-size:14px !important;
  line-height:1.45 !important;
  letter-spacing:.025em !important;
}
body.home .assessment .muted,
body.home .audience .card p,
body.home #services .service p,
body.home .news .news-body p {
  color:#525960 !important;
  font-size:16px !important;
  line-height:1.5 !important;
}
body.home .assessment .wp-block-button:not(.is-style-outline) .wp-block-button__link {
  background-color:#23282e !important;
  border-color:#23282e !important;
  color:#fff !important;
  padding:11px 18px !important;
}
body.home .assessment .wp-block-button:not(.is-style-outline) .wp-block-button__link:hover,
body.home .assessment .wp-block-button:not(.is-style-outline) .wp-block-button__link:focus-visible {
  background-color:#171b20 !important;
  border-color:#171b20 !important;
  color:#fff !important;
}

/* At tablet width avoid a single 7th partner spanning the whole row. Use
   balanced full-width 3+4 rows, rather than the historical 3+3+1 layout. */
@media (min-width:721px) and (max-width:1050px) {
  body.home #partners .e3-partners-grid {
    display:grid !important;
    grid-template-columns:repeat(12,minmax(0,1fr)) !important;
    gap:16px !important;
  }
  body.home #partners .e3-partner-card {
    width:auto !important;
    max-width:none !important;
    min-width:0 !important;
    grid-column:span 3;
  }
  body.home #partners .e3-partner-card:nth-child(-n+3) {
    grid-column:span 4;
  }
}

/* Letter spacing and inner padding of the two repeatedly flagged CTAs.
   Width is reduced slightly compared with previous 18.62px horizontal padding,
   so navigation does not grow. */
@media (min-width:1001px) {
  .site-header .header-cta {padding:11px 18px !important;}
}
body.home #services .center-actions .wp-block-button__link {
  padding:11px 18px !important;
  box-sizing:border-box !important;
}

/* Expertise after migration: navigation/four-column footer cleanup.
   Keep Stage3 brand logo, social icon artwork and application forms intact. */

/* Actual registered WordPress six-item navigation, no 10-item fallback. */
.site-header .site-nav > ul {
  display:flex;
  align-items:center;
  flex-wrap:nowrap;
  list-style:none;
}
.site-header .site-nav > ul > li {position:relative;min-width:0;}
.site-header .site-nav > ul > li > a {
  display:block;
  white-space:nowrap;
  overflow-wrap:normal;
  word-break:normal;
}
.site-header .site-nav .sub-menu {
  min-width:205px;
  max-width:320px;
  box-shadow:0 9px 25px #151c2226;
  border:1px solid #d5d9dc;
  border-radius:6px;
  padding:8px;
  z-index:100;
}
.site-header .site-nav .sub-menu > li > a {
  display:block;
  white-space:normal;
  padding:10px 12px;
  font-size:14px;
  line-height:1.35;
}
.site-header .site-nav > ul > li:focus-within > .sub-menu {display:block;}

/* Footer: neutralise overlapping grid systems left by 1.5.x CSS. JS runs
   after the older injected inline styles to set the final grid columns. */
.site-footer {max-width:100%;overflow-x:clip;}
.site-footer > .container {max-width:1200px;box-sizing:border-box;}
.site-footer .footer-grid {width:100%;min-width:0;align-items:start;}
.site-footer .footer-grid > * {min-width:0;max-width:100%;box-sizing:border-box;}
.site-footer .footer-links-columns {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;min-width:0;}
.site-footer .footer-links-columns ul {min-width:0;list-style:none;margin:0;padding:0;}
.site-footer .footer-links-columns a {overflow-wrap:break-word;}
.site-footer .footer-brand .footer-social-icons {display:flex;flex-wrap:wrap;align-items:center;gap:10px;max-width:100%;}
.site-footer .footer-bottom {
  width:100%;
  max-width:100%;
  display:flex;
  flex-wrap:wrap;
  justify-content:space-between;
  gap:12px 26px;
  color:#9aa0a6;
}
@media(max-width:1199px) {
  .site-footer .footer-links-columns {gap:12px;}
}
@media(max-width:1000px) {
 .site-header .site-nav > ul {display:block;}
 .site-header .site-nav .sub-menu {position:static;display:none;box-shadow:none;border:0;max-width:none;}
 .site-header .site-nav li:hover > .sub-menu,
 .site-header .site-nav li:focus-within > .sub-menu {display:block;}
}
@media(max-width:700px){
 .site-footer .footer-links-columns {grid-template-columns:minmax(0,1fr);gap:6px;}
 .site-footer .footer-bottom {flex-direction:column;align-items:flex-start;}
 .site-header .site-nav .sub-menu {display:block;padding-left:16px;}
}

/* v1.0.1: deterministic header layout — 6 primary items, not the WP
   fallback of 10 bare anchors. Loaded after all Stage3 acceptance sheets. */
@media (min-width:1001px) {
  .site-header .header-inner.container {
    display:grid !important;
    grid-template-columns:clamp(170px,18vw,230px) minmax(0,1fr) auto auto !important;
    align-items:center !important;
    justify-content:stretch !important;
    gap:clamp(8px,1vw,16px) !important;
    width:calc(100% - 40px) !important;
    max-width:1360px !important;
    min-height:84px !important;
  }
  .site-header .header-inner > .site-logo {
    grid-column:1 !important;
    grid-row:1 !important;
    margin:0 !important;
    min-width:0 !important;
    max-width:100% !important;
    flex:initial !important;
  }
  .site-header .site-logo.e3-brand-logo-link--light {
    width:100% !important;
    max-width:230px !important;
    height:48px !important;
  }
  .site-header .header-inner > .site-nav {
    grid-column:2 !important;
    grid-row:1 !important;
    order:0 !important;
    width:100% !important;
    min-width:0 !important;
    max-width:none !important;
    margin:0 !important;
    justify-self:stretch !important;
  }
  .site-header .site-nav > ul {
    display:flex !important;
    width:100% !important;
    align-items:center !important;
    justify-content:space-between !important;
    flex-wrap:nowrap !important;
    gap:4px !important;
    padding:0 !important;
    margin:0 !important;
  }
  .site-header .site-nav > ul > li {
    flex:0 1 auto !important;
    min-width:0 !important;
    position:relative !important;
  }
  .site-header .site-nav > ul > li > a {
    display:block !important;
    padding:10px 5px !important;
    font-size:clamp(12px,0.92vw,14px) !important;
    font-weight:500 !important;
    line-height:1.35 !important;
    letter-spacing:0 !important;
    white-space:nowrap !important;
    overflow-wrap:normal !important;
    word-break:normal !important;
  }
  .site-header .header-inner > .header-cta {
    grid-column:3 !important;
    grid-row:1 !important;
    order:0 !important;
    margin:0 !important;
    min-width:0 !important;
    width:auto !important;
    padding:11px 13px !important;
    font-size:13px !important;
    line-height:1.3 !important;
    white-space:nowrap !important;
    justify-self:end !important;
  }
  .site-header .header-inner > .e3-header-language-switch {
    grid-column:4 !important;
    grid-row:1 !important;
    order:0 !important;
    margin:0 !important;
    width:auto !important;
    min-width:62px !important;
    padding:6px 0 !important;
    justify-self:end !important;
    white-space:nowrap !important;
  }
  .site-header .site-nav .sub-menu {
    display:none !important;
    position:absolute !important;
    left:0 !important;
    top:calc(100% - 1px) !important;
    z-index:9000 !important;
    flex-direction:column !important;
    width:max-content !important;
    min-width:220px !important;
    max-width:320px !important;
    padding:10px !important;
    background:#fff !important;
  }
  .site-header .site-nav li:hover > .sub-menu,
  .site-header .site-nav li:focus-within > .sub-menu {
    display:flex !important;
  }
  .site-header .site-nav .sub-menu > li {
    width:100% !important;
  }
  .site-header .site-nav .sub-menu > li > a {
    display:block !important;
    padding:9px 11px !important;
    font-size:14px !important;
    line-height:1.4 !important;
    white-space:normal !important;
  }
}
@media (min-width:1001px) and (max-width:1180px) {
  .site-header .header-inner.container {
    grid-template-columns:170px minmax(0,1fr) auto auto !important;
    gap:8px !important;
  }
  .site-header .header-inner > .header-cta {
    font-size:12px !important;
    padding:10px 10px !important;
  }
  .site-header .site-nav > ul > li > a {
    padding:9px 3px !important;
    font-size:12px !important;
  }
  .site-header .header-inner > .e3-header-language-switch {
    min-width:58px !important;
    font-size:11px !important;
  }
}
@media (max-width:1000px) {
  .site-header .header-inner.container {
    display:flex !important;
    flex-wrap:wrap !important;
    gap:12px !important;
  }
  .site-header .site-nav {
    width:100% !important;
    min-width:0 !important;
    order:3 !important;
    margin:0 !important;
  }
  .site-header .site-nav > ul {
    display:block !important;
    width:100% !important;
    padding:8px 0 !important;
  }
  .site-header .site-nav > ul > li > a {
    display:block !important;
    padding:11px 12px !important;
    font-size:15px !important;
    line-height:1.35 !important;
    white-space:normal !important;
  }
  .site-header .site-nav .sub-menu {
    position:static !important;
    box-shadow:none !important;
    min-width:0 !important;
    width:100% !important;
    max-width:100% !important;
    border:0 !important;
    padding:0 0 8px 16px !important;
  }
  .site-header .site-nav .sub-menu a {
    display:block !important;
    padding:8px 12px !important;
    font-size:14px !important;
    line-height:1.4 !important;
  }
  .site-header .site-nav > .header-cta {
    display:flex !important;
    width:100% !important;
    justify-content:center !important;
  }
}


/* 1.0.3 — Alexander's 07.11 acceptance: eliminate narrow-screen card overflow. */
.e3-goal-grid > .e3-number-card {
  box-sizing:border-box !important;
  min-width:0 !important;
  max-width:100% !important;
}
@media (max-width:560px) {
  .e3-about-figma .e3-goal-grid,
  .e3-goal-grid { grid-template-columns:minmax(0,1fr) !important; width:100% !important; min-width:0 !important; }
  .e3-goal-grid > .e3-number-card { width:100% !important; min-width:0 !important; max-width:100% !important; }
}

/* Seven authentic partner logos: equal cells with a visually centered last row. */
.e3-partners-grid {
  display:flex !important;
  flex-wrap:wrap !important;
  justify-content:center !important;
  align-items:stretch !important;
  gap:20px !important;
  width:100% !important;
  min-width:0 !important;
}
.e3-partners-grid > .e3-partner-card {
  box-sizing:border-box !important;
  flex:0 1 calc((100% - 60px) / 4) !important;
  max-width:calc((100% - 60px) / 4) !important;
  min-width:0 !important;
  width:auto !important;
}
.e3-partners-grid .e3-partner-logo {max-width:100% !important;object-fit:contain !important;}
@media (min-width:561px) and (max-width:900px) {
  .e3-partners-grid > .e3-partner-card {
    flex-basis:calc((100% - 20px) / 2) !important;
    max-width:calc((100% - 20px) / 2) !important;
  }
}
@media (max-width:560px) {
  .e3-partners-grid > .e3-partner-card {
    flex-basis:100% !important;
    max-width:100% !important;
  }
}

/* At tablet sizes show two readable cards and a glimpse of the third;
   avoids the old 2+1 incomplete row and too-narrow three-column text. */
@media (min-width:701px) and (max-width:1024px) {
  .audience .grid-three,.news .grid-three {
    display:flex !important;
    flex-wrap:nowrap !important;
    width:100% !important;
    min-width:0 !important;
    overflow-x:auto !important;
    overscroll-behavior-inline:contain;
    scroll-snap-type:x mandatory;
    gap:20px !important;
    padding-bottom:12px !important;
    scrollbar-width:thin;
  }
  .audience .grid-three > *,.news .grid-three > * {
    flex:0 0 45% !important;
    min-width:270px !important;
    max-width:none !important;
    scroll-snap-align:start;
  }
}
