:root {
  /* The plan-of-survey world (redesign, 2026-09-26; direction contract in
     .impeccable/surfaces/src-app-tsx.md). A bond-white sheet, drafting ink, and one accent:
     survey red, reserved for the subject lot on the plan and the stamp. Hatch grey carries
     every secondary mark. No radii, no shadows, no tinted panels anywhere. */
  --color-sheet: #ffffff;
  --color-surface: var(--color-sheet);
  --color-ink: #1b1b1b;
  --color-ink-muted: #5a5f66;
  --color-rule: var(--color-ink);
  --color-rule-faint: #cfd3d8;
  --color-hatch: #8a8f94;
  --color-survey-red: #c0392b;
  --color-survey-red-fill: rgba(192, 57, 43, 0.1);
  /* Focus is drawn in ink, offset from the control, so it reads as a second rule around the
     box the way a drafting highlight does; every ground in this world is white. */
  --color-focus: var(--color-ink);
  --color-error: var(--color-survey-red);
  --color-pin: var(--color-survey-red);
  --color-map-land: #f5f2ea;
  --color-map-road: #d8d5cd;

  /* Six-plex ward fill on the plan (WardMap.tsx mirrors it as a raw Leaflet style). */
  --color-teal-700: #005e5b;
  --color-teal-500: #008a84;
  --color-teal-fill: rgba(0, 138, 132, 0.22);

  /* Data overlay accents — unchanged by the redesign. Chosen via the dataviz skill's palette
     validator against the colours that co-occur on the map (six-plex teal fill, the pin);
     all pass CVD separation and the normal-vision floor, and the stylesheet guard test pins
     the three hex values. */
  --color-height-overlay: #7c3aed;
  --color-height-overlay-fill: rgba(124, 58, 237, 0.35);
  --color-coverage-overlay: #ca8a04;
  --color-coverage-overlay-fill: rgba(202, 138, 4, 0.35);
  /* Main Street corridor lines (FR3.2, NFR5; main-street-overlay unit U2) — dataviz palette
     validator, Refined Mockups 2026-09-23: CVD separation >= 8 against every other map
     accent and >= 3:1 on the land (#f5f2ea) and road (#d8d5cd) fills it is drawn over.
     Mirrored by MAINSTREET_OVERLAY_COLOR in WardMap.tsx. */
  --color-mainstreet-overlay: #86198f;
  /* Ravine by-law boundary (intent 261006-ravine-protection-overla, FR2.2, design decision D5 as
     revised by the Impeccable critique of 2026-10-06): Chapter 658 is a protected edge, drawn as a
     1.5 px dashed outline with a light 45-degree hatch, not a zoning-style wash. Moss at hue 82,
     6.2:1 on white, 4.7:1 over the 22 % six-plex teal fill, 95 degrees from that teal and 60 from
     the site plan's TPZ green (dataviz validator run recorded in that intent's code-summary.md).
     The fill token is the flat 10 % fallback the canvas renderer would draw and is otherwise
     unused. Proposed, not yet accepted into DESIGN.md; mirrored by RAVINE_OVERLAY_COLOR in
     WardMap.tsx and pinned by the stylesheet guard. */
  --overlay-ravine: #4b6a14;
  --overlay-ravine-fill: rgba(75, 106, 20, 0.1);
  /* TRCA regulated area (intent 261108-trca-regulated-overlay, FR2.2; Impeccable shape 2026-11-08):
     TRCA's own map green, so the plan compares 1:1 with TRCA's Regulated Area map. A 20 % wash
     inside a 1.5 px edge at 90 %, dashed 3 on 3 with butt caps, at every zoom, in its own pane (393)
     below the ravine pane; told apart from the ravine moss by form (wash, not hatch), lightness and
     dash rhythm (3 on 3, not 6 on 4). 3.1:1 on white, the floor for a graphical mark. Proposed, not
     yet accepted into DESIGN.md; mirrored by TRCA_OVERLAY_COLOR in WardMap.tsx and pinned by the
     stylesheet guard. */
  --overlay-trca: #38a800;
  --overlay-trca-fill: rgba(56, 168, 0, 0.2);
  /* Station areas and their draft bands (intent 261022-pmtsa-overlay, FR2.2 to FR2.4; Impeccable
     shape 2026-10-22, plan Step 24). The area outlines (3 px protected, 2 px not, computed edges
     dashed at 2 px, lit at 5 px) are drafting ink; mirrored by the STATION_AREA_* constants in
     src/ui/stationAreaLayerPlan.ts. Proposed, not yet accepted into DESIGN.md. */
  --overlay-station-ink: var(--color-ink);
  /* The band fills and their lot-zoom edges (plan Step 24 item 7b, owner 2026-10-23): City of
     Toronto map-book colours, read from the Keele page with pdftocairo -svg, so the overlay
     compares 1:1 with the City page; proposed, not yet accepted into DESIGN.md. Within 200 m is
     #4472b8 at 0.2958; 200 to 500 m is #e77728 at 0.30, drawn only where the 200 m band is not
     (an even-odd path, as on the City page). From zoom 18 the fills hide and each band's edge
     shows as a 1 px line dashed 5 5 in its City edge colour. The six-plex fill yields while this
     layer is on (rentHeatmapPlan.ts sixPlexFillOpacity). Mirrored by OVERLAY_STATION_BAND_* in
     stationAreaLayerPlan.ts. */
  --overlay-station-band-200: #4472b8;
  --overlay-station-band-500: #e77728;
  --overlay-station-band-200-opacity: 0.2958;
  --overlay-station-band-500-opacity: 0.3;
  --overlay-station-band-200-edge: #3d56a6;
  --overlay-station-band-500-edge: #e77728;
  /* Intent 261105-ward-map-check (FR6.1; Impeccable shape 2026-11-05, owner decision D2): the ward
     map's shaded parcels in the City sheet's own brown as a 30 % wash, white gaps between parcels.
     Mirrored in src/ui/wardMapLayerPlan.ts. Proposed, not yet accepted into DESIGN.md. */
  --overlay-ward-map-shading: #a7722a;
  --overlay-ward-map-shading-opacity: 0.3;
  /* Intent 261111-exception-rules-siteplan (FR6.2; Impeccable shape of Step 27): the airport hazard
     map's five zones in Schedule 'D''s own tints (sampled from the City figure), so the plan
     compares 1:1 with it (The City's Own Colours Rule), each at 0.7 over the plan inside a 1 px
     edge in a deeper shade of its hue, which is what keeps the two palest (45.72 m, 60.96 m) apart
     from the sheet. Mirrored by AIRPORT_ZONE_STYLES in src/ui/airportHazardLayerPlan.ts. Proposed,
     not yet accepted into DESIGN.md. */
  --overlay-airport-914: #e19af6;
  --overlay-airport-914-edge: #9c3fbd;
  /* Owner, 2026-11-13: 15.24 and 30.48 m trade the City's tints, and every tier above 9.14 m is
     muted (airportHazardLayerPlan.ts). */
  --overlay-airport-1524: #e3dac9;
  --overlay-airport-1524-edge: #ab997c;
  --overlay-airport-3048: #c9e3e3;
  --overlay-airport-3048-edge: #7ca9ab;
  --overlay-airport-4572: #e2e3c9;
  --overlay-airport-4572-edge: #abaa7c;
  --overlay-airport-6096: #dbe3c9;
  --overlay-airport-6096-edge: #92ab7c;
  --overlay-airport-opacity: 0.7;
  --overlay-airport-muted-opacity: 0.35;
  /* The lands under exceptions that need review (FR7.2): no new colour. "Unknown" is hatch grey on
     this sheet (The Ink Is Good Rule), so the polygons are a -45 degree hatch-grey hatch under a
     1 px ink edge at 0.6, dashed 2 on 3, apart from the ravine's moss 45 degree hatch and 6 on 4
     dash. */
  /* Owner change CR-2 (Impeccable shape of Step 45): the exceptions that limit the Major Street
     apartment, an ordinal rose-plum ramp (OKLCH hue 355, chroma 0.08), darkest for a banned building
     type to lightest for setbacks only, at 0.55 inside a 1 px edge of the same step. Validated with
     the dataviz palette validator (monotone L, step gaps, light end 2.40:1 on the sheet, one hue);
     nearest co-occurring plan colour 10.4 dE (rents wine), survey red at least 11.8 dE, the airport
     magenta 10.7 dE from the lightest step. Mirrored by MAJOR_STREET_EXCEPTION_FILLS in
     src/ui/majorStreetExceptionLayerPlan.ts. Proposed, not yet accepted into DESIGN.md. */
  --overlay-major-street-exception-banned: #57243a;
  --overlay-major-street-exception-floor: #753f55;
  --overlay-major-street-exception-height: #935b71;
  --overlay-major-street-exception-bulk: #b3788f;
  --overlay-major-street-exception-setback: #d496ad;
  --overlay-major-street-exception-opacity: 0.55;
  --overlay-exception-review: var(--color-hatch);
  --overlay-exception-review-edge: var(--color-ink);
  /* Rent chart series (rental intent, plan D13) — validated 2026-09-25 on white; leased
     versus for-lease is carried by marker shape, never by colour. */
  --color-rental-series-2bed: #a61b46;
  --color-rental-series-3bed: #7c3aed;
  /* The 1-bedroom series (owner, 2026-09-27; hue changed 2026-09-28 when the amber read as the
     wine at a 2 px line weight and doubled as the warning colour): a blue that stands apart from
     the wine and violet above and clear of the teal budgeted for the six-plex ward fill, the
     warning amber and the coverage ochre; 5.9:1 on white. */
  --color-rental-series-1bed: #0369a1;
  /* Den tints (owner, 2026-09-27): a 2+den or 3+den point wears a lighter tint of its group's
     series colour, hollow with a dashed ring, so den units read apart from whole units and from
     each other. Both keep at least 3:1 against white. */
  --color-rental-series-2bed-den: #c9648a;
  --color-rental-series-3bed-den: #9b78f0;
  --color-rental-series-1bed-den: #2b8fc4;
  /* The studio series and its den tint (intent 261120-larger-building-proforma, FR3.6, NFR5). An
     olive hue apart from the wine, violet and blue series, the six-plex teal, the warning amber
     and the coverage ochre; 5.0:1 and 3.8:1 on white. Validated with the dataviz palette
     validator over the four rent series on white (worst colour-blind pair studio and 2-bed wine,
     deltaE 7.3 deutan, legal because every legend and readout line names its bedroom count) and
     accepted by the owner on 2026-11-19 (the Impeccable shape brief of that day). */
  --color-rental-series-studio: #4d7c0f;
  --color-rental-series-studio-den: #678f22;
  /* Persona colours (intent 261017-persona-community-profil, FR1.1, FR1.2; Impeccable shape brief
     of 2026-10-17). One fixed colour per persona, assigned by entity, never by rank or count; the
     `unclear` label has none. Worn by the persona pie's slices, its legend swatches, the square
     before a tag's name in the comparables table and the deck persona page; never by text, a
     control, a heading or a tinted ground, always beside the persona's name and always with a
     1 px ink outline on the sheet. Dataviz palette validator (light, all pairs, white and the
     deck's #f4f6fb): lightness band, chroma floor, colour-blind (worst 11.4) and normal-vision
     (worst 16.0) separation pass; contrast warns for students, new immigrants and seniors
     (2.1 to 2.8:1), relieved by the ink outline and the name beside every mark. Proposed, not
     yet accepted into DESIGN.md; mirrored by src/domain/tenants/personaColours.ts, which
     tests/tenants.personaColours.test.ts pins to these values. */
  --color-persona-students: #52b5f4;
  --color-persona-new-immigrants: #de871e;
  --color-persona-young-professionals: #665ec1;
  --color-persona-families: #465c00;
  --color-persona-short-term: #822871;
  --color-persona-seniors: #42be8f;
  /* Rent heatmap washes (intent 261003-rental-listings-store, U6; BR4.2; recoloured 2026-10-06 at
     the owner's request, "too much gray"): five washes of the 2-bed rental wine
     (--color-rental-series-2bed, #a61b46) at 12, 24, 36, 48 and 60 percent, used only as the fill
     of heatmap cells on the plan; the outline is hatch grey at 1px, dashed below the floor. The
     drafting-ink washes of 2026-10-04 (#1b1b1b at 8 to 40 percent) stepped 0.05 in OKLCH
     lightness per class over the land tone, under the dataviz validator's 0.06 floor, so the five
     classes read as one grey. The wine steps 0.060 to 0.064 over the land tone and the darkest
     class still lets the road tone through (1.14:1 land against road under it, 1.23:1 before).
     The washes never sit over the six-plex teal: the ward fill yields to its outline while the
     layer is on (rentHeatmapPlan.ts sixPlexFillOpacity), so the land tone is their ground.
     No new hue: the wine is the rent colour the chart already wears, and DESIGN.md's No Tint Rule
     admits washes that are data. Mirrored as raw Leaflet constants in WardMap.tsx
     (RENT_HEATMAP_WASH, RENT_HEATMAP_WASH_OPACITIES, RENT_HEATMAP_OUTLINE), which
     tests/rental.heatmapTokens.test.ts pins to these values. */
  --color-rent-heatmap-wash-1: rgba(166, 27, 70, 0.12);
  --color-rent-heatmap-wash-2: rgba(166, 27, 70, 0.24);
  --color-rent-heatmap-wash-3: rgba(166, 27, 70, 0.36);
  --color-rent-heatmap-wash-4: rgba(166, 27, 70, 0.48);
  --color-rent-heatmap-wash-5: rgba(166, 27, 70, 0.6);
  --color-rent-heatmap-outline: var(--color-hatch);
  /* Household-income overlay (intent 261017-persona-community-profil, FR6.4; Impeccable shape
     brief confirmed by the owner 2026-10-17, ramp revised after the critique the same day; a
     proposed addition to DESIGN.md until the owner accepts it). One indigo hue, OKLCH 280 at
     chroma 0.13, five opaque steps light to dark (dataviz validator --ordinal over #f2f2f2:
     lightness monotone, adjacent dL >= 0.06, light end 2.29:1, single hue; nearest plan colour
     the ward slate #627d98 at 9.3) worn as the class strokes while the Rents layer is on, each a
     4 px stroke clipped inside its own neighbourhood. The washes are step 5 at 12, 24, 36, 48
     and 60 percent, the Rents washes' alphas, worn as the fill while Rents is off; they step
     0.064 to 0.069 in OKLCH lightness. The outline in fill mode is hatch grey (--color-hatch).
     Mirrored as raw Leaflet constants in src/ui/incomeOverlayPlan.ts (INCOME_OVERLAY_STEPS,
     INCOME_OVERLAY_WASH, INCOME_OVERLAY_WASH_OPACITIES), which tests/ui.incomeOverlayPlan.test.ts
     pins to these. */
  --color-income-overlay-1: #959af4;
  --color-income-overlay-2: #7d82d9;
  --color-income-overlay-3: #6769bf;
  --color-income-overlay-4: #5152a4;
  --color-income-overlay-5: #3d3b8b;
  --color-income-overlay-wash-1: rgba(61, 59, 139, 0.12);
  --color-income-overlay-wash-2: rgba(61, 59, 139, 0.24);
  --color-income-overlay-wash-3: rgba(61, 59, 139, 0.36);
  --color-income-overlay-wash-4: rgba(61, 59, 139, 0.48);
  --color-income-overlay-wash-5: rgba(61, 59, 139, 0.6);

  /* Status colours — reserved, fixed meaning, always paired with an icon shape and words.
     "Good" is drawn in ink (teal is budgeted for the six-plex ward fill alone); "warning"
     flags a heritage/TRCA/live-corrected follow-up. */
  --color-status-good: var(--color-ink);
  --color-status-warning: #b45309;
  --color-status-neutral: var(--color-hatch);

  /* Typography. Two self-hosted faces (src/styles/fonts.css; the files ship under
     public/fonts/ with their licences, and nothing is fetched from a network):
     Public Sans, a governmental workhorse with true tabular figures, for notes, values and
     controls; osifont, ISO 3098 technical lettering as used on CAD and survey drawings, for
     the wordmark, sheet titles, note numbers, dimension strings, legend, title block and the
     stamp. Both stacks close with a generic family. */
  --font-family: "Public Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-family-heading: "osifont", "Routed Gothic", "Helvetica Neue", Arial, sans-serif;
  --letter-spacing-lettering: 0.08em;
  --font-h1-size: 24px;
  --font-h1-line: 32px;
  --font-h1-weight: 400;
  --font-h2-size: 18px;
  --font-h2-line: 26px;
  --font-h2-weight: 400;
  --font-h3-size: 16px;
  --font-h3-line: 24px;
  --font-h3-weight: 400;
  --font-body-size: 16px;
  --font-body-line: 24px;
  --font-body-weight: 400;
  --font-small-size: 14px;
  --font-small-line: 20px;
  --font-small-weight: 400;
  --font-label-size: 14px;
  --font-label-line: 20px;
  --font-label-weight: 600;
  /* FR4.1 — fine print, used ONLY by the Site Plan sheet's Binding constraints report (the
     owner's explicit choice: below the 12 px floor every other text keeps, NFR4). */
  --font-fine-print-size: 8px;
  --font-fine-print-line: 1.4;
  /* FR1.3 (siteplan-ui-trim) — compact text: 12 px is the FLOOR every non-report text keeps. */
  --font-compact-size: 12px;
  --font-compact-line: 16px;
  /* De-emphasised prose: clause references, live companions, captions. */
  --color-text-muted: #5a5f66;
  /* Links are ink, underlined; the hover thickens the rule. */
  --color-link: var(--color-ink);

  /* Spacing and shape */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-6: 24px;
  --space-8: 32px;
  --space-12: 48px;
  --header-height-desktop: 56px;
  --header-height-mobile: 56px;
  --rail-width: 400px;
  --rail-width-expanded: 400px;
  --drawer-width: 400px;
  /* Owner, 2026-11-13: the notes column while the lots-for-sale sheet holds it, 20% wider so every
     row's street, exception number and marks fit on the live sheet's 39 rows. */
  --rail-width-lots: 480px;
  /* A drafting sheet has no rounded corners. The tokens stay so a rule can name them. */
  --radius-control: 0;
  --radius-panel: 0;
  --radius-card: 0;
  --border-neutral: 1px;
  --border-selected: 2px;
  --focus-ring-width: 2px;
  --focus-ring-offset: 2px;
  --min-target-size: 44px;
  --min-target-gap: 8px;

  /* Map tokens */
  --ward-stroke-default: 1.5px;
  --ward-stroke-sixplex: 2px;
  --ward-stroke-selected: 3px;
  --ward-hatch-angle: 45deg;
  --ward-hatch-spacing: 8px;
  --address-pin-visual-width: 24px;
  --address-pin-visual-height: 32px;
  --address-pin-target-size: 44px;
  /* The open legend box's one width (intent 261022-pmtsa-overlay plan Step 25, owner
     2026-10-23), measured on the dev server at 1440 x 900 with every row checked: the widest row
     is Coverage (label 92 + threshold 79.4 + readout 71.1 + 2 gaps of 4 + the threshold's 4 px
     margin = 254.5 px), which with the box's 8 px side padding and 1 px borders made the
     shrink-to-fit box 272.5 px; the longest area readout ("≈100.0% area", 75.4 px) adds 4.3 px,
     so 280 px on the 4 px scale. Proposed, not yet accepted into DESIGN.md. */
  --plan-legend-open-width: 280px;

  /* Motion: one authored moment (the stamp landing) and state snaps everywhere else. */
  --motion-open-duration: 180ms;
  --motion-close-duration: 140ms;
  --motion-selected-outline-duration: 150ms;
  --motion-land-duration: 220ms;
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
