body {
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

.site-header__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding-block: var(--space-4);
}

.site-header .brand {
  font-size: var(--text-lg);
}

.hero {
  padding-block: var(--space-2) var(--space-6);
}

.hero__panel {
  position: relative;
  overflow: hidden;
  padding: var(--space-5) var(--space-5) var(--space-7);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  box-shadow: var(--shadow-md);
}

.hero__content {
  --stack-gap: var(--space-4);
  position: relative;
  z-index: 1;
  max-width: 38rem;
}

.hero__eyebrow {
  color: var(--color-primary);
  font-size: var(--text-sm);
  font-weight: var(--weight-bold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero__title {
  font-size: var(--text-3xl);
  font-weight: var(--weight-black);
  line-height: var(--leading-tight);
  letter-spacing: -0.025em;
}

.hero__lead {
  color: var(--color-text-muted);
  font-size: var(--text-lg);
}

/* The Chicago flag's red star and two light-blue stripes. Phones show only the stripes: the star would sit under the copy. */
.hero__stars {
  display: none;
  position: absolute;
  fill: var(--color-accent);
}

.hero__stripes {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  height: 1.5rem;
  background: linear-gradient(to bottom, transparent 0 25%, var(--color-sky) 25% 50%, transparent 50% 75%, var(--color-sky) 75%);
}

@media (min-width: 40rem) {
  .hero__panel {
    padding: var(--space-6) var(--space-7) var(--space-7);
  }

  .hero__stars {
    display: block;
    right: var(--space-6);
    top: 50%;
    width: 11rem;
    transform: translateY(-58%);
  }
}

@media (min-width: 64rem) {
  .hero__panel {
    padding-block: var(--space-6) calc(var(--space-6) + var(--space-5));
  }

  .hero__stars {
    right: var(--space-8);
    width: 12rem;
  }
}

@media (min-width: 40rem) and (max-width: 63.99rem) {
  .hero__content {
    max-width: 26rem;
  }
}

.section {
  padding-block: 0 var(--space-8);
}

.section__title {
  font-size: var(--text-2xl);
  letter-spacing: -0.015em;
}

.feature {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.feature__icon {
  width: 2.75rem;
  height: 2.75rem;
  margin-bottom: var(--space-2);
  padding: var(--space-2);
  border-radius: var(--radius-md);
  background: var(--color-primary-soft);
  color: var(--color-primary);
}

.legal {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  max-width: 46rem;
  padding-block: var(--space-3) var(--space-8);
}

.legal h1 {
  font-size: var(--text-3xl);
  font-weight: var(--weight-black);
  line-height: var(--leading-tight);
  letter-spacing: -0.025em;
}

.legal h2 {
  margin-block-start: var(--space-4);
  font-size: var(--text-xl);
}

.legal ul {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding-inline-start: var(--space-5);
}

.legal mark {
  padding-inline: 0.2em;
  border-radius: var(--radius-sm);
  background: var(--color-warning-soft);
  color: var(--color-warning);
  font-weight: var(--weight-medium);
  box-decoration-break: clone;
}

.legal__meta {
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}

.legal__nowrap {
  white-space: nowrap;
}

.account-nav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.account {
  max-width: 30rem;
  padding-block: var(--space-3) var(--space-8);
}

.account--wide {
  max-width: 42rem;
}

.account__title {
  font-size: var(--text-2xl);
  letter-spacing: -0.015em;
}

.account__email {
  overflow-wrap: anywhere;
}

.account__list {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding-inline-start: var(--space-6);
}

.account__group {
  min-width: 0;
  padding: 0;
  border: 0;
}

.account__group legend {
  padding: 0;
  margin-block-end: var(--space-3);
  font-size: var(--text-lg);
}

.site-header__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2) var(--space-4);
}

.site-nav__link {
  font-weight: var(--weight-medium);
}

.lessons {
  padding-block: var(--space-3) var(--space-8);
}

.lessons__title {
  font-size: var(--text-3xl);
  font-weight: var(--weight-black);
  line-height: var(--leading-tight);
  letter-spacing: -0.025em;
}

.lesson-list {
  padding: 0;
  list-style: none;
}

.lesson-list:empty {
  display: none;
}

fc-lesson-list > .button {
  align-self: center;
}

.home-lessons {
  display: flex;
  flex-direction: column;
  gap: var(--space-7);
}

.next-lesson {
  display: grid;
  gap: var(--space-5);
  border-block-start: 6px solid var(--color-primary);
  box-shadow: var(--shadow-md);
}

.next-lesson__main {
  min-width: 0;
}

.next-lesson__title {
  font-size: clamp(1.625rem, 1.3rem + 1.6vw, 2.5rem);
  font-weight: var(--weight-black);
  line-height: var(--leading-tight);
  letter-spacing: -0.02em;
  overflow-wrap: anywhere;
}

/* The whole description is one link away, and at the 5,000 character limit it would push the rest of the page out of reach. */
.next-lesson__description {
  display: -webkit-box;
  overflow: hidden;
  overflow-wrap: anywhere;
  white-space: pre-line;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 8;
  line-clamp: 8;
}

.next-lesson__side {
  align-self: start;
  padding: var(--space-4);
  border-radius: var(--radius-md);
  background: var(--color-primary-soft);
}

.next-lesson__price .price-breakdown__row {
  align-items: baseline;
  padding: 0;
  border: 0;
}

.next-lesson__price dd {
  font-size: var(--text-2xl);
  font-weight: var(--weight-black);
}

@media (min-width: 48rem) {
  .next-lesson {
    grid-template-columns: minmax(0, 1fr) 18rem;
    gap: var(--space-6);
    padding: var(--space-6);
  }
}

/* A tall target on every width, because a phone is where someone taps this on the way to the gym. */
.location-link {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  min-height: 2.75rem;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.location-link__name {
  font-weight: var(--weight-medium);
}

fc-lesson-card {
  display: block;
  height: 100%;
}

.lesson-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  height: 100%;
}

.lesson-card__title,
.lesson-card__location,
.lesson-detail__title,
.lesson-detail__facts dd,
.lesson-detail__description {
  overflow-wrap: anywhere;
}

.lesson-card__badges {
  --cluster-gap: var(--space-2);
}

/* A plain inline element sits its badge on the text baseline, a little below the badges beside it. */
fc-spots-badge {
  display: inline-flex;
}

.lesson-card__price {
  display: block;
  margin-block-start: auto;
}

.lesson-detail {
  max-width: 46rem;
}

.lesson-detail__facts {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.lesson-detail__facts dt {
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
}

.lesson-detail__line {
  display: block;
}

.lesson-detail__description {
  white-space: pre-line;
}

.lesson-detail__refund {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding-inline-start: var(--space-5);
}

.site-footer {
  border-top: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2) var(--space-5);
  padding-block: var(--space-5);
}

/* The waiver viewer. The text layer rules follow PDF.js's own pdf_viewer.css for the vendored version. */
.pdf-viewer {
  display: block;
  height: max(450px, 60vh);
  min-height: 450px;
  overflow: hidden auto;
  overscroll-behavior: contain;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: #fff;
  color-scheme: only light;
}

.pdf-viewer__page {
  position: relative;
  overflow: hidden;
  background: #fff;
}

.pdf-viewer__page + .pdf-viewer__page {
  border-top: 2px solid #8a8a8a;
}

.pdf-viewer__canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.pdf-viewer .textLayer {
  position: absolute;
  inset: 0;
  overflow: clip;
  opacity: 1;
  line-height: 1;
  letter-spacing: normal;
  word-spacing: normal;
  text-align: initial;
  text-size-adjust: none;
  forced-color-adjust: none;
  transform-origin: 0 0;
  caret-color: CanvasText;
  z-index: 0;
  --min-font-size: 1;
  --text-scale-factor: calc(var(--total-scale-factor) * var(--min-font-size));
  --min-font-size-inv: calc(1 / var(--min-font-size));
}

.pdf-viewer .textLayer :is(span, br) {
  color: transparent;
  position: absolute;
  white-space: pre;
  cursor: text;
  transform-origin: 0% 0%;
  user-select: text;
}

.pdf-viewer .textLayer > :not(.markedContent),
.pdf-viewer .textLayer .markedContent span:not(.markedContent) {
  z-index: 1;
  --font-height: 0;
  font-size: calc(var(--text-scale-factor) * var(--font-height));
  --scale-x: 1;
  --rotate: 0deg;
  transform: rotate(var(--rotate)) scaleX(var(--scale-x)) scale(var(--min-font-size-inv));
}

.pdf-viewer .textLayer .markedContent {
  display: contents;
}

.pdf-viewer .textLayer ::selection {
  background: rgb(0 0 255 / 0.25);
}

.waiver__disclosure {
  font-size: 0.875rem;
}

.waiver-list {
  list-style: none;
  padding: 0;
}

.bookings {
  list-style: none;
  padding: 0;
}

.bookings__title {
  font-size: var(--text-xl);
}

.booking__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2) var(--space-3);
}

.booking__refunds {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  padding-inline-start: var(--space-5);
}

.cancel-quote {
  font-size: var(--text-lg);
}

.checkout-wait {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.spinner {
  flex: none;
  width: 1.25rem;
  height: 1.25rem;
  border: 3px solid var(--color-border);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: spin 900ms linear infinite;
}

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