/* ============================================================================
   V3 BROADCAST — Bold Kinetic Momentum
   Ray White Sherwood · FY27 Centenary Campaign
   Palette: #FFE512 yellow / #000 black / #FFF white / #E63946 accent-red
   ========================================================================== */


/* === RESET & BASE === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }

/* ============================================================================
   TOKEN SYSTEM — V3 BROADCAST
   All semantic colours defined here. Raw hex/rgba permitted ONLY in this block.
   ============================================================================ */

/* --- Structural / theme-independent --- */
:root {
  /* Legacy aliases kept for JS growthColor() compatibility */
  --yellow:    #FFE512;
  --yellow-d:  #E8D000;
  --black:     #000000;
  --white:     #FFFFFF;
  --red:       #E63946;
  --grey-900:  #0D0D0D;
  --grey-800:  #111111;
  --grey-700:  #1A1A1A;
  --grey-600:  #2A2A2A;
  --grey-500:  #444444;
  --grey-300:  #888888;
  --grey-100:  #CCCCCC;

  /* Typography */
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body:    'Lato', -apple-system, sans-serif;

  /* Layout / spacing — theme-independent */
  --ticker-h: 44px;
  --nav-h:    58px;
  --r-sm: 4px;
  --r-md: 8px;
  --r-lg: 14px;
  --ease-out:   cubic-bezier(0.2, 0, 0, 1);
  --ease-sharp: cubic-bezier(0.4, 0, 0.6, 1);
}

/* ── DARK THEME (default) ─────────────────────────────────────────────────── */
:root,
:root[data-theme="dark"] {
  --bg-page:          #000000;
  --bg-section-alt:   #111111;
  --bg-card:          #1A1A1A;
  --bg-card-raised:   #1A1A1A;
  --bg-input:         rgba(255,255,255,0.07);
  --bg-toggle-group:  rgba(255,255,255,0.05);
  --bg-coach:         #1a1a1a;

  --text-primary:     #FFFFFF;
  --text-secondary:   rgba(255,255,255,0.85);
  --text-muted:       rgba(255,255,255,0.60);
  --text-faint:       rgba(255,255,255,0.45);
  --text-on-yellow:   #000000;
  --text-on-red:      #FFFFFF;

  --accent-yellow:       #FFE512;
  --accent-yellow-hover: #E8D000;
  --accent-red:          #E63946;

  --border-subtle:    rgba(255,255,255,0.08);
  --border-medium:    rgba(255,255,255,0.15);
  --border-strong:    rgba(255,255,255,0.25);
  --border-yellow:    rgba(255,229,18,0.25);
  --border-yellow-strong: rgba(255,229,18,0.50);

  --shadow-card:      none;
  --shadow-modal:     0 24px 80px rgba(0,0,0,0.8);

  --focus-ring:       #FFE512;

  /* Growth ramp — dark mode */
  --growth-negative:  #4A5568;
  --growth-floor:     #5C4A1E;
  --growth-low:       #8B6914;
  --growth-mid:       #B8860B;
  --growth-high:      #FFE512;
  --growth-peak:      #FFFDE0;

  /* Map */
  --map-bg:              #1A1A1A;
  --map-polygon-stroke:  rgba(255,255,255,0.25);
  --tooltip-bg:          rgba(0,0,0,0.92);
  --tooltip-border:      rgba(255,229,18,0.5);

  /* Ticker */
  --ticker-bg:         #FFE512;
  --ticker-text:       #000000;
  --ticker-label-bg:   #000000;
  --ticker-label-text: #FFE512;

  /* Nav */
  --nav-bg:     #000000;
  --nav-border: rgba(255,255,255,0.10);

  /* Overlay */
  --overlay-bg: rgba(0,0,0,0.90);

  /* Legend */
  --legend-bg:  rgba(0,0,0,0.88);
}

/* ── LIGHT THEME ──────────────────────────────────────────────────────────── */
:root[data-theme="light"] {
  --bg-page:          #FAF7F2;
  --bg-section-alt:   #F2EDE6;
  --bg-card:          #FFFFFF;
  --bg-card-raised:   #FFFFFF;
  --bg-input:         #F7F4EE;
  --bg-toggle-group:  rgba(0,0,0,0.05);
  --bg-coach:         #FFFEF8;

  --text-primary:     #0D0C09;
  --text-secondary:   #1F1C15;
  --text-muted:       #4A4538;
  --text-faint:       #6B6252;
  --text-on-yellow:   #000000;
  --text-on-red:      #FFFFFF;

  --accent-yellow:       #FFE512;
  --accent-yellow-hover: #E8D000;
  --accent-red:          #C9323E;

  --border-subtle:    rgba(0,0,0,0.08);
  --border-medium:    rgba(0,0,0,0.14);
  --border-strong:    rgba(0,0,0,0.24);
  --border-yellow:    rgba(180,145,0,0.30);
  --border-yellow-strong: rgba(180,145,0,0.60);

  --shadow-card:      0 2px 8px rgba(15,12,5,0.08), 0 1px 2px rgba(15,12,5,0.06);
  --shadow-modal:     0 24px 80px rgba(15,12,5,0.20);

  --focus-ring:       #B8860B;

  /* Growth ramp — light mode (darker to stay readable on cream) */
  --growth-negative:  #4A5568;
  --growth-floor:     #6B4E1A;
  --growth-low:       #7A5C10;
  --growth-mid:       #9A7209;
  --growth-high:      #D4B800;
  --growth-peak:      #B8A600;

  /* Map */
  --map-bg:              #F0EBE2;
  --map-polygon-stroke:  rgba(0,0,0,0.20);
  --tooltip-bg:          rgba(255,252,245,0.98);
  --tooltip-border:      rgba(180,145,0,0.45);

  /* Ticker — keep yellow, it's brand */
  --ticker-bg:         #FFE512;
  --ticker-text:       #000000;
  --ticker-label-bg:   #000000;
  --ticker-label-text: #FFE512;

  /* Nav */
  --nav-bg:     #FAF7F2;
  --nav-border: rgba(0,0,0,0.10);

  /* Overlay */
  --overlay-bg: rgba(15,12,5,0.55);

  /* Legend */
  --legend-bg:  rgba(255,252,245,0.96);
}

/* ── TEXT SIZE SYSTEM ─────────────────────────────────────────────────────── */
:root[data-text-size="large"] { font-size: 18px; }
:root[data-text-size="xl"]    { font-size: 20px; }

/* SVG text scales via em from this font-size bridge */
#choropleth-svg { font-size: 1rem; }

/* ── THEME TRANSITION — smooth swap (200ms, bg + color + border only) ─────── */
body {
  transition: background-color 200ms ease, color 200ms ease;
}
.site-nav,
.site-footer,
.suburb-tile,
.modal-panel,
.worthish-card,
.booking-section,
.grid-section,
.worthish-section,
.map-container,
.countdown-widget {
  transition: background-color 200ms ease, border-color 200ms ease, color 200ms ease;
}
@media (prefers-reduced-motion: reduce) {
  body,
  .site-nav, .site-footer, .suburb-tile, .modal-panel,
  .worthish-card, .booking-section, .grid-section, .worthish-section,
  .map-container, .countdown-widget {
    transition-duration: 0ms !important;
  }
}

body {
  font-family: var(--font-body);
  background: var(--bg-page);
  color: var(--text-primary);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* === ACCESSIBILITY === */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .ticker-track { animation: none !important; }
  .ticker-tape { display: none; }
}

.sr-only {
  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 — visually hidden until focused */
.skip-link {
  position: absolute;
  top: -100px;
  left: 12px;
  z-index: 9999;
  background: var(--yellow);
  color: var(--black);
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 900;
  padding: 10px 18px;
  border-radius: var(--r-sm);
  text-decoration: none;
  white-space: nowrap;
  transition: top 0.2s;
}
.skip-link:focus {
  top: 12px;
  outline: 3px solid var(--black);
  outline-offset: 2px;
}

/* === FOCUS VISIBILITY — additional rules for Phase A === */
.nav-cta:focus-visible {
  outline: 3px solid var(--black);
  outline-offset: 2px;
}
.map-info-btn:focus-visible {
  outline: 2px solid var(--yellow);
  outline-offset: 2px;
}
.modal-close:focus-visible {
  outline: 2px solid var(--yellow);
  outline-offset: 2px;
}
.postcode-chip:focus-visible {
  outline: 2px solid var(--yellow);
  outline-offset: 2px;
}

/* === TICKER TAPE (sticky) === */
.ticker-tape {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--ticker-h);
  background: var(--ticker-bg);
  overflow: hidden;
  border-bottom: 2px solid var(--ticker-text);
}

.ticker-wrapper {
  display: flex;
  align-items: center;
  height: 100%;
  overflow: hidden;
}

.ticker-label {
  flex-shrink: 0;
  background: var(--ticker-label-bg);
  color: var(--ticker-label-text);
  font-family: var(--font-body);
  font-size: 0.65rem;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 0 14px;
  height: 100%;
  display: flex;
  align-items: center;
  z-index: 2;
}

.ticker-scroll {
  flex: 1;
  overflow: hidden;
  height: 100%;
  position: relative;
}

.ticker-track {
  display: flex;
  align-items: center;
  height: 100%;
  white-space: nowrap;
  will-change: transform;
  animation: ticker-scroll 60s linear infinite;
}

.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 24px;
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--ticker-text);
  letter-spacing: 0.04em;
}

.ticker-item .suburb-name {
  text-transform: uppercase;
}

.ticker-item .growth {
  font-weight: 900;
  color: var(--ticker-text);
}

/* Hot positive (≥ +10%): bold black + subtle opacity pulse */
.ticker-item.is-hot .growth {
  color: #000000;
  font-weight: 800;
  font-size: 0.88rem;
  animation: ticker-hot-pulse 2s ease-in-out infinite;
}

/* Negative growth: red (only case red is used in ticker) */
.ticker-item.is-negative .growth {
  color: #7a0c1c;
  font-weight: 800;
  font-size: 0.88rem;
}

/* Hot arrow: dark amber inline SVG injected by JS */
.ticker-item.is-hot .ticker-hot-arrow {
  display: inline-block;
  margin-right: 3px;
  vertical-align: middle;
}

@keyframes ticker-hot-pulse {
  0%   { opacity: 1; }
  50%  { opacity: 0.7; }
  100% { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .ticker-item.is-hot .growth {
    animation: none;
  }
}

.ticker-item .dot {
  width: 4px; height: 4px;
  background: var(--ticker-text);
  border-radius: 50%;
  opacity: 0.4;
}

@keyframes ticker-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* === NAV === */
.site-nav {
  position: sticky;
  top: var(--ticker-h);
  z-index: 90;
  height: var(--nav-h);
  background: var(--nav-bg);
  border-bottom: 1px solid var(--nav-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(16px, 4vw, 48px);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

/* === NAV LOGO LOCKUP — yellow block + ink wordmark (mirrors live raywhitesherwood.com.au) === */
.nav-logo-lockup {
  background: #FFE512;
  border-radius: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 7px 10px;
  flex-shrink: 0;
  /* Yellow block is constant on both themes — wordmark is always ink (#52524F) */
}

.nav-wordmark {
  display: block;
  width: 108px;
  height: 22px;
  /* SVG renders charcoal ink on the yellow background — always readable */
}

.nav-brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.nav-brand-text .office {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--text-primary);
}

.nav-brand-text .centenary {
  font-size: 0.55rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-top: 2px;
}

.nav-cta {
  background: var(--yellow);
  color: var(--black);
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 9px 18px;
  border-radius: var(--r-sm);
  text-decoration: none;
  transition: background 0.15s;
}
.nav-cta:hover { background: var(--accent-yellow-hover); }

/* === NAV CONTROLS (theme + text-size toggles) === */
.nav-controls {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-right: 10px;
}

.nav-ctrl-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1.5px solid var(--border-strong);
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 900;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 200ms ease, color 200ms ease;
  line-height: 1;
  padding: 0;
}

.nav-ctrl-btn:hover {
  border-color: var(--accent-yellow);
  color: var(--accent-yellow);
}

:root[data-theme="light"] .nav-ctrl-btn:hover {
  border-color: #8B6914; /* 4.76:1 on cream — passes WCAG AA for normal text */
  color: #8B6914;
}

.nav-ctrl-btn:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}

@media (max-width: 480px) {
  #text-size-btn { display: none; }
  /* On small screens, hide the campaign subtitle to keep the nav uncluttered */
  .nav-brand-text .centenary { display: none; }
  /* Slightly reduce the wordmark block on mobile */
  .nav-logo-lockup { padding: 6px 8px; }
  .nav-wordmark { width: 90px; height: 18px; }
}

/* === HERO === */
.hero {
  background: var(--bg-page);
  padding: clamp(48px, 8vw, 96px) clamp(16px, 4vw, 48px) clamp(32px, 5vw, 64px);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--yellow);
}

/* Scan-line decorative BG */
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 3px,
    rgba(255,229,18,0.015) 3px,
    rgba(255,229,18,0.015) 4px
  );
  pointer-events: none;
}

.hero-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  position: relative;
  z-index: 1;
}

@media (min-width: 900px) {
  .hero-inner {
    grid-template-columns: 1fr 380px;
    align-items: start;
  }
}

.hero-postcode-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.postcode-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  min-height: 44px;
  border: 1.5px solid rgba(255,229,18,0.35); /* always yellow tint — chips are on dark hero overlay */
  border-radius: var(--r-sm);
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: rgba(255,229,18,0.7); /* always yellow-tinted — on dark overlay */
  cursor: pointer;
  background: transparent;
  transition: all 0.15s;
  text-transform: uppercase;
}
.postcode-chip:hover,
.postcode-chip.active {
  background: var(--accent-yellow);
  color: var(--text-on-yellow);
  border-color: var(--accent-yellow);
}
.postcode-chip.active {
  font-weight: 900;
}
.postcode-chip .pc-dot {
  width: 6px; height: 6px;
  background: currentColor;
  border-radius: 50%;
}

.hero-headline {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(2.8rem, 6vw + 1rem, 6.5rem);
  line-height: 0.96;
  letter-spacing: -0.02em;
  color: #FFFFFF; /* always white — hero has dark photo overlay regardless of theme */
  margin-bottom: 24px;
}

.hero-headline .hl-accent {
  color: var(--yellow);
  display: block;
}

.hero-subhead {
  font-family: var(--font-body);
  font-size: clamp(0.95rem, 1.5vw, 1.15rem);
  line-height: 1.6;
  color: rgba(255,255,255,0.65); /* always over dark overlay */
  max-width: 560px;
  margin-bottom: 32px;
}

.hero-subhead .filter-rewrite {
  color: var(--yellow);
  font-weight: 700;
  transition: opacity 0.3s;
}

/* === HERO SIDEBAR === */
.hero-sidebar {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Countdown */
.countdown-widget {
  background: var(--bg-card);
  border: 1px solid var(--border-yellow);
  border-radius: var(--r-md);
  padding: 20px;
  position: relative;
  overflow: hidden;
}

.countdown-widget::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--yellow);
}

.countdown-label {
  font-size: 0.6rem;
  font-weight: 900;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--yellow);
  margin-bottom: 12px;
}

.countdown-digits {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.cd-unit {
  text-align: center;
}

.cd-number {
  font-family: var(--font-body);
  font-size: 1.9rem;
  font-weight: 900;
  line-height: 1;
  color: var(--text-primary);
  display: block;
  transition: transform 0.15s var(--ease-out), color 0.2s;
}

.cd-number.pulse {
  animation: cd-pulse 0.4s ease-out;
  color: var(--yellow);
}

@keyframes cd-pulse {
  0%  { transform: scale(1.25); }
  100%{ transform: scale(1); }
}

.cd-label {
  font-size: 0.55rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-top: 4px;
  display: block;
}

.countdown-prize {
  margin-top: 14px;
  font-size: 0.7rem;
  color: var(--text-muted);
  line-height: 1.4;
}
.countdown-prize strong {
  color: var(--yellow);
  font-weight: 900;
}

/* Bookings widget */
.bookings-widget {
  background: var(--yellow);
  border-radius: var(--r-md);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.bookings-icon {
  display: inline-block;
  flex-shrink: 0;
  color: var(--black);
  stroke: currentColor;
}

.bookings-content {}

.bookings-number {
  font-family: var(--font-body);
  font-size: 2.2rem;
  font-weight: 900;
  line-height: 1;
  color: var(--black);
}

.bookings-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(0,0,0,0.65);
  margin-top: 3px;
}

.bookings-note {
  font-size: 0.6rem;
  color: rgba(0,0,0,0.5);
  margin-top: 6px;
  font-style: italic;
}

/* === POSTCODE FILTER REWRITE === */
.filter-banner {
  background: rgba(255,229,18,0.08);
  border: 1px solid rgba(255,229,18,0.25);
  border-radius: var(--r-md);
  padding: 14px 20px;
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: var(--white);
  line-height: 1.5;
  display: none;
}

.filter-banner.visible { display: block; }

.filter-banner .filter-pc {
  font-size: 1.1rem;
  font-weight: 900;
  color: var(--yellow);
}

.filter-clear {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.75rem;
  text-decoration: underline;
  padding: 0;
  margin-top: 6px;
  display: block;
}

/* === SECTION LABEL === */
.section-label {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.6rem;
  font-weight: 900;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent-yellow);
  margin-bottom: 24px;
}
.section-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-subtle);
}

/* === SUBURB GRID === */
.grid-section {
  padding: clamp(32px, 5vw, 72px) clamp(16px, 4vw, 48px);
  background: var(--bg-section-alt);
}

.grid-section-inner {
  max-width: 1280px;
  margin: 0 auto;
}

.suburb-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
  transition: all 0.4s var(--ease-out);
}

/* Suburb tile */
.suburb-tile {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-md);
  padding: 20px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: border-color 0.15s, transform 0.15s, background 0.15s;
  opacity: 0;
  transform: translateY(20px);
}

.suburb-tile.visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.4s var(--ease-out), transform 0.4s var(--ease-out),
              border-color 0.15s, background 0.15s;
}

.suburb-tile:hover {
  border-color: var(--accent-yellow);
  background: var(--bg-section-alt);
  transform: translateY(-2px);
}

.suburb-tile:focus-visible {
  outline: 2px solid var(--yellow);
  outline-offset: 2px;
}

.suburb-tile.hidden-filter {
  opacity: 0;
  pointer-events: none;
  height: 0;
  padding: 0;
  margin: 0;
  border: none;
  overflow: hidden;
}

/* Growth accent bar */
.tile-accent-bar {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
}

.tile-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 12px;
}

.tile-name {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

.tile-postcode {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  margin-top: 3px;
}

.tile-growth {
  font-family: var(--font-body);
  font-size: 2.1rem;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.02em;
}

.tile-growth.positive { color: var(--yellow); }
.tile-growth.negative { color: var(--red); }

.tile-growth-label {
  font-size: 0.55rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 2px;
  text-align: right;
}

.tile-meta {
  display: flex;
  gap: 16px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border-subtle);
}

.tile-meta-item {
  flex: 1;
}

.tile-meta-label {
  font-size: 0.55rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 3px;
}

.tile-meta-value {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-secondary);
}

/* Sparkline */
.tile-sparkline {
  width: 100%;
  height: 28px;
  margin-top: 10px;
  opacity: 0.65;
}

/* === MAP MODULE === */
.map-section {
  padding: clamp(32px, 5vw, 72px) clamp(16px, 4vw, 48px);
  background: var(--bg-page);
}

.map-section-inner {
  max-width: 1280px;
  margin: 0 auto;
}

.map-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.map-toggle-group {
  display: flex;
  gap: 4px;
  background: var(--bg-toggle-group);
  border-radius: var(--r-sm);
  padding: 4px;
}

.map-toggle-btn {
  padding: 7px 14px;
  border-radius: var(--r-sm);
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: all 0.15s;
  text-transform: uppercase;
}

.map-toggle-btn.active {
  background: var(--accent-yellow);
  color: var(--text-on-yellow);
}

.map-toggle-btn:hover:not(.active) {
  color: var(--text-primary);
  background: var(--border-subtle);
}

.map-container {
  border-radius: var(--r-lg);
  overflow-x: hidden;
  overflow-y: auto;
  border: 1px solid var(--border-subtle);
  height: clamp(460px, 70vw, 640px);
  position: relative;
  background: var(--map-bg);
}

.map-container::-webkit-scrollbar { width: 6px; }
.map-container::-webkit-scrollbar-track { background: transparent; }
.map-container::-webkit-scrollbar-thumb { background: rgba(255,229,18,0.25); border-radius: 3px; }
.map-container::-webkit-scrollbar-thumb:hover { background: rgba(255,229,18,0.45); }

#map-canvas {
  width: 100%;
  height: 100%;
}

.map-legend {
  position: absolute;
  bottom: 16px;
  right: 16px;
  background: var(--legend-bg);
  border: 1px solid var(--border-medium);
  border-radius: var(--r-md);
  padding: 12px 16px;
  min-width: 140px;
  backdrop-filter: blur(8px);
}

.map-legend-title {
  font-size: 0.58rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.legend-gradient {
  height: 8px;
  border-radius: 4px;
  background: linear-gradient(to right, #5C4A1E 0%, #B8860B 35%, #FFE512 62%, #FFFDE0 100%);
  margin-bottom: 6px;
}

.legend-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.55rem;
  color: var(--text-faint);
}

.map-tooltip {
  position: absolute;
  background: var(--tooltip-bg);
  border: 1px solid var(--tooltip-border);
  border-radius: var(--r-sm);
  padding: 10px 14px;
  pointer-events: none;
  font-size: 0.75rem;
  white-space: nowrap;
  transform: translate(-50%, calc(-100% - 10px));
  z-index: 10;
  opacity: 0;
  transition: opacity 0.15s;
}

.map-tooltip.visible { opacity: 1; }

.tooltip-name {
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 3px;
}

.tooltip-value {
  color: var(--yellow);
  font-weight: 900;
}

/* === MAP CONTROLS ROW === */
.map-controls-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* === VIEW TOGGLE (Map | Rankings) === */
.view-toggle-group {
  display: flex;
  gap: 2px;
  background: var(--bg-toggle-group);
  border-radius: var(--r-sm);
  padding: 3px;
}

.view-toggle-btn {
  padding: 6px 14px;
  border-radius: var(--r-sm);
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: all 0.15s;
  text-transform: uppercase;
}

.view-toggle-btn.active {
  background: var(--accent-yellow);
  color: var(--text-on-yellow);
}

.view-toggle-btn:hover:not(.active) {
  color: var(--text-primary);
  background: var(--border-subtle);
}

/* === LABELS TOGGLE (Heat | Atlas) === */
.labels-toggle-group {
  display: flex;
  gap: 2px;
  background: var(--bg-toggle-group);
  border-radius: var(--r-sm);
  padding: 3px;
}

.labels-toggle-btn {
  padding: 6px 12px;
  border-radius: var(--r-sm);
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: all 0.15s;
  text-transform: uppercase;
}

.labels-toggle-btn.active {
  background: var(--border-strong);
  color: var(--text-primary);
}

.labels-toggle-btn:hover:not(.active) {
  color: var(--text-primary);
  background: var(--border-subtle);
}

/* === SHOW AREA TOGGLE (context layer) === */
.show-context-btn {
  padding: 6px 11px;
  border-radius: var(--r-sm);
  border: 1.5px solid var(--border-strong);
  background: var(--bg-toggle-group);
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: all 0.15s;
  text-transform: uppercase;
  white-space: nowrap;
}

.show-context-btn:hover {
  color: var(--text-primary);
  border-color: var(--border-strong);
  background: var(--border-subtle);
}

.show-context-btn.active {
  color: #3D9DD8;
  border-color: rgba(61,157,216,0.45);
  background: rgba(61,157,216,0.08);
}

:root[data-theme="light"] .show-context-btn.active {
  color: #2A7EB8;
  border-color: rgba(42,126,184,0.45);
  background: rgba(42,126,184,0.08);
}

.show-context-btn:focus-visible {
  outline: 2px solid var(--accent-yellow);
  outline-offset: 2px;
}

/* Context layer SVG labels */
.ctx-suburb-label {
  font-family: var(--font-body, 'Lato', sans-serif);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.12em;
  pointer-events: none;
}

.ctx-bridge-label {
  font-family: var(--font-body, 'Lato', sans-serif);
  font-weight: 700;
  letter-spacing: 0.06em;
  pointer-events: none;
}

/* prefers-reduced-motion: no transitions on context layer */
@media (prefers-reduced-motion: reduce) {
  .context-layer {
    transition: none !important;
  }
}

/* Map info button — opens "How to read the map" panel */
.map-info-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1.5px solid var(--border-strong);
  background: var(--bg-toggle-group);
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
  flex-shrink: 0;
}

.map-info-btn:hover {
  border-color: var(--yellow);
  color: var(--yellow);
  background: rgba(255,229,18,0.08);
}

/* === ATLAS LEGEND === */
.atlas-legend {
  margin-top: 16px;
  background: var(--legend-bg);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-md);
  padding: 14px 16px;
}

.atlas-legend-title {
  font-size: 0.55rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 12px;
}

.atlas-legend-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px 12px;
}

@media (max-width: 600px) {
  .atlas-legend-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.atlas-legend-item {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.atlas-legend-swatch {
  width: 14px;
  height: 14px;
  border-radius: 3px;
  flex-shrink: 0;
  display: inline-block;
}

.atlas-legend-name {
  font-size: 0.6rem;
  font-weight: 700;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.atlas-legend-pc {
  font-size: 0.55rem;
  color: var(--text-faint);
  margin-left: 2px;
  flex-shrink: 0;
}

/* === CHOROPLETH === */
.suburb-path {
  stroke: var(--map-polygon-stroke);
  stroke-width: 1px;
  cursor: pointer;
  transition: stroke 0.15s, stroke-width 0.15s;
}

.suburb-path:hover,
.suburb-path.highlighted {
  stroke: var(--yellow);
  stroke-width: 2.5px;
}

.suburb-path.ssw-selected {
  stroke: var(--yellow);
  stroke-width: 2px;
  filter: url(#ssw-polygon-glow);
}

.suburb-label {
  fill: rgba(255,255,255,0.9);
  font-family: var(--font-body);
  font-size: 0.5625em;
  font-weight: 700;
  text-anchor: middle;
  pointer-events: none;
  text-shadow: 0 1px 3px rgba(0,0,0,0.9);
}

.suburb-label-value {
  fill: rgba(255,255,255,0.75);
  font-family: var(--font-body);
  font-size: 0.5em;
  font-weight: 400;
  text-anchor: middle;
  pointer-events: none;
}

.choropleth-tooltip {
  position: absolute;
  background: var(--tooltip-bg);
  border: 1px solid var(--tooltip-border);
  border-radius: var(--r-sm);
  padding: 10px 14px;
  pointer-events: none;
  font-size: 0.75rem;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.12s;
  z-index: 20;
  color: var(--white);
}

.choropleth-tooltip.visible { opacity: 1; }

/* ── Mobile in-map info panel ──────────────────────────────────────────────── */
.map-info-panel {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  max-height: 54%;
  overflow-y: auto;
  padding: 22px 26px 26px;
  background: rgba(0,0,0,0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--white);
  z-index: 30;
  transform: translateY(100%);
  transition: transform 200ms ease-out, opacity 200ms ease-out;
  opacity: 0;
  border-top: 1px solid rgba(255,255,255,0.12);
  display: flex;
  flex-direction: column;
  visibility: hidden;
}

.map-info-panel.open {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
}

@media (prefers-reduced-motion: reduce) {
  .map-info-panel {
    transition: none;
  }
}

@media (max-width: 640px) {
  .map-info-panel {
    display: block;
  }
  /* On mobile suppress the floating tooltip entirely */
  .choropleth-tooltip { display: none !important; }
}

/* Panel internal layout */
.mip-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 18px;
}

.mip-name {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.4rem, 2.2vw, 1.8rem);
  font-weight: 700;
  color: var(--yellow);
  margin: 0;
  line-height: 1.2;
}

.mip-pc {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.55);
  margin-left: 8px;
}

.mip-close {
  width: 48px;
  height: 48px;
  min-width: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 50%;
  cursor: pointer;
  color: var(--white);
  font-size: 1.1rem;
  line-height: 1;
  touch-action: manipulation;
  flex-shrink: 0;
}

.mip-close:hover { background: rgba(255,255,255,0.16); }

.mip-grid {
  display: grid;
  grid-template-columns: minmax(76px, 120px) repeat(2, minmax(120px, 240px));
  gap: 9px clamp(20px, 4vw, 54px);
  width: min(100%, 760px);
  font-size: 0.92rem;
}

.mip-col-head {
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--yellow);
  text-transform: uppercase;
  padding-bottom: 4px;
}

.mip-spacer { /* empty top-left cell */ }

.mip-label {
  color: rgba(255,255,255,0.55);
  font-size: 0.84rem;
  white-space: nowrap;
  display: flex;
  align-items: center;
}

.mip-val {
  color: var(--white);
  font-size: 0.94rem;
  font-weight: 700;
  display: flex;
  align-items: center;
}

@media (max-width: 640px) {
  .map-info-panel { padding: 16px 18px 20px; }
  .mip-header { margin-bottom: 12px; }
  .mip-name { font-size: 1.3rem; }
  .mip-pc { font-size: 0.78rem; }
  .mip-grid {
    grid-template-columns: minmax(64px, 90px) repeat(2, minmax(82px, 1fr));
    gap: 7px 12px;
  }
  .mip-label { font-size: 0.76rem; }
  .mip-val { font-size: 0.84rem; }
}

/* ─────────────────────────────────────────────────────────────────────────
   DESKTOP CLICK-TRIGGERED POPOVER (replaces hover tooltip on desktop)
   ───────────────────────────────────────────────────────────────────────── */
.suburb-popover {
  position: absolute;
  background: rgba(0, 0, 0, 0.95);
  border: 1px solid rgba(255, 229, 18, 0.3);
  border-radius: var(--r-md);
  backdrop-filter: blur(8px);
  padding: 16px;
  max-width: 320px;
  z-index: 50;
  opacity: 0;
  pointer-events: none;
  transition: opacity 150ms ease;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
}

.suburb-popover[aria-hidden="false"] {
  opacity: 1;
  pointer-events: auto;
}

.popover-close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.08);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.7);
  transition: all 150ms ease;
  flex-shrink: 0;
}

.popover-close:hover {
  background: rgba(255, 255, 255, 0.15);
  color: var(--white);
}

.popover-close:focus-visible {
  outline: 2px solid var(--yellow);
  outline-offset: 2px;
}

.popover-inner {
  padding-top: 8px;
}

.popover-header {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 14px;
}

.popover-name {
  font-family: 'Playfair Display', serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--yellow);
  line-height: 1.2;
}

.popover-pc {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.5);
}

.popover-stats {
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 229, 18, 0.15);
}

.popover-grid {
  display: grid;
  grid-template-columns: auto 1fr 1fr;
  gap: 5px 10px;
  font-size: 0.68rem;
}

.popover-grid-spacer { /* empty top-left cell */ }

.popover-col-head {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: rgba(255, 229, 18, 0.7);
  text-transform: uppercase;
  padding-bottom: 4px;
}

.popover-grid .rtip-label {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.68rem;
  white-space: nowrap;
}

.popover-grid .rtip-val {
  color: var(--white);
  font-weight: 600;
  font-size: 0.72rem;
}

/* Amenities section */
.popover-amenities {
  font-size: 0.68rem;
}

.amenity-category {
  margin-bottom: 10px;
}

.amenity-category:last-child {
  margin-bottom: 0;
}

.amenity-category-title {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: rgba(255, 229, 18, 0.6);
  text-transform: uppercase;
  margin-bottom: 6px;
}

.amenity-item {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 5px 0;
  color: rgba(255, 255, 255, 0.75);
}

.amenity-name {
  font-weight: 500;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-right: 8px;
}

.amenity-distance {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.62rem;
  flex-shrink: 0;
}

/* Hide popover on mobile and smaller viewports */
@media (max-width: 800px) {
  .suburb-popover {
    display: none;
  }
}

/* Single-row legend spanning map bottom */
.choropleth-legend {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 28px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  font-size: 0.55rem;
  z-index: 8;
}

.choropleth-legend-label-left {
  font-size: 0.5rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}

.choropleth-legend-gradient {
  flex: 1;
  height: 6px;
  border-radius: 3px;
  min-width: 40px;
}

.choropleth-legend-ticks {
  font-size: 0.5rem;
  color: rgba(255,255,255,0.55);
  white-space: nowrap;
  flex-shrink: 0;
  letter-spacing: 0.04em;
}

/* Map action button group — reset (shown when zoomed) */
.choro-map-btns {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  gap: 6px;
  align-items: center;
  z-index: 10;
}

/* Reset button — visible only when zoomed; highlighted yellow accent */
.choro-reset-btn {
  background: rgba(0,0,0,0.75);
  border: 1px solid rgba(255,229,18,0.45);
  color: rgba(255,229,18,0.75);
  font-family: var(--font-body);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 5px 10px;
  border-radius: var(--r-sm);
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: all 0.15s;
}
.choro-reset-btn:hover {
  background: rgba(0,0,0,0.9);
  border-color: var(--yellow);
  color: var(--yellow);
}

/* Zoom hint — muted, fades after 4s on first viewport entry */
.zoom-hint {
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.58rem;
  font-family: var(--font-body);
  color: rgba(255,255,255,0.38);
  letter-spacing: 0.05em;
  white-space: nowrap;
  pointer-events: none;
  z-index: 5;
  opacity: 1;
  transition: opacity 0.6s ease-out;
}
.zoom-hint.hint-hidden {
  opacity: 0;
}
[data-theme="light"] .zoom-hint {
  color: rgba(60,60,60,0.45);
}

/* Grab cursor states for the SVG map */
#choropleth-svg {
  cursor: grab;
  touch-action: none; /* let D3 zoom handle touch */
}
#choropleth-svg.is-dragging {
  cursor: grabbing;
}
#choropleth-svg:focus {
  outline: 2px solid var(--yellow);
  outline-offset: 2px;
}

/* Progressive label visibility — controlled via JS data attribute on the g.choro-labels group */
/* Default: labels hidden when zoom=1 except top-3 and Sherwood */
text.suburb-label[data-label-tier="secondary"],
text.suburb-label-value[data-label-tier="secondary"] {
  /* opacity controlled by JS transitions */
}
text.suburb-label[data-label-tier="tertiary"],
text.suburb-label-value[data-label-tier="tertiary"] {
  /* opacity controlled by JS transitions */
}

/* Choropleth label styles */
.suburb-label--pinned {
  font-weight: 900;
  fill: rgba(255,255,255,0.95);
  font-size: 0.625em;
  stroke: rgba(0,0,0,0.85);
  stroke-width: 2.5px;
}

.suburb-label {
  stroke: rgba(0,0,0,0.75);
  stroke-width: 2px;
}

.suburb-label-value--top3 {
  fill: var(--yellow);
  font-size: 0.625em;
  font-weight: 700;
  stroke: rgba(0,0,0,0.8);
  stroke-width: 2px;
  paint-order: stroke fill;
}

/* Atlas mode labels */
.suburb-label--atlas {
  fill: var(--yellow);
  font-family: var(--font-body);
  font-size: 0.5em;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-anchor: middle;
  pointer-events: none;
  stroke: rgba(0,0,0,0.9);
  stroke-width: 3px;
  paint-order: stroke fill;
}

.suburb-label--atlas-num {
  fill: #000;
  font-family: var(--font-body);
  font-size: 0.5em;
  font-weight: 900;
  text-anchor: middle;
  pointer-events: none;
}

/* Rich tooltip content */
.choropleth-tooltip {
  min-width: 220px;
  max-width: 300px;
  white-space: normal;
  animation: rtip-fadein 0.12s ease-out;
}

@keyframes rtip-fadein {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .choropleth-tooltip { animation: none; }
}

.rtip-header {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 8px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  padding-bottom: 7px;
}

.rtip-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text-primary);
}

.rtip-pc {
  font-size: 0.6rem;
  color: var(--text-faint);
  font-weight: 400;
}

.rtip-grid {
  display: grid;
  grid-template-columns: minmax(0, max-content) 1fr 1fr;
  column-gap: 10px;
  row-gap: 6px;
  align-items: baseline;
  min-width: 220px;
}

.rtip-grid-spacer {
  /* blank top-left cell aligns with HOUSE / UNIT header row */
}

.rtip-col-head {
  font-size: 0.55rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  color: var(--yellow);
  text-transform: uppercase;
  text-align: left;
}

.rtip-label {
  font-size: 0.6rem;
  color: var(--text-muted);
  white-space: nowrap;
  line-height: 1.6;
  text-align: right;
  padding-right: 2px;
}

.rtip-val {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  line-height: 1.6;
}

.rtip-hint {
  font-size: 0.55rem;
  color: var(--text-faint);
  margin-top: 8px;
  text-align: right;
  border-top: 1px solid var(--border-subtle);
  padding-top: 5px;
}

@media (min-width: 480px) {
  .rtip-hint { display: none; }
}

/* Top-3 lift on hover — CSS scale */
.suburb-path.highlighted {
  transform: scale(1.04);
}

/* Keyboard focus outline on SVG choropleth polygons */
.suburb-path:focus {
  outline: 3px solid var(--yellow);
  outline-offset: 2px;
}
.suburb-path:focus-visible {
  outline: 3px solid var(--yellow);
  outline-offset: 2px;
}

/* Fix 3 — "Not to scale" caption below map */
.map-scale-caption {
  position: absolute;
  bottom: 6px;
  left: 10px;
  margin: 0;
  font-family: var(--font-body, 'Lato', sans-serif);
  font-size: 10px;
  font-style: italic;
  color: var(--text-muted, rgba(255,255,255,0.35));
  pointer-events: none;
  z-index: 5;
  line-height: 1;
}
:root[data-theme="light"] .map-scale-caption {
  color: rgba(0,0,0,0.3);
}

/* Fix 4 — campaign suburb fills at 0.85 opacity so surrounding layer hints through */
path.suburb-path {
  fill-opacity: 0.85;
}

/* ── Suburb-switcher polygon treatments ─────────────────────────────────────── */
path.suburb-path.ssw-selected {
  stroke: #FFE512 !important;
  stroke-width: 2.5px !important;
  filter: url(#ssw-polygon-glow) !important;
}

/* ── Suburb Switcher Dropdown ─────────────────────────────────────────────── */
.suburb-switcher {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 20;
  width: 240px;
}
@media (max-width: 640px) {
  .suburb-switcher {
    width: min(70vw, 320px);
  }
}

/* Trigger button */
.ssw-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  padding: 8px 12px;
  background: rgba(15,15,18,0.88);
  border: 1px solid rgba(255,229,18,0.22);
  border-radius: 10px;
  color: rgba(255,255,255,0.9);
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  box-shadow: 0 2px 12px rgba(0,0,0,0.45), inset 0 1px 0 rgba(255,255,255,0.04);
  transition: border-color 0.15s, box-shadow 0.15s;
  min-height: 36px;
}
.ssw-btn:hover,
.ssw-btn:focus-visible {
  border-color: rgba(255,229,18,0.5);
  box-shadow: 0 2px 16px rgba(0,0,0,0.55), 0 0 0 1px rgba(255,229,18,0.2);
  outline: none;
}
.ssw-btn[aria-expanded="true"] {
  border-color: rgba(255,229,18,0.5);
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}
.ssw-btn-text {
  flex: 1;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ssw-btn-chip {
  display: inline-flex;
  align-items: center;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 0.65rem;
  font-weight: 700;
  line-height: 1.4;
  margin-left: 6px;
  flex-shrink: 0;
}
.ssw-chevron {
  flex-shrink: 0;
  opacity: 0.6;
  transition: transform 0.2s var(--ease-out, ease-out);
}
.ssw-btn[aria-expanded="true"] .ssw-chevron {
  transform: rotate(180deg);
  opacity: 0.9;
}

/* Dropdown list */
.ssw-list {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  margin: 0;
  padding: 6px;
  list-style: none;
  background: rgba(15,15,18,0.92);
  border: 1px solid rgba(255,229,18,0.15);
  border-top: none;
  border-bottom-left-radius: 12px;
  border-bottom-right-radius: 12px;
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  box-shadow: 0 8px 32px rgba(0,0,0,0.6), inset 3px 0 0 #FFE512;
  max-height: 380px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,229,18,0.25) transparent;
}
.ssw-list::-webkit-scrollbar { width: 4px; }
.ssw-list::-webkit-scrollbar-track { background: transparent; }
.ssw-list::-webkit-scrollbar-thumb { background: rgba(255,229,18,0.25); border-radius: 2px; }

/* Each list row */
.ssw-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 8px;
  height: 44px;
  border-radius: 7px;
  cursor: pointer;
  transition: background 0.1s;
  position: relative;
  overflow: hidden;
}
.ssw-item:hover,
.ssw-item[aria-selected="true"]:hover {
  background: rgba(255,229,18,0.08);
}
.ssw-item:focus-visible {
  outline: none;
  background: rgba(255,229,18,0.1);
  box-shadow: inset 0 0 0 1px rgba(255,229,18,0.35);
}

/* Postcode pill */
.ssw-pc {
  font-family: var(--font-body);
  font-size: 0.58rem;
  font-weight: 500;
  color: rgba(255,255,255,0.35);
  letter-spacing: 0.03em;
  flex-shrink: 0;
  width: 32px;
}

/* Suburb name */
.ssw-name {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 500;
  color: rgba(255,255,255,0.88);
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Growth badge */
.ssw-growth {
  font-family: var(--font-body);
  font-size: 0.65rem;
  font-weight: 700;
  flex-shrink: 0;
  letter-spacing: 0.02em;
}

/* Star icon (selected indicator) */
.ssw-star {
  flex-shrink: 0;
  color: #FFE512;
  width: 14px;
  height: 14px;
  opacity: 0;
  transition: opacity 0.2s;
}

/* ── SELECTED state — animated conic-gradient border glow ── */
.ssw-item[aria-selected="true"] {
  background: rgba(255,229,18,0.05);
  transform: scale(1.02);
  box-shadow:
    inset 0 0 0 1px rgba(255,229,18,0.12),
    0 2px 10px rgba(255,229,18,0.08);
  transition: background 0.1s, transform 0.2s, box-shadow 0.2s;
}
.ssw-item[aria-selected="true"] .ssw-name {
  color: #FFE512;
  font-weight: 700;
}
.ssw-item[aria-selected="true"] .ssw-star {
  opacity: 1;
}

/* Animated rotating border using a pseudo-element conic-gradient */
.ssw-item[aria-selected="true"]::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: 8px;
  padding: 1px;
  background: conic-gradient(
    from var(--ssw-angle, 0deg),
    #FFE512 0deg,
    rgba(255,229,18,0.4) 60deg,
    transparent 120deg,
    transparent 240deg,
    rgba(255,229,18,0.4) 300deg,
    #FFE512 360deg
  );
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: ssw-spin 4s linear infinite;
  pointer-events: none;
}
@property --ssw-angle {
  syntax: '<angle>';
  inherits: false;
  initial-value: 0deg;
}
@keyframes ssw-spin {
  to { --ssw-angle: 360deg; }
}

/* Reduced motion — kill spin, just use bold yellow text + static border */
@media (prefers-reduced-motion: reduce) {
  .ssw-item[aria-selected="true"] {
    transform: none;
    box-shadow: inset 0 0 0 1px rgba(255,229,18,0.4);
  }
  .ssw-item[aria-selected="true"]::before {
    animation: none;
    background: rgba(255,229,18,0.3);
  }
}

/* Light theme overrides */
:root[data-theme="light"] .ssw-btn {
  background: rgba(255,255,255,0.92);
  border-color: rgba(200,170,0,0.3);
  color: #1A1A1A;
}
:root[data-theme="light"] .ssw-list {
  background: rgba(255,255,255,0.96);
  border-color: rgba(200,170,0,0.2);
  box-shadow: 0 8px 32px rgba(0,0,0,0.2), inset 3px 0 0 #D4AF00;
}
:root[data-theme="light"] .ssw-name {
  color: rgba(20,20,20,0.88);
}
:root[data-theme="light"] .ssw-pc {
  color: rgba(20,20,20,0.4);
}
:root[data-theme="light"] .ssw-item:hover {
  background: rgba(200,170,0,0.08);
}
:root[data-theme="light"] .ssw-item[aria-selected="true"] .ssw-name {
  color: #8B6914;
}
:root[data-theme="light"] .ssw-item[aria-selected="true"] .ssw-star {
  color: #8B6914;
}

/* === BUDGET HOOK BANNER === */
/* Dark theme: deep ink charcoal #1A1A1F + yellow left-edge stripe + white text.
   Light theme: warm ivory bg + dark ink text + amber stripe. No red. */
.budget-banner {
  background: #1A1A1F; /* deep ink — on-brand, not alarm-red */
  border-left: 4px solid var(--accent-yellow);
  padding: clamp(20px, 3vw, 32px) clamp(16px, 4vw, 48px);
  position: relative;
  overflow: hidden;
}

:root[data-theme="light"] .budget-banner {
  background: #F5F0E8; /* warm ivory — quiet against cream page */
  border-left-color: #B8860B;
}

.budget-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    -45deg,
    transparent,
    transparent 10px,
    rgba(255,229,18,0.02) 10px,
    rgba(255,229,18,0.02) 11px
  );
}

.budget-banner-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px;
  position: relative;
  z-index: 1;
}

/* SVG lightning icon — replaces ⚡ emoji */
.banner-icon {
  color: var(--accent-yellow); /* #FFE512 on #1A1A1F = 11.7:1 WCAG AAA */
  flex-shrink: 0;
  display: block;
}
:root[data-theme="light"] .banner-icon {
  color: #7A6300; /* dark amber on ivory = 5.1:1 WCAG AA */
}

.budget-banner-text {
  flex: 1;
  min-width: 240px;
}

.budget-banner-kicker {
  font-size: 0.6rem;
  font-weight: 900;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent-yellow);
  margin-bottom: 6px;
}
:root[data-theme="light"] .budget-banner-kicker {
  color: #7A6300;
}

.budget-banner-headline {
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 2vw, 1.5rem);
  font-weight: 700;
  color: #FFFFFF; /* on #1A1A1F = 16.1:1 WCAG AAA */
  line-height: 1.3;
}
:root[data-theme="light"] .budget-banner-headline {
  color: #1A1208; /* near-black on ivory = 16.8:1 WCAG AAA */
}

.budget-banner-sub {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.80);
  margin-top: 8px;
  line-height: 1.55;
  max-width: 560px;
}
:root[data-theme="light"] .budget-banner-sub {
  color: #3D3520; /* 7.6:1 on ivory WCAG AA */
}

.budget-banner-source {
  font-size: 0.65rem;
  color: rgba(255,255,255,0.48);
  margin-top: 8px;
  line-height: 1.4;
}
:root[data-theme="light"] .budget-banner-source {
  color: #6B5E3A;
}
.budget-banner-source a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* CTA: #000 on #FFE512 = 19.6:1 WCAG AAA */
.budget-banner-cta {
  background: var(--accent-yellow);
  color: #000000;
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 12px 24px;
  border-radius: var(--r-sm);
  text-decoration: none;
  flex-shrink: 0;
  transition: background 0.15s;
  white-space: nowrap;
}
.budget-banner-cta:hover {
  background: #E8D000;
  color: #000000;
}
:root[data-theme="light"] .budget-banner-cta {
  background: #1A1208;
  color: var(--accent-yellow);
}
:root[data-theme="light"] .budget-banner-cta:hover {
  background: #2A2010;
}

/* === BOOKING SECTION === */
.booking-section {
  padding: clamp(40px, 6vw, 80px) clamp(16px, 4vw, 48px);
  background: var(--bg-section-alt);
  position: relative;
  /* overflow:hidden removed — it was clipping the autocomplete dropdown and
     badge popovers (position:absolute children), and causing browser
     focus-scroll-into-view to miscompute the scroll target on the address
     input. The ::before yellow bar is fully contained; no clipping needed. */
  overflow: visible;
}

.booking-section::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--yellow);
}

.booking-inner {
  max-width: 800px;
  margin: 0 auto;
}

.booking-prize-banner {
  background: var(--yellow);
  border-radius: var(--r-md);
  padding: 18px 24px;
  margin-bottom: 32px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px;
}

.prize-stamp {
  background: var(--black);
  color: var(--yellow);
  font-family: var(--font-body);
  font-size: 0.65rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 8px 14px;
  border-radius: var(--r-sm);
  border: 2px solid var(--black);
  transform: rotate(-2deg);
  display: inline-block;
  flex-shrink: 0;
}

.prize-stamp-alt {
  background: var(--black);
  color: var(--yellow);
  font-size: 1.8rem;
  font-weight: 900;
  padding: 6px 14px;
  border-radius: var(--r-sm);
  border: 2px solid var(--black);
  transform: rotate(-1deg);
  display: inline-block;
  flex-shrink: 0;
  line-height: 1;
}

.prize-text {
  flex: 1;
  min-width: 200px;
}

.prize-title {
  font-family: var(--font-body);
  font-size: 1.0rem;
  font-weight: 900;
  color: var(--black);
  margin-bottom: 4px;
}

.prize-desc {
  font-size: 0.8rem;
  color: rgba(0,0,0,0.65);
  line-height: 1.4;
}

.prize-5x-badge {
  background: #1A1A1F;
  color: rgba(255,229,18,0.85);
  font-family: var(--font-body);
  font-size: 0.65rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 10px 16px;
  border-radius: var(--r-sm);
  border: 1px solid rgba(255,229,18,0.25);
  transform: rotate(1.5deg);
  display: inline-block;
  text-align: center;
}

.prize-5x-badge .big-num {
  display: block;
  font-size: 2rem;
  line-height: 1;
  letter-spacing: -0.02em;
  /* Metallic gold shine on the 5× numeral */
  background: linear-gradient(135deg, #B8860B 0%, #FFD700 35%, #FFE512 60%, #B8860B 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Form */
.booking-form {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

@media (min-width: 600px) {
  .booking-form {
    grid-template-columns: 1fr 1fr;
  }
  .booking-form .full-width { grid-column: 1 / -1; }
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.form-group input,
.form-group select {
  background: var(--bg-input);
  border: 1px solid var(--border-medium);
  border-radius: var(--r-sm);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.95rem;
  padding: 12px 14px;
  width: 100%;
  transition: border-color 0.15s;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--yellow);
}

.form-group input::placeholder { color: var(--text-faint); }

.form-group select option { background: var(--bg-section-alt); }

.form-submit-row {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.btn-submit {
  background: var(--yellow);
  color: var(--black);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 15px 36px;
  border: none;
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
  flex-shrink: 0;
}
.btn-submit:hover {
  background: var(--yellow-d);
  transform: translateY(-1px);
}

.submit-note {
  font-size: 0.7rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.submit-note .terms-link {
  color: var(--text-muted);
}

.booking-intro {
  font-size: 0.78rem;
  color: var(--text-secondary);
  margin-bottom: 24px;
  line-height: 1.5;
}

/* .form-success — full definition moved to end of file (social-ctas block) */
.form-success { display: none; }
.form-success.visible { display: block; }

/* === SUBURB MODAL === */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: var(--overlay-bg);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
}

@media (min-width: 700px) {
  .modal-overlay { align-items: center; }
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.modal-panel {
  background: var(--bg-card-raised);
  border-radius: var(--r-lg) var(--r-lg) 0 0;
  width: 100%;
  max-width: 680px;
  max-height: 90dvh;
  overflow-y: auto;
  transform: translateY(40px);
  transition: transform 0.3s var(--ease-out);
  position: relative;
}

@media (min-width: 700px) {
  .modal-panel {
    border-radius: var(--r-lg);
    max-height: 85dvh;
  }
}

.modal-overlay.open .modal-panel {
  transform: translateY(0);
}

.modal-top-bar {
  height: 4px;
  border-radius: var(--r-lg) var(--r-lg) 0 0;
}

.modal-header {
  padding: 24px 68px 16px 24px; /* right padding reserves space for absolute close btn */
  display: flex;
  align-items: flex-start;
  border-bottom: 1px solid var(--border-subtle);
  position: sticky;
  top: 0;
  background: var(--bg-card-raised);
  z-index: 1;
}

.modal-header-left {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.modal-suburb-name {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 900;
  color: var(--text-primary);
  line-height: 1;
}

.modal-suburb-pc {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-top: 4px;
}

.modal-growth-big {
  font-family: var(--font-body);
  font-size: 2.4rem;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.02em;
  text-align: left;
  margin-top: 6px;
}

.modal-growth-big.positive { color: var(--yellow); }
.modal-growth-big.negative { color: var(--red); }

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: var(--bg-toggle-group);
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  color: var(--text-primary);
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}
.modal-close:hover { background: var(--border-strong); }

.modal-body {
  padding: 24px;
}

.modal-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 24px;
}

@media (min-width: 500px) {
  .modal-stats-grid { grid-template-columns: repeat(4, 1fr); }
}

.stat-card {
  background: var(--bg-toggle-group);
  border-radius: var(--r-sm);
  padding: 14px 12px;
  text-align: center;
}

.stat-card-label {
  font-size: 0.55rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.stat-card-value {
  font-size: 1.1rem;
  font-weight: 900;
  color: var(--text-primary);
}

.stat-card-value.accent { color: var(--yellow); }

.stat-card-icon {
  color: var(--yellow);
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 6px;
  opacity: 0.9;
}
.stat-card-icon svg {
  width: 20px;
  height: 20px;
  display: block;
}

.modal-type-toggle {
  display: flex;
  gap: 4px;
  background: var(--bg-toggle-group);
  border-radius: var(--r-sm);
  padding: 4px;
  margin-bottom: 20px;
}

.type-btn {
  flex: 1;
  padding: 8px;
  border: none;
  border-radius: var(--r-sm);
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
}
.type-btn.active {
  background: var(--accent-yellow);
  color: var(--text-on-yellow);
}

.type-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.type-btn-icon {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.type-btn-icon svg {
  width: 16px;
  height: 16px;
  display: block;
}

.modal-peers {
  margin-top: 20px;
}

.modal-peers-title {
  font-size: 0.65rem;
  font-weight: 900;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 12px;
}

.peer-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.peer-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: var(--bg-toggle-group);
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: background 0.15s;
}
.peer-item:hover { background: var(--border-subtle); }

.peer-name { font-size: 0.85rem; font-weight: 700; }
.peer-growth { font-size: 0.95rem; font-weight: 900; }
.peer-growth.positive { color: var(--yellow); }

/* === CONTACTS === */
.contacts-section {
  padding: clamp(40px, 6vw, 72px) clamp(16px, 4vw, 48px);
  background: var(--bg-page);
}

.contacts-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

@media (min-width: 700px) {
  .contacts-inner { grid-template-columns: 1fr 1fr; }
}

.contact-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-md);
  padding: 24px;
}

.contact-office {
  font-size: 0.6rem;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--yellow);
  margin-bottom: 12px;
}

.contact-name {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 14px;
}

.contact-detail {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 8px;
  text-decoration: none;
}
.contact-detail:hover { color: var(--yellow); }

.contact-icon {
  width: 20px;
  text-align: center;
  color: rgba(255,229,18,0.5);
  flex-shrink: 0;
}

/* === FOOTER === */
.site-footer {
  padding: 32px clamp(16px, 4vw, 48px);
  background: var(--bg-page);
  border-top: 1px solid var(--border-subtle);
}

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px;
  justify-content: space-between;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-logo-mark {
  width: 28px;
  height: 28px;
  border-radius: 2px;
  display: block;
  flex-shrink: 0;
}

.footer-brand-text {
  font-size: 0.7rem;
  color: var(--text-faint);
  line-height: 1.5;
}

.footer-links {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.footer-links a {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.15s;
}
.footer-links a:hover { color: var(--yellow); }

.footer-attribution {
  font-size: 0.62rem;
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 600px;
  text-align: right;
}

.footer-attribution a {
  color: var(--text-secondary);
}

/* === COUNT-UP ANIMATION === */
.countup {
  display: inline-block;
  transition: none;
}

/* === SCROLL REVEAL === */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.5s var(--ease-out), transform 0.5s var(--ease-out);
}
.reveal.in-view {
  opacity: 1;
  transform: none;
}

/* === DASHBOARD (Bloomberg bar-chart) === */
.dash-panel {
  width: 100%;
}

.dash-header {
  display: grid;
  grid-template-columns: 180px 1fr 80px;
  gap: 8px;
  padding: 8px 16px;
  font-size: 0.6rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-faint);
  border-bottom: 1px solid var(--border-subtle);
}

@media (max-width: 600px) {
  .dash-header { grid-template-columns: 120px 1fr 70px; }
}

.dash-col-suburb { }
.dash-col-metric { text-align: right; }

.dash-row {
  display: grid;
  grid-template-columns: 180px 1fr 80px;
  gap: 8px;
  align-items: center;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border-subtle);
  cursor: pointer;
  transition: background 0.12s;
}

@media (max-width: 600px) {
  .dash-row { grid-template-columns: 120px 1fr 70px; }
}

.dash-row:hover { background: var(--bg-toggle-group); }

.dash-row:focus-visible {
  outline: 2px solid var(--yellow);
  outline-offset: -2px;
}

.dash-name {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.dash-suburb {
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1;
}

.dash-pc {
  font-size: 0.6rem;
  color: var(--text-faint);
  letter-spacing: 0.06em;
}

.dash-bar-wrap {
  background: var(--border-subtle);
  border-radius: 2px;
  height: 6px;
  overflow: hidden;
}

.dash-bar {
  height: 100%;
  border-radius: 2px;
  width: 0;
  /* animated by JS */
}

.dash-value {
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 900;
  text-align: right;
  white-space: nowrap;
}

/* === UTILITY === */
.text-yellow { color: var(--yellow); }
.text-red    { color: var(--red); }
.fw-900      { font-weight: 900; }

/* === MOBILE TWEAKS === */
@media (max-width: 480px) {
  .hero-headline { font-size: 2.6rem; }
  .tile-growth   { font-size: 1.7rem; }
}

/* ============================================================================
   JOB 2 — HERO HEADLINE REVEAL (fadeUp, no blocking curtain)
   ============================================================================ */

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Headline — 600ms fadeUp, starts immediately */
.hero-headline-reveal {
  animation: fadeUp 0.6s var(--ease-out) both;
}

/* Postcode chips — 400ms fadeUp, staggered 50ms per chip */
.chip-reveal {
  animation: fadeUp 0.4s var(--ease-out) both;
}
.chip-stagger-0 { animation-delay: 0ms; }
.chip-stagger-1 { animation-delay: 50ms; }
.chip-stagger-2 { animation-delay: 100ms; }
.chip-stagger-3 { animation-delay: 150ms; }

/* Respect prefers-reduced-motion — no animations at all */
@media (prefers-reduced-motion: reduce) {
  .hero-headline-reveal,
  .chip-reveal {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}

/* ============================================================================
   JOB 1 — WORTH-ISH WIDGET (broadcast aesthetic)
   ============================================================================ */

.worthish-section {
  padding: clamp(40px, 6vw, 80px) clamp(16px, 4vw, 48px);
  background: var(--bg-page);
  position: relative;
}

.worthish-section::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--yellow);
}

.worthish-inner {
  max-width: 800px;
  margin: 0 auto;
}

.worthish-header {
  margin-bottom: 32px;
}

.worthish-kicker {
  /* uses .section-label styles */
  margin-bottom: 16px !important;
}

.worthish-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw + 0.5rem, 3.2rem);
  font-weight: 900;
  color: var(--text-primary);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: 14px;
}

.worthish-accent {
  color: var(--yellow);
}

.worthish-subtitle {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 520px;
}

/* Card */
.worthish-card {
  background: var(--bg-card);
  border: 1px solid var(--border-yellow);
  border-radius: var(--r-lg);
  padding: clamp(24px, 4vw, 40px);
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(2px);
}

@media (prefers-color-scheme: light) {
  .worthish-card {
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  }
}

/* Subtle grain texture background */
.worthish-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background-image:
    linear-gradient(45deg, rgba(255,229,18,0.02) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(255,229,18,0.02) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(255,229,18,0.02) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(255,229,18,0.02) 75%);
  background-size: 40px 40px;
  background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
  background-repeat: repeat;
  pointer-events: none;
  z-index: 0;
}

/* Yellow top accent bar */
.worthish-card::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--yellow);
  z-index: 1;
}

/* Fields grid */
.worthish-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 28px;
  position: relative;
  z-index: 2;
}

@media (max-width: 560px) {
  .worthish-fields { grid-template-columns: 1fr; }
}

.worthish-field-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.worthish-field-full {
  grid-column: 1 / -1;
}

.worthish-label {
  font-size: 0.65rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.worthish-beds-highlight {
  color: var(--yellow);
  font-size: 0.75rem;
}

/* Select */
.worthish-select {
  background: var(--bg-input);
  border: 1px solid var(--border-medium);
  border-radius: var(--r-sm);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.95rem;
  padding: 12px 14px;
  width: 100%;
  transition: border-color 0.15s;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23FFE512' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}
.worthish-select:focus {
  outline: none;
  border-color: var(--yellow);
}
.worthish-select option { background: var(--bg-section-alt); }

/* Radio group */
.worthish-radio-group {
  display: flex;
  gap: 8px;
}

.worthish-radio-label {
  cursor: pointer;
  display: flex;
}

.worthish-radio {
  /* Visually hidden but still focusable */
  position: absolute;
  width: 1px; height: 1px;
  clip: rect(0,0,0,0);
  overflow: hidden;
}

.worthish-radio-pill {
  display: inline-block;
  padding: 10px 20px;
  border: 1.5px solid var(--border-yellow);
  border-radius: var(--r-sm);
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-muted);
  transition: all 0.15s;
  cursor: pointer;
  user-select: none;
}

.worthish-radio:checked + .worthish-radio-pill {
  background: var(--yellow);
  color: var(--black);
  border-color: var(--yellow);
}

.worthish-radio:focus-visible + .worthish-radio-pill {
  outline: 2px solid var(--yellow);
  outline-offset: 2px;
}

/* Slider */
.worthish-slider-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.worthish-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  background: rgba(255,255,255,0.12);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}

.worthish-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  background: var(--yellow);
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 0 0 3px rgba(255,229,18,0.25);
  transition: box-shadow 0.15s;
}
.worthish-slider::-webkit-slider-thumb:hover {
  box-shadow: 0 0 0 5px rgba(255,229,18,0.35);
}
.worthish-slider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  background: var(--yellow);
  border-radius: 50%;
  border: none;
  cursor: pointer;
}
.worthish-slider:focus-visible {
  outline: 2px solid var(--yellow);
  outline-offset: 4px;
}

.worthish-slider-ticks {
  display: flex;
  justify-content: space-between;
  font-size: 0.6rem;
  font-weight: 700;
  color: var(--text-faint);
  letter-spacing: 0.06em;
  padding: 0 2px;
}

/* Result area */
.worthish-result {
  margin-bottom: 24px;
  min-height: 90px;
  position: relative;
  z-index: 2;
}

.worthish-result-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 90px;
  gap: 6px;
}

.worthish-result-dash {
  font-size: 2.8rem;
  font-weight: 900;
  color: rgba(255,255,255,0.15);
  line-height: 1;
}

.worthish-result-hint {
  font-size: 0.7rem;
  color: rgba(255,255,255,0.3);
  letter-spacing: 0.06em;
}

/* Computed result */
.worthish-result-computed {
  animation: fadeUp 0.35s var(--ease-out) both;
}

@media (prefers-reduced-motion: reduce) {
  .worthish-result-computed { animation: none; }
}

.worthish-estimate-label {
  font-size: 0.6rem;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--yellow);
  margin-bottom: 6px;
}

.worthish-estimate-value {
  font-family: var(--font-body);
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  font-weight: 900;
  color: var(--text-primary);
  line-height: 1;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}

.worthish-estimate-band {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.5);
  font-weight: 700;
  margin-bottom: 10px;
}

.worthish-estimate-caveat {
  font-size: 0.72rem;
  color: rgba(255,255,255,0.35);
  line-height: 1.5;
}

/* CTA button */
.worthish-cta {
  display: block;
  width: 100%;
  background: var(--yellow);
  color: var(--black);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-align: center;
  text-decoration: none;
  padding: 16px 24px;
  border-radius: var(--r-sm);
  transition: background 0.15s, transform 0.1s, box-shadow 0.15s;
  margin-bottom: 12px;
  position: relative;
  z-index: 2;
  box-shadow: 0 4px 12px rgba(255, 229, 18, 0.25);
}
.worthish-cta:hover {
  background: var(--yellow-d);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(255, 229, 18, 0.35);
}

.worthish-disclaimer {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-align: center;
  font-style: italic;
  position: relative;
  z-index: 2;
}

/* ============================================================================
   JOB 3 — CHOROPLETH LABEL FIX (Option A: tooltip-only labels, top-3 permanent)
   ============================================================================ */

/* Labels controlled by .choro-labels group opacity — individual display is visible */
.suburb-label {
  paint-order: stroke fill;
  stroke: rgba(0,0,0,0.85);
  stroke-width: 3px;
  stroke-linejoin: round;
}

.suburb-label-value {
  paint-order: stroke fill;
  stroke: rgba(0,0,0,0.75);
  stroke-width: 2px;
  stroke-linejoin: round;
}

/* ============================================================================
   COACH-MARK OVERLAY
   ============================================================================ */
/* ── Coach-mark overlay ───────────────────────────────────────────────────── */
/* The full-screen wrapper never blocks page interaction */
.coach-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  pointer-events: none;
}

/* Bubble is the only interactive element */
.coach-bubble {
  position: absolute;
  z-index: 1;
  background: var(--bg-coach);
  border: 1.5px solid var(--border-yellow-strong);
  border-radius: var(--r-md);
  padding: 14px 16px;
  width: clamp(220px, 80vw, 280px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.7);
  pointer-events: auto;
  /* Fade lifecycle managed via opacity + visibility */
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

.coach-bubble.coach-visible {
  opacity: 1;
  visibility: visible;
}

/* Tail/arrow — points upward at target */
.coach-tail {
  position: absolute;
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-bottom: 9px solid rgba(255,229,18,0.4);
  /* JS sets .style.top / .style.left */
}

.coach-tail::after {
  content: '';
  position: absolute;
  top: 2px;
  left: -7px;
  width: 0;
  height: 0;
  border-left: 7px solid transparent;
  border-right: 7px solid transparent;
  border-bottom: 8px solid var(--bg-coach);
}

.coach-text {
  font-family: var(--font-body);
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 12px;
}

.coach-actions {
  display: flex;
  justify-content: flex-end;
}

.coach-btn-secondary {
  padding: 5px 12px;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: var(--r-sm);
  background: transparent;
  color: rgba(255,255,255,0.45);
  font-family: var(--font-body);
  font-size: 0.65rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
}

.coach-btn-secondary:hover {
  border-color: rgba(255,255,255,0.4);
  color: var(--white);
}

@media (prefers-reduced-motion: reduce) {
  .coach-bubble { transition: none !important; }
}

/* ── Info panel — "How to read the map" ──────────────────────────────────── */
.info-backdrop {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(0,0,0,0.55);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.info-backdrop.open {
  opacity: 1;
  visibility: visible;
}

.info-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 301;
  width: 420px;
  max-width: 100vw;
  background: var(--bg-section-alt);
  border-left: 1px solid var(--border-yellow);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
}

.info-panel.open {
  transform: translateX(0);
}

.info-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--border-subtle);
  flex-shrink: 0;
}

.info-panel-title {
  font-family: var(--font-head);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--yellow);
  margin: 0;
}

.info-panel-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--border-medium);
  background: transparent;
  color: var(--text-muted);
  font-size: 0.75rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
  flex-shrink: 0;
}

.info-panel-close:hover {
  border-color: var(--yellow);
  color: var(--yellow);
}

.info-panel-body {
  padding: 20px;
  overflow-y: auto;
  flex: 1;
}

.info-section {
  margin-bottom: 24px;
}

.info-section-title {
  font-family: var(--font-body);
  font-size: 0.65rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--yellow);
  margin: 0 0 10px;
}

.info-section p,
.info-section li {
  font-family: var(--font-body);
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.55;
  margin: 0 0 8px;
}

.info-section ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.info-section li {
  padding-left: 12px;
  position: relative;
  margin-bottom: 6px;
}

.info-section li::before {
  content: '›';
  position: absolute;
  left: 0;
  color: var(--yellow);
  font-weight: 900;
}

.info-lens-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 4px;
}

.info-lens-card {
  background: var(--bg-toggle-group);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-sm);
  padding: 10px 12px;
}

.info-lens-label {
  font-family: var(--font-body);
  font-size: 0.6rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--yellow);
  margin-bottom: 4px;
}

.info-lens-desc {
  font-family: var(--font-body);
  font-size: 0.72rem;
  color: var(--text-muted);
  line-height: 1.45;
  margin: 0;
}

.info-top-growth {
  background: var(--bg-toggle-group);
  border: 1px solid var(--border-yellow);
  border-radius: var(--r-sm);
  padding: 12px 14px;
}

.info-top-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 5px;
}

.info-top-row:last-child {
  margin-bottom: 0;
}

.info-top-name {
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-primary);
}

.info-top-pct {
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 900;
  color: #22c55e;
}

.info-divider {
  border: none;
  border-top: 1px solid var(--border-subtle);
  margin: 20px 0;
}

/* Mobile: bottom sheet */
@media (max-width: 640px) {
  .info-panel {
    top: auto;
    right: 0;
    left: 0;
    bottom: 0;
    width: 100%;
    max-height: 85vh;
    border-left: none;
    border-top: 1px solid rgba(255,229,18,0.2);
    border-radius: 16px 16px 0 0;
    transform: translateY(100%);
  }

  .info-panel.open {
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .info-backdrop,
  .info-panel { transition: none !important; }
}

/* ============================================================================
   HERO PHOTO — Jobs 2 + 3 additions
   Classic Queenslander at dusk as full-bleed hero background
   ============================================================================ */

/* The hero section itself must be position:relative (already is) */

/* Full-bleed photo layer — behind all hero content */
.hero-photo {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  /* picture is inline by default; force block + fill */
  display: block;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.hero-photo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;  /* show gate + warm light zone */
  display: block;
  /* Ken-Burns slow zoom — 8s, gated by prefers-reduced-motion below */
  animation: hero-ken-burns 8s ease-in-out both;
  will-change: transform;
}

@keyframes hero-ken-burns {
  from { transform: scale(1.0); }
  to   { transform: scale(1.05); }
}

@media (prefers-reduced-motion: reduce) {
  .hero-photo-img {
    animation: none !important;
    transform: none !important;
  }
}

/* Gradient overlay — lightened to let more of house-07 through (75% left → 25% right).
   Radial vignette at top-right kept for text contrast on the sidebar widgets. */
.hero-photo-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(to right, rgba(0,0,0,0.75) 0%, rgba(0,0,0,0.48) 55%, rgba(0,0,0,0.25) 100%),
    radial-gradient(ellipse at top right, rgba(0,0,0,0.15) 0%, rgba(0,0,0,0.55) 100%);
}

/* Hero content and scan-line pseudo-elements must be above photo + overlay */
.hero::before,
.hero::after {
  z-index: 2;
}

.hero-inner {
  position: relative;
  z-index: 3;
}

/* Mobile: crop toward the warm gate area */
@media (max-width: 640px) {
  .hero-photo-img {
    object-position: 40% 30%;
  }
  /* Heavier overlay on mobile so slim column of text is still readable */
  .hero-photo-overlay {
    background: linear-gradient(to bottom, rgba(0,0,0,0.82) 0%, rgba(0,0,0,0.68) 100%);
  }
}

/* ============================================================================
   SUBURB TILE — Atlas colour left-border (Job 3)
   JS sets data-atlas-color on each .suburb-tile; CSS picks it up via the
   CSS custom property --tile-atlas-color injected inline.
   ============================================================================ */

/* Each tile gets a 4px coloured left-border matching its Atlas map colour */
.suburb-tile {
  border-left-width: 4px;
  border-left-style: solid;
  border-left-color: var(--tile-atlas-color, rgba(255,229,18,0.4));
  /* Transition already set on .suburb-tile, extend: */
  transition: border-color 0.15s, transform 0.15s, background 0.15s, border-left-color 0.3s;
}

/* On hover, keep the atlas colour vivid (don't override with yellow) */
.suburb-tile:hover {
  border-color: var(--tile-atlas-color, var(--yellow));
  border-left-color: var(--tile-atlas-color, var(--yellow));
}

/* ============================================================================
   SPARKLINE — growth-tier colours — 6 bands matching the sequential warm ramp
   JS applies one of: sparkline-negative / -floor / -low / -mid / -high / -peak
   ============================================================================ */

/* Negative — cool slate escape hatch */
.tile-sparkline.sparkline-negative {
  color: #4A5568;
  opacity: 0.75;
}

/* Floor positive < 5% — dark amber */
.tile-sparkline.sparkline-floor {
  color: #5C4A1E;
  opacity: 0.85;
}

/* Mid-low 5–9% — mid-low amber */
.tile-sparkline.sparkline-low {
  color: #8B6914;
  opacity: 0.85;
}

/* Mid 9–13% — mid amber */
.tile-sparkline.sparkline-mid {
  color: #B8860B;
  opacity: 0.85;
}

/* Strong 13–18% — RW yellow */
.tile-sparkline.sparkline-high {
  color: #FFE512;
  opacity: 0.85;
}

/* Exceptional 18%+ — white-hot cream */
.tile-sparkline.sparkline-peak {
  color: #FFFDE0;
  opacity: 0.9;
}

/* ============================================================================
   SECTION SEPARATORS — gradient stripe accent (Job 3)
   Inserted as pseudo-elements on sections that follow positive/negative areas.
   ============================================================================ */

/* Grid → Map transition (positive growth theme: yellow→black→green) */
.map-section::before {
  content: '';
  display: block;
  height: 3px;
  background: linear-gradient(to right, var(--yellow) 0%, #111 50%, #22c55e 100%);
  opacity: 0.55;
  /* map-section already has padding-top — keep it visual only */
  position: absolute;
  top: 0; left: 0; right: 0;
  pointer-events: none;
}
.map-section {
  position: relative;
}

/* Worth-ish → Budget banner (thematic) */
.budget-banner::after {
  content: '';
  display: block;
  height: 3px;
  background: linear-gradient(to right, var(--red) 0%, #111 50%, var(--yellow) 100%);
  opacity: 0.5;
  position: absolute;
  bottom: 0; left: 0; right: 0;
  pointer-events: none;
}
/* budget-banner already position:relative */

/* ============================================================================
   WORTH-ISH WIDGET — warm gradient backdrop (Job 3)
   ============================================================================ */

/* Replace flat grey-900 with a warm dark gradient to feel less cold */
.worthish-section {
  background: linear-gradient(135deg, #1a1a2e 0%, #1f1815 100%);
}

/* Yellow accent stripe on the left side of the card */
.worthish-card {
  border-left: 4px solid var(--yellow);
}

/* Richer card background: deep slate gradient */
.worthish-card {
  background: linear-gradient(135deg, #1e1e2a 0%, #1a1208 100%);
}

/* ============================================================================
   PRIZE 5× BADGE — radial yellow burst behind the number (Job 3)
   ============================================================================ */

.prize-5x-badge {
  position: relative;
  overflow: hidden;
}

/* Radial glow behind the "5×" numeral */
.prize-5x-badge::before {
  content: '';
  position: absolute;
  top: -20px;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 100px;
  background: radial-gradient(circle, rgba(255,229,18,0.35) 0%, rgba(255,229,18,0) 70%);
  pointer-events: none;
}

/* ============================================================================
   PROPERTY PHOTO STRIP — footer band (Job 3)
   ============================================================================ */

.photo-strip-section {
  background: var(--black);
  padding: clamp(40px, 6vw, 72px) clamp(16px, 4vw, 48px);
  border-top: 3px solid rgba(255,229,18,0.15);
  position: relative;
  overflow: hidden;
}

/* Subtle grain texture overlay */
.photo-strip-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    45deg,
    transparent,
    transparent 20px,
    rgba(255,229,18,0.01) 20px,
    rgba(255,229,18,0.01) 21px
  );
  pointer-events: none;
}

.photo-strip-inner {
  max-width: 1280px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.photo-strip-kicker {
  margin-bottom: 24px;
}

.photo-strip-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

@media (max-width: 768px) {
  .photo-strip-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 400px) {
  .photo-strip-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 4px;
  }
}

.photo-thumb {
  margin: 0;
  padding: 0;
  position: relative;
  overflow: hidden;
  border-radius: var(--r-sm);
  aspect-ratio: 4/3;
  background: var(--grey-700);
}

.photo-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 0.4s var(--ease-out), filter 0.3s;
  filter: brightness(0.85) saturate(0.9);
}

.photo-thumb:hover img {
  transform: scale(1.04);
  filter: brightness(0.95) saturate(1.05);
}

/* Yellow tint overlay on hover — brand touch */
.photo-thumb::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,229,18,0);
  transition: background 0.3s;
  pointer-events: none;
}

.photo-thumb:hover::after {
  background: rgba(255,229,18,0.06);
}

.photo-strip-note {
  font-size: 0.65rem;
  color: rgba(255,255,255,0.25);
  margin-top: 16px;
  font-style: italic;
}

@media (prefers-reduced-motion: reduce) {
  .photo-thumb img { transition: none !important; }
  .photo-thumb::after { transition: none !important; }
}

/* ============================================================================
   FRONTEND-DESIGN REVIEW FIXES (Job 4)
   ============================================================================ */

/* FIX 1: Hero bottom gradient — smooth exit from photo to next section */
.hero {
  border-bottom: none;
}

.hero::after {
  /* Extend scan-line to also provide a bottom fade to black */
  background:
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 3px,
      rgba(255,229,18,0.015) 3px,
      rgba(255,229,18,0.015) 4px
    ),
    linear-gradient(to bottom, transparent 80%, rgba(0,0,0,0.8) 100%);
}

/* FIX 2: Grid section separator — cleaner boundary after hero */
.grid-section {
  border-top: 2px solid rgba(255,229,18,0.12);
}

/* FIX 3: Booking section — prize stamp 5x touch-target on mobile */
@media (max-width: 480px) {
  .prize-5x-badge {
    min-height: 44px;
    min-width: 44px;
    padding: 12px 14px;
  }
}

/* FIX 4: Countdown number whitespace rhythm */
.cd-number {
  letter-spacing: -0.03em;
}

/* FIX 5: Booking form — ensure inputs are 44px tall on mobile for touch targets */
@media (max-width: 600px) {
  .form-group input,
  .form-group select {
    padding: 14px 14px;
    min-height: 44px;
  }
}

/* FIX 6: Nav CTA touch target on mobile */
@media (max-width: 480px) {
  .nav-cta {
    padding: 11px 16px;
    min-height: 44px;
    display: flex;
    align-items: center;
  }
}

/* FIX 7: Worth-ish card — ensure left border doesn't fight with yellow top bar */
.worthish-card::before {
  left: 4px;  /* offset for the new left border */
  right: 0;
}

/* FIX 8: Footer photo strip hover — reduce-motion */
@media (prefers-reduced-motion: reduce) {
  .photo-thumb img,
  .photo-thumb::after {
    transition: none !important;
    transform: none !important;
  }
}

/* FIX 9: Postcode chip touch targets */
.postcode-chip {
  min-height: 36px;
}

@media (max-width: 480px) {
  .postcode-chip {
    min-height: 44px;
    padding: 10px 14px;
  }
}

/* FIX 10: Modal close button — 32px but make it 44px tap area via padding */
.modal-close {
  width: 44px;
  height: 44px;
}

/* ============================================================================
   ENTRIES PILL — gamification widget
   ============================================================================ */

/* ── Wrapper — positions the pill ───────────────────────────────────────────── */
.entry-pill-wrapper {
  position: fixed;
  z-index: 910;

  /* Desktop: top-right, below nav (~58px ticker + 58px nav = ~116px; add 16px gap) */
  top: calc(var(--ticker-h, 44px) + var(--nav-h, 58px) + 16px);
  right: 16px;

  /* Start hidden; EntriesPill.show() adds .ep-visible */
  opacity: 0;
  pointer-events: none;
  transform: translateY(-6px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

/* Mobile / tablet: bottom-center */
@media (max-width: 1023px) {
  .entry-pill-wrapper {
    top: auto;
    right: auto;
    bottom: max(16px, env(safe-area-inset-bottom, 16px));
    left: 50%;
    transform: translateX(-50%) translateY(6px);
    width: 92vw;
    max-width: 420px;
    transition: opacity 0.2s ease, transform 0.2s ease;
  }
  .entry-pill-wrapper.ep-visible {
    transform: translateX(-50%) translateY(0) !important;
  }
}

.entry-pill-wrapper.ep-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.entry-pill-wrapper.ep-hidden {
  opacity: 0;
  pointer-events: none;
}

/* ── Pill button ────────────────────────────────────────────────────────────── */
.entry-pill {
  display: flex;
  align-items: center;
  gap: 7px;
  background: var(--accent-yellow, #FFE512);
  color: #000000;
  border: none;
  border-radius: 100px;
  padding: 0 18px;
  height: 44px;
  font-family: var(--font-body, sans-serif);
  font-weight: 700;
  font-size: 0.875rem;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 4px 18px rgba(255, 229, 18, 0.28), 0 2px 8px rgba(0,0,0,0.25);
  transition: transform 0.2s var(--ease-out, ease), box-shadow 0.2s var(--ease-out, ease);
  position: relative; /* for popover positioning */
  width: 100%;
  justify-content: center;
}

@media (min-width: 1024px) {
  .entry-pill {
    width: auto;
    min-width: 200px;
    justify-content: flex-start;
    height: 44px;
  }
}

@media (max-width: 1023px) {
  .entry-pill {
    height: 56px;
    font-size: 1rem;
  }
}

.entry-pill:hover,
.entry-pill:focus-visible {
  transform: scale(1.04);
  box-shadow: 0 0 24px rgba(255, 229, 18, 0.55), 0 4px 14px rgba(0,0,0,0.3);
  outline: none;
}

.entry-pill:focus-visible {
  outline: 2px solid #000;
  outline-offset: 2px;
}

/* ── Pill icon ──────────────────────────────────────────────────────────────── */
.entry-pill-icon {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  color: #000;
}

/* ── Count group ────────────────────────────────────────────────────────────── */
.entry-pill-count-group {
  display: flex;
  align-items: baseline;
  gap: 2px;
  font-variant-numeric: tabular-nums;
}

.entry-pill-count {
  font-size: 1.1em;
  font-weight: 900;
  line-height: 1;
}

.entry-pill-sep,
.entry-pill-max {
  font-size: 0.85em;
  opacity: 0.7;
}

/* ── CTA text ───────────────────────────────────────────────────────────────── */
.entry-pill-cta {
  flex: 1;
  text-align: right;
  font-size: 0.78em;
  font-weight: 700;
  letter-spacing: 0.02em;
  opacity: 0.85;
}

@media (min-width: 1024px) {
  .entry-pill-cta {
    text-align: left;
    flex: none;
    padding-left: 4px;
  }
}

/* ── Pulse animation on increment ───────────────────────────────────────────── */
@keyframes ep-pulse {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.06); }
  100% { transform: scale(1); }
}

.entry-pill.ep-pulse {
  animation: ep-pulse 0.3s var(--ease-out, ease) forwards;
}

/* ── Decrement (soft) ───────────────────────────────────────────────────────── */
@keyframes ep-decrement {
  0%   { transform: scale(1); }
  40%  { transform: scale(0.96); }
  100% { transform: scale(1); }
}

.entry-pill.ep-decrement {
  animation: ep-decrement 0.25s ease forwards;
}

/* ── Popover ────────────────────────────────────────────────────────────────── */
.entry-popover {
  position: absolute;
  bottom: calc(100% + 10px);
  right: 0;
  width: 240px;
  background: var(--bg-card, #1A1A1A);
  border: 1px solid var(--border-medium, rgba(255,255,255,0.15));
  border-radius: var(--r-lg, 14px);
  padding: 14px 16px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.6);
  opacity: 0;
  pointer-events: none;
  transform: translateY(6px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

@media (max-width: 1023px) {
  .entry-popover {
    bottom: auto;
    top: calc(100% + 10px);
    right: auto;
    left: 50%;
    transform: translateX(-50%) translateY(-6px);
    width: min(280px, 88vw);
  }
  .entry-popover.ep-pop-open {
    transform: translateX(-50%) translateY(0) !important;
  }
}

.entry-popover.ep-pop-open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.ep-title {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted, rgba(255,255,255,0.6));
  margin-bottom: 10px;
}

.ep-rows { display: flex; flex-direction: column; gap: 8px; }

.ep-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--text-secondary, rgba(255,255,255,0.85));
}

.ep-check {
  font-size: 1em;
  flex-shrink: 0;
  width: 16px;
  text-align: center;
}

.ep-check.ep-checked {
  color: var(--accent-yellow, #FFE512);
}
.ep-check.ep-unchecked {
  color: var(--text-faint, rgba(255,255,255,0.4));
}

.ep-field { flex: 1; }

.ep-amount {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent-yellow, #FFE512);
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.ep-divider {
  height: 1px;
  background: var(--border-subtle, rgba(255,255,255,0.08));
  margin: 10px 0;
}

.ep-bonus {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  color: var(--text-muted, rgba(255,255,255,0.6));
}

.ep-bonus-badge {
  background: var(--accent-yellow, #FFE512);
  color: #000;
  font-weight: 900;
  font-size: 0.7rem;
  border-radius: 100px;
  padding: 2px 8px;
  white-space: nowrap;
  flex-shrink: 0;
}

/* ── +1 flying badge ────────────────────────────────────────────────────────── */
.plus-one-badge {
  background: var(--accent-yellow, #FFE512);
  color: #000;
  font-family: var(--font-body, sans-serif);
  font-weight: 700;
  font-size: 0.72rem;
  border-radius: 100px;
  padding: 3px 9px;
  pointer-events: none;
  position: fixed;
  z-index: 950;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(0,0,0,0.35);
}

/* ── Confetti particles ─────────────────────────────────────────────────────── */
.ep-confetti {
  position: fixed;
  z-index: 950;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-yellow, #FFE512);
  pointer-events: none;
}

/* ── Entry label badge in form ──────────────────────────────────────────────── */
.entry-label-badge {
  display: inline-block;
  background: rgba(255, 229, 18, 0.18);
  color: var(--accent-yellow, #FFE512);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  border-radius: 100px;
  padding: 1px 6px;
  vertical-align: middle;
  margin-left: 4px;
  border: 1px solid rgba(255, 229, 18, 0.3);
}

/* ── In-form entry counter ──────────────────────────────────────────────────── */
.entry-counter {
  grid-column: 1 / -1;
  background: rgba(255, 229, 18, 0.07);
  border: 1px solid rgba(255, 229, 18, 0.2);
  border-radius: var(--r-md, 8px);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 4px;
}

.ec-dots {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.ec-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--border-medium, rgba(255,255,255,0.15));
  transition: background 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.ec-dot.ec-filled {
  background: var(--accent-yellow, #FFE512);
  box-shadow: 0 0 6px rgba(255, 229, 18, 0.5);
}

@keyframes ec-bounce {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.35); }
  70%  { transform: scale(0.9); }
  100% { transform: scale(1); }
}

.ec-dot.ec-bounce {
  animation: ec-bounce 0.3s ease forwards;
}

.ec-label {
  flex: 1;
  font-size: 0.78rem;
  color: var(--text-muted, rgba(255,255,255,0.6));
  line-height: 1.4;
}

.ec-label strong {
  color: var(--accent-yellow, #FFE512);
  font-weight: 700;
}

/* ── Name+Email pair container (A3) ─────────────────────────────────────────── */
.form-group-pair {
  grid-column: 1 / -1;
  position: relative;
  background: rgba(255, 229, 18, 0.04);
  border: 1px solid rgba(255, 229, 18, 0.18);
  border-radius: var(--r-md, 8px);
  padding: 16px 16px 12px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 16px;
}

/* Badge floats top-right of the pair */
.entry-badge-pair {
  position: absolute;
  top: 12px;
  right: 14px;
  margin-left: 0;
  cursor: default;
}

/* On narrow screens, stack fields vertically */
@media (max-width: 540px) {
  .form-group-pair {
    grid-template-columns: 1fr;
  }
}

/* Pair earned message spans full width (below both fields) */
.form-group-pair .field-earned-msg {
  grid-column: 1 / -1;
}

/* ── Field badge popover tooltip (A4) ──────────────────────────────────────── */
.form-group-with-badge,
.form-group-pair {
  position: relative;
}

.field-badge-popover {
  position: absolute;
  z-index: 200;
  bottom: calc(100% + 8px);
  right: 0;
  min-width: 220px;
  max-width: 280px;
  background: var(--bg-card, #1a1a1a);
  color: var(--text-primary, #fff);
  font-size: 0.76rem;
  line-height: 1.45;
  border-radius: 8px;
  padding: 10px 13px;
  border: 1px solid rgba(255, 229, 18, 0.35);
  box-shadow: 0 4px 18px rgba(0,0,0,0.45);
  pointer-events: none;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 200ms ease, transform 200ms ease;
}

/* Yellow left keyline accent */
.field-badge-popover::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: #FFE512;
  border-radius: 2px;
}

/* Visible state */
.field-badge-popover.popover-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* Mobile: show below the badge */
@media (max-width: 700px) {
  .field-badge-popover {
    top: calc(100% + 6px);
    bottom: auto;
    right: 0;
    transform: translateY(-4px);
  }
  .field-badge-popover.popover-visible {
    transform: translateY(0);
  }
}

/* ── Field validation green state (A5) ─────────────────────────────────────── */
.form-group input.field-valid {
  border-color: #22c55e !important;
  box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.18);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

/* Softer settled state after the 600ms green flash */
.form-group input.field-valid-settled {
  border-color: rgba(34, 197, 94, 0.5) !important;
  box-shadow: none;
  transition: border-color 0.4s ease;
}

/* Pair container gets a green tint when both name+email valid */
.form-group-pair.pair-valid {
  border-color: rgba(34, 197, 94, 0.4);
  background: rgba(34, 197, 94, 0.04);
  transition: border-color 0.3s ease, background 0.3s ease;
}

/* "You've gained 1 extra entry!" inline message */
.field-earned-msg {
  font-size: 0.82rem;
  font-weight: 700;
  font-family: var(--font-sans, 'Lato', sans-serif);
  color: var(--accent-yellow, #FFE512);
  letter-spacing: 0.01em;
  margin-top: 6px;
  min-height: 1.2em;
  display: flex;
  align-items: center;
  gap: 5px;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.field-earned-msg.earned-visible {
  opacity: 1;
}

.field-earned-msg::before {
  content: '✦';
  font-size: 0.7rem;
  color: var(--accent-yellow, #FFE512);
  flex-shrink: 0;
}

/* ── Address validation helper text ─────────────────────────────────────────── */
#addr-helper {
  font-size: 0.82rem;
  font-weight: 500;
  color: #e05c5c;
  margin-top: 5px;
  min-height: 1.2em;
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}

#addr-helper.addr-helper-visible {
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  #addr-helper {
    transition: none;
  }
}

/* ── Confetti particle (A5) ────────────────────────────────────────────────── */
.ep-confetti {
  position: fixed;
  border-radius: 2px;
  pointer-events: none;
  z-index: 9999;
}

/* ── Enhanced field focus state ─────────────────────────────────────────────── */
.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--yellow, #FFE512) !important;
  box-shadow: 0 0 0 3px rgba(255, 229, 18, 0.18);
  transition: border-color 0.2s cubic-bezier(0.4,0,0.2,1), box-shadow 0.2s cubic-bezier(0.4,0,0.2,1);
}

/* ── Email format helper text ───────────────────────────────────────────────── */
.email-format-hint {
  font-size: 0.74rem;
  color: #f87171;
  margin-top: 4px;
  line-height: 1.3;
  min-height: 0;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.2s ease, opacity 0.2s ease;
}
.email-format-hint.email-hint-visible {
  max-height: 3em;
  opacity: 1;
}

/* ── Submit button shake (invalid attempt) ──────────────────────────────────── */
@keyframes btn-shake {
  0%   { transform: translateX(0); }
  18%  { transform: translateX(-5px); }
  36%  { transform: translateX(5px); }
  54%  { transform: translateX(-4px); }
  72%  { transform: translateX(4px); }
  86%  { transform: translateX(-2px); }
  100% { transform: translateX(0); }
}
.btn-submit.btn-shake {
  animation: btn-shake 0.42s cubic-bezier(0.36,0.07,0.19,0.97) both;
}

/* ── Submit button hover + click polish ─────────────────────────────────────── */
.btn-submit {
  transition: background 0.15s, transform 0.1s, box-shadow 0.15s;
}
.btn-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 229, 18, 0.35);
}
.btn-submit:active {
  transform: scale(0.98);
  transition-duration: 0.1s;
}

/* ── All-3-entries pulsing glow on submit button ────────────────────────────── */
@keyframes btn-glow-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(255, 229, 18, 0.5); }
  50%  { box-shadow: 0 0 18px 6px rgba(255, 229, 18, 0.22); }
  100% { box-shadow: 0 0 0 0 rgba(255, 229, 18, 0.5); }
}
.btn-submit--all-earned {
  animation: btn-glow-pulse 1.4s ease-in-out infinite;
}
.btn-submit--all-earned:hover {
  animation: none;
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(255, 229, 18, 0.45);
}

/* ── Entry counter — all-3 hint upgrade ────────────────────────────────────── */
.entry-counter.ec-all-earned {
  border-color: rgba(255, 229, 18, 0.45);
  background: rgba(255, 229, 18, 0.1);
  transition: border-color 0.3s ease, background 0.3s ease;
}

/* ── Progressive disclosure — next-field attention pulse ────────────────────── */
@keyframes field-next-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(255, 229, 18, 0); }
  30%  { box-shadow: 0 0 0 4px rgba(255, 229, 18, 0.28); }
  60%  { box-shadow: 0 0 0 6px rgba(255, 229, 18, 0.14); }
  100% { box-shadow: 0 0 0 0 rgba(255, 229, 18, 0); }
}
.form-group input.field-next-up {
  animation: field-next-pulse 0.85s ease-out forwards;
  border-color: rgba(255, 229, 18, 0.5) !important;
}

/* ── Reduced-motion overrides ───────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .entry-pill-wrapper,
  .entry-popover,
  .entry-pill {
    transition: opacity 0.01ms, transform 0.01ms !important;
    animation: none !important;
  }
  .plus-one-badge { display: none !important; }
  .ep-confetti    { display: none !important; }
  .ec-dot         { transition: background 0.01ms !important; animation: none !important; }
  .field-badge-popover {
    transition: none !important;
  }
  .field-earned-msg {
    transition: none !important;
    opacity: 1; /* keep visible; no timed fade */
  }
  .field-earned-msg.earned-visible {
    opacity: 1;
  }
  .form-group input.field-valid,
  .form-group input.field-valid-settled {
    transition: none !important;
  }
  /* New animation overrides */
  .btn-submit,
  .btn-submit--all-earned {
    animation: none !important;
    transition: background 0.01ms !important;
  }
  .btn-submit.btn-shake {
    animation: none !important;
  }
  .form-group input.field-next-up {
    animation: none !important;
    border-color: rgba(255, 229, 18, 0.5) !important;
  }
  .email-format-hint {
    transition: none !important;
  }
}

/* ============================================================================
   INTERLUDE PHOTO BANDS — breathing space between data-dense sections
   Two cinematic full-bleed horizontal strips (house-09 + aerial-oxley)
   ============================================================================ */

.interlude-band {
  position: relative; /* establishes stacking context for absolute img + overlay */
  width: 100%;
  height: 180px;
  overflow: hidden;
  display: block;
  /* No margin — let sections sit flush, band provides the breathing gap */
}

.interlude-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
  /* Subtle parallax: photo translates ~10% vertically as user scrolls past */
  will-change: transform;
  transition: transform 0.1s linear;
}

/* Enhanced scrim for better contrast on text — gradient overlay + solid base */
.interlude-overlay {
  position: absolute;
  inset: 0;
  /* Layered gradient: bright at top, darkening toward bottom for text readability */
  background: linear-gradient(
    180deg,
    rgba(0,0,0,0.15) 0%,
    rgba(0,0,0,0.35) 50%,
    rgba(0,0,0,0.55) 100%
  );
  /* Optional: add a warm yellow tint to match brand */
  background-blend-mode: overlay;
  z-index: 1;
}

/* Premium text styling with enhanced legibility */
.interlude-text {
  position: absolute;
  bottom: 50%;
  left: 50%;
  transform: translate(-50%, 50%);
  z-index: 2;
  color: #ffffff;
  font-family: var(--font-display, 'Playfair Display', serif);
  font-style: italic;
  font-size: clamp(1rem, 2.5vw, 1.5rem);
  font-weight: 600;
  text-align: center;
  white-space: nowrap;
  letter-spacing: 0.01em;
  /* Layered text shadow for maximum legibility */
  text-shadow:
    0 1px 4px rgba(0,0,0,0.3),
    0 2px 8px rgba(0,0,0,0.45),
    0 4px 12px rgba(0,0,0,0.55);
  margin: 0;
  line-height: 1;
}

/* Mobile: reduce height */
@media (max-width: 640px) {
  .interlude-band {
    height: 120px;
  }
  .interlude-text {
    font-size: 0.95rem;
    white-space: normal;
    padding: 0 1rem;
    text-align: center;
  }
}

/* Reduced-motion: disable parallax entirely */
@media (prefers-reduced-motion: reduce) {
  .interlude-photo {
    will-change: auto;
    transition: none !important;
    transform: none !important;
  }
}

/* Light-theme compatibility: overlay is theme-neutral (pure black alpha),
   works on both dark and light themes without adjustment */

/* ============================================================================
   HERITAGE + BUDGET — unified cinematic section (v3 liquid glass)
   Image backdrop (bright daytime Queenslander) → subtle vignette overlay →
   frosted glass content panel. Bright sky breathes; text sits inside a
   backdrop-filter panel for WCAG AA legibility.
   Text contrast: #FFF on rgba(0,0,0,0.60) frosted panel → 9.5:1+ WCAG AA.
   Fallback (@supports not backdrop-filter): solid rgba(0,0,0,0.75) panel.
   ============================================================================ */

.heritage-budget-section {
  position: relative;
  width: 100%;
  height: clamp(520px, 44vw, 620px);
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  /* Enough vertical space so the panel never clips at the top */
  padding-top: clamp(80px, 10vw, 120px);
  /* left yellow keyline — carry brand thread */
  border-left: 4px solid var(--accent-yellow, #FFE512);
}

/* The photo — fills the entire section */
.hbs-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  display: block;
  will-change: transform;
  transition: transform 0.1s linear;
}

/* Subtle warm vignette — lets the bright image breathe.
   Much lighter than before: top is near-transparent, edges slightly darkened.
   Bottom gets just enough to anchor the panel without crushing the image. */
.hbs-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(0,0,0,0.05) 0%,
    rgba(0,0,0,0.08) 50%,
    rgba(0,0,0,0.28) 100%
  );
  z-index: 1;
}

/* Light theme: warm amber-tinted vignette */
:root[data-theme="light"] .hbs-overlay {
  background: linear-gradient(
    180deg,
    rgba(20,12,0,0.04) 0%,
    rgba(20,12,0,0.10) 55%,
    rgba(20,12,0,0.30) 100%
  );
}

/* Thin yellow left keyline running full height */
.hbs-keyline {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--accent-yellow, #FFE512);
  z-index: 3;
}
/* In light theme the border-left handles this — hide the keyline div */
:root[data-theme="light"] .hbs-keyline {
  background: #B8860B;
}

/* Content panel — liquid glass treatment.
   Uses backdrop-filter to blur the image behind the text panel.
   Semi-transparent dark bg + white inset border + yellow glow = premium feel.
   The panel floats in the lower-left of the image, image breathes around it. */
.hbs-content {
  position: relative;
  z-index: 2;
  width: auto;
  max-width: min(680px, calc(100% - 48px));
  margin: 0 0 clamp(24px, 3vw, 40px) clamp(24px, 4vw, 48px);
  padding: clamp(28px, 3.5vw, 40px) clamp(28px, 4vw, 44px);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  /* Liquid glass core */
  background: rgba(0, 0, 0, 0.58);
  backdrop-filter: blur(14px) saturate(1.4);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  border-radius: 10px;
  /* Inset white border — glass edge */
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,0.14),
    0 0 0 1px rgba(0,0,0,0.12),
    0 8px 32px rgba(0,0,0,0.28),
    0 0 48px rgba(255,229,18,0.10);
}

/* Solid fallback for browsers without backdrop-filter */
@supports not (backdrop-filter: blur(1px)) {
  .hbs-content {
    background: rgba(0, 0, 0, 0.78);
    box-shadow:
      inset 0 0 0 1px rgba(255,255,255,0.12),
      0 8px 32px rgba(0,0,0,0.40);
  }
}

/* Light theme panel — slightly warmer tint */
:root[data-theme="light"] .hbs-content {
  background: rgba(15, 9, 0, 0.62);
  box-shadow:
    inset 0 0 0 1px rgba(255,229,18,0.18),
    0 0 0 1px rgba(0,0,0,0.15),
    0 8px 32px rgba(0,0,0,0.32),
    0 0 48px rgba(255,229,18,0.12);
}

@supports not (backdrop-filter: blur(1px)) {
  :root[data-theme="light"] .hbs-content {
    background: rgba(15, 9, 0, 0.82);
  }
}

/* Chapter title — italic Playfair, flows as first item inside the panel.
   Sits inside hbs-content; panel provides the contrast backdrop. */
.hbs-chapter {
  font-family: var(--font-display, 'Playfair Display', serif);
  font-style: italic;
  font-size: clamp(0.88rem, 1.2vw, 1.0rem);
  font-weight: 600;
  color: rgba(255, 255, 255, 0.92);
  letter-spacing: 0.03em;
  margin: 0 0 2px;
  /* Removed white-space: nowrap so it wraps on narrow viewports */
}

/* Kicker line — eyebrow above headline */
.hbs-kicker {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-yellow, #FFE512);
  /* #FFE512 on rgba(0,0,0,0.82) dark overlay ≈ 12.4:1 WCAG AAA */
  margin-bottom: 16px;
}
:root[data-theme="light"] .hbs-kicker {
  color: #FFE512; /* stays yellow — dark overlay provides the contrast */
}

.hbs-lightning {
  color: inherit;
  flex-shrink: 0;
}

/* Headline — THE moment. Balanced: readable but image-forward. */
.hbs-headline {
  font-family: var(--font-display, 'Playfair Display', serif);
  font-size: clamp(1.9rem, 3vw, 2.8rem);
  font-weight: 700;
  color: #FFFFFF;
  /* #FFF on rgba(0,0,0,0.82) ≈ 15:1 WCAG AAA */
  line-height: 1.18;
  margin: 0 0 18px;
  max-width: 680px;
}

/* Sub copy */
.hbs-sub {
  font-size: clamp(1.0rem, 1.5vw, 1.15rem);
  color: rgba(255,255,255,0.88);
  /* rgba(255,255,255,0.88) on rgba(0,0,0,0.82) ≈ 9.5:1 WCAG AA */
  line-height: 1.55;
  margin: 0 0 18px;
  max-width: 760px;
}

/* Source line */
.hbs-source {
  font-size: 0.72rem;
  color: rgba(255,255,255,0.50);
  line-height: 1.4;
  margin: 0 0 22px;
}
.hbs-source a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Budget content wrapper (kicker + headline + sub + source) */
.hbs-budget {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* CTA — #000 on #FFE512 = 19.6:1 WCAG AAA */
.hbs-cta {
  display: inline-block;
  background: var(--accent-yellow, #FFE512);
  color: #000000;
  font-family: var(--font-body, 'Lato', sans-serif);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 16px 32px;
  border-radius: var(--r-sm, 4px);
  text-decoration: none;
  transition: background 0.15s;
  margin-top: 4px;
  /* Keyboard focus ring */
  outline-offset: 3px;
}
.hbs-cta:hover {
  background: #E8D000;
  color: #000000;
}
.hbs-cta:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 3px;
}
:root[data-theme="light"] .hbs-cta {
  background: #1A1208;
  color: var(--accent-yellow, #FFE512);
}
:root[data-theme="light"] .hbs-cta:hover {
  background: #2A2010;
}

/* Mobile — panel goes full-width, flush to edges */
@media (max-width: 640px) {
  .heritage-budget-section {
    height: clamp(480px, 110vw, 560px);
    border-left-width: 3px;
    align-items: flex-end;
  }
  /* Chapter title: already static/inline — just tweak size for mobile */
  .hbs-chapter {
    font-size: 0.88rem;
    margin-bottom: 2px;
  }
  .hbs-content {
    /* Full-width panel on mobile, flush to bottom */
    width: 100%;
    max-width: 100%;
    margin: 0;
    border-radius: 0;
    padding: 24px 20px 24px 24px;
    gap: 8px;
    /* Slightly more opaque on mobile — smaller viewport, less image visible */
    background: rgba(0, 0, 0, 0.65);
    box-shadow:
      inset 0 1px 0 rgba(255,255,255,0.12),
      0 0 0 1px rgba(0,0,0,0.10);
  }
  .hbs-kicker {
    font-size: 0.72rem;
    margin-bottom: 12px;
  }
  .hbs-headline {
    font-size: clamp(1.6rem, 6vw, 2.0rem);
    margin-bottom: 16px;
  }
  .hbs-sub {
    font-size: 1.0rem;
    margin-bottom: 20px;
    max-width: 100%;
  }
  .hbs-cta {
    font-size: 0.9rem;
    padding: 14px 24px;
  }
}

/* Reduced-motion: disable Ken Burns / parallax on photo */
@media (prefers-reduced-motion: reduce) {
  .hbs-photo {
    will-change: auto;
    transition: none !important;
    transform: none !important;
  }
}

/* ============================================================================
   PARTNER STRIP MARQUEE
   Source: qr-landing/_design/index-partners.md §1 & §3
   Position: between suburb grid and map section
   ============================================================================ */

/* ── Keyframe ── */
@keyframes ps-scroll {
  from { transform: translate3d(0, 0, 0); }
  to   { transform: translate3d(-50%, 0, 0); }
}

/* ── Section wrapper ── */
.partner-strip {
  background: linear-gradient(180deg, var(--bg-card) 0%, var(--bg-page) 100%);
  padding: clamp(24px, 3vw, 48px) 0 clamp(20px, 2.5vw, 40px);
  overflow: hidden;
  /* Subtle top separator — yellow hairline */
  border-top: 1px solid var(--border-yellow);
  border-bottom: 1px solid var(--border-yellow);
}

/* ── Header ── */
.ps-header {
  text-align: center;
  padding: 0 clamp(16px, 4vw, 48px) clamp(16px, 2vw, 28px);
}

/* Reuse existing .section-label; add extra spacing for standalone context */
.ps-header .section-label {
  justify-content: center;
  margin-bottom: 8px;
}
/* Remove the flex-1 line on center-justified kicker */
.ps-header .section-label::after {
  display: none;
}

.ps-sub {
  font-family: var(--font-body);
  font-size: 0.82rem;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

/* ── Track wrapper — the visible clipping viewport ── */
.ps-track-wrapper {
  overflow: hidden;
  /* Fade edges for a softer entry/exit */
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 6%, #000 94%, transparent 100%);
          mask-image: linear-gradient(90deg, transparent 0%, #000 6%, #000 94%, transparent 100%);
}

/* ── Animated track — contains 20 cards (10 × 2 for seamless loop) ── */
.ps-track {
  display: flex;
  gap: 16px;
  padding: 0 16px;
  width: max-content;
  will-change: transform;
  animation: ps-scroll 32s linear infinite;
}

/* Pause on hover (track OR wrapper) or keyboard-focus inside the track.
   The wrapper catch is important: Playwright and some pointer devices land
   on the wrapper element, not the animating track, during a hover event. */
.ps-track:hover,
.ps-track-wrapper:hover .ps-track,
.ps-track:focus-within {
  animation-play-state: paused;
}

/* ── Individual partner card ── */
.ps-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 220px;
  min-width: 220px;
  height: 120px;
  padding: 14px 14px 12px 44px; /* left padding makes room for the badge */
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-md);
  flex-shrink: 0;
  /* not a link by default */
  text-decoration: none;
  color: inherit;
  cursor: default;
}

/* Linked card (has IG) — pointer cursor + hover state */
.ps-card--linked {
  cursor: pointer;
  transition: background-color 160ms ease, border-color 160ms ease;
}
.ps-card--linked:hover {
  background: rgba(255, 229, 18, 0.07);
  border-color: var(--border-yellow);
}

/* Keyboard focus ring — yellow, visible on both themes */
.ps-card--linked:focus-visible {
  outline: 2px solid var(--accent-yellow);
  outline-offset: 2px;
  animation-play-state: paused; /* belt-and-braces alongside :focus-within */
}

/* ── Yellow $ badge ── */
.ps-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent-yellow);
  color: #000;
  font-family: var(--font-body);
  font-weight: 900;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  line-height: 1;
}

/* ── Card text elements ── */
.ps-name {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.82rem;
  color: var(--text-primary);
  line-height: 1.25;
  /* Truncate long names gracefully */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ps-location {
  font-family: var(--font-body);
  font-size: 0.7rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.ps-prize {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.72rem;
  color: var(--accent-yellow);
  letter-spacing: 0.04em;
  margin-top: 2px;
}

/* ── Instagram handle row ── */
.ps-ig {
  display: flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-body);
  font-size: 0.65rem;
  color: var(--text-faint);
  margin-top: auto;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ps-ig-icon {
  flex-shrink: 0;
  color: var(--text-muted);
}

/* ── Mobile: smaller cards ── */
@media (max-width: 640px) {
  .ps-card {
    width: 185px;
    min-width: 185px;
    height: 100px;
    padding: 12px 12px 10px 40px;
    gap: 4px;
  }
  .ps-badge {
    width: 24px;
    height: 24px;
    font-size: 0.75rem;
    top: 10px;
    left: 10px;
  }
  .ps-name  { font-size: 0.75rem; }
  .ps-prize { font-size: 0.65rem; }
}

/* ── Light theme: slightly stronger card border for contrast ── */
:root[data-theme="light"] .ps-card {
  background: rgba(0, 0, 0, 0.025);
  border-color: var(--border-medium);
}
:root[data-theme="light"] .ps-card--linked:hover {
  background: rgba(180, 145, 0, 0.07);
  border-color: var(--border-yellow-strong);
}
:root[data-theme="light"] .ps-badge {
  /* Yellow badge stays yellow — same on both themes */
  background: var(--accent-yellow);
  color: #000;
}
:root[data-theme="light"] .partner-strip {
  background: linear-gradient(180deg, var(--bg-card) 0%, var(--bg-page) 100%);
  border-top-color: var(--border-yellow);
  border-bottom-color: var(--border-yellow);
}

/* ── Reduced motion: no animation, static scrollable row ── */
@media (prefers-reduced-motion: reduce) {
  .ps-track {
    animation: none;
    will-change: auto;
    /* Scrollable on touch, hidden scrollbar */
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    justify-content: center;
    flex-wrap: nowrap;
    width: auto; /* don't stretch to max-content if no animation */
    max-width: 100%;
    /* un-mask edges — no scroll animation so no edge-fade needed */
  }
  .ps-track-wrapper {
    -webkit-mask-image: none;
            mask-image: none;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .ps-track-wrapper::-webkit-scrollbar { display: none; }
  .ps-track::-webkit-scrollbar { display: none; }
  /* Hide the duplicate aria-hidden copy in static mode */
  .ps-track .ps-card[aria-hidden="true"] {
    display: none;
  }
}

/* ============================================================
   VISUALLY HIDDEN UTILITY
   (alias for .sr-only so HTML can use either class)
   ============================================================ */
.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;
}

/* ============================================================
   SUCCESS STATE — SOCIAL FOLLOW BLOCK
   ============================================================ */

/* Overwrite the existing plain success box to be wider / more structured */
.form-success {
  display: none;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-lg);
  padding: 28px 24px 24px;
  text-align: center;
  max-width: 640px;
  margin: 0 auto;
}
.form-success.visible { display: block; }

/* Confirm block — check mark + headline */
.fs-confirm { margin-bottom: 24px; }

.fs-tick {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px; height: 52px;
  border-radius: 50%;
  background: rgba(34,197,94,0.12);
  border: 2px solid rgba(34,197,94,0.4);
  margin: 0 auto 14px;
  color: #22c55e;
}

/* Yellow burst ring — appears via JS class .fs-burst-active */
.fs-burst {
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 3px solid var(--accent-yellow);
  opacity: 0;
  transform: scale(0.6);
  pointer-events: none;
}
@media (prefers-reduced-motion: no-preference) {
  .fs-burst.fs-burst-active {
    animation: burst-pop 0.5s var(--ease-out) forwards;
  }
}
@keyframes burst-pop {
  0%   { opacity: 0.9; transform: scale(0.6); }
  60%  { opacity: 0.6; transform: scale(1.3); }
  100% { opacity: 0;   transform: scale(1.5); }
}

.fs-check-icon { position: relative; z-index: 1; }

.fs-headline {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 8px;
  line-height: 1.25;
}

.fs-code-row {
  font-family: var(--font-body);
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0 0 12px;
}

.fs-code {
  font-size: 1.1rem;
  letter-spacing: 0.12em;
  color: var(--accent-yellow, #FFE512);
  font-family: 'Courier New', monospace;
  background: rgba(255, 229, 18, 0.1);
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid rgba(255, 229, 18, 0.3);
}

.fs-sub {
  font-family: var(--font-body);
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0;
  max-width: 480px;
  margin-inline: auto;
}

/* Social follow block — staggered fade-in via JS */
.fs-social-block {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.35s ease, transform 0.35s ease;
  border-top: 1px solid var(--border-subtle);
  padding-top: 20px;
  margin-top: 4px;
}
.fs-social-block.fs-revealed {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  .fs-social-block { transition: none; opacity: 1; transform: none; }
}

/* fs-ig-grid, fs-partner-compact — defined in the new block above (.fs-rw-hero-card section) */

/* FB icon uses fill not stroke — override icon colour */
.fs-ig-card .fs-ig-icon svg[fill="currentColor"] {
  color: #1877F2;
}
.fs-ig-card[data-follow-state="awarded"] .fs-ig-icon svg[fill="currentColor"] {
  color: #4ade80;
}

.fs-ig-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  background: var(--bg-section-alt);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-md);
  padding: 14px 10px 12px;
  text-decoration: none;
  color: var(--text-primary);
  min-height: 44px;   /* a11y touch target */
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
  cursor: pointer;
}
.fs-ig-card:hover,
.fs-ig-card:focus-visible {
  border-color: var(--accent-yellow);
  background: color-mix(in srgb, var(--bg-section-alt) 85%, var(--accent-yellow) 15%);
  box-shadow: 0 0 0 2px var(--focus-ring);
  outline: none;
}
.fs-ig-card:focus-visible {
  box-shadow: 0 0 0 3px var(--focus-ring);
}

.fs-ig-icon {
  display: flex;
  color: var(--accent-yellow);
  flex-shrink: 0;
}

.fs-ig-handle {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-secondary);
  word-break: break-all;
  line-height: 1.2;
}

.fs-ig-name {
  font-family: var(--font-body);
  font-size: 0.7rem;
  color: var(--text-muted);
  line-height: 1.2;
}

.fs-ig-cta {
  display: inline-block;
  margin-top: 6px;
  padding: 4px 12px;
  background: var(--accent-yellow);
  color: var(--text-on-yellow);
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 700;
  border-radius: 99px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  transition: background 0.15s;
}
.fs-ig-card:hover .fs-ig-cta,
.fs-ig-card:focus-visible .fs-ig-cta {
  background: var(--accent-yellow-hover);
}

/* ── RW Hero card (Tier 1, full width) ────────────────────── */
.fs-rw-hero-card {
  border: 2px solid var(--accent-yellow);
  border-radius: var(--r-md);
  background: color-mix(in srgb, var(--bg-section-alt) 88%, var(--accent-yellow) 12%);
  padding: 16px 16px 14px;
  margin-bottom: 14px;
}

.fs-rw-hero-content {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

@media (min-width: 480px) {
  .fs-rw-hero-content {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
  }
}

.fs-rw-hero-text { flex: 1; min-width: 0; }

.fs-rw-hero-name {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 3px;
  line-height: 1.2;
}

.fs-rw-hero-tagline {
  font-family: var(--font-body);
  font-size: 0.75rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.45;
}

.fs-rw-hero-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.fs-rw-btn.fs-ig-card {
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 12px 14px 10px;
  min-width: 84px;
  min-height: 80px;
}

/* ── Partner grid override — 2-col mobile, 3-col desktop ─── */
.fs-ig-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}

@media (min-width: 480px) {
  .fs-ig-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ── Compact partner card (Tier 2) ────────────────────────── */
.fs-partner-compact {
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: var(--bg-section-alt);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-md);
  padding: 10px 10px 8px;
}

.fs-partner-compact-meta { display: flex; flex-direction: column; gap: 1px; }

.fs-partner-compact-name {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-secondary);
  line-height: 1.2;
}

.fs-partner-compact-suburb {
  font-family: var(--font-body);
  font-size: 0.63rem;
  color: var(--text-faint);
  line-height: 1.2;
}

.fs-partner-compact-icons { display: flex; gap: 6px; flex-wrap: wrap; }

.fs-compact-btn.fs-ig-card {
  flex-direction: row;
  align-items: center;
  gap: 4px;
  padding: 6px 10px;
  min-height: 36px;
  min-width: 44px;
  border-radius: 99px;
}

.fs-compact-icon { display: flex; color: var(--accent-yellow); flex-shrink: 0; }

.fs-compact-btn.fs-ig-card .fs-compact-icon svg[fill="currentColor"] { color: #1877F2; }
.fs-compact-btn.fs-ig-card[data-follow-state="awarded"] .fs-compact-icon svg[fill="currentColor"] { color: #4ade80; }

.fs-compact-label {
  font-family: var(--font-body);
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--text-secondary);
  line-height: 1;
}

.fs-compact-btn.fs-ig-card[data-follow-state="awarded"] {
  border-color: #4ade80;
  background: color-mix(in srgb, var(--bg-section-alt) 80%, #1a472a 20%);
}
.fs-compact-btn.fs-ig-card[data-follow-state="awarded"] .fs-compact-icon { color: #4ade80; }
.fs-compact-btn.fs-ig-card[data-follow-state="cap"],
.fs-compact-btn.fs-ig-card[data-follow-state="already"] { opacity: 0.6; }

/* Compact buttons: the CTA pill is replaced by icon+label, hide it */
.fs-compact-btn.fs-ig-card .fs-ig-cta--default { display: none; }
/* Show awarded/cap/already inline */
.fs-compact-btn.fs-ig-card[data-follow-state="awarded"] .fs-ig-cta--awarded { display: inline-flex; background: none; color: #4ade80; padding: 0; margin: 0; font-size: 0.7rem; }
.fs-compact-btn.fs-ig-card[data-follow-state="cap"] .fs-ig-cta--cap { display: inline-flex; background: none; color: var(--text-faint); padding: 0; margin: 0; font-size: 0.7rem; }
.fs-compact-btn.fs-ig-card[data-follow-state="already"] .fs-ig-cta--already { display: inline-flex; background: none; color: var(--text-secondary); padding: 0; margin: 0; font-size: 0.7rem; }
.fs-compact-btn.fs-ig-card[data-follow-state="pending"] .fs-ig-cta--pending { display: inline-flex; background: none; color: var(--text-faint); padding: 0; margin: 0; font-size: 0.7rem; }

/* ── Welcome-back banner ───────────────────────────────────── */
.fs-returning-banner {
  background: color-mix(in srgb, var(--bg-section-alt) 80%, var(--accent-yellow) 8%);
  border: 1px solid color-mix(in srgb, var(--border-subtle) 60%, var(--accent-yellow) 40%);
  border-radius: var(--r-md);
  padding: 12px 14px;
  margin-bottom: 12px;
}

.fs-returning-headline {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 3px;
}

.fs-returning-sub {
  font-family: var(--font-body);
  font-size: 0.78rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.5;
}

/* "Handles coming soon" muted line */
.fs-ig-more {
  font-family: var(--font-body);
  font-size: 0.78rem;
  color: var(--text-faint);
  line-height: 1.5;
  margin: 0 0 4px;
}

/* ── Email delivery confirmation note ─────────────────── */
.fs-email-delivery-note {
  font-family: var(--font-body);
  font-size: 0.78rem;
  color: var(--text-muted);
  margin: 4px 0 8px;
  min-height: 1.2em;
  line-height: 1.4;
}

/* ── Field inline error (shared with email-format-hint) ── */
.field-inline-error {
  font-size: 0.74rem;
  color: #f87171;
  margin-top: 4px;
  line-height: 1.3;
  min-height: 0;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.2s ease, opacity 0.2s ease;
}
.field-inline-error.email-hint-visible {
  max-height: 3em;
  opacity: 1;
}

/* Submit button: visually disabled when invalid (opacity only — not pointer-events, so shake still fires) */
.btn-submit[data-invalid="1"] {
  opacity: 0.45;
  cursor: not-allowed;
}

/* ── IG-story profile circle row ──────────────────────── */
.fs-profile-row {
  display: flex;
  flex-direction: row;
  gap: 16px;
  overflow-x: auto;
  padding: 8px 2px 12px;
  margin-bottom: 14px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.fs-profile-row::-webkit-scrollbar { display: none; }

@media (min-width: 560px) {
  .fs-profile-row {
    flex-wrap: wrap;
    overflow-x: visible;
  }
}

.fs-circle-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  position: relative;
  flex-shrink: 0;
}

/* RW is slightly larger */
.fs-circle-rw .fs-circle-avatar,
.fs-circle-rw button.fs-circle-avatar {
  width: 80px;
  height: 80px;
}
@media (min-width: 480px) {
  .fs-circle-rw .fs-circle-avatar,
  .fs-circle-rw button.fs-circle-avatar {
    width: 96px;
    height: 96px;
  }
}

/* Base avatar circle */
.fs-circle-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: transparent;
  position: relative;
  cursor: pointer;
  border: none;
  padding: 0;
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
@media (min-width: 480px) {
  .fs-circle-avatar { width: 80px; height: 80px; }
}

.fs-circle-avatar:hover,
.fs-circle-avatar:focus-visible {
  transform: scale(1.08);
  outline: none;
}
.fs-circle-avatar:focus-visible {
  box-shadow: 0 0 0 3px var(--accent-yellow);
}

/* IG gradient ring */
.fs-circle-ig-only,
.fs-circle-both {
  background: linear-gradient(white, white) padding-box,
              linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888) border-box;
  border: 3px solid transparent;
}

/* FB blue ring */
.fs-circle-fb-only {
  background: linear-gradient(white, white) padding-box,
              linear-gradient(180deg, #1877F2, #1877F2) border-box;
  border: 3px solid transparent;
}

/* "both" entities: split ring — half IG gradient, half FB blue */
.fs-circle-both {
  background: linear-gradient(white, white) padding-box,
              conic-gradient(from 0deg, #f09433 0%, #e6683c 10%, #dc2743 20%, #cc2366 30%, #bc1888 50%, #1877F2 50%, #1877F2 100%) border-box;
  border: 3px solid transparent;
}

/* Inner circle — dark bg matching page */
.fs-circle-inner {
  width: calc(100% - 6px);
  height: calc(100% - 6px);
  border-radius: 50%;
  background: var(--bg-section-alt, #1a1a1a);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
  z-index: 1;
}

/* Initial letter placeholder */
.fs-circle-initial {
  font-family: var(--font-body);
  font-size: 1.25rem;
  font-weight: 900;
  color: #fff;
  background: var(--circle-bg, #2a2a2a);
  text-transform: uppercase;
  letter-spacing: -0.02em;
  user-select: none;
}
@media (min-width: 480px) {
  .fs-circle-initial { font-size: 1.5rem; }
}

/* RW logo inside circle */
.fs-circle-rw-logo {
  width: 50%;
  height: 50%;
  object-fit: contain;
  display: block;
}

/* Followed state: green checkmark badge bottom-right */
.fs-circle-check {
  display: none;
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #22c55e;
  border: 2px solid var(--bg-page, #000);
  align-items: center;
  justify-content: center;
  z-index: 2;
}

.fs-circle-avatar[data-follow-state="awarded"] .fs-circle-check,
.fs-circle-avatar[data-follow-state="already"] .fs-circle-check {
  display: flex;
}

.fs-circle-avatar[data-follow-state="awarded"] .fs-circle-inner,
.fs-circle-avatar[data-follow-state="already"] .fs-circle-inner {
  opacity: 0.75;
}

.fs-circle-avatar[data-follow-state="awarded"] .fs-circle-name,
.fs-circle-item:has([data-follow-state="awarded"]) .fs-circle-name,
.fs-circle-item:has([data-follow-state="already"]) .fs-circle-name {
  color: var(--text-primary);
  font-weight: 700;
}

/* Name label below circle */
.fs-circle-name {
  font-family: var(--font-body);
  font-size: 0.62rem;
  color: var(--text-muted);
  text-align: center;
  max-width: 72px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
  display: block;
}
@media (min-width: 480px) {
  .fs-circle-name { max-width: 88px; font-size: 0.68rem; }
}

/* Platform-choice popover */
.fs-circle-popover {
  display: none;
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-section-alt);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 8px;
  gap: 6px;
  flex-direction: column;
  min-width: 170px;
  z-index: 100;
  box-shadow: 0 4px 20px rgba(0,0,0,0.5);
}
.fs-circle-popover.visible {
  display: flex;
}
/* Arrow */
.fs-circle-popover::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: var(--border-subtle);
}

.fs-circle-popover-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 7px;
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-primary);
  text-decoration: none;
  transition: background 0.15s;
}
.fs-circle-popover-btn:hover,
.fs-circle-popover-btn:focus-visible {
  background: color-mix(in srgb, var(--bg-section-alt) 70%, var(--accent-yellow) 15%);
  outline: none;
}
.fs-circle-popover-ig { color: #c13584; }
.fs-circle-popover-fb { color: #1877F2; }

/* ── Social entries ledger panel ──────────────────────── */
.fs-social-ledger {
  background: color-mix(in srgb, var(--bg-section-alt) 60%, var(--accent-yellow) 6%);
  border: 1px solid color-mix(in srgb, var(--border-subtle) 70%, var(--accent-yellow) 30%);
  border-radius: var(--r-md);
  padding: 14px 16px 12px;
  margin-bottom: 16px;
}

.fs-social-ledger-headline {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1rem;
  color: var(--text-primary);
  margin: 0 0 4px;
}

.fs-social-ledger-desc {
  font-family: var(--font-body);
  font-size: 0.78rem;
  color: var(--text-muted);
  margin: 0 0 10px;
  line-height: 1.5;
}

.fs-social-ledger-counter {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.fs-social-counter-label {
  font-family: var(--font-body);
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 600;
}

.fs-social-counter {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 700;
  color: var(--accent-yellow);
  display: inline-flex;
  align-items: baseline;
  gap: 1px;
  transition: transform 0.18s ease;
}
.fs-social-counter.fs-counter-bump {
  animation: counter-bump 0.3s ease forwards;
}
@keyframes counter-bump {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.3); }
  100% { transform: scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  .fs-social-counter { transition: none; }
  .fs-social-counter.fs-counter-bump { animation: none; }
}

.fs-social-counter-num {
  min-width: 1ch;
  display: inline-block;
}

.fs-social-counter-sep,
.fs-social-counter-cap {
  color: var(--text-muted);
  font-weight: 400;
  font-size: 0.9em;
}

.fs-social-track-note {
  display: flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-body);
  font-size: 0.72rem;
  color: var(--text-faint);
  margin: 8px 0 0;
  line-height: 1.4;
}

.fs-social-track-icon {
  display: flex;
  flex-shrink: 0;
  color: var(--text-faint);
}

/* ── IG card CTA states ───────────────────────────────── */
/* Hide variant CTAs by default; JS toggles via data-state attr on card */
.fs-ig-cta--awarded,
.fs-ig-cta--cap,
.fs-ig-cta--already,
.fs-ig-cta--pending {
  display: none;
}

/* Awarded state */
.fs-ig-card[data-follow-state="awarded"] .fs-ig-cta--default { display: none; }
.fs-ig-card[data-follow-state="awarded"] .fs-ig-cta--awarded { display: inline-block; background: #1a472a; color: #4ade80; }
.fs-ig-card[data-follow-state="awarded"] {
  border-color: #4ade80;
  background: color-mix(in srgb, var(--bg-section-alt) 80%, #1a472a 20%);
}
.fs-ig-card[data-follow-state="awarded"]:hover,
.fs-ig-card[data-follow-state="awarded"]:focus-visible {
  border-color: #4ade80;
}

/* Cap-reached state */
.fs-ig-card[data-follow-state="cap"] .fs-ig-cta--default { display: none; }
.fs-ig-card[data-follow-state="cap"] .fs-ig-cta--cap { display: inline-block; background: var(--bg-section-alt); color: var(--text-faint); border: 1px solid var(--border-subtle); }
.fs-ig-card[data-follow-state="cap"] { opacity: 0.75; }

/* Already-earned state */
.fs-ig-card[data-follow-state="already"] .fs-ig-cta--default { display: none; }
.fs-ig-card[data-follow-state="already"] .fs-ig-cta--already { display: inline-block; background: var(--bg-section-alt); color: var(--text-secondary); border: 1px solid var(--border-subtle); }

/* Pending (network failure) state */
.fs-ig-card[data-follow-state="pending"] .fs-ig-cta--default { display: none; }
.fs-ig-card[data-follow-state="pending"] .fs-ig-cta--pending { display: inline-block; background: var(--bg-section-alt); color: var(--text-faint); font-style: italic; }

/* Card flip animation for awarded state */
@media (prefers-reduced-motion: no-preference) {
  .fs-ig-card[data-follow-state="awarded"] {
    animation: card-awarded-pop 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  }
  @keyframes card-awarded-pop {
    0%   { transform: scale(1); }
    40%  { transform: scale(1.06); }
    100% { transform: scale(1); }
  }
}

/* Post-success note */
.fs-note {
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 18px 0 0;
  border-top: 1px solid var(--border-subtle);
  padding-top: 14px;
}

/* ============================================================
   LOOP BAND — footer "Stay in the loop" strip
   ============================================================ */
.loop-band {
  background: var(--bg-section-alt);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  padding: 18px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
}

.loop-band-text {
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.5;
}
.loop-band-accent {
  color: var(--text-secondary);
  font-weight: 700;
}

.loop-band-icons {
  display: flex;
  align-items: center;
  gap: 14px;
}

.loop-ig-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  color: var(--text-muted);
  border-radius: var(--r-md);
  border: 1px solid var(--border-subtle);
  transition: color 0.15s, border-color 0.15s, box-shadow 0.15s;
  text-decoration: none;
}
.loop-ig-link:hover,
.loop-ig-link:focus-visible {
  color: var(--accent-yellow);
  border-color: var(--accent-yellow);
  outline: none;
  box-shadow: 0 0 0 2px var(--focus-ring);
}

@media (min-width: 640px) {
  .loop-band {
    flex-direction: row;
    justify-content: center;
    gap: 24px;
  }
}

/* Compact on mobile: smaller follow cards */
@media (max-width: 480px) {
  .fs-ig-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .fs-ig-handle {
    font-size: 0.68rem;
  }
}

/* ── Suburb light-up microinteraction (address blur → suburb tile + map flash) ── */

/* Tile highlight when user's suburb is detected from address field */
.suburb-tile.is-yours {
  outline: 2px solid var(--yellow);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(255,229,18,0.18), 0 0 18px rgba(255,229,18,0.12);
  background: rgba(255,229,18,0.07);
  transition: outline 0.2s, box-shadow 0.2s, background 0.2s;
}

/* Pulse animation — scale 1.0 → 1.03 → 1.0 */
@keyframes suburb-lightup-pulse {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.03); }
  100% { transform: scale(1); }
}

.suburb-tile.is-yours {
  animation: suburb-lightup-pulse 0.55s ease-in-out;
}

/* prefers-reduced-motion: outline only, no scale animation */
@media (prefers-reduced-motion: reduce) {
  .suburb-tile.is-yours {
    animation: none;
  }
}

/* Choropleth SVG polygon flash — yellow stroke pulse */
path.suburb-lightup-flash {
  stroke: var(--yellow) !important;
  stroke-width: 3px !important;
  stroke-opacity: 0.9;
  transition: stroke 0.2s, stroke-width 0.2s, stroke-opacity 3s;
}

/* Fade-out handled by JS removing the class after 3.2s */
@media (prefers-reduced-motion: reduce) {
  path.suburb-lightup-flash {
    transition: none;
  }
}

/* River hit-area cursor feedback — already transparent, just ensure cursor */
.ctx-river path.river-hit {
  cursor: help;
}

/* ═══════════════════════════════════════════════════════════
   REA PRESS COVERAGE TILE
   Sits between map section and interlude band #2.
   Theme-aware via CSS vars. Mobile-responsive.
═══════════════════════════════════════════════════════════ */
.rea-press-aside {
  padding: 48px 24px;
  background: var(--bg-section-alt);
}

.rea-press-inner {
  max-width: 960px;
  margin: 0 auto;
}

.rea-press-card {
  display: flex;
  align-items: flex-start;
  gap: 40px;
  padding: 32px 36px;
  border-radius: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  transition: border-color 0.2s ease;
  position: relative;
  overflow: hidden;
}

.rea-press-card::before {
  /* Yellow left accent bar */
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--yellow);
  border-radius: 12px 0 0 12px;
}

/* Subtle shimmer shine effect — premium luxury polish */
.rea-press-card::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -100%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    135deg,
    transparent 0%,
    rgba(255, 255, 255, 0.08) 25%,
    transparent 50%,
    transparent 100%
  );
  transform: skewX(-20deg);
  animation: rea-shimmer 5s ease-in-out infinite;
  pointer-events: none;
  z-index: 1;
}

@keyframes rea-shimmer {
  0% {
    transform: skewX(-20deg) translateX(-150%);
  }
  50% {
    transform: skewX(-20deg) translateX(150%);
  }
  100% {
    transform: skewX(-20deg) translateX(-150%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .rea-press-card::after {
    animation: none;
  }
}

.rea-press-card:hover {
  border-color: var(--yellow);
  box-shadow: 0 8px 24px rgba(255, 229, 18, 0.12);
}

/* Source logotype column */
.rea-press-source {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  min-width: 160px;
  position: relative;
  z-index: 2;
}

.rea-press-as-featured {
  font-family: var(--font-body);
  font-size: 0.55rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.rea-press-logo {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}

.rea-logo-black {
  color: var(--text-primary);
}

.rea-logo-red {
  color: #e8232a; /* realestate.com.au brand red — intentional hard-code */
}

/* Quote + link column */
.rea-press-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
  z-index: 2;
}

.rea-press-quote {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.05rem;
  line-height: 1.55;
  color: var(--text-primary);
  margin: 0;
  padding: 0;
}

.rea-press-quote strong {
  font-style: normal;
  color: var(--yellow);
}

.rea-press-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* Line 1: SHERWOOD–INDOOROOPILLY  ▲ #1 in Australia  (capital-city SA3 qualifier) */
.rea-press-suburb-rank {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
}

.rea-rank-suburb {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  font-style: normal;
  letter-spacing: 0.02em;
  color: var(--text-primary);
}

.rea-rank-badge {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--yellow);
  white-space: nowrap;
}

.rea-rank-badge strong {
  font-style: normal;
}

.rea-rank-qualifier {
  font-family: var(--font-body);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  align-self: center;
}

/* Line 2: Our patch. Our 100 years. */
.rea-press-patch {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0;
  padding: 0;
  letter-spacing: 0.01em;
}

.rea-press-link {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--text-primary);
  text-decoration: none;
  padding: 6px 0;
  border-bottom: 1px solid var(--border-subtle);
  transition: color 0.15s ease, border-color 0.15s ease;
}

.rea-press-link:hover,
.rea-press-link:focus-visible {
  color: var(--yellow);
  border-color: var(--yellow);
  outline: none;
}

.rea-press-link:focus-visible {
  outline: 2px solid var(--yellow);
  outline-offset: 3px;
  border-radius: 2px;
}

.rea-press-attribution {
  font-family: var(--font-body);
  font-size: 0.6rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

/* Light theme adjustments — bg-card becomes light cream */
[data-theme="light"] .rea-press-card {
  background: var(--bg-card);
  border-color: var(--border-subtle);
}

[data-theme="light"] .rea-logo-black {
  color: var(--text-primary);
}

/* Mobile — stack source above content */
@media (max-width: 640px) {
  .rea-press-aside {
    padding: 32px 16px;
  }

  .rea-press-card {
    flex-direction: column;
    gap: 20px;
    padding: 24px 20px;
  }

  .rea-press-source {
    min-width: unset;
    flex-direction: row;
    align-items: center;
    gap: 12px;
  }

  .rea-press-quote {
    font-size: 0.95rem;
  }
}

/* Reduced motion — strip the card hover transition */
@media (prefers-reduced-motion: reduce) {
  .rea-press-card,
  .rea-press-link {
    transition: none;
  }
}

/* ============================================================================
   ADDRESS AUTOCOMPLETE — Mapbox-powered dropdown (Part A)
   ============================================================================ */

/* Wrapper keeps position:relative so dropdown anchors correctly */
.address-autocomplete-wrap {
  position: relative;
}

/* The suggestion dropdown panel */
.ac-dropdown {
  position: absolute;
  z-index: 500;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  border-radius: var(--r-md);
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  overflow: hidden;
  /* hidden by default */
  display: none;
}
.ac-dropdown.ac-open {
  display: block;
}

/* Each suggestion row */
.ac-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  cursor: pointer;
  border: none;
  background: transparent;
  width: 100%;
  text-align: left;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.88rem;
  line-height: 1.35;
  transition: background 0.1s;
}
.ac-option:hover,
.ac-option[aria-selected="true"] {
  background: var(--bg-section-alt);
}
.ac-option:focus {
  outline: none;
  background: var(--bg-section-alt);
}

/* Local suburb badge */
.ac-badge-local {
  flex-shrink: 0;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-on-yellow);
  background: var(--accent-yellow);
  border-radius: 3px;
  padding: 1px 5px;
  white-space: nowrap;
}

/* Divider between results */
.ac-option + .ac-option {
  border-top: 1px solid var(--border-subtle);
}

/* Attribution line */
.ac-attribution {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 5px 12px;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.65rem;
  color: var(--text-faint);
  gap: 4px;
}

/* Loading spinner inside input */
.ac-loading-indicator {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 14px;
  border: 2px solid var(--border-medium);
  border-top-color: var(--accent-yellow);
  border-radius: 50%;
  animation: ac-spin 0.6s linear infinite;
  display: none;
  pointer-events: none;
}
.ac-loading-indicator.ac-spinner-visible {
  display: block;
}
@keyframes ac-spin {
  to { transform: translateY(-50%) rotate(360deg); }
}

/* Reduced-motion: no spinner animation */
@media (prefers-reduced-motion: reduce) {
  .ac-loading-indicator { animation: none; border-top-color: var(--accent-yellow); }
}

/* ============================================================================
   CUSTOM SELECT COMPONENT — replaces OS-default <select> (Part B)
   ============================================================================ */

/* Native select — styled to match form inputs.
   Custom combobox overlay is disabled (timing regression); using native <select>
   which is accessible, works on all devices, and carries the value through form submit. */
.cs-native {
  display: block;
  width: 100%;
  background: var(--bg-input);
  color: var(--text-primary);
  border: 1px solid var(--border-medium);
  border-radius: var(--r-sm);
  padding: 12px 36px 12px 14px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  min-height: 44px;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  transition: border-color 0.15s;
  /* Chevron arrow */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8' fill='none'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23999' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 12px 8px;
}
.cs-native:hover {
  border-color: var(--border-strong);
}
.cs-native:focus {
  outline: 3px solid var(--accent-yellow, #FFE512);
  outline-offset: 2px;
  border-color: var(--accent-yellow, #FFE512);
}
/* Placeholder colour — when first option selected */
.cs-native:invalid,
.cs-native option[value=""] {
  color: var(--text-faint);
}

/* Container */
.cs-wrap {
  position: relative;
}

/* Trigger button — matches input styling */
.cs-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-medium);
  border-radius: var(--r-sm);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.95rem;
  padding: 12px 14px;
  cursor: pointer;
  text-align: left;
  transition: border-color 0.15s;
  user-select: none;
}
.cs-trigger:hover {
  border-color: var(--border-strong);
}
.cs-trigger:focus {
  outline: none;
  border-color: var(--focus-ring);
  box-shadow: 0 0 0 2px rgba(255,229,18,0.25);
}
.cs-trigger[aria-expanded="true"] {
  border-color: var(--focus-ring);
  box-shadow: 0 0 0 2px rgba(255,229,18,0.20);
}

/* Placeholder text colour */
.cs-trigger.cs-placeholder {
  color: var(--text-faint);
}

/* Chevron icon */
.cs-chevron {
  flex-shrink: 0;
  width: 12px;
  height: 8px;
  transition: transform 0.18s var(--ease-out);
}
.cs-trigger[aria-expanded="true"] .cs-chevron {
  transform: rotate(180deg);
}

/* Dropdown listbox */
.cs-listbox {
  position: absolute;
  z-index: 501;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  border-radius: var(--r-md);
  box-shadow: 0 8px 32px rgba(0,0,0,0.35);
  max-height: 260px;
  overflow-y: auto;   /* scroll-contained — prevents page-level scroll from _setHighlight */
  /* Hidden by default — display:none hides from a11y tree and layout */
  display: none;
  /* animation */
  transform-origin: top center;
  transform: scale(0.97);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.15s var(--ease-out), opacity 0.15s var(--ease-out);
}
.cs-listbox.cs-open {
  display: block;
  transform: scale(1);
  opacity: 1;
  pointer-events: auto;
}

/* Each option */
.cs-option {
  display: block;
  width: 100%;
  padding: 11px 14px;
  background: transparent;
  border: none;
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--text-primary);
  text-align: left;
  cursor: pointer;
  transition: background 0.1s;
}
.cs-option:hover,
.cs-option.cs-highlighted {
  background: var(--bg-section-alt);
}
.cs-option[aria-selected="true"] {
  color: var(--accent-yellow);
  font-weight: 700;
}
.cs-option + .cs-option {
  border-top: 1px solid var(--border-subtle);
}
.cs-option:focus {
  outline: none;
  background: var(--bg-section-alt);
}

/* Mobile bottom-sheet — on narrow viewports (<640px) */
@media (max-width: 639px) {
  .cs-listbox {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    top: auto;
    border-radius: var(--r-lg) var(--r-lg) 0 0;
    transform: translateY(100%);
    max-height: 65vh;
    overflow-y: auto;
    /* display:none from base rule; cs-open restores display */
  }
  .cs-listbox.cs-open {
    display: block;
    transform: translateY(0);
  }

  /* Bottom-sheet header drag handle */
  .cs-sheet-handle {
    display: flex;
    justify-content: center;
    padding: 10px 0 4px;
  }
  .cs-sheet-handle::before {
    content: '';
    display: block;
    width: 36px;
    height: 4px;
    border-radius: 2px;
    background: var(--border-medium);
  }

  /* Sheet overlay */
  .cs-overlay {
    display: block;
    position: fixed;
    inset: 0;
    background: var(--overlay-bg);
    z-index: 500;
    animation: cs-fade-in 0.15s ease forwards;
  }
}
@media (min-width: 640px) {
  .cs-sheet-handle { display: none; }
  .cs-overlay { display: none !important; }
}

@keyframes cs-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* Reduced-motion: instant open/close, no scale/translate */
@media (prefers-reduced-motion: reduce) {
  .cs-listbox {
    transform: none !important;
    transition: opacity 0.01ms !important;
  }
  .cs-chevron {
    transition: none !important;
  }
}

/* Touch target minimum height */
@media (max-width: 600px) {
  .cs-trigger {
    min-height: 44px;
    padding: 14px 14px;
  }
}

/* ============================================================================
   FEEDBACK WIDGET — floating button, bottom-right, new-tab fallback
   ClickUp CSP blocks iframe; button opens form in new tab.
   ========================================================================== */

.feedback-btn {
  position: fixed;
  bottom: 16px;
  right: 16px;
  z-index: 9000;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;

  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid #000;
  background: #FFE512;
  color: #000;
  cursor: pointer;
  padding: 0;

  /* transition — respects prefers-reduced-motion below */
  transition: transform 0.18s ease, box-shadow 0.18s ease;

  /* overflow hidden so hint tooltip clips cleanly */
  overflow: visible;
}

.feedback-btn:hover,
.feedback-btn:focus-visible {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 4px 18px rgba(255, 229, 18, 0.65);
  outline: none;
}

.feedback-btn:focus-visible {
  outline: 3px solid #000;
  outline-offset: 3px;
}

/* "Opens in new tab" label — visible on hover/focus, hidden by default */
.feedback-btn__hint {
  position: absolute;
  bottom: calc(100% + 8px);
  right: 0;
  white-space: nowrap;
  background: #000;
  color: #FFE512;
  font-family: 'Lato', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 4px 8px;
  border-radius: 4px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.feedback-btn:hover .feedback-btn__hint,
.feedback-btn:focus-visible .feedback-btn__hint {
  opacity: 1;
}

/* DEV badge — top-right corner of yellow circle */
.feedback-dev-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  display: inline-block;
  background: #000;
  color: #FFE512;
  font-family: 'Lato', sans-serif;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 2px 6px;
  border-radius: 3px;
  text-transform: uppercase;
  white-space: nowrap;
  pointer-events: none;
}

/* Popover with arrow */
.feedback-popover {
  position: fixed;
  bottom: calc(16px + 48px + 12px);
  right: 16px;
  z-index: 8999;
  max-width: 260px;
  background: #000;
  border: 1px solid #FFE512;
  border-radius: 6px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  animation: fb-popover-in 0.2s ease-out;
}

@keyframes fb-popover-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.feedback-popover__arrow {
  position: absolute;
  bottom: -8px;
  right: 20px;
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-top: 8px solid #000;
  pointer-events: none;
}

.feedback-popover__content {
  position: relative;
  padding: 12px 16px 12px 12px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.feedback-popover__content p {
  margin: 0;
  font-family: 'Lato', sans-serif;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.4;
  color: #FFE512;
  flex: 1;
}

.feedback-popover__close {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  padding: 0;
  border: none;
  background: transparent;
  color: #FFE512;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s ease;
}

.feedback-popover__close:hover {
  color: #FFE512;
  filter: brightness(1.2);
}

.feedback-popover__close:focus-visible {
  outline: 2px solid #FFE512;
  outline-offset: 1px;
}

/* Safe-area on mobile (e.g. iPhone home bar) */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  .feedback-btn {
    bottom: calc(16px + env(safe-area-inset-bottom));
  }
  .feedback-popover {
    bottom: calc(16px + env(safe-area-inset-bottom) + 48px + 12px);
  }
}

/* Mobile adjustment: popover above on smaller screens */
@media (max-width: 480px) {
  .feedback-popover {
    right: 8px;
    bottom: calc(16px + 48px + 12px);
    max-width: calc(100vw - 16px);
  }
}

/* Reduced-motion: strip all transitions and scale/glow */
@media (prefers-reduced-motion: reduce) {
  .feedback-btn,
  .feedback-btn__hint {
    transition: none;
  }
  .feedback-btn:hover,
  .feedback-btn:focus-visible {
    transform: none;
    box-shadow: none;
  }
}


/* ══════════════════════════════════════════════════════════════════════════
   LEAFLET MAP STYLES
   ══════════════════════════════════════════════════════════════════════════ */

#leaflet-map {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: var(--r-lg);
  overflow: hidden;
}

/* Leaflet map attribution control styling */
.leaflet-container {
  font-family: inherit;
  font-size: 12px;
  line-height: 1.4;
  background: var(--map-bg);
}

.leaflet-control-attribution {
  background: rgba(0, 0, 0, 0.7);
  padding: 4px 8px;
  border-radius: 3px;
  font-size: 11px;
}

.leaflet-control-attribution a {
  color: #FFE512;
  text-decoration: none;
}

.leaflet-control-attribution a:hover {
  text-decoration: underline;
}

/* Zoom controls styling */
.leaflet-control-zoom {
  border: 1px solid var(--border-medium);
  border-radius: var(--r-md);
  background: var(--surface-fg);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.leaflet-control-zoom a {
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 16px;
  font-weight: 600;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.leaflet-control-zoom a:hover {
  background: rgba(255, 229, 18, 0.15);
}

.leaflet-control-zoom a:first-child {
  border-radius: var(--r-md) var(--r-md) 0 0;
}

.leaflet-control-zoom a:last-child {
  border-radius: 0 0 var(--r-md) var(--r-md);
}

/* Suburb tooltips on map */
.suburb-leaflet-tooltip {
  background: var(--surface-fg);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 12px;
  color: var(--text-primary);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.suburb-leaflet-tooltip strong {
  color: #FFE512;
  font-weight: 600;
}

/* Geojson layer hover state */
.leaflet-interactive {
  transition: opacity 0.15s, fill-opacity 0.15s, stroke-width 0.15s;
}

/* Selected suburb highlight */
.leaflet-interactive.highlight-suburb {
  stroke: #FFE512 !important;
  stroke-width: 3 !important;
}

/* Leaflet popup adjustments */
.leaflet-popup-content-wrapper {
  background: var(--surface-fg);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.leaflet-popup-content {
  color: var(--text-primary);
  font-size: 13px;
  margin: 0;
}

.leaflet-popup-close-button {
  color: var(--text-muted);
}
