/* The Royal London Rotation
   Colours are the tinctures of the rotation's arms. The page is white throughout:
   azure and red are accents only (titles, rules, links and buttons), never a fill
   behind a whole row. The one exception is the home page's quartered field, which
   reproduces the shield. Red is kept for the things you sign up for. Corners are
   square throughout. */

/* One modern sans throughout: Mona Sans, which can be made wider as well as bolder. Headings use
   it a little wide and semi-bold ("Mona Sans Display", the same file set slightly smaller so the
   heading sizes below read right); everything else uses it at normal width. */
@font-face {
  font-family: "Mona Sans";
  src: url("/assets/fonts/mona-sans.woff2") format("woff2-variations");
  font-weight: 200 900;
  font-stretch: 75% 125%;
  font-display: swap;
}
@font-face {
  font-family: "Mona Sans";
  src: url("/assets/fonts/mona-sans-italic.woff2") format("woff2-variations");
  font-weight: 200 900;
  font-stretch: 75% 125%;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Mona Sans Display";
  src: url("/assets/fonts/mona-sans.woff2") format("woff2-variations");
  font-weight: 200 900;
  font-stretch: 75% 125%;
  font-display: swap;
  size-adjust: 84%;
}
@font-face {
  font-family: "Mona Sans Display";
  src: url("/assets/fonts/mona-sans-italic.woff2") format("woff2-variations");
  font-weight: 200 900;
  font-stretch: 75% 125%;
  font-style: italic;
  font-display: swap;
  size-adjust: 84%;
}

:root {
  /* Tinctures, sampled from the arms */
  --azure: #124769;
  --gules: #9c4234;
  --argent: #fffefa;           /* white with a touch of the ivory in the feathers and motto scroll */
  --scroll: #d6d4cf;
  --ink: #141b24;

  /* Roles */
  --surface: var(--argent);
  --text: var(--ink);
  --text-soft: #4b5563;
  --rule: var(--scroll);
  --link: var(--azure);
  --on-gules: var(--argent);
  --on-azure: var(--argent);
  --azure-ink: var(--azure);   /* blue used for titles and lines, readable on the page background */
  --gules-ink: var(--gules);   /* red used for text and lines, readable on the page background */
  --field-argent: #eeeeec;     /* the white of the shield's field, for the home page's quartered field */

  --font-display: "Mona Sans Display", "Mona Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-text: "Mona Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-ui: "Mona Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

  --gutter: clamp(16px, 4vw, 56px);
  --max: 1440px;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);

  /* The site is always white, even when the device is set to dark mode. "only" also stops
     browsers that darken pages on their own from doing so. */
  color-scheme: only light;
}

/* Base */

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

html { -webkit-text-size-adjust: 100%; }
html { scroll-padding-top: 72px; }
h1, h2, h3, h4, h5, h6 { font-weight: 400; }

body {
  margin: 0;
  background: var(--surface);
  color: var(--text);
  font-family: var(--font-text);
  font-size: 1rem;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--link); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }

:focus-visible { outline: 3px solid currentColor; outline-offset: 4px; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: 8px;
  z-index: 30;
  padding: 0.6em 1em;
  background: var(--azure);
  color: var(--on-azure);
  font-family: var(--font-ui);
  font-weight: 600;
  transform: translateY(-200%);
}
.skip-link:focus { transform: none; }

/* Masthead */

.masthead {
  position: relative;
  z-index: 20;
  background: var(--surface);
}

.masthead__inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 14px var(--gutter);
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  min-height: 44px;
  gap: 14px;
  margin: 0;
  color: var(--text);
  text-decoration: none;
  font-weight: 400;
}

.brand__shield { width: auto; height: 52px; flex: none; }

.brand__text { display: flex; flex-direction: column; }

.brand__name {
  font-family: var(--font-display);
  font-size: 1.5rem;
  line-height: 1.05;
  letter-spacing: -0.005em;
}

.brand__line {
  font-family: var(--font-ui);
  font-size: 0.9375rem;
  line-height: 1.35;
  color: var(--text-soft);
}

/* Home: the arms a little larger than on other pages, with the menu in a row beside them. The
   photographs below carry the welcome. */
.masthead--home .masthead__inner { padding-top: clamp(12px, 1.6vw, 22px); padding-bottom: clamp(12px, 1.6vw, 22px); }
.masthead--home .brand { gap: clamp(12px, 1.4vw, 18px); }
.masthead--home .brand__shield { height: clamp(52px, 5vw, 72px); }
.masthead--home .brand__name { font-size: clamp(1.375rem, 1rem + 1vw, 1.875rem); }

/* Main navigation: the pages in a row on every screen. Where the row is wider than the screen
   (smaller laptops, tablets and phones) it sits under the arms and scrolls sideways, fading at the
   edge while there is more to see (site.js marks which edge). */

.site-nav { min-width: 0; }
.site-nav__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 0 20px;
}

.site-nav__link {
  display: inline-block;
  font-family: var(--font-ui);
  font-size: 0.9375rem;
  font-weight: 500;
  white-space: nowrap;
  color: var(--text);
  text-decoration: none;
  padding: 10px 0;
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 0% 1px;
  background-position: 0 calc(100% - 6px);
  background-repeat: no-repeat;
  transition: background-size 200ms var(--ease-out);
}
.site-nav__link[aria-current="page"] {
  background-image: linear-gradient(var(--gules-ink), var(--gules-ink));
  background-size: 100% 2px;
}
@media (hover: hover) and (pointer: fine) {
  .site-nav__link:hover { background-size: 100% 1px; }
}

/* The header puts the row under the arms below 1440px, where the row (with its drop-down arrows)
   no longer fits beside them; the slim bar, with its short name, keeps it alongside to 1280px. */
@media (max-width: 1439px) {
  .masthead__inner { grid-template-columns: minmax(0, 1fr); gap: 2px; padding-bottom: 2px; }
  .masthead--home .masthead__inner { padding-bottom: 2px; }
  /* The row runs edge to edge, so it can scroll right to the side of the screen. */
  .masthead .site-nav { margin: 0 calc(-1 * var(--gutter)); }
  .masthead .site-nav__list { overflow-x: auto; scrollbar-width: none; padding: 0 var(--gutter); }
  .masthead .site-nav__list::-webkit-scrollbar { display: none; }
}
@media (max-width: 1279px) {
  .site-nav__list { overflow-x: auto; scrollbar-width: none; }
  .site-nav__list::-webkit-scrollbar { display: none; }
  /* In the slim bar, the arms then the row. */
  .quickbar__inner { justify-content: flex-start; gap: 14px; }
  .quickbar .brand__name { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; } /* still read out */
  .quickbar .site-nav { flex: 1; }
}

/* Drop-down lists of a page's sections. The small arrow beside a page's name opens its list (on
   hover too, with a mouse); the name itself still goes to the page. site.js shows the list in the
   panel after the row, outside the sideways-scrolling row so nothing is cut off: under the item on
   wider screens, the full width of the screen on phones. Without site.js, wide screens show the
   list under the item on hover. */
.site-nav { position: relative; }
.site-nav__item { display: flex; align-items: center; flex: none; }
.site-nav__toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 44px;
  margin: 0 -2px 0 2px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--text-soft);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.site-nav__toggle[hidden] { display: none; }
/* A larger target, reaching into the space after it: 44px square on touch screens. */
.site-nav__toggle::after { content: ""; position: absolute; inset: 0 -10px 0 -4px; }
@media (max-width: 1279px) {
  .site-nav__list { gap: 0 24px; }
  .site-nav__toggle::after { inset: 0 -22px 0 -6px; }
}
/* The last one stops at the end of the row, so the row does not scroll on into empty space. */
.site-nav__item:last-child .site-nav__toggle { margin-right: 0; }
.site-nav__item:last-child .site-nav__toggle::after { right: 0; }
.site-nav__toggle svg { transition: transform 200ms var(--ease-out); }
.site-nav__toggle[aria-expanded="true"] { color: var(--gules-ink); }
.site-nav__toggle[aria-expanded="true"] svg { transform: rotate(180deg); }
.site-nav__toggle:focus-visible { outline-offset: -2px; }
@media (hover: hover) and (pointer: fine) {
  .site-nav__toggle:hover { color: var(--azure-ink); }
}

.site-nav__sub { display: none; }
.site-nav__sub, .site-nav__panel {
  list-style: none;
  margin: 0;
  padding: 6px 0;
  min-width: 15rem;
  max-width: 22rem;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-top: 2px solid var(--gules-ink);
  box-shadow: 0 12px 28px -12px rgb(20 27 36 / 0.22), 0 2px 6px -2px rgb(20 27 36 / 0.08);
  text-align: left;
}
.site-nav__panel ul { list-style: none; margin: 0; padding: 0; }
.site-nav__sub a, .site-nav__panel a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 18px;
  font: 400 0.9375rem/1.3 var(--font-ui);
  color: var(--link);
  text-decoration: none;
}
.site-nav__sub-page { border-bottom: 1px solid var(--rule); margin-bottom: 4px; }
.site-nav__sub-page a { font-weight: 600; color: var(--text); }
.site-nav__sub a[aria-current], .site-nav__panel a[aria-current] { box-shadow: inset 2px 0 0 var(--gules-ink); }
.site-nav__panel a[aria-current="true"] { color: var(--azure-ink); font-weight: 600; }
@media (hover: hover) and (pointer: fine) {
  .site-nav__sub a:hover, .site-nav__panel a:hover { background: color-mix(in srgb, var(--azure) 5%, var(--surface)); text-decoration: underline; }
}
.site-nav__panel a:focus-visible { outline-offset: -3px; }

/* Without site.js, on screens wide enough for the whole row, the list shows on hover. */
@media (min-width: 1440px) and (hover: hover) {
  html:not(.has-js) .site-nav__item { position: relative; }
  html:not(.has-js) .site-nav__item:hover > .site-nav__sub,
  html:not(.has-js) .site-nav__item:focus-within > .site-nav__sub { display: block; position: absolute; top: 100%; left: -18px; z-index: 2; }
  html:not(.has-js) .masthead:has(.site-nav__item:hover, .site-nav__item:focus-within) { z-index: 26; }
}

.site-nav__panel { position: absolute; top: 100%; left: 0; z-index: 2; }
.site-nav__panel[hidden] { display: none; }
/* Phones: the full width of the screen, under the bar (site.js sets the left edge and width). */
.site-nav__panel.is-wide { max-width: none; min-width: 0; border-left: 0; border-right: 0; }
.site-nav__panel.is-wide a { padding-left: var(--gutter); padding-right: var(--gutter); }
.masthead.has-panel { z-index: 26; } /* over the pinned section links */
@media (prefers-reduced-motion: no-preference) {
  .site-nav__panel:not([hidden]) { animation: nav-panel-in 180ms var(--ease-out); }
}
@media (prefers-reduced-motion: reduce) {
  .site-nav__toggle svg { transition: none; }
}
@keyframes nav-panel-in { from { opacity: 0; transform: translateY(-4px); } }

/* A slim bar that slides down when you scroll back up, so the menu is never far away. */
.quickbar {
  position: fixed;
  inset: 0 0 auto;
  z-index: 25;
  background: var(--surface);
  border-bottom: 1px solid var(--rule);
  transform: translateY(-100%);
  visibility: hidden;
  transition: transform 240ms var(--ease-out), visibility 0s linear 240ms;
}
.quickbar.is-shown {
  transform: none;
  visibility: visible;
  transition: transform 240ms var(--ease-out), visibility 0s;
}
.quickbar__inner {
  max-width: var(--max);
  margin: 0 auto;
  min-height: 60px;
  padding: 8px var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.quickbar .brand { gap: 10px; }
.quickbar .brand__shield { height: 36px; }
.quickbar .brand__name { font-size: 1.125rem; }

html:has(.viewer[open]) { overflow: hidden; }

/* The Close button of the full-screen group photo. */
.menu__close {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 16px;
  font: 600 0.9375rem/1 var(--font-ui);
  color: var(--text);
  background: none;
  border: 1.5px solid currentColor;
  cursor: pointer;
}
.menu__close:active { transform: scale(0.97); }

/* Group photograph: full width, never cropped further, so nobody is cut out. */


/* The quartered field.
   Four quarters, coloured like the shield, with the cross drawn where they meet.
   Each quarter draws its own half of each arm in the opposite colour, so the
   cross is red on white and white on red, as on the arms. */

.quarters {
  --arm: clamp(8px, 1vw, 14px);
  --arm-v: 62%;
  --arm-h: min(38%, 15rem);
  --quarter-h: clamp(15rem, 27vw, 24rem);
  display: grid;
  /* Equal halves whatever the titles, so the cross stays centred and nothing pushes past the screen. */
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  /* Each row of two quarters shares its tracks (subgrid), so the partners' titles, descriptions
     and buttons line up whatever their length. Top row: title, description, space, button.
     Bottom row: space, title, description, button, so the text sits low and frames the cross
     from the outer corners. The top row ends, and the bottom row starts, with an empty track
     at the outer edge, so the two rows are built alike and come out the same height when their
     words do. */
  grid-template-rows:
    [top] auto auto minmax(0, 1fr) auto auto
    [bottom] auto minmax(0, 1fr) auto auto auto;
  min-height: calc(2 * var(--quarter-h));
}

.quarter {
  position: relative;
  display: grid;
  grid-template-rows: subgrid;
  justify-items: start;
  align-content: start;
  row-gap: 14px;
  padding: clamp(20px, 4.4vw, 68px);
}
.quarter--tl, .quarter--tr { grid-row: top / span 5; }
.quarter--bl, .quarter--br { grid-row: bottom / span 5; }
.quarter--tl .quarter__title, .quarter--tr .quarter__title { grid-row: 1; }
.quarter--tl p, .quarter--tr p { grid-row: 2; }
.quarter--tl .button, .quarter--tr .button { grid-row: 4; }
.quarter--bl .quarter__title, .quarter--br .quarter__title { grid-row: 3; }
.quarter--bl p, .quarter--br p { grid-row: 4; }
.quarter--bl .button, .quarter--br .button { grid-row: 5; }


.quarter--argent { background: var(--field-argent); color: var(--text); --cross: var(--gules); }
.quarter--gules { background: var(--gules); color: var(--on-gules); --cross: var(--field-argent); }

.quarter::before,
.quarter::after {
  content: "";
  position: absolute;
  background: var(--cross);
  pointer-events: none;
}
.quarter::before { width: var(--arm); height: var(--arm-v); }
.quarter::after { height: var(--arm); width: var(--arm-h); }

.quarter--tl::before, .quarter--tl::after { right: 0; bottom: 0; }
.quarter--tr::before, .quarter--tr::after { left: 0; bottom: 0; }
.quarter--bl::before, .quarter--bl::after { right: 0; top: 0; }
.quarter--br::before, .quarter--br::after { left: 0; top: 0; }

.quarter__title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.5rem, 0.9rem + 2.3vw, 3rem);
  line-height: 1.04;
  letter-spacing: -0.005em;
}

.quarter__title a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: transparent;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.16em;
  transition: text-decoration-color 200ms ease;
}
/* The whole quarter is the link target. */
.quarter__title a::after { content: ""; position: absolute; inset: 0; }
@media (hover: hover) and (pointer: fine) {
  .quarter__title a:hover { text-decoration-color: currentColor; }
}

.quarter p {
  margin: 0;
  max-width: 34ch;
  font-size: clamp(1rem, 0.9rem + 0.35vw, 1.1875rem);
  line-height: 1.5;
}
.quarter--argent p { color: var(--text-soft); }

/* Buttons. On red, the button is white with red text, and swaps on hover. */

.button {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  margin-top: 6px;
  padding: 0 22px;
  font: 600 0.9375rem/1.2 var(--font-ui);
  letter-spacing: 0.01em;
  text-decoration: none;
  white-space: nowrap;
  color: var(--argent);
  background: var(--gules);
  border: 2px solid var(--gules);
  transition: background-color 160ms ease, color 160ms ease, transform 160ms var(--ease-out);
}
.button:active { transform: scale(0.97); }
@media (hover: hover) and (pointer: fine) {
  .button:hover { background: transparent; color: var(--gules-ink); }
}

.quarter--gules .button { color: var(--gules); background: var(--argent); border-color: var(--argent); }
@media (hover: hover) and (pointer: fine) {
  .quarter--gules .button:hover { background: transparent; color: var(--argent); }
}

/* Footer: the site map, styled in the Part 2 block later in this file. */

@media (max-width: 640px) {
  .masthead--home .brand { gap: 10px; }
  .masthead--home .brand__shield { height: 44px; }
  .masthead--home .brand__name { font-size: 1.25rem; }

  .quarters { --arm-v: 58%; --arm-h: 46%; }
  .quarters { --quarter-h: 12.5rem; }
  .quarter { padding: 18px 18px 22px; row-gap: 10px; }
  .quarter--tr, .quarter--br { padding-left: calc(18px + var(--arm)); }
  .button { padding: 0 16px; }
}

/* The smallest phones (iPhone SE and similar): the quarter titles need a little more room. */
@media (max-width: 360px) {
  .quarter { padding: 16px 14px 20px; }
  .quarter--tr, .quarter--br { padding-left: calc(14px + var(--arm)); }
  .quarter__title { font-size: 1.375rem; }
}


/* ===================================================================
   Inner pages
   =================================================================== */

:root {
  --field-border: #6b7480;
  --placeholder-bg: #f0efec;
}

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* The heading every inner page opens with: white, below a rule, with the title in azure. */
.page-head {
  border-top: 1px solid var(--rule);
}
.page-head__inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(36px, 5.5vw, 80px) var(--gutter) clamp(36px, 5vw, 72px);
}
.page-head__back { margin: -10px 0 4px; font: 500 0.9375rem/1.4 var(--font-ui); }
.page-head__back a { display: inline-block; padding: 11px 0; line-height: 22px; color: var(--link); text-decoration: none; }
.page-head__back a::before { content: "\2190\00a0"; }
.page-head__back a:hover { text-decoration: underline; }
.page-head__title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.25rem, 1.4rem + 3.6vw, 4.5rem);
  line-height: 1.02;
  letter-spacing: -0.01em;
  color: var(--azure-ink);
}
.page-head__lede {
  margin: 16px 0 0;
  max-width: 52ch;
  font-size: clamp(1.0625rem, 1rem + 0.4vw, 1.25rem);
  line-height: 1.5;
  color: var(--text-soft);
}

/* In-page contents */
.jump { border-bottom: 1px solid var(--rule); }
.jump ul {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
  list-style: none;
  display: flex;
  gap: 28px;
  overflow-x: auto;
  scrollbar-width: none;
}
.jump a {
  display: block;
  padding: 16px 0;
  white-space: nowrap;
  font: 500 0.9375rem/1 var(--font-ui);
  color: var(--text);
  text-decoration: none;
}
@media (hover: hover) and (pointer: fine) {
  .jump a:hover { color: var(--link); text-decoration: underline; }
}

/* Sections */
.section { padding: clamp(48px, 6vw, 88px) 0; scroll-margin-top: 8px; }
.section + .section { border-top: 1px solid var(--rule); }
.section--flush-top { padding-top: clamp(32px, 4vw, 56px); }
.section__title {
  margin: 0 0 28px;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.75rem, 1.2rem + 1.8vw, 2.75rem);
  line-height: 1.08;
}
.section__lede {
  margin: -12px 0 32px;
  max-width: 60ch;
  font-size: 1.125rem;
  color: var(--text-soft);
}
.subsection__title {
  margin: 0 0 32px;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.625rem, 1.2rem + 1.2vw, 2.25rem);
}

.prose { max-width: 40rem; font-size: 1.0625rem; line-height: 1.7; }
.prose p { margin: 0 0 1em; }
.prose h3 { margin: 1.6em 0 0.4em; font: 400 1.5rem/1.2 var(--font-display); }
.prose > :last-child { margin-bottom: 0; }

.note { margin: 24px 0 0; font: 0.9375rem/1.5 var(--font-ui); color: var(--text-soft); }
.soft { color: var(--text-soft); }
.plain { list-style: none; margin: 0; padding: 0; }

/* Placeholders are meant to be seen. */
/* Something still to come, as visitors see it: quiet, so the page reads as finished. */
.soon { color: var(--text-soft); font-style: italic; font-weight: 400; }

/* The same, while editing (SHOW_TODOS=1): marked so it is easy to spot. */
.todo {
  font-family: var(--font-ui);
  font-size: 0.875em;
  font-weight: 500;
  padding: 0.1em 0.4em;
  background: color-mix(in srgb, #e8b931 30%, transparent);
  outline: 1px dashed currentColor;
  outline-offset: -1px;
}
.coming-soon {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 4 / 3;
  border: 1px solid var(--rule);
  background:
    repeating-linear-gradient(135deg, transparent 0 11px, color-mix(in srgb, var(--rule) 70%, transparent) 11px 12px),
    var(--placeholder-bg);
  color: var(--text-soft);
  font: 600 0.875rem/1.2 var(--font-ui);
  text-align: center;
}
.coming-soon span { background: var(--placeholder-bg); padding: 6px 10px; }
.coming-soon--wide { aspect-ratio: 21 / 9; }

.portrait { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 20%; }

/* The Rotation: the leadership, side by side, each a photo beside the role, name and a line
   about them, the whole of it a link to the profile. Stacked on smaller screens. */
.leaders {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px clamp(32px, 5vw, 80px);
}
.leader__link {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
  padding-top: 20px;
  border-top: 1px solid var(--rule);
  color: var(--text);
  text-decoration: none;
}
.leader__photo {
  position: relative;
  display: block;
  width: 160px;
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--placeholder-bg);
}
.leader__photo .initials, .leader__photo picture { position: absolute; inset: 0; }
.leader__photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; }
.leader__text { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; }
.leader__role { font: 600 0.8125rem/1.4 var(--font-ui); letter-spacing: 0.06em; text-transform: uppercase; color: var(--gules-ink); }
.leader__name { margin-top: 6px; font: 400 clamp(1.5rem, 1.25rem + 0.8vw, 1.875rem)/1.15 var(--font-display); }
.leader__summary { margin-top: 10px; max-width: 34rem; font: 1rem/1.55 var(--font-ui); color: var(--text-soft); }
.leader__more { margin-top: 12px; font: 600 0.9375rem/1.4 var(--font-ui); color: var(--link); }
@media (hover: hover) and (pointer: fine) {
  .leader__link:hover .leader__name, .leader__link:hover .leader__more { text-decoration: underline; text-underline-offset: 0.16em; }
}
@media (max-width: 900px) { .leaders { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 640px) {
  .leader__link { grid-template-columns: 96px minmax(0, 1fr); gap: 16px; }
  .leader__photo { width: 96px; }
  .leader__name { font-size: 1.375rem; }
  .leader__summary { font-size: 0.9375rem; }
}

/* A headshot that is still small (headshot_width in the profile) is shown no wider than it is. */
.profile__photo.profile__photo--small { max-width: var(--native); }
.profile__photo--small .portrait { aspect-ratio: auto; }

/* Facts: label and value pairs */
.facts { margin: 0 0 28px; display: grid; gap: 10px; }
.facts > div { display: grid; grid-template-columns: 10rem minmax(0, 1fr); gap: 16px; }
.facts dt { font: 500 0.9375rem/1.6 var(--font-ui); color: var(--text-soft); }
.facts dd { margin: 0; line-height: 1.55; }
.facts--compact > div { grid-template-columns: 7.5rem minmax(0, 1fr); }
.facts--wide { max-width: 64rem; margin: 0; }
.facts--wide > div { grid-template-columns: 12rem minmax(0, 1fr); padding: 6px 0; }

/* People grids */
.cards {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(150px, 40vw), 1fr));
  gap: 32px 20px;
}
.cards--wide { grid-template-columns: repeat(auto-fill, minmax(min(190px, 40vw), 1fr)); }
.card { display: flex; flex-direction: column; }
.card__link { display: block; color: var(--text); text-decoration: none; }
.card__photo {
  display: block;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: var(--placeholder-bg);
}
.card__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 22%;
  transition: transform 500ms var(--ease-out);
}
.card__name {
  display: block;
  margin-top: 10px;
  font-size: 1.0625rem;
  line-height: 1.3;
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 0.18em;
  transition: text-decoration-color 200ms ease;
}
@media (hover: hover) and (pointer: fine) {
  .card__link:hover img { transform: scale(1.03); }
}
.card__programme { display: block; margin-top: 2px; font: 600 0.875rem/1.35 var(--font-ui); color: var(--azure-ink); }
.card__badge, .card__role { margin-top: 3px; font: 600 0.875rem/1.35 var(--font-ui); color: var(--gules-ink); }
.card__detail { margin-top: 3px; font: 0.875rem/1.4 var(--font-ui); }
.card__detail--soft { color: var(--text-soft); margin-top: 1px; }

.initials {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  color: var(--link);
  font: 400 2.5rem/1 var(--font-display);
  letter-spacing: 0.04em;
}
.initials--large { aspect-ratio: 4 / 5; font-size: 5rem; background: var(--placeholder-bg); }

.grade-group + .grade-group { margin-top: 48px; }
.grade-group__title { margin: 0 0 18px; font: 400 1.5rem/1.2 var(--font-display); }

/* Prizes */
.prizes { margin-top: clamp(56px, 7vw, 96px); padding-top: clamp(40px, 5vw, 64px); border-top: 1px solid var(--rule); scroll-margin-top: 8px; }
.prizes__pair { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 5vw, 72px); }
.prize p { margin: 0 0 18px; max-width: 60ch; }
.prize__name { margin: 0 0 14px; font: 400 1.5rem/1.2 var(--font-display); }
.prize__namesake { font-family: var(--font-display); font-style: italic; font-size: 1.125rem; line-height: 1.45; color: var(--text-soft); }
.prize--roll { margin-top: 56px; }
.roll { list-style: none; margin: 8px 0 0; padding: 0; columns: 3 14rem; column-gap: 40px; }
.roll li { break-inside: avoid; padding: 7px 0; border-top: 1px solid var(--rule); }
.roll__year { display: inline-block; min-width: 3.25rem; font: 600 0.9375rem/1.4 var(--font-ui); color: var(--text-soft); }

/* Hospitals by area */
.areas { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px 48px; }
.area__title { margin: 0 0 10px; font: 400 1.375rem/1.2 var(--font-display); }
.area li { padding: 4px 0; }
.area p { margin: 0; }

/* The feature: the things you register for, under a red rule with a red title. */
.feature { padding: clamp(40px, 5vw, 72px) 0 0; }
.feature__inner { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px 48px; align-items: end; }
/* The rule spans the text column, not the page's side margins. */
.feature__inner::before { content: ""; grid-column: 1 / -1; height: 3px; margin-bottom: clamp(0px, 1vw, 12px); background: var(--gules-ink); }
.feature__title { margin: 0 0 20px; font: 400 clamp(1.75rem, 1.2rem + 2vw, 3rem)/1.08 var(--font-display); color: var(--gules-ink); }
.feature__text { margin: 0 0 24px; max-width: 54ch; font-size: 1.125rem; }
.feature .facts { margin: 0; }
.feature__support { margin: -8px 0 22px; font: 500 0.9375rem/1.4 var(--font-ui); color: var(--text-soft); }
.feature__support strong { color: var(--text); font-weight: 600; }
.plain-list { list-style: none; margin: 0; padding: 0; }
.plain-list li + li { margin-top: 4px; }
.section__lede.prose p { margin: 0 0 0.8em; }
.feature__note { margin: 0; font: 600 1rem var(--font-ui); color: var(--gules-ink); }
.feature__inner > .button { justify-self: start; }

.price-list { list-style: none; margin: 0; padding: 0; max-width: 52rem; }
.price-list li { display: flex; justify-content: space-between; align-items: baseline; gap: 24px; padding: 14px 0; border-bottom: 1px solid var(--rule); }
.price-list__label { font-size: 1.125rem; }
.price-list__price { font: 600 1rem var(--font-ui); white-space: nowrap; }

/* Long-read */
.longread { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter) clamp(56px, 7vw, 96px); }
.longread__section { padding: clamp(48px, 6vw, 80px) 0 0; }
.longread__title { margin: 0 0 22px; font: 400 clamp(1.75rem, 1.2rem + 1.8vw, 2.75rem)/1.1 var(--font-display); }
.longread__figure { margin: 28px 0 32px; }
.longread__figure img { width: 100%; height: auto; background: var(--placeholder-bg); }
.longread__figure figcaption { margin-top: 8px; max-width: 62ch; font: 0.9375rem/1.45 var(--font-ui); color: var(--text-soft); }
.longread__subtitle { margin: 44px 0 14px; font: 400 clamp(1.375rem, 1.1rem + 0.9vw, 1.75rem)/1.2 var(--font-display); }
.figure-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; align-items: start; }
/* Sources: folded away at the foot of a long read, a small muted line with a chevron that opens. */
.sources { margin: clamp(48px, 6vw, 72px) 0 0; padding-top: 14px; border-top: 1px solid var(--rule); max-width: 48rem; font: 0.8125rem/1.55 var(--font-ui); color: var(--text-soft); }
.sources__toggle { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; list-style: none; cursor: pointer; font-weight: 500; letter-spacing: 0.04em; text-transform: uppercase; }
.sources__toggle::-webkit-details-marker { display: none; }
.sources__toggle::after {
  content: ""; width: 6px; height: 6px; margin-top: -3px;
  border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg); transition: transform 200ms var(--ease-out);
}
.sources[open] > .sources__toggle::after { margin-top: 3px; transform: rotate(225deg); }
@media (hover: hover) and (pointer: fine) { .sources__toggle:hover { color: var(--text); } }
@media (prefers-reduced-motion: reduce) { .sources__toggle::after { transition: none; } }
.sources__list { margin: 4px 0 8px; padding-left: 1.1em; line-height: 1.7; }
.sources__list li + li { margin-top: 6px; }
.sources__list a { color: inherit; }
@media (max-width: 640px) {
  .figure-pair { grid-template-columns: minmax(0, 1fr); }
  .longread__subtitle { margin-top: 36px; }
}
.longread__more { margin: 20px 0 0; font: 0.9375rem var(--font-ui); }
/* On wide screens each row sits a passage beside the picture that belongs to it, the text at a
   comfortable reading width; a pair of pictures runs across the full width. On phones the
   picture follows its passage. */
.longread__text { max-width: 40rem; }
.longread__row + .longread__row, .figure-pair + .longread__row, .longread__row + .figure-pair { margin-top: 8px; }
@media (min-width: 1024px) {
  .longread__row {
    display: grid;
    grid-template-columns: minmax(0, 40rem) minmax(0, 1fr);
    column-gap: clamp(40px, 5vw, 88px);
    align-items: start;
  }
  .longread__row > .longread__figure { margin-top: 48px; }
  .longread__row > .timeline { margin-top: 0; }
  .figure-pair { margin-top: 12px; gap: 0 clamp(20px, 3vw, 40px); }
}

/* Pioneers: a profile for each, with a panel on what they left behind. */
.pioneers { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px clamp(24px, 3vw, 48px); margin-top: 8px; }
.pioneer { padding-top: 20px; border-top: 3px solid var(--azure-ink); }
.pioneer__name { margin: 0; font: 600 clamp(1.375rem, 1.1rem + 0.8vw, 1.75rem)/1.2 var(--font-display); color: var(--azure-ink); }
.pioneer__dates { margin: 4px 0 16px; font: 500 0.9375rem var(--font-ui); color: var(--text-soft); }
.pioneer__legacy { margin-top: 20px; padding: 4px 0 4px 18px; border-left: 3px solid var(--gules-ink); }
.pioneer__legacy p { margin: 0 0 6px; line-height: 1.55; }
.pioneer__label { font: 600 0.8125rem/1.4 var(--font-ui); letter-spacing: 0.06em; text-transform: uppercase; color: var(--gules-ink); }
.pioneer__work { font: 600 1.125rem/1.35 var(--font-ui); }
.pioneer__work cite { font-style: italic; }
@media (max-width: 760px) { .pioneers { grid-template-columns: minmax(0, 1fr); } }

/* RLHOTS years along an upright, each year crossing it like the arms of the shield's cross */
.timeline { --spine: 5rem; position: relative; list-style: none; margin: 32px 0 0; padding: 4px 0; }
.timeline::before { content: ""; position: absolute; top: 0; bottom: 0; left: var(--spine); width: 2px; background: var(--gules); }
.timeline__item { position: relative; display: grid; grid-template-columns: var(--spine) minmax(0, 1fr); column-gap: 28px; padding: 9px 0; }
.timeline__item::before { content: ""; position: absolute; left: calc(var(--spine) - 7px); top: calc(9px + 0.8em); width: 16px; height: 2px; background: var(--gules); }
.timeline__year { padding-right: 20px; text-align: right; font: 600 1rem/1.6 var(--font-ui); }
.timeline__text { line-height: 1.6; }

/* Gallery */
.gallery { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px 24px; }
.gallery figure { margin: 0; }
.gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.gallery figcaption { margin-top: 10px; font: 0.9375rem/1.4 var(--font-ui); color: var(--text-soft); }

/* Living in London */
/* Life on the rotation: the year's fixtures, each under a short red rule, then the Instagram link. */
.fixtures { list-style: none; margin: 8px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px clamp(20px, 3vw, 40px); }
.fixture { padding-top: 16px; border-top: 3px solid var(--gules-ink); }
.fixture p { margin: 0; line-height: 1.55; color: var(--text-soft); }
.follow { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin: 36px 0 0; }
.follow .button { margin-top: 0; }
.button--icon { gap: 10px; }
.button__icon { flex: none; }
.follow__handle { font: 0.9375rem/1.45 var(--font-ui); color: var(--text-soft); }
@media (max-width: 960px) { .fixtures { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .fixtures { grid-template-columns: minmax(0, 1fr); } }
.living__title { margin: 0 0 6px; font: 400 1.375rem/1.2 var(--font-display); }


/* Training resources */
.columns { list-style: none; margin: 0; padding: 0; columns: 2 20rem; column-gap: 56px; }
.columns li { break-inside: avoid; padding: 6px 0; line-height: 1.45; }
.link-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.link-list a { display: inline-block; padding: 9px 0; line-height: 26px; font-size: 1.1875rem; }
.link-list__note { display: block; margin-top: -6px; font: 0.9375rem/1.45 var(--font-ui); color: var(--text-soft); }

/* Profiles */
.profile {
  display: grid;
  grid-template-columns: minmax(0, 400px) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: start;
  padding-top: clamp(36px, 5vw, 64px);
  padding-bottom: 32px;
}
.profile .portrait { display: block; }
.advice { margin: 36px 0 0; padding-left: 0; }
.advice blockquote { margin: 0; font: 400 1.5rem/1.3 var(--font-display); max-width: 30ch; }
.advice blockquote p { margin: 0; }
.advice figcaption { margin-top: 10px; font: 0.875rem var(--font-ui); color: var(--text-soft); }
.link-row { list-style: none; margin: 24px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0 24px; font: 500 0.9375rem var(--font-ui); }
.link-row a { display: inline-block; padding: 11px 0; line-height: 22px; }

/* Contact and questions */
.contact { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 22rem); gap: clamp(32px, 6vw, 80px); align-items: start; }
.contact__card { grid-column: 2; grid-row: 1; }
.contact__faq { grid-column: 1; grid-row: 1; }
.faq { border-bottom: 1px solid var(--rule); }
.faq__item { border-top: 1px solid var(--rule); }
.faq__q {
  position: relative;
  padding: 18px 44px 18px 0;
  list-style: none;
  cursor: pointer;
  font-size: 1.1875rem;
  line-height: 1.4;
}
.faq__q::-webkit-details-marker { display: none; }
.faq__q::after {
  content: "";
  position: absolute;
  right: 8px;
  top: calc(18px + 0.7em - 7px);
  width: 14px;
  height: 14px;
  background:
    linear-gradient(currentColor, currentColor) center / 14px 2px no-repeat,
    linear-gradient(currentColor, currentColor) center / 2px 14px no-repeat;
  transition: transform 200ms var(--ease-out);
}
.faq__item[open] .faq__q::after { transform: rotate(45deg); }
.faq__a { padding: 0 44px 22px 0; max-width: 62ch; }
.faq__a p { margin: 0 0 0.8em; }
.contact__card { padding: 28px 32px 32px; border: 1px solid var(--rule); border-top: 3px solid var(--azure-ink); }
.contact__title { margin: 0 0 16px; font: 400 1.5rem var(--font-display); color: var(--azure-ink); }
.contact__card p { margin: 0 0 12px; line-height: 1.55; }
.contact__social { list-style: none; margin: 4px 0 0; padding: 0; }
.contact__social a { display: inline-flex; flex-direction: column; justify-content: center; min-height: 44px; padding: 6px 0; font: 600 1.0625rem/1.3 var(--font-ui); }
.contact__handle { font-weight: 400; font-size: 0.9375rem; color: var(--text-soft); }
.contact__card address { margin-top: 20px; font: normal 0.9375rem/1.6 var(--font-ui); color: var(--text-soft); }

/* Registration form */
.field { margin-bottom: 20px; }
.field label { display: block; margin-bottom: 6px; font: 600 0.9375rem/1.4 var(--font-ui); }
.field__optional { font-weight: 400; color: var(--text-soft); }
.field__hint { margin: -2px 0 8px; font: 0.875rem/1.4 var(--font-ui); color: var(--text-soft); }
.field__error { margin: 6px 0 0; font: 600 0.875rem/1.4 var(--font-ui); color: var(--gules-ink); }
.field input[type="text"], .field input[type="email"], .field select, .field textarea {
  width: 100%;
  padding: 12px 14px;
  font: 1rem/1.4 var(--font-ui);
  color: var(--text);
  background: var(--surface);
  border: 1.5px solid var(--field-border);
  border-radius: 0;
  appearance: none;
}
.field select {
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 20px) 55%, calc(100% - 15px) 55%;
  background-size: 5px 5px;
  background-repeat: no-repeat;
  padding-right: 40px;
}
.field textarea { resize: vertical; }
.field [aria-invalid="true"] { border-color: var(--gules-ink); border-width: 2px; }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { outline: 3px solid var(--link); outline-offset: 1px; }
.form__status { min-height: 1.5em; margin: 0 0 16px; font: 600 0.9375rem/1.5 var(--font-ui); }

/* Inner pages on small screens */
@media (max-width: 900px) {
  .profile, .contact { grid-template-columns: minmax(0, 1fr); }
  .contact__card, .contact__faq { grid-column: auto; grid-row: auto; }
  .profile__photo { max-width: 340px; }
  .areas { grid-template-columns: minmax(0, 1fr); }
  .prizes__pair { grid-template-columns: minmax(0, 1fr); }
  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .feature__inner { grid-template-columns: minmax(0, 1fr); align-items: start; }
}
@media (max-width: 560px) {
  .facts > div, .facts--compact > div, .facts--wide > div { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .gallery { grid-template-columns: minmax(0, 1fr); }
  .timeline { --spine: 3.5rem; }
  .timeline__item { column-gap: 20px; }
  .timeline__year { padding-right: 14px; }
}

/* ===================================================================
   Phones first: things that make the site easier to use on a phone
   =================================================================== */

.text-button {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0;
  font: 500 0.9375rem/1.2 var(--font-ui);
  color: var(--link);
  background: none;
  border: 0;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  cursor: pointer;
}

.viewer {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: #0b0f14;
  color: #eceae5;
}
.viewer[open] { display: flex; flex-direction: column; }
.viewer::backdrop { background: #0b0f14; }
.viewer__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 68px;
  padding: 12px var(--gutter);
}
.viewer__hint { margin: 0; font: 0.9375rem/1.4 var(--font-ui); color: #a3acb6; }
.viewer .menu__close { color: #eceae5; }
.viewer__scroller {
  flex: 1;
  min-height: 0;
  display: flex;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
.viewer__scroller picture { flex: none; height: 100%; }
.viewer__scroller img { height: 100%; width: auto; max-width: none; }
.viewer__scroller:focus-visible { outline: 3px solid #9cc0de; outline-offset: -3px; }

/* Home: an arrow says each panel is a link */
/* Inline, so the no-break space keeps the arrow on the same line as the last word. */
.quarter__arrow { display: inline; }
.quarter__short { display: none; }

/* Grade buttons above the trainees */
.chips ul { list-style: none; margin: 0 0 40px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 16px;
  border: 1.5px solid var(--field-border);
  color: var(--text);
  text-decoration: none;
  font: 600 0.9375rem/1 var(--font-ui);
  transition: background-color 160ms ease, color 160ms ease, border-color 160ms ease, transform 160ms var(--ease-out);
}
.chips a:active { transform: scale(0.97); }
@media (hover: hover) and (pointer: fine) {
  .chips a:hover { background: var(--azure); border-color: var(--azure); color: var(--argent); }
}


/* The RLH alumni list: name, then where they are now */
.roll--alumni { margin-top: 20px; }
.roll--alumni li { display: flex; flex-direction: column; padding: 9px 0; }
.roll__name { font: 600 1rem/1.35 var(--font-ui); }
.roll__now { font: 0.875rem/1.4 var(--font-ui); color: var(--text-soft); }

/* People photos: initials underneath while the photo loads */
.card__photo { position: relative; }
.card__photo .initials, .card__photo picture { position: absolute; inset: 0; }

/* Previous and next profile */
.pager {
  position: relative;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-top: 8px;
  padding-bottom: clamp(48px, 6vw, 80px);
}
.pager::before { content: ""; position: absolute; top: 0; left: var(--gutter); right: var(--gutter); border-top: 1px solid var(--rule); }
.pager__link { display: flex; flex-direction: column; gap: 2px; max-width: 48%; padding: 14px 0; color: var(--text); text-decoration: none; }
.pager__link--next { margin-left: auto; text-align: right; }
.pager__dir { font: 500 0.875rem/1.4 var(--font-ui); color: var(--text-soft); }
.pager__link--prev .pager__dir::before { content: "\2190\00a0"; }
.pager__link--next .pager__dir::after { content: "\00a0\2192"; }
.pager__name { font: 400 1.25rem/1.25 var(--font-display); }
@media (hover: hover) and (pointer: fine) {
  .pager__link:hover .pager__name { text-decoration: underline; text-underline-offset: 0.18em; }
}

/* Past meetings: tap a year to open it */
.archive { border-top: 1px solid var(--rule); }
.archive__item { border-bottom: 1px solid var(--rule); }
.archive__summary {
  display: grid;
  grid-template-columns: 5.5rem minmax(0, 1fr) 14px;
  align-items: center;
  gap: 16px;
  min-height: 44px;
  padding: 18px 0;
  list-style: none;
  cursor: pointer;
}
.archive__summary::-webkit-details-marker { display: none; }
.archive__summary::after {
  content: "";
  width: 14px;
  height: 14px;
  background:
    linear-gradient(currentColor, currentColor) center / 14px 2px no-repeat,
    linear-gradient(currentColor, currentColor) center / 2px 14px no-repeat;
  transition: transform 200ms var(--ease-out);
}
.archive__item[open] > .archive__summary::after { transform: rotate(45deg); }
.archive__year { font: 400 2rem/1 var(--font-display); }
.archive__where { font: 500 1.125rem/1.35 var(--font-text); }
.archive__body { padding: 0 0 28px calc(5.5rem + 16px); }
.archive__subhead { margin: 20px 0 8px; font: 600 0.9375rem var(--font-ui); }
.speakers { list-style: none; margin: 0; padding: 0; max-width: 60ch; }
.speakers li { padding: 4px 0; line-height: 1.45; }
.archive__item--cancelled {
  display: grid;
  grid-template-columns: 5.5rem minmax(0, 1fr);
  align-items: baseline;
  gap: 16px;
  padding: 16px 0;
}
.archive__item--cancelled .archive__year { font-size: 1.5rem; color: var(--text-soft); }
.archive__cancelled { font-style: italic; color: var(--text-soft); }

/* A single short note where photos will go: a quiet line, like any other "coming soon". */
.coming-soon--strip {
  display: block;
  aspect-ratio: auto;
  margin: 0 0 28px;
  padding: 0;
  border: 0;
  background: none;
  font: italic 400 1.0625rem/1.5 var(--font-text);
  text-align: left;
}

/* The section links fade at the edge while there is more to scroll to */
.jump ul.has-more-right, .site-nav__list.has-more-right { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 56px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 56px), transparent); }
.jump ul.has-more-left, .site-nav__list.has-more-left { -webkit-mask-image: linear-gradient(to right, transparent, #000 40px); mask-image: linear-gradient(to right, transparent, #000 40px); }
.jump ul.has-more-left.has-more-right, .site-nav__list.has-more-left.has-more-right {
  -webkit-mask-image: linear-gradient(to right, transparent, #000 40px, #000 calc(100% - 56px), transparent);
  mask-image: linear-gradient(to right, transparent, #000 40px, #000 calc(100% - 56px), transparent);
}


@media (max-width: 640px) {
  /* Shorter header and title band, so content starts sooner */
  .masthead__inner { padding-top: 10px; padding-bottom: 10px; gap: 12px; }
  .masthead:not(.masthead--home) .brand { gap: 10px; }
  .masthead:not(.masthead--home) .brand__shield { height: 40px; }
  .masthead:not(.masthead--home) .brand__name { font-size: 1.25rem; }
  .quickbar__inner { min-height: 56px; padding-top: 6px; padding-bottom: 6px; }
  .page-head__inner { padding-top: 20px; padding-bottom: 24px; }
  .page-head__title { font-size: clamp(1.875rem, 1.4rem + 2.4vw, 2.25rem); }
  .page-head__lede { margin-top: 8px; font-size: 1rem; line-height: 1.45; }
  .jump a { padding: 14px 0; line-height: 16px; }
  .section { padding: 40px 0; }
  .section__title { margin-bottom: 20px; }
  .feature { padding: 32px 0; }
  .feature__title { margin-bottom: 14px; }

  /* Home panels: a short line each, and the arrow stays with the title */
  .quarter__long { display: none; }
  .quarter .quarter__short { display: block; font-size: 0.9375rem; line-height: 1.35; }

  /* Three photos across, so the trainees take a third as much scrolling */
  .cards { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px 10px; }
  .cards--wide { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 14px; }
  .card__name { margin-top: 7px; font-size: 0.9375rem; hyphens: auto; }
  .initials { font-size: 1.75rem; }
  .chips ul { margin-bottom: 32px; }
  .grade-group + .grade-group { margin-top: 36px; }

  .archive__summary { grid-template-columns: 4rem minmax(0, 1fr) 14px; gap: 12px; padding: 16px 0; }
  .archive__year { font-size: 1.625rem; }
  .archive__body { padding-left: 0; }
  .archive__item--cancelled { grid-template-columns: 4rem minmax(0, 1fr); gap: 12px; }

  .pager__name { font-size: 1.0625rem; }

  .roll { columns: 2; column-gap: 20px; }
  .roll__year { min-width: 2.75rem; }

}
@media (max-width: 340px) {
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Hospitals: a card for each, with a photo, its website, its orthopaedic department and a map */
.hospital-group + .hospital-group { margin-top: clamp(32px, 4vw, 48px); }
.hospital-cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr)); gap: 28px 20px; }
.hospital-card { display: flex; flex-direction: column; }
.hospital-card img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; background: var(--placeholder-bg); }
.hospital-card__name { margin: 12px 0 0; font: 600 1.0625rem/1.3 var(--font-ui); }
.hospital-card__name a { color: var(--text); text-decoration-color: var(--rule); }
.hospital-card__place { margin: 2px 0 0; font: 0.9375rem/1.4 var(--font-ui); color: var(--text-soft); }
.hospital-card__links { display: flex; flex-wrap: wrap; gap: 0 20px; margin: 2px 0 0; }
.hospital-card__links a { display: inline-flex; align-items: center; min-height: 44px; font: 600 0.9375rem/1 var(--font-ui); }
@media (hover: hover) and (pointer: fine) {
  .hospital-card__name a:hover { text-decoration-color: currentColor; }
}
@media (max-width: 640px) {
  .hospital-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 12px; }
  .hospital-card__name { font-size: 0.9375rem; }
  .hospital-card__place, .hospital-card__links a { font-size: 0.875rem; }
  .hospital-card__links { gap: 0 14px; }
}
.button--quiet { color: var(--text); background: var(--surface); border-color: var(--field-border); white-space: normal; text-align: center; }
@media (hover: hover) and (pointer: fine) {
  .button--quiet:hover { color: var(--argent); background: var(--azure); border-color: var(--azure); }
}
.hospitals-link { margin-top: 28px; }

/* The Hospitals section of The Rotation: the Royal London, the map, journey times and the list */
.hospitals__subtitle { margin: 0 0 18px; font: 400 clamp(1.5rem, 1.1rem + 1.2vw, 2.125rem)/1.15 var(--font-display); }
.hospitals__part { margin-top: clamp(40px, 6vw, 72px); }
#hospitals .spotlight { margin-top: 0; }
#hospitals .hospitals__part:first-of-type { margin-top: 8px; }
#hospitals .photo-row { margin-top: 28px; }

/* The Royal London spotlight */
.spotlight { display: grid; grid-template-columns: minmax(0, 520px) minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); align-items: start; }
.spotlight__photo { margin: 0; }
.spotlight__photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; object-position: 50% 60%; }
.spotlight__photo figcaption { margin-top: 8px; font: 0.875rem var(--font-ui); color: var(--text-soft); }
.spotlight__facts { list-style: none; margin: 0; padding: 0; }
.spotlight__facts li { padding: 12px 0 12px 22px; border-top: 1px solid var(--rule); position: relative; line-height: 1.5; }
.spotlight__facts li:last-child { border-bottom: 1px solid var(--rule); }
.spotlight__facts li::before { content: ""; position: absolute; left: 0; top: calc(12px + 0.55em); width: 10px; height: 2px; background: var(--gules-ink); }
.spotlight__source { margin-left: 4px; font: 500 0.8125rem var(--font-ui); white-space: nowrap; }

/* The hospitals map */
.hospital-map { height: clamp(380px, 56vw, 620px); border: 1px solid var(--rule); background: var(--placeholder-bg); z-index: 0; }
.hospital-map .leaflet-tile-pane { filter: grayscale(0.85) contrast(0.95) brightness(1.04); }
.pin { border-radius: 50%; background: var(--azure); border: 2.5px solid #fff; box-shadow: 0 1px 4px rgb(0 0 0 / 0.35); }
.pin--main { background: var(--gules); }
.pin--other { background: #fff; border-color: var(--azure); }
.pin--home { background: #141b24; border-color: #e8b931; }
.pin-note { color: var(--text-soft); }

/* The key under the map, with each kind of pin drawn as on the map. */
.map-key { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 8px; font: 0.9375rem/1.45 var(--font-ui); max-width: 62rem; }
.map-key li { display: flex; align-items: flex-start; gap: 10px; }
.map-key .pin { flex: none; width: 16px; height: 16px; margin-top: 2px; }
.map-key .pin--main { width: 20px; height: 20px; margin-top: 0; }
.hospital-map .leaflet-popup-content { font: 0.9375rem/1.45 var(--font-ui); }
.hospital-map .leaflet-popup-content a { color: var(--azure); }
.map-hint { margin-top: 10px; }
.map-hint__touch { display: none; }
@media (pointer: coarse) { .map-hint__touch { display: inline; } }
@media (max-width: 640px) { .hospital-map { height: 440px; } }

/* Journey times */
.commute { max-width: 40rem; }
.commute__row { display: flex; gap: 10px; }
.commute__row input { flex: 1; min-width: 0; text-transform: uppercase; }
.commute__go { margin-top: 0; flex: none; color: var(--argent); background: var(--azure); border-color: var(--azure); }
@media (hover: hover) and (pointer: fine) {
  .commute__go:hover { color: var(--link); background: transparent; border-color: var(--link); }
}
.commute__status { margin-top: 12px; }
.journeys { list-style: none; margin: 8px 0 0; padding: 0; max-width: 52rem; border-top: 1px solid var(--rule); }
.journey {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  grid-template-areas: "name time route" "name miles route";
  align-items: center;
  gap: 0 18px;
  padding: 10px 0;
  border-bottom: 1px solid var(--rule);
}
.journey--main .journey__name { font-weight: 700; }
.journey__name { grid-area: name; line-height: 1.4; }
.journey__time { grid-area: time; font: 600 1rem var(--font-ui); text-align: right; }
.journey__miles { grid-area: miles; font: 0.8125rem var(--font-ui); color: var(--text-soft); text-align: right; }
.journey__route { grid-area: route; display: inline-flex; align-items: center; min-height: 44px; font: 600 0.875rem var(--font-ui); }

/* Research */
.research { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 48px; max-width: 72rem; }
.research__item { padding: 20px 0; border-top: 1px solid var(--rule); }
.research__title { margin: 0 0 8px; font: 400 1.375rem/1.25 var(--font-display); }
.research__title a { color: var(--text); text-decoration-color: color-mix(in srgb, currentColor 35%, transparent); }
.research__item p { margin: 0 0 6px; line-height: 1.55; }
.research__source { font: 500 0.875rem var(--font-ui); }
.research__source a { display: inline-block; padding: 10px 0; line-height: 24px; }

@media (max-width: 900px) {
  .spotlight { grid-template-columns: minmax(0, 1fr); }
  .research { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  .commute__row { flex-direction: column; }
  .commute__go { width: 100%; }
  .journey { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "name route" "time route" "miles route"; }
  .journey__time, .journey__miles { text-align: left; }
}

/* A row of photos with captions, such as The Ned */
.photo-row { list-style: none; margin: 32px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.photo-row figure { margin: 0; }
.photo-row img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.photo-row figcaption { margin-top: 8px; font: 0.9375rem/1.45 var(--font-ui); color: var(--text-soft); }
.photo-row--swipe { margin-bottom: 48px; }
/* Life in London: a wide skyline above the grid of photos */
.london-skyline { margin: 32px 0 0; }
.london-skyline img { width: 100%; aspect-ratio: 21 / 8; object-fit: cover; object-position: 50% 48%; }
.london-skyline figcaption { margin-top: 8px; font: 0.9375rem/1.45 var(--font-ui); color: var(--text-soft); }
.london-skyline + .photo-row { margin-top: 24px; }
@media (max-width: 640px) {
  .photo-row { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  /* A longer set of photos becomes a row you swipe through, with the next photo peeking in. */
  .photo-row--swipe {
    grid-auto-flow: column; grid-template-columns: none; grid-auto-columns: 82%; gap: 12px;
    overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scrollbar-width: none;
    margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); scroll-padding-inline: var(--gutter);
  }
  .photo-row--swipe::-webkit-scrollbar { display: none; }
  .photo-row--swipe li { scroll-snap-align: start; }
  .london-skyline img { aspect-ratio: 16 / 9; }
}
.speaker__name { font-weight: 600; }

/* Names in silver (the heraldic argent), with a soft glint when a mouse hovers over them.
   The colours stay dark enough to read throughout. */
:root {
  --metal: linear-gradient(180deg, #4a5868 0%, #1d2732 48%, #2e3a48 62%, #55636f 100%);
  --sheen: linear-gradient(105deg, transparent 42%, rgb(255 255 255 / 0.55) 50%, transparent 58%);
}
.card__name {
  font-weight: 560;
  text-decoration: none;
  background-image: var(--sheen), var(--metal);
  background-size: 260% 100%, 100% 100%;
  background-position: 135% 0, 0 0;
  background-repeat: no-repeat;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}
.card__name::selection { -webkit-text-fill-color: var(--text); }
/* A slow, soft glint, only when a mouse rests on the card. */
@media (prefers-reduced-motion: no-preference) and (hover: hover) and (pointer: fine) {
  .card__link:hover .card__name { animation: glint 2.4s ease-in-out both; }
}
@keyframes glint {
  from { background-position: 135% 0, 0 0; }
  to { background-position: -35% 0, 0 0; }
}
.card__linkedin { align-self: flex-start; display: inline-flex; align-items: center; min-height: 32px; font: 600 0.8125rem var(--font-ui); }

/* Small links inside captions and lists: a bigger area to tap, with no change to how they look. */
.spotlight__source {
  display: inline-block;
  padding: 12px 3px;
  margin: -12px -3px;
}
.research__title a { display: inline-block; padding: 8px 0; margin: -8px 0; }
/* A link on a line of its own, likewise. */
.link-line a, .longread__more a { display: inline-block; padding: 11px 0; margin: -11px 0; }

/* Headings: Mona Sans a little wide and semi-bold, with the letters drawn in slightly. */
.brand__name, .quarter__title, .page-head__title, .section__title, .subsection__title,
.prose h3, .initials, .grade-group__title, .prize__name, .area__title, .feature__title,
.longread__title, .longread__subtitle, .living__title, .guide__title, .contact__title, .register__event, .step__title,
.done__title, .pager__name, .archive__year, .hospitals__subtitle, .research__title, .pioneer__name, .leader__name {
  font-weight: 600;
  font-stretch: 110%;
  letter-spacing: -0.015em;
}
.advice blockquote { font-weight: 500; letter-spacing: -0.01em; }
.prize__namesake { font-family: var(--font-text); font-style: normal; }

/* Home: the opening photographs, taking turns, with the rotation's promise over them. */
.hero {
  position: relative;
  height: clamp(420px, 74vh, 780px);
  overflow: hidden;
  background: var(--placeholder-bg);
  color: #fff;
}
.hero__slides { position: absolute; inset: 0; }
/* Phones' one still photo, in place of the slides (below). */
.hero__still { display: none; position: absolute; inset: 0; margin: 0; }
.hero__slide::after, .hero__still::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(180deg, rgb(8 16 26 / 0) 40%, rgb(8 16 26 / 0.6) 100%),
    linear-gradient(90deg, rgb(8 16 26 / 0.35) 0%, rgb(8 16 26 / 0) 60%);
  pointer-events: none;
}
.hero__slide { position: absolute; inset: 0; margin: 0; opacity: 0; transition: opacity 1.4s ease; }
/* The current photo makes no layer of its own, so its caption sits above the
   headline; the hidden photos let taps through to it. */
.hero__slide.is-current { opacity: 1; }
.hero__slide:not(.is-current) { pointer-events: none; }
.hero__slide picture, .hero__still picture { height: 100%; }
.hero__slide img, .hero__still img, .hero__video {
  width: 100%;
  height: calc(100% + 120px);
  margin-top: -60px;
  object-fit: cover;
  transform: translate3d(0, var(--drift, 0px), 0);
}
/* A film lies over its poster and fades in once it is playing, so the poster shows until then. */
.hero__video {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.6s ease;
}
.hero__video.is-playing { opacity: 1; }
.hero__caption {
  position: absolute;
  right: var(--gutter);
  bottom: 16px;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 60%;
  font: 500 0.8125rem/1.35 var(--font-ui);
  text-align: right;
  text-shadow: 0 1px 6px rgb(0 0 0 / 0.5);
}
.hero__slide:not(.is-current) .hero__caption { visibility: hidden; }
.hero__text {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter) clamp(64px, 8vw, 112px);
  pointer-events: none;
}
.hero__title {
  margin: 0;
  max-width: 15ch;
  font: 600 clamp(2.25rem, 1.1rem + 4.6vw, 5.25rem)/1.02 var(--font-display);
  font-stretch: 112%;
  letter-spacing: -0.025em;
  text-shadow: 0 2px 24px rgb(0 0 0 / 0.35);
}
.hero__line {
  margin: 16px 0 0;
  font: 500 clamp(1rem, 0.9rem + 0.4vw, 1.25rem)/1.4 var(--font-ui);
  text-shadow: 0 1px 10px rgb(0 0 0 / 0.45);
}
.hero__pause {
  position: absolute;
  top: 16px;
  right: var(--gutter);
  z-index: 3;
  min-height: 36px;
  padding: 0 14px;
  font: 600 0.8125rem/1 var(--font-ui);
  color: #fff;
  background: rgb(8 16 26 / 0.45);
  border: 1px solid rgb(255 255 255 / 0.6);
  cursor: pointer;
}
.hero__pause:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
@media (max-width: 640px) {
  .hero { height: clamp(380px, 64vh, 560px); }
  .hero__slides, .hero__pause { display: none; }
  .hero__still { display: block; }
  /* A little more shade under the words, which sit over the bright river on this photo. */
  .hero__still::after {
    background:
      linear-gradient(180deg, rgb(8 16 26 / 0.1) 0%, rgb(8 16 26 / 0) 30%, rgb(8 16 26 / 0.7) 100%),
      linear-gradient(90deg, rgb(8 16 26 / 0.3) 0%, rgb(8 16 26 / 0) 70%);
  }
}

/* Home: the welcome, in the red of the shield, under the opening photographs. */
.welcome { background: var(--gules); color: var(--on-gules); }
.welcome__inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(64px, 9vw, 136px) var(--gutter);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(32px, 6vw, 96px);
  align-items: center;
}
.welcome__title {
  margin: 0;
  justify-self: center;
  max-width: 13ch;
  font: 600 clamp(2.25rem, 1rem + 3.6vw, 4.25rem)/1.04 var(--font-display);
  font-stretch: 112%;
  letter-spacing: -0.025em;
  text-wrap: balance;
  overflow-wrap: break-word;
}
.welcome__body { max-width: 34rem; font: 400 clamp(1.0625rem, 1rem + 0.3vw, 1.25rem)/1.6 var(--font-text); }
.welcome__body p { margin: 0 0 1.1em; }
.welcome__body a { color: inherit; text-decoration-thickness: 1px; }
.welcome__director { font-weight: 600; }
.welcome__more { margin-bottom: 0 !important; }
.welcome__more a {
  display: inline-block;
  padding: 10px 0;
  font: 600 1.0625rem/1.2 var(--font-ui);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.25em;
}
@media (hover: hover) { .welcome__body a:hover { text-decoration-thickness: 2px; } .welcome__more a:hover { text-decoration: none; } }
.welcome a:focus-visible { outline: 3px solid var(--on-gules); outline-offset: 3px; }
@media (max-width: 800px) {
  .welcome__inner { grid-template-columns: minmax(0, 1fr); padding-top: clamp(56px, 12vw, 80px); padding-bottom: clamp(56px, 12vw, 80px); }
  .welcome__title { justify-self: start; max-width: 16ch; font-size: clamp(1.875rem, 1.1rem + 3.6vw, 2.75rem); }
}

/* Home: the rotation's group photo, full width, with a button to see it full screen. */
.group-photo { padding: clamp(48px, 7vw, 104px) 0; }
.group-photo__figure { margin: 0; }
.group-photo__figure img { width: 100%; height: auto; background: var(--placeholder-bg); }
.group-photo__caption {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0 20px;
  margin-top: 8px;
  font: 0.9375rem/1.45 var(--font-ui);
  color: var(--text-soft);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; }
}

/* --- Part 2 (rotation/site-wide) --- */

/* The society's name at the top: two lines, breaking after "Hospital". On phones each line may
   wrap again, evenly. */
.brand__name { text-wrap: balance; }
.brand__part { display: block; white-space: nowrap; }
.masthead .brand__name { font-size: 1.375rem; line-height: 1.08; }
/* Sized so both lines fit beside the menu from 1440px wide. */
.masthead--home .brand__name { font-size: clamp(1.25rem, 3.5vw - 1.55rem, 1.75rem); }
@media (max-width: 640px) {
  .masthead .brand__name, .masthead:not(.masthead--home) .brand__name { font-size: clamp(1rem, 0.8rem + 1vw, 1.1875rem); line-height: 1.12; }
  .masthead--home .brand__shield { height: 48px; }
}
@media (max-width: 400px) {
  .brand__part { display: inline; white-space: normal; }
}

/* In the slim bar, the short name (RLHOTS) beside the arms, read out in full. */
.quickbar .brand__name--short { font-size: 1.125rem; letter-spacing: 0.02em; }
@media (max-width: 1279px) {
  .quickbar .brand__name--short { position: static; width: auto; height: auto; overflow: visible; clip: auto; }
}
@media (max-width: 479px) {
  .quickbar .brand__name--short { display: none; }
}

/* The section links stay pinned under the slim bar, marking the section you are in. site.js
   keeps the two heights up to date; these are their usual sizes. */
:root { --quickbar-h: 61px; --jump-h: 48px; }
@media (max-width: 640px) { :root { --quickbar-h: 57px; --jump-h: 45px; } }
.jump { position: sticky; top: var(--quickbar-h); z-index: 24; background: var(--surface); }
.jump a { transition: color 160ms var(--ease-out), box-shadow 160ms var(--ease-out); }
.jump a[aria-current="true"] { color: var(--azure-ink); box-shadow: inset 0 -2px 0 var(--gules-ink); }
/* A jump to a section lands with its heading clear of both bars. */
html:has(.jump) { scroll-padding-top: calc(var(--quickbar-h) + var(--jump-h) + 12px); }

/* The Rotation: the group photo under the opening paragraph, never cropped. */
.page-head__photo { margin: clamp(24px, 3vw, 40px) 0 0; }
.page-head__photo img { width: 100%; height: auto; background: var(--placeholder-bg); }
.archive__photo { margin: 4px 0 24px; }
.archive__photo img { width: 100%; height: auto; background: var(--placeholder-bg); }
.archive__photo figcaption { margin-top: 8px; font: 0.9375rem/1.45 var(--font-ui); color: var(--text-soft); }
.page-head__photo figcaption { margin-top: 8px; font: 0.9375rem/1.45 var(--font-ui); color: var(--text-soft); }

/* Prizes: past winners as a list, like Trainer of the Year. */
.prize__roll-title { margin: 0 0 4px; font: 600 0.9375rem/1.4 var(--font-ui); color: var(--text-soft); }
.roll--prize { columns: 2 11rem; margin: 0 0 28px; }

/* Hospitals: the photo on each card links to the hospital's page too. */
.hospital-card__photo { display: block; }

/* A hospital's own page */
.hospital-profile {
  display: grid;
  grid-template-columns: minmax(0, 560px) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 56px);
  align-items: start;
  padding-bottom: clamp(40px, 5vw, 72px);
}
.hospital-profile__photo { margin: 0; }
.hospital-profile__photo img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; background: var(--placeholder-bg); }
.hospital-profile .prose { margin-bottom: 28px; }
.hospital-profile__swap {
  margin: 0 0 24px;
  padding: 12px 16px;
  border-left: 3px solid var(--azure);
  font: 500 0.9375rem/1.5 var(--font-ui);
}
.hospital-profile .facts { margin-bottom: 0; }
.hospital-profile .link-row { margin-top: 20px; }
@media (max-width: 900px) {
  .hospital-profile { grid-template-columns: minmax(0, 1fr); }
}

/* Footer: the site map, the main pages in one row (two columns on phones), with the Register
   pages and social media in a quieter row beneath. */
.footer { border-top: 1px solid var(--rule); background: var(--surface); }
.footer__inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(32px, 4vw, 56px) var(--gutter) clamp(24px, 3vw, 36px);
}
.sitemap {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px clamp(20px, 2.6vw, 40px);
}
.sitemap a {
  display: inline-block;
  padding: 8px 0;
  font: 600 0.9375rem/1.35 var(--font-ui);
  color: var(--text);
  text-decoration: none;
}
.sitemap a:hover { color: var(--link); text-decoration: underline; }
.sitemap--minor { margin-top: 8px; }
.sitemap--minor a { font-weight: 400; font-size: 0.875rem; color: var(--text-soft); }
.footer__line {
  margin: clamp(28px, 3.5vw, 44px) 0 0;
  padding-top: 16px;
  border-top: 1px solid var(--rule);
  font: 0.8125rem/1.5 var(--font-ui);
  color: var(--text-soft);
}
.footer__line { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 24px; }
.footer__line a { display: inline-block; padding: 10px 0; margin: -10px 0; color: var(--text-soft); }
.footer__line a:hover { color: var(--link); }

/* Photo credits: a small picture of each photo beside its author and licence. */
.credits { padding-block: clamp(40px, 5vw, 72px); }
.credits__group + .credits__group { margin-top: clamp(40px, 5vw, 64px); }
.credits .subsection__title { margin-bottom: 20px; }
.credits__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr));
  gap: 20px 32px;
}
.credits__item { display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 14px; align-items: start; }
.credits__item picture { display: block; }
.credits__thumb { display: block; width: 88px; height: 66px; object-fit: cover; background: var(--placeholder-bg); }
.credits__text { font: 0.875rem/1.45 var(--font-ui); overflow-wrap: anywhere; }
.credits__text p { margin: 0; }
.credits__what { font-weight: 600; color: var(--text); }
.credits__on { color: var(--text-soft); }
@media (max-width: 640px) {
  .sitemap { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
  .sitemap a { padding: 10px 0; }
  .sitemap--minor { grid-template-columns: minmax(0, 1fr); margin-top: 12px; padding-top: 8px; border-top: 1px solid var(--rule); }
  .sitemap--minor a { padding: 8px 0; }
}

/* --- Part 2 (history/research/meeting/life) --- */

/* History: key dates at the top of the page, each year in red over a short rule. */
.keydates { padding: clamp(36px, 5vw, 64px) 0 0; }
.keydates__title { margin: 0 0 16px; font: 600 0.8125rem/1.4 var(--font-ui); letter-spacing: 0.06em; text-transform: uppercase; color: var(--gules-ink); }
.keydates__list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 12rem), 1fr)); gap: 18px clamp(20px, 2.5vw, 36px); }
@media (min-width: 760px) { .keydates__list { grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 64rem; } }
.keydates__list li { padding-top: 10px; border-top: 2px solid var(--azure-ink); font: 0.9375rem/1.45 var(--font-ui); color: var(--text-soft); }
.keydates__year { display: block; margin-bottom: 2px; font: 600 1.375rem/1.2 var(--font-display); font-stretch: 110%; color: var(--gules-ink); }

/* History: on wide screens every other passage puts its picture on the left, and pictures stay
   in view beside a long passage. */
.longread__intro { margin: 0 0 28px; max-width: 40rem; font-size: 1.0625rem; line-height: 1.6; color: var(--text-soft); }
@media (min-width: 1024px) {
  .longread__row--flip { grid-template-columns: minmax(0, 1fr) minmax(0, 40rem); }
  .longread__row--flip > .longread__text { grid-column: 2; grid-row: 1; }
  .longread__row--flip > .longread__figure { grid-column: 1; grid-row: 1; }
  .longread__row > .longread__figure { position: sticky; top: calc(var(--quickbar-h, 61px) + var(--jump-h, 48px) + 16px); }
  .longread__row > .pullfacts { margin-top: 6px; }
}

/* A few facts pulled out beside a passage. */
.pullfacts { margin: 28px 0 0; padding: 4px 0 4px 20px; border-left: 3px solid var(--gules-ink); max-width: 30rem; }
.pullfacts__item { margin: 0; padding: 12px 0; line-height: 1.5; }
.pullfacts__item + .pullfacts__item { border-top: 1px solid var(--rule); }
.pullfacts__figure { display: block; font: 600 1.75rem/1.1 var(--font-display); font-stretch: 110%; color: var(--azure-ink); }

/* Pioneers: a card for each, opening their page. Initials stand in for a portrait we may not use. */
.pioneer-cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(190px, 42vw), 1fr)); gap: 32px clamp(16px, 2vw, 24px); }
.pioneer-card__link { display: block; color: var(--text); text-decoration: none; }
.pioneer-card__photo { display: block; aspect-ratio: 4 / 5; overflow: hidden; background: var(--placeholder-bg); }
.pioneer-card__photo picture { display: block; height: 100%; }
.pioneer-card__photo img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 15%; transition: transform 500ms var(--ease-out); }
.pioneer-card__name { display: block; margin-top: 10px; font: 600 1.0625rem/1.3 var(--font-ui); text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 0.18em; transition: text-decoration-color 200ms ease; }
.pioneer-card__dates { display: block; margin-top: 2px; font: 0.875rem/1.4 var(--font-ui); color: var(--text-soft); }
@media (hover: hover) and (pointer: fine) {
  .pioneer-card__link:hover img { transform: scale(1.03); }
  .pioneer-card__link:hover .pioneer-card__name { text-decoration-color: currentColor; }
}
.monogram {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  background: var(--argent);
  border: 1px solid var(--rule);
  box-shadow: inset 0 0 0 6px var(--argent), inset 0 0 0 7px var(--rule);
  color: var(--azure-ink);
  font: 600 clamp(1.75rem, 1.2rem + 1.6vw, 2.5rem)/1 var(--font-display);
  font-stretch: 110%;
  letter-spacing: 0.06em;
}
.monogram__first { color: var(--gules-ink); }
.pioneer-card__photo img.is-archive, .pioneer-page__portrait img.is-archive { filter: grayscale(1); }
.monogram--large { aspect-ratio: 4 / 5; font-size: clamp(3rem, 2rem + 4vw, 5rem); }

/* A pioneer's page */
.pioneer-page__portrait { margin: 0; }
.pioneer-page__portrait picture { display: block; }
.pioneer-page__tagline { margin: 0 0 18px; font: 600 1.125rem/1.4 var(--font-ui); color: var(--azure-ink); }
.pioneer-page .pioneer__legacy { margin-top: 28px; max-width: 40rem; }
.pioneer-page__prize { margin-top: 24px; font: 500 0.9375rem var(--font-ui); }
.pioneer-page__figure { max-width: 240px; margin-top: 36px; }
@media (max-width: 900px) { .pioneer-page .profile__photo { max-width: 300px; } }

/* Research and education: the teaching dates and the careers evening */
.edu-block { margin-top: clamp(40px, 5vw, 64px); padding-top: clamp(28px, 3.5vw, 40px); border-top: 1px solid var(--rule); }
.edu-block .subsection__title { margin-bottom: 10px; }
.edu-block__note { margin: 0 0 20px; }
.edu-block__facts { max-width: 40rem; }
/* The teaching dates as a year line. On phones and tablets the days run down a thin upright, one
   to a row; on wide screens they sit along a thin rule across the year, each at its place in it,
   with the months marked above the rule and the careers evening above them. Teaching days are
   blue dots, leave hollow, the careers evening a blue diamond, and the next teaching day red. */
.yearline { --mark: 11px; margin-top: 8px; font-family: var(--font-ui); }
.yearline__months { display: none; }
.yearline__days { position: relative; list-style: none; margin: 0; padding: 0; max-width: 32rem; }
.yearline__days::before { content: ""; position: absolute; left: calc(var(--mark) / 2 - 0.5px); top: 18px; bottom: 18px; width: 1px; background: var(--azure-ink); }
.yearline__day { position: relative; padding: 9px 0 9px 32px; }
.yearline__mark { position: absolute; left: 0; top: calc(9px + 0.75em - var(--mark) / 2); width: var(--mark); height: var(--mark); border-radius: 50%; background: var(--azure-ink); }
.yearline__day--leave .yearline__mark { background: var(--surface); border: 1.5px solid var(--text-soft); }
.yearline__day--careers .yearline__mark { border-radius: 0; transform: rotate(45deg) scale(0.9); }
.yearline__day.is-next .yearline__mark { background: var(--gules); box-shadow: 0 0 0 3px var(--surface), 0 0 0 4px var(--gules); }
.yearline__label { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 12px; font: 500 1rem/1.5 var(--font-ui); }
.yearline__short { display: none; }
.yearline__note { font-size: 0.875rem; color: var(--text-soft); }
.yearline__day--leave { color: var(--text-soft); }
.yearline__day--leave .yearline__label { font-weight: 400; }
.yearline__day--leave .yearline__note { font-style: italic; }
.yearline__day--careers .yearline__note { font-weight: 500; color: var(--link); }
.yearline__day.is-next { color: var(--gules-ink); font-weight: 600; }
.yearline__day.is-next .yearline__label { font-weight: 600; }
.yearline__day.is-next .yearline__note { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--gules-ink); }
a.yearline__note { display: inline-block; padding: 8px 0; margin: -8px 0; }

@media (min-width: 1120px) {
  .yearline { --axis: 5rem; --inset: 2.75rem; position: relative; height: 11rem; margin-top: 20px; }
  .yearline__months, .yearline__days { position: absolute; top: 0; bottom: 0; left: var(--inset); right: var(--inset); max-width: none; }
  .yearline__days::before { left: calc(var(--inset) * -1); right: calc(var(--inset) * -1); top: var(--axis); bottom: auto; width: auto; height: 1px; }
  .yearline__months { display: block; list-style: none; margin: 0; padding: 0; }
  .yearline__months li {
    position: absolute; left: calc(var(--pos) * 100%); top: calc(var(--axis) - 1.25rem); height: 1.25rem;
    padding: 1px 0 0 6px; border-left: 1px solid var(--rule);
    font: 500 0.6875rem/1 var(--font-ui); letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-soft);
  }
  .yearline__day { position: absolute; left: calc(var(--pos) * 100%); top: var(--axis); width: 0; height: 0; padding: 0; }
  .yearline__mark { left: calc(var(--mark) / -2); top: calc(var(--mark) / -2); }
  .yearline__day--leave .yearline__mark { background: var(--surface); }
  .yearline__label {
    position: absolute; top: 16px; left: 0; width: 4.75rem; transform: translateX(-50%);
    display: block; text-align: center; font-size: 0.9375rem; line-height: 1.3;
  }
  .yearline__label time, .yearline__note { display: block; }
  .yearline__short { display: inline; }
  .yearline__long { display: none; }
  .yearline__note { margin-top: 3px; font-size: 0.8125rem; line-height: 1.3; }
  .yearline__extra { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .yearline__day.is-next .yearline__note { font-size: 0.6875rem; }
  /* The careers evening sits above the rule and the months. */
  .yearline__day--careers .yearline__label { top: auto; bottom: calc(1.25rem + 10px); width: 10rem; display: flex; flex-direction: column-reverse; align-items: center; }
  .yearline__day--careers .yearline__note { margin: 0 0 2px; line-height: 1.25; }
  .yearline__day--careers time { font-size: 0.8125rem; font-weight: 400; color: var(--text-soft); }
  a.yearline__note { padding: 4px 0; margin: 0; }
}

/* Annual Meeting: sponsors, by level. Empty slots are quiet outlines until a logo is added. */
.sponsor-level + .sponsor-level { margin-top: 32px; }
.sponsor-level__title { margin: 0 0 12px; font: 600 0.8125rem/1.4 var(--font-ui); letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-soft); }
.sponsor-level--platinum .sponsor-level__title { color: var(--gules-ink); }
.sponsor-slots { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.sponsor-level--platinum .sponsor-slots { grid-template-columns: minmax(0, 40rem); }
.sponsor-level--gold .sponsor-slots { grid-template-columns: repeat(auto-fill, minmax(min(100%, 14rem), 1fr)); max-width: 52rem; }
.sponsor-level--supporter .sponsor-slots { grid-template-columns: repeat(auto-fill, minmax(min(100%, 10rem), 1fr)); max-width: 52rem; }
.sponsor-slot { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 16px; text-align: center; aspect-ratio: 3 / 1; border: 1px solid var(--rule); background: var(--surface); }
.sponsor-level--platinum .sponsor-slot { aspect-ratio: 16 / 5; border-top: 3px solid var(--gules-ink); }
.sponsor-level--supporter .sponsor-slot { aspect-ratio: 2 / 1; }
.sponsor-slot--open { border-style: dashed; font: 500 0.9375rem/1.35 var(--font-ui); color: var(--text-soft); }
.sponsor-level--platinum .sponsor-slot--open { border-top-style: solid; font-size: 1.0625rem; }
.sponsor-slot__soon { font: italic 400 0.8125rem/1.3 var(--font-ui); }
.sponsor-slot img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
.sponsor-slot a { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; }
.sponsor-slot__name { font: 600 1.0625rem/1.3 var(--font-ui); color: var(--text); }
.sponsor-invite { margin-top: 28px; }
@media (max-width: 560px) {
  .sponsor-slot, .sponsor-level--platinum .sponsor-slot, .sponsor-level--supporter .sponsor-slot { aspect-ratio: auto; min-height: 88px; padding: 12px; }
  .sponsor-level--platinum .sponsor-slot { min-height: 140px; }
  .sponsor-level--gold .sponsor-slots, .sponsor-level--supporter .sponsor-slots { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .sponsor-level--gold .sponsor-slot--open, .sponsor-level--supporter .sponsor-slot--open { font-size: 0.875rem; }
}

/* Life in London: the Living in London guide, a heading and a short paragraph for each theme,
   in two columns under thin rules (one column on phones). */
.guide { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(32px, 4vw, 52px) clamp(32px, 5vw, 80px); }
.guide__item { min-width: 0; padding-top: 18px; border-top: 1px solid var(--rule); }
.guide__title { margin: 0 0 10px; font: 400 1.375rem/1.2 var(--font-display); }
.guide__text { max-width: 38rem; font-size: 1.0625rem; line-height: 1.65; }
.guide__text p { margin: 0; }
.guide__text p + p { margin-top: 0.8em; }
.guide__text a { text-decoration-color: color-mix(in srgb, currentColor 40%, transparent); }
@media (max-width: 760px) { .guide { grid-template-columns: minmax(0, 1fr); } }
.fixtures { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 760px) { .fixtures { grid-template-columns: minmax(0, 1fr); } }
.quotes { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px clamp(32px, 4vw, 64px); max-width: 1040px; }
.quote figure { margin: 0; padding-top: 18px; border-top: 3px solid var(--azure-ink); }
.quote__text { margin: 0; font: 400 1.125rem/1.55 var(--font-text); }
.quote__text p { margin: 0; }
.quote__text p::before { content: "\201C"; }
.quote__text p::after { content: "\201D"; }
.quote__who { margin-top: 14px; font: 600 0.9375rem/1.4 var(--font-ui); }
.quote__who a { display: inline-block; padding: 4px 0; }
.quote__grade { display: block; font-weight: 400; color: var(--text-soft); }
@media (max-width: 900px) { .quotes { grid-template-columns: minmax(0, 1fr); max-width: 40rem; } }

/* --- Filmstrip gallery --- */
/* Life in London, "The rotation together": one photo at a time, the next and previous peeking in
   at the sides. Native sideways scrolling with snap points, so it swipes on phones and trackpads;
   filmstrip.js adds the arrows, the counter and the dimming of the photos at the sides. */
.filmstrip {
  --slide-w: min(80cqi, 52rem);
  --slide-gap: clamp(12px, 2cqi, 24px);
  position: relative;
  container-type: inline-size;
}
.filmstrip__track {
  position: relative;
  list-style: none;
  margin: 0;
  padding: 0 calc((100cqi - var(--slide-w)) / 2) 12px;
  display: flex;
  gap: var(--slide-gap);
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: calc((100cqi - var(--slide-w)) / 2);
  scrollbar-width: thin;
  scrollbar-color: var(--rule) transparent;
}
.filmstrip__track:focus-visible { outline: 2px solid var(--link); outline-offset: 4px; }
.filmstrip__slide {
  flex: 0 0 var(--slide-w);
  scroll-snap-align: center;
  scroll-snap-stop: always;
}
.filmstrip__slide figure { margin: 0; }
.filmstrip__slide picture { display: block; }
.filmstrip__slide img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: var(--pos, 50% 30%);
  background: var(--surface);
}
.filmstrip__slide--contain img { object-fit: contain; }
/* On a short screen (a laptop) the photo, its caption and the arrows fit below the menu bars: the
   photo gets shorter, trimmed top and bottom about its position (or shrunk whole for fit: contain). */
.filmstrip__slide img { max-height: max(260px, calc(100svh - 250px)); }
.filmstrip__slide figcaption {
  margin-top: 12px;
  font: 0.9375rem/1.4 var(--font-ui);
  color: var(--text-soft);
  text-align: center;
}

/* With the script: the scrollbar gives way to the arrows and counter, and the side photos dim. */
.filmstrip.is-ready .filmstrip__track { scrollbar-width: none; padding-bottom: 0; }
.filmstrip.is-ready .filmstrip__track::-webkit-scrollbar { display: none; }
.filmstrip.is-ready .filmstrip__slide { opacity: 0.55; cursor: pointer; transition: opacity 0.4s var(--ease-out); }
.filmstrip.is-ready .filmstrip__slide figcaption { opacity: 0; transition: opacity 0.4s var(--ease-out); }
.filmstrip.is-ready .filmstrip__slide.is-current { opacity: 1; cursor: auto; }
.filmstrip.is-ready .filmstrip__slide.is-current figcaption { opacity: 1; }

.filmstrip__controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 14px;
}
.filmstrip__controls[hidden] { display: none; }
.filmstrip__count {
  margin: 0;
  min-width: 4.5em;
  text-align: center;
  font: 500 0.875rem/1 var(--font-ui);
  letter-spacing: 0.08em;
  font-variant-numeric: tabular-nums;
  color: var(--azure-ink);
}
.filmstrip__arrow {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--rule);
  border-radius: 50%;
  background: var(--surface);
  color: var(--azure-ink);
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
}
.filmstrip__arrow:hover,
.filmstrip__arrow:focus-visible { color: var(--gules-ink); border-color: var(--gules-ink); }
.filmstrip__arrow:focus-visible { outline: 2px solid var(--gules-ink); outline-offset: 3px; }
.filmstrip__arrow[aria-disabled="true"] { opacity: 0.35; cursor: default; color: var(--azure-ink); border-color: var(--rule); }

/* Wider screens: the arrows sit over the edges of the current photo, at its middle. */
@media (min-width: 720px) {
  .filmstrip__arrow {
    position: absolute;
    top: calc(var(--slide-w) * 0.375);
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    box-shadow: 0 1px 6px rgb(20 27 36 / 0.12);
  }
  .filmstrip__arrow--prev { left: calc((100cqi - var(--slide-w)) / 2 - 24px); }
  .filmstrip__arrow--next { right: calc((100cqi - var(--slide-w)) / 2 - 24px); }
}

/* Phones: the strip runs to the edges of the screen, so the side photos show a little more. */
@media (max-width: 719px) {
  .filmstrip { --slide-w: 82cqi; margin-inline: calc(-1 * var(--gutter)); }
}

@media (prefers-reduced-motion: reduce) {
  .filmstrip.is-ready .filmstrip__slide,
  .filmstrip.is-ready .filmstrip__slide figcaption,
  .filmstrip__arrow { transition: none; }
}

/* --- Registration form preview (form_preview in events.yaml) --- */
.button--ghost { color: var(--gules-ink); background: transparent; white-space: normal; text-align: center; }
@media (hover: hover) and (pointer: fine) {
  .button--ghost:hover { background: var(--gules); color: var(--argent); }
}

/* ===================================================================
   Registration (register.njk) and the thanks page (register-thanks.njk).
   The Register buttons open the form in its own tab: a shorter title band,
   then the form in numbered steps, with the event and chosen ticket in a
   summary beside it on wide screens and above it on narrow ones.
   =================================================================== */
.page-register .page-head__inner { padding-top: clamp(20px, 3vw, 40px); padding-bottom: clamp(20px, 2.5vw, 32px); }
.page-register .page-head__title { font-size: clamp(1.875rem, 1.3rem + 2.2vw, 3rem); line-height: 1.08; }
.register-page { padding-bottom: clamp(56px, 7vw, 96px); }
.register-page [hidden] { display: none !important; }

.register__preview {
  max-width: 40rem;
  margin: 0 0 24px;
  padding: 12px 16px;
  border: 1px solid var(--rule);
  border-left: 3px solid var(--gules);
  font: 0.9375rem/1.5 var(--font-ui);
}

.register { display: grid; grid-template-columns: minmax(0, 40rem); gap: 32px; align-items: start; }

/* The summary: the event, and (on wide screens) the chosen ticket and its price. */
.register__summary { padding: 16px 18px; border: 1px solid var(--rule); border-top: 2px solid var(--azure); background: var(--surface); }
.register__event { margin: 0 0 10px; font: 600 1.1875rem/1.25 var(--font-display); color: var(--text); }
.register__facts { margin: 0; font: 0.9375rem/1.45 var(--font-ui); }
.register__facts > div { display: grid; grid-template-columns: 4.25rem minmax(0, 1fr); gap: 12px; padding: 7px 0; border-top: 1px solid var(--rule); }
.register__facts dt { color: var(--text-soft); }
.register__facts dd { margin: 0; }
.register__choice { display: none; }
.register__choice-head { margin: 0 0 4px; font: 500 0.8125rem/1.4 var(--font-ui); letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-soft); }
.register__choice-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; align-items: baseline; margin: 0; font: 600 1rem/1.4 var(--font-ui); }
.register__choice-price { font-size: 1.125rem; color: var(--azure-ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
.register__choice-price.is-soon, .form__total-price.is-soon { font-size: 0.9375rem; font-weight: 400; font-style: italic; color: var(--text-soft); }
.register__choice:not(.is-chosen) .register__choice-row { font-weight: 400; font-style: italic; color: var(--text-soft); }

@media (min-width: 1024px) {
  .register { grid-template-columns: minmax(0, 40rem) minmax(16rem, 22rem); column-gap: clamp(40px, 5vw, 88px); }
  .register__summary { grid-column: 2; grid-row: 1; position: sticky; top: calc(var(--quickbar-h) + 24px); padding: 22px 24px 24px; }
  .register__form, .register__closed { grid-column: 1; grid-row: 1; }
  .register__event { font-size: 1.375rem; margin-bottom: 14px; }
  .register__facts > div { grid-template-columns: 4.5rem minmax(0, 1fr); padding: 9px 0; }
  .register__choice { display: block; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--azure); }
  .register--closed { grid-template-columns: minmax(0, 40rem) minmax(16rem, 22rem); }
}

/* The steps, numbered in order of those showing (Extras only appears for tickets that need it). */
.register__form { counter-reset: step; }
.step { counter-increment: step; padding: 28px 0 8px; border-top: 1px solid var(--rule); }
.step:first-of-type { padding-top: 0; border-top: 0; }
.step__title { display: flex; align-items: center; gap: 12px; margin: 0 0 18px; font: 600 1.25rem/1.2 var(--font-display); color: var(--azure-ink); }
.step__title::before {
  content: counter(step);
  flex: none;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1.5px solid var(--azure);
  border-radius: 50%;
  font: 600 0.875rem/1 var(--font-ui);
  letter-spacing: 0;
}
.form__group { margin: 0; padding: 0; border: 0; min-width: 0; }
.form__trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Tickets: a full-width card for each, the price on the right. */
.tickets { display: grid; gap: 10px; }
.ticket {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  min-height: 56px;
  padding: 12px 18px;
  border: 1px solid var(--field-border);
  background: var(--surface);
  font: 500 1rem/1.35 var(--font-ui);
  cursor: pointer;
  transition: border-color 160ms ease, background-color 160ms ease, box-shadow 160ms ease;
}
.ticket input { width: 20px; height: 20px; margin: 0; accent-color: var(--azure); cursor: pointer; }
.ticket__price { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; text-align: right; }
.ticket:has(input:checked) { border-color: var(--azure); box-shadow: inset 0 0 0 1px var(--azure); background: color-mix(in srgb, var(--scroll) 16%, var(--argent)); }
.ticket:has(input:checked) .ticket__price { color: var(--azure-ink); }
.ticket:has(input:focus-visible) { outline: 2px solid var(--azure); outline-offset: 2px; }
.ticket input:focus-visible { outline: none; }
@media (hover: hover) and (pointer: fine) {
  .ticket:hover { border-color: var(--azure); }
}
@media (max-width: 400px) {
  .ticket { grid-template-columns: 20px minmax(0, 1fr); row-gap: 2px; }
  .ticket input { grid-row: 1 / span 2; }
  .ticket__price { grid-column: 2; text-align: left; font-size: 0.9375rem; }
}
#ticket-group.is-invalid .ticket:not(:has(input:checked)) { border-color: var(--gules-ink); }
#ticket-group .field__error { margin-top: 10px; }

/* Fields: labels above, full width, 48px high. */
.register__form .form__row { display: grid; grid-template-columns: minmax(0, 1fr); column-gap: 16px; }
@media (min-width: 600px) {
  .register__form .form__row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.register__form .field { margin-bottom: 20px; }
.register__form .field label { margin-bottom: 6px; }
.register__form .field__hint { margin: -2px 0 8px; }
.register__form .field input[type="text"], .register__form .field input[type="email"], .register__form .field select {
  height: 48px;
  padding: 0 14px;
  border-width: 1px;
}
.register__form .field textarea { min-height: 96px; padding: 12px 14px; border-width: 1px; }
.register__form .field select {
  padding-right: 44px;
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23124769' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 16px center / 12px 8px;
  cursor: pointer;
}
.register__form .field select:has(option[value=""]:checked) { color: var(--text-soft); }
.register__form .field input:focus-visible, .register__form .field select:focus-visible, .register__form .field textarea:focus-visible {
  border-color: var(--azure);
  outline: 2px solid var(--azure);
  outline-offset: 2px;
}
.register__form .field [aria-invalid="true"] { border-width: 1px; border-color: var(--gules-ink); box-shadow: inset 0 0 0 1px var(--gules-ink); }

/* Consent: a proper-sized box, its words beside it. */
.field--check { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 4px 12px; align-items: start; }
.field--check input { width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--azure); cursor: pointer; }
.register__form .field--check label { margin: 0; font: 400 1rem/1.5 var(--font-text); cursor: pointer; }
.field--check .field__error { grid-column: 2; }
.form__privacy { margin: 0 0 24px; font: 0.875rem/1.5 var(--font-ui); color: var(--text-soft); }

/* The chosen ticket again, just above the button (narrow screens; wide ones have the summary). */
.form__total { padding: 12px 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.form__total-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 16px; align-items: baseline; margin: 0; font: 600 1rem/1.4 var(--font-ui); }
.form__total-label { grid-column: 1 / -1; font: 500 0.8125rem/1.4 var(--font-ui); letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-soft); }
.form__total-price { font-size: 1.125rem; color: var(--azure-ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
.form__total:not(.is-chosen) [data-summary="label"] { font-weight: 400; font-style: italic; color: var(--text-soft); }
@media (min-width: 1024px) {
  .form__total { display: none; }
}
.form__note { margin: 14px 0 20px; font: 0.9375rem/1.5 var(--font-ui); color: var(--text-soft); }

.form__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 20px; }
.form__submit { min-height: 52px; margin-top: 0; padding: 0 36px; font-size: 1rem; cursor: pointer; }
.form__submit:disabled { opacity: 0.6; cursor: progress; }
.form__preview-note { margin: 0; font: 0.875rem/1.4 var(--font-ui); color: var(--text-soft); }
.register__form .form__status { min-height: 0; margin: 16px 0 0; padding: 12px 16px; border: 1px solid var(--rule); border-left: 3px solid var(--azure); font: 500 0.9375rem/1.5 var(--font-ui); }
.register__form .form__status:empty { display: none; }

.register__closed { padding: 20px 0; border-top: 1px solid var(--rule); }

@media (max-width: 640px) {
  .register-page .register { gap: 24px; }
  .register__preview { margin-bottom: 16px; padding: 10px 14px; font-size: 0.875rem; }
  .register__summary { padding: 14px 16px; }
  .register__event { font-size: 1.0625rem; margin-bottom: 8px; }
  .register__facts { font-size: 0.875rem; }
  .register__facts > div { padding: 6px 0; }
  .step { padding-top: 24px; }
  .step__title { margin-bottom: 14px; }
  .ticket { padding: 12px 14px; column-gap: 12px; }
  .register__form .field { margin-bottom: 18px; }
  .form__actions { flex-direction: column; align-items: stretch; }
  .form__submit { width: 100%; }
  .form__preview-note { text-align: center; }
}

/* The thanks page: the same card as the summary. */
.register--thanks { grid-template-columns: minmax(0, 40rem); }
.done { padding: clamp(20px, 4vw, 36px); border: 1px solid var(--rule); border-top: 2px solid var(--azure); }
.done:focus { outline: none; }
.done__title { margin: 0 0 10px; font: 600 clamp(1.375rem, 1.2rem + 0.8vw, 1.75rem)/1.2 var(--font-display); color: var(--azure-ink); }
.done__text { margin: 0 0 20px; }
.thanks__ref { margin: 4px 0 0; font: 0.9375rem/1.45 var(--font-ui); }
.thanks__ref > div { display: grid; grid-template-columns: 9.5rem minmax(0, 1fr); gap: 12px; padding: 10px 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.thanks__ref dt { color: var(--text-soft); }
.thanks__ref dd { margin: 0; font-weight: 600; letter-spacing: 0.04em; font-variant-numeric: tabular-nums; }
.done .note { margin: 16px 0 0; }
.done__links { margin: 20px 0 0; font: 500 0.9375rem/1.4 var(--font-ui); }
.done__links a { display: inline-block; padding: 11px 0; text-decoration: none; }
.done__links a::before { content: "\2190\00a0"; }
@media (hover: hover) and (pointer: fine) {
  .done__links a:hover { text-decoration: underline; }
}
@media (max-width: 400px) {
  .thanks__ref > div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
}

/* Photos from past courses, under the course details (research-and-education.njk). */
.course-photos__title { margin-top: clamp(40px, 6vw, 64px); }
