/* CRASA: display options and the translation notice.
 *
 * Six reader choices, each a class on <html> set before the page is drawn:
 *   a11y-text-smaller | a11y-text-larger | a11y-text-largest
 *   a11y-spacing    wider line and paragraph spacing (WCAG 1.4.12 values)
 *   a11y-dyslexia   reading spacing: wider letters and words, left aligned,
 *                   no italics, no justified text, shorter lines
 *   a11y-contrast
 *   a11y-underline
 *   a11y-pause      animations, transitions and auto-advance stopped
 * Reads tokens.css only. High contrast works by giving the same tokens
 * other values, so no component needs a rule of its own.
 */

/* The control ------------------------------------------------------------ */

/* Without script nothing could run the panel, so it is not drawn. */
html:not(.has-js) .c-a11y { display: none; }

/* Self-contained: the toggle carries its own look so it reads the same in
   whatever bar the header places it. */
.c-a11y { position: relative; flex: none; font-family: var(--f-body); }
.c-a11y__toggle {
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  padding: 0 var(--s-2);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  color: inherit;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--r-sm);
  cursor: pointer;
}
.c-a11y__toggle:hover { border-color: currentColor; }
.c-a11y__toggle[aria-expanded="true"] { border-color: currentColor; }
.c-a11y__toggle svg { flex: none; }
/* The name is in the button for every reader; it is drawn on a phone,
   where the control is a row of its own, and read out everywhere. */
.c-a11y__text {
  position: absolute !important;
  width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.c-a11y__panel {
  position: absolute;
  right: 0;
  top: calc(100% + var(--s-2));
  z-index: 60;
  width: 320px;
  max-width: calc(100vw - (var(--s-4) * 2));
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  background: var(--c-white);
  color: var(--c-charcoal);
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  box-shadow: var(--e-2);
  padding: var(--s-4);
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
  font-family: var(--f-body);
  text-align: left;
}
.c-a11y__panel[hidden] { display: none; }
/* Where the button sits near the left of the row, the panel opens
   rightwards so it stays on screen. a11y.js sets the modifier. */
.c-a11y__panel--start { right: auto; left: 0; }

.c-a11y__head { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); }
.c-a11y__title { margin: 0; font-weight: 600; font-size: 16px; color: var(--c-navy); }
.c-a11y__label { margin: 0 0 var(--s-2); font-size: 14px; font-weight: 600; color: var(--c-charcoal); }

.c-a11y__close {
  flex: none;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  background: transparent;
  border: 0;
  border-radius: var(--r-sm);
  color: var(--c-charcoal);
  cursor: pointer;
  margin: calc(var(--s-3) * -1) calc(var(--s-3) * -1) calc(var(--s-3) * -1) 0;
}
.c-a11y__close:hover { background: var(--c-green-light); }

.c-a11y__row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-2); }

.c-a11y__option,
.c-a11y__switch,
.c-a11y__reset {
  min-height: 44px;
  padding: var(--s-2) var(--s-3);
  font-family: var(--f-body);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
  text-align: left;
  color: var(--c-navy);
  background: var(--c-white);
  border: 1.5px solid var(--c-border);
  border-radius: var(--r-sm);
  cursor: pointer;
}
.c-a11y__option:hover,
.c-a11y__switch:hover,
.c-a11y__reset:hover { border-color: var(--c-navy); }

/* The four sizes show their own scale, so the choice is visible before it
   is made. */
.c-a11y__option--smaller { font-size: 13px; }
.c-a11y__option--normal { font-size: 15px; }
.c-a11y__option--larger { font-size: 17px; }
.c-a11y__option--largest { font-size: 19px; }

.c-a11y__option[aria-pressed="true"] {
  background: var(--c-green-dark);
  border-color: var(--c-green-dark);
  color: var(--c-white);
}

.c-a11y__toggles { display: flex; flex-direction: column; gap: var(--s-2); }
.c-a11y__toggles .c-a11y__label { margin-bottom: 0; }

/* A pressed toggle carries a tick as well as the colour, so the state is
   not carried by colour alone. */
.c-a11y__switch { display: flex; align-items: flex-start; gap: var(--s-3); }
.c-a11y__switch::before {
  content: "";
  flex: none;
  width: 18px;
  height: 18px;
  margin-top: 1px;
  border: 1.5px solid var(--c-navy);
  border-radius: var(--r-xs);
  background: var(--c-white) center / 14px no-repeat;
}
.c-a11y__switch-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
/* Long names in French and Portuguese wrap inside the narrow toolbar column. */
.c-a11y__switch-name { font-weight: 600; color: var(--c-charcoal); overflow-wrap: anywhere; }
.c-a11y__hint { font-size: 13px; font-weight: 400; line-height: 1.4; color: var(--c-slate); }
.c-a11y__switch[aria-pressed="true"] { border-color: var(--c-green-dark); background: var(--c-green-light); }
.c-a11y__switch[aria-pressed="true"]::before {
  border-color: var(--c-green-dark);
  background-color: var(--c-green-dark);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E");
}

.c-a11y__reset {
  align-self: flex-start;
  border-color: transparent;
  padding-inline: 0;
  text-decoration: underline;
  text-underline-offset: 3px;
  font-weight: 400;
  color: var(--c-green-dark);
  background: transparent;
}
.c-a11y__reset:hover { border-color: transparent; color: var(--c-navy); }

/* Phones: a slim row of its own. Wherever the header puts the control, it
   spans the width, shows its name beside the icon at the right edge, and
   the panel opens as a sheet across the screen under it. Keyed on .c-a11y
   only, so it holds whatever the header's own classes become. */
@media (max-width: 767.98px) {
  .c-a11y { display: flex; justify-content: flex-end; width: 100%; }
  .c-a11y__toggle { min-height: 36px; padding: 2px var(--s-2); font-size: 14px; }
  /* A header may size the button as an icon square; on a phone it carries
     its name, so it takes the width it needs (higher weight on purpose). */
  .c-a11y > button.c-a11y__toggle[data-a11y-toggle] { width: auto; min-width: 44px; }
  .c-a11y__text {
    position: static !important;
    width: auto; height: auto; margin: 0;
    overflow: visible; clip: auto; white-space: nowrap;
  }
  /* 36px tall, but the hit area keeps 44px through the padding of the row
     around it; the button is the full row height when the row is 44px. */
  .c-a11y__toggle::after { content: ""; position: absolute; inset: -4px 0; }
  .c-a11y__toggle { position: relative; }
  .c-a11y__panel {
    position: fixed;
    top: auto;
    left: var(--s-4);
    right: var(--s-4);
    width: auto;
    max-width: none;
    margin-top: var(--s-2);
    max-height: calc(100vh - 96px);
  }
  .c-a11y__panel--start { left: var(--s-4); }
}

/* Translation notice ---------------------------------------------------- */

/* In the flow at the top of the content, never over it. Closed, the whole
   element goes: the summary is the close control, not a heading to reopen. */
.c-translation { padding-block: var(--s-4); }
html.translation-notice-closed .c-translation,
.c-translation:has(.c-translation__box:not([open])) { display: none; }

.c-translation__box {
  position: relative;
  max-width: 80ch;
  padding: var(--s-3) calc(44px + var(--s-3)) var(--s-3) var(--s-4);
  background: var(--c-green-light);
  border: 1px solid var(--c-green-mid);
  border-left: 4px solid var(--c-green-dark);
  border-radius: var(--r-sm);
  font-size: var(--t-small-size);
  line-height: var(--t-small-line);
  color: var(--c-charcoal);
}
.c-translation__title { margin: 0; font-weight: 600; color: var(--c-green-dark); }
.c-translation__body { margin: 2px 0 0; }

.c-translation__close {
  position: absolute;
  top: var(--s-1);
  right: var(--s-1);
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: var(--r-sm);
  color: var(--c-charcoal);
  cursor: pointer;
  list-style: none;
}
.c-translation__close::-webkit-details-marker { display: none; }
.c-translation__close::marker { content: ""; }
.c-translation__close:hover { background: var(--c-white); }

/* The automatic translation line on an article. */
.c-machine-note {
  margin: 0 0 var(--s-4);
  font-size: var(--t-small-size);
  line-height: var(--t-small-line);
  color: var(--c-slate);
}

/* Turnstile -------------------------------------------------------------- */

/* The form check above a public form's submit button, drawn only when
   Turnstile is on. The height is the widget's own, reserved so the button
   does not jump when Cloudflare's frame arrives. */
.c-turnstile { margin-block: var(--s-4); }
.cf-turnstile { min-height: 65px; }

/* Text size --------------------------------------------------------------- */

/* The stylesheets set type in pixels, so scaling the root font size alone
   would move almost nothing. The page regions are zoomed instead: text and
   the boxes around it grow together and the layout reflows inside the
   viewport, as it does under browser zoom. Media queries still answer to
   the real width, so a phone keeps its one-column layout. The header is
   left at its size: it already wraps and collapses to fit, and a zoomed
   header crushes the identity on a phone. */
html.a11y-text-smaller { --a11y-zoom: .9; font-size: 90%; }
html.a11y-text-larger { --a11y-zoom: 1.15; font-size: 115%; }
html.a11y-text-largest { --a11y-zoom: 1.3; font-size: 130%; }

html.a11y-text-smaller body > :is(main, .c-footer),
html.a11y-text-larger body > :is(main, .c-footer),
html.a11y-text-largest body > :is(main, .c-footer) {
  zoom: var(--a11y-zoom);
}

/* Underlined links -------------------------------------------------------- */

/* Links drawn as buttons or controls keep their own shape. */
html.a11y-underline a:not(.c-btn):not(.c-iconbutton):not(.c-skip):not(.c-extranet):not(.c-lang__option) {
  text-decoration-line: underline !important;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

/* High contrast ----------------------------------------------------------- */

/* Black on white, white on black and one strong green. The tokens play two
   parts on this platform: the light ones are grounds on light pages and
   text on navy bands, the dark ones the reverse. So every light token
   becomes white, every dark one black, and both parts stay legible:
   #000 on #FFF is 21:1, #006B3B on #FFF is 6.9:1, white on #006B3B the
   same. Rules and control borders become black. */
html.a11y-contrast {
  --c-white:#FFFFFF; --c-cream:#FFFFFF; --c-sand:#FFFFFF; --c-hatch:#FFFFFF;
  --c-green-light:#FFFFFF; --c-green-mid:#FFFFFF; --c-amber-light:#FFFFFF; --c-amber-mid:#FFFFFF;
  --c-red-light:#FFFFFF; --c-red-mid:#FFFFFF; --c-purple-light:#FFFFFF; --c-grey-light:#FFFFFF;
  --c-navy-edge:#FFFFFF; --c-navy-soft:#FFFFFF; --c-navy-line:#FFFFFF;
  --c-charcoal:#000000; --c-slate:#000000; --c-disabled:#000000;
  --c-navy:#000000; --c-navy-mid:#000000; --c-navy-deep:#000000;
  --c-amber-dark:#000000; --c-red-dark:#000000; --c-purple-dark:#000000;
  --c-border:#000000; --c-line:#000000;
  --c-green:#006B3B; --c-green-dark:#006B3B;
  --c-amber:#000000; --c-red:#B00020;
  --e-1:none; --e-2:0 0 0 2px #000000; --e-3:0 0 0 2px #000000;
}
/* The UI system tokens (ui.css) follow the same rule, so every page built
   from u- components goes black, white and one green as well. */
html.a11y-contrast {
  --u-tint-green:#FFFFFF; --u-pale:#FFFFFF; --u-tint-blue:#FFFFFF; --u-white:#FFFFFF;
  --u-ink:#000000; --u-muted:#000000; --u-blue-ink:#000000; --u-blue:#000000;
  --u-line:#000000; --u-focus:#000000;
  --u-shadow:none; --u-shadow-lift:0 0 0 2px #000000;
  --c-link:#006B3B; --c-blue-ink:#000000; --c-blue:#000000; --c-blue-icon:#000000; --c-tint-blue:#FFFFFF;
  --focus-ring:#000000;
}
html.a11y-contrast body { background: #FFFFFF; color: #000000; }
html.a11y-contrast main a:not(.c-btn),
html.a11y-contrast .c-footer a { text-decoration-line: underline; }

/* Focus becomes black, with a white halo so it shows on black and green
   fills as well as on white. */
html.a11y-contrast :focus-visible {
  outline: 3px solid #000000 !important;
  outline-offset: 2px;
  box-shadow: 0 0 0 5px #FFFFFF;
}

/* Line spacing -------------------------------------------------------------- */

/* The text spacing values of WCAG 1.4.12: line height 1.5 times the size
   is the floor already, so this goes to 1.8, with paragraph spacing twice
   the size. Applied to running text, not to controls, so buttons keep
   their height. */
html.a11y-spacing :is(p, li, dd, dt, td, th, blockquote, figcaption, label, .c-prose, .u-prose) {
  line-height: 1.8 !important;
}
html.a11y-spacing :is(p, ul, ol, dl, blockquote) { margin-bottom: 1.5em; }
html.a11y-spacing :is(h1, h2, h3, h4) { line-height: 1.35 !important; }

/* Reading spacing (dyslexia-friendly) ------------------------------------- */

/* The British Dyslexia Association style guide: letter spacing about 0.12
   of the size, word spacing 0.16, left aligned, no italics, lines not too
   long. The site's sans (IBM Plex Sans) is kept: it has distinct letter
   shapes for b, d, p, q and I, l, 1, and no extra font is downloaded. */
html.a11y-dyslexia body {
  letter-spacing: .06em;
  word-spacing: .16em;
}
html.a11y-dyslexia :is(p, li, dd, td, blockquote, figcaption) {
  letter-spacing: .12em !important;
  word-spacing: .16em !important;
  line-height: 1.8 !important;
  text-align: left !important;
  hyphens: none;
}
html.a11y-dyslexia main :is(p, li, dd, blockquote) { max-width: 70ch; }
html.a11y-dyslexia :is(em, i, cite, blockquote) { font-style: normal !important; }
html.a11y-dyslexia :is(em, i) { font-weight: 600; }
html.a11y-dyslexia :is(h1, h2, h3, h4, h5, h6) { font-family: var(--f-body) !important; letter-spacing: .02em !important; }

/* Pause animations ------------------------------------------------------- */

/* Everything that moves by itself stops: CSS animation and transition,
   smooth scrolling, and (through the crasa:a11y-pause event and this
   class) the hero slider and count-up scripts. Content a reveal script
   would fade in is shown at once. */
html.a11y-pause { scroll-behavior: auto !important; }
html.a11y-pause *,
html.a11y-pause *::before,
html.a11y-pause *::after {
  animation: none !important;
  transition: none !important;
  scroll-behavior: auto !important;
}
html.a11y-pause :is([data-reveal], .is-reveal, .k-reveal, .u-reveal) { opacity: 1 !important; transform: none !important; }
html.a11y-pause .u-card:hover,
html.a11y-pause .u-card:focus-within { transform: none !important; }

/* Reduced motion asked for by the device is honoured without the toggle;
   base.css carries the global rule, this covers the panel itself. */
@media (prefers-reduced-motion: reduce) {
  .c-a11y__toggle, .c-a11y__panel { transition: none !important; }
}

/* The toolbar in high contrast keeps a visible edge on its own controls. */
html.a11y-contrast .c-a11y__hint { color: #000000; }

/* Accessibility statement (G5) ------------------------------------------- */

/* Two columns: the table of contents stays in view beside the text on a
   wide screen and comes first on a phone. */
.g-statement { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: var(--u-5, 32px); align-items: start; }
.g-statement__toc { position: sticky; top: var(--s-6, 24px); }
.g-statement__toc-title { margin: 0 0 var(--u-2, 8px); font: 600 18px/1.3 var(--f-body); color: var(--u-ink, #25384A); }
.g-statement__toc ol { margin: 0; padding-left: 1.4em; display: grid; gap: var(--u-1, 4px); }
.g-statement__toc li { padding-block: 6px; }
.g-statement__toc a { display: inline; color: var(--u-green-deep, #0B5F3E); }
.g-statement__section { padding-bottom: var(--u-6, 40px); margin-bottom: var(--u-6, 40px); border-bottom: 1px solid var(--u-line, #D9E3EC); scroll-margin-top: 96px; }
.g-statement__section:last-child { border-bottom: 0; margin-bottom: 0; }
.g-statement__section:focus { outline: none; }
.g-statement__section .u-text { max-width: 72ch; }
.g-statement__list { margin: 0; padding-left: 1.3em; display: grid; gap: var(--u-2, 8px); max-width: 72ch; color: var(--u-ink, #25384A); line-height: 1.5; }
.g-statement__table th[scope="row"] { font-weight: 400; text-align: left; vertical-align: top; }
.g-statement__table td { vertical-align: top; }
.g-statement__table thead th:first-child { width: 56%; }
.g-statement__table thead th:nth-child(2) { width: 18%; }
.g-statement__what { display: block; font-weight: 600; color: var(--u-ink, #25384A); }
.g-statement__detail { display: block; margin-top: 2px; color: var(--u-muted, #3F5264); }
.g-statement__contact { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--u-3, 16px); margin: var(--u-4, 24px) 0; }
.g-statement__contact dt { font: 600 14px/1.3 var(--f-body); color: var(--u-muted, #3F5264); }
.g-statement__contact dd { margin: 4px 0 0; font-size: 18px; overflow-wrap: anywhere; }

@media (max-width: 991.98px) {
  .g-statement { grid-template-columns: minmax(0, 1fr); }
  .g-statement__toc { position: static; }
}
@media (max-width: 639.98px) {
  .g-statement__contact { grid-template-columns: minmax(0, 1fr); }
  .g-statement__table td { white-space: normal; }
}
.g-statement__table tbody th { position: static; background: transparent; font-size: 16px; padding: 12px 16px; border-bottom: 1px solid var(--u-line, #D9E3EC); }
.g-statement__table tbody tr:nth-child(even) th { background: var(--u-pale, #F4F8F6); }

/* Fallback for the header of 28 October only (.c-header--layered), which
   hides its utility bar on phones: keep the bar as a slim row carrying
   this control alone. The Concept 3 header places the control itself and
   does not use this class, so this block does nothing there; delete it
   once that header is live. */
@media (max-width: 767.98px) {
  .has-js .c-header--layered .c-header__bar:has(.c-a11y) { display: block; }
  .has-js .c-header--layered .c-header__bar:has(.c-a11y) .c-header__agency,
  .has-js .c-header--layered .c-header__bar:has(.c-a11y) .c-header__utilities > :not(.c-a11y) { display: none; }
  .has-js .c-header--layered .c-header__bar:has(.c-a11y) .c-header__bar-inner { justify-content: flex-end; padding-block: 2px; }
}

/* Floating page controls (partials/float-controls) ----------------------- */

/* Bottom right, clear of the notch and the home bar, two 44px squares
   stacked: "Back to top" above once the reader has scrolled one screen,
   the display options in the corner. Each has its own navy ground and a
   white edge, so it reads on the cream page and on the navy footer. */
/* The consent banner's height, set by consent.js while it shows: focused
   content scrolls clear of it. */
html { scroll-padding-bottom: var(--cc-h, 0px); }

.c-float {
  position: fixed;
  right: calc(var(--s-4) + env(safe-area-inset-right, 0px));
  bottom: calc(var(--s-4) + env(safe-area-inset-bottom, 0px) + var(--cc-h, 0px));
  z-index: 65;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: var(--s-2);
  pointer-events: none;
}
.c-float > * { pointer-events: auto; }
html:not(.has-js) .c-float { display: none; }

.c-float__top,
.c-float .c-a11y > .c-a11y__toggle {
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--c-white);
  background: var(--c-navy);
  border: 1.5px solid var(--c-white);
  border-radius: var(--r-sm);
  box-shadow: var(--e-2);
  cursor: pointer;
  text-decoration: none;
}
.c-float__top[hidden] { display: none; }
.c-float__top:hover,
.c-float .c-a11y > .c-a11y__toggle:hover,
.c-float .c-a11y > .c-a11y__toggle[aria-expanded="true"] { background: var(--c-green); border-color: var(--c-white); }
/* Two rings, white inside navy, so focus shows on any ground. */
.c-float__top:focus-visible,
.c-float .c-a11y > .c-a11y__toggle:focus-visible {
  outline: 2px solid var(--c-white);
  outline-offset: 0;
  box-shadow: 0 0 0 5px var(--c-navy);
}

/* The control is an icon square at every width; its name stays in the
   button for assistive technology (.c-a11y__text, visually hidden). */
.c-float .c-a11y { display: block; width: auto; position: relative; }
.c-float .c-a11y .c-a11y__text {
  position: absolute !important;
  width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.c-float .c-a11y__toggle::after { content: none; }

/* The panel opens upwards from the corner. */
.c-float .c-a11y__panel {
  top: auto;
  bottom: calc(100% + var(--s-2));
  right: 0;
  left: auto;
  max-height: calc(100vh - 120px);
  max-height: calc(100dvh - 120px);
}
@media (max-width: 767.98px) {
  .c-float .c-a11y__panel {
    position: fixed;
    left: calc(var(--s-4) + env(safe-area-inset-left, 0px));
    right: calc(var(--s-4) + env(safe-area-inset-right, 0px));
    bottom: calc(var(--s-4) + 44px + var(--s-2) + env(safe-area-inset-bottom, 0px) + var(--cc-h, 0px));
    top: auto;
    margin: 0;
    max-height: calc(100dvh - 120px);
  }
  /* The footer's last line stays clear of the two squares. */
  .k-foot { padding-bottom: calc(88px + var(--s-2) + var(--s-6) + env(safe-area-inset-bottom, 0px)); }
}

html.a11y-contrast .c-float__top,
html.a11y-contrast .c-float .c-a11y > .c-a11y__toggle { background: #000000; color: #FFFFFF; border-color: #FFFFFF; }

@media (prefers-reduced-motion: reduce) {
  .c-float__top, .c-float .c-a11y__toggle { transition: none !important; }
}

@media print {
  .c-float { display: none !important; }
}
