/* Reusable component classes shared by every templ page.
   Our CSP (style-src 'self') blocks inline style="" attributes, so every
   one-off tweak lives here as a class. */

/* --- Nav (fixed, always visible) --- */
.site-nav {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  /* Near-opaque instead of backdrop-filter blur, which has to re-blur the
     page underneath on every scroll frame. */
  background: color-mix(in srgb, var(--color-bg) 96%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--color-heading) 10%, transparent);

  & > .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--size-4);
    min-height: var(--nav-height);
  }

  & .site-nav-brand {
    text-decoration: none;
  }

  & .site-nav-links {
    display: flex;
    gap: var(--size-5);
    list-style: none;
    margin: 0;
    padding: 0;

    & a {
      position: relative;
      text-decoration: none;
      color: var(--color-heading);
      font-size: 1.05rem;
      padding-block: var(--size-1);
    }

    & a::after {
      content: "";
      position: absolute;
      left: 0;
      right: 0;
      bottom: -2px;
      height: 1px;
      background: currentColor;
      transform: scaleX(0);
      transform-origin: left;
      transition: transform 0.3s var(--ease-gentle);
    }

    & a:hover::after,
    & a[aria-current="page"]::after {
      transform: scaleX(1);
    }
  }
}

.site-nav-toggle {
  display: none;
  align-items: center;
  background: none;
  border: none;
  padding: var(--size-1);
  color: var(--color-heading);
  cursor: pointer;
}

/* Below this width the link row collapses behind a menu button. */
@media (max-width: 52rem) {
  .site-nav-toggle {
    display: flex;
  }

  .site-nav > .container,
  .admin-nav > .container {
    flex-wrap: wrap;
  }

  /* No row gap: the collapsed menu row must add no height, so the header
     stays exactly --nav-height and doesn't overlap the page. */
  .site-nav > .container {
    row-gap: 0;
  }

  .site-nav nav,
  .admin-nav nav {
    width: 100%;
  }

  .site-nav .site-nav-links,
  .admin-nav .site-nav-links {
    display: none;
    flex-direction: column;
    gap: var(--size-3);
    padding-block: var(--size-2) var(--size-4);

    &.is-open {
      display: flex;
    }
  }
}

.wordmark {
  display: inline-flex;
  flex-direction: column;
  line-height: 1;
  color: var(--color-heading);

  & .wordmark-name {
    font-family: var(--font-display);
    font-size: 1.6rem;
    letter-spacing: -0.01em;
  }

  & .wordmark-sub {
    font-size: 0.7rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    margin-top: 0.3rem;
  }

  & .wordmark-place {
    font-size: 0.6rem;
    letter-spacing: 0.08em;
    margin-top: 0.2rem;
    opacity: 0.8;
  }
}

/* --- Footer: small-print sitemap --- */
.site-footer {
  background: var(--color-footer-bg);
  color: var(--color-footer-text);
  font-size: 0.875rem;

  & a {
    color: var(--color-footer-text);
  }

  & .wordmark {
    color: white;
    margin-bottom: var(--size-3);
  }
}

.site-footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1.2fr;
  gap: var(--size-6);
  padding-block: var(--size-7) var(--size-5);

  @media (max-width: 44rem) {
    grid-template-columns: 1fr;
    gap: var(--size-5);
  }
}

.footer-heading {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.72rem;
  margin-bottom: var(--size-2);
  opacity: 0.85;
}

.footer-small {
  font-size: 0.8125rem;
  line-height: 1.6;
}

.footer-sitemap ul {
  list-style: none;
  margin: 0;
  padding: 0;
  columns: 2;
  font-size: 0.8125rem;
  line-height: 1.9;

  & a {
    text-decoration: none;
  }

  & a:hover {
    text-decoration: underline;
  }
}

.footer-legal {
  display: flex;
  justify-content: space-between;
  gap: var(--size-3);
  flex-wrap: wrap;
  border-top: 1px solid rgb(255 255 255 / 25%);
  padding-block: var(--size-3) var(--size-4);
  font-size: 0.75rem;
}

/* --- Page header + sections --- */
.page-header {
  text-align: center;
  padding-block: var(--size-9) var(--size-6);

  & .lede {
    max-width: 40rem;
    margin-inline: auto;
  }
}

.eyebrow {
  font-size: 0.78rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: var(--size-3);
}

.lede {
  font-size: 1.2rem;
  color: var(--color-text-muted);
  max-width: 42rem;
}

.section {
  padding-block: var(--size-8);
}

.section-alt {
  background: var(--color-surface-alt);
}

.center {
  text-align: center;
}

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

.back-link {
  display: inline-block;
  margin-bottom: var(--size-5);
  text-decoration: none;
  font-size: 0.95rem;
}

/* --- Buttons --- */
.btn {
  display: inline-block;
  padding: 0.7rem 1.4rem;
  border-radius: var(--radius-btn);
  font-family: var(--font-display);
  font-size: 1rem;
  line-height: 1.2;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s, transform 0.2s;

  &:active {
    transform: translateY(1px);
  }
}

.btn-primary {
  background: var(--color-primary);
  color: white;

  &:hover {
    background: var(--color-primary-hover);
    color: white;
  }
}

.btn-outline {
  background: transparent;
  border-color: var(--color-primary);
  color: var(--color-heading);

  &:hover {
    background: var(--color-primary);
    color: white;
  }
}

/* A quieter secondary action, for sitting beside btn-primary. */
.btn-ghost {
  background: rgb(255 255 255 / 55%);
  color: var(--color-heading);
  border-color: color-mix(in srgb, var(--color-heading) 25%, transparent);

  &:hover {
    background: white;
    color: var(--color-link-hover);
  }
}

.btn-danger {
  background: var(--color-danger);
  color: white;
}

.btn-success {
  background: var(--color-success);
  color: white;
}

.btn-lg {
  padding: 0.95rem 2rem;
  font-size: 1.1rem;
}

.btn-sm {
  padding: 0.45rem 0.9rem;
  font-size: 0.9rem;
}

.btn-xs {
  padding: 0.25rem 0.55rem;
  font-size: 0.8rem;
  font-family: var(--font-body);
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--size-3);
}

/* --- Home: single-page snap blocks --- */
html.home-snap {
  scroll-snap-type: y mandatory;
  scroll-behavior: smooth;
  scroll-padding-top: 0;
  /* No visible scrollbar — the blocks themselves are the navigation. */
  scrollbar-width: none;

  &::-webkit-scrollbar {
    display: none;
  }

  & main {
    padding-top: 0;
  }

  & .site-footer {
    scroll-snap-align: end;
  }

  /* Tall content on small screens shouldn't be trapped by mandatory snap. */
  @media (max-width: 48rem), (max-height: 34rem) {
    scroll-snap-type: y proximity;
  }
}

/* Fixed full-screen color layers behind the blocks; the active block's
   layer fades in, so the page visibly shifts tone as you scroll. */
.snap-backdrop {
  position: fixed;
  inset: 0;
  z-index: -1;
}

.snap-backdrop-layer {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.6s var(--ease-gentle);
  will-change: opacity;

  &.is-active {
    opacity: 1;
  }
}

/* Home backdrop tones, built from theme tokens so they follow the color
   toggle: soft blobs of the second accent and gold over the page colors. */
.tone-1 {
  background:
    radial-gradient(60rem 40rem at 85% 10%, color-mix(in srgb, var(--color-accent2-soft) 75%, transparent), transparent 60%),
    radial-gradient(40rem 30rem at 10% 90%, color-mix(in srgb, var(--color-accent-tint) 90%, transparent), transparent 60%),
    var(--color-bg);
}

.tone-2 {
  background:
    radial-gradient(50rem 35rem at 15% 20%, color-mix(in srgb, var(--color-surface-alt) 90%, transparent), transparent 60%),
    var(--color-surface);
}

.tone-3 {
  background:
    radial-gradient(55rem 40rem at 80% 80%, color-mix(in srgb, var(--color-accent2-soft) 80%, transparent), transparent 60%),
    var(--color-surface-alt);
}

.tone-4 {
  background:
    radial-gradient(50rem 40rem at 50% 0%, rgb(255 255 255 / 70%), transparent 60%),
    var(--color-accent-tint);
}

.tone-5 {
  background:
    radial-gradient(60rem 40rem at 20% 30%, color-mix(in srgb, var(--color-primary) 18%, transparent), transparent 60%),
    radial-gradient(40rem 30rem at 90% 90%, color-mix(in srgb, var(--color-accent2-soft) 80%, transparent), transparent 60%),
    var(--color-bg);
}

.snap-block {
  position: relative;
  min-height: 100svh;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  display: flex;
  align-items: center;
  padding-top: var(--nav-height);
  padding-bottom: var(--size-7);
}

.snap-inner {
  width: 100%;

  /* Keep content clear of the fixed side dots. */
  @media (min-width: 40.01rem) {
    padding-inline: 4rem;
  }
}

.snap-center {
  text-align: center;

  & .lede {
    margin-inline: auto;
  }

  & .btn-row {
    justify-content: center;
  }
}

.snap-split {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: var(--size-8);
  align-items: center;

  @media (max-width: 48rem) {
    grid-template-columns: 1fr;
    gap: var(--size-3);
  }
}

.display {
  font-size: clamp(2.5rem, 4.5vw + 1rem, 4.75rem);
  max-width: 18ch;
  margin-inline: auto;
  margin-bottom: var(--size-5);
}

/* Content eases up into place as its block becomes active (app.js adds
   .is-active). Staggered by position within the block. */
.reveal {
  opacity: 0;
  transform: translateY(1.75rem);
  filter: blur(4px);
  /* The blur clears in half the time of the fade/rise. */
  transition:
    opacity 0.6s var(--ease-gentle),
    transform 0.6s var(--ease-gentle),
    filter 0.3s var(--ease-gentle);
}

.snap-block.is-active .reveal {
  opacity: 1;
  transform: none;
  filter: none;
}

.snap-block.is-active .reveal:nth-child(2) { transition-delay: 0.05s; }
.snap-block.is-active .reveal:nth-child(3) { transition-delay: 0.1s; }
.snap-block.is-active .reveal:nth-child(4) { transition-delay: 0.15s; }
.snap-block.is-active .reveal:nth-child(5) { transition-delay: 0.2s; }

/* Without JS, never hide content. */
html:not(.js) .reveal {
  opacity: 1;
  transform: none;
  filter: none;
}

.snap-next {
  position: absolute;
  bottom: var(--size-5);
  left: 50%;
  translate: -50% 0;
  color: var(--color-heading);
  opacity: 0.6;
  animation: snap-bob 2.4s ease-in-out infinite;

  &:hover {
    opacity: 1;
  }

  /* Phones and short screens: the block's content can fill the screen
     (stacked buttons), so the arrow joins the normal flow beneath it
     instead of being pinned to the bottom edge over the buttons. */
  @media (max-width: 48rem), (max-height: 40rem) {
    position: static;
    translate: none;
    align-self: center;
    margin-top: var(--size-6);
  }
}

/* Lets .snap-next stack under the content when it's in normal flow. */
@media (max-width: 48rem), (max-height: 40rem) {
  .snap-block {
    flex-direction: column;
    justify-content: center;
  }
}

@keyframes snap-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(6px); }
}

.snap-dots {
  position: fixed;
  right: var(--size-5);
  top: 50%;
  translate: 0 -50%;
  z-index: 40;
  display: flex;
  flex-direction: column;
  gap: var(--size-3);

  /* On phones the dots would crowd the text; touch scrolling is enough. */
  @media (max-width: 40rem) {
    display: none;
  }
}

.snap-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1px solid var(--color-heading);
  background: transparent;
  transition: background-color 0.3s, transform 0.3s;

  &.is-active {
    background: var(--color-heading);
    transform: scale(1.25);
  }
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--size-5);
  margin-block: var(--size-6);

  @media (max-width: 48rem) {
    grid-template-columns: 1fr;
    gap: var(--size-3);
  }
}

.feature {
  background: rgb(255 255 255 / 60%);
  border: 1px solid color-mix(in srgb, var(--color-heading) 12%, transparent);
  border-radius: var(--radius-card);
  padding: var(--size-5);

  & p {
    margin: 0;
  }
}

/* --- Staff --- */
.staff-group + .staff-group {
  margin-top: var(--size-8);
}

.staff-group-title {
  text-align: center;
  margin-bottom: var(--size-6);
}

/* Flex rather than grid so a group with only one or two people still
   sits centered under its heading. */
.staff-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--size-6);

  & > li {
    width: 15rem;
  }
}

.staff-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  text-decoration: none;
  color: inherit;
  padding: var(--size-4);
  border-radius: var(--radius-card);
  transition: background-color 0.3s;

  &:hover {
    background: var(--color-surface-alt);
  }

  &:hover .staff-card-photo {
    transform: scale(1.03);
  }
}

.staff-card-photo {
  width: 11rem;
  height: 11rem;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: var(--size-4);
  box-shadow: var(--shadow-card);
  transition: transform 0.4s var(--ease-gentle);
}

.headshot-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-accent2-soft);
  color: var(--color-accent2-text);
  font-family: var(--font-display);
  font-size: 2.5rem;
}

.staff-card-name {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--color-heading);
}

.staff-card-title {
  color: var(--color-text-muted);
  font-size: 0.95rem;
}

.staff-profile {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
  gap: var(--size-8);
  align-items: start;

  @media (max-width: 48rem) {
    grid-template-columns: 1fr;
    gap: var(--size-6);
  }
}

.staff-profile-main {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);

  &.headshot-placeholder {
    font-size: 5rem;
  }
}

.staff-profile-thumbs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--size-2);
  margin-top: var(--size-2);

  & img {
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 8px;
  }
}

.contact-panel {
  max-width: 40rem;
  margin-inline: auto;
}

/* --- Articles --- */
.article-list {
  list-style: none;
  margin: 0 auto;
  padding: 0;
  display: grid;
  gap: var(--size-6);
  max-width: 52rem;
}

.article-card {
  display: grid;
  grid-template-columns: 16rem 1fr;
  gap: var(--size-5);
  text-decoration: none;
  color: inherit;
  background: var(--color-surface);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  transition: box-shadow 0.3s, transform 0.3s var(--ease-gentle);

  &:hover {
    box-shadow: var(--shadow-card-hover);
    transform: translateY(-2px);
  }

  &:not(:has(.article-card-cover)) {
    grid-template-columns: 1fr;
  }

  @media (max-width: 40rem) {
    grid-template-columns: 1fr;
  }
}

.article-card-cover {
  width: 100%;
  height: 100%;
  min-height: 12rem;
  object-fit: cover;
}

.article-card-body {
  padding: var(--size-5);

  & p:last-of-type {
    margin-bottom: var(--size-3);
  }
}

.article-card-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
}

.article-meta {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  letter-spacing: 0.03em;
  margin-bottom: var(--size-2);
}

.read-more {
  color: var(--color-heading);
  font-weight: 500;
}

.article-container {
  max-width: 46rem;
}

.article-header {
  margin-bottom: var(--size-6);
}

.byline {
  font-weight: 500;
  color: var(--color-heading);
}

.article-cover {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: var(--radius-card);
  margin-bottom: var(--size-6);
  box-shadow: var(--shadow-card);
}

/* Stacked rather than a grid: each author card can carry a full bio. */
.article-authors {
  display: grid;
  gap: var(--size-6);
  margin-top: var(--size-8);
  padding-top: var(--size-6);
  border-top: 1px solid var(--color-border);
}

.author-card {
  display: flex;
  gap: var(--size-4);
  align-items: flex-start;

  & p {
    margin: 0;
  }

  & .author-photo {
    width: 5rem;
    height: 5rem;
    border-radius: 50%;
    object-fit: cover;
    flex: none;
  }

  & .author-bio {
    font-size: 0.98rem;
    line-height: 1.6;
    margin-top: var(--size-2);

    & p {
      margin-bottom: var(--size-2);
    }

    & img {
      margin-block: var(--size-2);
    }
  }

  & .author-role {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--color-text-muted);
  }

  & .author-name {
    font-family: var(--font-display);
    font-size: 1.15rem;
    color: var(--color-heading);
  }
}

.author-social {
  list-style: none;
  margin: var(--size-1) 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: var(--size-3);
  font-size: 0.9rem;
}

.preview-banner {
  position: sticky;
  top: var(--nav-height);
  z-index: 10;
  background: #fff6d6;
  border-bottom: 1px solid #e7d48a;
  padding: var(--size-2) var(--size-4);
  text-align: center;
  font-size: 0.95rem;

  & a {
    margin-left: var(--size-3);
  }
}

/* Rich text from the editor (article bodies, staff bios). */
.prose {
  font-size: 1.125rem;
  line-height: 1.75;

  & h2 {
    font-size: 1.85rem;
    margin-top: var(--size-7);
  }

  & h3 {
    margin-top: var(--size-6);
  }

  & img {
    border-radius: var(--radius-card);
    margin-block: var(--size-5);
    height: auto;
  }

  & blockquote {
    margin: var(--size-6) 0;
    padding: var(--size-1) 0 var(--size-1) var(--size-5);
    border-left: 3px solid var(--color-primary);
    font-family: var(--font-display);
    font-size: 1.25rem;
    color: var(--color-heading);
  }

  & ul,
  & ol {
    padding-left: 1.4em;
    margin: 0 0 var(--size-4);
  }

  & li {
    margin-bottom: var(--size-1);
  }

  & pre {
    background: var(--color-surface-alt);
    padding: var(--size-4);
    border-radius: 8px;
    overflow-x: auto;
    font-size: 0.95rem;
  }

  & .ql-align-center { text-align: center; }
  & .ql-align-right { text-align: right; }
  & .ql-align-justify { text-align: justify; }
  & .ql-indent-1 { padding-left: 3em; }
  & .ql-indent-2 { padding-left: 6em; }
  & .ql-indent-3 { padding-left: 9em; }
}

/* --- Appointments --- */
.booking-hero {
  text-align: center;

  & .muted {
    margin-top: var(--size-3);
    font-size: 0.9rem;
  }
}

.booking-list {
  list-style: none;
  margin: var(--size-5) auto 0;
  padding: 0;
  max-width: 40rem;
}

.booking-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--size-4);
  padding-block: var(--size-4);
  border-bottom: 1px solid var(--color-border);

  & > div {
    display: flex;
    flex-direction: column;
  }
}

.booking-name {
  font-family: var(--font-display);
  font-size: 1.15rem;
  text-decoration: none;
}

/* --- Contact --- */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: var(--size-8);

  @media (max-width: 48rem) {
    grid-template-columns: 1fr;
    gap: var(--size-6);
  }

  & .contact-panel {
    margin: 0;
    max-width: none;
  }
}

.contact-details h2 {
  font-size: 1.5rem;
}

.notice {
  background: var(--color-accent2-tint);
  border-left: 3px solid var(--color-accent2);
  color: var(--color-text);
  padding: var(--size-3) var(--size-4);
  border-radius: 0 8px 8px 0;
  font-size: 0.95rem;
  margin-block: var(--size-4);
}

.contact-form {
  background: var(--color-surface);
  padding: var(--size-6);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);

  @media (max-width: 40rem) {
    padding: var(--size-4);
  }
}

/* --- Forms --- */
.field {
  margin-bottom: var(--size-4);
  border: 0;
  padding: 0;
  min-width: 0;

  & > label,
  & > legend {
    display: block;
    font-weight: 500;
    margin-bottom: var(--size-1);
    color: var(--color-heading);
  }

  & label:has(> input[type="checkbox"]),
  & label:has(> input[type="radio"]) {
    display: flex;
    align-items: center;
    gap: var(--size-2);
    font-weight: 400;
    cursor: pointer;
  }

  & input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
  & textarea,
  & select {
    width: 100%;
    padding: 0.65rem 0.8rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-btn);
    font: inherit;
    font-size: 1rem;
    background: white;
    color: var(--color-text);
    transition: border-color 0.2s, box-shadow 0.2s;
  }

  & input:focus,
  & textarea:focus,
  & select:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-primary) 18%, transparent);
  }

  & input[type="checkbox"],
  & input[type="radio"] {
    width: auto;
    margin: 0;
    accent-color: var(--color-primary);
  }

  & textarea {
    min-height: 9rem;
    resize: vertical;
  }
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--size-4);

  @media (max-width: 40rem) {
    grid-template-columns: 1fr;
    gap: 0;
  }
}

.optional {
  font-weight: 400;
  color: var(--color-text-muted);
  font-size: 0.9em;
}

.field-hint {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin-top: var(--size-1);
  margin-bottom: 0;
}

.form-error {
  color: var(--color-danger);
  background: color-mix(in srgb, var(--color-danger) 8%, transparent);
  padding: var(--size-2) var(--size-3);
  border-radius: 8px;
  margin-bottom: var(--size-4);
}

.form-success {
  color: var(--color-success);
  background: color-mix(in srgb, var(--color-success) 10%, transparent);
  padding: var(--size-3) var(--size-4);
  border-radius: 8px;
  margin-bottom: var(--size-4);
}

.honeypot {
  position: absolute;
  left: -9999px;
}

/* --- Lightbox --- */
.js-lightbox {
  cursor: zoom-in;
}

.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--color-text) 92%, black);
  padding: var(--size-6);
  align-items: center;
  justify-content: center;

  &.is-open {
    display: flex;
  }
}

.lightbox-img {
  max-width: 100%;
  max-height: 100%;
  border-radius: 8px;
}

.lightbox-close {
  position: absolute;
  top: var(--size-4);
  right: var(--size-5);
  background: none;
  border: none;
  color: white;
  font-size: 2.5rem;
  line-height: 1;
  cursor: pointer;
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  background: rgb(255 255 255 / 12%);
  border: none;
  color: white;
  cursor: pointer;
  padding: var(--size-2);
  border-radius: 50%;

  &[hidden] {
    display: none;
  }
}

.lightbox-prev { left: var(--size-4); }
.lightbox-next { right: var(--size-4); }

/* --- Misc --- */
.not-found {
  max-width: 36rem;
  margin: var(--size-8) auto;
  text-align: center;

  & .btn-row {
    justify-content: center;
    margin-top: var(--size-6);
  }
}

.mt-1 { margin-top: var(--size-1); }
.mt-4 { margin-top: var(--size-4); }
.mt-6 { margin-top: var(--size-6); }
.mt-8 { margin-top: var(--size-8); }
.mb-4 { margin-bottom: var(--size-4); }
.max-w-sm { max-width: 24rem; }
.max-w-lg { max-width: 36rem; }
.max-w-content { max-width: 48rem; }
.inline-form { display: inline; }
.nowrap { white-space: nowrap; }

/* Header row order: logo, links, menu button. On phones the links drop
   to their own full-width row below (the collapsible menu). */
.site-nav .site-nav-brand { order: 0; }
.site-nav nav { order: 1; }
.site-nav .site-nav-toggle { order: 2; }

@media (max-width: 52rem) {
  .site-nav nav { order: 3; }
}

/* A short gold rule under a headline. */
.accent-rule {
  display: block;
  width: 3.5rem;
  height: 3px;
  border-radius: 2px;
  background: var(--color-accent);
  margin: 0 auto var(--size-5);
}

/* --- Header logo (HeaderLogo) --- */
.site-nav .site-nav-brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
  line-height: 1;
}

.site-logo {
  display: block;
  height: 5rem;
  width: auto;
  overflow: visible;

  & .logo-text-main {
    font-family: var(--font-logo);
    font-weight: 400;
  }

  & .logo-text-band,
  & .logo-text-sub {
    font-family: var(--font-body);
    font-weight: 500;
  }

  & .logo-text-place {
    font-family: var(--font-body);
    font-weight: 500;
    fill: var(--color-text-muted);
  }

  & .logo-text-main,
  & .logo-text-sub {
    fill: var(--color-heading);
  }

  & .logo-text-band {
    fill: white;
  }

  & .logo-band {
    fill: var(--color-primary);
  }

  /* The compass is a faceted star: each point has a lighter and a darker
     half, which is what gives it depth. The source art is white / light
     grey / mid grey for a dark background; on this light header the same
     three steps run from faint to strong, blended from the heading color
     so the compass follows the theme. */
  & .logo-star-line {
    /* Ring and the light half of every point (white in the source). */
    fill: color-mix(in srgb, var(--color-heading) 22%, var(--color-bg));
  }

  & .logo-star-light {
    /* Shaded half of the short diagonal points (light grey). */
    fill: color-mix(in srgb, var(--color-heading) 38%, var(--color-bg));
  }

  & .logo-star-dark {
    /* Shaded half of the long cardinal points (mid grey). */
    fill: color-mix(in srgb, var(--color-heading) 52%, var(--color-bg));
  }
}

@media (max-width: 52rem) {
  .site-logo {
    height: 4.2rem;
  }
}
