/**
 * Homepage hero — Version B (A/B test against the SPA hero).
 *
 * Shown only when landing-hero-ab.js resolved the visitor into variant "b"
 * on the homepage. Both gating attributes are written by a blocking inline
 * script in <head>, so the correct hero paints on the first frame.
 *
 * The phone screen is real DOM (not the PNG mockup) so it can animate.
 * Every size inside the screen is in em, resolved from .ashb-screen, which
 * scales with the phone width. One font-size declaration therefore keeps the
 * whole mock legible from a 320px phone up to a wide desktop.
 */

#ageshift-hero-b {
  display: none;
}

html[data-hero-ab="b"][data-hero-home="1"] #ageshift-hero-b {
  display: block;
}

/* Hide the SPA hero for variant B. The class is a fallback the embed adds
   after it locates the section by headline, in case the utility-class
   selector drifts on the next Figma export. */
html[data-hero-ab="b"][data-hero-home="1"] #root section.relative.overflow-hidden.bg-white,
html[data-hero-ab="b"][data-hero-home="1"] #root .ashb-hero-a-hidden {
  display: none !important;
}

#ageshift-hero-b {
  --ashb-teal: #4a8b8e;
  --ashb-teal-dark: #2c6b6e;
  --ashb-teal-soft: #eaf3f3;
  --ashb-coral: #e0714f;
  --ashb-amber: #e0a13c;
  --ashb-violet: #7b6ad4;
  --ashb-ink: #111827;
  --ashb-body: #5b6573;
  --ashb-line: #e8ebef;
  --ashb-gap: 2.25rem;

  position: relative;
  width: 100%;
  box-sizing: border-box;
  padding: calc(5.75rem + env(safe-area-inset-top, 0px)) 0 3.25rem;
  background: #fff;
  font-family: "DM Sans", ui-sans-serif, system-ui, -apple-system, sans-serif;
  color: var(--ashb-ink);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow: clip;
}

/* Ambient wash behind the phone, matching the SPA hero treatment. */
#ageshift-hero-b::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(
    ellipse 52% 70% at 80% 46%,
    rgba(74, 139, 142, 0.11) 0%,
    rgba(74, 139, 142, 0.035) 44%,
    transparent 72%
  );
}

#ageshift-hero-b *,
#ageshift-hero-b *::before,
#ageshift-hero-b *::after {
  box-sizing: border-box;
}

#ageshift-hero-b .ashb-wrap {
  position: relative;
  max-width: 78rem;
  margin: 0 auto;
  padding: 0 max(1rem, env(safe-area-inset-left, 0px));
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas:
    "copy"
    "inputs"
    "phone"
    "insight";
  row-gap: 2rem;
  justify-items: center;
}

/* ---------------------------------------------------------------- copy --- */

#ageshift-hero-b .ashb-copy {
  grid-area: copy;
  width: 100%;
  max-width: 34rem;
}

#ageshift-hero-b .ashb-eyebrow {
  display: inline-flex;
  align-items: center;
  margin: 0 0 1.15rem;
  padding: 0.4rem 0.8rem;
  border-radius: 9999px;
  background: rgba(74, 139, 142, 0.1);
  color: var(--ashb-teal-dark);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  line-height: 1.45;
}

#ageshift-hero-b .ashb-title {
  margin: 0 0 1.15rem;
  font-size: clamp(2.375rem, 8.2vw, 3.5rem);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -0.038em;
  color: var(--ashb-ink);
}

#ageshift-hero-b .ashb-title-accent {
  color: var(--ashb-teal);
}

#ageshift-hero-b .ashb-lead {
  margin: 0 0 1.75rem;
  max-width: 30rem;
  font-size: clamp(1rem, 4vw, 1.125rem);
  line-height: 1.65;
  color: var(--ashb-body);
}

#ageshift-hero-b .ashb-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0 1.6rem;
  border-radius: 0.5rem;
  background: var(--ashb-teal);
  color: #fff;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

#ageshift-hero-b .ashb-cta:hover {
  background: #3d7b7e;
  box-shadow: 0 10px 22px -10px rgba(44, 107, 110, 0.65);
  transform: translateY(-1px);
}

#ageshift-hero-b .ashb-cta:focus-visible {
  outline: 2px solid var(--ashb-teal-dark);
  outline-offset: 3px;
}

#ageshift-hero-b .ashb-trust {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.55rem;
  margin: 1.15rem 0 0;
  padding: 0;
  list-style: none;
  font-size: 0.9375rem;
  line-height: 1.4;
  color: #4b5563;
}

#ageshift-hero-b .ashb-trust li {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

#ageshift-hero-b .ashb-trust svg {
  flex: none;
  width: 1.125rem;
  height: 1.125rem;
  color: var(--ashb-teal);
}

/* -------------------------------------------------------------- inputs --- */

#ageshift-hero-b .ashb-inputs {
  position: relative;
  grid-area: inputs;
  width: 100%;
  max-width: 34rem;
}

#ageshift-hero-b .ashb-rail-label {
  margin: 0 0 0.75rem;
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #9aa4b2;
}

#ageshift-hero-b .ashb-chips {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

/*
 * Chips default to their logged state and the embed adds .is-off to stage the
 * reveal. Inverted that way round, a visitor with the script blocked still
 * sees all four inputs instead of an empty rail.
 */
#ageshift-hero-b .ashb-chip {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid rgba(17, 24, 39, 0.1);
  border-radius: 0.85rem;
  background: #fff;
  box-shadow: 0 6px 16px -8px rgba(17, 24, 39, 0.24);
  transition: opacity 0.45s ease, transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

#ageshift-hero-b .ashb-chip.is-off {
  opacity: 0;
  transform: translateY(0.4rem) scale(0.97);
}

#ageshift-hero-b .ashb-chip-icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 1.85rem;
  height: 1.85rem;
  border-radius: 9999px;
  background: var(--ashb-chip-soft);
  color: var(--ashb-chip-tone);
}

#ageshift-hero-b .ashb-chip-icon svg {
  width: 1.05rem;
  height: 1.05rem;
}

#ageshift-hero-b .ashb-chip[data-tone="pain"] .ashb-chip-icon {
  overflow: hidden;
  background: #fde7e7;
}

#ageshift-hero-b .ashb-chip-icon .ashb-knee-icon {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 9999px;
}

#ageshift-hero-b .ashb-chip-text {
  min-width: 0;
}

#ageshift-hero-b .ashb-chip-name {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.3;
  color: #1f2937;
}

#ageshift-hero-b .ashb-chip-value {
  display: block;
  margin-top: 0.1rem;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--ashb-chip-tone);
}

#ageshift-hero-b .ashb-chip[data-tone="pain"] {
  --ashb-chip-tone: var(--ashb-coral);
  --ashb-chip-soft: #fdeee9;
}

#ageshift-hero-b .ashb-chip[data-tone="sleep"] {
  --ashb-chip-tone: var(--ashb-violet);
  --ashb-chip-soft: #eeecfb;
}

#ageshift-hero-b .ashb-chip[data-tone="energy"] {
  --ashb-chip-tone: var(--ashb-amber);
  --ashb-chip-soft: #fdf3e3;
}

#ageshift-hero-b .ashb-chip[data-tone="time"] {
  --ashb-chip-tone: var(--ashb-teal);
  --ashb-chip-soft: var(--ashb-teal-soft);
}

/* Mobile / tablet handoff between the logged inputs and the phone. */
#ageshift-hero-b .ashb-handoff {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  margin: 1.15rem 0 0;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--ashb-teal-dark);
}

#ageshift-hero-b .ashb-handoff svg {
  width: 1rem;
  height: 1rem;
  animation: ashb-nudge 1.8s ease-in-out infinite;
}

@keyframes ashb-nudge {
  0%,
  100% {
    transform: translateY(-2px);
  }
  50% {
    transform: translateY(2px);
  }
}

/* Measured connector paths — desktop only, drawn by landing-hero-ab.js. */
#ageshift-hero-b .ashb-flow {
  display: none;
}

/* ------------------------------------------------------------- insight --- */

#ageshift-hero-b .ashb-insight {
  grid-area: insight;
  width: 100%;
  max-width: 34rem;
  padding: 1.15rem 1.25rem 1.25rem;
  border: 1px solid var(--ashb-line);
  border-radius: 1rem;
  background: #fff;
  box-shadow: 0 10px 30px -22px rgba(17, 24, 39, 0.4);
  transition: border-color 0.5s ease, box-shadow 0.5s ease, transform 0.5s ease;
}

#ageshift-hero-b .ashb-insight.is-lit {
  border-color: rgba(74, 139, 142, 0.4);
  box-shadow: 0 16px 36px -20px rgba(44, 107, 110, 0.45);
  transform: translateY(-2px);
}

#ageshift-hero-b .ashb-insight-badge {
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  margin-bottom: 0.85rem;
  border-radius: 9999px;
  background: linear-gradient(135deg, #e0714f 0%, #e0a13c 48%, #4a8b8e 100%);
  color: #fff;
}

#ageshift-hero-b .ashb-insight-badge svg {
  width: 1.3rem;
  height: 1.3rem;
}

#ageshift-hero-b .ashb-insight-title {
  margin: 0 0 0.6rem;
  font-size: 1.0625rem;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.015em;
  color: var(--ashb-ink);
}

#ageshift-hero-b .ashb-insight-body {
  margin: 0;
  padding-bottom: 0.9rem;
  border-bottom: 1px solid #f1f3f6;
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--ashb-body);
}

#ageshift-hero-b .ashb-insight-foot {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0.9rem 0 0;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #374151;
}

#ageshift-hero-b .ashb-insight-foot svg {
  flex: none;
  width: 1rem;
  height: 1rem;
  color: var(--ashb-teal);
}

#ageshift-hero-b .ashb-insight-foot em {
  font-style: normal;
  color: var(--ashb-teal);
}

/* --------------------------------------------------------------- phone --- */

#ageshift-hero-b .ashb-phone-col {
  grid-area: phone;
  display: flex;
  justify-content: center;
  width: 100%;
}

#ageshift-hero-b .ashb-phone {
  container-type: inline-size;
  position: relative;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  /* iPhone 14/15 class (390×844). Cap width so height stays inside the viewport. */
  width: min(17.25rem, 72vw, calc(78svh * 9 / 19.5));
  aspect-ratio: 9 / 19.5;
  height: auto;
  padding: 0.5rem;
  border-radius: 2.35rem;
  background: linear-gradient(158deg, #2f333c 0%, #14161b 46%, #2b2f37 100%);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.16) inset,
    0 26px 46px -26px rgba(15, 23, 42, 0.55), 0 8px 16px -12px rgba(15, 23, 42, 0.4);
}

/* Side buttons. */
#ageshift-hero-b .ashb-phone::before,
#ageshift-hero-b .ashb-phone::after {
  content: "";
  position: absolute;
  right: -0.13rem;
  width: 0.13rem;
  border-radius: 0 0.13rem 0.13rem 0;
  background: #3a3f49;
}

#ageshift-hero-b .ashb-phone::before {
  top: 6.5rem;
  height: 1.6rem;
}

#ageshift-hero-b .ashb-phone::after {
  top: 8.6rem;
  height: 2.6rem;
}

#ageshift-hero-b .ashb-screen {
  position: relative;
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  height: 100%;
  border-radius: 1.95rem;
  background: #fbfcfd;
  overflow: hidden;
  /*
   * One declaration scales the entire mock. Everything below .ashb-screen is
   * sized in em, so the screen stays legible and keeps a phone-like aspect at
   * any phone width. The px value is a fallback for engines without cqw.
   */
  font-size: 12.4px;
  font-size: 4.15cqw;
  line-height: 1.4;
  color: #1f2937;
}

#ageshift-hero-b .ashb-notch {
  position: absolute;
  top: 0.75em;
  left: 50%;
  width: 0.62em;
  height: 0.62em;
  border-radius: 9999px;
  background: #0b0d11;
  transform: translateX(-50%);
  z-index: 3;
}

#ageshift-hero-b .ashb-statusbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.62em 1.15em 0.2em;
  font-size: 0.85em;
  font-weight: 600;
  color: #111827;
}

#ageshift-hero-b .ashb-statusbar svg {
  height: 0.85em;
  width: auto;
}

#ageshift-hero-b .ashb-status-icons {
  display: flex;
  align-items: center;
  gap: 0.3em;
}

#ageshift-hero-b .ashb-screen-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  padding: 0.5em 1.05em 0.55em;
}

#ageshift-hero-b .ashb-screen-body > * {
  flex-shrink: 0;
}

#ageshift-hero-b .ashb-appbar-date {
  margin: 0 0 0.15em;
  font-size: 0.78em;
  color: #9aa4b2;
}

#ageshift-hero-b .ashb-appbar-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5em;
}

#ageshift-hero-b .ashb-appbar-title {
  margin: 0;
  font-size: 1.85em;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.025em;
  color: #111827;
}

#ageshift-hero-b .ashb-appbar-icon {
  flex: none;
  width: 1.15em;
  height: 1.15em;
  margin-top: 0.35em;
  color: #b6bec9;
}

#ageshift-hero-b .ashb-appbar-sub {
  margin: 0.2em 0 0.85em;
  font-size: 0.8em;
  color: #9aa4b2;
}

/* ------------------------------------------------------- status banner --- */

#ageshift-hero-b .ashb-banner {
  position: relative;
  overflow: hidden;
  padding: 0.85em 0.95em 0.8em;
  border-radius: 0.95em;
  background: linear-gradient(135deg, #4a8b8e 0%, #3b7a7f 100%);
  color: #fff;
  transition: background 0.7s ease;
}

#ageshift-hero-b[data-stage="adapted"] .ashb-banner {
  background: linear-gradient(135deg, #ef7d54 0%, #e0603f 100%);
}

#ageshift-hero-b .ashb-banner-head {
  display: flex;
  align-items: center;
  gap: 0.5em;
}

#ageshift-hero-b .ashb-banner-mark {
  display: grid;
  place-items: center;
  flex: none;
  width: 1.5em;
  height: 1.5em;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.22);
}

#ageshift-hero-b .ashb-banner-mark svg {
  width: 0.9em;
  height: 0.9em;
}

/* The spinner replaces the check only while the plan is being rebuilt. */
#ageshift-hero-b .ashb-banner-mark .ashb-spinner {
  display: none;
  width: 0.9em;
  height: 0.9em;
  border: 0.16em solid rgba(255, 255, 255, 0.4);
  border-top-color: #fff;
  border-radius: 9999px;
  animation: ashb-spin 0.75s linear infinite;
}

#ageshift-hero-b[data-stage="adapting"] .ashb-banner-mark .ashb-spinner {
  display: block;
}

#ageshift-hero-b[data-stage="adapting"] .ashb-banner-mark svg {
  display: none;
}

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

#ageshift-hero-b .ashb-banner-title {
  margin: 0;
  font-size: 1.15em;
  font-weight: 700;
  letter-spacing: -0.015em;
}

#ageshift-hero-b .ashb-banner-body {
  margin: 0.3em 0 0;
  font-size: 0.82em;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.92);
}

#ageshift-hero-b .ashb-banner-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35em;
  margin-top: 0.7em;
}

#ageshift-hero-b .ashb-pill {
  padding: 0.28em 0.6em;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.2);
  font-size: 0.72em;
  font-weight: 600;
  color: #fff;
  transition: opacity 0.35s ease, transform 0.35s ease;
}

#ageshift-hero-b[data-stage="adapting"] .ashb-banner-pills {
  opacity: 0.45;
}

/* Rebuild progress line, only present mid-adaptation. */
#ageshift-hero-b .ashb-banner-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 0.2em;
  background: rgba(255, 255, 255, 0.22);
  opacity: 0;
  transition: opacity 0.3s ease;
}

#ageshift-hero-b[data-stage="adapting"] .ashb-banner-progress {
  opacity: 1;
}

#ageshift-hero-b .ashb-banner-progress span {
  display: block;
  width: 40%;
  height: 100%;
  border-radius: 9999px;
  background: #fff;
  transform: translateX(-100%);
}

#ageshift-hero-b[data-stage="adapting"] .ashb-banner-progress span {
  animation: ashb-progress 1.15s ease-in-out infinite;
}

@keyframes ashb-progress {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(250%);
  }
}

/* ------------------------------------------------------- session lists --- */

#ageshift-hero-b .ashb-seclabel {
  display: flex;
  align-items: center;
  gap: 0.7em;
  margin: 1.05em 0 0.5em;
  font-size: 0.7em;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: #9aa4b2;
}

#ageshift-hero-b .ashb-live {
  position: relative;
  flex: none;
  width: 0.45em;
  height: 0.45em;
  border-radius: 9999px;
  background: var(--ashb-teal);
}

#ageshift-hero-b .ashb-live::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 9999px;
  background: var(--ashb-teal);
  animation: ashb-ping 1.6s ease-out infinite;
}

@keyframes ashb-ping {
  0% {
    transform: scale(1);
    opacity: 0.55;
  }
  70%,
  100% {
    transform: scale(2.6);
    opacity: 0;
  }
}

/*
 * Both session lists occupy the same grid cell, so the row swap crossfades in
 * place and the cell is always as tall as the taller list — no min-height to
 * keep in sync with the copy, and no layout shift at any width.
 * The stack can grow, but rows stay content-sized so leftover height sits
 * below the list instead of stretching each card.
 */
#ageshift-hero-b .ashb-stack {
  display: grid;
  flex: 1;
  min-height: 0;
  align-content: start;
}

#ageshift-hero-b .ashb-list {
  grid-area: 1 / 1;
  display: flex;
  flex-direction: column;
  gap: 0.4em;
  margin: 0;
  padding: 0;
  list-style: none;
  transition: opacity 0.45s ease;
}

#ageshift-hero-b .ashb-list[data-list="adapted"] {
  opacity: 0;
  pointer-events: none;
}

#ageshift-hero-b[data-stage="adapted"] .ashb-list[data-list="planned"] {
  opacity: 0;
  pointer-events: none;
}

#ageshift-hero-b[data-stage="adapted"] .ashb-list[data-list="adapted"] {
  opacity: 1;
  pointer-events: auto;
}

#ageshift-hero-b .ashb-row {
  display: flex;
  align-items: flex-start;
  gap: 0.55em;
  padding: 0.5em 0.6em;
  border: 1px solid #eef0f3;
  border-radius: 0.7em;
  background: #fff;
  box-shadow: 0 1px 2px rgba(17, 24, 39, 0.03);
  transition: opacity 0.4s ease, transform 0.4s ease, border-color 0.4s ease;
}

/* Dropped work greys out and strikes through before the swap. */
#ageshift-hero-b[data-stage="adapting"] .ashb-list[data-list="planned"] .ashb-row {
  opacity: 0.5;
}

#ageshift-hero-b[data-stage="adapting"] .ashb-row-title {
  text-decoration: line-through;
  text-decoration-color: rgba(224, 113, 79, 0.75);
  text-decoration-thickness: 0.09em;
}

/* Adapted rows land one after another. */
#ageshift-hero-b .ashb-list[data-list="adapted"] .ashb-row {
  opacity: 0;
  transform: translateY(0.6em);
}

#ageshift-hero-b[data-stage="adapted"] .ashb-list[data-list="adapted"] .ashb-row {
  opacity: 1;
  transform: none;
}

#ageshift-hero-b[data-stage="adapted"] .ashb-list[data-list="adapted"] .ashb-row:nth-child(1) {
  transition-delay: 0.06s;
}

#ageshift-hero-b[data-stage="adapted"] .ashb-list[data-list="adapted"] .ashb-row:nth-child(2) {
  transition-delay: 0.18s;
}

#ageshift-hero-b[data-stage="adapted"] .ashb-list[data-list="adapted"] .ashb-row:nth-child(3) {
  transition-delay: 0.3s;
}

#ageshift-hero-b[data-stage="adapted"] .ashb-list[data-list="adapted"] .ashb-row:nth-child(4) {
  transition-delay: 0.42s;
}

#ageshift-hero-b .ashb-thumb {
  display: grid;
  place-items: center;
  flex: none;
  width: 2.5em;
  height: 2.05em;
  border-radius: 0.4em;
  background: linear-gradient(150deg, #303743 0%, #1b202a 100%);
  color: #fff;
}

#ageshift-hero-b .ashb-thumb svg {
  width: 0.85em;
  height: 0.85em;
}

#ageshift-hero-b .ashb-thumb[data-kind="swim"] {
  background: linear-gradient(150deg, #4a8b8e 0%, #35696d 100%);
}

#ageshift-hero-b .ashb-row-main {
  flex: 1;
  min-width: 0;
}

#ageshift-hero-b .ashb-row-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.4em;
}

#ageshift-hero-b .ashb-row-title {
  font-size: 0.86em;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: #1f2937;
}

#ageshift-hero-b .ashb-row-dur {
  display: flex;
  align-items: center;
  gap: 0.25em;
  flex: none;
  font-size: 0.74em;
  font-weight: 600;
  color: var(--ashb-teal);
  white-space: nowrap;
}

#ageshift-hero-b .ashb-row-dur svg {
  width: 0.85em;
  height: 0.85em;
}

#ageshift-hero-b .ashb-row-note {
  margin: 0.22em 0 0;
  font-size: 0.74em;
  line-height: 1.42;
  color: #8d97a4;
}

/* Why a row changed — the payload of the whole animation. */
#ageshift-hero-b .ashb-reason {
  display: inline-flex;
  align-items: center;
  gap: 0.25em;
  margin-top: 0.35em;
  padding: 0.2em 0.45em;
  border-radius: 9999px;
  background: #fdeee9;
  font-size: 0.68em;
  font-weight: 700;
  color: #b8512f;
}

#ageshift-hero-b .ashb-reason svg {
  width: 0.72em;
  height: 0.72em;
}

#ageshift-hero-b .ashb-reason .ashb-knee-icon {
  width: 0.95em;
  height: 0.95em;
  object-fit: cover;
  border-radius: 9999px;
  flex: none;
}

#ageshift-hero-b .ashb-footnote {
  display: flex;
  align-items: flex-start;
  flex: none;
  gap: 0.45em;
  margin: 0.55em 0 0;
  padding: 0.55em 0.65em;
  border-radius: 0.6em;
  background: #f4f6f8;
  font-size: 0.74em;
  line-height: 1.45;
  color: #77818f;
}

#ageshift-hero-b .ashb-footnote svg {
  flex: none;
  width: 0.9em;
  height: 0.9em;
  margin-top: 0.1em;
  color: #a7b0bb;
}

/* -------------------------------------------------------------- tabbar --- */

#ageshift-hero-b .ashb-tabbar {
  display: flex;
  border-top: 1px solid #edf0f3;
  background: #fff;
  padding: 0.5em 0 0.7em;
}

#ageshift-hero-b .ashb-tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.18em;
  font-size: 0.68em;
  font-weight: 600;
  color: #aeb6c1;
}

#ageshift-hero-b .ashb-tab svg {
  width: 1.35em;
  height: 1.35em;
}

#ageshift-hero-b .ashb-tab[aria-current="page"] {
  color: var(--ashb-teal);
}

/* ------------------------------------------------------------- tablet --- */

/*
 * Copy across the top, then the logged inputs beside the phone. The connector
 * curves need a single stacked rail, so they stay off until 1024px where the
 * chips get their own column.
 */
@media (min-width: 768px) {
  #ageshift-hero-b .ashb-wrap {
    padding: 0 2rem;
    grid-template-columns: minmax(0, 1fr) minmax(14.5rem, 16.5rem);
    grid-template-areas:
      "copy copy"
      "inputs phone"
      "insight phone";
    /* The phone spans two rows and is taller than both. Parking the slack in
       the last row keeps the insight card tucked under the inputs instead of
       leaving a gap where the extra height was split between them. */
    grid-template-rows: auto auto 1fr;
    column-gap: 2.5rem;
    row-gap: 1.75rem;
    justify-items: stretch;
    align-items: start;
  }

  #ageshift-hero-b .ashb-copy,
  #ageshift-hero-b .ashb-inputs,
  #ageshift-hero-b .ashb-insight {
    max-width: none;
  }

  #ageshift-hero-b .ashb-lead {
    max-width: 34rem;
  }

  #ageshift-hero-b .ashb-phone-col {
    justify-content: flex-end;
  }

  #ageshift-hero-b .ashb-phone {
    width: min(16.5rem, 100%, calc(78svh * 9 / 19.5));
    max-width: 16.5rem;
  }
}

/* ------------------------------------------------------------ desktop --- */

@media (min-width: 1024px) {
  #ageshift-hero-b {
    padding-bottom: 4rem;
  }

  #ageshift-hero-b .ashb-wrap {
    grid-template-columns:
      minmax(0, 1fr)
      minmax(11.5rem, 12.5rem)
      minmax(15rem, 16.5rem);
    grid-template-areas:
      "copy inputs phone"
      "insight insight phone";
    column-gap: var(--ashb-gap);
    row-gap: 1.75rem;
    align-items: center;
  }

  /* Capped so "You perform." stays on one line inside the copy column. */
  #ageshift-hero-b .ashb-title {
    font-size: clamp(2.75rem, 3.9vw, 3.5rem);
  }

  #ageshift-hero-b .ashb-lead {
    max-width: 27rem;
    font-size: 1.0625rem;
  }

  /* One chip per row so each logged input owns a connector path. The rail is
     capped narrower than its column to leave room for the curves, but wide
     enough that "available today" stays on one line. */
  #ageshift-hero-b .ashb-chips {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.7rem;
    max-width: 10.25rem;
  }

  #ageshift-hero-b .ashb-chip {
    padding: 0.6rem 0.7rem;
  }

  #ageshift-hero-b .ashb-chip-name {
    font-size: 0.78125rem;
  }

  #ageshift-hero-b .ashb-chip-value {
    font-size: 0.71875rem;
  }

  #ageshift-hero-b .ashb-handoff {
    display: none;
  }

  #ageshift-hero-b .ashb-flow {
    display: block;
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: calc(-1 * var(--ashb-gap));
    pointer-events: none;
    overflow: visible;
  }

  #ageshift-hero-b .ashb-flow-svg {
    width: 100%;
    height: 100%;
    overflow: visible;
  }

  /* Dots march from each logged input toward the phone while it is active. */
  #ageshift-hero-b .ashb-flow-path {
    fill: none;
    stroke-width: 1.4;
    stroke-linecap: round;
    stroke-dasharray: 2.5 6;
    opacity: 0.9;
    transition: opacity 0.4s ease;
    animation: ashb-march 1.05s linear infinite;
  }

  #ageshift-hero-b .ashb-flow-path.is-off {
    opacity: 0;
    animation: none;
  }

  @keyframes ashb-march {
    to {
      stroke-dashoffset: -8.5;
    }
  }

  #ageshift-hero-b .ashb-flow-head {
    fill: var(--ashb-teal);
    opacity: 1;
    transition: opacity 0.4s ease;
  }

  #ageshift-hero-b .ashb-flow-head.is-off {
    opacity: 0;
  }

  #ageshift-hero-b .ashb-insight {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    column-gap: 1rem;
    padding: 1rem 1.25rem;
  }

  #ageshift-hero-b .ashb-insight-badge {
    grid-row: 1 / 3;
    margin-bottom: 0;
  }

  #ageshift-hero-b .ashb-insight-title {
    margin-bottom: 0.3rem;
    font-size: 0.9375rem;
  }

  #ageshift-hero-b .ashb-insight-body {
    padding-bottom: 0;
    border-bottom: 0;
    font-size: 0.8125rem;
  }

  #ageshift-hero-b .ashb-insight-foot {
    grid-column: 2;
    margin-top: 0.7rem;
    padding-top: 0.7rem;
    border-top: 1px solid #f1f3f6;
  }
}

/* Wide desktop: the insight card gets its own column beside the phone, so the
   composition reads left to right as copy → inputs → phone → payoff. */
@media (min-width: 1400px) {
  #ageshift-hero-b {
    --ashb-gap: 2.25rem;
  }

  /*
   * Four columns totalling 67rem plus three 2.25rem gaps, which fits the 78rem
   * wrap once its 2rem side padding is taken off. The copy column keeps enough
   * room for "You perform." on one line, and the insight column is wide enough
   * that "Smarter. Safer. Stronger." does not wrap.
   */
  #ageshift-hero-b .ashb-wrap {
    grid-template-columns:
      minmax(23rem, 1fr)
      minmax(10.75rem, 11rem)
      minmax(15rem, 16.5rem)
      minmax(14.25rem, 15rem);
    grid-template-areas: "copy inputs phone insight";
  }

  #ageshift-hero-b .ashb-title {
    font-size: clamp(2.75rem, 3.55vw, 3.4rem);
  }

  #ageshift-hero-b .ashb-insight {
    grid-template-columns: minmax(0, 1fr);
    padding: 1.15rem 1.25rem 1.25rem;
  }

  #ageshift-hero-b .ashb-insight-badge {
    grid-row: auto;
    margin-bottom: 0.85rem;
  }

  #ageshift-hero-b .ashb-insight-title {
    margin-bottom: 0.55rem;
  }

  #ageshift-hero-b .ashb-insight-body {
    padding-bottom: 0.9rem;
    border-bottom: 1px solid #f1f3f6;
  }

  #ageshift-hero-b .ashb-insight-foot {
    grid-column: auto;
    margin-top: 0.9rem;
    padding-top: 0;
    border-top: 0;
  }

  /* The column is sized to fit this line; keep it honest if the font falls
     back to something wider than DM Sans. */
  #ageshift-hero-b .ashb-insight-foot span {
    white-space: nowrap;
  }
}

/* --------------------------------------------------- reduced motion --- */

/*
 * With reduced motion the embed parks the sequence on the adapted state, so
 * the message still lands without anything moving.
 */
@media (prefers-reduced-motion: reduce) {
  #ageshift-hero-b .ashb-chip,
  #ageshift-hero-b .ashb-row,
  #ageshift-hero-b .ashb-list,
  #ageshift-hero-b .ashb-banner,
  #ageshift-hero-b .ashb-insight,
  #ageshift-hero-b .ashb-cta {
    transition: none !important;
  }

  #ageshift-hero-b .ashb-live::after,
  #ageshift-hero-b .ashb-handoff svg,
  #ageshift-hero-b .ashb-flow-path,
  #ageshift-hero-b .ashb-banner-progress span {
    animation: none !important;
  }
}
