/* Melissani Foundation. Brand blue #2861BC, navy and gold, Open Sans (self-hosted), plenty of white space.
   Colors live in variables so that the Light, Dark and High contrast themes (see the Accessibility panel) only change the variables. */
@font-face {
  font-family: "Open Sans";
  src: url("/assets/fonts/open-sans-latin.woff2") format("woff2");
  font-weight: 300 800;
  font-style: normal;
  font-display: swap;
}
/* Atkinson Hyperlegible: made for low vision. Only downloaded when a visitor switches on "Easier-to-read font". */
@font-face {
  font-family: "Atkinson Hyperlegible";
  src: url("/assets/fonts/atkinson-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Atkinson Hyperlegible";
  src: url("/assets/fonts/atkinson-700.woff2") format("woff2");
  font-weight: 700 800;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;
  --blue: #2861bc;
  --blue-dark: #1d4a91;
  --navy: #12294d;
  --white: #ffffff;
  --gold: #c9a24b;

  --bg: #ffffff;
  --surface: #ffffff;
  --text: #1c2b45;
  --heading: #12294d;
  --muted: #4a5b78;
  --line: #d6e0f0;
  --control-line: #6f7f9c; /* the edge of a text box: at least 3:1 against what is around it (test.mjs) */
  --tint: #eef4fc;
  --sand: #f8f4ec;
  --link: #1d4a91;
  --link-hover: #12294d;
  --accent: #2861bc;
  --accent-hover: #1d4a91;
  --on-accent: #ffffff;
  --accent-text: #1d4a91;
  --warn-text: #6b4e0f;
  --header-bg: rgba(255, 255, 255, 0.96);
  --navy-band: #12294d;
  --navy-band-text: #e8eefa;
  --blue-band: #2861bc;
  --footer-bg: #12294d;
  --ring: #12294d;
  --ring-gap: #ffffff;
  --radius: 16px;
  --radius-sm: 10px;
  --border-w: 1px;
  --shadow: 0 1px 2px rgba(18, 41, 77, 0.06), 0 8px 24px rgba(18, 41, 77, 0.08);
  --shadow-lift: 0 2px 4px rgba(18, 41, 77, 0.08), 0 18px 40px rgba(18, 41, 77, 0.14);
  --wrap: 72.5rem; /* 1160px at the standard text size; grows with Large to Largest text, so the page scales like browser zoom */
  --prose: 44rem;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0d1829;
  --surface: #15233b;
  --text: #e6edf8;
  --heading: #ffffff;
  --muted: #b4c3dc;
  --line: #2f4366;
  --control-line: #8094b8;
  --tint: #111f36;
  --sand: #1a2538;
  --link: #9cc2ff;
  --link-hover: #cfe0ff;
  --accent: #2861bc;
  --accent-hover: #3a74d6;
  --accent-text: #9cc2ff;
  --warn-text: #e3c277;
  --header-bg: rgba(13, 24, 41, 0.96);
  --navy-band: #08111f;
  --navy-band-text: #e6edf8;
  --blue-band: #1d4a91;
  --footer-bg: #08111f;
  --ring: #ffffff;
  --ring-gap: #0d1829;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(0, 0, 0, 0.35);
  --shadow-lift: 0 2px 4px rgba(0, 0, 0, 0.45), 0 18px 40px rgba(0, 0, 0, 0.5);
}

:root[data-theme="contrast"] {
  color-scheme: light;
  --bg: #ffffff;
  --surface: #ffffff;
  --text: #000000;
  --heading: #000000;
  --muted: #1a1a1a;
  --line: #000000;
  --control-line: #000000;
  --tint: #ffffff;
  --sand: #ffffff;
  --link: #0a3a8a;
  --link-hover: #000000;
  --accent: #0a3a8a;
  --accent-hover: #000000;
  --accent-text: #0a3a8a;
  --warn-text: #5c3d00;
  --header-bg: #ffffff;
  --navy-band: #000000;
  --navy-band-text: #ffffff;
  --blue-band: #0a3a8a;
  --footer-bg: #000000;
  --ring: #000000;
  --ring-gap: #ffee00;
  --border-w: 2px;
  --shadow: none;
  --shadow-lift: none;
}

/* ---------- Visitor choices (Accessibility panel) ---------- */
html[data-size="115"] { font-size: 115%; }
html[data-size="130"] { font-size: 130%; }
html[data-size="150"] { font-size: 150%; }
html[data-font="readable"] body, html[data-font="readable"] button, html[data-font="readable"] input, html[data-font="readable"] .btn, html[data-font="readable"] .quote { font-family: "Atkinson Hyperlegible", "Open Sans", system-ui, sans-serif; font-style: normal; }
html[data-space="wide"] body { line-height: 1.95; letter-spacing: 0.05em; word-spacing: 0.16em; }
html[data-space="wide"] p { margin-bottom: 2em; }
html[data-space="wide"] li { margin-bottom: 0.7em; }
html[data-links="underline"] a { text-decoration: underline !important; text-underline-offset: 0.2em; }
html[data-motion="reduce"], html[data-motion="reduce"] * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 6rem; }
body {
  margin: 0;
  font-family: "Open Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  overflow-wrap: break-word; /* a word too long for its line, on a small phone with large text, breaks instead of being cut off */
}
img { max-width: 100%; height: auto; display: block; }
svg { flex: none; }
a { color: var(--link); text-underline-offset: 0.18em; }
a:hover { color: var(--link-hover); }
h1, h2, h3, h4 { font-family: inherit; color: var(--heading); line-height: 1.2; margin: 0 0 0.6em; letter-spacing: -0.01em; text-wrap: balance; }
html[data-space="wide"] h1, html[data-space="wide"] h2, html[data-space="wide"] h3 { letter-spacing: 0.02em; }
h1 { font-size: min(clamp(2.1rem, 4.4vw, 3.3rem), 11.5vw); font-weight: 800; } /* the 11.5vw keeps long words on a small phone with Larger or Largest text; standard text never reaches it */
h2 { font-size: clamp(1.55rem, 2.8vw, 2.2rem); font-weight: 750; }
h3 { font-size: 1.2rem; font-weight: 700; }
p { margin: 0 0 1.1em; text-wrap: pretty; }
ul, ol { margin: 0 0 1.2em; padding-left: 1.3em; }
li { margin-bottom: 0.4em; }
address { font-style: normal; }
strong { color: inherit; }
/* A two-part ring (dark line plus a light gap) so it can be seen on white, on dark bands and on the blue band. */
:focus-visible { outline: 3px solid var(--ring); outline-offset: 3px; box-shadow: 0 0 0 3px var(--ring-gap); border-radius: 4px; }
.band-navy :focus-visible, .band-blue :focus-visible, .hero :focus-visible, .site-footer :focus-visible { outline-color: #ffffff; box-shadow: 0 0 0 3px #0a1c3c; }
:root[data-theme="contrast"] .band-navy :focus-visible, :root[data-theme="contrast"] .band-blue :focus-visible, :root[data-theme="contrast"] .hero :focus-visible, :root[data-theme="contrast"] .site-footer :focus-visible { outline-color: #ffee00; box-shadow: 0 0 0 3px #000000; }
main:focus { outline: none; box-shadow: none; }

.wrap { width: min(100% - 2rem, var(--wrap)); margin-inline: auto; }
.prose { max-width: var(--prose); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 1rem; top: -5rem; z-index: 200; background: var(--navy); color: #fff; padding: 0.8rem 1.1rem; border-radius: 8px; font-weight: 700; }
.skip:focus { top: 1rem; color: #fff; }
.icon { display: inline-flex; }
.icon svg, .ico svg { width: 1.5rem; height: 1.5rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: 2.9rem; padding: 0.6rem 1.4rem;
  font: inherit; font-weight: 700; font-size: 1rem; line-height: 1.2; text-decoration: none; text-align: center;
  color: var(--on-accent); background: var(--accent); border: 2px solid var(--accent); border-radius: 999px; cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.15s, box-shadow 0.15s;
}
.btn:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--on-accent); }
.btn:active { transform: translateY(1px); }
.btn-sm { min-height: 2.5rem; padding: 0.4rem 1.1rem; font-size: 0.95rem; }
.btn-lg { min-height: 3.3rem; padding: 0.8rem 1.8rem; font-size: 1.06rem; }
.btn-ghost { background: transparent; color: var(--link); border-color: var(--accent-text); }
.btn-ghost:hover { background: var(--tint); color: var(--link-hover); border-color: var(--link-hover); }
.btn-light { background: #fff; color: #12294d; border-color: #fff; }
.btn-light:hover { background: #eef4fc; color: #12294d; border-color: #eef4fc; }
.btn-outline-light { background: transparent; color: #fff; border-color: rgba(255, 255, 255, 0.9); }
.btn-outline-light:hover { background: rgba(255, 255, 255, 0.16); color: #fff; border-color: #fff; }
.btn svg { width: 1.1rem; height: 1.1rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 1.4rem; }
.link-arrow { display: inline-flex; align-items: center; gap: 0.4rem; font-weight: 700; text-decoration: none; }
.link-arrow svg { width: 1.1rem; height: 1.1rem; transition: transform 0.15s; }
.link-arrow:hover { text-decoration: underline; }
.link-arrow:hover svg { transform: translateX(3px); }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--header-bg); border-bottom: var(--border-w) solid var(--line); backdrop-filter: blur(8px); transition: box-shadow 0.2s; container-type: inline-size; } /* its width decides when the buttons drop their words (see "Small screens") */
.site-header.scrolled { box-shadow: 0 6px 20px rgba(18, 41, 77, 0.1); }
:root[data-theme="contrast"] .site-header.scrolled { box-shadow: none; }
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem 1rem; min-height: 4.6rem; }
.brand { display: block; line-height: 0; }
.brand img { width: 210px; height: auto; }
.logo-dark { display: none; }
:root[data-theme="dark"] .logo-light { display: none; }
:root[data-theme="dark"] .logo-dark { display: block; }
.head-tools { display: flex; align-items: center; flex-wrap: wrap; gap: 0.4rem; }
.nav { display: flex; align-items: center; flex-wrap: wrap; gap: 0.15rem; }
.nav a:not(.btn) { position: relative; padding: 0.6rem 0.8rem; border-radius: 999px; color: var(--heading); font-weight: 600; text-decoration: none; }
.nav a:not(.btn):hover { background: var(--tint); }
.nav a[aria-current]:not(.btn) { color: var(--accent-text); }
.nav a[aria-current]:not(.btn)::after { content: ""; position: absolute; left: 0.8rem; right: 0.8rem; bottom: 0.25rem; height: 3px; border-radius: 3px; background: var(--accent-text); }
.nav .btn { margin-left: 0.5rem; }
.nav-donate svg { width: 1rem; height: 1rem; }
.nav-toggle { display: none; }
.a11y-open { display: none; align-items: center; gap: 0.45rem; min-height: 2.5rem; padding: 0.35rem 0.9rem; font: inherit; font-weight: 600; font-size: 0.95rem; color: var(--heading); background: transparent; border: 2px solid var(--line); border-radius: 999px; cursor: pointer; }
.js .a11y-open { display: inline-flex; }
.a11y-open:hover { background: var(--tint); border-color: var(--accent-text); }
.a11y-open svg { width: 1.3rem; height: 1.3rem; color: var(--accent-text); }
.burger { position: relative; display: inline-block; width: 1.1rem; height: 2px; background: currentColor; border-radius: 2px; }
.burger::before, .burger::after { content: ""; position: absolute; left: 0; width: 100%; height: 2px; background: currentColor; border-radius: 2px; transition: transform 0.2s; }
.burger::before { top: -6px; }
.burger::after { top: 6px; }
.nav-toggle[aria-expanded="true"] .burger { background: transparent; }
.nav-toggle[aria-expanded="true"] .burger::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .burger::after { transform: translateY(-6px) rotate(-45deg); }

/* ---------- Breadcrumbs and section menu ---------- */
.crumbs { background: var(--tint); border-bottom: var(--border-w) solid var(--line); font-size: 0.92rem; }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 0.2rem 0.5rem; margin: 0; padding: 0.65rem 0; }
.crumbs li { margin: 0; display: flex; gap: 0.5rem; }
.crumbs li + li::before { content: "/"; content: "/" / ""; color: var(--muted); } /* the second form tells screen readers not to read the mark; older browsers use the first */
.subnav { background: var(--bg); border-bottom: var(--border-w) solid var(--line); }
.subnav ul { list-style: none; display: flex; flex-wrap: wrap; gap: 0.25rem 1.4rem; margin: 0; padding: 0; }
.subnav li { margin: 0; }
.subnav a { display: block; padding: 0.9rem 0; font-weight: 600; color: var(--muted); text-decoration: none; border-bottom: 3px solid transparent; }
.subnav a:hover { color: var(--heading); }
.subnav a[aria-current="page"] { color: var(--accent-text); border-bottom-color: var(--accent-text); }

/* ---------- Sections ---------- */
.band { padding: clamp(3rem, 7vw, 5.5rem) 0; }
.band-tight { padding: clamp(2rem, 4vw, 3rem) 0; }
.band-tint { background: var(--tint); }
.band-sand { background: var(--sand); }
:root[data-theme="contrast"] .band-tint, :root[data-theme="contrast"] .band-sand { border-block: 2px solid #000; }
.band-navy { background: var(--navy-band); color: var(--navy-band-text); }
.band-navy h2, .band-navy h3 { color: #fff; }
.band-navy a:not(.btn) { color: #cfe0ff; }
.band-blue { background: var(--blue-band); color: #fff; }
.band-blue h2, .band-blue h3 { color: #fff; }
.band-blue a:not(.btn) { color: #fff; }
.eyebrow { display: block; font-size: 0.85rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent-text); margin-bottom: 0.7rem; }
.band-navy .eyebrow, .hero .eyebrow { color: #cfe0ff; }
.band-blue .eyebrow { color: #ffffff; }
.lead { font-size: clamp(1.15rem, 2vw, 1.35rem); line-height: 1.6; color: var(--muted); }
.band-blue .lead, .band-navy .lead { color: inherit; }
.section-head { max-width: 46rem; margin-bottom: 2.2rem; }
.section-head.center { margin-inline: auto; text-align: center; }
.section-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 0.8rem 1.6rem; margin-top: 2rem; }
.center-foot { justify-content: center; margin-top: 2.6rem; }
.split-top { align-items: start; }
/* A heading and text on one side, one button on the other (the home page's link to the programs) */
.cta-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.2rem 2.5rem; }
.cta-row > div { flex: 1 1 26rem; max-width: 46rem; }
.cta-row h2 { margin-bottom: 0.35em; }
.cta-row .lead { margin: 0; }
.figures.give-figures { grid-template-columns: 1fr; gap: 1.2rem; max-width: 22rem; justify-self: end; }
.figures.give-figures span { color: #ffffff; }

/* Page title block (inner pages) */
.page-head { background: linear-gradient(180deg, var(--tint), var(--bg)); padding: clamp(2.4rem, 6vw, 4rem) 0 clamp(1.6rem, 4vw, 2.6rem); }
.page-head h1 { margin-bottom: 0.4em; max-width: 22ch; }
.page-head .lead { max-width: 44rem; margin: 0; }
.page-head.has-media .wrap { display: grid; gap: clamp(1.6rem, 4vw, 3.5rem); grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); align-items: center; }
.page-head.has-media figure { margin: 0; }
.page-head.has-media figure:not(.video) img { width: 100%; border-radius: var(--radius); box-shadow: var(--shadow-lift); aspect-ratio: 4 / 3; object-fit: cover; }
/* A portrait photo is shown whole, not cropped to 4:3 (the Academy of Athens on Universities) */
.page-head.has-media figure.tall img { aspect-ratio: auto; }

/* ---------- Home hero ---------- */
.hero { position: relative; isolation: isolate; color: #fff; background: #12294d; overflow: hidden; }
.hero > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 62%; z-index: -2; }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(100deg, rgba(10, 28, 60, 0.93) 0%, rgba(14, 40, 86, 0.8) 50%, rgba(14, 40, 86, 0.3) 100%); }
:root[data-theme="contrast"] .hero::before { background: rgba(0, 0, 0, 0.86); }
.hero .wrap { padding: clamp(3rem, 6vw, 4.5rem) 0 clamp(2.5rem, 5vw, 3.75rem); }
.hero h1 { color: #fff; max-width: 17ch; }
.hero p { max-width: 38rem; font-size: clamp(1.1rem, 2vw, 1.3rem); line-height: 1.6; color: #eaf1ff; }

/* Trust strip under the hero */
.trust { background: var(--surface); border-bottom: var(--border-w) solid var(--line); }
.trust ul { list-style: none; margin: 0; padding: 1.2rem 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem 1.6rem; }
.trust li { display: flex; gap: 0.75rem; align-items: center; margin: 0; color: var(--heading); font-weight: 600; font-size: 0.97rem; line-height: 1.35; }
.trust svg { width: 1.6rem; height: 1.6rem; color: var(--accent-text); }

/* ---------- Cards and grids ---------- */
.grid { display: grid; gap: 1.5rem; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 14.5rem), 1fr)); }
.card { position: relative; background: var(--surface); border: var(--border-w) solid var(--line); border-radius: var(--radius); padding: 1.6rem; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.card > :last-child { margin-bottom: 0; }
.card .ico { display: grid; place-items: center; width: 3rem; height: 3rem; border-radius: 12px; background: var(--tint); color: var(--accent-text); margin-bottom: 1rem; }
.card h3 { margin-bottom: 0.5em; }
.card p { color: var(--muted); }
/* A whole card that is one link: the link sits on the title and stretches over the card. */
.card-link { transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s; }
.card-link:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); border-color: var(--accent-text); }
.card-link h2 a, .card-link h3 a { color: var(--heading); text-decoration: none; }
.card-link h2 a::after, .card-link h3 a::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius); }
.card-link:hover h2 a, .card-link:hover h3 a { color: var(--accent-text); text-decoration: underline; }
.card-link .go { margin-top: auto; padding-top: 0.6rem; display: inline-flex; align-items: center; gap: 0.4rem; font-weight: 700; color: var(--accent-text); }
.card-link .go svg { width: 1.1rem; height: 1.1rem; transition: transform 0.15s; }
.card-link:hover .go svg { transform: translateX(3px); }
.card-link:focus-within { box-shadow: var(--shadow-lift); }

/* How it works: numbered steps joined by a line */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.5rem; counter-reset: step; position: relative; }
.steps::before { content: ""; position: absolute; top: 1.4rem; left: 12%; right: 12%; height: 2px; background: var(--line); }
.steps li { counter-increment: step; position: relative; margin: 0; text-align: center; padding: 0 0.4rem; }
.steps li::before { content: counter(step); position: relative; display: grid; place-items: center; width: 2.8rem; height: 2.8rem; margin: 0 auto 1rem; border-radius: 50%; background: var(--accent); color: var(--on-accent); font-weight: 800; font-size: 1.1rem; box-shadow: 0 0 0 6px var(--bg); }
.band-tint .steps li::before { box-shadow: 0 0 0 6px var(--tint); }
.steps h3 { font-size: 1.1rem; margin-bottom: 0.35em; }
.steps p { color: var(--muted); font-size: 0.97rem; margin: 0; }

/* A vertical timeline (How to apply) */
.timeline { list-style: none; margin: 0 0 2rem; padding: 0; counter-reset: t; max-width: var(--prose); }
.timeline li { counter-increment: t; position: relative; margin: 0; padding: 0 0 1.6rem 3.6rem; }
.timeline li::before { content: counter(t); position: absolute; left: 0; top: 0; display: grid; place-items: center; width: 2.4rem; height: 2.4rem; border-radius: 50%; background: var(--accent); color: var(--on-accent); font-weight: 800; }
.timeline li::after { content: ""; position: absolute; left: calc(1.2rem - 1px); top: 2.6rem; bottom: 0.2rem; width: 2px; background: var(--line); }
.timeline li:last-child::after { display: none; }
.timeline h3 { margin: 0.25rem 0 0.3rem; font-size: 1.15rem; }
.timeline p { margin: 0; color: var(--muted); }

/* A story with a portrait */
.story { display: grid; grid-template-columns: 13rem minmax(0, 1fr); gap: clamp(1.4rem, 4vw, 3rem); align-items: center; max-width: 60rem; }
.story img { width: 13rem; height: 13rem; border-radius: 50%; object-fit: cover; box-shadow: var(--shadow-lift); border: 6px solid var(--surface); }
.quote { margin: 0 0 1rem; font-family: Georgia, "Times New Roman", serif; font-style: italic; font-size: clamp(1.25rem, 2.2vw, 1.6rem); line-height: 1.5; color: var(--heading); }
.quote p { margin: 0; }
.quote-by { font-weight: 700; color: var(--heading); margin: 0; }
.quote-by span { display: block; font-weight: 400; color: var(--muted); font-size: 0.95rem; }

/* Principles: numbered */
.principles { counter-reset: p; list-style: none; padding: 0; margin: 0; display: grid; gap: 1.4rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr)); }
.principles li { counter-increment: p; position: relative; background: var(--surface); border: var(--border-w) solid var(--line); border-radius: var(--radius); padding: 1.6rem 1.5rem 1.5rem; margin: 0; box-shadow: var(--shadow); }
.principles li::before { content: counter(p); position: absolute; top: -1rem; left: 1.4rem; width: 2.2rem; height: 2.2rem; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--on-accent); font-weight: 800; }
.principles .ico { color: var(--accent-text); margin-bottom: 0.6rem; display: block; }
.principles .ico svg { width: 2.4rem; height: 2.4rem; }
.principles h3 { margin-bottom: 0.4em; }
.principles p { color: var(--muted); margin: 0; font-size: 0.98rem; }
/* Titles only, five in a row on wide screens (the About page's short version) */
.principles-compact { grid-template-columns: repeat(auto-fit, minmax(min(100%, 10.5rem), 1fr)); }
.principles-compact li { padding: 1.5rem 1.1rem 1.2rem; }
.principles-compact .ico svg { width: 2rem; height: 2rem; }
.principles-compact h3 { margin: 0; font-size: 1.05rem; }

/* Key figures */
.figures { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr)); gap: 1.4rem 2rem; margin: 0; padding: 0; list-style: none; }
.figures li { margin: 0; padding-left: 1rem; border-left: 3px solid var(--gold); }
.figures strong { display: block; font-size: clamp(1.7rem, 3.4vw, 2.4rem); font-weight: 800; color: #fff; line-height: 1.1; margin-bottom: 0.3rem; }
.figures span { color: #cfe0ff; font-size: 0.97rem; }
:root[data-theme="contrast"] .figures li { border-left-color: #fff; }

/* Mission quote */
.mission { display: grid; gap: 2.5rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr)); }
.mission blockquote { margin: 0; padding: 0 0 0 1.4rem; border-left: 4px solid var(--gold); font-size: clamp(1.15rem, 2vw, 1.4rem); line-height: 1.55; color: var(--heading); font-weight: 600; }
.mission h3 { font-size: 0.85rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent-text); margin-bottom: 0.8rem; }
.mission-stack { grid-template-columns: 1fr; gap: 1.8rem; }

/* Split: text next to a picture */
.split { display: grid; gap: clamp(1.6rem, 4vw, 3.5rem); align-items: center; grid-template-columns: repeat(auto-fit, minmax(min(100%, 21rem), 1fr)); }
.split figure { margin: 0; }
figcaption { font-size: 0.9rem; color: var(--muted); margin-top: 0.6rem; }
.frame { margin: 0; }
.frame img { border-radius: var(--radius); width: 100%; box-shadow: var(--shadow); }
.frame.narrow { max-width: 24rem; }
.gallery { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr)); align-items: start; margin: 1.6rem 0; }
.gallery .frame { margin: 0; }
/* Our video: a picture with a play button. The YouTube player is only put in its place when the visitor presses play. */
.video { margin: 0; }
.video-frame { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: #0a1c3c; box-shadow: var(--shadow-lift); }
.video-frame img { width: 100%; height: 100%; object-fit: cover; }
.video-frame::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10, 28, 60, 0.05), rgba(10, 28, 60, 0.55)); pointer-events: none; }
.video-frame.playing::after { display: none; }
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-play { position: absolute; z-index: 1; left: 50%; top: 50%; transform: translate(-50%, -50%); display: inline-flex; align-items: center; gap: 0.7rem; min-height: 3.2rem; padding: 0.55rem 1.3rem 0.55rem 0.6rem; font: inherit; font-weight: 800; font-size: 1rem; color: #12294d; background: #ffffff; border: 0; border-radius: 999px; cursor: pointer; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35); transition: transform 0.15s; white-space: nowrap; text-decoration: none; }
.video-play:hover { transform: translate(-50%, -50%) scale(1.04); color: #12294d; }
.video-play svg { width: 2.4rem; height: 2.4rem; padding: 0.45rem; border-radius: 50%; background: var(--accent); color: #ffffff; }
.video-play svg path { fill: currentColor; }
:root[data-theme="contrast"] .video-play { outline: 3px solid #000000; }

/* People */
.person { display: grid; gap: 1.6rem 2.2rem; grid-template-columns: 11rem 1fr; padding: 2rem 0; border-top: var(--border-w) solid var(--line); }
.person:first-of-type { border-top: 0; padding-top: 0; }
.person img { width: 11rem; height: 11rem; border-radius: 50%; object-fit: cover; box-shadow: var(--shadow); }
.person h2 { margin-bottom: 0.1em; font-size: 1.6rem; }
.person .role { color: var(--accent-text); font-weight: 700; margin-bottom: 1rem; }
.person .links { display: flex; flex-wrap: wrap; gap: 0.5rem 1.4rem; margin-top: 0.4rem; }
.person p { max-width: var(--prose); }
.people-row { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr)); gap: 1.4rem; }
.people-row li { margin: 0; text-align: center; }
.people-row img { width: 8rem; height: 8rem; margin: 0 auto 0.8rem; border-radius: 50%; object-fit: cover; box-shadow: var(--shadow); }
.people-row strong { display: block; color: var(--heading); }
.people-row span { color: var(--muted); font-size: 0.95rem; }

/* Lists with ticks and crosses (the marks are drawn with a mask so they follow the theme colors) */
.ticks { list-style: none; padding: 0; margin: 0 0 1.4rem; }
.ticks li { position: relative; padding-left: 2rem; margin-bottom: 0.7rem; }
.ticks li::before { content: ""; position: absolute; left: 0; top: 0.35em; width: 1.2rem; height: 1.2rem; background: var(--accent-text); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 12.5l5.5 5.500L20 6.500'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 12.5l5.5 5.500L20 6.500'/%3E%3C/svg%3E") center / contain no-repeat; }
.ticks.not li::before { background: var(--warn-text); -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='M6 6l12 12M18 6L6 18'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='M6 6l12 12M18 6L6 18'/%3E%3C/svg%3E"); }
.ticks strong { color: var(--heading); }
.ticks-2 { columns: 2 18rem; column-gap: 2rem; }
.ticks-2 li { break-inside: avoid; }

/* What a fee includes, with icons */
.includes { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); gap: 1rem; }
.includes li { display: flex; gap: 0.8rem; align-items: flex-start; margin: 0; padding: 1rem 1.1rem; background: var(--surface); border: var(--border-w) solid var(--line); border-radius: var(--radius-sm); }
.includes svg { width: 1.5rem; height: 1.5rem; color: var(--accent-text); margin-top: 0.1rem; }
.includes strong { display: block; color: var(--heading); line-height: 1.35; }
.includes li > span { display: block; }
.includes li > span > span { display: block; color: var(--muted); font-size: 0.93rem; line-height: 1.45; margin-top: 0.15rem; }

/* Program page: facts panel and price */
.facts-panel { background: var(--surface); border: var(--border-w) solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.6rem; }
.facts-panel dl { margin: 0; display: grid; gap: 0.9rem; }
.facts-panel dt { font-size: 0.8rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.facts-panel dd { margin: 0.1rem 0 0; font-weight: 600; color: var(--heading); }
.facts-panel .btn { width: 100%; margin-top: 1.2rem; }
.facts-panel .btn + .btn { margin-top: 0.6rem; }
.note { background: var(--sand); border-left: 4px solid var(--gold); border-radius: 0 var(--radius) var(--radius) 0; padding: 1rem 1.3rem; margin: 1.6rem 0; }
.note > :last-child { margin-bottom: 0; }
.note-alert { border-left-color: #b3261e; }
:root[data-theme="dark"] .note-alert { border-left-color: #f2b8b5; }

/* ---------- Questions and answers ---------- */
.faq-tools { display: flex; flex-wrap: wrap; gap: 0.8rem 1rem; align-items: flex-end; margin-bottom: 1.6rem; max-width: 48rem; }
.field { display: flex; flex-direction: column; gap: 0.35rem; flex: 1 1 18rem; }
.field label { font-weight: 700; color: var(--heading); }
.field .hint { font-size: 0.9rem; color: var(--muted); }
.input { width: 100%; min-height: 2.9rem; padding: 0.55rem 0.9rem; font: inherit; color: var(--text); background: var(--surface); border: 2px solid var(--control-line); border-radius: var(--radius-sm); }
.input:hover { border-color: var(--accent-text); }
.input:focus-visible { border-color: var(--accent-text); }
.input::placeholder { color: var(--muted); opacity: 1; } /* browsers' own placeholder colors can be too faint */
.search-wrap { position: relative; }
.search-wrap svg { position: absolute; left: 0.8rem; top: 50%; transform: translateY(-50%); width: 1.2rem; height: 1.2rem; color: var(--muted); pointer-events: none; }
.search-wrap .input { padding-left: 2.6rem; }
.faq-status { margin: 0 0 1rem; color: var(--muted); font-weight: 600; }
.faq-group { margin-bottom: 2.4rem; max-width: 48rem; }
.faq-group h2 { font-size: 1.35rem; display: flex; align-items: center; gap: 0.6rem; }
.faq-group h2 svg { width: 1.5rem; height: 1.5rem; color: var(--accent-text); }
.faq-item { background: var(--surface); border: var(--border-w) solid var(--line); border-radius: var(--radius-sm); margin-bottom: 0.7rem; }
.faq-item summary { position: relative; list-style: none; cursor: pointer; padding: 1rem 3.2rem 1rem 1.2rem; font-weight: 700; color: var(--heading); border-radius: var(--radius-sm); }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: ""; position: absolute; right: 1.1rem; top: 50%; width: 1.2rem; height: 1.2rem; margin-top: -0.6rem; background: var(--accent-text); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E") center / contain no-repeat; transition: transform 0.2s; }
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item summary:hover { background: var(--tint); }
.faq-item[open] summary { border-bottom: var(--border-w) solid var(--line); border-radius: var(--radius-sm) var(--radius-sm) 0 0; }
.faq-answer { padding: 1rem 1.2rem 0.4rem; }
.faq-answer ul, .faq-answer ol { margin-bottom: 1rem; }
.faq-empty { padding: 1.2rem; border: 2px dashed var(--line); border-radius: var(--radius-sm); max-width: 48rem; }

/* ---------- Budget planner ---------- */
.planner { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: clamp(1.6rem, 4vw, 3rem); align-items: start; }
.planner-form { display: grid; gap: 1rem 1.2rem; grid-template-columns: repeat(2, minmax(0, 1fr)); background: var(--surface); border: var(--border-w) solid var(--line); border-radius: var(--radius); padding: 1.4rem 1.5rem; box-shadow: var(--shadow); }
.planner-form .field { flex: none; }
.money { position: relative; }
.money::before { content: "$"; position: absolute; left: 0.9rem; top: 50%; transform: translateY(-50%); color: var(--muted); font-weight: 600; pointer-events: none; }
.money .input { padding-left: 1.8rem; }
.planner-sum { background: var(--tint); border: var(--border-w) solid var(--line); border-radius: var(--radius); padding: 1.4rem 1.5rem; position: sticky; top: 6rem; }
.planner-sum h3 { margin-bottom: 0.8rem; }
.planner-sum dl { margin: 0; display: grid; grid-template-columns: 1fr auto; gap: 0.45rem 1rem; }
.planner-sum dt { color: var(--muted); }
.planner-sum dd { margin: 0; text-align: right; font-weight: 700; color: var(--heading); font-variant-numeric: tabular-nums; }
.planner-sum .total { margin-top: 1rem; padding-top: 1rem; border-top: 2px solid var(--line); display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.planner-sum .total span { font-weight: 700; color: var(--heading); }
.planner-sum output.big { font-size: 2rem; font-weight: 800; color: var(--accent-text); font-variant-numeric: tabular-nums; }
.planner-sum p { font-size: 0.9rem; color: var(--muted); margin: 0.8rem 0 0; }
/* Shown only on paper: the logo and the disclaimer of a printed estimate */
.print-only { display: none; }

/* ---------- Checklist (saved on this device) ---------- */
.checklist { max-width: var(--prose); background: var(--surface); border: var(--border-w) solid var(--line); border-radius: var(--radius); padding: 1.4rem 1.5rem 1.2rem; box-shadow: var(--shadow); }
.checklist fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.checklist legend { font-weight: 800; font-size: 1.1rem; color: var(--heading); padding: 0; margin-bottom: 0.3rem; }
.checklist .progress { height: 0.6rem; border-radius: 999px; background: var(--tint); border: var(--border-w) solid var(--line); overflow: hidden; margin: 0.6rem 0 0.4rem; }
.checklist .progress span { display: block; height: 100%; width: 0; background: var(--accent); transition: width 0.25s; }
.checklist .progress-text { font-size: 0.92rem; color: var(--muted); margin: 0 0 0.8rem; }
.check { display: flex; gap: 0.8rem; align-items: flex-start; padding: 0.55rem 0; border-top: var(--border-w) solid var(--line); }
.check input { width: 1.35rem; height: 1.35rem; margin: 0.2rem 0 0; accent-color: var(--accent); flex: none; }
.check label { cursor: pointer; min-width: 0; overflow-wrap: anywhere; }
.check input:checked + label { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--muted); }
.checklist .btn-row { margin-top: 0.8rem; }

/* News */
.news-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 1.4rem; }
.news-list li { margin: 0; }
.news-item { display: grid; gap: 1.4rem; grid-template-columns: 15rem 1fr; background: var(--surface); border: var(--border-w) solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.news-item .pic { background: var(--tint); }
.news-item .pic img { width: 100%; height: 100%; object-fit: cover; }
.news-item .body { padding: 1.4rem 1.5rem 1.4rem 0; }
.news-item time, .news-item .when { display: block; font-size: 0.88rem; font-weight: 700; color: var(--accent-text); margin-bottom: 0.3rem; }
.news-item h2 { font-size: 1.3rem; margin-bottom: 0.4em; }
.news-item h2 a { color: var(--heading); text-decoration: none; }
.news-item h2 a:hover { color: var(--accent-text); text-decoration: underline; }
.news-item p { color: var(--muted); margin-bottom: 0.5rem; }
.team-list { list-style: none; padding: 0; }
.team-list li { padding: 0.8rem 0; border-top: var(--border-w) solid var(--line); margin: 0; }
.team-list li:first-child { border-top: 0; }

/* Contact */
.contact-cards { display: grid; gap: 1.2rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr)); margin-bottom: 2rem; }
.contact-cards .card h2 { font-size: 1.1rem; }
.contact-cards .card a { font-weight: 600; overflow-wrap: anywhere; }
.topics { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr)); }
.topics li { margin: 0; display: flex; flex-direction: column; gap: 0.3rem; padding: 1.1rem 1.2rem; background: var(--surface); border: var(--border-w) solid var(--line); border-radius: var(--radius-sm); }
.topics strong { color: var(--heading); display: flex; align-items: center; gap: 0.55rem; }
.topics strong svg { width: 1.3rem; height: 1.3rem; color: var(--accent-text); }
.topics span { color: var(--muted); font-size: 0.95rem; }
.topics a { margin-top: auto; padding-top: 0.3rem; font-weight: 700; }

/* Legal text */
.legal h2 { font-size: 1.35rem; margin-top: 2rem; }
.legal h2:first-child { margin-top: 0; }
.legal { max-width: var(--prose); }
.toc { background: var(--tint); border: var(--border-w) solid var(--line); border-radius: var(--radius); padding: 1.2rem 1.5rem; margin-bottom: 2rem; max-width: var(--prose); }
.toc h2 { font-size: 1rem; margin-bottom: 0.5em; }
.toc ul { margin: 0; columns: 2 15rem; }

/* Small helpers (the page policy does not allow style attributes) */
.mt { margin-top: 1.6rem; }
.mt-0 { margin-top: 0; }
.small { font-size: 0.95rem; color: var(--muted); }
.fig { margin: 1.6rem 0; }
.fig-lg { margin: 0 0 2.4rem; }
.h-card { font-size: 1.2rem; }
.card h2.h-card { margin-bottom: 0.5em; }
.center { text-align: center; }
.facts-list { margin: 0; display: grid; grid-template-columns: max-content 1fr; gap: 0.6rem 1.4rem; }
.facts-list dt { font-weight: 700; color: var(--heading); }
.facts-list dd { margin: 0; }

/* Comparison table */
/* position: relative keeps the hidden screen-reader text in the last column inside the scrolling box, so the page itself never scrolls sideways */
.table-wrap { position: relative; overflow-x: auto; border: var(--border-w) solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.compare { width: 100%; border-collapse: collapse; min-width: 36rem; }
.compare th, .compare td { text-align: left; padding: 0.9rem 1.1rem; border-bottom: var(--border-w) solid var(--line); vertical-align: top; }
.compare thead th { background: var(--navy-band); color: #fff; font-size: 1rem; }
.compare tbody th { width: 9rem; color: var(--muted); font-weight: 700; font-size: 0.92rem; }
.compare tr:last-child th, .compare tr:last-child td { border-bottom: 0; }
.compare.compare-sm { min-width: 0; }
.compare.compare-sm tbody th { width: auto; }

/* Links that leave the site */
a.ext:not(.btn)::after { content: "\2197"; content: "\2197" / ""; display: inline-block; margin-left: 0.2em; font-size: 0.85em; text-decoration: none; }

/* ---------- Accessibility panel ---------- */
.a11y-dialog { width: min(100% - 1.5rem, 30rem); max-height: calc(100vh - 2rem); overflow: auto; scroll-padding-top: 6rem; /* room for its sticky title, so a focused control is never under it */ padding: 0; border: var(--border-w) solid var(--line); border-radius: 18px; background: var(--surface); color: var(--text); box-shadow: 0 24px 64px rgba(0, 0, 0, 0.35); }
.a11y-dialog::backdrop { background: rgba(8, 17, 31, 0.6); }
.a11y-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.1rem 1.4rem; border-bottom: var(--border-w) solid var(--line); position: sticky; top: 0; background: var(--surface); }
.a11y-head h2 { margin: 0; font-size: 1.25rem; }
.a11y-close { min-height: 2.5rem; padding: 0.3rem 1rem; font: inherit; font-weight: 700; font-size: 0.95rem; color: var(--heading); background: transparent; border: 2px solid var(--line); border-radius: 999px; cursor: pointer; }
.a11y-close:hover { background: var(--tint); }
.a11y-body { padding: 0.4rem 1.4rem 1.4rem; }
.a11y-body fieldset { border: 0; margin: 1.1rem 0 0; padding: 0; min-width: 0; }
.a11y-body legend { padding: 0; margin-bottom: 0.5rem; font-weight: 700; color: var(--heading); }
.seg { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.seg input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.seg label { display: inline-flex; align-items: center; justify-content: center; min-height: 2.6rem; padding: 0.4rem 1rem; border: 2px solid var(--line); border-radius: 999px; font-weight: 600; font-size: 0.95rem; color: var(--heading); background: var(--surface); cursor: pointer; }
.seg label:hover { border-color: var(--accent-text); }
.seg input:checked + label { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.seg input:focus-visible + label { outline: 3px solid var(--ring); outline-offset: 3px; box-shadow: 0 0 0 3px var(--ring-gap); }
.opt { display: flex; align-items: flex-start; gap: 0.8rem; padding: 0.55rem 0; cursor: pointer; }
.opt input { width: 1.4rem; height: 1.4rem; margin: 0.15rem 0 0; accent-color: var(--accent); flex: none; }
.opt span { font-weight: 600; color: var(--heading); }
.opt small { display: block; font-weight: 400; color: var(--muted); font-size: 0.88rem; line-height: 1.4; }
.a11y-foot { display: flex; flex-wrap: wrap; gap: 0.8rem 1rem; align-items: center; justify-content: space-between; margin-top: 1.4rem; padding-top: 1rem; border-top: var(--border-w) solid var(--line); font-size: 0.9rem; color: var(--muted); }
.a11y-reset { min-height: 2.5rem; padding: 0.3rem 1.1rem; font: inherit; font-weight: 700; font-size: 0.95rem; color: var(--link); background: transparent; border: 2px solid var(--accent-text); border-radius: 999px; cursor: pointer; }
.a11y-reset:hover { background: var(--tint); }
.link-button { font: inherit; padding: 0.3rem 0; color: #fff; background: none; border: 0; text-decoration: underline; text-underline-offset: 0.18em; cursor: pointer; }
.link-button:hover { color: #cfe0ff; }
.js-only { display: none; }
.js .js-only { display: block; }
.no-js-only { display: block; }
.js .no-js-only { display: none; }

/* ---------- The cookie question: only when Google Analytics is set up, and only until the visitor chooses ---------- */
/* It sits at the bottom of the screen (the user's choice, 4 November 2026). The page gets the same room at its end, and
   the browser keeps the control in use above it, so it never hides the end of the page or where the keyboard is.
   site.js measures it (--consent-h); js-flag.js marks the page (consent-ask) before it is drawn. */
.consent { display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; max-height: 70vh; overflow-y: auto; background: var(--surface); border-top: var(--border-w) solid var(--line); box-shadow: 0 -10px 30px rgba(8, 17, 31, 0.16); }
:root[data-theme="contrast"] .consent { box-shadow: none; }
.consent-ask .consent { display: block; }
html.consent-ask { scroll-padding-bottom: var(--consent-h, 0px); }
.consent-ask body { padding-bottom: var(--consent-h, 0px); }
.consent-ask .to-top { bottom: calc(var(--consent-h, 0px) + 1rem); }
.consent .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.9rem 2.5rem; padding: 1rem 0 1.1rem; }
.consent-text { flex: 1 1 30rem; }
.consent h2 { margin: 0 0 0.2rem; font-size: 1.15rem; }
.consent h2:focus { outline: none; box-shadow: none; } /* the script moves the focus here when Cookie settings is pressed; it is not a control */
.consent p { margin: 0; max-width: var(--prose); font-size: 0.97rem; line-height: 1.6; }
.consent p + p { margin-top: 0.3rem; }
.consent-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; }

/* ---------- Footer ---------- */
.site-footer { background: var(--footer-bg); color: #d6e1f5; padding: 0 0 5rem; font-size: 0.97rem; } /* room at the bottom so the back-to-top button never covers text */
.site-footer > .wrap { padding-top: 3rem; }
.site-footer a { color: #fff; }
.site-footer a:hover { color: #cfe0ff; }
/* A Greek key border, drawn with a mask so it follows the theme */
.meander { height: 14px; background: var(--gold); opacity: 0.55; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M0 19H20M1 19V1H19V15H6V6H13V11H10' fill='none' stroke='%23000' stroke-width='1.8'/%3E%3C/svg%3E") repeat-x left center / 14px 14px; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M0 19H20M1 19V1H19V15H6V6H13V11H10' fill='none' stroke='%23000' stroke-width='1.8'/%3E%3C/svg%3E") repeat-x left center / 14px 14px; }
.site-footer .meander { margin-top: 0; }
:root[data-theme="contrast"] .meander { display: none; }
.footer-top { display: grid; gap: 2.2rem; grid-template-columns: 1.5fr repeat(3, 1fr); }
.footer-brand img { width: 230px; margin-bottom: 1rem; filter: brightness(0) invert(1); } /* all-white logo on the dark footer */
.footer-brand p { max-width: 24rem; }
.footer-badge { display: flex; gap: 0.6rem; align-items: flex-start; margin-top: 1rem; font-size: 0.9rem; color: #d6e1f5; }
.footer-badge svg { width: 1.3rem; height: 1.3rem; color: var(--gold); margin-top: 0.15rem; }
:root[data-theme="contrast"] .footer-badge svg { color: #fff; }
.site-footer h2 { font-size: 0.85rem; letter-spacing: 0.12em; text-transform: uppercase; color: #aac4f2; margin-bottom: 0.9rem; }
:root[data-theme="contrast"] .site-footer h2 { color: #fff; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 0.15rem; }
.site-footer li a { display: inline-block; padding: 0.3rem 0; }
.footer-legal { margin: 2.4rem 0 1.2rem; padding-top: 1.4rem; border-top: 1px solid rgba(255, 255, 255, 0.18); font-size: 0.88rem; color: #b7c8e6; max-width: 64rem; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem 2rem; font-size: 0.88rem; color: #b7c8e6; }
.footer-bottom span { display: inline-flex; align-items: center; gap: 0.45rem; }
.footer-bottom svg { width: 1rem; height: 1rem; }
:root[data-theme="contrast"] .footer-legal, :root[data-theme="contrast"] .footer-bottom, :root[data-theme="contrast"] .site-footer { color: #fff; }

/* Back to top */
.to-top { position: fixed; right: 1rem; bottom: 1rem; z-index: 40; display: grid; place-items: center; width: 3rem; height: 3rem; border-radius: 50%; background: var(--accent); color: var(--on-accent); box-shadow: var(--shadow-lift); opacity: 0; visibility: hidden; transform: translateY(8px); transition: opacity 0.2s, transform 0.2s, visibility 0.2s; }
.to-top.show { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { background: var(--accent-hover); color: var(--on-accent); }
.to-top svg { width: 1.4rem; height: 1.4rem; }
:root[data-theme="contrast"] .to-top { border: 2px solid #fff; outline: 2px solid #000; }

/* ---------- Medium screens ---------- */
@media (max-width: 75rem) {
  .trust ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 64rem) {
  .footer-top { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
  .planner { grid-template-columns: 1fr; }
  .planner-sum { position: static; }
  .page-head.has-media .wrap { grid-template-columns: 1fr; }
  .page-head.has-media figure { max-width: 34rem; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 2rem; }
  .steps::before { display: none; }
}
/* The menu folds into a button below about 1150px, where its seven entries would no longer fit on one line */
@media (max-width: 72rem) {
  /* The logo and the two buttons always share one row (the user's request, 4 November 2026). The logo gives way first,
     shrinking from 190px, and the buttons' spacing narrows with the screen. */
  .site-header .wrap { flex-wrap: nowrap; column-gap: clamp(0.5rem, 3vw, 1rem); }
  .brand { flex: 0 1 190px; min-width: 0; }
  .brand img { width: 100%; }
  .js .head-tools { flex: none; flex-wrap: nowrap; }
  .js .nav-toggle { display: inline-flex; align-items: center; gap: clamp(0.4rem, 1.6vw, 0.6rem); min-height: 2.6rem; padding: 0.4rem clamp(0.7rem, 3vw, 1.1rem); font: inherit; font-size: clamp(0.95rem, 4.3vw, 1.0625rem); font-weight: 700; color: var(--heading); background: var(--surface); border: 2px solid var(--line); border-radius: 999px; cursor: pointer; }
  .js .nav { display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; align-items: stretch; flex-wrap: nowrap; gap: 0; padding: 0.6rem 1rem 1.2rem; background: var(--bg); border-bottom: var(--border-w) solid var(--line); box-shadow: var(--shadow); max-height: calc(100vh - 4.6rem); overflow-y: auto; }
  .js .nav.open { display: flex; }
  .js .nav a:not(.btn) { padding: 0.9rem 0.4rem; border-radius: 0; border-bottom: var(--border-w) solid var(--line); }
  .js .nav a[aria-current]:not(.btn)::after { left: 0; right: auto; top: 0.9rem; bottom: 0.9rem; width: 3px; height: auto; }
  .js .nav a[aria-current]:not(.btn) { padding-left: 0.9rem; }
  .js .nav .btn { margin: 1rem 0 0; }
  .js .head-tools { margin-left: auto; }
}
/* The same rules for larger text: the menu also folds when the header is narrower than 72rem at the visitor's text size
   (container query on .site-header), so with Large to Largest text its entries never wrap under the logo either.
   Keep the two copies the same; test.mjs checks. */
@container (width < 72rem) {
  .site-header .wrap { flex-wrap: nowrap; column-gap: clamp(0.5rem, 3vw, 1rem); }
  .brand { flex: 0 1 190px; min-width: 0; }
  .brand img { width: 100%; }
  .js .head-tools { flex: none; flex-wrap: nowrap; }
  .js .nav-toggle { display: inline-flex; align-items: center; gap: clamp(0.4rem, 1.6vw, 0.6rem); min-height: 2.6rem; padding: 0.4rem clamp(0.7rem, 3vw, 1.1rem); font: inherit; font-size: clamp(0.95rem, 4.3vw, 1.0625rem); font-weight: 700; color: var(--heading); background: var(--surface); border: 2px solid var(--line); border-radius: 999px; cursor: pointer; }
  .js .nav { display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; align-items: stretch; flex-wrap: nowrap; gap: 0; padding: 0.6rem 1rem 1.2rem; background: var(--bg); border-bottom: var(--border-w) solid var(--line); box-shadow: var(--shadow); max-height: calc(100vh - 4.6rem); overflow-y: auto; }
  .js .nav.open { display: flex; }
  .js .nav a:not(.btn) { padding: 0.9rem 0.4rem; border-radius: 0; border-bottom: var(--border-w) solid var(--line); }
  .js .nav a[aria-current]:not(.btn)::after { left: 0; right: auto; top: 0.9rem; bottom: 0.9rem; width: 3px; height: auto; }
  .js .nav a[aria-current]:not(.btn) { padding-left: 0.9rem; }
  .js .nav .btn { margin: 1rem 0 0; }
  .js .head-tools { margin-left: auto; }
}
/* ---------- Small screens ---------- */
@media (max-width: 52rem) {
  .person { grid-template-columns: 1fr; text-align: left; }
  .person img { width: 8rem; height: 8rem; }
  .news-item { grid-template-columns: 1fr; gap: 0; }
  .news-item .pic { aspect-ratio: 16 / 8; }
  .news-item .body { padding: 1.2rem 1.4rem 1.4rem; }
  .footer-top { grid-template-columns: 1fr; }
  .hero::before { background: linear-gradient(180deg, rgba(10, 28, 60, 0.9), rgba(14, 40, 86, 0.78)); }
  .story { grid-template-columns: 1fr; }
  .story img { width: 9rem; height: 9rem; }
  .planner-form { grid-template-columns: 1fr; }
}
@media (max-width: 36rem) {
  .trust ul { grid-template-columns: 1fr; }
  .steps { grid-template-columns: minmax(0, 1fr); }
  .steps li { text-align: left; display: grid; grid-template-columns: 2.8rem minmax(0, 1fr); column-gap: 1rem; padding: 0; }
  .steps li::before { margin: 0; grid-row: span 2; }
  .facts-list { grid-template-columns: 1fr; gap: 0.1rem; }
  .facts-list dd { margin-bottom: 0.6rem; }
  /* On a phone the cookie question takes as little of the screen as it can: the words close together, the two answers side by side. */
  .consent .wrap { gap: 0.55rem; padding: 0.7rem 0 0.8rem; }
  .consent h2 { margin-bottom: 0.1rem; font-size: 1rem; }
  .consent-text { line-height: 1.45; }
  .consent p { display: inline; font-size: 0.92rem; line-height: inherit; }
  .consent-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; width: 100%; }
  .consent-actions .btn { min-height: 2.6rem; padding-inline: 0.5rem; font-size: 0.88rem; }
}
/* In a short window (a phone on its side, or a browser zoomed to 400%) a sticky header and the cookie question together
   would leave little room for the page, so the header scrolls away with the page and the question takes less of the
   screen (it scrolls inside itself). The header stays "relative" because the open menu is placed against it. */
@media screen and (max-height: 32rem) {
  html { scroll-padding-top: 1rem; }
  .site-header { position: relative; }
  .planner-sum { top: 1rem; }
  .consent { max-height: 40vh; }
}
/* Where the header is narrow for the text size, its buttons show their icons instead of their words ("Accessibility",
   then "Menu"); screen readers still hear the words. Measured on the header itself (container queries), whose rem
   follows the visitor's text size, so Larger and Largest text get icons sooner. The first rule is for browsers
   without container queries. */
@media (max-width: 30rem) {
  .a11y-open .a11y-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .a11y-open { padding: 0.35rem clamp(0.45rem, 2vw, 0.6rem); }
}
@container (width < 30rem) {
  .a11y-open .a11y-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .a11y-open { padding: 0.35rem clamp(0.45rem, 2vw, 0.6rem); }
}
@container (width < 20rem) {
  .nav-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .js .nav-toggle { padding-inline: clamp(0.55rem, 2.6vw, 0.8rem); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}
@media (forced-colors: active) {
  .btn, .a11y-open, .a11y-close, .a11y-reset, .nav-toggle, .faq-item, .to-top { border: 2px solid ButtonText; }
  .ticks li::before, .faq-item summary::after { forced-color-adjust: none; background: CanvasText; }
  .video-play { border: 2px solid ButtonText; }
  .seg input:checked + label { outline: 3px solid Highlight; }
  .meander { display: none; }
}
@media print {
  .site-header, .site-footer .footer-top, .site-footer .meander, .nav-toggle, .btn-row, .crumbs, .subnav, .skip, .a11y-dialog, .to-top, .faq-tools, .planner-form .btn-row, .video-play, .consent { display: none !important; }
  body { font-size: 11pt; color: #000; background: #fff; }
  a { color: #000; }
  .band { padding: 1rem 0; }
  .hero { color: #000; background: none; }
  .hero > img, .hero::before { display: none; }
  .hero h1, .hero p { color: #000; }
  .faq-item { break-inside: avoid; }
  .planner { grid-template-columns: 1fr; }
  .planner-sum { position: static; }
  .card, .facts-panel, .planner-sum, .planner-form { box-shadow: none; }
  .print-only { display: block; }
  .screen-only { display: none !important; }
  /* "Print my estimate" prints the estimate alone, under the logo and with the disclaimer */
  .print-estimate body > :not(main), .print-estimate main > :not(.planner-band), .print-estimate .planner-band .section-head, .print-estimate .planner-band .no-js-only, .print-estimate .planner-form { display: none !important; }
  .print-estimate .planner-band, .print-estimate .planner-sum { padding: 0; border: 0; background: none; }
  .print-logo { width: 220px; height: auto; margin: 0 0 1.4rem; }
  .planner-sum p.print-disclaimer { margin-top: 1.6rem; font-size: 9pt; color: #000; }
}
