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

:root {
  --gold: #C8952A;
  --gold-dark: #a87820;
  --gold-light: #f0c050;
  --purple: #6B2D9F;
  --purple-dark: #521a80;
  --purple-light: #8B4FC3;
  --black: #1a1a1a;
  --white: #ffffff;
  --gray-light: #f5f5f5;
  --gray-mid: #e0e0e0;
  --gray-text: #555;
  --shadow: 0 2px 12px rgba(0,0,0,0.10);
}

body {
  font-family: 'Segoe UI', system-ui, sans-serif;
  color: var(--black);
  background: var(--white);
  line-height: 1.6;
}

/* NAV */
nav {
  background: var(--black);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow);
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.nav-logo-img {
  height: 38px;
  width: auto;
  flex-shrink: 0;
}

.nav-logo .logo-text {
  color: var(--white);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.2;
}

.nav-logo .logo-sub {
  color: var(--purple-light);
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  gap: 0.25rem;
  list-style: none;
}

.nav-links a {
  color: var(--gray-mid);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.5rem 0.9rem;
  border-radius: 6px;
  transition: color 0.2s, background 0.2s;
}

.nav-links a:hover {
  color: var(--white);
  background: rgba(255,255,255,0.08);
}

.nav-cta {
  background: var(--purple) !important;
  color: var(--white) !important;
  font-weight: 700 !important;
}

.nav-cta:hover {
  background: var(--purple-dark) !important;
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
  background: none;
  border: none;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: 0.3s;
}

/* HERO */
.hero {
  background: var(--black);
  color: var(--white);
  padding: 5rem 1.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero-geo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.hero-inner {
  max-width: 760px;
  margin: 0 auto;
  position: relative;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 1.25rem;
}

.hero h1 .gold {
  color: var(--gold);
}

.hero h1 .purple {
  color: var(--purple-light);
}

.hero p {
  font-size: 1.15rem;
  color: #ccc;
  max-width: 580px;
  margin: 0 auto 2.25rem;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  padding: 0.8rem 2rem;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.2s;
}

.btn-primary {
  background: var(--gold);
  color: var(--black);
}

.btn-primary:hover {
  background: var(--gold-dark);
}

.btn-outline {
  background: transparent;
  border-color: rgba(255,255,255,0.4);
  color: var(--white);
}

.btn-outline:hover {
  border-color: var(--white);
  background: rgba(255,255,255,0.08);
}

/* SECTIONS */
section {
  padding: 4.5rem 1.5rem;
}

.section-inner {
  max-width: 1100px;
  margin: 0 auto;
}

.section-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--purple);
  margin-bottom: 0.5rem;
}

.section-title {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 800;
  margin-bottom: 0.75rem;
  line-height: 1.2;
}

.section-desc {
  color: var(--gray-text);
  max-width: 600px;
  font-size: 1.05rem;
}

/* GEO SHAPE ANIMATIONS */
.geo-drift, .geo-drift-b, .geo-drift-c {
  transform-box: fill-box;
  transform-origin: center;
  will-change: transform;
}

.geo-drift   { animation: geo-drift   18s ease-in-out infinite; }
.geo-drift-b { animation: geo-drift-b 18s ease-in-out infinite; }
.geo-drift-c { animation: geo-drift-c 18s ease-in-out infinite; }

@keyframes geo-drift {
  0%, 100% { transform: translate(0,    0);    }
  33%       { transform: translate(14px, -10px); }
  66%       { transform: translate(-9px,  7px);  }
}

@keyframes geo-drift-b {
  0%, 100% { transform: translate(0,     0);    }
  30%       { transform: translate(-14px, 10px); }
  65%       { transform: translate(10px, -13px); }
}

@keyframes geo-drift-c {
  0%, 100% { transform: translate(0,    0);    }
  40%       { transform: translate(17px,  8px); }
  75%       { transform: translate(-8px, -15px); }
}

@media (prefers-reduced-motion: reduce) {
  .geo-drift, .geo-drift-b, .geo-drift-c { animation: none; }
}

/* VISION SECTION */
.vision-section {
  background: var(--black);
  padding: 5.5rem 1.5rem;
  text-align: center;
}

.vision-inner {
  max-width: 820px;
  margin: 0 auto;
}

.vision-eyebrow {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.5rem;
}

.vision-headline {
  font-size: clamp(1.9rem, 4.5vw, 3.25rem);
  font-weight: 900;
  line-height: 1.25;
  color: var(--white);
  margin-bottom: 1.75rem;
}

.vision-gold  { color: var(--gold); }
.vision-purple { color: var(--purple-light); }

.vision-body {
  font-size: 1.1rem;
  color: rgba(255,255,255,0.72);
  line-height: 1.8;
  max-width: 680px;
  margin: 0 auto;
}

/* SPONSOR TICKER */
.sponsor-ticker {
  background: var(--purple-dark);
  padding: 0.7rem 0;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.ticker-label {
  white-space: nowrap;
  padding: 0 1.25rem 0 1.5rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  flex-shrink: 0;
  border-right: 1px solid rgba(255,255,255,0.2);
  margin-right: 1.25rem;
}

.ticker-track {
  overflow: hidden;
  flex: 1;
}

.ticker-content {
  display: flex;
  align-items: center;
  width: max-content;
  animation: ticker-scroll 35s linear infinite;
}

.ticker-content span {
  color: rgba(255,255,255,0.9);
  font-size: 0.875rem;
  font-weight: 600;
  white-space: nowrap;
  padding: 0 1rem;
}

.ticker-sep {
  color: var(--gold) !important;
  padding: 0 0.25rem !important;
  font-size: 0.6rem !important;
}

.ticker-logo-wrap {
  display: inline-flex !important;
  align-items: center;
  background: var(--white);
  border-radius: 6px;
  padding: 0.2rem 0.6rem !important;
  margin: 0 0.5rem;
  vertical-align: middle;
}

.ticker-logo-wrap img {
  height: 26px;
  width: auto;
  display: block;
}

@keyframes ticker-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* SPONSORS SECTION */
#sponsors {
  background: var(--gray-light);
}

/* Tier blocks — Engineer, Conductor, Switchmen */
.tier-block {
  margin-top: 3.25rem;
}

.tier-head {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.tier-head::after {
  content: '';
  flex: 1;
  height: 2px;
  background: var(--gray-mid);
}

.tier-name {
  font-size: 1.4rem;
  font-weight: 900;
  letter-spacing: 0.02em;
  flex-shrink: 0;
}

.tier-engineer  .tier-name { color: var(--gold-dark); font-size: 1.7rem; }
.tier-conductor .tier-name { color: var(--purple); }

.tier-engineer  .tier-head::after { background: var(--gold); }
.tier-conductor .tier-head::after { background: var(--purple-light); }

.tier-meta {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gray-text);
  flex-shrink: 0;
  order: 3;
}

/* Shared sponsor card */
.sponsor-card {
  background: var(--white);
  border: 1px solid var(--gray-mid);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  text-decoration: none;
  color: var(--black);
  box-shadow: var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.sponsor-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 24px rgba(0,0,0,0.13);
}

.sponsor-logo-img {
  max-width: 100%;
  height: auto;
  object-fit: contain;
}

.sponsor-wordmark {
  font-weight: 800;
  line-height: 1.25;
  color: var(--black);
}

.sponsor-card-name {
  font-size: 0.8rem;
  color: var(--gray-text);
  margin-top: 0.6rem;
}

/* Engineer — the largest treatment */
.eng-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.25rem;
}

.eng-card {
  border-top: 4px solid var(--gold);
  padding: 1.75rem 1.4rem;
  min-height: 168px;
}

.eng-card:hover {
  border-color: var(--gold);
}

.eng-card .sponsor-logo-img {
  max-height: 88px;
}

.eng-card .sponsor-wordmark {
  font-size: 1.15rem;
}

/* Conductor — noticeably smaller than Engineer */
.con-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  gap: 0.9rem;
}

.con-card {
  border-top: 3px solid var(--purple-light);
  padding: 1.1rem 0.9rem;
  min-height: 104px;
}

.con-card:hover {
  border-color: var(--purple);
}

.con-card .sponsor-logo-img {
  max-height: 50px;
}

.con-card .sponsor-wordmark {
  font-size: 0.9rem;
}

.con-card .sponsor-card-name {
  font-size: 0.72rem;
  margin-top: 0.4rem;
}

/* Switchmen — names only */
.switch-list {
  list-style: none;
  columns: 4;
  column-gap: 2rem;
}

.switch-item {
  break-inside: avoid;
  padding: 0.3rem 0 0.3rem 1rem;
  position: relative;
  font-size: 0.92rem;
  line-height: 1.45;
}

.switch-item::before {
  content: '◆';
  position: absolute;
  left: 0;
  top: 0.35rem;
  font-size: 0.5rem;
  color: var(--gold);
}

.switch-name {
  color: var(--black);
  text-decoration: none;
}

a.switch-name:hover {
  color: var(--purple);
  text-decoration: underline;
}

.sponsor-cta {
  margin-top: 3rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.sponsor-cta p {
  color: var(--gray-text);
  font-size: 1.05rem;
}

/* MISSION */
#mission {
  background: var(--gray-light);
}

.mission-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
  margin-top: 2.5rem;
}

.mission-text p {
  color: var(--gray-text);
  margin-bottom: 1rem;
  font-size: 1.05rem;
}

.funding-callout {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
  justify-content: center;
  flex-wrap: wrap;
}

.funding-pill {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--white);
  border: 2px solid var(--purple);
  border-radius: 8px;
  padding: 0.6rem 1rem;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--purple-dark);
}

.funding-pill:last-child {
  border-color: var(--gold-dark);
  color: var(--gold-dark);
}

.funding-pill .pill-icon {
  font-size: 1.1rem;
}

.mission-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.stat-card {
  background: var(--white);
  border: 1px solid var(--gray-mid);
  border-radius: 12px;
  padding: 1.5rem;
  text-align: center;
  box-shadow: var(--shadow);
}

.stat-card .stat-num {
  font-size: 2rem;
  font-weight: 900;
  line-height: 1;
}

.stat-card .stat-num.gold  { color: var(--gold-dark); }
.stat-card .stat-num.purple { color: var(--purple); }

.stat-card .stat-label {
  font-size: 0.85rem;
  color: var(--gray-text);
  margin-top: 0.35rem;
}

/* WHAT WE DO */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  margin-top: 2.5rem;
}

.card {
  background: var(--white);
  border: 1px solid var(--gray-mid);
  border-left: 4px solid var(--purple);
  border-radius: 14px;
  padding: 2rem 1.75rem;
  box-shadow: var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s;
}

.card:nth-child(even) {
  border-left-color: var(--gold);
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 24px rgba(0,0,0,0.13);
}

.card-icon {
  font-size: 2.25rem;
  margin-bottom: 1rem;
}

.card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.card p {
  color: var(--gray-text);
  font-size: 0.95rem;
}

/* SPORTS GRID */
#sports {
  background: var(--gray-light);
}

/* 14 chips — 7 across gives two full rows. 14 only divides evenly by 7 and 2,
   so narrower screens drop straight to 2 columns to stay even. */
.sports-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1rem;
  margin-top: 2.5rem;
}

@media (max-width: 900px) {
  .sports-grid { grid-template-columns: repeat(2, 1fr); }
}

.sport-chip {
  background: var(--white);
  border: 1.5px solid var(--gray-mid);
  border-radius: 10px;
  padding: 1rem;
  text-align: center;
  font-weight: 600;
  font-size: 0.9rem;
  box-shadow: var(--shadow);
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.sport-chip:hover {
  border-color: var(--purple);
  color: var(--purple-dark);
  background: rgba(107,45,159,0.04);
}

.sport-chip .sport-emoji {
  display: block;
  font-size: 1.75rem;
  margin-bottom: 0.35rem;
}

/* INVOLVEMENT */
.involve-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 2.5rem;
}

.involve-card {
  background: var(--black);
  color: var(--white);
  border-radius: 14px;
  padding: 2rem 1.75rem;
  position: relative;
  overflow: hidden;
}

.involve-card.purple-card {
  background: var(--purple-dark);
}

.involve-card::before {
  content: '';
  position: absolute;
  top: -30px;
  right: -30px;
  width: 100px;
  height: 100px;
  background: rgba(200,149,42,0.15);
  border-radius: 50%;
}

.involve-card.purple-card::before {
  background: rgba(255,255,255,0.08);
}

.involve-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 0.5rem;
}

.involve-card.purple-card h3 {
  color: var(--gold-light);
}

.involve-card p {
  color: #ccc;
  font-size: 0.95rem;
  margin-bottom: 1.25rem;
}

.involve-card .btn-sm {
  display: inline-block;
  padding: 0.5rem 1.25rem;
  background: var(--gold);
  color: var(--black);
  border-radius: 6px;
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.2s;
}

.involve-card .btn-sm:hover {
  background: var(--gold-dark);
}

/* CONTACT */
#contact {
  background: var(--gray-light);
}

.contact-inner {
  text-align: center;
}

.contact-inner .section-desc {
  margin: 0 auto;
}

.contact-email-card {
  background: var(--black);
  border-radius: 16px;
  padding: 2.75rem 2rem;
  margin: 2.5rem auto 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  max-width: 560px;
}

.contact-email-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
}

.contact-email-address {
  font-size: clamp(1.1rem, 3.5vw, 1.45rem);
  font-weight: 800;
  color: var(--white);
  text-decoration: none;
  border-bottom: 2px solid var(--purple-light);
  padding-bottom: 3px;
  transition: color 0.2s, border-color 0.2s;
  word-break: break-all;
}

.contact-email-address:hover {
  color: var(--gold);
  border-color: var(--gold);
}

.contact-email-note {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.45);
  margin-top: 0.35rem;
}

.contact-info-row {
  display: flex;
  gap: 1.25rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 1.75rem;
}

.contact-info-chip {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--white);
  border: 1px solid var(--gray-mid);
  border-radius: 10px;
  padding: 1rem 1.25rem;
  box-shadow: var(--shadow);
  text-align: left;
}

.contact-info-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.contact-info-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--gray-text);
  margin-bottom: 0.15rem;
}

.contact-info-value {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--black);
}

/* FOOTER */
footer {
  background: var(--black);
  color: #aaa;
  padding: 2.5rem 1.5rem;
  text-align: center;
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
}

.footer-logo {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--white);
  margin-bottom: 0.5rem;
}

.footer-logo .gold { color: var(--gold); }
.footer-logo .purple { color: var(--purple-light); }

footer p {
  font-size: 0.875rem;
  margin-top: 0.5rem;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin: 1.25rem 0;
  list-style: none;
  flex-wrap: wrap;
}

.footer-links a {
  color: #aaa;
  text-decoration: none;
  font-size: 0.875rem;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--gold);
}

/* ACTIVE NAV */
.nav-links a.active {
  color: var(--white);
  background: rgba(255,255,255,0.1);
}

/* PAGE HEADER (subpages) */
.page-header {
  background: var(--black);
  color: var(--white);
  padding: 3.5rem 1.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.page-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(200,149,42,0.07) 0%, transparent 50%, rgba(107,45,159,0.07) 100%);
  pointer-events: none;
}

.page-header-inner {
  position: relative;
  max-width: 760px;
  margin: 0 auto;
}

.page-header-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.75rem;
}

.page-header h1 {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 900;
  margin-bottom: 0.6rem;
  line-height: 1.2;
}

.page-header p {
  color: rgba(255,255,255,0.7);
  font-size: 1rem;
}

/* EXPLORE SECTION (home page) */
.explore-section {
  background: var(--gray-light);
  padding: 4.5rem 1.5rem;
}

/* Six cards, fixed column counts so every row stays full — 3+3, then 2+2+2, then stacked. */
.explore-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 2.5rem;
}

@media (max-width: 860px) {
  .explore-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 560px) {
  .explore-grid { grid-template-columns: 1fr; }
}

.explore-card {
  background: var(--white);
  border: 1px solid var(--gray-mid);
  border-top: 4px solid var(--purple);
  border-radius: 14px;
  padding: 2rem 1.75rem;
  text-decoration: none;
  color: var(--black);
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s;
}

.explore-card:nth-child(even) {
  border-top-color: var(--gold);
}

.explore-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 24px rgba(0,0,0,0.13);
}

.explore-icon {
  font-size: 2.25rem;
  margin-bottom: 0.75rem;
}

.explore-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
}

.explore-card p {
  color: var(--gray-text);
  font-size: 0.9rem;
  flex: 1;
  margin-bottom: 1rem;
}

.explore-arrow {
  color: var(--purple);
  font-weight: 700;
  font-size: 0.88rem;
  transition: transform 0.2s;
  display: inline-block;
}

.explore-card:nth-child(even) .explore-arrow {
  color: var(--gold-dark);
}

.explore-card:hover .explore-arrow {
  transform: translateX(5px);
}

/* IMPACT / SHEET EMBED */
.sheet-container {
  margin-top: 2.5rem;
}

.sheet-placeholder {
  text-align: center;
  padding: 4rem 2rem;
  background: var(--white);
  border: 2px dashed var(--gray-mid);
  border-radius: 14px;
}

.sheet-placeholder-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.sheet-placeholder h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.6rem;
}

.sheet-placeholder p {
  color: var(--gray-text);
  max-width: 500px;
  margin: 0 auto;
  font-size: 0.95rem;
}

.sheet-embed {
  width: 100%;
  min-height: 620px;
  border: none;
  border-radius: 10px;
  box-shadow: var(--shadow);
}

/* MEMBERS */
#members {
  background: var(--gray-light);
}

.member-count-line {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  margin-top: 2rem;
}

.member-count-num {
  font-size: 2.25rem;
  font-weight: 900;
  color: var(--purple);
  line-height: 1;
}

.member-count-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gray-text);
}

.member-list {
  list-style: none;
  columns: 3;
  column-gap: 2rem;
  margin-top: 1.5rem;
}

.member-item {
  break-inside: avoid;
  padding: 0.45rem 0 0.45rem 1.1rem;
  position: relative;
  font-size: 0.95rem;
  border-bottom: 1px solid var(--gray-mid);
}

.member-item::before {
  content: '◆';
  position: absolute;
  left: 0;
  top: 0.55rem;
  font-size: 0.5rem;
  color: var(--purple-light);
}

/* EDIT ENTRY POINT */
.edit-bar {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--gray-mid);
  text-align: center;
}

.edit-link {
  background: none;
  border: none;
  cursor: pointer;
  font: inherit;
  font-size: 0.82rem;
  color: var(--gray-text);
  text-decoration: underline;
  text-underline-offset: 3px;
  padding: 0.4rem 0.6rem;
  border-radius: 6px;
  transition: color 0.2s;
}

.edit-link:hover {
  color: var(--purple);
}

/* LIST EDITOR */
body.editor-open {
  overflow: hidden;
}

.editor-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0,0,0,0.6);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 2rem 1rem;
  overflow-y: auto;
}

.editor-panel {
  background: var(--white);
  border-radius: 16px;
  width: 100%;
  max-width: 720px;
  padding: 2.25rem 2rem;
  position: relative;
  box-shadow: 0 20px 60px rgba(0,0,0,0.35);
}

.editor-close {
  position: absolute;
  top: 0.75rem;
  right: 1rem;
  background: none;
  border: none;
  font-size: 1.75rem;
  line-height: 1;
  color: var(--gray-text);
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
}

.editor-close:hover {
  color: var(--black);
  background: var(--gray-light);
}

.editor-title {
  font-size: 1.35rem;
  font-weight: 800;
}

.editor-note {
  color: var(--gray-text);
  font-size: 0.88rem;
  margin-top: 0.35rem;
  margin-bottom: 1.5rem;
}

.editor-field {
  display: block;
  margin-bottom: 1.35rem;
}

.editor-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--purple);
  margin-bottom: 0.25rem;
}

.editor-hint {
  display: block;
  font-size: 0.8rem;
  color: var(--gray-text);
  margin-bottom: 0.5rem;
}

.editor-pin,
.editor-filter,
.row-name,
.row-level,
.row-extra {
  width: 100%;
  font-family: inherit;
  font-size: 0.92rem;
  color: var(--black);
  background: var(--white);
  border: 1.5px solid var(--gray-mid);
  border-radius: 8px;
  padding: 0.55rem 0.7rem;
}

.editor-pin:focus,
.editor-filter:focus,
.row-name:focus,
.row-level:focus,
.row-extra:focus {
  outline: none;
  border-color: var(--purple);
  box-shadow: 0 0 0 3px rgba(107,45,159,0.15);
}

.editor-pin {
  letter-spacing: 0.2em;
}

/* PIN and search share one line */
.editor-toprow {
  display: flex;
  gap: 1rem;
  align-items: flex-end;
  margin-bottom: 1.5rem;
}

.editor-field--inline { margin-bottom: 0; width: 170px; flex-shrink: 0; }
.editor-field--grow   { flex: 1; width: auto; }

/* Row list */
.row-head,
.row-item {
  display: grid;
  grid-template-columns: 1fr 150px 92px;
  gap: 0.6rem;
  align-items: center;
}

.row-head {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--gray-text);
  padding: 0 0.15rem 0.5rem;
  border-bottom: 1.5px solid var(--gray-mid);
}

.row-list {
  max-height: 44vh;
  overflow-y: auto;
  padding: 0.5rem 0.15rem;
  border-bottom: 1.5px solid var(--gray-mid);
}

.row-item {
  padding: 0.25rem 0;
}

.row-item[hidden] { display: none; }

.row-level {
  padding: 0.55rem 0.5rem;
  font-weight: 600;
  cursor: pointer;
}

.row-level[data-tier="engineer"]  { color: var(--gold-dark); }
.row-level[data-tier="conductor"] { color: var(--purple); }
.row-level[data-tier="switchmen"] { color: var(--gray-text); }

.row-tools {
  display: flex;
  gap: 0.3rem;
  align-items: center;
  justify-content: flex-end;
}

.row-detail-btn {
  background: none;
  border: 1px solid var(--gray-mid);
  border-radius: 6px;
  font: inherit;
  font-size: 0.72rem;
  color: var(--gray-text);
  padding: 0.3rem 0.5rem;
  cursor: pointer;
  transition: all 0.15s;
}

.row-detail-btn:hover { border-color: var(--purple); color: var(--purple); }
.row-detail-btn.is-open { background: var(--purple); border-color: var(--purple); color: var(--white); }

.row-remove {
  background: none;
  border: 1px solid transparent;
  border-radius: 6px;
  font-size: 1.25rem;
  line-height: 1;
  color: var(--gray-text);
  cursor: pointer;
  padding: 0.1rem 0.45rem;
  transition: all 0.15s;
}

.row-remove:hover { color: #b3261e; border-color: #b3261e; background: rgba(179,38,30,0.06); }

/* Optional logo / website inputs, hidden until "Details" is clicked.
   The explicit [hidden] rule is required — display:flex would otherwise
   beat the browser's default [hidden] { display: none }. */
.row-details {
  grid-column: 1 / -1;
  display: flex;
  gap: 0.6rem;
  padding: 0.15rem 0 0.6rem;
}

.row-details[hidden] { display: none; }

.row-extra { font-size: 0.82rem; padding: 0.45rem 0.6rem; }

.row-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 0.9rem 0 0.5rem;
}

.row-add {
  background: var(--white);
  border: 1.5px dashed var(--purple-light);
  border-radius: 8px;
  font: inherit;
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--purple);
  padding: 0.5rem 1rem;
  cursor: pointer;
  transition: all 0.15s;
}

.row-add:hover { background: rgba(107,45,159,0.06); border-style: solid; }

.row-counter {
  font-size: 0.78rem;
  color: var(--gray-text);
}

/* Members: name + remove only */
.editor-form--simple .row-head,
.editor-form--simple .row-item {
  grid-template-columns: 1fr 92px;
}

.editor-status {
  font-size: 0.88rem;
  min-height: 1.3rem;
  color: var(--gray-text);
}

.editor-status.is-ok    { color: #1c7a45; font-weight: 600; }
.editor-status.is-error { color: #b3261e; font-weight: 600; }

.editor-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 1rem;
}

.editor-actions .btn {
  padding: 0.6rem 1.5rem;
  font-size: 0.92rem;
}

.btn-ghost {
  background: transparent;
  border-color: var(--gray-mid);
  color: var(--gray-text);
}

.btn-ghost:hover {
  border-color: var(--gray-text);
  color: var(--black);
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: default;
}

/* TICKER LABEL VARIANTS */
.ticker-label-short { display: none; }

/* RESPONSIVE */
/* Seven nav items need more room than the 768px default, so the
   hamburger takes over earlier. */
@media (max-width: 940px) {
  .nav-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--black);
    padding: 1rem 1.5rem 1.5rem;
    border-top: 1px solid rgba(255,255,255,0.08);
    gap: 0.25rem;
  }

  .nav-links.open {
    display: flex;
  }

  .hamburger {
    display: flex;
  }
}

@media (max-width: 1000px) {
  .switch-list { columns: 3; }
}

@media (max-width: 768px) {
  .switch-list  { columns: 2; column-gap: 1.25rem; }
  .member-list  { columns: 2; column-gap: 1.25rem; }

  .tier-engineer .tier-name { font-size: 1.4rem; }
  .tier-meta { display: none; }

  .editor-panel { padding: 2rem 1.25rem; }
  .editor-actions { flex-direction: column-reverse; }
  .editor-actions .btn { width: 100%; text-align: center; }

  /* Stack the editor rows rather than squeezing three columns */
  .editor-toprow { flex-direction: column; align-items: stretch; }
  .editor-field--inline { width: 100%; }

  .row-head { display: none; }

  .row-item,
  .editor-form--simple .row-item {
    grid-template-columns: 1fr auto;
    gap: 0.5rem;
    padding: 0.6rem 0;
    border-bottom: 1px solid var(--gray-mid);
  }

  .row-name { grid-column: 1 / -1; }
  .row-details { flex-direction: column; }
  .row-list { max-height: 50vh; }
  .row-foot { flex-direction: column-reverse; align-items: stretch; text-align: center; }

  .mission-grid {
    grid-template-columns: 1fr;
  }

  .mission-stats {
    grid-template-columns: 1fr 1fr;
  }

  .funding-callout {
    flex-wrap: wrap;
  }

  /* Swap to short label on mobile */
  .ticker-label-full  { display: none; }
  .ticker-label-short { display: inline; }

  .vision-section {
    padding: 3.5rem 1.25rem;
  }

  .vision-headline {
    font-size: clamp(1.6rem, 7vw, 2.4rem);
  }
}
