body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: #f5f7fb;
  color: #1E3A8A;
}

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 20px;
}

.card {
  background: #ffffff;
  border-radius: 14px;
  padding: 20px;
  margin-bottom: 18px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.06);
}

h1, h2, h3, p {
  margin-top: 0;
  color: #1E3A8A;
}

input,
button {
  width: 100%;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid #d0d5dd;
  margin-top: 8px;
  margin-bottom: 12px;
  box-sizing: border-box;
  font-size: 14px;
  color: #1E3A8A;
}

input[readonly] {
  background: #f8fafc;
}

button {
  cursor: pointer;
  border: none;
  font-weight: bold;
}

.btn-primary {
  background: #155eef;
  color: white;
}

.btn-secondary {
  background: #eef2f6;
  color: #1E3A8A;
}

.btn-google,
.btn-email {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.auth-button-logo {
  width: 18px;
  height: 18px;
  object-fit: contain;
  flex: 0 0 auto;
}

.btn-tertiary {
  background: #ffffff;
  color: #155eef;
  border: 1px solid #c9d7f7;
}

.btn-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  background: #ffffff;
  color: #1E3A8A;
  border: 1px solid #d0d5dd;
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 14px;
  font-weight: bold;
  box-sizing: border-box;
}

.row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.run-item {
  border: 1px solid #eaecf0;
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 12px;
  background: #fff;
}

.run-item-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.run-item-image {
  width: 54px;
  height: 54px;
  object-fit: contain;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid #eaecf0;
  flex: 0 0 auto;
}

.run-item-title {
  min-width: 0;
}

.run-remove-btn {
  width: auto;
  margin-top: 10px;
  margin-bottom: 0;
  padding: 8px 12px;
  border-radius: 999px;
  background: #fff1f3;
  color: #DC2626;
  border: 1px solid #fecdca;
  font-size: 12px;
  font-weight: bold;
}

.run-remove-btn:hover {
  background: #ffe4e8;
}

.muted {
  color: #1E3A8A;
  font-size: 14px;
}

.hidden {
  display: none !important;
}

.status {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: bold;
}

.status-pending {
  background: #fff1f3;
  color: #d92d20;
}

.status-approved {
  background: #ecfdf3;
  color: #027a48;
}

#appView {
  display: none;
  min-height: calc(100vh - 220px);
}

#message,
#resetPasswordMessage {
  min-height: 18px;
  font-size: 14px;
  color: #DC2626;
}

#profileMessage,
#runMessage {
  min-height: 18px;
  font-size: 14px;
  color: #1E3A8A;
}

#runMessage.message-error {
  color: #DC2626;
}

#runMessage.message-success {
  color: #1E3A8A;
}

.site-header-band {
  width: 100%;
  background: #474747;
  padding: 16px 20px;
  box-sizing: border-box;
}

.site-header {
  max-width: 1080px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.site-header-logo-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.site-header-logo {
  height: 52px;
  width: auto;
  display: block;
  object-fit: contain;
}

.site-header-links {
  display: flex;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
}

.site-nav-link {
  text-decoration: none;
  color: #FFFFFF;
  font-size: 13px;
  font-weight: normal;
}

.site-nav-link:hover {
  text-decoration: underline;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.brand-text h1 {
  margin: 0 0 4px 0;
  line-height: 1.05;
}

.brand-text p {
  margin: 0;
}

.founder-badge {
  height: 64px;
  width: auto;
  max-width: 180px;
  object-fit: contain;
  display: block;
}

.founder-custom-race-panel {
  margin: 12px 0 14px 0;
  padding: 14px;
  border: 1px solid #d0d5dd;
  border-radius: 12px;
  background: #fbfcfe;
}

.founder-custom-race-hint {
  margin-bottom: 8px;
}

.auth-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  box-sizing: border-box;
}

.auth-card {
  width: 100%;
  max-width: 500px;
  text-align: center;
  padding: 28px;
}

.auth-logo {
  height: 72px;
  width: auto;
  display: block;
  margin: 0 auto 18px auto;
  object-fit: contain;
}

.auth-form {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.auth-consents {
  margin-top: 8px;
  text-align: left;
}

.auth-actions {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.consent-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 10px 0;
  font-size: 14px;
  color: #1E3A8A;
  cursor: pointer;
}

.consent-row input[type="checkbox"] {
  width: auto;
  margin: 2px 0 0 0;
  padding: 0;
  flex: 0 0 auto;
}

.consent-row a,
.auth-legal-note a {
  color: #1E3A8A;
}

.consent-row-inline {
  margin-top: 6px;
  margin-bottom: 12px;
}

.auth-legal-note {
  margin: 6px 0 0 0;
  font-size: 13px;
  text-align: left;
  color: #DC2626;
}

.support-text {
  color: #1C2F66;
}

.auth-info-box {
  margin: 12px 0 16px 0;
  padding: 14px 16px;
  border-radius: 12px;
  background: #fff5f5;
  border: 1px solid #f1b3b3;
  text-align: left;
  color: #DC2626;
  white-space: pre-line;
}

.reset-panel {
  margin-top: 16px;
  padding: 16px;
  border-radius: 12px;
  border: 1px solid #d0d5dd;
  background: #fbfcfe;
  text-align: left;
}

.race-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 8px;
  margin-bottom: 12px;
}

.race-card {
  border: 1px solid #d0d5dd;
  border-radius: 12px;
  background: #ffffff;
  padding: 12px;
  text-align: left;
  transition: all 0.18s ease;
  cursor: pointer;
  margin: 0;
  color: #1E3A8A;
}

.race-card:hover {
  border-color: #155eef;
  box-shadow: 0 6px 18px rgba(21,94,239,0.12);
}

.race-card.active {
  border-color: #155eef;
  background: #eef4ff;
  box-shadow: 0 6px 18px rgba(21,94,239,0.14);
}

.race-card-image {
  width: 100%;
  height: 92px;
  object-fit: contain;
  border-radius: 10px;
  background: #f8fafc;
  margin-bottom: 10px;
  display: block;
}

.race-card-title {
  font-weight: bold;
  font-size: 14px;
  color: #1E3A8A;
  margin-bottom: 4px;
}

.race-card-subtitle {
  color: #1E3A8A;
  font-size: 13px;
  line-height: 1.35;
}

.selected-race-note {
  margin-top: 4px;
  margin-bottom: 8px;
  font-size: 13px;
  color: #1E3A8A;
}

.passport-field {
  margin-bottom: 10px;
}

.passport-label {
  display: block;
  font-weight: bold;
  margin-bottom: 6px;
  color: #1E3A8A;
}

.phone-helper {
  margin-top: -4px;
}

.progress-track {
  background: #eef2f6;
  border-radius: 999px;
  height: 12px;
  overflow: hidden;
}

.progress-bar-fill {
  width: 0%;
  height: 12px;
  background: #1C2F66;
}

.progress-legend {
  margin-top: 16px;
}

.progress-award-wrap {
  margin-top: 18px;
  text-align: center;
}

.progress-award-image {
  max-width: 260px;
  width: 100%;
  height: auto;
  object-fit: contain;
  border-radius: 18px;
  transition: transform 0.25s ease, filter 0.25s ease;
}

.progress-award-image:hover {
  transform: scale(1.08);
  filter: drop-shadow(0 10px 20px rgba(0,0,0,0.15));
}

.progress-award-text {
  margin-top: 10px;
  font-size: 14px;
  color: #667085;
  text-align: center;
}

.form-two-cols {
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.form-one-col {
  grid-template-columns: 1fr;
  gap: 12px;
}

.footer-band {
  background: #474747;
  margin-top: 28px;
  padding: 28px 20px;
}

.footer-inner {
  max-width: 1080px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.footer-copy {
  min-width: 280px;
}

.footer-title {
  font-size: 20px;
  line-height: 1.1;
  color: #FFFFFF;
  margin: 0 0 10px 0;
  font-weight: bold;
}

.footer-title .footer-dot {
  color: #DC2626;
}

.footer-subtitle {
  font-size: 13px;
  line-height: 1.2;
  color: #FFFFFF;
  margin: 0;
}

.footer-logo {
  height: 64px;
  width: auto;
  object-fit: contain;
  display: block;
}

@media (max-width: 980px) {
  .race-cards-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

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

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 700px) {
  .founder-badge {
    height: 52px;
  }

  .site-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .site-header-links {
    gap: 14px;
  }

  .auth-logo {
    height: 60px;
  }

  .race-cards-grid {
    grid-template-columns: 1fr;
  }

  .footer-title {
    font-size: 24px;
  }

  .footer-subtitle {
    font-size: 20px;
  }

  .footer-logo {
    height: 52px;
  }
}