/* =====================================================================
   Faithful Ties — Main stylesheet
   Mobile-first. Every breakpoint is min-width.
   ===================================================================== */

/* ---------- Reset ---------------------------------------------------- */
*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--ft-font-body);
  font-size: var(--ft-text-base);
  line-height: 1.65;
  color: var(--ft-ink);
  background: var(--ft-ivory);
  -webkit-font-smoothing: antialiased;
}

img, picture, svg { display: block; max-width: 100%; height: auto; }

/* The `hidden` attribute is only `display:none` in the UA stylesheet, so ANY
   author `display` rule silently beats it. `.ft-nav__actions` sets
   `display:flex`, which is why the signed-out buttons kept showing next to
   the signed-in ones. Make `hidden` actually mean hidden, everywhere. */
[hidden] { display: none !important; }

h1, h2, h3, h4 {
  font-family: var(--ft-font-display);
  font-weight: 700;
  line-height: 1.18;
  margin: 0 0 var(--ft-space-4);
  letter-spacing: -0.01em;
}

h1 { font-size: var(--ft-text-4xl); }
h2 { font-size: var(--ft-text-3xl); }
h3 { font-size: var(--ft-text-xl); }

p { margin: 0 0 var(--ft-space-4); }
p:last-child { margin-bottom: 0; }

a { color: var(--ft-purple); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--ft-purple-light); }

ul, ol { margin: 0 0 var(--ft-space-4); padding-left: 1.25rem; }

/* Visible keyboard focus everywhere — accessibility baseline */
:focus-visible {
  outline: 3px solid var(--ft-gold);
  outline-offset: 2px;
  border-radius: 4px;
}

.ft-visually-hidden {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* Skip link */
.ft-skip {
  position: absolute; left: var(--ft-space-4); top: -100px;
  z-index: 200; background: var(--ft-gold); color: var(--ft-ink);
  padding: var(--ft-space-3) var(--ft-space-5);
  border-radius: var(--ft-radius-sm); font-weight: 600;
  transition: top 0.2s ease;
}
.ft-skip:focus { top: var(--ft-space-4); }

/* ---------- Layout --------------------------------------------------- */
.ft-container {
  width: 100%;
  max-width: var(--ft-container);
  margin-inline: auto;
  padding-inline: var(--ft-space-5);
}
.ft-container--narrow { max-width: var(--ft-container-narrow); }

.ft-section { padding-block: var(--ft-space-7); }
@media (min-width: 768px) { .ft-section { padding-block: var(--ft-space-9); } }

.ft-section--ivory { background: var(--ft-ivory); }
.ft-section--ivory-warm { background: var(--ft-ivory-warm); }
.ft-section--purple {
  background: var(--ft-purple);
  color: var(--ft-on-purple);
}
.ft-section--purple h2,
.ft-section--purple h3 { color: var(--ft-on-purple); }

.ft-section-head { text-align: center; max-width: 42rem; margin: 0 auto var(--ft-space-6); }
.ft-section-head p { color: var(--ft-ink-soft); font-size: var(--ft-text-lg); }
.ft-section--purple .ft-section-head p { color: var(--ft-on-purple-soft); }

/* Small gold eyebrow above section headings */
.ft-eyebrow {
  display: inline-block;
  font-family: var(--ft-font-body);
  font-size: var(--ft-text-xs);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ft-gold-dark);
  margin-bottom: var(--ft-space-3);
}
.ft-section--purple .ft-eyebrow { color: var(--ft-gold); }

/* ---------- Buttons -------------------------------------------------- */
.ft-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--ft-space-2);
  font-family: var(--ft-font-display);
  font-size: var(--ft-text-base);
  font-weight: 700;
  line-height: 1;
  padding: 0.95rem 1.75rem;
  border: 2px solid transparent;
  border-radius: var(--ft-radius-pill);
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s ease, background-color 0.15s ease,
              color 0.15s ease, box-shadow 0.15s ease;
  min-height: 48px; /* touch target */
}
.ft-btn:hover { transform: translateY(-2px); }
.ft-btn:active { transform: translateY(0); }
.ft-btn[disabled], .ft-btn[aria-disabled="true"] {
  opacity: 0.55; cursor: not-allowed; transform: none;
}

/* The signature black CTA — rounded rectangle with a soft drop shadow,
   and a gold ♥ glyph (the brand's one sanctioned icon-as-glyph). */
.ft-btn--pill-black {
  background: var(--plum-950);
  color: var(--white);
  border-radius: var(--radius-md);
  padding: 1.05rem 2rem;
  font-size: 1.35rem;
  font-weight: var(--weight-bold);
  box-shadow: 0 10px 26px -8px rgba(23, 7, 41, 0.55);
}
.ft-btn--pill-black:hover {
  background: #000;
  color: var(--white);
  box-shadow: 0 16px 34px -10px rgba(23, 7, 41, 0.6);
}
.ft-btn__heart { color: var(--gold-500); font-size: 1.15em; line-height: 1; }

.ft-btn--gold { background: var(--ft-gold); color: var(--ft-ink); }
.ft-btn--gold:hover { background: var(--ft-gold-light); color: var(--ft-ink); }

.ft-btn--purple { background: var(--ft-purple); color: #fff; }
.ft-btn--purple:hover { background: var(--ft-purple-light); color: #fff; }

.ft-btn--ghost-light {
  background: transparent; color: #fff; border-color: rgba(255, 255, 255, 0.45);
}
.ft-btn--ghost-light:hover { background: rgba(255, 255, 255, 0.12); color: #fff; }

.ft-btn--ghost {
  background: transparent; color: var(--ft-purple); border-color: var(--ft-purple);
}
.ft-btn--ghost:hover { background: var(--ft-purple); color: #fff; }

.ft-btn--block { width: 100%; }

/* Active subscription — a status, not an action. No hover lift, no
   pointer, because there is nothing to click. Matches the app's green
   "Active until …" button on the Premium Plans screen. */
.ft-btn--active {
  background: var(--ft-active-green);
  color: var(--white);
  cursor: default;
}
.ft-btn--active:hover { transform: none; background: var(--ft-active-green); color: var(--white); }

/* ---------- Navbar --------------------------------------------------- */
.ft-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--plum-900);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.ft-nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--ft-space-4);
  min-height: var(--ft-nav-height);
}
.ft-nav__brand {
  display: flex; align-items: center; gap: var(--space-3);
  text-decoration: none; color: #fff; flex-shrink: 0;
}
.ft-nav__brand img { width: 48px; height: 48px; object-fit: contain; }
@media (min-width: 980px) { .ft-nav__brand img { width: 58px; height: 58px; } }
.ft-nav__brand-text { display: flex; flex-direction: column; line-height: 1.14; }
.ft-nav__brand-name {
  font-family: var(--font-heading);
  font-weight: var(--weight-bold);
  font-size: 1.15rem;
  color: var(--white);
}
.ft-nav__brand-tag {
  font-family: var(--font-heading);
  font-weight: var(--weight-semibold);
  font-size: 0.85rem;
  color: var(--white);
}
@media (min-width: 980px) {
  .ft-nav__brand-name { font-size: 1.4rem; }
  .ft-nav__brand-tag { font-size: 1rem; }
}

.ft-nav__toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 46px; height: 46px;
  background: transparent; border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: var(--ft-radius-sm); color: #fff; cursor: pointer;
}
.ft-nav__toggle svg { width: 22px; height: 22px; }
.ft-nav__toggle .ft-icon-close { display: none; }
.ft-nav__toggle[aria-expanded="true"] .ft-icon-open { display: none; }
.ft-nav__toggle[aria-expanded="true"] .ft-icon-close { display: block; }

/* Mobile menu panel */
.ft-nav__menu {
  display: none;
  position: absolute;
  left: 0; right: 0; top: 100%;
  background: var(--plum-950);
  border-bottom: 1px solid rgba(255, 255, 255, 0.10);
  padding: var(--ft-space-4) var(--ft-space-5) var(--ft-space-6);
  box-shadow: var(--ft-shadow-lg);
}
.ft-nav__menu.is-open { display: block; }

.ft-nav__links { list-style: none; margin: 0; padding: 0; }
.ft-nav__links a {
  display: block;
  padding: 0.85rem 0;
  color: var(--white);
  text-decoration: none;
  /* Baloo 2 at every width — the DS specifies it for nav/UI labels.
     Keep this outside the desktop media query. */
  font-family: var(--font-heading);
  font-weight: var(--weight-semibold);
  font-size: 1.05rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.ft-nav__links a:hover { color: var(--ft-gold); }
.ft-nav__links a[aria-current="page"] { color: var(--ft-gold); font-weight: 700; }

.ft-nav__actions {
  display: flex; flex-direction: column; gap: var(--ft-space-3);
  margin-top: var(--ft-space-5);
}

@media (min-width: 980px) {
  .ft-nav__toggle { display: none; }
  .ft-nav__menu {
    display: flex !important;
    position: static;
    align-items: center;
    justify-content: flex-end;
    gap: var(--ft-space-6);
    background: transparent;
    border: 0;
    padding: 0;
    box-shadow: none;
    flex: 1;
  }
  .ft-nav__links { display: flex; align-items: center; gap: clamp(18px, 2.4vw, 38px); }
  .ft-nav__links a { padding: 0; border: 0; }
  .ft-nav__actions { flex-direction: row; margin-top: 0; margin-left: clamp(18px, 2.4vw, 38px); }
  .ft-nav__actions .ft-btn { padding: 0.55rem 1.35rem; font-size: 1.02rem; min-height: 44px; }
}

/* Login = gold-outlined ghost, Register = solid gold. Both are square-ish
   (radius-sm), matching the reference design rather than pill buttons. */
.ft-nav__actions .ft-btn {
  border-radius: var(--radius-sm);
  font-family: var(--font-heading);
}
.ft-nav__actions .ft-btn--ghost-light {
  border-color: var(--gold-500);
  color: var(--white);
}
.ft-nav__actions .ft-btn--ghost-light:hover {
  background: rgba(204, 165, 69, 0.16);
  border-color: var(--gold-400);
}
.ft-nav__actions .ft-btn--gold {
  background: var(--gradient-gold-soft);
  border-color: var(--gold-600);
  color: var(--white);
  text-shadow: 0 1px 2px rgba(31, 10, 53, 0.35);
}
.ft-nav__actions .ft-btn--gold:hover { background: var(--gold-400); color: var(--plum-900); text-shadow: none; }

/* ---------- Hero ----------------------------------------------------- */
/* Light/ivory hero with the photograph bleeding off the right edge.
   Matches assets/website-reference.png from the design kit. */
.ft-hero {
  position: relative;
  background: var(--ivory-050);
  color: var(--text-on-light-primary);
  overflow: hidden;
}

.ft-hero__grid { display: grid; align-items: stretch; }
@media (min-width: 900px) {
  .ft-hero__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}

/* Text column */
.ft-hero__copy {
  padding: var(--space-12) var(--container-padding) var(--space-16);
  display: flex; flex-direction: column; justify-content: center;
  max-width: 42rem;
  margin-left: auto;
  width: 100%;
}
@media (min-width: 900px) {
  .ft-hero__copy {
    padding-block: var(--space-20);
    padding-right: var(--space-10);
  }
}

.ft-hero h1 {
  margin: 0 0 var(--space-5);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
}
.ft-hero__line1 {
  display: block;
  font-family: var(--font-heading);
  font-weight: var(--weight-extrabold);
  font-size: var(--text-display-xl);
  /* plum-950 rather than plum-800 — 15.9:1 on ivory instead of 12.7:1 */
  color: var(--plum-950);
}
.ft-hero__line2 {
  display: block;
  font-family: var(--font-display);
  /* Playfair Display at 400 is what made this read thin and washed out at
     display size. 700 is the actual fix — the colour was a symptom. */
  font-weight: var(--weight-bold);
  font-size: var(--text-display-xl);
  color: var(--ft-hero-gold);
  letter-spacing: 0.01em;
}

/* Ornamental rule: —— ♥ —— (the one sanctioned glyph in the brand) */
.ft-ornament {
  display: flex; align-items: center; gap: var(--space-4);
  margin: var(--space-6) 0;
  max-width: 26rem;
}
.ft-ornament::before,
.ft-ornament::after {
  content: ""; flex: 1; height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-400), transparent);
}
.ft-ornament span { color: var(--gold-500); font-size: 1.4rem; line-height: 1; }

.ft-hero__lede {
  font-family: var(--font-body);
  font-size: var(--text-body-lg);
  line-height: var(--leading-normal);
  color: var(--plum-700);
  max-width: 30rem;
  margin: 0 0 var(--space-8);
}

.ft-hero__ctas {
  display: flex; flex-direction: column; align-items: flex-start;
  gap: var(--space-5);
}

/* Trust strip */
.ft-hero__trust {
  display: flex; flex-wrap: wrap; gap: var(--space-4) var(--space-6);
  list-style: none; margin: var(--space-8) 0 0; padding: 0;
  font-size: var(--text-body-sm); color: var(--text-on-light-secondary);
}
.ft-hero__trust li { display: flex; align-items: center; gap: var(--space-2); }
.ft-hero__trust svg { width: 18px; height: 18px; color: var(--gold-600); flex-shrink: 0; }

/* Photo column — clean framed photograph.
   No gradient mask, no fade overlay, no blend mode, no opacity. The image
   renders at full strength with a hard rounded edge. */
.ft-hero__media {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 var(--container-padding) var(--space-12);
}
@media (min-width: 900px) {
  .ft-hero__media { padding: var(--space-12) var(--container-padding) var(--space-12) 0; }
}

.ft-hero__media img {
  display: block;
  width: 100%;
  /* Capped so the 474px-wide source is never upscaled more than it must be —
     a smaller frame reads sharper than a stretched full-bleed one. */
  max-width: 520px;
  height: clamp(340px, 46vw, 580px);
  object-fit: cover;
  /* Centres the couple and crops the phone mock out of the bottom of
     hero-couple.jpg, which is a crop from the brand poster. */
  object-position: 50% 18%;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}

/* Google Play badge — gold, per the reference design */
.ft-playbadge {
  display: inline-flex; align-items: center; gap: var(--space-3);
  padding: 0.55rem 1.4rem 0.55rem 0.9rem;
  background: var(--gradient-gold-soft);
  border: 2px solid var(--gold-700);
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--plum-950);
  box-shadow: var(--shadow-card);
  transition: transform var(--duration-standard) var(--ease-standard),
              box-shadow var(--duration-standard) var(--ease-standard);
  min-height: 56px;
}
.ft-playbadge:hover {
  color: var(--plum-950);
  transform: translateY(-2px);
  box-shadow: var(--shadow-gold-glow);
}
.ft-playbadge svg { width: 30px; height: 32px; flex-shrink: 0; }
.ft-playbadge__text { display: flex; flex-direction: column; line-height: 1.1; text-align: left; }
.ft-playbadge__small {
  font-family: var(--font-body); font-size: 0.62rem;
  text-transform: uppercase; letter-spacing: 0.1em; opacity: 0.75;
}
.ft-playbadge__big {
  font-family: var(--font-heading); font-size: 1.35rem;
  font-weight: var(--weight-bold);
}
.ft-playbadge-note {
  font-family: var(--font-body);
  font-size: var(--text-body);
  color: var(--text-on-light-primary);
  margin: var(--space-3) 0 0 var(--space-2);
}

/* Dark-surface variant, for the footer */
.ft-footer .ft-playbadge { box-shadow: none; }

/* ---------- Cards / features ---------------------------------------- */
.ft-grid { display: grid; gap: var(--ft-space-5); }
@media (min-width: 640px) { .ft-grid--2 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) {
  .ft-grid--3 { grid-template-columns: repeat(3, 1fr); }
  .ft-grid--4 { grid-template-columns: repeat(4, 1fr); }
}

.ft-card {
  background: var(--ft-white);
  border: 1px solid var(--ft-line);
  border-radius: var(--ft-radius-lg);
  padding: var(--ft-space-5);
  box-shadow: var(--ft-shadow-sm);
  height: 100%;
}
.ft-card h3 { margin-bottom: var(--ft-space-2); }
.ft-card p { color: var(--ft-ink-soft); font-size: var(--ft-text-sm); }

.ft-card__icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 54px; height: 54px; margin-bottom: var(--ft-space-4);
  border-radius: var(--ft-radius-md);
  background: rgba(92, 26, 133, 0.08);
  color: var(--ft-purple);
}
.ft-card__icon svg { width: 26px; height: 26px; }

/* Glass card variant for use on purple backgrounds */
.ft-card--glass {
  background: var(--ft-glass);
  border-color: var(--ft-glass-border);
  color: var(--ft-on-purple);
  box-shadow: none;
}
.ft-card--glass p { color: var(--ft-on-purple-soft); }
.ft-card--glass .ft-card__icon {
  background: rgba(212, 175, 55, 0.16); color: var(--ft-gold);
}

/* ---------- Steps ---------------------------------------------------- */
.ft-steps { counter-reset: step; display: grid; gap: var(--ft-space-5); }
@media (min-width: 900px) { .ft-steps { grid-template-columns: repeat(3, 1fr); } }
/* The badge sits in normal flow on its own line.
   It used to be position:absolute at top:0 with the step reserving
   --ft-space-6 (32px) of padding — but the badge is 44px tall, so it
   overhung the heading by 12px. An in-flow block cannot overlap: the
   heading is pushed down by the badge's real height plus its margin,
   whatever those values become later. */
.ft-step { position: relative; }
.ft-step::before {
  counter-increment: step;
  content: counter(step);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin: 0 0 var(--space-5);
  font-family: var(--ft-font-display); font-weight: 700; font-size: 1.1rem;
  color: var(--ft-purple); background: var(--ft-gold);
  border-radius: var(--ft-radius-pill);
}
.ft-step h3 { margin-top: 0; margin-bottom: var(--ft-space-2); }
.ft-step p { color: var(--ft-ink-soft); font-size: var(--ft-text-sm); }

/* ---------- Testimonials --------------------------------------------- */
.ft-quote {
  background: var(--ft-glass);
  border: 1px solid var(--ft-glass-border);
  border-radius: var(--ft-radius-xl);
  padding: var(--ft-space-5);
  height: 100%;
  display: flex; flex-direction: column;
}
.ft-quote__mark {
  font-family: var(--ft-font-serif); font-size: 3rem; line-height: 0.7;
  color: var(--ft-gold); margin-bottom: var(--ft-space-3);
}
.ft-quote blockquote {
  margin: 0 0 var(--ft-space-5);
  font-size: var(--ft-text-base);
  color: rgba(255, 255, 255, 0.92);
  flex: 1;
}
.ft-quote__author { display: flex; align-items: center; gap: var(--ft-space-3); }
.ft-quote__avatar {
  width: 44px; height: 44px; border-radius: 50%;
  background: rgba(212, 175, 55, 0.22); color: var(--ft-gold);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--ft-font-display); font-weight: 700; flex-shrink: 0;
}
.ft-quote__name { font-weight: 600; font-size: var(--ft-text-sm); color: #fff; }
.ft-quote__meta { font-size: var(--ft-text-xs); color: var(--ft-on-purple-faint); }

/* ---------- Membership / plans --------------------------------------- */
.ft-plans { display: grid; gap: var(--ft-space-5); align-items: start; }
@media (min-width: 860px) { .ft-plans { grid-template-columns: repeat(2, 1fr); } }

.ft-plan {
  background: var(--ft-glass);
  border: 1px solid var(--ft-glass-border);
  border-radius: var(--ft-radius-xl);
  padding: var(--ft-space-5);
  color: var(--ft-on-purple);
}
.ft-plan--featured {
  background: linear-gradient(
    135deg,
    rgba(92, 26, 133, 0.55) 0%,
    rgba(173, 20, 87, 0.28) 100%
  );
  border: 2px solid var(--ft-gold);
  border-radius: var(--ft-radius-2xl);
  box-shadow: var(--ft-shadow-gold);
  padding: var(--ft-space-6) var(--ft-space-5);
}
@media (min-width: 860px) { .ft-plan--featured { padding: var(--ft-space-6); } }

.ft-plan__head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: var(--ft-space-4); flex-wrap: wrap;
}
.ft-plan__name {
  font-family: var(--ft-font-display); font-size: 1.3rem; font-weight: 700;
  color: #fff; margin: 0;
  display: flex; align-items: center; gap: var(--ft-space-2);
}
.ft-plan--featured .ft-plan__name { color: var(--ft-gold); font-size: 1.4rem; }
.ft-plan__name svg { width: 24px; height: 24px; color: var(--ft-gold); }
.ft-plan__price {
  font-family: var(--ft-font-display); font-size: 1.3rem; font-weight: 700;
  color: var(--ft-on-purple-faint);
}
.ft-plan--featured .ft-plan__price { color: #fff; }
.ft-plan__note {
  font-size: var(--ft-text-sm); color: var(--ft-on-purple-soft);
  margin: var(--ft-space-3) 0 0;
}
.ft-plan__divider { border: 0; border-top: 1px solid rgba(255, 255, 255, 0.18); margin: var(--ft-space-5) 0; }

.ft-plan__features { list-style: none; margin: var(--ft-space-4) 0 0; padding: 0; }
.ft-plan__features li {
  display: flex; align-items: flex-start; gap: var(--ft-space-3);
  padding: var(--ft-space-2) 0;
  font-size: var(--ft-text-sm);
  color: rgba(255, 255, 255, 0.92);
}
.ft-plan__features svg { width: 20px; height: 20px; flex-shrink: 0; margin-top: 2px; }
.ft-plan__features .ft-yes { color: #6ddc9a; }
.ft-plan--featured .ft-plan__features .ft-yes { color: var(--ft-gold); }
.ft-plan__features .ft-no { color: rgba(255, 255, 255, 0.4); }
.ft-plan__features li.is-off { color: var(--ft-on-purple-faint); }

.ft-plan__cta { margin-top: var(--ft-space-6); }

/* ---------- Forms ---------------------------------------------------- */
.ft-field { margin-bottom: var(--ft-space-5); }
.ft-label {
  display: block; margin-bottom: var(--ft-space-2);
  font-weight: 600; font-size: var(--ft-text-sm); color: var(--ft-ink);
}
.ft-required { color: var(--ft-error); }

.ft-input, .ft-select, .ft-textarea {
  width: 100%;
  font-family: inherit;
  font-size: var(--ft-text-base);
  color: var(--ft-ink);
  background: var(--ft-white);
  border: 1px solid var(--ft-line);
  border-radius: var(--ft-radius-sm);
  padding: 0.85rem 1rem;
  min-height: 50px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.ft-textarea { min-height: 140px; resize: vertical; }
.ft-input:focus, .ft-select:focus, .ft-textarea:focus {
  outline: none;
  border-color: var(--ft-purple);
  box-shadow: 0 0 0 3px rgba(92, 26, 133, 0.14);
}
.ft-input[aria-invalid="true"], .ft-textarea[aria-invalid="true"] {
  border-color: var(--ft-error);
  box-shadow: 0 0 0 3px rgba(198, 40, 40, 0.12);
}
.ft-hint { display: block; margin-top: var(--ft-space-2); font-size: var(--ft-text-xs); color: var(--ft-ink-faint); }
.ft-error-text {
  display: none; margin-top: var(--ft-space-2);
  font-size: var(--ft-text-xs); color: var(--ft-error); font-weight: 600;
}
.ft-error-text.is-visible { display: block; }

/* Inline alert used by the contact form and (later) auth screens */
.ft-alert {
  display: none;
  gap: var(--ft-space-3);
  padding: var(--ft-space-4);
  border-radius: var(--ft-radius-sm);
  font-size: var(--ft-text-sm);
  margin-bottom: var(--ft-space-5);
  border: 1px solid transparent;
}
.ft-alert.is-visible { display: flex; }
.ft-alert--success { background: #e7f4ec; border-color: #b9e0c9; color: #1d5c39; }
.ft-alert--error { background: #fdecec; border-color: #f3c4c4; color: #8c1f1f; }
.ft-alert svg { width: 20px; height: 20px; flex-shrink: 0; margin-top: 1px; }
.ft-alert a { color: inherit; font-weight: 600; }

/* Spinner for pending form submits */
.ft-spinner {
  width: 18px; height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.45);
  border-top-color: #fff;
  border-radius: 50%;
  animation: ft-spin 0.7s linear infinite;
}
@keyframes ft-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .ft-spinner { animation-duration: 2s; }
  html { scroll-behavior: auto; }
  .ft-btn:hover, .ft-playbadge:hover { transform: none; }
}

/* ---------- Panels (used on About / Contact) ------------------------- */
.ft-panel {
  background: var(--ft-white);
  border: 1px solid var(--ft-line);
  border-radius: var(--ft-radius-lg);
  padding: var(--ft-space-5);
  box-shadow: var(--ft-shadow-sm);
}
@media (min-width: 768px) { .ft-panel { padding: var(--ft-space-6); } }

.ft-split { display: grid; gap: var(--ft-space-6); align-items: start; }
@media (min-width: 900px) { .ft-split { grid-template-columns: 1.15fr 0.85fr; gap: var(--ft-space-7); } }

/* Contact detail list */
.ft-contact-list { list-style: none; margin: 0; padding: 0; }
.ft-contact-list li {
  display: flex; gap: var(--ft-space-4);
  padding: var(--ft-space-4) 0;
  border-bottom: 1px solid var(--ft-line);
}
.ft-contact-list li:last-child { border-bottom: 0; }
.ft-contact-list svg { width: 22px; height: 22px; color: var(--ft-purple); flex-shrink: 0; margin-top: 3px; }
.ft-contact-list strong { display: block; font-size: var(--ft-text-sm); }
.ft-contact-list span, .ft-contact-list a { font-size: var(--ft-text-sm); color: var(--ft-ink-soft); }

/* ---------- Page header (inner pages) -------------------------------- */
.ft-pagehead {
  position: relative;
  background: var(--ft-purple);
  color: #fff;
  padding-block: var(--ft-space-7);
  overflow: hidden;
  text-align: center;
}
.ft-pagehead::before {
  content: "";
  position: absolute; top: -220px; left: 50%;
  width: 900px; height: 560px; transform: translateX(-50%);
  background: radial-gradient(
    ellipse at center,
    rgba(255, 255, 255, 0.24) 0%,
    rgba(255, 255, 255, 0.08) 42%,
    rgba(255, 255, 255, 0) 72%
  );
  pointer-events: none;
}
.ft-pagehead > * { position: relative; z-index: 1; }
.ft-pagehead h1 { color: #fff; font-size: var(--ft-text-3xl); margin-bottom: var(--ft-space-3); }
.ft-pagehead p {
  color: var(--ft-on-purple-soft); font-size: var(--ft-text-lg);
  max-width: 40rem; margin-inline: auto;
}

/* Breadcrumb */
.ft-crumbs {
  list-style: none; display: flex; flex-wrap: wrap; justify-content: center;
  gap: var(--ft-space-2); margin: 0 0 var(--ft-space-4); padding: 0;
  font-size: var(--ft-text-xs); color: var(--ft-on-purple-faint);
}
.ft-crumbs a { color: var(--ft-on-purple-soft); text-decoration: none; }
.ft-crumbs a:hover { color: var(--ft-gold); }
.ft-crumbs li + li::before { content: "/"; margin-right: var(--ft-space-2); opacity: 0.5; }

/* ---------- Prose (About page body copy) ----------------------------- */
.ft-prose h2 { margin-top: var(--ft-space-7); }
.ft-prose h2:first-child { margin-top: 0; }
.ft-prose h3 { margin-top: var(--ft-space-5); }
.ft-prose p, .ft-prose li { color: var(--ft-ink-soft); }
.ft-prose li { margin-bottom: var(--ft-space-2); }
.ft-prose blockquote {
  margin: var(--ft-space-6) 0;
  padding: var(--ft-space-4) var(--ft-space-5);
  border-left: 4px solid var(--ft-gold);
  background: var(--ft-ivory-warm);
  border-radius: 0 var(--ft-radius-sm) var(--ft-radius-sm) 0;
  font-family: var(--ft-font-serif);
  font-style: italic;
  font-size: var(--ft-text-lg);
  color: var(--ft-ink);
}
.ft-prose blockquote cite {
  display: block; margin-top: var(--ft-space-2);
  font-family: var(--ft-font-body); font-style: normal;
  font-size: var(--ft-text-sm); color: var(--ft-ink-faint);
}

/* ---------- CTA band -------------------------------------------------- */
.ft-cta-band { text-align: center; }
.ft-cta-band h2 { color: #fff; }
.ft-cta-band p {
  color: var(--ft-on-purple-soft); font-size: var(--ft-text-lg);
  max-width: 36rem; margin-inline: auto; margin-bottom: var(--ft-space-6);
}
.ft-cta-band__actions {
  display: flex; flex-wrap: wrap; gap: var(--ft-space-3); justify-content: center;
}

/* ---------- Auth pages (login / register) ---------------------------- */
.ft-auth {
  position: relative;
  background: var(--ft-purple);
  min-height: calc(100vh - var(--ft-nav-height));
  padding-block: var(--ft-space-6) var(--ft-space-8);
  overflow: hidden;
  display: flex;
  align-items: flex-start;
}
.ft-auth::before {
  content: "";
  position: absolute; top: -260px; left: 50%;
  width: 900px; height: 600px; transform: translateX(-50%);
  background: radial-gradient(
    ellipse at center,
    rgba(255, 255, 255, 0.26) 0%,
    rgba(255, 255, 255, 0.09) 42%,
    rgba(255, 255, 255, 0) 72%
  );
  pointer-events: none;
}
.ft-auth > * { position: relative; z-index: 1; width: 100%; }

.ft-auth__card {
  width: 100%;
  max-width: 460px;
  margin-inline: auto;
  background: var(--ft-white);
  border-radius: var(--ft-radius-xl);
  padding: var(--ft-space-6) var(--ft-space-5);
  box-shadow: var(--ft-shadow-lg);
}
@media (min-width: 520px) { .ft-auth__card { padding: var(--ft-space-6); } }

.ft-auth__head { text-align: center; margin-bottom: var(--ft-space-6); }
.ft-auth__head img { width: 68px; height: 68px; object-fit: contain; margin: 0 auto var(--ft-space-4); }
.ft-auth__head h1 { font-size: var(--ft-text-2xl); margin-bottom: var(--ft-space-2); }
.ft-auth__head p { color: var(--ft-ink-soft); font-size: var(--ft-text-sm); }

.ft-auth__foot {
  margin-top: var(--ft-space-5);
  padding-top: var(--ft-space-5);
  border-top: 1px solid var(--ft-line);
  text-align: center;
  font-size: var(--ft-text-sm);
  color: var(--ft-ink-soft);
}

.ft-auth__tagline {
  text-align: center;
  margin-top: var(--ft-space-5);
  font-family: var(--ft-font-serif);
  font-style: italic;
  font-size: var(--ft-text-sm);
  color: var(--ft-on-purple-faint);
}

/* ---------- Browse: collapsed filter bar ------------------------------ */
.ft-filters-bar {
  display: flex; flex-wrap: wrap; align-items: center;
  justify-content: space-between; gap: var(--space-4);
  margin-bottom: var(--space-5);
}

.ft-filters-toggle { gap: var(--space-2); }
.ft-filters-toggle svg { width: 18px; height: 18px; }
.ft-filters-toggle__chev {
  transition: transform var(--duration-standard) var(--ease-standard);
}
.ft-filters-toggle[aria-expanded="true"] .ft-filters-toggle__chev { transform: rotate(180deg); }
.ft-filters-toggle.has-filters { border-color: var(--gold-600); color: var(--gold-700); }
.ft-filters-toggle__count {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 20px; height: 20px; padding: 0 6px;
  border-radius: var(--radius-pill);
  background: var(--gold-500); color: var(--plum-950);
  font-family: var(--font-body);
  font-size: 0.68rem; font-weight: var(--weight-bold); line-height: 1;
}

.ft-filters-bar__meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-4);
  margin: 0;
}

/* Inline variant of the fixed opposite-gender indicator, for the bar */
.ft-fixed-filter--inline {
  min-height: 0;
  padding: 0.35rem 0.8rem;
  font-size: var(--text-body-sm);
  border-radius: var(--radius-pill);
}
.ft-fixed-filter--inline svg { width: 15px; height: 15px; }
.ft-fixed-filter--inline [data-showing] { text-transform: lowercase; }

@media (min-width: 1000px) { .ft-filters__grid--3 { grid-template-columns: repeat(3, 1fr); } }

/* ---------- Browse: filter panel -------------------------------------- */
.ft-filters {
  background: var(--white);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  padding: var(--space-5);
  margin-bottom: var(--space-8);
}
.ft-filters__grid { display: grid; gap: var(--space-4); }
@media (min-width: 640px) { .ft-filters__grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .ft-filters__grid { grid-template-columns: repeat(4, 1fr); } }

.ft-filters .ft-field { margin-bottom: 0; }
.ft-filters__ages { display: flex; align-items: center; gap: var(--space-2); }
.ft-filters__ages .ft-input { text-align: center; padding-inline: var(--space-2); }
.ft-filters__ages span { color: var(--text-muted); font-size: var(--text-body-sm); }

.ft-filters__foot {
  display: flex; flex-wrap: wrap; align-items: center;
  justify-content: space-between; gap: var(--space-4);
  margin-top: var(--space-5);
  padding-top: var(--space-5);
  border-top: 1px solid var(--border-subtle);
}
.ft-filters__count { font-size: var(--text-body-sm); color: var(--text-on-light-secondary); }
.ft-filters__count strong { color: var(--plum-900); }

/* ---------- Browse: profile cards ------------------------------------ */
/* Explicit column counts, not auto-fill. auto-fill derives the count from
   available width, so anything that changes the container (a wrapper, a
   scrollbar, a stale stylesheet) silently changes the layout. Fixed counts
   fail loudly instead.
     < 640px  -> 2 per row
     640-1023 -> 2 per row
     >= 1024  -> 3 per row                                                */
.ft-profiles {
  display: grid;
  gap: var(--space-4);
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
@media (min-width: 640px) {
  .ft-profiles { gap: var(--space-5); grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
  .ft-profiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.ft-pcard {
  display: flex; flex-direction: column;
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform var(--duration-standard) var(--ease-standard),
              box-shadow var(--duration-standard) var(--ease-standard);
}
.ft-pcard:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-card-hover);
  color: inherit;
}
/* Gold hairline marks a premium member, per the DS "featured card" rule */
.ft-pcard.is-premium { border-color: var(--border-gold); }

/* FIXED PIXEL HEIGHT, deliberately not aspect-ratio.
   A percentage height inside an aspect-ratio box resolves circularly, so the
   browser falls back to the image's own aspect and a portrait photo makes a
   card twice as tall as a landscape one. An explicit height means every card
   is identical no matter what the member uploaded, and caps the desktop
   image at 380px as specified. */
.ft-pcard__media {
  position: relative;
  height: 240px;
  background: var(--plum-050);
  overflow: hidden;
}
@media (min-width: 640px)  { .ft-pcard__media { height: 300px; } }
@media (min-width: 1024px) { .ft-pcard__media { height: 380px; } }

/* Absolutely positioned so nothing inside can stretch the box. object-fit
   crops tall and wide photos to the same frame. The !important guards
   against the global `img { height: auto }` reset winning on a cached or
   reordered stylesheet — this is the rule that keeps cards uniform. */
.ft-pcard__media img,
.ft-pcard__media > img {
  position: absolute !important;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  max-width: none;
  object-fit: cover;
  display: block;
}

/* Fallback when a member has no photo yet */
/* Pinned to the media box and clipped, so the avatar can never size itself
   from its own intrinsic dimensions. The svg gets explicit width AND height
   plus flex-shrink guards — the global `svg { height: auto }` reset would
   otherwise let it grow to fill the card. */
.ft-pcard__nophoto {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: var(--space-2);
  overflow: hidden;
  background: linear-gradient(160deg, var(--plum-100), var(--plum-050));
  color: var(--plum-600);
}
.ft-pcard__nophoto svg {
  width: 48px !important;
  height: 48px !important;
  max-width: 48px;
  max-height: 48px;
  flex: 0 0 auto;
  opacity: 0.6;
}
.ft-pcard__nophoto span {
  font-size: var(--text-caption);
  text-align: center;
  padding-inline: var(--space-2);
}

.ft-pcard__badges {
  position: absolute; top: var(--space-3); left: var(--space-3);
  display: flex; flex-wrap: wrap; gap: var(--space-2);
}
.ft-badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 10px;
  border-radius: var(--radius-badge);
  font-size: 0.7rem;
  font-weight: var(--weight-bold);
  font-family: var(--font-body);
  background: var(--white);
  color: var(--plum-900);
  box-shadow: var(--shadow-card);
}
.ft-badge svg { width: 13px; height: 13px; }
.ft-badge--verified { background: var(--verified-bg); color: var(--gold-700); }
.ft-badge--premium { background: var(--gradient-gold-soft); color: var(--plum-950); }

.ft-pcard__body { padding: var(--space-4); display: flex; flex-direction: column; gap: var(--space-2); }

/* The media box is a fixed height, but the text underneath is not — a name
   that wraps to two lines made those cards taller than the rest. Reserve a
   fixed two lines for the name and two rows for the meta, and clamp the
   overflow, so every card is identical regardless of name or city length. */
.ft-pcard__name {
  font-family: var(--font-heading);
  font-weight: var(--weight-bold);
  font-size: 1.05rem;
  line-height: 1.25;
  color: var(--plum-900);
  margin: 0;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.5em;   /* 2 lines x 1.25 */
}
.ft-pcard__meta {
  display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-3);
  align-content: flex-start;
  font-size: var(--text-body-sm);
  line-height: 1.4;
  color: var(--text-on-light-secondary);
  min-height: 2.8em;   /* 2 rows */
  overflow: hidden;
}
.ft-pcard__meta span { display: inline-flex; align-items: center; gap: 5px; }
.ft-pcard__meta svg { width: 14px; height: 14px; color: var(--plum-500); flex-shrink: 0; }

/* ---------- Notifications --------------------------------------------- */
.ft-tabs__bar {
  display: flex; flex-wrap: wrap; align-items: center;
  justify-content: space-between; gap: var(--space-4);
  margin-bottom: var(--space-6);
}
.ft-tabs {
  display: flex; gap: var(--space-2);
  overflow-x: auto;                    /* many tabs on a narrow phone */
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.ft-tabs::-webkit-scrollbar { display: none; }

.ft-tab {
  display: inline-flex; align-items: center; gap: var(--space-2);
  padding: 0.6rem 1.1rem;
  min-height: 44px;
  white-space: nowrap;
  background: var(--white);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  font-family: var(--font-heading);
  font-weight: var(--weight-semibold);
  font-size: var(--text-body-sm);
  color: var(--text-on-light-secondary);
  cursor: pointer;
  transition: background-color var(--duration-fast) var(--ease-standard),
              color var(--duration-fast) var(--ease-standard);
}
.ft-tab:hover { border-color: var(--plum-500); color: var(--plum-900); }
.ft-tab[aria-selected="true"] {
  background: var(--plum-800);
  border-color: var(--plum-800);
  color: var(--white);
}
.ft-tab__count {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 20px; height: 20px; padding: 0 6px;
  border-radius: var(--radius-pill);
  background: var(--danger); color: var(--white);
  font-size: 0.68rem; font-weight: var(--weight-bold);
}
.ft-tab[aria-selected="true"] .ft-tab__count { background: var(--gold-500); color: var(--plum-950); }

.ft-btn--sm { padding: 0.5rem 1rem; min-height: 40px; font-size: var(--text-body-sm); }

.ft-notifs { display: flex; flex-direction: column; gap: var(--space-3); }

.ft-notif {
  position: relative;
  display: flex; align-items: flex-start; gap: var(--space-4);
  padding: var(--space-4);
  background: var(--white);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  text-decoration: none;
  color: inherit;
  transition: transform var(--duration-fast) var(--ease-standard),
              box-shadow var(--duration-fast) var(--ease-standard);
}
a.ft-notif:hover { transform: translateY(-2px); box-shadow: var(--shadow-card-hover); color: inherit; }
.ft-notif.is-unread { background: var(--plum-050); border-color: var(--plum-100); }

.ft-notif__avatar {
  position: relative;
  flex: 0 0 auto;
  width: 52px; height: 52px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--plum-100);
}
.ft-notif__avatar img { width: 100%; height: 100%; object-fit: cover; }
.ft-notif__avatar-fallback {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  color: var(--plum-600);
}
.ft-notif__avatar-fallback svg { width: 28px !important; height: 28px !important; }

.ft-notif__body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ft-notif__top {
  display: flex; flex-wrap: wrap; align-items: center;
  justify-content: space-between; gap: var(--space-2);
}
.ft-notif__type {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 0.7rem; font-weight: var(--weight-bold);
  text-transform: uppercase; letter-spacing: var(--tracking-wide);
  color: var(--type-color, var(--plum-600));
}
.ft-notif__type svg { width: 14px; height: 14px; }
.ft-notif__time { font-size: var(--text-caption); color: var(--text-muted); }
.ft-notif__title {
  font-family: var(--font-heading);
  font-weight: var(--weight-bold);
  color: var(--plum-900);
  overflow-wrap: anywhere;
}
.ft-notif__subtitle {
  font-size: var(--text-body-sm);
  color: var(--text-on-light-secondary);
  overflow-wrap: anywhere;
}
.ft-notif__dot {
  flex: 0 0 auto;
  width: 10px; height: 10px; margin-top: 6px;
  border-radius: 50%;
  background: var(--danger);
}

/* Bell button in the navbar */
.ft-btn--bell { position: relative; padding-inline: 0.9rem; }
.ft-btn--bell svg { width: 20px; height: 20px; }
.ft-bell-count {
  position: absolute; top: -6px; right: -6px;
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 20px; height: 20px; padding: 0 5px;
  border-radius: var(--radius-pill);
  background: var(--danger); color: var(--white);
  font-family: var(--font-body);
  font-size: 0.66rem; font-weight: var(--weight-bold);
  line-height: 1;
}

/* Like button on the profile detail page */
.ft-profile__actions { margin-bottom: var(--space-6); }
.ft-profile__actions .ft-like-icon { width: 20px; height: 20px; }
.ft-profile__actions .ft-btn.is-liked {
  background: var(--forest-100);
  border-color: var(--forest-500);
  color: var(--forest-500);
  cursor: default;
}
.ft-profile__actions .ft-btn.is-liked .ft-like-icon { fill: currentColor; }
.ft-profile__actions-note {
  margin: var(--space-3) 0 0;
  font-size: var(--text-body-sm);
  color: var(--text-on-light-secondary);
}
.ft-profile__actions-note.is-match {
  color: var(--rose-600);
  font-weight: var(--weight-bold);
}

/* ---------- Chat ------------------------------------------------------ */
.ft-chat__head {
  display: flex; align-items: center; gap: var(--space-3);
  padding-bottom: var(--space-5);
  margin-bottom: var(--space-5);
  border-bottom: 1px solid var(--border-subtle);
}
.ft-chat__back {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; flex: 0 0 auto;
  border-radius: var(--radius-sm);
  color: var(--plum-800);
  border: 1px solid var(--border-subtle);
}
.ft-chat__back svg { width: 20px; height: 20px; }
.ft-chat__peer { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ft-chat__peer-name {
  margin: 0;
  font-family: var(--font-heading);
  font-weight: var(--weight-bold);
  font-size: var(--text-h4);
  color: var(--plum-900);
  line-height: 1.2;
  overflow-wrap: anywhere;
}
.ft-chat__peer-hint {
  font-family: var(--font-body); font-weight: var(--weight-regular);
  font-size: var(--text-caption); color: var(--link);
  text-decoration: none;
}
.ft-chat__peer-hint:hover { color: var(--link-hover); text-decoration: underline; }

.ft-thread {
  list-style: none; margin: 0 0 var(--space-5); padding: var(--space-2);
  display: flex; flex-direction: column; gap: var(--space-3);
  max-height: 60vh; overflow-y: auto;
}
.ft-msg {
  max-width: 78%;
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  display: flex; flex-direction: column; gap: 4px;
  overflow-wrap: anywhere;
}
.ft-msg.is-mine {
  align-self: flex-end;
  background: var(--plum-800);
  color: var(--white);
  border-bottom-right-radius: var(--radius-sm);
}
.ft-msg.is-theirs {
  align-self: flex-start;
  background: var(--white);
  border: 1px solid var(--border-subtle);
  color: var(--plum-900);
  border-bottom-left-radius: var(--radius-sm);
}
.ft-msg__text { font-size: var(--text-body-sm); line-height: var(--leading-normal); }
.ft-msg__time { font-size: 0.66rem; opacity: 0.7; align-self: flex-end; }

.ft-composer { display: flex; gap: var(--space-3); align-items: stretch; }
.ft-composer .ft-input { flex: 1 1 auto; }
.ft-composer .ft-btn { flex: 0 0 auto; }

/* The lock shown to free members, on both /chat and a thread */
.ft-lock {
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-4);
  padding: var(--space-5);
  margin-bottom: var(--space-6);
  background: var(--gold-100);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-md);
}
.ft-lock__icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 46px; height: 46px; flex: 0 0 auto;
  border-radius: 50%;
  background: var(--white);
  color: var(--gold-700);
}
.ft-lock__icon svg { width: 22px; height: 22px; }
.ft-lock__body { flex: 1 1 240px; }
.ft-lock__title {
  font-size: var(--text-h4); margin: 0 0 var(--space-1);
  color: var(--plum-900);
}
.ft-lock__text { margin: 0; font-size: var(--text-body-sm); color: var(--text-on-light-secondary); }
.ft-lock .ft-btn { flex: 0 0 auto; }

/* ---------- Blog index ------------------------------------------------ */
.ft-posts { display: grid; gap: var(--space-5); }
.ft-posts:empty { display: none; }
@media (min-width: 760px) { .ft-posts { grid-template-columns: repeat(2, 1fr); } }

.ft-post-card {
  display: flex; flex-direction: column;
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  padding: var(--space-6);
  transition: transform var(--duration-standard) var(--ease-standard),
              box-shadow var(--duration-standard) var(--ease-standard);
}
.ft-post-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-card-hover); }

.ft-post-card__meta {
  font-size: var(--text-caption);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
  color: var(--text-muted);
  margin: 0 0 var(--space-3);
}
.ft-post-card__title {
  font-size: var(--text-h3);
  margin: 0 0 var(--space-3);
  line-height: var(--leading-snug);
}
.ft-post-card__title a { color: var(--plum-900); text-decoration: none; }
.ft-post-card__title a:hover { color: var(--link-hover); }
.ft-post-card__excerpt { color: var(--text-on-light-secondary); flex: 1; margin-bottom: var(--space-5); }
.ft-post-card__more {
  align-self: flex-start;
  font-weight: var(--weight-bold);
  color: var(--link);
  text-decoration: none;
}
.ft-post-card__more:hover { color: var(--link-hover); text-decoration: underline; }

/* ---------- Empty / loading states ----------------------------------- */
.ft-state {
  text-align: center;
  padding: var(--space-16) var(--space-5);
  background: var(--white);
  border: 1px dashed var(--border-subtle);
  border-radius: var(--radius-md);
}
.ft-state svg { width: 46px; height: 46px; color: var(--plum-500); margin: 0 auto var(--space-4); opacity: 0.7; }
.ft-state h2 { font-size: var(--text-h3); margin-bottom: var(--space-2); }
.ft-state p { color: var(--text-on-light-secondary); max-width: 34rem; margin-inline: auto; }

/* Skeleton cards while the query runs */
.ft-skeleton { border-radius: var(--radius-md); overflow: hidden; background: var(--white);
  border: 1px solid var(--border-subtle); }
.ft-skeleton__media { aspect-ratio: 4 / 5; background: var(--plum-050); }
.ft-skeleton__line { height: 12px; margin: var(--space-3) var(--space-4); border-radius: 6px;
  background: var(--plum-050); }
.ft-skeleton__line:last-child { width: 60%; margin-bottom: var(--space-5); }
@media (prefers-reduced-motion: no-preference) {
  .ft-skeleton__media, .ft-skeleton__line { animation: ft-pulse 1.4s ease-in-out infinite; }
}
@keyframes ft-pulse { 50% { opacity: 0.55; } }

/* ---------- Profile detail ------------------------------------------- */
.ft-profile__grid { display: grid; gap: var(--space-8); align-items: start; }
@media (min-width: 900px) { .ft-profile__grid { grid-template-columns: 380px 1fr; } }

.ft-profile__photo {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  background: var(--plum-050);
  aspect-ratio: 4 / 5;
  position: relative;
}
/* Same aspect-ratio caveat as the card media above. */
.ft-profile__photo img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}

.ft-thumbs { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-top: var(--space-4); }
.ft-thumbs button {
  width: 64px; height: 64px; padding: 0;
  border: 2px solid transparent; border-radius: var(--radius-sm);
  overflow: hidden; cursor: pointer; background: none;
}
.ft-thumbs button[aria-current="true"] { border-color: var(--gold-500); }
.ft-thumbs img { width: 100%; height: 100%; object-fit: cover; }

.ft-facts { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
@media (min-width: 560px) { .ft-facts { grid-template-columns: repeat(2, 1fr); } }
.ft-facts li {
  padding: var(--space-4) 0;
  border-bottom: 1px solid var(--border-subtle);
}
.ft-facts dt {
  font-size: var(--text-caption); text-transform: uppercase;
  letter-spacing: var(--tracking-wide); color: var(--text-muted);
  margin-bottom: 2px;
}
.ft-facts dd {
  margin: 0; font-weight: var(--weight-semibold); color: var(--plum-900);
  overflow-wrap: anywhere;
}

/* Fixed (non-selectable) filter — opposite-gender matching is a rule */
.ft-fixed-filter {
  display: flex; align-items: center; gap: var(--space-2);
  margin: 0;
  min-height: 50px;
  padding: 0.85rem 1rem;
  background: var(--plum-050);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  font-weight: var(--weight-semibold);
  color: var(--plum-900);
  text-transform: capitalize;
}
.ft-fixed-filter svg { width: 18px; height: 18px; color: var(--gold-600); flex-shrink: 0; }

/* ---------- Photo upload --------------------------------------------- */
.ft-photo-upload { display: flex; gap: var(--space-5); align-items: flex-start; }
@media (max-width: 480px) { .ft-photo-upload { flex-direction: column; } }

.ft-photo-upload__preview {
  position: relative;
  flex: 0 0 auto;
  width: 116px; height: 145px;      /* 4:5, same crop as a profile card */
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--plum-050);
  border: 1px dashed var(--border-subtle);
}
.ft-photo-upload__preview::after {
  content: "No photo";
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: var(--text-caption);
  color: var(--text-muted);
}
/* Once an <img> is present it covers the ::after label */
.ft-photo-upload__preview img {
  position: absolute; inset: 0; z-index: 1;
  width: 100%; height: 100%;
  object-fit: cover;
}

.ft-photo-upload__controls { display: flex; flex-direction: column; gap: var(--space-2); flex: 1 1 auto; }
.ft-photo-upload__controls label.ft-btn { align-self: flex-start; cursor: pointer; }
.ft-photo-upload__status { font-size: var(--text-caption); color: var(--success); font-weight: var(--weight-semibold); }
.ft-photo-upload__status.is-error { color: var(--danger); }

/* Keyboard focus has to be visible on the label, since the real input is
   visually hidden. */
#pf-photo:focus-visible + .ft-hint,
#pf-photo:focus-visible ~ label,
label[for="pf-photo"]:focus-within { outline: 3px solid var(--gold-500); outline-offset: 2px; }

/* Wider card for the profile form */
.ft-auth__card--wide { max-width: 620px; }

.ft-fieldset { border: 0; margin-inline: 0; padding: 0; }
.ft-fieldset legend { padding: 0; }

.ft-radio-row { display: flex; flex-wrap: wrap; gap: var(--space-3); }
.ft-radio {
  flex: 1 1 140px;
  display: flex; align-items: center; gap: var(--space-3);
  padding: 0.9rem 1.1rem;
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-weight: var(--weight-semibold);
  transition: border-color var(--duration-fast) var(--ease-standard),
              background-color var(--duration-fast) var(--ease-standard);
  min-height: 52px;
}
.ft-radio:hover { border-color: var(--plum-500); }
.ft-radio input { accent-color: var(--plum-600); width: 20px; height: 20px; }
.ft-radio:has(input:checked) {
  border-color: var(--plum-600);
  background: var(--plum-050);
}

.ft-grid-2 { display: grid; gap: 0 var(--space-5); }
@media (min-width: 560px) { .ft-grid-2 { grid-template-columns: 1fr 1fr; } }

/* OTP entry — one field, not six boxes: it accepts SMS autofill via
   autocomplete="one-time-code" and is far easier to use on a phone. */
.ft-otp-input {
  width: 100%;
  font-family: var(--font-heading);
  font-size: 1.9rem;
  font-weight: var(--weight-bold);
  letter-spacing: 0.55em;
  text-indent: 0.55em;   /* offsets the trailing letter-space so it looks centred */
  text-align: center;
  padding: 0.85rem 1rem;
  min-height: 66px;
  color: var(--plum-900);
  background: var(--white);
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-sm);
}
.ft-otp-input:focus {
  outline: none;
  border-color: var(--plum-600);
  box-shadow: 0 0 0 3px rgba(77, 39, 119, 0.16);
}
.ft-otp-input[aria-invalid="true"] {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px rgba(168, 50, 70, 0.14);
}

.ft-resend {
  display: flex; flex-wrap: wrap; align-items: center;
  justify-content: space-between; gap: var(--space-3);
  margin-top: var(--space-5);
  font-size: var(--text-body-sm);
}
.ft-resend__timer { color: var(--text-muted); }
.ft-resend__btn {
  background: none; border: 0; padding: 0; cursor: pointer;
  font-family: var(--font-body); font-size: var(--text-body-sm);
  font-weight: var(--weight-bold); color: var(--link);
  text-decoration: underline; text-underline-offset: 3px;
}
.ft-resend__btn:hover { color: var(--link-hover); }
.ft-resend__btn[disabled] { opacity: 0.5; cursor: not-allowed; }

.ft-sent-to {
  text-align: center;
  margin-bottom: var(--space-6);
  font-size: var(--text-body-sm);
  color: var(--text-on-light-secondary);
}
.ft-sent-to strong {
  display: block; margin-top: var(--space-1);
  font-size: var(--text-body-lg); color: var(--plum-900);
}

/* reCAPTCHA is invisible, but Firebase still needs a real element to
   mount into. Keep it in the layout (not display:none) or the challenge
   can fail to render when Google does decide to show one. */
#recaptcha-container { display: flex; justify-content: center; }

/* Signed-in nav actions */
.ft-nav__actions [data-signout] {
  background: none; border: 0; cursor: pointer;
  font-family: var(--font-heading); font-weight: var(--weight-semibold);
  font-size: 1.02rem; color: var(--white); padding: 0.55rem 0.5rem;
}
.ft-nav__actions [data-signout]:hover { color: var(--accent-gold); }

/* Phone field with a fixed +91 prefix */
.ft-phone-group { display: flex; }
.ft-phone-group__prefix {
  display: flex; align-items: center; gap: var(--ft-space-2);
  padding-inline: var(--ft-space-4);
  background: var(--ft-ivory-warm);
  border: 1px solid var(--ft-line);
  border-right: 0;
  border-radius: var(--ft-radius-sm) 0 0 var(--ft-radius-sm);
  font-weight: 600;
  color: var(--ft-ink);
  white-space: nowrap;
}
.ft-phone-group .ft-input {
  border-radius: 0 var(--ft-radius-sm) var(--ft-radius-sm) 0;
  letter-spacing: 0.06em;
}

/* Footer ------------------------------------------------------------- */
/* ---------- Footer ---------------------------------------------------- */
.ft-footer {
  background: var(--ft-purple-darker);
  color: rgba(255, 255, 255, 0.72);
  padding-block: var(--ft-space-7) var(--ft-space-5);
  font-size: var(--ft-text-sm);
}
.ft-footer__grid { display: grid; gap: var(--ft-space-6); }
@media (min-width: 700px) { .ft-footer__grid { grid-template-columns: 1.5fr 1fr 1fr; } }
@media (min-width: 980px) { .ft-footer__grid { grid-template-columns: 1.8fr 1fr 1fr 1.2fr; } }

.ft-footer h2 {
  font-size: var(--ft-text-sm); font-family: var(--ft-font-body);
  font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--ft-gold); margin-bottom: var(--ft-space-4);
}
.ft-footer ul { list-style: none; margin: 0; padding: 0; }
.ft-footer li { margin-bottom: var(--ft-space-3); }
.ft-footer a { color: rgba(255, 255, 255, 0.72); text-decoration: none; }
.ft-footer a:hover { color: var(--ft-gold); }

.ft-footer__brand { display: flex; align-items: center; gap: var(--ft-space-3); margin-bottom: var(--ft-space-4); }
.ft-footer__brand img { width: 44px; height: 44px; object-fit: contain; }
.ft-footer__brand-name { font-family: var(--ft-font-display); font-size: 1.1rem; font-weight: 700; color: #fff; }
.ft-footer__brand-tag { font-family: var(--ft-font-serif); font-style: italic; font-size: 0.75rem; color: var(--ft-gold); }
.ft-footer__about { max-width: 26rem; }

.ft-footer__bottom {
  display: flex; flex-wrap: wrap; gap: var(--ft-space-3) var(--ft-space-5);
  align-items: center; justify-content: space-between;
  margin-top: var(--ft-space-6);
  padding-top: var(--ft-space-5);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: var(--ft-text-xs);
  color: rgba(255, 255, 255, 0.55);
}
.ft-footer__bottom nav { display: flex; flex-wrap: wrap; gap: var(--ft-space-4); }
