/* Shared accessibility tokens, matching the institutional site's approach. */
:root {
  --ge-text-accent: #821812;
  --ge-control-border: #8d736a;
  --ge-focus-color: #821812;
  --ge-footer-accent: #ff4639;
  --theme-form-field-border-initial-color: #8d736a;
  --theme-form-field-border-focus-color: #821812;
}

.ge-site-footer,
#offcanvas {
  --ge-focus-color: var(--ge-footer-accent);
}

.ge-site-footer .ge-brand-lockup__words span,
.ge-site-footer .ge-site-footer__title {
  color: var(--ge-footer-accent);
}

.ge-site-footer .ge-site-footer__title {
  max-width: none;
  margin: 0 0 1rem;
  font-family: inherit;
  font-size: .875rem;
  line-height: 1.5;
  font-weight: 700;
  letter-spacing: .12em;
}

.ge-site-footer .ge-site-footer__cookie-button { min-height: 44px; }
body .ge-onisep .ge-onisep__source,
body .ge-onisep .ge-onisep-modal__source,
body .ge-onisep .ge-onisep-card__source { color: #5b524f; }
body .ge-onisep-modal__richtext :is(h5, h6) { font-size: 1rem; line-height: 1.5; }
/* A minimum height plus aspect-ratio must not force a wider image than its card. */
body .ge-onisep-visual { box-sizing: border-box; width: 100%; max-width: 100%; min-height: 0; }
body .ge-onisep__search-shell { border-color: var(--ge-control-border); }
.ge-onisep-modal__panel { display: grid; grid-template-columns: minmax(0, 1fr); max-height: min(88dvh, 920px); }
.ge-onisep-modal__close {
  grid-area: 1 / 1; justify-self: end; align-self: start;
  float: none; position: sticky; top: .75rem;
  width: 44px; height: 44px; margin: .75rem .75rem 0 0;
}
.ge-onisep-modal__content { grid-area: 1 / 1; box-sizing: border-box; width: 100%; min-width: 0; }
.ge-onisep-modal__hero { max-inline-size: none; padding-right: 4.25rem; }
.ge-sidebar-card--safe-place, #search-modal { --ge-focus-color: #fff; }
.ge-sidebar-safe-place__button:is(:hover, :focus-visible) { color: #821812; }
/* Keep the search focus cue on the rounded field, not around the whole results stack. */
#search-modal .ct-search-form:focus-within {
  outline: 0 !important;
  border-color: transparent !important;
}
#search-modal .ct-search-form-inner.ct-pseudo-input:focus-within {
  outline: 3px solid #fff !important;
  outline-offset: 4px;
}
body .ge-sidebar-card--safe-place .ge-sidebar-safe-place__content p { color: #fff; }
.ge-sidebar-safe-place__toggle > span:first-child,
.ge-newsletter-card__toggle > span:first-child { min-width: 0; white-space: normal; overflow-wrap: anywhere; }
.ge-sidebar-card--safe-place:not(.is-collapsed) .ge-sidebar-safe-place__content { max-height: none; overflow: visible; }
.ge-newsletter-card:not(.is-collapsed):not(.is-user-collapsed):not(.is-compact) .ge-newsletter-card__content,
.ge-newsletter-card.is-user-expanded:not(.is-collapsed) .ge-newsletter-card__content { max-height: none; overflow: visible; }

body :is(a, button, input, select, textarea, [tabindex]):focus-visible {
  outline: 3px solid var(--ge-focus-color);
  outline-offset: 3px;
}

body :is(input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]), select, textarea) {
  border-color: var(--ge-control-border);
}

body .ge-event-proposal__form :is(input:not([type="hidden"]), select, textarea),
body .ge-onisep__form :is(input, select),
.ge-mobile-search input {
  min-width: 0;
  max-width: 100%;
  min-height: 44px;
  border-color: var(--ge-control-border);
  border-width: 1px;
  border-style: solid;
  font-size: 1rem;
}

body .ge-event-proposal__form label > span { color: #5b524f; }
body .ge-event-proposal__form :is(input, select, textarea)[aria-invalid="true"] { border-color: var(--ge-text-accent); }
body .ge-event-proposal__form :is(input, select, textarea):user-invalid { border-color: var(--ge-text-accent); }

/* Let the content determine the track size, including at 200% text size. */
main :where(article, section, header, nav, form, figure, .entry-content, .ge-shell),
.ge-legal-layout > *,
.ge-legal-content > *,
.ge-passport-mission-content > * {
  box-sizing: border-box;
  min-inline-size: 0;
  max-inline-size: 100%;
}

.entry-content :where(p, li, h1, h2, h3, h4, h5, h6),
.ge-legal-card a,
.ge-legal-nav a,
.page-title {
  overflow-wrap: anywhere;
}

.entry-content :is(h1, h2, h3, h4),
.page-title { text-wrap: balance; hyphens: auto; }

.ge-legal-layout { grid-template-columns: minmax(0, 17rem) minmax(0, 1fr); }
.ge-legal-nav, .ge-legal-content, .ge-legal-card { min-width: 0; max-width: 100%; }
.ge-legal-cookie-row, .ge-legal-cookie-row > * { min-width: 0; max-width: 100%; overflow-wrap: anywhere; }
body.search .entries .entry-card .boundless-image { width: 100%; max-width: 100%; margin-inline: 0; }
body.search .entries .entry-card .boundless-image img { max-width: 100%; }

/* The two homepage CTAs remain separate, visible and fully inside their row. */
.ge-home-hub .ge-masthead .ge-button-row {
  display: flex;
  flex-wrap: wrap;
  flex-direction: row;
  align-items: stretch;
  gap: .9rem;
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

.ge-home-hub .ge-masthead .ge-button-row > a {
  box-sizing: border-box;
  display: inline-flex;
  flex: 0 1 auto;
  width: auto;
  min-width: 0;
  max-width: 100%;
  min-height: 48px;
  height: auto;
  white-space: normal;
  line-height: 1.5;
  text-align: center;
  overflow-wrap: anywhere;
}

.ge-passport-mission__steps {
  display: grid;
  gap: .75rem;
  margin: 0;
  padding: 0;
  list-style: decimal inside;
}

.ge-passport-mission__steps > li.ge-passport-mission__step { margin: 0; }
.ge-passport-mission__step > span:last-child { min-width: 0; }

/* Native search inside the mobile menu; no device or user-agent detection. */
#offcanvas .ge-mobile-search { display: block; width: 100%; }
#offcanvas .ge-mobile-search form { display: grid; gap: .55rem; width: 100%; min-width: 0; }
#offcanvas .ge-mobile-search label { color: rgba(255, 255, 255, .78); font-size: .69rem; line-height: 1.4; font-weight: 750; }
#offcanvas .ge-mobile-search input {
  width: 100%; padding: .7rem .82rem; border-radius: 13px;
  background: #fff; color: #231f20; font-size: max(16px, 1rem);
}
#offcanvas .ge-mobile-search input::placeholder { color: #655651; opacity: 1; }
#offcanvas .ge-mobile-search button {
  width: 48px; min-width: 48px; min-height: 48px; height: 48px; padding: 0;
  background: #821812; color: #fff; border: 1px solid #ff4639;
  border-radius: 13px; font: inherit; font-weight: 600; line-height: 1; white-space: normal;
}

body.ge-onisep-standalone-page .hero-section { display: block; }
body.ge-onisep-standalone-page .page-title { font-size: clamp(1.75rem, 4vw, 2.75rem); line-height: 1.25; }

.ge-blog-sitemap { width: min(100%, 1000px); margin-inline: auto; padding: clamp(16px, 3vw, 32px); }
.ge-blog-sitemap h1 { font: 700 clamp(2rem, 4vw, 3rem)/1.2 Poppins, sans-serif; color: #231f20; }
.ge-blog-sitemap h2 { font: 700 clamp(1.25rem, 2vw, 1.65rem)/1.35 Poppins, sans-serif; }
.ge-blog-sitemap__sections { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; margin-top: 28px; }
.ge-blog-sitemap__sections section { padding: clamp(18px, 3vw, 28px); border: 1px solid #e1d7d2; border-radius: 20px; background: #fff; }
.ge-blog-sitemap ul { margin: 0; padding-left: 1.2rem; }
.ge-blog-sitemap li { margin: 0; }
.ge-blog-sitemap a { display: flex; align-items: center; min-height: 44px; padding-block: 8px; color: var(--ge-text-accent); text-decoration: underline; text-underline-offset: 4px; overflow-wrap: anywhere; }

@media (max-width: 820px) {
  .ge-legal-layout { grid-template-columns: minmax(0, 1fr); }
  .ge-legal-nav { position: static; }
}

@media (max-width: 680px) {
  .ge-home-hub .ge-masthead .ge-button-row { display: grid; grid-template-columns: minmax(0, 1fr); }
  .ge-home-hub .ge-masthead .ge-button-row > a { width: 100%; }
  .ge-blog-sitemap__sections { grid-template-columns: minmax(0, 1fr); }
  .ge-legal-cookie-row { grid-template-columns: minmax(0, 1fr); }
}

@media (pointer: coarse) {
  body .ge-event-proposal__form :is(input:not([type="hidden"]), select, textarea),
  body .ge-onisep__form :is(input, select) { font-size: max(16px, 1rem); }
}
