/* style.css — Design tokens and component styles for Lombok Blueprint */

/* =====================================================
   DESIGN TOKENS
   ===================================================== */

:root, [data-theme="light"] {
  /* --- Type Scale (fluid) --- */
  --text-xs:   clamp(0.75rem,  0.7rem  + 0.25vw, 0.875rem);
  --text-sm:   clamp(0.875rem, 0.8rem  + 0.35vw, 1rem);
  --text-base: clamp(1rem,     0.9rem  + 0.5vw,  1.125rem);
  --text-lg:   clamp(1.125rem, 0.95rem + 0.85vw, 1.5rem);
  --text-xl:   clamp(1.5rem,   1rem    + 1.5vw,  2.25rem);
  --text-2xl:  clamp(2rem,     1.2rem  + 2.5vw,  3.5rem);
  --text-3xl:  clamp(2.5rem,   1rem    + 4vw,    5rem);
  --text-hero: clamp(3rem,     0.5rem  + 7vw,    8rem);

  /* --- Spacing (4px base) --- */
  --space-1:  0.25rem;
  --space-2:  0.5rem;
  --space-3:  0.75rem;
  --space-4:  1rem;
  --space-5:  1.25rem;
  --space-6:  1.5rem;
  --space-8:  2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;

  /* --- Header height (single tall row, luxury feel) --- */
  --nav-height: 80px;
  --space-32: 8rem;

  /* --- Surfaces (warm sandy beige) --- */
  --color-bg:               #f7f5f0;
  --color-surface:          #faf8f4;
  --color-surface-2:        #fcfbf8;
  --color-surface-offset:   #f0ede6;
  --color-surface-offset-2: #e8e5de;
  --color-surface-dynamic:  #e3dfd8;
  --color-divider:          #dbd8d1;
  --color-border:           #d3cfc8;

  /* --- Text (deep warm charcoal) --- */
  --color-text:         #1a1814;
  --color-text-muted:   #6b675e;
  --color-text-faint:   #a9a59c;
  --color-text-inverse: #faf8f4;

  /* --- Primary: deep navy / charcoal (UI V2) --- */
  --color-primary:           #1f3a52;
  --color-primary-hover:     #163049;
  --color-primary-active:    #0e2438;
  --color-primary-highlight: #dbe4ed;

  /* --- Secondary: warm sandy beige (UI V2) --- */
  --color-secondary:           #d8c6a8;
  --color-secondary-hover:     #c8b48f;
  --color-secondary-active:    #b8a079;
  --color-secondary-highlight: #f3ebdb;

  /* --- Accent / Action: vibrant teal (UI V2) --- */
  --color-accent:           #0c7c84;
  --color-accent-hover:     #0a6870;
  --color-accent-active:    #085560;
  --color-accent-highlight: #d0e8ea;

  /* --- Secondary highlight: soft terracotta / coral --- */
  --color-coral:           #d4604a;
  --color-coral-hover:     #bc4c38;
  --color-coral-active:    #a03a29;
  --color-coral-highlight: #f5ddd9;

  /* --- Semantic colors --- */
  --color-success:           #437a22;
  --color-success-hover:     #2e5c10;
  --color-success-highlight: #d4dfcc;

  --color-warning:           #d19900;
  --color-warning-hover:     #b07a00;
  --color-warning-highlight: #f0e5be;

  --color-error:             #c0392b;
  --color-error-hover:       #a52f22;
  --color-error-highlight:   #f5d5d2;

  /* --- Gold for Google stars --- */
  --color-star: #f59e0b;

  /* --- WhatsApp green --- */
  --color-whatsapp: #25d366;
  --color-whatsapp-hover: #1eaf53;

  /* --- Radius --- */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-full: 9999px;

  /* --- Transitions --- */
  --transition-interactive: 180ms cubic-bezier(0.16, 1, 0.3, 1);

  /* --- Shadows (tone-matched to warm surfaces) --- */
  --shadow-sm: 0 1px 2px oklch(0.2 0.01 80 / 0.06);
  --shadow-md: 0 4px 12px oklch(0.2 0.01 80 / 0.08);
  --shadow-lg: 0 12px 32px oklch(0.2 0.01 80 / 0.12);

  /* --- Content widths --- */
  --content-narrow:  640px;
  --content-default: 960px;
  --content-wide:    1200px;

  /* --- Font families --- */
  --font-display: 'Cormorant Garamond', 'Georgia', serif;
  --font-body:    'Work Sans', 'Helvetica Neue', Arial, sans-serif;
}

/* =====================================================
   DARK MODE
   ===================================================== */

[data-theme="dark"] {
  --color-bg:               #141210;
  --color-surface:          #1a1815;
  --color-surface-2:        #1f1c18;
  --color-surface-offset:   #17150f;
  --color-surface-offset-2: #1c1a13;
  --color-surface-dynamic:  #2a2720;
  --color-divider:          #252219;
  --color-border:           #34302a;

  --color-text:         #d4d1ca;
  --color-text-muted:   #8a8780;
  --color-text-faint:   #5e5b55;
  --color-text-inverse: #1a1814;

  --color-primary:           #6b8db0;
  --color-primary-hover:     #8aa7c4;
  --color-primary-active:    #a1bcd6;
  --color-primary-highlight: #1c2a3a;

  --color-secondary:           #b8a079;
  --color-secondary-hover:     #c8b48f;
  --color-secondary-active:    #d8c6a8;
  --color-secondary-highlight: #2a2418;

  --color-accent:           #3da8b0;
  --color-accent-hover:     #5ab8bf;
  --color-accent-active:    #6cc5cb;
  --color-accent-highlight: #1a3235;

  --color-coral:           #e8856d;
  --color-coral-hover:     #f09c87;
  --color-coral-active:    #f5ae9c;
  --color-coral-highlight: #3a1f1a;

  --color-success:           #6daa45;
  --color-success-hover:     #4d8f25;
  --color-success-highlight: #1e2d16;

  --color-warning:           #e8af34;
  --color-warning-hover:     #fdc551;
  --color-warning-highlight: #312a10;

  --color-error:             #e05a4d;
  --color-error-hover:       #c84035;
  --color-error-highlight:   #3a1a18;

  --color-star: #f59e0b;
  --color-whatsapp: #25d366;
  --color-whatsapp-hover: #1eaf53;

  --shadow-sm: 0 1px 2px oklch(0 0 0 / 0.25);
  --shadow-md: 0 4px 12px oklch(0 0 0 / 0.35);
  --shadow-lg: 0 12px 32px oklch(0 0 0 / 0.45);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --color-bg:               #141210;
    --color-surface:          #1a1815;
    --color-surface-2:        #1f1c18;
    --color-surface-offset:   #17150f;
    --color-surface-offset-2: #1c1a13;
    --color-surface-dynamic:  #2a2720;
    --color-divider:          #252219;
    --color-border:           #34302a;
    --color-text:         #d4d1ca;
    --color-text-muted:   #8a8780;
    --color-text-faint:   #5e5b55;
    --color-text-inverse: #1a1814;
    --color-primary:           #6b8db0;
    --color-primary-hover:     #8aa7c4;
    --color-primary-active:    #a1bcd6;
    --color-primary-highlight: #1c2a3a;
    --color-secondary:           #b8a079;
    --color-secondary-hover:     #c8b48f;
    --color-secondary-active:    #d8c6a8;
    --color-secondary-highlight: #2a2418;
    --color-accent:           #3da8b0;
    --color-accent-hover:     #5ab8bf;
    --color-accent-active:    #6cc5cb;
    --color-accent-highlight: #1a3235;
    --color-coral:           #e8856d;
    --color-coral-hover:     #f09c87;
    --color-coral-active:    #f5ae9c;
    --color-coral-highlight: #3a1f1a;
    --color-success:           #6daa45;
    --color-success-hover:     #4d8f25;
    --color-success-highlight: #1e2d16;
    --color-warning:           #e8af34;
    --color-warning-hover:     #fdc551;
    --color-warning-highlight: #312a10;
    --color-error:             #e05a4d;
    --color-error-hover:       #c84035;
    --color-error-highlight:   #3a1a18;
    --color-star: #f59e0b;
    --color-whatsapp: #25d366;
    --color-whatsapp-hover: #1eaf53;
    --shadow-sm: 0 1px 2px oklch(0 0 0 / 0.25);
    --shadow-md: 0 4px 12px oklch(0 0 0 / 0.35);
    --shadow-lg: 0 12px 32px oklch(0 0 0 / 0.45);
  }
}

/* =====================================================
   LAYOUT
   ===================================================== */

.container {
  width: 100%;
  max-width: var(--content-wide);
  margin-inline: auto;
  padding-inline: var(--space-4);
}
@media (min-width: 640px) {
  .container { padding-inline: var(--space-6); }
}
@media (min-width: 1024px) {
  .container { padding-inline: var(--space-8); }
}

.container--narrow {
  max-width: var(--content-default);
}

/* =====================================================
   HEADER / NAV
   ===================================================== */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background 400ms ease, border-color 400ms ease, backdrop-filter 400ms ease;
}

.site-header.scrolled {
  background: color-mix(in oklab, var(--color-bg) 95%, transparent);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--color-border);
}

/* When not over hero (non-home pages), always solid */
.site-header.solid {
  background: color-mix(in oklab, var(--color-bg) 97%, transparent);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--color-border);
}

.nav-inner {
  display: grid;
  grid-template-columns: auto 1fr auto; /* logo | centred nav | actions */
  align-items: center;
  column-gap: var(--space-6);
  height: var(--nav-height);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  text-decoration: none;
  flex-shrink: 0;
}

/* Over hero: white text */
.site-header:not(.scrolled):not(.solid) .nav-brand {
  color: rgba(250, 248, 244, 0.95);
}
.site-header:not(.scrolled):not(.solid) .nav-links a,
.site-header:not(.scrolled):not(.solid) .nav-links .nav-dropdown-toggle {
  color: rgba(250, 248, 244, 0.75);
}
.site-header:not(.scrolled):not(.solid) .nav-links a:hover {
  color: #fff;
}
.site-header:not(.scrolled):not(.solid) .nav-links a.active {
  color: #fff;
  border-bottom-color: rgba(255,255,255,0.85);
}
.site-header:not(.scrolled):not(.solid) .btn-icon {
  color: rgba(250, 248, 244, 0.75);
}
/* Only the top-level login controls (sign-in pill / avatar) go white over a
   hero — NOT the buttons inside the dropdown panel, which sits on a light
   surface on every page. Scoping to the direct children fixes the
   "invisible menu items" bug on hero (transparent-header) pages. */
.site-header:not(.scrolled):not(.solid) .nav-login-wrap > a,
.site-header:not(.scrolled):not(.solid) .nav-login-wrap > button,
.site-header:not(.scrolled):not(.solid) .nav-login-wrap .user-avatar-btn {
  color: rgba(250, 248, 244, 0.9);
  border-color: rgba(250, 248, 244, 0.5);
}
.site-header:not(.scrolled):not(.solid) .nav-login-wrap > a:hover,
.site-header:not(.scrolled):not(.solid) .nav-login-wrap > button:hover,
.site-header:not(.scrolled):not(.solid) .nav-login-wrap .user-avatar-btn:hover {
  background: rgba(255,255,255,0.15);
  color: #fff;
  border-color: rgba(255,255,255,0.6);
}

.nav-brand {
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-text);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  line-height: 1;
}

.nav-links {
  display: none;
  align-items: center;
  gap: var(--space-6); /* generous spacing — luxury feel */
  list-style: none;
  justify-content: center;
  justify-self: center;
  padding: 0;
  margin: 0;
}
@media (min-width: 1024px) {
  .nav-links { display: flex; }
}

.nav-links a,
.nav-links .nav-dropdown-toggle {
  text-decoration: none;
  color: var(--color-text-muted);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  padding: var(--space-2) 0;
  background: transparent;
  border: 0;
  border-bottom: 1.5px solid transparent; /* thin underline active state */
  border-radius: 0;
  transition: color var(--transition-interactive), border-color var(--transition-interactive);
  white-space: nowrap;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}
.nav-links a:hover,
.nav-links .nav-dropdown-toggle:hover {
  color: var(--color-text);
}
.nav-links a.active,
.nav-links .nav-dropdown.active > .nav-dropdown-toggle {
  color: var(--color-text);
  border-color: var(--color-text);
}

/* ---- Nav Dropdown ---- */
.nav-dropdown {
  position: relative;
}

/* .nav-dropdown-toggle inherits styling from .nav-links .nav-dropdown-toggle
   above (luxury underline-on-active). Only dropdown-specific hero overrides
   live here. */
.nav-dropdown-toggle {
  font-family: var(--font-body);
  line-height: 1;
}
/* Hero overlay variants for dropdown toggle (matches .nav-links a) */
.site-header:not(.scrolled):not(.solid) .nav-dropdown-toggle {
  color: rgba(250, 248, 244, 0.75);
}
.site-header:not(.scrolled):not(.solid) .nav-dropdown-toggle:hover,
.site-header:not(.scrolled):not(.solid) .nav-dropdown.active > .nav-dropdown-toggle {
  color: #fff;
  border-bottom-color: rgba(255,255,255,0.85);
}

.nav-dd-chevron {
  transition: transform 200ms ease;
  flex-shrink: 0;
  opacity: 0.7;
}
.nav-dropdown:hover .nav-dd-chevron,
.nav-dropdown.open  .nav-dd-chevron {
  transform: rotate(180deg);
  opacity: 1;
}

.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(-6px);
  min-width: 210px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 32px rgba(0,0,0,0.12), 0 2px 8px rgba(0,0,0,0.06);
  z-index: 300;
  list-style: none;
  margin: 0;
  padding: var(--space-2) 0;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 160ms ease, visibility 160ms ease, transform 160ms ease;
}
/* Bridge gap between toggle and menu so hover doesn't break */
.nav-dropdown-menu::before {
  content: '';
  position: absolute;
  top: -10px;
  left: 0;
  right: 0;
  height: 10px;
}
.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown.open  .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.nav-dropdown-menu li { list-style: none; }

.nav-dropdown-menu a {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: var(--space-3) var(--space-4);
  text-decoration: none;
  color: var(--color-text);
  border: none !important;
  border-radius: 0 !important;
  transition: background var(--transition-interactive);
  white-space: normal;
}
.nav-dropdown-menu a:hover {
  background: var(--color-surface-offset, color-mix(in srgb, var(--color-surface) 60%, var(--color-bg)));
  color: var(--color-primary);
}
.nav-dropdown-menu li:first-child a { border-radius: calc(var(--radius-lg) - 2px) calc(var(--radius-lg) - 2px) 0 0 !important; }
.nav-dropdown-menu li:last-child  a { border-radius: 0 0 calc(var(--radius-lg) - 2px) calc(var(--radius-lg) - 2px) !important; }
.nav-dropdown-menu li + li { border-top: 1px solid var(--color-border); }
/* Pin dropdown menu text to dark regardless of hero/transparent header state */
.site-header:not(.scrolled):not(.solid) .nav-dropdown-menu a { color: var(--color-text); }
.site-header:not(.scrolled):not(.solid) .nav-dropdown-menu a:hover { color: var(--color-primary); }

.nav-dd-label {
  font-size: var(--text-sm);
  font-weight: 500;
  color: inherit;
  white-space: nowrap;
}

/* ---- Mobile search pill (opens the command palette) ---- */
.mobile-search-wrap {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  width: 100%;
  min-height: 48px;
  padding: 0 var(--space-4);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 999px;
  margin-bottom: var(--space-4);
  cursor: pointer;
  font-family: var(--font-body);
  text-align: left;
  transition: border-color var(--transition-interactive), background var(--transition-interactive);
}
.mobile-search-wrap:hover,
.mobile-search-wrap:focus-visible { border-color: var(--color-accent); }
.mobile-search-icon { color: var(--color-text-faint); flex-shrink: 0; }
.mobile-search-trigger-label { color: var(--color-text-faint); font-size: 0.95rem; }

/* ---- Mobile nav groups (accordion) ---- */
.mobile-nav-group {}

/* Group toggles speak in the same editorial voice as the primary rows —
   tokens only (the hardcoded #1A1A1A + alpha hairlines broke the brand rule
   and needed dark-mode patch rules; deleted 2026-08-05). */
.mobile-nav-group-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background: none;
  border: none;
  font-family: var(--font-body);
  font-size: 1.4rem;
  font-weight: 400;
  letter-spacing: -0.02em;
  color: var(--color-text);
  padding: var(--space-4) 0;
  cursor: pointer;
  text-align: left;
  border-bottom: 1px solid var(--color-divider);
  transition: color var(--transition-interactive);
}
.mobile-nav-group-toggle:hover { color: var(--color-primary); }
.mobile-nav-group-toggle:active { opacity: 0.7; }
.mobile-nav-group-chevron {
  transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  color: var(--color-text-faint);
}
.mobile-nav-group.open .mobile-nav-group-chevron {
  transform: rotate(180deg);
}

/* Reveal: max-height tween on the signature curve. Deliberately NO inner
   wrapper — updateAdminNav() appends admin links straight into
   .mobile-nav-group-items, so the DOM must stay flat. */
.mobile-nav-group-items {
  display: flex;
  flex-direction: column;
  max-height: 0;
  overflow: hidden;
  padding: 0 0 0 var(--space-5);
  border-left: 2px solid var(--color-primary);
  margin: 0;
  transition: max-height 0.4s cubic-bezier(0.25, 1, 0.5, 1),
              margin 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}
.mobile-nav-group.open .mobile-nav-group-items {
  max-height: 640px;
  margin: var(--space-1) 0 var(--space-2);
}
.mobile-nav-group-items a {
  display: flex;
  align-items: center;
  min-height: 44px;
  font-size: 0.95rem;
  color: var(--color-text-muted);
  padding: 4px 0;
  border-bottom: none;
  letter-spacing: normal;
  font-weight: 500;
  transition: color var(--transition-interactive);
}
.mobile-nav-group-items a:hover {
  color: var(--color-primary);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  justify-self: end;
}

/* Top-level login controls only (direct children + the avatar). The generic
   ".nav-login-wrap button" selector used to leak pill borders/colours onto
   the .user-dropdown-item buttons nested inside the dropdown panel. */
.nav-login-wrap > a,
.nav-login-wrap > button,
.nav-login-wrap .user-avatar-btn {
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  padding: var(--space-2) var(--space-4);
  border: 1px solid var(--color-text);
  border-radius: var(--radius-full);
  text-decoration: none;
  color: var(--color-text);
  transition: all var(--transition-interactive);
  background: transparent;
  cursor: pointer;
}
.nav-login-wrap > a:hover,
.nav-login-wrap > button:hover,
.nav-login-wrap .user-avatar-btn:hover {
  background: var(--color-text);
  color: var(--color-bg);
}

.btn-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text);
  border: 1.5px solid var(--color-divider);
  transition: color var(--transition-interactive), background var(--transition-interactive), border-color var(--transition-interactive);
}
.btn-icon:hover {
  color: var(--color-text);
  background: var(--color-surface-offset);
  border-color: var(--color-text-muted);
}
.btn-icon:active {
  background: var(--color-surface-dynamic);
}
.site-header:not(.scrolled):not(.solid) .btn-icon {
  color: rgba(250,248,244,0.85);
  border-color: rgba(250,248,244,0.35);
}
.site-header:not(.scrolled):not(.solid) .btn-icon:hover {
  color: #fff;
  border-color: rgba(250,248,244,0.6);
  background: rgba(255,255,255,0.1);
}

/* Login button — icon-only circle, matched to .lang-toggle height */
.login-btn.login-btn {
  width: 32px;
  height: 32px;
  padding: 0;
  gap: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid var(--color-primary);
  border-radius: 50%;
  color: var(--color-primary);
  background: transparent;
  cursor: pointer;
  flex-shrink: 0;
}
.login-btn.login-btn:hover {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}
.site-header:not(.scrolled):not(.solid) .login-btn.login-btn {
  border-color: rgba(250,248,244,0.7);
  color: #fff;
}
.site-header:not(.scrolled):not(.solid) .login-btn.login-btn:hover {
  background: rgba(255,255,255,0.18);
  border-color: #fff;
  color: #fff;
}

.hamburger {
  display: flex;
  position: relative;
}
@media (min-width: 1024px) {
  .hamburger { display: none; }
}

/* Hamburger → X morph */
.hamburger-icon {
  transition: opacity 220ms ease, transform 220ms ease;
}
.hamburger-icon--close {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-45deg) scale(0.8);
  opacity: 0;
}
.hamburger[aria-expanded="true"] .hamburger-icon--bars {
  opacity: 0;
  transform: rotate(45deg) scale(0.8);
}
.hamburger[aria-expanded="true"] .hamburger-icon--close {
  opacity: 1;
  transform: translate(-50%, -50%) rotate(0deg) scale(1);
}

/* Mobile menu — "Editorial Index" (2026-08-05): full-screen typographic
   index on the warm brand ground. Tokens only; both themes come free. */
.mobile-menu {
  position: fixed;
  inset: 0;
  background: var(--color-bg);
  z-index: 99;
  padding: calc(var(--nav-height) + var(--space-4)) var(--space-6)
           calc(var(--space-6) + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  will-change: transform, opacity;
  /* Asymmetric: close fast (0.25s), open on the 0.4s signature curve below */
  transition: opacity 0.25s cubic-bezier(0.25, 1, 0.5, 1),
              transform 0.25s cubic-bezier(0.25, 1, 0.5, 1);
}
.mobile-menu.open {
  opacity: 1;
  pointer-events: all;
  transform: translateY(0);
  transition-duration: 0.4s;
}

/* ── Index numbers: small tabular digits beside big serif destinations ── */
.nav-num {
  font-size: 0.7rem;
  font-variant-numeric: tabular-nums;
  color: var(--color-text-faint);
  margin-right: var(--space-3);
  font-weight: 500;
  letter-spacing: 0.12em;
  font-family: var(--font-body);
  flex-shrink: 0;
  line-height: 1;
}

/* Left-side label group inside toggle buttons */
.mobile-nav-label {
  display: flex;
  align-items: center;
}

/* Main nav links — direct children only, so CTA/WA (inside divs) and
   sub-items (inside .mobile-nav-group-items) are unaffected. Destinations
   are headings, so they speak in the display serif (brand doc §5). */
.mobile-menu > a {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: var(--color-text);
  font-size: 1.4rem;
  font-family: var(--font-body);
  font-weight: 400;
  letter-spacing: -0.02em;
  padding: var(--space-4) 0;
  border-bottom: 1px solid var(--color-divider);
  transition: color var(--transition-interactive);
}
.mobile-menu > a:hover { color: var(--color-primary); }
.mobile-menu > a:active { opacity: 0.7; }

/* ── Active route: the menu's ONLY teal — color + underline, never color
   alone (brand hard rule §6.3) ── */
.mobile-menu a.active { color: var(--color-accent); text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 6px; }
.mobile-menu a.active .nav-num { color: var(--color-accent); }

/* ── PRO badge rides the row's right edge (gold pill styled at .nav-pro) ── */
.mobile-menu .nav-pro { margin-left: auto; }
.mobile-nav-group-items .nav-pro { margin-left: auto; }

/* ── Runtime-injected account links (re-created on every updateUI) ── */
.mobile-auth-link { display: flex; flex-direction: column; }
.mobile-auth-link a {
  display: flex;
  align-items: center;
  min-height: 44px;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--color-text-muted);
  transition: color var(--transition-interactive);
}
.mobile-auth-link a:hover { color: var(--color-primary); }

/* ── Utility band: quiet zone under one hairline (CTA/auth/WA live here) ── */
#mobile-menu-foot {
  border-top: 1px solid var(--color-divider);
  margin-top: auto;
}

/* ── Mobile nav: staggered cascade fade-in (sub-600ms total) ── */
@keyframes mobileNavIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
.mobile-menu.open > * {
  animation: mobileNavIn 0.4s cubic-bezier(0.25, 1, 0.5, 1) both;
}
.mobile-menu.open > *:nth-child(1)  { animation-delay: 30ms; }
.mobile-menu.open > *:nth-child(2)  { animation-delay: 65ms; }
.mobile-menu.open > *:nth-child(3)  { animation-delay: 100ms; }
.mobile-menu.open > *:nth-child(4)  { animation-delay: 135ms; }
.mobile-menu.open > *:nth-child(5)  { animation-delay: 170ms; }
.mobile-menu.open > *:nth-child(6)  { animation-delay: 205ms; }
.mobile-menu.open > *:nth-child(7)  { animation-delay: 240ms; }
.mobile-menu.open > *:nth-child(8)  { animation-delay: 275ms; }
.mobile-menu.open > *:nth-child(9)  { animation-delay: 310ms; }
.mobile-menu.open > *:nth-child(10) { animation-delay: 345ms; }
.mobile-menu.open > *:nth-child(11) { animation-delay: 380ms; }
.mobile-menu.open > *:nth-child(12) { animation-delay: 415ms; }
/* Late/injected children (auth, CTA, WA) join the tail, never pop at t=0 */
.mobile-menu.open > *:nth-child(n+13) { animation-delay: 450ms; }

@media (prefers-reduced-motion: reduce) {
  .mobile-menu { transition: opacity 150ms ease; transform: none; }
  .mobile-menu.open > * { animation: none; }
  .mobile-nav-group-items,
  .mobile-nav-group-chevron { transition: none; }
}


/* =====================================================
   HERO SECTION — Full bleed, cinematic
   ===================================================== */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  background: #1a1814;
}

/* Base layer — the finished, photorealistic villa. */
.hero-bg {
  position: absolute;
  inset: 0;
  background-image: url('./images/hero-main.webp');
  background-size: cover;
  background-position: center 40%;
  background-repeat: no-repeat;
  transform: scale(1.04);
  transition: transform 8s ease-out;
}

.hero-bg.loaded {
  transform: scale(1);
}

/* When the X-Ray reveal is active, both layers must stay pixel-locked — any
   Ken Burns zoom on the base would de-register the wireframe during the wipe.
   So we pin both layers at identity scale. */
.hero.hero-xray .hero-bg,
.hero.hero-xray .hero-bg.loaded {
  transform: none;
  transition: none;
}

/* Hero video loop (2026-08-11) — the blueprint-materialization cycle as a
   self-playing loop. Injected by HeroVideo (app.js) between the photo and the
   wireframe layers; invisible until it can play through, then crossfades in
   over the photo. Same crop/position as the photo so the fade is seamless. */
.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
  opacity: 0;
  transition: opacity 0.9s ease;
  pointer-events: none;
}
.hero-video.is-playing { opacity: 1; }

/* The moment a hero video is ARMED (element attached, fetch under way) the
   photo eases from wherever its Ken Burns zoom is to identity scale, so by
   crossfade time the photo and the (unscaled) video of the same frame are
   pixel-registered — without this, a video that outraces GSAP (which pins via
   .hero-xray) blends against a photo mid-zoom. Placed after the .hero-xray
   pin: equal-specificity .loaded rows resolve here, but under .hero-xray the
   transform is already none so the shorter transition is a no-op. */
.hero--video-arming .hero-bg,
.hero--video-arming .hero-bg.loaded,
.hero--video .hero-bg,
.hero--video .hero-bg.loaded {
  transform: none;
  transition: transform 0.9s ease;
}

/* While the loop plays it IS the X-Ray effect — the scroll wipe's layers bow
   out with the same crossfade (never a pop; !important beats the scanline's
   GSAP-inline opacity). */
.hero--video .hero-wire,
.hero--video .hero-scanline {
  opacity: 0 !important;
  transition: opacity 0.9s ease;
}

/* Reveal layer — pixel-registered wireframe of the same frame.
   Default state is fully clipped away (invisible) so that without JS/GSAP the
   finished photo shows through. JS opens the clip on init, then scrolls it shut. */
.hero-wire {
  position: absolute;
  inset: 0;
  z-index: 1;
  background-image: url('./images/hero-wire.webp');
  background-size: cover;
  background-position: center 40%;
  background-repeat: no-repeat;
  clip-path: inset(100% 0 0 0);
  -webkit-clip-path: inset(100% 0 0 0);
  /* NOTE: no translateZ(0)/backface-visibility here. Promoting this layer to a
     compositor texture caches the cover-scaled background at a softer raster,
     so it rendered visibly blurrier than the base layer below the clip seam.
     clip-path animates smoothly without forced promotion. */
  will-change: clip-path;
  pointer-events: none;
}

/* Razor-thin scanning line riding the clip edge — the "materialization front". */
.hero-scanline {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  z-index: 3;
  height: 2px;
  opacity: 0;
  pointer-events: none;
  background: linear-gradient(
    to right,
    transparent 0%,
    rgba(212, 175, 110, 0.0) 4%,
    rgba(244, 226, 178, 0.95) 50%,
    rgba(212, 175, 110, 0.0) 96%,
    transparent 100%
  );
  box-shadow:
    0 0 8px rgba(244, 226, 178, 0.7),
    0 0 22px rgba(212, 175, 110, 0.55);
  transform: translateZ(0);
  will-change: top, opacity;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(
    to bottom,
    rgba(10, 8, 6, 0.38) 0%,
    rgba(10, 8, 6, 0.52) 50%,
    rgba(10, 8, 6, 0.72) 100%
  );
}

.hero-inner {
  position: relative;
  z-index: 4;
  width: 100%;
  padding-top: calc(var(--nav-height) + var(--space-6));
  padding-bottom: clamp(var(--space-16), 8vw, var(--space-32));
}


.hero-title {
  font-family: var(--font-body);
  font-size: clamp(2.5rem, 1rem + 5vw, 5rem);
  color: #faf8f4;
  letter-spacing: 0.35em;
  line-height: 1.1;
  margin-bottom: var(--space-4);
  font-weight: 300;
  text-transform: uppercase;
  text-shadow: 0 2px 32px rgba(0,0,0,0.3);
}

.hero-subtitle {
  font-family: var(--font-display);
  font-size: clamp(1.05rem, 0.85rem + 0.75vw, 1.4rem);
  color: #fff;
  max-width: 52ch;
  margin-inline: auto;
  margin-bottom: var(--space-10);
  line-height: 1.6;
  font-weight: 400;
  font-style: italic;
  letter-spacing: 0.02em;
  text-shadow: 0 2px 12px rgba(0,0,0,0.5), 0 1px 3px rgba(0,0,0,0.3);
}

/* Hero search bar — see .hero-search--trigger below (ADR-0001 command palette).
   The original .hero-search-input / .hero-search-btn / .hero-search-icon rules
   were removed when the hero became a palette trigger. */

.hero-scroll-hint {
  position: absolute;
  bottom: var(--space-8);
  left: 50%;
  transform: translateX(-50%);
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  /* Opacity is owned by the hero-reveal wipe (GSAP fades this container out as
     the wireframe wipes). Do NOT animate opacity here — a CSS animation would
     override the wipe-off and the arrow would never disappear. */
}

/* Metallic-gold scroll cue — larger and high-contrast so it reads on the
   varied hero (drop-shadow keeps it visible over bright spots). The bounce
   lives on the SVG so the container's opacity stays free for the wipe. */
.hero-scroll-arrow {
  width: 27px;
  height: 27px;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.6));
  animation: scroll-bounce 2.4s ease-in-out infinite;
}

@keyframes scroll-bounce {
  0%, 100% { transform: translateY(0); opacity: 0.5; }
  50% { transform: translateY(7px); opacity: 0.62; }
}

/* Mobile scroll cue strip — the hero stops ~72px short of the viewport bottom
   so a light band (the start of the page proper) shows through, with the gold
   arrow sitting in it. Hidden on desktop, where the in-hero hint remains.
   GSAP fades .hero-scroll-strip together with .hero-scroll-hint on scroll. */
.hero-scroll-strip {
  display: none;
  justify-content: center;
  align-items: center;
  padding: var(--space-3) 0 0;
  background: var(--color-surface);
}
.hero-scroll-arrow--strip {
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.18));
}
@media (max-width: 768px) {
  .hero { min-height: calc(100svh - 72px); }
  .hero-scroll-hint { display: none; }
  .hero-scroll-strip { display: flex; }
}

/* =====================================================
   HOME SHOWCASE — editorial image-card sections
   (Property & Development · Vendor Directory · Marketplace)
   ===================================================== */

.home-showcase-section {
  padding-block: clamp(56px, 7vw, 96px);
  background: var(--color-surface);
}

.home-showcase-section--offset {
  background: var(--color-surface-offset);
}

.showcase-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(var(--space-6), 3vw, var(--space-10));
}

.showcase-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: var(--color-text);
}

.showcase-card-media {
  overflow: hidden;
  border-radius: var(--radius-lg);
  aspect-ratio: 16 / 10;
  background: var(--color-border);
  margin-bottom: var(--space-4);
}

.showcase-card-img {
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1);
}

.showcase-card:hover .showcase-card-img {
  transform: scale(1.04);
}

/* Single label under each card — deliberately styled like the old "Explore →"
   CTA (small caps, tracked, primary colour, animated arrow). */
.showcase-card-label {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-primary);
}

.showcase-card-label svg {
  transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
  flex-shrink: 0;
}

.showcase-card:hover .showcase-card-label svg {
  transform: translateX(5px);
}

@media (max-width: 900px) {
  .showcase-grid {
    grid-template-columns: 1fr;
    gap: var(--space-8);
  }
}

/* =====================================================
   HOME PROMO — shared split card: text + CTAs on the left
   panel, photo on the right. Used by both the Job Board and
   the Marketplace (photo set per-card via --promo-img). On
   mobile the panel stacks above the photo and the CTAs move
   to a photo overlay.
   ===================================================== */

.home-promo-section {
  padding-block: clamp(56px, 7vw, 96px);
  background: var(--color-surface);
}

/* Back-to-back promo cards (Job Board → Marketplace): collapse the second
   card's top padding so the gap between them equals one section's padding,
   not two stacked ones. */
.home-promo-section + .home-promo-section {
  padding-block-start: 0;
}

.home-promo-banner {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: var(--color-surface-offset);
  border: 1px solid var(--color-border);
  min-height: clamp(340px, 34vw, 420px);
}

.home-promo-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: var(--space-4);
  padding: clamp(var(--space-8), 4vw, var(--space-12));
}

.home-promo-lead {
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 1rem + 0.6vw, 1.5rem);
  font-style: italic;
  color: var(--color-text);
  line-height: 1.35;
  margin: 0;
}

.home-promo-media {
  position: relative;
  min-height: 280px;
}

.home-promo-img {
  position: absolute;
  inset: 0;
  background: var(--promo-img, none) center / cover no-repeat;
}

/* Soft bottom scrim so the overlay CTAs stay legible over the photo (mobile) */
.home-promo-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(10, 8, 6, 0.6) 0%,
    rgba(10, 8, 6, 0.22) 40%,
    rgba(10, 8, 6, 0) 65%
  );
  opacity: 0;               /* only shown behind the mobile overlay CTAs */
}

.home-promo-actions {
  display: flex;
  align-items: center;
  gap: var(--space-5);
  flex-wrap: wrap;
}

/* Desktop: CTAs sit under the text on the left panel */
.home-promo-actions--panel {
  margin-top: var(--space-2);
}

/* Mobile-only overlay set is hidden on desktop */
.home-promo-actions--overlay {
  display: none;
}

.home-promo-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  color: #faf8f4;
  font-size: var(--text-sm);
  font-weight: 500;
  text-decoration: none;
  border-bottom: 1px solid rgba(250, 248, 244, 0.4);
  padding-bottom: 2px;
  transition: border-color 0.25s ease;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.45);
}

.home-promo-link:hover {
  border-color: #faf8f4;
}

/* Dark variant for the light left panel (desktop) */
.home-promo-link--dark {
  color: var(--color-text);
  border-bottom-color: var(--color-border);
  text-shadow: none;
}

.home-promo-link--dark:hover {
  border-bottom-color: var(--color-text);
}

@media (max-width: 768px) {
  /* Title + lead above; photo below with the CTAs overlaid on it */
  .home-promo-banner {
    grid-template-columns: 1fr;
    min-height: 0;
  }
  .home-promo-text {
    padding: var(--space-6) var(--space-5);
  }
  .home-promo-media {
    min-height: 300px;
  }

  /* Swap which CTA set shows */
  .home-promo-actions--panel {
    display: none;
  }
  .home-promo-scrim {
    opacity: 1;
  }
  .home-promo-actions--overlay {
    display: flex;
    position: absolute;
    left: var(--space-5);
    right: var(--space-5);
    bottom: var(--space-5);
  }
}

/* =====================================================
   EDITORIAL — Featured Developers & Projects
   ===================================================== */

.editorial-guides-section {
  padding-block: clamp(60px, 9vw, 120px);
  background: var(--color-surface-offset);
}

/* Shared: muted uppercase eyebrow label */
.editorial-eyebrow {
  display: block;
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-text-faint);
  margin-bottom: var(--space-2);
}

/* Shared: large serif section heading */
.editorial-section-title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 1rem + 1.5vw, 2.5rem);
  font-weight: 400;
  color: var(--color-text);
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin: 0;
}

@media (max-width: 768px) {
  .editorial-section-title {
    font-size: 1.7rem;
    font-weight: 450;
  }
}

/* Shared: minimal text link with animated arrow */
.editorial-view-all-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-muted);
  text-decoration: none;
  letter-spacing: 0.03em;
  transition: color 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

.editorial-view-all-link:hover {
  color: var(--color-text);
}

.editorial-arrow-icon {
  flex-shrink: 0;
  transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

.editorial-view-all-link:hover .editorial-arrow-icon {
  transform: translateX(5px);
}

/* Section 1: header row — heading left, CTA right */
.editorial-projects-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-6);
  margin-bottom: clamp(var(--space-8), 4vw, var(--space-12));
}


/* =====================================================
   EDITORIAL — Guides & Resources list
   ===================================================== */

/* Section 2: header */
.editorial-guides-header {
  margin-bottom: clamp(var(--space-6), 3vw, var(--space-10));
}

/* Section 2: editorial list — no bullets */
.editorial-guides-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.editorial-guide-item:first-child .editorial-guide-row {
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

[data-theme="dark"] .editorial-guide-item:first-child .editorial-guide-row {
  border-top-color: rgba(255, 255, 255, 0.07);
}

/* Section 2: row — full-width flex hit target */
.editorial-guide-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--space-6);
  padding: var(--space-5) var(--space-2);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  text-decoration: none;
  color: var(--color-text);
}

[data-theme="dark"] .editorial-guide-row {
  border-bottom-color: rgba(255, 255, 255, 0.07);
}

/* Hover: soft background tint via pseudo element */
.editorial-guide-row::before {
  content: '';
  position: absolute;
  inset: 0;
  background: color-mix(in oklab, var(--color-primary) 4%, transparent);
  opacity: 0;
  transition: opacity 0.4s cubic-bezier(0.25, 1, 0.5, 1);
  pointer-events: none;
  border-radius: 2px;
}

.editorial-guide-row:hover::before {
  opacity: 1;
}

/* Row: muted index number */
.editorial-guide-index {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--color-text-faint);
  letter-spacing: 0.08em;
  min-width: 24px;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

/* Row: guide title — shifts right on hover */
.editorial-guide-title {
  flex: 1;
  font-family: var(--font-display);
  font-size: clamp(1rem, 0.85rem + 0.35vw, 1.2rem);
  font-weight: 400;
  color: var(--color-text);
  line-height: 1.4;
  transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
  position: relative;
  z-index: 1;
}

.editorial-guide-row:hover .editorial-guide-title {
  transform: translateX(6px);
}

/* Row: reading time / category tag */
.editorial-guide-meta {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-faint);
  white-space: nowrap;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

/* Row: arrow — revealed on hover */
.editorial-guide-arrow {
  opacity: 0;
  flex-shrink: 0;
  color: var(--color-text-muted);
  transition: opacity 0.4s cubic-bezier(0.25, 1, 0.5, 1), transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
  position: relative;
  z-index: 1;
}

.editorial-guide-row:hover .editorial-guide-arrow {
  opacity: 1;
  transform: translateX(3px);
}

/* Section 2: footer with "All guides" link */
.editorial-guides-footer {
  margin-top: clamp(var(--space-6), 3vw, var(--space-8));
  display: flex;
  justify-content: flex-end;
}

/* =====================================================
   EDITORIAL — Responsive / Mobile
   ===================================================== */

@media (max-width: 767px) {

  /* Guides: hide index numbers to keep title clean */
  .editorial-guide-index {
    display: none;
  }

  .editorial-guide-row {
    gap: var(--space-3);
    padding: var(--space-4) var(--space-1);
  }

  /* Guides: slightly more line-height for readability */
  .editorial-guide-title {
    line-height: 1.55;
  }

  /* Guides: center the footer CTA */
  .editorial-guides-footer {
    justify-content: center;
  }
}


/* =====================================================
   SECTION LAYOUTS — Generous, editorial breathing room
   ===================================================== */

.section {
  padding-block: clamp(80px, 9vw, 120px);
}


.section-header {
  margin-bottom: clamp(var(--space-10), 4vw, var(--space-16));
  text-align: center;
}



.section-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 1rem + 2.5vw, 3.5rem);
  color: var(--color-text);
  letter-spacing: -0.02em;
  line-height: 1.08;
  margin-bottom: var(--space-4);
  font-weight: 400;
}


/* =====================================================
   CARD GRID
   ===================================================== */

.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
}
@media (min-width: 600px) {
  .card-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 960px) {
  .card-grid { grid-template-columns: repeat(3, 1fr); }
}

.card-grid--2col {
  grid-template-columns: 1fr;
}
@media (min-width: 600px) {
  .card-grid--2col { grid-template-columns: repeat(2, 1fr); }
}


/* =====================================================
   CARD — Premium flat design with hover lift
   ===================================================== */

.card {
  background: #fff;
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-xl);
  padding: var(--space-6) var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  transition: border-color 220ms ease, box-shadow 220ms ease, transform 220ms cubic-bezier(0.16,1,0.3,1);
  position: relative;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(26,24,20,0.04);
}
.card:hover {
  border-color: color-mix(in oklab, var(--color-primary) 25%, var(--color-divider));
  box-shadow: 0 8px 32px rgba(26, 24, 20, 0.09);
  transform: translateY(-3px);
}

/* Visual header — avatar + category + badges + rating */
.card-visual-header {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}
.card-avatar {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--color-surface-offset);
}
.card-avatar--logo {
  padding: 4px;
  background: #fff;
  border: 1px solid var(--color-divider);
}
.card-avatar--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--color-primary), color-mix(in oklab, var(--color-primary) 70%, #000));
  color: #fff;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
}
.card-header-info {
  flex: 1;
  min-width: 0;
}
.card-header-badges {
  display: flex;
  gap: var(--space-1);
  margin-top: 2px;
}

[data-theme="dark"] .card {
  background: var(--color-surface);
}
[data-theme="dark"] .card-avatar--logo {
  background: var(--color-surface-2);
  border-color: var(--color-divider);
}

/* Legacy card-top (for projects etc.) */
.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}
.card-top-left {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

/* Social links */
.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm, 6px);
  transition: transform .2s, opacity .2s;
}
.social-link:hover {
  transform: scale(1.1);
  opacity: 0.8;
}
.social-link--instagram { color: #E1306C; }
.social-link--facebook { color: #1877F2; }
.social-link--linkedin { color: #0A66C2; }

/* Category label — subtle, no background */
.card-category-label {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Badge — light, quiet pill */
.card-badge {
  font-size: 0.6875rem;
  font-weight: 600;
  color: color-mix(in oklab, var(--color-star) 85%, var(--color-text));
  background: color-mix(in oklab, var(--color-star) 10%, transparent);
  padding: 1px var(--space-2);
  border-radius: var(--radius-full);
  line-height: 1.5;
  white-space: nowrap;
}
.card-badge--trusted {
  color: #0c7c84;
  background: rgba(12, 124, 132, 0.1);
}

/* Inline rating — small, text-level */
.card-rating-inline {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-text-muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  flex-shrink: 0;
}
.card-rating-inline--sm {
  font-size: 0.6875rem;
}
.card-rating-star {
  color: var(--color-star);
  font-size: 0.8125rem;
  line-height: 1;
}
.card-rating-count {
  color: var(--color-text-faint);
  font-weight: 400;
}

/* Card name — clickable */
.card-name {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  color: var(--color-text);
  letter-spacing: -0.01em;
  line-height: 1.25;
}
.card-name a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-interactive);
}
.card-name a:hover {
  color: var(--color-primary);
}

/* Description */
.card-desc {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  max-width: none;
}

/* Meta line — plain text with icons, no backgrounds */
.card-meta-line {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
}
.card-meta-item {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  font-size: var(--text-xs);
  color: var(--color-text-faint);
}
.card-meta-item svg {
  flex-shrink: 0;
  opacity: 0.6;
}
.card-meta-sep {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--color-text-faint);
  flex-shrink: 0;
}

/* Tags line — inline text, dot-separated */
.card-tags-line {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  flex-wrap: wrap;
}
.card-tag {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}
.card-tag-dot {
  color: var(--color-text-faint);
  font-size: var(--text-xs);
}

/* Footer: view button + whatsapp icon */
.card-footer {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-top: auto;
  padding-top: var(--space-3);
  border-top: 1px solid var(--color-divider);
}

.card-view-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-primary);
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-1) 0;
  transition: color var(--transition-interactive);
}
.card-view-btn:hover {
  color: var(--color-primary-hover);
}
.card-view-btn:active {
  color: var(--color-primary-active);
}
.card-view-btn svg {
  flex-shrink: 0;
  transition: transform var(--transition-interactive);
}
.card-view-btn:hover svg {
  transform: translateX(2px);
}

.card-wa-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 34px;
  padding: 0 10px;
  border-radius: var(--radius-full);
  color: #25d366;
  background: color-mix(in oklab, #25d366 8%, transparent);
  border: 1px solid color-mix(in oklab, #25d366 20%, transparent);
  cursor: pointer;
  text-decoration: none;
  margin-left: auto;
  transition: background var(--transition-interactive), border-color var(--transition-interactive);
  flex-shrink: 0;
  white-space: nowrap;
}
.card-wa-btn:hover {
  background: color-mix(in oklab, #25d366 15%, transparent);
  border-color: color-mix(in oklab, #25d366 35%, transparent);
  text-decoration: none;
}
.card-wa-btn:active {
  background: color-mix(in oklab, #25d366 22%, transparent);
}
.card-wa-btn svg {
  flex-shrink: 0;
}
.card-wa-num {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1;
}

.card-check-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 34px;
  padding: 0 10px;
  border-radius: var(--radius-full);
  color: var(--color-text-muted);
  background: rgba(100, 116, 139, 0.07);
  border: 1px solid rgba(100, 116, 139, 0.18);
  cursor: pointer;
  font-size: 0.7rem;
  font-weight: 600;
  white-space: nowrap;
  transition: background var(--transition-interactive), border-color var(--transition-interactive), color var(--transition-interactive);
}
.card-check-btn:hover {
  background: rgba(100, 116, 139, 0.14);
  border-color: rgba(100, 116, 139, 0.32);
  color: var(--color-text-secondary);
}
.card-check-btn:active {
  background: rgba(100, 116, 139, 0.22);
}

/* Toast notification for quote actions */
.quote-toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background: var(--color-surface-raised, #1e293b);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  padding: 10px 22px;
  font-size: 0.8125rem;
  font-weight: 500;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  white-space: nowrap;
}
.quote-toast--show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Project-specific: status indicator */
.card-status {
  font-size: 0.6875rem;
  font-weight: 600;
  padding: 1px var(--space-2);
  border-radius: var(--radius-full);
  white-space: nowrap;
  line-height: 1.5;
}
.card-status--planning {
  color: var(--color-primary);
  background: var(--color-primary-highlight);
}
.card-status--under_construction {
  color: color-mix(in oklab, var(--color-warning) 80%, var(--color-text));
  background: var(--color-warning-highlight);
}
.card-status--completed {
  color: var(--color-success);
  background: var(--color-success-highlight);
}

/* Project-specific: facts row */
.card-facts-row {
  display: flex;
  gap: var(--space-6);
}
.card-fact {
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.card-fact-label {
  font-size: 0.6875rem;
  color: var(--color-text-faint);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.card-fact-value {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text);
  font-variant-numeric: tabular-nums;
}

/* Project-specific: developer attribution line */
.card-developer-line {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  padding-top: var(--space-2);
  border-top: 1px solid var(--color-divider);
}
.card-developer-link {
  font-size: var(--text-xs);
  color: var(--color-primary);
  font-weight: 600;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  text-decoration: none;
  transition: color var(--transition-interactive);
}
.card-developer-link:hover {
  color: var(--color-primary-hover);
  text-decoration: underline;
}

/* Keep old badge classes for detail pages & filters that still use them */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  font-size: var(--text-xs);
  font-weight: 600;
  padding: 2px var(--space-2);
  border-radius: var(--radius-full);
  line-height: 1.4;
  white-space: nowrap;
}
.badge--featured {
  background: color-mix(in oklab, var(--color-star) 15%, transparent);
  color: color-mix(in oklab, var(--color-star) 80%, var(--color-text));
  border: 1px solid color-mix(in oklab, var(--color-star) 30%, transparent);
}
.badge--verified {
  background: var(--color-primary-highlight);
  color: var(--color-primary);
  border: 1px solid color-mix(in oklab, var(--color-primary) 20%, transparent);
}
.badge--status-completed {
  background: var(--color-success-highlight);
  color: var(--color-success);
}
.badge--status-construction {
  background: var(--color-warning-highlight);
  color: color-mix(in oklab, var(--color-warning) 80%, var(--color-text));
}
.badge--status-planning {
  background: var(--color-primary-highlight);
  color: var(--color-primary);
}
.badge--project-type {
  background: var(--color-surface-offset);
  color: var(--color-text-muted);
  border: 1px solid var(--color-border);
}
.badge--new {
  background: var(--color-coral-highlight);
  color: var(--color-coral);
  border: 1px solid color-mix(in oklab, var(--color-coral) 20%, transparent);
}

/* Google rating component — used on detail pages */
.google-rating {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  background: var(--color-surface-offset);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
}
.google-rating-logo {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  color: var(--color-text-faint);
  font-size: var(--text-xs);
  font-weight: 500;
  flex-shrink: 0;
}
.stars {
  display: flex;
  align-items: center;
  gap: 1px;
}
.star-svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}
.rating-number {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--color-text);
  font-variant-numeric: tabular-nums;
}
.rating-count {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  font-variant-numeric: tabular-nums;
}
.rating-na {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
}

/* Old meta/tag classes — kept for anything still using them */
.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  align-items: center;
}
.meta-chip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  background: var(--color-surface-offset);
  padding: 2px var(--space-2);
  border-radius: var(--radius-full);
  border: 1px solid var(--color-border);
}
.meta-chip svg { flex-shrink: 0; opacity: 0.7; }
.tag {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  background: var(--color-surface-offset);
  padding: 1px var(--space-2);
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
}
.card-actions {
  display: flex;
  gap: var(--space-2);
  margin-top: auto;
}
.card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-3);
}


/* =====================================================
   BUTTONS — Letter-spaced, premium feel
   ===================================================== */

/* [hidden] must beat the display rule below — the UA's [hidden]{display:none}
   is UA-origin and LOSES to any author display declaration, so without this a
   `hidden` button still renders (bit the DD page's Choose CTAs; previously
   patched per-element three separate times). */
.btn[hidden] { display: none !important; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: 500;
  letter-spacing: 0.04em;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background var(--transition-interactive), color var(--transition-interactive), border-color var(--transition-interactive), box-shadow var(--transition-interactive), transform var(--transition-interactive);
  white-space: nowrap;
  min-height: 44px;
  line-height: 1.2;
  font-family: var(--font-body);
}

.btn--primary {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}
.btn--primary:hover {
  background: var(--color-primary-hover);
  border-color: var(--color-primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px color-mix(in oklab, var(--color-primary) 35%, transparent);
}
.btn--primary:active {
  background: var(--color-primary-active);
  transform: translateY(0);
}

.btn--secondary {
  background: var(--color-surface-offset);
  color: var(--color-text);
  border-color: var(--color-border);
}
.btn--secondary:hover {
  background: var(--color-surface-dynamic);
  border-color: color-mix(in oklab, var(--color-primary) 30%, var(--color-border));
  transform: translateY(-1px);
}
.btn--secondary:active {
  background: var(--color-surface-offset-2);
  transform: translateY(0);
}

.btn--ghost {
  background: transparent;
  color: var(--color-primary);
  border-color: currentColor;
  border-width: 1px;
}
.btn--ghost:hover {
  background: var(--color-primary-highlight);
  transform: translateY(-1px);
}
.btn--ghost:active {
  background: color-mix(in oklab, var(--color-primary-highlight) 80%, transparent);
  transform: translateY(0);
}

.btn--whatsapp {
  background: var(--color-whatsapp);
  color: #fff;
  border-color: var(--color-whatsapp);
}
.btn--whatsapp:hover {
  background: var(--color-whatsapp-hover);
  border-color: var(--color-whatsapp-hover);
}
.btn--whatsapp:active {
  background: color-mix(in oklab, var(--color-whatsapp-hover) 80%, #000);
}

.btn--sm {
  min-height: 36px;
  padding: var(--space-1) var(--space-3);
  font-size: var(--text-xs);
}

.btn--full {
  width: 100%;
}

.btn svg {
  flex-shrink: 0;
}

/* =====================================================
   FILTER PANEL
   ===================================================== */

.filters-bar {
  background: var(--color-surface);
  border-radius: var(--radius-xl);
  padding: var(--space-4) var(--space-5);
  margin-bottom: var(--space-6);
  box-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 0 0 1px rgba(0,0,0,0.05);
}

.filters-toggle-btn {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text);
  width: 100%;
  padding: var(--space-2) 0;
}
@media (min-width: 768px) {
  .filters-toggle-btn { display: none; }
}

.filters-body {
  display: none;
}
.filters-body.open {
  display: block;
}
@media (min-width: 768px) {
  .filters-body { display: block !important; }
}

.filters-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
  padding-top: var(--space-4);
}
.filters-grid--4 { }
@media (min-width: 640px) {
  .filters-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 960px) {
  .filters-grid--4 { grid-template-columns: repeat(4, 1fr); gap: var(--space-3); padding-top: 0; }
  .filters-grid--3 { grid-template-columns: repeat(3, 1fr); gap: var(--space-3); padding-top: 0; }
}

/* More Filters row */
.filters-more-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding-top: var(--space-3);
  border-top: 1px solid rgba(0,0,0,0.06);
  margin-top: var(--space-3);
}
.filters-more-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--color-text-muted);
  border: 1px solid var(--color-border);
  border-radius: 2px;
  padding: 5px 12px;
  letter-spacing: 0.04em;
  background: transparent;
  transition: color 0.15s, border-color 0.15s;
}
.filters-more-btn:hover {
  color: var(--color-text);
  border-color: var(--color-text-muted);
}
.filters-more-btn.active {
  color: var(--color-accent);
  border-color: var(--color-accent);
}

/* More Filters panel (hidden by default) */
.filters-more-panel {
  display: none;
  padding-top: var(--space-4);
  animation: filterSlideDown 0.2s ease;
}
.filters-more-panel.open {
  display: block;
}
@keyframes filterSlideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Feature tags */
.filter-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.filter-tag {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text-muted);
  font-size: var(--text-xs);
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
}
.filter-tag:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}
.filter-tag.active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.filter-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--color-text-faint);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.filter-select {
  padding: var(--space-2) var(--space-3);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  color: var(--color-text);
  outline: none;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238a8780' stroke-width='1.5'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right var(--space-3) center;
  padding-right: var(--space-8);
  transition: border-color var(--transition-interactive);
  min-height: 44px;
}
.filter-select:focus {
  border-color: var(--color-primary);
}

.filters-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: var(--space-4);
  padding-top: var(--space-4);
  border-top: 1px solid var(--color-divider);
  gap: var(--space-3);
  flex-wrap: wrap;
}

.filters-active-count {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

.filters-active-count strong {
  color: var(--color-primary);
}


/* =====================================================
   PAGE HEADER — Spacious directory header
   ===================================================== */

.page-header {
  padding-block: clamp(80px, 9vw, 120px);
  padding-top: calc(clamp(80px, 9vw, 120px) + var(--nav-height)); /* account for fixed nav */
  border-bottom: 1px solid var(--color-divider);
  margin-bottom: var(--space-10);
  background: var(--color-surface-offset);
}


.page-title {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  color: var(--color-text);
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: var(--space-3);
}

.page-desc {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  max-width: 56ch;
}

/* =====================================================
   DIR-HERO — Inspiring directory/listing page headers
   ===================================================== */

.dir-hero {
  position: relative;
  padding-block: clamp(48px, 6vw, 80px);
  padding-top: calc(clamp(48px, 6vw, 80px) + var(--nav-height));
  background: linear-gradient(135deg, #1a1814 0%, #2a2620 50%, #1a1814 100%);
  color: #faf8f4;
  overflow: hidden;
  margin-bottom: 0;
}
.dir-hero + .section {
  padding-top: clamp(32px, 4vw, 48px);
  background: var(--color-surface-offset);
}

.dir-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url('./images/hero-construction.webp');
  background-size: cover;
  background-position: center;
  opacity: 0.25;
}

/* Get Quotes hero: extra diffused scrim so the stepper text reads cleanly
   over the concrete/scaffolding image (scoped — leaves other dir heroes as-is). */
.dir-hero:has(.gq-stepper)::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(180deg,
    rgba(20, 18, 16, 0.35) 0%,
    rgba(20, 18, 16, 0.58) 100%);
}

.dir-hero .container {
  position: relative;
  z-index: 1;
}

.dir-hero .page-header-breadcrumb {
  color: rgba(250, 248, 244, 0.5);
}
.dir-hero .page-header-breadcrumb a {
  color: rgba(250, 248, 244, 0.65);
}
.dir-hero .page-header-breadcrumb a:hover {
  color: rgba(250, 248, 244, 0.9);
}

.dir-hero-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 1.2rem + 2vw, 3.5rem);
  color: #faf8f4;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: var(--space-3);
  font-weight: 400;
  text-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

.dir-hero-desc {
  font-size: clamp(1rem, 0.85rem + 0.4vw, 1.2rem);
  color: rgba(250, 248, 244, 0.92);
  max-width: 52ch;
  font-style: italic;
  font-family: var(--font-display);
  text-shadow: 0 1px 4px rgba(0,0,0,0.5);
}

/* =====================================================
   DIR-FILTERS — Two prominent pills + more filters
   ===================================================== */

.dir-filters {
  margin-bottom: var(--space-8);
}

.dir-primary-filters {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
  margin-bottom: var(--space-4);
}

@media (max-width: 640px) {
  .dir-primary-filters {
    grid-template-columns: 1fr;
  }
}

.dir-filter-pill {
  background: var(--color-surface);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--space-4) var(--space-5);
  transition: border-color 200ms ease, box-shadow 200ms ease;
}

.dir-filter-pill:focus-within {
  border-color: #0c7c84;
  box-shadow: 0 0 0 3px rgba(12, 124, 132, 0.1);
}

.dir-filter-pill-label {
  display: block;
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: 500;
  color: var(--color-text);
  margin-bottom: var(--space-2);
  letter-spacing: -0.01em;
}

.dir-filter-pill-select {
  width: 100%;
  padding: var(--space-2) 0;
  background: transparent;
  border: none;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  outline: none;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%230c7c84' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0 center;
  padding-right: var(--space-6);
  font-weight: 500;
}

.dir-secondary-filters {
  display: flex;
  flex-direction: column;
}

.dir-more-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
  padding: var(--space-2) 0;
  cursor: pointer;
  transition: color 150ms ease;
  align-self: flex-start;
  background: none;
  border: none;
}

.dir-more-btn:hover {
  color: var(--color-text);
}

.dir-more-btn.open {
  color: #0c7c84;
}

.dir-more-body {
  display: none;
  padding-top: var(--space-4);
}

.dir-more-body.open {
  display: block;
}

.dir-more-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-3);
}

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

/* =====================================================
   DETAIL-HERO — Dark header for detail pages
   ===================================================== */

.detail-hero {
  position: relative;
  padding-block: clamp(48px, 6vw, 80px);
  padding-top: calc(clamp(48px, 6vw, 80px) + var(--nav-height));
  background: linear-gradient(135deg, #1a1814 0%, #2a2620 50%, #1a1814 100%);
  color: #faf8f4;
  overflow: hidden;
  margin-bottom: 0;
}
.detail-hero + .section {
  padding-top: clamp(32px, 4vw, 48px);
}

.detail-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url('./images/hero-lifestyle.webp');
  background-size: cover;
  background-position: center;
  opacity: 0.22;
}
/* Custom hero image — overrides default ::before */
.detail-hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.28;
  z-index: 0;
}
.detail-hero-bg + .container { position: relative; z-index: 1; }
.detail-hero:has(.detail-hero-bg)::before { display: none; }

.detail-hero .container {
  position: relative;
  z-index: 1;
}

.detail-hero-inner {
  display: flex;
  align-items: flex-start;
  gap: var(--space-6);
  flex-wrap: wrap;
  margin-top: var(--space-4);
}

.detail-hero-logo {
  height: 80px;
  width: auto;
  max-width: 200px;
  border-radius: var(--radius-md);
  object-fit: contain;
  background: rgba(255,255,255,0.95);
  padding: var(--space-2);
  flex-shrink: 0;
}

.detail-hero-photo {
  width: 100px;
  height: 100px;
  border-radius: var(--radius-md);
  object-fit: cover;
  border: 2px solid rgba(255,255,255,0.2);
  flex-shrink: 0;
}

.detail-hero-info {
  flex: 1;
  min-width: 0;
}

.detail-hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
}

.badge--light {
  background: rgba(255,255,255,0.12);
  color: rgba(250,248,244,0.85);
  border: 1px solid rgba(255,255,255,0.2);
}

.badge--trusted-light {
  background: rgba(12, 124, 132, 0.3);
  color: rgba(180, 230, 234, 0.95);
  border: 1px solid rgba(12, 124, 132, 0.4);
}

.detail-hero-name {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 1.2rem + 1.5vw, 3rem);
  color: #faf8f4;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: var(--space-2);
  font-weight: 400;
}


/* Subheading — moved from hero to body */
.detail-subheading {
  margin-bottom: var(--space-6);
  padding-bottom: var(--space-5);
  border-bottom: 1px solid var(--color-divider);
}
.detail-subheading-specialty {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 1rem + 0.6vw, 1.6rem);
  color: var(--color-text);
  font-weight: 500;
  font-style: italic;
  margin: 0 0 var(--space-3) 0;
}
.detail-subheading-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}
.detail-subheading-meta span {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
}

.detail-card--actions {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--space-5);
}

.btn--lg {
  padding: var(--space-4) var(--space-6);
  font-size: var(--text-base);
}

/* =====================================================
   DETAIL PAGE
   ===================================================== */

.detail-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-8);
}
@media (min-width: 960px) {
  .detail-layout {
    grid-template-columns: 2fr 1fr;
    align-items: start;
  }
}

.detail-main {}

.detail-sidebar {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.detail-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
}

.detail-card-title {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: var(--space-4);
}

.detail-rating-row {
  margin-bottom: var(--space-5);
}

.detail-google-rating {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  background: var(--color-surface-offset);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
}

.detail-rating-number {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 400;
  color: var(--color-text);
  letter-spacing: -0.02em;
}

.detail-description {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  line-height: 1.7;
  margin-bottom: var(--space-6);
  max-width: none;
}

.detail-section-title {
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: var(--space-3);
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-6);
}

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

.info-row {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  font-size: var(--text-sm);
}

.info-icon {
  color: var(--color-text-faint);
  flex-shrink: 0;
  margin-top: 2px;
}

.info-label {
  font-weight: 600;
  color: var(--color-text-muted);
  min-width: 100px;
  flex-shrink: 0;
}

.info-value {
  color: var(--color-text);
  flex: 1;
}

.info-value a {
  color: var(--color-primary);
  text-decoration: none;
}
.info-value a:hover { text-decoration: underline; }

/* Key facts grid */
.key-facts {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-3);
  margin-bottom: var(--space-8);
}
@media (min-width: 640px) {
  .key-facts { grid-template-columns: repeat(3, 1fr); }
}

.key-fact {
  background: var(--color-surface-offset);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  border: 1px solid var(--color-border);
}

.key-fact-label {
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-faint);
  margin-bottom: var(--space-1);
}

.key-fact-value {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  color: var(--color-text);
  letter-spacing: -0.01em;
  line-height: 1.2;
}

/* =====================================================
   DEVELOPER DETAIL — Premium editorial layout
   ===================================================== */

/* --- Cinematic hero banner --- */
.dev-hero {
  position: relative;
  width: 100%;
  min-height: clamp(420px, 55vw, 680px);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: #1a1814;
  /* Content is bottom-aligned; when it grows taller than min-height it climbs
     toward the top — reserve the fixed-header band so it can never sit under it. */
  padding-top: var(--nav-height);
}

.dev-hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center 30%;
  transform: scale(1.04);
  transition: transform 8s cubic-bezier(0.25, 1, 0.5, 1);
}
/* The default lifestyle image loads ONLY via the --default modifier (no hero
   photo, or the hero <img> errored out) so it never competes with the LCP. */
.dev-hero-bg--default {
  background-image: url('./images/hero-lifestyle.webp');
}
.dev-hero:hover .dev-hero-bg {
  transform: scale(1);
}

.dev-hero-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(26,24,20,0.08) 0%,
    rgba(26,24,20,0.18) 40%,
    rgba(26,24,20,0.72) 72%,
    rgba(26,24,20,0.92) 100%
  );
  pointer-events: none;
}

.dev-hero-container {
  position: relative;
  z-index: 2;
  padding-bottom: clamp(var(--space-10), 5vw, var(--space-16));
  padding-top: var(--space-16);
}

.dev-hero-content {
  max-width: 780px;
}

.dev-hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
}

.dev-hero-badge {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(247,245,240,0.9);
  border: 1px solid rgba(247,245,240,0.35);
  padding: 4px 10px;
  border-radius: 2px;
}

.dev-hero-name {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  font-weight: 300;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: #faf8f4;
  margin: 0 0 var(--space-3);
}

.dev-hero-specialty {
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 2vw, 1.5rem);
  font-style: italic;
  font-weight: 300;
  color: rgba(247,245,240,0.72);
  margin: 0 0 var(--space-5);
  letter-spacing: 0.01em;
}

.dev-hero-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-1);
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(247,245,240,0.55);
}

.dev-hero-meta-dot {
  color: rgba(247,245,240,0.3);
}

/* --- Body layout --- */
.dev-body {
  background: var(--color-bg);
  padding-block: clamp(var(--space-12), 6vw, var(--space-20));
}

.dev-layout {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-areas:
    "main"
    "sidebar"
    "portfolio";
  gap: var(--space-10);
}

@media (min-width: 1024px) {
  .dev-layout {
    grid-template-columns: 65fr 35fr;
    grid-template-areas:
      "main    sidebar"
      "portfolio sidebar";
    gap: clamp(var(--space-10), 4vw, var(--space-16));
    align-items: start;
  }
}

.dev-main       { grid-area: main; }
.dev-sidebar    { grid-area: sidebar; }
.dev-portfolio-section { grid-area: portfolio; }

@media (min-width: 1024px) {
  .dev-sidebar {
    position: sticky;
    top: calc(var(--nav-height, 72px) + var(--space-6));
    align-self: start;
  }
}

/* --- Section titles --- */
.dev-section-title {
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 2.2vw, 1.75rem);
  font-weight: 300;
  letter-spacing: -0.01em;
  color: var(--color-text);
  margin: 0 0 var(--space-5);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--color-border);
}

/* --- Hero photo (sized <img> rendition; .dev-hero-bg default stays beneath
       as the no-photo/error fallback layer) --- */
.dev-hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  transform: scale(1.04);
  transition: transform 8s cubic-bezier(0.25, 1, 0.5, 1);
}
.dev-hero:hover .dev-hero-img { transform: scale(1); }

.dev-hero-rating {
  color: rgba(247,245,240,0.72);
  white-space: nowrap;
}
.dev-hero-rating::before {
  content: '·';
  color: rgba(247,245,240,0.3);
  margin-right: var(--space-2);
}

/* --- About section (adaptive: lede + optional article) --- */
.dev-about {
  margin-bottom: var(--space-10);
}

.dev-lede {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(1.15rem, 1rem + 0.8vw, 1.5rem);
  line-height: 1.6;
  color: var(--color-text-muted);
  max-width: 58ch;
  margin: 0 0 var(--space-6);
}

.dev-description {
  font-size: var(--text-base);
  line-height: 1.85;
  color: var(--color-text-muted);
}

.dev-description p {
  margin: 0 0 var(--space-4);
}

/* --- Photo essay gallery (their own DB photos, sized renditions) --- */
.dev-gallery-section {
  margin-bottom: var(--space-10);
}
.dev-gallery-label {
  display: block;
  font-family: var(--font-body);
  font-size: 0.63rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-text-faint);
  margin-bottom: var(--space-3);
}
.dev-gallery {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: var(--space-3);
}
.dev-gallery[data-count="2"] { grid-template-columns: 3fr 2fr; }
.dev-gallery[data-count="1"] { grid-template-columns: 1fr; }
/* 4–6 photos (extra image_url_5/6 slots, 2026-07-24): wrap into tidy rows —
   4 = 2×2, 5 = two large over three, 6 = 3×2. */
.dev-gallery[data-count="4"] { grid-template-columns: repeat(2, 1fr); }
.dev-gallery[data-count="5"] { grid-template-columns: repeat(6, 1fr); }
.dev-gallery[data-count="5"] .dev-gallery-item:nth-child(1),
.dev-gallery[data-count="5"] .dev-gallery-item:nth-child(2) { grid-column: span 3; }
.dev-gallery[data-count="5"] .dev-gallery-item:nth-child(n+3) { grid-column: span 2; }
.dev-gallery[data-count="6"] { grid-template-columns: repeat(3, 1fr); }
.dev-gallery-item {
  margin: 0;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--color-surface-offset);
  /* Now a <button> (click to enlarge) — normalise + hint the zoom affordance. */
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  cursor: zoom-in;
}
.dev-gallery-item:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
}
.dev-gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s cubic-bezier(0.25, 1, 0.5, 1);
}
.dev-gallery-item:hover img { transform: scale(1.03); }
.dev-gallery-credit {
  font-family: var(--font-body);
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-text-faint);
  margin: var(--space-3) 0 0;
}
@media (max-width: 767px) {
  .dev-gallery,
  .dev-gallery[data-count="2"],
  .dev-gallery[data-count="4"],
  .dev-gallery[data-count="5"],
  .dev-gallery[data-count="6"] { grid-template-columns: 1fr; }
  .dev-gallery[data-count="5"] .dev-gallery-item { grid-column: auto; }
}

/* ── Gallery lightbox (click-to-enlarge, 2026-07-24) ───────────────────────────
   Full-screen dark overlay appended to <body>; media viewer, so it stays dark in
   both themes. Fade/zoom via CSS animation (not rAF — the in-app browser pane
   never fires rAF, and this must work there too). */
.dev-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9990;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(16px, 4vw, 48px);
  background: rgba(12, 10, 8, 0.86);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  cursor: zoom-out;
  animation: devLbFade 0.25s ease both;
}
@keyframes devLbFade { from { opacity: 0; } to { opacity: 1; } }
.dev-lightbox-img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: var(--radius-md);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.55);
  cursor: default;
  animation: devLbZoom 0.28s cubic-bezier(0.25, 1, 0.5, 1) both;
}
@keyframes devLbZoom { from { transform: scale(0.94); opacity: 0.4; } to { transform: scale(1); opacity: 1; } }
.dev-lightbox-close {
  position: absolute;
  top: clamp(12px, 3vw, 28px);
  right: clamp(12px, 3vw, 28px);
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  line-height: 1;
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}
.dev-lightbox-close:hover { background: rgba(255, 255, 255, 0.28); transform: scale(1.05); }
.dev-lightbox-close:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
body.dev-lightbox-open { overflow: hidden; }
@media (prefers-reduced-motion: reduce) {
  .dev-lightbox, .dev-lightbox-img { animation: none; }
}

/* --- "At a glance" fact sheet (hairline definition rows) --- */
.dev-facts {
  margin-bottom: var(--space-10);
}
.dev-fact-row {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: var(--space-4);
  padding-block: var(--space-4);
  border-top: 1px solid var(--color-divider);
}
.dev-fact-row:last-child { border-bottom: 1px solid var(--color-divider); }
.dev-fact-label {
  font-family: var(--font-body);
  font-size: 0.63rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-text-faint);
  align-self: center;
}
.dev-fact-value {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 400;
  color: var(--color-text);
  line-height: 1.5;
}
.dev-fact-value a {
  color: var(--color-text-muted);
  text-decoration: none;
  transition: color 0.25s cubic-bezier(0.25, 1, 0.5, 1);
}
.dev-fact-value a:hover { color: var(--color-text); }
.dev-fact-extra { color: var(--color-text-muted); }
@media (max-width: 479px) {
  .dev-fact-row { grid-template-columns: 1fr; gap: var(--space-1); }
}

/* --- Masterplan & Availability concierge band (the reframed empty state) --- */
.dev-cta-band {
  background: var(--color-surface-offset);
  border-radius: var(--radius-lg);
  padding: clamp(var(--space-8), 4vw, var(--space-12));
}
.dev-cta-band-desc {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 300;
  line-height: 1.55;
  color: var(--color-text);
  max-width: 34ch;
  margin: 0 0 var(--space-6);
}
.dev-cta-band-actions {
  display: flex;
  align-items: center;
  gap: var(--space-5);
  flex-wrap: wrap;
}
.dev-cta-secondary {
  font-family: var(--font-body);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.25s ease, border-color 0.25s ease;
}
.dev-cta-secondary:hover { color: var(--color-text); border-bottom-color: var(--color-text); }

/* --- WhatsApp microcopy --- */
.dev-wa-note {
  font-size: 0.65rem;
  letter-spacing: 0.04em;
  color: var(--color-text-faint);
  text-align: center;
  margin: calc(var(--space-2) * -1) 0 0;
}

/* --- Related listings (independent site content, disclaimed) --- */
.dev-related {
  margin-top: clamp(var(--space-16), 9vw, var(--space-24));
}
.dev-related-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--space-4);
  flex-wrap: wrap;
}
.dev-related-title {
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 2.2vw, 1.75rem);
  font-weight: 300;
  letter-spacing: -0.01em;
  color: var(--color-text);
  margin: 0;
}
.dev-related-viewall {
  font-family: var(--font-body);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-text-faint);
  text-decoration: none;
  transition: color 0.25s ease;
}
.dev-related-viewall:hover { color: var(--color-text); }
.dev-related-note {
  font-size: var(--text-xs);
  font-style: italic;
  color: var(--color-text-faint);
  margin: var(--space-2) 0 var(--space-6);
}

.card-grid--3col {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
}
@media (min-width: 900px) {
  .card-grid--3col { grid-template-columns: repeat(3, 1fr); }
}

/* --- Investor tools row (shared: directory + detail) --- */
.dev-tools-row {
  display: flex;
  align-items: baseline;
  gap: var(--space-6);
  flex-wrap: wrap;
  border-top: 1px solid var(--color-divider);
  padding-top: var(--space-8);
  margin-top: clamp(var(--space-16), 9vw, var(--space-24));
}
.dev-tools-label {
  font-family: var(--font-body);
  font-size: 0.63rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-text-faint);
  margin-right: var(--space-2);
}
.dev-tools-row a {
  font-family: var(--font-body);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-accent);
  text-decoration: none;
  transition: color 0.25s ease;
}
.dev-tools-row a:hover { color: var(--color-accent-hover); }

.dev-portfolio-cta-link {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-text);
  text-decoration: none;
  border: 1px solid var(--color-text);
  padding: 12px 28px;
  border-radius: 2px;
  transition: background 0.3s cubic-bezier(0.25, 1, 0.5, 1),
              color 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}

.dev-portfolio-cta-link:hover {
  background: var(--color-text);
  color: var(--color-bg);
}

/* --- Sticky contact card --- */
.dev-contact-card {
  background: var(--color-bg);
  border: 1px solid rgba(26,24,20,0.06);
  box-shadow:
    0 2px 8px rgba(26,24,20,0.04),
    0 12px 40px rgba(26,24,20,0.06);
  padding: var(--space-8);
}

.dev-contact-card-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 300;
  letter-spacing: 0.01em;
  color: var(--color-text);
  margin: 0 0 var(--space-6);
}

.dev-contact-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin-bottom: var(--space-5);
}

.dev-contact-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.dev-contact-icon {
  flex-shrink: 0;
  color: var(--color-text-faint);
}

.dev-contact-link {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

.dev-contact-link:hover {
  color: var(--color-text);
}

/* --- Social icons (monochrome, frameless) --- */
.dev-social-row {
  display: flex;
  gap: var(--space-4);
  margin-top: var(--space-4);
  padding-top: var(--space-4);
  border-top: 1px solid var(--color-border);
}

.dev-social-link {
  display: flex;
  align-items: center;
  color: var(--color-text-faint);
  text-decoration: none;
  transition: color 0.2s cubic-bezier(0.25, 1, 0.5, 1);
}

.dev-social-link:hover {
  color: var(--color-text);
}

.dev-social-link svg {
  width: 13px;
  height: 13px;
}

/* --- WhatsApp CTA button (deep charcoal, NOT green) --- */
.dev-wa-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  width: 100%;
  background: var(--color-text);
  color: var(--color-bg);
  text-decoration: none;
  padding: 14px var(--space-5);
  border-radius: 2px;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: var(--space-4);
  transition: opacity 0.25s cubic-bezier(0.25, 1, 0.5, 1),
              transform 0.25s cubic-bezier(0.25, 1, 0.5, 1);
}

.dev-wa-btn:hover {
  opacity: 0.85;
  transform: translateY(-1px);
}

.dev-wa-btn svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* --- Favourites row --- */
.dev-fav-row {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  justify-content: center;
  padding-top: var(--space-3);
}

.dev-fav-label {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-faint);
}

/* --- Mobile adjustments --- */
@media (max-width: 767px) {
  .dev-hero {
    min-height: clamp(320px, 70vw, 480px);
  }

  .dev-hero-name {
    font-size: clamp(2rem, 8vw, 2.8rem);
  }

  .dev-contact-card {
    padding: var(--space-6);
  }

  .dev-cta-band {
    padding: var(--space-6) var(--space-5);
  }
}

/* Dark-mode overrides */
@media (prefers-color-scheme: dark) {
  .dev-hero-bg {
    filter: brightness(0.85);
  }

  .dev-contact-card {
    border-color: rgba(247,245,240,0.08);
    box-shadow:
      0 2px 8px rgba(0,0,0,0.12),
      0 12px 40px rgba(0,0,0,0.2);
  }

  .dev-portfolio-cta-link {
    border-color: rgba(247,245,240,0.6);
  }

  .dev-portfolio-cta-link:hover {
    background: rgba(247,245,240,0.9);
    color: var(--color-text);
  }

  .dev-social-link {
    color: rgba(247,245,240,0.45);
  }

  .dev-social-link:hover {
    color: rgba(247,245,240,0.9);
  }
}


/* =====================================================
   GUIDES — editorial listing (2026-08-09, brand spec:
   docs/brand-colors.md — eyebrows in accent, serif
   display titles, sand-wash feature panel, tokens only)
   ===================================================== */

.guides-feature {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  background: var(--color-secondary-highlight);
  border-radius: var(--radius-xl);
  overflow: hidden;
  cursor: pointer;
  margin-bottom: var(--space-8);
  transition: box-shadow var(--transition-interactive);
}
.guides-feature:hover { box-shadow: var(--shadow-md); }
.guides-feature-media {
  aspect-ratio: 4 / 3;
  min-height: 100%;
  overflow: hidden;
}
.guides-feature-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}
.guides-feature:hover .guides-feature-media img { transform: scale(1.03); }
.guides-feature-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: var(--space-3);
  padding: clamp(24px, 4vw, 48px);
}
.guides-feature-eyebrow {
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--color-accent);
}
.guides-feature-title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 2.8vw, 2.3rem);
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.15;
}
.guides-feature-title a { color: var(--color-text); text-decoration: none; }
.guides-feature-excerpt {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.guides-feature-meta {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  margin-top: var(--space-2);
}
.guides-feature-cta {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  font-weight: 600;
  color: var(--color-accent);
}
@media (max-width: 800px) {
  .guides-feature { grid-template-columns: 1fr; }
  .guides-feature-media { aspect-ratio: 16 / 9; min-height: 0; }
}

.guides-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: var(--space-5);
}

.guide-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: 0;
  overflow: hidden;
  text-decoration: none;
  color: var(--color-text);
  display: flex;
  flex-direction: column;
  transition: border-color var(--transition-interactive), box-shadow var(--transition-interactive);
  cursor: pointer;
}
.guide-card:hover {
  border-color: color-mix(in oklab, var(--color-primary) 40%, var(--color-border));
  box-shadow: var(--shadow-md);
}
.guide-card-media {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--color-surface-offset);
}
.guide-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}
.guide-card:hover .guide-card-media img { transform: scale(1.04); }
.guide-card-body {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding: var(--space-5);
  flex: 1;
}

.guide-category {
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-accent);
}

.guide-title {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 500;
  color: var(--color-text);
  letter-spacing: -0.01em;
  line-height: 1.25;
}
.guide-title a { color: inherit; text-decoration: none; }

.guide-excerpt {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  max-width: none;
}

.guide-meta {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  margin-top: auto;
  padding-top: var(--space-3);
  border-top: 1px solid var(--color-divider);
}
.guide-read {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  font-weight: 600;
  color: var(--color-accent);
}

/* Guide article */
.guide-article {
  max-width: 72ch;
}

.guide-article h2 {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  color: var(--color-text);
  letter-spacing: -0.02em;
  margin-top: var(--space-8);
  margin-bottom: var(--space-3);
}

.guide-article h3 {
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--color-text);
  margin-top: var(--space-6);
  margin-bottom: var(--space-3);
}

.guide-article p {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  line-height: 1.7;
  margin-bottom: var(--space-4);
  max-width: none;
}

.guide-article ul, .guide-article ol {
  padding-left: var(--space-5);
  margin-bottom: var(--space-4);
}

.guide-article li {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  line-height: 1.65;
  margin-bottom: var(--space-2);
  max-width: none;
}

.guide-article strong {
  color: var(--color-text);
  font-weight: 600;
}

.guide-callout {
  background: var(--color-primary-highlight);
  border-left: 3px solid var(--color-primary);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: var(--space-4) var(--space-5);
  margin-bottom: var(--space-4);
}

.guide-callout p {
  color: var(--color-primary);
  margin-bottom: 0;
}

/* =====================================================
   HELP CTA BOX — Interstitial dark version
   ===================================================== */

.help-cta {
  background: #1e1c18;
  border: 1px solid rgba(250, 248, 244, 0.08);
  border-radius: var(--radius-xl);
  padding: clamp(var(--space-10), 5vw, var(--space-16)) var(--space-8);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-5);
}

.help-cta .help-cta-title {
  color: #faf8f4;
}

.help-cta .help-cta-desc {
  color: rgba(212, 209, 202, 0.65);
}

.help-cta-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-xl);
  background: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}

.help-cta-title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  color: var(--color-text);
  letter-spacing: -0.02em;
}

.help-cta-desc {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  max-width: 44ch;
  margin-inline: auto;
  line-height: 1.55;
  max-width: 44ch;
}

/* =====================================================
   EMPTY STATE
   ===================================================== */

.empty-state {
  text-align: center;
  padding: clamp(var(--space-12), 8vw, var(--space-24));
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-4);
}

.empty-state-icon {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-xl);
  background: var(--color-surface-offset);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-faint);
}

.empty-state-title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  color: var(--color-text);
}

.empty-state-desc {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  max-width: 36ch;
  margin-inline: auto;
}

/* =====================================================
   FOOTER — Dark charcoal, warm and generous
   ===================================================== */

.site-footer {
  background: #161410;
  border-top: none;
  padding-block: clamp(var(--space-16), 8vw, var(--space-24));
  margin-top: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(var(--space-10), 4vw, var(--space-16));
}
@media (min-width: 640px) {
  .footer-grid { grid-template-columns: 2fr 1fr 1fr; }
}

.footer-brand-name {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  color: #faf8f4;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-4);
  font-weight: 400;
}

.footer-brand-desc {
  font-size: var(--text-sm);
  color: rgba(212, 209, 202, 0.55);
  line-height: 1.7;
  max-width: 38ch;
  margin-bottom: var(--space-6);
}

.footer-heading {
  font-size: var(--text-xs);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: rgba(212, 209, 202, 0.35);
  margin-bottom: var(--space-5);
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.footer-links a {
  font-size: var(--text-sm);
  color: rgba(212, 209, 202, 0.55);
  text-decoration: none;
  transition: color var(--transition-interactive);
}
.footer-links a:hover { color: rgba(212, 209, 202, 0.9); }

.footer-bottom {
  margin-top: clamp(var(--space-10), 4vw, var(--space-16));
  padding-top: var(--space-6);
  border-top: 1px solid rgba(255,255,255,0.07);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-3);
}

.footer-copyright {
  font-size: var(--text-xs);
  color: rgba(212, 209, 202, 0.3);
  letter-spacing: 0.02em;
}

/* Footer theme toggle — visible on dark background */
.site-footer .btn-icon {
  color: rgba(212, 209, 202, 0.4);
}
.site-footer .btn-icon:hover {
  color: rgba(212, 209, 202, 0.8);
  background: rgba(255,255,255,0.06);
}

/* =====================================================
   FEATURED PARTNER BANNER
   ===================================================== */


/* =====================================================
   PAGE LOADING SPINNER
   ===================================================== */

.page-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
}
.page-loading-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--color-border);
  border-top-color: var(--color-accent, #0c7c84);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* =====================================================
   PAGE TRANSITIONS
   ===================================================== */

.page-view {
  opacity: 0;
  animation: page-reveal 320ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes page-reveal {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Card stagger animation */
.card-animate {
  opacity: 0;
  animation: card-in 380ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes card-in {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Section fade-in on scroll */
.section-animate {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 600ms cubic-bezier(0.16, 1, 0.3, 1), transform 600ms cubic-bezier(0.16, 1, 0.3, 1);
}

.section-animate.visible {
  opacity: 1;
  transform: translateY(0);
}

/* =====================================================
   RESULTS COUNT
   ===================================================== */

.results-count {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-bottom: var(--space-4);
}

.results-count strong {
  color: var(--color-text);
  font-variant-numeric: tabular-nums;
}

/* =====================================================
   IMAGE PLACEHOLDER
   ===================================================== */


/* =====================================================
   UTILITY
   ===================================================== */


.text-muted { color: var(--color-text-muted); }



.flex { display: flex; }

.mb-3 { margin-bottom: var(--space-3); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }

/* =====================================================
   USER ACCOUNT COMPONENTS
   ===================================================== */

/* Auth Modal */
.auth-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  padding: var(--space-4);
  opacity: 0; pointer-events: none;
  transition: opacity 0.2s ease;
}
.auth-overlay.visible { opacity: 1; pointer-events: auto; }

.auth-modal {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  width: 100%; max-width: 420px;
  box-shadow: 0 12px 40px rgba(0,0,0,.15);
  position: relative;
}

.auth-modal-close {
  position: absolute; top: var(--space-4); right: var(--space-4);
  background: none; border: none; cursor: pointer;
  color: var(--color-text-muted); padding: var(--space-1);
}
.auth-modal-close:hover { color: var(--color-text); }

.auth-modal h2 {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  margin-bottom: var(--space-2);
  color: var(--color-text);
}

.auth-modal .auth-subtitle {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-bottom: var(--space-6);
}

/* Social login: Google renders its own official button into .auth-gbtn; the
   Facebook button is ours, styled to sit consistently beside it. */
.auth-social-btns {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.auth-gbtn {
  display: flex;
  justify-content: center;
  min-height: 40px;
}
.auth-gbtn > div { width: 100%; }
.auth-social-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  width: 100%;
  min-height: 40px;
  padding: 0 var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  color: var(--color-text);
  font-size: var(--text-sm);
  font-weight: 600;
  font-family: var(--font-body);
  cursor: pointer;
  transition: border-color .18s ease, background .18s ease, box-shadow .18s ease, transform .08s ease;
}
.auth-social-btn svg { flex-shrink: 0; width: 18px; height: 18px; }
.auth-social-btn:hover {
  border-color: var(--color-primary);
  background: rgba(0,0,0,.02);
  box-shadow: 0 2px 10px rgba(0,0,0,.06);
}
.auth-social-btn:active { transform: translateY(1px); }
.auth-social-btn:disabled { opacity: .55; cursor: not-allowed; box-shadow: none; }

.auth-divider {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin: var(--space-5) 0;
  color: var(--color-text-muted);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: .08em;
}
.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--color-border);
}

.auth-form { display: flex; flex-direction: column; gap: var(--space-4); }

.auth-field {
  display: flex; flex-direction: column; gap: var(--space-1);
}

.auth-field label {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.auth-field input {
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-family: var(--font-body);
  background: var(--color-surface);
  color: var(--color-text);
  transition: border-color 0.18s ease;
}
.auth-field input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 2px rgba(12,124,132,.15);
}

.auth-submit {
  padding: var(--space-3) var(--space-6);
  background: var(--color-primary);
  color: #fff;
  border: none; border-radius: var(--radius-md);
  font-size: var(--text-sm); font-weight: 600;
  font-family: var(--font-body);
  cursor: pointer;
  transition: background 0.18s ease;
}
.auth-submit:hover { background: var(--color-primary-dark, #0a6a70); }
.auth-submit:disabled { opacity: .6; cursor: not-allowed; }

.auth-error {
  background: #fee2e2; color: #dc2626;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
  font-size: var(--text-xs);
  display: none;
}
.auth-error.visible { display: block; }

.auth-success {
  background: #dcfce7; color: #16a34a;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
  font-size: var(--text-xs);
  display: none;
}
.auth-success.visible { display: block; }

.auth-switch {
  text-align: center;
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-top: var(--space-4);
}
.auth-switch button {
  background: none; border: none;
  color: var(--color-primary);
  font-weight: 600; cursor: pointer;
  font-size: var(--text-xs);
  font-family: var(--font-body);
}
.auth-switch button:hover { text-decoration: underline; }

/* User Menu (header) */
.user-menu-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.user-avatar-btn {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--color-primary);
  color: #fff;
  border: none; cursor: pointer;
  font-size: var(--text-xs);
  font-weight: 700;
  font-family: var(--font-body);
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.18s ease;
}
.user-avatar-btn:hover { transform: scale(1.05); }

.user-dropdown {
  position: absolute;
  top: calc(100% + var(--space-2));
  right: 0;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: 0 12px 32px rgba(30, 27, 22, 0.10);
  min-width: 230px;
  padding-bottom: var(--space-2);
  z-index: 100;
  opacity: 0; pointer-events: none;
  transform: translateY(-4px);
  transition: opacity 0.4s cubic-bezier(0.25, 1, 0.5, 1), transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}
.user-dropdown.open { opacity: 1; pointer-events: auto; transform: translateY(0); }

.user-dropdown-header {
  padding: var(--space-3) var(--space-4);
  margin-bottom: var(--space-2);
  border-bottom: 1px solid var(--color-border);
}
.user-dropdown-name {
  font-weight: 600;
  font-size: var(--text-sm);
  color: var(--color-text);
}
.user-dropdown-email {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

/* Flat editorial menu items — deliberately NOT the header pill style; these
   sit on the light dropdown surface on every page (incl. hero pages). */
.user-dropdown-item {
  display: block; width: 100%;
  padding: var(--space-2) var(--space-4);
  background: none; border: none;
  text-align: left;
  font-size: var(--text-sm);
  font-family: var(--font-body);
  color: var(--color-text);
  cursor: pointer;
  transition: background 0.12s ease;
}
.user-dropdown-item:hover { background: var(--color-surface-offset); }
.user-dropdown-item--danger { color: var(--color-coral); }
.user-dropdown-divider {
  height: 1px;
  margin: var(--space-2) 0;
  background: var(--color-border);
}

/* Favorite button */
.fav-btn {
  background: none; border: none; cursor: pointer;
  padding: var(--space-1);
  color: var(--color-text-muted);
  transition: color 0.18s ease, transform 0.18s ease;
  display: flex; align-items: center;
}
.fav-btn:hover { color: #ef4444; transform: scale(1.15); }
.fav-btn.favorited { color: #ef4444; }
.fav-btn svg { width: 18px; height: 18px; }

/* Heart overlaid on link-cards (listings, agents, jobs, marketplace) — the
   wrapper's inline handler cancels the card's own navigation (ADR 0017). */
.card-fav-overlay {
  position: absolute;
  top: var(--space-2);
  right: var(--space-2);
  z-index: 5;
}
.card-fav-overlay--br { top: auto; bottom: var(--space-2); }
.card-fav-overlay .fav-btn {
  width: 34px; height: 34px;
  justify-content: center;
  background: rgba(250, 248, 244, 0.92);
  border: 1px solid var(--color-border);
  border-radius: 50%;
  padding: 0;
  backdrop-filter: blur(2px);
}
/* ensure the overlay has a positioned ancestor on every card type */
.listing-card-image, .agent-card, .jb-card, .mk-card { position: relative; }

/* ---- Agent trust marks (scam protection, ADR 0017 addendum) ----
   Native agents: gold "Verified agent" (KTP) or a clear coral "Unverified
   agent". Portal/scraped agents show earned reputation only. */
.agent-trust {
  display: inline-block;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: var(--radius-full);
  border: 1px solid var(--color-border);
  color: var(--color-text-muted);
  white-space: nowrap;
  vertical-align: middle;
}
.agent-trust--verified {
  color: #8a6d1d;
  border-color: rgba(138, 109, 29, 0.35);
  background: rgba(216, 198, 168, 0.18);
}
.agent-trust--unverified {
  color: var(--color-coral);
  border-color: var(--color-coral);
  background: var(--color-coral-highlight);
}
.agent-trust--rep { background: transparent; }
.listing-card-trust { margin-top: var(--space-2); }
.agent-trust-callout {
  margin-top: var(--space-3);
  padding: 10px 12px;
  font-size: var(--text-xs);
  line-height: 1.55;
  border: 1px solid var(--color-coral);
  border-left-width: 3px;
  background: var(--color-coral-highlight);
  color: var(--color-text);
  border-radius: var(--radius-sm);
  max-width: 60ch;
}
/* On the dark detail hero (agent pages) */
.badge--unverified-light {
  background: rgba(212, 96, 74, 0.25);
  color: #ffd9d0;
  border: 1px solid rgba(255, 217, 208, 0.5);
}

/* ---- Area multi-picker (Region → Cluster → Area coverage; agent signup) ---- */
.field-hint {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  line-height: 1.5;
  margin: 2px 0 8px;
  max-width: 62ch;
}
.area-picker {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  max-height: 340px;
  overflow-y: auto;
}
.area-picker-region { border-bottom: 1px solid var(--color-divider); }
.area-picker-region:last-child { border-bottom: none; }
.area-picker-region > summary {
  cursor: pointer;
  padding: 10px 14px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-text);
  list-style: none;
  display: flex; align-items: center; justify-content: space-between;
}
.area-picker-region > summary::-webkit-details-marker { display: none; }
.area-picker-region > summary::after {
  content: '';
  width: 8px; height: 8px;
  border-right: 1.5px solid var(--color-text-muted);
  border-bottom: 1.5px solid var(--color-text-muted);
  transform: rotate(45deg);
  transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}
.area-picker-region[open] > summary::after { transform: rotate(-135deg); }
/* Rows are <label>s and may sit inside form shells whose generic
   `label`/`input` rules (.jb-form, .mk-form — display:grid labels, bordered
   full-width inputs) would clobber them: the .area-picker prefix keeps these
   selectors more specific than any host-form rule, and the checkbox reset
   undoes the text-input skin those forms paint onto every <input>. */
.area-picker .area-picker-row {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 14px;
  font-size: var(--text-sm);
  font-weight: 400;
  letter-spacing: normal;
  color: var(--color-text);
  cursor: pointer;
}
.area-picker .area-picker-row:hover { background: var(--color-surface-offset); }
.area-picker .area-picker-row input[type="checkbox"],
.area-picker .area-picker-row input[type="radio"] {
  accent-color: var(--color-primary); flex: none;
  width: auto; margin: 0; padding: 0;
  border: none; background: none; box-shadow: none;
}
.area-picker .area-picker-row input[type="checkbox"] { border-radius: 0; }
/* Single-pick tree: cluster rows are plain sub-headers, not choices. */
.area-picker .area-picker-row--head { cursor: default; }
.area-picker .area-picker-row--head:hover { background: none; }
.area-picker .area-picker-row--region { font-weight: 600; color: var(--color-primary); }
.area-picker .area-picker-row--cluster { font-weight: 600; padding-left: 26px; }
.area-picker .area-picker-row--area { padding-left: 44px; }
.area-picker .area-picker-row--loose { padding-left: 26px; }
/* Village-level Place rows nest one level deeper than their parent Area. */
.area-picker .area-picker-row--place { padding-left: 62px; color: var(--color-text-muted); }
.area-picker .area-picker-row--place:hover { color: var(--color-text); }

/* Agent signup — KTP / verification box */
.agent-ktp-box {
  border: 1px solid var(--color-border);
  border-left: 3px solid #c9a45c;
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  padding: var(--space-4);
}
.agent-ktp-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* "Serves" chips on agent pages */
.agent-serves { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: var(--space-3); }
.agent-serves-label {
  font-size: 0.66rem; font-weight: 700;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--color-text-faint);
}
.agent-serves .area-tag {
  font-size: var(--text-xs);
  padding: 3px 10px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  color: var(--color-text-muted);
  background: var(--color-surface);
}

/* Claim/Submit listing CTA */


/* Review (Google link) button */

/* Submit listing form */
.submit-form { display: flex; flex-direction: column; gap: var(--space-4); }
.submit-form .form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
}
@media (max-width: 640px) {
  .submit-form .form-row { grid-template-columns: 1fr; }
}
.submit-form label {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: var(--space-1);
  display: block;
}
.submit-form input, .submit-form select, .submit-form textarea {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-family: var(--font-body);
  background: var(--color-surface);
  color: var(--color-text);
}
.submit-form textarea { min-height: 100px; resize: vertical; }

/* Card footer layout for fav + WA buttons */
.card-footer-right {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

/* Claim CTA card in sidebar */
.claim-cta-card {
  background: var(--color-surface-raised);
  border: 1px dashed var(--color-primary);
}
.claim-cta-card .detail-card-title {
  color: var(--color-primary);
}

/* =====================================================
   LISTING CARDS
   ===================================================== */

.listings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--space-6);
}

/* listing-card-wrap / admin-card-wrap — outer containers for admin edit button support */
.listing-card-wrap,
.admin-card-wrap {
  position: relative;
  display: flex;
  flex-direction: column;
}
.admin-card-wrap:hover .admin-edit-card-btn {
  opacity: 1;
  pointer-events: auto;
}

.listing-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  flex: 1;
}

.listing-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.listing-card-image {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--color-surface-alt, #eee);
}

.listing-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease, opacity 0.3s ease;
  opacity: 0;
}
.listing-card-image img.loaded {
  opacity: 1;
}

.listing-card:hover .listing-card-image img {
  transform: scale(1.03);
}

.listing-card-noimg {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-faint);
}


.listing-card-featured {
  position: absolute;
  top: var(--space-2);
  right: var(--space-2);
  background: var(--color-accent);
  color: #fff;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.listing-card-body {
  padding: var(--space-4);
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.listing-card-price {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 1.1rem + 1vw, 1.8rem);
  color: var(--color-text);
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.1;
  margin-bottom: var(--space-1);
}


.listing-card-title {
  font-size: var(--text-base);
  font-weight: 600;
  line-height: 1.3;
  margin: 0;
}



.listing-card-source {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  color: var(--color-text-faint);
  text-transform: capitalize;
  padding-top: var(--space-1);
}
.listing-card-source svg {
  opacity: 0.6;
}


/* =====================================================
   LISTING DETAIL
   ===================================================== */

.listing-detail-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: var(--space-8);
  align-items: start;
}

@media (max-width: 768px) {
  .listing-detail-layout {
    grid-template-columns: 1fr;
  }
}

.listing-gallery {
  margin-bottom: var(--space-6);
}

.listing-gallery-main {
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: var(--color-surface-alt, #eee);
}

.listing-gallery-main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.listing-gallery-thumbs {
  display: flex;
  gap: var(--space-2);
  margin-top: var(--space-2);
  overflow-x: auto;
  padding-bottom: var(--space-2);
}

.listing-thumb {
  width: 72px;
  height: 52px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  cursor: pointer;
  border: 2px solid transparent;
  opacity: 0.6;
  transition: opacity 0.2s, border-color 0.2s;
}

.listing-thumb:hover,
.listing-thumb.active {
  opacity: 1;
  border-color: var(--color-primary);
}

.listing-detail-title {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  line-height: 1.2;
  margin-bottom: var(--space-2);
}

.listing-detail-price {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  color: var(--color-primary);
  font-weight: 600;
  margin-bottom: var(--space-4);
}


.listing-detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
}

.detail-tag {
  background: var(--color-surface-alt, rgba(0,0,0,0.05));
  padding: 4px 12px;
  border-radius: var(--radius-sm);
  font-size: var(--text-xs);
  font-weight: 500;
}

/* Premium price-position chip on listing detail (ADR 0033). Teal wash when
   the asking sits below the area median (the buyer signal); the locked
   variant carries the gold PRO pill and clicks through to Deal Radar. */
.detail-tag--price-pos {
  background: var(--color-accent-highlight);
  color: var(--color-text);
}
.detail-tag--price-pos.is-below { color: var(--color-accent); font-weight: 600; }
.detail-tag--price-pos.detail-tag--locked { cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.detail-tag--price-pos.detail-tag--locked:hover { background: var(--color-surface-dynamic); }

.listing-detail-specs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: var(--space-3);
  padding: var(--space-4);
  background: var(--color-surface-alt, rgba(0,0,0,0.02));
  border-radius: var(--radius-md);
  margin-bottom: var(--space-6);
}

.spec-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.spec-label {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.spec-value {
  font-size: var(--text-sm);
  font-weight: 600;
}

.listing-detail-desc h3,
.listing-features h3 {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  margin-bottom: var(--space-3);
}

.listing-full-desc {
  font-size: var(--text-sm);
  line-height: 1.7;
  color: var(--color-text-muted);
  margin-top: var(--space-3);
}

.listing-features {
  margin-top: var(--space-6);
}

.feature-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.feature-tag {
  background: var(--color-primary);
  color: #fff;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-size: var(--text-xs);
  font-weight: 500;
}

.listing-agent-card {
  position: sticky;
  top: calc(var(--space-4) + 64px);
}

.agent-card-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.agent-card-link:hover .agent-card-name {
  color: var(--color-primary);
}

.agent-card-name {
  font-weight: 600;
  font-size: var(--text-base);
  transition: color 0.2s;
}

.agent-card-agency {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-top: 2px;
}

/* =====================================================
   AGENT CARDS & GRID
   ===================================================== */

.agent-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: var(--space-6);
}

.agent-card {
  display: flex;
  gap: var(--space-4);
  padding: var(--space-4) !important;
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.agent-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.agent-card-avatar {
  flex-shrink: 0;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--color-surface-alt, #eee);
}

.agent-card-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.agent-avatar-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-primary);
  color: #fff;
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 600;
}

.agent-card-info {
  flex: 1;
  min-width: 0;
}

.agent-card-meta {
  display: flex;
  gap: var(--space-3);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-top: var(--space-1);
}

.agent-verified {
  color: #16a34a;
  font-weight: 600;
}

/* Earned Reputation tier badge (ADR 0008) */
.agent-rep {
  display: inline-block;
  font-size: var(--text-xs);
  font-weight: 700;
  padding: 1px 8px;
  border-radius: 10px;
  letter-spacing: 0.02em;
}
.agent-rep--established {
  color: #0c7c84;
  background: rgba(12, 124, 132, 0.12);
}
.agent-rep--top {
  color: #b45309;
  background: rgba(245, 158, 11, 0.16);
}

.agent-card-bio {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  line-height: 1.5;
  margin-top: var(--space-2);
}



/* =====================================================
   CREATE LISTING FORM
   ===================================================== */

.create-listing-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.create-listing-form .form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
}

@media (max-width: 480px) {
  .create-listing-form .form-row {
    grid-template-columns: 1fr;
  }
}

.create-listing-form .form-row-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: var(--space-4);
}

@media (max-width: 640px) {
  .create-listing-form .form-row-3 {
    grid-template-columns: 1fr;
  }
}





/* =====================================================
   PAGINATION
   ===================================================== */

.pagination {
  display: flex;
  justify-content: center;
  gap: var(--space-1);
}

.pagination-btn {
  min-width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  color: var(--color-text);
  font-size: var(--text-sm);
  cursor: pointer;
  font-family: var(--font-body);
  transition: background 0.15s, border-color 0.15s;
}

.pagination-btn:hover {
  border-color: var(--color-primary);
}

.pagination-btn.active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
}


/* =====================================================
   RAB FRONTEND STYLES
   ===================================================== */

/* RAB Hero tabs (inside dir-hero) */
.rab-hero-tabs {
  display: flex;
  gap: var(--space-2);
  margin-top: var(--space-5);
}

.rab-tab {
  padding: var(--space-2) var(--space-5);
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: 500;
  color: rgba(250,248,244,0.65);
  text-decoration: none;
  transition: all 0.2s;
  border: 1px solid rgba(250,248,244,0.2);
}

.rab-tab:hover {
  color: #faf8f4;
  background: rgba(250,248,244,0.1);
  border-color: rgba(250,248,244,0.3);
  text-decoration: none;
}

.rab-tab.active {
  color: #1a1814;
  background: #faf8f4;
  border-color: #faf8f4;
}


/* Calculator layout */
.rab-calc-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: var(--space-6);
  align-items: start;
}

@media (max-width: 900px) {
  .rab-calc-layout {
    grid-template-columns: 1fr;
  }
}

.rab-calc-main {}
.rab-calc-sidebar {
  position: sticky;
  top: 100px;
}

/* RAB card */
.rab-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  margin-bottom: var(--space-5);
}

.rab-card-title {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--color-heading);
  margin-bottom: var(--space-4);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.rab-card-title svg {
  color: var(--color-primary);
  flex-shrink: 0;
}

/* Form fields */
.rab-field {
  margin-bottom: var(--space-4);
}

.rab-label {
  display: block;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text);
  margin-bottom: var(--space-1);
}

.rab-input,
.rab-select {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-family: var(--font-body);
  background: var(--color-bg);
  color: var(--color-text);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.rab-input:focus,
.rab-select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(12, 124, 132, 0.12);
}

.rab-fields-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
}

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

/* Quality level selectors */
.rab-quality-row {
  display: flex;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}

.rab-quality-opt {
  flex: 1;
  cursor: pointer;
}

.rab-quality-opt input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.rab-quality-inner {
  display: block;
  padding: var(--space-3) var(--space-4);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-md);
  text-align: center;
  transition: all 0.2s;
}

.rab-quality-opt:hover .rab-quality-inner {
  border-color: rgba(12, 124, 132, 0.4);
}

.rab-quality-opt.selected .rab-quality-inner {
  border-color: var(--color-primary);
  background: rgba(12, 124, 132, 0.06);
}

.rab-quality-name {
  display: block;
  font-weight: 600;
  font-size: var(--text-sm);
  color: var(--color-heading);
}

.rab-quality-desc {
  display: block;
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  margin-top: 2px;
}

@media (max-width: 500px) {
  .rab-quality-row {
    flex-direction: column;
  }
}

/* Checkbox / radio labels */
.rab-check-label {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  color: var(--color-text);
  cursor: pointer;
  margin-bottom: var(--space-3);
}

.rab-radio-row {
  display: flex;
  gap: var(--space-4);
  margin-top: var(--space-1);
}

/* Submit button */
.rab-submit-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-8);
  background: var(--color-primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  font-size: var(--text-base);
  font-weight: 600;
  font-family: var(--font-body);
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}

.rab-submit-btn:hover {
  background: #0a6a71;
}

.rab-submit-btn:active {
  transform: scale(0.98);
}

.rab-submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Spinner for loading state */
.rab-spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: rab-spin 0.6s linear infinite;
}

@keyframes rab-spin {
  to { transform: rotate(360deg); }
}

/* Preset/rate sidebar */
.rab-preset-card {
  background: var(--color-surface);
}

.rab-rate-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--color-border);
  font-size: var(--text-sm);
  color: var(--color-text);
}

.rab-rate-row:last-child {
  border-bottom: none;
}

.rab-rate-row.is-active {
  background: rgba(99, 91, 255, 0.07);
  border-radius: 6px;
  padding-left: 8px;
  padding-right: 8px;
  transition: background 0.25s ease, padding 0.25s ease;
}

.rab-rate-row.is-active .rab-rate-val {
  color: var(--color-accent, #6366f1);
  transition: color 0.25s ease;
}

.rab-tier-desc {
  margin-top: var(--space-3);
  font-size: var(--text-sm);
  color: var(--color-text-faint);
  line-height: 1.65;
}

.rab-rate-val {
  font-weight: 600;
  color: var(--color-heading);
  font-variant-numeric: tabular-nums;
}

/* Editable Rate Card inputs */
.rab-rate-input {
  width: 116px;
  text-align: right;
  padding: 5px 8px;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  background: var(--color-surface, #fff);
  color: var(--color-heading);
  font-weight: 600;
  font-size: var(--text-sm);
  font-variant-numeric: tabular-nums;
  font-family: var(--font-body);
  -moz-appearance: textfield;
}
.rab-rate-input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-primary) 15%, transparent);
}
.rab-rate-editnote { margin: 10px 0 0; font-size: .72rem; color: var(--color-text-faint); line-height: 1.45; }

/* Cross-tool upsell links on the calculator result */
.rab-result-next {
  margin-top: var(--space-4);
  padding-top: var(--space-4);
  border-top: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.rab-result-next-label {
  font-size: .66rem; letter-spacing: .13em; text-transform: uppercase;
  font-weight: 600; color: var(--color-text-muted);
}
.rab-next-link {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 16px; border: 1px solid var(--color-border); border-radius: var(--radius-md);
  text-decoration: none; color: var(--color-text);
  transition: border-color .2s ease, background .2s ease;
}
.rab-next-link:hover { border-color: var(--color-secondary-active, #c9a45c); background: var(--color-surface-offset, rgba(0,0,0,0.03)); }
.rab-next-link span:first-child { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.rab-next-link strong { font-size: var(--text-sm); font-weight: 600; }
.rab-next-link small { font-size: .72rem; color: var(--color-text-muted); }
.rab-next-pro {
  flex-shrink: 0; font-size: .54rem; font-weight: 700; letter-spacing: .11em; text-transform: uppercase;
  color: #0a1322; background: linear-gradient(135deg, #e8d4a0, #c9a45c); padding: 3px 8px; border-radius: 3px;
}

/* How it works */
.rab-howto {
  list-style: none;
  padding: 0;
  counter-reset: howto;
}

.rab-howto li {
  counter-increment: howto;
  padding: 6px 0 6px 32px;
  position: relative;
  font-size: var(--text-sm);
  color: var(--color-text);
  line-height: 1.5;
}

.rab-howto li::before {
  content: counter(howto);
  position: absolute;
  left: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(12, 124, 132, 0.1);
  color: var(--color-primary);
  font-size: 11px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}

.rab-disclaimer {
  margin-top: var(--space-4);
  padding-top: var(--space-4);
  border-top: 1px solid var(--color-border);
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  line-height: 1.6;
}

/* ── Result Breakdown ── */
.rab-result-breakdown {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  margin-top: var(--space-6);
  animation: rab-fade-in 0.4s ease;
}

@keyframes rab-fade-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.rab-result-header {
  margin-bottom: var(--space-6);
}

.rab-result-title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  color: var(--color-heading);
  margin-bottom: var(--space-1);
}

.rab-result-subtitle {
  font-size: var(--text-sm);
  color: var(--color-text-faint);
}

.rab-result-grand {
  background: linear-gradient(135deg, #0c7c84, #0a6a71);
  color: #fff;
  border-radius: var(--radius-md);
  padding: var(--space-5) var(--space-6);
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-6);
}

.rab-result-grand-label {
  font-size: var(--text-sm);
  font-weight: 500;
  opacity: 0.9;
}

.rab-result-grand-val {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 3vw, 1.75rem);
  font-weight: 700;
}

.rab-result-rows {}

.rab-result-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--color-border);
  font-size: var(--text-sm);
  color: var(--color-text);
}

.rab-result-row:last-child {
  border-bottom: none;
}

.rab-result-row span:last-child {
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.rab-result-row--sub {
  font-weight: 600;
  color: var(--color-heading);
}

.rab-result-row--total {
  font-weight: 700;
  font-size: var(--text-base);
  color: var(--color-primary);
  border-top: 2px solid var(--color-primary);
  border-bottom: none;
  padding-top: var(--space-3);
  margin-top: var(--space-2);
}

.rab-result-actions {
  display: flex;
  gap: var(--space-3);
  margin-top: var(--space-6);
  flex-wrap: wrap;
}

/* ── Saved Estimates List ── */
.rab-estimate-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-5) var(--space-6);
  margin-bottom: var(--space-4);
  transition: box-shadow 0.2s;
}

.rab-estimate-card:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.06);
}

.rab-estimate-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-4);
  margin-bottom: var(--space-3);
}

@media (max-width: 600px) {
  .rab-estimate-header {
    flex-direction: column;
  }
}

.rab-estimate-name {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--color-heading);
  margin-bottom: var(--space-1);
}

.rab-estimate-meta {
  font-size: var(--text-sm);
  color: var(--color-text-faint);
}

.rab-estimate-date {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  margin-top: 2px;
}

.rab-estimate-total {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--color-primary);
  white-space: nowrap;
}

.rab-estimate-actions {
  display: flex;
  gap: var(--space-2);
}

/* ── Detail page ── */
.rab-back-link {
  display: inline-block;
  font-size: var(--text-sm);
  color: var(--color-primary);
  text-decoration: none;
  margin-bottom: var(--space-4);
}

.rab-back-link:hover {
  text-decoration: underline;
}

.rab-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-6);
}

@media (max-width: 768px) {
  .rab-detail-grid {
    grid-template-columns: 1fr;
  }
}

/* ── Empty state ── */
.rab-empty-state {
  text-align: center;
  padding: var(--space-12) var(--space-6);
}

/* ── Button variants used in RAB ── */
.btn--danger-outline {
  background: transparent;
  color: #dc2626;
  border: 1px solid #dc2626;
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-md);
  font-size: var(--text-xs);
  cursor: pointer;
  transition: all 0.15s;
}

.btn--danger-outline:hover {
  background: #dc2626;
  color: #fff;
}

.btn--sm {
  padding: var(--space-1) var(--space-3);
  font-size: var(--text-xs);
}

/* Info card */
.rab-info-card {
  background: rgba(12, 124, 132, 0.03);
  border-color: rgba(12, 124, 132, 0.15);
}

/* =====================================================
   RAB DETAILED TOOL STYLES (rdtl- prefix)
   ===================================================== */

/* Toolbar: title + action button */
.rdtl-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-5);
}

.rdtl-section-title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 600;
  color: var(--color-heading);
  margin: 0;
}

/* Project cards on the project list */
.rdtl-project-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-5) var(--space-6);
  margin-bottom: var(--space-3);
  text-decoration: none;
  color: var(--color-text);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.rdtl-project-card:hover {
  border-color: var(--color-accent);
  box-shadow: 0 4px 16px rgba(0,0,0,0.06);
  text-decoration: none;
}

.rdtl-project-name {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--color-heading);
  margin: 0 0 var(--space-1) 0;
}

.rdtl-project-meta {
  font-size: var(--text-sm);
  color: var(--color-text-faint);
  margin: 0;
}

.rdtl-project-right {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-shrink: 0;
}

/* Status badges */
.rdtl-status {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 2px 10px;
  border-radius: var(--radius-full);
}

.rdtl-status--draft {
  background: rgba(138, 133, 120, 0.12);
  color: #8a8578;
}

.rdtl-status--active {
  background: rgba(12, 124, 132, 0.12);
  color: var(--color-accent);
}

.rdtl-status--archived {
  background: rgba(212, 96, 74, 0.12);
  color: #d4604a;
}

/* Project detail header */
.rdtl-proj-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-4);
  margin-bottom: var(--space-4);
}

@media (max-width: 600px) {
  .rdtl-proj-header {
    flex-direction: column;
  }
}

.rdtl-proj-title {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 600;
  color: var(--color-heading);
  margin: 0 0 var(--space-1) 0;
}

.rdtl-proj-meta {
  font-size: var(--text-sm);
  color: var(--color-text-faint);
  margin: 0;
}

.rdtl-proj-actions {
  display: flex;
  gap: var(--space-2);
  flex-shrink: 0;
}

/* RAB version list */
.rdtl-rab-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.rdtl-rab-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-4) var(--space-5);
}

@media (max-width: 700px) {
  .rdtl-rab-card {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-3);
  }
}

.rdtl-rab-name {
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--color-heading);
  text-decoration: none;
}

.rdtl-rab-name:hover {
  color: var(--color-primary);
  text-decoration: underline;
}

.rdtl-rab-meta {
  font-size: var(--text-sm);
  color: var(--color-text-faint);
  margin: var(--space-1) 0 0 0;
}

.rdtl-rab-actions {
  display: flex;
  gap: var(--space-2);
  flex-shrink: 0;
  flex-wrap: wrap;
}

/* Editor header */
.rdtl-editor-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-4);
  margin-bottom: var(--space-5);
}

@media (max-width: 600px) {
  .rdtl-editor-header {
    flex-direction: column;
  }
}

/* Summary bar */
.rdtl-summary-bar {
  display: flex;
  gap: var(--space-3);
  flex-wrap: wrap;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-4) var(--space-5);
  margin-bottom: var(--space-5);
}

.rdtl-summary-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 100px;
}

.rdtl-summary-item--grand {
  border-left: 2px solid var(--color-primary);
  padding-left: var(--space-3);
}

.rdtl-summary-label {
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--color-text-faint);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.rdtl-summary-val {
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--color-heading);
  font-variant-numeric: tabular-nums;
}

.rdtl-summary-item--grand .rdtl-summary-val {
  color: var(--color-primary);
  font-size: var(--text-lg);
}

.rdtl-area-input {
  width: 90px;
  padding: 4px 8px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-bg);
}

.rdtl-area-input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 2px rgba(12,124,132,0.12);
}

/* Discipline tabs */
.rdtl-disc-tabs {
  display: flex;
  gap: var(--space-2);
  margin-bottom: var(--space-5);
  border-bottom: 2px solid var(--color-border);
  padding-bottom: 0;
}

.rdtl-disc-tab {
  padding: var(--space-2) var(--space-5);
  border: none;
  background: none;
  font-size: var(--text-sm);
  font-weight: 500;
  font-family: var(--font-body);
  color: var(--color-text-faint);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: color 0.2s, border-color 0.2s;
}

.rdtl-disc-tab:hover {
  color: var(--color-heading);
}

.rdtl-disc-tab.active {
  color: var(--color-primary);
  border-bottom-color: var(--color-primary);
  font-weight: 600;
}

/* Section blocks */
.rdtl-section {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-4);
  overflow: hidden;
}

.rdtl-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-3) var(--space-5);
  background: rgba(12, 124, 132, 0.04);
  border-bottom: 1px solid var(--color-border);
}

.rdtl-section-name {
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--color-heading);
  margin: 0;
}

.rdtl-section-actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.rdtl-section-total {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-primary);
  font-variant-numeric: tabular-nums;
}

/* Icon buttons */
.rdtl-btn-icon {
  background: none;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 13px;
  color: var(--color-text-faint);
  transition: all 0.15s;
}

.rdtl-btn-icon:hover {
  background: var(--color-surface-offset, #f0ede8);
  color: var(--color-heading);
  border-color: var(--color-heading);
}

.rdtl-btn-icon--danger:hover {
  background: rgba(220, 38, 38, 0.08);
  color: #dc2626;
  border-color: #dc2626;
}

/* Items table */
.rdtl-items-table-wrap {
  overflow-x: auto;
}

.rdtl-items-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
}

.rdtl-items-table th {
  text-align: left;
  font-weight: 600;
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text-faint);
  padding: var(--space-2) var(--space-3);
  border-bottom: 1px solid var(--color-border);
  white-space: nowrap;
}

.rdtl-items-table td {
  padding: var(--space-2) var(--space-3);
  border-bottom: 1px solid rgba(0,0,0,0.04);
  vertical-align: middle;
}

.rdtl-item-row:hover {
  background: rgba(12, 124, 132, 0.02);
}

.rdtl-item-name {
  min-width: 180px;
  max-width: 320px;
}

.rdtl-item-unit { white-space: nowrap; }

.rdtl-item-qty,
.rdtl-item-rate,
.rdtl-item-total {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.rdtl-item-total {
  font-weight: 600;
}

.rdtl-item-actions {
  white-space: nowrap;
  text-align: right;
}

/* Add item area */
.rdtl-add-item-area {
  padding: var(--space-3) var(--space-5);
}

/* Item form (add/edit inline) */
.rdtl-item-form {
  padding: var(--space-3) 0;
}

.rdtl-item-form-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--space-2);
}

@media (max-width: 700px) {
  .rdtl-item-form-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.rdtl-item-form-grid .rab-input,
.rdtl-item-form-grid .rab-select {
  padding: 6px 10px;
  font-size: var(--text-sm);
}

/* =====================================================
   GET QUOTES PAGE
   ===================================================== */

/* Step container */
.gq-step {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-6) var(--space-8);
  margin-bottom: var(--space-6);
}

.gq-step-header {
  display: flex;
  align-items: flex-start;
  gap: var(--space-4);
  margin-bottom: var(--space-5);
}

.gq-step-num {
  width: 32px;
  height: 32px;
  min-width: 32px;
  border-radius: 50%;
  background: var(--color-primary);
  color: #fff;
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
}

.gq-step-title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 500;
  color: var(--color-text);
  margin: 0 0 var(--space-1);
  line-height: 1.2;
}

.gq-step-desc {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin: 0;
  line-height: 1.5;
}

/* ---- Item list ---- */
.gq-items-cols {
  display: grid;
  grid-template-columns: 28px 2fr 110px 1.5fr 32px;
  gap: var(--space-2);
  padding-bottom: var(--space-2);
  border-bottom: 1px solid var(--color-border);
  margin-bottom: var(--space-1);
}

.gq-col-label {
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-faint);
}

.gq-item-row {
  display: grid;
  grid-template-columns: 28px 2fr 110px 1.5fr 32px;
  gap: var(--space-2);
  align-items: center;
  padding: var(--space-2) 0;
  border-bottom: 1px solid var(--color-border-light, var(--color-border));
}

.gq-item-num {
  font-size: var(--text-sm);
  color: var(--color-text-faint);
  text-align: center;
  font-weight: 500;
}

.gq-input {
  width: 100%;
  padding: var(--space-2) var(--space-3);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  color: var(--color-text);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  outline: none;
  transition: border-color var(--transition-interactive);
  min-width: 0;
}

.gq-input:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-primary) 12%, transparent);
}

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

.gq-item-remove {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: none;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  color: var(--color-text-muted);
  cursor: pointer;
  transition: background var(--transition-interactive), color var(--transition-interactive), border-color var(--transition-interactive);
  padding: 0;
}

.gq-item-remove:hover {
  background: #fee2e2;
  border-color: #fca5a5;
  color: #dc2626;
}

.gq-item-remove-placeholder {
  width: 28px;
  height: 28px;
}

.gq-add-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  margin-top: var(--space-3);
  padding: var(--space-2) var(--space-4);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-primary);
  background: color-mix(in srgb, var(--color-primary) 8%, transparent);
  border: 1px dashed var(--color-primary);
  border-radius: var(--radius);
  cursor: pointer;
  transition: background var(--transition-interactive);
}

.gq-add-btn:hover {
  background: color-mix(in srgb, var(--color-primary) 14%, transparent);
}

/* ---- Message ---- */
.gq-message-wrap {
  position: relative;
}

.gq-textarea {
  width: 100%;
  box-sizing: border-box;
  padding: var(--space-4);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  resize: vertical;
  outline: none;
  transition: border-color var(--transition-interactive);
}

.gq-textarea:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-primary) 12%, transparent);
}

.gq-message-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: var(--space-2);
}

/* ---- Store list ---- */
.gq-store-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.gq-loading {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-6);
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}

.gq-store-row {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-bg);
  transition: border-color var(--transition-interactive), background var(--transition-interactive);
}

.gq-store-row:hover {
  border-color: var(--color-primary);
}

.gq-store-row--contacted {
  border-color: #22c55e;
  background: color-mix(in srgb, #22c55e 5%, var(--color-bg));
}

.gq-store-avatar {
  width: 48px;
  height: 48px;
  min-width: 48px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-surface);
}

.gq-store-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gq-store-initials {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--color-primary);
  background: color-mix(in srgb, var(--color-primary) 10%, transparent);
}

.gq-store-info {
  flex: 1;
  min-width: 0;
}

.gq-store-name {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
  margin-bottom: var(--space-1);
}

.gq-store-name a {
  font-weight: 600;
  font-size: var(--text-base);
  color: var(--color-text);
  text-decoration: none;
  transition: color var(--transition-interactive);
}

.gq-store-name a:hover {
  color: var(--color-primary);
}

.gq-store-meta {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  display: flex;
  align-items: center;
  gap: var(--space-1);
  margin-bottom: var(--space-1);
}

.gq-store-meta svg {
  width: 11px;
  height: 11px;
  flex-shrink: 0;
}

.gq-store-rating {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  font-size: var(--text-sm);
}

.gq-star {
  color: var(--color-star, #f59e0b);
  font-size: var(--text-sm);
}

.gq-rating-val {
  font-weight: 600;
  color: var(--color-text);
}

.gq-review-count {
  color: var(--color-text-muted);
  font-size: var(--text-xs);
}

.gq-no-rating {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  font-style: italic;
}

/* ---- Store actions (right side) ---- */
.gq-store-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: var(--space-2);
  min-width: max-content;
}

.gq-wa-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  height: 42px;
  padding: 0 var(--space-5);
  border-radius: var(--radius-full);
  background: var(--color-whatsapp, #25d366);
  color: #fff;
  border: none;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.01em;
  white-space: nowrap;
  box-shadow: 0 1px 2px rgba(0,0,0,0.08);
  transition: background var(--transition-interactive), transform var(--transition-interactive), box-shadow var(--transition-interactive), opacity var(--transition-interactive);
  flex-shrink: 0;
}

.gq-wa-btn svg {
  width: 18px;
  height: 18px;
}

.gq-wa-btn:hover {
  background: #1da851;
  transform: translateY(-1px);
  box-shadow: 0 3px 10px color-mix(in srgb, #1da851 35%, transparent);
}

.gq-wa-btn--contacted {
  background: #15803d;
  opacity: 0.75;
}


.gq-sent-badge {
  font-size: var(--text-xs);
  font-weight: 600;
  color: #16a34a;
  background: #dcfce7;
  border-radius: var(--radius-full);
  padding: 2px var(--space-2);
  white-space: nowrap;
}

/* ---- Checkbox label ---- */
.gq-checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  cursor: pointer;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text);
  user-select: none;
}
.gq-checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  min-width: 18px;
  accent-color: var(--color-primary);
  cursor: pointer;
}

/* ---- Delivery fields ---- */
.gq-delivery-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
  margin-top: var(--space-4);
}
.gq-field {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.gq-field-label {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-muted);
}
.gq-field-optional {
  font-weight: 400;
  font-style: italic;
  color: var(--color-text-faint);
}
@media (max-width: 600px) {
  .gq-delivery-grid { grid-template-columns: 1fr; }
}

/* ---- Hero concierge stepper ---- */
.gq-stepper {
  display: flex;
  align-items: stretch;
  gap: var(--space-5);
  margin-top: var(--space-6);
  max-width: 780px;
}
.gq-stepper-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
  /* Ultra-subtle ambient shadow: separates font edges from light concrete
     textures without any harsh outline. Inherited by all rows below. */
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}
.gq-stepper-num {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.18em;
  color: #ffffff;
}
.gq-stepper-label {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: #ffffff;
}
.gq-stepper-text {
  font-size: var(--text-xs);
  line-height: 1.5;
  color: rgba(250, 248, 244, 0.8);
}
.gq-stepper-divider {
  width: 1px;
  align-self: stretch;
  background: linear-gradient(180deg, transparent, rgba(250, 248, 244, 0.28), transparent);
  flex-shrink: 0;
}

/* ---- Concierge note callout ---- */
.gq-note {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: var(--space-5);
  padding: var(--space-4) var(--space-5);
  background: color-mix(in srgb, var(--color-accent) 7%, transparent);
  border: 1px solid color-mix(in srgb, var(--color-accent) 22%, transparent);
  border-left: 3px solid var(--color-accent);
  border-radius: var(--radius);
}
.gq-note-label {
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-accent);
}
.gq-note p {
  margin: 0;
  font-size: var(--text-sm);
  line-height: 1.55;
  color: var(--color-text-muted);
}

/* ---- Delivery sub-section inside Compose ---- */
.gq-subsection {
  margin-top: var(--space-5);
  padding-top: var(--space-5);
  border-top: 1px solid var(--color-border);
}

/* ---- Generate: preview bar + EN/ID language badge ---- */
.gq-preview-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}
.gq-preview-tag {
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--color-text-faint);
}
.gq-lang-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px;
  background: var(--color-surface-offset);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
}
.gq-lang-sep {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
}
.gq-lang-opt {
  min-width: 32px;
  padding: 3px 10px;
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
  background: none;
  border: none;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: background var(--transition-interactive), color var(--transition-interactive);
}
.gq-lang-opt:hover { color: var(--color-text); }
.gq-lang-opt.is-active {
  background: var(--color-primary);
  color: #fff;
}

/* ---- Generate: message empty-state ghost preview ---- */
.gq-textarea-box {
  position: relative;
}
.gq-preview-ghost {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding: var(--space-5);
  border: 1px dashed var(--color-border);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--color-primary) 3%, var(--color-bg));
  pointer-events: none;
  overflow: hidden;
}
.gq-preview-ghost-head {
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: color-mix(in srgb, var(--color-primary) 55%, var(--color-text-faint));
}
.gq-preview-ghost-body {
  flex: 1;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  line-height: 1.6;
  white-space: pre-wrap;
  color: var(--color-text-faint);
}
.gq-preview-ghost-foot {
  font-size: var(--text-xs);
  font-style: italic;
  color: var(--color-text-faint);
}

/* ---- Responsive ---- */
@media (max-width: 700px) {
  .gq-stepper { flex-direction: column; gap: var(--space-4); max-width: none; }
  .gq-stepper-divider {
    width: auto; height: 1px;
    background: linear-gradient(90deg, transparent, rgba(250, 248, 244, 0.28), transparent);
  }

  .gq-step {
    padding: var(--space-4) var(--space-4);
  }

  .gq-items-cols {
    display: none;
  }

  .gq-item-row {
    grid-template-columns: 1fr 80px;
    grid-template-rows: auto auto auto;
    gap: var(--space-2);
    padding: var(--space-3) 0;
  }

  .gq-item-num {
    display: none;
  }

  .gq-input--material {
    grid-column: 1 / -1;
  }

  .gq-input--qty {
    grid-column: 1;
  }

  .gq-input--info {
    grid-column: 1 / 2;
  }

  .gq-item-remove,
  .gq-item-remove-placeholder {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
    align-self: start;
    margin-top: 0;
  }

  .gq-store-row {
    padding: var(--space-3);
    gap: var(--space-3);
  }

  .gq-store-avatar {
    width: 40px;
    height: 40px;
    min-width: 40px;
  }
}

/* =====================================================
   SEARCH RESULTS PAGE
   ===================================================== */

.search-page-bar {
  margin-bottom: var(--space-5);
}

/* Three-column filter row on the search page */

.search-page-input-wrap {
  position: relative;
  max-width: 680px;
}

.search-page-icon {
  position: absolute;
  left: var(--space-4);
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-text-faint);
  pointer-events: none;
}

.search-page-input {
  width: 100%;
  box-sizing: border-box;
  padding: var(--space-3) var(--space-4) var(--space-3) calc(var(--space-4) + 28px);
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--color-text);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  outline: none;
  transition: border-color var(--transition-interactive), box-shadow var(--transition-interactive);
}
.search-page-input:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-primary) 12%, transparent);
}
.search-page-input::placeholder { color: var(--color-text-faint); }

/* Search hint (min chars state) */
.search-hint {
  padding: var(--space-10) 0;
  color: var(--color-text-muted);
  font-size: var(--text-base);
  text-align: center;
}

/* Result groups */
.search-group {
  margin-bottom: var(--space-8);
}

.search-group-title {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 500;
  color: var(--color-text);
  margin: 0 0 var(--space-4);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.search-group-count {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 600;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  padding: 2px var(--space-2);
  color: var(--color-text-muted);
  letter-spacing: 0;
}


/* =====================================================
   ADMIN INLINE EDITING
   ===================================================== */

/* Edit button on listing card */
.admin-edit-card-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  position: absolute;
  top: var(--space-2);
  right: var(--space-2);
  z-index: 10;
  background: var(--color-primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 4px 10px;
  font-size: var(--text-xs);
  font-weight: 600;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s;
  pointer-events: none;
}
.listing-card-wrap:hover .admin-edit-card-btn {
  opacity: 1;
  pointer-events: auto;
}

/* Admin bar on detail page */
.admin-detail-bar {
  background: #1e1e2e;
  color: #e0e0f0;
  padding: var(--space-2) var(--space-6);
  display: flex;
  align-items: center;
  gap: var(--space-4);
  font-size: var(--text-sm);
  /* These detail pages (developer/provider/agent/listing/project) render this as
     the FIRST element, above a full-bleed hero that slides under the fixed header
     — so without clearance the bar sits at y=0 UNDER the 80px header and is
     invisible (the bug that hid "Edit this listing"). A transparent top border
     reserves the header band (collapse-proof, unlike margin-top), and
     background-clip keeps the dark fill below it so the header floats over the
     page, not a dark slab. The --board variant already sits in cleared page flow. */
  border-top: var(--nav-height) solid transparent;
  background-clip: padding-box;
  position: relative;
  z-index: 2;
}
.admin-detail-bar--board {
  border-top: 0;
}
.admin-detail-bar-label {
  font-weight: 700;
  font-size: var(--text-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--color-primary);
  color: #fff;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
}

/* Board variant (jobs/marketplace detail pages) — sits inside the page flow */
.admin-detail-bar--board {
  border-radius: var(--radius-md);
  margin: 4px 0 16px;
  flex-wrap: wrap;
  row-gap: var(--space-2);
}
.admin-detail-bar--board .adm-state { font-size: var(--text-sm); opacity: .85; }
.admin-detail-bar--board .adm-field {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: var(--text-xs); text-transform: uppercase; letter-spacing: .05em; color: #a0a0c0;
}
.admin-detail-bar--board select {
  background: #2a2a3e; color: #e0e0f0; border: 1px solid #3a3a52; border-radius: var(--radius-sm);
  font: inherit; font-size: var(--text-sm); padding: 3px 6px; max-width: 200px;
}
.admin-detail-bar--board .adm-btn {
  background: #2a2a3e; color: #e0e0f0; border: 1px solid #3a3a52; border-radius: var(--radius-sm);
  font: inherit; font-size: var(--text-sm); padding: 3px 10px; cursor: pointer; text-decoration: none;
  display: inline-flex; align-items: center;
}
.admin-detail-bar--board .adm-btn:hover { background: #34344c; }

/* Modal overlay */
.admin-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
}
.admin-modal-box {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 8px 40px rgba(0,0,0,0.25);
}
.admin-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid var(--color-border);
}
.admin-modal-header h3 {
  margin: 0;
  font-size: var(--text-base);
  font-weight: 700;
}
.admin-modal-close {
  background: none;
  border: none;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  color: var(--color-text-muted);
  padding: 0 4px;
}
.admin-modal-body {
  overflow-y: auto;
  padding: var(--space-5);
  flex: 1;
}
.admin-modal-footer {
  padding: var(--space-4) var(--space-5);
  border-top: 1px solid var(--color-border);
  display: flex;
  justify-content: flex-end;
  gap: var(--space-3);
}

/* Shared form elements */
.admin-form-row {
  margin-bottom: var(--space-4);
}
.admin-form-row label {
  display: block;
  font-size: var(--text-sm);
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--color-text-muted);
}
.admin-form-row--2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
}
.admin-form-row--3col {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: var(--space-3);
}
.admin-input,
.admin-select,
.admin-textarea {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  font-family: inherit;
  background: var(--color-bg);
  color: var(--color-text);
  box-sizing: border-box;
  transition: border-color 0.15s;
}
.admin-input:focus,
.admin-select:focus,
.admin-textarea:focus {
  outline: none;
  border-color: var(--color-primary);
}
.admin-textarea {
  resize: vertical;
  min-height: 80px;
}
.admin-checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: var(--text-sm);
  cursor: pointer;
}
.admin-form-error {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fca5a5;
  border-radius: var(--radius-sm);
  padding: var(--space-2) var(--space-3);
  font-size: var(--text-sm);
  margin-top: var(--space-2);
}

/* Inline detail edit form */
.admin-inline-form {
  padding: var(--space-2) 0 var(--space-8);
}

/* ── Developer front-end admin (2026-07-24) ────────────────────────────────
   Directory reorder/feature/photo cluster + detail-page photo-slot editor.
   Colours are all tokens (docs/brand-colors.md): navy primary, gold star,
   teal accents/focus — adapts to dark theme automatically. */
.dev-admin-help {
  display: flex;
  gap: 8px;
  align-items: baseline;
  flex-wrap: wrap;
  background: var(--color-primary-highlight);
  color: var(--color-text);
  border-radius: var(--radius-md);
  padding: 10px 16px;
  margin-bottom: var(--space-6);
  font-size: var(--text-sm);
  line-height: 1.5;
}
.dev-admin-help strong {
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.7rem;
  color: var(--color-primary);
}

.dev-admin-wrap { position: relative; }
.dev-admin-bar {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 12;
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  background: color-mix(in oklab, var(--color-surface) 90%, transparent);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-sm);
}
.dev-admin-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border: none;
  border-radius: var(--radius-full);
  background: transparent;
  color: var(--color-text-muted);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}
.dev-admin-btn:hover {
  background: var(--color-primary);
  color: var(--color-text-inverse);
}
.dev-admin-btn--on { color: var(--color-star); }
.dev-admin-btn--on:hover { background: var(--color-star); color: #3a2a00; }
.dev-admin-btn:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 1px;
}

/* Change-card-photo modal preview */
.admin-modal-hint,
.admin-form-hint {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
}
.admin-modal-hint { margin-bottom: var(--space-3); }
.admin-photo-preview {
  margin-top: var(--space-2);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--color-surface-offset);
  min-height: 40px;
}
.admin-photo-preview img {
  display: block;
  width: 100%;
  max-height: 220px;
  object-fit: cover;
}

/* Detail-page inline editor: section labels + photo slots */
.admin-inline-title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 500;
  margin-bottom: var(--space-5);
  color: var(--color-text);
}
.admin-form-section {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-accent);
  border-bottom: 1px solid var(--color-divider);
  padding-bottom: 6px;
  margin: var(--space-6) 0 var(--space-4);
}
.admin-form-section:first-child { margin-top: 0; }
.admin-photo-slot {
  display: flex;
  gap: var(--space-3);
  align-items: flex-start;
  margin-bottom: var(--space-4);
}
.admin-photo-thumb {
  width: 84px;
  height: 60px;
  flex: 0 0 auto;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  background: var(--color-surface-offset);
}
.admin-photo-thumb.is-empty {
  background: repeating-linear-gradient(45deg,
    var(--color-surface-offset), var(--color-surface-offset) 6px,
    var(--color-surface-offset-2) 6px, var(--color-surface-offset-2) 12px);
}
.admin-photo-slot-main { flex: 1 1 auto; min-width: 0; }
.admin-photo-slot-main label {
  display: block;
  font-size: var(--text-sm);
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--color-text-muted);
}
.admin-photo-slot-row { display: flex; gap: var(--space-2); align-items: center; }
.admin-photo-slot-row .admin-input { flex: 1 1 auto; }
.admin-photo-clear { flex: 0 0 auto; white-space: nowrap; }
@media (max-width: 560px) {
  .admin-form-row--3col { grid-template-columns: 1fr; }
  .dev-admin-bar { top: 6px; left: 6px; }
}

/* =====================================================
   UI V2 — Lombok Blueprint refresh additions
   ===================================================== */

/* --- §2 Nav: clean dropdown with mini SVG icons + ghost CTA --- */
.nav-dropdown-menu a {
  display: flex !important;
  flex-direction: row !important;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4) !important;
  font-size: var(--text-sm);
  font-weight: 500;
}
.nav-dd-mini-icon {
  flex-shrink: 0;
  color: var(--color-accent);
  opacity: 0.9;
}
.nav-dropdown-menu a:hover .nav-dd-mini-icon {
  opacity: 1;
}

.site-header:not(.scrolled):not(.solid) .nav-cta-ghost {
  border-color: rgba(250,248,244,0.75);
  color: #fff;
}
.site-header:not(.scrolled):not(.solid) .nav-cta-ghost:hover {
  background: rgba(255,255,255,0.18);
  border-color: #fff;
}

/* Sticky header shrink (height transition when scrolled) */
.site-header.scrolled .nav-inner,
.site-header.solid .nav-inner {
  height: 56px;
  transition: height 280ms ease;
}
.site-header .nav-inner {
  transition: height 280ms ease;
}

/* --- §1 Hero: intent segments + dual CTA row REMOVED in ADR-0001
   (replaced by hero-search--trigger which opens the command palette).
   Styles for those classes were deleted with the JS. --- */

/* --- §3 Skeleton loaders (replaces "Loading...") --- */
.skeleton {
  background: linear-gradient(
    90deg,
    var(--color-surface-offset) 0%,
    var(--color-surface-dynamic) 50%,
    var(--color-surface-offset) 100%
  );
  background-size: 200% 100%;
  animation: skeleton-pulse 1.4s ease-in-out infinite;
  border-radius: var(--radius-md);
}
@keyframes skeleton-pulse {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.skeleton-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.skeleton-line {
  height: 14px;
  border-radius: var(--radius-sm);
}
.skeleton-line.skeleton-line--title  { height: 18px; width: 65%; }
.skeleton-line.skeleton-line--meta   { height: 12px; width: 45%; }
.skeleton-line.skeleton-line--short  { width: 80%; }
.skeleton-line.skeleton-line--mid    { width: 100%; }
.skeleton-avatar {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  flex-shrink: 0;
}
.skeleton-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}
.skeleton-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
}
@media (min-width: 768px) { .skeleton-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px){ .skeleton-grid { grid-template-columns: repeat(3, 1fr); } }
/* When the skeleton is seeded INSIDE a container that is itself a grid
   (#project-grid .card-grid, the marketplace .mk-grid), the wrapper would
   collapse into a single track — display:contents lets the skeleton cards
   participate in the parent grid directly. */
.card-grid > .skeleton-grid,
.mk-grid > .skeleton-grid {
  display: contents;
}

/* --- §6 Verified badge --- */
.verified-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  background: var(--color-accent-highlight);
  color: var(--color-accent);
  border: 1px solid color-mix(in oklab, var(--color-accent) 30%, transparent);
  white-space: nowrap;
}
.verified-badge svg {
  flex-shrink: 0;
}

/* --- §6 Relative timestamp --- */
.ts-relative {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  font-weight: 400;
}
.ts-relative svg {
  flex-shrink: 0;
  opacity: 0.7;
}

.split-view-map {
  background: #f2ebe1;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  min-height: 320px;
  overflow: hidden;
  position: relative;
}
@media (min-width: 1024px) {
  .split-view-map {
    position: sticky;
    top: 80px;
    height: calc(100vh - 100px);
    min-height: 480px;
  }
}
.split-view-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  min-width: 0;
}
/* When listings card-grid sits inside split-view-list, force single column even on desktop */
.split-view-list.card-grid {
  grid-template-columns: 1fr !important;
}
@media (min-width: 1024px) {
  .split-view-list.card-grid { grid-template-columns: 1fr !important; }
}


/* --- §5 Mobile filter sticky button + drawer --- */
/* Hidden by default; only shown when body.has-mobile-filter is set
   (set by router via MobileFilterDrawer.updateAvailability for listing/directory pages)
   AND viewport is mobile. Also respects the [hidden] HTML attribute. */
.mobile-filter-fab {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 16px;
  display: none;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  background: var(--color-primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-full);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.88rem;
  letter-spacing: 0.04em;
  box-shadow: 0 8px 24px rgba(0,0,0,0.25);
  z-index: 88;
  cursor: pointer;
  transition: background 180ms ease, transform 180ms ease;
}
.mobile-filter-fab[hidden] { display: none !important; }
body.has-mobile-filter .mobile-filter-fab:not([hidden]) {
  display: inline-flex;
}
.mobile-filter-fab:hover {
  background: var(--color-primary-hover);
  transform: translateX(-50%) translateY(-2px);
}
@media (min-width: 1024px) {
  .mobile-filter-fab,
  body.has-mobile-filter .mobile-filter-fab:not([hidden]) { display: none !important; }
}
.mobile-filter-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: var(--radius-full);
  background: var(--color-accent);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
}
/* Respect the `hidden` attribute — the badge only shows when JS sets a count
   (the base display:inline-flex above otherwise overrode UA [hidden]). */
.mobile-filter-count[hidden] { display: none !important; }

.mobile-filter-drawer {
  position: fixed;
  inset: 0;
  z-index: 200;
  pointer-events: none;
  opacity: 0;
  transition: opacity 220ms ease;
}
.mobile-filter-drawer.open {
  pointer-events: auto;
  opacity: 1;
}
.mobile-filter-drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(2px);
}
.mobile-filter-drawer-panel {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  max-height: 85vh;
  background: var(--color-surface);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  display: flex;
  flex-direction: column;
  transform: translateY(100%);
  transition: transform 280ms cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 -8px 32px rgba(0,0,0,0.25);
}
.mobile-filter-drawer.open .mobile-filter-drawer-panel {
  transform: translateY(0);
}
.mobile-filter-drawer-handle {
  width: 40px;
  height: 4px;
  background: var(--color-divider);
  border-radius: var(--radius-full);
  margin: 12px auto 0;
  flex-shrink: 0;
}
.mobile-filter-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-3) var(--space-5);
  border-bottom: 1px solid var(--color-border);
  flex-shrink: 0;
}
.mobile-filter-drawer-header h3 {
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--color-text);
  margin: 0;
}
.mobile-filter-drawer-close {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  color: var(--color-text-muted);
  transition: background 180ms ease;
}
.mobile-filter-drawer-close:hover {
  background: var(--color-surface-offset);
  color: var(--color-text);
}
.mobile-filter-drawer-body {
  padding: var(--space-4) var(--space-5);
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}
.mobile-filter-drawer-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-5);
  border-top: 1px solid var(--color-border);
  flex-shrink: 0;
}
.mobile-filter-drawer-footer .btn { flex: 1; }
.mobile-filter-drawer-footer .btn--ghost { flex: 0 0 auto; }

/* When drawer open, lock body scroll */
body.drawer-open { overflow: hidden; }

/* --- §4 RAB Wizard --- */
.wizard {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  overflow: hidden;
}
.wizard-stepper {
  display: flex;
  align-items: stretch;
  background: var(--color-surface-offset);
  border-bottom: 1px solid var(--color-border);
}
.wizard-step-tab {
  flex: 1;
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-4) var(--space-4);
  background: none;
  border: none;
  color: var(--color-text-muted);
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  position: relative;
  transition: color 180ms ease, background 180ms ease;
}
.wizard-step-tab + .wizard-step-tab {
  border-left: 1px solid var(--color-border);
}
.wizard-step-tab:hover:not(.is-disabled) { color: var(--color-text); }
.wizard-step-tab.is-active {
  background: var(--color-surface);
  color: var(--color-primary);
}
.wizard-step-tab.is-active::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 3px;
  background: var(--color-accent);
}
.wizard-step-tab.is-complete { color: var(--color-success); }
.wizard-step-tab.is-disabled { cursor: not-allowed; opacity: 0.55; }
.wizard-step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--color-surface-dynamic);
  color: var(--color-text-muted);
  font-weight: 700;
  font-size: 0.78rem;
  flex-shrink: 0;
  transition: background 180ms ease, color 180ms ease;
}
.wizard-step-tab.is-active .wizard-step-num {
  background: var(--color-accent);
  color: #fff;
}
.wizard-step-tab.is-complete .wizard-step-num {
  background: var(--color-success);
  color: #fff;
}
.wizard-step-label {
  display: flex;
  flex-direction: column;
  gap: 1px;
  line-height: 1.2;
}
.wizard-step-label small {
  font-size: 0.68rem;
  color: var(--color-text-faint);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.wizard-body {
  padding: var(--space-6);
}
.wizard-pane { display: none; }
.wizard-pane.is-active { display: block; animation: wiz-fade 240ms ease; }
@keyframes wiz-fade {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.wizard-pane h4 {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  color: var(--color-text);
  margin-bottom: var(--space-2);
}
.wizard-pane p.wizard-hint {
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  margin-bottom: var(--space-5);
  max-width: 56ch;
}
.wizard-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-6);
  border-top: 1px solid var(--color-border);
  background: var(--color-surface-offset);
}
.wizard-total {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.wizard-total-label {
  font-size: 0.72rem;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.wizard-total-value {
  font-family: var(--font-body);
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--color-accent);
  font-variant-numeric: tabular-nums;
  transition: color 200ms ease;
}
.wizard-total-value.is-pulsing {
  animation: wiz-total-pulse 280ms ease;
}
@keyframes wiz-total-pulse {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.05); color: var(--color-accent-hover); }
  100% { transform: scale(1); }
}
.wizard-nav {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-shrink: 0;
}

@media (max-width: 640px) {
  .wizard-step-tab { padding: var(--space-3) var(--space-2); font-size: 0.74rem; }
  .wizard-step-label small { display: none; }
  .wizard-body { padding: var(--space-4); }
  .wizard-footer { padding: var(--space-3) var(--space-4); flex-direction: column; align-items: stretch; }
  .wizard-nav { justify-content: space-between; }
}

/* Larger touch target for primary CTA */
.btn--lg {
  min-height: 52px;
  padding: var(--space-3) var(--space-8);
  font-size: var(--text-base);
}

/* --- §1: hero "List Your Business" inline page placeholder --- */
.list-your-biz-page {
  padding: var(--space-16) 0;
  text-align: center;
}
.admin-inline-form h2 {
  font-size: var(--text-lg);
}
.admin-form-actions {
  display: flex;
  gap: var(--space-3);
  justify-content: flex-end;
  margin-top: var(--space-6);
  padding-top: var(--space-4);
  border-top: 1px solid var(--color-border);
}

@media (max-width: 600px) {
  .admin-form-row--2col,
  .admin-form-row--3col {
    grid-template-columns: 1fr;
  }
  .admin-modal-box {
    max-height: 95vh;
  }
}

/* =============================================================
   Primary CTA button (luxury header right-side)
   Matches the tone of the existing btn-primary pattern but sits
   inline with the nav-actions cluster. Desktop-only; mobile uses
   a block variant inside the drawer.
   ============================================================= */
.nav-cta {
  display: none;
  align-items: center;
  justify-content: center;
  height: 36px;
  padding: 0 1.1rem;
  border: 1.5px solid var(--color-primary);
  border-radius: var(--radius-full);
  background: var(--color-primary);
  color: #fff;
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-decoration: none;
  white-space: nowrap;
  transition: background var(--transition-interactive), color var(--transition-interactive), border-color var(--transition-interactive);
}
.nav-cta:hover {
  background: transparent;
  color: var(--color-primary);
}
@media (min-width: 1024px) {
  .nav-cta { display: inline-flex; }
}
/* Hero overlay variant */
.site-header:not(.scrolled):not(.solid) .nav-cta {
  background: rgba(255,255,255,0.95);
  border-color: rgba(255,255,255,0.95);
  color: var(--color-text);
}
.site-header:not(.scrolled):not(.solid) .nav-cta:hover {
  background: transparent;
  color: #fff;
  border-color: #fff;
}
/* Block/full-width variant used inside the mobile drawer */
.nav-cta--block {
  display: flex;
  width: 100%;
  height: auto;
  padding: 16px 24px;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #ffffff !important;
  justify-content: center;
}
.nav-cta--block:hover {
  background: var(--color-primary-hover);
  color: #ffffff !important;
}

/* =============================================================
   Language toggle — two country flags, the active one highlighted.
   Lives in the header utility bar and in the mobile drawer.
   ============================================================= */
.lang-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  height: 32px;
  padding: 0 4px;
  border: 1.5px solid var(--color-divider);
  border-radius: var(--radius-full);
  background: transparent;
  cursor: pointer;
  line-height: 0;
  box-sizing: border-box;
  flex: none; /* header-row pressure must never crush the control */
  transition: border-color var(--transition-interactive), background var(--transition-interactive);
}
.lang-toggle:hover {
  border-color: var(--color-text-muted);
  background: var(--color-surface-offset);
}
.lang-toggle .lang-opt {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 3px;
  border-radius: var(--radius-full);
  opacity: 0.45;
  transition: opacity var(--transition-interactive), background var(--transition-interactive), box-shadow var(--transition-interactive);
}
.lang-toggle .lang-opt:hover { opacity: 0.8; }
.lang-toggle .lang-opt.active {
  opacity: 1;
  background: var(--color-surface-dynamic);
  box-shadow: 0 0 0 1.5px var(--color-primary);
}
.lang-toggle .lang-flag {
  display: block;
  /* Explicit size: base.css's responsive `svg { max-width:100%; height:auto }`
     let a squeezed header shrink the flags to ~8px — the "broken circle" bug. */
  width: 22px;
  height: 14px;
  max-width: none;
  border-radius: 2px;
  overflow: hidden; /* crop Union-Jack diagonals drawn outside the viewBox */
}

/* Transparent (hero) header state */
.site-header:not(.scrolled):not(.solid) .lang-toggle {
  border-color: rgba(250,248,244,0.35);
}
.site-header:not(.scrolled):not(.solid) .lang-toggle:hover {
  border-color: rgba(250,248,244,0.6);
  background: rgba(255,255,255,0.1);
}
.site-header:not(.scrolled):not(.solid) .lang-toggle .lang-opt {
  opacity: 0.55;
}
.site-header:not(.scrolled):not(.solid) .lang-toggle .lang-opt.active {
  opacity: 1;
  background: rgba(255,255,255,0.18);
  box-shadow: 0 0 0 1.5px rgba(255,255,255,0.85);
}

/* =====================================================
   Mobile home refinements — hero spacing, single search trigger,
   below-the-fold RAB callout, FAB safety margin
   ===================================================== */

/* Single magnifying glass — only the right-side submit button.
   The decorative left icon was removed, so kill its left padding. */
/* Mobile: a touch more breathing room below the subheadline before the
   hero search trigger lands. */
@media (max-width: 767px) {
  .hero-subtitle {
    margin-bottom: calc(var(--space-10) + var(--space-2));
  }
}

/* --- RAB Build Cost Tools — two-card standalone section --- */
/* ============================================================
   BUILD & TRANSACTION TOOLS — unified premium "tool ledger"
   ------------------------------------------------------------
   A single deep-navy master plate listing every build &
   transaction tool as a perfectly-aligned row:

       [ icon housing ] · [ title + description ] · [ action ]

   Replaces the old split RAB / Property-Tax card sections so
   every tool lives under one roof. High-end editorial "digital
   ledger" treatment: razor-thin gold accent frame, fine-line
   vector icons, serif titles, ghost buttons with micro-motion.
   Always dark, independent of the light/dark theme (like the
   home help-cta interstitial).
   ============================================================ */

/* Full-bleed dark canvas the plate floats on */
.tools-ledger-section {
  /* Local design tokens — keep this component's palette self-contained */
  --ledger-plate:        #0d1c30;                 /* rich deep navy master plate */
  --ledger-gold:         #c9a45c;                 /* muted gold / warm bronze     */
  --ledger-gold-bright:  #e8d4a0;                 /* gold highlight (hover, PRO)  */
  --ledger-hairline:     rgba(255, 255, 255, 0.05);
  --ledger-ghost-border: rgba(255, 255, 255, 0.12);

  background: #0a1322;                             /* deepest navy backdrop */
  padding: clamp(64px, 9vw, 120px) 0;             /* luxury vertical breathing room */
}

/* ---- Centred section heading ------------------------------ */
.tools-ledger-head {
  text-align: center;
  max-width: 640px;
  margin: 0 auto clamp(2.5rem, 5vw, 3.5rem);
}
.tools-ledger-title {
  font-family: var(--font-display);               /* high-contrast serif */
  font-size: clamp(2rem, 4.5vw, 2.9rem);
  font-weight: 600;
  line-height: 1.1;
  color: #ffffff;
  margin: 0 0 0.9rem;
}
/* ---- Master plate ----------------------------------------- */
.tools-ledger {
  position: relative;
  max-width: 960px;
  margin: 0 auto;
  background: var(--ledger-plate);
  border: 1px solid var(--ledger-hairline);       /* subtle low-opacity boundary */
  border-radius: 12px;                            /* refined corner radius */
}
/* Razor-thin gold accent frame — left vertical edge only.
   Inset top/bottom so the hairline tucks neatly between the
   rounded corners instead of being clipped square. */
.tools-ledger::before {
  content: "";
  position: absolute;
  top: 14px;
  bottom: 14px;
  left: 0;
  width: 2px;
  border-radius: 2px;
  background: linear-gradient(
    180deg,
    var(--ledger-gold-bright) 0%,
    var(--ledger-gold) 45%,
    #9c7212 100%
  );
  box-shadow: 0 0 12px rgba(201, 164, 92, 0.25);  /* delicate warm glow */
}

/* ---- Tool row (the whole row is the clickable trigger) ---- */
.tool-row {
  display: grid;
  grid-template-columns: 80px 1fr auto;           /* icon · content · action */
  grid-template-areas: "icon body action";
  align-items: center;                            /* absolute vertical centre tracking */
  column-gap: 1.5rem;
  padding: 2.2rem 2rem;                           /* expansive, premium row rhythm */
  border-bottom: 1px solid var(--ledger-hairline);/* ultra-faint rule divider */
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: all 0.3s ease;
}
.tool-row:last-child { border-bottom: none; }     /* final row: no divider */

/* Round the outer rows so hover/focus respects the plate radius */
.tool-row:first-child {
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
}
.tool-row:last-child {
  border-bottom-left-radius: 12px;
  border-bottom-right-radius: 12px;
}

/* Hover: row background subtly illuminates */
.tool-row:hover {
  background: rgba(255, 255, 255, 0.015);         /* ultra-faint white glow tint */
}

/* ---- Column 1 · icon housing ------------------------------ */
.tool-row-icon {
  grid-area: icon;
  justify-self: center;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);          /* dark, desaturated block — layered depth */
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--ledger-gold);                      /* crisp, muted gold/bronze icon strokes */
  transition: all 0.3s ease;
}
.tool-row:hover .tool-row-icon {
  border-color: rgba(201, 164, 92, 0.35);
  color: var(--ledger-gold-bright);
}

/* ---- Column 2 · content block ----------------------------- */
.tool-row-body {
  grid-area: body;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 0;                                   /* let text wrap, never horizontal overflow */
}
.tool-row-title {
  font-family: var(--font-display);               /* beautiful high-contrast serif */
  font-size: 1.4rem;
  font-weight: 600;
  line-height: 1.2;
  color: #ffffff;
}
.tool-row-desc {
  font-family: var(--font-body);                  /* clean geometric sans-serif */
  font-size: 0.9rem;
  font-weight: 300;                               /* light-weight */
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.5);                /* muted silver-gray */
  max-width: 52ch;
}

/* PRO tag — sits inline beside premium tool titles */
.tool-row-pro {
  display: inline-block;
  vertical-align: middle;
  margin-left: 0.6rem;
  padding: 0.2em 0.5em;
  font-family: var(--font-body);
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #0a1322;
  background: linear-gradient(135deg, var(--ledger-gold-bright), var(--ledger-gold));
  border-radius: 3px;
  transform: translateY(-2px);                    /* optically align with serif cap-height */
}

/* Nav "PRO" badge — premium menu items (desktop dropdowns + mobile hamburger).
   Stamped by applyNavProBadges() (app.js) from NAV_PREMIUM_ROUTES. Muted
   gold/bronze pill, matching the home page's .tool-row-pro. */
.nav-pro {
  display: inline-block;
  flex-shrink: 0;
  margin-left: 0.5rem;
  padding: 0.12em 0.42em;
  font-family: var(--font-body);
  font-size: 0.54rem;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  line-height: 1.25;
  color: #0a1322;
  /* Literal gold/bronze — the --ledger-* vars are scoped to .tools-ledger-section
     only, and the nav is not a descendant, so var() would be undefined here
     (same reason .ast-link-pro uses literals). */
  background: linear-gradient(135deg, #e8d4a0, #c9a45c);
  border-radius: 3px;
  vertical-align: middle;
}
/* In the desktop dropdown the row is flex — push the badge to the right edge. */
.nav-dropdown-menu a .nav-pro { margin-left: auto; }

/* ---- Column 3 · interactive action (ghost button) --------- */
.tool-row-action { grid-area: action; }

.tool-ghost-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.78rem 1.3rem;
  background: transparent;                         /* elegant ghost container */
  border: 1px solid var(--ledger-ghost-border);    /* sharp, ultra-thin border */
  border-radius: 2px;                              /* crisp, editorial corners */
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.08em;                          /* distinct tracking */
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.85);
  white-space: nowrap;
  transition: all 0.3s ease;
}
/* On row hover: border transitions to a gold accent, label brightens */
.tool-row:hover .tool-ghost-btn {
  border-color: var(--ledger-gold);
  color: #ffffff;
}
/* Inline fine-line arrow glides 4px to the right on hover */
.tool-btn-arrow { transition: transform 0.3s ease; }
.tool-row:hover .tool-btn-arrow { transform: translateX(4px); }
/* Lock glyph for premium (PRO) actions */
.tool-btn-lock { color: var(--ledger-gold); transition: color 0.3s ease; }
.tool-row:hover .tool-btn-lock { color: var(--ledger-gold-bright); }

/* ---- Responsive — collapse cleanly into a vertical stack -- */
@media (max-width: 640px) {
  .tools-ledger-section { padding: 56px 0; }

  .tool-row {
    grid-template-columns: 46px 1fr;              /* icon · content */
    grid-template-areas: "icon body";
    column-gap: 1.5rem;                           /* more breathing room before the text */
    padding: 1.5rem 1.4rem;
  }
  .tool-row-icon { width: 46px; height: 46px; border-radius: 10px; }
  .tool-row-title { font-size: 1.2rem; }
  /* On mobile the whole row is the tap target — drop the per-row ghost button */
  .tool-row-action { display: none; }
}

/* ===========================================================
   Property Sale Tax Calculator
   =========================================================== */

/* Wizard field helpers */
.tax-opt {
  font-size: 0.7rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text-faint);
  margin-left: 4px;
}
.tax-field-note {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  margin-top: var(--space-1);
  line-height: 1.5;
}
.tax-computed-price {
  margin-top: var(--space-3);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}
.tax-computed-price strong {
  color: var(--color-accent);
  font-variant-numeric: tabular-nums;
}

/* Sidebar "Good to know" list */
.tax-notes {
  list-style: none;
  padding: 0;
  margin: 0;
}
.tax-notes li {
  position: relative;
  padding: 0 0 var(--space-3) var(--space-4);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.55;
}
.tax-notes li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-accent);
}
.tax-notes li:last-child { padding-bottom: 0; }
.tax-notes strong { color: var(--color-text); font-weight: 600; }

/* Result: buyer / seller split */
.tax-parties {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-5);
  margin-bottom: var(--space-6);
}
.tax-party {
  background: var(--color-surface-offset);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-4) var(--space-5);
}
.tax-group-title {
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--color-heading);
  margin: 0 0 var(--space-2);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
.tax-group-title::before {
  content: '';
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.tax-group-title--seller::before { background: var(--color-star, #f59e0b); }
.tax-group-title--buyer::before  { background: var(--color-accent); }

/* Result: net-to-seller / total-to-buyer summary */
.tax-summary-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
  margin-bottom: var(--space-6);
}
.tax-summary-card {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-4) var(--space-5);
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.tax-summary-card--buyer {
  background: rgba(12, 124, 132, 0.06);
  border-color: rgba(12, 124, 132, 0.25);
}
.tax-summary-label {
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
}
.tax-summary-val {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--color-heading);
  font-variant-numeric: tabular-nums;
}
.tax-summary-sub {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
}

@media (max-width: 640px) {
  .tax-parties,
  .tax-summary-grid { grid-template-columns: 1fr; }
}


/* =====================================================
   COMMAND PALETTE (ADR-0001) — global search overlay
   =====================================================

   Mounted in document.body. Triggered from any element with
   [data-cmd-trigger] (hero, nav pill, mobile menu), ⌘K / Ctrl+K,
   or "/" (when no editable element has focus).
   =====================================================*/

/* ── Hero search bar styled as palette TRIGGER ── */
.hero-search--trigger {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  max-width: 540px;
  margin: var(--space-3) auto 0;
  padding: 16px 12px 16px 24px;
  background: rgba(255,255,255,0.08);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(250,248,244,0.3);
  border-radius: var(--radius-full);
  color: #faf8f4;
  font-family: var(--font-body);
  font-size: var(--text-base);
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: background 200ms ease, border-color 200ms ease, transform 200ms ease;
  text-align: left;
}
.hero-search--trigger:hover {
  background: rgba(255,255,255,0.14);
  border-color: rgba(250,248,244,0.55);
  transform: translateY(-1px);
}
.hero-search-icon-left {
  flex-shrink: 0;
  color: rgba(250,248,244,0.6);
}
.hero-search-trigger-label {
  flex: 1;
  color: rgba(250,248,244,0.6);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
@media (max-width: 767px) {
  .hero-search--trigger { padding: 14px 18px; }
}

/* ── Nav search pill (desktop only) ── */
.nav-search-pill {
  display: none;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 10px 0 14px;
  background: color-mix(in oklab, var(--color-text) 5%, transparent);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  font-family: var(--font-body);
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--color-text-muted);
  cursor: pointer;
  transition: background 180ms ease, border-color 180ms ease, color 180ms ease;
  max-width: 220px;
}
.nav-search-pill:hover {
  background: color-mix(in oklab, var(--color-text) 9%, transparent);
  border-color: var(--color-text-faint);
  color: var(--color-text);
}
.nav-search-pill-icon  { flex-shrink: 0; color: inherit; }
.nav-search-pill-label { flex: 1; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (min-width: 1024px) {
  .nav-search-pill { display: inline-flex; }
}
/* Adapt nav pill colors when header is transparent on home */
.site-header:not(.scrolled):not(.solid) .nav-search-pill {
  background: rgba(255,255,255,0.08);
  border-color: rgba(250,248,244,0.3);
  color: rgba(250,248,244,0.85);
}
.site-header:not(.scrolled):not(.solid) .nav-search-pill:hover {
  background: rgba(255,255,255,0.16);
  border-color: rgba(250,248,244,0.55);
}

/* ── Mobile menu trigger button (replaces the old mobile-search input) ── */
.mobile-search-wrap--trigger {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 12px 0 12px 35px;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--color-border);
  border-radius: 0;
  color: var(--color-text-faint);
  font-family: var(--font-body);
  font-size: 0.9rem;
  cursor: pointer;
  text-align: left;
  transition: border-color 180ms ease, color 180ms ease;
}
.mobile-search-wrap--trigger:hover {
  color: var(--color-text-muted);
  border-bottom-color: var(--color-text-muted);
}
.mobile-search-trigger-label { flex: 1; }

/* ── Palette overlay ── */
.cmd-palette {
  position: fixed;
  inset: 0;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}
.cmd-palette--open {
  opacity: 1;
  pointer-events: auto;
}
.cmd-palette-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 35, 0.55);
  backdrop-filter: blur(4px);
}
.cmd-palette-panel {
  position: absolute;
  left: 50%;
  top: 10vh;
  transform: translateX(-50%) translateY(-8px);
  width: min(640px, calc(100vw - 32px));
  max-height: min(70vh, 720px);
  display: flex;
  flex-direction: column;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 64px rgba(0,0,0,0.32), 0 6px 16px rgba(0,0,0,0.18);
  overflow: hidden;
  opacity: 0;
  transition: transform 220ms cubic-bezier(0.16, 1, 0.3, 1),
              opacity 180ms ease;
}
.cmd-palette--open .cmd-palette-panel {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}
.cmd-palette-input-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--color-border);
}
.cmd-palette-input-icon {
  flex-shrink: 0;
  color: var(--color-text-muted);
}
.cmd-palette-input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: none;
  outline: none;
  font-family: var(--font-body);
  font-size: 1.02rem;
  color: var(--color-text);
}
.cmd-palette-input::placeholder { color: var(--color-text-faint); }
.cmd-palette-close {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: var(--color-text-muted);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 150ms ease, color 150ms ease;
}
.cmd-palette-close:hover {
  background: var(--color-surface-offset);
  color: var(--color-text);
}
.cmd-palette-body {
  flex: 1;
  overflow-y: auto;
  padding: 8px 0;
}
.cmd-palette-hint {
  display: flex;
  gap: 14px;
  padding: 8px 16px;
  border-top: 1px solid var(--color-border);
  background: var(--color-surface-offset);
  font-size: 0.72rem;
  color: var(--color-text-faint);
}
.cmd-hint-item { display: inline-flex; align-items: center; gap: 6px; }
.cmd-kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  font-family: var(--font-body);
  font-size: 0.66rem;
  font-weight: 600;
  color: var(--color-text-muted);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 3px;
}

/* ── Sections ── */
.cmd-section { padding: 4px 0 8px; }
.cmd-section + .cmd-section {
  border-top: 1px solid var(--color-border);
  margin-top: 4px;
  padding-top: 8px;
}
.cmd-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 16px 4px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-faint);
}
.cmd-section-title  { display: inline-flex; align-items: center; gap: 8px; }
.cmd-section-count {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--color-text-faint);
  background: var(--color-surface-offset);
  padding: 1px 7px;
  border-radius: var(--radius-full);
}
.cmd-section-clear {
  background: none;
  border: none;
  font-family: var(--font-body);
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-faint);
  cursor: pointer;
  padding: 2px 4px;
  transition: color 150ms ease;
}
.cmd-section-clear:hover { color: var(--color-accent); }

/* ── Rows (universal) ── */
.cmd-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 16px;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  border-left: 2px solid transparent;
  transition: background 100ms ease, border-color 100ms ease;
}
.cmd-row:hover,
.cmd-row--selected {
  background: color-mix(in oklab, var(--color-accent) 8%, transparent);
  border-left-color: var(--color-accent);
}
.cmd-row-icon {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  color: var(--color-text-muted);
}
.cmd-row-icon--browse {
  background: color-mix(in oklab, var(--color-accent) 12%, transparent);
  color: var(--color-accent);
}
.cmd-row-icon--recent { color: var(--color-text-faint); }
.cmd-row-main {
  flex: 1;
  min-width: 0;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--color-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cmd-row-meta {
  display: block;
  margin-top: 2px;
  font-size: 0.78rem;
  color: var(--color-text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cmd-row-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.cmd-row-body .cmd-row-main { white-space: nowrap; }
.cmd-row-chev,
.cmd-row-remove {
  flex-shrink: 0;
  color: var(--color-text-faint);
}
.cmd-row-remove {
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  opacity: 0;
  transition: opacity 120ms ease, background 120ms ease, color 120ms ease;
}
.cmd-row--recent:hover .cmd-row-remove,
.cmd-row--selected .cmd-row-remove { opacity: 1; }
.cmd-row-remove:hover {
  background: var(--color-surface-offset);
  color: var(--color-text);
}
.cmd-row-thumb {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--color-surface-offset);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.cmd-row-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.cmd-row-thumb-letter {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--color-text-muted);
}
.cmd-row-type-badge {
  flex-shrink: 0;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-faint);
  padding: 2px 8px;
  background: var(--color-surface-offset);
  border-radius: var(--radius-full);
}

/* "View all" row */
.cmd-row--viewall {
  padding: 8px 16px 10px;
  border-left-color: transparent;
}
.cmd-row-viewall-label {
  flex: 1;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--color-accent);
  letter-spacing: 0.01em;
}

/* Highlight matched substrings in result rows */
.cmd-row mark {
  background: color-mix(in oklab, var(--color-accent) 24%, transparent);
  color: inherit;
  border-radius: 2px;
  padding: 0 1px;
}

/* Loading */
.cmd-loading {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 28px 16px;
  font-size: 0.86rem;
  color: var(--color-text-muted);
}
.cmd-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid var(--color-border);
  border-top-color: var(--color-accent);
  border-radius: 50%;
  animation: cmd-spin 720ms linear infinite;
}
@keyframes cmd-spin {
  to { transform: rotate(360deg); }
}

/* Empty (no results) */
.cmd-empty {
  text-align: center;
  padding: 36px 24px;
}
.cmd-empty-icon {
  display: inline-flex;
  margin-bottom: 12px;
  color: var(--color-text-faint);
}
.cmd-empty-title {
  font-size: 0.94rem;
  font-weight: 600;
  color: var(--color-text);
  margin: 0 0 4px;
}
.cmd-empty-desc {
  font-size: 0.82rem;
  color: var(--color-text-muted);
  margin: 0;
}

/* ── Mobile takeover (Q16) ── */
@media (max-width: 767px) {
  .cmd-palette-backdrop { display: none; }
  .cmd-palette-panel {
    left: 0;
    top: 0;
    transform: translateY(8px);
    width: 100vw;
    max-height: none;
    height: 100dvh;
    border-radius: 0;
    border: none;
    padding-top: env(safe-area-inset-top);
  }
  .cmd-palette--open .cmd-palette-panel {
    transform: translateY(0);
    transition: transform 220ms cubic-bezier(0.16, 1, 0.3, 1), opacity 180ms ease;
  }
  .cmd-palette-hint { display: none; }
}

/* Lock body scroll when palette is open */
body.cmd-palette-open { overflow: hidden; }

/* ── /search page: type chips ── */
.section--search-page { padding-top: calc(var(--nav-height) + var(--space-6)); } /* clear the fixed header — search bar hid under it on mobile (2026-07-15) */
.search-chips-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.search-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  font-family: var(--font-body);
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--color-text-muted);
  cursor: pointer;
  transition: background 150ms ease, border-color 150ms ease, color 150ms ease;
}
.search-chip:hover {
  background: var(--color-surface-offset);
  color: var(--color-text);
}
.search-chip.is-active {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: #fff;
}
.search-chip-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 18px;
  padding: 0 6px;
  font-size: 0.7rem;
  font-weight: 700;
  background: color-mix(in oklab, var(--color-text) 8%, transparent);
  color: var(--color-text-muted);
  border-radius: var(--radius-full);
}
.search-chip.is-active .search-chip-count {
  background: rgba(255,255,255,0.22);
  color: #fff;
}

/* =====================================================
   LISTINGS — PREMIUM EDITORIAL REFACTOR
   ===================================================== */

/* Listing card: editorial category tag (replaces image overlay badge) */
.listing-card-category {
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--color-text-faint);
  text-transform: uppercase;
  margin-bottom: var(--space-2);
}

/* Listing card: single dot-separated metadata line */
.listing-card-meta-line {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  font-weight: 400;
  line-height: 1.6;
  margin-top: var(--space-2);
  letter-spacing: 0.01em;
}

.listing-card-title {
  margin-top: 2px;
  margin-bottom: 0;
}

/* Filter bar: desktop seamless canvas with vertical dividers */
@media (min-width: 960px) {
  .filters-bar {
    padding: 0;
  }
  .filters-grid--4 {
    display: flex !important;
    grid-template-columns: none !important;
    gap: 0 !important;
    padding-top: 0 !important;
  }
  .filters-grid--4 .filter-group {
    flex: 1;
    padding: var(--space-4) var(--space-5);
    border-right: 1px solid rgba(0,0,0,0.08);
    min-width: 0;
  }
  .filters-grid--4 .filter-group:last-child {
    border-right: none;
  }
  .filters-grid--4 .filter-select {
    background-color: transparent;
    border: none;
    border-radius: 0;
    padding-left: 0;
    padding-right: calc(var(--space-5) + 4px);
    padding-top: 0;
    padding-bottom: 0;
    min-height: auto;
    font-size: var(--text-base);
  }
  .filters-grid--4 .filter-select:focus {
    outline: none;
    box-shadow: none;
    border: none;
  }
  .filters-more-row {
    padding-left: var(--space-5);
    padding-right: var(--space-5);
    padding-top: var(--space-3);
    padding-bottom: var(--space-3);
    margin-top: 0;
  }
  .filters-more-panel.open {
    padding-left: var(--space-5);
    padding-right: var(--space-5);
    padding-bottom: var(--space-4);
  }
}

/* Mobile / tablet: hide map panel, show pure listing feed */
@media (max-width: 1023px) {
  .split-view-map {
    display: none;
  }
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .split-view-map {
    background: #1a1510;
  }
}
[data-theme="dark"] .split-view-map {
  background: #1a1510;
}


/* =====================================================
   QUOTE ENGINE (Auto-Quote, dashboard, comparison)
   ===================================================== */

/* ---- Supplier Inquiry Automator — full-page premium paywall ---- */
.sia-gate {
  max-width: 560px;
  margin: 0 auto;
  padding: var(--space-8);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  text-align: center;
}
.sia-gate-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: var(--space-4);
  padding: 0.3rem 0.75rem;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8a6d2f;                          /* deep bronze */
  background: rgba(201, 164, 92, 0.14);    /* soft gold wash */
  border: 1px solid rgba(201, 164, 92, 0.4);
  border-radius: var(--radius-full);
}
.sia-gate-title {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--color-heading);
  margin: 0 0 var(--space-3);
}
.sia-gate-lead {
  color: var(--color-text-muted);
  margin: 0 auto var(--space-6);
  max-width: 46ch;
  line-height: 1.6;
}
.sia-gate-list {
  list-style: none;
  display: grid;
  gap: var(--space-3);
  text-align: left;
  max-width: 380px;
  margin: 0 auto var(--space-8);
  padding: 0;
}
.sia-gate-list li {
  position: relative;
  padding-left: 1.9rem;
  font-size: var(--text-sm);
  color: var(--color-text);
}
.sia-gate-list li::before {
  content: "\2713";                        /* gold tick */
  position: absolute;
  left: 0.35rem;
  top: 0;
  color: #b8923f;
  font-weight: 700;
}
.sia-gate-actions {
  display: flex;
  gap: var(--space-3);
  justify-content: center;
  flex-wrap: wrap;
}
.sia-gate-foot {
  margin: var(--space-6) 0 0;
  font-size: var(--text-xs);
  color: var(--color-text-faint);
}
.sia-gate-foot a { color: var(--color-primary); font-weight: 600; }


.gq-auto-bar {
  position: sticky; bottom: 0; z-index: 5;
  display:flex; align-items:center; gap: var(--space-4); flex-wrap: wrap;
  margin-top: var(--space-4);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-4) var(--space-5);
  box-shadow: 0 -2px 12px rgba(0,0,0,0.06);
}
.gq-auto-info { flex:1; min-width: 220px; font-size: var(--text-sm); color: var(--color-text-muted); }
.gq-auto-bar .btn { white-space: nowrap; }

.q-upsell-overlay {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(20,22,28,0.55);
  display:flex; align-items:center; justify-content:center; padding: var(--space-4);
}
.q-upsell-card {
  position: relative; background: var(--color-bg);
  border-radius: var(--radius-lg); max-width: 460px; width: 100%;
  padding: var(--space-8); box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.q-upsell-close { position:absolute; top: var(--space-3); right: var(--space-4); background:none; border:none; font-size: 26px; line-height:1; cursor:pointer; color: var(--color-text-faint); }
.q-upsell-title { font-family: var(--font-display); font-size: var(--text-xl); color: var(--color-heading); margin: 0 0 var(--space-3); }
.q-upsell-desc { font-size: var(--text-sm); color: var(--color-text-muted); line-height:1.6; margin: 0 0 var(--space-4); }
.q-upsell-list { margin: 0 0 var(--space-4); padding-left: var(--space-5); }
.q-upsell-list li { font-size: var(--text-sm); color: var(--color-text); margin-bottom: 6px; }
.q-upsell-note { font-size: var(--text-sm); color: var(--color-text); margin: 0 0 var(--space-4); }
.q-upsell-actions { display:flex; gap: var(--space-3); flex-wrap: wrap; }
.q-upsell-foot { font-size: var(--text-xs); color: var(--color-text-faint); margin: var(--space-4) 0 0; }

.qd-list { display:flex; flex-direction: column; gap: var(--space-3); }
.qd-card {
  display:flex; align-items:center; gap: var(--space-4);
  background: var(--color-surface); border:1px solid var(--color-border);
  border-radius: var(--radius-lg); padding: var(--space-4) var(--space-5);
  text-decoration:none; color: inherit; transition: border-color .15s, box-shadow .15s;
}
.qd-card:hover { border-color: var(--color-primary); box-shadow: 0 2px 10px rgba(0,0,0,0.05); }
.qd-card-main { flex:1; min-width:0; }
.qd-card-title { font-weight: 600; color: var(--color-heading); }
.qd-card-meta { font-size: var(--text-sm); color: var(--color-text-muted); margin-top: 2px; }
.qd-muted { color: var(--color-text-faint); font-weight: 400; }
.qd-attn { color: #c0392b; font-weight: 600; }
.qd-pill { font-size: var(--text-xs); font-weight:600; text-transform: uppercase; letter-spacing:.04em; padding: 3px 10px; border-radius: 999px; }
.qd-pill--open { background: rgba(12,124,132,0.12); color: var(--color-primary); }
.qd-pill--closed { background: var(--color-border); color: var(--color-text-faint); }

.qd-back { font-size: var(--text-sm); color: var(--color-primary); text-decoration:none; display:inline-block; margin-bottom: var(--space-2); }
.qd-live { color:#2e9e5b; font-weight:700; }
.qd-h2 { font-family: var(--font-display); font-size: var(--text-lg); color: var(--color-heading); margin: var(--space-8) 0 var(--space-3); }
.qd-matrix-wrap { overflow-x:auto; border:1px solid var(--color-border); border-radius: var(--radius-lg); }
.qd-matrix { border-collapse: collapse; width:100%; min-width: 520px; }
.qd-matrix th, .qd-matrix td { padding: var(--space-3) var(--space-4); text-align:left; border-bottom:1px solid var(--color-border); font-size: var(--text-sm); vertical-align: top; }
.qd-matrix thead th { background: var(--color-surface); }
.qd-matrix thead th a { color: var(--color-heading); font-weight:700; text-decoration:none; }
.qd-corner, .qd-row-h { position: sticky; left:0; background: var(--color-bg); font-weight:600; color: var(--color-heading); z-index:1; }
.qd-th-meta { font-size: var(--text-xs); font-weight:400; color: var(--color-text-muted); margin-top:2px; }
.qd-price { font-weight:700; color: var(--color-heading); font-variant-numeric: tabular-nums; }
.qd-unit { font-size: var(--text-xs); color: var(--color-text-faint); font-weight:400; }
.qd-incl { font-size: var(--text-xs); color:#2e9e5b; }
.qd-st { font-size: var(--text-xs); font-weight:600; padding:2px 7px; border-radius:999px; background: var(--color-border); color: var(--color-text-faint); }
.qd-st--ok { background: rgba(46,158,91,0.14); color:#2e9e5b; }
.qd-st--wait { background: rgba(212,160,23,0.16); color:#a87f0a; }
.qd-st--attn { background: rgba(192,57,43,0.14); color:#c0392b; }

.qd-thread { border:1px solid var(--color-border); border-radius: var(--radius-md); margin-bottom: var(--space-3); background: var(--color-surface); }
.qd-thread summary { cursor:pointer; padding: var(--space-3) var(--space-4); font-weight:600; color: var(--color-heading); }
.qd-msgs { padding: var(--space-3) var(--space-4); display:flex; flex-direction:column; gap: var(--space-2); }
.qd-msg { max-width: 80%; padding: var(--space-2) var(--space-3); border-radius: var(--radius-md); font-size: var(--text-sm); }
.qd-msg--out { align-self: flex-end; background: rgba(12,124,132,0.10); }
.qd-msg--in { align-self: flex-start; background: var(--color-border); }
.qd-msg-raw { white-space: pre-wrap; }
.qd-msg-tr { margin-top: 4px; font-size: var(--text-xs); color: var(--color-text-muted); font-style: italic; }
.qd-auto { display:inline-block; font-size: 10px; text-transform:uppercase; letter-spacing:.05em; background: var(--color-primary); color:#fff; border-radius:4px; padding:0 5px; margin-right:6px; }

/* =====================================================
   INTERACTIVE LOMBOK MAP + DYNAMIC LISTINGS ENGINE
   (docs/adr/0014) — real-world Leaflet satellite map.
   The remaining --lmap-* vars style the panel chrome
   (mobile toggle icon, back button), not the map itself.
   ===================================================== */

:root, [data-theme="light"] {
  --lmap-sea:    #f2ebe1;
  --lmap-land:   rgba(166, 143, 99, 0.05);
  --lmap-border: #a8946a;
  --lmap-text:   #6b5f4a;
}
[data-theme="dark"] {
  --lmap-sea:    #1c1a15;
  --lmap-land:   #2b271e;
  --lmap-border: #5c5138;
  --lmap-text:   #aaa089;
}

/* ---- Listings layout grid ----
   Mobile: single column, source order = map first, then filters, toolbar,
   grid, pagination. Desktop: grid-areas keep the filter bar + toolbar full
   width on top, with the map in a sticky left column beside the listings.
   The real-world Leaflet map (ADR 0014) needs room to be legible, so in split
   view it takes 60% of the width and the listing cards 40% (single column). */
.listings-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
  align-items: start;
}
/* Descendant, not child: .lst-filters/.lst-toolbar now sit inside the
   display:contents .lst-panel > .lst-panel-body wrappers. */
.listings-layout .lst-filters { margin: 0; }
.listings-layout .lst-toolbar { margin: 0; }
@media (min-width: 1024px) {
  .listings-layout {
    grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
    column-gap: var(--space-6);
    row-gap: var(--space-4);
    grid-template-areas:
      "filters filters"
      "toolbar toolbar"
      "map     list"
      "map     pagination";
  }
  .lst-map        { grid-area: map; }
  .lst-filters    { grid-area: filters; }
  .lst-toolbar    { grid-area: toolbar; }
  .lst-grid       { grid-area: list; }
  .lst-pagination { grid-area: pagination; }
}

/* ---- Desktop view modes (docs/adr/0014): 'overlay' (full-bleed map with a
   floating listings panel — the default) vs 'split' (classic two-column).
   The .lst-panel wrappers are layout-transparent (display:contents) outside
   overlay mode, so the split grid-areas still reach their children; mobile
   always uses the classic collapsible layout. ---- */
.lst-panel,
.lst-panel-body { display: contents; }
.lst-panel-head { display: none; }
.lst-view-toggle { display: none; }

@media (min-width: 1024px) {
  .lst-view-toggle {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 14px;
    border: 1px solid var(--color-border);
    border-radius: 999px;
    background: var(--color-surface);
    font-family: var(--font-body);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--color-text);
    cursor: pointer;
    transition: border-color var(--transition-interactive), color var(--transition-interactive);
  }
  .lst-view-toggle:hover { border-color: var(--color-text-muted); }

  /* Full-bleed map that starts flush under the fixed 57px site header */
  .listings-view--overlay .dir-hero { display: none; }
  .listings-view--overlay .lst-section { padding: 0; }
  .listings-view--overlay .lst-section > .container { max-width: none; width: 100%; padding: 0; }
  .listings-view--overlay .lst-cta-section { display: none; }
  /* Overlay is a full-viewport experience: hide the site footer so the map
     stays pinned and toggling from the scrollable split view can't leave the
     window scrolled onto the footer. :has() means it re-shows automatically in
     split view (class removed) and on any other page (element gone). */
  body:has(.listings-view--overlay) .site-footer { display: none; }
  .listings-view--overlay .listings-layout {
    display: block;
    position: relative;
    margin-top: var(--nav-height); /* was 57px — real header is 80px, search bar sat under it */
    height: calc(100vh - var(--nav-height));
    overflow: hidden;
  }
  .listings-view--overlay .lst-map {
    position: absolute;
    inset: 0;
    height: auto;
    min-height: 0;
    border: 0;
    border-radius: 0;
  }
  /* The back button would hide behind the floating panel top-left — dock it
     under the zoom control instead. */
  .listings-view--overlay .lmap-reset { left: auto; right: 12px; top: 92px; }

  /* Floating listings panel over the map. Width scales with the viewport so the
     listings feel substantial on large screens (JS measures it to inset the
     map fit — see updateOverlayInset). */
  .listings-view--overlay .lst-panel {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 20px;
    left: 20px;
    bottom: 20px;
    width: clamp(420px, 30vw, 640px);
    max-width: calc(100% - 40px);
    z-index: 1200; /* above Leaflet panes/controls (≤1000) and .lmap-reset (1100) */
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
    overflow: hidden;
  }
  .listings-view--overlay .lst-panel-head {
    display: block;
    flex: none;
    padding: 16px 20px 12px;
    border-bottom: 1px solid var(--color-border);
  }
  .listings-view--overlay .lst-panel-title {
    font-family: var(--font-body);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--color-text);
  }
  .listings-view--overlay .lst-panel-body {
    display: flex;
    flex-direction: column;
    gap: var(--space-5);
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 20px 22px 24px;
  }
  /* Roomier list in the wider panel (cards scale up with the panel width; the
     price/title already scale responsively). */
  .listings-view--overlay .listings-grid { gap: var(--space-5); }
  /* Panel-friendly chrome: the filter bar loses its card shell, selects go 2-up
     so nothing squeezes or clips in the 404px column. */
  .listings-view--overlay .lst-filters {
    background: transparent;
    box-shadow: none;
    padding: 0;
    margin: 0;
  }
  /* In the narrow panel the filters stack 2-up as real boxed selects, undoing
     the desktop "seamless canvas" flex row (whose display/grid/gap use
     !important, so the grid override must match). */
  .listings-view--overlay .lst-filters .filters-grid--4 {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: var(--space-3) !important;
    padding-top: 0 !important;
  }
  .listings-view--overlay .lst-filters .filters-grid--4 .filter-group {
    padding: 0;
    border-right: none;
  }
  .listings-view--overlay .lst-filters .filters-grid--4 .filter-select {
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 9px 12px;
    min-height: auto;
    font-size: var(--text-sm);
  }
  .listings-view--overlay .lst-filters .filters-more-row,
  .listings-view--overlay .lst-filters .filters-more-panel.open { padding-left: 0; padding-right: 0; }
  .listings-view--overlay .lst-toolbar { margin: 0; row-gap: var(--space-2); }
  .listings-view--overlay .listings-count { font-size: 16px; }
  .listings-view--overlay .lst-pagination { margin: 0; }
}

.split-view-map--interactive { background: var(--lmap-sea); }

.lmap-panel { height: 100%; display: flex; flex-direction: column; }
.lmap-body { position: relative; flex: 1; min-height: 0; }
.lmap-svg-wrap { position: absolute; inset: 0; }

/* ---- Leaflet real-world map (docs/adr/0014) — replaced the stylised SVG ----
   NOTE: style.css loads BEFORE leaflet.min.css, so rules that fight Leaflet's
   own .leaflet-container styles need the doubled .lmapl.leaflet-container
   selector to win the cascade. */
.lmapl,
.lmapl.leaflet-container {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: #17222b; /* deep sea tone while satellite tiles load */
  font-family: var(--font-body);
}
/* Neutralise base.css's global `img,svg,canvas { max-width:100%; height:auto }`
   reset inside the map — it collapses Leaflet's tiles and the vector overlay
   (same fix as .zlc-map in zoning.css). */
.lmapl .leaflet-pane svg,
.lmapl .leaflet-pane img,
.lmapl .leaflet-pane canvas,
.lmapl img.leaflet-tile { max-width: none !important; max-height: none !important; }
.lmapl .leaflet-interactive:focus,
.lmapl .leaflet-pane path:focus { outline: none; }
.lmapl .lmapl-noclick { cursor: default; } /* dead (count-0) regions/zones */
.lmapl.leaflet-container .leaflet-control-attribution {
  background: rgba(12, 16, 20, 0.55);
  color: rgba(255, 255, 255, 0.72);
  font-size: 9px;
  padding: 2px 6px;
}
.lmapl.leaflet-container .leaflet-control-attribution a { color: rgba(255, 255, 255, 0.85); }
.lmapl-fallback { padding: 20px; font-size: var(--text-sm); color: var(--color-text-muted); }

/* divIcon shell: a zero-size anchor at the latlng; content positions off it */
.lmapl-anchor { background: none; border: none; }

/* ---- Map labels ------------------------------------------------------------
   Every label is a solid chip, not shadowed text. Over satellite imagery the
   backdrop swings from bright cloud/sand to dark sea, and white-on-shadow text
   vanished on the light patches. A near-opaque charcoal chip with cream text
   holds the same contrast everywhere — and reads as the brand's charcoal pill
   (matching the "← All Lombok" control). */
.lmapl-rlabel,
.lmapl-czlabel,
.lmapl-mark-label {
  font-family: var(--font-body);
  background: rgba(20, 24, 28, 0.82);
  color: #f6f2ea;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 4px;
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.4);
}

/* Region name + live count, centred on the region (island zoom). Labels are
   pre-uppercased in JS, so no text-transform (it would also upper the count). */
.lmapl-rlabel {
  position: absolute;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  padding: 5px 12px;
  white-space: nowrap;
  text-align: center;
  cursor: pointer;
}
.lmapl-rlabel-name {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
}
.lmapl-rlabel-count {
  font-family: var(--font-display);
  font-size: 12px;
  font-style: italic;
  color: rgba(246, 242, 234, 0.82);
}
.lmapl-rlabel.empty { opacity: 0.55; cursor: default; }

/* Cluster zone label (docs/adr/0011), shown at region zoom */
.lmapl-czlabel {
  position: absolute;
  transform: translate(-50%, -50%);
  padding: 4px 10px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.09em;
  white-space: nowrap;
  cursor: pointer;
}
.lmapl-czlabel.empty { opacity: 0.5; cursor: default; }

/* Area / Place dot markers with side labels (lp-* = curated label placement) */
.lmapl-mark { position: absolute; cursor: pointer; }
/* Invisible 30px hit disc centred on the dot — restores the old map's tap
   forgiveness (the visible dot alone is a 10px touch target). */
.lmapl-mark::before {
  content: '';
  position: absolute;
  left: -15px;
  top: -15px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
}
.lmapl-mark .lmapl-dot {
  position: absolute;
  left: -5px;
  top: -5px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--color-accent);
  border: 1.5px solid rgba(255, 255, 255, 0.92);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.55);
  transition: transform 0.25s cubic-bezier(0.25, 1, 0.5, 1), background 0.25s;
}
.lmapl-mark:hover .lmapl-dot { transform: scale(1.35); }
.lmapl-mark.active .lmapl-dot { transform: scale(1.5); background: #fff; border-color: var(--color-accent); }
.lmapl-mark.empty { opacity: 0.55; }
.lmapl-mark-label {
  position: absolute;
  /* Diagonal lane: each chip ascends steeply up-right from its dot, pivoting at
     the dot end, so densely-packed coastal markers (e.g. Kuta–Mandalika) each
     get their own lane and never overlap — while the chip stays a legible
     left-to-right word. Applies on mobile too (no media query). */
  left: 9px;
  top: -8px;
  transform-origin: left center;
  transform: rotate(-48deg);
  padding: 2px 7px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  white-space: nowrap;
}
.lmapl-mark:hover .lmapl-mark-label { background: rgba(10, 12, 15, 0.9); }
.lmapl-mark.active .lmapl-mark-label {
  background: var(--color-accent);
  border-color: rgba(255, 255, 255, 0.55);
  color: #fff;
}
/* All marker labels share the one diagonal lane above (the curated lp-* classes
   from the SVG era no longer drive placement — the steep angle handles density
   uniformly). */

/* Place dots: secondary — smaller, labels appear when zoomed in / hovered / active */
.lmapl-place .lmapl-dot {
  left: -4px;
  top: -4px;
  width: 8px;
  height: 8px;
  background: rgba(245, 239, 228, 0.95);
  border: 1.5px solid var(--color-accent);
}
.lmapl-place.active .lmapl-dot { background: var(--color-accent); border-color: rgba(255, 255, 255, 0.92); }
/* visibility:hidden (not just opacity) so a hidden name can't steal clicks */
.lmapl-place .lmapl-mark-label { font-size: 9.5px; padding: 2px 6px; opacity: 0; visibility: hidden; transition: opacity 0.25s; }
.lmapl-deep .lmapl-place .lmapl-mark-label,
.lmapl-place:hover .lmapl-mark-label,
.lmapl-place.active .lmapl-mark-label { opacity: 1; visibility: visible; }

/* Mobile: the map panel is a fraction of the desktop map's size, so the label
   chips must shrink with it — at desktop sizes they blanket the island. Sizes
   are held below the desktop scale and the region-count line is dropped to a
   single compact line so six region chips fit the ~330px map without covering
   it. */
@media (max-width: 1023px) {
  .lmapl-rlabel { padding: 2px 7px; gap: 0; }
  .lmapl-rlabel-name { font-size: 8px; letter-spacing: 0.08em; }
  .lmapl-rlabel-count { font-size: 8px; }
  .lmapl-czlabel { padding: 2px 6px; font-size: 8px; letter-spacing: 0.04em; }
  .lmapl-mark-label { font-size: 8px; padding: 1px 5px; letter-spacing: 0.03em; }
  .lmapl-place .lmapl-mark-label { font-size: 7.5px; }
}

.lmap-reset {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 1100; /* above Leaflet's control panes (z 1000) */
  appearance: none;
  border: 1px solid var(--lmap-border);
  background: rgba(242, 235, 225, 0.82);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  padding: 8px 16px;
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--lmap-text);
  cursor: pointer;
  transition: all var(--transition-interactive);
}
.lmap-reset:hover { color: var(--color-text); border-color: var(--lmap-text); }
[data-theme="dark"] .lmap-reset { background: rgba(28, 26, 21, 0.82); }

/* ---- Mobile: prominent collapsible map panel ---- */
.lmap-toggle { display: none; }
@media (max-width: 1023px) {
  /* Override the legacy "hide map on mobile" rule — the interactive map
     collapses into a prominent panel instead of disappearing. */
  .split-view-map--interactive { display: block; min-height: 0; height: auto; position: static; }
  .lmap-toggle {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    padding: 14px 16px;
    background: transparent;
    border: 0;
    cursor: pointer;
    text-align: left;
  }
  .lmap-toggle-icon { width: 50px; height: 36px; flex: none; }
  .lmap-toggle-icon path { fill: var(--lmap-land); stroke: var(--lmap-border); stroke-width: 14; stroke-linejoin: round; }
  .lmap-toggle-text { min-width: 0; }
  .lmap-toggle-title {
    display: block;
    font-family: var(--font-body);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--color-text);
  }
  .lmap-toggle-sub {
    display: block;
    font-family: var(--font-display);
    font-size: 16px;
    font-style: italic;
    color: var(--color-text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .lmap-toggle-clear {
    margin-left: auto;
    flex: none;
    width: 26px;
    height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--color-border);
    border-radius: 50%;
    font-size: 15px;
    line-height: 1;
    color: var(--color-text-muted);
  }
  .lmap-toggle-clear[hidden] { display: none; }
  .lmap-toggle-chevron { margin-left: auto; flex: none; color: var(--color-text-muted); transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1); }
  .lmap-toggle-clear:not([hidden]) + .lmap-toggle-chevron { margin-left: 10px; }
  .lmap-toggle.open .lmap-toggle-chevron { transform: rotate(180deg); }
  .lmap-body {
    flex: none;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s cubic-bezier(0.25, 1, 0.5, 1);
  }
  .lmap-body.open { max-height: 360px; }
  .lmap-svg-wrap { position: relative; inset: auto; height: 330px; }
}

/* ---- Board map panel (Job Board / Marketplace / Vendor directory) ----
   The listings map's collapsible mobile pattern, promoted to all widths:
   an "Explore by Map" bar that folds out the interactive Leaflet map. */
.bmap-panel {
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  margin: 0 0 var(--space-5);
}
.bmap-toggle {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 14px 16px;
  background: transparent;
  border: 0;
  cursor: pointer;
  text-align: left;
}
.bmap-toggle-icon { width: 50px; height: 36px; flex: none; }
.bmap-toggle-icon path { fill: var(--lmap-land); stroke: var(--lmap-border); stroke-width: 14; stroke-linejoin: round; }
.bmap-toggle-text { min-width: 0; }
.bmap-toggle-title {
  display: block;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-text);
}
.bmap-toggle-sub {
  display: block;
  font-family: var(--font-display);
  font-size: 16px;
  font-style: italic;
  color: var(--color-text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bmap-toggle-clear {
  margin-left: auto;
  flex: none;
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--color-border);
  border-radius: 50%;
  font-size: 15px;
  line-height: 1;
  color: var(--color-text-muted);
}
.bmap-toggle-clear[hidden] { display: none; }
.bmap-toggle-chevron { margin-left: auto; flex: none; color: var(--color-text-muted); transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1); }
.bmap-toggle-clear:not([hidden]) + .bmap-toggle-chevron { margin-left: 10px; }
.bmap-toggle.open .bmap-toggle-chevron { transform: rotate(180deg); }
.bmap-body {
  position: relative;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s cubic-bezier(0.25, 1, 0.5, 1);
}
.bmap-body.open { max-height: 520px; }
.bmap-map { position: relative; height: clamp(340px, 48vh, 500px); }
@media (max-width: 1023px) {
  .bmap-body.open { max-height: 360px; }
  .bmap-map { height: 330px; }
}

/* ---- Listings toolbar: count, currency pills, sort ---- */
.listings-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  flex-wrap: wrap;
  margin: var(--space-5) 0 var(--space-4);
}
.listings-count {
  font-family: var(--font-display);
  font-size: 19px;
  font-style: italic;
  color: var(--color-text-muted);
}
.listings-toolbar-right {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-left: auto;
  flex-wrap: wrap;
}
/* .cur-pills / .cur-pill share the unified segmented-toggle look defined with
   .seg-pills / .seg-pill below (brand-colour pass 2026-07-24). */
.filter-select--sort { min-width: 170px; }
.filter-label-cur { opacity: 0.6; font-weight: 400; letter-spacing: 0; text-transform: none; }

/* ---- Segmented pill toggles & compound range filters (brand pass 2026-07-24)
   The Price basis (Total / Per are / Per m²), Land Size unit (m² / are) and the
   display-currency selectors share ONE segmented look: a recessed track holding a
   raised, teal-washed ACTIVE segment — the single action colour per the brand doc
   (§4/§7 chip recipe), never a heavy dark block. Tokens only → both themes adapt. */
.seg-pills,
.cur-pills {
  display: inline-flex;
  max-width: 100%;
  gap: 2px;
  padding: 3px;
  background: var(--color-surface-offset);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
}
.seg-pill,
.cur-pill {
  appearance: none;
  border: 0;
  background: transparent;
  border-radius: var(--radius-full);
  padding: 5px 12px;
  font-family: var(--font-body);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.05em;
  line-height: 1;
  color: var(--color-text-muted);
  cursor: pointer;
  white-space: nowrap;
  transition: color var(--transition-interactive), background var(--transition-interactive);
}
.seg-pill { flex: 1 1 0; min-width: 0; }         /* basis/unit fill their column */
.seg-pill:hover,
.cur-pill:hover { color: var(--color-text); }
.seg-pill.active,
.cur-pill.active {
  background: var(--color-accent-highlight);     /* teal wash — the active colour */
  color: var(--color-accent);
  font-weight: 700;
}
/* Currency pills inside the Price filter group (moved from the toolbar
   2026-08-01): stretch across the column like the basis pills below them. */
.cur-pills--filter { display: flex; }
.cur-pills--filter .cur-pill { flex: 1 1 0; min-width: 0; text-align: center; }

.filter-group--range { gap: 7px; }
.filter-range { display: flex; align-items: center; gap: var(--space-2); }
.filter-range-sep { color: var(--color-text-faint); flex: 0 0 auto; }
.filter-hint { font-size: 11px; line-height: 1.35; color: var(--color-text-muted); margin-top: 1px; }
.filter-input {
  flex: 1 1 0;
  min-width: 0;
  width: 100%;
  padding: 8px 12px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  color: var(--color-text);
  outline: none;
  min-height: 40px;
  transition: border-color var(--transition-interactive), box-shadow var(--transition-interactive);
}
.filter-input::placeholder { color: var(--color-text-faint); }
.filter-input:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px var(--color-accent-highlight);
}
.filter-input::-webkit-outer-spin-button,
.filter-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.filter-input[type="number"] { -moz-appearance: textfield; appearance: textfield; }
/* Desktop "seamless canvas" row (≥960px): keep the boxed range inputs tight so the
   flex row stays balanced against the borderless selects. */
@media (min-width: 960px) {
  .filters-grid--4 .filter-group--range { justify-content: flex-start; }
  .filters-grid--4 .filter-input { min-height: 38px; }
}

/* ---- Dynamic filter behaviour ---- */
.fg-hidden { display: none; }
.listings-grid { transition: opacity 0.25s ease; }
.listings-grid.grid-loading { opacity: 0.45; pointer-events: none; }
.price-approx { font-size: 0.7em; opacity: 0.65; margin-right: 3px; vertical-align: 0.12em; }

/* ---- Place filter chips (Area→Place narrowing, docs/adr/0010) ---- */
.place-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 var(--space-4);
}
.place-chips[hidden] { display: none; }
.place-chips-label {
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-right: 2px;
}
.place-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 13px;
  border-radius: 20px;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text-muted);
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-interactive);
}
.place-chip:hover { border-color: var(--color-accent); color: var(--color-text); }
.place-chip.active { background: var(--color-text); border-color: var(--color-text); color: var(--color-surface); }
.place-chip-n { opacity: 0.55; font-variant-numeric: tabular-nums; }
.place-chip.active .place-chip-n { opacity: 0.8; }

.listings-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  margin-top: var(--space-8);
}
.pagination-info {
  font-family: var(--font-display);
  font-size: 16px;
  font-style: italic;
  color: var(--color-text-muted);
}

/* [hidden] must win over .btn display rules */
#clearAllFiltersBtn[hidden], .lmap-reset[hidden] { display: none !important; }

/* =====================================================
   EDITORIAL DIRECTORY — Developers & Projects
   Travel-magazine discovery layout. Photography-dominant,
   borderless cards on the natural page canvas, minimal
   typography. Mirrors the homepage "Featured" aesthetic.
   ===================================================== */

/* Page section — light canvas, clears the fixed nav, generous whitespace.
   Editorial colour scale (exact spec values, kept theme-aware via vars). */
/* Brand-colour pass 2026-07-24 (docs/brand-colors.md): local aliases now resolve
   to design tokens — teal eyebrows, navy CTAs, gold stars — so both themes adapt
   automatically and the hardcoded-grey token violation is gone. */
.dev-dir {
  --dev-label: var(--color-accent);      /* category / location eyebrow — teal */
  --dev-title: var(--color-text);        /* project title */
  --dev-body:  var(--color-text-muted);  /* body description */
  --dev-cta:   var(--color-primary);     /* CTA links — deep navy */
  background: var(--color-bg);
  padding-top: calc(var(--nav-height) + clamp(40px, 6vw, 72px));
  padding-bottom: clamp(64px, 10vw, 128px);
}


/* ── Editorial header ─────────────────────────────────────────────── */
.dev-dir-head {
  max-width: 60ch;
  margin-bottom: clamp(var(--space-8), 5vw, var(--space-16));
}
.dev-dir-eyebrow {
  display: block;
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: var(--space-3);
}
.dev-dir-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 1.2rem + 2.4vw, 3.5rem);
  font-weight: 400;
  color: var(--color-text);
  letter-spacing: -0.02em;
  line-height: 1.06;
  margin: 0 0 var(--space-4);
}
.dev-dir-desc {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.05rem, 0.9rem + 0.5vw, 1.4rem);
  line-height: 1.5;
  color: var(--color-text-muted);
  margin: 0;
}

/* ── Cover-story feature row (lead developer) ───────────────────────
   Sits on a warm sand wash (secondary-highlight) — the brand's "featured
   panel" recipe. The wash adapts to a deep warm brown in dark mode. */
.dev-feature {
  display: grid;
  grid-template-columns: 7fr 5fr;
  gap: clamp(var(--space-6), 4vw, var(--space-10));
  align-items: center;
  margin-bottom: clamp(var(--space-12), 7vw, var(--space-20));
  background: var(--color-secondary-highlight);
  border-radius: var(--radius-xl);
  padding: clamp(var(--space-4), 3vw, var(--space-8));
}
.dev-feature-media {
  display: block;
  aspect-ratio: 21 / 9;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--color-surface-offset);
}
.dev-feature-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s cubic-bezier(0.25, 1, 0.5, 1);
}
.dev-feature:hover .dev-feature-media img { transform: scale(1.03); }
.dev-feature-eyebrow {
  display: block;
  font-family: var(--font-body);
  font-size: 0.63rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  /* accent-HOVER, not accent: on the sand panel plain teal is 4.19:1 (sub-AA
     for 10px text); the darker step is 5.49:1 light / passes dark too. */
  color: var(--color-accent-hover);
  margin-bottom: var(--space-3);
}
.dev-feature-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin: 0 0 var(--space-2);
}
.dev-feature-title a { color: var(--dev-title); text-decoration: none; }
.dev-feature-title a:hover { color: var(--color-primary); }
.dev-feature-rating {
  display: block;
  font-family: var(--font-body);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  /* muted (not faint) — faint on the sand panel is ~2.1:1, unreadable */
  color: var(--color-text-muted);
  margin-bottom: var(--space-3);
}
/* Dark sand panel: muted is 4.3:1 there — step up to full ink for AA */
[data-theme="dark"] .dev-feature-rating { color: var(--color-text); }
.dev-feature-desc {
  font-size: var(--text-base);
  line-height: 1.7;
  color: var(--dev-body);
  margin: 0 0 var(--space-4);
  max-width: 46ch;
}
@media (max-width: 767px) {
  .dev-feature { grid-template-columns: 1fr; gap: var(--space-4); }
  .dev-feature-media { aspect-ratio: 4 / 3; }
}

/* The ★ glyph carries the brand's rating gold; the numeric text stays quiet.
   (--color-star is theme-invariant — docs/brand-colors.md §2 fixed accents.) */
.dev-star { color: var(--color-star); }

/* Featured developer CTA — the one solid primary button on the page */
.dev-feature-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  align-self: flex-start;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--color-text-inverse);
  background: var(--color-primary);
  padding: 12px 26px;
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: background 0.3s cubic-bezier(0.25, 1, 0.5, 1),
              transform 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}
.dev-feature-cta:hover { background: var(--color-primary-hover); transform: translateY(-1px); }
.dev-feature-cta svg { flex-shrink: 0; }

/* Quiet card rating line — typographic, gold star accent only */
.dev-card-rating {
  display: block;
  font-family: var(--font-body);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-faint);
  margin-top: var(--space-1);
}

.dev-empty {
  grid-column: 1 / -1;
  font-family: var(--font-display);
  font-style: italic;
  font-size: var(--text-lg);
  color: var(--color-text-muted);
  padding: var(--space-12) 0;
  text-align: center;
}

/* ── Editorial card (shared base — vertical stack) ────────────────────
   No border, no background block, no shadow. Image dominant.
   Spacing is asymmetric (engineered step-down), so no uniform gap —
   each text element declares its own top margin from the previous one. */
.dev-card {
  display: flex;
  flex-direction: column;
}
.dev-card-media {
  display: block;
  overflow: hidden;                 /* clips the hover scale */
  margin-bottom: 16px;              /* image → category label */
  border-radius: var(--radius-lg);
  aspect-ratio: 16 / 10;            /* sweeping landscape crop */
  background: var(--color-surface-offset);
}
.dev-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.7s cubic-bezier(0.22, 1, 0.3, 1);
  will-change: transform;
}
/* Micro-interaction: only the image scales; text stays perfectly static */
.dev-card:hover .dev-card-img { transform: scale(1.03); }

/* Placeholder when a developer has no photography yet */
.dev-card-media--empty {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--color-surface-offset) 0%, var(--color-surface-offset-2) 100%);
}
.dev-card-media-mark {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 400;
  color: var(--color-text-faint);
  line-height: 1;
}

.dev-card-body {
  display: flex;
  flex-direction: column;
}

/* Category / location label — 10px, uppercase, wide tracking, soft grey */
.dev-card-loc {
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.15em;
  line-height: 1.2;
  text-transform: uppercase;
  color: var(--dev-label);
}

/* Project title — 22px editorial serif. Category → title = 6px (tightly bound) */
.dev-card-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: 0;
  margin: 6px 0 0;
}
.dev-card-title a {
  color: var(--dev-title);
  text-decoration: none;
  transition: color 0.25s ease;
}
.dev-card-title a:hover { color: var(--color-primary); }

/* Body description — 14px light, premium charcoal. Title → body = 12px.
   Strict two-line constraint with a clean clip — NO ellipsis. (em-based
   so the clamp holds at any font size, e.g. the larger Option B rows.) */
.dev-card-desc {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 300;
  line-height: 1.5;
  color: var(--dev-body);
  margin: 12px 0 0;
  max-height: 3em;          /* 2 lines × 1.5 line-height */
  overflow: hidden;
}

/* Primary CTA — a distinct interactive anchor, stepped 24px below the body */
.dev-card-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  align-self: flex-start;
  margin-top: 24px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--dev-cta);
  text-decoration: none;
  transition: color 0.25s ease;
}
.dev-card-link svg {
  transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
  flex-shrink: 0;
}
.dev-card-link:hover { color: var(--color-accent); }
.dev-card-link:hover svg { transform: translateX(5px); }

/* Admin edit wrapper inside the grid still behaves as a grid item */
.dev-portfolio-grid > .admin-card-wrap { position: relative; }

/* ── Uniform editorial grid ───────────────────────────────────────────
   Every card identical in size, two per row on desktop. (The former
   asymmetric "magazine" layout was retired — uniform cards read cleaner
   and scale to any listing count.) */
.dev-portfolio-grid {
  display: grid;
  grid-template-columns: 1fr;
  /* Row gap = component isolation margin: generous whitespace between
     one card's CTA and the next card's image. */
  gap: clamp(56px, 7vw, 80px) clamp(var(--space-8), 4vw, var(--space-12));
  align-items: start;
}
@media (min-width: 640px) {
  .dev-portfolio-grid { grid-template-columns: repeat(2, 1fr); }
}


/* ── Admin-only nav chip (hidden features: Tender Board, AI Studio) ────── */
.nav-admin-chip {
  display: inline-block;
  margin-left: 8px;
  padding: 1px 7px 2px;
  border-radius: var(--radius-full, 999px);
  background: var(--color-primary, #0c7c84);
  color: var(--color-text-inverse, #fff);
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: .12em;
  vertical-align: 1px;
}

/* ============================================================================
   Mobile hero renditions (page-speed pass, 2026-07-22)
   Phones don't need the 1500px hero photos — serve ~900px WebP variants to cut
   LCP weight. Placed last in source order so these win the cascade over the
   desktop hero rules above (equal specificity → later wins) when the query
   matches. Desktop is untouched. Originals kept as the fallback.
   ========================================================================== */
@media (max-width: 768px) {
  /* 2026-08-11: the -mobile pair became a sharper 680×837 CENTRE CROP of the
     1500px masters (same central band phones were already cover-cropping to,
     ~1.7x less upscaling) — ?v= busts the 30-day image cache. The two crops
     are identical so photo/wireframe stay pixel-registered. The inline hero
     preload in index.html must carry the SAME versioned URL. */
  .hero-bg           { background-image: url('./images/hero-main-mobile.webp?v=20260811hero1'); }
  .hero-wire         { background-image: url('./images/hero-wire-mobile.webp?v=20260811hero1'); }
  .dir-hero::before  { background-image: url('./images/hero-construction-mobile.webp'); }
  .detail-hero::before { background-image: url('./images/hero-lifestyle-mobile.webp'); }
  .dev-hero-bg--default { background-image: url('./images/hero-lifestyle-mobile.webp'); }
}
