/* Mobile experience overrides: keep the current design as the mobile-first version. */

html[data-experience="mobile"],
body[data-experience="mobile"] {
  overflow-x: hidden;
}

[data-experience="mobile"] main section[id] {
  scroll-margin-top: 104px;
}

[data-experience="mobile"] #plans .mt-10.grid {
  counter-reset: plan-option;
}

[data-experience="mobile"] #plans .plan-card {
  counter-increment: plan-option;
  min-width: 0;
}

[data-experience="mobile"] #plans .plan-card .plan-head::before {
  content: counter(plan-option) ".";
  display: inline-block;
  margin-bottom: 4px;
  padding: 0;
  font-size: clamp(2.15rem, 10.4vw, 3rem);
  line-height: 0.95;
  font-weight: 820;
  letter-spacing: -0.02em;
  color: rgba(239, 192, 123, 0.96);
  text-shadow: 0 6px 18px rgba(2, 6, 23, 0.22);
}

[data-experience="mobile"] #plans .plan-head {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

[data-experience="mobile"] #plans .plan-head h3 {
  order: 1;
  margin-top: 1px;
  font-family: "Source Sans 3", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  font-size: clamp(1.75rem, 7.9vw, 2.2rem);
  font-weight: 810;
  letter-spacing: -0.015em;
  line-height: 1.07;
  overflow-wrap: anywhere;
}

[data-experience="mobile"] #plans .plan-kicker {
  order: 2;
  margin-top: 4px;
  font-size: 0.79rem;
  font-weight: 680;
  letter-spacing: 0.03em;
  text-transform: none;
  opacity: 0.95;
  overflow-wrap: anywhere;
}

[data-experience="mobile"] #plans .plan-subhead {
  margin-top: 10px;
  font-size: 1.05rem;
  font-weight: 620;
  letter-spacing: 0;
  text-transform: none;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.96);
  overflow-wrap: anywhere;
}

[data-experience="mobile"] #plans .check-list li {
  color: rgba(255, 255, 255, 0.96);
  font-size: 1.05rem;
  line-height: 1.55;
}

[data-experience="mobile"] #plans .check-list li strong {
  color: #fff;
}

[data-experience="mobile"] #plans .plan-note,
[data-experience="mobile"] #plans .plan-callout p,
[data-experience="mobile"] #plans .plan-callout h4 {
  color: rgba(255, 255, 255, 0.9);
  overflow-wrap: anywhere;
}

[data-experience="mobile"] [data-mobile-hero-gallery] {
  touch-action: pan-y;
}

[data-experience="mobile"] .hero-mobile-swipe-hint {
  position: absolute;
  top: 12px;
  right: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.58);
  color: rgba(255, 255, 255, 0.96);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
  z-index: 3;
}

[data-experience="mobile"] .hero-mobile-swipe-hint::before {
  content: "";
  width: 11px;
  height: 7px;
  background: center / contain no-repeat
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8' fill='none'%3E%3Cpath d='M1 4h10M7.8 1L11 4 7.8 7' stroke='white' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

[data-experience="mobile"] .hero-mobile-dots {
  position: absolute;
  left: 50%;
  bottom: 68px;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  z-index: 3;
}

[data-experience="mobile"] .hero-mobile-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.6);
  background: rgba(255, 255, 255, 0.28);
  box-shadow: 0 3px 8px rgba(2, 6, 23, 0.22);
  padding: 0;
}

[data-experience="mobile"] .hero-mobile-dot.is-active {
  background: rgba(255, 255, 255, 0.94);
  border-color: rgba(255, 255, 255, 0.96);
}

[data-experience="mobile"] #products .card-article details.product-detail,
[data-experience="mobile"] #products .card-article details.product-detail[open] {
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  border-radius: 0 !important;
}

[data-experience="mobile"] #products .card-article details.product-detail > summary {
  border: 0;
  border-radius: 10px;
  background: #101828;
  color: rgba(255, 255, 255, 0.96);
  width: 100%;
}

[data-experience="mobile"] #products .card-article details.product-detail > summary:hover {
  background: #0f3460;
  color: #fff;
}

[data-experience="mobile"] #products .card-article details.product-detail > summary::after {
  border-color: rgba(255, 255, 255, 0.24);
  background-color: rgba(255, 255, 255, 0.12);
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10' fill='none'%3E%3Cpath d='M2.5 4l2.5 2.5L7.5 4' stroke='%23ffffff' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

[data-experience="mobile"] #products .card-article .product-detail-body {
  padding-inline: 0;
  color: rgba(15, 23, 42, 0.86);
}

[data-experience="mobile"] #products .card-article details.product-detail[open] .product-detail-body {
  padding-top: 9px;
  padding-bottom: 0;
  border-top-color: rgba(15, 23, 42, 0.08);
}

[data-experience="mobile"] #products .card-article .product-detail-body-inner {
  border-radius: 10px;
  background: linear-gradient(180deg, #ffffff, #f7f8fb);
  border: 1px solid rgba(15, 23, 42, 0.1);
}

[data-experience="mobile"] [data-hero-controls="mobile-rail"] .hero-stack-swipe-hint {
  display: none !important;
}

[data-experience="mobile"] .hero-stack-mobile-selector {
  margin-top: 12px;
  display: grid;
  gap: 8px;
}

[data-experience="mobile"] .hero-stack-mobile-selector-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(15, 23, 42, 0.62);
  padding-left: 2px;
}

[data-experience="mobile"] .hero-stack-mobile-rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(204px, 78%);
  gap: 10px;
  overflow-x: auto;
  padding: 2px 2px 6px;
  margin: 0 -2px;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
}

[data-experience="mobile"] .hero-stack-mobile-rail::-webkit-scrollbar {
  display: none;
}

[data-experience="mobile"] .hero-stack-mobile-thumb {
  scroll-snap-align: center;
  border: 1px solid rgba(15, 23, 42, 0.10);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(245, 245, 244, 0.9));
  border-radius: 16px;
  padding: 8px;
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  text-align: left;
  color: inherit;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
  transition: transform 140ms ease, box-shadow 140ms ease, border-color 140ms ease, background-color 140ms ease;
}

[data-experience="mobile"] .hero-stack-mobile-thumb:focus-visible {
  outline: 2px solid rgba(15, 52, 96, 0.24);
  outline-offset: 2px;
}

[data-experience="mobile"] .hero-stack-mobile-thumb:active {
  transform: translateY(1px);
}

[data-experience="mobile"] .hero-stack-mobile-thumb.is-active {
  border-color: rgba(15, 52, 96, 0.20);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(237, 243, 250, 0.94));
  box-shadow: 0 10px 22px rgba(15, 52, 96, 0.10);
}

[data-experience="mobile"] .hero-stack-mobile-thumb-media {
  display: block;
  width: 76px;
  height: 64px;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.06);
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.24);
}

[data-experience="mobile"] .hero-stack-mobile-thumb-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

[data-experience="mobile"] .hero-stack-mobile-thumb-text {
  min-width: 0;
  display: grid;
  gap: 3px;
}

[data-experience="mobile"] .hero-stack-mobile-thumb-kicker {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: rgba(15, 52, 96, 0.88);
}

[data-experience="mobile"] .hero-stack-mobile-thumb-title {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  font-size: 12px;
  line-height: 1.25;
  color: rgba(15, 23, 42, 0.78);
}

[data-experience="mobile"] [data-hero-controls="mobile-rail"] .hero-stack-controls {
  margin-top: 10px;
}

[data-experience="mobile"] [data-hero-controls="mobile-rail"] .hero-stack-dots {
  display: none;
}

[data-experience="mobile"] [data-hero-controls="mobile-rail"] .hero-stack-nav {
  margin-left: auto;
}

[data-experience="mobile"] [data-hero-controls="mobile-rail"] .hero-stack-stage {
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.12);
  border-radius: 18px;
}

[data-experience="mobile"] [data-hero-controls="mobile-rail"] .hero-stack-caption {
  backdrop-filter: blur(8px);
}

@media (max-width: 767px) {
  [data-experience="mobile"] {
    --mobile-text-min: 1rem;
  }

  /* Larger mobile type for readability (older audience / lower visual strain). */
  [data-experience="mobile"] [class~="text-xs"] {
    font-size: var(--mobile-text-min) !important;
    line-height: 1.5 !important;
  }

  [data-experience="mobile"] [class~="text-sm"] {
    font-size: max(var(--mobile-text-min), 1.0625rem) !important;
    line-height: 1.5 !important;
  }

  [data-experience="mobile"] [class~="text-base"] {
    font-size: 1.125rem !important;
    line-height: 1.58 !important;
  }

  [data-experience="mobile"] [class~="text-lg"] {
    font-size: 1.25rem !important;
    line-height: 1.5 !important;
  }

  /* Hard minimum for small utility/copy text on mobile. */
  [data-experience="mobile"] :where(
    p,
    li,
    label,
    summary,
    small,
    .form-label,
    .plan-kicker,
    .section-kicker,
    .trust-badge,
    .agent-contact,
    .agent-licensed-label,
    .license-pill,
    .mobile-nav-item,
    .plan-note,
    .plan-callout p,
    .plan-callout h4,
    .email-reveal-question,
    .email-reveal-message
  ) {
    font-size: max(var(--mobile-text-min), 1em);
  }

  [data-experience="mobile"] .trust-badge {
    font-size: 13.5px;
    padding: 9px 16px;
  }

  [data-experience="mobile"] .section-kicker,
  [data-experience="mobile"] .plan-kicker {
    font-size: 12.5px;
  }

  [data-experience="mobile"] .agent-name {
    font-size: 15px;
    line-height: 1.15;
  }

  [data-experience="mobile"] .agent-contact {
    font-size: 13.5px;
    line-height: 1.45;
  }

  [data-experience="mobile"] .agent-licensed-label,
  [data-experience="mobile"] .license-pill {
    font-size: 12.5px;
  }

  [data-experience="mobile"] .mobile-nav-item {
    font-size: 15px;
    padding: 13px 14px;
  }

  [data-experience="mobile"] details.product-detail > summary {
    min-height: 48px;
    font-size: 14px;
  }

  [data-experience="mobile"] .product-detail-body {
    font-size: 14px;
    line-height: 1.7;
  }

  [data-experience="mobile"] details.faq-item > summary {
    font-size: 15px;
    line-height: 1.4;
    padding: 16px 18px;
  }

  [data-experience="mobile"] .faq-body {
    font-size: 15.5px;
    line-height: 1.72;
  }

  [data-experience="mobile"] .plan-subhead {
    font-size: 15px;
    line-height: 1.55;
  }

  [data-experience="mobile"] .quote-panel .form-label {
    font-size: 12.5px;
    letter-spacing: 0.12em;
  }

  [data-experience="mobile"] .plan-select-selected-pill {
    gap: 10px;
    padding: 8px 8px 8px 12px;
  }

  [data-experience="mobile"] .plan-select-selected-pill-remove {
    font-size: 0.88rem;
    padding: 5px 9px;
    min-height: 32px;
  }

  [data-experience="mobile"] .form-input,
  [data-experience="mobile"] .form-select,
  [data-experience="mobile"] .form-textarea {
    font-size: 16px;
    line-height: 1.35;
  }

  [data-experience="mobile"] .hero-stack-btn {
    min-width: 44px;
    min-height: 44px;
  }

  [data-experience="mobile"] .hero-stack-dot {
    min-width: 12px;
    min-height: 12px;
  }

  [data-experience="mobile"] .hero-stack-mobile-rail {
    grid-auto-columns: minmax(196px, 84%);
    gap: 9px;
  }

  [data-experience="mobile"] .hero-stack-mobile-thumb {
    grid-template-columns: 70px minmax(0, 1fr);
    gap: 9px;
    border-radius: 15px;
  }

  [data-experience="mobile"] .hero-stack-mobile-thumb-media {
    width: 70px;
    height: 60px;
  }

  [data-experience="mobile"] .plan-card {
    cursor: pointer;
    transition: transform 120ms ease, box-shadow 120ms ease;
  }

  [data-experience="mobile"] .plan-card:active {
    transform: translateY(1px) scale(0.998);
  }

  [data-experience="mobile"] #quote .quote-panel {
    padding-bottom: calc(1.5rem + env(safe-area-inset-bottom));
  }

  [data-experience="mobile"] footer .leading-snug {
    line-height: 1.45;
  }

}

[data-experience="mobile"] main .max-w-7xl,
[data-experience="mobile"] main [class*="col-span"],
[data-experience="mobile"] .quote-panel,
[data-experience="mobile"] .card-article,
[data-experience="mobile"] .plan-card {
  min-width: 0;
}

@media (min-width: 1024px) {
  /* Keep the mobile version behaving like a mobile layout even on wide screens. */
  [data-experience="mobile"] .max-w-7xl {
    max-width: 460px !important;
  }

  [data-experience="mobile"] main .lg\:grid-cols-12 {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  [data-experience="mobile"] main [class*="lg:col-span-"] {
    grid-column: auto !important;
  }

  [data-experience="mobile"] main [class*="lg:order-"] {
    order: initial !important;
  }

  [data-experience="mobile"] [data-site-header] nav.hidden {
    display: none !important;
  }

  [data-experience="mobile"] [data-mobile-nav-button] {
    display: inline-flex !important;
  }

  [data-experience="mobile"] [data-mobile-nav-overlay],
  [data-experience="mobile"] [data-mobile-nav-panel] {
    display: block !important;
  }

  [data-experience="mobile"] [data-site-header] {
    width: min(520px, calc(100% - 20px));
    margin-inline: auto;
    border-left: 1px solid rgba(15, 23, 42, 0.08);
    border-right: 1px solid rgba(15, 23, 42, 0.08);
  }

  [data-experience="mobile"] body {
    background:
      radial-gradient(circle at 10% 10%, rgba(239, 192, 123, 0.18), transparent 40%),
      radial-gradient(circle at 85% 20%, rgba(15, 52, 96, 0.12), transparent 44%),
      #efece7;
  }

  [data-experience="mobile"] main > section,
  [data-experience="mobile"] footer {
    margin-inline: auto;
    max-width: 520px;
    border-left: 1px solid rgba(15, 23, 42, 0.08);
    border-right: 1px solid rgba(15, 23, 42, 0.08);
    background-clip: padding-box;
  }

}
