:root {
  --bg-primary: #fbfbfc;
  --bg-secondary: #f5f7fa;
  --bg-tertiary: #fbfffd;
  --surface: #ffffff;
  --surface-soft: #edfff4;
  --text-primary: #050805;
  --text-secondary: #26342c;
  --text-muted: #596a60;
  /* Increased green accents (still keep navbar/background intact) */
  --accent-primary: #007a35; /* primary green */
  --accent-secondary: #00a86b; /* secondary green */
  --accent-soft: #caffdd; /* soft green */
  --border-color: #b8edcb;
  --navbar-bg: #1b6b4a;
  --navbar-text: #ffffff;
  --navbar-link-hover: #cfe6ff;
  /* Subtle green strips for background pattern (very low opacity) */
  --accent-green: #00a86b;
  --accent-green-soft: rgba(0, 168, 107, 0.08);
  --bg-grid-line: rgba(0, 168, 107, 0.09);
  --bg-field-line: rgba(0, 168, 107, 0.07);
  --bg-sheen: rgba(255, 255, 255, 0.72);
  /* Form input neutralization: use light gray for typing fields, not green */
  --input-bg: #f3f4f6;
  --input-border: #e1e6ea;
  --input-focus-border: #b9c4c9;
  --input-text: #1f2326;
  --focus-ring: rgba(148, 163, 184, 0.28);
  --shadow-sm: 0 1px 2px rgba(0, 12, 4, 0.07);
  --shadow-md: 0 10px 24px rgba(0, 12, 4, 0.1);
  --navbar-shadow: 0 10px 24px rgba(28, 36, 32, 0.2);
  --shadow-lg: 0 18px 44px rgba(0, 12, 4, 0.14);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --content-width: 1120px;
}

/* Dark mode removed: no [data-theme="dark"] variables */

/* Team-finding pages: keep the same green family, just slightly brighter */
.find-teams,
.teams-list-container,
.teams-list,
#teamsList,
#teamsContainer {
  --accent-primary: #116a43;
  --accent-secondary: #2b8a57;
  --accent-soft: #def5e7;
  --border-color: #cfe5d7;
  --surface-soft: #f5fbf7;
  --bg-tertiary: #f8fcf9;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  scroll-behavior: smooth;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  color: var(--text-primary);
  background:
    linear-gradient(120deg, transparent 0 16%, var(--bg-field-line) 16.15% 16.55%, transparent 16.7% 100%),
    linear-gradient(300deg, transparent 0 72%, var(--bg-field-line) 72.15% 72.55%, transparent 72.7% 100%),
    linear-gradient(90deg, var(--bg-grid-line) 1px, transparent 1px),
    linear-gradient(0deg, var(--bg-grid-line) 1px, transparent 1px),
    linear-gradient(180deg, var(--bg-sheen), rgba(255, 255, 255, 0) 390px),
    var(--bg-primary);
  background-size: auto, auto, 44px 44px, 44px 44px, auto, auto;
  background-attachment: fixed;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
  transition: background-color 0.2s ease, color 0.2s ease;
}

body.page-motion-ready header,
body.page-motion-ready .site-footer,
body.page-motion-ready main > .container,
body.page-motion-ready main > section,
body.page-motion-ready main > article,
body.page-motion-ready main > .row,
body.page-motion-ready .dashboard-panel,
body.page-motion-ready .page-header,
body.page-motion-ready .card,
body.page-motion-ready .hero,
body.page-motion-ready .feature-card,
body.page-motion-ready .path-card,
body.page-motion-ready .step-card,
body.page-motion-ready .team-card,
body.page-motion-ready .recruit-card,
body.page-motion-ready .resource-card,
body.page-motion-ready .info-card,
body.page-motion-ready .panel,
body.page-motion-ready .stats-grid > *,
body.page-motion-ready .team-history-item,
body.page-motion-ready .team-compare-card,
body.page-motion-ready .teams-list > *,
body.page-motion-ready .account-section,
body.page-motion-ready .form-grid,
body.page-motion-ready .auth-card {
  animation: pageFadeUp 540ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

body.page-motion-ready .home-teams .section-heading,
body.page-motion-ready .home-teams .section-heading > div,
body.page-motion-ready .home-teams .section-link {
  animation: pageFadeUp 540ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

body.page-motion-ready .home-teams-grid .team-card {
  animation-delay: calc(var(--team-card-index, 0) * 120ms);
}

body.page-motion-ready main > .container,
body.page-motion-ready main > section,
body.page-motion-ready main > article {
  animation-delay: 40ms;
}

.reveal-on-scroll {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 520ms cubic-bezier(0.16, 1, 0.3, 1), transform 520ms cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

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

/* Modern Dashboard Enhancements */
.dashboard-page {
  background: 
    linear-gradient(120deg, transparent 0 18%, var(--bg-field-line) 18.15% 18.55%, transparent 18.7% 100%),
    linear-gradient(300deg, transparent 0 74%, var(--bg-field-line) 74.15% 74.55%, transparent 74.7% 100%),
    linear-gradient(90deg, var(--bg-grid-line) 1px, transparent 1px),
    linear-gradient(0deg, var(--bg-grid-line) 1px, transparent 1px),
    var(--bg-primary);
  background-size: auto, auto, 44px 44px, 44px 44px, auto;
}

.dashboard-page main > .container.dashboard-wrapper {
  width: min(100% - 32px, 1360px);
  align-items: stretch;
  text-align: left;
}

.dashboard-page .dashboard-wrapper > .page-header,
.dashboard-page .dashboard-wrapper > .stats-grid,
.dashboard-page .dashboard-wrapper > .row {
  width: 100%;
}

.dashboard-page .dashboard-wrapper > .page-header {
  margin-bottom: 28px;
}

.dashboard-page .dashboard-wrapper > .stats-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.dashboard-page .dashboard-wrapper > .row {
  display: grid;
  grid-template-columns: minmax(360px, 400px) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.dashboard-page .dashboard-wrapper > .row > [class^="col-"] {
  width: auto;
  min-width: 0;
}

.dashboard-page .dashboard-wrapper > .row > .col-md-8 {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.dashboard-page .dashboard-wrapper > .row > .col-md-4 {
  position: sticky;
  top: 24px;
}

.dashboard-page .dashboard-panel {
  width: 100%;
}

.dashboard-page .panel-body {
  padding: 24px;
}

.dashboard-page .page-header .subtitle,
.dashboard-page .page-header .header-actions {
  justify-content: center;
}

@media (max-width: 1180px) {
  .dashboard-page .dashboard-wrapper > .stats-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .dashboard-page .dashboard-wrapper > .row {
    grid-template-columns: 1fr;
  }

  .dashboard-page .dashboard-wrapper > .row > .col-md-4 {
    position: static;
  }
}

@media (max-width: 720px) {
  .dashboard-page main > .container.dashboard-wrapper {
    width: min(100% - 20px, 1360px);
  }

  .dashboard-page .dashboard-wrapper > .stats-grid {
    grid-template-columns: 1fr;
  }
}

.btn-success {
  background: var(--accent-secondary) !important;
  border-color: var(--accent-primary) !important;
  color: #001434 !important;
  box-shadow: 0 4px 12px color-mix(in srgb, var(--accent-primary) 18%, transparent);
}

.btn-success:hover {
  background: var(--accent-primary) !important;
  transform: translateY(-2px);
}

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

a:hover,
a:focus {
  color: var(--accent-secondary);
}

img,
svg {
  max-width: 100%;
}

header {
  width: 100%;
  margin: 0;
  padding: 0;
  display: block;
  background: var(--navbar-bg);
  border-bottom: 1px solid rgba(118, 128, 124, 0.55);
  box-shadow: var(--navbar-shadow);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  position: relative;
}

header::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -8px;
  height: 10px;
  pointer-events: none;
  background: linear-gradient(to bottom, rgba(103, 111, 108, 0.32), rgba(60, 66, 64, 0.08));
  z-index: 19;
}

/* Responsive header layout */
.navbar .container {
  padding: 0 20px;
}

@media (max-width: 860px) {
  .navbar .container {
    padding: 0 14px;
  }
  .navbar-header .navbar-brand {
    font-size: 1.6rem;
  }
}

header > .theme-toggle {
  margin-left: auto;
}

.navbar,
.navbar-default {
  width: 100% !important;
  min-width: 100% !important;
  flex: 0 0 100% !important;
  margin: 0 !important;
  min-height: 0;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0;
  box-shadow: none;
  backdrop-filter: none;
}

header .navbar,
header .navbar-default {
  width: 100%;
  margin: 0;
}

/* Ensure navbar casts a subtle shadow separate from the page */
header .navbar {
  box-shadow: var(--navbar-shadow);
  position: relative;
  z-index: 10000;
}

.navbar .container {
  width: 100% !important;
  max-width: none !important;
  min-height: 72px;
  padding: 0 40px;
  margin: 0 !important;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  flex-wrap: nowrap;
}

.navbar-header {
  float: none !important;
  flex: 0 0 auto;
  margin-right: 12px;
  margin-left: 0;
  display: flex;
  align-items: center;
}

.navbar-header .navbar-brand {
  height: auto;
  padding: 0;
  margin: 0;
  color: var(--navbar-text) !important;
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  text-transform: none;
  display: flex;
  align-items: center;
  min-height: 72px;
}

.navbar-tools {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 0 0 0 12px;
  order: 3;
  flex: 0 0 auto;
}

.navbar-collapse {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex: 1 1 auto;
  min-width: 0;
  margin-left: auto;
}

.navbar-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-left: auto;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: var(--navbar-text);
  font-size: 1.05rem;
  cursor: pointer;
}

.navbar-toggle:hover,
.navbar-toggle:focus {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.34);
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.navbar-nav {
  float: none !important;
  display: flex;  align-items: center;
  justify-content: flex-start;
  flex-wrap: nowrap;
  gap: 12px;
  margin: 0;
  flex: 0 0 auto;
}

.navbar-nav > li {
  float: none;
}

.navbar-nav.navbar-right {
  float: none !important;
  order: 4;
  margin-left: 12px;
}

.nav-user-controls {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.navbar-nav > li > a {
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  color: var(--navbar-text) !important;
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: 0.3px;
  text-transform: none;
  transition: background-color 0.18s ease, color 0.18s ease;
  opacity: 0.95;
}

.navbar-nav > li > a:hover,
.navbar-nav > li > a:focus,
.navbar-nav > li > a.active {
  color: var(--navbar-text) !important;
  background: rgba(255, 255, 255, 0.16) !important;
  opacity: 1;
}

.creator-badge {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 6px 12px;
  color: rgba(255, 255, 255, 0.86);
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.3px;
  white-space: nowrap;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  transition: all 0.18s ease;
  flex: 0 0 auto;
  margin-right: 0;
}

.creator-badge::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-green);
  display: inline-block;
  margin-right: 8px;
  box-shadow: none;
}

.creator-badge:hover {
  color: #d9fce5;
  background: rgba(208, 255, 225, 0.18);
  border-color: rgba(208, 255, 225, 0.42);
}

.creator-badge:hover::before,
.creator-badge:focus::before {
  background: #d9fce5;
}

.account-menu {
  position: relative;
  display: flex;
  align-items: center;
}

.inbox-menu {
  position: relative;
  display: flex;
  align-items: center;
}

.inbox-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 12px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: var(--navbar-text);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.inbox-toggle:hover,
.inbox-toggle:focus {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.34);
  transform: translateY(-1px);
}

.inbox-icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
  font-size: 1rem;
  flex: 0 0 auto;
}

.inbox-icon svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
  display: block;
}

.inbox-label {
  font-size: 1.3rem;
  line-height: 1;
}

.inbox-badge,
.inbox-dropdown-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  min-height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  background: #ffdf73;
  color: #5c4100;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1;
}

.inbox-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  width: 320px;
  padding: 10px;
  border-radius: 16px;
  background: #ffffff;
  border: 2px solid rgba(34, 197, 94, 0.9);
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.14);
  z-index: 10001;
}

.inbox-dropdown-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 6px 12px;
  color: var(--text-primary);
  font-size: 1.1rem;
  font-weight: 700;
}

.inbox-dropdown-list {
  display: grid;
  gap: 6px;
}

.inbox-dropdown-item {
  display: block;
  padding: 12px;
  border-radius: 12px;
  color: var(--text-primary);
  text-decoration: none;
}

.inbox-dropdown-item strong {
  display: block;
  margin-bottom: 4px;
  font-size: 1.05rem;
}

.inbox-dropdown-item span {
  display: block;
  color: var(--text-muted);
  font-size: 0.96rem;
  line-height: 1.45;
}

.inbox-dropdown-item:hover,
.inbox-dropdown-item:focus {
  background: rgba(148, 163, 184, 0.16);
  color: var(--accent-primary);
}

.inbox-dropdown-item.is-read {
  opacity: 0.72;
}

.inbox-dropdown-item-meta {
  display: block;
  margin-top: 6px;
  color: var(--text-muted);
  font-size: 0.82rem;
}

.inbox-empty {
  margin: 8px 6px 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.inbox-menu.is-open .inbox-dropdown {
  display: block;
}

.account-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 12px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: var(--navbar-text);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.account-toggle:hover,
.account-toggle:focus {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.34);
  transform: translateY(-1px);
}

.account-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #dff6e8, #8be0ae);
  color: #0f5b34;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  flex: 0 0 auto;
  overflow: hidden;
}

.account-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.account-label {
  font-size: 1.3rem;
  line-height: 1;
}

.account-caret {
  font-size: 0.95rem;
  opacity: 0.9;
}

.account-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  min-width: 190px;
  padding: 8px;
  border-radius: 16px;
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.12);
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.14);
  z-index: 10001;
}

.account-dropdown a {
  display: block;
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--text);
  font-size: 1.35rem;
  font-weight: 600;
  text-decoration: none;
}

.account-dropdown a:hover,
.account-dropdown a:focus {
  background: rgba(148, 163, 184, 0.16);
  color: var(--accent-primary);
}

.account-menu.is-open .account-dropdown {
  display: block;
}

/* Dark-mode clarity overrides: remove backdrop blurs and reduce background noise */
[data-theme="dark"] header,
[data-theme="dark"] .creator-badge {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  background: linear-gradient(180deg, rgba(8,12,9,0.98), rgba(7,11,9,0.96));
  border-bottom-color: rgba(255,255,255,0.04) !important;
  box-shadow: 0 8px 28px rgba(0,0,0,0.55) !important;
}

[data-theme="dark"] .creator-badge {
  background: rgba(255,255,255,0.04) !important;
  border-color: rgba(255,255,255,0.06) !important;
  color: rgba(255,255,255,0.95) !important;
}

[data-theme="dark"] .creator-badge:hover {
  color: #d9fce5 !important;
  background: rgba(208, 255, 225, 0.14) !important;
  border-color: rgba(208, 255, 225, 0.35) !important;
}

[data-theme="dark"] .fa-marker-icon i {
  text-shadow: none !important;
}

/* Final dark-mode clarity tweaks: simpler background, crisp text, stronger cards */
[data-theme="dark"] body {
  background: linear-gradient(180deg, var(--bg-primary), var(--bg-secondary));
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-shadow: none !important;
}

[data-theme="dark"] .dashboard-page {
  /* reduce patterned noise in dark mode */
  background: linear-gradient(180deg, rgba(0,0,0,0.0), rgba(0,0,0,0.02));
}

[data-theme="dark"] .step-card,
[data-theme="dark"] .resource-card,
[data-theme="dark"] .team-card,
[data-theme="dark"] .form-grid,
[data-theme="dark"] .teams-list-container,
[data-theme="dark"] .code-block {
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(0,0,0,0.02)), var(--surface);
  border-color: color-mix(in srgb, var(--border-color) 60%, transparent);
  box-shadow: var(--shadow-md);
  text-shadow: none !important;
}

[data-theme="dark"] .step-card:hover,
[data-theme="dark"] .resource-card:hover,
[data-theme="dark"] .team-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px) scale(1.01);
}

[data-theme="dark"] h1,
[data-theme="dark"] h2,
[data-theme="dark"] h3,
[data-theme="dark"] p,
[data-theme="dark"] a,
[data-theme="dark"] .btn {
  text-shadow: none !important;
}

.navbar-header,
.creator-badge,
.navbar-nav,
.navbar-tools {
  transform: translateY(4px);
}

.theme-toggle {
  position: relative;
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  color: rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  cursor: pointer;
  transition: all 0.18s ease;
}

.theme-toggle:hover,
.theme-toggle:focus {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.34);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.theme-toggle svg {
  position: absolute;
  width: 18px;
  height: 18px;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.sun-icon {
  color: var(--accent-secondary);
  opacity: 1;
}

.moon-icon {
  color: var(--accent-primary);
  opacity: 0;
  transform: rotate(-12deg);
}

[data-theme="dark"] .sun-icon {
  opacity: 0;
  transform: rotate(12deg);
}

[data-theme="dark"] .moon-icon {
  opacity: 1;
  transform: rotate(0);
}

main {
  width: min(100% - 32px, var(--content-width));
  min-height: auto;
  margin: 0 auto;
  padding: 52px 0 72px;
  display: grid;
  place-items: start center;
  animation: fadeIn 0.5s ease-out;
}

/* Responsive typography scaling */
h1 {
  font-size: clamp(2rem, 5vw, 5rem);
}

h2 {
  font-size: clamp(1.2rem, 3vw, 2.4rem);
}

/* Improve spacing on small screens */
@media (max-width: 560px) {
  main {
    padding: 28px 0 48px;
  }
  .hero {
    padding: 18px 12px;
  }
  .hero-card {
    padding: 12px;
  }
}

main > .container,
.hero {
  width: 100%;
  max-width: none;
  padding: 0;
}

main > .container {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.hero {
  display: grid;
  place-items: center;
  min-height: 460px;
  text-align: center;
}

.hero-card {
  max-width: 780px;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
  text-align: center;
}

.hero-label,
.step-label {
  display: inline-flex;
  width: fit-content;
  margin: 0 0 18px;
  padding: 8px 12px;
  color: var(--accent-primary);
  background: var(--accent-soft);
  border: 1px solid var(--border-color);
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  align-self: center;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1,
.hero-card h1 {
  max-width: 920px;
  margin: 0 0 18px;
  color: var(--text-primary);
  font-size: clamp(3rem, 5.8vw, 5rem);
  line-height: 1;
  font-weight: 800;
  letter-spacing: 0;
}

h2 {
  margin: 40px 0 14px;
  color: var(--text-primary);
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: 0;
}

h3 {
  margin: 24px 0 10px;
  color: var(--text-primary);
  font-size: 1.1rem;
  line-height: 1.25;
  font-weight: 800;
}

.subtitle,
.hero-card .subtitle {
  max-width: 690px;
  margin: 0 0 30px;
  color: var(--text-secondary);
  font-size: clamp(1.18rem, 1.6vw, 1.42rem);
  line-height: 1.7;
}

.site-messages {
  width: min(100% - 32px, var(--content-width));
  margin: 14px auto 0;
  color: var(--text-primary);
}

.cta-buttons,
.step-actions,
.team-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
}

/* Ensure CTA buttons stack nicely on medium screens */
@media (max-width: 860px) {
  .cta-buttons {
    gap: 10px;
  }
  .cta-buttons .btn {
    padding: 10px 14px;
    font-size: 0.98rem;
  }
}

@media (max-width: 560px) {
  .cta-buttons {
    flex-direction: column;
    gap: 10px;
    align-items: stretch;
  }
  .cta-buttons .btn {
    width: 100%;
  }
}

@media (max-width: 960px) {
  .start-team-hero,
  .overview-grid,
  .next-steps-grid {
    grid-template-columns: 1fr;
  }

  .summary-metrics {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .start-team-hero-copy,
  .start-team-summary-card,
  .overview-card,
  .next-step-card {
    padding: 20px;
  }

  .roadmap-card {
    min-height: 0;
  }
}

.btn {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.2;
  text-decoration: none;
  white-space: normal;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.btn:hover,
.btn:focus {
  transform: translateY(-1px);
  text-decoration: none;
}

.btn-primary {
  color: #fff !important;
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  box-shadow: 0 12px 28px color-mix(in srgb, var(--accent-primary) 22%, transparent);
}

.btn-primary:hover,
.btn-primary:focus {
  color: #fff !important;
  background: #005925;
  border-color: #005925;
  box-shadow: 0 10px 24px rgba(148, 163, 184, 0.24);
}

[data-theme="dark"] .btn-primary:hover,
[data-theme="dark"] .btn-primary:focus {
  color: #001006 !important;
  background: #8cffb8;
  border-color: #8cffb8;
}

.btn-secondary,
.btn-tertiary {
  color: var(--text-primary) !important;
  background: var(--surface);
  border-color: var(--border-color);
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover,
.btn-secondary:focus,
.btn-tertiary:hover,
.btn-tertiary:focus {
  color: var(--accent-primary) !important;
  background: var(--surface-soft);
  border-color: var(--accent-primary);
  box-shadow: 0 10px 24px rgba(148, 163, 184, 0.24);
}

.btn-tertiary {
  color: var(--accent-secondary) !important;
}

.manager-card {
  position: relative;
  align-items: flex-start;
  overflow: visible;
  z-index: 0;
}

.manager-card.manager-card-open {
  z-index: 200000;
}

.manager-card .manager-actions-dropdown {
  position: absolute;
  top: 12px;
  right: 12px;
  width: auto;
  z-index: 100000;
}

.manager-card.manager-card-open .manager-actions-dropdown {
  z-index: 200001;
}

.manager-actions-dropdown summary {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 200002;
}

.manager-actions-dropdown[open] .actions-menu {
  z-index: 200001;
}

.manager-card-main {
  margin-right: 40px;
}

.manager-card-main > strong,
.manager-card-main > .status-pill {
  display: inline-flex;
  align-items: center;
}

.manager-card-main {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.manager-actions-dropdown summary {
  position: relative;
  top: 0;
  right: 0;
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--border-color);
  border-radius: 50%;
  background: var(--surface);
  color: var(--text-primary);
  font-weight: 700;
  transition: transform 120ms ease, background 120ms ease;
  z-index: 3;
}

.manager-actions-dropdown summary:hover,
.manager-actions-dropdown summary:focus {
  background: var(--surface-soft);
}

.manager-actions-dropdown summary::-webkit-details-marker {
  display: none;
}

.manager-actions-dropdown[open] summary {
  transform: rotate(180deg);
}

.manager-actions-dropdown .actions-menu {
  position: absolute;
  top: 48px;
  right: 12px;
  left: auto;
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 180px;
  max-width: min(220px, calc(100% - 28px));
  z-index: 2;
}

.manager-actions-dropdown .action-button {
  width: 100%;
  text-align: left;
  padding: 10px 14px;
}

.btn-link {
  min-height: 0;
  padding: 0;
  color: var(--accent-primary);
  background: transparent;
  border: 0;
  box-shadow: none;
}

.back-link,
.back-button {
  margin: 0 0 28px;
}

.button-group {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 0 0 28px;
  align-items: center;
}

.button-group .btn {
  margin: 0;
}

.button-group .back-button {
  margin-bottom: 0;
}

.back-link {
  display: inline-flex;
  color: var(--accent-primary);
  font-weight: 800;
  text-decoration: none;
}

.step-grid,
.resources-grid,
.teams-list,
.teams-list-cards {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
  margin-top: 30px;
}

.start-team-shell {
  width: min(100%, 1120px);
  align-items: stretch;
  text-align: left;
}

.start-team-hero {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(280px, 0.7fr);
  gap: 22px;
  margin-top: 10px;
  align-items: stretch;
}

.start-team-hero-copy,
.start-team-summary-card,
.overview-card,
.next-step-card {
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.start-team-hero-copy {
  padding: 34px;
}

.start-team-hero-copy .subtitle {
  margin-bottom: 22px;
}

.start-team-summary-card {
  padding: 28px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 18px;
}

.summary-kicker {
  margin: 0;
  color: var(--accent-primary);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.summary-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.summary-metric {
  padding: 16px 14px;
  background: var(--surface-soft);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  text-align: center;
}

.summary-metric strong {
  display: block;
  margin-bottom: 6px;
  color: var(--accent-primary);
  font-size: 1.5rem;
  line-height: 1;
}

.summary-metric span {
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.45;
}

.summary-note,
.roadmap-intro {
  margin: 0;
  color: var(--text-secondary);
  line-height: 1.7;
}

.start-team-overview,
.start-team-roadmap,
.start-team-next,
.start-team-footer {
  width: 100%;
}

.overview-grid,
.next-steps-grid {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 24px;
}

.overview-card,
.next-step-card {
  padding: 24px;
  text-align: left;
}

.overview-card h3,
.next-step-card h3 {
  margin-top: 0;
}

.overview-card p,
.next-step-card p {
  margin: 0;
  color: var(--text-secondary);
  line-height: 1.7;
}

.start-team-roadmap {
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.start-team-step-grid {
  margin-top: 24px;
}

.roadmap-card {
  overflow: hidden;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  min-height: 194px;
  padding: 0;
  text-align: left;
}

.roadmap-card-body {
  display: grid;
  gap: 7px;
  width: 100%;
  padding: 18px 18px 20px;
}

.roadmap-card-body strong {
  color: #173429;
  font-size: 1.08rem;
  font-weight: 850;
  line-height: 1.25;
}

.roadmap-card-body span {
  color: #116a43;
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  line-height: 1.2;
  text-transform: uppercase;
}

.roadmap-card-body p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.96rem;
  line-height: 1.6;
}

.start-team-footer .important-box {
  width: 100%;
  max-width: none;
}

.start-team-footer .cta-buttons {
  justify-content: flex-start;
  margin-top: 22px;
}

@media (max-width: 900px) {
  .start-team-hero {
    grid-template-columns: 1fr;
  }

  .start-team-hero-copy {
    padding: 30px;
  }

  .start-team-summary-card {
    padding: 24px;
  }

  .summary-metrics {
    grid-template-columns: 1fr;
  }
}

.resources-grid {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 22px;
}

.step-card,
.resource-card,
.team-card,
.funding-option,
.programming-section,
.code-block,
.important-box,
.example-box {
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.step-card {
  min-height: 128px;
  justify-content: flex-start;
  align-items: flex-start;
  padding: 22px;
  color: var(--text-primary) !important;
  text-align: left;
}

.step-card strong {
  display: block;
  margin-bottom: 8px;
  color: var(--accent-primary);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.step-card:hover,
.resource-card:hover,
.team-card:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--accent-primary) 42%, var(--border-color));
  box-shadow: var(--shadow-md);
}

.step-icon {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  margin-bottom: 14px;
  color: var(--accent-primary);
  background: var(--accent-soft);
  border-radius: var(--radius-sm);
}

.step-icon::before {
  content: "";
  width: 18px;
  height: 18px;
  border-right: 3px solid currentColor;
  border-bottom: 3px solid currentColor;
  transform: rotate(45deg) translateY(-3px);
}

.resource-card {
  padding: 28px;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.card-icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  margin-bottom: 18px;
  background: var(--surface-soft);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 1.6rem;
}

.resource-card h2 {
  margin: 0 0 10px;
  font-size: 1.35rem;
}

.resource-card p,
.team-card p {
  color: var(--text-secondary);
  margin: 0 0 16px;
}

.resource-links {
  padding: 0;
  margin: 18px 0 0;
  list-style: none;
  display: grid;
  gap: 12px;
}

.resource-links a {
  display: inline-flex;
  color: var(--accent-primary);
  font-weight: 800;
  text-decoration: none;
}

.resource-links a:hover,
.resource-links a:focus {
  color: var(--accent-secondary);
  transform: translateX(2px);
}

.resource-links li {
  display: grid;
  gap: 4px;
}

.resource-link-note {
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.5;
}

.programming-section,
.funding-option {
  width: min(100%, 860px);
  margin-top: 28px;
  padding: 24px;
  text-align: left;
}

.programming-section h2,
.funding-option h3,
.content-section h3,
.content-subsection h3 {
  color: var(--accent-primary);
}

.placeholder-content,
.important-box,
.example-box {
  width: min(100%, 860px);
  padding: 18px;
  color: var(--text-secondary);
  background: var(--surface-soft);
  text-align: left;
}

.important-box {
  border-left: 4px solid var(--accent-primary);
}

.example-box {
  border-left: 4px solid var(--accent-secondary);
}

.content-section {
  width: min(100%, 860px);
  margin-top: 30px;
  text-align: left;
}

.content-section ul,
.content-subsection ul,
.funding-option ul,
.important-box ul {
  padding-left: 1.4rem;
  color: var(--text-secondary);
}

.content-section li,
.content-subsection li,
.funding-option li,
.important-box li {
  margin-bottom: 0.55rem;
}

.code-block {
  width: min(100%, 860px);
  overflow: hidden;
  margin: 20px 0;
  background: var(--bg-tertiary);
  text-align: left;
}

.code-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  background: var(--surface-soft);
  border-bottom: 1px solid var(--border-color);
}

.code-header span {
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 800;
}

.copy-btn {
  padding: 7px 11px;
  color: #fff;
  background: var(--accent-primary);
  border: 0;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 800;
  cursor: pointer;
}

.copy-btn:hover,
.copy-btn:focus {
  background: var(--accent-secondary);
}

.code-block pre {
  margin: 0;
  padding: 18px;
  overflow-x: auto;
}

.code-block code {
  color: var(--text-primary);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.9rem;
  line-height: 1.7;
}

.form-grid {
  max-width: 760px;
  width: 100%;
  display: grid;
  grid-template-columns: minmax(140px, 0.42fr) 1fr;
  gap: 14px 18px;
  align-items: center;
  margin-top: 30px;
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  text-align: left;
}

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

.registration-field-inline {
  display: grid;
  grid-template-columns: minmax(140px, 0.42fr) 1fr;
  gap: 14px 18px;
  align-items: center;
}

.registration-extra-grid {
  display: grid;
  grid-template-columns: minmax(140px, 0.42fr) 1fr;
  gap: 14px 18px;
  align-items: center;
}

.registration-extra-grid .form-note {
  grid-column: 1 / -1;
}

.registration-hidden {
  display: none !important;
}

.registration-choice {
  display: grid;
  gap: 12px;
  padding: 4px 0 6px;
}

.registration-choice-question {
  margin: 0;
  color: var(--text-primary);
  font-size: 1rem;
  font-weight: 800;
}

.registration-choice-options {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.choice-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 999px;
  font-weight: 800;
  cursor: pointer;
}

.choice-pill input[type="radio"] {
  width: 18px;
  height: 18px;
  min-height: 18px;
  margin: 0;
  accent-color: var(--accent-primary);
}

.registration-choice-note {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.form-grid label {
  color: var(--text-primary);
  font-weight: 800;
}

.form-grid input,
.form-grid textarea,
.form-grid select {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  color: var(--input-text);
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.form-grid .checkbox-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  margin: 0;
  font-weight: 700;
}

.form-grid .checkbox-row input[type="checkbox"] {
  width: auto;
  min-width: 18px;
  min-height: 18px;
  margin: 0;
  flex: 0 0 auto;
  accent-color: var(--accent-primary);
}

.form-grid .checkbox-row span {
  line-height: 1.35;
}

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

.form-grid input:focus,
.form-grid textarea:focus,
.form-grid select:focus {
  background: var(--surface);
  border-color: var(--input-focus-border);
  box-shadow: 0 0 0 3px var(--focus-ring);
}

.form-grid .form-note {
  grid-column: 2;
  display: block;
  margin-top: -6px;
  color: var(--text-muted);
  font-size: 0.86rem;
  line-height: 1.45;
}

.form-grid .form-note.form-grid-full {
  grid-column: 1 / -1;
  margin-top: -2px;
}

/* Form Controls (Login/Signup) */
.form-control {
  width: 100%;
  min-height: 44px;
  padding: 11px 14px;
  color: var(--text-primary);
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 1rem;
  line-height: 1.5;
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

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

.form-control:focus {
  background: var(--surface);
  border-color: var(--input-focus-border);
  box-shadow: 0 0 0 3px var(--focus-ring);
}

.form-label {
  display: block;
  margin-bottom: 8px;
  color: var(--text-primary);
  font-weight: 800;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
}

.mb-3 {
  margin-bottom: 18px;
}

.alert {
  width: 100%;
  padding: 14px 16px;
  margin-bottom: 18px;
  border: 1px solid;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  line-height: 1.5;
}

.alert-danger {
  color: #721c24;
  background: #f8d7da;
  border-color: #f5c6cb;
}

[data-theme="dark"] .alert-danger {
  color: #f5a5a5;
  background: #5a2e30;
  border-color: #6d3a3c;
}

.table-container {
  width: 100%;
  overflow-x: auto;
  margin: 28px 0;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.funding-table,
.sponsorship-table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
  background: var(--surface);
}

.funding-table thead,
.sponsorship-table thead {
  color: #fff;
  background: var(--accent-primary);
}

.funding-table th,
.sponsorship-table th,
.funding-table td,
.sponsorship-table td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

.funding-table td,
.sponsorship-table td {
  color: var(--text-primary);
}

.funding-table tbody tr:hover,
.sponsorship-table tbody tr:hover {
  background: var(--surface-soft);
}

.total-row {
  color: #fff;
  background: var(--accent-primary);
  font-weight: 800;
}

.total-row td,
.platinum-row td {
  color: #fff;
}

.platinum-row {
  color: #fff;
  background: var(--accent-secondary);
}

.team-card {
  position: relative;
  min-height: 190px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow: hidden;
  cursor: pointer;
  text-align: left;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
  min-width: 0; /* allow cards to shrink inside grid columns to avoid horizontal overflow */
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(247,251,248,0.98));
  border: 1px solid #d7e6dc;
  border-radius: 18px;
  box-shadow: 0 12px 28px rgba(16, 38, 24, 0.08);
}

.team-card.collapsed {
  min-height: auto;
  padding: 16px 18px;
}

.team-card.expanded {
  padding: 22px;
}

.team-details-content {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 260ms ease, opacity 200ms ease;
}
.team-card.expanded .team-details-content {
  opacity: 1;
  max-height: 1000px; /* large enough to allow content; JS sets exact height on open */
}
.toggle-details i {
  transition: transform 0.18s ease;
}
.team-card.expanded .toggle-details i {
  transform: rotate(180deg);
}

.team-card .team-card-title {
  margin: 0 0 6px;
  font-family: "Segoe UI Variable Display", "Aptos Display", Inter, "Segoe UI", sans-serif;
  font-size: clamp(1.45rem, 2.4vw, 1.95rem);
  font-weight: 800;
  color: #173429;
  line-height: 1.08;
  letter-spacing: -0.03em;
}

@media (max-width: 560px) {
  .team-card .team-card-title {
    font-size: 1.25rem;
  }
}

.toggle-details {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  border-radius: 8px;
}
.toggle-details i {
  transition: transform 0.18s ease;
}
.team-card.expanded .toggle-details i {
  transform: rotate(180deg);
}

.teams-list {
  width: 100%;
  display: block;
}

.teams-list-cards {
  width: 100%; /* Take full width of its container */
  display: flex;
  flex-direction: column;
  gap: 18px; /* Keep the gap between cards */
  margin: 0; /* Remove external margin as it's now inside a padded container */
  align-items: stretch;
}

.teams-list-cards .team-card {
  width: 100%;
}

/* Allow the grid to use smaller min widths on very small screens */
@media (max-width: 420px) {
  .teams-list-cards {
    gap: 12px;
  }
}

.team-card[hidden] {
  display: none;
}

.team-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--accent-primary);
  opacity: 0;
  transition: opacity 0.18s ease;
}

.team-card:hover,
.team-card.is-active {
  transform: translateY(-4px);
  border-color: #b7d1c0;
  background: linear-gradient(180deg, rgba(255,255,255,1), rgba(242,248,244,1));
  box-shadow: 0 20px 40px rgba(16, 38, 24, 0.14);
}

.team-card.is-active::before {
  opacity: 1;
}

.team-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.team-card-heading {
  flex: 1 1 auto;
  min-width: 0;
}

.team-card-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.team-card h3 {
  margin: 0 0 4px;
  font-size: 1.08rem;
  text-align: left;
}

.team-card-label {
  display: block;
  margin-top: 6px;
  color: #4f655a;
  font-size: 0.86rem;
  font-weight: 850;
  letter-spacing: 0.06em;
  line-height: 1.2;
  text-transform: uppercase;
}

.team-card-label--new-team {
  color: #155c3a;
  font-size: 0.92rem;
  letter-spacing: 0.04em;
}

.team-card-contact {
  margin: 0;
  color: #21342a;
  font-size: clamp(1rem, 1.35vw, 1.08rem);
  font-weight: 650;
  line-height: 1.45;
}

.team-card-meta {
  margin: 6px 0 0;
  color: #6b7b72;
  font-size: 0.92rem;
  font-weight: 500;
  line-height: 1.45;
}

.team-card-stats {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.team-card-stat {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 13px;
  background: #f6fbf7;
  border: 1px solid #dbe8df;
  border-radius: 14px;
}

.team-card-stat--new-team {
  background: linear-gradient(180deg, rgba(231, 248, 237, 0.96), rgba(217, 242, 226, 0.96));
  border-color: rgba(43, 138, 87, 0.2);
}

.team-card-requirements {
  margin-top: 14px;
  padding: 14px 15px;
  background: linear-gradient(180deg, rgba(246, 251, 247, 0.98), rgba(236, 247, 240, 0.98));
  border: 1px solid rgba(43, 138, 87, 0.16);
  border-radius: 14px;
}

.team-card-requirements-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.team-card-requirements-icon {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(43, 138, 87, 0.12);
  color: #1d6a45;
  flex: 0 0 auto;
}

.team-card-requirements-title {
  color: #16362a;
  font-size: 0.82rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.team-card-requirements-text {
  margin: 0;
  color: #2e4137;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.45;
}

.team-card-stat-icon {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(43, 138, 87, 0.12);
  color: #1d6a45;
  flex: 0 0 auto;
}

.team-card-stat-text {
  color: #2d4036;
  font-size: 0.94rem;
  font-weight: 650;
  line-height: 1.25;
}

.team-card-award-history {
  margin-top: 10px;
  padding: 10px 12px;
  background: linear-gradient(180deg, rgba(252, 248, 238, 0.96), rgba(247, 242, 228, 0.96));
  border: 1px solid rgba(181, 151, 84, 0.24);
  border-radius: 12px;
}

.team-card-award-history strong {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 7px;
  color: #7c5b1f;
  font-size: 0.84rem;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.team-card-award-history .team-history-list {
  margin: 0;
}

.team-card-award-history .team-history-item {
  color: #3f3b30;
}

.team-history-entry {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.team-history-entry i {
  width: 1em;
  color: #7c5b1f;
}

.team-history-list li[hidden] {
  display: none;
}

.team-history-toggle {
  display: block;
  width: 100%;
  margin-top: 8px;
  padding: 4px 0 0;
  border: 0;
  background: transparent;
  color: #8b6a27;
  font-size: 1.4rem;
  font-weight: 900;
  line-height: 1;
  text-align: center;
  cursor: pointer;
  letter-spacing: 0.2em;
}

.team-history-toggle:hover,
.team-history-toggle:focus {
  color: #5f4514;
  transform: translateY(-1px);
}

.team-history-panel {
  padding: 0;
  background: transparent;
  border: 0;
  color: #304238;
  font-size: 0.95rem;
  line-height: 1.5;
}

.team-history-panel .team-history-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.team-history-panel .team-history-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.78);
  color: inherit;
  line-height: 1.45;
}

.team-history-panel .team-history-list li::marker {
  color: transparent;
}

.team-history-panel .team-history-list li::before {
  content: "";
  width: 22px;
  height: 22px;
  border-radius: 999px;
  flex: 0 0 auto;
  background: rgba(176, 134, 51, 0.14);
  box-shadow: inset 0 0 0 1px rgba(176, 134, 51, 0.18);
}

.team-history-panel .team-history-list li:nth-child(odd) {
  background: linear-gradient(180deg, rgba(255, 250, 232, 0.98), rgba(247, 241, 221, 0.98));
  border-color: rgba(176, 134, 51, 0.16);
}

.team-history-panel .team-history-list li:nth-child(even) {
  background: linear-gradient(180deg, rgba(236, 248, 242, 0.98), rgba(227, 243, 235, 0.98));
  border-color: rgba(43, 138, 87, 0.16);
}

.team-history-panel .team-history-list li:nth-child(odd)::before {
  background: rgba(176, 134, 51, 0.14);
  box-shadow: inset 0 0 0 1px rgba(176, 134, 51, 0.18);
}

.team-history-panel .team-history-list li:nth-child(even)::before {
  background: rgba(43, 138, 87, 0.12);
  box-shadow: inset 0 0 0 1px rgba(43, 138, 87, 0.14);
}

.team-history-panel .team-history-list li.team-history-item::before {
  content: none;
  display: none;
}

.team-history-panel .team-history-list li[hidden],
.team-history-list li[hidden] {
  display: none !important;
}

.team-history-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 6px;
}

.team-history-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.72);
  color: inherit;
}

.team-history-item--award {
  background: linear-gradient(180deg, rgba(255, 250, 232, 0.98), rgba(247, 241, 221, 0.98));
  border-color: rgba(176, 134, 51, 0.18);
}

.team-history-item--qualifier {
  background: linear-gradient(180deg, rgba(236, 248, 242, 0.98), rgba(227, 243, 235, 0.98));
  border-color: rgba(43, 138, 87, 0.18);
}

.team-history-item--regional {
  background: linear-gradient(180deg, rgba(238, 245, 255, 0.98), rgba(229, 238, 255, 0.98));
  border-color: rgba(59, 130, 246, 0.18);
}

.team-history-item--worlds {
  background: linear-gradient(180deg, rgba(237, 251, 255, 0.98), rgba(224, 247, 255, 0.98));
  border-color: rgba(14, 165, 233, 0.18);
}

.team-history-item--other {
  background: linear-gradient(180deg, rgba(248, 248, 248, 0.98), rgba(242, 242, 242, 0.98));
  border-color: rgba(148, 163, 184, 0.16);
}

.team-history-entry {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
}

.team-history-icon {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  background: rgba(43, 138, 87, 0.12);
  color: #1d6a45;
}

.team-history-icon i {
  width: auto;
  color: currentColor;
}

.team-history-item--award .team-history-icon {
  background: rgba(176, 134, 51, 0.12);
  color: #8b5a12;
}

.team-history-item--qualifier .team-history-icon {
  background: rgba(43, 138, 87, 0.12);
  color: #1d6a45;
}

.team-history-item--regional .team-history-icon {
  background: rgba(59, 130, 246, 0.12);
  color: #1d4ed8;
}

.team-history-item--worlds .team-history-icon {
  background: rgba(14, 165, 233, 0.12);
  color: #0369a1;
}

.team-history-text {
  min-width: 0;
  flex: 1 1 auto;
  font-weight: 600;
  font-size: 0.88rem;
  line-height: 1.25;
  color: #304238;
}

.team-history-meta {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  margin-left: auto;
  padding: 1px 7px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.08);
  color: #166534;
  font-size: 0.68rem;
  font-weight: 800;
  white-space: nowrap;
}

.team-history-item--award .team-history-meta {
  background: rgba(176, 134, 51, 0.12);
  color: #8b5a12;
}

.team-history-item--regional .team-history-meta {
  background: rgba(59, 130, 246, 0.12);
  color: #1d4ed8;
}

.team-history-item--worlds .team-history-meta {
  background: rgba(14, 165, 233, 0.12);
  color: #0369a1;
}

.team-distance {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0;
  padding: 12px 13px;
  background: #f6f8f6;
  border: 1px solid #dde6df;
  border-radius: 14px;
}

.team-distance span {
  color: #708077;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.team-distance strong {
  color: #173429;
  font-size: 0.95rem;
  font-weight: 800;
}

.team-card .team-actions {
  width: 100%;
  margin-top: 16px;
  padding-top: 8px;
  justify-content: flex-start;
}

.team-card .btn-primary {
  min-width: 156px;
  border-radius: 999px;
  font-weight: 800;
  box-shadow: 0 10px 22px rgba(17, 106, 67, 0.18);
}

.team-card-icon-button {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid #d8e4dc;
  border-radius: 999px;
  background: #f7faf8;
  color: #496356;
  text-decoration: none;
  transition: transform 0.18s ease, border-color 0.18s ease, background-color 0.18s ease, color 0.18s ease;
}

.team-card-icon-button:hover,
.team-card-icon-button:focus {
  transform: translateY(-1px);
  border-color: #b7d1c0;
  background: #eef2f5;
  color: #173429;
}

.teams-search {
  width: 100%;
  max-width: 760px;
  margin: 0 auto 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: stretch;
}

.teams-search label {
  color: var(--text-primary);
  font-size: 0.95rem;
  font-weight: 800;
  margin: 0;
}

.teams-search-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

.teams-search-field {
  flex: 1 1 auto;
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: var(--surface);
  border: 1px solid #d7e6dc;
  border-radius: 16px;
  box-shadow: 0 10px 24px rgba(16, 38, 24, 0.07);
}

.teams-search-field:focus-within {
  border-color: rgba(148, 163, 184, 0.55);
  box-shadow: 0 0 0 3px var(--focus-ring);
}

.teams-search-field i {
  color: #6e8478;
  font-size: 0.95rem;
  margin-left: 2px;
}

.teams-search input {
  flex: 1 1 auto;
  min-width: 0;
  color: var(--text-primary);
  background: transparent;
  border: 0;
  outline: 0;
  font: inherit;
  padding: 8px 6px;
}

.teams-filter-menu {
  position: relative;
  flex: 0 0 auto;
}

.teams-filter-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 8px 14px;
  border: 1px solid #d7e6dc;
  border-radius: 999px;
  background: #f4f8f5;
  color: #21342a;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.teams-filter-button:hover,
.teams-filter-button:focus {
  background: #eef6f0;
  border-color: #bfd5c6;
  transform: translateY(-1px);
}

.teams-filter-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 30;
  min-width: 220px;
  padding: 14px;
  background: var(--surface);
  border: 1px solid #d7e6dc;
  border-radius: 16px;
  box-shadow: 0 18px 40px rgba(16, 38, 24, 0.12);
  display: grid;
  gap: 8px;
}

.teams-filter-dropdown[hidden] {
  display: none !important;
}

.teams-filter-dropdown label {
  margin: 0;
  font-size: 0.85rem;
  font-weight: 800;
}

.teams-program-filter {
  width: 100%;
  color: var(--text-primary);
  background: #f5f8f6;
  border: 1px solid #d7e6dc;
  border-radius: 12px;
  outline: 0;
  font: inherit;
  padding: 10px 12px;
  appearance: none;
}

.teams-filter-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 4px;
}

.teams-filter-clear {
  padding: 0;
  border: 0;
  background: transparent;
  color: #116a43;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 800;
  cursor: pointer;
}

.teams-filter-clear:hover,
.teams-filter-clear:focus {
  text-decoration: underline;
}

.teams-search-count {
  flex: 0 0 auto;
  color: #5d7065;
  font-size: 0.9rem;
  font-weight: 800;
  white-space: nowrap;
}

.teams-list-container {
  width: 100%;
  max-width: 980px;
  margin: 24px auto 0;
  padding: 24px;
  background: var(--surface);
  border: 1px solid #d7e6dc;
  border-radius: 22px;
  box-shadow: 0 18px 42px rgba(16, 38, 24, 0.1);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.teams-list-cards {
  overflow: visible;
  padding-right: 0;
  direction: ltr;
}

.teams-empty {
  width: min(100%, 760px);
  margin: 18px auto 0;
  padding: 14px 16px;
  color: var(--text-secondary);
  background: var(--surface-soft);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  text-align: center;
}

#teamsMap {
  width: 100%;
  height: min(58vh, 560px);
  min-height: 390px;
  margin: 24px auto 18px;
  overflow: hidden;
  background: var(--surface-soft);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
}

#teamsMap .team-privacy-blur {
  position: absolute;
  z-index: 350;
  border-radius: 50%;
  opacity: 0;
  pointer-events: none;
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
  background: rgba(255, 255, 255, 0.04);
  transition: opacity 180ms ease;
}

#teamsMap .team-privacy-blur.is-visible {
  opacity: 1;
}

.team-zoom-notifier-icon {
  background: transparent;
  border: none;
}

.team-zoom-notifier {
  position: relative;
  display: block;
  width: 24px;
  height: 24px;
  background: #d32f2f;
  border: 3px solid #fff;
  border-radius: 50% 50% 50% 0;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.25);
  transform: rotate(-45deg);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.team-zoom-notifier::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 8px;
  height: 8px;
  background: #fff;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.leaflet-marker-icon:hover .team-zoom-notifier,
.leaflet-marker-icon:focus .team-zoom-notifier {
  transform: translateY(-3px) rotate(-45deg);
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.22);
}

.user-location-marker-icon {
  background: transparent;
  border: none;
  width: 88px !important;
  height: 46px !important;
  overflow: visible;
}

.user-location-marker-wrap {
  position: relative;
  width: 88px;
  height: 46px;
  display: block;
  pointer-events: none;
}

.user-location-marker-tag {
  position: absolute;
  left: 50%;
  top: 0;
  transform: translateX(-50%);
  padding: 4px 10px;
  background: linear-gradient(180deg, #ffffff 0%, #f0f7f2 100%);
  border: 1px solid #bed6c4;
  border-radius: 999px;
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.12);
  color: #111;
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.8);
}

.user-location-marker-wrap .team-zoom-notifier--user {
  position: absolute;
  left: 50%;
  bottom: -1px;
  transform: translateX(-50%) rotate(-45deg);
  background: #1f9b58;
  width: 24px;
  height: 24px;
  margin: 0;
  filter: drop-shadow(0 6px 10px rgba(15, 23, 42, 0.18));
}

.user-location-marker-wrap .team-zoom-notifier--user::after {
  width: 8px;
  height: 8px;
}

/* (duplicated block removed) */

.goto-marker {
  min-width: 38px;
  width: 38px;
  height: 38px;
  color: #1a4731;
}

.goto-marker i {
  color: #1a4731;
  font-size: 1.1rem;
}

.team-location i {
  color: #4b5563;
  font-size: 0.95rem;
  transform: translateY(1px);
}

.fa-marker-icon {
  display: inline-block;
  width: 48px;
  height: 48px;
  text-align: center;
}

.fa-marker-icon i {
  color: #d32f2f;
  font-size: 1.75rem;
  line-height: 48px;
  text-shadow: 0 3px 8px rgba(0, 0, 0, 0.25);
  transform: translateY(8px);
}

.leaflet-marker-icon.fa-marker-icon {
  width: 48px;
  height: 48px;
  background: transparent;
  border: none;
}

.leaflet-tooltip.marker-label {
  margin-top: -4px;
  padding: 6px 10px;
  color: #1f1d1a;
  background: #fffdf9;
  border: 1px solid #cfc4b5;
  border-radius: 8px;
  box-shadow: 0 5px 14px rgba(0, 0, 0, 0.22);
  font-family: Inter, Arial, sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  opacity: 1;
  z-index: 650;
}

/* Google Maps InfoWindow fade support */
.gm-style-iw-t {
  transition: opacity 0.2s ease !important;
}

.leaflet-tooltip.marker-label::before {
  display: none;
}

.marker-label--dim {
  opacity: 0.72;
}

.marker-label--active {
  opacity: 1;
  border-color: var(--accent-secondary);
  color: #07243e;
  box-shadow: 0 8px 18px color-mix(in srgb, var(--accent-primary) 22%, transparent);
}

.leaflet-popup-content-wrapper {
  border-radius: 12px;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.28);
}

.leaflet-popup-content {
  margin: 14px;
  min-width: 150px;
  color: #1f1d1a;
  font-family: Inter, Arial, sans-serif;
  font-size: 0.9rem;
  line-height: 1.35;
  text-align: left;
}

.leaflet-popup-content .btn {
  width: 100%;
  min-height: 40px;
  margin-top: 8px;
  padding: 9px 12px;
  font-size: 0.9rem;
  line-height: 1.15;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pageFadeUp {
  from {
    opacity: 0;
    transform: translateY(14px);
    filter: saturate(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0);
    filter: saturate(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  body.page-motion-ready header,
  body.page-motion-ready .site-footer,
  body.page-motion-ready main > .container,
  body.page-motion-ready main > section,
  body.page-motion-ready main > article,
  body.page-motion-ready main > .row,
  body.page-motion-ready .dashboard-panel,
  body.page-motion-ready .page-header,
  body.page-motion-ready .card,
  body.page-motion-ready .hero,
  body.page-motion-ready .feature-card,
  body.page-motion-ready .path-card,
  body.page-motion-ready .step-card,
  body.page-motion-ready .team-card,
  body.page-motion-ready .recruit-card,
  body.page-motion-ready .resource-card,
  body.page-motion-ready .info-card,
  body.page-motion-ready .panel,
  body.page-motion-ready .stats-grid > *,
  body.page-motion-ready .team-history-item,
  body.page-motion-ready .team-compare-card,
  body.page-motion-ready .teams-list > *,
  body.page-motion-ready .account-section,
  body.page-motion-ready .form-grid,
  body.page-motion-ready .auth-card,
  .reveal-on-scroll {
    animation: none !important;
    transition: none !important;
    transform: none !important;
    opacity: 1 !important;
    filter: none !important;
  }
}

@media (max-width: 860px) {
  header,
  .navbar,
  .site-messages,
  main {
    width: min(100% - 24px, var(--content-width));
  }

  .navbar .container {
    align-items: flex-start;
  }

  .navbar-header {
    width: 100%;
    justify-content: space-between;
    margin-right: 0;
  }

  .navbar-toggle {
    display: inline-flex;
    order: 2;
    flex: 0 0 auto;
  }

  .navbar-collapse {
    width: 100%;
    order: 4;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    margin-left: 0;
    margin-top: 14px;
    padding: 14px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 20px;
    background: rgba(17, 58, 36, 0.92);
    box-shadow: 0 18px 38px rgba(0, 0, 0, 0.18);
  }

  .navbar-collapse[hidden] {
    display: none !important;
  }

  .creator-badge {
    order: 1;
    margin: 0 0 0 10px;
  }

  .navbar-tools {
    order: 4;
    margin-left: 0;
    width: 100%;
  }

  .navbar-nav {
    width: 100%;
    order: 1;
    justify-content: flex-start;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    margin-left: 0;
  }

  .navbar-nav > li > a {
    width: 100%;
  }

  .navbar-nav.navbar-right {
    width: 100%;
    order: 2;
    margin-left: 0;
    justify-content: flex-start;
  }

  .navbar-nav.navbar-right > li > a {
    width: 100%;
  }

  .navbar-nav.navbar-right {
    margin-top: 2px;
  }

  .account-menu {
    margin-left: 0;
  }

  .account-label {
    display: none;
  }

  main {
    padding-top: 44px;
  }

  .hero {
    min-height: auto;
  }

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

  .form-grid-full,
  .form-grid .form-note {
    grid-column: 1;
  }

  .registration-choice-options {
    flex-direction: column;
  }

  .form-grid .form-note {
    margin-top: -2px;
  }

  .form-grid > div:empty {
    display: none;
  }
}

@media (max-width: 560px) {
  body {
    font-size: 15px;
  }

  header {
    padding-top: 14px;
  }


  .cta-buttons,
  .step-actions,
  .team-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .btn,
  .cta-buttons li,
  .cta-buttons a {
    width: 100%;
  }

  .step-grid,
  .resources-grid,
  .teams-list,
  .teams-list-cards {
    grid-template-columns: 1fr;
  }

  .teams-search-row {
    flex-direction: column;
    align-items: stretch;
  }

  .teams-search-count {
    text-align: right;
  }

  .resource-card,
  .form-grid,
  .programming-section,
  .funding-option {
    padding: 20px;
  }

  #teamsMap {
    min-height: 360px;
  }
}

/* Improve map responsiveness on narrow devices */
@media (max-width: 420px) {
  #teamsMap {
    min-height: 260px;
    height: 40vh;
  }
}

/* Centering pass: keep the page content visually balanced. */
header,
header .navbar,
header .navbar-default,
main,
main > .container,
.hero,
.hero-card,
.cta-buttons,
.step-actions,
.team-actions {
  margin-left: auto;
  margin-right: auto;
}

header {
  text-align: center;
}

header > .theme-toggle {
  float: none;
}

.navbar-header .navbar-brand {
  float: none;
  display: inline-flex;
  justify-content: center;
}

.home-page .navbar-header .navbar-brand {
  display: inline-flex;
  margin-right: 8px;
}

.navbar-header,
.navbar-tools {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 0 12px;
  flex: 0 0 auto;
}

.navbar-nav {
  flex: 0 1 auto;
  padding-left: 0;
}

.navbar-nav:not(.navbar-right) {
  margin-left: auto;
}

.navbar-nav.navbar-right {
  margin-left: 12px;
  justify-content: flex-end;
}

@media (max-width: 860px) {
  .navbar-nav:not(.navbar-right) {
    margin-left: 0;
  }
}

@media (max-width: 860px) {
  header {
    text-align: left;
  }

  .navbar .container {
    flex-direction: column;
    align-items: stretch;
  }

  .navbar-header {
    width: 100%;
    margin: 0;
  }

  .navbar-header .navbar-brand {
    justify-content: flex-start;
  }

  .navbar-collapse {
    width: 100%;
    align-items: stretch;
    text-align: left;
  }

  .navbar-collapse .creator-badge {
    margin: 0 0 6px;
  }

  .navbar-nav,
  .navbar-nav.navbar-right,
  .navbar-tools,
  .nav-user-controls {
    width: 100%;
  }

  .navbar-nav > li > a {
    justify-content: flex-start;
    text-align: left;
  }

  .navbar-tools,
  .nav-user-controls {
    justify-content: flex-start;
    align-items: stretch;
  }
}

main {
  justify-items: center;
  text-align: center;
}

main > .container,
.hero,
.hero-card {
  justify-items: center;
  align-items: center;
}

h1,
h2,
h3,
.subtitle,
.hero-card .subtitle {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.step-grid,
.resources-grid,
.teams-list,
.teams-list-cards {
  width: min(100%, 980px);
  justify-content: flex-start;
}

.step-card,
.resource-card {
  align-items: center;
  justify-content: center;
  text-align: center;
}

.card-icon,
.step-icon {
  margin-left: auto;
  margin-right: auto;
}

.form-grid,
.content-section,
.programming-section,
.funding-option,
.placeholder-content,
.important-box,
.example-box,
.code-block {
  margin-left: auto;
  margin-right: auto;
}

footer,
.site-footer {
  width: min(100% - 32px, var(--content-width));
  margin: 16px auto 12px;
  padding: 8px 0 10px;
  color: #ffffff;
  font-size: 0.95rem;
  line-height: 1.4;
  text-align: center;
}

footer p,
.site-footer p {
  margin: 0 0 4px;
  color: #ffffff;
  font-size: inherit;
}

/* Auth page specific layout adjustments */
.auth-page header {
  padding: 8px 0;
  box-shadow: none;
}

.auth-page .navbar .container {
  padding: 0 20px;
  min-height: 56px;
}

.auth-page main {
  padding: 36px 0 72px;
}

.auth-page main > .container {
  width: min(100% - 32px, 520px);
  padding: 0 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.auth-page h1 {
  font-size: clamp(2.2rem, 5vw, 3rem);
  margin-bottom: 8px;
}

.auth-card {
  width: 100%;
  padding: 28px;
  background: transparent;
  border: none;
  box-shadow: none;
}

.auth-page form {
  width: 100%;
}

.auth-page .form-control {
  background: var(--input-bg);
}

.auth-page .btn-primary,
.auth-page .btn-secondary {
  min-width: 140px;
  padding: 10px 18px;
}

.auth-page .back-button {
  align-self: flex-start;
}

.auth-page .alert {
  width: 100%;
}
