/* ============================================================
   Fifth Management & Consulting — property site styles
   Dignified, warm, senior-friendly. Poppins + Inter, self-hosted
   (latin woff2, OFL). No frameworks, no runtime CDN requests.
   ============================================================ */

/* ---------- self-hosted fonts (latin subset, OFL) ---------- */
/* Inter is a variable font: one file serves 400/500/600 for body & UI. */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("/assets/fonts/inter-latin-var.woff2") format("woff2");
}
/* Poppins — static faces, only the weights we use for display type. */
@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/assets/fonts/poppins-latin-500.woff2") format("woff2");
}
@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/assets/fonts/poppins-latin-600.woff2") format("woff2");
}
@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/assets/fonts/poppins-latin-700.woff2") format("woff2");
}

:root {
  /* FMC green system, matched to the company logo (see fmc-logo.png).
     Contrast-tuned: terracotta darkened from the template's #C0622F so
     white button text and small accents clear WCAG AA. */
  --green: #3E5C45;        /* primary forest green: headings, links, primary UI */
  --green-dark: #2C3E2D;   /* deep green: dark sections, footer */
  --green-hover: #4C7053;  /* hover for primary green fills */
  --deep: #0D542B;         /* deep FMC brand green: Pay Rent, brand mark */
  --bg: #FAF7F2;
  --bg-alt: #E8F0E9;       /* pale green-tinted section background */
  --ink: #2C3E2D;
  --ink-soft: #566A5C;
  --sage: #6F8F72;
  --sage-dark: #465F49;
  --brick: #B05A28;        /* terracotta fills/buttons (white text: 4.8:1) */
  --brick-deep: #A8511F;   /* terracotta small text on light backgrounds (5:1) */
  --line: #C8DFC9;
  --line-strong: #A9C4AB;
  --white: #FFFFFF;
  --focus: #C86A34;        /* visible on both light and dark surfaces */

  --maxw: 1100px;
  --narrow: 760px;

  /* Radius scale, adopted from the original template (8 / 10 / 14 / pill). */
  --radius: 8px;         /* inputs, small controls */
  --radius-btn: 10px;    /* buttons, matching the template's 10px */
  --radius-card: 14px;   /* cards, photo frames, map frame, dropzone */
  --radius-pill: 100px;  /* chips, badges */

  /* Soft-shadow scale (template card shadow + a lifted variant). */
  --shadow-card: 0 1px 3px rgba(0,0,0,.10), 0 1px 2px -1px rgba(0,0,0,.10);
  --shadow-lift: 0 6px 18px rgba(23,38,28,.10), 0 2px 6px rgba(23,38,28,.06);

  /* Type: Poppins for display/headings/titles/buttons, Inter for body/UI. */
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --font-display: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

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

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;     /* 17px base — the senior-friendly hard floor */
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

/* Bold body copy renders semibold — full 700 reads heavy at text sizes. */
strong, b { font-weight: 600; }

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

a { color: var(--green); text-decoration: underline; text-underline-offset: 2px; }
a:hover { color: var(--green-hover); }

h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.2; color: var(--green); font-weight: 600; }
h1 { font-size: clamp(2rem, 5vw, 2.85rem); margin: 0 0 .5em; letter-spacing: -0.01em; }
h2 { font-size: clamp(1.5rem, 3.5vw, 2rem); margin: 1.6em 0 .5em; }
h3 { font-size: 1.3rem; margin: 1.4em 0 .4em; }

p { max-width: 70ch; }

/* ---------- accessibility helpers ---------- */
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 1000;
  background: var(--green); color: #fff; padding: .75rem 1.25rem;
  border-radius: 0 0 var(--radius) 0; text-decoration: none; font-weight: 700;
}
.skip-link:focus { left: 0; }
.nowrap { white-space: nowrap; }

a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible,
textarea:focus-visible, [tabindex]:focus-visible, summary:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

/* ---------- layout ---------- */
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 1.25rem; }
.container.narrow { max-width: var(--narrow); }
.section { padding: 3rem 0; }
.section.alt { background: var(--bg-alt); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  min-height: 48px; padding: .7rem 1.4rem;
  border-radius: var(--radius-btn);
  font-family: var(--font-display); font-weight: 500; font-size: 1.0625rem;
  text-decoration: none; border: 2px solid transparent; cursor: pointer;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.btn-primary { background: var(--green); color: #fff; }
.btn-primary:hover { background: var(--green-hover); color: #fff; }
.btn-secondary { background: transparent; color: var(--green); border-color: var(--line-strong); }
.btn-secondary:hover { background: var(--bg-alt); color: var(--green); border-color: var(--green); }
.btn-lg { min-height: 54px; font-size: 1.125rem; padding: .85rem 1.8rem; }
.btn-xl { min-height: 60px; font-size: 1.25rem; padding: 1rem 1.9rem; width: 100%; max-width: 560px; }
.btn-apply { background: var(--brick); color: #fff; }
.btn-apply:hover { background: #8E4419; color: #fff; }
/* Residents (resident portal) — outlined secondary, like the original's
   outlined Pay Rent beside the filled Apply. */
.btn-residents { background: transparent; color: var(--green); border-color: var(--line-strong); }
.btn-residents:hover { background: var(--bg-alt); color: var(--green); border-color: var(--green); }
/* Mobile "Call …" button in the collapsed menu (the desktop phone chip is
   hidden there). Outlined green, with the phone glyph inheriting currentColor. */
.btn-call { background: transparent; color: var(--green); border-color: var(--line-strong); }
.btn-call:hover { background: var(--bg-alt); color: var(--green); border-color: var(--green); }
.btn-pay-sm { min-height: 44px; padding: .55rem 1.1rem; background: var(--deep); color:#fff; font-size:1rem; }
.btn-pay-sm:hover { background: #146B36; color:#fff; }
/* On the dark green footer a deep-green fill would vanish; flip the footer
   Pay Rent button to light sage with deep-green text (8:1). */
.site-footer a.btn-pay-sm { background: #C8DFC9; color: var(--green-dark); }
.site-footer a.btn-pay-sm:hover { background: #fff; color: var(--green-dark); }
.ext-mark { font-size: .85em; }

.cta-row { display: flex; flex-wrap: wrap; gap: .85rem; margin-top: 1.5rem; }
.cta-row.cta-center { justify-content: center; margin-top: 2rem; }
.cta-inline { margin-top: 1.5rem; }

/* ---------- header / nav ---------- */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 100;
}
/* Three-zone header like the original template: logo LEFT, menu truly
   CENTERED (1fr auto 1fr), CTA pair RIGHT. Spans a wider content width
   (the template's 1216px) so the zones breathe on desktop. */
.site-header > .container.header-inner { max-width: 1216px; }
.header-inner {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  min-height: 72px; gap: 1rem;
}
.wordmark { display: flex; align-items: center; gap: .65rem; text-decoration: none; line-height: 1.1; justify-self: start; }
.header-ctas { justify-self: end; display: flex; align-items: center; gap: .5rem; }
.header-ctas .btn { min-height: 44px; padding: .5rem 1.05rem; font-size: 1rem; }
/* Click-to-call chip in the right CTA zone. Outlined like the Residents button,
   but with a phone glyph + the visible office number (seniors dial). Compact so
   the three-zone header stays balanced; hidden below 980px, where the mobile
   menu shows a full-width "Call …" button instead. */
.header-phone {
  display: inline-flex; align-items: center; gap: .4rem;
  min-height: 44px; padding: .4rem .8rem;
  border: 2px solid var(--line-strong); border-radius: var(--radius-btn);
  color: var(--green); font-family: var(--font-display); font-weight: 600;
  font-size: 1rem; line-height: 1; text-decoration: none; white-space: nowrap;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.header-phone:hover { background: var(--bg-alt); border-color: var(--green); color: var(--green); }
.header-phone .phone-ico { flex: 0 0 auto; }
/* Medium desktop (just above the 980px mobile collapse): three CTA-zone items
   plus the centered nav can crowd, especially for longer property names, so the
   chip shows its glyph only. It stays a full tel: link with an aria-label; the
   visible number returns on wider screens and in the mobile menu. */
@media (min-width: 981px) and (max-width: 1160px) {
  .header-phone-num { display: none; }
  .header-phone { padding: .4rem .55rem; }
}
.wordmark-mark { flex: 0 0 auto; display: block; }
.wordmark-text { display: flex; flex-direction: column; }
.wordmark-name { font-family: var(--font-display); font-size: 1.4rem; font-weight: 700; color: var(--green); letter-spacing: -0.015em; white-space: nowrap; }
.wordmark-sub { margin-top: .12rem; font-size: .74rem; font-weight: 500; color: var(--sage-dark); text-transform: uppercase; letter-spacing: .16em; white-space: nowrap; }
@media (max-width: 420px) {
  .wordmark { gap: .5rem; }
  .wordmark-mark { width: 28px; height: 28px; }
  .wordmark-name { font-size: 1.12rem; }
  .wordmark-sub { font-size: .66rem; letter-spacing: .12em; }
}

.site-nav { display: flex; align-items: center; justify-self: center; }
.nav-menu {
  list-style: none; display: flex; align-items: center; gap: .2rem;
  margin: 0; padding: 0; flex-wrap: wrap;
}
/* Desktop: the CTAs live in the right header zone, not in the menu. */
.nav-menu > .nav-cta { display: none; }
.nav-menu > li > a:not(.btn) {
  display: inline-block; padding: .55rem .7rem; text-decoration: none;
  color: var(--ink); font-weight: 500; border-radius: var(--radius); font-size: 1rem;
}
.nav-menu > li > a:not(.btn):hover { background: var(--bg-alt); color: var(--green); }
/* Active page = green filled rounded chip (like the original's "Home" pill). */
.nav-menu > li > a[aria-current="page"] { background: var(--green); color: #fff; }
.nav-menu > li > a[aria-current="page"]:hover { background: var(--green-hover); color: #fff; }

/* ---------- nav dropdown groups (About / Photos) ---------- */
.nav-group { position: relative; }
.nav-group-btn {
  display: inline-flex; align-items: center; gap: .3rem;
  background: none; border: none; cursor: pointer;
  font-family: var(--font); font-weight: 500; font-size: 1rem;
  color: var(--ink);
  padding: .55rem .7rem; min-height: 44px;
  border-radius: var(--radius);
}
.nav-group-btn:hover,
.nav-group-btn[aria-expanded="true"] { background: var(--bg-alt); color: var(--green); }
/* Parent shows the active green pill when one of its child pages is current. */
.nav-group-btn.is-current { background: var(--green); color: #fff; }
.nav-group-btn.is-current:hover,
.nav-group-btn.is-current[aria-expanded="true"] { background: var(--green-hover); color: #fff; }
.nav-group-btn .chev { transition: transform .15s ease; }
.nav-group-btn[aria-expanded="true"] .chev { transform: rotate(180deg); }
.nav-dropdown {
  display: none;
  position: absolute; top: calc(100% + 6px); left: 0; z-index: 200;
  min-width: 220px; margin: 0; padding: .4rem; list-style: none;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-btn);
  box-shadow: var(--shadow-lift);
}
.nav-group.open .nav-dropdown { display: block; }
/* No-JS keyboard fallback: dropdown links stay reachable via focus. */
html:not(.has-nav-js) .nav-group:focus-within .nav-dropdown { display: block; }
.nav-dropdown a {
  display: flex; align-items: center;
  min-height: 44px; padding: .5rem .85rem;
  border-radius: var(--radius);
  text-decoration: none; color: var(--ink);
  font-family: var(--font); font-weight: 500; font-size: 1rem;
  white-space: nowrap;
}
.nav-dropdown a:hover { background: var(--bg-alt); color: var(--green); }
.nav-dropdown a[aria-current="page"] { background: var(--green); color: #fff; }
/* The static mobile section label is hidden on desktop. */
.nav-group-label { display: none; }

.nav-cta { margin-left: .35rem; }
.nav-cta .btn { min-height: 44px; padding: .5rem 1.05rem; font-size: 1rem; }

.nav-toggle {
  display: none; align-items: center; gap: .5rem;
  background: var(--green); color: #fff; border: none; border-radius: 6px;
  padding: .6rem .9rem; font-size: 1rem; font-weight: 600; cursor: pointer;
}
.nav-toggle-bars { display: inline-flex; flex-direction: column; gap: 3px; }
.nav-toggle-bars span { width: 20px; height: 2px; background: #fff; display: block; }

@media (max-width: 980px) {
  /* Collapse: back to a simple two-ends row — logo left, Menu button right;
     the CTAs move inside the menu panel. */
  .header-inner { display: flex; align-items: center; justify-content: space-between; }
  .header-ctas { display: none; }
  .nav-menu > .nav-cta { display: block; }
  .nav-toggle { display: inline-flex; }
  /* The open panel spans the full header width and stacks above page
     content (the hero is position:relative and would otherwise paint
     over an unstacked absolute panel). */
  .nav-menu {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    z-index: 150;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--white); border-bottom: 1px solid var(--line);
    padding: .5rem 1.25rem 1rem; box-shadow: 0 8px 16px rgba(0,0,0,.06);
  }
  .site-nav.open .nav-menu { display: flex; }
  .site-header { position: relative; }
  .nav-menu > li > a:not(.btn) { display: block; padding: .8rem .25rem; font-size: 1.125rem; border-bottom: 1px solid var(--line); border-radius: 0; }
  .nav-menu > li > a[aria-current="page"] { border-radius: var(--radius); padding-left: .6rem; }
  .nav-cta { margin: .5rem 0 0; }
  .nav-cta .btn { width: 100%; min-height: 50px; }
  .site-nav { position: static; }

  /* Groups become labeled sections: static heading, links always expanded
     and indented beneath — no nested tap-to-expand. */
  .nav-group-btn { display: none; }
  .nav-group-label {
    display: block;
    padding: .9rem .25rem .25rem;
    font-size: .82rem; font-weight: 700;
    letter-spacing: .12em; text-transform: uppercase;
    color: var(--sage-dark);
    border-bottom: 1px solid var(--line);
  }
  .nav-dropdown {
    display: block;
    position: static;
    min-width: 0; padding: 0;
    background: transparent; border: none; box-shadow: none; border-radius: 0;
  }
  .nav-dropdown a {
    padding: .8rem .25rem .8rem 1.1rem;
    font-size: 1.125rem;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
    white-space: normal;
  }
  .nav-dropdown a[aria-current="page"] { border-radius: var(--radius); }
}

/* ---------- hero ---------- */
/* Green-tinted wash: the section is filled forest green and the photo sits
   over it at low opacity (matching the original's 0.3 image-over-green),
   so the picture reads as a warm green-tinted colorized wash, not a flat
   black scrim. A soft deep-green gradient underneath keeps text legible. */
.hero { position: relative; background: var(--green); color: #fff; overflow: hidden; }
.hero-image {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: .34;
}
.hero-scrim {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(23,38,28,.35) 0%, rgba(23,38,28,.48) 60%, rgba(23,38,28,.60) 100%);
}
.hero-content { position: relative; padding: 4.5rem 0 4rem; }
.hero-eyebrow {
  display: inline-block;
  text-transform: uppercase; letter-spacing: .1em; font-size: .82rem; font-weight: 500;
  color: #E4EFE5; margin: 0 0 1rem;
  background: rgba(111,143,114,.42);
  border: 1px solid rgba(232,240,233,.35);
  border-radius: var(--radius-btn);
  padding: .32rem .8rem;
}
.hero-headline { font-family: var(--font-display); color: #fff; font-weight: 700; font-size: clamp(2.1rem, 5.5vw, 3.4rem); margin: 0 0 1rem; max-width: 18ch; text-shadow: 0 1px 10px rgba(0,0,0,.30); }
.hero-subhead { color: #F1F5F1; font-size: 1.2rem; max-width: 54ch; margin: 0 0 .5rem; }
/* Original hero button pair: filled terracotta + outlined light. */
.hero-content .cta-row .btn-primary { background: var(--brick); color: #fff; border-color: var(--brick); }
.hero-content .cta-row .btn-primary:hover { background: #8E4419; border-color: #8E4419; color: #fff; }
.hero-content .cta-row .btn-secondary { background: transparent; color: #fff; border-color: rgba(255,255,255,.75); }
.hero-content .cta-row .btn-secondary:hover { background: #fff; color: var(--deep); border-color: #fff; }
/* When no hero image, keep readable navy panel */
.hero:not(:has(.hero-image)) .hero-content { padding-top: 3.5rem; }

/* ---------- fact tiles ---------- */
/* Wrapping flex so any partial final row centers at every viewport width
   (grid packs partial rows to the left, which strands orphans). */
.facts { padding: 2.5rem 0; border-bottom: 1px solid var(--line); }
.fact-tiles { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 1.25rem; text-align: center; }
.fact { flex: 1 1 260px; max-width: 346px; background: var(--white); border: 1px solid #F6F3F4; border-radius: var(--radius-card); box-shadow: var(--shadow-card); padding: 1.6rem 1rem; }
.fact-num { display: block; font-family: var(--font-display); font-size: 2rem; font-weight: 600; color: var(--green); line-height: 1.1; }
.fact-cap { display: block; color: var(--ink-soft); margin-top: .35rem; font-size: 1rem; }
@media (max-width: 680px) { .fact { flex-basis: 100%; max-width: 420px; } }

/* ---------- centered section header (chip + heading + subline) ---------- */
/* Pale-green capsule eyebrow chip, Poppins heading, muted centered subline.
   Replaces the old left-aligned terracotta eyebrow site-wide. */
.section-head { text-align: center; max-width: 62ch; margin: 0 auto 2rem; }
.section-eyebrow { margin: 0 0 .9rem; }
.eyebrow-chip {
  display: inline-block;
  background: var(--bg-alt);
  color: var(--green);            /* 6.4:1 on pale green — AA */
  font-family: var(--font);
  font-size: .8rem; font-weight: 500;
  letter-spacing: .12em; text-transform: uppercase;
  padding: .3rem .85rem;
  border-radius: var(--radius-pill);
}
.section-title { margin: 0; }
.section-sub { margin: .85rem auto 0; max-width: 60ch; color: var(--ink-soft); font-size: 1.12rem; }
/* Legacy left-aligned eyebrow (kept for any remaining prose use). */
.eyebrow { margin: 0 0 .25rem; }
.eyebrow-h { text-transform: uppercase; letter-spacing: .1em; font-size: .85rem; font-weight: 700; color: var(--brick-deep); }
.section-features h2, .section-units h2, .section-neighborhood h2, .section-look h2 { margin-top: .1em; }

/* ---------- feature / amenity cards (signature element) ---------- */
/* Wrapping flex, centered: a partial final row (e.g. 6 cards as 3+3 on
   desktop, 2+2+2 on tablets, or a stray 5th) always centers instead of
   stranding a lone card bottom-left. Basis/max chosen so common widths
   split into 3-across then 2-across rows. */
.feature-grid {
  list-style: none; margin: 2rem 0 0; padding: 0;
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: 1.25rem;
}
.feature-card {
  flex: 1 1 260px;
  max-width: 340px;
  display: flex; flex-direction: column; align-items: center; text-align: center;
  background: var(--white);
  border: 1px solid #F0EAE6;
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 1.6rem 1.25rem;
}
.card-badge {
  display: inline-flex; align-items: center; justify-content: center;
  width: 60px; height: 60px; margin-bottom: 1rem;
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  color: var(--green);
}
.card-icon { display: block; }
.card-title { font-family: var(--font-display); font-size: 1.15rem; font-weight: 600; color: var(--ink); margin: 0; line-height: 1.3; }
.card-desc { margin: .5rem 0 0; color: var(--ink-soft); font-size: 1.0625rem; line-height: 1.5; max-width: 30ch; }
@media (max-width: 560px) { .feature-card { flex-basis: 100%; max-width: 420px; } }

/* ---------- homepage photo band ---------- */
/* Centered so a wrapped or lone photo never strands left. */
.home-photo-band {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.25rem;
  margin-top: 1.25rem;
}
.home-photo {
  margin: 0;
  flex: 1 1 320px;
  max-width: 560px; /* sources are modest resolution — never display larger */
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  background: var(--bg-alt);
}
.home-photo img { width: 100%; height: auto; }

/* ---------- page header band ---------- */
.page-header { background: var(--bg-alt); border-bottom: 1px solid var(--line); padding: 2.75rem 0 2rem; }
.page-header h1 { margin-bottom: .3em; }
.page-header .lead { font-size: 1.2rem; color: var(--ink-soft); max-width: 62ch; margin: 0; }

/* ---------- prose ---------- */
.prose-page section { margin-bottom: 1.75rem; }
.prose-page ul, .prose-page ol { max-width: 68ch; padding-left: 1.4rem; }
.prose-page li { margin: .35rem 0; }
/* 404 page: muted "prefer to call" line beneath the recovery buttons. */
.error-help { margin-top: 1.75rem; color: var(--ink-soft); }
.note { background: var(--bg-alt); border-left: 4px solid var(--sage); padding: .9rem 1.1rem; border-radius: 0 var(--radius) var(--radius) 0; max-width: 68ch; }

/* ---------- amenities ---------- */
.amenity-group { margin-bottom: 3rem; }
.amenity-notes { max-width: 68ch; margin: 0 auto 1.5rem; }
.amenity-notes .note { margin: 0 0 1rem; }

/* ---------- offset media row (photo one side, text the other) ---------- */
/* Replaces lone left-aligned photos: ~48% photo beside vertically-centered
   text; `media-row-reverse` alternates sides; stacks cleanly on mobile. */
.media-row {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: 2rem 3rem;
  margin: 2.5rem auto;
  max-width: 1000px;
}
.media-row-photo {
  flex: 1 1 380px;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  background: var(--bg-alt);
}
.media-row-photo img { width: 100%; height: auto; display: block; }
.media-row-body { flex: 1 1 320px; }
.media-row-body h2, .media-row-body h3 { margin-top: 0; }
.media-row-body p { max-width: 55ch; }
.media-row-reverse { flex-direction: row-reverse; }
.media-row-list { list-style: none; margin: .75rem 0 0; padding: 0; }
.media-row-list li { position: relative; padding-left: 1.7rem; margin: .45rem 0; }
.media-row-list li::before {
  content: ""; position: absolute; left: 0; top: .55em;
  width: .7rem; height: .35rem;
  border-left: 2px solid var(--sage-dark); border-bottom: 2px solid var(--sage-dark);
  transform: rotate(-45deg);
}
@media (min-width: 861px) { .media-row-photo { max-width: 48%; } }

/* ---------- floor plans ---------- */
/* Centered wrapping flex: an odd plan on the last row centers. */
.plan-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 1.5rem; }
.plan-card { flex: 1 1 300px; max-width: 520px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-card); box-shadow: var(--shadow-card); overflow: hidden; }
.plan-figure { background: var(--bg-alt); }
.plan-figure img { width: 100%; height: auto; }
.plan-body { padding: 1.25rem 1.4rem 1.6rem; }
.plan-body h2 { margin-top: 0; }
.plan-specs { list-style: none; display: flex; flex-wrap: wrap; gap: .5rem; padding: 0; margin: .5rem 0 1rem; }
.plan-specs li { background: var(--bg-alt); border: 1px solid var(--line); border-radius: 999px; padding: .25rem .85rem; font-size: .95rem; font-weight: 600; color: var(--ink-soft); }
.plan-rent { font-size: 1.02rem; }
/* Unit-interior photos beneath the plan drawings. */
.plan-interiors { margin-top: 3.5rem; }

/* ---------- compact photo banner (neighborhood page header) ---------- */
/* Green-wash photo strip with the page H1 overlaid — the same colorized
   treatment as the homepage hero, at a fraction of the height. */
.page-banner { position: relative; background: var(--green); color: #fff; overflow: hidden; }
.page-banner-img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: .34;
}
.page-banner-scrim {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(23,38,28,.30) 0%, rgba(23,38,28,.52) 100%);
}
.page-banner-content { position: relative; padding: 2.5rem 0 2.25rem; }
.page-banner-content h1 { color: #fff; margin: 0; text-shadow: 0 1px 10px rgba(0,0,0,.30); }
.page-banner-sub { color: #F1F5F1; font-size: 1.15rem; margin: .4rem 0 0; max-width: 60ch; }

/* ---------- "On this page" jump chips ---------- */
.jump-nav {
  display: flex; flex-wrap: wrap; align-items: center; gap: .6rem;
  padding-top: 1.25rem; padding-bottom: .25rem;
}
.jump-label { font-weight: 700; color: var(--ink-soft); font-size: .95rem; margin-right: .2rem; }
.jump-chip {
  display: inline-flex; align-items: center;
  min-height: 44px; padding: .45rem .95rem;
  background: var(--bg-alt); color: var(--green);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  font-family: var(--font-display); font-weight: 500; font-size: .95rem;
  text-decoration: none;
}
.jump-chip:hover { background: var(--green); color: #fff; border-color: var(--green); }
/* Anchored sections clear the sticky header when jumped to. */
[id="nearby"], [id="places"], .nb-block[id] { scroll-margin-top: 90px; }

/* ---------- neighborhood ---------- */
.nb-block { margin-bottom: 1.5rem; }
.nb-block h2 { font-size: 1.4rem; margin-bottom: .2em; }
/* Tighter rhythm on the neighborhood page: less scroll between sections. */
.nb-page.section { padding: 1.75rem 0 2.25rem; }
.nb-page .nearby { margin: 1.25rem 0 1.75rem; }
.nb-page .nearby-glance { margin-top: 1.25rem; }
.nb-page .nearby-places { margin-bottom: 1.75rem; }
.nb-page .nb-block { margin-bottom: 1.25rem; }
.nb-page .cta-inline { margin-top: 1rem; }

/* ---------- neighborhood: what's nearby aerial ---------- */
.nearby { margin: 2.25rem 0 2.5rem; }
.nearby > h2 { margin-top: 0; }
.nearby-map {
  position: relative;
  margin: 1.5rem 0 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  overflow: hidden;
  background: var(--green-dark);
  box-shadow: 0 8px 30px rgba(23, 38, 28, .14);
}
.nearby-stage { position: relative; aspect-ratio: 1 / 1; }
.nearby-stage > img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
.nearby-scrim {
  position: absolute; inset: 0;
  background: radial-gradient(circle at 50% 50%, rgba(23,38,28,0) 34%, rgba(23,38,28,.32) 100%);
}
.nearby-overlay { position: absolute; inset: 0; }
.nearby-lines { position: absolute; inset: 0; width: 100%; height: 100%; }

/* Place labels: compact translucent pills of real HTML text set BESIDE each
   dot (the dot marks the spot), positioned in % at build time. Labels sit on
   the inward side of their dot, so they can never clip the frame. */
.nearby-label {
  position: absolute;
  max-width: 150px;
  background: rgba(250, 247, 242, .93);
  border-radius: 7px;
  padding: .28rem .55rem;
  box-shadow: 0 2px 8px rgba(23, 38, 28, .35);
}
.label-name { display: block; font-weight: 700; font-size: .9rem; color: var(--green); line-height: 1.2; }
.label-arrow { font-weight: 700; }
.label-time { display: block; font-size: .8rem; font-weight: 700; color: var(--sage-dark); margin-top: 1px; }
.nearby-label.regional .label-time { color: var(--brick-deep); }

/* Center property pin + label. */
.nearby-pin {
  position: absolute; left: 50%; top: 50%;
  transform: translate(-50%, -100%);
  text-align: center;
}
.pin-dot {
  width: 26px; height: 26px; margin: 0 auto;
  border-radius: 50% 50% 50% 0;
  background: var(--brick);
  transform: rotate(-45deg);
  border: 3px solid var(--white);
  box-shadow: 0 3px 10px rgba(0, 0, 0, .4);
}
.pin-label {
  margin-top: 9px;
  display: inline-block;
  background: var(--green); color: #fff;
  font-weight: 700; font-size: .95rem;
  padding: .3rem .65rem;
  border-radius: 7px;
  white-space: nowrap;
  box-shadow: 0 3px 10px rgba(0, 0, 0, .3);
}
.nearby-credit {
  margin: 0;
  padding: .6rem .9rem;
  background: var(--white);
  border-top: 1px solid var(--line);
  font-size: .85rem;
  color: var(--ink-soft);
}

/* The at-a-glance list mirrors the graphic and always renders. */
.nearby-glance { margin-top: 1.75rem; }
.nearby-glance h3 { margin: 0 0 .2em; }
.nearby-hint { color: var(--ink-soft); font-size: .95rem; margin: 0 0 1rem; }
.nearby-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); max-width: 640px; }
.nearby-list li {
  display: flex; justify-content: space-between; align-items: baseline; gap: 1rem;
  padding: .65rem .1rem;
  border-bottom: 1px solid var(--line);
}
.nearby-list .place-name { font-weight: 600; }
.nearby-list .place-sub { display: block; font-weight: 400; font-size: .92rem; color: var(--ink-soft); }
.nearby-list .place-drive { white-space: nowrap; color: var(--sage-dark); font-weight: 700; text-align: right; }

/* Small screens: the aerial keeps only the pin; the list carries the info. */
@media (max-width: 700px) {
  .nearby-label, .nearby-lines { display: none; }
}

/* ---------- neighborhood: landmark photo cards ---------- */
/* Centered wrapping flex: the hero card spans the row; any remaining cards
   center beneath it rather than stranding left. */
.nearby-places { margin-bottom: 2.5rem; }
.place-cards { display: flex; flex-wrap: wrap; justify-content: center; gap: 1.5rem; margin-top: 1.25rem; }
.place-card {
  flex: 1 1 320px;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  background: var(--white);
}
.place-card-hero { flex-basis: 100%; }
.place-card:not(.place-card-hero) { max-width: 560px; }
.place-card img { width: 100%; height: auto; }
.place-card figcaption { padding: .85rem 1.1rem 1rem; }
.place-card figcaption strong { color: var(--green); }
.place-credit { display: block; margin-top: .4rem; font-size: .85rem; color: var(--ink-soft); }

/* ---------- help / callout boxes ---------- */
.help-box { background: #EEF3EF; border: 1px solid #CBDCCF; border-left: 5px solid var(--sage-dark); border-radius: var(--radius-card); box-shadow: var(--shadow-card); padding: 1.4rem 1.6rem; margin: 1.75rem 0; }
.help-box-title { margin: 0 0 .4rem; font-size: 1.3rem; }
.help-box p { margin: 0; }

.resident-box { background: var(--green); color: #fff; border-radius: var(--radius-card); box-shadow: var(--shadow-card); padding: 1.4rem 1.6rem; margin-top: 2rem; }
.resident-box h2 { color: #fff; margin-top: 0; }
.resident-box a { color: #C8DFC9; }

.micro-disclaimer { border-top: 1px solid var(--line); padding-top: 1.25rem; color: var(--ink-soft); font-size: .98rem; }

.usda-statement { border-left: 4px solid var(--green); background: var(--white); padding: 1.25rem 1.5rem; margin: 0; border-radius: 0 var(--radius) var(--radius) 0; }
.usda-statement p { max-width: 72ch; }

/* ---------- contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 3rem; }
@media (max-width: 820px) { .contact-grid { grid-template-columns: 1fr; gap: 2rem; } }
.office-info { margin: 0 0 1rem; }
.office-info > div { display: grid; grid-template-columns: 8.5rem 1fr; gap: .5rem; padding: .55rem 0; border-bottom: 1px solid var(--line); }
.office-info dt { font-weight: 600; color: var(--ink-soft); margin: 0; }
.office-info dd { margin: 0; }
.map-note { color: var(--ink-soft); }
.contact-list { list-style: none; padding: 0; }
.contact-list li { padding: .2rem 0; }
.agency { margin: 1rem 0; }
.agency h3 { margin-bottom: .1em; }
.agency p { margin-top: .1em; }

/* ---------- forms ---------- */
.form-wrap { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-card); box-shadow: var(--shadow-card); padding: 1.5rem 1.6rem 1.8rem; margin-top: 1.5rem; }
.fmc-form .field { margin-bottom: 1.15rem; }
.fmc-form label, .fmc-form legend { display: block; font-weight: 600; margin-bottom: .35rem; color: var(--ink); }
.fmc-form input[type="text"], .fmc-form input[type="tel"], .fmc-form input[type="email"], .fmc-form textarea {
  width: 100%; min-height: 48px; padding: .65rem .8rem; font: inherit;
  border: 2px solid var(--line-strong); border-radius: var(--radius); background: #fff; color: var(--ink);
}
.fmc-form textarea { min-height: 130px; resize: vertical; }
.fmc-form input[type="file"] { font: inherit; }
.fmc-form fieldset { border: none; margin: 0; padding: 0; }
.fmc-form .choice { font-weight: 400; display: flex; align-items: flex-start; gap: .5rem; margin: .3rem 0; }
.fmc-form .choice input { min-height: auto; width: auto; margin-top: .35rem; }
.field-consent .choice { align-items: flex-start; }
.req { color: var(--brick-deep); }
.optional { color: var(--ink-soft); font-weight: 400; font-size: .9em; }
.field-hint { font-size: .95rem; color: var(--ink-soft); margin: .35rem 0 0; }
.field-error { color: #A3271A; font-weight: 700; margin: .4rem 0 0; }
.form-status { padding: .9rem 1.1rem; border-radius: 6px; margin: 1rem 0; font-weight: 600; }
.form-status.ok { background: #E7F1E8; border: 1px solid #B7D3BA; color: #245C2C; }
.form-status.err { background: #FBE9E7; border: 1px solid #E4B4AC; color: #9A2C1B; }
.form-fallback-note { font-size: .95rem; color: var(--ink-soft); margin-top: .9rem; }
.response-note { font-size: .98rem; color: var(--ink-soft); margin-top: 1rem; }

/* ---------- apply page ---------- */
/* Stacked full-width sections: download first, then the upload form. */
.apply-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin: 0 0 1.75rem;
}
.apply-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 1.6rem 1.7rem 1.8rem;
  margin: 0;
}
.apply-card-title { margin: 0 0 .8rem; font-size: 1.5rem; }
.apply-card-download { border-top: 5px solid var(--green); }
.apply-card-upload { border-top: 5px solid var(--brick); }
.apply-card-lead { margin: 0 0 1.2rem; }
.apply-download { margin-top: .25rem; }
.btn-download-icon { flex: 0 0 auto; }
.apply-card-note { margin: 1rem 0 0; color: var(--ink-soft); font-size: 1rem; }

/* The apply form sits directly inside its card (no nested form-wrap). */
.apply-card-upload .fmc-form { margin-top: 0; }

/* ---------- file dropzone ---------- */
.dropzone {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: .35rem;
  border: 3px dashed var(--line-strong);
  border-radius: var(--radius-card);
  background: var(--bg);
  padding: 2.5rem 1.25rem;
  cursor: pointer;
  transition: border-color .15s ease, background-color .15s ease;
}
.dropzone:hover { border-color: var(--green); background: var(--bg-alt); }
.dropzone.is-dragover {
  border-color: var(--green);
  border-style: solid;
  background: #EEF3EF;
}
/* Keyboard focus lands on the input inside; mirror the ring onto the box. */
.dropzone:focus-within { outline: 3px solid var(--focus); outline-offset: 2px; }
.dropzone-icon { color: var(--green); margin-bottom: .35rem; }
.dropzone-primary { margin: 0; font-size: 1.2rem; font-weight: 600; color: var(--green); max-width: none; }
.dropzone-secondary { margin: 0; color: var(--ink-soft); max-width: none; }
.dropzone-tertiary { margin: .35rem 0 0; font-size: .95rem; color: var(--ink-soft); max-width: none; }
/* The native input stays functional and covers the box for click/keyboard,
   but is visually hidden behind the friendly labels. */
.dropzone-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.file-list { list-style: none; margin: 1rem 0 0; padding: 0; }
.file-list li {
  display: flex;
  align-items: center;
  gap: .75rem;
  flex-wrap: wrap;
  padding: .7rem .9rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--white);
  margin-bottom: .5rem;
}
.file-list .file-name { font-weight: 600; word-break: break-word; }
.file-list .file-size { color: var(--ink-soft); font-size: .95rem; }
.file-list .file-remove {
  margin-left: auto;
  min-height: 44px;
  padding: .4rem 1rem;
  border: 2px solid var(--line-strong);
  border-radius: 6px;
  background: var(--white);
  color: var(--brick-deep);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.file-list .file-remove:hover { border-color: var(--brick); background: var(--bg-alt); }
.file-total { margin: .35rem 0 0; font-weight: 700; color: var(--ink); }

/* Big success panel that replaces the form on submit. */
.apply-confirm {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: .4rem;
  background: #E7F1E8;
  border: 1px solid #B7D3BA;
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 2.25rem 1.5rem;
}
.apply-confirm .confirm-icon { color: var(--sage-dark); margin-bottom: .4rem; }
.apply-confirm h3 { margin: 0; color: #245C2C; font-size: 1.5rem; }
.apply-confirm p { margin: .35rem 0 0; color: #245C2C; max-width: 46ch; }
.apply-confirm a { color: #245C2C; font-weight: 700; }
/* Receipt: server reference number + timestamp, shown after a live submission. */
.apply-receipt {
  display: grid;
  grid-template-columns: auto auto;
  gap: .25rem 1.25rem;
  justify-content: center;
  margin: .9rem 0 .2rem;
  padding: .85rem 1.25rem;
  background: #fff;
  border: 1px solid #B7D3BA;
  border-radius: var(--radius-card);
}
.apply-receipt div { display: contents; }
.apply-receipt dt { color: #3d5c45; font-weight: 600; text-align: right; }
.apply-receipt dd { margin: 0; color: #245C2C; font-weight: 700; text-align: left; }
.apply-receipt-note { font-size: .95rem; color: #3d5c45 !important; font-weight: 400; }

/* ---------- photos: Zillow-style mosaic collage ---------- */
/* One rounded frame holding a large lead tile + a 2x2 of smaller tiles.
   Pure CSS grid, so it renders and each tile links to its full image with
   JavaScript disabled. gallery.js upgrades the tiles into a lightbox. */
.photos-mosaic-wrap { margin: 0 auto; max-width: 1100px; }
.photos-mosaic {
  display: grid;
  grid-template-columns: 1.35fr 1fr 1fr;
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: 4px;
  aspect-ratio: 3 / 2;
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: var(--shadow-lift);
  background: var(--bg-alt);
}
/* Lead tile: big, left, two rows tall. Others fill the 2x2 to its right. */
.mosaic-tile {
  position: relative;
  display: block;
  overflow: hidden;
  background: var(--bg-alt);
  text-decoration: none;
  min-height: 0; min-width: 0;
}
.mosaic-tile-lead { grid-row: 1 / span 2; grid-column: 1; }
.mosaic-tile img {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
  transition: transform .3s ease;
}
.mosaic-tile:hover img,
.mosaic-tile:focus-visible img { transform: scale(1.035); }
/* Keep the focus ring on top of neighboring tiles and the frame. */
.mosaic-tile:focus-visible { outline: 3px solid var(--focus); outline-offset: -3px; z-index: 2; }
/* Hidden overflow tiles (6th+): present for no-JS links and the lightbox
   index, but never shown in the collage. */
.mosaic-hidden { display: none; }

/* "See all N photos" scrim button, overlaid on the last visible tile. */
.mosaic-more {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(23, 38, 28, .55);
  transition: background-color .15s ease;
}
.mosaic-tile:hover .mosaic-more,
.mosaic-tile:focus-visible .mosaic-more { background: rgba(23, 38, 28, .66); }
.mosaic-more-inner {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: .6rem 1.15rem;
  background: rgba(23, 38, 28, .82);
  color: #fff;                         /* white on ~0.82 dark green: AA */
  border: 1.5px solid rgba(255, 255, 255, .85);
  border-radius: var(--radius-btn);
  font-family: var(--font-display); font-weight: 600; font-size: 1.02rem;
  text-align: center; line-height: 1.2;
}

/* Below-frame "See all N photos" button (also opens the lightbox with JS). */
.mosaic-actions { display: flex; justify-content: center; margin-top: 1.25rem; }
.mosaic-seeall { min-height: 48px; }

/* Tablet: lead + a stacked pair to its right (3 visible). Tiles 4 & 5 hide;
   the "See all N photos" button below the frame carries the overflow here. */
@media (max-width: 860px) {
  .photos-mosaic { grid-template-columns: 1.3fr 1fr; }
  .mosaic-tile-lead { grid-row: 1 / span 2; grid-column: 1; }
  .mosaic-tile:nth-of-type(4),
  .mosaic-tile:nth-of-type(5) { display: none; }
}

/* Mobile chip on the lead tile: hidden until ≤560px, then pinned bottom-right
   as the "See all N photos" affordance (the lead is the only visible tile). */
.mosaic-chip { display: none; }

@media (max-width: 560px) {
  .photos-mosaic {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr;
    aspect-ratio: 4 / 3;
  }
  .mosaic-tile-lead { grid-row: 1; grid-column: 1; }
  .mosaic-tile:not(.mosaic-tile-lead) { display: none; }
  .mosaic-chip {
    position: absolute; inset: auto .6rem .6rem auto;
    display: inline-flex; align-items: center; justify-content: center;
  }
  .mosaic-chip-inner {
    display: inline-flex; align-items: center; justify-content: center;
    min-height: 44px; padding: .5rem 1rem;
    background: rgba(23, 38, 28, .85);   /* white on ~0.85 dark green: AA */
    color: #fff;
    border: 1.5px solid rgba(255, 255, 255, .8);
    border-radius: var(--radius-pill);
    font-family: var(--font-display); font-weight: 600; font-size: .95rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, .4);
  }
  .mosaic-actions { margin-top: 1rem; }
}

/* ---------- photos: full-screen lightbox ---------- */
/* Lock the page behind the dialog. */
html.lightbox-open, body.lightbox-open { overflow: hidden; }

.lightbox {
  position: fixed; inset: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: center;
}
.lightbox[hidden] { display: none; }
.lightbox-scrim { position: absolute; inset: 0; background: rgba(8, 12, 9, .93); }
.lightbox-frame {
  position: relative;
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  padding: 4.5rem 4.75rem 5.5rem;
}
.lightbox-figure {
  position: relative; z-index: 1;
  margin: 0;
  display: flex; flex-direction: column; align-items: center;
  max-width: 100%; max-height: 100%;
}
.lightbox-img {
  max-width: 100%;
  max-height: calc(100vh - 11rem);
  width: auto; height: auto;
  object-fit: contain;
  border-radius: 4px;
  background: #111;
  box-shadow: 0 10px 40px rgba(0, 0, 0, .5);
}
.lightbox.is-swapping .lightbox-img { opacity: .35; transition: opacity .12s ease; }
.lightbox-caption {
  margin: .9rem auto 0;
  max-width: 70ch;
  text-align: center;
  color: #F1F5F1;                       /* near-white on near-black: AA */
  font-size: 1.02rem; line-height: 1.5;
}
.lightbox-cap-text { display: block; }
.lightbox-cap-credit { display: block; margin-top: .3rem; font-size: .88rem; color: #C6D2C7; }
.lightbox-caption a { color: #CFE3D2; }
.lightbox-caption a:hover { color: #fff; }

.lightbox-counter {
  position: absolute; z-index: 2; top: 1.15rem; left: 1.25rem;
  margin: 0;
  color: #E8EFE9; font-weight: 600; font-size: 1rem;
  background: rgba(0, 0, 0, .4);
  padding: .35rem .8rem; border-radius: var(--radius-pill);
}

/* Big, obvious controls that read clearly on the dark scrim. */
.lightbox-btn {
  position: absolute; z-index: 2;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(20, 26, 21, .72);
  color: #fff;
  border: 1.5px solid rgba(255, 255, 255, .35);
  cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease;
}
.lightbox-btn:hover { background: rgba(40, 52, 42, .92); border-color: rgba(255, 255, 255, .7); }
.lightbox-btn:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.lightbox-close {
  top: .9rem; right: 1rem;
  width: 48px; height: 48px; border-radius: var(--radius-pill);
}
.lightbox-prev, .lightbox-next {
  top: 50%; transform: translateY(-50%);
  width: 56px; height: 56px; border-radius: var(--radius-pill);
}
.lightbox-prev { left: 1rem; }
.lightbox-next { right: 1rem; }

@media (max-width: 640px) {
  .lightbox-frame { padding: 4rem 1rem 5rem; }
  .lightbox-img { max-height: calc(100vh - 10rem); }
  .lightbox-prev { left: .5rem; }
  .lightbox-next { right: .5rem; }
  .lightbox-prev, .lightbox-next { width: 50px; height: 50px; }
}

@media (prefers-reduced-motion: reduce) {
  .mosaic-tile img { transition: none; }
  .lightbox.is-swapping .lightbox-img { transition: none; opacity: 1; }
}

/* ---------- footer ---------- */
.site-footer { background: var(--green-dark); color: #D6E4D8; margin-top: 3rem; padding: 2.75rem 0 2rem; font-size: 1rem; line-height: 1.6; }
.site-footer a { color: #C8DFC9; }
.site-footer a:hover { color: #fff; }
.footer-compliance { display: flex; gap: 1.25rem; align-items: flex-start; padding-bottom: 1.75rem; border-bottom: 1px solid rgba(255,255,255,.15); }
.footer-eho { color: #C8DFC9; flex: 0 0 auto; }
.eho-logo { display: block; }
.footer-compliance-text p { max-width: 80ch; margin: 0 0 .6rem; }
.footer-compliance-text strong { color: #fff; }
.footer-usda { font-style: italic; color: #BFD2C2; }
.footer-cols { display: grid; grid-template-columns: 1.2fr 1fr; gap: 2rem; padding: 1.75rem 0; border-bottom: 1px solid rgba(255,255,255,.15); }
@media (max-width: 720px) { .footer-cols { grid-template-columns: 1fr; gap: 1.5rem; } .footer-compliance { flex-direction: column; } }
.footer-heading { color: #fff; font-size: 1.2rem; margin: 0 0 .5rem; }
/* FMC logo badge: the real (green) logo sits on a light card so it reads
   correctly against the dark footer. */
.fmc-badge {
  display: inline-block;
  background: var(--bg);
  border-radius: var(--radius);
  padding: .9rem 1.1rem;
  margin: 0 0 1rem;
  max-width: 240px;
}
.fmc-badge img { display: block; width: 100%; height: auto; }
.site-footer address { font-style: normal; }
.footer-hours { margin: .6rem 0 0; }
/* Legal row centers, so a wrapped second line of links balances instead of
   stranding left. Copyright centers with it. */
.footer-legal { padding: 1.25rem 0 .5rem; display: flex; flex-wrap: wrap; justify-content: center; gap: .4rem .1rem; align-items: center; }
.footer-legal .sep { margin: 0 .5rem; color: rgba(255,255,255,.4); }
.footer-copyright { color: #9DB4A0; font-size: .9rem; margin: .5rem 0 0; text-align: center; }

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}

/* ---------- apply-online (prototype pre-application form) ---------- */
/* date/number inputs get the same treatment as the text inputs above */
.fmc-form input[type="date"], .fmc-form input[type="number"] {
  width: 100%; min-height: 48px; padding: .65rem .8rem; font: inherit;
  border: 2px solid var(--line-strong); border-radius: var(--radius); background: #fff; color: var(--ink);
}
.apply-online-form .app-section {
  margin: 0 0 1.75rem; padding: 1.5rem 1.5rem .4rem;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
}
.apply-online-form .app-section > h2 { margin: 0 0 1rem; font-size: 1.3rem; }
.apply-online-form .app-section-certify { background: #edf3ea; }
.app-hint { color: var(--ink-soft); font-size: .95rem; margin: -.35rem 0 1.1rem; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
.field-row-3 { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 0 1rem; }
@media (max-width: 560px) { .field-row, .field-row-3 { grid-template-columns: 1fr; } }
.app-person { border: 1px dashed var(--line-strong); border-radius: var(--radius); padding: 1rem 1rem .2rem; margin-bottom: 1rem; }
.app-person > legend { font-weight: 700; padding: 0 .4rem; margin-left: -.4rem; }
.app-note {
  background: var(--white); border-left: 4px solid var(--green);
  padding: .9rem 1.1rem; border-radius: 0 var(--radius) var(--radius) 0; margin-bottom: 1.25rem;
}
.app-note p { margin: 0; }

/* HOTMA Section 515 application (draft) */
.app-draft-banner { background: #fbe7d8; border: 2px solid #c46a2b; color: #5a2f10; border-radius: var(--radius); padding: 1rem 1.2rem; margin-bottom: 1.75rem; }
.app-draft-banner strong { display: block; margin-bottom: .3rem; }
.app-draft-banner span { font-size: .95rem; }
.app-subhead { margin: 1.4rem 0 .6rem; font-size: 1.05rem; }
.app-note-plain { color: var(--ink-soft); font-size: .95rem; margin: 0 0 1.1rem; }
.app-note-plain p { margin: 0 0 .5rem; }
.app-signature { border-top: 1px dashed var(--line-strong); margin-top: 1rem; padding-top: 1rem; }
.money-input { display: flex; align-items: center; gap: .45rem; }
.money-input .money-sign { font-weight: 700; color: var(--ink-soft); }
.money-input input { max-width: 12rem; }
/* wider form on desktop so field pairs sit side by side and read better */
.apply-online-page .container.app-wide { max-width: 920px; }
.app-repeater { margin-bottom: 1.25rem; }
.app-repeater-note { margin: 0 0 .8rem; }
.app-add { margin-top: .25rem; }

/* select fields sized to match the text inputs */
.fmc-form select { width: 100%; min-height: 48px; padding: .6rem .8rem; font: inherit; border: 2px solid var(--line-strong); border-radius: var(--radius); background: #fff; color: var(--ink); }

/* table-style repeaters: shared column header + aligned rows on desktop */
.rt-vh { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.rt-head { display: none; }
.rt-radio { border: 0; padding: 0; margin: 0; }
.choice-inline { display: inline-flex; margin-right: 1rem; font-weight: 400; }
.app-repeater.is-table .rt-num { color: var(--ink-soft); font-weight: 700; }
@media (min-width: 760px) {
  .app-repeater.is-table .rt-head { display: grid; gap: 0 .7rem; align-items: end; padding: 0 0 .35rem; font-weight: 600; font-size: .9rem; color: var(--ink); }
  .app-repeater.is-table .rt-row { display: grid; gap: 0 .7rem; align-items: start; padding: .55rem 0; border-top: 1px solid var(--line); }
  .app-repeater.is-table .rt-num { padding-top: .6rem; }
  .app-repeater.is-table .rt-cell { min-width: 0; }
  .app-repeater.is-table .rt-cell input, .app-repeater.is-table .rt-cell select, .app-repeater.is-table .rt-cell textarea { min-height: 44px; }
  .app-repeater.is-table .rt-radio { padding-top: .55rem; }
}
@media (max-width: 759px) {
  .app-repeater.is-table .rt-row { display: block !important; grid-template-columns: none !important; border: 1px dashed var(--line-strong); border-radius: var(--radius); padding: 1rem; margin-bottom: 1rem; position: relative; }
  .app-repeater.is-table .rt-num { display: inline-block; margin-bottom: .5rem; }
  .app-repeater.is-table .rt-cell { margin-bottom: 1rem; }
  .app-repeater.is-table .rt-cell:last-child { margin-bottom: 0; }
  .app-repeater.is-table .rt-vh { position: static; width: auto; height: auto; margin: 0 0 .35rem; overflow: visible; clip: auto; white-space: normal; display: block; font-weight: 600; }
  .app-repeater.is-table .rt-remove-cell { position: absolute; top: .6rem; right: .6rem; }
}

/* Remove-row control (× on tables, "Remove" on cards) */
.rt-remove, .app-card-remove { appearance: none; -webkit-appearance: none; border: 1px solid var(--line-strong); background: #fff; color: var(--ink-soft); cursor: pointer; font: inherit; }
.rt-remove { width: 44px; height: 44px; border-radius: 50%; font-size: 1.2rem; line-height: 1; display: inline-flex; align-items: center; justify-content: center; padding: 0; }
.app-card-remove { border-radius: var(--radius); padding: .3rem .75rem; font-size: .85rem; }
.rt-remove:hover, .app-card-remove:hover, .rt-remove:focus-visible, .app-card-remove:focus-visible { border-color: #9a2c1b; color: #9a2c1b; background: #fbe9e7; }
@media (min-width: 760px) {
  .app-repeater.is-table .rt-remove-cell { display: flex; align-items: flex-start; justify-content: center; padding-top: .5rem; }
}

/* card-style repeaters (rental history) — reads as an aligned block per home */
.app-repeater.is-cards .app-card { border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 1rem 1.1rem; margin-bottom: 1rem; background: #fbfcfa; }
.app-card-head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-bottom: .5rem; }
.app-card-title { font-weight: 700; color: var(--ink); }

/* "which household members lived here" checkboxes */
.hm-field { border: 0; padding: 0; margin: .2rem 0 0; min-width: 0; }
.hm-field > legend { font-weight: 600; margin-bottom: .4rem; padding: 0; }
.hm-checks { display: flex; flex-wrap: wrap; gap: .35rem 1.1rem; }
.hm-checks:empty { display: none; }
.hm-checks .choice-inline { margin-right: 0; }
