/* FUS-MOBILE-UNIVERSAL-20260904-V1
   Site-wide responsive/reflow compatibility layer for current iOS/Android browsers.
   Loaded last so it can safely correct older cached page-specific rules. */

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  max-width: 100%;
  overflow-x: hidden;
}
@supports (overflow: clip) {
  html { overflow-x: clip; }
}

*, *::before, *::after { box-sizing: border-box; }

body {
  width: 100%;
  max-width: 100%;
  margin-left: 0;
  margin-right: 0;
  overflow-x: hidden;
}
@supports (overflow: clip) {
  body { overflow-x: clip; }
}

/* Prevent a single flex/grid child or long token from widening the viewport. */
:where(main, header, footer, nav, section, article, aside, form, fieldset, div, dl, ul, ol, li) {
  min-width: 0;
}

:where(h1, h2, h3, h4, h5, h6, p, li, dt, dd, figcaption, label, a, span, strong, small) {
  max-width: 100%;
  overflow-wrap: break-word;
  word-break: normal;
  -webkit-hyphens: none;
  hyphens: none;
}

:where(img, picture, video, canvas, svg, iframe) {
  max-width: 100%;
}
img, video, canvas { height: auto; }

/* Responsive media and maps must never create page-level horizontal scrolling. */
:where(.hero-image, .fg-hero-image, .pc-hero-image, .portal-hero-image, .rb-map-frame, .vessel-image-wrap, .founder-media) {
  max-width: 100%;
  overflow: hidden;
}

/* Tables remain usable without widening the entire page. */
:where(.table-wrap, [class*="table-wrap"], .rb-budget-wrap, .rb-market-wrap, .fus-application-table-wrap, .fus-commercial-table-wrap) {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  -webkit-overflow-scrolling: touch;
}
:where(.table-wrap, [class*="table-wrap"], .rb-budget-wrap, .rb-market-wrap, .fus-application-table-wrap, .fus-commercial-table-wrap) > table {
  max-width: none;
}

/* Forms: avoid iOS focus zoom and force controls to remain inside their cards. */
:where(input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]), select, textarea) {
  max-width: 100%;
}
:where(button, input, select, textarea) { font: inherit; }
:where(button, a, input, select, textarea, summary) { touch-action: manipulation; }

/* Common responsive grid/flex children. */
:where(
  .programme-grid, .participant-grid, .partner-grid, .impact-stats,
  .ibd-practical-grid, .fus-status-facts, .fus-route-grid,
  .cm-hero, .cm-intro, .cm-grid, .cm-film-grid, .cm-standards,
  .route-grid, .field-row,
  .fo-grid, .fo-funding-grid, .fo-section,
  .fg-facts, .fg-card-grid, .fg-measures, .fg-controls, .fg-governance, .fg-vessel, .fg-due-diligence,
  .fus-register-metrics, .fus-application-heading, .fus-application-measures, .fus-application-budget,
  .fus-shortfall-grid, .fus-commercial-budget,
  .pc-intro, .pc-steps, .pc-card-grid, .pc-practical-grid,
  .policy-layout,
  .rb-purpose, .rb-outcome-grid, .rb-route-layout, .rb-route-facts, .rb-stage-grid,
  .rb-sponsor-grid, .rb-package-grid, .rb-media-grid, .rb-reporting-grid, .rb-independence,
  .op-grid, .op-sponsor-grid,
  .ibd-compare, .ibd-card-grid, .ibd-symptom-list, .ibd-source-grid,
  .portal-summary, .access-area, .account-panels, .portal-form.two-column,
  .library-heading, .document-row, .admin-heading, .admin-stats,
  .document-workflow-nav, .administrator-list, .request-list,
  .funding-register-grid, .funding-register-summary
) > * {
  min-width: 0;
}

/* Header/footer compatibility. */
header.site-header,
.site-footer,
.portal-header,
.portal-footer,
.fus-global-social-topbar {
  max-width: 100%;
}
header.site-header .brand,
header.site-header .brand-copy,
.site-footer .footer-brand,
.site-footer .footer-legal,
.site-footer .fus-legal-details {
  min-width: 0 !important;
}
.site-footer :where(a, p, span, strong, small) {
  overflow-wrap: break-word;
  word-break: normal;
}

/* Funding Summary fallback. These rules intentionally repeat the current
   Stage 1/2/3 layout so a device with an older cached funding stylesheet
   still renders the newly-added stage markup correctly. */
.fus-stage {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
  padding: clamp(4rem, 8vw, 7rem) 0;
  border-top: 1px solid rgba(8, 51, 46, .16);
}
.fus-stage-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, .48fr);
  gap: clamp(1.5rem, 6vw, 5rem);
  align-items: start;
}
.fus-stage-heading h2 {
  margin: .6rem 0 0;
  max-width: 14ch;
  font-size: clamp(2.4rem, 5vw, 5.4rem);
  line-height: .97;
  letter-spacing: -.045em;
}
.fus-stage-total {
  display: block;
  margin: 0;
  padding: 1.25rem 1.4rem;
  border-radius: 1rem;
  background: #123630;
  color: #fff;
}
.fus-stage-total strong {
  display: block;
  color: #9cf228;
  font-size: clamp(2rem, 4vw, 3.15rem);
  line-height: 1;
  white-space: nowrap;
}
.fus-stage-total span {
  display: block;
  margin-top: .55rem;
  color: #d7e5de;
  font-size: .88rem;
  line-height: 1.45;
}
.fus-stage-lead {
  max-width: 55rem;
  margin: 2rem 0 2.25rem;
  color: #405b56;
  font-size: clamp(1.05rem, 1.7vw, 1.35rem);
  line-height: 1.55;
}
.fus-stage-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.fus-stage-grid article {
  min-width: 0;
  min-height: 12.5rem;
  padding: 1.4rem;
  border: 1px solid rgba(18, 54, 48, .14);
  border-radius: 1rem;
  background: #f2f5f1;
}
.fus-stage-grid h3 { margin: 0 0 .65rem; color: #123630; font-size: 1.28rem; line-height: 1.15; }
.fus-stage-grid p { margin: 0; color: #455c57; line-height: 1.62; }
.fus-stage-costs {
  min-width: 0;
  margin-top: 1rem;
  padding: 1.35rem;
  border: 1px solid rgba(18, 54, 48, .17);
  border-radius: 1rem;
  background: #fff;
}
.fus-stage-costs h3 { margin: 0 0 1rem; color: #123630; font-size: 1.25rem; }
.fus-stage-costs-help { margin: -.35rem 0 1rem; color: #526963; font-size: .92rem; line-height: 1.45; }
.fus-stage-costs ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .55rem 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.fus-stage-costs li {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: .8rem;
  min-width: 0;
  padding: .7rem .75rem;
  border-radius: .55rem;
  background: #f2f5f1;
  color: #405b56;
  line-height: 1.4;
}
.fus-stage-costs li > span {
  display: flex;
  align-items: flex-start;
  gap: .55rem;
  min-width: 0;
}
.fus-stage-costs li > strong {
  flex: 0 0 auto;
  color: #123630;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.fus-stage-cost-code {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  min-height: 1.55rem;
  padding: 0 .42rem;
  border: 1px solid rgba(18, 54, 48, .23);
  border-radius: .32rem;
  background: #fff;
  color: #0b564e;
  font-size: .69rem;
  font-weight: 800;
  letter-spacing: .055em;
  line-height: 1.55rem;
  white-space: nowrap;
}
.fus-stage-costs > p {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin: 1rem 0 0;
  padding-top: 1rem;
  border-top: 2px solid #123630;
  color: #123630;
  font-weight: 800;
}
.fus-stage-costs > p strong { white-space: nowrap; }
.fus-stage2-cost-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}
.fus-stage2-cost-column {
  min-width: 0;
  padding: 1rem;
  border: 1px solid rgba(18,54,48,.14);
  border-radius: .75rem;
  background: #f8faf7;
}
.fus-stage2-package-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: .8rem;
}
.fus-stage2-package-heading h4 { margin: 0; color: #123630; font-size: 1.02rem; line-height: 1.25; }
.fus-stage2-package-heading strong { flex: 0 0 auto; color: #123630; font-size: 1.02rem; white-space: nowrap; }
.fus-stage2-cost-column > p { margin: .35rem 0 .85rem; color: #526963; font-size: .86rem; line-height: 1.4; }
.fus-stage2-costs .fus-stage2-cost-column ul { display: grid; grid-template-columns: 1fr; gap: .55rem; }

/* The public funding-position cards also need to reflow when four cards are present. */
.fus-register-metrics { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.fus-register-submitted small { display: block; margin-top: .25rem; font-size: .77rem; font-weight: 750; }

@media (max-width: 980px) {
  /* Mobile navigation remains a single, usable menu across iOS/Android. */
  header.site-header {
    width: 100% !important;
    min-height: 84px !important;
    height: auto !important;
    padding-left: max(16px, env(safe-area-inset-left)) !important;
    padding-right: max(16px, env(safe-area-inset-right)) !important;
  }
  header.site-header .brand { min-width: 0 !important; max-width: calc(100% - 64px) !important; }
  header.site-header .brand-copy { min-width: 0 !important; }
  header.site-header .brand strong { white-space: normal !important; }
  header.site-header .fus-mobile-nav-toggle {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex: 0 0 44px !important;
    width: 44px !important;
    min-width: 44px !important;
    min-height: 44px !important;
    margin-left: auto !important;
  }
  header.site-header .main-nav {
    max-width: 100% !important;
    max-height: calc(100dvh - 84px) !important;
    overflow-y: auto !important;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }
  header.site-header .main-nav a {
    min-width: 0 !important;
    min-height: 44px !important;
    white-space: normal !important;
    overflow-wrap: normal !important;
    word-break: normal !important;
  }

  .fus-global-social-topbar { max-width: 100% !important; }

  .fus-register-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fus-stage2-cost-columns { grid-template-columns: 1fr; }

  /* Portal forms and admin controls are allowed to stack before they become cramped. */
  :where(.portal-summary, .access-area, .account-panels, .library-heading, .admin-heading) {
    grid-template-columns: 1fr !important;
  }
  .portal-form.two-column { grid-template-columns: 1fr !important; }
  .portal-form .wide { grid-column: auto !important; }
  :where(.admin-stats, .document-workflow-nav) { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}

@media (max-width: 800px) {
  /* Common content grids stack cleanly instead of creating squeezed columns. */
  :where(
    .programme-grid, .participant-grid, .partner-grid, .impact-stats,
    .ibd-practical-grid, .fus-status-facts, .fus-route-grid,
    .cm-grid, .cm-film-grid, .cm-standards,
    .route-grid,
    .fo-grid, .fo-funding-grid, .fo-section,
    .fg-facts, .fg-card-grid, .fg-measures, .fg-controls, .fg-governance, .fg-vessel, .fg-due-diligence,
    .fus-application-heading, .fus-application-budget, .fus-shortfall-grid, .fus-commercial-budget,
    .pc-steps, .pc-card-grid, .pc-practical-grid,
    .policy-layout,
    .rb-outcome-grid, .rb-route-layout, .rb-route-facts, .rb-stage-grid,
    .rb-sponsor-grid, .rb-package-grid, .rb-media-grid, .rb-reporting-grid, .rb-independence,
    .op-grid, .op-sponsor-grid,
    .ibd-compare, .ibd-card-grid, .ibd-symptom-list, .ibd-source-grid
  ) {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .fus-stage {
    width: min(1180px, calc(100% - 32px));
    padding: 3.5rem 0;
  }
  .fus-stage-heading { grid-template-columns: minmax(0, 1fr); gap: 1.25rem; }
  .fus-stage-heading h2 { max-width: 100%; font-size: clamp(2.15rem, 10vw, 3.6rem); }
  .fus-stage-total { width: 100%; max-width: none; }
  .fus-stage-grid, .fus-stage-costs ul { grid-template-columns: minmax(0, 1fr); }
  .fus-stage-grid article { min-height: auto; }

  .site-footer {
    padding-left: max(16px, env(safe-area-inset-left)) !important;
    padding-right: max(16px, env(safe-area-inset-right)) !important;
  }
  .site-footer :where(nav, .fus-policy-links, .footer-legal, .fus-legal-details) {
    max-width: 100% !important;
  }
}

@media (max-width: 640px) {
  body { padding-bottom: env(safe-area-inset-bottom); }

  :where(input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]), select, textarea) {
    width: 100%;
    min-width: 0;
    font-size: 16px !important;
  }
  :where(button, .button, .primary-button, .submit-button) {
    max-width: 100%;
    min-height: 44px;
  }

  .fus-stage { width: min(1180px, calc(100% - 24px)); padding: 3rem 0; }
  .fus-stage-total { padding: 1rem; }
  .fus-stage-total strong { font-size: clamp(1.9rem, 10vw, 2.7rem); }
  .fus-stage-costs { padding: .85rem; }
  .fus-stage-costs li {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: .5rem;
    padding: .75rem;
  }
  .fus-stage-costs li > span {
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr);
    gap: .5rem;
    align-items: start;
  }
  .fus-stage-costs li > strong {
    justify-self: end;
    padding-left: calc(2.5rem + .5rem);
  }
  .fus-stage-costs > p { align-items: baseline; }
  .fus-stage-cost-code { font-size: .64rem; padding: 0 .34rem; }
  .fus-stage2-cost-column { padding: .75rem; }
  .fus-stage2-package-heading { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .5rem; }

  .fus-register-metrics { grid-template-columns: minmax(0, 1fr); }
  :where(.admin-stats, .document-workflow-nav) { grid-template-columns: minmax(0, 1fr) !important; }

  /* Homepage IBD note and IBD hero need an extra narrow-screen guard. */
  .ibd-practical-note { width: 100%; max-width: 100%; overflow: hidden; }
  .ibd-practical-note a { white-space: normal !important; overflow-wrap: normal !important; }
  .ibd-hero h1 {
    max-width: 100%;
    font-size: clamp(2.6rem, 14vw, 4rem) !important;
    line-height: .95 !important;
    letter-spacing: -.04em !important;
    overflow-wrap: normal !important;
    word-break: normal !important;
  }

  /* Do not split navigation labels or currency values at arbitrary characters. */
  :where(.main-nav a, .site-footer nav a, .fus-policy-links a, .portal-header a, .portal-footer a,
         .fus-stage-total strong, .fus-stage-costs li > strong, .fus-stage2-package-heading strong) {
    word-break: normal !important;
    overflow-wrap: normal !important;
    -webkit-hyphens: none !important;
    hyphens: none !important;
  }
}

@media (max-width: 420px) {
  header.site-header .brand strong { font-size: 16px !important; }
  .fus-stage-heading h2 { font-size: clamp(2rem, 11vw, 3rem); }
  .fus-stage-costs li > strong { justify-self: start; padding-left: 0; margin-left: calc(2.4rem + .5rem); }
  .fus-stage-costs > p { display: grid; grid-template-columns: 1fr; gap: .35rem; }
  .fus-stage-costs > p strong { justify-self: start; }
  .fus-stage2-package-heading { grid-template-columns: minmax(0, 1fr); }
  .fus-stage2-package-heading strong { justify-self: start; }
}

/* Landscape phones and short mobile viewports: keep menus reachable. */
@media (max-height: 520px) and (max-width: 980px) {
  header.site-header .main-nav { max-height: calc(100dvh - 64px) !important; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

/* Public header: keep the desktop links on one row, then use the existing
   accessible menu before the labels become too cramped. */
@media (min-width: 1181px) and (max-width: 1600px) {
  header.site-header { padding-inline: clamp(20px, 2vw, 34px) !important; gap: 18px !important; }
  header.site-header .brand { flex: 0 0 238px !important; min-width: 0 !important; gap: 10px !important; }
  header.site-header .brand-symbol { width: 40px !important; flex-basis: 40px !important; }
  header.site-header .brand-tagline { display: none !important; }
  header.site-header .main-nav {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    justify-content: flex-end !important;
    flex-wrap: nowrap !important;
    gap: clamp(9px, 1vw, 16px) !important;
  }
  header.site-header .main-nav a { font-size: clamp(12px, .9vw, 14px) !important; letter-spacing: .025em !important; }
}

@media (min-width: 981px) and (max-width: 1180px) {
  header.site-header { height: auto !important; min-height: 84px !important; padding: 15px 24px !important; }
  header.site-header .brand { min-width: 0 !important; max-width: calc(100% - 64px) !important; }
  header.site-header .fus-mobile-nav-toggle {
    display: inline-flex !important;
    position: relative !important;
    inset: auto !important;
    z-index: 62 !important;
    width: 44px !important;
    min-width: 44px !important;
    min-height: 44px !important;
    margin-left: auto !important;
    align-items: center !important;
    justify-content: center !important;
  }
  header.site-header .main-nav {
    display: none !important;
    position: absolute !important;
    top: 100% !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 60 !important;
    margin: 0 !important;
    padding: 18px 24px !important;
    max-height: calc(100dvh - 84px) !important;
    overflow-y: auto !important;
    background: #041315 !important;
  }
  header.site-header .main-nav.fus-mobile-nav-open,
  header.site-header .main-nav.is-open,
  header.site-header.fus-mobile-nav-open .main-nav {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 4px !important;
  }
  header.site-header .main-nav a {
    display: block !important;
    min-height: 44px !important;
    padding: 12px 4px !important;
    border-bottom: 1px solid rgba(255,255,255,.12) !important;
    font-size: 14px !important;
  }
}
