/* ==========================================================================
   Aqua Club guide (/loyalty-guide). Built on static/css/ae-ui.css: the page_hero banner, .ae-section, .ae-section-head,
   .ae-steps, .ae-alert, .ae-faq, .ae-band and the tokens. This file only adds what the guide has of its own (ways to
   earn, the worked example, the tier cards) and is scoped under .lg so nothing leaks into other pages.
   Calm by design: flat panels for information, bordered cards only for the tiers, one navy band for the call to
   action, no scroll animations.
   ========================================================================== */

.lg { overflow-x: clip; }

/* --- In-page navigation under the banner ---------------------------------------------------------------------- */
.lg-bar { border-bottom: 1px solid var(--ae-line); background: var(--ae-surface); }
.lg-bar__inner { display: flex; flex-wrap: wrap; align-items: center; gap: var(--ae-s3) var(--ae-s5); padding-block: var(--ae-s4); }
.lg-bar__nav { flex: 1 1 520px; min-width: 0; }
.lg-bar .ae-chip { min-height: 44px; }
.lg-bar__cta { flex: none; }
@media (max-width: 767px) {
  /* One flex line: a wrapping column sizes its line to the chip row's max-content, so the row overflowed the screen
     (clipped by .lg) instead of scrolling. nowrap makes the line the container's width and the chip row scrolls. */
  .lg-bar__inner { flex-direction: column; flex-wrap: nowrap; align-items: stretch; }
  .lg-bar__nav { flex-basis: auto; width: 100%; }
  .lg-bar .ae-chips--scroll { margin-inline: calc(-1 * var(--ae-gutter)); padding-inline: var(--ae-gutter); }
  .lg-bar__cta { width: 100%; }
}
@media (min-width: 768px) {
  .lg-bar .ae-chip { min-height: 38px; }
}

.lg-section { scroll-margin-top: calc(var(--ae-header-h) + 8px); }
.lg .ae-section-head__title { font-size: var(--ae-text-h2); }
.lg-sub { margin-top: var(--ae-s8); }
.lg-sub__title { margin: 0 0 var(--ae-s5); font-size: var(--ae-text-h3); }
.lg-note { margin: var(--ae-s5) 0 0; }
.lg-note strong { color: var(--ae-ink); }
.lg-notes { margin-top: var(--ae-s6); align-items: stretch; }
.lg-notes .lg-note { height: 100%; margin: 0; }
.lg-fineprint { display: flex; gap: 8px; max-width: 80ch; margin: var(--ae-s4) 0 0; color: var(--ae-ink-soft); font-size: 14px; line-height: 1.55; }
.lg-fineprint i { flex: none; margin-top: 3px; color: var(--ae-aqua-deep); }

/* --- Ways to earn: a two-column list of icon rows, the purchase rule first and wider --------------------------- */
.lg-ways {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0 var(--ae-s7);
  margin: 0;
  padding: 0;
  list-style: none;
}
.lg-way {
  display: flex;
  align-items: flex-start;
  gap: var(--ae-s4);
  margin: 0;
  padding: var(--ae-s5) 0;
  border-top: 1px solid var(--ae-line);
}
.lg-way__title { margin: 2px 0 6px; font-size: 18px; font-weight: 800; line-height: 1.3; }
.lg-way__text { margin: 0; font-size: 15.5px; line-height: 1.6; }
.lg-way--main { border-top: 0; padding-top: 0; }
.lg-way--main .lg-way__title { font-size: var(--ae-text-h3); }
.lg-way--main .lg-way__text { color: var(--ae-ink); font-size: var(--ae-text-lead); }
@media (min-width: 768px) {
  .lg-ways { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lg-way--main { grid-column: 1 / -1; padding-bottom: var(--ae-s5); }
}
.lg-streak-list { display: grid; gap: 10px; margin: 8px 0 0; padding: 0; list-style: none; }
.lg-streak-list li { display: grid; gap: 2px; margin: 0; }
.lg-streak-list strong { color: var(--ae-ink); font-size: 15px; }
.lg-streak-list span { color: var(--ae-ink-soft); font-size: 15px; line-height: 1.55; }

/* --- Worked example ---------------------------------------------------------------------------------------------- */
.lg-example { margin-top: var(--ae-s5); padding: clamp(20px, 3vw, 32px); }
.lg-example__title { margin: 0 0 8px; font-size: 18px; font-weight: 800; }
.lg-example__body { max-width: 70ch; margin: 0; color: var(--ae-ink); font-size: 16px; line-height: 1.6; }
.lg-example__math {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 12px;
  margin: 16px 0 0;
  color: var(--ae-navy);
  font-size: clamp(20px, 1.2vw + 15px, 26px);
  font-weight: 800;
  line-height: 1.3;
  font-variant-numeric: tabular-nums;
}
.lg-example__op { color: var(--ae-aqua-deep); font-weight: 600; }
.lg-example__math strong { color: var(--ae-ink); }

/* --- Tiers -------------------------------------------------------------------------------------------------------- */
.lg-section--tiers { background: var(--ae-pale); }
.lg-tiers { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--ae-s4); }
@media (min-width: 640px) {
  .lg-tiers { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1100px) {
  .lg-tiers { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.lg-tier {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 26px 22px 22px;
  border: 1px solid var(--ae-line);
  border-radius: var(--ae-r);
  background: var(--ae-surface);
  overflow: hidden;
}
.lg-tier::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--tier-accent, var(--ae-aqua)); }
/* The accent colours the bar and the crest only; text stays ink (the old tier-coloured threshold was 3.2–4.4:1). */
.lg-tier--bronze { --tier-accent: linear-gradient(90deg, #D08B4F, #A96A2E); }
.lg-tier--silver { --tier-accent: linear-gradient(90deg, #AEBFCA, #8195A3); }
.lg-tier--gold { --tier-accent: linear-gradient(90deg, #FFD166, #F2A93B); }
.lg-tier--platinum { --tier-accent: linear-gradient(90deg, #00D4FF, #7B86FF); border-color: #B9D6E6; }
.lg-tier__head { display: flex; align-items: center; gap: 14px; }
.lg-tier__crest {
  display: grid;
  place-items: center;
  flex: none;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--tier-accent, var(--ae-aqua));
  color: #fff;
  font-size: 20px;
}
.lg-tier__name { margin: 0; font-size: 21px; font-weight: 800; line-height: 1.2; }
.lg-tier__threshold { margin: 2px 0 0; color: var(--ae-ink-soft); font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; }
.lg-tier__tag { margin: 14px 0 0; color: var(--ae-ink-soft); font-size: 14px; line-height: 1.5; }
.lg-tier__stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 16px 0;
  padding: 14px 0;
  border-top: 1px solid var(--ae-line);
  border-bottom: 1px solid var(--ae-line);
  list-style: none;
}
/* A card with no perk list ends on its facts: no closing rule under them. */
.lg-tier__stats:last-child { margin-bottom: 0; padding-bottom: 0; border-bottom: 0; }
.lg-tier__stats li { display: flex; flex-direction: column; gap: 2px; margin: 0; min-width: 0; }
.lg-tier__stats strong { color: var(--ae-ink); font-size: 24px; font-weight: 800; line-height: 1.15; font-variant-numeric: tabular-nums; white-space: nowrap; }
.lg-tier__stats span { color: var(--ae-ink-soft); font-size: 13px; font-weight: 600; line-height: 1.35; }
.lg-stat__sup { margin-left: 1px; color: var(--ae-aqua-deep); font-size: .55em; vertical-align: super; }
.lg-tier__perks { display: grid; gap: 9px; margin: 0; padding: 0; list-style: none; }
.lg-tier__perks li { display: flex; gap: 10px; margin: 0; color: var(--ae-ink-soft); font-size: 14px; line-height: 1.45; }
.lg-tier__perks i { flex: none; margin-top: 4px; color: var(--ae-ok); font-size: 12px; }
.lg-section--tiers .lg-fineprint { margin-top: var(--ae-s5); }

/* --- Steps (referral, promotion, redemption) --------------------------------------------------------------------- */
.lg-steps { margin-top: var(--ae-s2); }
.lg-steps .ae-steps__title { margin: 6px 0 4px; font-size: 17px; }
.lg-steps .ae-steps__text { font-size: 15px; line-height: 1.6; }
.lg-steps .lg-steps__only { padding-top: 7px; color: var(--ae-ink); font-weight: 600; }

/* --- Information panels (two kinds of AquaCoins, rewards) --------------------------------------------------------- */
.lg-panel {
  height: 100%;
  padding: var(--ae-s5);
  border: 1px solid var(--ae-line);
  border-radius: var(--ae-r);
  background: var(--ae-surface);
}
.ae-section--tint .lg-panel { background: var(--ae-surface); }
.lg-section:not(.ae-section--tint) .lg-panel { background: var(--ae-bg); }
.lg-panel__title { margin: var(--ae-s4) 0 6px; font-size: 19px; font-weight: 800; }
.lg-panel__text { margin: 0; font-size: 15.5px; line-height: 1.6; }

/* --- FAQ and closing panel ---------------------------------------------------------------------------------------- */
.lg-faq { max-width: 820px; }
.lg-faq .ae-faq__a p { max-width: 66ch; margin: 0; font-size: 16px; line-height: 1.65; }
/* A tinted panel, not a second navy band: the footer's bot band follows right after it. */
.lg-close { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--ae-s4) var(--ae-s6); padding: clamp(20px, 3vw, 32px); }
.lg-close__text { flex: 1 1 360px; min-width: 0; }
.lg-close__title { margin: 0 0 6px; font-size: clamp(22px, .8vw + 17px, 28px); }
.lg-close__body { max-width: 62ch; margin: 0; color: var(--ae-ink-soft); font-size: 16px; line-height: 1.6; }
@media (max-width: 575px) {
  .lg-close__btn { width: 100%; }
}
