:root {
  --ink: #16191f;
  --muted: #646b76;
  --line: #dfe4ea;
  --paper: #f7f8f4;
  --white: #ffffff;
  --coral: #f06445;
  --teal: #0b9a9a;
  --lime: #b9e769;
  --violet: #5e5bb8;
  --shadow: 0 22px 70px rgba(22, 25, 31, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "Inter", Arial, sans-serif;
  line-height: 1.5;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 76px;
  padding: 14px clamp(18px, 4vw, 54px);
  background: rgba(247, 248, 244, 0.92);
  border-bottom: 1px solid rgba(22, 25, 31, 0.08);
  backdrop-filter: blur(16px);
}

.auth-alert {
  position: sticky;
  top: 76px;
  z-index: 19;
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  padding: 14px clamp(18px, 4vw, 54px);
  color: #4a1f18;
  background: #fff1e8;
  border-bottom: 1px solid rgba(240, 100, 69, 0.28);
}

.auth-alert[hidden] {
  display: none;
}

.auth-alert strong {
  flex: 0 0 auto;
}

.auth-alert span {
  min-width: 0;
}

.brand,
.topbar-actions,
.nav,
.hero-actions,
.section-heading,
.segmented-control,
.card-topline,
.card-meta,
.live-panel-header {
  display: flex;
  align-items: center;
}

.brand {
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 48px;
  height: 40px;
  color: var(--ink);
  background: var(--lime);
  border: 2px solid var(--ink);
  border-radius: 8px;
  box-shadow: 4px 4px 0 var(--ink);
  font-size: 0.72rem;
}

.nav {
  gap: clamp(14px, 2.6vw, 32px);
  color: var(--muted);
  font-weight: 600;
  font-size: 0.94rem;
}

.nav a:hover {
  color: var(--ink);
}

.topbar-actions {
  gap: 10px;
}

.icon-button,
.ghost-button,
.google-button,
.profile-logout,
.primary-button,
.dark-button,
.outline-button,
.primary-link,
.secondary-link {
  min-height: 44px;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.icon-button:hover,
.ghost-button:hover,
.google-button:hover,
.profile-logout:hover,
.primary-button:hover,
.dark-button:hover,
.outline-button:hover,
.primary-link:hover,
.secondary-link:hover {
  transform: translateY(-1px);
}

.icon-button {
  display: grid;
  place-items: center;
  width: 44px;
  color: var(--ink);
  background: var(--white);
  border-color: var(--line);
  font-size: 1.2rem;
}

.ghost-button,
.google-button,
.logout-button,
.outline-button {
  padding: 0 18px;
  color: var(--ink);
  background: var(--white);
  border-color: var(--line);
  font-weight: 700;
}

.logout-button[hidden] {
  display: none;
}

.google-button {
  display: inline-flex;
  align-items: center;
  gap: 9px;
}

.google-mark {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  color: var(--white);
  background: var(--teal);
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 900;
}

.profile-chip {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  padding: 5px 12px 5px 5px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-weight: 800;
}

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

.profile-chip img {
  width: 34px;
  height: 34px;
  background: var(--line);
  border-radius: 6px;
  object-fit: cover;
}

.logout-button {
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--line);
}

.primary-button,
.primary-link {
  padding: 0 20px;
  color: var(--ink);
  background: var(--lime);
  border-color: var(--ink);
  box-shadow: 4px 4px 0 var(--ink);
  font-weight: 800;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
  transform: none;
}

.primary-link,
.secondary-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.compact-link {
  padding: 0 16px;
}

.hero {
  position: relative;
  min-height: calc(100vh - 132px);
  overflow: hidden;
  isolation: isolate;
}

.hero-media,
.hero-overlay {
  position: absolute;
  inset: 0;
}

.hero-media {
  z-index: -2;
  background-image: url("assets/fitness-hero.png");
  background-position: 72% center;
  background-size: cover;
}

.hero-overlay {
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(247, 248, 244, 0.99) 0%, rgba(247, 248, 244, 0.9) 45%, rgba(247, 248, 244, 0.24) 78%),
    linear-gradient(0deg, rgba(22, 25, 31, 0.1), rgba(22, 25, 31, 0.02));
}

.hero-content {
  display: grid;
  grid-template-columns: minmax(0, 670px) minmax(280px, 360px);
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  min-height: calc(100vh - 132px);
  padding: clamp(34px, 5vw, 64px) clamp(18px, 4vw, 54px) 38px;
}

.hero-copy {
  padding-bottom: 0;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--teal);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.76rem;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 700px;
  margin-bottom: 18px;
  font-size: clamp(2.5rem, 6.2vw, 5.15rem);
  line-height: 0.98;
  letter-spacing: 0;
}

.hero-text {
  max-width: 610px;
  margin-bottom: 26px;
  color: #343a43;
  font-size: clamp(1rem, 1.7vw, 1.28rem);
}

.hero-actions {
  flex-wrap: wrap;
  gap: 14px;
}

.secondary-link {
  padding: 0 20px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.82);
  border-color: rgba(22, 25, 31, 0.18);
  font-weight: 800;
}

.live-panel {
  width: 100%;
  padding: 18px;
  color: var(--white);
  background: rgba(22, 25, 31, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.live-panel-header {
  justify-content: space-between;
  margin-bottom: 16px;
  color: rgba(255, 255, 255, 0.74);
  font-size: 0.9rem;
}

.live-panel-header strong {
  color: var(--lime);
}

.activity-row {
  display: grid;
  grid-template-columns: 14px 1fr;
  gap: 12px;
  padding: 15px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.activity-row p,
.mini-progress span {
  margin: 3px 0 0;
  color: rgba(255, 255, 255, 0.66);
  font-size: 0.88rem;
}

.activity-dot {
  width: 10px;
  height: 10px;
  margin-top: 7px;
  border-radius: 999px;
}

.activity-dot.coral,
.tag.coral {
  background: var(--coral);
}

.activity-dot.teal,
.tag.teal {
  background: var(--teal);
}

.tag.lime {
  background: var(--lime);
}

.mini-progress {
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.progress-track {
  height: 9px;
  margin-top: 10px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.16);
  border-radius: 999px;
}

.progress-track span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--lime), var(--teal));
}

.metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  margin: 0 clamp(18px, 4vw, 54px);
  background: var(--line);
  border: 1px solid var(--line);
  transform: translateY(-1px);
}

.metrics div {
  min-height: 132px;
  padding: 24px;
  background: var(--white);
}

.metrics strong {
  display: block;
  margin-bottom: 6px;
  font-size: clamp(1.7rem, 3vw, 2.6rem);
  line-height: 1;
}

.metrics span {
  color: var(--muted);
  font-weight: 600;
}

.section,
.auth-dashboard,
.featured-marathon,
.split-section,
.cta-band {
  margin: 0 auto;
  padding: clamp(64px, 9vw, 112px) clamp(18px, 4vw, 54px);
}

.featured-marathon {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 420px);
  gap: clamp(24px, 5vw, 72px);
  align-items: center;
  background:
    linear-gradient(120deg, rgba(22, 25, 31, 0.96), rgba(22, 25, 31, 0.9)),
    linear-gradient(45deg, var(--teal), var(--coral));
  color: var(--white);
}

.featured-marathon .eyebrow {
  color: var(--lime);
}

.featured-copy p {
  max-width: 720px;
  margin: 20px 0 0;
  color: rgba(255, 255, 255, 0.76);
  font-size: 1.08rem;
}

.feature-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

.feature-list span {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 12px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  font-weight: 800;
}

.marathon-offer-card {
  display: grid;
  gap: 22px;
  padding: 24px;
  color: var(--ink);
  background: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 8px;
  box-shadow: 8px 8px 0 var(--lime);
}

.offer-price {
  display: grid;
  gap: 4px;
}

.offer-price span {
  color: var(--muted);
  font-weight: 800;
}

.offer-price strong {
  font-size: clamp(2.5rem, 5vw, 4rem);
  line-height: 0.95;
}

.marathon-offer-card p {
  margin: 0;
  color: var(--muted);
}

.join-button {
  width: 100%;
}

.marathon-page {
  min-height: calc(100vh - 76px);
  background: #eef5f0;
}

.marathon-hero,
.marathon-workspace {
  padding: clamp(54px, 8vw, 96px) clamp(18px, 4vw, 54px);
}

.marathon-hero {
  color: var(--white);
  background:
    linear-gradient(120deg, rgba(22, 25, 31, 0.96), rgba(22, 25, 31, 0.9)),
    linear-gradient(45deg, var(--teal), var(--coral));
}

.marathon-hero .eyebrow {
  color: var(--lime);
}

.marathon-hero p {
  max-width: 720px;
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.76);
  font-size: 1.12rem;
}

.marathon-signin {
  margin-top: 24px;
}

.marathon-signin[hidden] {
  display: none;
}

.marathon-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 380px);
  gap: clamp(22px, 5vw, 64px);
  align-items: start;
}

.plan-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 26px;
}

.plan-grid article {
  display: grid;
  gap: 8px;
  min-height: 140px;
  padding: 20px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.plan-grid strong {
  font-size: 1.2rem;
}

.plan-grid span {
  color: var(--muted);
}

.auth-dashboard {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 430px);
  gap: clamp(24px, 5vw, 70px);
  align-items: center;
  background: #fff9ee;
  border-top: 1px solid rgba(22, 25, 31, 0.08);
  border-bottom: 1px solid rgba(22, 25, 31, 0.08);
}

.auth-dashboard p {
  max-width: 650px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 1.08rem;
}

.dashboard-card {
  display: grid;
  gap: 22px;
  padding: 22px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 8px 8px 0 rgba(22, 25, 31, 0.1);
}

.dashboard-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.dashboard-card-header span {
  min-width: 0;
  color: var(--muted);
  font-weight: 800;
  overflow-wrap: anywhere;
}

.dashboard-card-header strong {
  flex: 0 0 auto;
  color: var(--teal);
}

.dashboard-progress span {
  display: block;
  margin-bottom: 10px;
  color: var(--muted);
  font-weight: 800;
}

.progress-track.light {
  background: #edf0e8;
}

.section-heading {
  justify-content: space-between;
  gap: 22px;
  margin-bottom: 26px;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(2rem, 4vw, 3.7rem);
  line-height: 1;
  letter-spacing: 0;
}

.segmented-control {
  gap: 5px;
  padding: 5px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.segment {
  min-height: 38px;
  padding: 0 14px;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 6px;
  font-weight: 800;
  cursor: pointer;
}

.segment.active {
  color: var(--ink);
  background: var(--lime);
}

.program-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.program-card,
.coach-card {
  min-height: 260px;
  padding: 22px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  transition: opacity 180ms ease, transform 180ms ease, border-color 180ms ease;
}

.program-card:hover,
.coach-card:hover {
  transform: translateY(-3px);
  border-color: rgba(22, 25, 31, 0.34);
}

.program-card.is-hidden {
  display: none;
}

.card-topline,
.card-meta {
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  color: var(--ink);
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 900;
}

.tag.teal {
  color: var(--white);
}

.program-card h3 {
  min-height: 70px;
  margin: 28px 0 14px;
  font-size: clamp(1.35rem, 2vw, 1.78rem);
  line-height: 1.05;
}

.program-card p,
.coach-card p,
.schedule-copy p,
.cta-band p {
  color: var(--muted);
}

.card-meta {
  margin-top: 30px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.card-meta strong {
  color: var(--ink);
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(320px, 1.08fr);
  gap: clamp(28px, 6vw, 84px);
  align-items: center;
  background: #eef5f0;
}

.schedule-copy p {
  max-width: 580px;
  margin: 20px 0 28px;
  font-size: 1.08rem;
}

.dark-button {
  padding: 0 20px;
  color: var(--white);
  background: var(--ink);
  border-color: var(--ink);
  font-weight: 800;
}

.timeline {
  display: grid;
  gap: 12px;
}

.timeline-item {
  display: grid;
  grid-template-columns: 82px 1fr;
  gap: 18px;
  align-items: center;
  min-height: 100px;
  padding: 20px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.timeline-item.active {
  border-color: var(--ink);
  box-shadow: 6px 6px 0 var(--ink);
}

.timeline-item time {
  color: var(--teal);
  font-size: 1.18rem;
  font-weight: 900;
}

.timeline-item span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
}

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

.coach-card {
  min-height: 230px;
}

.avatar {
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  margin-bottom: 24px;
  color: var(--ink);
  border-radius: 8px;
  font-weight: 900;
}

.gradient-one {
  background: linear-gradient(135deg, var(--lime), #fff0a8);
}

.gradient-two {
  color: var(--white);
  background: linear-gradient(135deg, var(--coral), var(--violet));
}

.gradient-three {
  color: var(--white);
  background: linear-gradient(135deg, var(--teal), #2f6fdd);
}

.cta-band {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
  margin: 0 clamp(18px, 4vw, 54px) clamp(18px, 4vw, 54px);
  color: var(--white);
  background:
    linear-gradient(120deg, rgba(22, 25, 31, 0.96), rgba(22, 25, 31, 0.88)),
    linear-gradient(45deg, var(--teal), var(--coral));
  border-radius: 8px;
}

.cta-band .eyebrow {
  color: var(--lime);
}

.cta-band p {
  max-width: 640px;
  margin: 18px 0 0;
  color: rgba(255, 255, 255, 0.76);
}

.primary-link.dark {
  color: var(--ink);
  background: var(--white);
}

@media (max-width: 1100px) {
  .nav {
    display: none;
  }

  .hero-content {
    grid-template-columns: 1fr;
    align-items: end;
  }

  .live-panel {
    max-width: 520px;
  }

  .program-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .topbar {
    min-height: 68px;
  }

  .auth-alert {
    top: 68px;
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .ghost-button,
  .icon-button {
    display: none;
  }

  .hero {
    min-height: auto;
  }

  .hero-media {
    background-position: 61% center;
  }

  .hero-overlay {
    background:
      linear-gradient(180deg, rgba(247, 248, 244, 0.98) 0%, rgba(247, 248, 244, 0.88) 48%, rgba(247, 248, 244, 0.68) 100%),
      rgba(22, 25, 31, 0.08);
  }

  .hero-content {
    min-height: calc(100vh - 116px);
    padding-top: 48px;
  }

  .hero-copy {
    padding-bottom: 16px;
  }

  h1 {
    font-size: clamp(2.45rem, 14vw, 4.4rem);
  }

  .metrics,
  .coach-grid,
  .auth-dashboard,
  .featured-marathon,
  .split-section,
  .cta-band {
    grid-template-columns: 1fr;
  }

  .metrics {
    margin: 0;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .segmented-control {
    width: 100%;
    overflow-x: auto;
  }

  .segment {
    flex: 1 0 auto;
  }

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

  .program-card {
    min-height: 230px;
  }

  .program-card h3 {
    min-height: auto;
  }
}

@media (max-width: 520px) {
  .brand span:last-child {
    display: none;
  }

  .primary-button {
    padding: 0 14px;
  }

  .hero-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .primary-link,
  .secondary-link,
  .google-button,
  .dark-button,
  .outline-button {
    width: 100%;
  }

  .live-panel {
    padding: 14px;
  }

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

  .metrics div {
    min-height: 116px;
    padding: 18px;
  }

  .timeline-item {
    grid-template-columns: 1fr;
    gap: 8px;
  }
}
