/* YBGC site styles. Colours and type from web colours.pdf (see BRAND.md). */
:root {
  --blue: #081C35;
  --blue-2: #10294A;      /* cards on blue */
  --yellow: #FFDB00;
  --orange: #EE7800;      /* large text on blue, or decoration only */
  --white: #FFFFF5;
  --paper: #FFFFFF;
  --line: rgba(8, 28, 53, 0.18);
  --line-dark: rgba(255, 255, 245, 0.22);

  --font: "Atkinson Hyperlegible Next", "Atkinson Hyperlegible", Verdana, sans-serif;
  --wrap: 1140px;
  --radius: 5px;     /* corner rounding used everywhere */
  --header-h: 76px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 1rem); -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }
html.menu-open { overflow: hidden; }

body {
  margin: 0;
  background: var(--white);
  color: var(--blue);
  font-family: var(--font);
  font-weight: 500;
  font-size: 1.125rem;
  line-height: 1.6;
  text-align: left;
}

img { max-width: 100%; height: auto; display: block; }

h1, h2, h3, h4 { font-weight: 800; line-height: 1.12; margin: 0 0 1rem; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.5rem, 7vw, 4.75rem); letter-spacing: -0.025em; }
h2 { font-size: clamp(1.85rem, 4vw, 2.75rem); }
h3 { font-size: 1.4rem; }
h4 { font-size: 1.15rem; }
p, ul, ol, table, dl { margin: 0 0 1.1rem; }
.lede { font-size: clamp(1.3rem, 2.6vw, 1.65rem); font-weight: 300; line-height: 1.4; max-width: 38ch; }
.subheading { font-weight: 300; font-size: 1.35rem; }
.small { font-size: 0.95rem; }
.measure { max-width: 70ch; }

/* Links in running text: bold and underlined */
a { color: inherit; font-weight: 800; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 4px; }

:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; box-shadow: 0 0 0 7px var(--yellow); border-radius: var(--radius); }
.on-dark :focus-visible, .site-header :focus-visible, .site-footer :focus-visible, .mobile-menu :focus-visible { outline-color: var(--yellow); box-shadow: 0 0 0 7px var(--blue); }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 1.25rem; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Switch-controlled content: hidden until site.js says it is on */
[data-when]:not(.is-on) { display: none !important; }

/* Placeholders: clearly marked text still to be written */
.ph {
  display: inline-block;
  background: #FFF6B8;
  color: var(--blue);
  border: 2px dashed var(--orange);
  padding: 0.15rem 0.6rem;
  border-radius: var(--radius);
  font-weight: 500;
}
.ph::before { content: "To do: "; font-weight: 800; }
p.ph, div.ph, li.ph { display: block; padding: 0.75rem 1rem; }
.on-dark .ph { color: var(--blue); }

/* ---------------------------------------------------------------- Buttons and pills */
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: 48px;
  padding: 0.7rem 1.5rem;
  border-radius: var(--radius);
  background: var(--blue);
  color: var(--white);
  border: 3px solid var(--blue);
  font-weight: 800;
  font-size: 1.05rem;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.button:hover { background: transparent; color: var(--blue); text-decoration: none; }
.on-dark .button, .site-header .button, .mobile-menu .button { background: var(--yellow); border-color: var(--yellow); color: var(--blue); }
.on-dark .button:hover, .site-header .button:hover, .mobile-menu .button:hover { background: transparent; color: var(--yellow); }
.on-yellow .button { background: var(--blue); border-color: var(--blue); color: var(--white); }
.on-yellow .button:hover { background: transparent; color: var(--blue); }
.button-large { font-size: 1.25rem; padding: 0.95rem 2rem; }
.button.is-missing { opacity: 0.7; cursor: not-allowed; }
.button.is-missing::after { content: " (link to be added)"; font-weight: 500; }
.button-row { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 1.5rem 0; }

.pill-list { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 0.6rem; }
.pill {
  display: inline-block; padding: 0.45rem 1.1rem; border-radius: var(--radius);
  border: 2px solid currentColor; text-decoration: none; font-weight: 800;
}
.pill:hover { background: var(--blue); color: var(--white); }
.on-dark .pill:hover { background: var(--yellow); color: var(--blue); border-color: var(--yellow); }

/* ---------------------------------------------------------------- Header */
#site-header { min-height: var(--header-h); background: var(--blue); }
.site-header { background: var(--blue); color: var(--white); position: sticky; top: 0; z-index: 50; }
.skip-link { position: absolute; left: 1rem; top: -100px; background: var(--yellow); color: var(--blue); padding: 0.75rem 1rem; z-index: 100; border-radius: var(--radius); }
.skip-link:focus { top: 0.75rem; }

.site-banner { background: var(--yellow); color: var(--blue); }
.site-banner p { margin: 0; padding: 0.6rem 0; font-weight: 800; }

.bar { display: flex; align-items: center; gap: 1rem; min-height: var(--header-h); }
.brand { display: flex; align-items: center; gap: 0.75rem; text-decoration: none; margin-right: auto; }
.brand img { width: 44px; height: 44px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-text strong { font-size: 1.5rem; font-weight: 800; letter-spacing: -0.02em; }
.brand-text span { font-size: 0.8rem; font-weight: 300; }

.main-nav ul { list-style: none; margin: 0; padding: 0; }
.main-nav > ul { display: flex; gap: 0.25rem; }
.has-dropdown { position: relative; }
.has-dropdown > button {
  display: inline-flex; align-items: center; gap: 0.3rem;
  background: none; border: 0; color: var(--white); font: inherit; font-weight: 800; font-size: 1.05rem;
  min-height: 48px; padding: 0.5rem 0.85rem; cursor: pointer; border-radius: var(--radius);
}
.has-dropdown > button:hover, .has-dropdown > button[aria-expanded="true"] { background: var(--blue-2); }
.has-dropdown.in-section > button { box-shadow: inset 0 -3px 0 var(--yellow); border-radius: 0; }
.has-dropdown > button .icon { width: 1.1em; height: 1.1em; transition: transform 0.15s; }
.has-dropdown > button[aria-expanded="true"] .icon { transform: rotate(180deg); }
.dropdown {
  position: absolute; top: calc(100% + 0.5rem); left: 0; min-width: 260px;
  background: var(--white); color: var(--blue); padding: 0.75rem; border-radius: var(--radius);
  box-shadow: 0 0 0 3px var(--blue), 0 12px 30px rgba(8, 28, 53, 0.35);
}
.has-dropdown:not(:first-child) .dropdown { left: auto; right: 0; }
.dropdown.two-col { min-width: 480px; }
.dropdown.two-col ul { columns: 2; column-gap: 0.5rem; }
.dropdown li { break-inside: avoid; }
.dropdown a { display: block; padding: 0.55rem 0.8rem; text-decoration: none; border-radius: var(--radius); }
.dropdown a:hover { background: var(--yellow); }
.dropdown a[aria-current="page"] { background: var(--blue); color: var(--white); }
.dropdown li:first-child a { border-bottom: 2px solid var(--line); border-radius: var(--radius) var(--radius) 0 0; }

.header-cta { white-space: nowrap; }
.menu-toggle, .menu-close {
  display: none; align-items: center; gap: 0.4rem; min-height: 48px; padding: 0.5rem 0.9rem;
  background: none; color: var(--white); border: 2px solid var(--line-dark); border-radius: var(--radius);
  font: inherit; font-weight: 800; cursor: pointer;
}
.icon { width: 1.4em; height: 1.4em; flex: none; }

.mobile-menu { position: fixed; inset: 0; background: var(--blue); color: var(--white); overflow-y: auto; z-index: 60; padding-bottom: 3rem; }
.mobile-menu-top { display: flex; align-items: center; justify-content: space-between; min-height: var(--header-h); }
.mobile-menu .menu-close { display: inline-flex; }
.mobile-cta { width: 100%; margin: 0.5rem 0 1.5rem; font-size: 1.2rem; }
.mobile-menu h2 { font-size: 1rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--yellow); margin: 1.75rem 0 0.5rem; }
.mobile-menu ul { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--line-dark); }
.mobile-menu li a { display: block; padding: 0.8rem 0; border-bottom: 1px solid var(--line-dark); text-decoration: none; font-size: 1.2rem; }
.mobile-menu a[aria-current="page"] { color: var(--yellow); }
.mobile-menu a[aria-current="page"]::before { content: "\2192\00a0"; }

@media (max-width: 1020px) {
  .main-nav { display: none; }
  .menu-toggle { display: inline-flex; }
}
@media (max-width: 520px) {
  /* No room for the button: the name shows instead (the menu has the button). */
  .header-cta { display: none; }
  .bar { gap: 0.5rem; }
  .menu-toggle span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}

/* ---------------------------------------------------------------- Breadcrumbs and page hero */
.breadcrumbs { background: var(--blue); color: var(--white); border-top: 1px solid var(--line-dark); }
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 0.25rem 0.5rem; margin: 0; padding: 0.75rem 0 0; font-size: 0.95rem; }
.breadcrumbs li:not(:last-child)::after { content: "/"; margin-left: 0.5rem; color: var(--yellow); }
.breadcrumbs a { font-weight: 500; }
.breadcrumbs [aria-current] { font-weight: 800; }

.page-hero { background: var(--blue); color: var(--white); padding: 2.5rem 0 4rem; position: relative; overflow: hidden; }
.page-hero h1 { max-width: 18ch; }
.page-hero .lede { max-width: 42ch; }
.eyebrow { color: var(--yellow); font-weight: 800; text-transform: uppercase; letter-spacing: 0.1em; font-size: 0.95rem; margin-bottom: 0.75rem; }
.page-hero::after {
  content: ""; position: absolute; right: -120px; top: 50%; width: 420px; height: 420px;
  background: url("/android-chrome-512x512.png") center / contain no-repeat;
  opacity: 0.16; transform: translateY(-45%) rotate(-18deg); z-index: 0; pointer-events: none;
}
.page-hero .wrap { position: relative; z-index: 1; }
@media (max-width: 760px) {
  .page-hero::after { width: 200px; height: 200px; right: -60px; top: auto; bottom: -50px; transform: rotate(-18deg); opacity: 0.12; }
}

/* ---------------------------------------------------------------- Bands */
.band { padding: 4.5rem 0; }
.band-tight { padding: 3rem 0; }
.band-blue { background: var(--blue); color: var(--white); }
.band-yellow { background: var(--yellow); color: var(--blue); }
.band-navy { background: var(--blue); color: var(--white); }
.band-paper { background: var(--paper); }
.band + .band:not([class*="band-"]) { border-top: 1px solid var(--line); }
.band-blue h2, .band-blue .big { color: var(--orange); }
.section-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 1rem; margin-bottom: 2rem; }
.section-head h2 { margin: 0; }

.split { display: grid; grid-template-columns: 1.4fr 1fr; gap: 3rem; align-items: start; }
.cols-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.5rem 3rem; }
@media (max-width: 820px) { .split { grid-template-columns: 1fr; } }

dl { display: grid; grid-template-columns: auto 1fr; gap: 0.5rem 1rem; align-items: baseline; }
dt { font-weight: 800; }
dd { margin: 0; }
.split > img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); }

/* Callout box */
.callout { background: var(--yellow); color: var(--blue); padding: 1.75rem 2rem; border-radius: var(--radius); margin: 1.5rem 0; }
.callout > :last-child { margin-bottom: 0; }
.callout-blue { background: var(--blue); color: var(--white); }
.callout-blue .button { background: var(--yellow); border-color: var(--yellow); color: var(--blue); }
.callout-blue .button:hover { background: transparent; color: var(--yellow); }
.callout-outline { background: var(--paper); border: 3px solid var(--blue); }

/* Numbered cards */
.cards { list-style: none; padding: 0; margin: 0; display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); counter-reset: card; }
.cards > li { background: var(--paper); border: 2px solid var(--blue); border-radius: var(--radius); padding: 1.5rem; counter-increment: card; }
.cards.numbered > li::before { content: counter(card, decimal-leading-zero); display: block; font-weight: 800; color: var(--blue); background: var(--yellow); width: max-content; padding: 0 0.5rem; border-radius: var(--radius); margin-bottom: 0.75rem; }
.band-blue .cards > li { background: var(--blue-2); border-color: var(--blue-2); }
.band-blue .cards.numbered > li::before { background: var(--yellow); }
.cards > li > :last-child { margin-bottom: 0; }

/* Image tiles (home "What to do", hub pages) */
.tiles { list-style: none; padding: 0; margin: 0; display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.tile a { display: flex; flex-direction: column; height: 100%; text-decoration: none; background: var(--paper); border: 3px solid var(--blue); border-radius: var(--radius); overflow: hidden; }
.tile img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.tile .tile-body { padding: 1rem 1.25rem 1.25rem; display: flex; flex-direction: column; gap: 0.35rem; flex: 1; }
.tile .tile-title { font-size: 1.3rem; font-weight: 800; }
.tile .tile-text { font-weight: 500; }
.tile .tile-go { margin-top: auto; font-weight: 800; text-decoration: underline; text-underline-offset: 3px; }
.tile a:hover { background: var(--yellow); }
.tile a:hover .tile-go { text-decoration-thickness: 4px; }
.tiles.big { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.tiles.big .tile-title { font-size: 1.7rem; }
.tile-colour { display: block; aspect-ratio: 4 / 3; background: var(--blue); position: relative; overflow: hidden; }
.tile-colour::before { content: ""; position: absolute; width: 55%; height: 70%; right: -10%; top: -10%; background: var(--orange); }
.tile-colour::after { content: ""; position: absolute; width: 35%; height: 55%; left: 12%; bottom: -15%; background: var(--yellow); }

/* ---------------------------------------------------------------- Accordions */
.accordion { border-top: 2px solid var(--blue); }
.accordion:last-of-type { border-bottom: 2px solid var(--blue); }
.accordion summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.1rem 0.25rem; }
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary > * { margin: 0; font-size: 1.25rem; }
/* Plus and minus drawn as bars (not text) so they sit exactly in the middle of the circle */
.accordion summary::after {
  content: ""; flex: none; width: 2.25rem; height: 2.25rem; border-radius: 50%;
  background:
    linear-gradient(var(--blue), var(--blue)) center / 14px 3px no-repeat,
    linear-gradient(var(--blue), var(--blue)) center / 3px 14px no-repeat,
    var(--yellow);
}
.accordion[open] summary::after {
  background: linear-gradient(var(--blue), var(--blue)) center / 14px 3px no-repeat, var(--yellow);
}
[data-filter-list] { border-top: 2px solid var(--blue); }
[data-filter-list] > .accordion { border-top: 0; border-bottom: 2px solid var(--blue); }
.filter-box { margin-bottom: 2rem; }
.filter-box label { display: block; font-weight: 800; font-size: 1.2rem; margin-bottom: 0.5rem; }
.filter-box input {
  width: 100%; min-height: 52px; font: inherit; color: var(--blue); background: var(--paper);
  border: 3px solid var(--blue); border-radius: var(--radius); padding: 0.5rem 0.9rem;
}
.filter-box input::placeholder { color: #4a5568; }
.filter-status { margin: 0.5rem 0 0; min-height: 1.5em; }
.accordion summary:hover > * { text-decoration: underline; text-underline-offset: 4px; }
.accordion .accordion-body { padding: 0 0.25rem 1.25rem; max-width: 72ch; }
.band-blue .accordion { border-color: var(--line-dark); }
.band-blue .accordion summary::after { color: var(--blue); }

/* ---------------------------------------------------------------- Lists and tables */
.ticks { list-style: none; padding: 0; }
.ticks li { position: relative; padding: 0.7rem 0 0.7rem 2rem; border-top: 1px solid var(--line); }
.ticks li:last-child { border-bottom: 1px solid var(--line); }
.ticks li::before { content: ""; position: absolute; left: 0.2rem; top: 1.15rem; width: 0.75rem; height: 0.75rem; background: var(--orange); transform: rotate(45deg); }
.band-blue .ticks li { border-color: var(--line-dark); }
.band-blue .ticks li::before { background: var(--yellow); }

ol.steps { padding-left: 1.5rem; }
ol.steps li { padding: 0.25rem 0 0.25rem 0.25rem; }
ol.steps li::marker { font-weight: 800; }

.link-list { columns: 2 240px; padding-left: 1.25rem; }
.link-list li { margin-bottom: 0.35rem; break-inside: avoid; }

.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; max-width: 640px; }
caption { text-align: left; font-weight: 800; padding-bottom: 0.5rem; }
th, td { text-align: left; padding: 0.7rem 0.9rem; border-bottom: 1px solid var(--line); }
th { border-bottom: 3px solid var(--blue); font-weight: 800; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }

.price-list { list-style: none; padding: 0; max-width: 520px; }
.price-list li { display: flex; justify-content: space-between; gap: 1rem; padding: 0.65rem 0; border-bottom: 1px solid var(--line); }
.price-list li span:last-child { font-weight: 800; }

.tool-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem; padding: 0; list-style: none; }
.tool-list li { background: var(--paper); border-left: 6px solid var(--orange); padding: 1rem 1.25rem; border-radius: 0 var(--radius) var(--radius) 0; }
.tool-list strong { display: block; font-size: 1.15rem; margin-bottom: 0.25rem; }

.days { list-style: none; padding: 0; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.days li { background: var(--blue); color: var(--white); border-radius: var(--radius); padding: 1.5rem; }
.days strong { display: block; color: var(--yellow); font-size: 1.3rem; }
.days span { font-size: 2rem; font-weight: 800; }

/* ---------------------------------------------------------------- Logos, cards and dialogs */
.logo-grid { list-style: none; padding: 0; margin: 0; display: grid; gap: 1rem; grid-template-columns: repeat(var(--cols, 6), 1fr); }
.logo-grid-big { gap: 1.25rem; }
.logo-grid-big img { inset: 1.5rem; width: calc(100% - 3rem); height: calc(100% - 3rem); }
.logo-grid li { position: relative; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); aspect-ratio: 3 / 2; }
.logo-grid li.logo-dark { background: var(--blue); border-color: var(--blue); }
.logo-grid a { position: absolute; inset: 0; border-radius: var(--radius); }
.logo-grid img { position: absolute; inset: 0.9rem; width: calc(100% - 1.8rem); height: calc(100% - 1.8rem); object-fit: contain; }
@media (max-width: 900px) { .logo-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 480px) { .logo-grid { grid-template-columns: repeat(2, 1fr); } }

.card-grid { list-style: none; padding: 0; margin: 0; display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.card-button { all: unset; box-sizing: border-box; cursor: pointer; display: flex; flex-direction: column; gap: 0.4rem; width: 100%; height: 100%; background: var(--paper); border: 3px solid var(--blue); border-radius: var(--radius); overflow: hidden; padding-bottom: 1.1rem; }
.card-button img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; margin-bottom: 0.5rem; }
.card-title { font-weight: 800; font-size: 1.3rem; padding: 0 1.25rem; }
.card-text { padding: 0 1.25rem; }
.card-button:hover { background: var(--yellow); }
.card-button:focus-visible { outline: 3px solid var(--blue); box-shadow: 0 0 0 7px var(--yellow); }

.modal { border: 0; border-radius: var(--radius); padding: 0; width: min(720px, calc(100% - 2rem)); max-height: calc(100% - 2rem); background: var(--white); color: var(--blue); }
.modal::backdrop { background: rgba(8, 28, 53, 0.8); }
.modal-body { padding: 2rem; }
.modal-photo { width: 100%; max-height: 70vh; object-fit: contain; background: var(--blue); border-radius: var(--radius); margin-bottom: 1.25rem; }
.modal-close { position: sticky; top: 0.75rem; float: right; margin: 0.75rem 0.75rem 0 0; z-index: 2; display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: 50%; border: 0; background: var(--blue); color: var(--white); cursor: pointer; }

/* Gallery viewer: just the photo, with close and previous / next buttons */
.lightbox { border: 0; padding: 0; margin: 0; width: 100vw; height: 100vh; max-width: none; max-height: none; background: transparent; overflow: hidden; }
.lightbox::backdrop { background: rgba(8, 28, 53, 0.94); }
.lightbox-stage { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; padding: 4.5rem 5.5rem; }
.lightbox-stage img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
.lightbox-btn { position: absolute; display: inline-flex; align-items: center; justify-content: center; width: 52px; height: 52px; border: 0; border-radius: 50%; background: var(--white); color: var(--blue); cursor: pointer; }
.lightbox-btn:hover { background: var(--yellow); }
.lightbox-btn[hidden] { display: none; }
.lightbox-close { top: 1rem; right: 1rem; }
.lightbox-prev { left: 1rem; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 1rem; top: 50%; transform: translateY(-50%); }
@media (max-width: 640px) {
  .lightbox-stage { padding: 4.5rem 0.5rem 5.5rem; }
  .lightbox-prev, .lightbox-next { top: auto; bottom: 1rem; transform: none; }
  .lightbox-prev { left: calc(50% - 64px); }
  .lightbox-next { right: calc(50% - 64px); }
}

/* ---------------------------------------------------------------- Carousels */
.carousel { position: relative; }
.carousel-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; gap: 1rem; }
.carousel-track::-webkit-scrollbar { display: none; }
.carousel-track > * { scroll-snap-align: start; flex: 0 0 100%; }
.carousel-controls { display: flex; align-items: center; gap: 0.5rem; margin-top: 1rem; }
.carousel-btn { width: 48px; height: 48px; display: inline-grid; place-items: center; border-radius: 50%; border: 3px solid currentColor; background: none; color: inherit; cursor: pointer; }
.carousel-btn:hover { background: var(--yellow); color: var(--blue); border-color: var(--yellow); }
.carousel-count { font-weight: 800; min-width: 4.5em; text-align: center; }

.testimonial { margin: 0; background: var(--blue-2); color: var(--white); border-radius: var(--radius); padding: 2rem; }
.testimonial blockquote { margin: 0 0 1rem; font-size: 1.35rem; font-weight: 300; }
.testimonial figcaption { font-weight: 800; color: var(--yellow); }
.testimonial { display: flex; flex-direction: column; justify-content: space-between; }
.testimonial-long blockquote { font-size: 1.1rem; }
/* Testimonials: 2 at a time on tablets, 3 on wider screens. */
@media (min-width: 700px) {
  [data-testimonials] > * { flex-basis: calc((100% - 1rem) / 2); }
  [data-testimonials] .testimonial { padding: 1.5rem; }
  [data-testimonials] blockquote { font-size: 1.15rem; }
  [data-testimonials] .testimonial-long blockquote { font-size: 1rem; }
}
@media (min-width: 1020px) { [data-testimonials] > * { flex-basis: calc((100% - 2rem) / 3); } }

/* Home hero */
.home-hero { background: var(--blue); color: var(--white); padding: 1.5rem 0 3rem; }
.hero-frame { position: relative; border-radius: var(--radius); overflow: hidden; background: var(--blue-2); }
.home-hero .carousel-track { gap: 0; }
@media (pointer: fine) { .carousel[data-bare] .carousel-track { cursor: grab; } }
.carousel-controls-bare { position: absolute; top: 0.75rem; right: 0.75rem; margin: 0; z-index: 2; }
.carousel-controls-bare .carousel-btn { width: 36px; height: 36px; border: 0; background: rgba(8, 28, 53, 0.55); color: var(--white); }
.carousel-controls-bare .carousel-btn svg { width: 16px; height: 16px; }
.carousel-controls-bare .carousel-btn:hover { background: var(--blue); color: var(--white); }
/* min-width: 0 keeps each slide exactly one screen wide (otherwise min-height + aspect-ratio widen it on phones). */
.hero-slide { position: relative; aspect-ratio: 16 / 8; min-height: 420px; min-width: 0; }
.hero-slide img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-overlay {
  /* 1px past the edges (the frame clips it), so no sliver of photo shows at the sides. */
  position: absolute; left: -1px; bottom: -1px; right: -1px; padding: 3rem calc(2.5rem + 1px) calc(1.75rem + 1px);
  background: linear-gradient(to top, rgba(8, 28, 53, 0.96) 0%, rgba(8, 28, 53, 0.9) 65%, rgba(8, 28, 53, 0) 100%);
  /* Title and details on the left, button on the right, so the band is wide and short. */
  display: grid; grid-template-columns: 1fr auto; column-gap: 2rem; align-items: end;
}
.hero-title { font-size: clamp(2rem, 3.8vw, 3rem); line-height: 1; margin: 0 0 0.4rem; grid-column: 1; }
.hero-meta { font-size: 1.25rem; margin: 0; grid-column: 1; }
.hero-meta strong { color: var(--yellow); }
.hero-overlay .button-row { grid-column: 2; grid-row: 1 / span 2; margin: 0; }
.hero-overlay > p:not(.hero-meta) { grid-column: 1 / -1; margin: 1rem 0 0; }
.hero-static { position: relative; z-index: 1; }
@media (max-width: 640px) {
  .hero-slide { min-height: 460px; }
  .hero-overlay { padding: 3rem calc(1.25rem + 1px) calc(1.5rem + 1px); grid-template-columns: 1fr; }
  .hero-overlay .button-row { grid-column: 1; grid-row: auto; margin-top: 1.25rem; }
}

/* ---------------------------------------------------------------- Contact picker, mailing list, gallery */
.contact-picker { background: var(--paper); border: 3px solid var(--blue); border-radius: var(--radius); padding: 2rem; max-width: 640px; }
.contact-picker label { display: block; font-weight: 800; font-size: 1.25rem; margin-bottom: 0.75rem; }
.contact-picker select {
  width: 100%; min-height: 52px; font: inherit; color: var(--blue); background: var(--white);
  border: 3px solid var(--blue); border-radius: var(--radius); padding: 0.5rem 0.9rem;
}
.contact-result:not(:empty) { margin-top: 1.5rem; }
.contact-result .small { margin: 0.6rem 0 0; }

.mailing-list .embed { background: var(--white); color: var(--blue); border-radius: var(--radius); padding: 1rem; min-height: 120px; }

.photo-grid { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.75rem; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.photo-grid a { display: block; border-radius: var(--radius); overflow: hidden; }
.photo-grid img { width: 100%; aspect-ratio: 1; object-fit: cover; transition: transform 0.2s; }
.photo-grid a:hover img { transform: scale(1.04); }

.section-links { background: var(--yellow); padding: 3rem 0; margin-top: 0; }
.section-links h2 { font-size: 1.6rem; }

/* ---------------------------------------------------------------- Policy pages */
.prose { max-width: 75ch; }
.prose h2 { font-size: 1.75rem; margin-top: 2.5rem; }
.prose ul ul { margin: 0.5rem 0; }
.prose li { margin-bottom: 0.4rem; }

/* ---------------------------------------------------------------- Footer */
.site-footer { background: var(--blue); color: var(--white); padding: 3.5rem 0 2rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2rem; }
.footer-brand { display: flex; gap: 1rem; align-items: flex-start; }
.footer-brand img { width: 64px; height: 64px; flex: none; }
.site-footer h2 { font-size: 1rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--yellow); margin-bottom: 0.75rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 0.4rem; }
.footer-legal { border-top: 1px solid var(--line-dark); margin-top: 2.5rem; padding-top: 1.5rem; font-size: 0.95rem; }
.footer-legal p { margin-bottom: 0.5rem; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; } }

/* ================================================================ Colour scheme
   Yellow and orange panels with a light header bar; the footer stays blue.
   These rules come last so they win over the blue defaults above.
   ("html" at the start of each just makes the rule a little stronger.) */
html .tile a { border: 0; background: var(--yellow); }
html .tile a:hover { background: var(--orange); }

/* TEMPORARY preview (?tiles=photo): the photo fills the tile, with the title and text over a dark blue fade. */
.tiles-photo .tile a { position: relative; isolation: isolate; justify-content: flex-end; border: 0; background: var(--blue); color: var(--white); }
.tiles-photo .tile a:has(> img, > .tile-colour) { aspect-ratio: 1; }
.tiles-photo .tile a > :is(img, .tile-colour) { position: absolute; inset: 0; width: 100%; height: 100%; aspect-ratio: auto; z-index: -1; transition: transform 0.3s; }
.tiles-photo .tile .tile-body { flex: none; padding: 3.5rem 1.25rem 1.15rem; background: linear-gradient(to top, rgba(8, 28, 53, 0.96) 0%, rgba(8, 28, 53, 0.9) 60%, rgba(8, 28, 53, 0) 100%); }
.tiles-photo .tile a:not(:has(> img, > .tile-colour)) .tile-body { flex: 1; padding-top: 1.25rem; background: none; }
.tiles-photo .tile .tile-title { color: var(--orange); font-size: 1.45rem; line-height: 1.15; }
.tiles-photo .tile a:hover { background: var(--blue-2); }
.tiles-photo .tile a:hover > img { transform: scale(1.06); }
html .card-button { border: 0; background: var(--yellow); }
html .card-button:hover { background: var(--orange); }
html :is(.page-hero, .breadcrumbs) { background: var(--orange); color: var(--blue); }
html .breadcrumbs { border-top-color: rgba(8, 28, 53, 0.25); }
html :is(.page-hero, .breadcrumbs) a { color: var(--blue); }
html .breadcrumbs li:not(:last-child)::after { color: var(--blue); }
html .page-hero .eyebrow { color: var(--blue); }
html .page-hero .button { background: var(--blue); border-color: var(--blue); color: var(--white); }
html .page-hero .button:hover { background: transparent; color: var(--blue); }
html .page-hero :focus-visible { outline-color: var(--blue); box-shadow: 0 0 0 7px var(--yellow); }
html .page-hero::after { filter: brightness(0); opacity: 0.1; }

html :is(#site-header, .site-header) { background: var(--white); color: var(--blue); }
html .site-header { box-shadow: 0 4px 0 var(--orange); }
html .has-dropdown > button { color: var(--blue); }
html .has-dropdown > button:hover, html .has-dropdown > button[aria-expanded="true"] { background: var(--yellow); }
html .has-dropdown.in-section > button { box-shadow: inset 0 -4px 0 var(--orange); }
html .menu-toggle { color: var(--blue); border-color: var(--blue); }
html .site-header .button { background: var(--orange); border-color: var(--orange); color: var(--blue); }
html .site-header .button:hover { background: var(--blue); border-color: var(--blue); color: var(--white); }
html .site-header :focus-visible { outline-color: var(--blue); box-shadow: 0 0 0 7px var(--yellow); }
html .home-hero { background: var(--orange); color: var(--blue); }
html .home-hero .hero-overlay { background: linear-gradient(to top, var(--orange) calc(100% - 3rem), rgba(238, 120, 0, 0) 100%); }
html .home-hero .hero-frame { background: var(--orange); }
html .home-hero .hero-meta strong { color: var(--blue); }
html .home-hero .button { background: var(--blue); border-color: var(--blue); color: var(--white); }
html .home-hero .button:hover { background: transparent; color: var(--blue); }
html .home-hero :focus-visible { outline-color: var(--blue); box-shadow: 0 0 0 7px var(--yellow); }
html :is(.band-blue, .callout-blue) { background: var(--yellow); color: var(--blue); }
html .band-blue + .band-yellow { box-shadow: inset 0 4px 0 var(--orange); }
html :is(.band-blue, .callout-blue) :is(a, h2, .big) { color: var(--blue); }
html :is(.band-blue, .callout-blue) .button { background: var(--blue); border-color: var(--blue); color: var(--white); }
html :is(.band-blue, .callout-blue) .button:hover { background: transparent; color: var(--blue); }
html :is(.band-blue, .callout-blue) .pill:hover { background: var(--blue); color: var(--yellow); border-color: var(--blue); }
html :is(.band-blue, .callout-blue) :focus-visible { outline-color: var(--blue); box-shadow: 0 0 0 7px var(--white); }
html .band-blue .cards > li { background: var(--white); border-color: var(--white); }
html .band-blue .cards.numbered > li::before { background: var(--orange); }
html .band-blue :is(.accordion, .ticks li) { border-color: var(--line); }
html .band-blue .accordion summary::after { background-color: var(--white); }
html .band-blue .ticks li::before { background: var(--blue); }
html :is(.tile a, .card-button) { transition: transform 0.15s, background-color 0.15s; }
html :is(.tile, .card-grid > li):nth-child(odd) :is(a, .card-button):hover { transform: rotate(-1.5deg) scale(1.02); }
html :is(.tile, .card-grid > li):nth-child(even) :is(a, .card-button):hover { transform: rotate(1.5deg) scale(1.02); }
@media (prefers-reduced-motion: reduce) { html :is(.tile a, .card-button):hover { transform: none !important; } }

/* Home hero: the photo on its own (16:7), with the title, dates and button in a solid band below.
   TEMPORARY: ?hero=fade brings back the old layout (text over a fade on the photo) to compare. */
html:not(.hero-fade) .hero-slide { aspect-ratio: 16 / 7; min-height: 0; }
html:not(.hero-fade) .hero-overlay { position: static; padding: 1.5rem 2.5rem 1.75rem; background: var(--orange); }
@media (max-width: 640px) {
  html:not(.hero-fade) .hero-slide { aspect-ratio: 3 / 2; }
  html:not(.hero-fade) .hero-overlay { padding: 1.25rem 1.25rem 1.5rem; }
}
