/* Shared header and footer, aligned with the page container. */
.site-header {
  --header-padding: 16px;
  min-height: 0;
  height: auto;
  display: flex;
  align-items: center;
  padding: var(--header-padding) 0;
  margin-bottom: 32px;
  border-bottom: 1px solid var(--theme-divider, var(--line));
}
.site-header .brand-logo, .site-footer .brand-logo {
  display: block;
  width: 115px;
  height: auto;
  max-width: 100%;
  object-fit: contain;
}
.site-header .brand { width: 115px; height: 40px; overflow: hidden; flex: 0 0 auto; }
.site-header nav { display: flex; align-self: stretch; align-items: stretch; gap: 24px; font-size: 15px; }
.site-header nav > a {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 8px 0;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  color: var(--theme-ink-readable, var(--ink));
}
.site-header nav > a[aria-current="page"],
.site-header nav > a:hover { color: var(--theme-accent-readable, var(--rust)); }
.site-header nav > a[aria-current="page"]::after {
  content: '';
  position: absolute;
  inset-inline: 0;
  bottom: calc(-1 * var(--header-padding) - 2px);
  margin-bottom: -1px;
  height: 2px;
  background: currentColor;
  pointer-events: none;
}
.site-header nav > a:focus-visible { outline: 2px solid var(--theme-accent-readable, var(--rust)); outline-offset: 3px; }
.page-about .site-header { margin-bottom: 0; }
.page-about .about-page-main { padding-top: 32px; }
.site-footer { border-top: 1px solid var(--theme-divider, var(--line)); padding: 24px 0; }
.site-footer-top { display: flex; flex-direction: row; align-items: center; justify-content: space-between; gap: 24px; padding: 0; text-align: left; }
.site-footer-left { display: flex; flex: 0 1 auto; flex-direction: row; align-items: center; gap: 16px; text-align: left; }
.site-footer-left .brand { width: 88px; height: 32px; overflow: hidden; flex: 0 0 auto; }
.site-footer .brand-logo { width: 88px; }
.site-footer-left p { display: block; margin: 0; color: var(--theme-muted-readable, var(--muted)); font-size: 13px; white-space: normal; }
.site-footer .footer-copy { flex: 0 0 auto; margin: 0; text-align: right; color: var(--theme-muted-readable, var(--muted)); font-size: 13px; }
@media (max-width: 639px) {
  .site-header { --header-padding: 11px; gap: 12px; margin-bottom: 32px; }
  .site-header .brand { width: 90px; height: 32px; flex: 0 0 90px; min-width: 0; }
  .site-header .brand-logo { width: 90px; }
  .site-header nav { flex: 0 0 auto; gap: 12px; font-size: 12px; }
  .site-header nav > a:first-child { display: inline-flex; }
  .page-about .about-page-main { padding-top: 32px; }
  .site-footer { padding: 24px 0; }
  .site-footer-top { flex-direction: column; align-items: flex-start; gap: 10px; }
  .site-footer-left { flex-basis: auto; flex-direction: column; align-items: flex-start; gap: 10px; }
  .site-footer .footer-copy { text-align: left; }
}
