/* ══════════════════════════════════════════════════════════════════
   SC Project Finder — Tampa plumber, Basic plan
   Card-based replacement for today's table-based finder.
   All values come from tokens.css. No hardcoded colors/spacing.
   ══════════════════════════════════════════════════════════════════ */

html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--typography-font-family-base), system-ui, sans-serif;
  font-size: var(--typography-font-size-s);
  line-height: var(--typography-line-height-m);
  color: var(--text-primary);
  background: var(--bg-surface);
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

*:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
  border-radius: var(--layout-radius-xs);
}

/* Make sure the hidden attribute always wins over component display rules */
[hidden] { display: none !important; }

button { font-family: inherit; cursor: pointer; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ── App header ──────────────────────────────────────────────────── */
.app-header {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--layout-space-m);
  padding: var(--layout-space-xs) var(--layout-space-l);
  background: var(--bg-canvas);
  border-bottom: var(--layout-border-default) solid var(--border-subtle);
  z-index: 100;
  flex-shrink: 0;
}
.app-header__left, .app-header__right {
  display: flex; align-items: center; gap: var(--layout-space-m);
}
.app-header__brand {
  display: flex; align-items: center; gap: var(--layout-space-xs);
  text-decoration: none; color: var(--text-primary);
}
.app-header__logo {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px;
  background: var(--action-primary-default);
  color: var(--action-on-action-primary);
  border-radius: var(--layout-radius-s);
  font-weight: var(--typography-font-weight-semi-bold);
  font-size: var(--typography-font-size-xs);
}
.app-header__brand-name {
  font-weight: var(--typography-font-weight-semi-bold);
  font-size: var(--typography-font-size-m);
}

.page-toggle {
  display: inline-flex;
  background: var(--bg-surface);
  border-radius: var(--layout-radius-full);
  padding: var(--layout-space-xxs);
  gap: 2px;
}
.page-toggle__btn {
  border: 0; background: transparent;
  padding: 6px var(--layout-space-s);
  border-radius: var(--layout-radius-full);
  font-size: var(--typography-font-size-s);
  font-weight: var(--typography-font-weight-medium);
  color: var(--text-tertiary);
}
.page-toggle__btn--active {
  background: var(--bg-canvas);
  color: var(--text-primary);
  box-shadow: var(--elevation-light-low);
}

.app-header__ai, .app-header__profile {
  display: inline-flex; align-items: center; gap: var(--layout-space-xxs);
  border: var(--layout-border-default) solid var(--border-subtle);
  background: var(--bg-canvas);
  padding: 6px var(--layout-space-s);
  border-radius: var(--layout-radius-full);
  color: var(--text-secondary);
  font-size: var(--typography-font-size-s);
  font-weight: var(--typography-font-weight-medium);
}
.app-header__ai .material-icons { color: var(--status-ai-icon); font-size: 18px; }
.app-header__profile { padding-left: var(--layout-space-xxs); }
.app-header__avatar {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px;
  background: var(--status-ai-surface);
  color: var(--status-ai-text);
  border-radius: var(--layout-radius-full);
  font-size: var(--typography-font-size-xs);
  font-weight: var(--typography-font-weight-semi-bold);
}

/* ── Scope bar: primary tabs (left) + sub-toggle (right) ─────────── */
.scope-bar {
  display: flex; align-items: center; justify-content: space-between;
  max-width: 1400px; width: 100%; margin: 0 auto;
  padding-bottom: var(--layout-space-s);
  border-bottom: var(--layout-border-default) solid var(--border-subtle);
  margin-bottom: var(--layout-space-s);
  flex-shrink: 0;
}
.scope-tabs { display: inline-flex; gap: var(--layout-space-s); }
.scope-tabs__btn {
  border: 0; background: transparent;
  padding: 8px 4px;
  font-size: var(--typography-font-size-m);
  font-weight: var(--typography-font-weight-semi-bold);
  color: var(--text-tertiary);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  cursor: pointer;
}
.scope-tabs__btn:hover { color: var(--text-primary); }
.scope-tabs__btn--active {
  color: var(--action-primary-default);
  border-bottom-color: var(--action-primary-default);
}

/* ── Screens ─────────────────────────────────────────────────────── */
.screen { display: none; padding: var(--layout-space-m) var(--layout-space-l); overflow-y: auto; }
.screen--active { display: block; }
/* Product screen specifically: fixed-viewport layout where only the project list scrolls */
#screen-product.screen--active {
  display: flex; flex-direction: column;
  flex: 1; min-height: 0;
  overflow: hidden;
}
#screen-product .scope-bar,
#screen-product .search-row,
#screen-product .controls,
#screen-product .results-meta { flex-shrink: 0; }
#screen-product .results-body {
  flex: 1; min-height: 0;
  overflow: hidden;
  height: auto;
  grid-template-rows: 1fr;
}
#screen-product #viewBoard {
  flex: 1; min-height: 0;
}

/* ── Search (inline) ─────────────────────────────────────────────── */
.ai-query {
  display: flex; align-items: center; gap: var(--layout-space-xs);
  padding: var(--layout-space-xs) var(--layout-space-s);
  background: var(--bg-canvas);
  border: var(--layout-border-default) solid var(--border-subtle);
  border-radius: var(--layout-radius-full);
  box-shadow: var(--elevation-light-low);
}
.ai-query:focus-within {
  border-color: var(--focus-ring);
  box-shadow: var(--elevation-light-medium);
}
.ai-query--inline {
  flex: 1 1 360px;
  min-width: 240px;
  max-width: 480px;
}
.ai-query--inline .ai-query__input { font-size: var(--typography-font-size-s); }
.ai-query__icon {
  width: 20px; height: 20px;
  color: var(--icon-subtle);
  flex: 0 0 auto;
  display: block;
}
.ai-query__input {
  flex: 1; border: 0; outline: 0; background: transparent;
  font-size: var(--typography-font-size-m);
  color: var(--text-primary);
}
.ai-query__input::placeholder {
  color: var(--text-tertiary);
  opacity: 0.7;
}
.ai-query__clear {
  border: 0; background: transparent;
  width: 28px; height: 28px;
  border-radius: var(--layout-radius-full);
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--icon-subtle);
}
.ai-query__clear:hover { background: var(--bg-surface); }

/* ── Controls (chip row + view toggle) ───────────────────────────── */
.controls {
  display: flex; align-items: center;
  gap: var(--layout-space-xs);
  max-width: 1400px; margin: 0 auto;
  width: 100%;
  flex-wrap: wrap;
}
.controls__chips {
  display: flex; align-items: center; flex-wrap: wrap;
  gap: var(--layout-space-xxs);
  flex: 1 1 auto; min-width: 0;
}
.save-link {
  border: 0; background: transparent;
  color: var(--action-primary-default);
  font-weight: var(--typography-font-weight-semi-bold);
  font-size: var(--typography-font-size-s);
  padding: 4px 6px;
  cursor: pointer;
}
.save-link:hover { color: var(--action-primary-hover); text-decoration: underline; }
.save-link[hidden] { display: none; }

/* Icon button (Other filters) */
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px;
  border: var(--layout-border-default) solid var(--border-subtle);
  background: var(--bg-canvas);
  color: var(--text-secondary);
  border-radius: var(--layout-radius-full);
  cursor: pointer;
}
.icon-btn:hover { background: var(--bg-surface-hover); color: var(--text-primary); }
.icon-btn .material-icons { font-size: 18px; }
.controls__actions {
  display: flex; align-items: center; gap: var(--layout-space-xs);
}
.chip-popover__opt--danger { color: var(--feedback-danger-text); }
.chip-popover__opt--danger .material-icons { color: var(--feedback-danger-text); }

.chip {
  display: inline-flex; align-items: center; gap: var(--layout-space-xxs);
  background: var(--bg-canvas);
  border: var(--layout-border-default) solid var(--border-subtle);
  padding: 6px var(--layout-space-s);
  border-radius: var(--layout-radius-full);
  font-size: var(--typography-font-size-s);
  color: var(--text-secondary);
  font-weight: var(--typography-font-weight-medium);
}
.chip--active {
  background: var(--selection-surface);
  border-color: var(--selection-border);
  color: var(--selection-text);
}
.chip__value { color: var(--text-primary); }
.chip__caret { font-size: 18px; color: var(--icon-subtle); }
.chip__clear {
  border: 0; background: transparent; padding: 0;
  display: inline-flex; align-items: center; color: var(--icon-subtle);
  margin-left: 2px;
}
.chip__clear:hover { color: var(--text-primary); }

.btn {
  display: inline-flex; align-items: center; gap: var(--layout-space-xxs);
  border-radius: var(--layout-radius-full);
  font-size: var(--typography-font-size-s);
  font-weight: var(--typography-font-weight-medium);
  padding: 8px var(--layout-space-s);
  border: var(--layout-border-default) solid transparent;
}
.btn--primary {
  background: var(--action-primary-default);
  color: var(--action-on-action-primary);
}
.btn--primary:hover { background: var(--action-primary-hover); }
.btn--secondary {
  background: var(--bg-canvas);
  border-color: var(--action-secondary-default);
  color: var(--action-on-action-secondary);
}
.btn--secondary:hover { background: var(--bg-surface); }
.btn--ghost {
  background: transparent;
  border-color: var(--border-subtle);
  color: var(--text-secondary);
}
.btn--ghost:hover { background: var(--bg-canvas); color: var(--text-primary); }
.btn--small { font-size: var(--typography-font-size-s); padding: 6px var(--layout-space-s); }
.btn .material-icons { font-size: 18px; }

.view-toggle {
  display: inline-flex; gap: 2px;
  background: var(--bg-canvas);
  border: var(--layout-border-default) solid var(--border-subtle);
  border-radius: var(--layout-radius-full);
  padding: 2px;
}
.view-toggle__btn {
  display: inline-flex; align-items: center; gap: var(--layout-space-xxs);
  border: 0; background: transparent;
  padding: 6px var(--layout-space-s);
  border-radius: var(--layout-radius-full);
  font-size: var(--typography-font-size-s);
  font-weight: var(--typography-font-weight-medium);
  color: var(--text-tertiary);
}
.view-toggle__btn .material-icons { font-size: 18px; }
.view-toggle__btn--active {
  background: var(--bg-inverse);
  color: var(--text-inverse);
}

/* ── Results meta ────────────────────────────────────────────────── */
.results-meta {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--layout-space-s);
  width: 100%;
  max-width: 1400px;
  margin: var(--layout-space-s) auto;
  flex-wrap: wrap;
}
.results-meta__sort {
  display: inline-flex; align-items: center; gap: var(--layout-space-xs);
  color: var(--text-secondary);
  font-size: var(--typography-font-size-s);
}
.results-meta__sort-btn {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 8px 4px 10px;
  border: var(--layout-border-default) solid var(--border-subtle);
  background: var(--bg-canvas);
  border-radius: var(--layout-radius-full);
  font-size: var(--typography-font-size-s);
  color: var(--text-primary);
  cursor: pointer;
}
.results-meta__sort-btn:hover { background: var(--bg-surface-hover); }
.results-meta__sort-btn .material-icons { font-size: 18px; color: var(--icon-subtle); }
.results-meta__count {
  color: var(--text-secondary);
  font-size: var(--typography-font-size-s);
}
.results-meta__count strong {
  color: var(--text-primary);
  font-size: var(--typography-font-size-m);
}
.results-meta__split {
  color: var(--text-tertiary);
  margin-left: var(--layout-space-xs);
}
.results-meta__saved-views {
  display: flex; align-items: center; gap: var(--layout-space-xs);
  flex-wrap: wrap;
}
.results-meta__saved-label {
  display: inline-flex; align-items: center; gap: var(--layout-space-xxs);
  color: var(--text-secondary);
  font-size: var(--typography-font-size-s);
  font-weight: var(--typography-font-weight-medium);
}
.results-meta__saved-label .material-icons { font-size: 16px; color: var(--icon-subtle); }
.saved-views { display: flex; gap: var(--layout-space-xxs); flex-wrap: wrap; }
.saved-view {
  display: inline-flex; align-items: center; gap: var(--layout-space-xxs);
  background: var(--status-ai-surface);
  color: var(--status-ai-text);
  border: var(--layout-border-default) solid var(--status-ai-border);
  padding: 4px 12px;
  border-radius: var(--layout-radius-full);
  font-size: var(--typography-font-size-xs);
  font-weight: var(--typography-font-weight-medium);
}
.saved-view__bell {
  font-size: 14px !important;
  color: var(--status-ai-text);
}
.saved-view__remove {
  border: 0; background: transparent; padding: 0; color: inherit;
  display: inline-flex; align-items: center;
}
.saved-view__remove .material-icons { font-size: 14px; }

/* Chip popover (filter dropdown) — above Leaflet's panes (default max 700) */
.chip-popover {
  z-index: 1000;
  min-width: 200px;
  background: var(--bg-canvas);
  border: var(--layout-border-default) solid var(--border-default);
  border-radius: var(--layout-radius-m);
  box-shadow: var(--elevation-light-high);
  padding: var(--layout-space-xxs);
  display: flex; flex-direction: column;
}
.chip-popover__opt {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--layout-space-xs);
  border: 0; background: transparent;
  padding: 8px var(--layout-space-s);
  border-radius: var(--layout-radius-s);
  font-size: var(--typography-font-size-s);
  color: var(--text-primary);
  text-align: left;
  width: 100%;
}
.chip-popover__opt:hover { background: var(--bg-surface-hover); }
.chip-popover__opt--selected {
  color: var(--action-primary-default);
  font-weight: var(--typography-font-weight-semi-bold);
}
.chip-popover__opt .material-icons { font-size: 18px; color: var(--action-primary-default); }
.chip-popover__opt--multi { gap: 0; }
.chip-popover__opt--multi .chip-popover__check {
  color: var(--icon-subtle);
  margin-right: var(--layout-space-xs);
}
.chip-popover__opt--multi.chip-popover__opt--selected .chip-popover__check {
  color: var(--action-primary-default);
}
.chip-popover__divider-label {
  padding: var(--layout-space-xxs) var(--layout-space-s);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: var(--typography-letter-spacing-wide);
  color: var(--text-tertiary);
  font-weight: var(--typography-font-weight-semi-bold);
  margin-top: var(--layout-space-xxs);
  border-top: var(--layout-border-default) solid var(--border-subtle);
  padding-top: var(--layout-space-xs);
}
.chip-popover__opt-label { flex: 1; text-align: left; }
.chip-popover__clear-all {
  border: 0; background: transparent;
  border-top: var(--layout-border-default) solid var(--border-subtle);
  margin-top: var(--layout-space-xxs);
  padding: 8px var(--layout-space-s);
  font-size: var(--typography-font-size-s);
  color: var(--text-tertiary);
  font-weight: var(--typography-font-weight-medium);
  text-align: left;
  width: 100%;
  border-radius: 0 0 var(--layout-radius-s) var(--layout-radius-s);
}
.chip-popover__clear-all:hover { color: var(--text-primary); background: var(--bg-surface-hover); }

/* Upgrade upsell row inside the Radius popover — same visual language as the
   locked-card coverage banner: gold ribbon + light-blue surface. */
.chip-popover__upsell {
  display: flex; align-items: center; gap: var(--layout-space-xs);
  border: 0;
  border-top: var(--layout-border-default) solid var(--border-subtle);
  margin-top: var(--layout-space-xxs);
  padding: var(--layout-space-xs) var(--layout-space-s);
  background: var(--status-highlight-surface);
  color: var(--status-highlight-text);
  text-align: left;
  width: 100%;
  border-radius: 0 0 var(--layout-radius-s) var(--layout-radius-s);
  cursor: pointer;
}
.chip-popover__upsell:hover { background: var(--status-highlight-surface-hover); }
.chip-popover__upsell-ribbon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px;
  background: var(--color-primitives-yellow-500);
  color: var(--color-primitives-neutral-800);
  border-radius: var(--layout-radius-xs);
  flex-shrink: 0;
}
.chip-popover__upsell-ribbon .material-icons { font-size: 18px; }
.chip-popover__upsell-copy {
  display: flex; flex-direction: column; gap: 1px;
  min-width: 0;
}
.chip-popover__upsell-title {
  font-weight: var(--typography-font-weight-semi-bold);
  font-size: var(--typography-font-size-s);
}
.chip-popover__upsell-sub {
  font-size: var(--typography-font-size-xs);
  opacity: 0.85;
}

/* Toast */
.toast {
  position: fixed;
  bottom: var(--layout-space-l);
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background: var(--bg-inverse);
  color: var(--text-inverse);
  padding: var(--layout-space-xs) var(--layout-space-m);
  border-radius: var(--layout-radius-full);
  font-size: var(--typography-font-size-s);
  box-shadow: var(--elevation-dark-high);
  z-index: 300;
  opacity: 0;
  transition: opacity 200ms, transform 200ms;
  max-width: 90vw;
}
.toast--show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.toast { display: inline-flex; align-items: center; gap: var(--layout-space-s); }
.toast__undo {
  border: 0;
  background: transparent;
  color: var(--color-primitives-green-300);
  font-weight: var(--typography-font-weight-semi-bold);
  font-size: var(--typography-font-size-s);
  padding: 4px 12px;
  border-radius: var(--layout-radius-full);
  text-transform: uppercase;
  letter-spacing: var(--typography-letter-spacing-wide);
}
.toast__undo:hover { background: rgba(255,255,255,0.08); color: var(--text-inverse); }

/* Saved-search chip — has its own visual treatment */
.chip--saved {
  background: var(--status-ai-surface);
  border-color: var(--status-ai-border);
  color: var(--status-ai-text);
}
.chip--saved .chip__value { color: var(--status-ai-text); font-weight: var(--typography-font-weight-semi-bold); }
.chip__dirty {
  display: inline-block;
  width: 8px; height: 8px;
  background: var(--color-primitives-orange-500);
  border-radius: 50%;
}

/* Saved-search popover */
.saved-pop {
  min-width: 320px;
  max-width: 400px;
  padding: var(--layout-space-xxs) 0;
}
.saved-pop__action {
  display: flex; align-items: center; gap: var(--layout-space-xs);
  border: 0; background: transparent;
  padding: 10px var(--layout-space-s);
  font-size: var(--typography-font-size-s);
  color: var(--text-primary);
  width: 100%;
  text-align: left;
}
.saved-pop__action:hover { background: var(--bg-surface-hover); }
.saved-pop__action .material-icons { font-size: 18px; color: var(--icon-subtle); }
.saved-pop__action--primary {
  color: var(--action-primary-default);
  font-weight: var(--typography-font-weight-semi-bold);
}
.saved-pop__action--primary .material-icons { color: var(--action-primary-default); }
.saved-pop__action--add { color: var(--text-secondary); }
.saved-pop__divider {
  height: 1px; background: var(--border-subtle); margin: var(--layout-space-xxs) 0;
}
.saved-pop__empty {
  padding: var(--layout-space-s);
  font-size: var(--typography-font-size-s);
  color: var(--text-tertiary);
  text-align: center;
}
.saved-pop__item {
  display: flex; align-items: stretch;
}
.saved-pop__item--active { background: var(--bg-surface-hover); }
.saved-pop__apply {
  flex: 1;
  border: 0; background: transparent;
  padding: 10px var(--layout-space-s);
  text-align: left;
  display: flex; align-items: stretch;
  gap: var(--layout-space-xs);
}
.saved-pop__apply:hover { background: var(--bg-surface-hover); }
.saved-pop__item-main {
  display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1;
}
.saved-pop__item-name {
  font-size: var(--typography-font-size-s);
  font-weight: var(--typography-font-weight-semi-bold);
  color: var(--text-primary);
  display: inline-flex; align-items: center; gap: 4px;
}
.saved-pop__item-name .material-icons { font-size: 16px; color: var(--action-primary-default); }
.saved-pop__item-freq {
  font-size: var(--typography-font-size-xs);
  color: var(--status-ai-text);
  display: inline-flex; align-items: center; gap: 4px;
  margin-top: 2px;
}
.saved-pop__item-freq .material-icons { font-size: 14px; }
.saved-pop__delete {
  border: 0; background: transparent;
  padding: 0 var(--layout-space-s);
  color: var(--icon-subtle);
  display: flex; align-items: center; justify-content: center;
}
.saved-pop__delete:hover { color: var(--feedback-danger-text); background: var(--bg-surface-hover); }

/* Modal */
.modal[hidden] { display: none !important; }
.modal {
  position: fixed; inset: 0;
  z-index: 400;
  display: flex; align-items: center; justify-content: center;
}
.modal__backdrop {
  position: absolute; inset: 0;
  background: var(--bg-overlay);
}
.modal__panel {
  position: relative;
  background: var(--bg-canvas);
  border-radius: var(--layout-radius-l);
  box-shadow: var(--elevation-light-high);
  width: 440px; max-width: 92vw;
  display: flex; flex-direction: column;
  overflow: hidden;
}
.modal__head {
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--layout-space-s) var(--layout-space-m);
  border-bottom: var(--layout-border-default) solid var(--border-subtle);
}
.modal__title {
  margin: 0;
  font-size: var(--typography-font-size-l);
  font-weight: var(--typography-font-weight-semi-bold);
}
.modal__close {
  border: 0; background: transparent;
  width: 32px; height: 32px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--layout-radius-full);
  color: var(--icon-subtle);
}
.modal__close:hover { background: var(--bg-surface); color: var(--text-primary); }
.modal__body {
  padding: var(--layout-space-m);
  display: flex; flex-direction: column;
  gap: var(--layout-space-xs);
}
.modal__label {
  font-size: var(--typography-font-size-xs);
  font-weight: var(--typography-font-weight-semi-bold);
  text-transform: uppercase;
  letter-spacing: var(--typography-letter-spacing-wide);
  color: var(--text-tertiary);
  margin-top: var(--layout-space-xs);
}
.modal__label:first-child { margin-top: 0; }
.modal__input {
  border: var(--layout-border-default) solid var(--border-default);
  border-radius: var(--layout-radius-s);
  padding: 8px var(--layout-space-s);
  font-size: var(--typography-font-size-m);
  font-family: inherit;
  color: var(--text-primary);
  background: var(--bg-canvas);
}
.modal__input:focus {
  outline: 2px solid var(--focus-ring);
  outline-offset: -1px;
  border-color: var(--focus-ring);
}
.modal__summary {
  background: var(--bg-surface);
  padding: var(--layout-space-xs) var(--layout-space-s);
  border-radius: var(--layout-radius-s);
  font-size: var(--typography-font-size-s);
  color: var(--text-secondary);
}
.modal__seg {
  display: inline-flex;
  background: var(--bg-surface);
  border-radius: var(--layout-radius-full);
  padding: 2px;
}
.modal__seg-btn {
  border: 0; background: transparent;
  padding: 6px var(--layout-space-s);
  border-radius: var(--layout-radius-full);
  font-size: var(--typography-font-size-s);
  font-weight: var(--typography-font-weight-medium);
  color: var(--text-tertiary);
}
.modal__seg-btn--active {
  background: var(--bg-canvas);
  color: var(--text-primary);
  box-shadow: var(--elevation-light-low);
}
.modal__foot {
  display: flex; justify-content: flex-end; gap: var(--layout-space-xs);
  padding: var(--layout-space-s) var(--layout-space-m);
  border-top: var(--layout-border-default) solid var(--border-subtle);
  background: var(--bg-surface-hover);
}

/* ── Cards + map body ────────────────────────────────────────────── */
.results-body {
  display: grid;
  grid-template-columns: 420px 1fr;
  gap: var(--layout-space-s);
  max-width: 1400px; margin: 0 auto;
  width: 100%;
}
.results-map {
  height: 100%;
  background: var(--bg-canvas);
  border: var(--layout-border-default) solid var(--border-subtle);
  border-radius: var(--layout-radius-m);
  overflow: hidden;
}
.results-map__inner { width: 100%; height: 100%; }
.results-list {
  display: flex; flex-direction: column; gap: var(--layout-space-s);
  overflow-y: auto;
  padding-right: var(--layout-space-xs);
  min-height: 0;
}
.results-empty {
  text-align: center; padding: var(--layout-space-xxl);
  color: var(--text-tertiary);
  background: var(--bg-canvas);
  border-radius: var(--layout-radius-m);
}
.results-empty .material-icons { font-size: 48px; margin-bottom: var(--layout-space-xs); }

/* ── Project card (shared shape) ─────────────────────────────────── */
.proj-card {
  background: var(--bg-canvas);
  border: var(--layout-border-default) solid var(--border-subtle);
  border-radius: var(--layout-radius-m);
  padding: var(--layout-space-s);
  display: flex; flex-direction: column;
  gap: var(--layout-space-xs);
  transition: box-shadow 150ms, transform 150ms;
  position: relative;
}
.proj-card:hover,
.proj-card--hover { box-shadow: var(--elevation-light-medium); cursor: pointer; }
.proj-card--selected { border-color: var(--selection-border); box-shadow: var(--elevation-light-medium); }

.proj-card__top {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: var(--layout-space-s);
}
.proj-card__title-block { min-width: 0; flex: 1; }
.proj-card__type {
  font-size: var(--typography-font-size-xs);
  color: var(--text-tertiary);
  font-weight: var(--typography-font-weight-medium);
  text-transform: uppercase;
  letter-spacing: var(--typography-letter-spacing-wide);
}
.proj-card__name {
  margin: 2px 0 0;
  font-size: var(--typography-font-size-l);
  line-height: var(--typography-line-height-l);
  font-weight: var(--typography-font-weight-semi-bold);
  color: var(--text-primary);
}

.proj-card__value-block {
  text-align: right;
  display: flex; flex-direction: column; align-items: flex-end;
  gap: 2px;
}
.proj-card__value-row {
  display: inline-flex; align-items: center; gap: var(--layout-space-xxs);
}

/* "Top match" badge — sits next to the value, top right of the card. */
.top-match-badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px 2px 6px;
  background: var(--status-ai-surface);
  color: var(--status-ai-text);
  border: 1px solid var(--status-ai-border);
  border-radius: var(--layout-radius-full);
  font-size: var(--typography-font-size-xs);
  font-weight: var(--typography-font-weight-bold);
  margin-right: var(--layout-space-xs);
  white-space: nowrap;
}
.top-match-badge .material-icons {
  font-size: 14px;
  color: var(--status-ai-icon);
}

/* Skeleton loader — animated placeholders for lazy-load. */
.skeleton-loader {
  display: flex; flex-direction: column;
  gap: var(--layout-space-s);
  padding: var(--layout-space-s) 0;
}
.skeleton-loader__note {
  text-align: center;
  font-size: var(--typography-font-size-xs);
  color: var(--text-tertiary);
  font-style: italic;
  padding: var(--layout-space-xs) 0;
}
.skeleton-card {
  background: var(--bg-canvas);
  border: var(--layout-border-default) solid var(--border-subtle);
  border-radius: var(--layout-radius-l);
  padding: var(--layout-space-m);
  display: flex; flex-direction: column; gap: var(--layout-space-xs);
}
.skeleton-card__eyebrow,
.skeleton-card__title,
.skeleton-card__line {
  background: linear-gradient(90deg,
    var(--bg-surface) 0%,
    var(--bg-surface-hover) 50%,
    var(--bg-surface) 100%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.4s ease-in-out infinite;
  border-radius: var(--layout-radius-s);
}
.skeleton-card__eyebrow { height: 10px; width: 35%; }
.skeleton-card__title   { height: 18px; width: 65%; margin-bottom: 4px; }
.skeleton-card__line    { height: 12px; width: 95%; }
.skeleton-card__line--short { width: 60%; }
@keyframes skeleton-shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.bookmark {
  width: 28px; height: 28px;
  border: 0; background: transparent;
  border-radius: var(--layout-radius-full);
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--icon-subtle);
  padding: 0;
}
.bookmark:hover { background: var(--bg-surface); color: var(--text-primary); }
.bookmark--on { color: var(--action-primary-default); }
.bookmark--on:hover { color: var(--action-primary-hover); }
.bookmark .material-icons { font-size: 20px; }

.proj-card__value {
  display: block;
  font-size: var(--typography-font-size-l);
  font-weight: var(--typography-font-weight-semi-bold);
  color: var(--text-primary);
}
.proj-card__due {
  display: block;
  font-size: var(--typography-font-size-xs);
  color: var(--text-tertiary);
  margin-top: 2px;
}
.proj-card__due--urgent { color: var(--status-warning-text); font-weight: var(--typography-font-weight-semi-bold); }

.proj-card__meta {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: var(--layout-space-xxs) var(--layout-space-xs);
  font-size: var(--typography-font-size-s);
  color: var(--text-secondary);
}
.proj-card__meta-sep { color: var(--text-tertiary); }
.proj-card__status {
  display: inline-flex; align-items: center;
  padding: 2px 10px;
  border-radius: var(--layout-radius-full);
  font-size: var(--typography-font-size-xs);
  font-weight: var(--typography-font-weight-medium);
  background: var(--status-success-surface);
  color: var(--status-success-text);
  border: var(--layout-border-default) solid var(--status-success-border);
}
.proj-card__status--closed {
  background: var(--status-neutral-surface);
  color: var(--status-neutral-text);
  border-color: var(--status-neutral-border);
}
.proj-card__status--awarded {
  background: var(--status-ai-surface);
  color: var(--status-ai-text);
  border-color: var(--status-ai-border);
}

.proj-card__summary {
  margin: 0;
  font-size: var(--typography-font-size-s);
  color: var(--text-secondary);
  line-height: var(--typography-line-height-m);
}

/* Propensity row — GC count + AI-derived "you've worked with before" insight */
.propensity {
  display: flex; align-items: center; gap: var(--layout-space-xxs);
  font-size: var(--typography-font-size-s);
  color: var(--text-secondary);
}
.propensity .material-icons { font-size: 18px; color: var(--icon-subtle); flex-shrink: 0; }
.propensity__copy { min-width: 0; }
.propensity strong { color: var(--text-primary); font-weight: var(--typography-font-weight-semi-bold); }
.propensity__names { color: var(--text-tertiary); }
.propensity__others { color: var(--text-tertiary); }
.propensity__insight {
  color: var(--status-ai-text);
  background: var(--status-ai-surface);
  padding: 2px 8px;
  border-radius: var(--layout-radius-full);
  font-weight: var(--typography-font-weight-medium);
}
.propensity__insight strong { color: var(--status-ai-text); }

/* Pursuit pill — only when the sub has acted on this card */
.pursuit-pill {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 10px 2px 6px;
  border-radius: var(--layout-radius-full);
  font-size: var(--typography-font-size-xs);
  font-weight: var(--typography-font-weight-semi-bold);
  background: var(--status-ai-surface);
  color: var(--status-ai-text);
  border: var(--layout-border-default) solid var(--status-ai-border);
}
.pursuit-pill .material-icons { font-size: 14px; }
.pursuit-pill--saved {
  background: var(--feedback-info-surface);
  color: var(--feedback-info-text);
  border-color: var(--feedback-info-border);
}
.pursuit-pill--intent {
  background: var(--status-success-surface);
  color: var(--status-success-text);
  border-color: var(--status-success-border);
}
.pursuit-pill--submitted {
  background: var(--status-ai-surface);
  color: var(--status-ai-text);
  border-color: var(--status-ai-border);
}
.pursuit-pill--won {
  background: var(--feedback-success-surface);
  color: var(--feedback-success-text);
  border-color: var(--feedback-success-border);
}
.pursuit-pill--lost {
  background: var(--feedback-danger-surface);
  color: var(--feedback-danger-text);
  border-color: var(--feedback-danger-border);
}

/* Card actions */
.proj-card__actions {
  display: flex; align-items: center; gap: var(--layout-space-s);
  margin-top: var(--layout-space-xxs);
  padding-top: var(--layout-space-xs);
  border-top: var(--layout-border-default) solid var(--border-subtle);
}
.btn--review {
  background: var(--action-primary-default);
  border-color: var(--action-primary-default);
  color: var(--action-on-action-primary);
  font-weight: var(--typography-font-weight-semi-bold);
}
.btn--review:hover {
  background: var(--action-primary-hover);
  border-color: var(--action-primary-hover);
}
.btn--review .material-icons { color: var(--icon-on-action); font-size: 16px; }

.btn--preview {
  background: var(--bg-canvas);
  border-color: var(--border-default);
  color: var(--text-primary);
  font-weight: var(--typography-font-weight-medium);
}
.btn--preview:hover {
  border-color: var(--status-highlight-text);
  color: var(--status-highlight-text);
}
.btn--preview .material-icons { color: var(--icon-subtle); font-size: 16px; }
.btn--preview:hover .material-icons { color: var(--status-highlight-text); }

.btn--intent {
  background: var(--bg-canvas);
  border-color: var(--action-primary-default);
  color: var(--action-primary-default);
  font-weight: var(--typography-font-weight-semi-bold);
}
.btn--intent:hover {
  background: var(--feedback-success-surface);
  border-color: var(--action-primary-hover);
  color: var(--action-primary-hover);
}
.btn--intent .material-icons { color: var(--action-primary-default); font-size: 16px; }
.btn--intent:hover .material-icons { color: var(--action-primary-hover); }

.link-action {
  border: 0; background: transparent;
  color: var(--text-tertiary);
  font-size: var(--typography-font-size-s);
  font-weight: var(--typography-font-weight-medium);
  padding: 6px 4px;
  text-decoration: none;
}
.link-action:hover { color: var(--text-primary); text-decoration: underline; }
.link-action--undo {
  color: var(--action-primary-default);
  font-weight: var(--typography-font-weight-semi-bold);
}
.link-action--undo:hover { color: var(--action-primary-hover); }

/* Declined card — dimmed, primary action disabled */
.proj-card--declined {
  opacity: 0.5;
}
.proj-card--declined .btn--review,
.proj-card--declined .btn--preview,
.proj-card--declined .bookmark,
.proj-card--declined .coverage-banner__cta {
  pointer-events: none;
  opacity: 0.6;
}


/* ── Out-of-coverage treatment ───────────────────────────────────── */
.proj-card--locked {
  background: var(--bg-surface-hover);
}
.proj-card--locked .proj-card__name,
.proj-card--locked .proj-card__value,
.proj-card--locked .proj-card__summary,
.proj-card--locked .proj-card__meta { opacity: 0.78; }

.coverage-banner {
  display: flex; align-items: center; gap: var(--layout-space-xs);
  padding: var(--layout-space-xs) var(--layout-space-s);
  background: var(--status-highlight-surface);
  border: var(--layout-border-default) solid var(--status-highlight-border);
  border-radius: var(--layout-radius-s);
  font-size: var(--typography-font-size-s);
  color: var(--status-highlight-text);
}
.coverage-banner__ribbon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px;
  background: var(--color-primitives-yellow-500);
  color: var(--color-primitives-neutral-800);
  border-radius: var(--layout-radius-xs);
  flex-shrink: 0;
}
.coverage-banner__ribbon .material-icons { font-size: 16px; }
.coverage-banner__copy { flex: 1; min-width: 0; }
.coverage-banner__title {
  display: block;
  font-weight: var(--typography-font-weight-semi-bold);
  color: var(--status-highlight-text);
}
.coverage-banner__sub {
  display: block;
  font-size: var(--typography-font-size-xs);
  color: var(--status-highlight-text);
  opacity: 0.85;
}
.coverage-banner__cta {
  border: var(--layout-border-default) solid var(--color-primitives-yellow-600);
  background: var(--color-primitives-yellow-500);
  color: var(--color-primitives-neutral-800);
  padding: 6px var(--layout-space-s);
  border-radius: var(--layout-radius-full);
  font-size: var(--typography-font-size-s);
  font-weight: var(--typography-font-weight-semi-bold);
}
.coverage-banner__cta:hover {
  background: var(--color-primitives-yellow-600);
  border-color: var(--color-primitives-yellow-700);
}

.locked-gc-count {
  display: inline-flex; align-items: center; gap: var(--layout-space-xxs);
  font-size: var(--typography-font-size-s);
  color: var(--text-secondary);
}
.locked-gc-count__known {
  color: var(--feedback-success-text);
  font-weight: var(--typography-font-weight-medium);
}

/* ══════════════════════════════════════════════════════════════════
   Bid Board
   ══════════════════════════════════════════════════════════════════ */
.board {
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1;
}
/* Icon-only square sub-toggle inside Bid Board */
.board-subview {
  display: inline-flex; gap: 4px;
  background: var(--bg-surface);
  border-radius: var(--layout-radius-s);
  padding: 2px;
}
.board-subview__btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 32px;
  border: 0; background: transparent;
  border-radius: var(--layout-radius-xs);
  color: var(--icon-subtle);
  cursor: pointer;
}
.board-subview__btn:hover { background: var(--bg-canvas); color: var(--text-secondary); }
.board-subview__btn--active {
  background: var(--bg-canvas);
  color: var(--text-primary);
  box-shadow: var(--elevation-light-low);
}
.board-subview__btn .material-icons { font-size: 18px; }

.board__body {
  flex: 1; min-height: 0;
  display: flex; flex-direction: column;
}
.board__kanban {
  flex: 1; min-height: 0;
  display: grid;
  grid-template-columns: repeat(5, minmax(220px, 1fr));
  gap: var(--layout-space-xs);
}
.board__calendar { flex: 1; }
.board__map {
  flex: 1; min-height: 0;
  background: var(--bg-canvas);
  border: var(--layout-border-default) solid var(--border-subtle);
  border-radius: var(--layout-radius-m);
  overflow: hidden;
}
.board__map-inner { width: 100%; height: 100%; }
/* Pursuit-state-tinted markers for the Bid Board map */
.map-marker--col-saved     { background: var(--feedback-info-text);    color: var(--bg-canvas); }
.map-marker--col-intent    { background: var(--feedback-success-text); color: var(--bg-canvas); }
.map-marker--col-preparing { background: var(--color-primitives-purple-500); color: var(--bg-canvas); }
.map-marker--col-submitted { background: var(--status-ai-text);        color: var(--bg-canvas); }
.map-marker--col-won-lost  { background: var(--color-primitives-yellow-600); color: var(--color-primitives-neutral-800); }

.board-col {
  background: var(--bg-surface-raised);
  border-radius: var(--layout-radius-m);
  display: flex; flex-direction: column;
  min-height: 0;
  transition: background 120ms;
}
.board-col.drag-over {
  background: var(--feedback-success-surface);
  outline: 2px dashed var(--feedback-success-border);
  outline-offset: -2px;
}
.board-col__head {
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--layout-space-xs) var(--layout-space-s);
}
.board-col__label {
  font-size: var(--typography-font-size-s);
  font-weight: var(--typography-font-weight-semi-bold);
  color: var(--text-primary);
}
.board-col__count {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 22px; height: 22px;
  padding: 0 6px;
  background: var(--bg-canvas);
  color: var(--text-secondary);
  border-radius: var(--layout-radius-full);
  font-size: var(--typography-font-size-xs);
  font-weight: var(--typography-font-weight-semi-bold);
}
.board-col__body {
  flex: 1; min-height: 0;
  overflow-y: auto;
  padding: 0 var(--layout-space-xs) var(--layout-space-xs);
  display: flex; flex-direction: column;
  gap: var(--layout-space-xs);
}
.board-col__empty {
  padding: var(--layout-space-s) var(--layout-space-xs);
  font-size: var(--typography-font-size-xs);
  color: var(--text-tertiary);
  text-align: center;
  font-style: italic;
  opacity: 0.7;
  background: transparent;
  border: 0;
}

.board-card {
  background: var(--bg-canvas);
  border: var(--layout-border-default) solid var(--border-subtle);
  border-radius: var(--layout-radius-s);
  padding: var(--layout-space-xs) var(--layout-space-s);
  display: flex; flex-direction: column;
  gap: 4px;
  cursor: grab;
  position: relative;
}
.board-card:hover { box-shadow: var(--elevation-light-low); }
.board-card.dragging { opacity: 0.4; cursor: grabbing; }
.board-card--locked { background: var(--bg-surface-hover); }
.board-card__lock {
  position: absolute; top: 4px; right: 4px;
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px;
  background: var(--color-primitives-yellow-500);
  color: var(--color-primitives-neutral-800);
  border-radius: var(--layout-radius-xs);
}
.board-card__lock .material-icons { font-size: 14px; }
.board-card__head {
  display: flex; justify-content: space-between; align-items: center;
}
.board-card__type {
  font-size: 10px;
  letter-spacing: var(--typography-letter-spacing-wide);
  text-transform: uppercase;
  color: var(--text-tertiary);
  font-weight: var(--typography-font-weight-medium);
}
.board-card__value {
  font-size: var(--typography-font-size-s);
  font-weight: var(--typography-font-weight-semi-bold);
  color: var(--text-primary);
}
.board-card__name {
  margin: 0;
  font-size: var(--typography-font-size-s);
  font-weight: var(--typography-font-weight-semi-bold);
  color: var(--text-primary);
  line-height: var(--typography-line-height-s);
}
.board-card__meta {
  display: flex; align-items: center; gap: 4px;
  font-size: var(--typography-font-size-xs);
  color: var(--text-tertiary);
}
.board-card__meta-sep { color: var(--text-disabled); }
.board-card__due--urgent { color: var(--status-warning-text); font-weight: var(--typography-font-weight-semi-bold); }
.board-card--declined { opacity: 0.7; }

.board__foot {
  flex-shrink: 0;
  padding: var(--layout-space-xs) 0;
  border-top: var(--layout-border-default) solid var(--border-subtle);
  margin-top: var(--layout-space-xs);
}
.board__declined-toggle {
  display: inline-flex; align-items: center; gap: var(--layout-space-xxs);
  border: 0; background: transparent;
  padding: 6px var(--layout-space-s);
  color: var(--text-tertiary);
  font-size: var(--typography-font-size-s);
  font-weight: var(--typography-font-weight-medium);
  border-radius: var(--layout-radius-full);
}
.board__declined-toggle:hover { background: var(--bg-surface-hover); color: var(--text-primary); }
.board__declined-toggle .material-icons { font-size: 16px; }
.board__declined-stack {
  margin-top: var(--layout-space-xs);
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: var(--layout-space-xs);
}


/* ── View placeholders (Phase B stubs) ───────────────────────────── */
.view-placeholder {
  display: flex; flex-direction: column; align-items: center;
  text-align: center;
  padding: var(--layout-space-xxl) var(--layout-space-l);
  background: var(--bg-canvas);
  border: var(--layout-border-default) dashed var(--border-default);
  border-radius: var(--layout-radius-l);
  color: var(--text-secondary);
  max-width: 700px; margin: var(--layout-space-l) auto;
}
.view-placeholder .material-icons {
  font-size: 56px; color: var(--icon-subtle);
  margin-bottom: var(--layout-space-xs);
}
.view-placeholder h2 {
  font-size: var(--typography-font-size-xl);
  margin: 0 0 var(--layout-space-xs);
  color: var(--text-primary);
}
.view-placeholder p { margin: 0; }

.pdp-header {
  max-width: 1400px; margin: 0 auto;
  padding-bottom: var(--layout-space-xs);
}
.pdp-back {
  display: inline-flex; align-items: center; gap: var(--layout-space-xxs);
  border: 0; background: transparent;
  color: var(--text-secondary);
  font-size: var(--typography-font-size-s);
  font-weight: var(--typography-font-weight-medium);
  padding: var(--layout-space-xxs);
}
.pdp-back:hover { color: var(--text-primary); }

/* ── Demo panel ──────────────────────────────────────────────────── */
.demo-nav {
  position: fixed; right: var(--layout-space-s); bottom: var(--layout-space-s);
  background: var(--bg-inverse);
  color: var(--text-inverse);
  border-radius: var(--layout-radius-m);
  box-shadow: var(--elevation-dark-medium);
  padding: var(--layout-space-s);
  width: 260px;
  z-index: 200;
}
.demo-nav__head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: var(--layout-space-xs);
}
.demo-nav__label {
  font-size: var(--typography-font-size-xs);
  text-transform: uppercase;
  letter-spacing: var(--typography-letter-spacing-wide);
  color: var(--color-primitives-neutral-400);
  font-weight: var(--typography-font-weight-semi-bold);
}
.demo-nav__hide {
  border: 0; background: transparent;
  color: var(--color-primitives-neutral-400);
  font-size: var(--typography-font-size-xs);
}
.demo-nav__hide:hover { color: var(--text-inverse); }
.demo-nav__body {
  display: flex; flex-direction: column; gap: var(--layout-space-s);
}
.demo-nav__group { display: flex; flex-direction: column; gap: var(--layout-space-xxs); }
.demo-nav__group-label {
  font-size: var(--typography-font-size-xs);
  color: var(--color-primitives-neutral-400);
  display: flex; justify-content: space-between; align-items: center;
}
.demo-nav__hint {
  font-size: 10px;
  color: var(--color-primitives-neutral-500);
  font-style: italic;
  font-weight: var(--typography-font-weight-regular);
  text-transform: none;
  letter-spacing: 0;
}
.demo-nav__seg {
  display: flex;
  background: rgba(255,255,255,0.08);
  border-radius: var(--layout-radius-full);
  padding: 2px;
}
.demo-nav__seg-btn {
  flex: 1; border: 0; background: transparent;
  color: var(--color-primitives-neutral-400);
  padding: 6px var(--layout-space-xs);
  border-radius: var(--layout-radius-full);
  font-size: var(--typography-font-size-xs);
  font-weight: var(--typography-font-weight-medium);
}
.demo-nav__seg-btn--active {
  background: var(--bg-canvas);
  color: var(--text-primary);
}
.demo-nav__reset {
  width: 100%;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  background: transparent;
  color: var(--text-inverse);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: var(--layout-radius-s);
  padding: 6px 10px;
  font-size: var(--typography-font-size-xs);
  cursor: pointer;
}
.demo-nav__reset:hover { background: rgba(255,255,255,0.08); }
.demo-nav__reset .material-icons { font-size: 16px; }
.demo-show {
  position: fixed; right: var(--layout-space-s); bottom: var(--layout-space-s);
  background: var(--bg-inverse);
  color: var(--text-inverse);
  border: 0;
  padding: 8px var(--layout-space-s);
  border-radius: var(--layout-radius-full);
  font-size: var(--typography-font-size-xs);
  font-weight: var(--typography-font-weight-semi-bold);
  letter-spacing: var(--typography-letter-spacing-wide);
  text-transform: uppercase;
  z-index: 200;
  box-shadow: var(--elevation-dark-medium);
}

/* ── Map markers ─────────────────────────────────────────────────── */
.map-marker {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px;
  background: var(--action-primary-default);
  color: var(--action-on-action-primary);
  border-radius: var(--layout-radius-full);
  border: 2px solid var(--bg-canvas);
  font-size: var(--typography-font-size-xs);
  font-weight: var(--typography-font-weight-semi-bold);
  box-shadow: var(--elevation-light-medium);
}
.map-marker--saved {
  background: var(--action-primary-default);
  color: var(--bg-canvas);
}
.map-marker--locked {
  background: var(--color-primitives-yellow-500);
  color: var(--color-primitives-neutral-800);
}
.map-marker--selected,
.map-marker--active {
  transform: scale(1.25);
  z-index: 1000;
  box-shadow: 0 0 0 4px rgba(0, 120, 95, 0.25), var(--elevation-light-medium);
}
/* Locked map halo — small translucent ring around the pin */
.leaflet-interactive.map-halo--active {
  fill-opacity: 0.45 !important;
  stroke-width: 2 !important;
}
.leaflet-tooltip.map-tip {
  background: var(--bg-inverse);
  color: var(--text-inverse);
  border: 0;
  padding: 4px 10px;
  border-radius: var(--layout-radius-s);
  font-size: var(--typography-font-size-xs);
  box-shadow: var(--elevation-dark-medium);
}
.leaflet-tooltip.map-tip::before { border-top-color: var(--bg-inverse) !important; }
.map-tip__title {
  font-weight: var(--typography-font-weight-bold);
  font-size: var(--typography-font-size-s);
  line-height: 1.2;
}
.map-tip__sub {
  margin-top: 2px;
  opacity: 0.8;
  font-size: var(--typography-font-size-xs);
}
.proj-card__loc {
  color: var(--text-secondary);
}
.proj-card--hover {
  border-left: 3px solid var(--action-primary-default);
  padding-left: calc(var(--layout-space-s) - 3px);
}

/* ── Responsive ──────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .results-body { grid-template-columns: 1fr; }
  .results-map { position: relative; top: 0; height: 320px; }
  .app-header { padding: var(--layout-space-xs) var(--layout-space-s); }
  .screen { padding: var(--layout-space-s); }
}

/* ══════════════════════════════════════════════════════════════════
   Simulated Gmail inbox
   ══════════════════════════════════════════════════════════════════ */
.gmail {
  position: fixed; inset: 0; z-index: 200;
  background: #f6f8fc;
  padding: 0;
  display: flex; flex-direction: column;
  font-family: 'Google Sans', Roboto, Arial, sans-serif;
  color: #202124;
}
.gmail[hidden] { display: none !important; }
/* Hide PlanHub's app header behind the Gmail simulation. */
body.inbox-takeover .app-header { display: none !important; }

.gmail__topbar {
  height: 64px; flex: 0 0 64px;
  background: #f6f8fc;
  display: flex; align-items: center;
  padding: 0 16px; gap: 8px;
}
.gmail__topbar-left { display: flex; align-items: center; gap: 4px; width: 240px; flex-shrink: 0; }
.gmail__ham, .gmail__topbar-icon {
  width: 40px; height: 40px; border-radius: 50%;
  border: 0; background: transparent; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  color: #5f6368;
}
.gmail__ham:hover, .gmail__topbar-icon:hover { background: rgba(60,64,67,.08); }
.gmail__ham .material-icons, .gmail__topbar-icon .material-icons { font-size: 22px; }
.gmail__logo {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 22px; color: #5f6368; font-weight: 400; padding-left: 4px;
}
.gmail__logo-mark { width: 36px; height: 27px; }
.gmail__wordmark { font-size: 22px; color: #5f6368; letter-spacing: -0.5px; }
.gmail__searchbar {
  flex: 1; max-width: 720px; height: 48px;
  background: #eaf1fb; border-radius: 24px;
  display: flex; align-items: center; padding: 0 4px 0 8px; gap: 4px;
}
.gmail__searchbar:focus-within { background: #fff; box-shadow: 0 1px 1px rgba(0,0,0,.05); }
.gmail__search-input {
  flex: 1; border: 0; background: transparent; outline: 0;
  font-size: 16px; color: #202124; padding: 0 8px;
}
.gmail__search-input::placeholder { color: #5f6368; }
.gmail__topbar-right { display: flex; align-items: center; gap: 4px; margin-left: auto; padding-left: 8px; }
.gmail__avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: #1a73e8; color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; margin-left: 4px;
}

.gmail__body { flex: 1; display: flex; overflow: hidden; }

.gmail__nav {
  width: 256px; flex-shrink: 0; padding: 8px 0;
  overflow-y: auto;
}
.gmail__compose {
  margin: 0 16px 16px; display: inline-flex; align-items: center; gap: 12px;
  height: 56px; padding: 0 24px 0 16px;
  border: 0; border-radius: 16px;
  background: #c2e7ff; color: #001d35;
  font-size: 14px; font-weight: 500; cursor: pointer;
  box-shadow: 0 1px 2px rgba(0,0,0,.08), 0 1px 3px rgba(0,0,0,.08);
}
.gmail__compose:hover { background: #b3deff; }
.gmail__compose .material-icons { font-size: 20px; color: #001d35; }
.gmail__nav-list { list-style: none; padding: 0; margin: 0 0 8px; }
.gmail__nav-item {
  width: calc(100% - 16px);
  margin-right: 16px;
  display: inline-flex; align-items: center; gap: 16px;
  height: 32px; padding: 0 12px 0 24px;
  border: 0; background: transparent; cursor: pointer;
  border-radius: 0 16px 16px 0;
  font-size: 14px; color: #202124; text-align: left;
}
.gmail__nav-item:hover { background: #ebeef1; }
.gmail__nav-item--active { background: #d3e3fd; font-weight: 700; color: #001d35; }
.gmail__nav-item--active:hover { background: #d3e3fd; }
.gmail__nav-item .material-icons { font-size: 20px; color: #444746; }
.gmail__nav-item--active .material-icons { color: #001d35; }
.gmail__nav-label { flex: 1; }
.gmail__nav-count { font-size: 12px; color: #444746; font-weight: 700; }
.gmail__nav-section { display: block; padding: 16px 24px 8px; font-size: 14px; color: #444746; }
.gmail__nav-dot--green { color: #137333 !important; }
.gmail__nav-dot--blue  { color: #1a73e8 !important; }
.gmail__nav-dot--orange { color: #d56e0c !important; }

.gmail__main {
  flex: 1; background: #fff;
  border-top-left-radius: 16px;
  margin: 0 16px 8px 0;
  display: flex; flex-direction: column;
  overflow: hidden;
  position: relative;
  border: 1px solid #e5e7eb;
}

.gmail__list { flex: 1; overflow-y: auto; }
.gmail__row {
  display: grid;
  grid-template-columns: 28px 28px 28px 200px 1fr 92px;
  align-items: center;
  height: 40px; padding: 0 16px;
  border-bottom: 1px solid #f1f3f4;
  background: #f6f8fc;
  cursor: pointer;
  width: 100%;
  border-left: 0; border-right: 0; border-top: 0;
  font-size: 14px; color: #202124;
  text-align: left;
  font-family: inherit;
}
.gmail__row:hover {
  background: #fff;
  box-shadow: inset 1px 0 0 #dadce0, inset -1px 0 0 #dadce0, 0 1px 2px rgba(60,64,67,.15);
  z-index: 1; position: relative;
}
.gmail__row--unread { background: #fff; font-weight: 700; }
.gmail__row--unread .gmail__row-snippet { color: #202124; }
.gmail__row-check, .gmail__row-star, .gmail__row-imp {
  display: inline-flex; align-items: center; justify-content: center;
  color: #5f6368;
}
.gmail__row-check .material-icons,
.gmail__row-star .material-icons,
.gmail__row-imp .material-icons { font-size: 18px; }
.gmail__row-star--on { color: #f9ab00; }
.gmail__row-from { font-weight: inherit; padding-right: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gmail__row-subject { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gmail__row-snippet { color: #5f6368; font-weight: inherit; padding-left: 8px; }
.gmail__row-when { text-align: right; font-size: 12px; color: #5f6368; font-weight: inherit; }
.gmail__row--unread .gmail__row-when { color: #202124; }
.gmail__row-chip {
  display: inline-block; padding: 2px 6px;
  font-size: 11px; font-weight: 700;
  border-radius: 4px; margin-right: 6px;
  background: #d3e3fd; color: #001d35;
  vertical-align: 1px;
}
.gmail__row-chip--planhub { background: #d6f0e3; color: #00533c; }

.gmail__reader {
  position: absolute; inset: 0; background: #fff;
  display: flex; flex-direction: column;
}
.gmail__reader[hidden] { display: none !important; }
.gmail__reader-toolbar {
  height: 56px; flex-shrink: 0;
  display: flex; align-items: center; padding: 0 8px; gap: 2px;
  border-bottom: 1px solid #e0e0e0;
}
.gmail__reader-sep { width: 1px; height: 24px; background: #e0e0e0; margin: 0 6px; }
.gmail__reader-body {
  flex: 1; overflow-y: auto;
  padding: 24px 40px 80px 24px;
}

/* ── ITB / PlanHub email body styling ─────────────────────────── */
.itb-email {
  max-width: 720px; margin: 0 auto;
  background: #fff;
}
.itb-email__hero {
  background: #25313e;
  height: 96px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 8px 8px 0 0;
}
.itb-email__hero-logo {
  display: inline-flex; align-items: center; gap: 8px;
  color: #fff; font-weight: 700; font-size: 24px; letter-spacing: -0.5px;
}
.itb-email__hero-logo-mark {
  width: 28px; height: 28px; border-radius: 6px;
  background: #00b894; display: inline-flex; align-items: center; justify-content: center;
  font-size: 13px; color: #fff;
}
.itb-email__hero--gc {
  background: #fff;
  height: 88px;
  border-bottom: 1px solid #e5e7eb;
  border-radius: 8px 8px 0 0;
}
.itb-email__gc-logo {
  display: inline-flex; align-items: center; gap: 10px;
  color: #1f2933; font-weight: 600;
}
.itb-email__gc-logo-mark {
  width: 36px; height: 36px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: 13px;
}
.itb-email__gc-logo-mark--img {
  object-fit: contain;
  background: #fff;
  border: 1px solid #e1e5ea;
  padding: 4px;
}

.itb-email__body { padding: 24px 32px 32px; }
.itb-email__banner {
  background: #e8f2fb;
  border: 1px solid #bcd5ee;
  border-radius: 8px;
  padding: 14px 16px;
  display: flex; gap: 12px; align-items: flex-start;
  margin-bottom: 24px;
}
.itb-email__banner-ribbon {
  flex: 0 0 24px;
  display: inline-flex; align-items: center; justify-content: center;
  color: #f0a500;
}
.itb-email__banner-ribbon .material-icons { font-size: 22px; }
.itb-email__banner-copy {
  flex: 1; font-size: 14px; color: #1f2933; line-height: 1.45;
}
.itb-email__banner-copy strong { color: #0f1d2e; }
.itb-email__banner-copy a { color: #00785f; text-decoration: underline; }

.itb-email__greeting {
  font-size: 15px; color: #2c3038; line-height: 1.55;
  margin-bottom: 16px;
}
.itb-email__greeting p { margin: 0 0 12px; }
.itb-email__sig {
  font-size: 14px; color: #2c3038;
  margin-top: 14px;
}
.itb-email__divider {
  border: 0; border-top: 1px solid #e5e7eb; margin: 16px 0 20px;
}
.itb-email__title {
  font-size: 22px; font-weight: 700; color: #1f2933;
  margin: 0 0 8px;
  letter-spacing: -0.2px;
}
.itb-email__meta {
  display: flex; flex-direction: column; gap: 4px;
  font-size: 14px; color: #2c3038;
  margin-bottom: 20px;
}
.itb-email__meta-row { display: flex; align-items: center; gap: 8px; }
.itb-email__meta-row .material-icons { font-size: 18px; color: #5f6368; }
.itb-email__cta-row {
  display: flex; justify-content: center;
  margin: 8px 0 24px;
}
.itb-email__cta {
  background: #00785f; color: #fff; border: 0;
  padding: 12px 28px; border-radius: 999px;
  font-size: 15px; font-weight: 600; cursor: pointer;
}
.itb-email__cta:hover { background: #006550; }

.itb-email__card {
  border: 1px solid #e1e5ea; border-radius: 8px;
  margin-bottom: 16px; overflow: hidden;
}
.itb-email__card-head {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 16px; font-size: 14px; font-weight: 700; color: #1f2933;
  border-bottom: 1px solid #e1e5ea;
}
.itb-email__card-head .material-icons { font-size: 18px; color: #1f2933; }
.itb-email__card-body { padding: 14px 16px; font-size: 14px; color: #2c3038; line-height: 1.5; }
.itb-email__kv {
  display: grid; grid-template-columns: 1fr auto;
  gap: 6px 12px;
}
.itb-email__kv-key { font-weight: 700; color: #1f2933; }
.itb-email__kv-val { color: #2c3038; text-align: right; }

.itb-email__action-row {
  display: flex; gap: 12px; justify-content: center; flex-wrap: wrap;
  margin: 24px 0 8px;
}
.itb-email__action {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 20px; border-radius: 999px;
  background: #fff; cursor: pointer;
  font-size: 14px; font-weight: 600;
  border: 1px solid;
}
.itb-email__action--decline { color: #c0392b; border-color: #e0a59b; }
.itb-email__action--decline:hover { background: #fdf2f0; }
.itb-email__action--save    { color: #00785f; border-color: #9ed4c4; }
.itb-email__action--save:hover { background: #f0faf6; }
.itb-email__action--intend  { color: #00785f; border-color: #9ed4c4; }
.itb-email__action--intend:hover { background: #f0faf6; }
.itb-email__action .material-icons { font-size: 18px; }

/* PlanHub cross-reference block (other GCs bidding the same project) */
.itb-email__crossref {
  background: #f3f0ff;
  border: 1px solid #d6cffb;
  border-radius: 8px;
  padding: 12px 14px;
  display: flex; gap: 10px; align-items: flex-start;
  margin-bottom: 16px;
  font-size: 13px; color: #1f2933; line-height: 1.5;
}
.itb-email__crossref-ribbon {
  flex: 0 0 22px;
  display: inline-flex; align-items: center; justify-content: center;
  color: #6c5ce7;
}
.itb-email__crossref-ribbon .material-icons { font-size: 18px; }
.itb-email__crossref-copy strong { color: #0f1d2e; }

.itb-email__foot {
  background: #e7f6ee;
  border-radius: 0 0 8px 8px;
  padding: 20px 32px;
  font-size: 13px; color: #2c3038; line-height: 1.6;
}
.itb-email__foot a { color: #00785f; text-decoration: underline; }
.itb-email__foot p { margin: 0 0 6px; }

.itb-email__digest-row {
  border: 1px solid #e1e5ea; border-radius: 8px;
  padding: 14px 16px;
  margin-bottom: 12px;
}
.itb-email__digest-row-head {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 12px; margin-bottom: 12px;
}
.itb-email__digest-name {
  font-size: 15px; font-weight: 700; color: #1f2933;
  margin: 0 0 2px;
}
.itb-email__digest-loc {
  font-size: 13px; color: #5f6368;
}
.itb-email__digest-preview {
  border: 1px solid #00785f; color: #00785f;
  background: #fff; border-radius: 999px;
  padding: 6px 16px; font-size: 13px; font-weight: 600; cursor: pointer;
  flex-shrink: 0;
}
.itb-email__digest-preview:hover { background: #f0faf6; }
.itb-email__digest-kv {
  display: grid; grid-template-columns: 1fr auto;
  gap: 4px 12px;
  font-size: 13px;
  padding-bottom: 10px; margin-bottom: 10px;
  border-bottom: 1px solid #f1f3f4;
}
.itb-email__digest-kv-key { color: #1f2933; font-weight: 500; }
.itb-email__digest-kv-val { color: #2c3038; text-align: right; }
.itb-email__digest-summary {
  font-size: 13px; color: #5f6368; line-height: 1.5;
}
.itb-email__view-all-row { display: flex; justify-content: center; margin: 20px 0 8px; }

/* Plain emails (reminders/updates/summaries/filler) */
.plain-email { max-width: 720px; margin: 0 auto; font-size: 14px; color: #202124; line-height: 1.6; }
.plain-email__subject { font-size: 22px; font-weight: 400; color: #202124; margin: 0 0 16px; }
.plain-email__sender-row {
  display: flex; align-items: center; gap: 12px;
  padding-bottom: 14px; border-bottom: 1px solid #f1f3f4; margin-bottom: 16px;
}
.plain-email__sender-avatar {
  width: 40px; height: 40px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: 14px;
  flex-shrink: 0;
}
.plain-email__sender-avatar--img {
  object-fit: contain;
  background: #fff;
  border: 1px solid #e1e5ea;
  padding: 4px;
}
.plain-email__sender-meta { flex: 1; min-width: 0; }
.plain-email__sender-name { font-weight: 600; }
.plain-email__sender-addr { color: #5f6368; font-weight: 400; font-size: 13px; margin-left: 6px; }
.plain-email__sender-when { font-size: 12px; color: #5f6368; flex-shrink: 0; }
.plain-email__to { font-size: 12px; color: #5f6368; }
.plain-email p { margin: 0 0 12px; }
