:root {
  --ink: #152536;
  /* Dark enough to clear WCAG AA 4.5:1 against --soft (#eef3f7), not just
     against white -- muted text sits on soft panels throughout this page. */
  --muted: #5c6b7c;
  --navy: #17324d;
  --blue: #2667a8;
  --surface: #ffffff;
  --soft: #eef3f7;
  --line: #dce5ec;
  --success: #18794e;
  --danger: #b42318;
  --accent: #17324d;
  --accent-contrast: #ffffff;
  --accent-soft: #e8eef3;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--soft);
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
h1, h2, h3, p { margin-top: 0; }
.skip-link { position: fixed; left: 1rem; top: -4rem; z-index: 100; display: inline-flex; align-items: center; min-height: 44px; padding: .75rem 1rem; background: white; color: var(--navy); }
.skip-link:focus { top: 1rem; }
.rent-header { border-bottom: 1px solid var(--line); background: white; }
.rent-header-inner { max-width: 1100px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.1rem 1.5rem; }
.rent-brand { display: flex; align-items: center; gap: .7rem; min-width: 0; color: var(--accent); font-weight: 900; font-size: 1.2rem; text-decoration: none; }
/* #4650: org logo, matching the sizing convention already used for
   .portal-brand img on the Tenant Portal's own header (tenant.css) -- fixed
   height, width capped and left-aligned via object-fit so a wide or
   narrow upload never distorts or overflows the header row. */
.rent-brand-logo { width: auto; max-width: 170px; height: 40px; object-fit: contain; object-position: left center; }
@media (max-width: 640px) {
  .rent-brand-logo { max-width: 110px; height: 32px; }
}
.rent-header-tag { color: var(--muted); font-size: .85rem; }

/* #4623: Contact button + modal, and the header actions row that holds it
   alongside the (still-conditionally-hidden) "Powered by" tag. */
.rent-header-actions { display: flex; align-items: center; gap: 1rem; }
.rent-contact-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: .55rem 1.1rem; border: 1px solid var(--accent); border-radius: 9px; font-weight: 800; font-size: .88rem; color: var(--accent); background: var(--accent-soft); white-space: nowrap; cursor: pointer; }
.rent-contact-btn:hover { filter: brightness(.96); }
.rent-modal-backdrop { position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center; padding: 1.25rem; background: rgba(21,37,54,.45); }
.rent-modal { width: 100%; max-width: 380px; padding: 1.4rem; border-radius: 14px; background: white; box-shadow: 0 24px 60px rgba(22,50,77,.22); }
.rent-modal-header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.rent-modal-header h2 { font-size: 1.05rem; margin: 0; }
.rent-modal-close { min-height: 32px; min-width: 32px; padding: 0; border-radius: 8px; font-size: 1.2rem; line-height: 1; color: var(--muted); background: var(--soft); }
.rent-modal-close:hover { filter: brightness(.96); }
.rent-contact-modal-rows { display: flex; flex-direction: column; gap: .85rem; }
.rent-contact-modal-row { display: flex; flex-direction: column; gap: .15rem; font-size: .92rem; }
.rent-contact-modal-label { color: var(--muted); font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .03em; }
.rent-contact-modal-row a { color: var(--accent); font-weight: 700; text-decoration: none; }
.rent-contact-modal-row a:hover { text-decoration: underline; }
.rent-main { flex: 1; max-width: 1100px; width: 100%; margin: 0 auto; padding: clamp(1.5rem, 4vw, 3rem) 1.5rem; }
.eyebrow { margin: 0; color: var(--accent); font-size: .75rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.muted { color: var(--muted); line-height: 1.55; }
#listings-heading, #apply-heading { margin: .5rem 0 1.5rem; font-size: clamp(1.9rem, 4vw, 2.8rem); letter-spacing: -.03em; }
.alert { margin: 1rem 0; padding: .8rem 1rem; border-left: 4px solid var(--danger); color: #7a271a; background: #fef3f2; border-radius: 4px; }
.success-alert { border-left-color: var(--success); color: #0f5132; background: #edf8f2; }
/* #4412 QA-FAIL fix: preview-mode draft banner -- informational, not an error. */
.alert-info { border-left-color: var(--accent); color: #1e3a5f; background: #eef4fb; }
.loading-state, .empty-list { padding: 1rem 0; color: var(--muted); }
.empty-list strong { display: block; color: var(--ink); margin-bottom: .3rem; }
.back-link { display: inline-block; margin-bottom: 1.25rem; color: var(--accent); font-weight: 700; text-decoration: none; }
.back-link:hover { text-decoration: underline; }
.apply-browse-banner { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; justify-content: space-between; margin: 0 0 1rem; padding: 1.1rem 1.25rem; border: 1px solid var(--line, #d5dae0); border-radius: 12px; background: var(--surface-2, #f4f7fb); }
.apply-browse-banner h2 { margin: 0 0 .25rem; font-size: 1.05rem; }
.apply-browse-banner p { margin: 0; }
.apply-browse-banner[hidden], .apply-browse-divider[hidden] { display: none; }
.apply-browse-button { display: inline-block; padding: .7rem 1.2rem; border-radius: 8px; background: var(--accent); color: #fff; font-weight: 700; text-decoration: none; white-space: nowrap; }
.apply-browse-button:hover { filter: brightness(.95); }
.apply-browse-divider { display: flex; align-items: center; gap: .75rem; margin: 0 0 .75rem; color: var(--muted, #5a6573); font-size: .9rem; }
.apply-browse-divider::before, .apply-browse-divider::after { content: ""; flex: 1; border-top: 1px solid var(--line, #d5dae0); }
@media (max-width: 560px) { .apply-browse-button { display: block; width: 100%; text-align: center; } }

/* Listings grid */
.listings-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.25rem; }
.listing-card { display: block; padding: 0; border: 1px solid var(--line); border-radius: 14px; background: white; overflow: hidden; text-decoration: none; color: inherit; box-shadow: 0 8px 24px rgba(22,50,77,.045); transition: box-shadow .15s ease, transform .15s ease; }
.listing-card:hover { box-shadow: 0 14px 34px rgba(22,50,77,.1); transform: translateY(-2px); }
.listing-card-photo { width: 100%; aspect-ratio: 4 / 3; background: var(--soft) center/cover no-repeat; display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: .85rem; }
.listing-card-body { padding: 1rem 1.15rem 1.25rem; }
.listing-card-rent { font-size: 1.3rem; font-weight: 900; color: var(--accent); }
.listing-card-headline { margin: .3rem 0 .25rem; font-size: 1.05rem; font-weight: 800; }
.listing-card-address { margin: 0 0 .5rem; color: var(--muted); font-size: .88rem; }
.listing-card-facts { display: flex; gap: .75rem; flex-wrap: wrap; color: var(--muted); font-size: .82rem; }
.listing-card-badge { display: inline-block; margin-top: .6rem; padding: .3rem .65rem; border-radius: 999px; background: var(--soft); color: var(--muted); font-size: .78rem; font-weight: 700; }
.detail-not-accepting { display: inline-block; padding: .85rem 1.4rem; border-radius: 9px; background: var(--soft); color: var(--muted); font-weight: 700; font-size: .95rem; }

/* #4390: Zillow-style min/range filter bar -- chips toggle their own
   dropdown, matching the agreed wireframe's dropdown-chip pattern. */
.filter-bar { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: 1.1rem; position: relative; }
.filter-chip { font: inherit; font-size: .85rem; font-weight: 700; padding: .5rem .85rem; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; display: inline-flex; align-items: center; gap: .3rem; }
.filter-chip:hover { border-color: var(--blue); }
.filter-chip[aria-expanded="true"] { border-color: var(--blue); color: var(--blue); }
/* #4572: toggle chip uses aria-pressed, not aria-expanded, since it has no dropdown to open. */
.filter-chip-toggle[aria-pressed="true"] { border-color: var(--blue); color: var(--blue); background: var(--accent-soft); }
.filter-chip-caret { font-size: .7rem; color: var(--muted); }
.filter-chip-clear { border-color: transparent; background: var(--accent-soft); color: var(--accent); }
.filter-dropdown { position: absolute; top: calc(100% + 6px); left: 0; z-index: 5; min-width: 190px; max-width: 260px; padding: .85rem; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); box-shadow: 0 14px 34px rgba(22,50,77,.14); }
.filter-dropdown-label { font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin-bottom: .5rem; }
.filter-range-opts { display: flex; flex-direction: column; gap: .4rem; max-height: 220px; overflow-y: auto; }
.filter-range-opts label { display: flex; align-items: center; gap: .5rem; font-size: .88rem; cursor: pointer; }
@media (max-width: 640px) {
  .filter-dropdown { position: fixed; left: 16px; right: 16px; top: 50%; transform: translateY(-50%); max-width: none; max-height: 70vh; overflow-y: auto; }
  /* #4623: the header tag wraps under the Contact button rather than
     forcing the header row to overflow horizontally on narrow screens. */
  .rent-header-actions { flex-wrap: wrap; justify-content: flex-end; row-gap: .35rem; }
}

/* Detail view */
.detail-content { display: grid; grid-template-columns: minmax(280px, 1.1fr) minmax(320px, .9fr); gap: 2rem; align-items: start; }
.detail-photos { display: grid; gap: .5rem; }
.detail-photo-main { width: 100%; aspect-ratio: 4 / 3; border-radius: 14px; object-fit: cover; background: var(--soft); }
.detail-photo-thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); gap: .5rem; }
.detail-photo-thumbs img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; }
.detail-photos-empty { display: grid; place-items: center; aspect-ratio: 4/3; border-radius: 14px; background: var(--soft); color: var(--muted); }
.detail-body h1 { margin: .3rem 0 .4rem; font-size: clamp(1.8rem, 3.5vw, 2.4rem); letter-spacing: -.03em; }
.detail-address { color: var(--muted); margin-bottom: 1rem; }
.detail-facts { display: flex; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.detail-fact { padding: .55rem .9rem; border-radius: 9px; background: var(--soft); font-weight: 700; font-size: .9rem; }
.detail-description { line-height: 1.65; white-space: pre-line; margin-bottom: 1.25rem; }
.detail-extra { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: .8rem; margin: 0 0 1.5rem; }
.detail-extra div { padding: .75rem; border-radius: 9px; background: var(--soft); }
.detail-extra dt { color: var(--muted); font-size: .75rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.detail-extra dd { margin: .25rem 0 0; font-weight: 700; }
.rent-card { margin-top: 1.25rem; padding: 1.4rem; border: 1px solid var(--line); border-radius: 12px; background: white; box-shadow: 0 8px 24px rgba(22,50,77,.045); }
.card-label { margin: 0; color: var(--accent); font-size: .75rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.detail-contact { margin-bottom: 1.5rem; }
.primary-cta { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: .85rem 1.4rem; border: 0; border-radius: 9px; font-weight: 800; color: var(--accent-contrast); background: var(--accent); text-decoration: none; }
.primary-cta:hover { filter: brightness(.9); }
.primary-cta:disabled { opacity: .5; cursor: not-allowed; }

/* #4433: multi-unit detail page -- one card per currently-published unit,
   replacing the single Apply button on properties with more than one unit. */
.detail-units-list { display: flex; flex-direction: column; gap: .75rem; }
.detail-unit-card { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 1.15rem; border: 1px solid var(--line); border-radius: 12px; background: white; }
.detail-unit-card-inactive { opacity: .55; }
.detail-unit-card-title { font-weight: 800; font-size: .98rem; }
.detail-unit-card-facts { margin-top: .3rem; color: var(--muted); font-size: .85rem; }
.detail-unit-card-note { color: var(--muted); font-size: .85rem; font-weight: 700; white-space: nowrap; }
.secondary-cta { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: .55rem 1.1rem; border: 1px solid var(--accent); border-radius: 9px; font-weight: 800; font-size: .88rem; color: var(--accent); background: var(--accent-soft); white-space: nowrap; cursor: pointer; }
.secondary-cta:hover { filter: brightness(.96); }

/* Apply flow */
.apply-steps { display: flex; flex-wrap: wrap; gap: .5rem; list-style: none; margin: 0 0 1.5rem; padding: 0; }
.apply-steps li { padding: .5rem .9rem; border-radius: 999px; background: var(--soft); color: var(--muted); font-size: .82rem; font-weight: 700; }
.apply-steps li.active { background: var(--accent); color: var(--accent-contrast); }
.apply-steps li.done { background: var(--accent-soft); color: var(--accent); }
.apply-step { max-width: 640px; }
form { display: grid; gap: 1rem; margin-top: 1rem; }
label { display: grid; gap: .4rem; font-size: .9rem; font-weight: 700; }
input, textarea, select { width: 100%; border: 1px solid #b8c7d2; border-radius: 9px; padding: .8rem .9rem; color: var(--ink); background: white; }
input:not([type="checkbox"]):not([type="file"]), select { min-height: 44px; }
input:focus, textarea:focus, select:focus { outline: 3px solid var(--accent-soft); border-color: var(--accent); }
button { border: 0; border-radius: 9px; min-height: 44px; padding: .82rem 1.1rem; font-weight: 800; color: var(--accent-contrast); background: var(--accent); }
button:hover { filter: brightness(.9); }
button:disabled { opacity: .55; cursor: not-allowed; }
.secondary { color: var(--navy); background: white; border: 1px solid var(--line); }
.secondary:hover { background: var(--soft); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-row-3 { grid-template-columns: 2fr 1fr 1fr; }
fieldset { border: 1px solid var(--line); border-radius: 9px; padding: 1rem; margin: 0; display: grid; gap: 1rem; }
legend { padding: 0 .4rem; font-weight: 800; font-size: .85rem; color: var(--accent); }
.checkbox-label { display: flex; align-items: center; gap: .65rem; min-height: 44px; font-weight: 600; }
.checkbox-label input { width: 18px; height: 18px; }
.co-applicant-details { margin-top: 1.5rem; }
.co-applicant-details summary { cursor: pointer; font-weight: 800; color: var(--accent); padding: .5rem 0; }
.co-applicant-form { grid-template-columns: 1fr; }
.co-applicants-list { display: grid; gap: .5rem; margin-top: 1rem; }
.co-applicant-item { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .75rem; border: 1px solid var(--line); border-radius: 9px; background: var(--soft); }
.co-applicant-item button { min-height: 36px; padding: .4rem .7rem; background: white; color: var(--danger); border: 1px solid var(--line); font-size: .8rem; }
.document-form { grid-template-columns: 1fr 1fr auto; align-items: end; }
.documents-list { display: grid; gap: .5rem; margin: 1rem 0; }
.document-item { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .75rem 1rem; border: 1px solid var(--line); border-radius: 9px; background: var(--soft); }
.document-item button { min-height: 36px; padding: .4rem .7rem; background: white; color: var(--danger); border: 1px solid var(--line); font-size: .8rem; }
.review-summary { display: grid; gap: .5rem; margin: 1rem 0 1.5rem; }
.review-section { padding: .9rem; border-radius: 9px; background: var(--soft); }
.review-section h3 { margin: 0 0 .5rem; font-size: .9rem; color: var(--accent); }
.review-row { display: flex; justify-content: space-between; gap: 1rem; padding: .2rem 0; font-size: .88rem; }
.review-row span:first-child { color: var(--muted); }
.fee-card { margin-top: 1.5rem; }
.rent-footer { text-align: center; padding: 1.5rem; color: var(--muted); font-size: .82rem; border-top: 1px solid var(--line); background: white; }
.rent-footer a { color: var(--muted); margin-right: 1.25rem; }
[hidden] { display: none !important; }
@media (max-width: 760px) {
  .detail-content { grid-template-columns: 1fr; }
  .form-row, .form-row-3 { grid-template-columns: 1fr; }
  .document-form { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}

/* ID 172 — Cloudflare Turnstile widget slot on public apply flow. Empty
   when no site key is configured (dev/staging without keys); given
   spacing here so it doesn't butt up against the submit button when the
   widget is rendered. */
.turnstile-slot { margin: 12px 0; }
.turnstile-slot:empty { margin: 0; }
