/* ==========================================================================
   REI-NWA MEMBERSHIP PAGE STYLES
   Inspired by Kombai Modern Tiered SaaS Pricing Layout
   Styled with Hero Section Card Palettes & REI-NWA Editorial Typography
   ========================================================================== */

:root {
  --mem-ink: #090714;
  --mem-muted: #524B6B;
  --mem-muted-2: #6E678A;
  --mem-line: #DCD6EC;
  --mem-bg: #F6F4FB;
  --mem-surface: #FFFFFF;
  --mem-surface-2: #EDE9F7;
  --mem-primary: #511EBF;        /* Main Royal Violet */
  --mem-primary-2: #3F1599;
  --mem-primary-ink: #511EBF;
  --mem-accent: #FF801A;         /* Impact Vivid Tangerine */
  --mem-contrast: #A8E31E;       /* Contrast Electric Lime */
  --mem-radius: 18px;
  --mem-maxw: 1260px;

  /* The 4 Hero Section Card Colors */
  --card-blue-bg:       #511EBF;  /* Main Royal Violet */
  --card-blue-text:     #F6F4FB;
  --card-blue-dot:      #A8E31E;
  --card-blue-plus:     #A8E31E;

  --card-pink-bg:       #A8E31E;  /* Contrast Electric Lime */
  --card-pink-text:     #090714;  /* Obsidian ink for WCAG AAA contrast */
  --card-pink-dot:      #090714;
  --card-pink-plus:     #090714;

  --card-wine-bg:       #FF801A;  /* Impact Vivid Tangerine */
  --card-wine-text:     #090714;  /* Obsidian ink for WCAG AAA contrast */
  --card-wine-dot:      #090714;
  --card-wine-plus:     #090714;

  --card-purple-bg:     #090714;  /* Obsidian Black */
  --card-purple-text:   #F6F4FB;
  --card-purple-dot:    #A8E31E;
  --card-purple-plus:   #FF801A;
}

h1, h2, h3, h4, h5, h6 {
  text-wrap: balance;
}

h2.plan-name,
h3.plan-name {
  margin: 0;
}

/* Base Wrapper for Membership Page Sections */
.mem-wrap {
  max-width: var(--mem-maxw);
  margin: 0 auto;
}

/* ==========================================================================
   1. HERO & 4-TIER PLAN CARDS
   ========================================================================== */
.membership-hero {
  padding: clamp(2.5rem, 5vw, 4rem) clamp(1.25rem, 3.5vw, 2.5rem) clamp(1.5rem, 3vw, 2.5rem);
  scroll-margin-top: 120px;
}

.mem-cmp,
.mem-calc,
.mem-faq {
  scroll-margin-top: 120px;
}

.membership-hero-title {
  font-family: var(--font-serif);
  font-size: clamp(2.4rem, 4.8vw, 3.8rem);
  line-height: 1.08;
  letter-spacing: -0.028em;
  font-weight: 400;
  color: #090714;
  margin: 0 0 clamp(1.85rem, 3.5vw, 2.75rem);
  max-width: 980px;
}

.membership-hero-title .dim {
  color: var(--mem-muted-2);
}

.membership-hero-lead {
  font-size: 1.05rem;
  color: #26203B;
  max-width: 72ch;
  line-height: 1.6;
  margin-bottom: 2rem;
}

/* Universal Perks Bar right above cards */
.plans-perks-strip {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 2.25rem;
  padding: 14px 20px;
  background: var(--mem-surface);
  border: 1px solid var(--mem-line);
  border-radius: 12px;
}

.perk-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  font-weight: 600;
  color: #090714;
  padding: 4px 10px;
}

.perk-pill .perk-icon {
  width: 15px;
  height: 15px;
  color: var(--mem-primary);
  flex-shrink: 0;
}

/* ==========================================================================
   CAROUSEL & CARDS CONTAINER
   ========================================================================== */
.plans-carousel-wrap {
  position: relative;
  width: 100%;
}

/* 4-Column Grid: Investor, Business, Combo, Corporate on Desktop */
.plans-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  align-items: stretch;
}

/* Tablet & Mobile Side-Scrolled Carousel */
@media (max-width: 1024px) {
  :root {
    --card-slide-w: 360px;
  }

  .membership-hero {
    overflow-x: clip;
  }

  .plans-carousel-wrap {
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    padding-top: 8px;
    padding-bottom: 6px;
    overflow-x: clip;
    /* Edge Fade Mask: smoothly fades cards to transparent as they hit the screen edge */
    -webkit-mask-image: linear-gradient(
      to right,
      transparent 0%,
      rgba(0, 0, 0, 0.4) 2%,
      rgba(0, 0, 0, 1) 7%,
      rgba(0, 0, 0, 1) 93%,
      rgba(0, 0, 0, 0.4) 98%,
      transparent 100%
    );
    mask-image: linear-gradient(
      to right,
      transparent 0%,
      rgba(0, 0, 0, 0.4) 2%,
      rgba(0, 0, 0, 1) 7%,
      rgba(0, 0, 0, 1) 93%,
      rgba(0, 0, 0, 0.4) 98%,
      transparent 100%
    );
  }

  .plans-grid-4 {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    gap: 16px;
    padding-top: 10px;
    padding-bottom: 18px;
    /* Centers the current locked card in the middle of the viewport */
    padding-left: calc(50vw - (var(--card-slide-w) / 2));
    padding-right: calc(50vw - (var(--card-slide-w) / 2));
    scroll-padding: 0 calc(50vw - (var(--card-slide-w) / 2));
  }

  .plans-grid-4::-webkit-scrollbar {
    display: none;
  }

  .plan-card {
    flex: 0 0 var(--card-slide-w);
    width: var(--card-slide-w);
    min-width: var(--card-slide-w);
    max-width: var(--card-slide-w);
    min-height: 520px;
    scroll-snap-align: center;
    scroll-snap-stop: always;
    cursor: pointer;
    /* Dim and slightly scale down non-centered cards */
    opacity: 0.55;
    transform: scale(0.95);
    transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
                box-shadow 0.3s ease;
  }

  /* The Current Locked Card in the Middle */
  .plan-card.is-active-card {
    opacity: 1;
    transform: scale(1);
    box-shadow: 0 16px 36px -8px rgba(0, 0, 0, 0.28);
    cursor: default;
  }
}

/* Mobile specific card sizing (< 640px) */
@media (max-width: 640px) {
  :root {
    --card-slide-w: clamp(255px, 68vw, 275px);
  }

  .plans-carousel-wrap {
    /* Edge fade mask on mobile: clean 4% outer fade keeping peeking card clearly visible */
    -webkit-mask-image: linear-gradient(
      to right,
      transparent 0%,
      rgba(0, 0, 0, 0.3) 1.5%,
      rgba(0, 0, 0, 1) 4%,
      rgba(0, 0, 0, 1) 96%,
      rgba(0, 0, 0, 0.3) 98.5%,
      transparent 100%
    );
    mask-image: linear-gradient(
      to right,
      transparent 0%,
      rgba(0, 0, 0, 0.3) 1.5%,
      rgba(0, 0, 0, 1) 4%,
      rgba(0, 0, 0, 1) 96%,
      rgba(0, 0, 0, 0.3) 98.5%,
      transparent 100%
    );
  }

  .plans-grid-4 {
    gap: 12px;
    padding-bottom: 12px;
  }

  .plan-card {
    padding: 22px 16px 20px;
    min-height: 490px;
  }

  .plan-card .plan-name {
    font-size: 1.35rem;
  }

  .plan-card .plan-price-row .amt {
    font-size: 2.1rem;
  }

  .plan-card .plan-feat {
    font-size: 0.81rem;
    padding: 10px 0;
  }

  .plan-card .plan-feat .plus {
    font-size: 0.76rem;
  }

  .plan-card .plan-blurb {
    font-size: 0.82rem;
    line-height: 1.45;
  }

  .plan-card .btn-card-light,
  .plan-card .btn-card-dark {
    font-size: 0.88rem;
    padding: 10px 18px;
  }
}

/* Base Plan Card (Kombai Layout Style) */
.plan-card {
  border-radius: var(--mem-radius);
  padding: 26px 24px 24px;
  min-height: 540px;
  display: flex;
  flex-direction: column;
  position: relative;
  box-shadow: 0 8px 24px -6px rgba(0, 0, 0, 0.12);
  transition: transform 0.25s ease, box-shadow 0.25s ease, opacity 0.25s ease;
}

@media (min-width: 1025px) {
  .plan-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 36px -10px rgba(0, 0, 0, 0.22);
  }
}

/* Carousel Pagination Dots (Tablet & Mobile only) */
.plans-carousel-dots {
  display: none;
}

@media (max-width: 1024px) {
  .plans-carousel-dots {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 14px;
    padding: 6px 0;
  }

  .carousel-dot {
    width: 36px;
    height: 36px;
    padding: 0;
    border: none;
    background: transparent;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    touch-action: manipulation;
  }

  .carousel-dot::before {
    content: '';
    display: block;
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: rgba(9, 7, 20, 0.22);
    transition: width 0.25s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  }

  .carousel-dot.is-active::before {
    width: 26px;
    border-radius: 999px;
  }

  .carousel-dot[data-index="0"].is-active::before {
    background: var(--card-blue-bg);
  }

  .carousel-dot[data-index="1"].is-active::before {
    background: #A8E31E;
    box-shadow: 0 0 0 1px rgba(9, 7, 20, 0.3);
  }

  .carousel-dot[data-index="2"].is-active::before {
    background: var(--card-wine-bg);
  }

  .carousel-dot[data-index="3"].is-active::before {
    background: var(--card-purple-bg);
  }
}

/* Card 1: Royal Violet (#511EBF) — Investor */
.plan-card.tier-blue {
  background: var(--card-blue-bg);
  color: var(--card-blue-text);
}

/* Card 2: Electric Lime (#A8E31E) — Business */
.plan-card.tier-pink {
  background: var(--card-pink-bg);
  color: var(--card-pink-text);
}

/* Card 3: Vivid Tangerine (#FF801A) — Combo */
.plan-card.tier-wine {
  background: var(--card-wine-bg);
  color: var(--card-wine-text);
}

/* Card 4: Obsidian Black (#090714) — Corporate */
.plan-card.tier-purple {
  background: var(--card-purple-bg);
  background-image: radial-gradient(ellipse at 85% 0%, rgba(81, 30, 191, 0.36) 0%, transparent 62%);
  color: var(--card-purple-text);
}

/* Card Badge */
.plan-card .card-badge {
  display: flex;
  align-items: center;
  height: 26px;
  margin-bottom: 28px;
}

.card-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: inline-block;
}

.card-dot.dot-blue {
  background: var(--card-blue-dot);
}

.card-dot.dot-pink {
  background: var(--card-pink-dot);
  border-radius: 3px;
}

.card-dot.dot-wine {
  background: var(--card-wine-dot);
}

.card-sparkle.sparkle-purple {
  width: 22px;
  height: 22px;
  color: var(--card-purple-dot);
}

/* Card Typography & Content */
.plan-name {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 600;
  letter-spacing: -0.015em;
}

.tier-blue .plan-name,
.tier-purple .plan-name {
  color: #F6F4FB;
}

.tier-pink .plan-name,
.tier-wine .plan-name {
  color: #090714;
}

.plan-sub {
  font-size: 0.9rem;
  margin-top: 3px;
}

.tier-blue .plan-sub,
.tier-purple .plan-sub {
  color: rgba(246, 244, 251, 0.78);
}

.tier-pink .plan-sub,
.tier-wine .plan-sub {
  color: rgba(9, 7, 20, 0.78);
}

.plan-price-row {
  margin: 22px 0 18px;
  font-weight: 600;
  letter-spacing: -0.02em;
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.plan-price-row .amt {
  font-family: var(--font-display);
  font-size: 2.4rem;
  line-height: 1;
}

.tier-blue .plan-price-row .amt,
.tier-purple .plan-price-row .amt {
  color: #F6F4FB;
}

.tier-pink .plan-price-row .amt,
.tier-wine .plan-price-row .amt {
  color: #090714;
}

.plan-price-row .per {
  font-size: 0.95rem;
  font-weight: 400;
}

.tier-blue .plan-price-row .per,
.tier-purple .plan-price-row .per {
  color: rgba(246, 244, 251, 0.76);
}

.tier-pink .plan-price-row .per,
.tier-wine .plan-price-row .per {
  color: rgba(9, 7, 20, 0.76);
}

.plan-feat {
  padding: 12px 0;
  font-size: 0.88rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.tier-blue .plan-feat,
.tier-purple .plan-feat {
  border-top: 1px solid rgba(246, 244, 251, 0.16);
}

.tier-pink .plan-feat,
.tier-wine .plan-feat {
  border-top: 1px solid rgba(9, 7, 20, 0.16);
  color: #090714;
}

.plan-feat .plus {
  font-size: 0.82rem;
  font-weight: 600;
  white-space: nowrap;
}

.tier-blue .plan-feat .plus {
  color: var(--card-blue-plus);
}

.tier-pink .plan-feat .plus {
  color: var(--card-pink-plus);
  font-weight: 700;
}

.tier-wine .plan-feat .plus {
  color: var(--card-wine-plus);
  font-weight: 700;
}

.tier-purple .plan-feat .plus {
  color: var(--card-purple-plus);
}

.plan-blurb {
  font-size: 0.88rem;
  padding: 14px 0 0;
  line-height: 1.5;
}

.tier-blue .plan-blurb,
.tier-purple .plan-blurb {
  color: rgba(246, 244, 251, 0.88);
}

.tier-pink .plan-blurb,
.tier-wine .plan-blurb {
  color: rgba(9, 7, 20, 0.88);
}

.card-cta-wrap {
  margin-top: auto;
  padding-top: 22px;
}

.btn-card-light {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.92rem;
  font-weight: 600;
  border-radius: 999px;
  padding: 11px 22px;
  background: #F6F4FB;
  color: var(--mem-ink);
  text-decoration: none;
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  width: 100%;
}

.btn-card-light:hover {
  background: #A8E31E;
  color: #090714;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(9, 7, 20, 0.22);
}

/* Vivid Tangerine & Electric Lime cards use solid Obsidian pill CTAs for AAA contrast */
.tier-wine .btn-card-light,
.btn-card-dark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.92rem;
  font-weight: 600;
  border-radius: 999px;
  padding: 11px 22px;
  background: #090714;
  color: #F6F4FB;
  text-decoration: none;
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  width: 100%;
}

.tier-wine .btn-card-light:hover,
.btn-card-dark:hover {
  background: #511EBF;
  color: #F6F4FB;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(9, 7, 20, 0.28);
}

/* ==========================================================================
   2. LOGOS / SOCIAL PROOF STRIP
   ========================================================================== */
.mem-logos {
  padding: 44px clamp(1.25rem, 3.5vw, 2.5rem) 24px;
  border-top: 1px solid var(--mem-line);
}

.mem-logos .eyebrow {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: var(--mem-muted);
  font-weight: 600;
  margin-bottom: 28px;
}

.mem-logo-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px clamp(1.25rem, 2.5vw, 2.75rem);
  flex-wrap: wrap;
}

.mem-logo-item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 42px;
  opacity: 0.75;
  filter: grayscale(10%) contrast(95%);
  transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1), filter 0.25s cubic-bezier(0.16, 1, 0.3, 1), transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.mem-logo-item:hover {
  opacity: 1;
  filter: grayscale(0%) contrast(100%);
  transform: translateY(-2px);
}

.mem-partner-logo {
  max-height: 36px;
  max-width: 140px;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}

/* Visual optical weighting per brand */
.logo-arvest {
  max-height: 28px;
}

.logo-signature {
  max-height: 38px;
}

.logo-waco {
  max-height: 26px;
}

.logo-mcgraw {
  max-height: 32px;
}

.logo-fnb {
  max-height: 28px;
}

.logo-stage {
  max-height: 36px;
}

.logo-crane {
  max-height: 32px;
}

@media (max-width: 820px) {
  .mem-logos {
    padding: 32px clamp(1rem, 3vw, 1.5rem) 16px;
  }

  .mem-logo-row {
    justify-content: center;
    gap: 20px 28px;
  }

  .mem-logo-item {
    height: 34px;
  }

  .mem-partner-logo {
    max-height: 28px;
    max-width: 115px;
  }

  .logo-arvest {
    max-height: 22px;
  }

  .logo-signature {
    max-height: 30px;
  }

  .logo-waco {
    max-height: 20px;
  }

  .logo-mcgraw {
    max-height: 24px;
  }

  .logo-fnb {
    max-height: 22px;
  }

  .logo-stage {
    max-height: 26px;
  }

  .logo-crane {
    max-height: 24px;
  }
}

/* ==========================================================================
   3. STICKY COMPACT 4-TIER HEADER (Compare Section)
   ========================================================================== */
.sticky-tier-bar {
  position: -webkit-sticky;
  position: sticky;
  top: 72px; /* Pins directly beneath 72px .site-header on desktop and tablet */
  z-index: 35;
  margin-bottom: 24px;
}

.sticky-tier-track {
  width: 100%;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.sticky-tier-track::-webkit-scrollbar {
  display: none;
}

.sticky-tier-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
  min-width: 780px;
}

.sticky-tier-table td {
  padding: 14px 12px;
  vertical-align: middle;
  background: rgba(246, 244, 251, 0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--mem-line);
  border-bottom: 1px solid var(--mem-line);
}

.sticky-tier-table td.rowh {
  position: -webkit-sticky;
  position: sticky;
  left: 0;
  z-index: 4;
  vertical-align: middle;
  background: #F6F4FB;
  border-right: 1px solid var(--mem-line);
  box-shadow: 4px 0 12px -2px rgba(9, 7, 20, 0.06);
}

.cmp-sticky-head {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding-right: 12px;
}

.cmp-sticky-head .cmp-main-title,
.sticky-tier-table .cmp-main-title {
  font-family: var(--font-serif);
  font-size: clamp(1.02rem, 1.15vw, 1.25rem);
  font-weight: 600;
  letter-spacing: -0.015em;
  color: #090714;
  margin: 0;
  line-height: 1.22;
}

.cmp-sticky-head .cmp-main-sub,
.sticky-tier-table .cmp-main-sub {
  font-family: var(--font-sans);
  font-size: 0.84rem;
  line-height: 1.45;
  color: var(--mem-muted);
  margin: 0;
}

.mini-tag {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-mono, monospace);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--mem-primary);
  background: rgba(81, 30, 191, 0.09);
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(81, 30, 191, 0.22);
}

.mini-col {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-start;
}

.mini-col .mini-lbl {
  font-size: 0.88rem;
  color: #090714;
  white-space: nowrap;
}

.mini-col .mini-lbl b {
  font-weight: 700;
}

.mini-col .mini-lbl .g {
  color: var(--mem-muted);
  font-size: 0.82rem;
  margin-left: 2px;
}

.mini-ico {
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 7px;
  vertical-align: baseline;
}

.mini-ico.m-blue {
  border-radius: 50%;
  background: var(--card-blue-bg);
}

.mini-ico.m-pink {
  border-radius: 2px;
  background: var(--card-pink-bg);
  border: 1px solid #090714;
}

.mini-ico.m-wine {
  border-radius: 50%;
  background: var(--card-wine-bg);
  border: 1px solid #090714;
}

.mini-ico.m-purple {
  border-radius: 2px;
  background: var(--card-purple-bg);
}

.btn-mini {
  font-size: 0.8rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 999px;
  text-decoration: none;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}

.btn-mini:hover {
  opacity: 0.92;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px -2px rgba(9, 7, 20, 0.18);
}

.b-blue {
  background: var(--card-blue-bg);
  color: #F6F4FB;
}

.b-pink {
  background: #A8E31E;
  color: #090714;
}

.b-wine {
  background: var(--card-wine-bg);
  color: #090714;
}

.b-purple {
  background: var(--card-purple-bg);
  color: #F6F4FB;
}

@media (max-width: 640px) {
  .sticky-tier-bar {
    top: 60px; /* Mobile .site-header height */
    margin-bottom: 16px;
  }
  .sticky-tier-table td {
    padding: 10px 12px;
  }
  .cmp-sticky-head {
    padding-right: 6px;
    gap: 2px;
  }
  .cmp-sticky-head .cmp-main-title,
  .sticky-tier-table .cmp-main-title {
    font-size: 0.95rem;
    line-height: 1.25;
  }
  .cmp-sticky-head .cmp-main-sub,
  .sticky-tier-table .cmp-main-sub {
    font-size: 0.8rem;
    line-height: 1.4;
  }
  .mini-col .mini-lbl {
    font-size: 0.8rem;
  }
  .btn-mini {
    font-size: 0.74rem;
    padding: 5px 11px;
  }
}

/* ==========================================================================
   4. DETAILED 4-TIER COMPARISON TABLE
   ========================================================================== */
.mem-cmp {
  padding: 44px clamp(1.25rem, 3.5vw, 2.5rem) 16px;
}

.cmp-main-head {
  margin-bottom: 34px;
}

.cmp-main-title {
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  font-weight: 400;
  letter-spacing: -0.02em;
  color: #090714;
  margin: 0 0 6px;
  line-height: 1.2;
}

.cmp-main-sub {
  font-size: 0.95rem;
  color: var(--mem-muted);
  margin: 0;
}

.cmp-sec {
  margin-bottom: 44px;
}

.cmp-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.cmp-head .cmp-ico {
  width: 22px;
  height: 22px;
  color: var(--mem-primary);
  flex-shrink: 0;
}

.cmp-head h3 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: #090714;
  margin: 0;
}

.cmp-sub {
  font-size: 0.92rem;
  color: var(--mem-muted);
  margin: 6px 0 16px;
  max-width: 65ch;
}

.cmp-table-wrap {
  width: 100%;
  overflow-x: auto;
}

.cmp-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
  min-width: 780px;
}

.cmp-table col.rowh {
  width: 28%;
}

.cmp-table td,
.cmp-table th {
  text-align: left;
  padding: 16px 12px;
  border-top: 1px solid var(--mem-line);
  vertical-align: top;
  font-size: 0.9rem;
  color: #26203B;
  background: #FFFFFF;
}

.cmp-table td.rowh,
.cmp-table th.rowh {
  position: -webkit-sticky;
  position: sticky;
  left: 0;
  z-index: 2;
  color: #090714;
  font-weight: 500;
  background: #FFFFFF;
  border-right: 1px solid var(--mem-line);
  box-shadow: 4px 0 12px -2px rgba(9, 7, 20, 0.05);
}

.cmp-table td .sub {
  display: block;
  color: var(--mem-muted);
  font-size: 0.8rem;
  margin-top: 3px;
}

.cmp-tooltip-q {
  display: inline-flex;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  border: 1px solid var(--mem-muted-2);
  color: var(--mem-muted-2);
  font-size: 10px;
  align-items: center;
  justify-content: center;
  margin-left: 6px;
  vertical-align: middle;
  cursor: help;
}

.chk-svg {
  width: 18px;
  height: 18px;
  color: var(--mem-primary);
  vertical-align: middle;
}

.dash-span {
  color: var(--mem-muted-2);
  font-weight: 600;
}

/* ==========================================================================
   5. MEMBERSHIP ROI CALCULATOR
   ========================================================================== */
.mem-calc {
  padding: 56px clamp(1.25rem, 3.5vw, 2.5rem);
  max-width: 100%;
  box-sizing: border-box;
}

.calc-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 3fr);
  gap: clamp(20px, 3.5vw, 40px);
  align-items: start;
}

@media (max-width: 960px) {
  .calc-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }

  .mem-calc .calc-lead {
    max-width: 100%;
  }
}

.mem-calc h2 {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 3.8vw, 2.75rem);
  font-weight: 400;
  letter-spacing: -0.025em;
  color: #090714;
  margin: 0 0 12px;
  line-height: 1.1;
  text-wrap: balance;
}

.mem-calc .calc-lead {
  font-size: 0.98rem;
  color: #26203B;
  line-height: 1.55;
  max-width: 260px;
}

.calc-card {
  background: var(--mem-surface);
  border: 1px solid var(--mem-line);
  border-radius: var(--mem-radius);
  padding: clamp(16px, 2.5vw, 32px);
  box-shadow: 0 4px 16px rgba(9, 7, 20, 0.04);
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

.calc-card .top-lbl {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mem-muted);
  font-weight: 600;
  margin-bottom: 20px;
}

.sliders-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 36px;
}

@media (max-width: 640px) {
  .sliders-row {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

.slider-block .val {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: #090714;
}

.slider-block .cap {
  font-size: 0.85rem;
  color: var(--mem-muted);
  margin: 2px 0 14px;
  display: block;
  cursor: pointer;
}

input[type=range].mem-range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  border-radius: 4px;
  background: linear-gradient(var(--mem-primary), var(--mem-primary)) no-repeat, #DCD6EC;
  background-size: var(--fill, 50%) 100%;
  outline: none;
  cursor: pointer;
  box-sizing: border-box;
}

input[type=range].mem-range:focus-visible {
  outline: 2px solid var(--mem-primary);
  outline-offset: 3px;
}

input[type=range].mem-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #F6F4FB;
  border: 2px solid #511EBF;
  box-shadow: 0 2px 6px rgba(9, 7, 20, 0.18);
  cursor: pointer;
  transition: transform 0.1s ease;
}

input[type=range].mem-range::-webkit-slider-thumb:hover {
  transform: scale(1.15);
}

input[type=range].mem-range::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #F6F4FB;
  border: 2px solid #511EBF;
  box-shadow: 0 2px 6px rgba(9, 7, 20, 0.18);
  cursor: pointer;
}

/* Responsive Table Wrapper */
.calc-table-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-top: 28px;
  scrollbar-width: thin;
  scrollbar-color: #DCD6EC #EDE9F7;
}

.calc-table-wrap::-webkit-scrollbar {
  height: 6px;
}

.calc-table-wrap::-webkit-scrollbar-track {
  background: #EDE9F7;
  border-radius: 999px;
}

.calc-table-wrap::-webkit-scrollbar-thumb {
  background: #C4BBE0;
  border-radius: 999px;
}

.calc-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 520px;
}

.calc-table th {
  font-size: 0.86rem;
  font-weight: 600;
  text-align: right;
  padding: 0 10px 14px;
  border: none;
  color: #090714;
  white-space: nowrap;
}

.calc-table th.hl {
  text-align: left;
}

.calc-table th .ico-inline {
  width: 10px;
  height: 10px;
  display: inline-block;
  margin-right: 6px;
}

.calc-table td {
  text-align: right;
  padding: 14px 10px;
  border-top: 1px solid #DCD6EC;
  color: #090714;
  font-size: 0.9rem;
  white-space: nowrap;
}

.calc-table td.left {
  text-align: left;
  white-space: normal;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 190px;
}

.calc-table td.left span {
  line-height: 1.35;
}

.calc-table td .g {
  color: var(--mem-muted);
}

.calc-table td .icn {
  width: 16px;
  height: 16px;
  color: #524B6B;
  flex-shrink: 0;
}

.calc-table tr.total td {
  border-top: 2px solid #511EBF;
  font-weight: 700;
  font-size: 1.02rem;
  color: #090714;
}

.calc-table tr.total td.left {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.calc-table td.custom {
  color: var(--mem-muted);
}

.calc-table-hint {
  display: none;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--mem-muted);
  text-align: right;
  margin-top: 8px;
  letter-spacing: 0.04em;
}

@media (max-width: 640px) {
  .calc-card {
    padding: 16px 12px;
  }

  .calc-table-wrap {
    margin-top: 20px;
    padding-bottom: 4px;
  }

  .calc-table th {
    padding: 0 8px 10px;
    font-size: 0.8rem;
  }

  .calc-table td {
    padding: 11px 8px;
    font-size: 0.84rem;
  }

  .calc-table td.left {
    min-width: 165px;
    gap: 8px;
  }

  .calc-table-hint {
    display: block;
  }
}

.how-calc {
  font-size: 0.84rem;
  color: var(--mem-muted);
  padding: 16px 10px 0;
  display: flex;
  align-items: center;
  gap: 7px;
  line-height: 1.4;
}

.how-calc svg {
  color: var(--mem-primary);
  flex-shrink: 0;
}

/* ==========================================================================
   6. FAQ ACCORDION
   ========================================================================== */
.mem-faq {
  padding: 30px clamp(1.25rem, 3.5vw, 2.5rem) 50px;
}

.faq-grid {
  display: grid;
  grid-template-columns: 0.9fr 3fr;
  gap: 40px;
}

@media (max-width: 860px) {
  .faq-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

.mem-faq h2 {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 3.8vw, 2.75rem);
  font-weight: 400;
  letter-spacing: -0.025em;
  color: #090714;
  margin: 0 0 12px;
  line-height: 1.1;
}

.mem-faq .faq-lead {
  font-size: 0.95rem;
  color: #26203B;
  max-width: 260px;
  line-height: 1.5;
}

.mem-faq .faq-lead a {
  color: var(--mem-primary);
  text-decoration: underline;
  font-weight: 600;
}

.faq-list details {
  border-bottom: 1px solid var(--mem-line);
}

.faq-list details:first-child {
  border-top: 1px solid var(--mem-line);
}

.faq-list summary {
  list-style: none;
  cursor: pointer;
  font-family: var(--font-display);
  font-size: 1.12rem;
  font-weight: 600;
  color: #090714;
  padding: 22px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  transition: color 0.15s ease;
}

.faq-list summary:hover {
  color: var(--mem-primary);
}

.faq-list summary:focus-visible {
  outline: 2px solid var(--mem-primary);
  outline-offset: 4px;
  border-radius: 4px;
}

.faq-list summary::-webkit-details-marker {
  display: none;
}

.faq-list summary .car {
  width: 18px;
  height: 18px;
  color: var(--mem-muted);
  transition: transform 0.25s ease;
  flex-shrink: 0;
}

.faq-list details[open] summary .car {
  transform: rotate(180deg);
  color: var(--mem-primary);
}

.faq-list details p {
  margin: 0 0 22px;
  color: #26203B;
  font-size: 0.95rem;
  line-height: 1.65;
  max-width: 72ch;
}

/* ==========================================================================
   7. CTA BAND & ARCHITECTURAL DIVIDER
   ========================================================================== */
.mem-cta-band {
  padding: 56px clamp(1.25rem, 3.5vw, 2.5rem) 40px;
  background: var(--mem-surface-2);
  border-top: 1px solid var(--mem-line);
}

.mem-cta-band h2 {
  font-family: var(--font-serif);
  font-size: clamp(2.2rem, 4.2vw, 3.2rem);
  font-weight: 400;
  letter-spacing: -0.025em;
  color: #090714;
  margin: 0 0 12px;
  line-height: 1.15;
}

.mem-cta-band p {
  font-size: 1.05rem;
  color: #26203B;
  max-width: 60ch;
  line-height: 1.55;
  margin: 0 0 28px;
}

.mem-cta-btns {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.mem-cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.92rem;
  border-radius: 999px;
  padding: 12px 22px;
  text-decoration: none;
  transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.mem-cta-btn.primary {
  background: var(--mem-primary);
  color: #F6F4FB;
}

.mem-cta-btn.secondary {
  background: #FFFFFF;
  color: #090714;
  border: 1px solid var(--mem-line);
}

.mem-cta-btn.secondary:hover {
  background: #F6F4FB;
}

.mem-cta-btn.btn-b-blue {
  background: var(--card-blue-bg);
  color: #F6F4FB;
}

.mem-cta-btn.btn-b-pink {
  background: #A8E31E;
  color: #090714;
}

.mem-cta-btn.btn-b-wine {
  background: var(--card-wine-bg);
  color: #090714;
}

.mem-cta-btn.btn-b-purple {
  background: var(--card-purple-bg);
  color: #F6F4FB;
}

.mem-cta-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.mem-divider {
  height: 1px;
  background: var(--mem-line);
  margin-top: 48px;
}

/* Tabular Numbers for Data Stability */
.calc-table,
.calc-card .val,
.plan-price-row .amt {
  font-variant-numeric: tabular-nums;
}

/* ==========================================================================
   ACCESSIBILITY: PREFERS-REDUCED-MOTION
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
