/* Safe, additive layer for the 2026-10-01 update. Keep the live theme intact. */

/* Shared navigation stays inside the viewport; only the menu itself can scroll. */
.site-header .desktop-nav,
.contest-site-header .desktop-nav {
  flex: 1 1 auto;
  min-width: 0;
  display: flex !important;
  flex-wrap: nowrap !important;
  justify-content: flex-start;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-width: thin;
  white-space: nowrap;
  gap: clamp(8px, 1vw, 16px);
}
.site-header .desktop-nav a,
.contest-site-header .desktop-nav a { flex: 0 0 auto; font-size: 11px; }
.site-header .desktop-nav a::after { bottom: -7px; }
.contest-site-header-inner { gap: 16px; }
.stitch-nav a[aria-current="page"] { color: #003f87; }
.stitch-nav a[aria-current="page"]::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 3px;
  left: 0;
  height: 3px;
  border-radius: 3px;
  background: #0056b3;
}
@media (max-width: 900px) {
  .header-inner { flex-wrap: wrap; min-height: 0; padding-block: 12px; }
  .site-header .desktop-nav { width: 100%; margin-left: 0; gap: 8px 13px; }
  .site-header .desktop-nav a { font-size: 11px; }
  .contest-site-header-inner { flex-wrap: wrap; padding-block: 6px; }
  .contest-site-header .desktop-nav { order: 4; width: 100%; gap: 16px; }
  .contest-site-header .desktop-nav a { padding-block: 10px; }
}

/* Intro controls remain tappable and the splash can be suppressed accessibly. */
.site-intro-skip {
  position: absolute;
  z-index: 6;
  top: max(18px, env(safe-area-inset-top));
  right: max(18px, env(safe-area-inset-right));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 108px;
  min-height: 48px;
  padding: 10px 16px;
  border: 1px solid rgba(255,255,255,.68);
  border-radius: 999px;
  color: #fff;
  background: rgba(3,22,61,.54);
  box-shadow: 0 7px 22px rgba(0,0,0,.2);
  font: inherit;
  font-size: 14px;
  font-weight: 850;
  cursor: pointer;
  backdrop-filter: blur(8px);
}
.site-intro-skip:hover { background: rgba(3,22,61,.8); }
.site-intro-skip:focus-visible { outline: 3px solid #ffdf38; outline-offset: 3px; }
html.site-intro-suppressed .site-intro-splash { display: none !important; }
html.site-intro-suppressed body.portal-intro-active { overflow: auto !important; }

/* Keep the welcome screen for visitors who request reduced motion, but render
   it as a still frame rather than suppressing it. */
html.site-intro-reduced .site-intro-splash { transition: none !important; }
html.site-intro-reduced .site-intro-background,
html.site-intro-reduced .site-intro-overlay,
html.site-intro-reduced .site-intro-pattern,
html.site-intro-reduced .site-intro-ambient,
html.site-intro-reduced .site-intro-splash::after,
html.site-intro-reduced .site-intro-content,
html.site-intro-reduced .site-intro-splash .stitch-intro-crest,
html.site-intro-reduced .site-intro-eyebrow,
html.site-intro-reduced .site-intro-title,
html.site-intro-reduced .site-intro-line,
html.site-intro-reduced .site-intro-slogan,
html.site-intro-reduced .site-intro-progress > span {
  animation: none !important;
}
html.site-intro-reduced .site-intro-progress > span { width: 100%; }

/* Feedback lookup sits above the report form and returns status only. */
.feedback-page .feedback-shell {
  gap: clamp(22px, 3.4vw, 46px);
  padding-block: clamp(24px, 3.2vw, 44px);
}
.feedback-page .feedback-intro { top: 24px; }
.feedback-content {
  display: grid;
  min-width: 0;
  align-content: start;
  gap: 14px;
}
.feedback-content > .feedback-card {
  min-width: 0;
  padding: clamp(16px, 1.7vw, 20px);
  border-radius: 18px;
  box-sizing: border-box;
}
.feedback-tracking {
  display: grid;
  min-width: 0;
  grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr);
  align-items: center;
  gap: 12px 20px;
  margin: 0;
}
.feedback-tracking-copy {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 12px;
}
.feedback-tracking-copy > span {
  display: grid;
  flex: 0 0 42px;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  color: #fff;
  background: #b72831;
  font-size: 22px;
  font-weight: 850;
}
.feedback-tracking-copy > div { min-width: 0; }
.feedback-tracking-copy .feedback-kicker { margin: 0 0 4px; font-size: 9px; }
.feedback-tracking-copy h2 { margin: 0; color: #083d80; font-size: clamp(19px, 2vw, 23px); line-height: 1.2; }
.feedback-tracking-copy p:last-child { margin: 5px 0 0; color: #68798e; font-size: 12px; line-height: 1.45; }
.feedback-success code {
  display: inline-block;
  margin: 6px 0;
  padding: 8px 10px;
  border: 1px solid #cbe7d2;
  border-radius: 8px;
  color: #125f32;
  background: #fff;
  font-size: 15px;
  font-weight: 900;
  letter-spacing: .08em;
  overflow-wrap: anywhere;
}
.feedback-tracking-form { display: grid; min-width: 0; gap: 6px; margin: 0; }
.feedback-tracking-form label { color: #24344f; font-size: 13px; font-weight: 850; }
.feedback-tracking-form > div { display: flex; min-width: 0; gap: 8px; }
.feedback-tracking-form input {
  flex: 1;
  min-width: 0;
  min-height: 48px;
  box-sizing: border-box;
  padding: 10px 13px;
  border: 1px solid #cbd8e8;
  border-radius: 10px;
  font: inherit;
  font-size: 16px;
  text-transform: uppercase;
}
.feedback-tracking-form button {
  flex: 0 0 auto;
  min-height: 48px;
  padding: 10px 15px;
  border: 0;
  border-radius: 10px;
  color: #fff;
  background: #c51625;
  font: inherit;
  font-size: 15px;
  font-weight: 850;
  white-space: nowrap;
  cursor: pointer;
}
.feedback-tracking-form button:disabled { cursor: wait; opacity: .72; }
.feedback-tracking-form button:focus-visible,
.feedback-tracking-form input:focus-visible { outline: 3px solid #ffd633; outline-offset: 2px; }
.feedback-lookup-feedback { grid-column: 1 / -1; min-width: 0; }
.feedback-lookup-feedback:empty { display: none; }
.feedback-lookup-feedback .feedback-success,
.feedback-lookup-feedback .feedback-error { margin: 0; padding: 10px 12px; font-size: 13px; }
.feedback-form-card .feedback-card-heading { margin-bottom: 12px; }
.feedback-form-card .feedback-form { gap: 8px; }
.feedback-form-card .feedback-field { min-width: 0; gap: 5px; }
.feedback-form-card .feedback-field label,
.feedback-form-card .feedback-image-field legend { font-size: 13px; }
.feedback-form-card .feedback-field input,
.feedback-form-card .feedback-field select,
.feedback-form-card .feedback-field textarea {
  box-sizing: border-box;
  min-width: 0;
  min-height: 46px;
  padding: 9px 12px;
  font-size: 16px;
}
.feedback-form-card .feedback-field textarea { min-height: 90px; }
.feedback-form-card .feedback-field small,
.feedback-form-card .feedback-image-field > p { font-size: 11px; }
.feedback-form-card .feedback-image-field { min-width: 0; padding: 9px; }
.feedback-form-card .feedback-image-field > p { margin-bottom: 7px; }
.feedback-form-card .feedback-image-actions { gap: 8px; }
.feedback-form-card .feedback-image-choice { min-width: 0; min-height: 48px; box-sizing: border-box; padding: 9px; }
.feedback-form-card .feedback-image-choice strong { font-size: 12px; }
.feedback-form-card .feedback-image-choice small { font-size: 11px; }
.feedback-form-card .feedback-consent { font-size: 12px; }
.feedback-form-card .feedback-submit { min-height: 48px; font-size: 15px; }
@media (max-width: 900px) {
  .feedback-page .feedback-shell { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .feedback-page .feedback-intro { position: static; }
  .feedback-page .feedback-intro > p:last-child { max-width: none; }
}
@media (max-width: 560px) {
  .feedback-page .feedback-shell { gap: 14px; padding-block: 20px; }
  .feedback-content { gap: 10px; }
  .feedback-content > .feedback-card { padding: 16px; border-radius: 15px; }
  .feedback-tracking { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .feedback-tracking-form > div { display: grid; grid-template-columns: minmax(0, 1fr); }
  .feedback-tracking-form input,
  .feedback-tracking-form button { width: 100%; }
  .feedback-form-card .feedback-form { grid-template-columns: minmax(0, 1fr); }
  .feedback-form-card .feedback-field-full,
  .feedback-form-card .feedback-consent,
  .feedback-form-card .feedback-submit { grid-column: auto; }
  .feedback-form-card .feedback-image-actions { grid-template-columns: minmax(0, 1fr); }
}

/* The gallery is a new route; styles are scoped so existing card layouts are unchanged. */
.gallery-photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
  gap: 20px;
}
.gallery-photo-card {
  display: block;
  overflow: hidden;
  border: 1px solid rgba(194,198,212,.7);
  border-radius: 18px;
  color: inherit;
  background: #fff;
  box-shadow: 0 4px 20px rgba(0,86,179,.08);
  text-decoration: none;
}
.gallery-photo-card img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: #edf4fa;
}
.gallery-photo-card > span { display: grid; gap: 6px; padding: 14px 16px; }
.gallery-photo-card strong { line-height: 1.4; }
.gallery-photo-card time { color: #748197; font-size: 13px; }
.gallery-photo-card:focus-visible { outline: 3px solid #2453a5; outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto !important; }
  *, *::before, *::after { scroll-behavior: auto !important; }
}
