/* Nu Alpha Phi — redesigned layout system */

:root {
  --maroon: #4c1e29;
  --maroon-dark: #3a1620;
  --maroon-soft: rgba(76, 30, 41, 0.08);
  --black: #333;
  --grey-50: #fafafa;
  --grey-100: #f3f3f4;
  --grey-200: #e4e4e6;
  --grey-400: #9a9a9f;
  --grey-600: #666;
  --white: #fff;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 3px rgba(51, 51, 51, 0.04);
  --shadow-md: 0 4px 24px rgba(51, 51, 51, 0.08);
  --header-h: 76px;
  --subnav-h: 49px;
  --scroll-gap: 12px;
  --font-sans: "DM Sans", system-ui, -apple-system, sans-serif;
  --font-display: "DM Sans", system-ui, -apple-system, sans-serif;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.4, 0.64, 1);
  --transition: 0.35s var(--ease);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + var(--subnav-h) + var(--scroll-gap));
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.75;
  color: var(--black);
  background: var(--white);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--maroon);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color var(--transition);
}

a:hover,
a:focus-visible {
  color: var(--maroon-dark);
}

:focus-visible {
  outline: 2px solid var(--maroon);
  outline-offset: 3px;
}

.container {
  width: min(1140px, calc(100% - 2.5rem));
  margin-inline: auto;
}

/* Skip link */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  z-index: 9999;
  padding: 0.75rem 1.25rem;
  background: var(--maroon);
  color: var(--white);
  border-radius: var(--radius-sm);
  font-weight: 600;
  text-decoration: none;
}

.skip-link:focus {
  top: 1rem;
}

/* Header */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--header-h);
  transition: background var(--transition), box-shadow var(--transition), backdrop-filter var(--transition);
}

.site-header.is-scrolled {
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-sm);
}

.site-header.is-solid {
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-sm);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
  width: min(1200px, calc(100% - 2rem));
  margin-inline: auto;
  gap: 1rem;
}

.site-logo img {
  height: 52px;
  width: auto;
  transition: transform var(--transition);
}

.site-logo:hover img {
  transform: scale(1.02);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  cursor: pointer;
}

.nav-toggle__bar {
  display: block;
  width: 22px;
  height: 2px;
  margin-inline: auto;
  background: var(--black);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.site-nav {
  display: flex;
  align-items: center;
  flex: 1;
  justify-content: flex-end;
  min-width: 0;
}

.nav-list {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: nowrap;
  gap: 0.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-item {
  position: relative;
}

.nav-trigger {
  display: inline-flex;
  align-items: stretch;
  border-radius: var(--radius-sm);
}

.nav-trigger .nav-btn {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
  padding-right: 0.4rem;
}

.nav-chevron-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 0.45rem 0.55rem 0.2rem;
  margin: 0;
  border: none;
  border-radius: var(--radius-sm);
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
  background: transparent;
  color: var(--black);
  font: inherit;
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
}

.site-header:not(.is-scrolled):not(.is-solid) .nav-chevron-btn {
  color: var(--white);
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.35);
}

.nav-trigger:hover .nav-btn,
.nav-trigger:hover .nav-chevron-btn,
.nav-trigger:focus-within .nav-btn,
.nav-trigger:focus-within .nav-chevron-btn {
  background: var(--maroon-soft);
  color: var(--maroon);
}

.site-header:not(.is-scrolled):not(.is-solid) .nav-trigger:hover .nav-btn,
.site-header:not(.is-scrolled):not(.is-solid) .nav-trigger:hover .nav-chevron-btn,
.site-header:not(.is-scrolled):not(.is-solid) .nav-trigger:focus-within .nav-btn,
.site-header:not(.is-scrolled):not(.is-solid) .nav-trigger:focus-within .nav-chevron-btn {
  background: rgba(255, 255, 255, 0.15);
  color: var(--white);
}

.nav-trigger .nav-chevron {
  opacity: 0.7;
}

.nav-link,
.nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.55rem 0.9rem;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--black);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-decoration: none;
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
}

.site-header:not(.is-scrolled):not(.is-solid) .nav-link,
.site-header:not(.is-scrolled):not(.is-solid) .nav-btn {
  color: var(--white);
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.35);
}

.nav-link:hover,
.nav-link:focus-visible,
.nav-btn:hover,
.nav-btn:focus-visible {
  background: var(--maroon-soft);
  color: var(--maroon);
}

.site-header:not(.is-scrolled):not(.is-solid) .nav-link:hover,
.site-header:not(.is-scrolled):not(.is-solid) .nav-link:focus-visible,
.site-header:not(.is-scrolled):not(.is-solid) .nav-btn:hover,
.site-header:not(.is-scrolled):not(.is-solid) .nav-btn:focus-visible {
  background: rgba(255, 255, 255, 0.15);
  color: var(--white);
}

.nav-link.is-active,
.nav-btn.is-active {
  background: transparent;
  font-weight: 600;
}

.site-header:not(.is-scrolled):not(.is-solid) .nav-btn.is-active,
.site-header:not(.is-scrolled):not(.is-solid) .nav-link.is-active {
  background: transparent;
  color: var(--white);
}

.site-header.is-scrolled .nav-link,
.site-header.is-scrolled .nav-btn,
.site-header.is-scrolled .nav-chevron-btn,
.site-header.is-solid .nav-link,
.site-header.is-solid .nav-btn,
.site-header.is-solid .nav-chevron-btn {
  color: var(--black);
  text-shadow: none;
}

.nav-item--portal {
  margin-left: 0.65rem;
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 1.2rem;
  background: linear-gradient(135deg, var(--maroon-dark) 0%, var(--maroon) 55%, #6b2f3d 100%);
  color: var(--white) !important;
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-decoration: none;
  text-shadow: none;
  box-shadow: 0 2px 12px rgba(76, 30, 41, 0.28);
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
}

.nav-cta:hover,
.nav-cta:focus-visible {
  background: linear-gradient(135deg, #1f0c12 0%, var(--maroon-dark) 50%, var(--maroon) 100%);
  color: var(--white) !important;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(76, 30, 41, 0.35);
}

.nav-cta.is-active {
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.35), 0 4px 14px rgba(76, 30, 41, 0.35);
}

.site-header:not(.is-scrolled):not(.is-solid) .nav-cta,
.site-header:not(.is-scrolled):not(.is-solid) .nav-cta:hover,
.site-header.is-scrolled .nav-cta,
.site-header.is-solid .nav-cta {
  color: var(--white) !important;
}

.nav-chevron {
  width: 10px;
  height: 10px;
  opacity: 0.6;
  transition: transform var(--transition);
}

.nav-item.is-open .nav-chevron {
  transform: rotate(180deg);
}

@media (min-width: 901px) {
  .nav-item--dropdown:hover .nav-dropdown,
  .nav-item--dropdown:focus-within .nav-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .nav-item--dropdown:hover .nav-chevron,
  .nav-item--dropdown:focus-within .nav-chevron {
    transform: rotate(180deg);
  }
}

.nav-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 210px;
  margin: 0;
  padding: 0.5rem;
  list-style: none;
  background: var(--white);
  border: 1px solid var(--grey-200);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity var(--transition), transform var(--transition), visibility var(--transition);
}

.nav-item.is-open .nav-dropdown,
.nav-item:focus-within .nav-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-dropdown a {
  display: block;
  padding: 0.6rem 0.85rem;
  border-radius: var(--radius-sm);
  color: var(--black);
  text-decoration: none;
  font-size: 0.9rem;
  transition: background var(--transition), color var(--transition);
}

.nav-dropdown a:hover,
.nav-dropdown a:focus-visible {
  background: var(--maroon-soft);
  color: var(--maroon);
}

/* Hero */
.hero {
  position: relative;
  display: block;
  background-color: var(--black);
}

.hero__bg {
  display: block;
  width: 100%;
  height: auto;
  vertical-align: middle;
}

@media (max-width: 900px) {
  .hero {
    min-height: 100svh;
    overflow: hidden;
  }

  .hero__bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(51, 51, 51, 0.15) 0%,
    rgba(76, 30, 41, 0.35) 50%,
    rgba(51, 51, 51, 0.5) 100%
  );
  pointer-events: none;
}

.hero__content {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  max-width: none;
  padding: calc(var(--header-h) + 2rem) 1.5rem 3rem;
  text-align: center;
  color: var(--white);
}

.hero__eyebrow {
  margin: 0 0 1.25rem;
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 500;
  font-style: normal;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  opacity: 0.85;
}

.hero__title {
  margin: 0;
  max-width: 820px;
  font-family: var(--font-sans);
  font-size: clamp(1.9rem, 7vw, 4.5rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  overflow-wrap: break-word;
}

/* Sections */
.section {
  padding: clamp(4rem, 8vw, 6.5rem) 0;
}

.section--alt {
  background: var(--grey-50);
}

.section--maroon {
  background: var(--maroon);
  color: var(--white);
}

.section--maroon a {
  color: var(--white);
}

.section-header {
  max-width: 640px;
  margin: 0 auto 3rem;
  text-align: center;
}

.section-label {
  display: block;
  margin-bottom: 0.65rem;
  color: var(--maroon);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.section-title {
  margin: 0 0 1rem;
  font-family: var(--font-sans);
  font-size: clamp(1.75rem, 3.5vw, 2.35rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--black);
}

.section--maroon .section-title {
  color: #fff;
}

.section-intro {
  margin: 0;
  color: var(--grey-600);
  font-size: 1.05rem;
}

/* Split layout */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

.split--reverse .split__media {
  order: -1;
}

.prose {
  color: var(--grey-600);
}

.prose p {
  margin: 0 0 1.25rem;
}

.prose p:last-child {
  margin-bottom: 0;
}

.prose strong,
.prose b {
  color: var(--black);
  font-weight: 600;
}

.media-frame {
  margin: 0;
  background: transparent;
}

.media-frame img {
  width: 100%;
  max-width: 100%;
  height: auto;
  display: block;
}

/* Philanthropy placeholder */
.philanthropy-card {
  max-width: 640px;
  margin-inline: auto;
  padding: clamp(2rem, 5vw, 2.75rem);
  text-align: center;
  background: var(--white);
  border: 1px solid var(--grey-200);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.philanthropy-card__status {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 1.15rem;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  background: var(--maroon-soft);
  color: var(--maroon);
}

.philanthropy-card__pulse {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--maroon);
  box-shadow: 0 0 0 0 rgba(76, 30, 41, 0.45);
  animation: philanthropy-pulse 1.8s ease-out infinite;
}

@keyframes philanthropy-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(76, 30, 41, 0.45);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(76, 30, 41, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(76, 30, 41, 0);
  }
}

.philanthropy-card__status-text {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.philanthropy-card__title {
  margin: 0 0 0.7rem;
  font-size: clamp(1.25rem, 2.5vw, 1.45rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--black);
}

.philanthropy-card__text {
  margin: 0 auto;
  max-width: 42ch;
  font-size: 1rem;
  line-height: 1.7;
  color: var(--grey-600);
}

/* Feature card */
.feature-card {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: clamp(2rem, 4vw, 3.5rem);
  align-items: center;
}

.feature-card .media-frame img {
  padding: 0;
}

.btn-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
  padding: 0.75rem 1.35rem;
  background: var(--maroon);
  color: var(--white) !important;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: background var(--transition), transform var(--transition);
}

.btn-link:hover,
.btn-link:focus-visible {
  background: var(--maroon-dark);
  transform: translateY(-1px);
}

/* Chapter grid */
.chapter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 1rem;
  max-width: 720px;
  margin-inline: auto;
}

.chapter-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-height: 100px;
  padding: 1rem;
  background: var(--white);
  border: 1px solid var(--grey-200);
  border-radius: var(--radius-md);
  text-decoration: none;
  color: var(--black);
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}

.chapter-card__letter {
  font-family: var(--font-display);
  font-size: 2rem;
  line-height: 1;
  color: var(--maroon);
}

.chapter-card__name {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--grey-400);
  text-align: center;
}

.chapter-card--static {
  cursor: default;
  opacity: 0.7;
}

.chapter-card--static:hover {
  transform: none;
  border-color: var(--grey-200);
  box-shadow: none;
}

/* Contact */
.contact-section {
  background: linear-gradient(180deg, var(--grey-50) 0%, var(--white) 100%);
}

.contact-form {
  max-width: none;
  margin-inline: 0;
  padding: clamp(2rem, 4vw, 2.5rem);
  background: var(--white);
  border: 1px solid var(--grey-200);
  border-radius: var(--radius-md);
  transition: box-shadow 0.45s var(--ease-out), border-color 0.45s;
}

.contact-form:hover {
  border-color: rgba(76, 30, 41, 0.2);
  box-shadow: 0 12px 40px rgba(76, 30, 41, 0.08);
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-group {
  margin-bottom: 1rem;
}

.form-group--full {
  grid-column: 1 / -1;
}

.form-label {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--black);
}

.form-checkbox-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--black);
  cursor: pointer;
}

.form-checkbox-row input[type="checkbox"] {
  width: 1.05rem;
  height: 1.05rem;
  accent-color: #991b1b;
  cursor: pointer;
}

.form-input,
.form-textarea,
.form-select {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 1px solid var(--grey-200);
  border-radius: var(--radius-sm);
  background: var(--grey-50);
  font: inherit;
  color: var(--black);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  outline: none;
  border-color: var(--maroon);
  box-shadow: 0 0 0 3px var(--maroon-soft);
}

.form-select {
  padding: 0.85rem 1rem;
  border: 1px solid var(--grey-200);
  border-radius: var(--radius-sm);
  background: var(--grey-50);
  font: inherit;
  color: var(--black);
  cursor: pointer;
  transition: border-color var(--transition), box-shadow var(--transition);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23666' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}

.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(2rem, 5vw, 3.5rem);
  align-items: start;
}

.contact-aside__text {
  margin: 0 0 1.75rem;
  max-width: 38ch;
  color: var(--grey-600);
  font-size: 1.02rem;
  line-height: 1.7;
}

.contact-aside__card {
  padding: 1.1rem 1.15rem;
  margin-bottom: 0.85rem;
  background: var(--white);
  border: 1px solid var(--grey-200);
  border-radius: var(--radius-md);
}

.contact-aside__label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--maroon);
}

.contact-aside__link {
  font-size: 1rem;
  font-weight: 600;
  color: var(--black);
  text-decoration: none;
}

.contact-aside__link:hover,
.contact-aside__link:focus-visible {
  color: var(--maroon);
}

.contact-aside__detail {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--grey-600);
}

.contact-aside__detail a {
  color: var(--maroon);
  font-weight: 600;
}

@media (max-width: 900px) {
  .contact-layout {
    grid-template-columns: 1fr;
  }
}

.form-textarea {
  min-height: 140px;
  resize: vertical;
}

.form-submit[hidden] {
  display: none;
}

.form-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  margin-top: 0.5rem;
  padding: 0.95rem 1.5rem;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--maroon);
  color: var(--white);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition);
}

.form-submit:hover,
.form-submit:focus-visible {
  background: var(--maroon-dark);
}

/* History list */
.history-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.history-list li {
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--grey-200);
  color: var(--grey-600);
}

.history-list li:last-child {
  border-bottom: none;
}

/* Blog */
.blog-empty {
  text-align: center;
  padding: 3rem 2rem;
  background: var(--white);
  border: 1px dashed var(--grey-200);
  border-radius: var(--radius-md);
  color: var(--grey-600);
}

/* Footer */
.site-footer {
  padding: 2.5rem 0;
  background: var(--black);
  color: var(--grey-400);
}

.site-footer__inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1.5rem;
}

.site-footer__brand-block {
  justify-self: start;
}

.site-footer__brand {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--white);
}

.social-links {
  display: flex;
  gap: 0.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
  justify-self: end;
}

.social-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  color: var(--white);
  text-decoration: none;
  transition: background var(--transition), transform var(--transition);
}

.social-links a:hover,
.social-links a:focus-visible {
  background: var(--maroon);
  transform: translateY(-2px);
  color: var(--white);
}

.social-links svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

/* Page subnav */
section[id] {
  scroll-margin-top: calc(var(--header-h) + var(--subnav-h) + var(--scroll-gap));
}

section[id] .section-label,
section[id] .section-header,
section[id] .split__content {
  scroll-margin-top: calc(var(--header-h) + var(--subnav-h) + var(--scroll-gap));
}

/* Join the Index: breathing room under sticky subnav */
#index {
  padding-top: clamp(4.5rem, 9vw, 6.5rem);
  padding-bottom: clamp(4.5rem, 9vw, 6.5rem);
}

#index .cta-panel {
  margin-top: 0.5rem;
}

.page-subnav {
  position: sticky;
  top: var(--header-h);
  z-index: 100;
  padding: 0;
  background: var(--white);
  border-bottom: 1px solid var(--grey-200);
}

.page-subnav__list {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  justify-content: center;
}

.page-subnav a {
  display: block;
  padding: 0.9rem 1.1rem;
  border-bottom: 2px solid transparent;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--grey-600);
  text-decoration: none;
  transition: color var(--transition), border-color var(--transition);
}

.page-subnav a:hover,
.page-subnav a:focus-visible,
.page-subnav a.is-active {
  color: var(--maroon);
  border-bottom-color: var(--maroon);
  background: transparent;
}

/* Modal (native dialog) */
dialog.modal-overlay:not([open]) {
  display: none;
}

dialog.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 1.5rem;
  border: none;
  background: transparent;
}

dialog.modal-overlay::backdrop {
  background: rgba(51, 51, 51, 0.65);
  backdrop-filter: blur(4px);
}

dialog.modal-overlay .modal {
  width: min(640px, 100%);
  max-height: 90vh;
  overflow-y: auto;
  padding: 2rem;
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  border: none;
}

/* Responsive */
@media (max-width: 900px) {
  .split,
  .feature-card,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .split--reverse .split__media {
    order: 0;
  }

  .nav-toggle {
    display: flex;
  }

  .site-nav {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    bottom: 0;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    padding: 1.5rem;
    background: var(--white);
    transform: translateX(100%);
    transition: transform var(--transition);
    overflow-y: auto;
  }

  .site-nav.is-open {
    transform: translateX(0);
  }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    width: 100%;
    gap: 0.25rem;
  }

  .nav-trigger {
    width: 100%;
  }

  .nav-trigger .nav-btn {
    flex: 1;
    width: auto;
    justify-content: flex-start;
    border-radius: var(--radius-sm);
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    padding-right: 0.4rem;
  }

  .nav-chevron-btn {
    flex-shrink: 0;
    color: var(--black) !important;
    text-shadow: none;
    border-radius: var(--radius-sm);
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
  }

  .nav-link,
  .nav-btn {
    width: 100%;
    justify-content: flex-start;
    color: var(--black) !important;
    text-shadow: none;
  }

  .nav-dropdown {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: none;
    padding: 0 0 0 1rem;
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition);
  }

  .nav-item.is-open .nav-dropdown {
    max-height: 300px;
  }
}

@media (max-width: 600px) {
  .site-footer__inner {
    flex-direction: column;
    text-align: center;
  }

  .chapter-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ── Extended design system ── */

.site-header:not(.is-scrolled):not(.is-solid) .nav-toggle__bar {
  background: var(--white);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
}

.hero--sub .hero__content {
  padding-bottom: 2.5rem;
}

.hero__scroll {
  position: absolute;
  bottom: 1.75rem;
  left: 50%;
  z-index: 1;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  opacity: 0;
  animation: hero-scroll-in 0.85s var(--ease-out) 0.55s forwards;
}

@keyframes hero-scroll-in {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

.hero__scroll-line {
  width: 1px;
  height: 32px;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.7), transparent);
  animation: scroll-pulse 2.5s var(--ease) infinite;
}

@keyframes scroll-pulse {
  0%, 100% { opacity: 0.3; transform: scaleY(0.5); transform-origin: top; }
  50% { opacity: 1; transform: scaleY(1); }
}

/* ── Page hero label ── */
.hero__page {
  display: block;
  margin: 0 0 0.75rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  opacity: 0.75;
}

/* Event cards (blog) */
.event-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.event-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--grey-200);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--white);
  transition: border-color var(--transition), transform var(--transition);
}

.event-card:hover,
.event-card:focus-within {
  border-color: var(--maroon);
}

.event-card__trigger {
  display: block;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
  text-align: left;
  font: inherit;
  color: inherit;
  width: 100%;
}

.event-card__img {
  width: 100%;
  max-width: 100%;
  height: auto;
  display: block;
}

.event-card__body {
  padding: 1.25rem 1.5rem 1.5rem;
}

.event-card__tag {
  display: inline-block;
  margin-bottom: 0.5rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--maroon);
}

.event-card__title {
  margin: 0 0 0.35rem;
  font-family: var(--font-sans);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--black);
}

.event-card__desc {
  margin: 0;
  font-size: 0.9rem;
  color: var(--grey-600);
}

/* Modal content */
.modal__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.modal__title {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--black);
}

.modal__intro {
  margin: 0.35rem 0 0;
  color: var(--grey-600);
  font-style: italic;
}

.modal__img {
  width: 100%;
  max-width: 100%;
  height: auto;
  margin-bottom: 1.25rem;
}

.modal__body .prose {
  margin-bottom: 1.5rem;
}

.modal__close-btn {
  flex-shrink: 0;
  padding: 0.5rem 1rem;
  border: 1px solid var(--grey-200);
  border-radius: var(--radius-sm);
  background: var(--grey-50);
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition);
}

.modal__close-btn:hover {
  background: var(--grey-200);
}

/* Footer extended */
.site-footer__tagline {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  text-transform: none;
  color: var(--grey-400);
  font-style: italic;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
  justify-self: center;
}

.footer-nav a {
  color: var(--grey-400);
  font-size: 0.8rem;
  font-weight: 500;
  text-decoration: none;
  transition: color var(--transition);
}

.footer-nav a:hover,
.footer-nav a:focus-visible {
  color: var(--white);
}

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal.is-scroll-target {
  transition: none !important;
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }

@media (max-width: 768px) {
  .site-footer__inner {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .site-footer__brand-block,
  .footer-nav,
  .social-links {
    justify-self: center;
  }

  .footer-nav {
    justify-content: center;
  }
}

/* ── Chapter timeline ── */
.timeline {
  margin: 0;
  padding: 0;
  list-style: none;
}

.timeline__item {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 1rem;
  align-items: start;
  padding: 1rem 0;
  border-bottom: 1px solid var(--grey-200);
}

.timeline__item:last-child {
  border-bottom: none;
}

.timeline__marker {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: var(--maroon-soft);
  border-radius: var(--radius-sm);
  font-family: var(--font-display);
  font-size: 1.35rem;
  color: var(--maroon);
  flex-shrink: 0;
}

.timeline__label {
  display: block;
  font-weight: 600;
  color: var(--black);
  font-size: 0.95rem;
}

.timeline__school {
  display: block;
  font-size: 0.875rem;
  color: var(--grey-600);
}

/* ── Section panel (inset rounded blocks) ── */
.section-panel {
  margin-inline: clamp(0.75rem, 3vw, 1.5rem);
  padding: clamp(3rem, 6vw, 5rem) clamp(1.5rem, 4vw, 3rem);
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.section-panel--alt {
  background: var(--grey-50);
}

/* ── Form feedback ── */
.form-feedback {
  margin-top: 1rem;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  text-align: center;
}

.form-feedback--success {
  background: rgba(76, 30, 41, 0.08);
  color: var(--maroon);
}

.form-feedback--error {
  background: #fef2f2;
  color: #991b1b;
}

/* ── Page subnav scroll on mobile ── */
@media (max-width: 600px) {
  .page-subnav__list {
    flex-wrap: nowrap;
    overflow-x: auto;
    justify-content: flex-start;
    padding-bottom: 0.25rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .page-subnav__list::-webkit-scrollbar {
    display: none;
  }

  .page-subnav a {
    white-space: nowrap;
    flex-shrink: 0;
  }
}

@media (max-width: 900px) {
  .nav-item--portal {
    margin-left: 0;
    margin-top: 0.5rem;
  }

  .nav-cta {
    width: 100%;
    justify-content: center;
  }
}

/* ══════════════════════════════════════
   Interactions & micro-animations
   ══════════════════════════════════════ */

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1001;
  height: 3px;
  width: 0;
  background: linear-gradient(90deg, var(--maroon), #8b3a52);
  pointer-events: none;
}

/* Hero entrance */
.hero__page,
.hero__eyebrow,
.hero__title {
  opacity: 0;
  transform: translateY(18px);
  animation: hero-rise 0.85s var(--ease-out) forwards;
}

.hero__page { animation-delay: 0.05s; }
.hero__eyebrow { animation-delay: 0.15s; }
.hero__title { animation-delay: 0.3s; }

@keyframes hero-rise {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Nav underline sweep */
.nav-link,
.nav-btn {
  position: relative;
  overflow: hidden;
}

.nav-link::after,
.nav-btn::after {
  content: "";
  position: absolute;
  bottom: 5px;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--maroon);
  border-radius: 1px;
  transition: width 0.35s var(--ease-out), left 0.35s var(--ease-out);
}

.nav-link:hover::after,
.nav-link:focus-visible::after,
.nav-btn:hover::after,
.nav-btn:focus-visible::after,
.nav-link.is-active::after,
.nav-btn.is-active::after {
  width: calc(100% - 1.4rem);
  left: 0.7rem;
}

.site-header:not(.is-scrolled):not(.is-solid) .nav-link::after,
.site-header:not(.is-scrolled):not(.is-solid) .nav-btn::after {
  background: var(--white);
}

/* CTA shimmer */
.nav-cta {
  position: relative;
  overflow: hidden;
}

.nav-cta::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    transparent 35%,
    rgba(255, 255, 255, 0.35) 50%,
    transparent 65%
  );
  transform: translateX(-120%);
  transition: transform 0.65s var(--ease-out);
}

.nav-cta:hover::before,
.nav-cta:focus-visible::before {
  transform: translateX(120%);
}

.nav-cta:hover,
.nav-cta:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(76, 30, 41, 0.35);
}

.site-logo {
  transition: filter var(--transition), transform var(--transition);
}

.site-logo:hover img {
  filter: drop-shadow(0 4px 16px rgba(76, 30, 41, 0.35));
  transform: scale(1.03);
}

/* Section photos */
.media-frame {
  border-radius: var(--radius-sm);
  transition: transform 0.45s var(--ease-out), box-shadow 0.45s var(--ease-out);
}

.media-frame:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 48px rgba(76, 30, 41, 0.12);
}

.media-frame img {
  border-radius: var(--radius-sm);
  transition: filter 0.45s var(--ease-out);
}

.media-frame:hover img {
  filter: saturate(1.05);
}

/* Buttons */
.btn-link,
.form-submit {
  position: relative;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(76, 30, 41, 0.15);
}

.btn-link::after {
  content: "→";
  margin-left: 0.15rem;
  transition: transform 0.3s var(--ease-spring);
}

.btn-link:hover::after,
.btn-link:focus-visible::after {
  transform: translateX(5px);
}

.btn-link:hover,
.btn-link:focus-visible,
.form-submit:hover,
.form-submit:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(76, 30, 41, 0.22);
}

/* ── Save button states: spinner while saving, checkmark burst when saved ── */
.form-submit.is-saving,
.form-submit.is-saved {
  pointer-events: none;
}

.form-submit .btn-spinner {
  width: 15px;
  height: 15px;
  flex: none;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: nap-spin 0.7s linear infinite;
}

.form-submit--secondary .btn-spinner {
  border-color: rgba(76, 30, 41, 0.2);
  border-top-color: var(--maroon);
}

@keyframes nap-spin {
  to {
    transform: rotate(360deg);
  }
}

.form-submit .btn-check {
  display: inline-flex;
  flex: none;
}

.form-submit .btn-check__icon {
  width: 16px;
  height: 16px;
  stroke-dasharray: 20;
  stroke-dashoffset: 20;
  animation: nap-check-draw 0.3s var(--ease-out) 0.05s forwards;
}

@keyframes nap-check-draw {
  to {
    stroke-dashoffset: 0;
  }
}

.form-submit.is-saving {
  cursor: wait;
  opacity: 0.92;
}

.form-submit.is-saved {
  background: #1f9d55;
  animation: nap-save-pulse 0.5s var(--ease-spring);
}

@keyframes nap-save-pulse {
  0% {
    transform: scale(1);
  }
  45% {
    transform: scale(1.045);
    box-shadow: 0 10px 26px rgba(31, 157, 85, 0.35);
  }
  100% {
    transform: scale(1);
  }
}

.form-input,
.form-textarea {
  transition: border-color var(--transition), box-shadow var(--transition), transform 0.25s var(--ease-out);
}

.form-input:hover,
.form-textarea:hover {
  border-color: rgba(76, 30, 41, 0.25);
}

.form-input:focus,
.form-textarea:focus {
  transform: translateY(-1px);
}

/* Chapter cards — fill sweep + tilt ready */
.chapter-card:not(.chapter-card--static) {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  box-shadow: var(--shadow-sm);
  transition: transform 0.4s var(--ease-out), box-shadow 0.4s var(--ease-out), border-color var(--transition);
}

.chapter-card:not(.chapter-card--static)::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--maroon);
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform 0.45s var(--ease-out);
  z-index: 0;
}

.chapter-card:not(.chapter-card--static):hover::before,
.chapter-card:not(.chapter-card--static):focus-visible::before {
  transform: scaleY(1);
}

.chapter-card__letter,
.chapter-card__name {
  position: relative;
  z-index: 1;
  transition: color 0.35s var(--ease-out), transform 0.35s var(--ease-spring);
}

.chapter-card:not(.chapter-card--static):hover .chapter-card__letter,
.chapter-card:not(.chapter-card--static):focus-visible .chapter-card__letter {
  color: var(--white);
  transform: scale(1.12);
}

.chapter-card:not(.chapter-card--static):hover .chapter-card__name,
.chapter-card:not(.chapter-card--static):focus-visible .chapter-card__name {
  color: rgba(255, 255, 255, 0.85);
}

.chapter-card:not(.chapter-card--static):hover,
.chapter-card:not(.chapter-card--static):focus-visible {
  border-color: var(--maroon);
  box-shadow: 0 12px 32px rgba(76, 30, 41, 0.2);
}

/* Timeline */
.timeline__item {
  transition: transform 0.35s var(--ease-out), background 0.35s;
  border-radius: var(--radius-sm);
  margin: 0 -0.75rem;
  padding-left: 0.75rem;
  padding-right: 0.75rem;
}

.timeline__item:hover {
  transform: translateX(6px);
  background: var(--maroon-soft);
}

.timeline__marker {
  transition: background 0.35s, color 0.35s, transform 0.35s var(--ease-spring);
}

.timeline__item:hover .timeline__marker {
  background: var(--maroon);
  color: var(--white);
  transform: scale(1.08);
}

/* Event cards */
.event-card {
  box-shadow: var(--shadow-sm);
  transition: border-color var(--transition), transform 0.45s var(--ease-out), box-shadow 0.45s var(--ease-out);
}

.event-card:hover,
.event-card:focus-within {
  transform: translateY(-6px);
  box-shadow: 0 20px 48px rgba(76, 30, 41, 0.14);
}

.event-card__media {
  position: relative;
  overflow: hidden;
}

.event-card__img {
  transition: transform 0.6s var(--ease-out), filter 0.4s;
}

.event-card:hover .event-card__img,
.event-card:focus-within .event-card__img {
  transform: scale(1.04);
  filter: brightness(0.9);
}

.event-card__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(76, 30, 41, 0.55) 0%, transparent 50%);
  opacity: 0;
  transition: opacity 0.4s var(--ease-out);
}

.event-card:hover .event-card__media::after,
.event-card:focus-within .event-card__media::after {
  opacity: 1;
}

.event-card__hint {
  position: absolute;
  bottom: 1rem;
  right: 1rem;
  z-index: 1;
  padding: 0.4rem 0.85rem;
  background: var(--white);
  color: var(--maroon);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-radius: var(--radius-sm);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.35s var(--ease-out), transform 0.35s var(--ease-out);
}

.event-card:hover .event-card__hint,
.event-card:focus-within .event-card__hint {
  opacity: 1;
  transform: translateY(0);
}

.event-card__body {
  transition: background 0.35s;
}

.event-card:hover .event-card__body,
.event-card:focus-within .event-card__body {
  background: var(--maroon-soft);
}

.event-card__title {
  transition: color 0.3s;
}

.event-card:hover .event-card__title,
.event-card:focus-within .event-card__title {
  color: var(--maroon);
}

/* Page subnav */
.page-subnav a {
  position: relative;
}

.page-subnav a::before {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--maroon);
  transition: width 0.35s var(--ease-out), left 0.35s var(--ease-out);
}

.page-subnav a:hover::before,
.page-subnav a:focus-visible::before,
.page-subnav a.is-active::before {
  width: 70%;
  left: 15%;
}

.page-subnav a:hover,
.page-subnav a:focus-visible,
.page-subnav a.is-active {
  border-bottom-color: transparent;
}

/* Footer */
.footer-nav a {
  position: relative;
}

.footer-nav a::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--white);
  transition: width 0.3s var(--ease-out);
}

.footer-nav a:hover::after,
.footer-nav a:focus-visible::after {
  width: 100%;
}

.social-links a:hover,
.social-links a:focus-visible {
  transform: translateY(-3px) scale(1.05);
}

/* Modal */
dialog.modal-overlay[open] .modal {
  animation: modal-in 0.4s var(--ease-out);
}

@keyframes modal-in {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(16px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.modal__close-btn {
  transition: background var(--transition), color var(--transition), transform 0.25s;
}

.modal__close-btn:hover {
  background: var(--maroon);
  color: var(--white);
  transform: scale(1.03);
}

/* Split sections */
.split__content {
  transition: transform 0.5s var(--ease-out);
}

.split:hover .split__content {
  transform: translateX(2px);
}

.split--reverse:hover .split__content {
  transform: translateX(-2px);
}

.section-title {
  transition: letter-spacing 0.4s var(--ease-out);
}

.split:hover .section-title {
  letter-spacing: -0.01em;
}

@media (prefers-reduced-motion: reduce) {
  .hero__page,
  .hero__eyebrow,
  .hero__title {
    animation: none;
    opacity: 1;
    transform: none;
  }

  .hero__scroll {
    animation: none;
    opacity: 1;
    transform: translateX(-50%);
  }

  .chapter-card:not(.chapter-card--static):hover,
  .media-frame:hover,
  .event-card:hover,
  .split:hover .split__content {
    transform: none;
  }

  .event-card:hover .event-card__img {
    transform: none;
    filter: none;
  }
}

/* Social media section */
.social-section {
  position: relative;
  padding: clamp(4rem, 8vw, 6rem) 0;
  background: linear-gradient(145deg, var(--maroon-dark) 0%, var(--maroon) 45%, #5e2838 100%);
  color: var(--white);
  overflow: hidden;
}

.social-section__glow {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 15% 20%, rgba(255, 255, 255, 0.08), transparent 60%),
    radial-gradient(ellipse 50% 40% at 85% 80%, rgba(255, 255, 255, 0.06), transparent 55%);
  pointer-events: none;
}

.social-section__header {
  position: relative;
  max-width: 560px;
  margin: 0 auto 2.75rem;
  text-align: center;
}

.social-section__eyebrow {
  display: inline-block;
  margin-bottom: 0.85rem;
  padding: 0.35rem 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.85);
}

.social-section__title {
  margin: 0 0 0.85rem;
  font-family: var(--font-sans);
  font-size: clamp(1.85rem, 4vw, 2.75rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--white);
}

.social-section__intro {
  margin: 0;
  font-size: 1rem;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.72);
}

.social-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.15rem;
  max-width: 920px;
  margin-inline: auto;
}

.social-card {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
  padding: 1.5rem 1.35rem;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-lg);
  text-decoration: none;
  color: var(--white);
  transition:
    transform 0.4s var(--ease-out),
    background 0.35s var(--ease),
    border-color 0.35s var(--ease),
    box-shadow 0.35s var(--ease);
}

.social-card:hover,
.social-card:focus-visible {
  transform: translateY(-6px);
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.28);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.22);
  color: var(--white);
}

.social-card__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.1);
  transition: background 0.35s var(--ease), transform 0.35s var(--ease-out);
}

.social-card__icon svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

.social-card:hover .social-card__icon,
.social-card:focus-visible .social-card__icon {
  transform: scale(1.08);
}

.social-card--linkedin:hover .social-card__icon,
.social-card--linkedin:focus-visible .social-card__icon {
  background: #0a66c2;
}

.social-card--facebook:hover .social-card__icon,
.social-card--facebook:focus-visible .social-card__icon {
  background: #1877f2;
}

.social-card--instagram:hover .social-card__icon,
.social-card--instagram:focus-visible .social-card__icon {
  background: linear-gradient(135deg, #f58529, #dd2a7b, #8134af);
}

.social-card__body {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex: 1;
}

.social-card__platform {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.social-card__desc {
  font-size: 0.82rem;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.65);
}

.social-card__arrow {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  opacity: 0.45;
  transition: opacity 0.3s var(--ease), transform 0.35s var(--ease-out);
}

.social-card__arrow svg {
  width: 18px;
  height: 18px;
}

.social-card:hover .social-card__arrow,
.social-card:focus-visible .social-card__arrow {
  opacity: 1;
  transform: translate(3px, -3px);
}

@media (max-width: 768px) {
  .social-grid {
    grid-template-columns: 1fr;
    max-width: 400px;
  }
}

/* Impact page */
.content-grid,
.directory-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.15rem;
  margin-top: 2rem;
}

.content-card,
.directory-card {
  padding: 1.35rem 1.25rem;
  background: var(--white);
  border: 1px solid var(--grey-200);
  border-radius: var(--radius-md);
}

.directory-card__logo {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-height: 3.25rem;
  margin-bottom: 1rem;
}

.directory-card__logo img {
  display: block;
  max-width: 100%;
  max-height: 3.25rem;
  width: auto;
  height: auto;
  object-fit: contain;
  object-position: left center;
}

.directory-card__title a {
  color: inherit;
  text-decoration: none;
}

.directory-card__title a:hover,
.directory-card__title a:focus-visible {
  color: var(--maroon);
}

.content-card--placeholder,
.directory-card--placeholder,
.news-card--placeholder {
  border-style: dashed;
  background: var(--grey-50);
}

.content-card__label,
.directory-card__type {
  display: block;
  margin-bottom: 0.45rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--maroon);
}

.content-card__title,
.directory-card__title {
  margin: 0 0 0.4rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--black);
}

.content-card__text,
.directory-card__text {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--grey-600);
}

.directory-card__meta {
  margin: 0 0 0.55rem;
  font-size: 0.82rem;
  color: var(--grey-400);
}

.cta-panel {
  max-width: 720px;
  margin-inline: auto;
  padding: clamp(2rem, 5vw, 2.75rem);
  text-align: center;
  background: var(--white);
  border: 1px solid var(--grey-200);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.cta-panel .section-title {
  margin-bottom: 0.75rem;
}

.cta-panel__text {
  margin: 0 auto 1.35rem;
  max-width: 48ch;
  color: var(--grey-600);
  line-height: 1.65;
}

/* Portal */
.portal-panel {
  max-width: 440px;
  margin: 0 auto;
  padding: clamp(2rem, 5vw, 2.5rem);
  background: var(--white);
  border: 1px solid var(--grey-200);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
}

.portal-panel .section-title {
  margin-bottom: 0.65rem;
}

.portal-panel__text {
  margin: 0 0 0.5rem;
  color: var(--grey-600);
  line-height: 1.6;
}

.portal-panel__note {
  margin: 0 0 1.35rem;
  font-size: 0.85rem;
  color: var(--grey-400);
  line-height: 1.5;
}

.portal-panel__form .form-group {
  margin-bottom: 0.85rem;
}

.form-error {
  margin: 0.75rem 0 0;
  font-size: 0.88rem;
  font-weight: 600;
  color: #991b1b;
}

.portal-content .page-subnav .container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  position: relative;
}

.portal-session {
  position: absolute;
  right: 0;
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.portal-session__label {
  margin: 0;
  font-size: 0.82rem;
  color: var(--grey-600);
  white-space: nowrap;
}

.portal-session__label span {
  font-weight: 600;
  color: var(--black);
}

.portal-signout {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  padding: 0.4rem 0.75rem;
  border: 1px solid var(--grey-200);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--grey-600);
  font: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.portal-signout:hover,
.portal-signout:focus-visible {
  border-color: var(--maroon);
  color: var(--maroon);
}

.news-list {
  display: grid;
  gap: 1rem;
  max-width: 760px;
  margin-inline: auto;
}

.news-card {
  padding: 1.25rem 1.35rem;
  background: var(--white);
  border: 1px solid var(--grey-200);
  border-radius: var(--radius-md);
}

.news-card__date {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--maroon);
}

.news-card__title {
  margin: 0 0 0.4rem;
  font-size: 1.1rem;
  font-weight: 700;
}

.news-card__text {
  margin: 0;
  color: var(--grey-600);
  line-height: 1.55;
  white-space: pre-wrap;
}

@media (max-width: 700px) {
  .portal-session {
    position: static;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    gap: 0.5rem;
  }

  .portal-session__label {
    text-align: center;
    white-space: normal;
  }

  .portal-signout {
    width: 100%;
  }

  .portal-content .page-subnav .container {
    flex-direction: column;
  }
}

/* Portal — wide panel (settings form) */
.portal-panel--wide {
  max-width: 760px;
}

/* Portal — auth sign in / sign up toggle */
.portal-auth__toggle {
  display: flex;
  gap: 0.4rem;
  margin-bottom: 1.5rem;
  padding: 0.3rem;
  background: var(--grey-50);
  border: 1px solid var(--grey-200);
  border-radius: var(--radius-sm);
}

.portal-auth__toggle-btn {
  flex: 1;
  padding: 0.6rem 1rem;
  border: none;
  border-radius: calc(var(--radius-sm) - 2px);
  background: transparent;
  color: var(--grey-600);
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
}

.portal-auth__toggle-btn.is-active {
  background: var(--white);
  color: var(--maroon);
  box-shadow: var(--shadow-sm);
}

.portal-auth__panel[hidden] {
  display: none;
}

/* Portal — announcements & comments */
.news-card__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.35rem;
}

.news-card__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}

.news-card__author {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--black);
}

.news-card__actions {
  display: flex;
  flex-shrink: 0;
  gap: 0.4rem;
}

.news-card__action-btn {
  padding: 0.35rem 0.65rem;
  border: 1px solid var(--grey-200);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--grey-600);
  font: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color var(--transition), color var(--transition);
}

.news-card__action-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.news-card__action-btn:hover,
.news-card__action-btn:focus-visible {
  border-color: var(--maroon);
  color: var(--maroon);
}

.news-card__action-btn--danger:hover,
.news-card__action-btn--danger:focus-visible {
  border-color: #991b1b;
  color: #991b1b;
}

.news-card__toolbar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 1.5rem;
}

.comment-list {
  display: grid;
  gap: 0.75rem;
  margin: 1rem 0 0;
  padding-top: 1rem;
  border-top: 1px solid var(--grey-200);
}

.comment-item {
  padding: 0.75rem 0.9rem;
  background: var(--grey-50);
  border-radius: var(--radius-sm);
}

.comment-item__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.3rem;
}

.comment-item__author {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--black);
}

.comment-item__actions {
  display: flex;
  gap: 0.4rem;
}

.comment-item__text {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--grey-600);
}

.comment-form {
  display: flex;
  gap: 0.6rem;
  margin-top: 0.85rem;
}

.comment-form .form-input {
  flex: 1;
}

.form-submit--small {
  display: inline-block;
  width: auto;
  margin-top: 0;
  padding: 0.65rem 1.1rem;
  font-size: 0.85rem;
}

.news-card__empty {
  padding: 2rem 1rem;
  text-align: center;
  color: var(--grey-400);
}

/* Portal — RSVP events */
.national-events {
  margin-bottom: clamp(3rem, 6vw, 4rem);
}

.rsvp-event-list {
  display: grid;
  gap: 1rem;
  max-width: 760px;
  margin-inline: auto;
}

.rsvp-event-list[hidden] {
  display: none;
}

.rsvp-event-card {
  padding: 1.35rem 1.5rem;
  background: var(--white);
  border: 1px solid var(--grey-200);
  border-radius: var(--radius-md);
}

.rsvp-event-card__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.4rem;
}

.rsvp-event-card__title {
  margin: 0 0 0.3rem;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--black);
}

.rsvp-event-card__meta {
  margin: 0 0 0.6rem;
  font-size: 0.82rem;
  color: var(--maroon);
  font-weight: 600;
}

.rsvp-event-card__desc {
  margin: 0 0 0.85rem;
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--grey-600);
}

.rsvp-toggle {
  display: flex;
  gap: 0.4rem;
  margin-bottom: 0.85rem;
}

.rsvp-toggle__btn {
  padding: 0.45rem 0.85rem;
  border: 1px solid var(--grey-200);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--grey-600);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color var(--transition), color var(--transition), background var(--transition);
}

.rsvp-toggle__btn:hover,
.rsvp-toggle__btn:focus-visible {
  border-color: var(--maroon);
  color: var(--maroon);
}

.rsvp-toggle__btn.is-active {
  background: var(--maroon);
  border-color: var(--maroon);
  color: var(--white);
}

.rsvp-attendees {
  display: grid;
  gap: 0.5rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--grey-200);
}

.rsvp-attendees__group {
  display: flex;
  gap: 0.5rem;
  font-size: 0.82rem;
}

.rsvp-attendees__label {
  flex-shrink: 0;
  font-weight: 700;
  color: var(--black);
}

.rsvp-attendees__names {
  color: var(--grey-600);
}

.event-photo-preview {
  width: 96px;
  height: 96px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--grey-50);
  border: 1px solid var(--grey-200);
  border-radius: var(--radius-sm);
  color: var(--grey-400);
  font-size: 0.7rem;
  text-align: center;
  flex-shrink: 0;
}

.event-photo-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rsvp-event-card__photo {
  display: block;
  width: 100%;
  height: 130px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  margin-bottom: 0.85rem;
}

.rsvp-event-card__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.4rem;
}

.rsvp-event-card__title-btn {
  display: block;
  padding: 0;
  border: none;
  background: none;
  text-align: left;
  cursor: pointer;
  font: inherit;
  color: inherit;
}

.rsvp-event-card__summary {
  margin: 0.6rem 0 0;
  font-size: 0.8rem;
  color: var(--grey-400);
}

.rsvp-event-card.is-expanded .rsvp-event-card__title {
  color: var(--maroon);
}

.event-list__empty {
  padding: 2rem 1rem;
  text-align: center;
  color: var(--grey-400);
}

.section-title--small {
  font-size: 1.3rem;
}

/* Portal — dedicated auth page (no site chrome) */
.portal-auth-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--grey-50);
}

.portal-auth-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  padding: 1.1rem clamp(1.25rem, 4vw, 2.5rem);
  background: var(--white);
  border-bottom: 1px solid var(--grey-200);
}

.portal-auth-topbar .site-logo img {
  height: 34px;
  width: auto;
}

.portal-auth-topbar__link {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--grey-600);
  text-decoration: none;
}

.portal-auth-topbar__link:hover,
.portal-auth-topbar__link:focus-visible {
  color: var(--maroon);
}

.portal-auth-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(1.5rem, 5vw, 3rem) 1.25rem;
}

.portal-auth-main .portal-panel {
  width: 100%;
  margin: 0;
}

/* Portal — sidebar app shell
   height (not min-height) + overflow hidden keeps this pinned to the
   viewport so the sidebar never scrolls away with the main content —
   only .portal-shell__main scrolls internally. */
.portal-shell[hidden] {
  display: none;
}

.portal-shell {
  display: flex;
  height: 100vh;
  overflow: hidden;
  background: var(--grey-50);
}

.portal-shell__sidebar {
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  width: 250px;
  padding: 1.5rem 1.25rem;
  overflow-y: auto;
  background: var(--white);
  border-right: 1px solid var(--grey-200);
}

.portal-shell__brand img {
  height: 32px;
  width: auto;
  display: block;
  margin-bottom: 1.5rem;
}

.portal-shell__user {
  padding-bottom: 1.25rem;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--grey-200);
}

.portal-shell__user-label {
  margin: 0 0 0.15rem;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--grey-400);
}

.portal-shell__user-name {
  margin: 0;
  font-weight: 700;
  color: var(--black);
}

.portal-shell__nav-toggle {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  width: 100%;
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--grey-200);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--black);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
}

.portal-shell__nav-toggle svg {
  flex-shrink: 0;
  transition: transform var(--transition);
}

.portal-shell__nav-toggle[aria-expanded="true"] svg {
  transform: rotate(180deg);
}

.portal-shell__nav {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  flex: 1;
}

.portal-shell__nav-btn[hidden] {
  display: none;
}

.portal-shell__nav-btn {
  display: block;
  width: 100%;
  padding: 0.7rem 0.85rem;
  border: none;
  border-left: 3px solid transparent;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--grey-600);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}

.portal-shell__nav-btn:hover,
.portal-shell__nav-btn:focus-visible {
  background: var(--grey-50);
  color: var(--maroon);
}

.portal-shell__nav-btn.is-active {
  background: var(--maroon-soft);
  border-left-color: var(--maroon);
  color: var(--maroon);
}

.portal-shell__signout {
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--grey-200);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--grey-600);
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}

.portal-shell__signout:hover,
.portal-shell__signout:focus-visible {
  border-color: var(--maroon);
  color: var(--maroon);
}

.portal-shell__main {
  flex: 1;
  min-width: 0;
  padding: clamp(1.75rem, 4vw, 3rem);
  overflow-y: auto;
}

.portal-tab-panel[hidden] {
  display: none;
}

.portal-view-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.portal-view-header--spaced {
  margin-top: 2.25rem;
}

.portal-view-title {
  margin: 0.35rem 0 0.5rem;
  font-size: 1.65rem;
  font-weight: 700;
  color: var(--black);
}

.portal-view-title--small {
  margin: 0;
  font-size: 1.2rem;
}

.portal-view-intro {
  margin: 0;
  max-width: 52ch;
  color: var(--grey-600);
}

.portal-shell .national-events {
  margin-bottom: 2.5rem;
}

.portal-shell .national-events .section-label {
  display: block;
  margin-bottom: 0.85rem;
}

.portal-shell .news-list,
.portal-shell .rsvp-event-list {
  max-width: none;
  margin: 0;
}

.form-submit--inline {
  display: inline-flex;
  width: auto;
  min-width: 200px;
}

/* Portal — dark theme (scoped to portal pages via html[data-theme="dark"], never applied to marketing pages) */
html[data-theme="dark"] {
  --maroon: #e55d6a;
  --maroon-dark: #da3e4e;
  --maroon-soft: rgba(229, 93, 106, 0.16);
  --black: #ececee;
  --white: #202024;
  --grey-50: #18181c;
  --grey-100: #202024;
  --grey-200: #313138;
  --grey-400: #7a7a84;
  --grey-600: #b4b4bc;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 4px 24px rgba(0, 0, 0, 0.5);
}

html[data-theme="dark"] .event-card__img,
html[data-theme="dark"] .modal__img {
  opacity: 0.88;
}

/* Theme toggle switch */
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.1rem;
  background: var(--grey-50);
  border: 1px solid var(--grey-200);
  border-radius: var(--radius-md);
}

.theme-toggle__label {
  font-weight: 600;
  color: var(--black);
}

.theme-toggle__desc {
  margin: 0.15rem 0 0;
  font-size: 0.82rem;
  color: var(--grey-600);
}

.theme-toggle__switch {
  position: relative;
  flex-shrink: 0;
  width: 46px;
  height: 26px;
  border: none;
  border-radius: 999px;
  background: var(--grey-200);
  cursor: pointer;
  transition: background var(--transition);
}

.theme-toggle__switch::before {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--white);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition);
}

.theme-toggle__switch.is-active {
  background: var(--maroon);
}

.theme-toggle__switch.is-active::before {
  transform: translateX(20px);
}

/* Avatars (directory, profile modal, sidebar, overview, birthdays) */
.nap-avatar {
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  display: block;
}

.nap-avatar--fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--maroon-soft);
  color: var(--maroon);
  font-weight: 700;
}

.nap-avatar--sm {
  width: 32px;
  height: 32px;
  font-size: 0.75rem;
}

.nap-avatar--md {
  width: 48px;
  height: 48px;
  font-size: 1rem;
}

.nap-avatar--lg {
  width: 96px;
  height: 96px;
  font-size: 2rem;
}

.nap-avatar--xl {
  width: 128px;
  height: 128px;
  font-size: 2.5rem;
}

.form-submit--secondary {
  background: var(--white);
  color: var(--maroon);
  border: 1px solid var(--grey-200);
  cursor: pointer;
}

.form-submit--secondary:hover,
.form-submit--secondary:focus-visible {
  border-color: var(--maroon);
  background: var(--white);
}

.form-submit--danger {
  background: #991b1b;
}

.form-submit--danger:hover,
.form-submit--danger:focus-visible {
  background: #7a1616;
}

/* Shared confirm dialog (replaces window.confirm) */
.modal--confirm {
  width: min(420px, 100%);
}

.modal-confirm__body {
  margin: 0.6rem 0 1.75rem;
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--grey-600);
}

.modal-confirm__actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
}

.modal-confirm__actions .form-submit {
  width: auto;
  margin-top: 0;
}

.profile-photo-field {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

/* Approval workflow: badge on posts awaiting an admin's sign-off */
.pending-badge {
  display: inline-block;
  margin-left: 0.6rem;
  padding: 0.2rem 0.55rem;
  vertical-align: middle;
  background: var(--grey-100);
  border: 1px solid var(--grey-200);
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--grey-600);
  white-space: nowrap;
}

/* Admin-only actions row at the bottom of the profile popup */
.profile-modal__admin-actions[hidden] {
  display: none;
}

.profile-modal__admin-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 1.25rem;
}

.profile-modal__admin-actions:empty {
  display: none;
}

.profile-photo-field__hint {
  margin: 0.5rem 0 0;
  font-size: 0.8rem;
  color: var(--grey-600);
}

.portal-shell__user-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.portal-panel-content {
  max-width: 480px;
}

.settings-account-summary {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.1rem;
  background: var(--grey-50);
  border: 1px solid var(--grey-200);
  border-radius: var(--radius-md);
}

.settings-account-summary__name {
  margin: 0;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--black);
}

.settings-account-summary__email {
  margin: 0.2rem 0 0;
  font-size: 0.85rem;
  color: var(--grey-600);
}

.portal-view-title--spaced {
  margin-top: 2.25rem;
}

/* Directory */
.directory-filters {
  display: grid;
  grid-template-columns: 1fr repeat(2, minmax(150px, 200px));
  gap: 0.75rem;
  margin-bottom: 1.75rem;
}

.directory-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 1rem;
}

.pledges-section-heading {
  margin: 2rem 0 1rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--black);
  padding-top: 1.5rem;
  border-top: 1px solid var(--grey-200);
}

.pledges-section-heading[hidden] {
  display: none;
}

.pledges-chapter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.pledges-chapter-tabs[hidden] {
  display: none;
}

.pledges-chapter-tab {
  padding: 0.5rem 1.1rem;
  border: 1px solid var(--grey-200);
  border-radius: 999px;
  background: var(--white);
  color: var(--grey-600);
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}

.pledges-chapter-tab:hover,
.pledges-chapter-tab:focus-visible {
  border-color: var(--maroon);
  color: var(--maroon);
}

.pledges-chapter-tab.is-active {
  background: var(--maroon-soft);
  border-color: var(--maroon);
  color: var(--maroon);
}

/* Member Education accordion */
.education-accordion {
  display: grid;
  gap: 0.75rem;
}

.education-empty {
  padding: 2rem 1rem;
  text-align: center;
  color: var(--grey-400);
}

.education-item {
  background: var(--white);
  border: 1px solid var(--grey-200);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.education-item__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  padding: 1rem 1.25rem;
  border: none;
  background: none;
  text-align: left;
  font: inherit;
  cursor: pointer;
}

.education-item__header:hover,
.education-item__header:focus-visible {
  background: var(--grey-50);
}

.education-item__title {
  margin: 0;
  font-weight: 700;
  font-size: 1rem;
  color: var(--black);
}

.education-item__chevron {
  flex-shrink: 0;
  transition: transform var(--transition);
  color: var(--grey-400);
}

.education-item.is-open .education-item__chevron {
  transform: rotate(180deg);
}

.education-item__body {
  padding: 0 1.25rem 1.25rem;
  border-top: 1px solid var(--grey-200);
}

.education-item__body[hidden] {
  display: none;
}

.education-item__desc {
  margin: 1rem 0 0;
  color: var(--grey-600);
  line-height: 1.6;
  white-space: pre-wrap;
}

.education-item__admin-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
}

.bro-card {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 1rem 1.1rem;
  background: var(--white);
  border: 1px solid var(--grey-200);
  border-radius: var(--radius-md);
  text-align: left;
  cursor: pointer;
  transition: border-color var(--transition), transform var(--transition);
  font: inherit;
}

.bro-card:hover,
.bro-card:focus-visible {
  border-color: var(--maroon);
}

.bro-card__name {
  margin: 0;
  font-weight: 700;
  color: var(--black);
}

.bro-card__meta {
  margin: 0.15rem 0 0;
  font-size: 0.8rem;
  color: var(--grey-600);
}

.bro-card__line {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--maroon);
}

.bro-card--dropped {
  background: #fef2f2;
  border-color: #991b1b;
}

.bro-card--dropped:hover,
.bro-card--dropped:focus-visible {
  border-color: #991b1b;
}

.bro-card--dropped .bro-card__name,
.bro-card--dropped .bro-card__meta,
.bro-card--dropped .bro-card__line {
  color: #991b1b;
}

.directory-empty {
  padding: 2rem 1rem;
  text-align: center;
  color: var(--grey-400);
}

/* Pledge class Photos & Videos gallery */
.media-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.1rem;
}

.media-empty {
  padding: 2rem 1rem;
  text-align: center;
  color: var(--grey-400);
}

.media-card {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid var(--grey-200);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.media-card__preview {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  background: var(--grey-100);
}

.media-card__preview img,
.media-card__preview video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-card__preview video {
  object-fit: contain;
  background: #000;
}

.media-card__footer {
  padding: 0.75rem 0.9rem;
}

.media-card__meta {
  margin: 0 0 0.6rem;
  font-size: 0.75rem;
  color: var(--grey-600);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.media-card__actions {
  display: flex;
  gap: 0.5rem;
}

.media-card__btn {
  flex: 1;
  padding: 0.4rem 0.5rem;
  border: 1px solid var(--grey-200);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--grey-600);
  font: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color var(--transition), color var(--transition);
}

.media-card__btn:hover,
.media-card__btn:focus-visible {
  border-color: var(--maroon);
  color: var(--maroon);
}

.media-card__btn--danger:hover,
.media-card__btn--danger:focus-visible {
  border-color: #991b1b;
  color: #991b1b;
}

/* Profile view modal */
.profile-modal__header {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.profile-modal__name {
  margin: 0;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--black);
}

.profile-modal__pledge {
  margin: 0.2rem 0 0;
  color: var(--maroon);
  font-weight: 600;
  font-size: 0.9rem;
}

.profile-modal__name--dropped {
  color: #991b1b;
}

.profile-modal__field-value--danger {
  color: #991b1b;
  font-weight: 700;
}

.profile-modal__bio {
  margin: 0 0 1.5rem;
  color: var(--grey-600);
  line-height: 1.6;
}

.profile-modal__grid[hidden] {
  display: none;
}

.profile-modal__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem 1.5rem;
}

.profile-modal__edit {
  margin-top: 1.25rem;
}

.profile-modal__edit-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.profile-modal__edit-actions .form-submit {
  width: auto;
  margin-top: 0;
}

.profile-modal__field {
  min-width: 0;
}

.profile-modal__field-label {
  margin: 0 0 0.2rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--grey-400);
}

.profile-modal__field-value {
  margin: 0;
  color: var(--black);
  word-break: break-word;
}

/* Birthdays */
.birthday-list {
  display: grid;
  gap: 0.75rem;
  max-width: 640px;
}

.birthday-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  width: 100%;
  padding: 0.9rem 1.1rem;
  background: var(--white);
  border: 1px solid var(--grey-200);
  border-radius: var(--radius-md);
  text-align: left;
  font: inherit;
  cursor: pointer;
  transition: border-color var(--transition);
}

.birthday-item:hover,
.birthday-item:focus-visible {
  border-color: var(--maroon);
}

.birthday-item.is-today {
  border-color: var(--maroon);
  background: var(--maroon-soft);
}

.birthday-item__info {
  flex: 1;
  min-width: 0;
}

.birthday-item__name {
  margin: 0;
  font-weight: 700;
  color: var(--black);
}

.birthday-item__date {
  margin: 0.15rem 0 0;
  font-size: 0.82rem;
  color: var(--grey-600);
}

.birthday-item__meta {
  margin: 0.15rem 0 0;
  font-size: 0.78rem;
  color: var(--grey-400);
}

.birthday-item__badge {
  flex-shrink: 0;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  background: var(--maroon);
  color: var(--white);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Stat tiles — used on Overview and Birthdays */
.stat-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.stat-tiles[hidden] {
  display: none;
}

.stat-tile {
  padding: 1.1rem 1.25rem;
  background: var(--white);
  border: 1px solid var(--grey-200);
  border-radius: var(--radius-md);
}

.stat-tile__value {
  margin: 0;
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--maroon);
  line-height: 1.1;
}

.stat-tile__label {
  margin: 0.3rem 0 0;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--grey-600);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Chapter breakdown bars (Overview "Chapters" card) */
.chapter-bars {
  display: grid;
  gap: 0.85rem;
}

.chapter-bar__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.3rem;
  font-size: 0.85rem;
}

.chapter-bar__name {
  font-weight: 600;
  color: var(--black);
}

.chapter-bar__count {
  color: var(--grey-400);
}

.chapter-bar__track {
  height: 8px;
  border-radius: 999px;
  background: var(--grey-100);
  overflow: hidden;
}

.chapter-bar__fill {
  height: 100%;
  border-radius: 999px;
  background: var(--maroon);
}

/* Birthdays — month group headers (sit inside .birthday-list's grid, whose
   gap already spaces them from the item above/below) */
.birthday-month-heading {
  margin: 1rem 0 0;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--grey-600);
}

.birthday-month-heading:first-child {
  margin-top: 0;
}

/* Overview */
.overview-nudge {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  margin-bottom: 2rem;
  background: var(--maroon-soft);
  border: 1px solid var(--maroon);
  border-radius: var(--radius-md);
}

.overview-nudge__text {
  margin: 0;
  color: var(--black);
  font-weight: 600;
  font-size: 0.92rem;
}

.overview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
}

.overview-card {
  padding: 1.5rem;
  background: var(--white);
  border: 1px solid var(--grey-200);
  border-radius: var(--radius-md);
}

.overview-card__title {
  margin: 0 0 1rem;
  font-size: 1rem;
  font-weight: 700;
  color: var(--black);
}

.overview-card__list {
  display: grid;
  gap: 0.75rem;
}

.overview-card__item {
  display: block;
  width: 100%;
  padding-bottom: 0.75rem;
  border: none;
  border-bottom: 1px solid var(--grey-200);
  background: none;
  text-align: left;
  font: inherit;
}

.overview-card__item:last-child {
  padding-bottom: 0;
  border-bottom: none;
}

.overview-card__item--clickable {
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: background var(--transition);
}

.overview-card__item--clickable:hover,
.overview-card__item--clickable:focus-visible {
  background: var(--grey-50);
}

.overview-card__item--birthday {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.overview-card__item-title {
  margin: 0;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--black);
}

.overview-card__item-meta {
  margin: 0.2rem 0 0;
  font-size: 0.8rem;
  color: var(--grey-600);
}

.overview-card__empty {
  font-size: 0.85rem;
  color: var(--grey-400);
}

/* Sub-tabs (Events Soon / Completed Events) */
.sub-tabs {
  display: flex;
  gap: 0.4rem;
  margin-bottom: 1.5rem;
  padding: 0.3rem;
  background: var(--grey-50);
  border: 1px solid var(--grey-200);
  border-radius: var(--radius-sm);
  max-width: 460px;
}

.sub-tabs__btn {
  flex: 1;
  padding: 0.6rem 1rem;
  border: none;
  border-radius: calc(var(--radius-sm) - 2px);
  background: transparent;
  color: var(--grey-600);
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
}

.sub-tabs__btn.is-active {
  background: var(--white);
  color: var(--maroon);
  box-shadow: var(--shadow-sm);
}

/* Author badge — clickable name + chapter + semester crossed, used on
   announcements, events, and comments */
.author-badge {
  display: inline-flex;
  align-items: baseline;
  gap: 0.35rem;
  padding: 0;
  border: none;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.author-badge:hover .author-badge__name,
.author-badge:focus-visible .author-badge__name {
  color: var(--maroon);
  text-decoration: underline;
}

.author-badge__name {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--black);
  transition: color var(--transition);
}

.author-badge__meta {
  font-size: 0.78rem;
  color: var(--grey-400);
  font-weight: 500;
}

.comment-item__author.author-badge {
  display: flex;
}

/* Comments — collapsed by default behind Show/Add buttons */
.comments-block {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--grey-200);
}

.comments-block__toolbar {
  display: flex;
  gap: 0.5rem;
}

.comments-block__empty {
  margin: 0.85rem 0 0;
  font-size: 0.85rem;
  color: var(--grey-400);
}

.comments-block .comment-list {
  margin-top: 0.85rem;
  padding-top: 0;
  border-top: none;
}

.comments-block .comment-form {
  margin-top: 0.85rem;
}

.comment-item.is-highlighted {
  animation: comment-highlight 2.5s ease;
}

@keyframes comment-highlight {
  0% {
    background: var(--maroon-soft);
  }
  100% {
    background: var(--grey-50);
  }
}

/* Compact event card tweaks */
.rsvp-event-card__desc-preview {
  margin: 0 0 0.75rem;
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--grey-600);
}

.rsvp-event-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 0.5rem;
}

/* Event / announcement detail popups */
.modal--detail {
  width: min(600px, 100%);
}

.event-modal__photo {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: var(--radius-sm);
  margin-bottom: 1rem;
}

.event-modal__meta {
  margin: 0 0 0.5rem;
  font-size: 0.85rem;
  color: var(--maroon);
  font-weight: 600;
}

.event-modal__author {
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
  margin-bottom: 0.85rem;
  font-size: 0.85rem;
  color: var(--grey-600);
}

.event-modal__desc {
  margin: 0 0 1rem;
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--grey-600);
  white-space: pre-wrap;
}

.event-modal__owner-actions {
  justify-content: flex-start;
  margin-bottom: 1rem;
}

/* Notification bell */
.notification-bell {
  position: relative;
  margin-left: auto;
}

.notification-bell__btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--grey-200);
  border-radius: 50%;
  background: var(--white);
  color: var(--grey-600);
  cursor: pointer;
  transition: border-color var(--transition), color var(--transition);
}

.notification-bell__btn:hover,
.notification-bell__btn:focus-visible {
  border-color: var(--maroon);
  color: var(--maroon);
}

.notification-bell__dot {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #e0344c;
  border: 2px solid var(--white);
}

/* position: fixed (not absolute) — the dropdown's top/left are set from JS
   using the bell button's viewport coordinates. This is required because the
   sidebar has overflow-y: auto (for the independent-scroll fix), which forces
   overflow-x to auto too and would clip an absolutely-positioned dropdown
   that's wider than the sidebar itself. */
.notification-dropdown {
  position: fixed;
  z-index: 40;
  width: 320px;
  max-height: 420px;
  overflow-y: auto;
  padding: 0.85rem;
  background: var(--white);
  border: 1px solid var(--grey-200);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
}

.notification-dropdown__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.6rem;
}

.notification-dropdown__title {
  margin: 0;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--grey-400);
}

.notification-dropdown__clear {
  padding: 0;
  border: none;
  background: none;
  color: var(--maroon);
  font: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
}

.notification-dropdown__clear:hover,
.notification-dropdown__clear:focus-visible {
  text-decoration: underline;
}

.notification-dropdown__list {
  display: grid;
  gap: 0.4rem;
}

.notification-dropdown__empty {
  margin: 0;
  padding: 1rem 0;
  text-align: center;
  font-size: 0.85rem;
  color: var(--grey-400);
}

.notification-item {
  display: flex;
  align-items: stretch;
  gap: 0.25rem;
  border-radius: var(--radius-sm);
  transition: background var(--transition);
}

.notification-item:hover,
.notification-item:focus-within {
  background: var(--grey-50);
}

.notification-item.is-unread {
  background: var(--maroon-soft);
}

.notification-item__body {
  display: block;
  flex: 1;
  min-width: 0;
  padding: 0.6rem 0.4rem 0.6rem 0.7rem;
  border: none;
  background: none;
  text-align: left;
  font: inherit;
  cursor: pointer;
}

.notification-item__text {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--black);
}

.notification-item__time {
  margin: 0.25rem 0 0;
  font-size: 0.72rem;
  color: var(--grey-400);
}

.notification-item__delete {
  flex-shrink: 0;
  align-self: center;
  margin-right: 0.5rem;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: none;
  color: var(--grey-400);
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
}

.notification-item__delete:hover,
.notification-item__delete:focus-visible {
  background: var(--grey-200);
  color: #991b1b;
}

@media (max-width: 700px) {
  .directory-filters {
    grid-template-columns: 1fr;
  }

  .profile-modal__grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  .portal-shell {
    flex-direction: column;
    height: auto;
    overflow: visible;
  }

  .portal-shell__sidebar {
    position: relative;
    width: 100%;
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem 1.5rem;
    overflow-y: visible;
    border-right: none;
    border-bottom: 1px solid var(--grey-200);
  }

  .portal-shell__main {
    overflow-y: visible;
  }

  .portal-shell__brand img {
    margin-bottom: 0;
  }

  .portal-shell__user {
    padding-bottom: 0;
    margin-bottom: 0;
    border-bottom: none;
  }

  /* Tabs collapse into a dropdown — the horizontal scrolling strip this
     replaced made most tabs undiscoverable on a phone-width screen. */
  .portal-shell__nav-toggle {
    display: flex;
    order: 3;
    flex: 1 1 100%;
  }

  .portal-shell__nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0.15rem;
    order: 4;
    margin-top: 0.5rem;
    padding: 0.5rem;
    background: var(--white);
    border: 1px solid var(--grey-200);
    border-radius: var(--radius-md);
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.16);
    max-height: 70vh;
    overflow-y: auto;
    z-index: 40;
  }

  .portal-shell__nav.is-open {
    display: flex;
  }

  .portal-shell__signout {
    order: 2;
    margin-left: auto;
  }
}

/* ---------- Forms (Google-Forms-style builder + responses) ---------- */
.forms-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}

.forms-grid[hidden] {
  display: none;
}

.forms-card {
  padding: 1.25rem;
  background: var(--white);
  border: 1px solid var(--grey-200);
  border-radius: var(--radius-md);
}

.forms-card__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.forms-card__title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--black);
}

.forms-card__badge {
  flex-shrink: 0;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  white-space: nowrap;
}

.forms-card__badge.is-published {
  background: rgba(34, 139, 87, 0.14);
  color: #1c8a52;
}

.forms-card__badge.is-draft {
  background: var(--grey-100);
  color: var(--grey-600);
}

.forms-card__desc {
  margin: 0 0 0.6rem;
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--grey-600);
}

.forms-card__meta {
  margin: 0 0 0.85rem;
  font-size: 0.8rem;
  color: var(--grey-400);
}

.forms-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* Form builder modal */
.form-builder__publish-toggle {
  margin-bottom: 1.25rem;
}

.form-builder__question {
  padding: 1rem;
  margin-bottom: 1rem;
  background: var(--grey-50);
  border: 1px solid var(--grey-200);
  border-radius: var(--radius-md);
}

.form-builder__question-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.form-builder__question-head .form-input {
  flex: 1 1 200px;
}

.form-builder__type-select {
  width: auto;
  flex: 0 0 auto;
}

.form-builder__move-btn {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--grey-200);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--grey-600);
  cursor: pointer;
  transition: border-color var(--transition), color var(--transition);
}

.form-builder__move-btn:hover:not(:disabled),
.form-builder__move-btn:focus-visible:not(:disabled) {
  border-color: var(--maroon);
  color: var(--maroon);
}

.form-builder__move-btn:disabled {
  opacity: 0.35;
  cursor: default;
}

.form-builder__options {
  margin-bottom: 0.75rem;
}

.form-builder__option-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.form-builder__option-row .form-input {
  flex: 1;
}

.form-builder__option-remove {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border: none;
  border-radius: 50%;
  background: none;
  color: var(--grey-400);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
}

.form-builder__option-remove:hover,
.form-builder__option-remove:focus-visible {
  background: var(--maroon-soft);
  color: var(--maroon);
}

.form-builder__question-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.form-builder__required {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  color: var(--grey-600);
}

/* Form builder: banner upload */
.form-banner-field {
  margin-bottom: 1.5rem;
}

.form-banner-field__preview {
  width: 100%;
  aspect-ratio: 3.5 / 1;
  margin-bottom: 0.85rem;
  background: var(--grey-50);
  border: 1px solid var(--grey-200);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.form-banner-field__preview img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.form-banner-field__actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.form-banner-field__actions .profile-photo-field__hint {
  margin: 0;
  flex-basis: 100%;
}

/* Banner crop modal */
.modal--crop {
  width: min(720px, 100%);
}

.banner-crop__stage {
  width: 100%;
  aspect-ratio: 3.5 / 1;
  margin: 1rem 0;
  background: var(--grey-100);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.banner-crop__stage canvas {
  display: block;
  width: 100%;
  height: 100%;
  cursor: grab;
  touch-action: none;
}

.banner-crop__stage canvas.is-dragging {
  cursor: grabbing;
}

.banner-crop__zoom-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  color: var(--grey-600);
}

.banner-crop__zoom-row input[type="range"] {
  flex: 1;
  accent-color: var(--maroon);
}

.banner-crop__actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
}

/* Share modal: public link + collaborators */
.form-share__link-row {
  display: flex;
  gap: 0.5rem;
  margin: 0.4rem 0 1.5rem;
}

.form-share__link-row .form-input {
  flex: 1;
}

.form-share__collab-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--grey-200);
  font-size: 0.9rem;
}

.form-share__add-row {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
}

.form-share__add-row .form-select {
  flex: 1;
}

/* Back button — form builder / responses pages (sub-views reached only from
   inside the Forms tab, not their own sidebar destination). */
.portal-back-btn {
  display: inline-flex;
  align-items: center;
  margin-bottom: 0.85rem;
  padding: 0;
  border: none;
  background: none;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--maroon);
  cursor: pointer;
}

.portal-back-btn:hover,
.portal-back-btn:focus-visible {
  color: var(--maroon-dark);
  text-decoration: underline;
}

/* Responses page: sidebar list of responses + single-response detail pane */
.form-responses-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  align-items: start;
  gap: 1.5rem;
}

.form-responses-sidebar {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-height: calc(100vh - 260px);
  overflow-y: auto;
  padding-right: 0.25rem;
}

.form-responses-sidebar__item {
  display: block;
  width: 100%;
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--grey-200);
  border-radius: var(--radius-sm);
  background: var(--white);
  text-align: left;
  font: inherit;
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition);
}

.form-responses-sidebar__item:hover,
.form-responses-sidebar__item:focus-visible {
  border-color: var(--maroon);
}

.form-responses-sidebar__item.is-active {
  border-color: var(--maroon);
  background: var(--maroon-soft);
}

.form-responses-sidebar__item-index {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--black);
}

.form-responses-sidebar__item-time {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.78rem;
  color: var(--grey-400);
}

.form-responses-detail {
  padding: 1.5rem;
  background: var(--white);
  border: 1px solid var(--grey-200);
  border-radius: var(--radius-md);
}

.form-responses-detail__nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--grey-200);
}

.form-responses-detail__position {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--grey-600);
}

.form-responses-detail__nav-btns {
  display: flex;
  gap: 0.5rem;
}

.form-response-detail__qa {
  margin-bottom: 1.25rem;
}

.form-response-detail__qa:last-child {
  margin-bottom: 0;
}

.form-response-detail__q {
  margin: 0 0 0.5rem;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--black);
}

.form-response-detail__a {
  margin: 0;
  padding: 0.75rem 1rem;
  background: var(--grey-50);
  border: 1px solid var(--grey-200);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  color: var(--grey-600);
  white-space: pre-wrap;
}

@media (max-width: 900px) {
  .form-responses-layout {
    grid-template-columns: 1fr;
  }

  .form-responses-sidebar {
    flex-direction: row;
    max-height: none;
    overflow-x: auto;
    padding-bottom: 0.25rem;
  }

  .form-responses-sidebar__item {
    flex-shrink: 0;
    width: 200px;
  }
}

/* Public form-fill page (form-view.html) — unauthenticated, no portal shell */
.public-form-page {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  padding: clamp(1.5rem, 5vw, 4rem) 1.25rem;
  background: var(--grey-50);
}

.public-form-card {
  width: min(640px, 100%);
  height: fit-content;
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.public-form-card__body {
  padding: clamp(1.5rem, 4vw, 2.5rem);
}

.public-form-card__banner {
  width: 100%;
  aspect-ratio: 3.5 / 1;
  background: var(--grey-100);
}

.public-form-card__banner img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.public-form-card__brand {
  display: block;
  width: fit-content;
  margin-bottom: 1.5rem;
}

.public-form-gate__notice {
  margin: 0 0 1.25rem;
  font-size: 0.9rem;
  color: var(--grey-600);
}

.public-form-card__brand img {
  height: 32px;
  width: auto;
}

.public-form-card__title {
  margin: 0 0 0.5rem;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--black);
}

.public-form-card__desc {
  margin: 0 0 1.75rem;
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--grey-600);
  white-space: pre-wrap;
}

.public-form-question {
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--grey-200);
}

.public-form-question:last-of-type {
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 1.75rem;
}

.public-form-question__label {
  display: block;
  margin-bottom: 0.65rem;
  font-weight: 600;
  color: var(--black);
}

.public-form-question__required {
  margin-left: 0.25rem;
  color: var(--maroon);
}

.public-form-choice-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 0.6rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--grey-200);
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition);
}

.public-form-choice-row:last-child {
  margin-bottom: 0;
}

.public-form-choice-row:hover {
  border-color: var(--maroon);
}

.public-form-choice-row:has(input:checked) {
  border-color: var(--maroon);
  background: color-mix(in srgb, var(--maroon) 8%, transparent);
}

.public-form-choice-row:focus-within {
  outline: 2px solid var(--maroon);
  outline-offset: 2px;
}

.public-form-choice-row input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  opacity: 0;
  pointer-events: none;
}

.public-form-choice-row__indicator {
  position: relative;
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border: 2px solid var(--grey-200);
  border-radius: 50%;
  transition: border-color var(--transition);
}

.public-form-choice-row--checkbox .public-form-choice-row__indicator {
  border-radius: 6px;
}

.public-form-choice-row input:checked ~ .public-form-choice-row__indicator {
  border-color: var(--maroon);
}

.public-form-choice-row input:checked ~ .public-form-choice-row__indicator::after {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: var(--maroon);
}

.public-form-choice-row--checkbox input:checked ~ .public-form-choice-row__indicator::after {
  inset: auto;
  top: 50%;
  left: 50%;
  width: 9px;
  height: 5px;
  margin: -6px 0 0 -5px;
  background: transparent;
  border-radius: 0;
  border-left: 2px solid var(--maroon);
  border-bottom: 2px solid var(--maroon);
  transform: rotate(-45deg);
}

.public-form-choice-row__text {
  color: var(--black);
}

.public-form-state {
  padding: 3rem 1rem;
  text-align: center;
  color: var(--grey-600);
}

.public-form-state__title {
  margin: 0 0 0.5rem;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--black);
}

/* ---------- Family Tree ---------- */
.familytree-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-bottom: 1rem;
}

.familytree-legend {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.6rem 1rem;
}

.familytree-legend__chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--grey-600);
}

.familytree-legend__dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.familytree-zoom-controls {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.familytree-stage {
  position: relative;
  height: 65vh;
  min-height: 420px;
  overflow: hidden;
  background-color: var(--grey-50);
  background-image: radial-gradient(var(--grey-200) 1.5px, transparent 1.5px);
  background-size: 26px 26px;
  border: 1px solid var(--grey-200);
  border-radius: var(--radius-lg);
  cursor: grab;
  touch-action: none;
  user-select: none;
}

.familytree-stage.is-panning {
  cursor: grabbing;
}

.familytree-svg {
  display: block;
  width: 100%;
  height: 100%;
}

.familytree-empty[hidden] {
  display: none;
}

.familytree-empty {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  margin: 0;
  color: var(--grey-600);
  font-size: 0.95rem;
  text-align: center;
  pointer-events: none;
}

.familytree-node {
  cursor: pointer;
  transform: translate(var(--tx), var(--ty));
  transform-box: fill-box;
  transform-origin: center;
  transition: transform 0.15s var(--ease-out, ease);
}

.familytree-node:hover {
  transform: translate(var(--tx), var(--ty)) scale(1.04);
}

.familytree-node:hover .familytree-node__card {
  stroke-width: 3;
}

.familytree-node__card {
  fill: var(--white);
  stroke: var(--chapter-color, var(--grey-200));
  stroke-width: 2;
  filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.18));
  transition: stroke-width var(--transition);
}

.familytree-node__label,
.familytree-node__sublabel {
  fill: var(--black);
  text-anchor: start;
  font-family: inherit;
  pointer-events: none;
}

.familytree-node__label {
  font-size: 13px;
  font-weight: 700;
}

.familytree-node__sublabel {
  font-size: 11px;
  fill: var(--grey-600);
}

.familytree-node__circle {
  stroke: var(--white);
  stroke-width: 2;
}

.familytree-node__initials {
  fill: #fff;
  text-anchor: middle;
  dominant-baseline: central;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  pointer-events: none;
}

.familytree-edge {
  fill: none;
  stroke: var(--grey-400);
  stroke-width: 2;
  stroke-linecap: round;
}

.familytree-person-littles {
  margin-top: 1.25rem;
}

.familytree-person-littles__title {
  margin: 0 0 0.6rem;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--grey-600);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.familytree-person-littles__list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.familytree-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.7rem;
  background: var(--grey-50);
  border: 1px solid var(--grey-200);
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--black);
  cursor: pointer;
  transition: border-color var(--transition), color var(--transition);
}

.familytree-chip:hover,
.familytree-chip:focus-visible {
  border-color: var(--maroon);
  color: var(--maroon);
}

.familytree-chip__dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.familytree-big-link {
  color: var(--maroon);
  font-weight: 600;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  font: inherit;
}

.familytree-big-link:hover,
.familytree-big-link:focus-visible {
  text-decoration: underline;
}

.familytree-big-picker {
  position: relative;
}

.familytree-quickfill {
  padding: 0.9rem 1rem 1.1rem;
  margin-bottom: 1.25rem;
  background: var(--grey-50);
  border: 1px dashed var(--grey-200);
  border-radius: var(--radius-sm);
}

.familytree-quickfill .form-textarea {
  margin-bottom: 0.6rem;
  min-height: 100px;
}

/* Statistics modal */
.familytree-stats-section {
  margin-top: 1.75rem;
}

.familytree-stats-heading {
  margin: 0 0 0.85rem;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--grey-600);
}

.familytree-stats-recruiters {
  display: grid;
  gap: 0.6rem;
}

.familytree-stats-recruiter {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.75rem;
  background: var(--grey-50);
  border-radius: var(--radius-sm);
}

.familytree-stats-recruiter__rank {
  flex-shrink: 0;
  width: 1.5rem;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--grey-400);
  text-align: center;
}

.familytree-stats-recruiter__name {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--black);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.familytree-stats-recruiter__count {
  flex-shrink: 0;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  background: var(--maroon-soft);
  color: var(--maroon);
  font-size: 0.78rem;
  font-weight: 700;
}

.familytree-stats-empty {
  font-size: 0.85rem;
  color: var(--grey-400);
}

.familytree-search {
  flex: 1 1 240px;
  min-width: 200px;
  max-width: 320px;
}

/* Applied only while jumping to a search result — normal drag/wheel pan and
   zoom stay instant, this is removed again right after the jump animates. */
.familytree-viewport--animated {
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes familytree-pulse {
  0%,
  100% {
    stroke-width: 2;
    stroke: var(--chapter-color, var(--grey-200));
  }
  50% {
    stroke-width: 4;
    stroke: var(--maroon);
  }
}

.familytree-node--highlight .familytree-node__card {
  animation: familytree-pulse 0.55s ease-in-out 3;
}

.familytree-big-picker__results[hidden] {
  display: none;
}

.familytree-big-picker__results {
  position: absolute;
  z-index: 10;
  top: calc(100% + 0.3rem);
  left: 0;
  right: 0;
  max-height: 220px;
  overflow-y: auto;
  background: var(--white);
  border: 1px solid var(--grey-200);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  padding: 0.35rem;
}

.familytree-big-picker__option {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.5rem 0.6rem;
  border: none;
  border-radius: var(--radius-sm);
  background: none;
  text-align: left;
  font: inherit;
  font-size: 0.9rem;
  color: var(--black);
  cursor: pointer;
}

.familytree-big-picker__option:hover,
.familytree-big-picker__option:focus-visible {
  background: var(--grey-50);
}

.familytree-big-picker__option--none {
  color: var(--grey-600);
  font-style: italic;
  border-bottom: 1px solid var(--grey-200);
  border-radius: 0;
  margin-bottom: 0.25rem;
  padding-bottom: 0.65rem;
}

.familytree-big-picker__chapter {
  color: var(--grey-400);
  font-weight: 500;
}

.familytree-big-picker__empty {
  margin: 0;
  padding: 0.5rem 0.6rem;
  font-size: 0.85rem;
  color: var(--grey-600);
}
