/* Framework base styles: the look every site starts from, whatever its theme. The renderer links
   this file from every page (renderer/baseAssets.ts), after the Site styles and before the theme's
   own CSS, custom CSS and page CSS, so any of those can change a rule here.

   Fonts, sizes, colours and spacing come from the site's Site styles, as the CSS variables in
   <style id="site-styles"> at the top of <head>. Use the variables here rather than fixed values
   so one stylesheet suits every site. The header's settings-driven rules (logo height, menu
   breakpoint) stay in sections/header-style. */

/* Fonts, sizes, colours and spacing come from the site's Site styles, as the CSS variables in
   <style id="site-styles"> at the top of <head>. Use the variables here rather than fixed values
   so one theme suits every site. */
*, *::before, *::after { box-sizing: border-box; }
/* Full-screen sections and background images reach the screen's edges (50vw from the middle), which
   would be a scrollbar's width too wide; clip, unlike hidden, keeps the sticky header working. */
html, body { overflow-x: clip; }
/* Read out, not shown ("Read more: <post title>"). */
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
body { margin: 0; background: var(--color-base); color: var(--color-primary); -webkit-text-size-adjust: 100%;
  font: var(--p-weight) var(--p-size)/var(--p-line-height) var(--p-font); letter-spacing: var(--p-letter-spacing); text-transform: var(--p-transform); }
/* The text styles. Each class lets any other element look like that style (an HTML block can use them). */
h1, .h1 { font: var(--h1-weight) var(--h1-size)/var(--h1-line-height) var(--h1-font); letter-spacing: var(--h1-letter-spacing); text-transform: var(--h1-transform); }
h2, .h2 { font: var(--h2-weight) var(--h2-size)/var(--h2-line-height) var(--h2-font); letter-spacing: var(--h2-letter-spacing); text-transform: var(--h2-transform); }
h3, .h3 { font: var(--h3-weight) var(--h3-size)/var(--h3-line-height) var(--h3-font); letter-spacing: var(--h3-letter-spacing); text-transform: var(--h3-transform); }
h4, .h4 { font: var(--h4-weight) var(--h4-size)/var(--h4-line-height) var(--h4-font); letter-spacing: var(--h4-letter-spacing); text-transform: var(--h4-transform); }
h5, h6, .h5 { font: var(--h5-weight) var(--h5-size)/var(--h5-line-height) var(--h5-font); letter-spacing: var(--h5-letter-spacing); text-transform: var(--h5-transform); }
h1, h2, h3, h4, h5, h6 { margin: 1.2em 0 .5em; }
p, ul, ol { margin: 0 0 1em; }
.p-large { font: var(--p-large-weight) var(--p-large-size)/var(--p-large-line-height) var(--p-large-font); letter-spacing: var(--p-large-letter-spacing); text-transform: var(--p-large-transform); }
.p-small, small, figcaption, .site-footer__default, .post__date, .pagination__count, .tags {
  font: var(--p-small-weight) var(--p-small-size)/var(--p-small-line-height) var(--p-small-font); letter-spacing: var(--p-small-letter-spacing); text-transform: var(--p-small-transform); }
/* Quieter text: the text colour faded towards the background. */
figcaption, .site-footer__default, .post__date, .pagination__count, .field__optional { color: color-mix(in srgb, currentColor 65%, transparent); }
a { color: inherit; text-decoration-color: var(--color-accent); text-decoration-thickness: 1px; text-underline-offset: .2em; }
a:hover { text-decoration-thickness: 2px; }
hr { border: 0; border-top: 1px solid var(--color-accent); margin: var(--spacing) 0; }
/* The five brand colours as classes, for blocks, HTML blocks and theme files: color-accent,
   bg-tertiary … A background brings a readable text colour with it (--on-<colour>, worked out from
   the site's colours). */
.color-primary { color: var(--color-primary); } .bg-primary { --bg: var(--color-primary); background-color: var(--bg); color: var(--on-primary); }
.color-secondary { color: var(--color-secondary); } .bg-secondary { --bg: var(--color-secondary); background-color: var(--bg); color: var(--on-secondary); }
.color-tertiary { color: var(--color-tertiary); } .bg-tertiary { --bg: var(--color-tertiary); background-color: var(--bg); color: var(--on-tertiary); }
.color-base { color: var(--color-base); } .bg-base { --bg: var(--color-base); background-color: var(--bg); color: var(--on-base); }
.color-accent { color: var(--color-accent); } .bg-accent { --bg: var(--color-accent); background-color: var(--bg); color: var(--on-accent); }
/* A custom colour: the element carries it as style="--custom:#…;--on-custom:#…". */
.color-custom { color: var(--custom); } .bg-custom { --bg: var(--custom); background-color: var(--bg); color: var(--on-custom); }

/* body > so a <footer> pasted into an HTML block isn't styled as the page's own. The content is
   at most --max-width wide, with --site-padding outside it. The header has its own CSS in
   sections/header-style. */
body > main, body > footer { max-width: calc(var(--max-width) + 2 * var(--site-padding)); margin: 0 auto; padding: 0 var(--site-padding); }
/* Navigation text style, for links anywhere that should look like the header's. */
.nav-link { font: var(--nav-weight) var(--nav-size)/var(--nav-line-height) var(--nav-font); letter-spacing: var(--nav-letter-spacing); text-transform: var(--nav-transform); text-decoration: none; }
body > main { padding-bottom: 64px; }
img { display: block; max-width: 100%; height: auto; }
/* A picture element only chooses the file; the image inside is what's laid out and styled. */
picture { display: contents; }
figure { margin: 0; }
figcaption { margin-top: 8px; }
body > footer { padding-top: 24px; padding-bottom: 32px; }
.site-footer__default { margin: 0; }
/* The 12-column grid (templates in grid/). Each column spans --span columns; an inner row
   (a Columns block) uses subgrid, so its columns line up with the page's. Blocks are --spacing
   apart, above and below and side by side; rows and columns add none of their own. Each row of
   the page is a section, with --section-padding above and below. Phones stack. */
/* Section heights, as % of the screen's height. A theme can change them for every site. */
:root { --section-small: 33; --section-medium: 66; --section-large: 100; }
.row { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--spacing); padding: var(--section-padding) 0; }
.row--nested { padding: 0; }
/* A row with a background colour fills the screen's width, while its content stays on the grid. */
.row--bg { border-image: conic-gradient(var(--bg) 0 0) fill 0 / / 0 100vmax; }
.col { grid-column: span var(--span); min-width: 0; display: grid; grid-template-columns: subgrid; align-content: start; row-gap: var(--spacing); }
.col > .block { grid-column: 1 / -1; min-width: 0; }
.block--columns { display: grid; grid-template-columns: subgrid; }
/* A Columns block's columns are as tall as the tallest; their blocks sit at the top, middle or bottom,
   or stretch to fill it (--col-align on the block: start, center, end or stretch). */
.block--columns > .row--nested > .col { align-content: var(--col-align, start); }
.row--nested { grid-column: 1 / -1; grid-template-columns: subgrid; }
/* A block's own first and last margins would add to the spacing, so they're dropped. */
.block > :first-child { margin-top: 0; }
.block > :last-child { margin-bottom: 0; }
/* A section's settings (grid/row): at least a share of the screen tall, with its content at the top,
   middle or bottom; narrower content, or the whole screen's width; a background image, edge to edge
   and darkened by --darken, behind everything in the section. */
.row--h-small { --section-vh: var(--section-small); }
.row--h-medium { --section-vh: var(--section-medium); }
.row--h-large { --section-vh: var(--section-large); }
.row--h-small, .row--h-medium, .row--h-large, .row--h-custom { min-height: calc(var(--section-vh, 50) * 1svh); }
.row--v-middle { align-content: center; }
.row--v-bottom { align-content: end; }
.row--w-medium { max-width: calc(var(--max-width) * .75); margin-inline: auto; }
.row--w-narrow { max-width: calc(var(--max-width) * .5); margin-inline: auto; }
.row--w-full { margin-inline: calc(50% - 50vw); }
.row--image { position: relative; isolation: isolate; }
.row--image:not(.row--bg) { color: #fff; }
.row__image { position: absolute; inset: 0 calc(50% - 50vw); z-index: -1; overflow: hidden; }
.row__image img { width: 100%; height: 100%; object-fit: cover; }
.row__image::after { content: ''; position: absolute; inset: 0; background: rgb(0 0 0 / var(--darken, 0)); }
/* A section's background as a gradient (--gradient, from its colour to a second one), edge to edge
   behind its content and any background image. */
.row[style*="--gradient"] { position: relative; isolation: isolate; }
.row[style*="--gradient"]::before { content: ''; position: absolute; inset: 0 calc(50% - 50vw); z-index: -2; background: var(--gradient); pointer-events: none; }
@media (max-width: 767px) {
  .row, .col, .block--columns { display: flex; flex-direction: column; gap: var(--spacing); }
  .row--v-middle { justify-content: center; }
  .row--v-bottom { justify-content: flex-end; }
  .row--nested { display: flex; }
  .row:has(.block:not(.block--spacer, .block--columns)) .col:has(.block--spacer):not(:has(.block:not(.block--spacer))) { display: none; }
}

/* Blocks lay themselves out by the width of their column, not the screen (container queries),
   so the same block works at full width, in a quarter column and stacked on a phone. */
.block:not(.block--columns) { container-type: inline-size; }

/* HTML: anything too wide (a long link, a big table, code) scrolls inside the block. */
.html { overflow-wrap: break-word; overflow-x: auto; }
.html table { border-collapse: collapse; margin: 16px 0; }
.html th, .html td { border: 1px solid var(--color-accent); padding: 6px 10px; text-align: left; vertical-align: top; }
.html pre { overflow-x: auto; background: color-mix(in srgb, var(--color-primary) 5%, var(--color-base)); padding: 12px; font-size: .85em; }
.html blockquote { margin: 16px 0; padding-left: 16px; border-left: 3px solid var(--color-accent); }
.html img { margin: 16px 0; }

/* Text block (and captions): left is the default, centre and right are classes. */
.align-center { text-align: center; }
.align-right { text-align: right; }
.text > :first-child { margin-top: 0; }
.text > :last-child { margin-bottom: 0; }
.text blockquote { margin: 1em 0; padding-left: 16px; border-left: 3px solid var(--color-accent); }
.text blockquote.align-center { padding-left: 0; border-left: 0; }

/* Image: given a shape (--crop), cropped to fill it or fitted inside it (--fit), sitting at --position,
   and a link round it. */
.image--cropped img { width: 100%; aspect-ratio: var(--crop); object-fit: var(--fit, cover); object-position: var(--position, center); }
.image__link { display: block; }
.image figcaption.text { font: inherit; }
/* A caption below the image is full-strength text; one over it takes its colour from the overlay rules. */
.image figcaption.text:not(.image-overlay__caption) { color: inherit; }
figure.image > figcaption.text { margin-top: 8px; }

/* Line: a rule in a brand colour. */
.line { margin: 0; border: 0; border-top: var(--line, 1px) solid currentColor; }

/* Quote. */
.quote blockquote { margin: 0; }
.quote blockquote p { margin: 0; font: var(--h3-weight) var(--h3-size)/var(--h3-line-height) var(--h3-font); letter-spacing: var(--h3-letter-spacing); }
.quote blockquote p::before { content: '“'; }
.quote blockquote p::after { content: '”'; }
.quote figcaption { margin-top: 12px; }
.quote figcaption::before { content: '— '; }

/* Accordion: each item opens and closes by itself (details); its title is the h4 style. */
.accordion__item { padding: 0; }
.accordion--dividers .accordion__item { border-bottom: 1px solid var(--color-accent); }
.accordion--dividers .accordion__item:first-child { border-top: 1px solid var(--color-accent); }
.accordion__title { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 20px 0; cursor: pointer; list-style: none;
  font: var(--h4-weight) var(--h4-size)/var(--h4-line-height) var(--h4-font); letter-spacing: var(--h4-letter-spacing); text-transform: var(--h4-transform); }
.accordion__title::-webkit-details-marker { display: none; }
.accordion__title::after { content: ''; flex: none; width: .6em; height: .6em; transition: transform .2s ease; }
.accordion--plus .accordion__title::after { background: linear-gradient(currentColor 0 0) center / 100% 2px no-repeat, linear-gradient(currentColor 0 0) center / 2px 100% no-repeat; }
.accordion--plus [open] > .accordion__title::after { transform: rotate(45deg); }
.accordion--arrow .accordion__title::after { width: .45em; height: .45em; border-right: 2px solid; border-bottom: 2px solid; transform: translateY(-25%) rotate(45deg); }
.accordion--arrow [open] > .accordion__title::after { transform: translateY(25%) rotate(-135deg); }
.accordion__content { padding: 0 0 24px; }

/* The lightbox (base.js): an image opened larger on the page, with its caption, and arrows through a
   gallery's images. */
.lightbox { width: 100vw; height: 100vh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: rgb(0 0 0 / .9); color: #fff; }
.lightbox::backdrop { background: transparent; }
.lightbox[open] { display: grid; grid-template: 1fr auto / auto 1fr auto; align-items: center; }
.lightbox__figure { grid-area: 1 / 2; display: grid; place-items: center; height: 100%; margin: 0; padding: 48px 0 16px; min-width: 0; }
.lightbox__figure img { max-width: 100%; max-height: calc(100vh - 120px); width: auto; height: auto; object-fit: contain; }
.lightbox__caption { grid-area: 2 / 1 / 3 / 4; padding: 0 16px 20px; text-align: center; }
.lightbox button { border: 0; background: none; color: inherit; font: 32px/1 system-ui, sans-serif; padding: 16px; cursor: pointer; }
.lightbox__close { position: absolute; top: 0; right: 0; }
.lightbox__prev { grid-area: 1 / 1; }
.lightbox__next { grid-area: 1 / 3; }

/* Image with its caption over it. The image, a shade (--darken: 0 to .9 of black) and the caption
   share one grid cell, so the caption can sit in any of nine places (--v and --h). */
.image-overlay { display: grid; --v: end; --h: start; --t: left; }
.image-overlay img, .image-overlay > .image__link, .image-overlay::after, .image-overlay__caption { grid-area: 1 / 1; }
/* On a linked image, a click on the caption still follows the image's link (a link in the caption still works). */
.image__link ~ .image-overlay__caption { pointer-events: none; }
.image__link ~ .image-overlay__caption a { pointer-events: auto; }
.image-overlay img { width: 100%; }
/* A button under an image's caption sits close to it, without the caption's shadow. */
.image figcaption .button-row { margin: 16px 0 0; }
.image-overlay__caption .button { text-shadow: none; }
.image-overlay::after { content: ''; background: rgb(0 0 0 / var(--darken, 0)); pointer-events: none; }
.image-overlay__caption { position: relative; z-index: 1; align-self: var(--v); justify-self: var(--h); text-align: var(--t);
  margin: 16px; max-width: calc(100% - 32px); }
.image-overlay__caption:not([class*="bg-"]) { color: #fff; text-shadow: 0 1px 3px rgb(0 0 0 / .4); }
/* Headings in the caption follow it (white on the image, or readable on its background), not the theme's heading colour. */
.image-overlay__caption :is(h1, h2, h3, h4, h5, p, blockquote) { color: inherit; }
.image-overlay__caption[class*="bg-"] { padding: 8px 12px; }
.image-overlay--top-left { --v: start; } .image-overlay--top { --v: start; --h: center; --t: center; }
.image-overlay--top-right { --v: start; --h: end; --t: right; } .image-overlay--left { --v: center; }
.image-overlay--center { --v: center; --h: center; --t: center; } .image-overlay--right { --v: center; --h: end; --t: right; }
.image-overlay--bottom { --h: center; --t: center; } .image-overlay--bottom-right { --h: end; --t: right; }

/* Spacer: empty space, added to the usual gap between blocks. A row of nothing but spacers has no
   padding of its own, so it's exactly that gap between the rows around it. A column of nothing but
   spacers beside other columns is left out when columns stack on a phone. */
.row:has(.block--spacer):not(:has(.block:not(.block--spacer))) { padding-top: 0; padding-bottom: 0; }

/* Gallery: 1 to 10 per row (gallery--N), fewer in narrow columns: at most 4 under 800px, 2 under 500px
   and 1 under 300px. The breakpoints match galleryAcross in renderer/blocks.ts. Space between columns
   and rows is --column-gap and --row-gap; the images' shape --crop, filled or fitted (--fit) and placed
   at --position. */
.gallery { --across: 3; display: grid; grid-template-columns: repeat(var(--across), minmax(0, 1fr)); column-gap: var(--column-gap, 8px); row-gap: var(--row-gap, 8px);
  margin: 32px 0; padding: 0; list-style: none; }
.gallery--1 { --across: 1; } .gallery--2 { --across: 2; } .gallery--4 { --across: 4; } .gallery--5 { --across: 5; }
.gallery--6 { --across: 6; } .gallery--7 { --across: 7; } .gallery--8 { --across: 8; } .gallery--9 { --across: 9; } .gallery--10 { --across: 10; }
@container (max-width: 799px) { .gallery:is(.gallery--5, .gallery--6, .gallery--7, .gallery--8, .gallery--9, .gallery--10) { --across: 4; } }
@container (max-width: 499px) { .gallery:not(.gallery--1) { --across: 2; } }
@container (max-width: 299px) { .gallery { --across: 1; } }
.gallery img { width: 100%; height: auto; }
.gallery--cropped img { aspect-ratio: var(--crop); object-fit: var(--fit, cover); object-position: var(--position, center); }
/* Shapes and spacing as a site's own copy of blocks/gallery from before Phase 4e may still name them. */
.gallery--square img { aspect-ratio: 1; object-fit: cover; }
.gallery--landscape img { aspect-ratio: 3 / 2; object-fit: cover; }
.gallery--portrait img { aspect-ratio: 4 / 5; object-fit: cover; }
.gallery--gap-none { gap: 0; } .gallery--gap-medium { gap: 16px; } .gallery--gap-large { gap: 32px; }
.gallery a { display: block; }

/* Video: the player keeps its shape at any width. */
.video { position: relative; aspect-ratio: 16 / 9; margin: 32px 0; background: #000; }
.video--classic { aspect-ratio: 4 / 3; }
.video--square { aspect-ratio: 1; }
.video--vertical { aspect-ratio: 9 / 16; width: min(100%, 45vh); margin-left: auto; margin-right: auto; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* Map: squarer when narrow, so it's still a usable map. */
.map iframe { display: block; width: 100%; aspect-ratio: 16 / 10; border: 0; background: color-mix(in srgb, var(--color-primary) 8%, var(--color-base)); }
@container (max-width: 499px) { .map iframe { aspect-ratio: 1; } }

/* Buttons, also used by forms. Full width in a narrow column. */
.button-row { margin: 24px 0; }
.button-row--center { text-align: center; }
.button-row--right { text-align: right; }
/* --button is the brand colour the editor picked; --button-text the readable colour on it. */
.button { --button: var(--color-primary); --button-text: var(--on-primary);
  display: inline-block; max-width: 100%; padding: .75em 1.5em; border: 2px solid var(--button); border-radius: 4px;
  background: var(--button); color: var(--button-text); text-align: center; text-decoration: none; cursor: pointer;
  font: var(--button-weight) var(--button-size)/var(--button-line-height) var(--button-font); letter-spacing: var(--button-letter-spacing); text-transform: var(--button-transform); }
.button--secondary { background: transparent; color: var(--button); }
.button--colour-secondary { --button: var(--color-secondary); --button-text: var(--on-secondary); }
.button--colour-tertiary { --button: var(--color-tertiary); --button-text: var(--on-tertiary); }
.button--colour-base { --button: var(--color-base); --button-text: var(--on-base); }
.button--colour-accent { --button: var(--color-accent); --button-text: var(--on-accent); }
.button--colour-custom { --button: var(--custom); --button-text: var(--on-custom); }
.button--small { padding: .5em 1em; font-size: .85em; }
.button--large { padding: 1em 2em; font-size: 1.2em; }
.button--full { display: block; width: 100%; }
@container (max-width: 249px) { .button { display: block; width: 100%; } }

/* Form: one field per line at every width. 16px or more stops iPhones zooming in on a field. */
.form { margin: 32px 0; }
.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 600; font-size: .95rem; margin-bottom: 4px; }
.field__optional { font-weight: 400; }
.field input, .field textarea, .field select { display: block; width: 100%; padding: 10px 12px; border: 1px solid var(--color-accent); border-radius: 4px;
  font: inherit; font-size: max(16px, 1rem); letter-spacing: normal; text-transform: none; color: inherit; background: var(--color-base); }
.field--checkbox label { display: flex; gap: 8px; align-items: baseline; font-weight: 400; }
.field--checkbox input { width: auto; flex: none; }
.form__errors { border-left: 4px solid #c00; padding: 4px 0 4px 16px; margin-bottom: 24px; color: #900; }
.form__errors p { margin: 0; font-weight: 600; }
.form__errors ul { margin: 4px 0 0; padding-left: 20px; }
/* Off screen rather than display:none, which some bots know to skip. */
.form__trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form--sent { padding: 24px; border: 1px solid var(--color-accent); border-radius: 4px; background: color-mix(in srgb, var(--color-primary) 4%, var(--color-base)); }
.form--sent p { margin: 0; }
.form--sent:focus { outline: none; }
.cf-turnstile { margin: 16px 0; }

/* Blog summary: a list, or a grid (2 to 5 across) with fewer across in narrower columns. Cover images
   are cropped to --crop; in a list they sit beside the text in a wide enough column. */
.posts { display: grid; gap: 24px; margin: 32px 0; padding: 0; list-style: none; }
.posts--grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.posts--grid.posts--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.posts--grid.posts--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.posts--grid.posts--5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
@container (max-width: 899px) { .posts--grid.posts--4, .posts--grid.posts--5 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@container (max-width: 699px) { .posts--grid.posts--grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@container (max-width: 449px) { .posts--grid.posts--grid { grid-template-columns: minmax(0, 1fr); } }
.post__image { display: block; margin-bottom: 12px; }
.post__image img { width: 100%; aspect-ratio: var(--crop, auto); object-fit: cover; }
@container (min-width: 500px) { .posts--list .post--image { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 24px; align-items: start; }
  .posts--list .post__image { margin-bottom: 0; } }
.posts.align-center .tags { justify-content: center; }
.post__more { margin: 8px 0 0; font-weight: 600; }
.post__title { font: var(--h5-weight) var(--h5-size)/var(--h5-line-height) var(--h5-font); letter-spacing: var(--h5-letter-spacing); text-transform: var(--h5-transform); margin: 0; overflow-wrap: anywhere; }
.post__title a { color: inherit; }
.post__date { margin: 4px 0 0; }
.post__excerpt { margin: 8px 0 0; }
.posts__all { margin: -8px 0 32px; font-weight: 600; }

/* The blog: listings at /blog, one post at /blog/<slug>. */
.post-list { margin: 32px 0; padding: 0; list-style: none; container-type: inline-size; }
.post-card { display: grid; gap: 16px; padding: 24px 0; border-top: 1px solid var(--color-accent); }
.post-card:first-child { border-top: 0; padding-top: 0; }
.post-card__image img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
@container (min-width: 600px) { .post-card:has(.post-card__image) { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 24px; } }
.post-card__title { font: var(--h4-weight) var(--h4-size)/var(--h4-line-height) var(--h4-font); letter-spacing: var(--h4-letter-spacing); text-transform: var(--h4-transform); margin: 0; overflow-wrap: anywhere; }
.post-card__title a { color: inherit; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 0; padding: 0; list-style: none; }
.tags a { display: inline-block; padding: 2px 10px; border: 1px solid var(--color-accent); border-radius: 999px; color: inherit; text-decoration: none; }
.pagination { display: flex; flex-wrap: wrap; gap: 8px 24px; align-items: baseline; justify-content: space-between; margin: 32px 0; }
.pagination__older { margin-left: auto; }
/* A post stays at a comfortable reading width (POST_WIDTH in renderer/blog.ts sizes its images). */
.post-page { max-width: 800px; }
.post-page__back { margin: 24px 0 0; }
.post-page h1 { margin-top: 8px; margin-bottom: 8px; }
.post-page__cover { margin: 24px 0; }
.post-page__content { margin: 24px 0; }
.post-page__content figure { margin: 24px 0; }

/* The header (sections/header). */
.site-header { position: relative; z-index: 100; }
.site-header--fixed, .site-header--hide { position: sticky; top: 0; transition: transform .25s ease; }
.site-header--hide.is-hidden { transform: translateY(-100%); }
.site-header__inner { position: relative; display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 16px var(--spacing);
  max-width: calc(var(--max-width) + 2 * var(--site-padding)); margin: 0 auto; padding: 20px var(--site-padding); }
.site-header a { color: inherit; text-decoration: none; }
.site-header__logo { justify-self: start; font: var(--h4-weight) var(--h4-size)/1.1 var(--h4-font); letter-spacing: var(--h4-letter-spacing); text-transform: var(--h4-transform); }
.site-header__nav ul { display: flex; flex-wrap: wrap; gap: 8px 28px; margin: 0; padding: 0; list-style: none; }
.site-header__nav a { font: var(--nav-weight) var(--nav-size)/var(--nav-line-height) var(--nav-font); letter-spacing: var(--nav-letter-spacing); text-transform: var(--nav-transform); }
.site-header__nav a:hover, .site-header__nav a[aria-current] { text-decoration: underline; text-decoration-color: var(--color-accent); text-underline-offset: .3em; }
.site-header__nav { justify-self: end; }

/* The layouts. */
.site-header--logo-left-links-centre .site-header__inner { grid-template-columns: 1fr auto 1fr; }
.site-header--logo-left-links-centre .site-header__nav { grid-column: 2; justify-self: center; }
.site-header--logo-centre-links-below .site-header__inner { grid-template-columns: 1fr; justify-items: center; }
.site-header--logo-centre-links-below .site-header__logo, .site-header--logo-centre-links-below .site-header__nav { justify-self: center; }
.site-header--logo-centre-links-below .site-header__nav ul { justify-content: center; }
.site-header--logo-centre-menu .site-header__inner { grid-template-columns: 1fr auto 1fr; }
.site-header--logo-centre-menu .site-header__logo { grid-column: 2; grid-row: 1; justify-self: center; }
.site-header--logo-centre-menu .site-header__menu-button { grid-column: 3; grid-row: 1; }

/* The menu button: lines that turn into a cross, the word Menu (Close while open), or both. */
.menu-button { display: none; grid-column: -2 / -1; grid-row: 1; justify-self: end; align-items: center; gap: 10px; margin: 0; padding: 8px 0; border: 0; background: none; color: inherit; cursor: pointer;
  font: var(--nav-weight) var(--nav-size)/1 var(--nav-font); letter-spacing: var(--nav-letter-spacing); text-transform: var(--nav-transform); }
.menu-button__lines { position: relative; display: block; width: 26px; height: 18px; }
.menu-button__lines span { position: absolute; left: 0; right: 0; height: 2px; background: currentColor; border-radius: 1px; transition: transform .2s ease, opacity .2s ease, top .2s ease; }
.menu-button__lines span:nth-child(1) { top: 0; }
.menu-button__lines span:nth-child(2) { top: 8px; }
.menu-button__lines span:nth-child(3) { top: 16px; }
.menu-button--two-lines .menu-button__lines { height: 10px; }
.menu-button--two-lines .menu-button__lines span:nth-child(2) { display: none; }
.menu-button--two-lines .menu-button__lines span:nth-child(3) { top: 8px; }
.is-open .menu-button__lines span:nth-child(1) { top: 50%; transform: translateY(-50%) rotate(45deg); }
.is-open .menu-button__lines span:nth-child(2) { opacity: 0; }
.is-open .menu-button__lines span:nth-child(3) { top: 50%; transform: translateY(-50%) rotate(-45deg); }
.menu-button--lines .menu-button__text, .menu-button--two-lines .menu-button__text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.menu-button--text .menu-button__lines { display: none; }
.menu-button__close, .is-open .menu-button__open { display: none; }
.is-open .menu-button__close { display: inline; }

/* Behind the menu button, the links open as a panel under the header bar. */
.site-header--menu-only .site-header__nav { display: none; }
.site-header--menu-only .menu-button { display: inline-flex; }
.site-header--menu-only.is-open .site-header__nav { display: block; position: absolute; grid-column: 1 / -1; justify-self: stretch; top: 100%; left: calc(-1 * var(--site-padding)); right: calc(-1 * var(--site-padding)); max-height: calc(100vh - 100%); overflow-y: auto;
  padding: 8px var(--site-padding) 32px; background: var(--bg, var(--color-base)); box-shadow: 0 12px 24px -16px rgba(0, 0, 0, .3); }
.site-header--menu-only.is-open .site-header__nav ul { flex-direction: column; gap: 16px; max-width: var(--max-width); margin: 0 auto; }

/* Cookie banner (cookies/consent.ts): along the bottom, in the site's own colours and fonts. Custom CSS
   can restyle .fw-cookies. */
.fw-cookies { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 2147483000; max-width: 40rem; margin: 0 auto;
  padding: 16px 20px; border-radius: 8px; background: var(--color-base); color: var(--color-primary);
  box-shadow: 0 4px 24px rgb(0 0 0 / .18), 0 0 0 1px color-mix(in srgb, var(--color-primary) 15%, transparent); font-size: .9rem; }
.fw-cookies[hidden] { display: none; }
.fw-cookies__text { margin: 0 0 12px; }
.fw-cookies__text a { color: inherit; }
.fw-cookies__choices { display: grid; gap: 8px; margin: 0 0 12px; }
.fw-cookies__choices[hidden] { display: none; }
.fw-cookies__choice span { display: block; margin-left: 1.6em; opacity: .75; font-size: .9em; }
.fw-cookies__buttons { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.fw-cookies__buttons [hidden] { display: none; }
@media (max-width: 480px) { .fw-cookies__buttons .button { flex: 1 1 40%; } }
/* A video or map waiting for a click: the notice sits where the player will be. */
[data-fw-embed] { position: relative; }
.fw-embed__notice { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  padding: 16px; text-align: center; font-size: .9rem; background: color-mix(in srgb, var(--color-primary) 8%, var(--color-base)); color: var(--color-primary); }
.fw-embed__notice p { margin: 0; max-width: 28rem; }
.fw-embed__notice a { color: inherit; }
.map[data-fw-embed] .fw-embed__notice { bottom: auto; aspect-ratio: 16 / 10; }
@container (max-width: 499px) { .map[data-fw-embed] .fw-embed__notice { aspect-ratio: 1; } }
/* The cookie policy page's tables. */
.fw-policy__table { width: 100%; border-collapse: collapse; margin: 0 0 24px; font-size: .9em; }
.fw-policy__table th, .fw-policy__table td { text-align: left; vertical-align: top; padding: 8px; border-bottom: 1px solid color-mix(in srgb, var(--color-primary) 20%, transparent); }
@media (max-width: 600px) { .fw-policy__table { display: block; overflow-x: auto; } }
