/* ─────────────────────────────────────────────────────────────────────────────
   MEMBERSHIP PAGE
   Scoped to body.theme-membership. Uses only the tokens declared in style.css —
   no new palette, no new fonts. Shared components (.container, .btn, .form-group,
   .page-hero) keep their meaning; everything here is either a page-local
   composition or a documented override.
   ───────────────────────────────────────────────────────────────────────────── */

.theme-membership {
  --band: #FBF8F2;              /* warm paper, gold at 4% */
  --band-deep: #F4EEE2;
  --ink-soft: rgba(26, 24, 24, .06);
  --rule: rgba(193, 151, 65, .28);
  --gold-ink: #7E5F1C;          /* gold, deepened for small text to clear 4.5:1 */
}

/* ─── HERO ─────────────────────────────────────────────────────────────────
   Same gold band as every other page hero, given a two-column composition and
   the association's diamond motif instead of a flat centred block. */
.theme-membership .page-hero {
  /* RTL: the copy sits on the right, so the deeper gold runs under the whole
     text column (white on #906D29 = 4.7:1) and lightens only past it. */
  background: linear-gradient(to left, #906D29 0%, #906D29 56%, #B58C38 100%);
  padding: 0;
  text-align: right;
}
.membership-hero-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 56px 24px 64px;
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
  position: relative;
  z-index: 2;
}
.theme-membership .page-hero .breadcrumb { justify-content: flex-start; margin-bottom: 20px; }
.theme-membership .page-hero .breadcrumb,
.theme-membership .page-hero .breadcrumb a { color: rgba(255, 255, 255, .88); }
.membership-hero h1 {
  font-size: clamp(30px, 4.6vw, 52px);
  line-height: 1.45;
  margin-bottom: 16px;
}
.membership-hero .lede {
  font-size: clamp(15px, 1.4vw, 17px);
  color: rgba(255, 255, 255, .95);
  line-height: 1.95;
  max-width: 52ch;            /* readable measure, not full-width text */
  margin: 0 0 28px;
}
.hero-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
  margin-bottom: 30px;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, .28);
  max-width: 560px;
}
.hero-fact { display: flex; flex-direction: column; gap: 2px; }
.hero-fact b {
  font-family: 'Gulzar', serif;
  font-size: clamp(19px, 2vw, 24px);
  font-weight: 400;
  color: var(--white);
  line-height: 1.6;
}
.hero-fact span { font-size: 12.5px; color: rgba(255, 255, 255, .88); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.theme-membership .btn-hero-solid {
  background: var(--crimson);
  color: var(--white);
  border-color: var(--crimson);
}
.theme-membership .btn-hero-solid:hover { background: #6B1028; border-color: #6B1028; }
.theme-membership .btn-hero-ghost {
  background: transparent;
  color: var(--white);
  border-color: rgba(255, 255, 255, .7);
}
.theme-membership .btn-hero-ghost:hover { background: var(--white); color: var(--gold-dark); }

/* The electronic membership card the association actually issues, drawn rather
   than stock-photographed. */
.hero-card-wrap { display: flex; justify-content: center; }
.member-card {
  width: min(360px, 100%);
  aspect-ratio: 1.586;                 /* ID-1, the real card proportion */
  border-radius: 16px;
  padding: 22px;
  background: linear-gradient(150deg, #2A2626 0%, #1A1818 62%, #241F1A 100%);
  border: 1px solid rgba(255, 255, 255, .14);
  box-shadow: 0 24px 48px rgba(26, 24, 24, .32);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  transform: rotate(-2.2deg);
  transition: transform .5s cubic-bezier(.2, .7, .3, 1);
}
.member-card::after {                  /* brand motif, barely there */
  content: '';
  position: absolute;
  inset: auto -28px -34px auto;
  width: 190px;
  height: 190px;
  background: var(--gold);
  opacity: .16;
  -webkit-mask: url('../images/Pattern -01.png') 50% 45.7% / 219.4% auto no-repeat;
  mask: url('../images/Pattern -01.png') 50% 45.7% / 219.4% auto no-repeat;
}
.member-card:hover { transform: rotate(0deg) translateY(-4px); }
.member-card-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.member-card-top img { width: 42px; height: auto; }
.member-card-tag {
  font-size: 11px;
  letter-spacing: .4px;
  color: var(--gold-light);
  border: 1px solid rgba(212, 170, 90, .5);
  border-radius: 20px;
  padding: 3px 10px;
}
.member-card-name {
  font-family: 'Gulzar', serif;
  font-size: 21px;
  color: var(--white);
  line-height: 1.7;
}
.member-card-no {
  font-size: 12.5px;
  color: rgba(255, 255, 255, .55);
  direction: ltr;
  text-align: right;
  letter-spacing: 1.5px;
}
.member-card-foot {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  font-size: 11.5px;
  color: rgba(255, 255, 255, .6);
}

/* ─── SHARED SECTION FURNITURE ─────────────────────────────────────────────── */
.theme-membership section { padding: clamp(56px, 7vw, 88px) 0; }
.band-soft { background: var(--band); }
.band-paper { background: var(--white); }
.section-head { max-width: 760px; margin-bottom: clamp(32px, 4vw, 48px); }
.section-head .section-heading { margin-bottom: 14px; }
.section-head p {
  font-size: 15.5px;
  color: var(--text-gray);
  line-height: 1.95;
  max-width: 62ch;
}
.rule-diamond {                        /* small motif that separates sections */
  width: 46px;
  height: 46px;
  background: var(--crimson);
  opacity: .5;
  margin-bottom: 18px;
  -webkit-mask: url('../images/Pattern -01.png') 50% 45.7% / 219.4% auto no-repeat;
  mask: url('../images/Pattern -01.png') 50% 45.7% / 219.4% auto no-repeat;
}

/* ─── PAYMENT DETAILS ──────────────────────────────────────────────────────
   The fees are paid before the form is submitted, so the account sits on the
   page as a card the applicant can copy from in one tap. */
.pay-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: clamp(22px, 3vw, 32px);
  max-width: 760px;
  box-shadow: 0 8px 30px rgba(26, 24, 24, .05);
}
.pay-rows { display: grid; gap: 14px; }
.pay-row {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  padding: 16px 18px;
  border: 1px solid var(--rule);
  border-radius: 14px;
  background: var(--band);
}
.pay-label {
  flex: 0 0 auto;
  min-width: 96px;
  font-size: 13px;
  font-weight: 600;
  color: var(--gold-ink);
}
.pay-value {
  /* the same height whether or not the row carries a copy button, so every
     row in the card lines up */
  display: flex;
  align-items: center;
  min-height: 44px;
  flex: 1 1 200px;
  font-size: clamp(15px, 2.2vw, 18px);
  font-weight: 600;
  letter-spacing: .8px;
  color: var(--text-dark);
  font-variant-numeric: tabular-nums lining-nums;
  overflow-wrap: anywhere;
  unicode-bidi: isolate;
}
.pay-copy {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--gold);
  border-radius: 40px;
  background: var(--white);
  color: var(--gold-ink);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background .18s, color .18s, border-color .18s;
}
.pay-copy svg { width: 16px; height: 16px; }
.pay-copy:hover { background: var(--gold); color: var(--white); border-color: var(--gold); }
.pay-copy:focus-visible { outline: 2px solid var(--gold-ink); outline-offset: 2px; }
.pay-copy.is-done { background: var(--teal); border-color: var(--teal); color: var(--white); }
.pay-note { margin-top: 16px; font-size: 13px; color: var(--text-gray); line-height: 1.9; }

@media (max-width: 560px) {
  .pay-row { gap: 10px; }
  .pay-label { flex: 1 1 100%; min-width: 0; }
  .pay-value { flex: 1 1 100%; }
  .pay-copy { flex: 1 1 100%; justify-content: center; }
}

/* ─── SHARED BENEFITS ──────────────────────────────────────────────────────── */
.benefit-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);   /* nine items read as a 3×3 block */
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
}
.benefit-item {
  background: var(--white);
  padding: 26px 24px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  transition: background .25s;
}
.benefit-item:hover { background: var(--band); }
.benefit-mark {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  margin-top: 2px;
  background: var(--gold);
  -webkit-mask: url('../images/about.png') 58.6% 42.8% / 354.1% auto no-repeat;
  mask: url('../images/about.png') 58.6% 42.8% / 354.1% auto no-repeat;
}
.benefit-item h3 { font-size: 15px; font-weight: 600; margin-bottom: 6px; }
.benefit-item p { font-size: 13.5px; color: var(--text-gray); line-height: 1.85; }

/* ─── TIER CARDS ───────────────────────────────────────────────────────────── */
.tier-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  align-items: stretch;
}
.tier-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 30px 26px 26px;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: border-color .25s, box-shadow .25s, transform .25s;
}
.tier-card:hover {
  border-color: var(--rule);
  box-shadow: 0 16px 34px rgba(26, 24, 24, .09);
  transform: translateY(-3px);
}
.tier-card.is-featured {
  border-color: var(--gold);
  box-shadow: 0 18px 40px rgba(193, 151, 65, .16);
}
.tier-ribbon {
  position: absolute;
  top: -13px;
  right: 26px;
  background: var(--crimson);
  color: var(--white);
  font-size: 11.5px;
  padding: 4px 14px;
  border-radius: 20px;
  letter-spacing: .3px;
}
.tier-name {
  font-family: 'Gulzar', serif;
  font-size: 24px;
  font-weight: 400;
  line-height: 1.7;
  margin-bottom: 4px;
}
.tier-audience {
  font-size: 13px;
  color: var(--text-gray);
  line-height: 1.85;
  min-height: 72px;
  margin-bottom: 18px;
}
.tier-price {
  display: flex;
  align-items: baseline;
  gap: 7px;
  padding: 16px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
}
.tier-price b {
  font-family: 'Gulzar', serif;
  font-size: 38px;
  font-weight: 400;
  color: var(--gold-dark);
  line-height: 1.3;
}
.tier-price span { font-size: 13.5px; color: var(--text-gray); }
.tier-list { list-style: none; margin: 0 0 24px; padding: 0; display: grid; gap: 11px; }
.tier-list li {
  position: relative;
  padding-right: 24px;
  font-size: 13.5px;
  line-height: 1.8;
  color: var(--text-dark);
}
.tier-list li::before {
  content: '';
  position: absolute;
  top: 9px;
  right: 0;
  width: 9px;
  height: 9px;
  background: var(--gold);
  transform: rotate(45deg);
  border-radius: 1px;
}
.tier-list li.is-extra { color: var(--crimson); font-weight: 500; }
.tier-list li.is-extra::before { background: var(--crimson); }
.tier-card .btn { margin-top: auto; width: 100%; text-align: center; }

/* ─── COMPARISON TABLE ─────────────────────────────────────────────────────── */
.compare-wrap { border: 1px solid var(--border); border-radius: 16px; overflow: hidden; background: var(--white); }
table.compare { width: 100%; border-collapse: collapse; font-size: 14px; }
table.compare th, table.compare td { padding: 15px 18px; text-align: right; border-bottom: 1px solid var(--border); }
table.compare thead th {
  background: var(--band-deep);
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
}
table.compare thead th span { display: block; font-size: 12px; font-weight: 400; color: var(--gold-ink); }
table.compare tbody tr:last-child th, table.compare tbody tr:last-child td { border-bottom: 0; }
table.compare tbody tr:hover { background: var(--band); }
table.compare tbody th { font-weight: 500; color: var(--text-dark); }
table.compare thead th:first-child { width: 40%; }
table.compare td { text-align: center; width: 20%; }
.mark-yes, .mark-no { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 50%; }
.mark-yes { background: rgba(45, 123, 138, .12); color: var(--teal); }
.mark-no { color: #BDBDBD; }

/* ─── HOW IT WORKS ─────────────────────────────────────────────────────────── */
.steps-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; counter-reset: step; }
.step-item { position: relative; padding-top: 52px; }
.step-item::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  top: 0;
  right: 0;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--white);
  border: 1.5px solid var(--gold);
  color: var(--gold-ink);
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.step-item::after {                    /* connector, hidden on the last step */
  content: '';
  position: absolute;
  top: 19px;
  right: 50px;
  left: 10px;
  height: 1px;
  background: var(--rule);
}
.step-item:last-child::after { display: none; }
.step-item h3 { font-size: 15.5px; font-weight: 600; margin-bottom: 7px; }
.step-item p { font-size: 13.5px; color: var(--text-gray); line-height: 1.85; }

/* ─── APPLICATION FORM ─────────────────────────────────────────────────────── */
.apply-layout {
  display: grid;
  grid-template-columns: 290px minmax(0, 1fr);
  gap: clamp(24px, 3vw, 44px);
  align-items: start;
}
.apply-aside { position: sticky; top: 96px; }
.apply-summary {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 22px;
  margin-bottom: 18px;
}
.apply-summary h3 { font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.apply-summary .chosen-tier {
  font-family: 'Gulzar', serif;
  font-size: 21px;
  color: var(--gold-ink);
  line-height: 1.7;
  margin-bottom: 2px;
}
.apply-summary .chosen-fee { font-size: 13.5px; color: var(--text-gray); }
.apply-summary hr { border: 0; border-top: 1px solid var(--border); margin: 16px 0; }
.apply-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.apply-steps a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 9px;
  font-size: 13.5px;
  color: var(--text-gray);
  transition: background .2s, color .2s;
}
.apply-steps a::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--border);
  flex-shrink: 0;
  transition: background .2s, transform .2s;
}
.apply-steps a:hover { background: var(--band); color: var(--text-dark); }
.apply-steps a.is-active { background: var(--band-deep); color: var(--text-dark); font-weight: 500; }
.apply-steps a.is-active::before { background: var(--gold); transform: scale(1.35); }
.apply-steps a.is-done::before { background: var(--teal); }
.step-optional {
  margin-right: auto;
  font-size: 11px;
  color: var(--text-gray);
  background: var(--bg-light);
  border-radius: 20px;
  padding: 1px 8px;
}

/* Keyboard users must see where they are, on every interactive surface. */
.theme-membership a:focus-visible,
.theme-membership button:focus-visible,
.theme-membership input:focus-visible,
.theme-membership select:focus-visible,
.theme-membership textarea:focus-visible {
  outline: 2px solid var(--crimson);
  outline-offset: 2px;
}
.tier-option input:focus-visible { outline: 2px solid var(--crimson); outline-offset: 3px; }
.apply-note { font-size: 12.5px; color: var(--text-gray); line-height: 1.9; }

.theme-membership .form-card {
  max-width: none;
  padding: clamp(24px, 3vw, 40px);
  border-radius: 18px;
}
.theme-membership .form-fieldset { margin-bottom: 34px; scroll-margin-top: 96px; }
.theme-membership .form-legend {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-family: 'Gulzar', serif;
  font-size: 20px;
  font-weight: 400;
  line-height: 1.8;
  border-bottom: 1px solid var(--border);
}
.legend-index {
  font-family: 'IBM Plex Sans Arabic', sans-serif;
  font-size: 12px;
  color: var(--gold-ink);
  background: var(--band-deep);
  border-radius: 20px;
  padding: 2px 10px;
}
.theme-membership .form-group label { font-size: 13.5px; font-weight: 500; }
.theme-membership .form-group label .req { color: var(--crimson); margin-right: 2px; }
.theme-membership .form-group input,
.theme-membership .form-group select,
.theme-membership .form-group textarea {
  min-height: 46px;                    /* comfortable target on touch */
  border-radius: 10px;
  font-size: 14.5px;
  background: var(--white);
}
.theme-membership .form-group input:focus,
.theme-membership .form-group select:focus,
.theme-membership .form-group textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(193, 151, 65, .16);
}
.theme-membership .form-group input.is-invalid,
.theme-membership .form-group select.is-invalid,
.theme-membership .form-group textarea.is-invalid { border-color: var(--crimson); }
.theme-membership .form-group input.is-invalid:focus { box-shadow: 0 0 0 3px rgba(133, 21, 50, .14); }
.theme-membership .form-group textarea { min-height: 110px; line-height: 1.9; }
.theme-membership .field-error { font-size: 12.5px; color: var(--crimson); margin-top: 2px; }

/* tier picker inside the form */
.tier-picker { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.tier-option {
  display: flex;
  gap: 11px;
  align-items: flex-start;
  padding: 16px;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
  background: var(--white);
  transition: border-color .2s, background .2s, box-shadow .2s;
}
.tier-option:hover { border-color: var(--rule); }
.tier-option:focus-within { box-shadow: 0 0 0 3px rgba(193, 151, 65, .18); border-color: var(--gold); }
.tier-option input { width: auto; min-height: 0; margin-top: 4px; accent-color: var(--gold-dark); }
.tier-option:has(input:checked) { border-color: var(--gold); background: #FDFBF6; }
.tier-option-body { display: flex; flex-direction: column; gap: 3px; }
.tier-option-title { font-size: 14.5px; font-weight: 600; }
.tier-option-price { font-size: 13px; color: var(--gold-ink); }
.tier-option-note { font-size: 12px; color: var(--text-gray); line-height: 1.75; }

/* file uploads: native input, dressed */
.upload-row { display: flex; flex-direction: column; gap: 8px; }
.upload-control {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1.5px dashed var(--border);
  border-radius: 12px;
  background: var(--bg-light);
  transition: border-color .2s, background .2s;
}
.upload-row:hover .upload-control { border-color: var(--rule); background: var(--band); }
.upload-row input[type="file"] { display: none; }
.upload-btn {
  flex-shrink: 0;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  color: var(--gold-ink);
  background: var(--white);
  border: 1px solid var(--rule);
  border-radius: 8px;
  padding: 11px 16px;
  min-height: 44px;                        /* comfortable touch target */
  cursor: pointer;
  transition: background .2s, color .2s;
}
.upload-btn:hover { background: var(--gold); color: var(--white); border-color: var(--gold); }
.upload-name {
  font-size: 12.5px;
  color: var(--text-gray);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.upload-row.has-file .upload-control { border-style: solid; border-color: var(--teal); background: rgba(162, 218, 223, .12); }
.upload-row.has-file .upload-name { color: var(--text-dark); }
.upload-row.is-invalid .upload-control { border-color: var(--crimson); }

/* submit area */
.theme-membership .form-submit {
  margin-top: 30px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}
.submit-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.theme-membership .form-submit .btn {
  flex: 0 1 320px;
  padding: 15px 28px;
  font-size: 15.5px;
}
.theme-membership .form-submit .btn:disabled { opacity: .5; cursor: not-allowed; }
.submit-aside { font-size: 12.5px; color: var(--text-gray); line-height: 1.85; margin-top: 12px; }
.submit-aside.is-waiting { color: var(--crimson); }
.link-btn {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  text-decoration: underline;
  cursor: pointer;
}
.theme-membership .form-status { font-size: 14px; margin-top: 16px; padding-right: 0; }
.theme-membership .form-status.is-ok { color: #1F6B4F; }
.theme-membership .form-status.is-error { color: var(--crimson); }

/* ─── NOTES ────────────────────────────────────────────────────────────────── */
.note-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-right: 4px solid var(--gold);
  border-radius: 14px;
  padding: 24px 26px;
}
.note-card h3 { font-size: 15px; font-weight: 600; margin-bottom: 10px; }
.note-card p { font-size: 13.5px; color: var(--text-gray); line-height: 2; max-width: 74ch; }

/* ─── CLOSING CTA ──────────────────────────────────────────────────────────── */
.join-cta {
  background: var(--teal-light);
  text-align: center;
}
.join-cta h2 { font-family: 'Gulzar', serif; font-size: clamp(22px, 2.6vw, 30px); font-weight: 400; color: var(--text-dark); margin-bottom: 10px; }
.join-cta p { font-size: 15px; color: var(--text-dark); opacity: .8; margin-bottom: 22px; }

/* ─── MOTION ───────────────────────────────────────────────────────────────── */
/* Only the script arms the animation, so a JS failure can never leave the page
   blank: without .js-reveal on <html> the content is simply visible. */
.js-reveal .reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease; }
.js-reveal .reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal, .member-card, .tier-card, .apply-steps a { transition: none; }
  .js-reveal .reveal { opacity: 1; transform: none; }
  .member-card { transform: none; }
}

/* ─── RESPONSIVE ───────────────────────────────────────────────────────────── */
@media (max-width: 1080px) {
  .benefit-grid { grid-template-columns: repeat(2, 1fr); }
  /* Nine items over two columns would strand the last one. */
  .benefit-grid .benefit-item:last-child { grid-column: 1 / -1; }
  .apply-layout { grid-template-columns: 1fr; }
  .apply-aside { position: static; }
  .apply-summary { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 26px; }
  .apply-summary > div:first-child { flex: 1 1 200px; }
  .apply-summary hr { display: none; }
  .apply-steps { flex: 1 1 100%; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 6px; }
  .apply-steps a { justify-content: center; text-align: center; font-size: 12.5px; padding: 8px 6px; min-height: 44px; }
  .steps-row { grid-template-columns: repeat(2, 1fr); gap: 26px 20px; }
  .step-item:nth-child(2)::after { display: none; }
}

@media (max-width: 900px) {
  .membership-hero-inner { grid-template-columns: 1fr; padding: 44px 24px 52px; gap: 36px; }
  .hero-card-wrap { justify-content: flex-start; }
  .member-card { transform: none; width: min(340px, 100%); }
  .tier-grid { grid-template-columns: 1fr; gap: 16px; }
  .tier-audience { min-height: 0; }
  .tier-picker { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  /* The comparison table becomes one block per tier — no side scrolling. */
  .compare-wrap { border: 0; background: transparent; }
  table.compare, table.compare tbody, table.compare tr, table.compare th, table.compare td { display: block; }
  table.compare thead { display: none; }
  table.compare tbody tr {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 14px 16px;
    margin-bottom: 12px;
  }
  table.compare tbody th { border: 0; padding: 0 0 10px; font-size: 14px; font-weight: 600; }
  table.compare tbody td {
    border: 0;
    width: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 7px 0;
    text-align: right;
    font-size: 13.5px;
    border-top: 1px solid var(--border);
  }
  table.compare tbody td::before { content: attr(data-tier); color: var(--text-gray); }
}

@media (max-width: 640px) {
  .benefit-grid { grid-template-columns: 1fr; }
  /* Three facts read as a deliberate 2 + 1 block instead of a stray orphan. */
  .hero-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 18px; }
  /* only a third fact would need the full row; with two they sit side by side */
  .hero-fact:nth-child(3) { grid-column: 1 / -1; padding-top: 14px; border-top: 1px solid rgba(255,255,255,.22); }
  .theme-membership section { padding: 44px 0; }
  .membership-hero h1 { font-size: 27px; }
  .hero-facts { gap: 14px 22px; }
  .hero-actions .btn { flex: 1 1 100%; text-align: center; }
  .steps-row { grid-template-columns: 1fr; gap: 22px; }
  .step-item { padding-top: 0; padding-right: 54px; }
  .step-item::before { top: 2px; }
  .step-item::after { display: none; }
  .apply-summary { padding: 16px 18px; gap: 10px 18px; }
  .apply-summary .chosen-tier { font-size: 19px; }
  .apply-steps {
    grid-auto-flow: row;
    grid-template-columns: 1fr 1fr;        /* four steps in two tidy rows */
    gap: 6px;
  }
  .apply-steps a { justify-content: flex-start; text-align: right; min-height: 44px; font-size: 12.5px; }
  .step-optional { display: none; }        /* the rail is tight; the legend says it */
  .apply-note { font-size: 12px; }
  .theme-membership .form-card { padding: 18px 14px; border-radius: 14px; }
  /* 16px stops iOS zooming the page when a field takes focus. */
  .theme-membership .form-group input,
  .theme-membership .form-group select,
  .theme-membership .form-group textarea { font-size: 16px; min-height: 48px; }
  .theme-membership .form-grid { gap: 16px; }
  .theme-membership .form-fieldset { margin-bottom: 26px; }
  .tier-price b { font-size: 32px; }
  .tier-card { padding: 24px 20px 22px; }
  .tier-name { font-size: 21px; }
  .theme-membership .form-legend { font-size: 18px; flex-wrap: wrap; }
  .upload-control { flex-direction: column; align-items: stretch; gap: 8px; padding: 12px; }
  .upload-btn { width: 100%; }
  .upload-name { width: 100%; white-space: normal; text-align: center; }
  /* In a column flex row the desktop `flex-basis: 320px` is read as a HEIGHT,
     which stretched the submit button to 320px tall. Reset the basis here. */
  .submit-row { flex-direction: column; align-items: stretch; }
  .theme-membership .form-submit .btn { flex: 0 0 auto; width: 100%; min-height: 52px; }
  .theme-membership .form-submit { margin-top: 24px; padding-top: 20px; }
  .submit-aside { margin-top: 10px; text-align: center; }
}

/* ─── LOADING PLACEHOLDERS ─────────────────────────────────────────────────
   Same box as the real thing, so the arrival of the data changes nothing but
   the content. */
.tier-card.is-skeleton { min-height: 560px; border-style: dashed; background: var(--band); }
.tier-option.is-skeleton { min-height: 140px; border-style: dashed; background: var(--band); }
.is-skeleton { animation: skeleton-pulse 1.6s ease-in-out infinite; }
@keyframes skeleton-pulse { 0%, 100% { opacity: .55; } 50% { opacity: .85; } }
@media (prefers-reduced-motion: reduce) { .is-skeleton { animation: none; } }
@media (max-width: 900px) {
  .tier-card.is-skeleton { min-height: 220px; }
  .tier-option.is-skeleton { min-height: 96px; }
}

/* ─── PHONE: the comparison is a deep scroll, so it folds away ─────────────
   Desktop and tablet keep it open and never see the toggle. */
.compare-fold > summary { display: none; }
@media (max-width: 640px) {
  .compare-fold > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    list-style: none;
    cursor: pointer;
    padding: 14px 18px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--white);
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
    min-height: 52px;
  }
  .compare-fold > summary::-webkit-details-marker { display: none; }
  .compare-fold > summary::after {
    content: '';
    width: 9px;
    height: 9px;
    border-left: 2px solid var(--gold-ink);
    border-bottom: 2px solid var(--gold-ink);
    transform: rotate(-45deg);
    transition: transform .25s;
  }
  .compare-fold[open] > summary { margin-bottom: 14px; }
  .compare-fold[open] > summary::after { transform: rotate(135deg); }
}
