/* CRE Scout design tokens: colors, one type scale, one spacing scale. Every page imports this file.
   Readability floor (polish pass, Nov 2026): body text 15px on a computer and 16px on a phone; nothing a
   person needs to read is under 13px; secondary text (--muted) is at least 4.5:1 on paper, white and tints. */
:root {
  color-scheme: light;
  --brand-900: #174632;
  --brand-700: #1F5C42;
  --brand-100: #E4EEE8;
  --gold-500: #C9A227;
  --gold-100: #F6EDCF;
  --paper: #F7F4EC;
  --surface: #FFFFFF;
  --ink: #17201C;
  --ink-2: #45514B;
  /* 5.4:1 on paper, 6.0:1 on white, 5.0:1 on --brand-100 and --gold-100. */
  --muted: #5C665F;
  --line: #E3DFD4;
  --line-strong: #C9C4B6;
  --danger: #B3261E;
  --focus: #1F5C42;
  /* Shared names for the same colors, so page sheets don't each define them. */
  --brand: var(--brand-900);
  --brand-ink: var(--brand-900);
  --brand-tint: var(--brand-100);
  --canvas: var(--paper);
  --line-2: var(--line-strong);
  --l-commercial: #1E6E4E;
  --l-homes: #2A5FB8;
  --l-rentals: #0891B2;
  --l-newhomes: #7A4FC0;
  --l-foreclosure: #B3261E;
  --l-permits: #9A5B13;
  --l-planning: #B8357A;
  /* First shared palette reserve: transportation, square outline. */
  --l-transportation: #5E7F1F;
  --l-hiring: #38506B;
  --l-parcel-line: #8C6A32;
  /* Listing status, the same on dots, chips and filters for every listing layer: for sale or lease uses the
     layer's own color; under contract is amber; sold or leased is a muted grey-blue. Text and tint pairs are 5:1+. */
  --st-pending: #8A5300;
  --st-pending-bg: #FCEFD6;
  --st-closed: #556575;
  --st-closed-bg: #E9EDF2;

  /* Type scale. Use these names, never raw pixel sizes.
     Listing sizes follow the big listing sites (polish/patterns/residential.md): on a detail card the price
     leads at 28px (26px on phones), then a 16px facts row, then the address at 18px; list rows lead with an
     18px price over a 14px address; key facts are a 16px value over a 13px label. */
  --t-hero: 32px;     /* a page's one big title (welcome, empty pages) */
  --t-price-lg: 28px; /* the price at the top of a detail card; 26px on phones */
  --t-address: 18px;  /* the address under a detail card's price */
  --t-fact: 16px;     /* facts row (4 bd · 3.5 ba · 3,086 sq ft) and key-fact values */
  --t-fact-label: 13px; /* the label under or over a key fact */
  --t-display: 24px;  /* h1 on app pages */
  --t-title: 20px;    /* h2, card titles */
  --t-price: 18px;    /* the price on a result row or mini card */
  --t-heading: 17px;  /* h3, group headings */
  --t-body: 15px;     /* reading text; 16px on phones (below) */
  --t-ui: 14px;       /* buttons, inputs' helper text, menus */
  --t-meta: 13px;     /* dates, sources, secondary lines: the smallest readable size */
  --t-label: 13px;    /* small labels above values */
  --t-micro: 13px;    /* chips and tags; kept at the floor, never smaller */
  --t-pill: 12px;     /* map price pills only: bold white text on the layer color (the one exception to 13px) */
  --lh-tight: 1.25;
  --lh-body: 1.5;
  --w-strong: 650;

  /* Spacing scale (4px steps, then 8px). */
  --s1: 4px;
  --s2: 8px;
  --s3: 12px;
  --s4: 16px;
  --s5: 20px;
  --s6: 24px;
  --s7: 28px;
  --s8: 32px;
  --s10: 40px;
  --s12: 48px;
  --s16: 64px;

  /* Shapes, controls and depth. */
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 12px;
  --r-pill: 999px;
  --control-h: 44px;    /* buttons, inputs and selects: one touch-sized height */
  --control-h-sm: 36px; /* compact buttons inside dense lists on a computer */
  --page-w: 1080px;     /* widest reading layout */
  --text-w: 46rem;      /* longest comfortable line of text */
  --e1: 0 1px 2px rgba(23,32,28,.08);
  --e2: 0 4px 16px rgba(23,32,28,.12);
  --e3: 0 -8px 24px rgba(23,32,28,.16);
  font-family: Inter, "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  font-size: var(--t-body);
  line-height: 1.45;
  color: var(--ink);
}

/* Phones: one step larger reading text, so nobody has to pinch. */
@media (max-width: 760px) {
  :root { --t-body: 16px; --t-hero: 28px; --t-price-lg: 26px; }
}

:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; box-shadow: 0 0 0 2px #fff; }
/* Headings and panels that scripts move focus to (tabindex="-1") aren't controls: no ring around them. */
:is(h1, h2, h3, main, section, div, aside)[tabindex="-1"]:is(:focus, :focus-visible) { outline: none; box-shadow: none; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; } }
