/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

/* Design tokens — see DESIGN.md. "Fieldwork" (dark) and "Plat Room" (light). The
   theme is the viewer's preference (Light, Dark or System), resolved to
   data-theme on <html> by the head script and theme.js; light is the no-JS default.
   --primary is the interactive colour (buttons, links, the active tab, focus);
   --accent is data only (selection, score shading, map layers). */

:root[data-theme="dark"] {
  color-scheme: dark;
  --canvas: #0E1419;
  --panel: #151C23;
  --panel-2: #1B242C;
  --rule: #25303A;
  --rule-strong: #35424E;
  --ink: #E6EBF0;
  --muted: #8896A3;
  /* Tuned 2026-10-19 (#176): measured, not guessed; see DESIGN.md § Color. */
  --primary: #6AB4C9;
  --primary-hover: #8DC6D6;
  --on-primary: #0E1419;
  /* A form field's stroke: 3:1 on --canvas and --panel (WCAG 1.4.11), where
     --rule-strong is 1.8:1. Light keeps --rule-strong. */
  --field-stroke: #617184;
  --accent: #FF6A2B;
  /* The accent where it must be read as small text (AA on every panel). */
  --accent-text: #FF6A2B;
  /* Reserved for live/active states only (GPS cursor, import pulse) — never buttons or selection. */
  --live: #C9E63C;
  --success: #6C9C57;
  --warning: #D9A441;
  --error: #E25B5B;
  --info: #6FA8B8;
  --map-land: #111920;
  --map-road: #35424E;
  --map-water: #0A1218;
  /* Power grid layer: reported transmission lines by voltage class, cool slate
     steps that never approach the data orange. */
  --grid-low: #566B7A;
  --grid-mid: #7A9AAE;
  --grid-high: #A8C8DB;
  --grid-xhigh: #E6EBF0;
  --grid-unknown: #4A5A66;
  --grid-solar: #D8C25A;
  --grid-datacenter: #B794E0;
  /* Shopping centers (their own layer): a rose apart from the grid, solar, data
     center, service-area and data-orange colours. */
  --retail: #E58AB0;
  /* Distribution centers (their own layer): a warm tan apart from the others. */
  --logistics: #C9A27A;
  /* Service areas (EPA water systems, sewersheds): the utility colour code's blue
     and green, apart from the grid steps and the data orange. */
  --service-water: #5C9CE6;
  --service-sewer: #5FBF8A;
  /* The sequential ramp, least to most. On a dark canvas more is brighter, so
     Fieldwork runs it from a dark ember that sinks into the canvas up to
     straw (an "inferno" order), the light ramp's steps the other way. */
  --ramp-1: #4A2219;
  --ramp-2: #8C2B1D;
  --ramp-3: #C05F2D;
  --ramp-4: #D69A4A;
  --ramp-5: #EFE8C6;
  --shadow-pop: 0 4px 12px rgba(0, 0, 0, 0.4);
  /* The dimmed page behind a modal dialog. */
  --scrim: rgba(5, 9, 12, 0.62);
  /* Behind a client's logo on a dark slide: logos are drawn for white paper
     (DESIGN.md § Client brand), so on Fieldwork one sits on a white plate. */
  --logo-plate: #FFFFFF;
}

:root,
:root[data-theme="light"],
/* A report slide follows the theme on screen, but is a sheet of paper (Plat
   Room) when the viewer previews it as printed and on a share link, where the
   client sees what the PDF prints (DESIGN.md § Reports). */
:root[data-slides="print"] .report-slide,
.shared-body .report-slide {
  color-scheme: light;
  --canvas: #FFFFFF;
  --panel: #F6F8FA;
  --panel-2: #EEF2F5;
  --rule: #E1E6EB;
  --rule-strong: #C3CBD3;
  --ink: #14202B;
  --muted: #5B6875;
  --primary: #0B4A5E;
  --primary-hover: #083A4A;
  --on-primary: #FFFFFF;
  --field-stroke: #C3CBD3;
  --accent: #D95000;
  /* #D95000 is 4.1:1 on white; as small text the accent takes this deeper step. */
  --accent-text: #B84600;
  /* Hi-vis needs darkness; in light mode live states fall back to the accent. */
  --live: #B84600;
  --success: #4A7239;
  --warning: #8B5F0C;
  --error: #C43333;
  --info: #336B7B;
  --map-land: #F1F4F7;
  --map-road: #C3CBD3;
  --map-water: #DDE6EC;
  --grid-low: #8798A6;
  --grid-mid: #5C788C;
  --grid-high: #2F566B;
  --grid-xhigh: #14202B;
  --grid-unknown: #B2BCC5;
  --grid-solar: #85701A;
  --grid-datacenter: #6A3FA3;
  --retail: #9C2F64;
  --logistics: #7A5230;
  --service-water: #1D63B5;
  --service-sewer: #1E7A4D;
  --ramp-1: #EFE8C6;
  --ramp-2: #E2C878;
  --ramp-3: #D69A4A;
  --ramp-4: #C05F2D;
  --ramp-5: #8C2B1D;
  --shadow-pop: 0 4px 12px rgba(20, 32, 43, 0.08);
  --scrim: rgba(20, 32, 43, 0.45);
  --logo-plate: transparent;
}

/* A form field's border is drawn in --rule-strong like every other edge; on a
   field it takes the stroke that clears 3:1 (the same grey in Plat Room). */
:is(input:not([type="checkbox"], [type="radio"], [type="range"], [type="hidden"], [type="submit"], [type="button"], [type="reset"], [type="image"]), select, textarea) {
  --rule-strong: var(--field-stroke);
}

/* Every dropdown (DESIGN.md § Dropdowns): one rule draws the chevron of every
   single-line <select>, Rails or Elm, so none drifts. The browser's arrow goes
   (it sat against the edge and made a select taller than an input beside it);
   the user menu's chevron (12px, 1.5px stroke, --muted) sits --select-inset
   from the edge with the text kept clear of it. A component keeps its own
   size, font, colours and left padding, and tunes the chevron only through
   --select-inset, --select-chevron (its size) and --select-chevron-image
   (--chevron-on-fill on a filled control); the selector outranks a
   component's padding shorthand, so the clearance cannot be lost. */
:root {
  --chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 4.5 6 8l3.5-3.5' fill='none' stroke='%235B6875' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  --chevron-on-fill: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 4.5 6 8l3.5-3.5' fill='none' stroke='%23FFFFFF' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

:root[data-theme="dark"] {
  --chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 4.5 6 8l3.5-3.5' fill='none' stroke='%238896A3' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  --chevron-on-fill: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 4.5 6 8l3.5-3.5' fill='none' stroke='%230E1419' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

:root select:not([multiple]):not([size]) {
  -webkit-appearance: none;
  appearance: none;
  padding-right: calc(var(--select-inset, 10px) + var(--select-chevron, 12px) + 6px);
  background-image: var(--select-chevron-image, var(--chevron));
  background-repeat: no-repeat;
  background-position: right var(--select-inset, 10px) center;
  background-size: var(--select-chevron, 12px) var(--select-chevron, 12px);
  text-overflow: ellipsis;
  cursor: pointer;
}

:root select:not([multiple]):not([size]):disabled {
  cursor: default;
}

:root {
  --font-ui: "IBM Plex Sans", system-ui, sans-serif;
  --font-data: "IBM Plex Mono", ui-monospace, monospace;

  --space-2xs: 2px;
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 64px;

  /* Radius scale: controls 4, containers 6, chips and tags 3; data cells,
     score cells, register hairline boxes and provenance stamps stay 2. */
  --r-ctl: 4px;
  --r-box: 6px;
  --r-chip: 3px;
  --r-data: 2px;

  /* Hover and focus transitions: functional, never decorative. */
  --t-ui: 150ms ease-out;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
}

body {
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 15px;
  line-height: 1.55;
}

/* --- Auth plate (sign-in) — drafted per DESIGN.md: hairlines, 2px radius --- */

.auth {
  /* Below the site header. */
  min-height: calc(100vh - 56px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-lg);
}

.auth-plate {
  width: 100%;
  max-width: 360px;
  border: 1px solid var(--rule-strong);
  border-radius: var(--r-box);
  background: var(--panel);
  padding: var(--space-xl);
}

.auth-lockup {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
}

.auth-wordmark {
  font-family: var(--font-ui);
  font-size: 19px;
  font-weight: 600;
  letter-spacing: 0.06em;
}

.auth-baseline {
  font-family: var(--font-data);
  font-size: 9px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 2px;
}

/* Notices by severity (DESIGN.md § Notices): the token's 1px border over a 12%
   tint of it on --canvas, the text in --ink. A refusal is an error. */
.auth-alert {
  border: 1px solid var(--error);
  border-radius: var(--r-box);
  background: color-mix(in srgb, var(--error) 12%, var(--canvas));
  padding: var(--space-sm) 12px;
  font-size: 13px;
  margin-bottom: var(--space-md);
}

/* A caution before a step that cannot be taken back (approving a device sign-in). */
.auth-alert--warning {
  border-color: var(--warning);
  background: color-mix(in srgb, var(--warning) 12%, var(--canvas));
}

/* Settings: mail to the person's address is suppressed (DESIGN.md § Email bounces). */
.email-bouncing p { margin: 0 0 var(--space-sm); }
.email-bouncing p:last-child { margin-bottom: 0; }

.field-label {
  display: block;
  font-family: var(--font-data);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}

.field-input {
  width: 100%;
  background: var(--canvas);
  border: 1px solid var(--rule-strong);
  border-radius: var(--r-ctl);
  color: var(--ink);
  font-family: var(--font-data);
  font-size: 13px;
  padding: 9px 10px;
  margin-bottom: var(--space-md);
}

.field-input:focus {
  outline: none;
  border-color: var(--primary);
}

.btn-primary {
  width: 100%;
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 600;
  padding: 10px 16px;
  border: 1px solid transparent;
  border-radius: var(--r-ctl);
  background: var(--primary);
  color: var(--on-primary);
  cursor: pointer;
}

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

.account-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--space-md);
  padding: var(--space-sm) 0;
  border-bottom: 1px solid var(--rule);
  margin-bottom: var(--space-sm);
}

.account-row .field-label {
  margin-bottom: 0;
}

.account-value {
  font-family: var(--font-data);
  font-size: 12.5px;
}

#current-account .account-value {
  text-align: right;
}

.account-terms {
  padding: var(--space-sm) 0;
  border-bottom: 1px solid var(--rule);
  margin-bottom: var(--space-md);
}

.account-terms .field-label {
  margin-bottom: var(--space-xs);
}

.account-terms__text {
  font-size: 13px;
  color: var(--ink);
}

.account-terms__text a {
  color: var(--primary);
}

.account-rename,
.account-new {
  padding: var(--space-sm) 0;
  border-bottom: 1px solid var(--rule);
  margin-bottom: var(--space-md);
}

.account-rename .field-input,
.account-new .field-input {
  margin-bottom: var(--space-sm);
}

.account-rename__button {
  margin-top: 0;
}

.account-list {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 13px;
}

.account-list li[aria-current] {
  font-weight: 600;
}

.btn-secondary {
  width: 100%;
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 600;
  padding: 10px 16px;
  border: 1px solid var(--rule-strong);
  border-radius: var(--r-ctl);
  background: none;
  color: var(--ink);
  cursor: pointer;
  margin-top: var(--space-md);
}

.btn-secondary:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* The Settings page carries a list of people: wider than the sign-in plate. */
.auth-plate--wide {
  max-width: 640px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* Members and invitations (DESIGN.md: Members and invitations). Ruled rows on
   hairlines; roles are stamps, never colours. */
.members {
  padding: var(--space-sm) 0 var(--space-md);
  border-bottom: 1px solid var(--rule);
  margin-bottom: var(--space-md);
}

.members .field-label {
  margin-bottom: var(--space-xs);
}

.members__subhead {
  margin-top: var(--space-lg);
}

.members__note {
  font-size: 12.5px;
  color: var(--muted);
  margin-bottom: var(--space-md);
}

.members__note a {
  color: var(--primary);
}

/* Settings > Password: a little air between the block's label and the first field's. */
.password-form {
  margin-top: var(--space-sm);
}

.member-list,
.activity {
  list-style: none;
  margin: 0 0 var(--space-md);
  padding: 0;
}

.member {
  padding: var(--space-sm) 0;
  border-bottom: 1px solid var(--rule);
  font-size: 13px;
}

.member--muted {
  color: var(--muted);
}

.member__who {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--space-xs) var(--space-sm);
}

.member__name {
  font-weight: 600;
  overflow-wrap: anywhere;
}

.member__name--mono {
  font-family: var(--font-data);
  font-size: 12.5px;
  font-weight: 500;
}

.member__you {
  font-size: 12.5px;
  color: var(--muted);
}

.member__email {
  font-family: var(--font-data);
  font-size: 11px;
  color: var(--muted);
  overflow-wrap: anywhere;
  margin-top: 2px;
}

.role-stamp {
  font-family: var(--font-data);
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid var(--rule-strong);
  border-radius: var(--r-data);
  padding: 1px 5px;
}

.member__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: var(--space-sm);
  margin-top: var(--space-sm);
}

.member__actions form {
  display: flex;
  gap: var(--space-sm);
  align-items: center;
}

.member__actions .field-input {
  width: auto;
  margin-bottom: 0;
  padding: 5px 8px;
  font-size: 12.5px;
}

.btn-inline {
  width: auto;
  margin-top: 0;
  padding: 5px 12px;
  font-size: 12.5px;
}

.btn-secondary.btn-inline {
  display: inline-block;
}

/* A confirmation in the row, without a script: <details> opens it. */
.confirm > summary {
  list-style: none;
  cursor: pointer;
}

.confirm > summary::-webkit-details-marker {
  display: none;
}

.confirm__body {
  margin-top: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  background: var(--panel-2);
  border: 1px solid var(--rule-strong);
  border-radius: var(--r-box);
  font-size: 12.5px;
  max-width: 420px;
}

.confirm__body p {
  margin-bottom: var(--space-sm);
}

.confirm--leave {
  margin-top: var(--space-md);
}

.invite-form {
  margin-top: var(--space-md);
}

.invite-form .field-input {
  max-width: 420px;
}

.invite-form .btn-primary {
  width: auto;
}

/* Passkeys (DESIGN.md: Passkeys): the Members rows and the page's own buttons;
   only the add form's spacing is new. Shown by passkeys.js where WebAuthn exists. */
.passkeys__add {
  margin-top: var(--space-md);
}

.passkeys__add .field-input,
.passkeys__rename .field-input {
  max-width: 420px;
}

.passkeys__add .btn-primary {
  width: auto;
}

.passkeys__add .members__note {
  margin: var(--space-sm) 0 0;
}

/* The rename form sits in a confirm box inside .member__actions, whose own form
   and field rules are for a row: stack it, and give an open box the whole row. */
.member__actions .passkeys__rename {
  display: block;
}

.member__actions .passkeys__rename .field-input {
  width: 100%;
  margin-bottom: var(--space-sm);
  padding: 9px 10px;
  font-size: 13px;
}

.passkeys .member__actions:has(details[open]) {
  flex-direction: column;
}

.passkey-signin [data-passkey-error] {
  margin: var(--space-md) 0 0;
}

.invite-link {
  background: var(--panel-2);
  border: 1px solid var(--rule-strong);
  border-radius: var(--r-box);
  padding: var(--space-sm) var(--space-md) var(--space-md);
  margin-bottom: var(--space-md);
}

.invite-link__field {
  font-size: 12px;
  margin-bottom: var(--space-sm);
}

.invite-link .btn-primary {
  width: auto;
  padding: 7px 16px;
}

/* Connecting an app (DESIGN.md: Connecting an app): the consent plate's account
   choice is the Members row with a native radio; the destination and the device
   code are data, so mono. */
.oauth-client {
  color: var(--ink);
  overflow-wrap: anywhere;
}

.oauth-accounts {
  border: 0;
  margin: 0 0 var(--space-sm);
  padding: 0;
}

.oauth-accounts legend {
  padding: 0;
}

.oauth-choice {
  display: flex;
  align-items: baseline;
  gap: var(--space-sm);
  cursor: pointer;
}

.oauth-choice input {
  accent-color: var(--primary);
  margin: 0;
}

.oauth-destination {
  font-family: var(--font-data);
  color: var(--ink);
  overflow-wrap: anywhere;
}

.oauth-consent .btn-secondary {
  margin-top: var(--space-sm);
}

.oauth-revoke-note {
  margin-top: var(--space-md);
}

.oauth-revoke-note a {
  color: var(--primary);
}

/* Settings > Authorized apps and API keys end on the section's own rule: no
   second hairline under the last app or the make-a-key form. */
#authorized-apps .member-list .member:last-child,
.api-access .account-new {
  border-bottom: 0;
}

#authorized-apps .member-list,
.api-access .account-new {
  margin-bottom: 0;
}

.oauth-return {
  display: block;
  text-align: center;
  text-decoration: none;
}

.oauth-user-code {
  font-size: 18px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.activity li {
  display: flex;
  flex-wrap: wrap;
  gap: 0 var(--space-md);
  padding: 6px 0;
  border-bottom: 1px solid var(--rule);
  font-size: 12.5px;
}

.activity__time {
  font-family: var(--font-data);
  font-size: 11px;
  color: var(--muted);
}

.activity__text {
  overflow-wrap: anywhere;
}

.account-back {
  font-size: 12.5px;
  color: var(--muted);
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
  padding: 0 16px;
  border-bottom: 1px solid var(--rule);
}

.site-lockup {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--ink);
}

.site-wordmark {
  font-family: var(--font-ui);
  font-size: 19px;
  font-weight: 600;
  letter-spacing: 0.06em;
}

/* --- User menu (DESIGN.md § The user menu): the header chip as a menu
   button. Drawn by UserMenu.elm on the Elm pages and by layouts/_user_menu on
   the Rails pages; one set of rules. --- */

.usermenu {
  position: relative;
}

.usermenu__button {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 3px 8px 3px 3px;
  border: 1px solid transparent;
  border-radius: var(--r-ctl);
  background: none;
  color: var(--ink);
  font: 500 15px/1.55 var(--font-ui);
  cursor: pointer;
}

.usermenu__button:hover,
.usermenu__button[aria-expanded="true"] {
  background: var(--panel);
  border-color: var(--rule-strong);
}

.usermenu__button:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 1px;
}

.usermenu__ini {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 1px solid var(--rule-strong);
  border-radius: var(--r-ctl);
  font: 600 11px var(--font-data);
  color: var(--ink);
}

.usermenu__name {
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.usermenu__chevron {
  flex: none;
  color: var(--muted);
}

.usermenu__button[aria-expanded="true"] .usermenu__chevron {
  transform: rotate(180deg);
}

.usermenu__panel {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  z-index: 60;
  min-width: 220px;
  max-width: min(320px, calc(100vw - 32px));
  background: var(--canvas);
  border: 1px solid var(--rule-strong);
  border-radius: var(--r-box);
  box-shadow: var(--shadow-pop);
}

.usermenu__panel[hidden] {
  display: none;
}

.usermenu__who {
  padding: 10px 12px;
  border-bottom: 1px solid var(--rule);
}

.usermenu__who-name {
  font-size: 13px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.usermenu__who-email {
  font-family: var(--font-data);
  font-size: 11px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.usermenu__who-account {
  margin-top: 2px;
  font-size: 12px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.usermenu__menu {
  padding: 4px;
}

.usermenu__form {
  margin: 0;
}

.usermenu__item {
  display: flex;
  align-items: center;
  width: 100%;
  height: 36px;
  padding: 0 12px;
  border: 0;
  border-radius: var(--r-ctl);
  background: none;
  color: var(--ink);
  font: 400 13px var(--font-ui);
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.usermenu__item:hover,
.usermenu__item:focus-visible {
  background: var(--panel-2);
}

.usermenu__item:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: -2px;
}

.usermenu__item[aria-current="page"] {
  font-weight: 600;
}

.usermenu__rule {
  height: 1px;
  margin: 4px 0;
  background: var(--rule);
}

/* The Theme group: three radio items (Light, Dark, System) inside the menu.
   The chosen one is tinted --panel-2 and carries a check in --primary; the
   check's slot is always reserved so the labels stay aligned. */
.usermenu__group-label {
  padding: 6px 12px 2px;
  font: 500 11px var(--font-data);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.usermenu__item[role="menuitemradio"] {
  gap: 8px;
}

.usermenu__item[aria-checked="true"] {
  background: var(--panel-2);
}

.usermenu__check {
  flex: none;
  width: 14px;
  height: 14px;
  color: var(--primary);
}

.usermenu__item[aria-checked="false"] .usermenu__check {
  visibility: hidden;
}

.auth-alt {
  margin-top: var(--space-md);
  text-align: center;
  font-size: 12.5px;
  color: var(--muted);
}

.auth-alt a {
  color: var(--primary);
}

/* A change that went through (DESIGN.md § Notices: success). */
.auth-notice {
  border: 1px solid var(--success);
  border-radius: var(--r-box);
  background: color-mix(in srgb, var(--success) 12%, var(--canvas));
  padding: var(--space-sm) 12px;
  font-size: 13px;
  margin-bottom: var(--space-md);
}

.auth-copy {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: var(--space-md);
}

.auth-copy a {
  color: var(--primary);
}

/* What changed in a version of the terms (acceptance page). */
.auth-changes {
  margin-bottom: var(--space-md);
  padding: var(--space-sm) var(--space-md);
  background: var(--panel);
  border: 1px solid var(--rule-strong);
  border-radius: var(--r-box);
  font-size: 13px;
}

.auth-changes__title {
  margin-bottom: var(--space-xs);
  font-weight: 600;
}

.auth-changes ul {
  padding-left: var(--space-md);
}

/* --- Admin panel shell: left nav column + content --- */

.admin {
  display: flex;
  min-height: calc(100vh - 56px);
}

.admin-nav {
  width: 200px;
  flex-shrink: 0;
  border-right: 1px solid var(--rule);
  padding: 12px 0 24px;
}

/* The panel title: a centered recorder's stamp over the tree, full-strength
   ink so it reads as the drawer's name rather than a field label. */
.admin-nav-kicker {
  font-family: var(--font-data);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  text-align: center;
  color: var(--ink);
  margin-bottom: 12px;
  padding: 0 16px 12px;
  border-bottom: 1px solid var(--rule);
}

/* Full-bleed rows; the active row highlights edge to edge with the accent
   bar on the right, tight against the column's divider. */
.admin-nav-link {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  padding: 8px 16px;
  border-right: 2px solid transparent;
}

.admin-nav-link:hover {
  color: var(--primary);
}

.admin-nav-link.active {
  border-right-color: var(--primary);
  background: var(--panel);
}

/* Section header ("Data"): same register as the kicker. */
.admin-nav-group {
  font-family: var(--font-data);
  font-size: 9px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 16px 0 8px;
  padding: 0 16px;
}

/* A section's contents indent one level beneath its header. */
.admin-nav-children > .admin-nav-link,
.admin-nav-children > .admin-nav-branch {
  padding-left: 24px;
}

/* A non-link branch ("Geography"): a peer of the links, not a destination —
   same size and column, no hover affordance beyond the caret. */
.admin-nav-branch {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  padding: 8px 16px 4px;
}

/* A branch's subtree: drafted hairline guide, children inset beneath the
   branch label. */
.admin-nav-tree {
  margin-left: 24px;
  border-left: 1px solid var(--rule);
  margin-bottom: 2px;
}

.admin-nav-tree .admin-nav-link {
  padding: 4px 16px 4px 12px;
  font-weight: 500;
}

.admin-main {
  flex: 1;
  min-width: 0;
}

/* A phone has no room for a 200px column beside the content: the nav stacks
   above it, closed by a hairline. */
@media (max-width: 699px) {
  .admin {
    flex-direction: column;
  }
  .admin-nav {
    width: auto;
    border-right: none;
    border-bottom: 1px solid var(--rule);
  }
}

/* --- App navigation (DESIGN.md § App navigation): the signed-in app's left
   column (layouts/app, layouts/_app_nav). Open, 216px of icon-and-word rows;
   collapsed, a 72px rail with a short word under each icon. It stays in view
   as the page scrolls and closes on one --rule-strong hairline. --- */

.appshell {
  display: flex;
  min-height: 100vh;
  min-height: 100dvh;
}

.appshell__main {
  flex: 1;
  min-width: 0;
}

/* The bar beside the nav: the user menu alone, on the right. */
.site-header--bare {
  justify-content: flex-end;
}

.appnav {
  flex: none;
  position: sticky;
  top: 0;
  align-self: flex-start;
  display: flex;
  flex-direction: column;
  width: 216px;
  height: 100vh;
  height: 100dvh;
  overflow-y: auto;
  background: var(--canvas);
  border-right: 1px solid var(--rule-strong);
}

.appnav__lockup {
  flex: none;
  display: flex;
  align-items: center;
  gap: 12px;
  height: 56px;
  padding: 0 20px;
  text-decoration: none;
  color: var(--ink);
}

.appnav__lockup svg {
  display: block;
  flex: none;
}

.appnav__wordmark {
  font: 600 19px var(--font-ui);
  letter-spacing: 0.06em;
}

.appnav__list {
  list-style: none;
  padding: 0 8px;
}

.appnav__group {
  font-family: var(--font-data);
  font-size: 9px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 20px 20px 6px;
}

.appnav__link,
.appnav__toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 36px;
  padding: 0 12px;
  border-radius: var(--r-ctl);
  font: 500 13px var(--font-ui);
  color: var(--ink);
  text-decoration: none;
  transition: background-color var(--t-ui), color var(--t-ui);
}

.appnav__icon {
  flex: none;
  color: var(--muted);
  transition: color var(--t-ui);
}

.appnav__link:hover,
.appnav__toggle:hover {
  background: var(--panel-2);
}

.appnav__link:hover .appnav__icon,
.appnav__toggle:hover .appnav__icon {
  color: var(--ink);
}

/* The page, or the section the page is in: the menu's checked-item tint and
   weight, the icon in --primary. No side bar. */
.appnav__link[aria-current] {
  background: var(--panel-2);
  font-weight: 600;
}

.appnav__link[aria-current] .appnav__icon {
  color: var(--primary);
}

.appnav__link:focus-visible,
.appnav__toggle:focus-visible,
.appnav__lockup:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: -2px;
}

.appnav__short {
  display: none;
}

.appnav__toggle {
  margin: auto 0 0;
  border: 0;
  background: none;
  font-size: 12.5px;
  color: var(--muted);
  cursor: pointer;
}

.appnav__toggle:hover {
  color: var(--ink);
}

/* The toggle sits in the list's 8px gutter, at the foot. */
.appnav > .appnav__toggle {
  width: calc(100% - 16px);
  margin: auto 8px 12px;
}

.appnav__when-open,
.appnav__when-closed {
  display: flex;
  align-items: center;
  gap: 10px;
}

.appnav__when-closed {
  display: none;
}

/* Collapsed: data-collapsed once app_nav.js runs (and always on the project
   hub, as the server renders it), or before it, the remembered rail the head
   script marks on <html>. Phones have no rail (below). */
@media (min-width: 700px) {
  :is(.appnav[data-collapsed="true"], html[data-nav="collapsed"] .appnav[data-remember="true"]) {
    width: 72px;
  }
  :is(.appnav[data-collapsed="true"], html[data-nav="collapsed"] .appnav[data-remember="true"]) .appnav__lockup {
    justify-content: center;
    padding: 0;
  }
  :is(.appnav[data-collapsed="true"], html[data-nav="collapsed"] .appnav[data-remember="true"]) .appnav__wordmark {
    display: none;
  }
  :is(.appnav[data-collapsed="true"], html[data-nav="collapsed"] .appnav[data-remember="true"]) .appnav__list {
    padding: 0 6px;
  }
  :is(.appnav[data-collapsed="true"], html[data-nav="collapsed"] .appnav[data-remember="true"]) .appnav__group {
    padding: 20px 0 6px;
    text-align: center;
  }
  :is(.appnav[data-collapsed="true"], html[data-nav="collapsed"] .appnav[data-remember="true"]) :is(.appnav__link, .appnav__when-open, .appnav__when-closed) {
    flex-direction: column;
    justify-content: center;
    gap: 3px;
  }
  :is(.appnav[data-collapsed="true"], html[data-nav="collapsed"] .appnav[data-remember="true"]) :is(.appnav__link, .appnav__toggle) {
    min-height: 52px;
    padding: 6px 2px;
  }
  :is(.appnav[data-collapsed="true"], html[data-nav="collapsed"] .appnav[data-remember="true"]) > .appnav__toggle {
    width: calc(100% - 12px);
    margin: auto 6px 12px;
  }
  /* The full name stays the link's accessible name; the rail shows the short word. */
  :is(.appnav[data-collapsed="true"], html[data-nav="collapsed"] .appnav[data-remember="true"]) .appnav__label {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
  :is(.appnav[data-collapsed="true"], html[data-nav="collapsed"] .appnav[data-remember="true"]) :is(.appnav__short, .appnav__word) {
    display: block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 10.5px;
    line-height: 1.2;
  }
  :is(.appnav[data-collapsed="true"], html[data-nav="collapsed"] .appnav[data-remember="true"]) .appnav__when-open {
    display: none;
  }
  :is(.appnav[data-collapsed="true"], html[data-nav="collapsed"] .appnav[data-remember="true"]) .appnav__when-closed {
    display: flex;
  }
}

/* A phone has no room for a column: the nav is a strip above the page, the
   lockup's mark and every item as a word, scrolling sideways; no toggle. */
@media (max-width: 699px) {
  .appshell {
    flex-direction: column;
  }
  .appnav {
    position: static;
    flex-direction: row;
    align-items: center;
    align-self: stretch;
    width: auto;
    height: auto;
    overflow-x: auto;
    overflow-y: hidden;
    border-right: 0;
    border-bottom: 1px solid var(--rule-strong);
  }
  .appnav__lockup {
    height: 48px;
    padding: 0 12px 0 16px;
  }
  .appnav__wordmark,
  .appnav__icon,
  .appnav > .appnav__toggle {
    display: none;
  }
  .appnav__list {
    display: flex;
    padding: 0 4px;
  }
  .appnav__group {
    padding: 0 4px 0 12px;
    border-left: 1px solid var(--rule);
  }
  .appnav__link {
    white-space: nowrap;
  }
}

@media (prefers-reduced-motion: reduce) {
  .appnav__link,
  .appnav__toggle,
  .appnav__icon {
    transition: none;
  }
}

/* Admin > Data: one source card (DESIGN.md, Admin data dashboard). Fixed
   name and loader columns so every card's loader starts on the same grid line;
   the action slot ends the first line. */
.dcard {
  padding: 10px 0;
  border-bottom: 1px solid var(--rule);
}

.dcard__line {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-top: 6px;
}

.dcard__line--top {
  margin-top: 0;
}

.dcard__line--rights {
  align-items: baseline;
}

.dcard__name,
.dcard__label-col {
  width: 220px;
  flex-shrink: 0;
}

.dcard__name {
  font-size: 14px;
  font-weight: 600;
}

.dcard__loader {
  width: 280px;
  flex-shrink: 0;
}

.dcard__progress {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.dcard__meta {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin-left: auto;
}

.dcard__act {
  display: flex;
  align-items: center;
  gap: 8px;
}

.dcard__meta + .dcard__act {
  margin-left: -8px;
}

.dcard__rights {
  font-size: 11px;
  color: var(--muted);
}

.dcard__label {
  font: 400 9px var(--font-data);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.dcard__select {
  --select-inset: 8px;
  --select-chevron: 10px;
  height: 28px;
  padding: 0 8px;
  font: 400 12.5px var(--font-ui);
  color: var(--ink);
  background: var(--canvas);
  border: 1px solid var(--rule-strong);
  border-radius: var(--r-ctl);
}

.dcard__select:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 1px;
}

/* A past year's run: `2020 · HISTORICAL` beside its status pill. */
.dcard__stamp {
  font: 400 9px var(--font-data);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--muted);
  border: 1px solid var(--muted);
  border-radius: var(--r-data);
  padding: 2px 6px;
}

.dcard__note {
  margin-top: 6px;
  font-size: 12px;
  color: var(--muted);
}

/* A stale source (DESIGN.md § Admin data dashboard, Stale): the stamp beside
   its status pill and the line under the card take the warning colour. */
.dcard__stamp--stale {
  color: var(--warning);
  border-color: var(--warning);
}

.dcard__note--stale {
  color: var(--ink);
}

/* Recent Imports: stale datasets first, a ruled row per source. */
.dstale {
  margin-bottom: 32px;
}

.dstale__head {
  font: 400 10px var(--font-data);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--warning);
  margin-bottom: 4px;
}

.dstale__counts {
  font: 400 12px var(--font-data);
  color: var(--muted);
  margin-bottom: 8px;
}

.dstale__row {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding: 8px 0;
  border-bottom: 1px solid var(--rule);
}

.dstale__name {
  width: 260px;
  flex-shrink: 0;
}

.dstale__section {
  font: 400 10px var(--font-data);
  color: var(--muted);
}

.dstale__why {
  flex: 1;
  min-width: 0;
  font-size: 12px;
  color: var(--muted);
}

.dstale__act {
  flex-shrink: 0;
  font: 600 12px var(--font-ui);
  color: var(--primary);
}

.dstale__act:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 1px;
}

@media (max-width: 699px) {
  .dstale__row {
    flex-wrap: wrap;
    gap: 4px 16px;
  }
  .dstale__name {
    width: auto;
    flex: 1 1 100%;
  }
}

/* A phone: the name and the count share the first line, the loader and the
   action slot each take a line of their own (TIGER's label over its select,
   the button beside the select), and the columns give up their fixed widths. */
@media (max-width: 699px) {
  .dcard__line {
    flex-wrap: wrap;
    gap: 6px 16px;
  }
  .dcard__name,
  .dcard__label-col,
  .dcard__loader {
    width: auto;
    min-width: 0;
  }
  .dcard__name {
    flex: 1 1 140px;
  }
  .dcard__loader {
    flex: 1 1 100%;
    order: 3;
  }
  .dcard__loader:empty {
    display: none;
  }
  .dcard__meta + .dcard__act {
    margin-left: 0;
  }
  .dcard__act--choice {
    order: 4;
    flex: 1 1 100%;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 4px 8px;
  }
  .dcard__act--choice .dcard__label {
    grid-column: 1 / -1;
  }
  .dcard__act--choice .dcard__select {
    width: 100%;
  }
}

/* --- Admin: Parcels > Sources (every register source, whatever its status) --- */

.psrc {
  padding: 32px 32px 80px;
}

.psrc__head {
  margin-bottom: var(--space-lg);
}

.psrc__title {
  font: 600 28px var(--font-ui);
  letter-spacing: 0.01em;
}

.psrc__blurb {
  color: var(--muted);
  margin-top: 4px;
  max-width: 72ch;
}

/* When the sources register last synced: one quiet line under the blurb. */
.psrc__sync {
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted);
}

.psrc__problem {
  border: 1px solid var(--error);
  border-radius: var(--r-box);
  padding: 8px 12px;
  margin-bottom: var(--space-md);
  font-size: 13px;
}

.psrc__filters {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: var(--space-sm) var(--space-md);
  margin-bottom: var(--space-md);
}

.psrc__field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.psrc__label {
  font: 400 9px var(--font-data);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.psrc__input,
.psrc__select {
  height: 32px;
  padding: 0 8px;
  font: 400 12.5px var(--font-ui);
  color: var(--ink);
  background: var(--canvas);
  border: 1px solid var(--rule-strong);
  border-radius: var(--r-ctl);
}

.psrc__input {
  width: 220px;
}

.psrc__input:focus-visible,
.psrc__select:focus-visible,
.psrc__chip:focus-visible,
.psrc__link:focus-visible,
.psrc__refresh:focus-visible,
.dcard__btn:focus-visible,
.psrc__pagebtn:focus-visible,
.psrc__ext:focus-visible,
.psrc__licence:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 1px;
}

/* The status tally doubles as the status filter: one hairline chip per status
   with its count, pressed chips filled like the register's toggle. */
.psrc__summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-xs) var(--space-sm);
  padding: var(--space-sm) 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  margin-bottom: var(--space-sm);
}

.psrc__chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 26px;
  padding: 0 8px;
  font: 500 12px var(--font-ui);
  color: var(--ink);
  background: none;
  border: 1px solid var(--rule-strong);
  border-radius: var(--r-chip);
  cursor: pointer;
  transition: border-color var(--t-ui), color var(--t-ui);
}

.psrc__chip:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.psrc__chip--on {
  background: var(--panel-2);
  border-color: var(--primary);
}

.psrc__count {
  font: 400 11px var(--font-data);
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}

.psrc__dot {
  width: 7px;
  height: 7px;
  border: 1px solid var(--muted);
  border-radius: var(--r-data);
}

.psrc__dot--production_approved { background: var(--success); border-color: var(--success); }
.psrc__dot--verified { background: var(--info); border-color: var(--info); }
.psrc__dot--rights_pending { background: var(--warning); border-color: var(--warning); }
.psrc__dot--restricted,
.psrc__dot--rejected { background: var(--error); border-color: var(--error); }

.psrc__link {
  font: 500 12px var(--font-ui);
  color: var(--primary);
  background: none;
  border: none;
  padding: 0 4px;
  cursor: pointer;
}

.psrc__range {
  margin-left: auto;
  font: 400 11px var(--font-data);
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}

.psrc__scroll {
  overflow-x: auto;
}

.psrc__table {
  border-collapse: collapse;
  width: 100%;
  font-size: 12px;
}

.psrc__th {
  font: 400 9px var(--font-data);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 4px 0 4px 16px;
  border-bottom: 1px solid var(--rule-strong);
  white-space: nowrap;
}

.psrc__th:first-child,
.psrc__td:first-child {
  padding-left: 0;
}

.psrc__th--left { text-align: left; }
.psrc__th--right { text-align: right; }

.psrc__td {
  padding: 6px 0 6px 16px;
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
  white-space: nowrap;
}

.psrc__td--right {
  text-align: right;
}

.psrc__td--source {
  white-space: normal;
  min-width: 220px;
  max-width: 360px;
}

.psrc__name {
  font-weight: 600;
  font-size: 13px;
}

.psrc__ext {
  margin-left: 8px;
  font: 500 11px var(--font-ui);
  color: var(--primary);
  white-space: nowrap;
}

.psrc__key {
  font: 400 10.5px var(--font-data);
  color: var(--muted);
  overflow-wrap: anywhere;
}

.psrc__mono {
  font-family: var(--font-data);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.psrc__muted {
  color: var(--muted);
}

/* Status pills: the dashboard's hairline pill. Approved reads as success, a
   rights hold as warning, a refusal as error; research states stay muted. */
.psrc__pill {
  display: inline-block;
  font: 400 9px var(--font-data);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--muted);
  border: 1px solid var(--muted);
  border-radius: var(--r-chip);
  padding: 2px 6px;
}

.psrc__pill--production_approved,
.psrc__pill--run-succeeded { color: var(--success); border-color: var(--success); }
.psrc__pill--verified { color: var(--info); border-color: var(--info); }
.psrc__pill--rights_pending { color: var(--warning); border-color: var(--warning); }
.psrc__pill--restricted,
.psrc__pill--rejected,
.psrc__pill--run-failed { color: var(--error); border-color: var(--error); }
.psrc__pill--run-running { color: var(--live); border-color: var(--live); }

.psrc__licence {
  font-size: 11px;
  color: var(--muted);
}

a.psrc__licence {
  border-bottom: 1px solid var(--rule);
  text-decoration: none;
}

.psrc__uses {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 3px;
  min-width: 150px;
  max-width: 220px;
}

.psrc__use {
  font: 400 9px var(--font-data);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid var(--rule-strong);
  border-radius: var(--r-chip);
  padding: 1px 4px;
}

.psrc__run {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.psrc__refresh,
.psrc__pagebtn,
.dcard__btn {
  font: 600 12px var(--font-ui);
  padding: 4px 12px;
  color: var(--ink);
  background: none;
  border: 1px solid var(--rule-strong);
  border-radius: var(--r-ctl);
  cursor: pointer;
  transition: border-color var(--t-ui), color var(--t-ui);
}

.psrc__refresh:hover:not(:disabled),
.psrc__pagebtn:hover:not(:disabled),
.dcard__btn:hover:not(:disabled) {
  border-color: var(--primary);
  color: var(--primary);
}

.psrc__refresh:disabled,
.psrc__pagebtn:disabled,
.dcard__btn:disabled {
  opacity: 0.5;
  cursor: default;
}

.psrc__reason {
  font-size: 11.5px;
  color: var(--muted);
}

.psrc__empty {
  color: var(--muted);
  padding: var(--space-md) 0;
}

.psrc__pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
  margin-top: var(--space-md);
}

@media (max-width: 699px) {
  .psrc {
    padding: 16px 16px 48px;
  }
  .psrc__input {
    width: 100%;
  }
  .psrc__filters > .psrc__field:first-child {
    flex-basis: 100%;
  }
  .psrc__range {
    margin-left: 0;
    flex-basis: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .psrc__chip,
  .psrc__refresh,
  .psrc__pagebtn {
    transition: none;
  }
}

/* --- Admin: Superuser > Analytics (DESIGN.md § Superuser analytics). The
   Sources page's vocabulary: 9px mono heads, hairline rows, mono figures; the
   headline figures are the register funnel's abutting hairline boxes; the
   range is a row of the toggle chips; one bar chart per daily series. --- */

.an {
  padding: 32px 32px 80px;
}

.an__kicker,
.an__fig dt,
.an__th,
.an__stamp,
.an__axis {
  font-family: var(--font-data);
  text-transform: uppercase;
  color: var(--muted);
}

.an__kicker {
  font-size: 9px;
  letter-spacing: 0.18em;
}

.an__title {
  font: 600 28px var(--font-ui);
  letter-spacing: 0.01em;
  margin-top: 4px;
}

.an__blurb {
  color: var(--muted);
  margin-top: 4px;
  max-width: 72ch;
}

.an__ranges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-xs) var(--space-sm);
  margin-top: var(--space-md);
  padding: var(--space-sm) 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

.an__range {
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding: 0 8px;
  font: 500 12px var(--font-ui);
  color: var(--ink);
  text-decoration: none;
  border: 1px solid var(--rule-strong);
  border-radius: var(--r-chip);
  transition: border-color var(--t-ui), color var(--t-ui);
}

.an__range:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.an__range--on {
  background: var(--panel-2);
  border-color: var(--primary);
}

.an__range:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 1px;
}

.an__span {
  margin-left: auto;
  font: 400 11px var(--font-data);
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}

.an__section {
  margin-top: var(--space-xl);
}

.an__h2 {
  font: 600 18px var(--font-ui);
  margin-bottom: var(--space-sm);
}

.an__h3 {
  font: 600 13px var(--font-ui);
  margin: var(--space-lg) 0 var(--space-sm);
}

.an__count {
  font: 400 11px var(--font-data);
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  margin-left: 8px;
}

/* Headline figures: hairline boxes that abut and share their rules. */
.an__strip {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(128px, 1fr));
  border-top: 1px solid var(--rule-strong);
  border-left: 1px solid var(--rule-strong);
}

.an__fig {
  padding: 8px 10px;
  border-right: 1px solid var(--rule-strong);
  border-bottom: 1px solid var(--rule-strong);
}

.an__fig dt {
  font-size: 9px;
  letter-spacing: 0.14em;
}

.an__fig dd {
  margin: 4px 0 0;
  font: 500 18px var(--font-data);
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}

.an__note,
.an__empty {
  margin-top: var(--space-sm);
  font-size: 12px;
  color: var(--muted);
  max-width: 80ch;
}

.an__note code,
.an__route {
  font: 400 11px var(--font-data);
}

/* A daily series: one bar per UTC day in the data orange; today's, still
   counting, a dashed outline. The value of each bar is its tooltip. */
.an__chart {
  margin: 0;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--rule-strong);
}

.an__plot {
  display: block;
  width: 100%;
  height: 64px;
}

.an__bar {
  fill: var(--accent);
}

.an__bar--today {
  fill: none;
  stroke: var(--accent);
  stroke-width: 1px;
  stroke-dasharray: 3 2;
  vector-effect: non-scaling-stroke;
}

.an__axis {
  display: flex;
  justify-content: space-between;
  margin-top: 4px;
  font-size: 9px;
  letter-spacing: 0.1em;
  font-variant-numeric: tabular-nums;
}

.an__scroll {
  overflow-x: auto;
}

.an__table {
  border-collapse: collapse;
  width: 100%;
  font-size: 12px;
}

.an__th {
  font-weight: 400;
  font-size: 9px;
  letter-spacing: 0.14em;
  text-align: right;
  padding: 4px 0 4px 16px;
  border-bottom: 1px solid var(--rule-strong);
  white-space: nowrap;
}

.an__th abbr {
  text-decoration: none;
  border-bottom: 1px dashed var(--muted);
}

.an__th--left {
  text-align: left;
}

.an__td {
  padding: 6px 0 6px 16px;
  border-bottom: 1px solid var(--rule);
  text-align: right;
  white-space: nowrap;
  font-family: var(--font-data);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}

.an__th:first-child,
.an__td:first-child {
  padding-left: 0;
}

.an__td--left,
.an__td--route {
  text-align: left;
}

.an__td--route {
  white-space: normal;
  overflow-wrap: anywhere;
  min-width: 200px;
  color: var(--ink);
}

.an__td--name {
  font: 600 12.5px var(--font-ui);
  color: var(--ink);
}

.an__td--strong {
  color: var(--ink);
  font-weight: 500;
}

.an__mono {
  color: var(--ink);
}

.an__stamp {
  display: inline-block;
  font-size: 9px;
  font-weight: 400;
  letter-spacing: 0.1em;
  white-space: nowrap;
  border: 1px solid var(--rule-strong);
  border-radius: var(--r-data);
  padding: 1px 5px;
}

/* An account's API access, when on (Superuser > API access). */
.an__stamp--on {
  color: var(--ink);
  border-color: var(--primary);
}

/* Admin > Data > Schedule (DESIGN.md § Import schedule): a source that is
   overdue or failing, and one held or stopped for its rights. */
.an__stamp--alert {
  color: var(--error);
  border-color: var(--error);
}

.an__stamp--hold {
  color: var(--warning);
  border-color: var(--warning);
}

.an__td--wrap {
  white-space: normal;
  min-width: 180px;
  vertical-align: top;
}

.an__detail {
  display: block;
  margin-top: 2px;
  max-width: 44ch;
  font: 400 10.5px var(--font-data);
  color: var(--muted);
  white-space: normal;
}

.an__action {
  display: inline-block;
  margin: 0 4px 4px 0;
}

.an .account-new {
  max-width: 420px;
  margin-bottom: var(--space-md);
}

@media (max-width: 699px) {
  .an {
    padding: 24px 16px 64px;
  }
  .an__span {
    margin-left: 0;
    flex-basis: 100%;
  }
  .an__strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (prefers-reduced-motion: reduce) {
  .an__range {
    transition: none;
  }
}

/* --- Admin > Data > Incentives > Programs (DESIGN.md § Incentive program
   review): the analytics page's parts, and one ruled block per record whose
   fields sit beside their quotes. No card, no shadow, no side stripe. --- */

.ipr__bar {
  gap: var(--space-xs) var(--space-sm);
}

.ipr__filter {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-left: auto;
}

.ipr__filter .field-label,
.ipr__filter .field-input {
  margin: 0;
}

.ipr__select {
  width: auto;
  max-width: 260px;
  padding: 5px 8px;
  font-size: 12px;
}

.ipr__batch {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm) var(--space-md);
  padding-bottom: var(--space-sm);
  border-bottom: 1px solid var(--rule-strong);
}

.ipr__batch .an__note {
  margin: 0;
}

.ipr__list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.ipr__item {
  padding: var(--space-md) 0;
  border-bottom: 1px solid var(--rule);
}

.ipr__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--space-xs) var(--space-sm);
}

.ipr__name {
  font: 600 15px var(--font-ui);
  color: var(--ink);
  margin: 0 var(--space-xs) 0 0;
}

.ipr__meta,
.ipr__gaps {
  margin-top: var(--space-xs);
  font: 400 11px var(--font-data);
  color: var(--muted);
}

.ipr__link {
  color: var(--primary);
}

.ipr__link:hover {
  color: var(--primary-hover);
}

.ipr__fields {
  display: grid;
  grid-template-columns: minmax(120px, 160px) minmax(0, 1fr);
  margin: var(--space-sm) 0 0;
  max-width: 960px;
}

.ipr__field {
  display: contents;
}

.ipr__field dt,
.ipr__field dd {
  padding: 5px 0;
  border-top: 1px solid var(--rule);
}

.ipr__field dt {
  font: 400 9px var(--font-data);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  padding-top: 8px;
}

.ipr__field dd {
  margin: 0;
  font-size: 13px;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.ipr__value {
  margin-right: var(--space-xs);
}

.ipr__quote {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  color: var(--muted);
  max-width: 88ch;
}

.ipr__quote--basis {
  font-family: var(--font-data);
  font-size: 10.5px;
}

.ipr__changes {
  margin-top: var(--space-sm);
  max-width: 960px;
}

.ipr__changes .ipr__quote {
  white-space: normal;
}

.ipr__caption {
  text-align: left;
  font: 600 12.5px var(--font-ui);
  padding-bottom: var(--space-xs);
}

.ipr__notes {
  margin-top: var(--space-sm);
  font-size: 12.5px;
  max-width: 88ch;
}

.ipr__notes .field-label {
  margin-bottom: 2px;
}

.ipr__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: var(--space-sm);
  margin-top: var(--space-sm);
}

.ipr__actions .an__action {
  margin: 0;
}

.ipr__edit[open] {
  flex-basis: 100%;
  order: 1;
}

.ipr__form {
  max-width: 760px;
}

.ipr__form form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 var(--space-md);
}

.ipr__form-field--wide,
.ipr__form-note,
.ipr__form-actions {
  grid-column: 1 / -1;
}

.ipr__form .field-input {
  margin-bottom: var(--space-sm);
  font-family: var(--font-ui);
}

.ipr__form-note {
  color: var(--muted);
}

.ipr__form-actions {
  display: flex;
  gap: var(--space-sm);
}

.ipr__pages {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-top: var(--space-md);
  font-size: 12.5px;
}

@media (max-width: 699px) {
  .ipr__filter {
    margin-left: 0;
    flex-basis: 100%;
  }
  .ipr__select {
    flex: 1;
    max-width: none;
  }
  .ipr__fields {
    grid-template-columns: minmax(0, 1fr);
  }
  .ipr__field dd {
    border-top: 0;
    padding-top: 0;
  }
  .ipr__form form {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* --- Admin > Data > Incentives > Awards (DESIGN.md § Incentive awards
   review): the Programs queue's parts, a wrapping row of filter selects, and
   each award's register row folded under the components table. --- */

.iaw__filters {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: var(--space-sm);
  margin-top: var(--space-md);
  padding-bottom: var(--space-sm);
  border-bottom: 1px solid var(--rule);
}

.iaw__filter {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.iaw__filter .field-label,
.iaw__filter .field-input {
  margin: 0;
}

.iaw__filter--check {
  flex-direction: row;
  align-items: center;
  min-height: 30px;
}

.iaw__raw {
  margin-top: var(--space-sm);
  font-size: 12.5px;
}

.iaw__raw summary {
  cursor: pointer;
}

@media (max-width: 699px) {
  .iaw__filter {
    flex-basis: 100%;
    min-width: 0;
  }
  .iaw__filter .field-input {
    min-width: 0;
  }
}

/* Admin > Data > Companies (DESIGN.md § Company tracking review): the
   Incentive awards page's parts; the add form sits above the filters. */
.co__add {
  margin-top: var(--space-md);
}

/* --- A project's Incentive programs page (DESIGN.md § Incentive programs
   page): the 1120px column, target markets as toggle chips, then ruled rows
   per program with hairline mechanism stamps (never orange), the page's
   figures in mono and a provenance stamp linking the page. --- */

.inc {
  max-width: 1120px;
  margin: 0 auto;
  padding: 24px 32px 80px;
}

.inc__back {
  font-size: 12.5px;
  margin-bottom: var(--space-md);
}

.inc__link {
  color: var(--primary);
}

.inc__link:hover {
  color: var(--primary-hover);
}

.inc__kicker,
.inc__stamp,
.inc__rec,
.inc__figures dt,
.inc__quotes dt {
  font-family: var(--font-data);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.inc__kicker {
  font-size: 10px;
  color: var(--muted);
}

.inc__title {
  font: 600 34px var(--font-ui);
  letter-spacing: -0.01em;
  margin-top: 4px;
}

.inc__lede {
  margin-top: var(--space-sm);
  max-width: 80ch;
  font-size: 15px;
  color: var(--muted);
}

.inc__notice {
  display: flex;
  align-items: baseline;
  gap: var(--space-sm);
  margin-top: var(--space-lg);
  padding: var(--space-md);
  background: color-mix(in srgb, var(--info) 12%, var(--canvas));
  border: 1px solid var(--info);
  border-radius: var(--r-box);
  font-size: 13px;
  max-width: 720px;
}

/* The paid-feature notice is info (DESIGN.md § Notices): its stamp takes --info. */
.inc__notice .inc__stamp {
  border-color: var(--info);
  color: var(--info);
}

.inc__chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs) var(--space-sm);
  margin-top: var(--space-lg);
  padding: var(--space-sm) 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

.inc__chip {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 8px;
  font: 500 12px var(--font-ui);
  color: var(--ink);
  text-decoration: none;
  border: 1px solid var(--rule-strong);
  border-radius: var(--r-chip);
  transition: border-color var(--t-ui), color var(--t-ui);
}

.inc__chip:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.inc__chip--on {
  background: var(--panel-2);
  border-color: var(--primary);
}

.inc__chip:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 1px;
}

.inc__group {
  margin-top: var(--space-xl);
}

.inc__h2 {
  font: 600 22px var(--font-ui);
  padding-bottom: var(--space-xs);
  border-bottom: 1px solid var(--rule-strong);
}

.inc__count {
  font: 400 11px var(--font-data);
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  margin-left: 6px;
}

.inc__list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.inc__row {
  padding: var(--space-md) 0;
  border-bottom: 1px solid var(--rule);
}

.inc__line {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--space-xs) var(--space-sm);
}

.inc__name {
  font: 600 15px var(--font-ui);
  margin: 0 var(--space-xs) 0 0;
}

.inc__stamp {
  display: inline-block;
  font-size: 9px;
  color: var(--ink);
  white-space: nowrap;
  border: 1px solid var(--rule-strong);
  border-radius: var(--r-data);
  padding: 1px 5px;
}

.inc__stamp--muted {
  color: var(--muted);
}

.inc__agency {
  margin-top: 2px;
  font-size: 12.5px;
  color: var(--muted);
}

.inc__text {
  margin-top: var(--space-xs);
  font-size: 13.5px;
  max-width: 88ch;
}

.inc__text--muted {
  color: var(--muted);
}

.inc__figures {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs) var(--space-lg);
  margin: var(--space-sm) 0 0;
}

.inc__figures dt,
.inc__quotes dt {
  font-size: 9px;
  color: var(--muted);
}

.inc__figures dd {
  margin: 2px 0 0;
  font: 400 12px var(--font-data);
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}

.inc__figure-note {
  color: var(--muted);
}

.inc__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--space-xs) var(--space-md);
  margin-top: var(--space-sm);
  font-size: 12px;
}

.inc__rec {
  font-size: 9px;
  color: var(--muted);
  text-decoration: none;
  border: 1px solid var(--rule-strong);
  border-radius: var(--r-data);
  padding: 1px 5px;
}

.inc__rec:hover {
  color: var(--primary);
  border-color: var(--primary);
}

.inc__quotes {
  flex-basis: 100%;
}

.inc__quotes summary {
  cursor: pointer;
  width: max-content;
}

.inc__quotes dl {
  margin: var(--space-xs) 0 0;
  max-width: 88ch;
}

.inc__quotes dd {
  margin: 2px 0 var(--space-xs);
  font-size: 12px;
  color: var(--muted);
}

.inc__empty,
.inc__note {
  margin-top: var(--space-sm);
  font-size: 12.5px;
  color: var(--muted);
  max-width: 80ch;
}

.inc__note {
  margin-top: var(--space-xl);
}

/* Recent incentive awards on the same page (DESIGN.md § Incentive programs
   page, Recent incentive awards): the program rows' parts, plus a benchmark
   line whose figures are mono. */
.inc__bench {
  margin-top: var(--space-sm);
  font-size: 12.5px;
  color: var(--muted);
  max-width: 88ch;
}

.inc__bench .inc__stamp {
  margin-right: var(--space-xs);
}

.inc__bench-figure {
  font: 400 12px var(--font-data);
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}

.inc__awards code {
  font: 400 11.5px var(--font-data);
  color: var(--ink);
  overflow-wrap: anywhere;
}

/* The Data pages (DESIGN.md § Data pages): a row of filters between --rule
   hairlines, the fields' own label and input, Show as the inline secondary
   button; then the Incentive programs page's groups and rows; a pager under
   the list. */
.dfilters {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: var(--space-sm) var(--space-md);
  margin-top: var(--space-lg);
  padding: var(--space-md) 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

.dfilters__field {
  flex: 1 1 180px;
  max-width: 280px;
}

.dfilters__field--place {
  flex-basis: 260px;
  max-width: 360px;
}

.dfilters .field-input {
  margin-bottom: 0;
}

.dfilters__actions {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  min-height: 38px;
  font-size: 12.5px;
}

.dfilters__refusal {
  margin-top: var(--space-md);
  max-width: 80ch;
}

/* A Data page fills the main column, as the admin pages do; its lede, notes
   and sentences keep their measure. */
.inc--wide {
  max-width: none;
}

/* A Data page's lists are the Sources table (an__table): one row per deal,
   company, notice or utility. Names and words wrap in Plex Sans; figures stay
   on one line in mono. A deal's or a notice's detail (description, components,
   updates) is a second row under it, one cell across the table, so the pair
   reads as one ruled entry. */
.dtable {
  margin-top: var(--space-sm);
}

.dtable .an__td {
  vertical-align: top;
}

.dtable__text {
  white-space: normal;
  font: 400 12.5px var(--font-ui);
  min-width: 120px;
}

.dtable__text--wide {
  min-width: 220px;
}

.an__td.dtable__name {
  white-space: normal;
  min-width: 200px;
}

.dtable .inc__name {
  font: inherit;
  margin: 0;
}

.dtable__stamps {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 4px;
  font-weight: 400;
}

.an__td.dtable__recs {
  white-space: normal;
  min-width: 200px;
}

.dtable__recs .inc__rec {
  display: inline-block;
  margin: 0 4px 4px 0;
  line-height: 1.5;
}

.dtable__note {
  display: block;
  margin-top: 2px;
  font-size: 10px;
}

.dtable__joined > .an__td {
  border-bottom: 0;
}

.an__td.dtable__detail {
  padding-top: 0;
  white-space: normal;
  font: 400 12px var(--font-ui);
}

.dtable__detail p {
  max-width: 88ch;
}

.dtable__detail .inc__quotes {
  margin-top: 4px;
}

.dpager {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--space-md);
  margin-top: var(--space-md);
  font-size: 12.5px;
}

.dpager__range {
  font: 400 12px var(--font-data);
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}

.dpager__links {
  display: flex;
  gap: var(--space-md);
}

@media (max-width: 699px) {
  .dfilters__field,
  .dfilters__field--place {
    flex-basis: 100%;
    max-width: none;
  }
}

@media (max-width: 699px) {
  .inc {
    padding: 16px 16px 64px;
  }
  .inc__title {
    font-size: 28px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .inc__chip {
    transition: none;
  }
}

/* Parcel map (/map): full-bleed map plate + fixed right ledger (DESIGN.md). */
parcel-map {
  position: relative;
  flex: 1;
  display: block;
  min-width: 0;
}

.map-hint {
  position: absolute;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  padding: 8px 16px;
  background: var(--panel);
  border: 1px solid var(--rule-strong);
  color: var(--muted);
  font: 500 13px var(--font-data);
}

.map-hint[hidden] {
  display: none;
}

/* Projects index — full-bleed plat-book register (post-login landing). */
.projects-page .stamp {
  font-family: var(--font-data);
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

/* The lockup is the app navigation's (DESIGN.md § App navigation): the bar
   carries the user menu, on the right. */
.projects-page .topbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  height: 56px;
  padding: 0 32px;
  border-bottom: 1px solid var(--rule-strong);
}

.projects-page .brand__stamp {
  margin-left: 6px;
  padding-left: 14px;
  border-left: 1px solid var(--rule);
}

.projects-page .page {
  padding: 28px 0 64px;
}

.projects-page .page__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  padding: 0 32px 18px;
}

.projects-page .page__title {
  margin: 0;
  font: 600 28px var(--font-ui);
  letter-spacing: -0.02em;
  color: var(--ink);
}

.projects-page .head__actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.projects-page .search {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 12px;
  width: 220px;
  background: var(--panel);
  /* A field drawn on its wrapper: the field stroke (DESIGN.md § Color). */
  border: 1px solid var(--field-stroke);
  border-radius: var(--r-ctl);
  color: var(--muted);
}

.projects-page .search:focus-within {
  border-color: var(--primary);
  color: var(--ink);
}

.projects-page .search input {
  border: none;
  background: transparent;
  color: var(--ink);
  font: 400 13px var(--font-ui);
  width: 100%;
  outline: none;
}

.projects-page .search input::placeholder {
  color: var(--muted);
}

.projects-page .btn-new {
  height: 38px;
  padding: 0 16px;
  background: var(--primary);
  border: 1px solid var(--primary);
  border-radius: var(--r-ctl);
  color: var(--on-primary);
  font: 600 13px var(--font-ui);
  white-space: nowrap;
  cursor: pointer;
}

.projects-page .btn-new:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
}

.projects-page .register {
  border-top: 1px solid var(--rule-strong);
}

.projects-page .register__head,
.projects-page .row {
  display: grid;
  grid-template-columns:
    minmax(230px, 2.4fr) minmax(170px, 1.9fr) minmax(210px, 2.2fr) minmax(190px, 1.9fr) 116px 30px;
  gap: 24px;
  align-items: center;
}

.projects-page .register__head--markets,
.projects-page .row--markets {
  grid-template-columns: minmax(230px, 2.4fr) minmax(170px, 1.9fr) 116px 30px;
}

.projects-page .register__head {
  padding: 9px 32px;
  border-bottom: 1px solid var(--rule);
}

.projects-page .register__head span {
  font-family: var(--font-data);
  font-size: 9.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.projects-page .register__empty {
  padding: 40px 32px;
  color: var(--muted);
  font: 400 14px var(--font-ui);
}

.projects-page .row {
  position: relative;
  padding: 16px 32px;
  border-bottom: 1px solid var(--rule);
  text-decoration: none;
  color: inherit;
  transition: background 0.12s ease-out;
}

.projects-page .row:hover {
  background: var(--panel);
}

.projects-page .row:hover::after {
  content: "";
  position: absolute;
  inset: 0 0 0 auto;
  width: 2px;
  background: var(--primary);
}

.projects-page .p-name {
  margin-bottom: 5px;
  font: 600 16px var(--font-ui);
  letter-spacing: -0.01em;
  line-height: 1.15;
  color: var(--ink);
}

.projects-page .p-client {
  margin: -2px 0 5px;
  font: 400 12.5px var(--font-ui);
  color: var(--muted);
}

.projects-page .p-by {
  margin: -2px 0 5px;
  font: 400 12.5px var(--font-ui);
  color: var(--muted);
}

.projects-page .p-open {
  color: var(--muted);
}

.projects-page .mkts {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.projects-page .mkt {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 7px;
  border: 1px solid var(--rule-strong);
  border-radius: var(--r-chip);
  background: var(--canvas);
  font: 400 11.5px var(--font-ui);
  color: var(--ink);
  white-space: nowrap;
}

.projects-page .mkt__type {
  font-family: var(--font-data);
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.projects-page .mkt--more {
  color: var(--muted);
  border-style: dashed;
}

.projects-page .scr {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.projects-page .scr__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.projects-page .tag {
  padding: 2px 5px;
  border: 1px solid var(--rule);
  border-radius: var(--r-chip);
  background: var(--panel-2);
  font-family: var(--font-data);
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.projects-page .tag--ind {
  color: var(--accent-text);
  border-color: color-mix(in srgb, var(--accent) 40%, var(--rule));
}

.projects-page .scr__range {
  font-family: var(--font-data);
  font-size: 11.5px;
  color: var(--ink);
}

.projects-page .pipe {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.projects-page .pipe__top {
  display: flex;
  align-items: baseline;
  gap: 7px;
}

.projects-page .pipe__n {
  font: 600 17px var(--font-data);
  line-height: 1;
  color: var(--ink);
}

.projects-page .pipe__lbl {
  font: 400 11px var(--font-ui);
  color: var(--muted);
}

.projects-page .pipe__bar {
  display: flex;
  height: 6px;
  border: 1px solid var(--rule-strong);
  border-radius: var(--r-data);
  overflow: hidden;
  background: var(--panel-2);
}

.projects-page .seg {
  height: 100%;
}
.projects-page .seg--saved {
  background: var(--rule-strong);
}
.projects-page .seg--reviewing {
  background: var(--muted);
}
.projects-page .seg--shortlisted {
  background: color-mix(in srgb, var(--accent) 55%, var(--muted));
}
.projects-page .seg--contacted {
  background: var(--accent);
}
.projects-page .seg--passed {
  background: repeating-linear-gradient(45deg, var(--rule) 0 3px, transparent 3px 6px);
}

.projects-page .upd {
  font-family: var(--font-data);
  font-size: 11.5px;
  color: var(--muted);
  white-space: nowrap;
}

.projects-page .chev {
  font-size: 16px;
  text-align: right;
  color: var(--rule-strong);
}

.projects-page .row:hover .chev {
  color: var(--primary);
}

.result__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
}

.result__save {
  flex: none;
  padding: 2px 8px;
  background: transparent;
  border: 1px solid var(--primary);
  color: var(--primary);
  font: 500 10px var(--font-ui);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  cursor: pointer;
}

.result__saved {
  flex: none;
  color: var(--success);
  font: 500 10px var(--font-ui);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}


/* Filter section — top of the right-hand ledger. */
.chip {
  padding: 3px 8px;
  background: transparent;
  border: 1px solid var(--rule-strong);
  color: var(--muted);
  font: 500 11px var(--font-data);
  text-transform: capitalize;
  cursor: pointer;
}

.chip--on {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--on-primary);
}

/* Project hub (/projects/:id) — plat-book MSA Selection → Sites → Shortlist. */
.project-page .topbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  height: 56px;
  padding: 0 32px;
  border-bottom: 1px solid var(--rule-strong);
}
.project-page .wordmark {
  font-family: var(--font-ui);
  font-size: 19px;
  font-weight: 600;
  letter-spacing: 0.06em;
}
.project-page .phead {
  padding: 22px 32px 0;
}
.project-page .phead__title {
  margin: 0 0 8px;
  font: 600 30px var(--font-ui);
  letter-spacing: -0.02em;
}
.project-page .phead__client {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: -2px 0 8px;
}
.project-page .phead__for {
  font: 400 14px var(--font-ui);
  color: var(--muted);
}
.project-page .phead__input {
  width: 260px;
  max-width: 100%;
  height: 28px;
  padding: 0 10px;
  background: var(--panel);
  border: 1px solid var(--rule-strong);
  border-radius: var(--r-ctl);
  color: var(--ink);
  font: 400 12.5px var(--font-ui);
}
.project-page .phead__hint {
  font: 400 12px var(--font-ui);
  color: var(--muted);
}
/* The website's name for the client, offered under the client editor's fields
   (DESIGN.md § Client brand): a quiet line with a small Use. */
.project-page .phead__suggest {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 0;
  font: 400 12px var(--font-ui);
  color: var(--muted);
}
/* The client's website and logo on the head (DESIGN.md § Client brand). */
.project-page .phead__site {
  font: 400 13px var(--font-ui);
  color: var(--muted);
  text-decoration: underline;
  text-decoration-color: var(--rule-strong);
  text-underline-offset: 2px;
}
.project-page .phead__site:hover {
  color: var(--ink);
  text-decoration-color: currentColor;
}
.project-page .phead__logo {
  display: block;
  max-width: 96px;
  max-height: 24px;
  padding: 2px;
  border-radius: var(--r-data);
  background: var(--logo-plate);
  object-fit: contain;
}
.project-page .phead__stamp {
  padding: 2px 6px;
  border: 1px solid var(--rule-strong);
  border-radius: var(--r-data);
  font: 400 9px var(--font-data);
  letter-spacing: 0.12em;
  color: var(--muted);
}
.project-page .phead__clientedit {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: -2px 0 12px;
}
.project-page .phead__clientedit > .phead__client {
  margin: 0;
}
/* The brand block (the client editor, an admin company page, account settings): the logo on white paper, the accent's
   swatch and hex, where they came from, and Replace, Remove, Fetch again. */
.cbrand {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 720px;
  padding: 12px;
  background: var(--panel);
  border: 1px solid var(--rule-strong);
  border-radius: var(--r-box);
}
.cbrand__label {
  font: 400 9px var(--font-data);
  letter-spacing: 0.14em;
  color: var(--muted);
}
.cbrand__row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 16px;
}
.cbrand__plate {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 200px;
  height: 72px;
  padding: 8px;
  background: var(--canvas);
  border: 1px solid var(--rule-strong);
  border-radius: var(--r-data);
}
:root[data-theme="dark"] .cbrand__plate {
  background: var(--logo-plate);
}
.cbrand__logo {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.cbrand__none {
  font: 400 12px var(--font-ui);
  color: var(--muted);
}
:root[data-theme="dark"] .cbrand__none {
  color: var(--on-primary);
}
.cbrand__facts {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1 1 260px;
  min-width: 0;
}
.cbrand__accent {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}
.cbrand__swatch {
  width: 14px;
  height: 14px;
  border: 1px solid var(--rule-strong);
  border-radius: var(--r-data);
}
.cbrand__hex {
  font: 400 11px var(--font-data);
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}
.cbrand__note {
  margin: 0;
  font: 400 12px var(--font-ui);
  color: var(--muted);
}
.cbrand__acts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
/* Settings > Your brokerage (DESIGN.md § Brokerage brand): the brand block with the brokerage's name. */
.brokerage .cbrand {
  margin-top: var(--space-sm);
}
.brokerage__name {
  margin: 0;
  font: 600 14px var(--font-ui);
  color: var(--ink);
}
/* Settings > Report theme: the brokerage's colour inline in the sentence. */
.theme__swatch {
  display: inline-block;
  vertical-align: -2px;
  margin: 0 4px;
}
.brokerage__action {
  display: inline;
}
.cbrand__problem {
  margin: 0;
  font: 400 12px var(--font-ui);
  color: var(--error);
}
/* A parcel search's source (issue 399): a quiet line under the client. */
.project-page .phead__from {
  font: 400 12.5px var(--font-ui);
  color: var(--muted);
}
.project-page .phead__from a {
  color: var(--primary);
}
.project-page .phead__from a:hover {
  color: var(--primary-hover);
}
.project-page .phead__from a:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}
.project-page .phead__stats {
  display: flex;
  flex-wrap: wrap;
  font-family: var(--font-data);
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.project-page .phead__stats span {
  padding-right: 14px;
  margin-right: 14px;
  border-right: 1px solid var(--rule);
}
.project-page .phead__stats span:last-child {
  border: none;
}

.project-page .steps {
  display: flex;
  gap: 2px;
  padding: 20px 32px 0;
  border-bottom: 1px solid var(--rule-strong);
}
.project-page .step {
  padding: 9px 16px;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  font: 500 13px var(--font-ui);
  cursor: pointer;
}
.project-page .step--on {
  color: var(--ink);
  border-bottom-color: var(--primary);
}

/* Loading — the one signature motion (DESIGN.md § Motion): the monument dot
   traverses corner to corner around a plat like an instrument slewing between
   points. Each leg accelerates off the corner and brakes hard onto the next,
   then settles there before the following leg. */
.traverse {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font: 400 11px var(--font-data);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.traverse__plat {
  position: relative;
  flex-shrink: 0;
  width: 14px;
  height: 14px;
  border: 1px solid var(--rule-strong);
}
.traverse__plat::after {
  content: "";
  position: absolute;
  top: -0.5px;
  left: -0.5px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  transform: translate(-50%, -50%);
  animation: traverse 2.4s infinite, traverse-dot 2.4s infinite;
}
/* Position. Each leg: settle on the corner for the first 10% of the quarter,
   then move for the rest. The bezier is the slew: slow start, fast middle,
   sharp stop. Corners are the hairline's centre, so the dot sits on the line. */
@keyframes traverse {
  0%, 10% { top: -0.5px; left: -0.5px; animation-timing-function: cubic-bezier(0.7, 0, 0.1, 1); }
  25%, 35% { top: -0.5px; left: 12.5px; animation-timing-function: cubic-bezier(0.7, 0, 0.1, 1); }
  50%, 60% { top: 12.5px; left: 12.5px; animation-timing-function: cubic-bezier(0.7, 0, 0.1, 1); }
  75%, 85% { top: 12.5px; left: -0.5px; animation-timing-function: cubic-bezier(0.7, 0, 0.1, 1); }
  100% { top: -0.5px; left: -0.5px; }
}
/* Size follows speed: full size while settled, smallest at the leg's fastest
   point (about 18% into each quarter for the slew bezier above). */
@keyframes traverse-dot {
  0%, 10% { transform: translate(-50%, -50%) scale(1); animation-timing-function: ease-in; }
  18% { transform: translate(-50%, -50%) scale(0.45); animation-timing-function: ease-out; }
  25%, 35% { transform: translate(-50%, -50%) scale(1); animation-timing-function: ease-in; }
  43% { transform: translate(-50%, -50%) scale(0.45); animation-timing-function: ease-out; }
  50%, 60% { transform: translate(-50%, -50%) scale(1); animation-timing-function: ease-in; }
  68% { transform: translate(-50%, -50%) scale(0.45); animation-timing-function: ease-out; }
  75%, 85% { transform: translate(-50%, -50%) scale(1); animation-timing-function: ease-in; }
  93% { transform: translate(-50%, -50%) scale(0.45); animation-timing-function: ease-out; }
  100% { transform: translate(-50%, -50%) scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  .traverse__plat::after {
    animation: none;
  }
}

/* Register states that stand in for rows: loading, failed. */
.project-page .mreg__note {
  display: flex;
  justify-content: center;
  padding: 40px 32px;
  border-bottom: 1px solid var(--rule);
  color: var(--muted);
  font: 400 13px var(--font-ui);
}
/* A load that failed (DESIGN.md § Notices: error): the error box, the sentence
   in --ink and its Try again. */
.project-page .mreg__note--err {
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: flex-start;
  gap: 4px;
  margin: var(--space-md) 0;
  padding: 12px var(--space-md);
  border: 1px solid var(--error);
  border-radius: var(--r-box);
  background: color-mix(in srgb, var(--error) 12%, var(--canvas));
  color: var(--ink);
}

/* Step navigation — the forward action at the foot of every step. Pinned to
   the viewport's bottom edge so "Next" is in the same place on a 393-row
   register and on the full-height plate; it settles into the flow once the
   page is scrolled to its end. Opaque and hairline-ruled: a frame, not a
   floating card. */
.project-page .stepnav {
  position: sticky;
  bottom: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 32px;
  background: var(--canvas);
  border-top: 1px solid var(--rule-strong);
}
.project-page .stepnav__fwd {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-left: auto;
}
.project-page .stepnav__note {
  font: 400 11px var(--font-data);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
/* The Markets step's link to the Incentive programs page (paid accounts). */
.project-page .stepnav__notes {
  display: inline-flex;
  align-items: baseline;
  gap: 12px;
}
.project-page .stepnav__link {
  font-size: 12.5px;
  color: var(--primary);
}
.project-page .stepnav__link:hover {
  color: var(--primary-hover);
}
.project-page .stepnav__prev {
  padding: 0 14px;
  height: 32px;
  background: transparent;
  border: 1px solid var(--rule-strong);
  border-radius: var(--r-ctl);
  color: var(--muted);
  font: 500 12.5px var(--font-ui);
  cursor: pointer;
}
.project-page .stepnav__prev:hover {
  border-color: var(--primary);
  color: var(--primary);
}
.project-page .stepnav__next {
  padding: 0 14px;
  height: 32px;
  background: var(--primary);
  border: 1px solid var(--primary);
  border-radius: var(--r-ctl);
  color: var(--on-primary);
  font: 500 12.5px var(--font-ui);
  cursor: pointer;
}
.project-page .stepnav__next:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
}

/* Scope — spec sheet */
.project-page .specrow {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 32px;
  align-items: start;
  padding: 20px 32px;
  border-bottom: 1px solid var(--rule);
}
.project-page .specrow__label {
  font-family: var(--font-data);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  padding-top: 6px;
}
.project-page .specrow__hint {
  margin-top: 6px;
  color: var(--muted);
  font-size: 11.5px;
  letter-spacing: normal;
  text-transform: none;
}
.project-page .chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.project-page .chip {
  padding: 3px 9px;
  background: transparent;
  border: 1px solid var(--rule-strong);
  border-radius: var(--r-chip);
  color: var(--muted);
  font: 500 11px var(--font-data);
  text-transform: capitalize;
  cursor: pointer;
}
.project-page .chip--on {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--on-primary);
}
/* MSA Selection — grouped config sections */
/* MSA Selection (DESIGN.md § Layout): the inputs (scope, requirements,
   criteria, register) are a column on the left; the map plate fills the main
   area on the right. The step is an app shell: the page head and tabs stay at
   the top, the step bar at the foot, the column scrolls on its own and the
   plate fills the height between, so the whole map (its insets, scale bar and
   credit in the bottom corners) is in view from the first paint. The right
   side is where parcel results will go once they ship. Below 900px the page
   scrolls as one and the plate sits above the inputs at a fixed height. */
.project-page {
  --stepnav-h: 0px;
}
.project-page--stepped {
  --stepnav-h: 57px;
}
.project-page .markets {
  display: grid;
  grid-template-columns: var(--markets-left, clamp(460px, 42%, 700px)) minmax(0, 1fr);
  align-items: start;
  border-top: 1px solid var(--rule-strong);
}
.project-page .markets__inputs {
  container: step / inline-size;
  min-width: 0;
}
/* A narrower column: the section gutters tighten from 32px to 24px. */
.project-page .markets__inputs .msection,
.project-page .markets__inputs .mreg__head,
.project-page .markets__inputs .mrow {
  padding-left: 24px;
  padding-right: 24px;
}
.project-page .markets__inputs .mfunnel {
  padding-left: 24px;
  padding-right: 24px;
}
.project-page .mregister .mtools {
  flex-wrap: wrap;
  gap: 8px 16px;
}
.project-page .mregister .msearch {
  width: 100%;
  max-width: 260px;
}
.project-page .markets__plate {
  position: relative;
  display: flex;
  min-height: 0;
}
/* The shell: a column the height of the window. The section takes what the
   head, tabs and step bar leave (at least 320px, so a short window scrolls the
   page rather than crushing the map) and its two panes take its height. */
@media (min-width: 900px) {
  .project-page--shell .project-page__body {
    display: flex;
    flex-direction: column;
    min-height: 100dvh;
  }
  .project-page--shell .project-page__body > * {
    flex: none;
  }
  .project-page--shell .markets {
    flex: 1 0 0;
    min-height: 320px;
    grid-template-rows: minmax(0, 1fr);
    align-items: stretch;
  }
  .project-page--shell .markets__inputs {
    overflow-y: auto;
  }
  /* Requirements: the step's wrapper (the same element MSA Ranking uses, so
     moving between the steps keeps the map) takes what the head and bars
     leave, and the section fills it. */
  .project-page--shell .markets-step:not(.ranking) {
    flex: 1 0 0;
    display: flex;
    flex-direction: column;
    min-height: 320px;
  }
  /* MSA Ranking: the weights and the map take a fixed share of the window and
     the register runs full width beneath them, so the page scrolls to it and
     the head of the table shows from the first paint. */
  .project-page--shell .ranking .markets {
    height: clamp(420px, 62dvh, 760px);
  }
}
@media (max-width: 899px) {
  .project-page .markets {
    display: flex;
    flex-direction: column;
    align-items: stretch;
  }
  .project-page .markets__plate {
    order: -1;
    position: static;
    width: 100%;
    height: min(70dvh, 560px);
    min-height: 0;
    border-bottom: 1px solid var(--rule-strong);
  }
}
/* The plate: a neatline frame around the map, corner coordinates in the
   margin, then a ruled strip with the legend and the metro under the pointer.
   Nothing sits on the map but the inset panels in its corners (DESIGN.md). */
.project-page .mplate {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-width: 0;
  background: var(--canvas);
}
.project-page .mplate__map {
  position: relative;
  flex: 1;
  min-height: 0;
}
.project-page .mplate__map market-map {
  position: absolute;
  inset: 0;
  display: block;
}
.project-page .mplate__coords {
  display: inline-flex;
  flex: none;
  flex-wrap: wrap;
  gap: 0 16px;
}
.project-page .mplate__corner {
  white-space: nowrap;
  font: 400 9px var(--font-data);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
/* The divider between the inputs and the plate (pane_splitter.js): the one
   2px rule in the layout, which is how it reads as movable. Everything else
   on the plate is a 1px hairline. An 11px hit target on the plate's edge. */
.project-page pane-splitter {
  position: absolute;
  top: 0;
  bottom: 0;
  left: -5px;
  z-index: 5;
  width: 11px;
  cursor: col-resize;
  touch-action: none;
}
.project-page pane-splitter::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 5px;
  width: 2px;
  background: var(--rule-strong);
}
.project-page pane-splitter:hover::before,
.project-page pane-splitter.is-dragging::before {
  background: var(--primary);
}
.project-page pane-splitter:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: -2px;
}
@media (max-width: 899px) {
  .project-page pane-splitter {
    display: none;
  }
}
.project-page .mlegend,
.project-page .mplate__readout {
  padding: 10px 24px;
  border-bottom: 1px solid var(--rule-strong);
  font: 400 9.5px var(--font-data);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.project-page .mlegend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 18px;
}
.project-page .mlegend__item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.project-page .mlegend__n {
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.project-page .mlegend__steps {
  display: inline-flex;
  border: 1px solid var(--rule-strong);
}
.project-page .mlegend__step {
  width: 14px;
  height: 10px;
  background: color-mix(in srgb, var(--accent) var(--step), transparent);
}
.project-page .mlegend__swatch {
  box-sizing: border-box;
  width: 16px;
  height: 10px;
}
.project-page .mlegend__swatch--none {
  border: 1.25px solid var(--ink);
}
/* The register's struck mark, in the plate's muted ink. */
.project-page .mlegend__swatch--qualifying {
  border: 1.25px solid var(--accent);
  background: color-mix(in srgb, var(--accent) 40%, transparent);
}
.project-page .mlegend__swatch--out {
  border: 1px solid var(--muted);
  background: repeating-linear-gradient(45deg, var(--muted) 0 1px, transparent 1px 4px);
}
.project-page .mlegend__swatch--target {
  border: 2.5px solid var(--accent);
}
.project-page .mlegend__swatch--scope {
  border: 1px solid var(--rule-strong);
}
/* Power grid: the toggle, then (while on) a line swatch per voltage step. */
.project-page .mlegend__toggle {
  cursor: pointer;
  color: var(--ink);
}
.project-page .mlegend__toggle input {
  margin: 0;
  accent-color: var(--primary);
}
.project-page .mlegend__line {
  width: 16px;
  height: 2px;
}
.project-page .mlegend__line--low {
  background: var(--grid-low);
}
.project-page .mlegend__line--mid {
  background: var(--grid-mid);
}
.project-page .mlegend__line--high {
  background: var(--grid-high);
}
.project-page .mlegend__line--xhigh {
  background: var(--grid-xhigh);
}
.project-page .mlegend__line--unknown {
  background: var(--grid-unknown);
}
/* Substations (inside the Power grid layer): a ring in the high-voltage step,
   outlined in the canvas colour as the map draws them. */
.project-page .mlegend__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--grid-high);
  box-shadow: 0 0 0 1px var(--canvas);
}
/* Substation footprints (from the parcel zoom): the land in the 345 kV step,
   a light fill and a full-strength edge as the map draws it. */
.project-page .mlegend__land {
  box-sizing: border-box;
  width: 12px;
  height: 9px;
  border: 1.5px solid var(--grid-high);
  background: color-mix(in srgb, var(--grid-high) 30%, transparent);
}
/* Solar farms (inside the Power grid layer): a dot and a footprint in the
   solar token, as the map draws them; one colour, a farm has no voltage.
   After the base swatches, so these win. */
.project-page .mlegend__dot--solar {
  background: var(--grid-solar);
}
.project-page .mlegend__land--solar {
  border-color: var(--grid-solar);
  background: color-mix(in srgb, var(--grid-solar) 25%, transparent);
}
/* Data centers (inside the Power grid layer): a dot and a footprint in the
   data center token, as the map draws them; one colour. After the base
   swatches, so these win. */
.project-page .mlegend__dot--datacenter {
  background: var(--grid-datacenter);
}
.project-page .mlegend__land--datacenter {
  border-color: var(--grid-datacenter);
  background: color-mix(in srgb, var(--grid-datacenter) 25%, transparent);
}
/* Shopping centers (their own layer): a dot, a center's land (a light fill) and a
   big-box store's building (a stronger fill), in the retail token, as the map
   draws them. After the base swatches, so these win. */
.project-page .mlegend__dot--retail {
  background: var(--retail);
}
.project-page .mlegend__land--retail {
  border-color: var(--retail);
  background: color-mix(in srgb, var(--retail) 18%, transparent);
}
.project-page .mlegend__land--store {
  border-color: var(--retail);
  background: color-mix(in srgb, var(--retail) 45%, transparent);
}
/* Distribution centers (their own layer): a dot and a footprint in the
   logistics token, as the map draws them. After the base swatches. */
.project-page .mlegend__dot--logistics {
  background: var(--logistics);
}
.project-page .mlegend__land--logistics {
  border-color: var(--logistics);
  background: color-mix(in srgb, var(--logistics) 40%, transparent);
}
/* Water systems and Sewersheds (their own layers, not the Power grid): the
   boundary as the map draws it. A sourced boundary is a solid edge over its
   fill; a modeled one (EPA's estimate) a dashed edge over a lighter fill. */
.project-page .mlegend__area {
  box-sizing: border-box;
  width: 14px;
  height: 9px;
  border: 1.4px solid var(--service-water);
  background: color-mix(in srgb, var(--service-water) 12%, transparent);
}
.project-page .mlegend__area--sewer {
  border-color: var(--service-sewer);
  background: color-mix(in srgb, var(--service-sewer) 12%, transparent);
}
.project-page .mlegend__area--modeled {
  border-style: dashed;
}
.project-page .mlegend__area--water.mlegend__area--modeled {
  background: color-mix(in srgb, var(--service-water) 5%, transparent);
}
.project-page .mlegend__area--sewer.mlegend__area--modeled {
  background: color-mix(in srgb, var(--service-sewer) 5%, transparent);
}
.project-page .mplate__readout {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 16px;
  min-height: 36px;
  line-height: 1.5;
  text-transform: none;
  font-size: 11px;
  letter-spacing: 0.04em;
}
/* One line, cut with an ellipsis (the full words in its tooltip): a readout
   that wrapped would grow the strip, push the map down from under the
   pointer and swap the readout again as it went. */
.project-page .mplate__readout > :first-child {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.project-page .mplate__name {
  color: var(--ink);
  font-weight: 500;
}
.project-page .mplate__hint {
  color: var(--muted);
}
.project-page .msection {
  position: relative;
  padding: 16px 32px;
  border-bottom: 1px solid var(--rule);
}
.project-page .msection__head {
  margin-bottom: 12px;
}
.project-page .msection__title {
  font-weight: 400;
  font-family: var(--font-data);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
}
.project-page .msection__hint {
  margin-top: 3px;
  font: 400 11.5px var(--font-ui);
  color: var(--muted);
}
.project-page .msection__count {
  margin-top: 8px;
  white-space: nowrap;
  font: 400 11px var(--font-data);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
/* Multi-select dropdown (geographic scope) */
.project-page .msel {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
}
.project-page .msel__trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex: 1;
  min-width: 0;
  height: 34px;
  padding: 0 12px;
  background: var(--panel);
  border: 1px solid var(--rule-strong);
  border-radius: var(--r-ctl);
  color: var(--ink);
  font: 400 13px var(--font-ui);
  cursor: pointer;
  text-align: left;
}
.project-page .msel__trigger > span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.project-page .msel__trigger--open {
  border-color: var(--primary);
}
.project-page .msel__placeholder {
  color: var(--muted);
}
.project-page .msel__caret {
  color: var(--muted);
  font-size: 10px;
}
.project-page .scope__n {
  color: var(--accent-text);
  font-weight: 600;
}
.project-page .msel__backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
}
.project-page .msel__panel {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  z-index: 50;
  width: 100%;
  max-height: 400px;
  display: flex;
  flex-direction: column;
  background: var(--panel);
  border: 1px solid var(--rule-strong);
  border-radius: var(--r-box);
  box-shadow: var(--shadow-pop);
}
.project-page .msel__search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--rule);
  color: var(--muted);
}
.project-page .msel__search input {
  flex: 1;
  border: none;
  background: transparent;
  color: var(--ink);
  font: 400 13px var(--font-ui);
  outline: none;
}
.project-page .msel__body {
  overflow-y: auto;
  padding: 4px 0;
}
.project-page .msel__group {
  padding: 3px 0;
}
.project-page .msel__grouphd {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 5px 12px;
  background: none;
  border: none;
  color: var(--muted);
  font-family: var(--font-data);
  font-size: 9.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
}
.project-page .msel__grouphd--on {
  color: var(--primary);
}
.project-page .msel__opts {
  display: flex;
  flex-wrap: wrap;
}
.project-page .msel__opt {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 50%;
  padding: 4px 12px 4px 22px;
  background: none;
  border: none;
  color: var(--ink);
  font: 400 12.5px var(--font-ui);
  cursor: pointer;
  text-align: left;
}
.project-page .msel__opt:hover {
  background: var(--panel-2);
}
.project-page .msel__optcode {
  min-width: 20px;
  font-family: var(--font-data);
  font-size: 10px;
  color: var(--muted);
}
.project-page .msel__opt--on .msel__optcode {
  color: var(--primary);
}
.project-page .msel__optname {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.project-page .cbox {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  border: 1px solid var(--rule-strong);
  border-radius: var(--r-chip);
  color: var(--canvas);
  font-size: 9px;
  line-height: 1;
  flex-shrink: 0;
}
.project-page .cbox--on {
  background: var(--primary);
  border-color: var(--primary);
}
.project-page .msel__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-top: 1px solid var(--rule);
}
.project-page .msel__footmuted {
  font: 400 11px var(--font-ui);
  color: var(--muted);
}
.project-page .msel__clear {
  padding: 0;
  background: none;
  border: none;
  color: var(--muted);
  font: 500 11px var(--font-ui);
  cursor: pointer;
}
.project-page .msel__clear:hover {
  color: var(--primary);
}
.project-page .msel__done {
  padding: 5px 14px;
  background: var(--primary);
  border: 1px solid var(--primary);
  border-radius: var(--r-ctl);
  color: var(--on-primary);
  font: 500 12px var(--font-ui);
  cursor: pointer;
}
.project-page .msel__empty {
  padding: 16px 12px;
  color: var(--muted);
  font: 400 12.5px var(--font-ui);
}
.project-page .critadd {
  display: flex;
  gap: 8px;
}
.project-page .critadd__in {
  flex: 1;
  height: 34px;
  padding: 0 12px;
  background: var(--panel);
  border: 1px solid var(--rule-strong);
  border-radius: var(--r-ctl);
  color: var(--ink);
  font: 400 13px var(--font-ui);
  outline: none;
}
.project-page .critadd__in:focus {
  border-color: var(--primary);
}
.project-page .critadd__btn {
  padding: 0 14px;
  background: var(--primary);
  border: 1px solid var(--primary);
  border-radius: var(--r-ctl);
  color: var(--on-primary);
  font: 500 12.5px var(--font-ui);
  cursor: pointer;
}
.project-page .critadd__btn:disabled {
  background: transparent;
  border-color: var(--rule-strong);
  color: var(--muted);
  cursor: default;
}
.project-page .critadd__count {
  margin: 6px 0 0;
  color: var(--muted);
  font: 400 12px var(--font-ui);
}
.project-page .critlist {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}
.project-page .critcard {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--rule);
  border-left: 2px solid var(--rule-strong);
  border-radius: var(--r-box);
  background: var(--panel);
}
.project-page .critcard--approved {
  border-left-color: var(--primary);
}
.project-page .critcard--failed {
  border-left-color: var(--error);
}
.project-page .critcard__head {
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.project-page .critcard__label {
  font: 500 13.5px var(--font-ui);
  color: var(--ink);
}
.project-page .critcard__status {
  font-family: var(--font-data);
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.project-page .critcard__sum {
  margin-top: 4px;
  font: 400 12px var(--font-ui);
  color: var(--muted);
}
.project-page .critcard__err {
  margin-top: 4px;
  font: 400 12px var(--font-data);
  color: var(--error);
}
/* The executable plan, ruled off from the model's prose above it. Mono because
   it is data — datum names, weights, and the threshold. */
.project-page .critcard__plan {
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid var(--rule);
}
.project-page .critcard__formula {
  font-family: var(--font-data);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  overflow-wrap: anywhere;
}
.project-page .critcard__cut {
  margin-top: 3px;
  font-family: var(--font-data);
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}
.project-page .critcard__pass {
  margin-top: 5px;
  font-family: var(--font-data);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-text);
}

/* The screening control: threshold on the left, the gate switch on the right.
   Hairline rule above it because it is a different act from reading the plan —
   above the rule the AI proposes, below it the user decides. */
.project-page .critscreen {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--rule);
}
.project-page .critscreen__cut {
  display: flex;
  align-items: center;
  gap: 4px;
}
.project-page .critscreen__cmp,
.project-page .critscreen__val {
  font-family: var(--font-data);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  background: var(--canvas);
  border: 1px solid var(--rule-strong);
  border-radius: var(--r-ctl);
  padding: 3px 5px;
}
.project-page .critscreen__cmp {
  --select-inset: 5px;
  --select-chevron: 10px;
}
.project-page .critscreen__val {
  width: 92px;
}
.project-page .critscreen__cmp:disabled,
.project-page .critscreen__val:disabled {
  color: var(--muted);
}
.project-page .critscreen__val:focus,
.project-page .critscreen__cmp:focus {
  outline: none;
  border-color: var(--primary);
}
.project-page .critscreen__tog {
  display: flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-data);
  font-size: 9.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink);
  cursor: pointer;
}
.project-page .critscreen__tog input {
  accent-color: var(--primary);
  cursor: pointer;
}
/* Unarmed: the switch is present so the affordance is discoverable, but muted
   so it does not read as an available action. */
.project-page .critscreen__tog--off {
  color: var(--muted);
  cursor: default;
}
.project-page .critscreen__tog--off input {
  cursor: default;
}

/* MSA Ranking's weights: one ruled row per Requirement measure and scoring
   criterion, in two labelled groups, the slider in
   --primary (it is what you act on), the share it gives as a mono figure over
   a quiet --muted bar. Not the accent: a weight is a choice, not data. The
   thumb is square, like every control (no circles but the monument dot). */
.project-page .wts {
  border-top: 1px solid var(--rule);
}
.project-page .wts__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(96px, 1fr) 40px 76px;
  align-items: center;
  gap: 14px;
  padding: 8px 0;
  border-bottom: 1px solid var(--rule);
}
.project-page .wts__name {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.project-page .wts__label {
  font: 500 13px var(--font-ui);
  color: var(--ink);
  overflow-wrap: anywhere;
}
.project-page .wts__dir {
  font-family: var(--font-data);
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
/* A measure on two sliders counts twice: said on both rows, in the warning
   colour (a fault in the setup, not data and not an action). */
.project-page .wts__also {
  font: 400 11px var(--font-ui);
  color: var(--warning);
}
.project-page .wts__w,
.project-page .wts__pct {
  font-family: var(--font-data);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  text-align: right;
  color: var(--ink);
}
.project-page .wts__w {
  color: var(--muted);
}
.project-page .wts__share {
  display: flex;
  align-items: center;
  gap: 6px;
}
.project-page .wts__bar {
  flex: 1;
  height: 4px;
  background: var(--panel-2);
  border-radius: var(--r-data);
  overflow: hidden;
}
.project-page .wts__fill {
  display: block;
  height: 100%;
  background: var(--muted);
}
.project-page .wts__pct {
  min-width: 30px;
}
.project-page .wts__row--out .wts__label,
.project-page .wts__row--out .wts__pct {
  color: var(--muted);
}
.project-page .wts__slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 18px;
  margin: 0;
  background: transparent;
  cursor: pointer;
}
.project-page .wts__slider::-webkit-slider-runnable-track {
  height: 2px;
  background: var(--rule-strong);
  border-radius: var(--r-data);
}
.project-page .wts__slider::-moz-range-track {
  height: 2px;
  background: var(--rule-strong);
  border-radius: var(--r-data);
}
.project-page .wts__slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 10px;
  height: 16px;
  margin-top: -7px;
  background: var(--primary);
  border: 0;
  border-radius: var(--r-data);
  transition: background var(--t-ui);
}
.project-page .wts__slider::-moz-range-thumb {
  width: 10px;
  height: 16px;
  background: var(--primary);
  border: 0;
  border-radius: var(--r-data);
  transition: background var(--t-ui);
}
.project-page .wts__slider:hover::-webkit-slider-thumb {
  background: var(--primary-hover);
}
.project-page .wts__slider:hover::-moz-range-thumb {
  background: var(--primary-hover);
}
.project-page .wts__slider:focus {
  outline: none;
}
.project-page .wts__slider:focus-visible::-webkit-slider-thumb {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}
.project-page .wts__slider:focus-visible::-moz-range-thumb {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}
.project-page .wts__group + .wts__group {
  margin-top: 16px;
}
.project-page .wts__ghead {
  margin-bottom: 6px;
  font-family: var(--font-data);
  font-size: 9.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.project-page .wts__reset {
  margin-top: 10px;
}
.project-page .wts__empty {
  margin-bottom: 10px;
  font: 400 12px var(--font-ui);
  color: var(--muted);
}
/* A narrow column: the name takes its own line above the slider. */
@container step (max-width: 440px) {
  .project-page .wts__row {
    grid-template-columns: minmax(0, 1fr) 40px 76px;
    row-gap: 6px;
  }
  .project-page .wts__name {
    grid-column: 1 / -1;
  }
}
@media (prefers-reduced-motion: reduce) {
  .project-page .wts__slider::-webkit-slider-thumb {
    transition: none;
  }
  .project-page .wts__slider::-moz-range-thumb {
    transition: none;
  }
}

/* A parcel search's target markets (the Markets step): ruled rows, the metro's
   name and its remove button. */
.project-page .mtargets {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--rule);
}
.project-page .mtargets__row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 0;
  border-bottom: 1px solid var(--rule);
}
.project-page .mtargets__name {
  flex: 1;
  min-width: 0;
  font: 500 13px var(--font-ui);
  color: var(--ink);
}
.project-page .mtargets__empty {
  font: 400 12.5px var(--font-ui);
  color: var(--muted);
}

/* Non-metro targets carried over from the earlier region picker. Amber rule:
   needs attention, but it is not an error. */
.project-page .mlegacy {
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px solid var(--rule);
  border-left: 2px solid var(--warning);
  border-radius: var(--r-box);
  background: var(--panel);
}
.project-page .mlegacy__head {
  font-family: var(--font-data);
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--warning);
}
.project-page .mlegacy__hint {
  margin-top: 3px;
  font: 400 12px var(--font-ui);
  color: var(--muted);
}
.project-page .mlegacy__list {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.project-page .mlegacy__row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.project-page .mlegacy__type {
  min-width: 46px;
  font-family: var(--font-data);
  font-size: 9px;
  letter-spacing: 0.1em;
  color: var(--muted);
}
.project-page .mlegacy__name {
  flex: 1;
  font: 400 12.5px var(--font-ui);
  color: var(--ink);
}
.project-page .critcard__acts {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.project-page .critbtn {
  padding: 4px 8px;
  background: transparent;
  border: 1px solid var(--rule-strong);
  border-radius: var(--r-ctl);
  color: var(--muted);
  font: 500 11px var(--font-data);
  cursor: pointer;
}
.project-page .critbtn--ok {
  border-color: color-mix(in srgb, var(--primary) 55%, var(--rule));
  color: var(--primary);
}
.project-page .critbtn:hover {
  border-color: var(--primary);
  color: var(--primary);
}
.project-page .gates {
  display: flex;
  flex-wrap: wrap;
  gap: 20px 24px;
}
.project-page .gate {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.project-page .gate__label {
  font-family: var(--font-data);
  font-size: 9.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.project-page .gate__select,
.project-page .gate__num {
  height: 32px;
  display: flex;
  align-items: center;
  border: 1px solid var(--rule-strong);
  border-radius: var(--r-ctl);
  background: var(--panel);
}
.project-page .gate__select {
  --select-inset: 8px;
  padding: 0 8px;
  color: var(--ink);
  font: 500 12.5px var(--font-data);
  cursor: pointer;
}
.project-page .gate__num {
  width: 112px;
  padding: 0 10px;
  gap: 6px;
}
/* The number field is drawn on its wrapper: the field stroke (DESIGN.md § Color). */
.project-page .gate__num {
  border-color: var(--field-stroke);
}
.project-page .gate__num input {
  border: none;
  background: transparent;
  color: var(--ink);
  font: 500 12.5px var(--font-data);
  font-variant-numeric: tabular-nums;
  width: 100%;
  outline: none;
}
.project-page .gate__u {
  color: var(--muted);
  font: 400 12px var(--font-data);
}
/* The MSA Requirements share the column's width: each field grows, and they
   wrap to a new row only when one would drop below its 120px. */
.project-page .gates--markets {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
}
.project-page .gates--markets .gate {
  min-width: 0;
}
.project-page .gates--markets .gate__num,
.project-page .gates--markets .gate__select {
  width: auto;
  min-width: 0;
}
.project-page .gate__select:focus,
.project-page .gate__num:focus-within {
  outline: none;
  border-color: var(--primary);
}

/* MSA Ranking's register, full width under the weights and the map: one
   --rule-strong hairline divides it from them, the same rule that closes the
   step's head above. */
.project-page .mregister {
  border-top: 1px solid var(--rule-strong);
}

/* MSA Selection — screening register */
.project-page .mtools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 32px;
}
.project-page .msearch {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 32px;
  width: 260px;
  padding: 0 12px;
  background: var(--panel);
  /* A field drawn on its wrapper: the field stroke (DESIGN.md § Color). */
  border: 1px solid var(--field-stroke);
  border-radius: var(--r-ctl);
  color: var(--muted);
}
.project-page .msearch:focus-within {
  border-color: var(--primary);
}
.project-page .msearch input {
  border: none;
  background: transparent;
  color: var(--ink);
  font: 400 13px var(--font-ui);
  width: 100%;
  outline: none;
}
.project-page .mtools__count {
  font: 400 11px var(--font-data);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.project-page .mtools__sel {
  color: var(--accent-text);
}

/* Funnel statistics sit on the trailing edge when the step's column has room
   (a container query: the Markets inputs are a column beside the plate, so the
   viewport width says nothing). Otherwise they stay in flow beneath their
   controls/cards. */
@container step (min-width: 640px) {
  .project-page .msection--counted .msection__head {
    padding-right: 160px;
  }
  .project-page .msection--counted > .msection__count {
    position: absolute;
    top: 16px;
    right: 32px;
    margin-top: 0;
    text-align: right;
  }
  .project-page .critcard__main {
    flex: 1;
    min-width: 0;
  }
  .project-page .critcard__pass {
    text-align: right;
  }
}
.project-page .mreg {
  border-top: 1px solid var(--rule-strong);
  overflow-x: auto;
}
/* --mreg-crit holds one track per criterion column, set on .mreg by the Elm
   view; unset, the empty fallback leaves the fixed columns alone. Rows grow to
   their min-content width so, once criteria outrun the page, every row scrolls
   together and keeps its rule and hover across the full width. */
.project-page .mreg__head,
.project-page .mrow {
  display: grid;
  grid-template-columns: minmax(170px, 1fr) var(--mreg-rank,) 96px 62px 84px 70px 80px 84px 66px 66px 50px var(--mreg-crit,) 84px;
  gap: 14px;
  align-items: center;
  min-width: min-content;
}
.project-page .mreg__head {
  padding: 0 32px;
  border-bottom: 1px solid var(--rule);
}
.project-page .mh {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 10px 0;
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-data);
  font-size: 9.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.project-page .mh--r {
  justify-content: flex-end;
}
.project-page .mh--static {
  cursor: default;
}
.project-page .mh--on {
  color: var(--ink);
}
.project-page .mh__ar {
  font-size: 9px;
  color: var(--primary);
}
.project-page .mrow {
  padding: 11px 32px;
  border-bottom: 1px solid var(--rule);
}
.project-page .mrow:hover {
  background: var(--panel);
}
.project-page .mrow--sel {
  background: color-mix(in srgb, var(--accent) 6%, transparent);
}
.project-page .mname {
  font: 500 13px var(--font-ui);
  color: var(--ink);
}
.project-page .mrow .num {
  text-align: right;
  font-size: 12.5px;
}
.project-page .mrow .rtw {
  text-align: right;
  font-family: var(--font-data);
  font-size: 12.5px;
  color: var(--ink);
}
.project-page .mact {
  text-align: right;
}
.project-page .madd {
  padding: 4px 10px;
  background: transparent;
  border: 1px solid var(--rule-strong);
  border-radius: var(--r-ctl);
  color: var(--muted);
  font: 500 11px var(--font-data);
  letter-spacing: 0.04em;
  cursor: pointer;
}
.project-page .madd:hover {
  border-color: var(--primary);
  color: var(--primary);
}
.project-page .madd--on {
  background: var(--accent-text);
  border-color: var(--accent-text);
  color: var(--canvas);
}
.project-page .madd:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 1px;
}
/* Screening register: eliminated rows and criterion columns (DESIGN.md
   "Register"). Eliminated = muted text + a 45° gutter hatch (the struck mark),
   never opacity or a fill. Selection outranks elimination, so .madd--on and
   .mrow--sel are deliberately left alone on eliminated rows. Longhands, not
   the shorthand, so the hover/selected background-color still applies
   underneath the hatch. */
.project-page .mrow.mrow--out {
  background-image: repeating-linear-gradient(45deg, var(--rule-strong) 0 2px, transparent 2px 5px);
  background-size: 8px 100%;
  background-position: 20px 0;
  background-repeat: no-repeat;
}
.project-page .mrow--out .mname,
.project-page .mrow--out .num,
.project-page .mrow--out .rtw {
  color: var(--muted);
}
/* With the eliminated metros shown and the register in its ranking order, they
   follow the survivors under ELIMINATED (n), centred on a --rule-strong hairline,
   as in the report's ranking. Sticky, so the label stays in view when the
   register scrolls sideways. */
.project-page .mreg__divider {
  position: sticky;
  left: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 32px;
  border-bottom: 1px solid var(--rule);
  font: 400 9.5px var(--font-data);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.project-page .mreg__divider::before,
.project-page .mreg__divider::after {
  content: "";
  flex: 1;
  border-top: 1px solid var(--rule-strong);
}
.project-page .mname__out {
  display: block;
  margin-top: 2px;
  font: 400 10px/1.4 var(--font-data);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  overflow-wrap: anywhere;
}
/* Ranking (DESIGN.md "Register"): rank and score sit beside the name, in the
   same mono as every other value. Rank is the strong figure; an eliminated
   metro shows a dash for rank (it was scored, never placed) and keeps its
   composite, muted like the rest of its row. --mreg-rank carries the two
   tracks only while a criterion scores. */
.project-page .mrow .mrank {
  font-weight: 500;
  color: var(--ink);
}
.project-page .mrow--out .mrank {
  color: var(--muted);
}
/* The funnel: ruled stamps, left to right, in the provenance-stamp voice. */
.project-page .mfunnel {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 0;
  padding: 16px 32px;
}
.project-page .mfunnel__stage {
  padding: 3px 8px;
  border: 1px solid var(--rule-strong);
  margin-left: -1px;
  font: 400 9.5px var(--font-data);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.project-page .mfunnel__n {
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
/* Snapshots: the list of them, in the Reports step's sidebar under the
   deliverables. Same stamps and hairlines as the register. */
.project-page .snaps__save:disabled {
  border-color: var(--rule-strong);
  color: var(--muted);
  cursor: default;
}
/* Save snapshot: an optional label, the button, why it is unavailable and how
   the last attempt went. A failure uses the criterion card's error style. */
.project-page .snapsave {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
  max-width: 360px;
}
.project-page .snapsave__row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.project-page .snapsave__label {
  flex: 1;
  min-width: 0;
  height: 32px;
  padding: 0 10px;
  background: var(--panel);
  border: 1px solid var(--rule-strong);
  border-radius: var(--r-ctl);
  color: var(--ink);
  font: 400 12.5px var(--font-ui);
}
.project-page .snapsave__why {
  margin: 0;
  font: 400 12px/1.45 var(--font-ui);
  color: var(--muted);
}
.project-page .snaps__item--new {
  background: var(--panel);
}
.project-page .snaps__new {
  padding: 0 5px;
  border: 1px solid var(--rule-strong);
  border-radius: var(--r-data);
  font: 400 9px var(--font-data);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink);
}
.project-page .snaps__list {
  align-self: stretch;
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--rule);
}
.project-page .snaps__empty {
  margin: 0;
  font: 400 12px/1.45 var(--font-ui);
  color: var(--muted);
}
.project-page .snaps__item {
  border-bottom: 1px solid var(--rule);
}
/* The row is one button, like a deliverable's link: the whole row is the
   target, a --panel wash on hover, the chosen row tinted --panel-2. */
.project-page .snaps__pick {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 12px;
  width: 100%;
  padding: 8px 16px;
  background: none;
  border: none;
  text-align: left;
  font: 400 11px var(--font-data);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  cursor: pointer;
}
.project-page .snaps__pick:hover {
  background: var(--panel);
}
.project-page .snaps__pick:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: -2px;
}
.project-page .snaps__item--on .snaps__pick {
  background: var(--panel-2);
  color: var(--ink);
}
.project-page .snaps__when {
  color: var(--ink);
}
.project-page .snaps__what {
  flex: 1 1 120px;
  min-width: 0;
}
.project-page .snaps__counts {
  white-space: nowrap;
}
/* Criterion columns: the user's label, truncated; full label + unit in title. */
.project-page .mh--crit {
  min-width: 0;
}
.project-page .mh__lbl {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.project-page .mh--crit .mh__ar {
  flex-shrink: 0;
}
/* Proposed, not yet screening: dashed, like a proposed line on a plat. Drawn
   as a background so it neither shifts the head's baseline nor is clipped by
   the ellipsis overflow. */
.project-page .mh--prop .mh__lbl {
  background: linear-gradient(to right, var(--muted) 50%, transparent 50%) left bottom / 4px 1px repeat-x;
}
/* Show/Hide eliminated: a hairline-boxed stamp; the hatch swatch is the
   legend key for the gutter hatch on eliminated rows. */
.project-page .mtools__out {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: 12px;
  padding: 4px 8px;
  vertical-align: middle;
  background: transparent;
  border: 1px solid var(--rule-strong);
  border-radius: var(--r-ctl);
  color: var(--muted);
  font: 400 10px var(--font-data);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
}
.project-page .mtools__out::before {
  content: "";
  width: 8px;
  height: 8px;
  background: repeating-linear-gradient(45deg, var(--rule-strong) 0 2px, transparent 2px 5px);
}
.project-page .mtools__out--on {
  background: var(--panel);
  color: var(--ink);
}
.project-page .mtools__out:hover {
  border-color: var(--primary);
  color: var(--primary);
}
.project-page .mtools__out:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 1px;
}
.project-page .range {
  display: flex;
  align-items: center;
  gap: 8px;
}
.project-page .range__num {
  width: 110px;
  height: 34px;
  padding: 0 10px;
  background: var(--panel);
  border: 1px solid var(--rule-strong);
  border-radius: var(--r-ctl);
  color: var(--ink);
  font: 500 13px var(--font-data);
}
.project-page .range__num:focus {
  outline: none;
  border-color: var(--primary);
}
.project-page .range__dash,
.project-page .range__u {
  color: var(--muted);
  font: 400 12px var(--font-data);
}

/* Sites — gates, then the plate: the map framed on the left, the ledger of
   eligible parcels fixed on the right (DESIGN.md § Layout). */
/* A parcel search's Ranking (issue 402): MSA Ranking's shell, the weights in
   the inputs column and the parcels that pass in the pane beside them, which
   scrolls on its own. */
.project-page .sites__pane {
  flex-direction: column;
}
.project-page .sites__results {
  container: step / inline-size;
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
  min-height: 0;
  overflow: auto;
}
.project-page .sites__plate {
  flex: 1;
  min-height: 0;
}
.project-page .sites__plate .plate {
  height: 100%;
}
/* Narrow: the page scrolls as one, the parcels under the weights, uncapped
   (the metro plate's fixed height and first place are a map's). */
@media (max-width: 899px) {
  .project-page .sites__pane {
    order: 0;
    height: auto;
  }
}
/* A parcel search's Ranking as a list (issue 413): the List / Map switch in
   the bar, then the metro register's grid and type, a row per parcel that
   opens to its facts and a small map. */
.project-page .sviews {
  display: inline-flex;
  border: 1px solid var(--rule-strong);
  border-radius: var(--r-ctl);
  overflow: hidden;
}
.project-page .sviews__opt {
  padding: 4px 12px;
  background: transparent;
  border: none;
  font: 500 12px var(--font-ui);
  color: var(--muted);
  cursor: pointer;
}
.project-page .sviews__opt + .sviews__opt {
  border-left: 1px solid var(--rule-strong);
}
.project-page .sviews__opt:hover:not(.sviews__opt--on) {
  color: var(--primary);
}
.project-page .sviews__opt--on {
  background: var(--panel-2);
  color: var(--ink);
}
.project-page .sviews__opt:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: -2px;
}
.project-page .plist {
  overflow-x: auto;
}
.project-page .plist--busy {
  opacity: 0.55;
  transition: opacity 150ms ease-out;
}
/* The columns are set on each row from the page (siteColumnsTemplate): a
   score, nearest line and nearest substation column join while they apply. */
.project-page .plist__head,
.project-page .plist__row {
  display: grid;
  grid-template-columns: 44px minmax(220px, 1fr) 150px 104px 72px 84px 110px 96px;
  gap: 14px;
  align-items: center;
  min-width: min-content;
}
.project-page .plist__table {
  min-width: min-content;
}
.project-page .plist__head {
  padding: 0 32px;
  border-bottom: 1px solid var(--rule);
}
.project-page .plist__h {
  padding: 10px 0;
  font-family: var(--font-data);
  font-size: 9.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.project-page .plist__h--r {
  text-align: right;
}
.project-page .plist__h--on {
  color: var(--ink);
}
.project-page .plist__h .mh__ar {
  margin-left: 4px;
}
.project-page .plist__rows {
  margin: 0;
  padding: 0;
  list-style: none;
}
.project-page .plist__item {
  border-bottom: 1px solid var(--rule);
}
.project-page .plist__row {
  cursor: pointer;
  padding: 11px 32px;
  font: 400 13px var(--font-ui);
  color: var(--ink);
}
.project-page .plist__item:hover > .plist__row,
.project-page .plist__item--open > .plist__row {
  background: var(--panel);
}
.project-page .plist__row .num {
  font-family: var(--font-data);
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.project-page .plist__namecell {
  min-width: 0;
}
.project-page .plist__rank {
  color: var(--muted);
}
.project-page .plist__name {
  display: flex;
  align-items: baseline;
  gap: 6px;
  min-width: 0;
  padding: 0;
  background: none;
  border: none;
  font: 500 13px var(--font-ui);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}
.project-page .plist__name:hover {
  color: var(--primary);
}
.project-page .plist__name:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}
.project-page .plist__caret {
  flex: none;
  width: 10px;
  font-size: 10px;
  color: var(--muted);
}
.project-page .plist__apn {
  font: 400 11px var(--font-data);
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.project-page .plist__dev {
  font-size: 12px;
  color: var(--muted);
}
.project-page .plist__act {
  display: flex;
  justify-content: flex-end;
}
.project-page .plist__detail {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(280px, 420px);
  gap: 24px;
  /* Under the name: the rank column, its gap and the row's gutter. */
  padding: 8px 32px 16px 90px;
  background: var(--panel);
}
.project-page .plist__info {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}
.project-page .plist__facts {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 8px 24px;
  margin: 0;
}
.project-page .plist__fact dt {
  font-family: var(--font-data);
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.project-page .plist__fact dd {
  margin: 2px 0 0;
  font: 400 13px var(--font-ui);
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.project-page .plist__map {
  display: flex;
  height: 240px;
  border: 1px solid var(--rule-strong);
  border-radius: var(--r-box);
  overflow: hidden;
}
.project-page .plist__pager {
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
  padding: 12px 32px;
}
.project-page .plist__range {
  margin-right: auto;
  font: 400 11px var(--font-data);
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
@media (max-width: 900px) {
  .project-page .plist__detail {
    grid-template-columns: 1fr;
    padding-left: 32px;
  }
}

/* Over a parcel search's Ranking: what the parcels passed, how many, and the
   way back to change it. */
.project-page .sites__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  padding: 10px 24px;
  border-bottom: 1px solid var(--rule);
}
.project-page .sites__bar .msection__count {
  margin-top: 0;
}
/* The Criteria on a parcel search's Requirements (issue 402): one ruled card
   per criterion, its name over the direction, its settings as gates, then
   the add list. */
.project-page .scrits {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--rule);
}
.project-page .scrit {
  padding: 10px 0;
  border-bottom: 1px solid var(--rule);
}
.project-page .scrit__head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 6px;
}
.project-page .scrit__label {
  font: 500 13px var(--font-ui);
  color: var(--ink);
}
.project-page .scrit__remove {
  margin-left: auto;
}
.project-page .scrit__withheld {
  color: var(--warning);
}
.project-page .scrits__add {
  margin-top: 10px;
}
.project-page .sites__criteria {
  flex: 1;
  min-width: 0;
  font: 400 12.5px var(--font-ui);
  color: var(--muted);
}
.project-page .gates--site {
  align-items: flex-start;
}
.project-page .gate__note {
  align-self: center;
  font: 400 10px var(--font-data);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.project-page .plate {
  display: flex;
  height: calc(100vh - 176px);
  min-height: 520px;
  border-bottom: 1px solid var(--rule-strong);
}
.project-page .plate__map {
  position: relative;
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}
/* The map under the Power grid strip (the MSA plate's legend and readout);
   the hint, the fit control and the veil sit on the map, not on the strip. */
.project-page .plate__map .mplate__readout[hidden] {
  display: none;
}
.project-page .plate__canvas {
  position: relative;
  display: flex;
  flex: 1;
  min-height: 0;
}
/* Veil over the map while a fresh search runs: opaque, so the plate and the
   ledger appear together instead of the map re-framing in front of a loader. */
.project-page .plate__veil {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--canvas);
}
.project-page .plate__veil[hidden] {
  display: none;
}
.project-page .plate__fit {
  position: absolute;
  top: 96px;
  left: 10px;
  z-index: 2;
  height: 28px;
  padding: 0 10px;
  background: var(--panel);
  border: 1px solid var(--rule-strong);
  border-radius: var(--r-ctl);
  color: var(--muted);
  font: 500 10px var(--font-data);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
}
.project-page .plate__fit:hover {
  border-color: var(--primary);
  color: var(--primary);
}
.project-page .srow__dev {
  white-space: nowrap;
  font: 400 11px var(--font-data);
  color: var(--muted);
}
.project-page .sledger {
  display: flex;
  flex-direction: column;
  flex: none;
  width: 340px;
  background: var(--panel);
  border-left: 1px solid var(--rule-strong);
  overflow-y: auto;
}
/* The next page in flight: keep the rows, just dim them. */
.project-page .sledger--busy .sledger__list,
.project-page .sledger--busy .sledger__head {
  opacity: 0.55;
  transition: opacity 150ms ease-out;
}
.project-page .sledger__head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--rule-strong);
  font: 400 11px var(--font-data);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.project-page .sledger__count {
  color: var(--ink);
}
.project-page .sledger__warn {
  padding: 10px 16px;
  border-bottom: 1px solid var(--rule);
  font: 400 11.5px var(--font-ui);
  color: var(--warning);
}
.project-page .sledger__more {
  padding: 8px 16px;
  border-bottom: 1px solid var(--rule);
  font: 400 11.5px var(--font-ui);
  color: var(--muted);
}
.project-page .sledger__note {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 40px 16px;
  text-align: center;
  font: 400 13px var(--font-ui);
  color: var(--muted);
}
.project-page .sledger__note--err {
  color: var(--error);
}
.project-page .sledger__list {
  flex: 1;
}
.project-page .srow {
  padding: 8px 16px;
  border-bottom: 1px solid var(--rule);
  cursor: pointer;
}
.project-page .srow:hover {
  background: var(--panel-2);
}
.project-page .srow--on {
  background: var(--panel-2);
  box-shadow: inset 2px 0 0 var(--accent);
}
.project-page .srow__top,
.project-page .srow__meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.project-page .srow__meta {
  margin-top: 3px;
}
.project-page .srow__title {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font: 500 13px var(--font-ui);
  color: var(--ink);
}
/* DESIGN.md § Layout: the recorder's stamp on every sourced datum. */
.project-page .stamp {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font: 400 9px var(--font-data);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.project-page .srow .stamp {
  margin-top: 4px;
}
.project-page .srow__meta .num {
  flex: none;
  white-space: nowrap;
}
.project-page .srow__facts {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
}
.project-page .srow__add,
.project-page .sledger__page {
  padding: 3px 8px;
  background: transparent;
  border: 1px solid var(--rule-strong);
  border-radius: var(--r-ctl);
  color: var(--muted);
  font: 500 11px var(--font-data);
  cursor: pointer;
}
.project-page .srow__add:hover,
.project-page .sledger__page:hover:not(:disabled) {
  border-color: var(--primary);
  color: var(--primary);
}
.project-page .sledger__page:disabled {
  color: var(--rule-strong);
  cursor: default;
}
.project-page .srow__saved {
  flex: none;
  white-space: nowrap;
  font: 500 11px var(--font-data);
  color: var(--accent-text);
}
.project-page .srow__top .apn {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.project-page .sledger__pager {
  display: flex;
  justify-content: space-between;
  padding: 10px 16px;
  border-top: 1px solid var(--rule-strong);
}

/* Shortlist — candidate register */
.project-page .toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 32px;
}
.project-page .toolbar__find {
  padding: 0;
  background: none;
  border: none;
  color: var(--primary);
  text-decoration: none;
  font: 500 13px var(--font-ui);
  cursor: pointer;
}
.project-page .toolbar__count {
  font: 400 11px var(--font-data);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.project-page .shortlist-empty {
  padding: 24px 32px;
  color: var(--muted);
  font: 400 14px var(--font-ui);
}
.project-page .creg {
  border-top: 1px solid var(--rule-strong);
}
.project-page .creg__head,
.project-page .crow {
  display: grid;
  grid-template-columns: 1fr 130px 90px 110px 150px 30px;
  gap: 20px;
  align-items: center;
}
.project-page .creg__head {
  padding: 9px 32px;
  border-bottom: 1px solid var(--rule);
}
.project-page .creg__head span {
  font-family: var(--font-data);
  font-size: 9.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.project-page .crow {
  position: relative;
  padding: 14px 32px;
  border-bottom: 1px solid var(--rule);
}
.project-page .crow:hover {
  background: var(--panel);
}
.project-page .crow:hover::after {
  content: "";
  position: absolute;
  inset: 0 0 0 auto;
  width: 2px;
  background: var(--primary);
}
.project-page .apn {
  font: 500 13px var(--font-data);
  color: var(--ink);
}
.project-page .num {
  font-family: var(--font-data);
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}
.project-page .tag {
  padding: 2px 5px;
  border: 1px solid var(--rule);
  border-radius: var(--r-chip);
  background: var(--panel-2);
  font: 400 9px var(--font-data);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
/* A ledger row's nearest reported line: ink facts, muted note, never orange. */
.project-page .srow__power {
  margin-top: 3px;
  font: 400 11px var(--font-ui);
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.project-page .srow__power--none {
  color: var(--muted);
}
.project-page .srow__power .stamp {
  margin-top: 2px;
}
.project-page .tag--inferred {
  margin-left: 6px;
  color: var(--muted);
  border-style: dashed;
}
.project-page .tag--ind {
  color: var(--accent-text);
  border-color: color-mix(in srgb, var(--accent) 40%, var(--rule));
}
.project-page .situs {
  min-width: 0;
}
.project-page .situs div:first-child {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font: 500 13px var(--font-ui);
  color: var(--ink);
}
.project-page .situs .stamp {
  font-family: var(--font-data);
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.project-page .stage {
  --select-inset: 6px;
  --select-chevron: 10px;
  font: 500 11px var(--font-data);
  text-transform: capitalize;
  padding: 4px 8px;
  border-radius: var(--r-chip);
  border: 1px solid var(--rule-strong);
  background: var(--panel);
  color: var(--ink);
  cursor: pointer;
}
.project-page .stage--shortlisted {
  border-color: color-mix(in srgb, var(--accent) 55%, var(--rule));
  color: var(--accent-text);
}
.project-page .stage--contacted {
  --select-chevron-image: var(--chevron-on-fill);
  background: var(--accent-text);
  border-color: var(--accent-text);
  color: var(--canvas);
}
.project-page .stage--passed {
  color: var(--muted);
}
.project-page .crow__x {
  justify-self: end;
  padding: 2px 4px;
  background: none;
  border: none;
  border-radius: var(--r-ctl);
  color: var(--rule-strong);
  font: 400 16px var(--font-data);
  line-height: 1;
  cursor: pointer;
}
.project-page .crow:hover .crow__x {
  color: var(--primary);
}
.project-page .crow__x:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 1px;
  color: var(--primary);
}

/* Coverage map: the legend isolate and the state ledger are real buttons, so
   they carry hover and focus states that Elm's inline styles can't express. */
.coverage-legend {
  display: flex;
  align-items: center;
  gap: var(--space-sm, 8px);
  padding: var(--space-2xs, 2px) var(--space-xs, 4px);
  border: 1px solid transparent;
  border-radius: var(--r-box);
  background: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.coverage-legend:hover {
  border-color: var(--rule);
}

.coverage-ledger-row {
  display: flex;
  align-items: center;
  gap: var(--space-sm, 8px);
  width: 100%;
  padding: var(--space-xs, 4px) var(--space-md, 16px);
  border: none;
  border-bottom: 1px solid var(--rule);
  background: none;
  color: inherit;
  text-align: left;
  font-family: var(--font-data);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
}

.coverage-ledger-row:hover:not(:disabled) {
  background: var(--panel);
}

/* A state whose TIGER polygon never landed has no extent to frame. */
.coverage-ledger-row:disabled {
  cursor: default;
  opacity: 0.55;
}

.coverage-legend:focus-visible,
.coverage-ledger-row:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: -2px;
}

/* Reports (DESIGN.md § Reports). The report is a run of 1280x720 (16:9) slides
   generated from one stored snapshot. On screen a slide follows the viewer's
   theme; `Preview as printed` (data-slides="print") and a share link show it
   in Plat Room (the `.report-slide` token set above), as the PDF and the deck
   print it whatever the theme. */
.project-page .reports {
  border-top: 1px solid var(--rule-strong);
  padding: 0;
}
/* The Reports step runs edge to edge, like MSA Selection: the sidebar is flush
   with the page edge and the panel carries the page gutters itself. States with
   no sidebar (loading, no snapshot) keep the gutters on their own content. */
.project-page .reports > :not(.reports__layout) {
  margin: 0 32px 48px;
}
.project-page .reports__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
  padding: 16px 0;
}
.project-page .reports__pick {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  max-width: 100%;
}
.project-page .reports__lbl,
.project-page .reports__hint {
  font: 400 10px var(--font-data);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
/* What the report is built from, as the Snapshots list chose it. */
.project-page .reports__on {
  min-width: 0;
  color: var(--ink);
  font: 400 11px var(--font-data);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}
/* Include eliminated markets (issue 243): beside the PDF and deck downloads,
   the sharing dialog's checkbox (13px UI text, a 16px box in --primary). */
.project-page .reports__opt {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font: 400 13px var(--font-ui);
  color: var(--ink);
  cursor: pointer;
}
.project-page .reports__box {
  flex: none;
  width: 16px;
  height: 16px;
  margin: 0;
  border-radius: var(--r-chip);
  accent-color: var(--primary);
}
.project-page .reports__box:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}
.project-page .reports__opt:has(.reports__box:disabled) {
  cursor: default;
}
.project-page .reports__box:disabled,
.project-page .reports__box:disabled + span {
  cursor: default;
  opacity: 0.5;
}
/* Preview as printed (issue 175): the slides follow the dark theme on screen,
   and this shows them light, as the PDF prints them. In Plat Room they already
   are, so the choice is not offered. */
:root:not([data-theme="dark"]) .project-page .reports__printed {
  display: none;
}
/* Report settings (DESIGN.md § Report settings): one line under the PDF's and
   the deck's downloads saying what the report is built with, in the bar's
   mono, with a --warning hairline stamp for each setting that changes what
   prints in a notable way. No fill, no side stripe. */
.project-page .reports__settings {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  margin: -8px 0 16px;
}
.project-page .reports__settingstext {
  font: 400 11px var(--font-data);
  letter-spacing: 0.04em;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.project-page .reports__warnstamp {
  padding: 2px 6px;
  border: 1px solid var(--warning);
  border-radius: var(--r-data);
  color: var(--warning);
}
/* The Settings dialog: the shared modal shell, its sections headed in the
   9px mono label, the sharing dialog's checkboxes, and the client editor's
   logo plate and accent swatch, smaller. */
.modal.rset {
  width: min(480px, 100%);
}
.rset__lead {
  margin-top: var(--space-xs);
  color: var(--muted);
  font: 400 13px/1.5 var(--font-ui);
}
.rset__snap {
  margin-top: var(--space-md);
  padding: var(--space-sm) 12px;
  border: 1px solid var(--rule-strong);
  border-radius: var(--r-box);
  font: 400 12.5px/1.5 var(--font-ui);
  color: var(--ink);
}
.rset__section {
  margin-top: var(--space-md);
  padding-top: var(--space-md);
  border-top: 1px solid var(--rule);
}
.rset__h {
  margin-bottom: var(--space-sm);
  font: 400 9px var(--font-data);
  letter-spacing: 0.14em;
  color: var(--muted);
}
.rset__check {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-top: var(--space-sm);
  font: 400 13px var(--font-ui);
  color: var(--ink);
  cursor: pointer;
}
.rset__box {
  flex: none;
  width: 16px;
  height: 16px;
  margin: 0;
  border-radius: var(--r-chip);
  accent-color: var(--primary);
}
.rset__box:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}
.rset__check:has(.rset__box:disabled) {
  cursor: default;
}
.rset__box:disabled,
.rset__box:disabled ~ span {
  opacity: 0.5;
}
.rset__help {
  margin: var(--space-xs) 0 0 24px;
  color: var(--muted);
  font: 400 12px/1.45 var(--font-ui);
}
.rset__swatch {
  flex: none;
  width: 14px;
  height: 14px;
  border: 1px solid var(--rule-strong);
  border-radius: var(--r-data);
}
.rset__hex {
  font: 400 11px var(--font-data);
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}
.rset__brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.rset__plate {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 120px;
  height: 44px;
  padding: 6px;
  background: var(--canvas);
  border: 1px solid var(--rule-strong);
  border-radius: var(--r-data);
}
:root[data-theme="dark"] .rset__plate {
  background: var(--logo-plate);
}
.rset__logo {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.rset__nologo,
.rset__none,
.rset__site {
  font: 400 12px var(--font-ui);
  color: var(--muted);
}
:root[data-theme="dark"] .rset__nologo {
  color: var(--on-primary);
}
.rset__facts {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  overflow-wrap: anywhere;
}
.rset__client {
  font: 500 13px var(--font-ui);
  color: var(--ink);
}
.rset__link {
  margin-top: var(--space-sm);
  padding: 0;
  background: none;
  border: 0;
  color: var(--primary);
  font: 500 12.5px var(--font-ui);
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}
.rset__link:hover {
  color: var(--primary-hover);
}
.rset__link:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}
/* The live report's callout (issue 244), DESIGN.md's live notice: a --warning
   box over a 12% --warning tint with a --warning hairline stamp and the
   sentence in --ink, no side stripe; Save snapshot on its right, under it when
   narrow. */
.project-page .rlive {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px var(--space-lg);
  margin-bottom: var(--space-md);
  padding: 12px var(--space-md);
  border: 1px solid var(--warning);
  border-radius: var(--r-box);
  background: color-mix(in srgb, var(--warning) 12%, var(--canvas));
}
.project-page .rlive__words {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-sm);
  flex: 1 1 320px;
  min-width: 0;
  max-width: 640px;
}
.project-page .rlive__stamp {
  padding: 2px 6px;
  border: 1px solid var(--warning);
  border-radius: var(--r-data);
  color: var(--warning);
}
.project-page .rlive__text {
  margin: 0;
  font: 400 13px/1.5 var(--font-ui);
  color: var(--ink);
}
.project-page .rlive__save {
  flex: 0 1 360px;
}
/* On the tinted box the label field takes the canvas, so it reads as a field. */
.project-page .rlive .snapsave__label {
  background: var(--canvas);
}
.project-page .reports__empty {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  max-width: 560px;
  padding: 32px 0;
}
.project-page .reports__why {
  color: var(--muted);
  font: 400 13px/1.55 var(--font-ui);
}
/* The Reports step's deliverables: a quiet ruled list on the left (the format
   as a stamp, one line of what it is), the chosen one tinted --panel-2 and
   aria-current, and its panel beside it. Below 900px the list stacks above. */
.project-page .reports__layout {
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  align-items: stretch;
}
/* The sidebar's cell runs the full height of the step, closed by the same 2px
   rule that divides MSA Selection; the list inside stays in view on scroll. */
.project-page .reports__side {
  border-right: 2px solid var(--rule-strong);
}
.project-page .reports__sidein {
  position: sticky;
  top: 0;
  max-height: 100dvh;
  overflow-y: auto;
}
/* The snapshots under the deliverables: a 9.5px stamp head, then the ruled
   rows, flush with the deliverables' 16px gutter. */
.project-page .rsnaps {
  padding: 20px 0 24px;
}
.project-page .rsnaps__title {
  padding: 0 16px 8px;
  font-family: var(--font-data);
  font-size: 9.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.project-page .rsnaps .snaps__empty {
  padding: 8px 16px 0;
}
.project-page .reports__main {
  min-width: 0;
  padding: 0 32px 48px;
}
.project-page .deliv {
  margin: 0;
  padding: 0;
  list-style: none;
}
.project-page .deliv__item {
  border-bottom: 1px solid var(--rule);
}
.project-page .deliv__link {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 3px 8px;
  align-items: baseline;
  padding: 12px 16px;
  color: var(--ink);
  text-decoration: none;
}
.project-page .deliv__link:hover {
  background: var(--panel);
}
.project-page .deliv__item--on .deliv__link {
  background: var(--panel-2);
}
.project-page .deliv__link:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: -2px;
}
.project-page .deliv__name {
  font: 500 13px/1.3 var(--font-ui);
}
.project-page .deliv__badge {
  padding: 1px 5px;
  border: 1px solid var(--rule-strong);
  border-radius: var(--r-data);
  font: 400 9px var(--font-data);
  letter-spacing: 0.12em;
  color: var(--muted);
}
.project-page .deliv__item--on .deliv__badge {
  color: var(--ink);
}
.project-page .deliv__what {
  grid-column: 1 / -1;
  font: 400 12px/1.4 var(--font-ui);
  color: var(--muted);
}
.project-page .dlv {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  padding: 8px 0 16px;
  max-width: 100%;
}
.project-page .dlv__title {
  font: 400 10px var(--font-data);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
}
.project-page .dlv__title--sub {
  margin-top: 12px;
}
.project-page .dlv__lead,
.project-page .dlv__note {
  max-width: 72ch;
  margin: 0;
  font: 400 12.5px/1.55 var(--font-ui);
  color: var(--muted);
}
.project-page .dlv__sub {
  font: 400 10px var(--font-data);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.project-page .csvt__wrap {
  align-self: stretch;
  overflow: auto;
  border: 1px solid var(--rule-strong);
  border-radius: var(--r-box);
}
.project-page .csvt__wrap:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}
.project-page .csvt {
  min-width: 100%;
  border-collapse: collapse;
  font: 400 11px var(--font-data);
  font-variant-numeric: tabular-nums;
}
.project-page .csvt__head {
  min-width: 96px;
  max-width: 180px;
  padding: 8px 10px;
  background: var(--panel);
  border-bottom: 1px solid var(--rule-strong);
  font: 400 9.5px/1.35 var(--font-data);
  letter-spacing: 0.1em;
  text-align: left;
  text-transform: uppercase;
  color: var(--muted);
  vertical-align: bottom;
}
.project-page .csvt__head--num,
.project-page .csvt__cell--num {
  text-align: right;
}
.project-page .csvt__cell {
  padding: 6px 10px;
  border-top: 1px solid var(--rule);
  white-space: nowrap;
  color: var(--ink);
}
.project-page .csvt tbody tr:first-child .csvt__cell {
  border-top: 0;
}
.project-page .csvt__cell--name {
  font: 500 12.5px var(--font-ui);
}
.project-page .csvc {
  align-self: stretch;
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--rule);
}
.project-page .csvc__row {
  display: grid;
  grid-template-columns: minmax(0, 2fr) 140px minmax(0, 1.4fr);
  gap: 4px 12px;
  align-items: baseline;
  padding: 6px 8px;
  border-bottom: 1px solid var(--rule);
}
.project-page .csvc__name {
  font: 400 12.5px/1.4 var(--font-ui);
  color: var(--ink);
}
.project-page .csvc__group,
.project-page .csvc__unit {
  font: 400 10px/1.4 var(--font-data);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.project-page .csvc__unit {
  text-transform: none;
  letter-spacing: 0.02em;
}
@media screen and (max-width: 899px) {
  .project-page .reports__layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .project-page .reports__side {
    border-right: 0;
    border-bottom: 2px solid var(--rule-strong);
  }
  .project-page .reports__sidein {
    position: static;
    max-height: none;
  }
  .project-page .reports__main {
    padding: 0 16px 48px;
  }
  .project-page .csvc__row {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .project-page .csvc__unit {
    grid-column: 1 / -1;
  }
}
.project-page .report {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}
/* With the deliverables sidebar (248px and its 2px rule, beside the panel's
   32px gutters) the slides get the width that is left, so they scale in bands that
   fit it; below 900px the sidebar stacks above and they use the full width. */
@media screen and (min-width: 900px) and (max-width: 1623px) {
  .project-page .report { zoom: 0.8; }
}
@media screen and (min-width: 900px) and (max-width: 1367px) {
  .project-page .report { zoom: 0.6; }
}
@media screen and (min-width: 900px) and (max-width: 1111px) {
  .project-page .report { zoom: 0.4; }
}
@media screen and (max-width: 899px) {
  .project-page .report { zoom: 0.5; }
}
@media screen and (max-width: 699px) {
  .project-page .report { zoom: 0.25; }
}
.project-page .rslide {
  display: flex;
  flex-direction: column;
  flex: none;
  width: 1280px;
  height: 720px;
  padding: 40px 64px 0;
  overflow: hidden;
  background: var(--canvas);
  color: var(--ink);
  border: 1px solid var(--rule-strong);
  border-radius: var(--r-box);
  font: 400 13px/1.45 var(--font-ui);
}
.project-page .rslide__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--rule-strong);
}
.project-page .rslide__heading {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
/* With the client's logo on the right of the head, the title keeps to one line. */
.project-page .rslide__head--logo .rslide__eyebrow,
.project-page .rslide__head--logo .rslide__title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* The client's logo (DESIGN.md § Client brand): in the head, a 120 x 28 box;
   on the cover, 240 x 64. Its proportions are kept; the plate shows only on a
   dark slide. */
.project-page .rslide__logo,
.project-page .rcover__logo {
  display: block;
  flex: none;
  width: auto;
  height: auto;
  object-fit: contain;
  padding: 4px;
  border-radius: var(--r-data);
  background: var(--logo-plate);
}
.project-page .rslide__logo {
  max-width: 120px;
  max-height: 28px;
  margin: -4px -4px 0 0;
}
.project-page .rcover__logo {
  max-width: 240px;
  max-height: 64px;
  margin: -4px 0 0 -4px;
}
/* The account theme (DESIGN.md § Account theme and white-label; issue 393): the
   brokerage's accent as the chrome colour (the heads' rule, the cover's title
   rule, the heads' eyebrow) and the report font. Report.elm sets the accent per
   page only where it clears its contrast (3:1 for a rule, 4.5:1 for text) on
   light and on dark slides; anything unset falls back to the system's tokens.
   Data colours never take it. A slide previewed as printed, and a share's, is
   light paper. */
.project-page .rslide--themed {
  --theme-rule: var(--theme-rule-light, var(--rule-strong));
  --theme-eyebrow: var(--theme-eyebrow-light, var(--muted));
}
:root[data-theme="dark"]:not([data-slides="print"]) body:not(.shared-body) .project-page .rslide--themed {
  --theme-rule: var(--theme-rule-dark, var(--rule-strong));
  --theme-eyebrow: var(--theme-eyebrow-dark, var(--muted));
}
.project-page .rslide--themed .rslide__head {
  border-bottom-color: var(--theme-rule);
}
.project-page .rslide--themed .rslide__head .rslide__eyebrow {
  color: var(--theme-eyebrow);
}
.project-page .rslide--themed .rcover__main {
  border-left-color: var(--theme-rule);
}
.project-page .rslide--font-helvetica {
  --font-ui: "Helvetica Neue", Helvetica, Arial, sans-serif;
}
.project-page .rslide--font-georgia {
  --font-ui: Georgia, "Times New Roman", Times, serif;
}
/* White-label with no logo: the brokerage's name where Cadastre's wordmark was. */
.project-page .rcover__brand--lead .wordmark {
  font-size: 19px;
}
/* Two logos (DESIGN.md § Brokerage brand): the brokerage's and the client's.
   In the head, BY and FOR in 9px mono before each, each logo in a 96 x 24 box;
   on the cover, PREPARED BY and FOR over each, each in a 200 x 56 box, 40px
   apart. Both sit on the plate on a dark slide. */
.project-page .rslide__logos {
  display: flex;
  flex: none;
  align-items: center;
  gap: 6px;
}
.project-page .rslide__by,
.project-page .rcover__label {
  font: 400 9px var(--font-data);
  letter-spacing: 0.14em;
  color: var(--muted);
}
.project-page .rslide__by + .rslide__logo ~ .rslide__by {
  margin-left: 6px;
}
.project-page .rslide__logo--pair {
  max-width: 96px;
  max-height: 24px;
  margin: -4px 0 0;
}
.project-page .rcover__pair {
  display: flex;
  align-items: flex-start;
  gap: 40px;
}
.project-page .rcover__party {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}
.project-page .rcover__logo--pair {
  max-width: 200px;
  max-height: 56px;
  margin: 0 0 0 -4px;
}
.project-page .rslide__eyebrow {
  font: 400 10px var(--font-data);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.project-page .rslide__title {
  font: 600 28px/1.15 var(--font-ui);
  letter-spacing: -0.02em;
}
.project-page .rslide__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  padding: 20px 0 16px;
  overflow: hidden;
}
.project-page .rslide__foot {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0 16px;
  border-top: 1px solid var(--rule);
  font: 400 9px var(--font-data);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.project-page .rslide__foot > span {
  flex: none;
}
.project-page .rslide__foot > .rslide__stamp--id {
  text-transform: none;
}
.project-page .rslide__foot > .rslide__stamp {
  flex: 0 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.project-page .rslide .num {
  font-family: var(--font-data);
  font-variant-numeric: tabular-nums;
}
.project-page .rslide .stamp {
  display: inline-block;
  padding: 2px 6px;
  border: 1px solid var(--rule-strong);
  border-radius: var(--r-data);
}
/* Cover */
.project-page .rslide--cover {
  justify-content: space-between;
  padding-bottom: 48px;
}
.project-page .rcover__brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
/* Co-branded: the client's logo leads; Cadastre's mark and wordmark stay small
   at the top right. */
.project-page .rcover__brand--client {
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}
.project-page .rcover__by {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: none;
}
.project-page .rcover__by svg {
  width: 16px;
  height: 16px;
}
.project-page .rcover__by .wordmark {
  font-size: 11px;
  color: var(--muted);
}
/* The client's accent: a 6px band across the top of the cover, the one place
   it is drawn (never a data colour, a button or a rule elsewhere). */
.project-page .rslide--cover {
  position: relative;
}
.project-page .rcover__band {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 6px;
}
.project-page .rcover__main {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-left: 24px;
  border-left: 2px solid var(--rule-strong);
}
.project-page .rcover__title {
  max-width: 900px;
  font: 600 44px/1.1 var(--font-ui);
  letter-spacing: -0.03em;
}
.project-page .rcover__for {
  font: 400 22px var(--font-ui);
  color: var(--muted);
}
.project-page .rcover__stamp {
  padding-top: 14px;
  border-top: 1px solid var(--rule-strong);
}
/* A live report's notice (issue 244), above the stamp rule, as the PDF and
   the deck draw it: the live notice (a --warning box over a 12% --warning
   tint, no side stripe; square, like every box on a printed page) with a
   --warning NOT SNAPSHOTTED stamp and the sentence under it in --ink. */
.project-page .rcover__notice {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  max-width: 760px;
  margin-bottom: 24px;
  padding: 12px;
  border: 1px solid var(--warning);
  background: color-mix(in srgb, var(--warning) 12%, var(--canvas));
}
.project-page .rcover__notice .stamp {
  border-color: var(--warning);
  color: var(--warning);
}
.project-page .rcover__notice-text {
  margin: 0;
  font: 400 13px/1.45 var(--font-ui);
  color: var(--ink);
}
/* Summary */
.project-page .rsummary {
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: bullet;
}
.project-page .rsummary li {
  position: relative;
  padding: 10px 0 10px 40px;
  border-bottom: 1px solid var(--rule);
  font: 400 16px/1.45 var(--font-ui);
  counter-increment: bullet;
}
.project-page .rsummary li::before {
  content: counter(bullet, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 13px;
  font: 400 10px var(--font-data);
  letter-spacing: 0.1em;
  color: var(--muted);
}
/* Elimination process */
.project-page .relim {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: 40px;
}
.project-page .rfunnel {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.project-page .rfunnel__row {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr) 48px;
  align-items: center;
  gap: 10px;
}
.project-page .rfunnel__label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font: 400 13.5px var(--font-ui);
}
.project-page .rfunnel__track {
  height: 22px;
}
.project-page .rfunnel__bar {
  height: 100%;
  background: var(--rule-strong);
}
.project-page .rfunnel__row:last-child .rfunnel__bar {
  background: var(--ink);
}
.project-page .rfunnel__n {
  text-align: right;
  font-size: 13px;
}
/* Ruled tables: the register's vocabulary on a slide. */
.project-page .rtable__head {
  display: grid;
  align-items: end;
  gap: 12px;
  padding: 0 0 8px;
  border-bottom: 1px solid var(--rule-strong);
  font: 400 9.5px var(--font-data);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.project-page .rtable__row {
  display: grid;
  align-items: center;
  gap: 12px;
  padding: 7px 0;
  border-bottom: 1px solid var(--rule);
  font-size: 12.5px;
}
.project-page .rtable__n {
  text-align: right;
}
.project-page .rtable__kind {
  font: 400 9.5px var(--font-data);
  letter-spacing: 0.1em;
  color: var(--muted);
}
.project-page .rtable__note {
  padding: 16px 0;
  color: var(--muted);
  font-size: 13px;
}
.project-page .relim__row {
  grid-template-columns: 100px minmax(0, 1fr) 76px 76px;
}
.project-page .relim__row.rtable__row {
  padding: 13px 0;
  font-size: 14px;
}
/* Criteria and weights */
.project-page .rcrit__row {
  grid-template-columns: minmax(0, 1.7fr) minmax(0, 1.1fr) 100px 50px 90px 100px minmax(0, 1.3fr);
}
.project-page .rcrit__row.rtable__row {
  align-items: start;
  padding: 9px 0;
}
.project-page .rcrit__name {
  display: block;
  font-weight: 500;
}
.project-page .rcrit__words {
  display: block;
  margin-top: 2px;
  font-size: 11.5px;
  color: var(--muted);
}
.project-page .rcrit__data {
  font-size: 11.5px;
  overflow-wrap: anywhere;
}
.project-page .rcrit__stamps {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.project-page .rcrit__stamps .stamp {
  font: 400 9px var(--font-data);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
/* Ranking table */
.project-page .rrank__row {
  grid-template-columns: 52px minmax(190px, 1.6fr) repeat(var(--criteria, 1), minmax(0, 1fr)) 96px;
  gap: 0;
}
.project-page .rrank__row > .rrank__crit {
  padding: 0 8px;
}
.project-page .rrank__row.rtable__row {
  position: relative;
  padding: 0 0 0 0;
  min-height: 34px;
}
.project-page .rtable__head.rrank__row > span:nth-child(2) {
  padding-left: 12px;
}
.project-page .rrank__rank {
  font-weight: 500;
}
.project-page .rrank__name {
  padding: 5px 12px 5px 12px;
  font-weight: 500;
}
.project-page .rrank__composite {
  font-weight: 500;
}
.project-page .rrank__crit {
  display: flex;
  flex-direction: column;
  min-width: 0;
  text-align: right;
}
.project-page .rrank__critname {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.project-page .rrank__critw {
  font-size: 9px;
  color: var(--muted);
}
/* A criterion's percentile score: five fifths of 0-100, in the accent at the
   map's five opacities. Never red or green. */
.project-page .rcell {
  align-self: stretch;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0 8px;
  font-size: 12px;
}
.project-page .rcell--0 { background: color-mix(in srgb, var(--accent) 16%, transparent); }
.project-page .rcell--1 { background: color-mix(in srgb, var(--accent) 28%, transparent); }
.project-page .rcell--2 { background: color-mix(in srgb, var(--accent) 40%, transparent); }
.project-page .rcell--3 { background: color-mix(in srgb, var(--accent) 54%, transparent); }
.project-page .rcell--4 { background: color-mix(in srgb, var(--accent) 70%, transparent); }
.project-page .rcell--none {
  color: var(--muted);
}
/* An eliminated market: muted, with the register's 45 degree hatch in the
   gutter and its reason on a mono line. No opacity, no fill. */
.project-page .rrank__row--out {
  color: var(--muted);
  padding-left: 12px;
}
.project-page .rrank__row--out::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 6px;
  background: repeating-linear-gradient(45deg, var(--muted) 0 1px, transparent 1px 4px);
}
.project-page .rrank__row--out .rrank__name {
  color: var(--muted);
}
.project-page .rrank__reason {
  display: block;
  font: 400 9.5px var(--font-data);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
/* With the eliminated markets listed, a Why column after the composite carries
   each one's reason (survivors leave it empty). */
.project-page .rrank--why .rrank__row {
  grid-template-columns: 52px minmax(190px, 1.6fr) repeat(var(--criteria, 1), minmax(0, 1fr)) 96px 180px;
}
.project-page .rrank__why {
  padding: 5px 0 5px 16px;
  overflow-wrap: anywhere;
}
/* The ELIMINATED (n) rule between the qualifying and the eliminated markets:
   the label centred on a --rule-strong hairline across the table (DESIGN.md
   "Reports"). No fill, no hatch: the rows under it carry the struck mark. */
.project-page .rtable__divider {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--rule);
  font: 400 9.5px var(--font-data);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.project-page .rtable__divider::before,
.project-page .rtable__divider::after {
  content: "";
  flex: 1;
  border-top: 1px solid var(--rule-strong);
}
.project-page .rqual__divider.rtable__divider {
  padding: 8px 0;
}
.project-page .rtable__foot {
  margin: 10px 0 0;
  font-size: 12px;
  color: var(--muted);
}
/* Requirements (an unscored report): the scope and each gate with its data. */
.project-page .rreq__row {
  grid-template-columns: 110px minmax(0, 1.6fr) minmax(0, 1.2fr) minmax(0, 1.3fr);
}
.project-page .rreq__row.rtable__row {
  align-items: start;
  padding: 13px 0;
}
.project-page .rreq__rule {
  font-size: 14px;
  font-weight: 500;
}
.project-page .rreq .rcrit__stamps {
  align-items: flex-start;
}
/* Qualifying and eliminated markets (an unscored report): a list in three
   columns, not a ranking. Eliminated rows take the register's muted text,
   gutter hatch and mono reason line. */
.project-page .rqual {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.project-page .rqual__note {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}
.project-page .rqual__cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0 32px;
  align-items: start;
}
.project-page .rqual__col {
  min-width: 0;
  border-top: 1px solid var(--rule-strong);
}
.project-page .rqual__row.rtable__row {
  position: relative;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 12px;
  padding: 6px 0;
}
.project-page .rqual__name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 500;
}
.project-page .rqual__pop {
  font-size: 12px;
}
.project-page .rqual__reason {
  grid-column: 1 / -1;
}
.project-page .rqual__row.rtable__row.rqual__row--out {
  padding-left: 12px;
  color: var(--muted);
}
.project-page .rqual__row--out::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 6px;
  background: repeating-linear-gradient(45deg, var(--muted) 0 1px, transparent 1px 4px);
}
.project-page .rqual__row--out .rqual__name {
  color: var(--muted);
}
/* Map slide */
.project-page .rmap {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  border: 1px solid var(--rule-strong);
}
.project-page .rmap .mlegend {
  padding: 10px 16px;
}
.project-page .rmap__plate {
  position: relative;
  flex: 1;
  min-height: 0;
}
.project-page .rmap__plate market-map {
  position: absolute;
  inset: 0;
  display: block;
}
/* Methodology */
.project-page .rmethod {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 4fr);
  gap: 0 48px;
}
/* Steps and the basis note share the wide column; the narrow one stays empty,
   as in the PDF and the deck. */
.project-page .rmethod > * {
  grid-column: 1;
}
.project-page .rmethod__step {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid var(--rule);
}
.project-page .rmethod__n {
  font-size: 11px;
  color: var(--muted);
}
.project-page .rmethod__title {
  font: 400 10px var(--font-data);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
}
.project-page .rmethod p {
  margin-top: 3px;
  font-size: 12.5px;
  line-height: 1.5;
}
.project-page .rmethod__notes {
  padding-top: 16px;
}
.project-page .rmethod__notes p {
  font-size: 11px;
  color: var(--muted);
}
.project-page .rsources__note {
  margin: 0 0 12px;
  font-size: 13px;
  color: var(--muted);
}
/* A publisher's address in the credit (CDC, OpenStreetMap): a link in
   --primary, opening in a new tab. Long URLs wrap rather than overflow. */
.project-page .rsources__note a {
  color: var(--primary);
  overflow-wrap: anywhere;
}
.project-page .rsources__note a:hover {
  color: var(--primary-hover);
}
.project-page .rsources__row {
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) 90px 90px;
}
.project-page .rsources__row.rtable__row {
  padding: 5px 0;
}
/* The raw measure key under its label: small mono, muted, a line of its own. */
.project-page .rsources__key {
  display: block;
  overflow-wrap: anywhere;
  font: 400 9px/1.3 var(--font-data);
  color: var(--muted);
}

/* Modal dialog (DESIGN.md § Alerts): the shell under the alert and the
   new-project form. The page behind is inert and cannot scroll while the
   dialog is in it; the :has() rules release both the moment it goes. */
html:has(.modal-backdrop),
body:has(.modal-backdrop) {
  overflow: hidden;
}
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-md);
  background: var(--scrim);
  overscroll-behavior: contain;
  animation: modal-fade 150ms ease-out;
}
.modal {
  width: min(440px, 100%);
  max-height: 100%;
  overflow-y: auto;
  padding: var(--space-lg);
  background: var(--panel);
  border: 1px solid var(--rule-strong);
  border-radius: var(--r-box);
  box-shadow: var(--shadow-pop);
  color: var(--ink);
  outline: none;
  animation: modal-rise 200ms ease-out;
}
.modal__mark {
  flex: none;
  color: var(--error);
}
.modal__title {
  font: 600 18px/1.3 var(--font-ui);
  color: var(--ink);
}
.alert__head {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}
.alert__body {
  margin-top: var(--space-sm);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  font: 400 15px/1.5 var(--font-ui);
  overflow-wrap: anywhere;
}
.alert__guidance {
  color: var(--muted);
  font-size: 12.5px;
}
.alert__acts,
.modal__acts {
  display: flex;
  justify-content: flex-end;
  gap: var(--space-sm);
  margin-top: var(--space-lg);
}
.alert__btn,
.modal__btn {
  min-width: 72px;
  height: 32px;
  padding: 0 14px;
  background: transparent;
  border: 1px solid var(--rule-strong);
  border-radius: var(--r-ctl);
  color: var(--ink);
  font: 500 12.5px var(--font-ui);
  cursor: pointer;
}
.alert__btn:hover,
.modal__btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}
.alert__btn--primary,
.alert__btn--primary:hover,
.modal__btn--primary,
.modal__btn--primary:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--on-primary);
}
.alert__btn--primary:hover,
.modal__btn--primary:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
}
.modal__btn[aria-disabled="true"] {
  opacity: 0.6;
  cursor: progress;
}
.alert__btn:focus-visible,
.modal__btn:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* The notice of updated terms (TermsNotice.elm): a blocking dialog on the
   shared shell, with the sign-up consent box inside it. */
.terms-notice__consent {
  margin: var(--space-md) 0 0;
}
.terms-notice__changes-title {
  font: 600 13px/1.4 var(--font-ui);
}
.terms-notice__changes {
  padding-left: var(--space-md);
  font: 400 13px/1.45 var(--font-ui);
}
.terms-notice .alert__body a {
  color: var(--primary);
}

/* Form fields in a dialog (the new-project form). */
.nform .field {
  margin-top: var(--space-md);
}
.field__label {
  display: block;
  margin-bottom: var(--space-xs);
  font: 500 12.5px var(--font-ui);
  color: var(--ink);
}
.field__input {
  width: 100%;
  height: 36px;
  padding: 0 10px;
  background: var(--canvas);
  border: 1px solid var(--rule-strong);
  border-radius: var(--r-ctl);
  color: var(--ink);
  font: 400 14px var(--font-ui);
}
.field__input:focus {
  outline: 2px solid var(--primary);
  outline-offset: 1px;
  border-color: var(--primary);
}
.field__input[aria-invalid="true"] {
  border-color: var(--error);
}
/* Start a parcel search (ParcelSearchDialog): the lead, then a scrolling
   checklist of the qualifying metros, ruled rows with their rank. */
.psearch__lead {
  margin: var(--space-sm) 0 0;
  font: 400 13px/1.45 var(--font-ui);
  color: var(--muted);
}
.psearch__metros {
  min-width: 0;
  margin-inline: 0;
  padding: 0;
  border: 0;
}
.psearch__count {
  font-weight: 400;
  color: var(--muted);
}
.psearch__list {
  max-height: 280px;
  overflow-y: auto;
  margin: 0;
  padding: 0;
  list-style: none;
  border: 1px solid var(--rule-strong);
  border-radius: var(--r-ctl);
  background: var(--canvas);
}
.psearch__row + .psearch__row {
  border-top: 1px solid var(--rule);
}
.psearch__opt {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-xs) var(--space-sm);
  cursor: pointer;
}
.psearch__box {
  flex: none;
  width: 16px;
  height: 16px;
  border-radius: var(--r-chip);
  accent-color: var(--primary);
}
.psearch__box:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}
.psearch__rank {
  min-width: 34px;
  font: 400 11px var(--font-data);
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}
.psearch__name {
  font: 400 13px var(--font-ui);
  color: var(--ink);
}
.psearch__note {
  font: 400 12.5px var(--font-ui);
  color: var(--muted);
}
.psearch__note--err {
  color: var(--error);
}
/* What a new project searches (offered with parcel search): native radios,
   each with its one-line hint, as the consent page's account rows. */
.nform__kinds {
  min-width: 0;
  margin-inline: 0;
  padding: 0;
  border: 0;
}
.nform__kind {
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
  padding: 6px 0;
  cursor: pointer;
}
.nform__radio {
  flex: none;
  margin: 2px 0 0;
  width: 15px;
  height: 15px;
  accent-color: var(--primary);
}
.nform__radio:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}
.nform__kindtext {
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.nform__kindname {
  font: 600 13px var(--font-ui);
  color: var(--ink);
}
.nform__kindhint {
  font: 400 12.5px var(--font-ui);
  color: var(--muted);
}
.field__error {
  margin-top: var(--space-xs);
  font: 400 12.5px var(--font-ui);
  color: var(--error);
}
.field__note {
  margin-top: var(--space-xs);
  font: 400 12px var(--font-ui);
  color: var(--muted);
}
.modal__problem {
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
  margin-top: var(--space-md);
  font: 400 13px/1.45 var(--font-ui);
  color: var(--ink);
  overflow-wrap: anywhere;
}
.modal__problem .modal__mark {
  margin-top: 1px;
}
@keyframes modal-fade {
  from { opacity: 0; }
}
@keyframes modal-rise {
  from { opacity: 0; transform: translateY(4px); }
}
@media (prefers-reduced-motion: reduce) {
  .modal-backdrop,
  .modal {
    animation: none;
  }
}

/* Interactive states: one short, functional transition (DESIGN.md § Motion).
   The only floating surfaces are menus and popovers, which carry --shadow-pop. */
a, button, input, select, textarea, .chip, .madd, .critbtn, .stage {
  transition: background-color var(--t-ui), border-color var(--t-ui), color var(--t-ui);
}

.project-page .msel__done:hover,
.project-page .critadd__btn:hover,
.project-page .chip--on:hover,
.chip--on:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
}

@media (prefers-reduced-motion: reduce) {
  a, button, input, select, textarea, .chip, .madd, .critbtn, .stage {
    transition: none;
  }
}

/* --- Home page: the Corner Monument at page scale (DESIGN.md, Logo, "Page
   lockup"). One rule under the header strip and one right of the side strip,
   crossing at the top left under the orange monument, in the same grey as the
   app's other rules so they blend in. The page bleeds to the edges: no exterior
   frame. Two rules separate the header, side and page. --- */

.home {
  --home-side: clamp(20px, 8vw, 120px);
  --home-rule: 2px;
  --home-dot: clamp(14px, 1.4vw, 20px);
  /* How far the value boxes ride up over the product image's faded tail. */
  --home-overlap: clamp(16px, 4vw, 48px);
  /* How much narrower the product image is than the row of boxes, per side. */
  --home-inset: clamp(16px, 7vw, 128px);
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
}

.home__frame {
  flex: 1;
  display: grid;
  grid-template-columns: var(--home-side) minmax(0, 1fr);
  /* The hero row takes what the first screen has left after the margin, the
     frame's two rules and the header strip; the values row follows. */
  grid-template-rows: minmax(56px, auto) auto;
}

.home__corner {
  position: relative;
  border-right: var(--home-rule) solid var(--rule-strong);
  border-bottom: var(--home-rule) solid var(--rule-strong);
}

/* The monument: a true circle centred on the crossing of the two rules. */
.home__corner::after {
  content: "";
  position: absolute;
  right: calc(-1 * (var(--home-rule) + var(--home-dot)) / 2);
  bottom: calc(-1 * (var(--home-rule) + var(--home-dot)) / 2);
  z-index: 3;
  width: var(--home-dot);
  height: var(--home-dot);
  border-radius: 50%;
  background: var(--accent);
}

.home__header {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-sm) var(--space-md);
  padding: var(--space-xs) clamp(12px, 2.5vw, 32px);
  border-bottom: var(--home-rule) solid var(--rule-strong);
}

.home .usermenu {
  min-width: 0;
}

.home__brand {
  font-family: var(--font-ui);
  font-size: 19px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--ink);
  text-decoration: none;
}

.home__auth {
  display: flex;
  flex-wrap: wrap;
  min-width: 0;
  align-items: center;
  gap: var(--space-md);
}

.home__plate {
  font-family: var(--font-data);
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--ink);
  text-decoration: none;
  border: 1px solid var(--rule-strong);
  border-radius: var(--r-ctl);
  padding: 6px 12px;
}

.home__side {
  grid-column: 1;
  grid-row: 2;
  border-right: var(--home-rule) solid var(--rule-strong);
}

.home__main {
  grid-column: 2;
  grid-row: 2;
  display: grid;
  /* The first screen holds the hero, the product image and the start of the
     three boxes: the hero takes the room left over (centred in it), the image
     is capped so the boxes begin above the fold. A short window scrolls
     rather than squeezing the hero. */
  grid-template-rows: minmax(min-content, 1fr) auto auto auto;
  min-height: calc(100svh - 56px - var(--home-rule));
}

.home__page {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: clamp(20px, 4vh, 72px) clamp(24px, 6vw, 96px);
}

.home__title {
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: clamp(40px, 7vw, 84px);
  line-height: 1;
  letter-spacing: 0.06em;
  color: var(--ink);
}

.home__tagline {
  margin-top: var(--space-md);
  font-size: clamp(16px, 2vw, 24px);
  line-height: 1.3;
  color: var(--muted);
}

/* One sentence of what the product does, under the tagline, in the ink. */
.home__lede {
  max-width: 64ch;
  margin-top: var(--space-sm);
  font-size: clamp(15px, 1.4vw, 18px);
  line-height: 1.5;
  color: var(--ink);
}

.home__cta {
  margin-top: var(--space-lg);
  padding: 10px 20px;
  border: 1px solid transparent;
  border-radius: var(--r-ctl);
  background: var(--primary);
  color: var(--on-primary);
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}

.home__cta:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
}

.home__brand:focus-visible,
.home__plate:focus-visible,
.home__cta:focus-visible,
.home__data a:focus-visible,
.home__agents a:focus-visible,
.home__legal a:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: no-preference) {
  .home__plate,
  .home__cta {
    transition: background-color var(--t-ui), border-color var(--t-ui);
  }
}

/* The product preview (DESIGN.md, Page lockup): a static replica of MSA
   Selection under the hero, inset from the row of boxes by --home-inset on each
   side (narrower than the boxes, so its faded foot tucks in above them), in a
   1px hairline frame at the box radius and no shadow. Its height is capped so
   the boxes still start on the first screen; the cut falls inside the fade. A
   mask (not a painted gradient) dissolves the lower part, frame included, into
   the page, and the boxes sit over the faded tail. */
.home__product {
  position: relative;
  z-index: 0;
  margin: 0 calc(clamp(24px, 6vw, 96px) + var(--home-inset));
  max-height: clamp(220px, 54svh, 640px);
  overflow: hidden;
  border: 1px solid var(--rule-strong);
  border-radius: var(--r-box);
  -webkit-mask-image: linear-gradient(to bottom, black 55%, transparent calc(100% - var(--home-overlap)));
  mask-image: linear-gradient(to bottom, black 55%, transparent calc(100% - var(--home-overlap)));
  container-type: inline-size;
}

/* The replica is drawn by the screen's own rules (.project-page …), laid out
   at a design height of 536px and a width of at least 1260px (a 600px panel,
   the plate taking the rest, wide enough for its legend on one line), and
   scaled as a picture to the frame by a transform: --k steps with the frame's
   width (0.01 apart below half size, 0.05 above), the layout is the frame's
   width divided by --k so the plate absorbs the slack between steps, and a
   negative bottom margin gives the scaled height back to the page. The text
   stays real type at every size. A transform, not `zoom`: the layout never
   changes size, so nothing wraps or collapses, and WebKit, which laid the
   zoomed replica out at full text size (owner, 2026-10-16), draws it like the
   rest; iOS text autosizing is also told to leave its small type alone.
   From a 1260px frame up it is drawn at full size, at its natural height.
   Inert: no pointer, no hover, no selection. */
.home__preview {
  --k: 0.15;
  display: grid;
  grid-template-columns: 600px minmax(0, 1fr);
  width: calc(100cqw / var(--k));
  height: 536px;
  margin-bottom: calc(536px * (var(--k) - 1));
  overflow: hidden;
  transform: scale(var(--k));
  transform-origin: 0 0;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: var(--canvas);
  pointer-events: none;
  user-select: none;
}
@container (min-width: 201.6px) { .home__preview { --k: 0.16; } }
@container (min-width: 214.2px) { .home__preview { --k: 0.17; } }
@container (min-width: 226.8px) { .home__preview { --k: 0.18; } }
@container (min-width: 239.4px) { .home__preview { --k: 0.19; } }
@container (min-width: 252px) { .home__preview { --k: 0.2; } }
@container (min-width: 264.6px) { .home__preview { --k: 0.21; } }
@container (min-width: 277.2px) { .home__preview { --k: 0.22; } }
@container (min-width: 289.8px) { .home__preview { --k: 0.23; } }
@container (min-width: 302.4px) { .home__preview { --k: 0.24; } }
@container (min-width: 315px) { .home__preview { --k: 0.25; } }
@container (min-width: 327.6px) { .home__preview { --k: 0.26; } }
@container (min-width: 340.2px) { .home__preview { --k: 0.27; } }
@container (min-width: 352.8px) { .home__preview { --k: 0.28; } }
@container (min-width: 365.4px) { .home__preview { --k: 0.29; } }
@container (min-width: 378px) { .home__preview { --k: 0.3; } }
@container (min-width: 390.6px) { .home__preview { --k: 0.31; } }
@container (min-width: 403.2px) { .home__preview { --k: 0.32; } }
@container (min-width: 415.8px) { .home__preview { --k: 0.33; } }
@container (min-width: 428.4px) { .home__preview { --k: 0.34; } }
@container (min-width: 441px) { .home__preview { --k: 0.35; } }
@container (min-width: 453.6px) { .home__preview { --k: 0.36; } }
@container (min-width: 466.2px) { .home__preview { --k: 0.37; } }
@container (min-width: 478.8px) { .home__preview { --k: 0.38; } }
@container (min-width: 491.4px) { .home__preview { --k: 0.39; } }
@container (min-width: 504px) { .home__preview { --k: 0.4; } }
@container (min-width: 516.6px) { .home__preview { --k: 0.41; } }
@container (min-width: 529.2px) { .home__preview { --k: 0.42; } }
@container (min-width: 541.8px) { .home__preview { --k: 0.43; } }
@container (min-width: 554.4px) { .home__preview { --k: 0.44; } }
@container (min-width: 567px) { .home__preview { --k: 0.45; } }
@container (min-width: 579.6px) { .home__preview { --k: 0.46; } }
@container (min-width: 592.2px) { .home__preview { --k: 0.47; } }
@container (min-width: 604.8px) { .home__preview { --k: 0.48; } }
@container (min-width: 617.4px) { .home__preview { --k: 0.49; } }
@container (min-width: 630px) { .home__preview { --k: 0.5; } }
@container (min-width: 693px) { .home__preview { --k: 0.55; } }
@container (min-width: 756px) { .home__preview { --k: 0.6; } }
@container (min-width: 819px) { .home__preview { --k: 0.65; } }
@container (min-width: 882px) { .home__preview { --k: 0.7; } }
@container (min-width: 945px) { .home__preview { --k: 0.75; } }
@container (min-width: 1008px) { .home__preview { --k: 0.8; } }
@container (min-width: 1071px) { .home__preview { --k: 0.85; } }
@container (min-width: 1134px) { .home__preview { --k: 0.9; } }
@container (min-width: 1197px) { .home__preview { --k: 0.95; } }
/* A phone-width frame (below 600px) shows the map half only, laid out
   660px wide (the plate and its one-line legend) and scaled by its own steps,
   so the map is drawn about twice the size the whole replica would allow
   (owner, 2026-10-24: the full replica was unreadable on a phone). */
@container (max-width: 599.98px) {
  .home__preview { grid-template-columns: minmax(0, 1fr); }
  .home__preview-panel { display: none; }
  .home__preview-plate { border-left: 0; }
}
@container (min-width: 198.0px) and (max-width: 599.98px) { .home__preview { --k: 0.30; } }
@container (min-width: 211.2px) and (max-width: 599.98px) { .home__preview { --k: 0.32; } }
@container (min-width: 224.4px) and (max-width: 599.98px) { .home__preview { --k: 0.34; } }
@container (min-width: 237.6px) and (max-width: 599.98px) { .home__preview { --k: 0.36; } }
@container (min-width: 250.8px) and (max-width: 599.98px) { .home__preview { --k: 0.38; } }
@container (min-width: 264.0px) and (max-width: 599.98px) { .home__preview { --k: 0.40; } }
@container (min-width: 277.2px) and (max-width: 599.98px) { .home__preview { --k: 0.42; } }
@container (min-width: 290.4px) and (max-width: 599.98px) { .home__preview { --k: 0.44; } }
@container (min-width: 303.6px) and (max-width: 599.98px) { .home__preview { --k: 0.46; } }
@container (min-width: 316.8px) and (max-width: 599.98px) { .home__preview { --k: 0.48; } }
@container (min-width: 330.0px) and (max-width: 599.98px) { .home__preview { --k: 0.50; } }
@container (min-width: 343.2px) and (max-width: 599.98px) { .home__preview { --k: 0.52; } }
@container (min-width: 356.4px) and (max-width: 599.98px) { .home__preview { --k: 0.54; } }
@container (min-width: 369.6px) and (max-width: 599.98px) { .home__preview { --k: 0.56; } }
@container (min-width: 382.8px) and (max-width: 599.98px) { .home__preview { --k: 0.58; } }
@container (min-width: 396.0px) and (max-width: 599.98px) { .home__preview { --k: 0.60; } }
@container (min-width: 409.2px) and (max-width: 599.98px) { .home__preview { --k: 0.62; } }
@container (min-width: 422.4px) and (max-width: 599.98px) { .home__preview { --k: 0.64; } }
@container (min-width: 435.6px) and (max-width: 599.98px) { .home__preview { --k: 0.66; } }
@container (min-width: 448.8px) and (max-width: 599.98px) { .home__preview { --k: 0.68; } }
@container (min-width: 462.0px) and (max-width: 599.98px) { .home__preview { --k: 0.70; } }
@container (min-width: 475.2px) and (max-width: 599.98px) { .home__preview { --k: 0.72; } }
@container (min-width: 488.4px) and (max-width: 599.98px) { .home__preview { --k: 0.74; } }
@container (min-width: 501.6px) and (max-width: 599.98px) { .home__preview { --k: 0.76; } }
@container (min-width: 514.8px) and (max-width: 599.98px) { .home__preview { --k: 0.78; } }
@container (min-width: 528.0px) and (max-width: 599.98px) { .home__preview { --k: 0.80; } }
@container (min-width: 541.2px) and (max-width: 599.98px) { .home__preview { --k: 0.82; } }
@container (min-width: 554.4px) and (max-width: 599.98px) { .home__preview { --k: 0.84; } }
@container (min-width: 567.6px) and (max-width: 599.98px) { .home__preview { --k: 0.86; } }
@container (min-width: 580.8px) and (max-width: 599.98px) { .home__preview { --k: 0.88; } }
@container (min-width: 594.0px) and (max-width: 599.98px) { .home__preview { --k: 0.90; } }
/* At full size the replica takes its natural height again (up to the frame's cap), as zoom 1 did. */
@container (min-width: 1260px) {
  .home__preview { --k: 1; width: auto; height: auto; margin-bottom: 0; transform: none; }
}

/* The selects keep the widths the screen gives them; the narrow frame's
   picture and the live preview use the same real controls. */
.home__preview-select {
  width: 112px;
}

.home__preview-select--wide {
  width: 136px;
}

/* Live (home_preview.js, a frame of 945px or more): the replica takes the
   pointer, its controls behave as the screen's do, and the map's metros take
   their new shade without a transition to watch. */
.home__product--live .home__preview {
  pointer-events: auto;
  user-select: auto;
}

/* After a failed update the funnel and register still show the last answer,
   for requirements the fields no longer hold: drawn faint until the next one. */
.home__preview .home__preview-stale {
  opacity: 0.45;
}

/* The page's 2px focus ring on the live controls, drawn at 2px on screen
   whatever the replica's scale (--k), where the screen's border-colour focus
   alone would be under a pixel. */
.home__product--live .home__preview .gate__select:focus-visible,
.home__product--live .home__preview .gate__num:focus-within {
  outline: calc(2px / var(--k, 1)) solid var(--primary);
  outline-offset: calc(2px / var(--k, 1));
}

.home__preview .mlegend {
  flex-wrap: nowrap;
  white-space: nowrap;
}

.home__preview-funnel {
  padding-top: 12px;
}

/* The register keeps the screen's first five tracks (name, rank, score,
   population, mfg %); GDP onwards is left out to keep the panel narrow. */
.home__preview .mreg {
  overflow: visible;
}

.home__preview .mreg__head,
.home__preview .mrow {
  grid-template-columns: minmax(170px, 1fr) 44px 56px 96px 62px;
}

.home__preview-plate {
  min-width: 0;
  border-left: 1px solid var(--rule-strong);
}

.home__preview-map {
  padding: 28px 28px 0;
}

/* The map (app/assets/images/home/preview-map.svg), painted as the plate
   paints it (market_map.js): state lines and eliminated metros' hatch in the
   rule and muted inks, survivors on the accent's five score steps
   (Shading.tierOpacities). */
.home__map {
  display: block;
  width: 100%;
  height: auto;
}

.home__map path {
  vector-effect: non-scaling-stroke;
  stroke-linejoin: round;
}

.home__map-states {
  fill: none;
  stroke: var(--rule-strong);
  stroke-width: 1;
  stroke-opacity: 0.6;
}

.home__map-out {
  fill: url(#home-map-hatch);
  stroke: var(--muted);
  stroke-width: 0.75;
}

.home__map .home__map-hatch {
  stroke: var(--muted);
  stroke-width: 1.5;
  vector-effect: none;
}

/* A survivor with no score (none of the weighted measures): outlined, as the plate's "No score". */
.home__map-none {
  fill: none;
  stroke: var(--muted);
  stroke-width: 0.75;
}

.home__map-t0,
.home__map-t1,
.home__map-t2,
.home__map-t3,
.home__map-t4 {
  fill: var(--accent);
  stroke: var(--accent);
  stroke-width: 1;
}

.home__map-t0 { fill-opacity: 0.16; }
.home__map-t1 { fill-opacity: 0.28; }
.home__map-t2 { fill-opacity: 0.4; }
.home__map-t3 { fill-opacity: 0.54; }
.home__map-t4 { fill-opacity: 0.7; }

.home__product + .home__values {
  position: relative;
  z-index: 1;
  margin-top: calc(-1 * var(--home-overlap));
}

/* Under the hero: three boxes, in the page parcel. The side rule runs on down
   beside them; nothing else is ruled but the boxes themselves. */

.home__values {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-md);
  padding: 0 clamp(24px, 6vw, 96px) clamp(24px, 4vh, 56px);
}

@media (min-width: 960px) {
  .home__values {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.home__value,
.home__shelf {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-sm);
  padding: var(--space-lg);
  border: 1px solid var(--rule-strong);
  border-radius: var(--r-box);
  background: var(--panel);
}

.home__value-heading {
  font-family: var(--font-ui);
  font-size: 20px;
  font-weight: 600;
  line-height: 1.25;
  color: var(--ink);
}

.home__value-body {
  font-size: 15px;
  color: var(--ink);
  margin-bottom: var(--space-sm);
}

/* "What's in Cadastre": the data by subject under the boxes. Incentives
   leads as the one plate, its text beside the map of the states it covers
   (stacked below 960px); the other subjects are a register, one column, two
   from 720px, each row's figure at the right as the product's register sets
   numbers, closed by the total. */
.home__data,
.home__agents {
  padding: 0 clamp(24px, 6vw, 96px) clamp(24px, 4vh, 56px);
}

/* A row's heading that opens its page: the heading's own type, underlined. */
.home__register-heading a {
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.home__register-heading a:hover {
  color: var(--primary);
}

.home__data-heading {
  margin-bottom: var(--space-md);
  font: 600 28px/1.2 var(--font-ui);
  letter-spacing: -0.01em;
  color: var(--ink);
}

.home__data .home__shelf {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  gap: var(--space-lg);
}

@media (min-width: 960px) {
  .home__data .home__shelf {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  }
}

.home__shelf-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-sm);
}

.home__shelf .home__value-body {
  max-width: 72ch;
}

.home__shelf .home__value-stamp {
  margin-top: 0;
}

.home__coverage-figure {
  margin: 0;
}

.home__coverage {
  display: block;
  width: 100%;
  height: auto;
}

.home__coverage path {
  vector-effect: non-scaling-stroke;
  stroke-linejoin: round;
  stroke-width: 1;
}

.home__coverage-off {
  fill: none;
  stroke: var(--rule-strong);
}

.home__coverage-on {
  fill: var(--accent);
  fill-opacity: 0.55;
  stroke: var(--accent);
}

.home__coverage-key {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs) var(--space-md);
  margin-top: var(--space-sm);
  font: 400 9px var(--font-data);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.home__coverage-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.home__coverage-swatch {
  width: 10px;
  height: 10px;
  border: 1px solid var(--rule-strong);
}

.home__coverage-swatch--on {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 55%, transparent);
}

.home__register {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  column-gap: var(--space-xl);
  margin-top: var(--space-lg);
  padding: 0;
  list-style: none;
}

@media (min-width: 720px) {
  .home__register {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.home__register-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: var(--space-lg);
  padding: var(--space-md) 0;
  border-top: 1px solid var(--rule-strong);
}

/* The total closes the register on a heavier rule, as a sum line. */
.home__register-row--total {
  border-top-color: var(--ink);
}

.home__register-heading {
  margin-bottom: var(--space-xs);
  font: 600 18px/1.3 var(--font-ui);
  color: var(--ink);
}

.home__register-row--total .home__register-heading {
  font-weight: 500;
  color: var(--muted);
}

.home__register-body {
  font-size: 15px;
  color: var(--ink);
}

.home__register-body a {
  color: var(--ink);
}

/* The datasets link stands alone in its row: a 44px touch target. */
.home__data .home__register-body a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.home__register-figure {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  text-align: right;
}

.home__register-n {
  font: 500 22px/1.1 var(--font-data);
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}

.home__register-unit {
  max-width: 12ch;
  margin-top: 4px;
  font: 400 9px/1.4 var(--font-data);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

/* The provenance stamp (DESIGN.md): a drafted label, 2px, pinned to the foot. */
.home__value-stamp {
  margin-top: auto;
  padding: 5px 10px;
  border: 1px solid var(--rule-strong);
  border-radius: var(--r-data);
  font-family: var(--font-data);
  font-size: 9px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}

/* --- Legal pages (DESIGN.md § Legal pages): the Terms of Service and the
   Privacy Policy as a reading page, the quiet Terms · Privacy line, the
   draft notice, the placeholder mark and the sign-up consent box. --- */

.home__legal,
.legal-links,
.legal__foot {
  font-size: 12.5px;
  color: var(--muted);
}

.home__legal {
  padding: 0 clamp(24px, 6vw, 96px) clamp(16px, 3vh, 32px);
}

/* Each link a 44px touch target; the text and the dots between stay as they were. */
.home__legal a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.legal-links {
  margin-top: var(--space-md);
  text-align: center;
}

.home__legal a,
.legal-links a,
.legal__foot a {
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.home__legal a:hover,
.legal-links a:hover,
.legal__foot a:hover {
  color: var(--primary);
}

.legal {
  max-width: calc(72ch + 2 * var(--space-lg));
  margin: 0 auto;
  padding: var(--space-2xl) var(--space-lg) var(--space-3xl);
}

.legal__title {
  font-size: clamp(34px, 6vw, 44px);
  font-weight: 600;
  line-height: 1.1;
  margin-bottom: var(--space-sm);
}

.legal__stamp {
  font-family: var(--font-data);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: var(--space-lg);
}

.legal__intro {
  margin-bottom: var(--space-lg);
}

.legal-draft {
  display: flex;
  align-items: baseline;
  gap: var(--space-sm) 12px;
  flex-wrap: wrap;
  padding: var(--space-sm) 12px;
  margin-bottom: var(--space-xl);
  border: 1px solid var(--warning);
  border-radius: var(--r-box);
  background: color-mix(in srgb, var(--warning) 12%, var(--canvas));
  font-size: 13px;
}

.legal-draft__stamp {
  padding: 2px 8px;
  border: 1px solid var(--warning);
  border-radius: var(--r-data);
  font-family: var(--font-data);
  font-size: 9px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--warning);
}

.legal-toc {
  padding: var(--space-md) var(--space-lg);
  margin-bottom: var(--space-xl);
  border: 1px solid var(--rule-strong);
  border-radius: var(--r-box);
  background: var(--panel);
}

.legal-toc__title {
  font-family: var(--font-data);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: var(--space-sm);
}

.legal-toc ol {
  padding-left: var(--space-lg);
  columns: 2 280px;
  column-gap: var(--space-xl);
  font-size: 13.5px;
}

.legal-toc li {
  padding: 2px 0;
  break-inside: avoid;
}

.legal a {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.legal__body {
  counter-reset: legal-section;
}

.legal__body section {
  scroll-margin-top: var(--space-lg);
  margin-top: var(--space-xl);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--rule);
}

.legal__body h2 {
  counter-increment: legal-section;
  font-size: 22px;
  font-weight: 600;
  line-height: 1.25;
  margin-bottom: var(--space-sm);
}

.legal__body h2::before {
  content: counter(legal-section) ". ";
  font-family: var(--font-data);
  font-weight: 400;
  font-size: 0.8em;
  color: var(--muted);
}

.legal__body h3 {
  font-size: 15px;
  font-weight: 600;
  margin: var(--space-md) 0 var(--space-xs);
}

.legal__body p,
.legal__body ul {
  margin-bottom: var(--space-sm);
}

.legal__body ul {
  padding-left: var(--space-lg);
}

.legal__body li {
  margin-bottom: var(--space-xs);
}

.legal__body code {
  font-family: var(--font-data);
  font-size: 0.9em;
}

.legal__foot {
  margin-top: var(--space-2xl);
  padding-top: var(--space-md);
  border-top: 1px solid var(--rule);
}

/* A fact still to be filled in: visible, never hidden, so a draft cannot pass
   for finished text. */
.legal-placeholder {
  padding: 0 4px;
  border: 1px dashed var(--warning);
  border-radius: var(--r-data);
  background: color-mix(in srgb, var(--warning) 22%, transparent);
  color: var(--ink);
  font-family: var(--font-data);
  font-size: 0.9em;
}

/* The sign-up and acceptance consent box. */
.consent {
  margin-bottom: var(--space-md);
  font-size: 13px;
}

.consent__label {
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
  cursor: pointer;
}

.consent__box {
  flex: none;
  width: 16px;
  height: 16px;
  margin-top: 2px;
  border-radius: var(--r-chip);
  accent-color: var(--primary);
}

.consent a {
  color: var(--primary);
}

.consent__box:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.consent__error {
  margin-top: var(--space-xs);
  color: var(--error);
  font-size: 12.5px;
}

@media print {
  .legal-header,
  .legal-toc,
  .legal__foot {
    display: none;
  }

  html,
  body {
    background: white;
    height: auto;
  }

  .legal,
  .legal * {
    color: black !important;
  }

  .legal__body section {
    break-inside: avoid-page;
  }
}

/* --- Shared report viewer (DESIGN.md § Sharing): the read-only page a share
   link opens. A slim bar with the wordmark and nothing else; the report's
   slides (always Plat Room) below a title block with the downloads the link
   allows. The slides use the Reports step's rules (the wrapper carries
   .project-page) and scale in bands that fit the whole width. --- */

.shared-bar {
  display: flex;
  align-items: center;
  height: 40px;
  padding: 0 16px;
  border-bottom: 1px solid var(--rule);
}
.shared-main {
  padding: 0 32px var(--space-xl);
}
.shared-foot {
  margin-top: var(--space-xl);
  text-align: center;
}
.shared-noscript {
  padding: var(--space-xl) 0;
  color: var(--muted);
  font-size: 13px;
}
.project-page.shared .shared__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px 24px;
  padding: var(--space-lg) 0 var(--space-md);
}
.project-page.shared .shared__id {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-xs);
  min-width: 0;
}
.project-page.shared .shared__title {
  font: 600 28px/1.15 var(--font-ui);
  overflow-wrap: anywhere;
}
.project-page.shared .shared__for {
  color: var(--muted);
  font: 400 15px/1.4 var(--font-ui);
  overflow-wrap: anywhere;
}
.project-page.shared .shared__id .stamp {
  padding: 2px 6px;
  border: 1px solid var(--rule-strong);
  border-radius: var(--r-data);
}
.project-page.shared .shared__downloads {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}
.project-page.shared .shared__downloads .critbtn {
  height: 32px;
  padding: 0 12px;
}
.project-page.shared .shared__downloads .critbtn:disabled {
  opacity: 0.6;
  cursor: progress;
}
/* The slides' bands: the sidebar of the Reports step is not here, so each band
   is the width that fits (the slide is 1280px, the page keeps 32px gutters). */
.project-page.shared .report {
  zoom: 1;
}
@media screen and (max-width: 1343px) {
  .project-page.shared .report { zoom: 0.9; }
}
@media screen and (max-width: 1215px) {
  .project-page.shared .report { zoom: 0.8; }
}
@media screen and (max-width: 1087px) {
  .project-page.shared .report { zoom: 0.7; }
}
@media screen and (max-width: 959px) {
  .project-page.shared .report { zoom: 0.6; }
}
@media screen and (max-width: 831px) {
  .project-page.shared .report { zoom: 0.5; }
}
@media screen and (max-width: 703px) {
  .project-page.shared .report { zoom: 0.4; }
}
@media screen and (max-width: 575px) {
  .project-page.shared .report { zoom: 0.3; }
}
@media screen and (max-width: 447px) {
  .project-page.shared .report { zoom: 0.25; }
}
@media screen and (max-width: 639px) {
  .shared-main { padding: 0 16px var(--space-lg); }
}

/* --- The sharing dialog (DESIGN.md § The sharing dialog): the Reports step's
   Share button opens a modal on the shared shell with two tabs, the form that
   makes a link and the project's links below. Tokens only; wider than the
   other modals (640px) for the list. --- */

.project-page .reports__share {
  margin-left: auto;
}
.modal.share {
  width: min(640px, 100%);
}
.share__lead {
  margin-top: var(--space-xs);
  color: var(--muted);
  font: 400 13px/1.5 var(--font-ui);
}
.share__tabs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0 var(--space-md);
  margin-top: var(--space-md);
  border-bottom: 1px solid var(--rule-strong);
}
.share__tablist {
  display: flex;
  gap: 2px;
}
.share__tab {
  margin-bottom: -1px;
  padding: 9px 14px;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  font: 500 13px var(--font-ui);
  cursor: pointer;
}
.share__tab--on {
  color: var(--ink);
  border-bottom-color: var(--primary);
}
.share__tab[aria-disabled="true"] {
  cursor: not-allowed;
}
.share__tab:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: -2px;
}
.share__note {
  padding: var(--space-xs) 0;
  color: var(--muted);
  font: 400 11px var(--font-data);
}
.share__panel {
  padding-top: var(--space-xs);
}
.share fieldset.field {
  min-width: 0;
  border: 0;
  padding: 0;
}
.share__checks {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs) var(--space-md);
}
.share__check {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font: 400 13px var(--font-ui);
  cursor: pointer;
}
.share__box {
  flex: none;
  width: 16px;
  height: 16px;
  border-radius: var(--r-chip);
  accent-color: var(--primary);
}
.share__box:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}
.share__help {
  margin-top: var(--space-xs);
  color: var(--muted);
  font: 400 12px/1.45 var(--font-ui);
}
.share__acts {
  display: flex;
  justify-content: flex-end;
  margin-top: var(--space-md);
}
.share__h {
  font: 600 13px/1.4 var(--font-ui);
}
/* The link is shown once (DESIGN.md § Notices: warning). */
.share__warn {
  margin-top: var(--space-xs);
  padding: var(--space-sm) 12px;
  border: 1px solid var(--warning);
  border-radius: var(--r-box);
  background: color-mix(in srgb, var(--warning) 12%, var(--canvas));
  font: 600 13px/1.45 var(--font-ui);
}
.share__urlrow {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--space-xs) var(--space-sm);
  align-items: end;
  margin-top: var(--space-sm);
}
.share__urllabel {
  grid-column: 1 / -1;
  margin-bottom: 0;
}
.share__url {
  font: 400 12px var(--font-data);
}
.share__status {
  min-height: 20px;
  margin-top: var(--space-xs);
  color: var(--muted);
  font: 400 12px/1.5 var(--font-ui);
}
.share__summary {
  margin: var(--space-xs) 0 var(--space-md);
  color: var(--muted);
  font: 400 13px/1.5 var(--font-ui);
}
.share__list {
  margin-top: var(--space-lg);
  padding-top: var(--space-md);
  border-top: 1px solid var(--rule-strong);
}
.share__failed {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-sm);
  margin-top: var(--space-xs);
  color: var(--error);
  font: 400 13px/1.45 var(--font-ui);
}
.share__rows {
  margin-top: var(--space-xs);
  list-style: none;
}
.share__row {
  padding: 12px 0;
  border-bottom: 1px solid var(--rule);
}
.share__row:last-child {
  border-bottom: 0;
}
.share__row:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}
.share__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
}
.share__name {
  min-width: 0;
  font: 600 13px/1.4 var(--font-ui);
  overflow-wrap: anywhere;
}
.share__row--off .share__name,
.share__row--off .share__snap {
  color: var(--muted);
}
.share__badge {
  flex: none;
  padding: 1px 6px;
  border: 1px solid var(--rule-strong);
  border-radius: var(--r-data);
  color: var(--muted);
  font: 400 9px var(--font-data);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.share__badge--on {
  color: var(--ink);
}
.share__stamps {
  display: flex;
  flex: none;
  gap: 4px;
}
.share__inactive {
  margin-top: var(--space-sm);
}
.share__snap {
  font: 400 12.5px/1.45 var(--font-ui);
}
.share__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 2px var(--space-md);
  margin-top: 2px;
  color: var(--muted);
  font: 400 11px/1.5 var(--font-data);
}
.share__by {
  margin-top: 2px;
  color: var(--muted);
  font: 400 12px/1.45 var(--font-ui);
}
.share__confirm {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-sm);
  margin-top: var(--space-sm);
}
.share__ask {
  font: 400 12.5px var(--font-ui);
}
.share__rowerr {
  margin-top: var(--space-xs);
}
/* Invite by email (issue #186 Phase 3b): the addresses box and the message box
   are the form's own fields; the answer lists each address with what happened. */
.share__textarea {
  min-height: 64px;
  resize: vertical;
  font: 400 13px/1.45 var(--font-ui);
}
.share__results {
  margin-top: var(--space-sm);
  list-style: none;
}
.share__result {
  padding: var(--space-sm) 0;
  border-bottom: 1px solid var(--rule);
}
.share__result:last-child {
  border-bottom: 0;
}
.share__addr {
  font: 400 12px var(--font-data);
  overflow-wrap: anywhere;
}
.share__kind {
  color: var(--muted);
  font: 400 9px var(--font-data);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* "Shared with me" on the Projects page (DESIGN.md § Sharing): the register's
   own head and rows, three columns, under the projects. */
.projects-page .shared-with-me {
  margin-top: var(--space-2xl);
}
.projects-page .shared-with-me__title {
  margin: 0;
  padding: 0 32px;
  font: 600 22px var(--font-ui);
  letter-spacing: -0.01em;
  color: var(--ink);
}
.projects-page .shared-with-me__lead {
  margin: 4px 0 14px;
  padding: 0 32px;
  color: var(--muted);
  font: 400 13px var(--font-ui);
}
.projects-page .register__head--shared,
.projects-page .row--shared {
  grid-template-columns: minmax(230px, 3fr) minmax(170px, 2fr) 116px 30px;
}
.projects-page .shared-with-me__by {
  font: 400 13px var(--font-ui);
  color: var(--ink);
  overflow-wrap: anywhere;
}
@media (max-width: 699px) {
  .projects-page .shared-with-me__title,
  .projects-page .shared-with-me__lead { padding: 0 16px; }
  .projects-page .register__head--shared { display: none; }
  .projects-page .row--shared {
    grid-template-columns: minmax(0, 1fr) 30px;
    gap: 4px 12px;
    padding: 14px 16px;
  }
  .projects-page .row--shared > div:first-child { grid-column: 1; }
  .projects-page .row--shared .shared-with-me__by,
  .projects-page .row--shared .upd { grid-column: 1; }
  .projects-page .row--shared .chev { grid-column: 2; grid-row: 1 / span 3; }
}

/* The note a sender adds to a report invitation, on the invitation page. */
.auth-note {
  margin-bottom: var(--space-md);
  padding: var(--space-sm) 12px;
  background: var(--panel-2);
  border: 1px solid var(--rule);
  border-radius: var(--r-box);
}
.auth-note__label {
  color: var(--muted);
  font: 400 9px var(--font-data);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.auth-note__text {
  margin-top: 4px;
  font-size: 13px;
  white-space: pre-line;
  overflow-wrap: anywhere;
}

/* The way back from a report shared with a signed-in person. */
.shared-back {
  margin: var(--space-md) 0 0;
  font: 400 12.5px var(--font-ui);
}
.shared-back a {
  color: var(--primary);
}

/* Open data page (DESIGN.md § Open data page): the legal reading layout plus the file's card. */
.opendata__file {
  padding: var(--space-md);
  margin-bottom: var(--space-md);
  border: 1px solid var(--rule-strong);
  border-radius: var(--r-box);
  background: var(--panel);
}

.opendata__name {
  font-family: var(--font-data);
  font-size: 13px;
  overflow-wrap: anywhere;
  margin-bottom: var(--space-sm);
}

.opendata__facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: var(--space-sm) var(--space-md);
  margin: 0 0 var(--space-md);
}

.opendata__facts dt {
  font-family: var(--font-data);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.opendata__facts dd {
  margin: 2px 0 0;
  font-size: 15px;
}

.opendata__facts .opendata__hash {
  font-family: var(--font-data);
  font-size: 10.5px;
  overflow-wrap: anywhere;
}

.opendata__facts > div:last-child {
  grid-column: 1 / -1;
}

.opendata__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-sm) var(--space-md);
  margin: 0;
}

.opendata .opendata__button {
  display: inline-block;
  width: auto;
  text-decoration: none;
  color: var(--on-primary);
}

.opendata__pending {
  font-weight: 600;
}

@media print {
  .opendata__button {
    display: none;
  }
}

/* The credit and the way link on the MSA plate sit in the legend and readout strips, never over the data. */
.project-page .mlegend__note a,
.project-page .mplate__readout a {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* A project's Power page (DESIGN.md § Power page): the Incentive programs page's parts, plus the
   ownership mix line, the assessment form and its disclosures. */
.pow__flash {
  margin-top: var(--space-md);
  max-width: 720px;
}

.pow__mix {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
  margin-top: var(--space-sm);
}

.pow__credit {
  font-size: 12px;
  color: var(--muted);
}

.pow__notes {
  white-space: pre-line;
}

.pow__edit,
.pow__new {
  flex-basis: 100%;
}

.pow__new {
  margin-top: var(--space-md);
  font-size: 13px;
}

.pow__new > summary,
.pow__edit > summary {
  cursor: pointer;
  width: max-content;
}

.pow__form {
  margin-top: var(--space-sm);
  padding: var(--space-md);
  background: var(--panel);
  border: 1px solid var(--rule-strong);
  border-radius: var(--r-box);
  max-width: 880px;
}

.pow__fields {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0 var(--space-md);
}

.pow__field--wide {
  grid-column: 1 / -1;
}

.pow__check {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  margin: calc(-1 * var(--space-sm)) 0 var(--space-md);
  font-size: 12.5px;
  color: var(--muted);
}

.pow__hint {
  margin: 0 0 var(--space-sm);
  font-size: 12.5px;
  color: var(--muted);
}

.pow__delete {
  margin-top: var(--space-sm);
}

/* What the utility stated on a confirmed assessment (issue #345): each figure with, under it, where it
   is stated; then the review line in the row's foot. */
.pow__stated dd {
  max-width: 44ch;
}

.pow__stated-by {
  display: block;
  margin-top: 2px;
  font: 400 12px var(--font-ui);
  color: var(--muted);
}

.pow__stated-doc {
  color: var(--primary);
  overflow-wrap: anywhere;
}

.pow__review {
  font-size: 12px;
  color: var(--ink);
}

.pow__review-form {
  display: inline;
}

.pow__stated-intro {
  margin: var(--space-sm) 0;
  max-width: 88ch;
  font-size: 12.5px;
  color: var(--muted);
}

.pow__stated-set {
  margin: 0 0 var(--space-sm);
  padding: var(--space-sm) 0 0;
  border: 0;
  border-top: 1px solid var(--rule);
}

.pow__legend {
  padding: 0;
  margin-bottom: var(--space-xs);
  font: 400 10px var(--font-data);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.pow__on-file {
  margin: calc(-1 * var(--space-sm)) 0 var(--space-md);
  font-size: 12px;
  color: var(--muted);
  overflow-wrap: anywhere;
}
