/*
 * Tom's Pro Bike - Affirm landing page styles
 * Aesthetic matches affirm.com (cream + indigo + soft pastels, pill buttons,
 * sentence-case headings, generous whitespace).
 *
 * Every selector is scoped under `.affirm-page` and every class is prefixed
 * with `affirm-` so this stylesheet can't collide with the live
 * tomsprobike.com CSS (citr-misc.css) or vice-versa.
 *
 * Fonts are the same families used by tomsprobike.com (franklin-gothic-atf
 * and yrsa). The .woff2 files were downloaded from Adobe Typekit and live
 * alongside this stylesheet in a `fonts/` folder. Relative URLs let the
 * bundle be hosted under any path (e.g. /pages/affirm/) without rewrites.
 */

@font-face {
  font-family: 'franklin-gothic-atf';
  src: url('fonts/franklin-gothic-atf-400.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'franklin-gothic-atf';
  src: url('fonts/franklin-gothic-atf-600.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'franklin-gothic-atf';
  src: url('fonts/franklin-gothic-atf-700.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'franklin-gothic-atf';
  src: url('fonts/franklin-gothic-atf-800.woff2') format('woff2');
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'franklin-gothic-atf';
  src: url('fonts/franklin-gothic-atf-900.woff2') format('woff2');
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'yrsa';
  src: url('fonts/yrsa-400.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

.affirm-page {
  /* Tom's Pro Bike brand */
  --BLUE: #131826;
  --BLUE-hover: #2a3553;
  --RED: #d43d34;

  /* Affirm 2025 supporting palette (sampled from affirm.com) */
  --af-periwinkle: #9cadfc;
  --af-periwinkle-light: #e6e6fc;
  --af-sage: #97e8b8;
  --af-sage-dark: #2abc7a;
  --af-cream: #ede9e6;
  --af-cream-light: #f5f3f0;
  --af-text: #101820;
  --af-text-muted: #6d6e71;
  --af-border: #e5e7eb;
  --af-white: #ffffff;

  /* Primary tokens map to Tom's brand blue */
  --af-indigo: var(--BLUE);
  --af-indigo-dark: var(--BLUE-hover);
  --af-indigo-deep: var(--BLUE);

  /* Tokens */
  --font-sans: 'franklin-gothic-atf', 'Helvetica Neue', Arial, sans-serif;
  --font-display: 'franklin-gothic-atf', 'Helvetica Neue', Arial, sans-serif;
  --max-width: 1100px;
  --radius: 16px;
  --radius-lg: 24px;
  --radius-pill: 999px;
  --shadow-sm: 0 2px 8px rgba(16, 24, 32, 0.05);
  --shadow: 0 8px 32px rgba(16, 24, 32, 0.06);

  /* Container reset (the live CSS sets .container to float left) */
  font-family: var(--font-sans);
  color: var(--af-text);
  background: var(--af-cream-light);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  display: block;
  width: 100%;
  float: none;
}

.affirm-page,
.affirm-page *,
.affirm-page *::before,
.affirm-page *::after {
  box-sizing: border-box;
}

/* Defensive scoped reset - neutralises floats/clear leaking in from the host
   site's CSS (live tomsprobike.com sets `float: left` on .container etc.).
   NOTE: We deliberately do NOT force `display: block` on article/section here
   because that would override component-level `display: grid` / `display: flex`
   rules (e.g. `.affirm-bike-card`, `.affirm-step`). The live CSS already has
   the standard block-display reset in its own normalize section. */
.affirm-page section,
.affirm-page article,
.affirm-page header,
.affirm-page div,
.affirm-page ul,
.affirm-page li,
.affirm-page p,
.affirm-page h1,
.affirm-page h2,
.affirm-page h3,
.affirm-page h4,
.affirm-page span,
.affirm-page a {
  float: none;
  clear: none;
}

.affirm-page img {
  max-width: 100%;
  height: auto;
  border: 0;
  vertical-align: middle;
}

.affirm-page a {
  color: var(--af-indigo);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

.affirm-page a:hover {
  color: var(--af-indigo-dark);
}

.affirm-page h2,
.affirm-page h3 {
  font-family: var(--font-display);
  color: var(--af-text);
  margin: 0;
  letter-spacing: -0.01em;
  font-weight: 700;
}

.affirm-page p {
  margin: 0;
}

/* Layout container */
.affirm-container {
  width: min(100% - 2rem, var(--max-width));
  max-width: var(--max-width);
  margin-inline: auto;
  float: none;
  background: transparent;
}

/* Eyebrow / merchant tag.
   Scoped under .affirm-page so margins win against the
   `.affirm-page p { margin: 0 }` reset above. */
.affirm-page .affirm-eyebrow {
  display: inline-block;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--af-indigo);
  background: var(--af-periwinkle-light);
  padding: 0.375rem 0.875rem;
  border-radius: var(--radius-pill);
  margin: 0 0 1.25rem;
}

/* Pill button (Affirm-style, Tom's Pro Bike blue) */
.affirm-page a.affirm-btn,
.affirm-page .affirm-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: var(--BLUE);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  padding: 0.95rem 1.85rem;
  border-radius: var(--radius-pill);
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: background 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.affirm-page a.affirm-btn:hover,
.affirm-page .affirm-btn:hover {
  background: var(--BLUE-hover);
  color: #fff;
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 10px 28px rgba(19, 24, 38, 0.28);
}

/* Ghost button variant - for secondary actions like "Try another bike" */
.affirm-page .affirm-btn--ghost,
.affirm-page a.affirm-btn--ghost {
  background: transparent;
  color: var(--BLUE);
  border: 1.5px solid var(--BLUE);
  padding: 0.7rem 1.35rem;
  font-size: 0.9375rem;
}

.affirm-page .affirm-btn--ghost:hover,
.affirm-page a.affirm-btn--ghost:hover {
  background: var(--BLUE);
  color: #fff;
  border-color: var(--BLUE);
}

/* Section 1: Live promo intro (replaces the hero) */
.affirm-intro {
  background: var(--af-cream);
  padding: 4.5rem 0 5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.affirm-intro::before,
.affirm-intro::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.affirm-intro::before {
  width: 320px;
  height: 320px;
  background: var(--af-periwinkle-light);
  top: -120px;
  left: -120px;
  opacity: 0.7;
}

.affirm-intro::after {
  width: 240px;
  height: 240px;
  background: var(--af-sage);
  bottom: -100px;
  right: -80px;
  opacity: 0.4;
}

.affirm-intro__inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.affirm-intro__title {
  font-size: clamp(2.25rem, 4.5vw, 3.5rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.02em;
  max-width: 22ch;
  margin: 0;
}

.affirm-intro__tagline {
  font-size: clamp(1.0625rem, 1.5vw, 1.25rem);
  color: var(--af-text);
  margin: 0;
  max-width: 44ch;
  line-height: 1.45;
}

.affirm-intro__description {
  font-size: 1rem;
  color: var(--af-text-muted);
  margin: 0;
  max-width: 38ch;
}

/* Intro finance-options grid - two compact cards explaining Affirm's two
   main products (Pay in 4 + Monthly payments). Scoped under .affirm-page so
   the auto margins survive the `.affirm-page p { margin: 0 }` reset and the
   inner <p> text colors beat any host-site paragraph styles. */
.affirm-page .affirm-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  width: 100%;
  max-width: 640px;
  margin: 0.5rem auto 0;
}

.affirm-option {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid rgba(19, 24, 38, 0.06);
  border-radius: var(--radius);
  padding: 1rem;
  text-align: left;
}

.affirm-option__icon {
  font-size: 1.125rem;
  line-height: 1;
  background: var(--af-periwinkle-light);
  color: var(--af-indigo);
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.affirm-option__body {
  min-width: 0;
}

.affirm-page .affirm-option__name {
  font-weight: 700;
  font-size: 0.9375rem;
  color: var(--af-text);
  margin: 0 0 0.25rem;
}

.affirm-page .affirm-option__text {
  font-size: 0.8125rem;
  color: var(--af-text-muted);
  line-height: 1.45;
  margin: 0;
}

/* Shared section styling */
.affirm-section-title {
  text-align: center;
  font-size: clamp(1.875rem, 3vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.015em;
  margin: 0 auto 0.75rem;
  padding: 0 1rem;
}

/* When a section title isn't followed by a subtitle, give it more breathing
   room before the next content (e.g. FAQ list, values grid). */
.affirm-section-title:not(:has(+ .affirm-section-subtitle)) {
  margin-bottom: 2.5rem;
}

/* Scoped under .affirm-page so the auto margins (which center this max-width
   block in the container) win against the `.affirm-page p { margin: 0 }` reset. */
.affirm-page .affirm-section-subtitle {
  text-align: center;
  color: var(--af-text-muted);
  font-size: 1rem;
  margin: 0 auto 3rem;
  max-width: 50ch;
  padding: 0 1rem;
}

/* Centered "leading text" pill placed above section titles.
   Reuses the .affirm-eyebrow look (periwinkle pill, indigo text).
   Scoped under .affirm-page so the auto margins win against the
   `.affirm-page p { margin: 0 }` reset above. */
.affirm-page .affirm-section-eyebrow {
  display: block;
  width: max-content;
  max-width: calc(100% - 2rem);
  margin: 0 auto 1.25rem;
  text-align: center;
}

/* On the dark .affirm-plans section the default periwinkle-light pill with
   indigo text already has good contrast, so no override is needed. */

/* Section 2: 3 steps */
.affirm-steps {
  padding: 5rem 0;
  background: var(--af-white);
}

.affirm-steps__grid {
  display: grid;
  gap: 2.5rem;
  grid-template-columns: 1fr;
}

@media (min-width: 720px) {
  .affirm-steps__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2rem;
  }
}

.affirm-step {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0;
  padding: 0;
  min-width: 0;
}

.affirm-step__badge {
  width: 240px;
  height: 240px;
  max-width: 100%;
  background: var(--af-cream);
  border-radius: var(--radius-lg);
  display: grid;
  place-items: center;
  margin: 0 auto 1.5rem;
  padding: 16px;
  overflow: hidden;
  box-sizing: border-box;
}

.affirm-step__badge--alt {
  background: var(--af-periwinkle-light);
}

.affirm-step__badge--accent {
  background: var(--af-sage);
}

.affirm-step__image {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.affirm-step__number {
  display: block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.8125rem;
  letter-spacing: 0.12em;
  color: var(--af-indigo);
  margin: 0 0 0.5rem;
}

.affirm-step__title {
  font-size: 1.375rem;
  font-weight: 700;
  margin: 0 0 0.5rem;
  letter-spacing: -0.01em;
}

.affirm-step__text {
  color: var(--af-text-muted);
  margin: 0;
  font-size: 0.9375rem;
  max-width: 28ch;
  line-height: 1.55;
}

/* Section 3: Value props */
.affirm-values {
  padding: 5rem 0;
  background: var(--af-cream);
}

.affirm-values__grid {
  display: grid;
  gap: 1.5rem;
  max-width: 800px;
  margin: 0 auto;
}

@media (min-width: 560px) {
  .affirm-values__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.affirm-value-card {
  background: var(--af-white);
  padding: 2rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.affirm-value-card--alt {
  background: var(--af-periwinkle-light);
  box-shadow: none;
}

.affirm-value-card__icon {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  background: var(--af-indigo);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.affirm-value-card--alt .affirm-value-card__icon {
  background: var(--af-sage-dark);
}

.affirm-value-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--af-text);
}

.affirm-value-card p {
  margin: 0;
  color: var(--af-text-muted);
  font-size: 0.9375rem;
  line-height: 1.6;
}

/* Live payment plans - dark "Affirm modal" style */
.affirm-plans {
  padding: 5rem 0;
  background-color: rgba(19, 19, 31, 1);
  color: #fff;
}

.affirm-plans .affirm-section-title {
  color: #fff;
}

.affirm-plans .affirm-section-subtitle,
.affirm-plans .affirm-plans-note {
  color: rgba(255, 255, 255, 0.7);
}

/* Try-another controls - sits above the featured card and lets the visitor
   swap between bikes and clothing for the live finance example. */
.affirm-plans-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 0 auto 2rem;
}

/* Featured bike card - image left, copy right, finance below.
   Sits on the dark .affirm-plans section but is itself a light cream card,
   so all internal text uses the standard dark text tokens.
   Width matches the .affirm-plans-stack grid below so the section reads as
   a single aligned column. */
.affirm-bike-card {
  display: grid;
  grid-template-columns: minmax(260px, 360px) 1fr;
  gap: 2.5rem;
  align-items: center;
  background: var(--af-cream);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin: 0 auto 2.5rem;
  max-width: 1080px;
  color: var(--af-text);
  box-shadow: var(--shadow);
}

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

.affirm-bike-card__media {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  background: var(--af-white);
  border-radius: var(--radius);
  overflow: hidden;
  display: grid;
  place-items: center;
  padding: 1rem;
  box-shadow: var(--shadow-sm);
}

.affirm-bike-card__image {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.affirm-bike-card__tag {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  background: var(--RED);
  color: #fff;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-pill);
}

.affirm-bike-card__info {
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-width: 0;
}

.affirm-bike-card__eyebrow {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--af-text-muted);
  margin: 0;
}

.affirm-bike-card__name {
  font-size: clamp(1.25rem, 1.8vw, 1.625rem);
  font-weight: 700;
  line-height: 1.2;
  margin: 0;
  color: var(--af-text);
  letter-spacing: -0.01em;
}

.affirm-bike-card__pricing {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin: 0;
}

.affirm-bike-card__price {
  font-size: 2rem;
  font-weight: 700;
  color: var(--af-text);
  line-height: 1;
  letter-spacing: -0.01em;
}

.affirm-bike-card__was {
  font-size: 1rem;
  color: var(--af-text-muted);
  text-decoration: line-through;
}

.affirm-bike-card__actions {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}

.affirm-bike-card__link {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--af-indigo);
  text-decoration: none;
}

.affirm-bike-card__link:hover {
  text-decoration: underline;
}

/* Ghost button override when sitting directly on the dark plans bg */
.affirm-plans .affirm-btn--ghost,
.affirm-plans a.affirm-btn--ghost {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.4);
}

.affirm-plans .affirm-btn--ghost:hover,
.affirm-plans a.affirm-btn--ghost:hover {
  background: #fff;
  color: var(--BLUE);
  border-color: #fff;
}

/* ...but when the ghost button is inside the cream bike card, revert to the
   default dark-on-light treatment so it stays readable. */
.affirm-plans .affirm-bike-card .affirm-btn--ghost,
.affirm-plans .affirm-bike-card a.affirm-btn--ghost {
  color: var(--BLUE);
  border-color: var(--BLUE);
}

.affirm-plans .affirm-bike-card .affirm-btn--ghost:hover,
.affirm-plans .affirm-bike-card a.affirm-btn--ghost:hover {
  background: var(--BLUE);
  color: #fff;
  border-color: var(--BLUE);
}

@media (max-width: 720px) {
  .affirm-bike-card {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding: 1.5rem;
    text-align: center;
  }
  .affirm-bike-card__media {
    max-width: 280px;
    margin: 0 auto;
  }
  .affirm-bike-card__info {
    text-align: center;
    align-items: center;
  }
  .affirm-bike-card__pricing,
  .affirm-bike-card__actions {
    justify-content: center;
  }
}

/* Plan cards as a responsive column grid - one card per term, side-by-side on
   wider viewports so visitors can scan and compare APR/monthly/total across
   3-, 6-, 12-, 24-month options at a glance. Auto-fits down to a single
   column on narrow screens. */
.affirm-plans-stack {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  max-width: 1080px;
  margin: 0 auto;
}

.affirm-plan {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  color: #fff;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  /* Keep cards in a row aligned to their tops with the rows section pushed
     to the bottom, so APR/total lines visually align across columns. */
  justify-content: space-between;
}

/* In column layout the header has very little horizontal room, so stack the
   "$X every month" line above the term pill instead of side-by-side. */
.affirm-plan__head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
}

.affirm-plan__monthly {
  margin: 0;
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.affirm-plan__amount {
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.01em;
  line-height: 1;
}

.affirm-plan__amount-suffix {
  font-size: 0.9375rem;
  color: rgba(255, 255, 255, 0.7);
}

.affirm-plan__term {
  background: var(--af-periwinkle-light);
  color: var(--BLUE);
  font-size: 0.875rem;
  font-weight: 600;
  padding: 0.4rem 0.95rem;
  border-radius: var(--radius-pill);
  white-space: nowrap;
}

/* Scoped under .affirm-page (specificity 0,2,0) AND uses !important on the
   sizing declarations to defeat the host citr-misc.css, which applies
   `!important` width/height rules to bare <dl> elements and was pinning this
   list to ~500px wide inside the 672px-wide plan card. */
.affirm-page .affirm-plan__rows {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 1rem;
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  box-sizing: border-box;
}

.affirm-plan__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}

.affirm-plan__row dt {
  font-size: 0.9375rem;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 400;
  margin: 0;
}

.affirm-plan__row dd {
  font-size: 0.9375rem;
  font-weight: 600;
  color: #fff;
  margin: 0;
}

/* Scoped under .affirm-page so the auto margins center this max-width: 720px
   block (same `.affirm-page p { margin: 0 }` override as the subtitle above). */
.affirm-page .affirm-plans-note {
  margin: 1.5rem auto 0;
  max-width: 720px;
  font-size: 0.8125rem;
  text-align: center;
}

.affirm-plans-empty {
  color: rgba(255, 255, 255, 0.6);
  font-style: italic;
  text-align: center;
  padding: 1.5rem;
}

/* Section 4: FAQs */
.affirm-faq {
  padding: 5rem 0;
  background: var(--af-cream-light);
}

.affirm-faq__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 1rem;
  max-width: 720px;
  margin-inline: auto;
}

.affirm-faq__item {
  background: var(--af-white);
  border-radius: var(--radius);
  padding: 1.5rem 1.75rem;
  box-shadow: var(--shadow-sm);
}

.affirm-faq__item h3 {
  margin: 0 0 0.5rem;
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--af-text);
}

.affirm-faq__item p {
  margin: 0;
  color: var(--af-text-muted);
  font-size: 0.9375rem;
  line-height: 1.6;
}

.affirm-faq__links {
  margin-top: 3.5rem;
  padding-top: 32px;
  padding-bottom: 32px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  font-weight: 600;
}

/* Render the FAQ footer links as pill-style clickable targets - padding gives
   them proper tap area and visual weight (was bare inline text before). */
.affirm-faq__links a {
  display: inline-block;
  padding: 0.6rem 1.25rem;
  border-radius: var(--radius-pill);
  background: var(--af-white);
  color: var(--af-indigo);
  text-decoration: none;
  border: 1px solid rgba(19, 24, 38, 0.08);
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.affirm-faq__links a:hover {
  background: var(--af-indigo);
  color: #fff;
  border-color: var(--af-indigo);
  text-decoration: none;
}

/* Footer disclosures */
.affirm-disclosures {
  padding: 2.5rem 0 3.5rem;
  background: var(--af-cream-light);
  color: var(--af-text-muted);
  font-size: 0.75rem;
  line-height: 1.7;
  border-top: 1px solid var(--af-border);
}

.affirm-disclosures a {
  color: var(--af-indigo);
  word-break: break-word;
}

/* ============================================================================
   Interactive payment calculator
   ----------------------------------------------------------------------------
   Dark navy section that mirrors the .affirm-plans aesthetic so the two
   payment-driven sections feel like a pair: the calculator lets visitors
   explore arbitrary amounts; the .affirm-plans section anchors it to a real
   in-stock product. Layout: input controls on the left, hero "from $X/mo"
   summary on the right, term-by-term breakdown grid underneath.
   ============================================================================ */

.affirm-calc {
  padding: 5rem 0;
  background-color: var(--BLUE);
  color: #fff;
}

.affirm-calc .affirm-section-title,
.affirm-calc__title {
  color: #fff;
}

.affirm-calc__eyebrow {
  color: var(--af-periwinkle);
}

.affirm-calc__subtitle {
  color: rgba(255, 255, 255, 0.72);
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}

/* Two-column control + hero panel. Stacks below 860px so the input
   stays comfortably wide on tablets and the hero number drops underneath. */
.affirm-calc__panel {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 2rem;
  align-items: stretch;
  max-width: 1080px;
  margin: 2.5rem auto 2rem;
}

@media (max-width: 860px) {
  .affirm-calc__panel {
    grid-template-columns: 1fr;
  }
}

.affirm-calc__controls,
.affirm-calc__hero {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  padding: 2rem 2.25rem;
  display: flex;
  flex-direction: column;
}

.affirm-calc__controls {
  gap: 1rem;
}

.affirm-calc__label {
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.75);
}

/* Amount input - large readable number with a $ adornment. */
.affirm-calc__amount-wrap {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius);
  padding: 0.85rem 1.1rem;
  transition: border-color 0.18s ease, background 0.18s ease;
}

.affirm-calc__amount-wrap:focus-within {
  border-color: var(--af-periwinkle);
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 0 0 3px rgba(156, 173, 252, 0.18);
}

.affirm-calc__currency {
  font-size: 1.5rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.6);
}

/* Defeats both the host site's `input { ... }` rules and the default
   number-input chrome (spinners stripped for a cleaner look). */
.affirm-page .affirm-calc__amount-input {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: textfield;
  background: transparent !important;
  border: 0 !important;
  outline: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  margin: 0 !important;
  width: 100% !important;
  height: auto !important;
  color: #fff !important;
  font-family: var(--font-sans) !important;
  font-size: 2rem !important;
  font-weight: 700 !important;
  line-height: 1 !important;
  letter-spacing: -0.01em !important;
}

.affirm-page .affirm-calc__amount-input::-webkit-outer-spin-button,
.affirm-page .affirm-calc__amount-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Custom-styled range slider with a periwinkle thumb. */
.affirm-page .affirm-calc__slider {
  appearance: none;
  -webkit-appearance: none;
  width: 100% !important;
  height: 6px !important;
  background: rgba(255, 255, 255, 0.16) !important;
  border-radius: var(--radius-pill);
  outline: none !important;
  margin: 0.5rem 0 0 !important;
  padding: 0 !important;
  border: 0 !important;
  cursor: pointer;
}

.affirm-calc__slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--af-periwinkle);
  border: 3px solid var(--BLUE);
  box-shadow: 0 0 0 1px rgba(156, 173, 252, 0.4);
  cursor: pointer;
  transition: transform 0.12s ease;
}

.affirm-calc__slider::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--af-periwinkle);
  border: 3px solid var(--BLUE);
  box-shadow: 0 0 0 1px rgba(156, 173, 252, 0.4);
  cursor: pointer;
}

.affirm-calc__slider:active::-webkit-slider-thumb,
.affirm-calc__slider:focus-visible::-webkit-slider-thumb {
  transform: scale(1.1);
}

.affirm-calc__range-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.55);
  letter-spacing: 0.04em;
  margin-top: -0.25rem;
}

/* Quick-pick preset chips. Selected state is set by the JS via aria-pressed. */
.affirm-calc__presets {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.25rem;
}

/* Rendered as <a role="button"> rather than <button> so we sidestep the
   host site's global button styling. Explicit overrides for the link
   defaults (text-decoration, color) are needed because we're now an anchor. */
.affirm-page a.affirm-calc__preset,
.affirm-page .affirm-calc__preset {
  display: inline-block;
  background: transparent !important;
  border: 1px solid rgba(255, 255, 255, 0.3) !important;
  color: rgba(255, 255, 255, 0.85) !important;
  font-family: var(--font-sans) !important;
  font-size: 0.875rem !important;
  font-weight: 600 !important;
  line-height: 1.2 !important;
  padding: 0.45rem 0.95rem !important;
  border-radius: var(--radius-pill) !important;
  text-decoration: none !important;
  text-align: center;
  cursor: pointer;
  user-select: none;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.affirm-page a.affirm-calc__preset:hover,
.affirm-page .affirm-calc__preset:hover {
  background: rgba(255, 255, 255, 0.1) !important;
  border-color: rgba(255, 255, 255, 0.5) !important;
  color: #fff !important;
  text-decoration: none !important;
}

.affirm-page a.affirm-calc__preset:focus-visible,
.affirm-page .affirm-calc__preset:focus-visible {
  outline: 2px solid var(--af-periwinkle);
  outline-offset: 2px;
}

.affirm-page a.affirm-calc__preset[aria-pressed="true"],
.affirm-page .affirm-calc__preset[aria-pressed="true"] {
  background: var(--af-periwinkle) !important;
  color: var(--BLUE) !important;
  border-color: var(--af-periwinkle) !important;
}

/* Hero "from $X/mo" summary - big readable number on the right. */
.affirm-calc__hero {
  justify-content: center;
  align-items: flex-start;
  gap: 0.5rem;
  background: linear-gradient(
    140deg,
    rgba(156, 173, 252, 0.18) 0%,
    rgba(255, 255, 255, 0.04) 75%
  );
  border-color: rgba(156, 173, 252, 0.25);
}

.affirm-calc__hero-label {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
}

.affirm-calc__hero-amount {
  margin: 0;
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
  line-height: 1;
}

.affirm-calc__hero-value {
  font-size: clamp(2.75rem, 6vw, 4.25rem);
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
  line-height: 1;
  transition: opacity 0.18s ease;
}

.affirm-calc__hero-value.is-loading {
  opacity: 0.55;
}

.affirm-calc__hero-suffix {
  font-size: 1.25rem;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 600;
}

.affirm-calc__hero-meta {
  margin: 0;
  font-size: 0.9375rem;
  color: rgba(255, 255, 255, 0.65);
  min-height: 1.4em;
}

.affirm-calc__hero-meta.is-error {
  color: #ffb4ad;
}

/* Per-term breakdown grid - reuses the unscoped .affirm-plan / .affirm-plan__*
   styling already designed for a dark surface (white text on translucent
   white fill), so no extra rules are needed here. */
.affirm-calc__results {
  margin-top: 0;
}

.affirm-page .affirm-calc__note {
  width: 100%;
  max-width: none;
  margin: 2.5rem 0 0 !important;
  padding: 1.75rem 1.5rem !important;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  font-size: 0.8125rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.65);
  text-align: center !important;
}

/* "Bikes you could finance for this amount" - live products under maxprice */
.affirm-calc__products-wrap {
  max-width: 1080px;
  margin: 2.75rem auto 0;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.affirm-page .affirm-calc__products-heading {
  margin: 0 0 0.25rem;
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.01em;
  text-align: center;
}

.affirm-page .affirm-calc__products-sub {
  margin: 0 0 2.5rem !important;
  padding-bottom: 0.5rem;
  font-size: 0.9375rem;
  color: rgba(255, 255, 255, 0.65);
  text-align: center !important;
}

.affirm-calc__products-sub.is-error {
  color: #ffb4ad;
}

.affirm-calc__products {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.affirm-calc__products:empty {
  display: none;
}

/* Light cream cards on the dark section - same treatment as the featured
   .affirm-bike-card so the two product surfaces feel like a pair. */
.affirm-page a.affirm-calc__product,
.affirm-page .affirm-calc__product {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  background: var(--af-cream);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: var(--radius);
  padding: 1rem;
  color: var(--af-text) !important;
  text-decoration: none !important;
  box-shadow: var(--shadow-sm);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.affirm-page a.affirm-calc__product:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  text-decoration: none !important;
}

.affirm-calc__product-media {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  background: var(--af-white);
  border-radius: var(--radius);
  overflow: hidden;
  display: grid;
  place-items: center;
}

.affirm-calc__product-image {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  padding: 0.5rem;
}

.affirm-calc__product-tag {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  background: var(--RED);
  color: #fff;
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.25rem 0.55rem;
  border-radius: var(--radius-pill);
}

.affirm-calc__product-name {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--af-text);
  /* Two-line clamp keeps card heights consistent across long product names. */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.affirm-calc__product-pricing {
  margin: 0;
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.affirm-calc__product-price {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--af-text);
  line-height: 1;
}

.affirm-calc__product-was {
  font-size: 0.8125rem;
  color: var(--af-text-muted);
  text-decoration: line-through;
}

.affirm-calc__product-monthly {
  margin: 0;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--af-indigo);
  letter-spacing: 0.01em;
}

@media (max-width: 540px) {
  .affirm-calc__controls,
  .affirm-calc__hero {
    padding: 1.5rem;
  }
  .affirm-calc__hero-amount {
    flex-wrap: wrap;
  }
  .affirm-calc__products {
    grid-template-columns: repeat(2, 1fr);
  }
}
