/* Final shared layout rules. Keep component-specific ratios intact. */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 100px;
}
body {
  margin: 0;
  min-width: 0;
}
img,
svg,
video {
  max-width: 100%;
}
img,
video {
  vertical-align: middle;
}
main,
section,
article,
aside,
figure,
form,
.page-shell,
.hero-copy {
  min-width: 0;
}
input,
select,
textarea,
button {
  font: inherit;
}
input:not([type='checkbox']):not([type='radio']):not([type='hidden']),
select,
textarea {
  max-width: 100%;
}
p,
h1,
h2,
h3,
a,
td,
th {
  overflow-wrap: break-word;
}
button,
a,
summary {
  -webkit-tap-highlight-color: transparent;
}
button:disabled {
  cursor: not-allowed;
}
[hidden] {
  display: none !important;
}
.site-experience [id] {
  scroll-margin-top: 100px;
}
.site-experience .header-inner {
  gap: 20px;
}
.site-experience .desktop-nav {
  gap: clamp(12px, 1.4vw, 26px);
}
.site-experience .nav-link {
  white-space: nowrap;
}
.site-experience .hero-institutional {
  max-width: 100%;
}
.site-experience .route-strava-interactive {
  width: 100%;
}
.site-experience .route-strava-interactive iframe {
  max-width: 100%;
}
.site-experience .route-strava-layout,
.site-experience .gallery-grid {
  min-width: 0;
}
.site-experience .route-strava-segments summary:focus-visible {
  outline: 3px solid #3398ee;
  outline-offset: 3px;
}
.site-experience .gallery-dialog {
  overscroll-behavior: contain;
}
/* The seven-link navigation needs a menu at tablet and narrow laptop widths. */
@media (max-width: 1199px) {
  .site-experience .desktop-nav,
  .site-experience .header-cta {
    display: none !important;
  }
  .site-experience .mobile-toggle {
    display: inline-grid !important;
    flex-shrink: 0;
  }
}
@media (min-width: 1200px) {
  .site-experience .mobile-toggle,
  .site-experience .mobile-menu {
    display: none !important;
  }
}
@media (max-width: 767px) {
  .site-experience .page-shell {
    width: calc(100% - 32px);
  }
  .site-experience .header-inner {
    gap: 12px;
  }
  .site-experience .brand {
    min-width: 0;
    max-width: calc(100% - 60px);
  }
  .site-experience .btn {
    white-space: normal;
    text-align: center;
  }
  .site-experience .hero-actions {
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  }
  .site-experience .hero-actions .btn {
    min-width: 0;
  }
  .site-experience .hero-institutional-label {
    overflow-wrap: anywhere;
  }
  .site-experience .route-strava-stats dd {
    font-size: clamp(1.3rem, 6vw, 1.65rem);
  }
  .site-experience .route-strava-stats dt {
    min-height: 2.8em;
  }
  .site-experience .route-photo-controls button {
    width: 44px;
    height: 44px;
  }
  .site-experience .route-photos figcaption {
    flex-wrap: wrap;
  }
  .site-experience .footer-inner > *,
  .site-experience .about-hero-grid > * {
    min-width: 0;
  }
  input:not([type='checkbox']):not([type='radio']):not([type='hidden']),
  select,
  textarea {
    font-size: 16px;
  }
  .card {
    min-width: 0;
  }
  .input {
    min-width: 0;
  }
}
@media (max-width: 359px) {
  .site-experience .hero-actions {
    grid-template-columns: minmax(0, 1fr);
  }
  .site-experience .date-card {
    flex-wrap: wrap;
  }
  .site-experience .hero-institutional {
    padding: 16px;
  }
}
@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;
  }
}

@media (max-width: 1199px) {
  .site-experience .mobile-menu.is-open {
    display: grid !important;
  }
}

/* Six current event categories, with balanced rows at each breakpoint. */
.home-page .category-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.home-page .category-card { min-width: 0; }
.home-page .category-card strong,
.home-page .category-card:nth-child(3) strong { font-size: clamp(1.5rem, 2.6vw, 2.4rem); line-height: 1.2; }
.home-page .category-card h3 { line-height: 1.5; overflow-wrap: break-word; }
@media (max-width: 1023px) { .home-page .category-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Keep mobile navigation available throughout the full document. */
@media (max-width: 1199px) {
  body.site-experience {
    padding-top: 73px;
  }
  .site-experience .site-header {
    position: fixed;
    inset: 0 0 auto;
    width: 100%;
    z-index: 1000;
  }
  .site-experience .header-inner {
    height: 72px;
    min-height: 72px;
  }
  .site-experience .mobile-menu {
    top: 72px;
    max-height: 0;
  }
  .site-experience .mobile-menu.is-open {
    max-height: calc(100dvh - 73px);
    overflow-y: auto;
    overscroll-behavior: contain;
  }
}

/* Six categories in three compact rows, including small phones. */
@media (max-width: 767px) {
  .home-page .category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .home-page .category-card {
    display: flex;
    align-items: flex-start;
    min-height: 112px;
    padding: 15px 12px;
    border-radius: 12px;
  }
  .home-page .category-card > div {
    min-width: 0;
  }
  .home-page .category-card strong,
  .home-page .category-card:nth-child(3) strong {
    font-size: clamp(1.1rem, 4.7vw, 1.6rem);
    line-height: 1.15;
    white-space: normal;
  }
  .home-page .category-card h3 {
    margin: 8px 0 0;
    font-size: clamp(0.61rem, 2.35vw, 0.75rem);
    line-height: 1.45;
  }
}