/* ============================================================
   Housing Works — Listings Design System
   Tokens
   ------------------------------------------------------------
   Three swappable directions across a spectrum, all rooted in
   the Housing Works brand (sage logo + terracotta chimney +
   warm cream backgrounds), all targeting WCAG AAA.

   A · Cascade     — Editorial Civic.   Deep sage + clay, serif headlines.
   B · High Desert — Place-rooted.      Sage + sky + sand, single grotesk.
   C · Foundry     — Modern PropTech.   Forest + terracotta, geometric sans.
   ============================================================ */

/* ============================================================
   Universal — applies regardless of direction
   ============================================================ */
:root {
  /* Spacing scale (rem-based, multiples of 4px) */
  --space-1: 0.25rem;  /* 4 */
  --space-2: 0.5rem;   /* 8 */
  --space-3: 0.75rem;  /* 12 */
  --space-4: 1rem;     /* 16 */
  --space-5: 1.5rem;   /* 24 */
  --space-6: 2rem;     /* 32 */
  --space-7: 2.5rem;   /* 40 */
  --space-8: 3rem;     /* 48 */
  --space-9: 4rem;     /* 64 */
  --space-10: 5rem;    /* 80 */
  --space-11: 6rem;    /* 96 */
  --space-12: 8rem;    /* 128 */

  /* Hit targets — AAA-friendly */
  --tap-min: 48px;

  /* Focus ring — universal, drawn with two layers to guarantee
     3:1 contrast on any background. */
  --focus-ring-inner: 0 0 0 2px var(--surface-0);
  --focus-ring-outer: 0 0 0 5px var(--focus-color);
  --focus-ring: var(--focus-ring-inner), var(--focus-ring-outer);

  /* Status semantics — sacred, shared across directions */
  --status-available-fg: #1F5A33;
  --status-available-bg: #E1F2E5;
  --status-waitlist-fg: #7A4A00;
  --status-waitlist-bg: #FBEACB;
  --status-closed-fg: #6B0F1A;
  --status-closed-bg: #FADBDE;
  --status-new-fg: #1B3A6B;
  --status-new-bg: #DCE7F7;

  /* Map pins (consistent across directions) */
  --pin-available: #2F7A45;
  --pin-waitlist: #C28019;
  --pin-closed: #B23030;

  /* Easings & durations */
  --ease-out: cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --dur-fast: 120ms;
  --dur: 200ms;
  --dur-slow: 320ms;
}

/* ============================================================
   DIRECTION A — Cascade (Editorial Civic)
   Refined sage + clay terracotta, warm cream canvas.
   Newsreader display + Public Sans body. Subtle, civic, magazine-like.
   ============================================================ */
[data-direction="cascade"] {
  /* — Brand primary: deep sage scale — */
  --primary-50:  #EEF4EE;
  --primary-100: #D4E4D6;
  --primary-200: #ABC7AF;
  --primary-300: #7FA887;
  --primary-400: #588866;
  --primary-500: #3D6B52;   /* PRIMARY */
  --primary-600: #2F5640;
  --primary-700: #234232;
  --primary-800: #182F24;
  --primary-900: #0E1F18;
  --primary-950: #07120E;

  /* — Accent: terracotta clay (chimney color, matured) — */
  --accent-50:  #FBEFE7;
  --accent-100: #F5D8C2;
  --accent-200: #E9B289;
  --accent-300: #D88B58;
  --accent-400: #C26C34;
  --accent-500: #B25529;   /* ACCENT */
  --accent-600: #944320;
  --accent-700: #76341A;
  --accent-800: #582614;
  --accent-900: #3B190D;

  /* — Neutrals: warm stone — */
  --neutral-0:   #FFFFFF;
  --neutral-50:  #FAF6EE;   /* canvas */
  --neutral-100: #F2EBDD;
  --neutral-150: #E8DFCD;
  --neutral-200: #DACDB4;
  --neutral-300: #BBAB8E;
  --neutral-400: #8E7F66;
  --neutral-500: #6B5E48;
  --neutral-600: #4D4232;
  --neutral-700: #342C20;
  --neutral-800: #221C15;
  --neutral-900: #16110C;

  /* — Surfaces — */
  --surface-0: #FAF6EE;   /* page background */
  --surface-1: #FFFFFF;   /* card */
  --surface-2: #F2EBDD;   /* sunken */
  --surface-inverse: #16241B; /* dark band */

  /* — Foreground (AAA on surface-0 & surface-1) — */
  --fg-1: #16110C;        /* body, 14:1 */
  --fg-2: #4D4232;        /* secondary, 7.4:1 */
  --fg-3: #6B5E48;        /* tertiary, 5.5:1 — use only on large text */
  --fg-on-primary: #FFFFFF;
  --fg-on-accent: #FFFFFF;
  --fg-on-inverse: #FAF6EE;
  --fg-on-inverse-muted: #C9C0AC;

  /* — Borders (felt, not seen) — */
  --border-soft: rgba(22, 17, 12, 0.08);
  --border-firm: rgba(22, 17, 12, 0.16);
  --border-strong: var(--primary-700);

  /* — Focus — */
  --focus-color: var(--accent-500);

  /* — Type — */
  --font-display: "Newsreader", "Source Serif 4", Georgia, serif;
  --font-sans: "Public Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --display-tracking: -0.02em;
  --body-tracking: 0;
  --display-weight: 500; /* serif looks best at lighter weight */

  /* — Radii (refined, restrained) — */
  --radius-xs: 3px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --radius-2xl: 28px;
  --radius-full: 999px;

  /* — Shadows (warm, soft, never harsh) — */
  --shadow-xs: 0 1px 2px rgba(22, 17, 12, 0.04);
  --shadow-sm: 0 1px 3px rgba(22, 17, 12, 0.06), 0 1px 2px rgba(22, 17, 12, 0.04);
  --shadow-md: 0 4px 14px -2px rgba(22, 17, 12, 0.08), 0 2px 6px -1px rgba(22, 17, 12, 0.06);
  --shadow-lg: 0 12px 32px -6px rgba(22, 17, 12, 0.12), 0 6px 14px -4px rgba(22, 17, 12, 0.08);
  --shadow-xl: 0 24px 56px -8px rgba(22, 17, 12, 0.18);

  /* — Card metaphor — */
  --card-bg: var(--surface-1);
  --card-border: 1px solid var(--border-soft);
  --card-radius: var(--radius-lg);
  --card-shadow: var(--shadow-sm);
  --card-shadow-hover: var(--shadow-md);

  /* — Buttons — */
  --btn-radius: var(--radius-md);
  --btn-font-weight: 600;
}

/* ============================================================
   DIRECTION B — High Desert (Place-rooted Modern)
   Logo sage as primary + juniper sky + warm sand. Bone canvas.
   Schibsted Grotesk throughout. Calm Pacific NW outdoor character.
   ============================================================ */
[data-direction="desert"] {
  /* — Brand primary: sage (closer to logo) — */
  --primary-50:  #F0F4F1;
  --primary-100: #DBE6DD;
  --primary-200: #B6CCBC;
  --primary-300: #8FAE96;
  --primary-400: #6E8B72;
  --primary-500: #547057;   /* PRIMARY — close to logo sage but deeper for AAA */
  --primary-600: #425946;
  --primary-700: #344638;
  --primary-800: #25322A;
  --primary-900: #16201A;
  --primary-950: #0A100D;

  /* — Accent: juniper sky (Cascade range) — */
  --accent-50:  #ECF1F6;
  --accent-100: #D3DEEC;
  --accent-200: #A8BDD8;
  --accent-300: #7B9CC1;
  --accent-400: #587FAA;
  --accent-500: #3F668F;   /* ACCENT */
  --accent-600: #2F5070;
  --accent-700: #243E58;
  --accent-800: #182A3D;
  --accent-900: #0E1A26;

  /* — Tertiary: warm sand (for amber/highlights, not buttons) — */
  --sand-300: #ECC98E;
  --sand-400: #D9B273;
  --sand-500: #BD8F4A;
  --sand-700: #6E4E1E;

  /* — Neutrals: bone & basalt — */
  --neutral-0:   #FFFFFF;
  --neutral-50:  #F5F0E5;   /* canvas (bone) */
  --neutral-100: #ECE6D7;
  --neutral-150: #DDD5C2;
  --neutral-200: #C4BBA6;
  --neutral-300: #9D9483;
  --neutral-400: #6E685B;
  --neutral-500: #4E4940;
  --neutral-600: #38342D;
  --neutral-700: #25221D;
  --neutral-800: #1A1815;
  --neutral-900: #0E0D0B;

  /* — Surfaces — */
  --surface-0: #F5F0E5;
  --surface-1: #FFFFFF;
  --surface-2: #ECE6D7;
  --surface-inverse: #1F2228;

  /* — Foreground (AAA) — */
  --fg-1: #1A1815;        /* body */
  --fg-2: #38342D;        /* secondary */
  --fg-3: #4E4940;        /* tertiary (large text only) */
  --fg-on-primary: #FFFFFF;
  --fg-on-accent: #FFFFFF;
  --fg-on-inverse: #F5F0E5;
  --fg-on-inverse-muted: #BFB6A2;

  --border-soft: rgba(26, 24, 21, 0.09);
  --border-firm: rgba(26, 24, 21, 0.18);
  --border-strong: var(--primary-700);

  --focus-color: var(--accent-500);

  /* — Type (single family does all work; weight does hierarchy) — */
  --font-display: "Schibsted Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-sans: "Schibsted Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --display-tracking: -0.025em;
  --body-tracking: -0.005em;
  --display-weight: 700;

  /* — Radii (moderate) — */
  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 22px;
  --radius-2xl: 32px;
  --radius-full: 999px;

  /* — Shadows — */
  --shadow-xs: 0 1px 2px rgba(26, 24, 21, 0.05);
  --shadow-sm: 0 2px 6px rgba(26, 24, 21, 0.07), 0 1px 2px rgba(26, 24, 21, 0.04);
  --shadow-md: 0 8px 20px -4px rgba(26, 24, 21, 0.10), 0 3px 8px -2px rgba(26, 24, 21, 0.06);
  --shadow-lg: 0 18px 40px -8px rgba(26, 24, 21, 0.14), 0 8px 16px -6px rgba(26, 24, 21, 0.08);
  --shadow-xl: 0 32px 64px -12px rgba(26, 24, 21, 0.20);

  --card-bg: var(--surface-1);
  --card-border: 1px solid var(--border-soft);
  --card-radius: var(--radius-lg);
  --card-shadow: var(--shadow-sm);
  --card-shadow-hover: var(--shadow-md);

  --btn-radius: var(--radius-md);
  --btn-font-weight: 600;
}

/* ============================================================
   DIRECTION C — Foundry (Modern PropTech, listing-first)
   Confident forest green + warm terracotta accent.
   Plus Jakarta Sans throughout. Bold, vibrant, Zillow energy.
   ============================================================ */
[data-direction="foundry"] {
  /* — Brand primary: forest green (action color) — */
  --primary-50:  #E6F3EC;
  --primary-100: #C2E2CE;
  --primary-200: #87C6A0;
  --primary-300: #4FA877;
  --primary-400: #2F8A5C;
  --primary-500: #1E7048;   /* PRIMARY */
  --primary-600: #155939;
  --primary-700: #0F462C;
  --primary-800: #0A3320;
  --primary-900: #052017;
  --primary-950: #02130D;

  /* — Accent: terracotta (chimney color, more saturated) — */
  --accent-50:  #FDEDE3;
  --accent-100: #FAD3BB;
  --accent-200: #F4A57E;
  --accent-300: #ED7A4D;
  --accent-400: #E25D2F;
  --accent-500: #C84A1D;   /* ACCENT (deep enough for AAA on white) */
  --accent-600: #A53C16;
  --accent-700: #832E10;
  --accent-800: #61210B;
  --accent-900: #401506;

  /* — Neutrals: cool slate (modern PropTech) — */
  --neutral-0:   #FFFFFF;
  --neutral-50:  #FFFFFF;
  --neutral-100: #F5F7F6;
  --neutral-150: #EBEEEC;
  --neutral-200: #DCE1DF;
  --neutral-300: #BFC6C2;
  --neutral-400: #8A9692;
  --neutral-500: #5E6A66;
  --neutral-600: #3F4946;
  --neutral-700: #283231;
  --neutral-800: #161E1D;
  --neutral-900: #0B1212;

  /* — Surfaces — */
  --surface-0: #FFFFFF;
  --surface-1: #FFFFFF;
  --surface-2: #F5F7F6;
  --surface-inverse: #0F462C;

  /* — Foreground (AAA on white) — */
  --fg-1: #0B1212;        /* body, 18:1 */
  --fg-2: #283231;        /* secondary, 12:1 */
  --fg-3: #3F4946;        /* tertiary, 8:1 */
  --fg-on-primary: #FFFFFF;
  --fg-on-accent: #FFFFFF;
  --fg-on-inverse: #FFFFFF;
  --fg-on-inverse-muted: #C2E2CE;

  --border-soft: rgba(11, 18, 18, 0.08);
  --border-firm: rgba(11, 18, 18, 0.16);
  --border-strong: var(--primary-700);

  --focus-color: var(--accent-500);

  /* — Type — */
  --font-display: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-sans: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --display-tracking: -0.035em;
  --body-tracking: -0.01em;
  --display-weight: 800;

  /* — Radii (bold) — */
  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-2xl: 36px;
  --radius-full: 999px;

  /* — Shadows (crisp) — */
  --shadow-xs: 0 1px 2px rgba(11, 18, 18, 0.05);
  --shadow-sm: 0 2px 8px rgba(11, 18, 18, 0.06), 0 1px 3px rgba(11, 18, 18, 0.04);
  --shadow-md: 0 8px 24px -4px rgba(11, 18, 18, 0.10), 0 4px 10px -2px rgba(11, 18, 18, 0.06);
  --shadow-lg: 0 20px 48px -8px rgba(11, 18, 18, 0.14), 0 10px 20px -6px rgba(11, 18, 18, 0.08);
  --shadow-xl: 0 32px 72px -12px rgba(11, 18, 18, 0.22);

  --card-bg: var(--surface-1);
  --card-border: 1px solid var(--border-soft);
  --card-radius: var(--radius-lg);
  --card-shadow: var(--shadow-sm);
  --card-shadow-hover: var(--shadow-lg);

  --btn-radius: var(--radius-md);
  --btn-font-weight: 700;
}

/* ============================================================
   Type ramp — fluid clamps, applied universally; weights/tracking
   come from the active direction.
   AAA min body 18px / 1.6 line-height.
   ============================================================ */
:root {
  --fs-display: clamp(2.5rem, 1.5rem + 4.5vw, 5rem);     /* 40 → 80 */
  --fs-h1:      clamp(2rem, 1.4rem + 2.6vw, 3.25rem);    /* 32 → 52 */
  --fs-h2:      clamp(1.625rem, 1.2rem + 1.8vw, 2.5rem); /* 26 → 40 */
  --fs-h3:      clamp(1.375rem, 1.1rem + 1.1vw, 1.875rem); /* 22 → 30 */
  --fs-h4:      clamp(1.125rem, 1rem + 0.5vw, 1.375rem); /* 18 → 22 */
  --fs-body-lg: 1.1875rem;  /* 19 */
  --fs-body:    1.125rem;   /* 18 — AAA minimum */
  --fs-body-sm: 1rem;       /* 16 — small text only */
  --fs-caption: 0.875rem;   /* 14 — captions/labels, with extra weight */
  --fs-eyebrow: 0.8125rem;  /* 13 — uppercase eyebrows, with tracking */

  --lh-tight: 1.1;
  --lh-snug: 1.25;
  --lh-normal: 1.5;
  --lh-loose: 1.65;
}
/* ============================================================
   Housing Works — base.css
   Reset, type, layout primitives, page chrome (nav/footer).
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: var(--lh-normal);
  letter-spacing: var(--body-tracking);
  color: var(--fg-1);
  background: var(--surface-0);
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  transition: background var(--dur-slow) var(--ease-out),
              color var(--dur-slow) var(--ease-out);
}
img, svg, video { display: block; max-width: 100%; }
button { font: inherit; color: inherit; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }
a { color: var(--primary-600); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 2px; }

/* — Headings — */
h1, h2, h3, h4, h5, h6 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  letter-spacing: var(--display-tracking);
  line-height: var(--lh-tight);
  color: var(--fg-1);
  text-wrap: balance;
}
.t-display { font-size: var(--fs-display); }
.t-h1 { font-size: var(--fs-h1); }
.t-h2 { font-size: var(--fs-h2); }
.t-h3 { font-size: var(--fs-h3); }
.t-h4 { font-size: var(--fs-h4); line-height: var(--lh-snug); }
.t-body-lg { font-size: var(--fs-body-lg); line-height: var(--lh-loose); text-wrap: pretty; }
.t-body { font-size: var(--fs-body); line-height: var(--lh-normal); text-wrap: pretty; }
.t-body-sm { font-size: var(--fs-body-sm); line-height: var(--lh-normal); }
.t-caption {
  font-family: var(--font-sans);
  font-size: var(--fs-caption);
  font-weight: 600;
  line-height: var(--lh-snug);
  letter-spacing: 0;
  color: var(--fg-2);
}
.t-eyebrow {
  font-family: var(--font-sans);
  font-size: var(--fs-eyebrow);
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--primary-700);
}
.t-mono { font-family: var(--font-mono); font-size: 0.9375rem; }
.fg-2 { color: var(--fg-2); }
.fg-3 { color: var(--fg-3); }

/* — Layout primitives — */
.container { max-width: 1280px; margin: 0 auto; padding: 0 var(--space-5); }
.container-wide { max-width: 1440px; margin: 0 auto; padding: 0 var(--space-5); }
.container-narrow { max-width: 880px; margin: 0 auto; padding: 0 var(--space-5); }
@media (min-width: 768px) {
  .container, .container-wide, .container-narrow { padding: 0 var(--space-6); }
}

.stack-1 > * + * { margin-top: var(--space-1); }
.stack-2 > * + * { margin-top: var(--space-2); }
.stack-3 > * + * { margin-top: var(--space-3); }
.stack-4 > * + * { margin-top: var(--space-4); }
.stack-5 > * + * { margin-top: var(--space-5); }
.stack-6 > * + * { margin-top: var(--space-6); }
.stack-8 > * + * { margin-top: var(--space-8); }

.cluster { display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: center; }
.cluster-2 { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: center; }
.cluster-4 { display: flex; flex-wrap: wrap; gap: var(--space-4); align-items: center; }
.cluster-tight { display: inline-flex; gap: var(--space-2); align-items: center; }

.divider {
  height: 1px;
  background: var(--border-soft);
  border: 0;
  margin: 0;
}

/* — Skip link (AAA accessibility) — */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 8px;
  padding: 12px 20px;
  background: var(--primary-700);
  color: var(--fg-on-primary);
  border-radius: var(--radius-md);
  font-weight: 700;
  z-index: 1000;
}
.skip-link:focus { left: 8px; outline: 3px solid var(--accent-500); }

/* — Page header (the design-system doc chrome) — */
.page-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--surface-0) 86%, transparent);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--border-soft);
}
.page-header__inner {
  display: flex;
  align-items: center;
  gap: var(--space-5);
  min-height: 72px;
  padding: var(--space-3) var(--space-5);
  max-width: 1440px;
  margin: 0 auto;
}
.brand-mark { display: flex; align-items: center; gap: var(--space-3); }
.brand-mark__logo { width: 36px; height: 44px; display: block; }
.brand-mark__text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-mark__name {
  font-family: var(--font-sans);
  font-weight: 800;
  font-size: 0.875rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--fg-1);
}
.brand-mark__sub {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--fg-2);
  letter-spacing: 0.02em;
}

.page-header__title {
  display: none;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: var(--display-weight);
  letter-spacing: var(--display-tracking);
  color: var(--fg-1);
  padding-left: var(--space-5);
  margin-left: var(--space-5);
  border-left: 1px solid var(--border-firm);
}
@media (min-width: 900px) { .page-header__title { display: block; } }

.page-header__spacer { flex: 1; }

/* — Direction switcher — */
.dir-switch {
  display: inline-flex;
  padding: 4px;
  background: var(--surface-2);
  border-radius: var(--radius-full);
  border: 1px solid var(--border-soft);
}
.dir-switch button {
  appearance: none;
  background: transparent;
  border: 0;
  padding: 8px 14px;
  border-radius: var(--radius-full);
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--fg-2);
  letter-spacing: 0;
  cursor: pointer;
  transition: background var(--dur) var(--ease-out), color var(--dur) var(--ease-out);
  min-height: 36px;
}
.dir-switch button:hover { color: var(--fg-1); }
.dir-switch button[aria-pressed="true"] {
  background: var(--surface-1);
  color: var(--fg-1);
  box-shadow: var(--shadow-sm);
}
.dir-switch button:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring), var(--shadow-sm);
}

/* — Page hero (top of design system doc) — */
.doc-hero {
  padding: var(--space-10) 0 var(--space-9);
  border-bottom: 1px solid var(--border-soft);
}
.doc-hero__inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
  align-items: end;
}
@media (min-width: 960px) {
  .doc-hero__inner {
    grid-template-columns: 1.4fr 1fr;
    gap: var(--space-10);
  }
}
.doc-hero__copy h1 {
  font-size: var(--fs-display);
  letter-spacing: var(--display-tracking);
  margin-bottom: var(--space-4);
}
.doc-hero__copy p { max-width: 56ch; }

.doc-hero__meta {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-4);
  padding: var(--space-5);
  background: var(--surface-1);
  border-radius: var(--radius-lg);
  border: var(--card-border);
  box-shadow: var(--card-shadow);
}
.doc-hero__meta dt {
  font-size: var(--fs-eyebrow);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-2);
  margin-bottom: 4px;
}
.doc-hero__meta dd { margin: 0; font-weight: 600; font-size: 0.9375rem; }

/* — Section structure — */
.doc-section {
  padding: var(--space-11) 0;
  border-bottom: 1px solid var(--border-soft);
}
.doc-section:last-child { border-bottom: 0; }
.doc-section__head {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: var(--space-4);
  margin-bottom: var(--space-8);
}
.doc-section__title-group { max-width: 64ch; }
.doc-section__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: var(--fs-eyebrow);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-600);
  margin-bottom: var(--space-3);
}
.doc-section__eyebrow::before {
  content: "";
  width: 28px;
  height: 2px;
  background: var(--accent-500);
  display: block;
}
.doc-section h2 { font-size: var(--fs-h1); margin-bottom: var(--space-3); }
.doc-section__lead { color: var(--fg-2); font-size: var(--fs-body-lg); max-width: 60ch; }

/* — Subsection header — */
.doc-sub {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin: var(--space-8) 0 var(--space-5);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--border-soft);
}
.doc-sub h3 { font-size: var(--fs-h3); white-space: nowrap; flex: 0 0 auto; }
.doc-sub__caption { font-size: var(--fs-caption); color: var(--fg-2); max-width: 50ch; flex: 1; min-width: 0; text-align: right; }

/* — Site nav (in the example screens, this is the housing-works.org chrome) — */
.site-nav {
  background: var(--surface-1);
  border-bottom: 1px solid var(--border-soft);
}
.site-nav__inner {
  display: flex;
  align-items: center;
  gap: var(--space-5);
  min-height: 76px;
  padding: var(--space-3) var(--space-5);
  max-width: 1280px;
  margin: 0 auto;
}
.site-nav__links {
  display: flex;
  gap: var(--space-5);
  margin-left: auto;
  align-items: center;
}
@media (max-width: 1099px) {
  .site-nav__links { gap: var(--space-4); }
  .site-nav__links .site-nav__link--secondary { display: none; }
}
@media (max-width: 820px) {
  .site-nav__links .site-nav__link { display: none; }
  .site-nav__links .site-nav__link--always { display: inline-flex; }
}
.site-nav__link {
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--fg-2);
  padding: 8px 0;
  min-height: var(--tap-min);
  display: inline-flex;
  align-items: center;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  transition: color var(--dur) var(--ease-out), border-color var(--dur) var(--ease-out);
}
.site-nav__link:hover {
  color: var(--fg-1);
  border-bottom-color: var(--primary-500);
  text-decoration: none;
}
.site-nav__link[aria-current="page"] {
  color: var(--primary-700);
  border-bottom-color: var(--primary-700);
}

/* — Site footer chrome — */
.site-footer {
  background: var(--surface-inverse);
  color: var(--fg-on-inverse);
  padding: var(--space-9) 0 var(--space-6);
}
.site-footer h4 {
  font-family: var(--font-sans);
  font-size: var(--fs-eyebrow);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-on-inverse-muted);
  margin-bottom: var(--space-3);
}
.site-footer a {
  color: var(--fg-on-inverse);
  font-weight: 500;
  display: block;
  padding: 4px 0;
  min-height: 32px;
}
.site-footer a:hover { color: var(--accent-300); text-decoration: underline; }
.site-footer__cols {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-7);
}
@media (min-width: 700px) { .site-footer__cols { grid-template-columns: 1.4fr 1fr 1fr 1fr; } }
.site-footer__mission { max-width: 36ch; color: var(--fg-on-inverse-muted); }
.site-footer__bottom {
  margin-top: var(--space-8);
  padding-top: var(--space-5);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-4);
  color: var(--fg-on-inverse-muted);
  font-size: 0.9375rem;
}

/* — Anchor jump links sidebar (optional) — */
.toc {
  position: sticky;
  top: 96px;
  align-self: start;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: var(--space-3) 0;
}
.toc a {
  display: block;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: var(--fg-2);
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
  border-left: 2px solid transparent;
}
.toc a:hover { background: var(--surface-2); color: var(--fg-1); text-decoration: none; }
.toc a.is-active { background: var(--surface-2); color: var(--primary-700); border-left-color: var(--primary-500); }

/* — Page section with sidebar layout — */
.doc-with-toc {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-7);
}
@media (min-width: 1100px) {
  .doc-with-toc { grid-template-columns: 200px 1fr; gap: var(--space-9); }
}

/* — Misc — */
.is-hidden { display: none !important; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* Universal AAA focus visibility */
:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
  border-radius: var(--radius-sm);
}
/* ============================================================
   Housing Works — components.css
   Buttons · Inputs · Selects · Checkboxes/Radios · Badges/Tags
   · Filter bar · Pagination · Modal · Empty/Loading/Error
   ============================================================ */

/* ============================================================
   BUTTONS
   AAA: min 48px tap, 7:1 text contrast, 3:1 focus ring,
   visible non-color hover state.
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: var(--tap-min);
  padding: 12px 22px;
  border-radius: var(--btn-radius);
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: var(--btn-font-weight);
  line-height: 1;
  letter-spacing: -0.005em;
  border: 1.5px solid transparent;
  background: transparent;
  color: var(--fg-1);
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  user-select: none;
  transition:
    background var(--dur) var(--ease-out),
    border-color var(--dur) var(--ease-out),
    color var(--dur) var(--ease-out),
    transform var(--dur-fast) var(--ease-out),
    box-shadow var(--dur) var(--ease-out);
}
.btn svg { width: 18px; height: 18px; flex-shrink: 0; }
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.btn:disabled, .btn[aria-disabled="true"] {
  opacity: 0.5; cursor: not-allowed; transform: none;
}

/* Primary — brand action */
.btn--primary {
  background: var(--primary-700);
  color: var(--fg-on-primary);
  border-color: var(--primary-700);
}
.btn--primary:hover {
  background: var(--primary-800);
  border-color: var(--primary-800);
  box-shadow: var(--shadow-md);
}

/* Accent — promotional/secondary CTA */
.btn--accent {
  background: var(--accent-600);
  color: var(--fg-on-accent);
  border-color: var(--accent-600);
}
.btn--accent:hover {
  background: var(--accent-700);
  border-color: var(--accent-700);
  box-shadow: var(--shadow-md);
}

/* Secondary — outlined */
.btn--secondary {
  background: var(--surface-1);
  color: var(--primary-700);
  border-color: var(--primary-700);
}
.btn--secondary:hover {
  background: var(--primary-50);
  color: var(--primary-800);
  border-color: var(--primary-800);
}

/* Ghost — text + chrome */
.btn--ghost {
  background: transparent;
  color: var(--fg-1);
  border-color: transparent;
}
.btn--ghost:hover {
  background: var(--surface-2);
}

/* Quiet — for inline actions */
.btn--quiet {
  background: var(--surface-2);
  color: var(--fg-1);
  border-color: transparent;
  font-weight: 600;
}
.btn--quiet:hover {
  background: var(--neutral-150);
}

/* Destructive — careful, also AAA */
.btn--destructive {
  background: var(--status-closed-fg);
  color: #FFFFFF;
  border-color: var(--status-closed-fg);
}
.btn--destructive:hover {
  filter: brightness(0.92);
  box-shadow: var(--shadow-md);
}

/* Sizes */
.btn--sm { min-height: 40px; padding: 8px 16px; font-size: 0.9375rem; gap: 8px; }
.btn--lg { min-height: 56px; padding: 16px 28px; font-size: 1.0625rem; gap: 12px; }
.btn--icon { padding: 12px; min-width: var(--tap-min); }
.btn--icon.btn--sm { padding: 8px; min-width: 40px; }
.btn--full { width: 100%; }

/* Icon-only round button (e.g. close) */
.btn-circle {
  width: var(--tap-min); height: var(--tap-min);
  border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--surface-1);
  border: 1px solid var(--border-firm);
  color: var(--fg-1);
  cursor: pointer;
  transition: background var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease-out);
}
.btn-circle:hover { background: var(--surface-2); box-shadow: var(--shadow-sm); }
.btn-circle:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.btn-circle svg { width: 20px; height: 20px; }

/* ============================================================
   FORM CONTROLS — Input · Textarea · Select · Search
   AAA: 18px text, 48px+ height, clear focus, label association.
   ============================================================ */
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.field__label {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--fg-1);
  letter-spacing: 0;
}
.field__hint { font-size: 0.875rem; color: var(--fg-2); }
.field__error { font-size: 0.875rem; color: var(--status-closed-fg); font-weight: 600; }
.field__required { color: var(--accent-600); margin-left: 2px; }

.input,
.textarea,
.select {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  min-height: var(--tap-min);
  padding: 12px 16px;
  background: var(--surface-1);
  border: 1.5px solid var(--border-firm);
  border-radius: var(--btn-radius);
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: var(--lh-normal);
  color: var(--fg-1);
  letter-spacing: var(--body-tracking);
  transition: border-color var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease-out);
}
.input::placeholder, .textarea::placeholder { color: var(--fg-3); }
.input:hover, .textarea:hover, .select:hover { border-color: var(--neutral-400); }
.input:focus-visible, .textarea:focus-visible, .select:focus-visible {
  outline: none;
  border-color: var(--primary-700);
  box-shadow: var(--focus-ring);
}
.input[aria-invalid="true"] { border-color: var(--status-closed-fg); }
.textarea { min-height: 120px; padding-top: 14px; padding-bottom: 14px; resize: vertical; }

.select {
  background-image:
    linear-gradient(45deg, transparent 50%, currentColor 50%),
    linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position:
    calc(100% - 22px) 50%,
    calc(100% - 16px) 50%;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 44px;
  cursor: pointer;
}

/* Input with leading icon */
.input-group {
  position: relative;
  display: flex;
  align-items: center;
}
.input-group .input { padding-left: 48px; }
.input-group__icon {
  position: absolute;
  left: 16px;
  pointer-events: none;
  color: var(--fg-2);
  display: flex; align-items: center;
}
.input-group__icon svg { width: 20px; height: 20px; }

/* Search input — featured form */
.search-input {
  display: flex;
  align-items: center;
  gap: 0;
  width: 100%;
  background: var(--surface-1);
  border: 1.5px solid var(--border-firm);
  border-radius: var(--radius-full);
  padding: 4px 4px 4px 20px;
  min-height: 56px;
  box-shadow: var(--shadow-sm);
  transition: border-color var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease-out);
}
.search-input:hover { border-color: var(--neutral-400); }
.search-input:focus-within { border-color: var(--primary-700); box-shadow: var(--focus-ring); }
.search-input__icon { color: var(--fg-2); display: flex; }
.search-input__icon svg { width: 22px; height: 22px; }
.search-input input {
  flex: 1;
  border: 0;
  background: transparent;
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  color: var(--fg-1);
  outline: none;
  padding: 0 16px;
  letter-spacing: var(--body-tracking);
}
.search-input input::placeholder { color: var(--fg-2); }
.search-input .btn { min-height: 48px; padding: 12px 24px; }

/* Checkbox & Radio — AAA-sized */
.check, .radio {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: var(--tap-min);
  cursor: pointer;
  font-weight: 500;
  color: var(--fg-1);
  user-select: none;
}
.check input, .radio input {
  appearance: none;
  -webkit-appearance: none;
  width: 24px;
  height: 24px;
  margin: 0;
  background: var(--surface-1);
  border: 2px solid var(--neutral-400);
  border-radius: 6px;
  cursor: pointer;
  flex-shrink: 0;
  display: grid;
  place-content: center;
  transition: background var(--dur) var(--ease-out), border-color var(--dur) var(--ease-out);
}
.radio input { border-radius: 50%; }
.check input:hover, .radio input:hover { border-color: var(--primary-700); }
.check input:focus-visible, .radio input:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.check input:checked, .radio input:checked {
  background: var(--primary-700);
  border-color: var(--primary-700);
}
.check input:checked::after {
  content: "";
  width: 14px; height: 8px;
  border: 2.5px solid var(--fg-on-primary);
  border-top: 0; border-right: 0;
  transform: rotate(-45deg) translate(2px, -1px);
}
.radio input:checked::after {
  content: "";
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--fg-on-primary);
}

/* Toggle switch */
.toggle {
  display: inline-flex; align-items: center; gap: 12px; min-height: var(--tap-min);
  cursor: pointer; font-weight: 500; color: var(--fg-1);
}
.toggle input {
  appearance: none; -webkit-appearance: none;
  width: 48px; height: 28px;
  background: var(--neutral-300);
  border-radius: 999px;
  cursor: pointer;
  position: relative;
  transition: background var(--dur) var(--ease-out);
}
.toggle input::after {
  content: "";
  position: absolute;
  top: 3px; left: 3px;
  width: 22px; height: 22px;
  border-radius: 999px;
  background: var(--neutral-0);
  box-shadow: var(--shadow-sm);
  transition: left var(--dur) var(--ease-out);
}
.toggle input:checked { background: var(--primary-700); }
.toggle input:checked::after { left: 23px; }
.toggle input:focus-visible { outline: none; box-shadow: var(--focus-ring); }

/* Chip filter (toggleable pill) */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  min-height: 40px;
  background: var(--surface-1);
  border: 1.5px solid var(--border-firm);
  border-radius: var(--radius-full);
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--fg-1);
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--dur) var(--ease-out), border-color var(--dur) var(--ease-out), color var(--dur) var(--ease-out);
}
.chip svg { width: 16px; height: 16px; }
.chip:hover { border-color: var(--primary-700); background: var(--primary-50); }
.chip:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.chip[aria-pressed="true"] {
  background: var(--primary-700);
  color: var(--fg-on-primary);
  border-color: var(--primary-700);
}
.chip[aria-pressed="true"]:hover { background: var(--primary-800); }
.chip__count {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 22px; height: 22px; padding: 0 6px;
  background: var(--surface-2);
  color: var(--fg-2);
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
}
.chip[aria-pressed="true"] .chip__count {
  background: var(--primary-900);
  color: var(--fg-on-primary);
}

/* ============================================================
   BADGES & TAGS — for status, amenity, tier
   ============================================================ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.2;
  white-space: nowrap;
}
.badge svg { width: 12px; height: 12px; }
.badge--available { background: var(--status-available-bg); color: var(--status-available-fg); }
.badge--waitlist  { background: var(--status-waitlist-bg);  color: var(--status-waitlist-fg); }
.badge--closed    { background: var(--status-closed-bg);    color: var(--status-closed-fg); }
.badge--new       { background: var(--status-new-bg);       color: var(--status-new-fg); }
.badge--voucher {
  background: var(--primary-100);
  color: var(--primary-800);
}
.badge--dark {
  background: var(--surface-inverse);
  color: var(--fg-on-inverse);
}
.badge--solid-available {
  background: var(--pin-available);
  color: #FFFFFF;
}
.badge--solid-waitlist {
  background: var(--pin-waitlist);
  color: #FFFFFF;
}

/* Indicator dot inside badge */
.badge__dot {
  width: 7px; height: 7px; border-radius: 999px;
  background: currentColor;
  flex-shrink: 0;
}

/* Soft amenity tags */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--surface-2);
  color: var(--fg-2);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.3;
}
.tag svg { width: 14px; height: 14px; color: var(--fg-2); }

/* ============================================================
   FILTER BAR — sticky search/filter combo for listings
   ============================================================ */
.filter-bar {
  background: var(--surface-1);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  box-shadow: var(--shadow-sm);
}
.filter-bar__row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  align-items: center;
}
.filter-bar__divider {
  width: 1px;
  align-self: stretch;
  background: var(--border-soft);
  margin: 0 var(--space-2);
}
.filter-bar__chips {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
}
.filter-bar__count {
  margin-left: auto;
  font-weight: 600; color: var(--fg-2);
  font-size: 0.9375rem;
}

/* ============================================================
   PAGINATION
   ============================================================ */
.pagination {
  display: flex; gap: 4px; align-items: center; justify-content: center;
}
.pagination button {
  min-width: 44px; min-height: 44px;
  padding: 8px 12px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-weight: 600;
  color: var(--fg-1);
  cursor: pointer;
  transition: background var(--dur) var(--ease-out);
}
.pagination button:hover { background: var(--surface-2); }
.pagination button[aria-current="page"] {
  background: var(--primary-700); color: var(--fg-on-primary);
}
.pagination button:disabled { opacity: 0.4; cursor: not-allowed; }
.pagination button:focus-visible { outline: none; box-shadow: var(--focus-ring); }

/* ============================================================
   MODAL / DRAWER
   ============================================================ */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(11, 18, 18, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 100;
  display: grid;
  place-items: center;
  padding: var(--space-5);
  animation: fadeIn var(--dur) var(--ease-out);
}
.modal {
  background: var(--surface-1);
  color: var(--fg-1);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 640px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-xl);
  animation: modalIn var(--dur-slow) var(--ease-out);
}
.modal__head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-6) var(--space-6) var(--space-3);
}
.modal__title { font-size: var(--fs-h3); }
.modal__sub { color: var(--fg-2); margin-top: 6px; }
.modal__body { padding: 0 var(--space-6) var(--space-6); }
.modal__foot {
  display: flex; justify-content: flex-end; gap: var(--space-3);
  padding: var(--space-5) var(--space-6);
  border-top: 1px solid var(--border-soft);
  background: var(--surface-2);
  border-radius: 0 0 var(--radius-xl) var(--radius-xl);
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes modalIn {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ============================================================
   EMPTY · LOADING · ERROR STATES
   ============================================================ */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: var(--space-9) var(--space-5);
  background: var(--surface-1);
  border: 1px dashed var(--border-firm);
  border-radius: var(--radius-lg);
  gap: var(--space-3);
}
.empty-state__icon {
  width: 64px; height: 64px;
  display: grid; place-items: center;
  background: var(--surface-2);
  border-radius: 999px;
  color: var(--primary-700);
  margin-bottom: var(--space-2);
}
.empty-state__icon svg { width: 30px; height: 30px; }
.empty-state h3 { font-size: var(--fs-h3); }
.empty-state p { color: var(--fg-2); max-width: 44ch; }

.skeleton {
  background: linear-gradient(90deg,
    var(--surface-2) 0%,
    var(--neutral-150) 50%,
    var(--surface-2) 100%);
  background-size: 200% 100%;
  border-radius: var(--radius-sm);
  animation: shimmer 1.6s var(--ease-in-out) infinite;
}
@keyframes shimmer {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}
.skeleton--line { height: 14px; width: 100%; }
.skeleton--block { aspect-ratio: 4/3; width: 100%; }

.error-state {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-4);
  background: var(--status-closed-bg);
  color: var(--status-closed-fg);
  border-radius: var(--radius-md);
  border-left: 4px solid var(--status-closed-fg);
}
.error-state__icon { flex-shrink: 0; margin-top: 2px; }
.error-state__icon svg { width: 22px; height: 22px; }
.error-state strong { font-weight: 700; }

/* ============================================================
   MAP + LIST shared
   ============================================================ */
.map-frame {
  position: relative;
  background:
    radial-gradient(at 30% 20%, rgba(255,255,255,0.6), transparent 40%),
    var(--surface-2);
  border-radius: var(--radius-lg);
  overflow: hidden;
  min-height: 360px;
  border: 1px solid var(--border-soft);
}
.map-frame__svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.map-frame__attribution {
  position: absolute; bottom: 8px; right: 12px;
  font-size: 11px; color: var(--fg-2);
  background: rgba(255,255,255,0.8);
  padding: 2px 8px; border-radius: 4px;
}
.map-pin {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px 6px 8px;
  background: var(--surface-1);
  color: var(--fg-1);
  border-radius: 999px;
  box-shadow: var(--shadow-md);
  font-weight: 700;
  font-size: 0.875rem;
  border: 2px solid var(--surface-1);
  transition: transform var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease-out);
  white-space: nowrap;
  cursor: pointer;
}
.map-pin:hover { transform: translateY(-2px) scale(1.05); box-shadow: var(--shadow-lg); z-index: 5; }
.map-pin[aria-pressed="true"] {
  background: var(--primary-700);
  color: var(--fg-on-primary);
  border-color: var(--surface-1);
}
.map-pin__dot {
  width: 10px; height: 10px; border-radius: 999px;
  background: var(--pin-available);
}
.map-pin--waitlist .map-pin__dot { background: var(--pin-waitlist); }
.map-pin--closed .map-pin__dot { background: var(--pin-closed); }
/* ============================================================
   Housing Works — cards.css
   Property Cards — the hero component. Multiple variants.

   .prop-card          base / vertical
   .prop-card--editorial   large image, magazine-style
   .prop-card--list    horizontal, dense list row
   .prop-card--featured large hero card, two-column
   .prop-card--map     compact map-popup style

   Also: generic .card surfaces, image-with-placeholder treatment.
   ============================================================ */

/* ============================================================
   Generic card surface — used for icon cards, content cards, etc.
   ============================================================ */
.card {
  background: var(--card-bg);
  border: var(--card-border);
  border-radius: var(--card-radius);
  box-shadow: var(--card-shadow);
  padding: var(--space-5);
  transition: box-shadow var(--dur) var(--ease-out), transform var(--dur) var(--ease-out), border-color var(--dur) var(--ease-out);
}
.card--hover:hover {
  box-shadow: var(--card-shadow-hover);
  border-color: var(--border-firm);
}
.card--padded { padding: var(--space-6); }
.card--flat { box-shadow: none; }
.card--inverse {
  background: var(--surface-inverse);
  color: var(--fg-on-inverse);
  border-color: transparent;
}
.card--inverse h1, .card--inverse h2, .card--inverse h3, .card--inverse h4 { color: var(--fg-on-inverse); }
.card--accent-tint { background: var(--primary-50); border-color: var(--primary-100); }

/* Image placeholder treatment — base + variation via hue */
.placeholder-image {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  background:
    linear-gradient(180deg, transparent 0%, transparent 60%, rgba(0,0,0,0.04) 100%),
    radial-gradient(circle at 30% 110%, var(--primary-100) 0%, transparent 50%),
    radial-gradient(circle at 80% 90%, var(--accent-100) 0%, transparent 45%),
    var(--neutral-150);
}
.placeholder-image[data-hue] {
  background:
    radial-gradient(circle at 70% 95%, color-mix(in srgb, var(--accent-100) 90%, transparent), transparent 50%),
    radial-gradient(circle at 25% 100%, hsl(var(--ph-hue, 145) 35% 78%) 0%, transparent 55%),
    radial-gradient(circle at 60% 30%, hsl(var(--ph-hue, 145) 30% 92%) 0%, transparent 60%),
    hsl(var(--ph-hue, 145) 18% 88%);
}
.placeholder-image__house {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60%;
  height: 50%;
  color: color-mix(in srgb, var(--primary-700) 35%, var(--surface-2));
  opacity: 0.85;
}
.img-frame {
  position: relative;
  background:
    repeating-linear-gradient(45deg,
      transparent 0 14px,
      rgba(0, 0, 0, 0.025) 14px 15px),
    var(--surface-2);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.img-frame img,
.img-frame video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.img-frame__placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: var(--fg-2);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.img-frame__placeholder svg {
  width: 32px; height: 32px;
  opacity: 0.5;
}
.img-frame__overlay-tl {
  position: absolute;
  top: 12px; left: 12px;
  display: flex; gap: 6px; flex-wrap: wrap;
  z-index: 2;
}
.img-frame__overlay-tr {
  position: absolute;
  top: 12px; right: 12px;
  display: flex; gap: 6px;
  z-index: 2;
}
.img-frame__overlay-bl {
  position: absolute;
  bottom: 12px; left: 12px;
  z-index: 2;
}
.img-frame__count {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(11, 18, 18, 0.65);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  color: #FFFFFF;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.8125rem;
  font-weight: 600;
}
.img-frame__count svg { width: 14px; height: 14px; }

/* Save (heart) button — floats on top of image */
.save-btn {
  appearance: none;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border: 0;
  width: 40px; height: 40px;
  border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
  color: var(--fg-1);
  transition: background var(--dur) var(--ease-out), transform var(--dur) var(--ease-out), color var(--dur) var(--ease-out);
  box-shadow: var(--shadow-sm);
}
.save-btn svg { width: 20px; height: 20px; }
.save-btn:hover { background: #FFFFFF; transform: scale(1.08); }
.save-btn:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.save-btn[aria-pressed="true"] {
  background: var(--accent-500);
  color: #FFFFFF;
}
.save-btn[aria-pressed="true"]:hover { background: var(--accent-600); }

/* ============================================================
   PROP CARD — base (default vertical)
   ============================================================ */
.prop-card {
  display: flex;
  flex-direction: column;
  background: var(--card-bg);
  border: var(--card-border);
  border-radius: var(--card-radius);
  overflow: hidden;
  box-shadow: var(--card-shadow);
  transition: box-shadow var(--dur) var(--ease-out), transform var(--dur) var(--ease-out), border-color var(--dur) var(--ease-out);
}
.prop-card:hover {
  box-shadow: var(--card-shadow-hover);
  border-color: var(--border-firm);
  transform: translateY(-2px);
}
.prop-card:focus-within {
  outline: none;
  box-shadow: var(--card-shadow-hover), var(--focus-ring);
}

.prop-card__media {
  aspect-ratio: 4 / 3;
  position: relative;
  background: var(--surface-2);
}

.prop-card__body {
  padding: var(--space-4) var(--space-4) var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  flex: 1;
}

.prop-card__eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: var(--fs-eyebrow);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-2);
}
.prop-card__eyebrow svg { width: 14px; height: 14px; color: var(--primary-700); }

.prop-card__title {
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  letter-spacing: var(--display-tracking);
  font-size: 1.375rem;
  line-height: 1.15;
  color: var(--fg-1);
  margin: 0;
}
.prop-card__title a {
  color: inherit;
  text-decoration: none;
}
.prop-card__title a::after {
  /* expand click area to whole card */
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
}
.prop-card__title a:hover { color: var(--primary-700); }

.prop-card__address {
  font-size: 0.9375rem;
  color: var(--fg-2);
  display: flex; align-items: center; gap: 6px;
}
.prop-card__address svg { width: 14px; height: 14px; flex-shrink: 0; }

.prop-card__specs {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3) var(--space-4);
  font-size: 0.9375rem;
  color: var(--fg-1);
  font-weight: 600;
}
.prop-card__spec {
  display: inline-flex; align-items: center; gap: 6px;
  white-space: nowrap;
}
.prop-card__spec svg { width: 16px; height: 16px; color: var(--fg-2); }
.prop-card__spec strong { font-weight: 700; }
.prop-card__spec span { font-weight: 500; color: var(--fg-2); }

.prop-card__divider {
  height: 1px; background: var(--border-soft); margin: 0;
}

.prop-card__footer {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--space-3);
  flex-wrap: wrap;
}
.prop-card__rent {
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  letter-spacing: var(--display-tracking);
  font-size: 1.5rem;
  color: var(--fg-1);
}
.prop-card__rent small {
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--fg-2);
  letter-spacing: 0;
}
.prop-card__tags {
  display: flex; flex-wrap: wrap; gap: 6px;
}

.prop-card__cta {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--primary-700);
  font-weight: 700;
  font-size: 0.9375rem;
  position: relative;
  z-index: 1;
  white-space: nowrap;
}
.prop-card__cta svg { width: 14px; height: 14px; transition: transform var(--dur) var(--ease-out); }
.prop-card:hover .prop-card__cta svg { transform: translateX(3px); }

/* ============================================================
   PROP CARD — Editorial (larger, refined, magazine-y)
   ============================================================ */
.prop-card--editorial .prop-card__media { aspect-ratio: 3 / 2; }
.prop-card--editorial .prop-card__body { padding: var(--space-5) var(--space-5) var(--space-5); gap: var(--space-3); }
.prop-card--editorial .prop-card__title { font-size: 1.625rem; }

/* ============================================================
   PROP CARD — List row (horizontal, dense)
   ============================================================ */
.prop-card--list {
  flex-direction: row;
  align-items: stretch;
}
.prop-card--list .prop-card__media {
  width: 320px;
  flex-shrink: 0;
  aspect-ratio: auto;
}
.prop-card--list .prop-card__body {
  padding: var(--space-5);
  gap: var(--space-3);
  flex: 1;
  justify-content: space-between;
}
.prop-card--list .prop-card__title { font-size: 1.5rem; }
@media (max-width: 720px) {
  .prop-card--list { flex-direction: column; }
  .prop-card--list .prop-card__media { width: 100%; aspect-ratio: 4 / 3; }
}

/* ============================================================
   PROP CARD — Featured (large hero, two-column)
   ============================================================ */
.prop-card--featured {
  display: grid;
  grid-template-columns: 1fr;
  background: var(--card-bg);
  border: var(--card-border);
  border-radius: var(--card-radius);
  overflow: hidden;
  box-shadow: var(--card-shadow);
}
@media (min-width: 800px) {
  .prop-card--featured { grid-template-columns: 1.4fr 1fr; }
}
.prop-card--featured .prop-card__media { aspect-ratio: 4 / 3; min-height: 320px; }
.prop-card--featured .prop-card__body { padding: var(--space-6) var(--space-6); gap: var(--space-4); }
.prop-card--featured .prop-card__title { font-size: var(--fs-h2); }

/* ============================================================
   PROP CARD — Map popup (compact, floating)
   ============================================================ */
.prop-card--map {
  width: 260px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xl);
}
.prop-card--map .prop-card__media { aspect-ratio: 16 / 9; }
.prop-card--map .prop-card__body { padding: var(--space-3) var(--space-4) var(--space-4); gap: 8px; }
.prop-card--map .prop-card__title { font-size: 1.0625rem; }
.prop-card--map .prop-card__rent { font-size: 1.1875rem; }

/* ============================================================
   PROPERTY DETAIL PAGE — bigger compositions
   ============================================================ */
.prop-detail__gallery {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 6px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 16 / 9;
}
.prop-detail__gallery > :nth-child(1) { grid-row: 1 / 3; grid-column: 1; }
.prop-detail__gallery > :nth-child(2) { grid-row: 1; grid-column: 2; }
.prop-detail__gallery > :nth-child(3) { grid-row: 1; grid-column: 3; }
.prop-detail__gallery > :nth-child(4) { grid-row: 2; grid-column: 2; }
.prop-detail__gallery > :nth-child(5) { grid-row: 2; grid-column: 3; position: relative; }
.prop-detail__gallery .img-frame { height: 100%; width: 100%; }
.prop-detail__gallery .img-frame img { width: 100%; height: 100%; object-fit: cover; }
.prop-detail__more-photos {
  position: absolute;
  inset: 0;
  background: rgba(11, 18, 18, 0.45);
  color: #FFFFFF;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  border: 0;
  z-index: 3;
}
.prop-detail__more-photos:hover { background: rgba(11, 18, 18, 0.55); }

/* Sticky apply card on detail page */
.apply-card {
  position: sticky;
  top: 96px;
  padding: var(--space-5);
  background: var(--card-bg);
  border-radius: var(--card-radius);
  border: var(--card-border);
  box-shadow: var(--card-shadow);
}
.apply-card__price {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  letter-spacing: var(--display-tracking);
  font-size: 2rem;
  margin-bottom: 4px;
}
.apply-card__price small {
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 600;
  color: var(--fg-2);
}
.apply-card__meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
  padding: var(--space-4) 0;
  border-top: 1px solid var(--border-soft);
  border-bottom: 1px solid var(--border-soft);
  margin-bottom: var(--space-4);
}
.apply-card__meta dt { font-size: var(--fs-eyebrow); font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--fg-2); margin-bottom: 4px; }
.apply-card__meta dd { margin: 0; font-weight: 700; color: var(--fg-1); font-size: 0.9375rem; }

/* ============================================================
   ICON CARD — for value-prop sections
   ============================================================ */
.icon-card {
  background: var(--card-bg);
  border: var(--card-border);
  border-radius: var(--card-radius);
  padding: var(--space-5);
  box-shadow: var(--card-shadow);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.icon-card__icon {
  width: 52px; height: 52px;
  display: grid; place-items: center;
  background: var(--primary-50);
  color: var(--primary-700);
  border-radius: var(--radius-md);
}
.icon-card__icon svg { width: 26px; height: 26px; }
.icon-card h4 { font-size: 1.125rem; margin: 0; }
.icon-card p { color: var(--fg-2); margin: 0; font-size: var(--fs-body); }

/* ============================================================
   GRID — listings grid
   ============================================================ */
.listings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--space-5);
}

.listings-grid--list {
  grid-template-columns: 1fr;
  gap: var(--space-4);
}

/* ============================================================
   MAP+LIST SPLIT (50/50)
   ============================================================ */
.split-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
}
@media (min-width: 1000px) {
  .split-layout { grid-template-columns: 1.05fr 1fr; gap: var(--space-5); }
}
.split-layout__map {
  position: sticky;
  top: 96px;
  height: calc(100vh - 120px);
  min-height: 480px;
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.split-layout__list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: var(--space-4);
  align-content: start;
}
/* ============================================================
   Housing Works — Apartment Listings prototype
   Layout & screen-specific CSS not in the design system.
   ============================================================ */

html, body { height: 100%; }
#root { min-height: 100vh; display: flex; flex-direction: column; }

/* ====== App shell ====== */
.app-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.app-shell__main { flex: 1; }

/* ====== Listings page hero ====== */
.lst-hero {
  position: relative;
  padding: var(--space-9) 0 var(--space-7);
  background:
    radial-gradient(ellipse at 80% 100%, var(--primary-50) 0%, transparent 55%),
    radial-gradient(ellipse at 0% 0%, var(--accent-50) 0%, transparent 40%),
    var(--surface-2);
  overflow: hidden;
}
.lst-hero__row {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
  align-items: end;
}
@media (min-width: 1000px) {
  .lst-hero__row { grid-template-columns: 1.5fr 1fr; }
}
.lst-hero__copy h1 {
  max-width: 18ch;
  font-size: clamp(2rem, 1.4rem + 2.8vw, 3.5rem);
  margin-bottom: var(--space-3);
}
.lst-hero__copy p { max-width: 56ch; color: var(--fg-2); font-size: 1.125rem; line-height: 1.55; }
.lst-hero__search { margin-top: var(--space-5); max-width: 720px; }
.lst-hero__stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border-soft);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.lst-hero__stat {
  background: var(--surface-1);
  padding: var(--space-4);
  text-align: left;
}
.lst-hero__stat dt {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-2);
  margin-bottom: 4px;
}
.lst-hero__stat dd {
  margin: 0;
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  font-size: 1.625rem;
  color: var(--fg-1);
  letter-spacing: var(--display-tracking);
}
.lst-hero__stat dd small { font-family: var(--font-sans); font-size: 0.875rem; font-weight: 600; color: var(--fg-2); letter-spacing: 0; }

/* ====== Sticky filter bar ====== */
.proto-filter-bar {
  position: sticky;
  top: 0;
  z-index: 30;
  background: color-mix(in srgb, var(--surface-0) 92%, transparent);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--border-soft);
  padding: var(--space-3) 0;
}
.proto-filter-bar__row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  align-items: center;
}

/* ====== Saved drawer ====== */
.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(11, 18, 18, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 90;
  animation: fadeIn var(--dur) var(--ease-out);
}
.drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  max-width: 460px;
  background: var(--surface-1);
  z-index: 100;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-xl);
  animation: drawerIn var(--dur-slow) var(--ease-out);
}
@keyframes drawerIn {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}
.drawer__head {
  padding: var(--space-5) var(--space-5);
  border-bottom: 1px solid var(--border-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}
.drawer__body {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-4) var(--space-5);
}
.drawer__foot {
  padding: var(--space-4) var(--space-5);
  border-top: 1px solid var(--border-soft);
  background: var(--surface-2);
}

/* ====== View toggle ====== */
.view-toggle {
  display: inline-flex;
  padding: 4px;
  background: var(--surface-2);
  border-radius: var(--radius-full);
  border: 1px solid var(--border-soft);
}
.view-toggle button {
  appearance: none;
  background: transparent;
  border: 0;
  padding: 8px 14px;
  border-radius: var(--radius-full);
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--fg-2);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  transition: background var(--dur) var(--ease-out), color var(--dur) var(--ease-out);
}
.view-toggle button:hover { color: var(--fg-1); }
.view-toggle button[aria-pressed="true"] {
  background: var(--surface-1);
  color: var(--fg-1);
  box-shadow: var(--shadow-sm);
}
.view-toggle button svg { width: 16px; height: 16px; }

/* ====== Map view layout ====== */
.map-split {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  min-height: calc(100vh - 90px);
}
@media (min-width: 1100px) {
  .map-split { grid-template-columns: 1fr 540px; }
}
.map-split__map {
  position: relative;
  background: var(--surface-2);
  min-height: 500px;
  border-right: 1px solid var(--border-soft);
}
.map-split__list {
  background: var(--surface-1);
  padding: var(--space-4);
  overflow-y: auto;
  max-height: calc(100vh - 90px);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

/* ====== Property detail layout ====== */
.detail-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-7);
}
@media (min-width: 1000px) {
  .detail-grid { grid-template-columns: 1fr 380px; gap: var(--space-7); align-items: start; }
}
.detail-section + .detail-section { margin-top: var(--space-7); padding-top: var(--space-7); border-top: 1px solid var(--border-soft); }
.detail-section h2 { font-size: var(--fs-h2); margin-bottom: var(--space-3); }
.detail-section h3 { font-size: var(--fs-h3); margin-bottom: var(--space-3); }

.amenity-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: var(--space-3);
}
.amenity-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) 0;
}
.amenity-row__icon {
  width: 36px; height: 36px;
  display: grid; place-items: center;
  background: var(--primary-50);
  color: var(--primary-700);
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}
.amenity-row__icon svg { width: 20px; height: 20px; }
.amenity-row__text { font-weight: 500; color: var(--fg-1); }

/* ====== Availability calendar ====== */
.avail-cal {
  background: var(--surface-2);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
}
.avail-cal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-4);
}
.avail-cal__months {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--space-3);
}
.avail-cal__month {
  background: var(--surface-1);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--border-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}
.avail-cal__month-name {
  font-weight: 700;
  font-size: 0.9375rem;
}
.avail-cal__month-meta {
  font-size: 0.8125rem;
  color: var(--fg-2);
}
.avail-cal__indicator {
  width: 8px;
  height: 36px;
  border-radius: 4px;
}
.avail-cal__indicator--available { background: var(--pin-available); }
.avail-cal__indicator--waitlist { background: var(--pin-waitlist); }
.avail-cal__indicator--closed { background: var(--neutral-300); }

/* ====== Photo gallery ====== */
.gallery {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 8px;
  border-radius: var(--radius-xl);
  overflow: hidden;
  aspect-ratio: 16 / 9;
  position: relative;
}
.gallery > :nth-child(1) { grid-row: 1 / 3; grid-column: 1; }
.gallery > :nth-child(2) { grid-row: 1; grid-column: 2; }
.gallery > :nth-child(3) { grid-row: 1; grid-column: 3; }
.gallery > :nth-child(4) { grid-row: 2; grid-column: 2; }
.gallery > :nth-child(5) { grid-row: 2; grid-column: 3; position: relative; }
.gallery__cell { position: relative; overflow: hidden; }
.gallery__more {
  position: absolute;
  inset: 0;
  background: rgba(11, 18, 18, 0.45);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  border: 0;
  transition: background var(--dur) var(--ease-out);
}
.gallery__more:hover { background: rgba(11, 18, 18, 0.55); }
.gallery__actions {
  position: absolute;
  top: 16px; right: 16px;
  display: flex; gap: 8px; z-index: 5;
}

/* ====== Sticky apply card ====== */
.apply-card-sticky {
  position: sticky;
  top: 92px;
  background: var(--card-bg);
  border-radius: var(--card-radius);
  border: var(--card-border);
  box-shadow: var(--card-shadow);
  padding: var(--space-5);
}
.apply-card-sticky__price-row {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  margin-bottom: var(--space-2);
}
.apply-card-sticky__price {
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  font-size: 1.875rem;
  letter-spacing: var(--display-tracking);
}
.apply-card-sticky__price small { font-family: var(--font-sans); font-size: 0.9375rem; font-weight: 600; color: var(--fg-2); letter-spacing: 0; }
.apply-card-sticky__meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
  padding: var(--space-4) 0;
  margin: var(--space-4) 0;
  border-top: 1px solid var(--border-soft);
  border-bottom: 1px solid var(--border-soft);
}
.apply-card-sticky__meta dt { font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--fg-2); margin-bottom: 4px; }
.apply-card-sticky__meta dd { margin: 0; font-weight: 700; color: var(--fg-1); font-size: 0.9375rem; }
.apply-card-sticky__actions { display: flex; flex-direction: column; gap: var(--space-3); }
.apply-card-sticky__contact {
  margin-top: var(--space-4);
  padding-top: var(--space-4);
  border-top: 1px solid var(--border-soft);
  display: flex; flex-direction: column; gap: var(--space-2);
  font-size: 0.875rem;
  color: var(--fg-2);
}
.apply-card-sticky__contact strong { color: var(--fg-1); font-weight: 700; }

/* ====== Breadcrumb ====== */
.crumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: var(--space-4) 0;
  font-size: 0.9375rem;
  color: var(--fg-2);
  flex-wrap: wrap;
}
.crumbs a {
  color: var(--fg-2);
  text-decoration: none;
  font-weight: 500;
}
.crumbs a:hover { color: var(--primary-700); text-decoration: underline; }
.crumbs span[aria-current="page"] { color: var(--fg-1); font-weight: 600; }

/* ====== Apply modal steps ====== */
.steps {
  display: flex;
  gap: 8px;
  padding: 0 var(--space-6) var(--space-5);
}
.steps__step {
  flex: 1;
  height: 4px;
  border-radius: 4px;
  background: var(--surface-2);
}
.steps__step--done { background: var(--primary-500); }
.steps__step--active { background: var(--primary-700); }

/* ====== Saved badge on header ====== */
.saved-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px 6px 6px;
  background: var(--accent-500);
  color: #fff;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.8125rem;
  border: 0;
  cursor: pointer;
  min-height: 36px;
  transition: background var(--dur) var(--ease-out);
}
.saved-pill:hover { background: var(--accent-600); }
.saved-pill__count {
  background: #fff;
  color: var(--accent-700);
  border-radius: 999px;
  padding: 2px 8px;
  font-weight: 800;
  font-size: 0.8125rem;
}

/* ====== Compare view ====== */
.compare-mobile { display: block; }
.compare-desktop { display: none; }
@media (min-width: 900px) {
  .compare-mobile { display: none; }
  .compare-desktop { display: block; }
}

/* ====== Variation in placeholder photos via hue ====== */
.placeholder-image[data-hue] {
  background:
    radial-gradient(circle at 70% 95%, color-mix(in srgb, var(--accent-100) 90%, transparent), transparent 50%),
    radial-gradient(circle at 25% 100%, hsl(var(--ph-hue, 145) 35% 78%) 0%, transparent 55%),
    radial-gradient(circle at 60% 30%, hsl(var(--ph-hue, 145) 30% 92%) 0%, transparent 60%),
    hsl(var(--ph-hue, 145) 18% 88%);
}

/* ====== Compare bar (when 2+ saved) ====== */
.compare-bar {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: var(--space-5);
  z-index: 40;
  background: var(--surface-inverse);
  color: var(--fg-on-inverse);
  border-radius: var(--radius-xl);
  padding: var(--space-3) var(--space-3) var(--space-3) var(--space-5);
  box-shadow: var(--shadow-xl);
  display: flex;
  align-items: center;
  gap: var(--space-4);
  animation: slideUp var(--dur-slow) var(--ease-out);
}
@keyframes slideUp {
  from { transform: translate(-50%, 100px); opacity: 0; }
  to { transform: translate(-50%, 0); opacity: 1; }
}
.compare-bar__avatars { display: flex; }
.compare-bar__avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  border: 2px solid var(--surface-inverse);
  margin-left: -8px;
  background: var(--primary-200);
}
.compare-bar__avatar:first-child { margin-left: 0; }

/* ====== Mobile-first sidebar drawer for filters ====== */
.filter-drawer-trigger { display: inline-flex; }

/* ====== Small helper layouts ====== */
.spread { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); flex-wrap: wrap; }

/* ====== Detail page mini-map ====== */
.mini-map {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface-2);
  aspect-ratio: 16 / 9;
  border: 1px solid var(--border-soft);
}

/* ====== "Listed by" partner row ====== */
.partner-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  background: var(--surface-2);
  border-radius: var(--radius-md);
}
.partner-row__logo {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  background: var(--primary-700);
  color: #fff;
  border-radius: 8px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1rem;
}
.partner-row__text { display: flex; flex-direction: column; }
.partner-row__name { font-weight: 700; }
.partner-row__role { font-size: 0.8125rem; color: var(--fg-2); }
/* Public site additions */
.callout {
  display: flex;
  gap: var(--space-3);
  padding: var(--space-4);
  border-radius: var(--radius-md, 12px);
  align-items: flex-start;
}

.callout__icon {
  flex-shrink: 0;
  color: var(--primary-600);
}

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

.table-wrap {
  overflow-x: auto;
  margin-top: var(--space-3);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
}

.data-table th,
.data-table td {
  padding: var(--space-2) var(--space-3);
  text-align: left;
  border-bottom: 1px solid var(--border-soft);
}

.data-table th {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-2);
  background: var(--surface-2);
}

.data-table tbody tr:hover {
  background: var(--surface-2);
}

.drawer-backdrop:not([style*='display: none']) {
  display: block;
}
