/* Beta-only glass UI layer. Keeps CRNS navy, green, and sky-blue colors. */
:root {
  --crns-glass-surface: rgba(255, 255, 255, .68);
  --crns-glass-line: rgba(255, 255, 255, .48);
  --crns-glass-shadow: rgba(24, 43, 62, .14);
}
.dark {
  --crns-glass-surface: rgba(31, 52, 48, .72);
  --crns-glass-line: rgba(220, 239, 231, .18);
  --crns-glass-shadow: rgba(0, 0, 0, .24);
}

/* Frosted CRNS navy navigation; remains fixed in its current position. */
header.fixed.top-0 {
  background: rgba(31, 55, 82, .84) !important;
  border-bottom: 1px solid rgba(216, 238, 246, .28);
  border-radius: 0 0 18px 18px;
  box-shadow: 0 10px 30px rgba(22, 43, 63, .2) !important;
  -webkit-backdrop-filter: blur(18px) saturate(125%);
  backdrop-filter: blur(18px) saturate(125%);
}
header.fixed.top-0 nav a,
header.fixed.top-0 nav button {
  border-radius: 12px;
  transition: background-color .18s ease, box-shadow .18s ease;
}
header.fixed.top-0 nav a:hover,
header.fixed.top-0 nav button:hover {
  background-color: rgba(255, 255, 255, .12);
}

/* The hero keeps its existing full-bleed carousel and gradient. */
main section:first-of-type > div.relative.z-10 > p:first-child {
  width: fit-content;
  max-width: min(100%, 48rem);
  margin-inline: auto;
  padding: 14px 24px;
  border: 1px solid rgba(255, 255, 255, .38);
  border-radius: 18px;
  background: rgba(31, 55, 82, .48);
  box-shadow: 0 12px 32px rgba(18, 36, 54, .16), inset 0 1px 0 rgba(255, 255, 255, .2);
  -webkit-backdrop-filter: blur(14px) saturate(125%);
  backdrop-filter: blur(14px) saturate(125%);
}

/* Layout cards, dashboard cards, member panels, and admin panels. */
main section:not(:first-of-type) article,
main section:not(:first-of-type) [data-slot="card"],
main section:not(:first-of-type) article[class~="bg-white/5"],
[role="dialog"],
[role="menu"],
aside [data-slot="card"],
aside div[class*="rounded-lg"][class*="border"],
aside div[class*="rounded-xl"][class*="border"],
main div[class*="rounded-lg"][class*="border"],
main div[class*="rounded-xl"][class*="border"],
main div[class*="rounded-2xl"][class*="border"] {
  border-color: var(--crns-glass-line) !important;
  border-radius: 20px !important;
  background-color: var(--crns-glass-surface) !important;
  box-shadow: 0 12px 32px var(--crns-glass-shadow), inset 0 1px 0 rgba(255, 255, 255, .36);
  -webkit-backdrop-filter: blur(16px) saturate(125%);
  backdrop-filter: blur(16px) saturate(125%);
}

/* Preserve the white text and existing green section color on layout cards. */
main section.bg-primary article,
main section.bg-primary article[class~="bg-white/5"] {
  background-color: rgba(255, 255, 255, .11) !important;
  border-color: rgba(255, 255, 255, .28) !important;
}
main section article img {
  border-radius: 14px 14px 0 0;
}

/* Softer, consistent corners for controls across public and member/admin routes. */
input:not([type="checkbox"]):not([type="radio"]),
textarea,
select {
  border-radius: 12px !important;
}
main button:not([aria-label^="Show slide"]),
[role="dialog"] button,
[role="menu"] button {
  border-radius: 12px;
}
:where(a, button, input, textarea, select):focus-visible {
  outline: 3px solid hsl(var(--accent));
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}


/* Same glass treatment for auth, member, and admin routes, which render outside <main>. */
div[class*="rounded-lg"][class*="border"],
div[class*="rounded-xl"][class*="border"],
div[class*="rounded-2xl"][class*="border"],
div[class*="rounded-lg"][class*="shadow"],
div[class*="rounded-xl"][class*="shadow"],
div[class*="rounded-2xl"][class*="shadow"],
[data-slot="card"] {
  border-color: var(--crns-glass-line) !important;
  border-radius: 20px !important;
  background-color: var(--crns-glass-surface) !important;
  box-shadow: 0 12px 32px var(--crns-glass-shadow), inset 0 1px 0 rgba(255,255,255,.36) !important;
  -webkit-backdrop-filter: blur(16px) saturate(125%);
  backdrop-filter: blur(16px) saturate(125%);
}


/* A cool sky-blue sheen makes the frosted surface visible on pale pages. */
div[class*="rounded-lg"][class*="border"],
div[class*="rounded-xl"][class*="border"],
div[class*="rounded-2xl"][class*="border"],
div[class*="rounded-lg"][class*="shadow"],
div[class*="rounded-xl"][class*="shadow"],
div[class*="rounded-2xl"][class*="shadow"],
[data-slot="card"],
main section:not(:first-of-type) article {
  background-image: linear-gradient(135deg, rgba(255,255,255,.44), rgba(173,207,226,.18)) !important;
}
.dark div[class*="rounded-lg"],
.dark div[class*="rounded-xl"],
.dark div[class*="rounded-2xl"],
.dark [data-slot="card"] {
  background-image: linear-gradient(135deg, rgba(223,243,233,.12), rgba(25,48,42,.22)) !important;
}
