/* ==========================================================================
   Francis Davis Millet Institute - shared base styles
   Requires tokens.css. Every class is prefixed fdm-.
   Breakpoints: phone max-width 599.98px, tablet 600 to 1023.98px,
   desktop min-width 1024px.

   Contents
    1. Reset                 7. Chips and tags
    2. Page and typography   8. Form fields
    3. Links                 9. Cards
    4. Layout container     10. Header and Resources drop-down
    5. Labels               11. Footer
    6. Buttons              12. Focus, skip link, helpers, reduced motion

   Sections 1 to 12 are build/base/base.css unchanged. The theme adds:
   13. Footer legal note    16. Preview bar
   14. WordPress core forms 17. Search form (search results, page not found)
   15. Editor content inside .fdm-prose
   18. Header without JavaScript on phones and tablets
   ========================================================================== */

/* 1. Reset ----------------------------------------------------------------- */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body,
h1, h2, h3, h4, h5, h6,
p, figure, blockquote, dl, dd {
  margin: 0;
}

:where(ul[class], ol[class]) {
  margin: 0;
  padding: 0;
  list-style: none;
}

img,
picture,
svg,
video {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

button,
input,
select,
textarea {
  margin: 0;
  font: inherit;
  color: inherit;
  letter-spacing: inherit;
}

button {
  background: none;
  border: 0;
  padding: 0;
  border-radius: 0;
  cursor: pointer;
  text-align: inherit;
}

table {
  border-collapse: collapse;
}

[hidden] {
  display: none !important;
}

/* 2. Page and typography --------------------------------------------------- */

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--fdm-color-bg);
  color: var(--fdm-color-text);
  font-family: var(--fdm-font-body);
  font-size: var(--fdm-fs-18);
  font-weight: var(--fdm-weight-regular);
  line-height: var(--fdm-lh-18);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-synthesis: none;
}

main {
  display: block;
  flex: 1 0 auto;
  width: 100%;
}

h1, h2, h3, h4, h5, h6,
.fdm-display, .fdm-h1, .fdm-h2, .fdm-h3, .fdm-h4 {
  font-family: var(--fdm-font-heading);
  font-weight: var(--fdm-weight-semibold);
  color: var(--fdm-color-heading);
  letter-spacing: 0;
}

/* Home title: 64/105% at 1440, 36/108% at 390. The second line-height
   snaps the line box to whole pixels, as Figma does (67px at 64px). */
.fdm-display {
  font-size: var(--fdm-fs-display);
  line-height: var(--fdm-lh-105);
  line-height: round(1.05em, 1px);
}

/* Page title: 56/105% at 1440 (59px line), 38/105% at 390 (40px line).
   One per page. */
h1,
.fdm-h1 {
  font-size: var(--fdm-fs-h1);
  line-height: var(--fdm-lh-105);
  line-height: round(1.05em, 1px);
}

/* List-item and form headings: 32/115% */
h2,
.fdm-h2 {
  font-size: var(--fdm-fs-32);
  line-height: var(--fdm-lh-32);
}

/* Card headings: 30/115% (24/115% on phones) */
h3,
.fdm-h3 {
  font-size: var(--fdm-fs-30);
  line-height: var(--fdm-lh-30);
}

/* Side-card headings: 26/115% */
h4,
.fdm-h4 {
  font-size: var(--fdm-fs-26);
  line-height: var(--fdm-lh-26);
}

h5, h6 {
  font-size: var(--fdm-fs-24);
  line-height: var(--fdm-lh-24-heading);
}

strong, b {
  font-weight: var(--fdm-weight-semibold);
}

/* Lead paragraph under a page title: 20/155% muted, 820px wide */
.fdm-lead {
  max-width: var(--fdm-measure-lead);
  font-size: var(--fdm-fs-20);
  line-height: var(--fdm-lh-20);
  color: var(--fdm-color-text-muted);
}

/* Home hero lead: 21/155% */
.fdm-lead--hero {
  font-size: var(--fdm-fs-21);
  line-height: var(--fdm-lh-21);
}

/* Large body, citations and form options: 19/150% */
.fdm-text-lg {
  font-size: var(--fdm-fs-19);
  line-height: var(--fdm-lh-19);
}

/* Links, footers and field text: 17/150% */
.fdm-text-ui {
  font-size: var(--fdm-fs-17);
  line-height: var(--fdm-lh-17);
}

/* Small text: 16/150% */
.fdm-small {
  font-size: var(--fdm-fs-16);
  line-height: var(--fdm-lh-16);
}

/* Picture captions: 16/150% italic muted */
.fdm-caption {
  font-size: var(--fdm-fs-16);
  line-height: var(--fdm-lh-16);
  font-style: italic;
  color: var(--fdm-color-text-muted);
}

.fdm-text-muted {
  color: var(--fdm-color-text-muted);
}

/* Rich text that comes out of the WordPress editor */
.fdm-prose > * + * {
  margin-top: 1em;
}

.fdm-prose ul,
.fdm-prose ol {
  padding-left: 1.25em;
}

.fdm-prose li + li {
  margin-top: 0.35em;
}

.fdm-prose h2,
.fdm-prose h3,
.fdm-prose h4 {
  margin-top: 1.5em;
}

.fdm-prose blockquote {
  padding-left: var(--fdm-space-24);
  font-style: italic;
  color: var(--fdm-color-text-muted);
}

@media (max-width: 599.98px) {
  h3,
  .fdm-h3 {
    font-size: var(--fdm-fs-24);
    line-height: var(--fdm-lh-24-heading);
  }

  .fdm-display {
    line-height: var(--fdm-lh-108);
    line-height: round(1.08em, 1px);
  }

  .fdm-lead {
    font-size: var(--fdm-fs-17);
    line-height: var(--fdm-lh-17);
  }

  .fdm-lead--hero {
    font-size: var(--fdm-fs-18);
    line-height: var(--fdm-lh-18);
  }

  .fdm-caption {
    font-size: var(--fdm-fs-15);
    line-height: var(--fdm-lh-15);
  }
}

/* 3. Links ----------------------------------------------------------------- */

a {
  color: var(--fdm-link);
  text-decoration: underline;
  text-decoration-thickness: from-font;
  text-underline-position: from-font;
}

a:hover {
  text-decoration-thickness: 2px;
}

/* Stand-alone text link, 17/150%. Works on <a> and on <button>. */
.fdm-link {
  display: inline-block;
  font-family: var(--fdm-font-body);
  font-size: var(--fdm-fs-17);
  font-weight: var(--fdm-weight-regular);
  line-height: var(--fdm-lh-17);
  color: var(--fdm-link);
  text-decoration: underline;
  text-decoration-thickness: from-font;
  text-underline-position: from-font;
  cursor: pointer;
}

.fdm-link:hover {
  text-decoration-thickness: 2px;
}

/* 4. Layout container ------------------------------------------------------ */

/* 1440px page with 112px gutters at 1440, 20px gutters at 390. Content is
   1216px wide at 1440 and stays centred on wider screens. */
.fdm-container {
  width: 100%;
  max-width: var(--fdm-page-max);
  margin-inline: auto;
  padding-inline: var(--fdm-gutter);
}

/* Full-width coloured band; put a .fdm-container inside it. */
.fdm-band {
  background: var(--fdm-color-surface-alt);
}

/* Page title block: use with .fdm-container. 64px above, 32px below, 14px gap. */
.fdm-page-head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--fdm-space-14);
  padding-top: var(--fdm-space-64);
  padding-bottom: var(--fdm-page-head-pb, var(--fdm-space-32));
}

@media (max-width: 599.98px) {
  .fdm-page-head {
    gap: var(--fdm-space-12);
    padding-top: var(--fdm-space-28);
    padding-bottom: var(--fdm-page-head-pb-phone, var(--fdm-space-20));
  }
}

/* 5. Labels ---------------------------------------------------------------- */

/* Kicker above a heading: Raleway SemiBold 11, caps, +8% */
.fdm-label {
  display: block;
  font-family: var(--fdm-font-label);
  font-size: var(--fdm-fs-11);
  font-weight: var(--fdm-weight-semibold);
  line-height: var(--fdm-lh-11);
  letter-spacing: var(--fdm-ls-8);
  text-transform: uppercase;
  color: var(--fdm-color-label);
}

/* Section label inside a list: 12, caps, +8% */
.fdm-label--lg {
  font-size: var(--fdm-fs-12);
  line-height: var(--fdm-lh-12-label);
}

/* Byline and date line: 12/150%, caps, +6% */
.fdm-meta {
  display: block;
  font-family: var(--fdm-font-label);
  font-size: var(--fdm-fs-12);
  font-weight: var(--fdm-weight-semibold);
  line-height: var(--fdm-lh-12-loose);
  letter-spacing: var(--fdm-ls-6);
  text-transform: uppercase;
  color: var(--fdm-color-label);
}

@media (max-width: 599.98px) {
  .fdm-label {
    font-size: var(--fdm-fs-10);
    line-height: var(--fdm-lh-10);
  }

  .fdm-label--lg {
    font-size: var(--fdm-fs-12);
    line-height: var(--fdm-lh-12-label);
  }
}

/* 6. Buttons --------------------------------------------------------------- */

.fdm-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--fdm-space-8);
  padding: 12px 22px;
  border: 0;
  border-radius: var(--fdm-radius-control);
  font-family: var(--fdm-font-label);
  font-size: var(--fdm-fs-13);
  font-weight: var(--fdm-weight-semibold);
  line-height: var(--fdm-lh-13);
  letter-spacing: var(--fdm-ls-6);
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color var(--fdm-duration) var(--fdm-ease),
              border-color var(--fdm-duration) var(--fdm-ease);
}

/* Gold primary: 40px tall. One per view. */
.fdm-btn--primary {
  background: var(--fdm-gold-400);
  color: var(--fdm-green-900);
}

.fdm-btn--primary:hover {
  background: var(--fdm-gold-500);
}

/* Outlined dark: 43px tall with its 1.5px border. The min-height keeps the
   Figma height on 1x screens, where browsers draw a 1.5px border as 1px. */
.fdm-btn--outline {
  min-height: 43px;
  border: var(--fdm-border-strong);
  background: transparent;
  color: var(--fdm-green-900);
}

.fdm-btn--outline:hover {
  background: var(--fdm-paper-200);
}

/* Small (PDF, Copy): 35px tall outlined */
.fdm-btn--sm {
  min-height: 0;
  padding: 9px 16px;
  font-size: var(--fdm-fs-12);
  line-height: var(--fdm-lh-12);
  letter-spacing: var(--fdm-ls-5);
}

.fdm-btn--outline.fdm-btn--sm {
  min-height: 35px;
}

/* Large (form submit): 44px tall */
.fdm-btn--lg {
  padding: 14px 26px;
}

.fdm-btn--block {
  display: flex;
  width: 100%;
}

.fdm-btn:disabled,
.fdm-btn[aria-disabled="true"] {
  opacity: 0.4;
  cursor: not-allowed;
}

@media (max-width: 599.98px) {
  /* Phone button: 36px tall */
  .fdm-btn:not(.fdm-btn--sm):not(.fdm-btn--lg) {
    min-height: 0;
    padding: 11px 18px;
    font-size: var(--fdm-fs-12);
    line-height: var(--fdm-lh-12);
  }
}

/* 7. Chips and tags -------------------------------------------------------- */

.fdm-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--fdm-chips-gap, var(--fdm-space-8));
}

/* Filter chip: 32px tall, white with a rule border */
.fdm-chip {
  display: inline-flex;
  align-items: center;
  padding: 7px 14px;
  border: var(--fdm-border);
  border-radius: var(--fdm-radius-chip);
  background: var(--fdm-white);
  color: var(--fdm-ink);
  font-family: var(--fdm-font-label);
  font-size: var(--fdm-fs-13);
  font-weight: var(--fdm-weight-semibold);
  line-height: var(--fdm-lh-13);
  letter-spacing: 0;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color var(--fdm-duration) var(--fdm-ease);
}

.fdm-chip:hover {
  background: var(--fdm-paper-200);
}

/* Chosen chip: dark green, no border, so it is 30px tall as drawn */
.fdm-chip.is-active,
.fdm-chip[aria-pressed="true"],
.fdm-chip[aria-current="true"] {
  border: 0;
  background: var(--fdm-green-900);
  color: var(--fdm-paper-50);
}

/* Tag (Research, Past featured): 21px tall pill */
.fdm-tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: var(--fdm-radius-tag);
  background: var(--fdm-paper-200);
  color: var(--fdm-green-900);
  font-family: var(--fdm-font-label);
  font-size: var(--fdm-fs-10);
  font-weight: var(--fdm-weight-semibold);
  line-height: var(--fdm-lh-10);
  letter-spacing: var(--fdm-ls-8);
  text-transform: uppercase;
  white-space: nowrap;
}

@media (max-width: 599.98px) {
  .fdm-chip {
    padding: 6px 12px;
    border-radius: var(--fdm-radius-14);
    font-size: var(--fdm-fs-12);
    line-height: var(--fdm-lh-12);
  }
}

/* 8. Form fields ----------------------------------------------------------- */

.fdm-field {
  display: flex;
  flex-direction: column;
  gap: var(--fdm-space-7);
  min-width: 0;
}

/* Raleway SemiBold 12/150%, caps, +5% */
.fdm-field__label {
  font-family: var(--fdm-font-label);
  font-size: var(--fdm-fs-12);
  font-weight: var(--fdm-weight-semibold);
  line-height: var(--fdm-lh-12-loose);
  letter-spacing: var(--fdm-ls-5);
  text-transform: uppercase;
  color: var(--fdm-ink);
}

.fdm-field__hint {
  font-size: var(--fdm-fs-16);
  line-height: var(--fdm-lh-16);
  color: var(--fdm-color-text-muted);
}

.fdm-field__error {
  font-size: var(--fdm-fs-16);
  line-height: var(--fdm-lh-16);
  color: var(--fdm-error);
}

/* Text field: 54px tall */
.fdm-input,
.fdm-textarea,
.fdm-select {
  display: block;
  width: 100%;
  padding: 13px 14px;
  border: var(--fdm-border);
  border-radius: var(--fdm-radius-control);
  background-color: var(--fdm-white);
  color: var(--fdm-ink);
  font-family: var(--fdm-font-body);
  font-size: var(--fdm-fs-17);
  line-height: var(--fdm-lh-17);
  appearance: none;
  -webkit-appearance: none;
}

.fdm-input::placeholder,
.fdm-textarea::placeholder {
  color: var(--fdm-muted);
  opacity: 1;
}

/* Message box: 93px tall as drawn, grows with the text */
.fdm-textarea {
  min-height: 93px;
  resize: vertical;
}

.fdm-select {
  padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='7' viewBox='0 0 12 7' fill='none' stroke='%23262e0a' stroke-width='1.75'%3E%3Cpath d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}

.fdm-input:hover,
.fdm-textarea:hover,
.fdm-select:hover {
  border-color: var(--fdm-muted);
}

.fdm-input:focus,
.fdm-textarea:focus,
.fdm-select:focus {
  border-color: var(--fdm-green-900);
}

.fdm-input[aria-invalid="true"],
.fdm-textarea[aria-invalid="true"],
.fdm-select[aria-invalid="true"] {
  border-color: var(--fdm-error);
}

/* Search field with a magnifier: 52px tall, 300px wide in the gallery toolbar */
.fdm-search {
  display: flex;
  align-items: center;
  gap: var(--fdm-space-10);
  padding: 12px 14px;
  border: var(--fdm-border);
  border-radius: var(--fdm-radius-control);
  background: var(--fdm-white);
  color: var(--fdm-muted);
}

.fdm-search__icon {
  flex: none;
  width: 18px;
  height: 18px;
}

.fdm-search__input {
  flex: 1 1 auto;
  min-width: 0;
  padding: 0;
  border: 0;
  background: none;
  color: var(--fdm-ink);
  font-family: var(--fdm-font-body);
  font-size: var(--fdm-fs-17);
  line-height: var(--fdm-lh-17);
  appearance: none;
  -webkit-appearance: none;
}

.fdm-search__input::placeholder {
  color: var(--fdm-muted);
  opacity: 1;
}

.fdm-search__input::-webkit-search-cancel-button,
.fdm-search__input::-webkit-search-decoration {
  -webkit-appearance: none;
  appearance: none;
}

.fdm-search__input:focus {
  outline: none;
}

.fdm-search:focus-within {
  outline: var(--fdm-focus-width) solid var(--fdm-color-focus);
  outline-offset: var(--fdm-focus-offset);
}

/* Large search field (bibliography): 60px tall, dark 1.5px border, 19px text */
.fdm-search--lg {
  min-height: 60px;
  padding: 14px 16px;
  border: var(--fdm-border-strong);
  color: var(--fdm-green-900);
}

.fdm-search--lg .fdm-search__input {
  font-size: var(--fdm-fs-19);
  line-height: var(--fdm-lh-19);
}

/* Radio option row: 63px tall; 65px with the 2px border when chosen */
.fdm-option {
  display: flex;
  align-items: center;
  gap: var(--fdm-space-14);
  padding: 16px 18px;
  border: var(--fdm-border);
  border-radius: var(--fdm-radius-control);
  background: var(--fdm-white);
  color: var(--fdm-ink);
  font-size: var(--fdm-fs-19);
  line-height: var(--fdm-lh-19);
  cursor: pointer;
}

.fdm-option__input {
  flex: none;
  width: 18px;
  height: 18px;
  margin: 0;
  border: 1.5px solid var(--fdm-muted);
  border-radius: 50%;
  background: transparent;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
}

.fdm-option__input:checked {
  border-color: var(--fdm-green-900);
  background: var(--fdm-green-900);
}

.fdm-option:has(.fdm-option__input:checked),
.fdm-option.is-checked {
  border: var(--fdm-border-selected);
  background: var(--fdm-green-tint);
}

.fdm-option:has(.fdm-option__input:focus-visible) {
  outline: var(--fdm-focus-width) solid var(--fdm-color-focus);
  outline-offset: var(--fdm-focus-offset);
}

.fdm-option__input:focus-visible {
  outline: none;
}

@media (max-width: 599.98px) {
  /* Phone search field: 50px tall, 16px text and icon */
  .fdm-search:not(.fdm-search--lg) .fdm-search__input {
    font-size: var(--fdm-fs-16);
    line-height: var(--fdm-lh-16);
  }

  .fdm-search:not(.fdm-search--lg) .fdm-search__icon {
    width: 16px;
    height: 16px;
  }
}

/* 9. Cards ----------------------------------------------------------------- */

/* White card with a rule border, 8px corners, 32px padding */
.fdm-card {
  padding: var(--fdm-card-padding, var(--fdm-space-32));
  border: var(--fdm-border);
  border-radius: var(--fdm-radius-card);
  background: var(--fdm-white);
}

@media (max-width: 599.98px) {
  .fdm-card {
    padding: var(--fdm-card-padding-phone, var(--fdm-space-20));
  }
}

/* "No image available" panel: stands in for the picture of a work that has
   none, on the gallery tile and on the work page. 386 x 480 as drawn; it
   keeps those proportions at any width. Logo, heading, one line of text and,
   on the tile, "See the details". */
.fdm-noimage {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--fdm-space-10);
  aspect-ratio: var(--fdm-noimage-ratio);
  padding: var(--fdm-space-32);
  border: var(--fdm-border);
  background: var(--fdm-color-surface-alt);
  text-align: center;
}

.fdm-noimage__logo {
  flex: none;
  width: var(--fdm-noimage-logo);
  height: var(--fdm-noimage-logo);
  border-radius: 50%;
  object-fit: cover;
}

/* Cormorant Garamond SemiBold 26 / auto */
.fdm-noimage__title {
  font-family: var(--fdm-font-heading);
  font-size: var(--fdm-fs-26);
  font-weight: var(--fdm-weight-semibold);
  line-height: var(--fdm-lh-26-auto);
  color: var(--fdm-color-heading);
}

/* Crimson Text 17 / auto */
.fdm-noimage__text,
.fdm-noimage__link {
  font-size: var(--fdm-fs-17);
  line-height: var(--fdm-lh-17-menu);
}

.fdm-noimage__text {
  color: var(--fdm-color-text-muted);
}

.fdm-noimage__link {
  color: var(--fdm-link);
  text-decoration: underline;
  text-decoration-thickness: from-font;
  text-underline-position: from-font;
}

/* 10. Header and Resources drop-down --------------------------------------- */

.fdm-header {
  position: relative;
  z-index: var(--fdm-z-header);
  flex: none;
  background: var(--fdm-green-900);
  color: var(--fdm-on-green);
}

.fdm-header__inner {
  display: flex;
  align-items: center;
  gap: var(--fdm-space-26);
  max-width: var(--fdm-page-max);
  min-height: var(--fdm-header-height);
  margin-inline: auto;
  padding-inline: var(--fdm-header-gutter);
}

/* Brand: logo and name, links home */
.fdm-brand {
  display: inline-flex;
  align-items: center;
  gap: var(--fdm-space-12);
  margin-right: auto;
  color: var(--fdm-on-green);
  text-decoration: none;
}

.fdm-brand__logo {
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
}

/* The 1px top margin puts the 25px line 10px below the top of the 44px logo
   and 9px above its bottom, as Figma does; centred exactly it would sit on
   a half pixel. The same holds for the 29px line beside the 36px phone logo. */
.fdm-brand__name,
.fdm-brand__name-short {
  margin-top: 1px;
  font-family: var(--fdm-font-heading);
  font-size: var(--fdm-fs-23);
  font-weight: var(--fdm-weight-semibold);
  line-height: var(--fdm-lh-23);
  white-space: nowrap;
}

.fdm-brand__name-short {
  display: none;
}

/* Phone menu button (three bars); hidden on desktop */
.fdm-nav-toggle {
  display: none;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-right: -10px;
  color: var(--fdm-on-green);
}

.fdm-nav-toggle__bars {
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 24px;
}

.fdm-nav-toggle__bars span {
  display: block;
  height: 2px;
  background: currentColor;
  transition: transform var(--fdm-duration) var(--fdm-ease),
              opacity var(--fdm-duration) var(--fdm-ease);
}

.fdm-nav-toggle[aria-expanded="true"] .fdm-nav-toggle__bars span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.fdm-nav-toggle[aria-expanded="true"] .fdm-nav-toggle__bars span:nth-child(2) {
  opacity: 0;
}

.fdm-nav-toggle[aria-expanded="true"] .fdm-nav-toggle__bars span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Primary navigation */
.fdm-nav__list {
  display: flex;
  align-items: center;
  gap: var(--fdm-space-26);
}

.fdm-nav__item {
  position: relative;
  display: flex;
  align-items: center;
}

.fdm-nav__link {
  display: inline-flex;
  align-items: center;
  gap: var(--fdm-space-6);
  font-family: var(--fdm-font-body);
  font-size: var(--fdm-fs-17);
  font-weight: var(--fdm-weight-regular);
  line-height: var(--fdm-lh-17-tight);
  color: var(--fdm-on-green);
  text-decoration: none;
  white-space: nowrap;
}

a.fdm-nav__link:hover,
.fdm-nav__toggle:hover .fdm-nav__toggle-label,
.fdm-nav__toggle[aria-expanded="true"] .fdm-nav__toggle-label {
  text-decoration: underline;
  text-decoration-thickness: from-font;
  text-underline-position: from-font;
}

/* 8px below the top of the 20px label, as drawn (not 7.5px). */
.fdm-nav__chevron {
  flex: none;
  width: 10px;
  height: 5px;
  margin-top: 1px;
  overflow: visible;
}

/* Resources drop-down: white card, 264px wide, 20px below the label */
.fdm-menu {
  display: none;
  position: absolute;
  top: calc(100% + 20px);
  left: -20px;
  z-index: var(--fdm-z-menu);
  width: 264px;
  margin: 0;
  padding: var(--fdm-space-8) 0;
  list-style: none;
  border: var(--fdm-border);
  border-radius: var(--fdm-radius-card);
  background: var(--fdm-white);
  box-shadow: var(--fdm-shadow-menu);
}

.fdm-nav__toggle[aria-expanded="true"] + .fdm-menu {
  display: block;
}

/* Without JavaScript the menu opens on hover and on keyboard focus. */
html:not(.fdm-js) .fdm-nav__item--has-menu:hover > .fdm-menu,
html:not(.fdm-js) .fdm-nav__item--has-menu:focus-within > .fdm-menu {
  display: block;
}

html:not(.fdm-js) .fdm-menu::before {
  content: "";
  position: absolute;
  inset: -21px 0 auto 0;
  height: 21px;
}

.fdm-menu__link {
  display: block;
  padding: 10px 20px;
  font-family: var(--fdm-font-body);
  font-size: var(--fdm-fs-17);
  line-height: var(--fdm-lh-17-menu);
  color: var(--fdm-ink);
  text-decoration: none;
}

.fdm-menu__link:hover {
  background: var(--fdm-paper-200);
  text-decoration: none;
}

/* Header search: outlined box, 98 x 44 at rest, widens while in use */
.fdm-header-search {
  display: flex;
  align-items: center;
  gap: var(--fdm-space-8);
  /* Figma: 13px left, 15px right around a 42px label. The input is 44px so
     the placeholder is never clipped; the box is still 98 x 44. */
  padding: 9px 13px;
  border: var(--fdm-border-search-on-green);
  border-radius: var(--fdm-radius-control);
  color: var(--fdm-on-green);
}

.fdm-header-search__label {
  display: flex;
  flex: none;
  cursor: text;
}

.fdm-header-search__icon {
  width: 18px;
  height: 18px;
}

.fdm-header-search__input {
  width: 44px;
  min-width: 0;
  padding: 0;
  border: 0;
  background: none;
  color: var(--fdm-on-green);
  font-family: var(--fdm-font-body);
  font-size: var(--fdm-fs-16);
  line-height: var(--fdm-lh-16);
  appearance: none;
  -webkit-appearance: none;
  transition: width var(--fdm-duration) var(--fdm-ease);
}

.fdm-header-search__input::placeholder {
  color: var(--fdm-on-green-soft);
  opacity: 1;
}

.fdm-header-search__input::-webkit-search-cancel-button,
.fdm-header-search__input::-webkit-search-decoration {
  -webkit-appearance: none;
  appearance: none;
}

.fdm-header-search__input:focus,
.fdm-header-search__input:not(:placeholder-shown) {
  width: 180px;
}

.fdm-header-search__input:focus {
  outline: none;
}

.fdm-header-search:focus-within {
  outline: var(--fdm-focus-width) solid var(--fdm-color-focus-on-green);
  outline-offset: var(--fdm-focus-offset);
}

/* Phone and tablet header: 68px bar with a menu button */
@media (max-width: 1023.98px) {
  .fdm-header__inner {
    flex-wrap: wrap;
    gap: var(--fdm-space-12);
    min-height: var(--fdm-header-height-phone);
  }

  .fdm-brand__logo {
    width: 36px;
    height: 36px;
  }

  .fdm-brand__name,
  .fdm-brand__name-short {
    font-size: var(--fdm-fs-19);
    line-height: var(--fdm-lh-19);
  }

  .fdm-nav-toggle {
    display: inline-flex;
  }

  .fdm-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    padding: 0 var(--fdm-header-gutter) var(--fdm-space-24);
    border-top: var(--fdm-border-on-green);
    background: var(--fdm-green-900);
  }

  .fdm-header.is-nav-open .fdm-nav {
    display: block;
  }

  .fdm-nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .fdm-nav__item {
    display: block;
    border-bottom: var(--fdm-border-on-green);
  }

  .fdm-nav__link {
    display: flex;
    width: 100%;
    padding: 13px 0;
    line-height: var(--fdm-lh-17);
  }

  .fdm-nav__toggle {
    justify-content: space-between;
  }

  .fdm-menu {
    position: static;
    width: auto;
    padding: 0 0 var(--fdm-space-10) var(--fdm-space-16);
    border: 0;
    border-radius: 0;
    background: none;
    box-shadow: none;
  }

  .fdm-menu__link {
    padding: 9px 0;
    line-height: var(--fdm-lh-17);
    color: var(--fdm-on-green-soft);
  }

  .fdm-menu__link:hover {
    background: none;
    text-decoration: underline;
  }

  html:not(.fdm-js) .fdm-menu::before {
    content: none;
  }

  .fdm-nav__item--search,
  .fdm-nav__item--cta {
    border-bottom: 0;
  }

  .fdm-nav__item--search {
    padding-top: var(--fdm-space-20);
  }

  .fdm-nav__item--cta {
    padding-top: var(--fdm-space-12);
  }

  .fdm-header-search__input,
  .fdm-header-search__input:focus,
  .fdm-header-search__input:not(:placeholder-shown) {
    flex: 1 1 auto;
    width: auto;
  }

  .fdm-nav__item--cta .fdm-btn {
    display: flex;
    width: 100%;
  }

  /* Without JavaScript the menu is simply shown under the bar. */
  html:not(.fdm-js) .fdm-nav-toggle {
    display: none;
  }

  html:not(.fdm-js) .fdm-header__inner {
    padding-top: var(--fdm-space-16);
    row-gap: var(--fdm-space-16);
  }

  html:not(.fdm-js) .fdm-nav {
    display: block;
    position: static;
    flex: 1 0 100%;
    padding-inline: 0;
  }
}

/* Phones use the short name, as drawn */
@media (max-width: 599.98px) {
  .fdm-brand__name {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .fdm-brand__name-short {
    display: inline;
  }
}

/* 11. Footer --------------------------------------------------------------- */

.fdm-footer {
  flex: none;
  background: var(--fdm-green-900);
  color: var(--fdm-on-green-soft);
  font-size: var(--fdm-fs-17);
  line-height: var(--fdm-lh-17);
}

.fdm-footer a {
  color: inherit;
  text-decoration: none;
}

.fdm-footer a:hover {
  text-decoration: underline;
  text-decoration-thickness: from-font;
  text-underline-position: from-font;
}

.fdm-footer__inner {
  display: flex;
  flex-direction: column;
  gap: var(--fdm-space-32);
  max-width: var(--fdm-page-max);
  margin-inline: auto;
  padding: var(--fdm-space-56) var(--fdm-gutter) var(--fdm-space-40);
}

/* Four columns: 400 / 200 / 240 / 240 with 45px gaps at 1440. On narrower
   desktops the brand column gives way first and no link ever wraps. */
.fdm-footer__columns {
  display: grid;
  grid-template-columns:
    minmax(300px, 400fr)
    minmax(max-content, 200fr)
    minmax(max-content, 240fr)
    minmax(max-content, 241fr);
  column-gap: var(--fdm-space-45);
  row-gap: var(--fdm-space-32);
  align-items: start;
}

.fdm-footer__brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.fdm-footer__logo {
  display: block;
  margin-bottom: var(--fdm-space-14);
  border-radius: 50%;
}

.fdm-footer__logo img {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
}

.fdm-footer__name {
  font-family: var(--fdm-font-heading);
  font-size: var(--fdm-fs-24);
  font-style: italic;
  font-weight: var(--fdm-weight-semibold);
  line-height: var(--fdm-lh-24);
  color: var(--fdm-on-green);
}

.fdm-footer__site {
  margin-top: var(--fdm-space-2);
}

.fdm-footer__about {
  margin-top: var(--fdm-space-12);
}

.fdm-footer__heading {
  margin-bottom: var(--fdm-space-12);
  font-family: var(--fdm-font-label);
  font-size: var(--fdm-fs-11);
  font-weight: var(--fdm-weight-semibold);
  line-height: var(--fdm-lh-11);
  letter-spacing: var(--fdm-ls-8);
  text-transform: uppercase;
  color: var(--fdm-gold-400);
}

.fdm-footer__list {
  display: grid;
  gap: var(--fdm-space-12);
}

/* Phone-only one-line links */
.fdm-footer__short {
  display: none;
}

.fdm-footer__short-list {
  display: flex;
  flex-wrap: wrap;
}

.fdm-footer__short-list li + li::before {
  content: "\0020\00b7\0020";
  white-space: pre;
}

.fdm-footer__legal {
  padding-top: var(--fdm-space-24);
  border-top: var(--fdm-border-on-green);
  font-size: var(--fdm-fs-16);
  line-height: var(--fdm-lh-16);
  color: var(--fdm-on-green-muted);
}

.fdm-footer__copyright-short {
  display: none;
}

/* Tablet: brand on top, three link columns under it */
@media (max-width: 1023.98px) {
  .fdm-footer__columns {
    grid-template-columns: repeat(3, minmax(max-content, 1fr));
  }

  .fdm-footer__brand {
    grid-column: 1 / -1;
    max-width: 400px;
  }
}

/* Phone: logo, name, one line of links, short copyright */
@media (max-width: 599.98px) {
  .fdm-footer__inner {
    gap: var(--fdm-space-10);
    padding: var(--fdm-space-32) var(--fdm-gutter);
  }

  .fdm-footer__columns {
    display: block;
  }

  .fdm-footer__logo {
    margin-bottom: var(--fdm-space-10);
  }

  .fdm-footer__logo img {
    width: 48px;
    height: 48px;
  }

  .fdm-footer__name {
    font-size: var(--fdm-fs-20);
    line-height: 30px;
  }

  .fdm-footer__site,
  .fdm-footer__about,
  .fdm-footer__col,
  .fdm-footer__copyright {
    display: none;
  }

  .fdm-footer__short {
    display: block;
    font-size: var(--fdm-fs-16);
    line-height: var(--fdm-lh-16);
  }

  .fdm-footer__legal {
    padding-top: 0;
    border-top: 0;
    font-size: var(--fdm-fs-15);
    line-height: var(--fdm-lh-15);
  }

  .fdm-footer__copyright-short {
    display: block;
  }
}

/* 12. Focus, skip link, helpers, reduced motion ---------------------------- */

/* 2px green ring with a 3px gap on light surfaces; gold on green. */
:focus-visible {
  outline: var(--fdm-focus-width) solid var(--fdm-color-focus);
  outline-offset: var(--fdm-focus-offset);
}

.fdm-header :focus-visible,
.fdm-footer :focus-visible,
.fdm-on-green :focus-visible {
  outline-color: var(--fdm-color-focus-on-green);
}

@media (min-width: 1024px) {
  .fdm-menu :focus-visible {
    outline-color: var(--fdm-color-focus);
    outline-offset: -3px;
  }
}

:focus:not(:focus-visible) {
  outline: none;
}

.fdm-skip-link {
  position: absolute;
  top: var(--fdm-space-12);
  left: var(--fdm-space-12);
  z-index: var(--fdm-z-skip);
  padding: 12px 22px;
  border-radius: var(--fdm-radius-control);
  background: var(--fdm-gold-400);
  color: var(--fdm-green-900);
  font-family: var(--fdm-font-label);
  font-size: var(--fdm-fs-13);
  font-weight: var(--fdm-weight-semibold);
  line-height: var(--fdm-lh-13);
  letter-spacing: var(--fdm-ls-6);
  text-transform: uppercase;
  text-decoration: none;
  transform: translateY(-200%);
}

.fdm-skip-link:focus {
  transform: none;
  outline: var(--fdm-focus-width) solid var(--fdm-paper-50);
  outline-offset: var(--fdm-focus-offset);
}

#main:focus {
  outline: none;
}

.fdm-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  border: 0;
  white-space: nowrap;
}

/* Inline SVG line icon: 1.75px stroke, takes the text colour */
.fdm-icon {
  flex: none;
  width: var(--fdm-icon-size);
  height: var(--fdm-icon-size);
  fill: none;
  stroke: currentColor;
  stroke-width: var(--fdm-icon-stroke);
  stroke-linecap: round;
  stroke-linejoin: round;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto !important;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ==========================================================================
   Added for the WordPress theme. Nothing above this line differs from
   build/base/base.css.
   ========================================================================== */

/* 13. Footer legal note ---------------------------------------------------- */

/* The legal sentence the current site prints in its footer. It is not drawn
   in Figma, so it sits under the copyright line in the same muted colour,
   one size smaller, and changes nothing above it. One line at 1440. */
.fdm-footer__disclaimer {
  margin-top: var(--fdm-space-8);
  text-wrap: pretty;   /* no single word left alone on the last line, where the browser can */
  font-size: var(--fdm-fs-15);
  line-height: var(--fdm-lh-15);
}

@media (max-width: 599.98px) {
  .fdm-footer__disclaimer {
    margin-top: var(--fdm-space-6);
    font-size: var(--fdm-fs-13);
    line-height: var(--fdm-lh-150);
  }
}

/* 14. WordPress core forms ------------------------------------------------- */

/* Core prints this class on text meant for screen readers only. */
.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  border: 0;
  white-space: nowrap;
}

/* The password form WordPress prints for a protected page, work or research
   entry (get_the_password_form()). Its markup is fixed by core, so it is
   styled by its core class: a white card with one field and one button. */
.post-password-form {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--fdm-space-16);
  width: 100%;
  max-width: var(--fdm-password-form-max);
  padding: var(--fdm-space-32);
  border: var(--fdm-border);
  border-radius: var(--fdm-radius-card);
  background: var(--fdm-white);
}

.post-password-form p {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: var(--fdm-space-12);
  width: 100%;
}

.post-password-form label {
  display: flex;
  flex: 1 1 240px;
  flex-direction: column;
  gap: var(--fdm-space-7);
  font-family: var(--fdm-font-label);
  font-size: var(--fdm-fs-12);
  font-weight: var(--fdm-weight-semibold);
  line-height: var(--fdm-lh-12-loose);
  letter-spacing: var(--fdm-ls-5);
  text-transform: uppercase;
  color: var(--fdm-ink);
}

.post-password-form input[type="password"] {
  display: block;
  width: 100%;
  padding: 13px 14px;
  border: var(--fdm-border);
  border-radius: var(--fdm-radius-control);
  background: var(--fdm-white);
  color: var(--fdm-ink);
  font-family: var(--fdm-font-body);
  font-size: var(--fdm-fs-17);
  line-height: var(--fdm-lh-17);
  letter-spacing: 0;
  text-transform: none;
}

.post-password-form input[type="password"]:focus {
  border-color: var(--fdm-green-900);
}

.post-password-form input[type="submit"] {
  flex: none;
  min-height: 54px;
  padding: 12px 22px;
  border: 0;
  border-radius: var(--fdm-radius-control);
  background: var(--fdm-gold-400);
  color: var(--fdm-green-900);
  font-family: var(--fdm-font-label);
  font-size: var(--fdm-fs-13);
  font-weight: var(--fdm-weight-semibold);
  line-height: var(--fdm-lh-13);
  letter-spacing: var(--fdm-ls-6);
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color var(--fdm-duration) var(--fdm-ease);
}

.post-password-form input[type="submit"]:hover {
  background: var(--fdm-gold-500);
}

@media (max-width: 599.98px) {
  .post-password-form {
    padding: var(--fdm-space-20);
  }
}

/* 15. Editor content inside .fdm-prose ------------------------------------- */

/* What the WordPress editor can put into a text field: pictures with or
   without a caption, aligned left, right or centre, embeds, tables, rules.
   Artwork is never cropped. */
.fdm-prose img {
  height: auto;
  border-radius: var(--fdm-radius-image);
}

.fdm-prose iframe,
.fdm-prose video,
.fdm-prose embed,
.fdm-prose object {
  max-width: 100%;
}

.fdm-prose .wp-caption,
.fdm-prose figure {
  max-width: 100%;
}

.fdm-prose .wp-caption-text,
.fdm-prose figcaption {
  margin-top: var(--fdm-space-8);
  font-size: var(--fdm-fs-16);
  line-height: var(--fdm-lh-16);
  font-style: italic;
  color: var(--fdm-color-text-muted);
}

.fdm-prose .aligncenter {
  margin-inline: auto;
}

.fdm-prose .alignleft {
  float: left;
  max-width: 50%;
  margin: var(--fdm-space-4) var(--fdm-space-24) var(--fdm-space-12) 0;
}

.fdm-prose .alignright {
  float: right;
  max-width: 50%;
  margin: var(--fdm-space-4) 0 var(--fdm-space-12) var(--fdm-space-24);
}

/* Only a text that really holds a floated picture gets the clearing box, so
   nothing changes for any other .fdm-prose. */
.fdm-prose:has(.alignleft, .alignright)::after {
  content: "";
  display: block;
  clear: both;
}

.fdm-prose hr {
  height: 0;
  border: 0;
  border-top: var(--fdm-border);
}

.fdm-prose table {
  width: 100%;
  font-size: var(--fdm-fs-17);
  line-height: var(--fdm-lh-17);
}

.fdm-prose th,
.fdm-prose td {
  padding: var(--fdm-space-10) var(--fdm-space-12);
  border-bottom: var(--fdm-border);
  text-align: left;
  vertical-align: top;
}

.fdm-prose th {
  font-weight: var(--fdm-weight-semibold);
  color: var(--fdm-color-heading);
}

@media (max-width: 599.98px) {
  .fdm-prose .alignleft,
  .fdm-prose .alignright {
    float: none;
    max-width: 100%;
    margin: 0;
  }
}

/* 16. Preview bar ---------------------------------------------------------- */

/* Shown only while the new design is previewed by cookie (footer.php prints
   it when fdm_preview_active() is true). A slim bar fixed to the bottom of
   the window; the page gets the same space below the footer so nothing is
   covered. setup.php puts fdm-is-preview on <body> at the same time. */
.fdm-preview-bar {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: var(--fdm-z-preview);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--fdm-space-4) var(--fdm-space-16);
  min-height: var(--fdm-preview-bar-height);
  padding: var(--fdm-space-8) var(--fdm-space-20);
  border-top: 1px solid var(--fdm-gold-400);
  background: var(--fdm-green-900);
  color: var(--fdm-on-green);
  font-family: var(--fdm-font-label);
  font-size: var(--fdm-fs-12);
  font-weight: var(--fdm-weight-semibold);
  line-height: var(--fdm-lh-12-loose);
  letter-spacing: var(--fdm-ls-6);
  text-transform: uppercase;
}

.fdm-preview-bar__link {
  color: var(--fdm-gold-400);
  text-decoration: underline;
  text-decoration-thickness: from-font;
  text-underline-position: from-font;
}

.fdm-preview-bar__link:hover {
  text-decoration-thickness: 2px;
}

.fdm-preview-bar :focus-visible {
  outline-color: var(--fdm-color-focus-on-green);
}

body.fdm-is-preview {
  padding-bottom: var(--fdm-preview-bar-height);
}

@media print {
  .fdm-preview-bar {
    display: none;
  }

  body.fdm-is-preview {
    padding-bottom: 0;
  }
}

/* 17. Search form ---------------------------------------------------------- */

/* The large search field (fdm-search--lg, 60px) with an outlined button of
   the same height beside it, 12px apart. Used at the top of the search
   results and on the "Page not found" page; Figma draws neither.

     <form class="fdm-search-form" role="search" method="get" action="/">
       <label class="fdm-search fdm-search--lg fdm-search-form__field">...</label>
       <button class="fdm-btn fdm-btn--outline fdm-search-form__submit" type="submit">Search</button>
     </form>
*/
.fdm-search-form {
  display: flex;
  align-items: stretch;
  gap: var(--fdm-space-12);
  width: 100%;
  max-width: var(--fdm-search-form-max);
}

.fdm-search-form__field {
  flex: 1 1 auto;
  min-width: 0;
  cursor: text;
}

.fdm-search-form__submit {
  flex: none;
  min-height: 60px;
  padding-inline: var(--fdm-space-26);
}

/* On phones the button keeps the field's height because the form stretches
   it; its padding is the phone button's. */
@media (max-width: 599.98px) {
  .fdm-search-form {
    gap: var(--fdm-space-8);
  }
}

/* 18. Header without JavaScript on phones and tablets ----------------------- */

/* Without JavaScript the menu stands open under the bar, in the flow of the
   page (section 10), so the header must be as tall as its menu and scroll
   away with the page. A later stylesheet may pin the header to the top of the
   window at a fixed height with a see-through background (header-sticky.css
   does). On these widths that would lay the open menu over the page title, so
   it is undone here. With JavaScript, and on desktop, nothing changes. */
@media (max-width: 1023.98px) {
  html:not(.fdm-js) .fdm-header {
    position: relative;
    height: auto;
    background: var(--fdm-green-900);
    pointer-events: auto;
  }

  html:not(.fdm-js) .fdm-header::before {
    content: none;
  }
}
