.homepage {
  --home-paper: var(--customer-surface, #fff);
  --home-ink: var(--customer-ink, #1d1d1c);
  --home-muted: var(--customer-muted, #5c5c60);
  color: var(--home-ink);
  display: flex;
  flex-direction: column;
  gap: clamp(14px, 2.35vw, 29px);
}

.homepage-carousel {
  position: relative;
  container-type: inline-size;
  overflow: hidden;
  border: 1px solid #e3e3e3;
  border-radius: clamp(17px, 3vw, 31px);
  background: var(--home-paper);
}

.homepage-viewport {
  display: grid;
  grid-template: minmax(0, 1fr) / minmax(0, 1fr);
  width: 100%;
  aspect-ratio: 21 / 9;
  touch-action: pan-y;
}

.homepage-viewport:focus-visible {
  outline: 2px solid var(--home-ink);
  outline-offset: -4px;
}

.homepage-slide {
  position: relative;
  isolation: isolate;
  grid-area: 1 / 1;
  display: grid;
  align-items: center;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

.homepage-slide-art {
  position: absolute;
  z-index: -2;
  inset: 0;
  background: #dfddd7;
}
.homepage-slide-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 46%;
}
.homepage-slide--service .homepage-slide-photo { object-position: 52% 45%; }

.homepage-slide:has(.homepage-slide-art)::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background: linear-gradient(90deg, #f8f7f4fa, #f8f7f4ed 24%, #f8f7f470 48%, transparent 76%);
}

.homepage-slide-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: clamp(2px, .9cqi, 12px);
  min-width: 0;
  width: 68%;
  padding: 8px clamp(12px, 3.3cqi, 45px) 19px;
}
.homepage-slide-copy--only { width: 100%; }

.homepage-slide h2 {
  font-family: var(--customer-serif, serif);
  font-size: clamp(1.25rem, 5.7cqi, 4.45rem);
  font-weight: 710;
  line-height: 1.08;
  letter-spacing: -.045em;
  text-wrap: balance;
}

.homepage-slide-copy > p,
.homepage-ranking-copy > p {
  max-width: 100%;
  overflow: hidden;
  color: var(--home-muted);
  font-size: clamp(.6875rem, 2.65cqi, 1rem);
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.homepage-slide-copy > .homepage-slide-label {
  color: var(--home-ink);
  font-weight: 680;
}

.homepage-slide-copy .homepage-slide-cta {
  min-height: clamp(28px, 6.8cqi, 43px);
  margin-top: 1px;
  padding: 3px clamp(9px, 2cqi, 21px);
  border-radius: 99px;
  font-size: clamp(.6875rem, 2.65cqi, .9375rem);
  white-space: nowrap;
}

/* The existing slide CTA also makes its image tappable. */
.homepage-slide-cta::after {
  content: "";
  position: absolute;
  z-index: 1;
  inset: 0;
}

.homepage-slide--ranking {
  grid-template-columns: minmax(0, .7fr) minmax(0, 1.3fr);
  gap: clamp(8px, 3cqi, 30px);
  padding: 5px clamp(11px, 3cqi, 30px) 17px;
  background: #f9f8f6;
}
.homepage-ranking-copy { display: grid; gap: clamp(2px, .8cqi, 9px); }
.homepage-ranking {
  display: grid;
  gap: clamp(3px, 1cqi, 8px);
  min-width: 0;
  padding: 0;
  list-style: none;
}
.homepage-ranking button {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: clamp(4px, 1cqi, 12px);
  width: 100%;
  min-height: clamp(27px, 7cqi, 49px);
  padding: 3px clamp(5px, 1cqi, 16px);
  border: 1px solid #e4e2df;
  border-radius: 8px;
  background: #fff;
  text-align: left;
  font-size: clamp(.6875rem, 2.6cqi, .9375rem);
}
.homepage-ranking button > strong,
.homepage-ranking-level {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.homepage-ranking-number, .homepage-ranking-level { color: var(--home-muted); }
.homepage-ranking-score { font-weight: 740; font-variant-numeric: tabular-nums; white-space: nowrap; }

.homepage-carousel-controls {
  position: absolute;
  z-index: 2;
  inset-inline: 0;
  bottom: 0;
  display: grid;
  justify-content: center;
  pointer-events: none;
}
.homepage-carousel-dots { display: flex; align-items: center; pointer-events: auto; }
.homepage-carousel-dots button {
  display: grid;
  place-items: center;
  width: 24px;
  height: 26px;
  padding: 0;
  border: 0;
  border-radius: 7px;
  background: transparent;
}
.homepage-carousel-dots button span {
  width: 4px;
  height: 4px;
  border-radius: 10px;
  background: #fff7;
  box-shadow: 0 1px 3px #08080886;
}
.homepage-carousel-dots button[aria-pressed="true"] span {
  width: 18px;
  height: 5px;
  background: #fff;
}

.homepage-utilities {
  display: grid;
  grid-template-columns: max-content max-content minmax(0, 1fr);
  align-items: stretch;
  gap: clamp(6px, 2vw, 15px);
}
.homepage-shortcut {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 3px;
  min-width: clamp(43px, 10vw, 68px);
  min-height: 62px;
  padding: 3px 1px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--home-muted);
  font-size: .75rem;
  font-weight: 630;
  white-space: nowrap;
}
.homepage-shortcut-icon,
.homepage-shortcut > svg {
  display: grid;
  place-items: center;
  width: clamp(36px, 8.7vw, 49px);
  height: auto;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--home-paper);
  color: var(--home-ink);
}
.homepage-shortcut > svg { padding: clamp(9px, 2.2vw, 14px); }
.homepage-shortcut:hover :is(.homepage-shortcut-icon, svg) { color: #080808; }

.homepage-marketing { min-width: 0; }
.homepage-marketing-viewport {
  display: grid;
  overflow: hidden;
  border-radius: clamp(15px, 3.7vw, 24px);
  touch-action: pan-y;
}
.homepage-marketing-viewport:focus-visible { outline-offset: 3px; }
.homepage-marketing-slide { display: grid; grid-area: 1 / 1; min-width: 0; }
.homepage-marketing-art {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(6px, 2vw, 14px);
  min-height: 66px;
  width: 100%;
  padding: clamp(7px, 1.95vw, 15px) clamp(8px, 2.2vw, 18px);
  overflow: hidden;
  border: 0;
  background: #171719;
  color: #fff;
  text-align: start;
  text-decoration: none;
}
.homepage-marketing-art img,
.homepage-marketing-art::after { position: absolute; inset: 0; width: 100%; height: 100%; }
.homepage-marketing-art img { z-index: -2; object-fit: cover; object-position: 50% 42%; }
.homepage-marketing-art::after {
  z-index: -1;
  background: linear-gradient(90deg, #141417e8, #141417a8 60%, #14141750);
  content: "";
}
.homepage-marketing-art:focus-visible { outline: 2px solid #fff; outline-offset: -3px; }
.homepage-marketing-art strong {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow-wrap: anywhere;
  font-size: clamp(.765rem, 3vw, 1.1rem);
  line-height: 1.24;
}
.homepage-marketing-art .homepage-drop-cta { display: grid; align-items: center; }
.homepage-marketing-dots {
  display: flex;
  justify-content: safe center;
  max-width: 100%;
  min-height: 27px;
  overflow: auto;
  scrollbar-width: thin;
}
.homepage-marketing-dots button {
  display: grid;
  flex: 0 0 26px;
  place-items: center;
  height: 26px;
  padding: 0;
  border: 0;
  border-radius: 16px;
  background: transparent;
}
.homepage-marketing-dots button span { width: 5px; height: 5px; border-radius: 6px; background: #8b8b90; }
.homepage-marketing-dots button[aria-pressed="true"] span { width: 15px; background: #1e1e22; }
.homepage-marketing-dots button:focus-visible { outline-offset: -2px; }

.homepage-drop {
  --drop-muted: #cacaca;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  column-gap: clamp(6px, 2vw, 14px);
  row-gap: 3px;
  min-width: 0;
  min-height: 66px;
  padding: clamp(7px, 1.95vw, 15px) clamp(8px, 2.2vw, 18px);
  border-radius: clamp(15px, 3.7vw, 24px);
  background: #111;
  color: #fff;
}
.homepage-drop--idle {
  grid-template-columns: minmax(0, 1fr);
  align-content: center;
  background: #e6e6e8;
  color: var(--home-ink);
}
.homepage-drop--idle strong { font-size: .82rem; }
.homepage-drop--idle small { color: var(--home-muted); }
.homepage-drop-main { min-width: 0; }
.homepage-drop-title {
  display: block;
  overflow: hidden;
  font-size: clamp(.6875rem, 2.55vw, .925rem);
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.homepage-drop-price,
.homepage-card-price {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0 3px;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}
.homepage-drop-price > strong { font-size: clamp(1.12rem, 4.8vw, 1.7rem); font-weight: 790; line-height: 1; }
.homepage-drop-price small,
.homepage-drop-price s { color: var(--drop-muted); font-size: clamp(.57rem, 1.95vw, .72rem); }
.homepage-drop-price s { padding-inline-start: 2px; white-space: nowrap; text-decoration-thickness: 1px; }
.homepage-drop-cta {
  justify-self: end;
  align-self: center;
  min-height: 34px;
  padding: 2px clamp(7px, 2vw, 13px);
  border: 0;
  border-radius: 999px;
  background: #fff;
  color: #101010;
  font-size: clamp(.75rem, 2.75vw, .875rem);
  font-weight: 760;
  white-space: nowrap;
}
.homepage-drop-cta:disabled { background: #474747; color: #eee; }
.homepage-drop-cta:focus-visible { outline-color: #fff; }
.homepage-drop-note {
  color: var(--drop-muted);
  text-align: right;
  font-size: clamp(.61rem, 2.05vw, .78rem);
  line-height: 1.2;
  white-space: nowrap;
}
.homepage-drop-note > strong { color: #fff; font-size: 1.12em; }
.homepage-drop-stock {
  display: block;
  width: 100%;
  height: 5px;
  appearance: none;
  border: 0;
  border-radius: 999px;
  background: #555;
}
.homepage-drop-stock::-webkit-meter-bar {
  height: 5px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: #555;
}
.homepage-drop-stock::-webkit-meter-optimum-value { border-radius: 999px; background: #f4f4f4; }
.homepage-drop-stock::-moz-meter-bar { border-radius: 999px; background: #f4f4f4; }

.homepage-section { display: grid; gap: clamp(7px, 1.8vw, 14px); scroll-margin-top: 79px; }
.homepage-section-header { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 5px 10px; }
.homepage-section-header h2 {
  color: var(--home-ink);
  font-size: clamp(.95rem, 3.85vw, 1.42rem);
  font-weight: 760;
  letter-spacing: -.025em;
  white-space: nowrap;
}

.homepage-countdown,
.homepage-countdown > :first-child,
.homepage-countdown-time {
  display: inline-flex;
  align-items: center;
}
.homepage-countdown {
  gap: 6px;
  color: #4a4a4a;
  font-size: clamp(.68rem, 2.75vw, .82rem);
  font-weight: 640;
  white-space: nowrap;
}
.homepage-countdown > :first-child { gap: 3px; }
.homepage-countdown-time { gap: 2px; font-variant-numeric: tabular-nums; }
.homepage-countdown-time b {
  padding: 0 3px;
  border-radius: 3px;
  background: #1d1d1d;
  color: #fff;
  line-height: 1.48;
  font-weight: 710;
}

.homepage-trial-grid, .homepage-product-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(8px, 2.2vw, 19px);
}
.homepage-trial-grid > .empty-state { grid-column: 1 / -1; }
.homepage-product { min-width: 0; }
.homepage-card {
  display: grid;
  grid-template-rows: auto 1fr auto;
  align-items: start;
  gap: 5px;
  width: 100%;
  height: 100%;
  min-width: 0;
  padding: clamp(5px, 1.55vw, 12px);
  border: 1px solid #ededed;
  border-radius: clamp(12px, 3.2vw, 22px);
  background: var(--home-paper);
  text-align: start;
}
.homepage-card:not(:disabled):hover { border-color: #d3d3d3; }
.homepage-card:disabled { opacity: .58; }
.homepage-card .service-media {
  display: grid;
  place-items: center;
  overflow: hidden;
  aspect-ratio: 21 / 9;
  border-radius: clamp(7px, 1.9vw, 13px);
  color: var(--home-muted);
}
.homepage-card .service-media img {
  position: absolute;
  inset: 0;
  object-position: 50% 46%;
}
.homepage-card-title {
  display: block;
  color: var(--home-ink);
  font-size: clamp(.76rem, 3.28vw, 1.08rem);
  font-weight: 730;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.homepage-card-price > strong { color: #151515; font-size: clamp(1.08rem, 4vw, 1.5rem); font-weight: 800; }
.homepage-card-price > small { color: #424242; font-size: .69rem; }
.homepage-card-price > s {
  margin-inline-start: max(2px, .5vw);
  color: #646464;
  font-size: .67rem;
  white-space: nowrap;
}

.homepage-budgets { display: flex; flex-wrap: wrap; gap: 4px clamp(5px, 1.45vw, 11px); max-width: 100%; }
.homepage-budgets button {
  min-height: 30px;
  padding: 3px clamp(6px, 1.65vw, 15px);
  border: 1px solid #e5e5e5;
  border-radius: 99px;
  background: var(--home-paper);
  font-size: clamp(.65rem, 2.8vw, .82rem);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.homepage-budgets button[aria-pressed="true"] { border-color: var(--home-ink); color: var(--home-paper); background: var(--home-ink); }
.homepage-budgets button[aria-pressed="false"]:hover { background: #f4f3f2; }
.homepage-budget-empty { display: grid; justify-items: center; gap: 10px; }
.homepage-budget-empty .empty-state { width: 100%; }
.homepage-floating-support { display: none; }

.activity-entry { display: grid; gap: 8px; padding: 20px; border: 1px solid var(--line); border-radius: 16px; text-align: left; background: #f7f6f4; }
.activity-entry span { display: flex; justify-content: space-between; color: var(--muted); }
.product-options label { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.product-options { display: grid; gap: 8px; border: 0; }
.product-options legend { margin-bottom: 6px; }
.product-options label { padding: 12px; border: 1px solid var(--line); border-radius: 12px; }
.product-options label:has(:checked) { border-color: var(--ink); background: #f4f3f0; }
.product-options span { flex: 1; }
.product-options label:has(:focus-visible) { outline: 2px solid var(--ink); outline-offset: 2px; }

@media (max-width: 700px) {
  .homepage-floating-support {
    position: fixed;
    z-index: 5;
    inset-inline-end: var(--gutter);
    bottom: calc(94px + env(safe-area-inset-bottom));
    display: flex;
    align-items: center;
    gap: 6px;
    min-height: 39px;
    padding: 6px 10px;
    border: 1px solid #e6e6e6;
    border-radius: 99px;
    background: var(--home-paper);
    color: #3f3f3f;
    font-size: .75rem;
    font-weight: 660;
  }
  .customer-shell .app-dialog:has(.reward-activity,.homepage-activity,.invite-activity) {
    width: 100%; max-width: 100%; height: 100dvh; max-height: 100dvh; margin: 0; border-radius: 0;
    padding: max(16px,env(safe-area-inset-top)) 16px max(16px,env(safe-area-inset-bottom));
  }
}

@media (max-width: 360px) {
  .homepage-ranking button { grid-template-columns: auto minmax(0, 1fr) auto; }
  .homepage-ranking-level { display: none; }
  .homepage-shortcut { min-width: 42px; }
}

:is(.homepage-shortcut, .homepage-floating-support, .activity-entry, .homepage-ranking button):active { background: #ebe9e6; }

@media (prefers-reduced-motion: no-preference) {
  :is(.homepage-shortcut, .homepage-floating-support, .activity-entry, .homepage-drop-cta,
    .homepage-ranking button, .homepage-budgets button, .homepage-card) {
    transition: transform 150ms cubic-bezier(.22,.75,.24,1), background-color 150ms ease, border-color 150ms ease;
  }
  :is(.homepage-shortcut, .homepage-floating-support, .activity-entry, .homepage-drop-cta,
    .homepage-ranking button, .homepage-budgets button, .homepage-card):not(:disabled):active {
    transform: scale(.98);
    transition-duration: 75ms;
  }
  .homepage-carousel-dots button span { transition: width 180ms ease-out, background-color 150ms ease; }
  .product-options label { transition: color 150ms ease, background-color 150ms ease, border-color 150ms ease; }
}
