/* Shared identity for the React site and Quarto publication. */
:root {
  --paper: #f4f2eb;
  --paper-deep: #e9e9df;
  --ink: #202823;
  --muted: #59655b;
  --line: #d2d4c8;
  --blue: #002fa7;
  --blue-dark: #062677;
  --font-body: 'DM Sans', sans-serif;
  --font-editorial: 'Instrument Serif', Georgia, serif;
  --text-small: 18px;
  --tracking-display: -0.035em;
  --tracking-heading: -0.025em;
  --tracking-title: -0.02em;
  --page-width: 1320px;
  --header-height: 76px;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: 100px;
  overflow-x: hidden;
}
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 19px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
::selection {
  background: #dce6ff;
  color: var(--blue);
}
:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 5px;
}
.site-container {
  width: calc(100% - 48px);
  max-width: var(--page-width);
  margin-inline: auto;
}
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--paper);
}
.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header-height);
  gap: 20px;
  border-bottom: 1px solid var(--line);
}
.site-brand {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  font: 600 23px/1.2 var(--font-body);
  letter-spacing: var(--tracking-heading);
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}
.site-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  padding: 12px 24px 24px;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  gap: 4px;
  max-height: calc(100svh - var(--header-height));
  overflow-y: auto;
}
.site-header[data-open='true'] .site-menu {
  display: flex;
  flex-direction: column;
  align-items: stretch;
}
.site-menu .nav-link,
.nav-cta {
  min-height: 48px;
  padding: 12px 0;
  font: 400 18px/1.4 var(--font-body);
  color: var(--ink);
  text-decoration: none;
}
.site-menu .nav-link:hover,
.site-menu [aria-current='page'] {
  color: var(--blue);
}
.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 20px;
  color: var(--blue);
}
.nav-cta:hover,
.nav-cta[aria-current='page'] {
  text-decoration: underline;
  text-underline-offset: 7px;
}
.header-profiles {
  display: flex;
  flex-direction: column;
  gap: 4px;
  border-top: 1px solid var(--line);
  margin-top: 12px;
  padding-top: 12px;
}
.nav-profile {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  color: var(--ink);
  font: 400 18px/1.4 var(--font-body);
  text-decoration: none;
}
.nav-profile:hover {
  color: var(--blue);
}
.menu-toggle {
  display: inline-flex;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: 400 18px/1.4 var(--font-body);
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 48px;
  padding: 0;
  cursor: pointer;
}
.arrow {
  flex-shrink: 0;
  transition: transform 0.22s ease;
}
a:hover > .arrow,
button:hover > .arrow {
  transform: translate(3px, -1px);
}
.button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 56px;
  padding: 14px 24px;
  gap: 28px;
  color: var(--paper);
  background: var(--blue);
  border: 1px solid var(--blue);
  font: 500 18px/1.5 var(--font-body);
  text-decoration: none;
  cursor: pointer;
  transition:
    background 0.2s,
    border-color 0.2s;
}
.button:hover {
  color: var(--paper);
  background: var(--blue-dark);
  border-color: var(--blue-dark);
}
.button:disabled {
  cursor: wait;
  opacity: 0.65;
}
.text-link {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  min-height: 52px;
  padding-block: 7px;
  color: var(--ink);
  font: 500 18px/1.5 var(--font-body);
  text-decoration: none;
  background: transparent;
  border: 0;
  border-bottom: 1px solid currentColor;
  cursor: pointer;
}
.text-link:hover {
  color: var(--blue);
}
.profile-link {
  justify-content: flex-start;
  gap: 10px;
}
.skip-link {
  position: fixed;
  left: 16px;
  top: -100px;
  z-index: 5000;
  padding: 14px 22px;
  background: var(--blue);
  color: var(--paper);
  text-decoration: none;
}
.skip-link:focus {
  top: 12px;
}
.site-footer {
  background: var(--paper);
  padding: 24px 0 32px;
  font-family: var(--font-body);
}
.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px 32px;
  font-size: var(--text-small);
  color: var(--muted);
}
.footer-social {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  width: 100%;
  gap: 8px 24px;
}
.footer-social a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  min-width: 0;
  font-size: var(--text-small);
  color: var(--ink);
  text-decoration: none;
}
.footer-social a:hover {
  color: var(--blue);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}
.social-icon {
  display: block;
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  object-fit: contain;
}
@media (min-width: 768px) {
  :root {
    --header-height: 96px;
  }
  html {
    scroll-padding-top: 120px;
  }
  body {
    font-size: 20px;
  }
  .site-container {
    width: calc(100% - 128px);
  }
  .site-brand {
    font-size: 26px;
  }
  .site-footer {
    padding-block: 28px;
  }
  .footer-inner {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
  }
  .footer-social {
    display: flex;
    flex-wrap: wrap;
    width: auto;
    gap: 8px 28px;
  }
}
@media (min-width: 992px) {
  .menu-toggle {
    display: none;
  }
  .site-menu,
  .site-header[data-open='true'] .site-menu {
    display: flex;
    position: static;
    padding: 0;
    background: transparent;
    border: 0;
    flex-direction: row;
    align-items: center;
    gap: 34px;
    max-height: none;
    overflow: visible;
  }
  .header-profiles {
    flex-direction: row;
    border-top: 0;
    border-left: 1px solid var(--line);
    margin-top: 0;
    padding: 0 0 0 20px;
  }
  .nav-profile {
    width: 48px;
    justify-content: center;
  }
  .nav-profile-label {
    position: absolute;
    top: calc(100% - 4px);
    right: 0;
    z-index: 1;
    padding: 3px 8px;
    background: var(--ink);
    color: var(--paper);
    white-space: nowrap;
    visibility: hidden;
  }
  .nav-profile:hover .nav-profile-label,
  .nav-profile:focus-visible .nav-profile-label {
    visibility: visible;
  }
}
@media (min-width: 768px) and (max-width: 1023px) {
  .site-container {
    width: calc(100% - 64px);
  }
  .footer-inner {
    align-items: flex-start;
  }
}
@media (min-width: 992px) and (max-width: 1023px) {
  .site-menu {
    gap: 24px;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto !important;
  }
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
