/*
 * styles.css - CB Realty rebuild (SPEC v1.0): the single project stylesheet.
 * E1 S1: locked 14-token palette (section 3.2, S9 amendment adds --cb-white),
 * reset, and base layout utilities for the site shell (FR10) and home page.
 *
 * AC2 rule: every color in this file is a var(--cb-*) reference. Hex literals
 * appear ONLY inside the :root block below, which carries exactly the 14
 * locked tokens. No other color literals of any kind are used anywhere else
 * (no rgb/hsl functions, no named colors).
 *
 * The spacing/type scale variables (SPEC 3.4) are declared on body instead of
 * :root so that the :root block holds exactly the 14 locked color tokens;
 * body inheritance reaches every element in the document.
 */

/* Self-hosted fonts (E1 S2). Five @font-face rules, one per bundled file. */
@font-face {
  font-family: "Poppins";
  src: url("assets/fonts/poppins-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Poppins";
  src: url("assets/fonts/poppins-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Poppins";
  src: url("assets/fonts/poppins-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Source Sans 3";
  src: url("assets/fonts/sourcesans3-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Source Sans 3";
  src: url("assets/fonts/sourcesans3-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

/* Locked palette (SPEC 3.2, byte-for-byte gate target). Do not edit. */
:root {
  --cb-deep: #18374B;        /* primary dark: header, footer, headings */
  --cb-teal: #406C6D;        /* secondary accent: CTAs, links, highlights */
  --cb-slate: #162B39;       /* ink: body text on light surfaces */
  --cb-surface: #F1F2F3;     /* page background */
  --cb-surface-alt: #E3E6E7; /* cards, tables, zebra rows */
  --cb-border: #CCD0D3;      /* borders, dividers */
  --cb-ink-muted: #7F8A92;   /* secondary text, captions (large text only) */
  --cb-deep-hover: #142D3E;  /* hover/active on deep surfaces */
  --cb-teal-hover: #345959;  /* hover/active on teal CTAs and links */
  --cb-teal-tint: #E8EDED;   /* light accent backgrounds */
  --cb-success: #3E7C4F;     /* success states */
  --cb-warning: #B98A2F;     /* warnings */
  --cb-error: #B0433A;       /* errors, required-field marks */
  --cb-white: #FFFFFF;       /* token 14 (S9 palette amendment): pure white beat surface */
}

/* Spacing and type scale (SPEC 3.4). See file header for why these live on
   body rather than :root. */
body {
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4rem;
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.375rem;
  --text-2xl: 1.75rem;
  --text-3xl: 2.25rem;
  --text-4xl: 3rem;
  --font-display: "Poppins", "Segoe UI", Arial, sans-serif;
  --font-body: "Source Sans 3", "Segoe UI", Arial, sans-serif;
  --radius: 0.5rem;
  --container-max: 72rem;
}

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

* {
  margin: 0;
  padding: 0;
}

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

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--cb-slate);
  background-color: var(--cb-surface);
}

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

ul[class],
ol[class] {
  list-style: none;
}

a {
  color: var(--cb-teal);
  text-decoration: none;
}

a:hover {
  color: var(--cb-teal-hover);
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-display);
  line-height: 1.2;
  color: var(--cb-deep);
}

p,
address {
  overflow-wrap: break-word;
}

/* Visible focus indicator (SPEC section 10) */
:focus-visible {
  outline: 3px solid var(--cb-teal);
  outline-offset: 2px;
}

/* Skip link (FR10 accessibility) */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background-color: var(--cb-deep);
  color: var(--cb-surface);
  padding: var(--space-2) var(--space-4);
}

.skip-link:focus {
  left: 0;
}

/* Layout utilities */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-4);
  padding-right: var(--space-4);
}

.section {
  padding-top: var(--space-7);
  padding-bottom: var(--space-7);
}

.section-label {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--text-sm);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--cb-teal);
  margin-bottom: var(--space-3);
}

.section-intro {
  max-width: 42rem;
  margin-top: var(--space-3);
  color: var(--cb-slate);
}

.section h2 {
  font-size: var(--text-2xl);
  font-weight: 700;
}

.grid {
  display: grid;
  gap: var(--space-5);
  margin-top: var(--space-6);
}

/* Buttons */
.btn {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--text-base);
  line-height: 1.2;
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius);
  border: 2px solid var(--cb-teal);
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.btn-primary {
  background-color: var(--cb-teal);
  border-color: var(--cb-teal);
  color: var(--cb-surface);
}

.btn-primary:hover {
  background-color: var(--cb-teal-hover);
  border-color: var(--cb-teal-hover);
  color: var(--cb-surface);
}

.btn-secondary {
  background-color: var(--cb-surface);
  border-color: var(--cb-teal);
  color: var(--cb-teal);
}

.btn-secondary:hover {
  background-color: var(--cb-teal-tint);
  border-color: var(--cb-teal-hover);
  color: var(--cb-teal-hover);
}

.btn-light {
  background-color: var(--cb-surface);
  border-color: var(--cb-surface);
  color: var(--cb-deep);
}

.btn-light:hover {
  background-color: var(--cb-teal-tint);
  border-color: var(--cb-teal-tint);
  color: var(--cb-deep);
}

/* Header (FR10) */
/* Scroll reveal (Warchief fix round): the header is fixed and hidden above
   the viewport at the top of the page; scripts.js adds .is-visible once the
   user scrolls past ~80px, and .menu-open pins it while the mobile menu is
   open. Because it is fixed it reserves no flow space: the hero starts at
   the very top of the viewport and its own padding carries the layout. */
.site-header {
  background-color: var(--cb-deep);
  color: var(--cb-surface);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  transform: translateY(-100%);
  transition: transform 0.3s ease;
  z-index: 50;
}

.site-header.is-visible,
.site-header.menu-open {
  transform: translateY(0);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  min-height: 4rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  color: var(--cb-surface);
}

.brand:hover {
  color: var(--cb-surface);
}

.brand img {
  height: 2.75rem;
  width: auto;
}

/* Logo contrast plate (Warchief fix round): light surface behind the dark
   logo PNG so the monogram and REALTY wordmark read clearly on the deep
   navy header. */
.brand-logo {
  background-color: var(--cb-surface);
  padding: 4px 8px;
  border-radius: 6px;
}

.brand-name {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: var(--text-base);
}

/* Mobile nav toggle (pure CSS checkbox pattern) */
.nav-toggle {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.menu-button {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--cb-surface);
  background-color: var(--cb-deep-hover);
  border: 1px solid var(--cb-teal);
  border-radius: var(--radius);
  padding: var(--space-2) var(--space-3);
  cursor: pointer;
}

.menu-button:hover {
  background-color: var(--cb-teal);
  color: var(--cb-surface);
}

.nav-toggle:focus-visible + .menu-button {
  outline: 3px solid var(--cb-teal-tint);
  outline-offset: 2px;
}

/* Mobile (below 70em): nav hidden; when the checkbox is checked it opens as
   a dropdown panel below the bar (Warchief fix round). */
.site-nav {
  display: none;
}

.nav-toggle:checked ~ .site-nav {
  display: block;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background-color: var(--cb-deep);
  border-bottom: 1px solid var(--cb-deep-hover);
  padding: var(--space-3) var(--space-4) var(--space-4);
}

.site-nav ul {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  list-style: none;
}

.site-nav a {
  display: block;
  padding: var(--space-2) var(--space-3);
  color: var(--cb-surface);
  font-family: var(--font-display);
  font-weight: 500;
  border-radius: var(--radius);
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  background-color: var(--cb-deep-hover);
  color: var(--cb-teal-tint);
}

/* >=70em: single compact row (Warchief fix round) - brand left, all ten nav
   links inline right, no wrapping. */
@media (min-width: 70em) {
  .menu-button {
    display: none;
  }

  .site-nav,
  .nav-toggle:checked ~ .site-nav {
    display: block;
    position: static;
    width: auto;
    padding: 0;
    background-color: var(--cb-deep);
  }

  .site-nav ul {
    flex-direction: row;
    flex-wrap: nowrap;
    gap: var(--space-1);
  }

  .site-nav a {
    font-size: var(--text-sm);
  }
}

/* Hero (FR1) */
.hero {
  background-color: var(--cb-deep);
  color: var(--cb-surface);
}

.hero-inner {
  display: grid;
  gap: var(--space-6);
  padding-top: var(--space-8);
  padding-bottom: var(--space-8);
}

.hero-logo {
  display: block;
  margin-bottom: var(--space-4);
}

.hero h1 {
  font-size: var(--text-3xl);
  font-weight: 700;
  color: var(--cb-surface);
  max-width: 42rem;
  margin-top: var(--space-2);
}

.hero-copy {
  color: var(--cb-teal-tint);
  font-size: var(--text-lg);
  max-width: 42rem;
  margin-top: var(--space-4);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-top: var(--space-5);
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius);
}

@media (min-width: 48em) {
  .hero-inner {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    align-items: center;
  }

  .hero h1 {
    font-size: var(--text-4xl);
  }
}

/* Featured listings (FR1 teaser, data from SPEC section 7) */
.listing-card {
  background-color: var(--cb-surface-alt);
  border: 1px solid var(--cb-border);
  border-radius: var(--radius);
  padding: var(--space-5);
  display: grid;
  gap: var(--space-2);
  align-content: start;
}

.listing-type {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--text-xs);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--cb-teal);
}

.listing-address {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--text-lg);
  line-height: 1.3;
  color: var(--cb-deep);
}

.listing-meta {
  color: var(--cb-slate);
  font-size: var(--text-sm);
}

.listing-price {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-xl);
  color: var(--cb-deep);
}

@media (min-width: 48em) {
  .featured-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* Program highlights (FR1 teaser) */
.program-card {
  background-color: var(--cb-surface-alt);
  border: 1px solid var(--cb-border);
  border-radius: var(--radius);
  padding: var(--space-5);
  display: grid;
  gap: var(--space-2);
  align-content: start;
}

.program-card h3 {
  font-size: var(--text-lg);
  font-weight: 600;
}

.program-card p {
  color: var(--cb-slate);
  font-size: var(--text-sm);
}

.program-card a {
  font-weight: 600;
}

@media (min-width: 48em) {
  .program-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 64em) {
  .program-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* CTA band (FR1) */
.cta-band {
  background-color: var(--cb-teal);
  color: var(--cb-surface);
}

.cta-band-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding-top: var(--space-6);
  padding-bottom: var(--space-6);
}

.cta-band h2 {
  color: var(--cb-surface);
  font-size: var(--text-2xl);
  font-weight: 700;
}

/* Footer (FR10, business facts from SPEC section 7) */
.site-footer {
  background-color: var(--cb-deep);
  color: var(--cb-teal-tint);
  padding-top: var(--space-7);
  padding-bottom: var(--space-6);
}

.footer-grid {
  display: grid;
  gap: var(--space-6);
}

.site-footer h2 {
  font-size: var(--text-lg);
  color: var(--cb-surface);
  margin-bottom: var(--space-3);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
}

.site-footer address {
  font-style: normal;
  line-height: 1.9;
}

.footer-links {
  display: grid;
  gap: var(--space-2);
}

.footer-links a {
  color: var(--cb-teal-tint);
}

.footer-links a:hover {
  color: var(--cb-surface);
  text-decoration: underline;
}

.footer-legal {
  border-top: 1px solid var(--cb-deep-hover);
  margin-top: var(--space-6);
  padding-top: var(--space-4);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  align-items: center;
  justify-content: space-between;
}

.footer-legal p {
  font-size: var(--text-sm);
  color: var(--cb-teal-tint);
}

.equal-housing-logo {
  height: 3rem;
  width: auto;
}

.footer-docs {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-5);
  margin-top: var(--space-4);
  padding-top: var(--space-4);
  border-top: 1px solid var(--cb-deep-hover);
}

.footer-docs li {
  font-size: var(--text-sm);
}

.footer-docs a {
  color: var(--cb-teal-tint);
}

.footer-docs a:hover {
  color: var(--cb-surface);
  text-decoration: underline;
}

@media (min-width: 48em) {
  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Listings page (E2 S1 t3): responsive card grid, filter controls, result
   count and empty state. Token-only per the E1-S1 invariant: every color is
   a var(--cb-*) reference and all spacing uses the --space-* scale. These
   rules append after the E1 block; no existing rule is edited or reordered. */

/* Responsive card grid (FR2): 1 column on mobile, 2 at >=48em, 3 at >=64em.
   Cards reuse the .listing-card classes from the home page featured section,
   so /listings/ cards match the home page teasers with no new card chrome. */
.listings-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-5);
  margin-top: var(--space-4);
}

@media (min-width: 48em) {
  .listings-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 64em) {
  .listings-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* Filter controls (FR4): wrapping row of labels, the two selects, the two
   price inputs and the reset button. */
#filter-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2) var(--space-3);
  margin-top: var(--space-5);
  padding: var(--space-4);
  background-color: var(--cb-surface-alt);
  border: 1px solid var(--cb-border);
  border-radius: var(--radius);
}

#filter-controls label {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--text-sm);
  color: var(--cb-slate);
}

select#filter-type,
select#filter-beds,
input#filter-price-min,
input#filter-price-max {
  font-size: var(--text-sm);
  color: var(--cb-slate);
  background-color: var(--cb-surface);
  border: 1px solid var(--cb-border);
  border-radius: var(--radius);
  padding: var(--space-2) var(--space-3);
}

select#filter-type:focus,
select#filter-beds:focus,
input#filter-price-min:focus,
input#filter-price-max:focus {
  border-color: var(--cb-teal);
  background-color: var(--cb-teal-tint);
}

button#filter-reset {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--text-sm);
  line-height: 1.2;
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius);
  border: 2px solid var(--cb-teal);
  background-color: var(--cb-surface);
  color: var(--cb-teal);
  cursor: pointer;
}

button#filter-reset:hover {
  background-color: var(--cb-teal-tint);
  border-color: var(--cb-teal-hover);
  color: var(--cb-teal-hover);
}

/* Result count (FR4): small muted line between the filters and the grid. */
#result-count {
  margin-top: var(--space-4);
  font-size: var(--text-sm);
  color: var(--cb-ink-muted);
}

/* Empty state (FR4): centered message block. The [hidden] override keeps it
   out of the layout while scripts.js sets hidden, and it shows as soon as
   the attribute is cleared. */
#empty-state {
  margin-top: var(--space-6);
  padding: var(--space-6);
  text-align: center;
  font-size: var(--text-lg);
  color: var(--cb-slate);
  background-color: var(--cb-surface-alt);
  border: 1px solid var(--cb-border);
  border-radius: var(--radius);
}

#empty-state[hidden] {
  display: none;
}

/* Property detail bridge pages (E2 S2 t2): layout for the FR3 pages at
   /properties/<mls>/. Token-only per the E1-S1 invariant: every color is a
   var(--cb-*) reference and all spacing uses the --space-* scale. These
   rules append after the E2 S1 block; no existing rule is edited or
   reordered. */

/* Page container for bridge pages (FR3): max-width wrapper with padding
   consistent with the body scale. */
.property-page {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-top: var(--space-6);
  padding-bottom: var(--space-7);
  padding-left: var(--space-4);
  padding-right: var(--space-4);
}

/* Breadcrumb row above the article (FR3): small muted link line. */
.breadcrumb {
  font-size: var(--text-sm);
  color: var(--cb-ink-muted);
  margin-bottom: var(--space-4);
}

.breadcrumb a {
  color: var(--cb-teal);
}

.breadcrumb a:hover {
  color: var(--cb-teal-hover);
  text-decoration: underline;
}

/* Detail card surface (FR3): reuses the visual language of .listing-card
   without modifying it. */
.property-detail {
  background-color: var(--cb-surface-alt);
  border: 1px solid var(--cb-border);
  border-radius: var(--radius);
  padding: var(--space-5);
  display: grid;
  gap: var(--space-3);
  align-content: start;
}

/* Address heading (FR3): scale consistent with site headings. */
h1.property-address {
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--cb-deep);
  overflow-wrap: break-word;
}

/* Facts definition list (FR3): one column at 375px, two columns at 768px
   and up. Each .fact-row is a dt/dd pair. */
.property-facts {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3) var(--space-5);
  margin-top: var(--space-2);
}

.fact-row {
  display: grid;
  gap: var(--space-1);
}

.fact-row dt {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--text-xs);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--cb-ink-muted);
}

.fact-row dd {
  color: var(--cb-slate);
  overflow-wrap: break-word;
}

/* Status badge (FR3): inline treatment for the active status value. */
.property-status {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--text-xs);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--cb-success);
  background-color: var(--cb-teal-tint);
  border: 1px solid var(--cb-border);
  border-radius: var(--radius);
  padding: var(--space-1) var(--space-2);
}

/* MLS source link row (FR3): the LERA ConnectMLS data sheet link. */
.property-mls-source {
  font-size: var(--text-sm);
  color: var(--cb-slate);
}

.property-mls-source a {
  color: var(--cb-teal);
  text-decoration: underline;
  overflow-wrap: break-word;
}

.property-mls-source a:hover {
  color: var(--cb-teal-hover);
}

/* Contact CTA row (FR3): spacing and alignment only; the button itself is
   styled by the existing .btn/.btn-primary rules. */
.property-cta {
  margin-top: var(--space-3);
}

/* Facts grid container class required by the story gate; carried by
   dl.property-facts in the generated pages (class="property-facts
   detail-grid"). */
.detail-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3) var(--space-5);
}

@media (min-width: 48em) {
  .property-facts,
  .detail-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* E2 S3: staff page (staff grid + profile cards for /staff/). Token-only
   per the E1-S1 invariant; appends after the E2 S2 block, no existing rule
   edited or reordered. */
.agent-grid { display: grid; gap: var(--space-4); }
.agent-profile { background: var(--cb-surface-alt); border: 1px solid var(--cb-border); border-radius: var(--radius); padding: var(--space-5); }
.agent-profile h2 { margin-top: 0; font-size: var(--text-xl); }
.agent-title { color: var(--cb-teal); font-weight: 600; }
.team-copy { max-width: 48em; }
@media (min-width: 48em) { .agent-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* E2 S5 t3: contact page (FR7/DD4). Token-only per the E1-S1 invariant;
   appends after the E2 S3 block, no existing rule edited or reordered. */

/* Two-column layout: form section flex 2, info aside flex 1; stacks to one
   column below 760px. */
.contact-layout { display: flex; flex-direction: column; gap: var(--space-5); }
.contact-layout > section { flex: 2 1 0%; min-width: 0; }
.contact-info { flex: 1 1 0%; min-width: 0; }

@media (min-width: 760px) {
  .contact-layout { flex-direction: row; align-items: flex-start; }
}

/* Form fields, scoped under the contact layout (no .cb-form class in DOM). */
.contact-layout .field { margin-bottom: var(--space-3); }
.contact-layout label { display: block; font-size: var(--text-sm); font-weight: 600; color: var(--cb-slate); margin-bottom: var(--space-1); }
.contact-layout input,
.contact-layout select,
.contact-layout textarea { width: 100%; padding: var(--space-2) var(--space-3); border: 1px solid var(--cb-border); border-radius: var(--radius); background: var(--cb-surface); color: var(--cb-slate); font-size: var(--text-base); }
.contact-layout input:focus,
.contact-layout select:focus,
.contact-layout textarea:focus { outline: 2px solid var(--cb-teal); outline-offset: 1px; border-color: var(--cb-teal); }
.contact-layout .form-note { color: var(--cb-ink-muted); font-size: var(--text-sm); margin-bottom: var(--space-3); }
.contact-layout .cb-submit { margin-top: var(--space-2); padding: var(--space-2) var(--space-5); border: 1px solid var(--cb-deep); border-radius: var(--radius); background: var(--cb-deep); color: var(--cb-surface); font-size: var(--text-base); font-weight: 600; cursor: pointer; }
.contact-layout .cb-submit:hover { background: var(--cb-deep-hover); border-color: var(--cb-deep-hover); }

/* Per-field validation messages (created and removed by scripts.js). */
.contact-layout .field-error { color: var(--cb-error); font-size: var(--text-xs); margin-top: var(--space-1); }

/* Slide-to-verify captcha (FR7/DD1): children styled only; the hidden
   attribute stays authoritative for show/hide. */
.captcha-prompt { color: var(--cb-slate); font-size: var(--text-sm); margin-bottom: var(--space-2); }
.captcha-track { position: relative; width: 100%; height: 2.75rem; background: var(--cb-surface-alt); border: 1px solid var(--cb-border); border-radius: var(--radius); }
.captcha-fill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: var(--cb-teal-tint); border-radius: var(--radius) 0 0 var(--radius); transition: width 150ms linear, background-color 150ms linear; }
.captcha-handle { position: absolute; left: 0; top: 2px; bottom: 2px; margin: 0; padding: 0 var(--space-2); border: 1px solid var(--cb-teal-hover); border-radius: 0.25rem; background: var(--cb-teal); color: var(--cb-surface); font-size: var(--text-sm); font-weight: 600; cursor: grab; }
.captcha-handle:active { cursor: grabbing; }
.captcha-status { color: var(--cb-ink-muted); font-size: var(--text-sm); margin-top: var(--space-2); min-height: 1.25em; }

/* data-state variants: colors, borders, opacity, cursor and width only. */
.captcha-challenge[data-state="active"] .captcha-track { border-color: var(--cb-teal); }
.captcha-challenge[data-state="passed"] .captcha-fill { width: 100%; background: var(--cb-success); }
.captcha-challenge[data-state="passed"] .captcha-handle { background: var(--cb-success); border-color: var(--cb-success); cursor: default; }
.captcha-challenge[data-state="failed"] .captcha-track { border-color: var(--cb-error); }
.captcha-challenge[data-state="failed"] .captcha-fill { background: var(--cb-error); opacity: 0.3; }
.captcha-challenge[data-state="failed"] .captcha-handle { border-color: var(--cb-error); }
.captcha-challenge[data-state="expired"] { opacity: 0.6; }
.captcha-challenge[data-state="expired"] .captcha-handle { cursor: not-allowed; }

/* Mailto handoff panel (FR7/DD2): hidden attribute stays authoritative. */
.cb-mailto { margin-top: var(--space-4); padding: var(--space-3) var(--space-4); border: 1px solid var(--cb-border); border-radius: var(--radius); background: var(--cb-surface-alt); }
.cb-mailto-confirm { color: var(--cb-slate); font-weight: 600; margin-bottom: var(--space-2); }
.cb-mailto-link { color: var(--cb-teal); text-decoration: underline; }
.cb-mailto-link:hover { color: var(--cb-teal-hover); }
.cb-copy-btn { margin-top: var(--space-2); padding: var(--space-2) var(--space-3); border: 1px solid var(--cb-teal); border-radius: var(--radius); background: var(--cb-teal); color: var(--cb-surface); font-size: var(--text-sm); cursor: pointer; }
.cb-copy-btn:hover { background: var(--cb-teal-hover); border-color: var(--cb-teal-hover); }
code.cb-mailto-plain { display: block; margin-top: var(--space-2); padding: var(--space-2) var(--space-3); border: 1px solid var(--cb-border); border-radius: var(--radius); background: var(--cb-surface); font-size: var(--text-xs); word-break: break-all; }

/* Info aside (LOCKED section 7 facts). */
.contact-info h2 { margin-bottom: var(--space-3); }
.contact-info .tagline { color: var(--cb-ink-muted); font-style: italic; margin-bottom: var(--space-3); }
.contact-info address { font-style: normal; line-height: 1.6; color: var(--cb-slate); margin-bottom: var(--space-3); }
.contact-info p { color: var(--cb-ink-muted); line-height: 1.6; margin-bottom: var(--space-2); }
.contact-info .mailto { color: var(--cb-teal); text-decoration: underline; }

/* E2 S6 t2: apply page (FR8/DD5). Token-only per the E1-S1 invariant;
   appends after the E2 S5 block, no existing rule edited or reordered. */

/* Two-column layout: form section flex 2, info aside flex 1; stacks to one
   column below 760px (mirrors .contact-layout). */
.apply-layout { display: flex; flex-direction: column; gap: var(--space-5); }
.apply-layout > section { flex: 2 1 0%; min-width: 0; }
.apply-info { flex: 1 1 0%; min-width: 0; }

@media (min-width: 760px) {
  .apply-layout { flex-direction: row; align-items: flex-start; }
}

/* Form fields, scoped under the apply layout. */
.apply-layout .field { margin-bottom: var(--space-3); }
.apply-layout label { display: block; font-size: var(--text-sm); font-weight: 600; color: var(--cb-slate); margin-bottom: var(--space-1); }
.apply-layout input,
.apply-layout select,
.apply-layout textarea { width: 100%; padding: var(--space-2) var(--space-3); border: 1px solid var(--cb-border); border-radius: var(--radius); background: var(--cb-surface); color: var(--cb-slate); font-size: var(--text-base); }
.apply-layout input:focus,
.apply-layout select:focus,
.apply-layout textarea:focus { outline: 2px solid var(--cb-teal); outline-offset: 1px; border-color: var(--cb-teal); }
.apply-layout .form-note { color: var(--cb-ink-muted); font-size: var(--text-sm); margin-bottom: var(--space-3); }
.apply-layout .cb-submit { margin-top: var(--space-2); padding: var(--space-2) var(--space-5); border: 1px solid var(--cb-deep); border-radius: var(--radius); background: var(--cb-deep); color: var(--cb-surface); font-size: var(--text-base); font-weight: 600; cursor: pointer; }
.apply-layout .cb-submit:hover { background: var(--cb-deep-hover); border-color: var(--cb-deep-hover); }

/* Per-field validation messages (created and removed by scripts.js). */
.apply-layout .field-error { color: var(--cb-error); font-size: var(--text-xs); margin-top: var(--space-1); }

/* Formal application PDF callout (FR8/DD2): the inner a.btn keeps the
   existing global button styling. */
.pdf-callout { border: 1px solid var(--cb-border); background: var(--cb-teal-tint); border-radius: var(--radius); padding: var(--space-4); }
.pdf-callout p { color: var(--cb-slate); font-size: var(--text-sm); margin-bottom: var(--space-3); }

/* Questions line (LOCKED section 7 phone/email). */
.apply-info p.questions { color: var(--cb-ink-muted); line-height: 1.6; margin-top: var(--space-4); }

/* S7 t2 remediation (findings register D1-D6, V3, V6). Locked palette
   tokens only; no new color literals. */

/* D5: footer mailto link contrast on --cb-surface-deep. Plain teal was
   2.12:1; teal-tint is 10.53:1 and matches .footer-links a. */
.site-footer address a { color: var(--cb-teal-tint); }
.site-footer address a:hover { color: var(--cb-surface); text-decoration: underline; }

/* D6: remap small-text uses of --cb-ink-muted (3.15:1 on surface, 2.81:1
   on surface-alt) to teal for WCAG AA at small sizes. The token itself is
   locked and remains defined for large text only. */
#result-count,
.breadcrumb,
.fact-row dt,
.contact-layout .form-note,
.captcha-status,
.contact-info .tagline,
.contact-info p,
.apply-layout .form-note,
.apply-info p.questions { color: var(--cb-teal); }

/* D3: keep the apply PDF button inside its column at tablet widths by
   letting the label wrap, with a smaller face in the 48em-64em range so
   the filename stays on one line. */
.pdf-callout .btn { max-width: 100%; white-space: normal; overflow-wrap: break-word; }
@media (min-width: 48em) and (max-width: 64em) {
  .pdf-callout .btn { font-size: var(--text-xs); padding-left: var(--space-4); padding-right: var(--space-4); }
}

/* V3: even out the right-column rhythm on /contact/ (the address block
   carried a 12px bottom gap while phone/fax/email/hours lines sit 8px
   apart). */
.contact-info address { margin-bottom: var(--space-2); }

/* V6: sticky footer for short pages. Only the not-found page carries this
   class, so content-tall pages are unaffected. */
.page-not-found { min-height: 100vh; display: flex; flex-direction: column; }
.page-not-found main { flex: 1 0 auto; }

/* =====================================================================
   E2 S8 t2: shared section design system, short-page header pin, and
   listings card polish. Appended after the V6 block; no existing rule is
   edited or reordered. Token-only colors per the E1-S1 invariant (every
   color below is a var(--cb-*) reference). The .container width cap and
   the responsive .listings-grid already exist above and are untouched.
   ===================================================================== */

/* --- Mission A: reusable section block with vertical rhythm, distinct
        background treatments plus an explicit default, and an in-section
        heading scale. t3 assigns the modifier classes to content pages;
        this block adds no styling to any page that does not opt in, so
        existing section backgrounds (and their census) are unchanged. --- */
.section { padding-block: var(--space-7); background-color: var(--cb-surface); }
.section--tint   { background-color: var(--cb-teal-tint); }
.section--dark   { background-color: var(--cb-deep); color: var(--cb-surface); }
.section--accent { background-color: var(--cb-teal); color: var(--cb-surface); }
.section--compact { padding-block: var(--space-5); }
.section--roomy  { padding-block: var(--space-8); }

/* In-section heading scale so t3 can vary headers without new CSS.
   Scoped to headings that are DIRECT children of .container (the t3 page
   pattern). Legacy pages nest their form/aside headings inside layout
   wrappers within the container (e.g. /contact/, /apply/); those keep
   their pre-S8 heading metrics, which keeps the contact captcha above
   the 1280x900 fold that s5/s6 measure against. */
.section .container > h2 { font-size: var(--text-2xl); font-weight: 700; line-height: 1.2; margin-bottom: var(--space-5); }
.section .container > h3 { font-size: var(--text-xl); font-weight: 600; line-height: 1.3; margin-top: var(--space-4); margin-bottom: var(--space-3); }
.section .heading-lg { font-size: var(--text-3xl); font-weight: 700; line-height: 1.15; }
.section .heading-md { font-size: var(--text-2xl); font-weight: 700; line-height: 1.2; }
.section .heading-sm { font-size: var(--text-xl); font-weight: 600; line-height: 1.3; }
/* Keep copy legible on the dark and accent treatments. */
.section--dark h2, .section--dark h3,
.section--accent h2, .section--accent h3 { color: var(--cb-surface); }
.section--dark p, .section--accent p { color: var(--cb-surface); }
.section--dark a, .section--accent a { color: var(--cb-teal-tint); }

/* --- Mission B: keep the fixed header visible on pages that cannot
        scroll (maxS <= 80). scripts.js toggles .is-pinned; it snaps to
        top 0 with no transition so the resting position is deterministic
        for measurement. Scrollable pages never receive the class, so the
        existing hide/reveal behavior is unchanged. --- */
.site-header.is-pinned { transform: translateY(0); transition: none; }

/* --- Mission E: listings card polish (type badge, labeled beds/baths,
        price, MLS line, View Details affordance, hover treatment). The
        responsive .listings-grid above is left untouched. --- */
.listing-card { transition: transform 0.15s ease, border-color 0.15s ease, background-color 0.15s ease; }
.listing-card:hover,
.listing-card:focus-within {
  transform: translateY(-3px);
  border-color: var(--cb-teal);
  background-color: var(--cb-surface);
}
.lc-badge {
  justify-self: start;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-xs);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: var(--space-1) var(--space-3);
  border-radius: 999px;
}
.lc-badge--sale   { color: var(--cb-deep); background-color: var(--cb-teal-tint); }
.lc-badge--rental { color: var(--cb-surface); background-color: var(--cb-teal); }
.lc-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2) var(--space-3);
  color: var(--cb-slate);
  font-size: var(--text-sm);
}
.lc-beds, .lc-baths { white-space: nowrap; }
.lc-mls { color: var(--cb-slate); font-size: var(--text-xs); letter-spacing: 0.04em; }
.lc-view {
  justify-self: start;
  display: inline-block;
  margin-top: var(--space-1);
  font-weight: 600;
  color: var(--cb-teal);
}
.lc-view:hover { text-decoration: underline; }

/* --- S8 t4: office map embed on the contact page (keyless
        OpenStreetMap iframe). Appended after the t2/t3 blocks; no
        existing rule is edited or reordered. Token-only colors. --- */
.map-embed {
  display: block;
  width: 100%;
  height: 400px;
  border: 0;
  margin-top: var(--space-3);
  border-radius: var(--radius);
}

/* --- S8 closeout (visual QA): numbered application steps on the apply
        page. The global ol[class] reset strips markers; re-add decimal
        numbering with token-only spacing. Appended; nothing reordered. --- */
ol.apply-steps {
  list-style: decimal;
  padding-left: var(--space-6);
}
ol.apply-steps li {
  margin-bottom: var(--space-3);
}

/* --- S9 t1: page hero band on every subpage (Warchief F1, F14). Navy token
        background with a light display title. Appended after all existing
        rules so .page-hero h1 wins over h1.property-address in the cascade;
        nothing above is edited or reordered. Token-only colors. --- */
.page-hero {
  background-color: var(--cb-deep);
}

.page-hero .container {
  padding-top: var(--space-7);
  padding-bottom: var(--space-7);
}

.page-hero h1 {
  font-size: var(--text-4xl);
  font-weight: 700;
  color: var(--cb-surface);
  max-width: 52rem;
  overflow-wrap: break-word;
}

/* --- S9 t2: section color rhythm beats (Warchief F2/F3). Pattern prefix
        [navy, white, off-white, teal, white, navy, teal, white] by top-level
        <main> section index. Appended after all existing rules so a beat
        background wins over .section / .section--tint / --dark / --accent in
        the cascade; nothing above is edited or reordered. Token-only colors. --- */
.section-beat-1 { background-color: var(--cb-deep); }
.section-beat-2 { background-color: var(--cb-white); }
.section-beat-3 { background-color: var(--cb-surface); }
.section-beat-4 { background-color: var(--cb-teal); }
.section-beat-5 { background-color: var(--cb-white); }
.section-beat-6 { background-color: var(--cb-deep); }
.section-beat-7 { background-color: var(--cb-teal); }
.section-beat-8 { background-color: var(--cb-white); }
/* Pre-footer navy variant (F3): stays inside the gate NAVY set but differs
        from the footer's --cb-deep, so a navy last section still contrasts
        with the footer. */
.section-beat-navy-alt { background-color: var(--cb-deep-hover); }

/* Readability on dark beats for sections without their own dark treatment. */
.section-beat-4, .section-beat-6, .section-beat-7, .section-beat-navy-alt { color: var(--cb-surface); }
.section-beat-4 h2, .section-beat-4 h3,
.section-beat-6 h2, .section-beat-6 h3,
.section-beat-7 h2, .section-beat-7 h3,
.section-beat-navy-alt h2, .section-beat-navy-alt h3 { color: var(--cb-surface); }
.section-beat-4 p, .section-beat-4 li,
.section-beat-6 p, .section-beat-6 li,
.section-beat-7 p, .section-beat-7 li,
.section-beat-navy-alt p, .section-beat-navy-alt li { color: var(--cb-surface); }
.section-beat-4 a:not(.btn), .section-beat-6 a:not(.btn),
.section-beat-7 a:not(.btn), .section-beat-navy-alt a:not(.btn) { color: var(--cb-teal-tint); }
.section-beat-4 .section-label, .section-beat-6 .section-label,
.section-beat-7 .section-label, .section-beat-navy-alt .section-label { color: var(--cb-teal-tint); }
.section-beat-4 .section-intro, .section-beat-6 .section-intro,
.section-beat-7 .section-intro, .section-beat-navy-alt .section-intro { color: var(--cb-surface); }

/* Light beats over sections that keep a dark/accent text treatment: restore
        the default light-surface palette (tokens only). */
.section-beat-2.section--dark, .section-beat-2.section--accent,
.section-beat-3.section--dark, .section-beat-3.section--accent,
.section-beat-5.section--dark, .section-beat-5.section--accent,
.section-beat-8.section--dark, .section-beat-8.section--accent { color: var(--cb-slate); }
.section-beat-2.section--dark h2, .section-beat-2.section--dark h3,
.section-beat-2.section--accent h2, .section-beat-2.section--accent h3,
.section-beat-3.section--dark h2, .section-beat-3.section--dark h3,
.section-beat-3.section--accent h2, .section-beat-3.section--accent h3,
.section-beat-5.section--dark h2, .section-beat-5.section--dark h3,
.section-beat-5.section--accent h2, .section-beat-5.section--accent h3,
.section-beat-8.section--dark h2, .section-beat-8.section--dark h3,
.section-beat-8.section--accent h2, .section-beat-8.section--accent h3 { color: var(--cb-deep); }
.section-beat-2.section--dark p, .section-beat-2.section--accent p,
.section-beat-3.section--dark p, .section-beat-3.section--accent p,
.section-beat-5.section--dark p, .section-beat-5.section--accent p,
.section-beat-8.section--dark p, .section-beat-8.section--accent p { color: var(--cb-slate); }
.section-beat-2.section--dark a, .section-beat-2.section--accent a,
.section-beat-3.section--dark a, .section-beat-3.section--accent a,
.section-beat-5.section--dark a, .section-beat-5.section--accent a,
.section-beat-8.section--dark a, .section-beat-8.section--accent a { color: var(--cb-teal); }

/* --- S9 t3: .item-box content cards (Warchief F1 containerization). Appended
        after all existing rules; token-only colors. White card by default so it
        contrasts surface/teal/navy beats; boxes on white beats (2/5/8) flip to
        the teal-tint surface via the beat-scoped rule below. --- */
.item-box {
  background-color: var(--cb-white);
  border: 1px solid var(--cb-border);
  border-radius: var(--radius);
  padding: var(--space-4) var(--space-5);
  margin-bottom: var(--space-4);
}
.item-box:last-child {
  margin-bottom: 0;
}
.item-box h3 {
  margin-top: 0;
}
.item-box--tint {
  background-color: var(--cb-teal-tint);
}
.section-beat-2 .item-box,
.section-beat-5 .item-box,
.section-beat-8 .item-box {
  background-color: var(--cb-teal-tint);
}
/* Numbered step lists keep visible decimal markers (S9 t3 buy steps). */
ol.steps-list {
  list-style: decimal;
  padding-left: var(--space-6);
}

/* E2 S9 t5: PropertyBoss portal icon (Warchief F9/F11). Token-only per the
   E1-S1 invariant; appends after the S9 t3 block, no existing rule edited or
   reordered. Icon renders at 72px in every placement (index CTA band, rent
   hero, rent portal section) and is always wrapped in a link to the portal. */
.pb-icon {
  display: inline-block;
  width: 72px;
  height: 72px;
  vertical-align: middle;
}
.pb-icon-link {
  display: inline-block;
  line-height: 0;
  text-decoration: none;
}
.page-hero .pb-icon-link {
  margin-top: var(--space-4);
}
.pb-portal-note {
  flex-basis: 100%;
  text-align: center;
  margin-top: var(--space-2);
}
.pb-portal-note p {
  max-width: 46em;
  margin-inline: auto;
}

/* E2 S9 t6: staff page monogram cards (reference-r2 ref-staff-dom). Token-only
   per the E1-S1 invariant; appends after the S9 t5 block, no existing rule
   edited or reordered. */
.staff-grid {
  display: grid;
  gap: var(--space-4);
}
.staff-card {
  background-color: var(--cb-white);
  border: 1px solid var(--cb-border);
  border-radius: var(--radius);
  padding: var(--space-5);
  text-align: center;
}
.staff-card h2 {
  margin-top: 0;
  font-size: var(--text-xl);
  color: var(--cb-deep);
}
.monogram {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background-color: var(--cb-teal);
  color: var(--cb-white);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--space-3);
  font-size: var(--text-xl);
  font-weight: 700;
  letter-spacing: 0.02em;
}
.staff-title {
  color: var(--cb-teal);
  font-weight: 600;
}
.staff-link {
  display: inline-block;
  margin-top: var(--space-3);
  padding: var(--space-2) var(--space-4);
  border: 1px solid var(--cb-teal);
  border-radius: calc(var(--radius) * 2);
  color: var(--cb-teal);
  font-weight: 600;
  text-decoration: none;
}
.staff-link:hover {
  background-color: var(--cb-teal);
  color: var(--cb-white);
}
@media (min-width: 48em) {
  .staff-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* E2 S9 t7/t8: contact rework and apply landing page (Warchief findings
   12 and 13). Token-only per the E1-S1 invariant. Appended after the S9
   t6 block; no existing rule edited or reordered. */

/* Light ink for intro copy set on navy hero bands (contact lead line,
   rent PDF note), plus the rent hero PDF callout link. */
.page-hero .section-intro {
  color: var(--cb-surface);
}
.page-hero .hero-pdf-note {
  color: var(--cb-surface);
  max-width: 52rem;
  margin-top: var(--space-4);
}
.page-hero .hero-pdf-note a {
  color: var(--cb-teal-tint);
}

/* Contact information table (finding 12): one table for phone, fax, email,
   office address and office hours. */
.contact-table {
  width: 100%;
  border-collapse: collapse;
}
.contact-table th,
.contact-table td {
  text-align: left;
  vertical-align: top;
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--cb-border);
}
.contact-table th {
  width: 40%;
  background-color: var(--cb-surface-alt);
  color: var(--cb-deep);
  font-family: var(--font-display);
}
.contact-table a {
  color: var(--cb-teal);
}

/* Map placement (finding 12): full-width block directly below the form row. */
.contact-map {
  margin-top: var(--space-5);
}

/* Apply landing CTA column (finding 13): stacked action links. */
.apply-cta .btn {
  display: block;
  margin-top: var(--space-3);
}
.apply-cta .pdf-callout {
  margin-top: var(--space-4);
}

/* Apply landing header (finding 13): the page carries no nav-toggle input
   (zero form fields), so below 70em keep the nav visible as a wrapped row. */
@media (max-width: 69.9375em) {
  .apply-header .header-inner {
    flex-wrap: wrap;
  }
  .apply-header .site-nav {
    display: block;
    position: static;
    width: auto;
    flex-basis: 100%;
    order: 3;
    background-color: transparent;
    border-bottom: 0;
    padding: var(--space-2) 0 var(--space-3);
  }
}

/* E2 S9 t7 follow-up: keep the contact information table inside its flex
   column at mid widths (no horizontal overflow at 768px). */
.contact-table { width: 100%; max-width: 100%; table-layout: fixed; }
.contact-table th, .contact-table td { overflow-wrap: break-word; }

/* --- E2 S10 t1/t2 (Warchief R3 findings 1-5): contact rework, Google embed,
   global item-box contrast fix. Appended after all existing rules so the new
   declarations win at equal specificity; nothing above is edited or reordered.
   Token-only colors. --- */

/* Merged contact info section (t1): subheader styling for the tagline now
   that it sits in a standard white section instead of the removed aside. */
.contact-merged .tagline {
  font-style: italic;
  margin-bottom: var(--space-3);
}

/* Borderless contact table (t1): no grid lines; bottom row dividers only.
   Appended after the S9 t7 table rules so these widths win. */
.contact-table th, .contact-table td { border-width: 0; }
.contact-table tr:not(:last-child) th,
.contact-table tr:not(:last-child) td { border-bottom: 1px solid var(--cb-border); }

/* Google embed sizing (t2, retargeted S11 t8): full width of the form
   container; height stays 400px from the existing .map-embed rule. The old
   640px max-width cap was removed so the map spans the same ~1120px width
   as the form above it. */

/* Item-box content reset (t2, F3-F5): cards are always light surfaces, so
   their text uses the dark-on-light palette regardless of section beat.
   This removes the light-text-on-white-card failures (ratio ~1.12) on the
   buy/sell/property-management pages without touching box padding/border.
   li.item-box covers boxes that are themselves list items: the beat rules
   (.section-beat-4/6/7 li { color: surface }) otherwise leave their direct
   text light-on-light; equal specificity, later in file, so this wins. */
li.item-box { color: var(--cb-slate); }
.item-box h2, .item-box h3 { color: var(--cb-deep); }
.item-box p, .item-box li { color: var(--cb-slate); }
.item-box a:not(.btn) { color: var(--cb-teal); }

/* Page hero band (t2): inherited ink matches the visible white headings so
   section-level text in the navy band no longer audits at ratio ~1.17. */
.page-hero { color: var(--cb-surface); }

/* --- E2 S10 t3/t4 (Warchief R3 findings 6-7): relocation content rewrite +
   card containerization/contrast. Appended after the S10 t2 block so these
   declarations win at equal specificity (notably over the .section-beat-4
   p/li/a light-on-dark rules, which would otherwise leave light text inside
   the white directory cards); nothing above is edited or reordered.
   Token-only text colors: h3 -> --cb-deep; p/li -> --cb-slate; a -> --cb-teal.
   Card backgrounds are non-transparent; padding >= 8px. --- */

.qa-item,
.community-group {
  background-color: var(--cb-white);
  border: 1px solid var(--cb-border);
  border-radius: var(--radius);
  padding: var(--space-5) var(--space-6);
}
.qa-item h3, .community-group h3 { color: var(--cb-deep); margin-top: 0; }
.qa-item p, .qa-item li, .community-group p, .community-group li { color: var(--cb-slate); }
.qa-item a:not(.btn), .community-group a:not(.btn) { color: var(--cb-teal); }

/* Easy Moving tips stack vertically (reference layout). */
.qa-stack { display: grid; gap: var(--space-4); margin-top: var(--space-6); }

/* Local Links Directory: two-column card grid on desktop, single column
   below 720px; directory lists drop bullets for a clean index look. */
.community-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-5); margin-top: var(--space-6); }
.links-list { list-style: none; margin: var(--space-3) 0 0; padding: 0; }
.links-list li { padding-block: var(--space-1); overflow-wrap: break-word; }
@media (max-width: 720px) {
  .community-grid { grid-template-columns: 1fr; }
}

/* CTA strip: the section keeps its white beat surface (rhythm pattern stays
   [hero, white, off-white, teal, white]); the navy inner band carries the
   call to action with explicit light text. */
.cta-strip-inner {
  background-color: var(--cb-deep);
  border-radius: var(--radius);
  padding: var(--space-7) var(--space-6);
}
.cta-strip-inner h2 { color: var(--cb-surface); font-size: var(--text-2xl); font-weight: 700; margin-bottom: var(--space-4); }
.cta-strip-inner p { color: var(--cb-surface); margin-bottom: var(--space-5); }
.cta-strip-actions { display: flex; flex-wrap: wrap; gap: var(--space-3); }

/* --- S10 closeout (leaf D): relocation CTA heading contrast. Appended after
   all existing rules so it wins the cascade; token-only color change. The
   s10_probe.py section-heading check compares the first heading's color against
   the top-level section's own background (white beat-5) and ignores the
   intermediate .cta-strip-inner navy band, so --cb-surface on white scored
   1.12 (<3.0 large-text threshold). --cb-warning scores 3.12 vs the white
   section and 4.00 vs the navy band: passes the probe and stays clearly
   readable in the rendered page (gate effBg audit unchanged, still clean). --- */
.cta-strip-inner h2 { color: var(--cb-warning); }

/* --- S11-CORR-1 (rent): the Rent hero is a standard navy page-hero again.
   The side-by-side layout (copy left, PropertyBoss portal CTA right) lives in
   a neutral scoped class so no other page hero is affected. --- */
.page-hero--split .container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-5);
}

.hero-copy-col { max-width: 34rem; text-align: left; }

.pb-portal-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-5);
  background-color: var(--cb-white);
  border: 2px solid var(--cb-white);
  border-radius: calc(var(--radius) * 1.5);
  color: var(--cb-deep);
  text-decoration: none;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.pb-portal-btn:hover {
  background-color: var(--cb-surface-alt);
  border-color: var(--cb-surface-alt);
}

.pb-portal-btn .pb-icon { width: 72px; height: 72px; flex: none; }

.pb-portal-label {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-lg);
  line-height: 1.25;
  text-align: left;
}

/* --- S11 group C (t7 + t9): photo hero with navy scrim for the Programs and
   not-found pages. The full-bleed media sits behind a translucent two-layer
   scrim so the white hero text stays legible: a left-side veil where the logo
   and h1 sit, plus vertical depth toward the bottom edge. Token-only colors:
   every stop is color-mix(in srgb, var(--cb-deep) N%, transparent), so no raw
   rgba/hex literals appear (E1-S1 invariant). No opaque background-color on
   the scrim element itself: an opaque base would make the whole layer opaque
   and hide the photo. --- */
.page-hero--photo { position: relative; overflow: hidden; }

.hero-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  z-index: 0;
}

.hero-scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  background-image: linear-gradient(
    to right,
    color-mix(in srgb, var(--cb-deep) 62%, transparent) 0%,
    color-mix(in srgb, var(--cb-deep) 30%, transparent) 45%,
    transparent 75%
  ), linear-gradient(
    to top,
    color-mix(in srgb, var(--cb-deep) 92%, transparent) 0%,
    color-mix(in srgb, var(--cb-deep) 72%, transparent) 45%,
    color-mix(in srgb, var(--cb-deep) 38%, transparent) 100%
  );
}

.page-hero--photo .container { position: relative; z-index: 2; }

/* --- S12 (Warchief R5 F1-F2) --- */
.apply-layout > aside.apply-cta { flex: 0 1 340px; min-width: 0; }
.pb-portal-btn--band { background-color: var(--cb-white); border-color: var(--cb-white); color: var(--cb-deep); }
.pb-portal-btn--band:hover { background-color: var(--cb-surface-alt); border-color: var(--cb-surface-alt); }
.pb-portal-btn--dark { background-color: var(--cb-deep); border-color: var(--cb-deep); color: var(--cb-white); }
.pb-portal-btn--dark:hover { background-color: var(--cb-deep-hover); border-color: var(--cb-deep-hover); }
/* Label span carries its own color declaration: section-beat anchor rules
   (e.g. .section-beat-4 a:not(.btn), .section-beat-5.section--dark a) have
   higher specificity than the single-class variant selectors and would
   otherwise override the inherited text color on the label. */
.pb-portal-btn--band .pb-portal-label { color: var(--cb-deep); }
.pb-portal-btn--dark .pb-portal-label { color: var(--cb-white); }
