html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}

.property-map {
  width: 100%;
  height: 28rem;
}

.geocode-preview-map {
  margin-bottom: 1rem;
}

.location-method-list {
  padding-left: 1.25rem;
  margin-bottom: 0.75rem;
}

.location-selector-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.location-selector-map {
  min-height: 32rem;
}

.location-selector-panel[hidden],
#selected-property-location[hidden] {
  display: none !important;
}

.property-address {
  white-space: pre-line;
}

.map-layer-toggles {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.65rem;
}

.map-layer-toggles label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.investor-summary {
  max-width: none;
  margin-bottom: 1rem;
  font-size: 1.05rem;
  line-height: 1.65;
  color: #1e293b;
}

.workspace-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
  font-size: 0.95rem;
}

.property-workspace-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1.15rem 1.75rem;
  padding-bottom: 1.15rem;
  border-bottom: 1px solid #e5e7eb;
}

.property-workspace-header h1 {
  font-size: 2.05rem;
  line-height: 1.2;
  font-weight: 650;
  margin-bottom: 0.4rem;
}

.property-workspace-address {
  margin-bottom: 0.4rem;
  font-size: 1.05rem;
  line-height: 1.45;
  white-space: pre-line;
}

.property-workspace-meta {
  color: #475569;
  font-size: 1.02rem;
  margin-bottom: 0.75rem;
}

.property-workspace-meta span + span[aria-hidden="true"] {
  margin: 0 0.4rem;
}

.property-workspace-badges,
.theme-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.workspace-badge {
  display: inline-block;
  padding: 0.32rem 0.7rem;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  background: #f8fafc;
  color: #334155;
  font-size: 0.88rem;
  font-weight: 500;
  line-height: 1.3;
}

.theme-chips .workspace-badge {
  font-size: 0.9rem;
  padding: 0.38rem 0.78rem;
}

.property-workspace-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 0.65rem;
}

.property-workspace-actions .btn {
  font-size: 1rem;
  padding: 0.45rem 0.95rem;
}

.property-workspace {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
  margin-top: 1.15rem;
  align-items: stretch;
}

.property-workspace-main {
  display: contents;
}

.property-workspace-map {
  order: 1;
}

.property-workspace-panels {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
  order: 2;
}

.workspace-takeaway-card {
  order: 3;
}

.pi-pipeline-section {
  order: 4;
}

.pi-growth-outlook-section {
  order: 5;
}

.pi-development-section {
  order: 6;
}

.pi-potential-section {
  order: 7;
}

.pi-readiness-section {
  order: 8;
}

.pi-details-section {
  order: 9;
}

.pi-evidence-section {
  order: 10;
}

.detailed-investor-intelligence {
  order: 11;
}

.workspace-section-title {
  font-size: 0.92rem;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #1e3a5f;
  margin-bottom: 0.9rem;
}

.workspace-card {
  border: 1px solid #e2e8f0;
  border-radius: 0.65rem;
  background: #fff;
  padding: 1.2rem 1.3rem;
  margin-bottom: 0;
}

.workspace-ai-card .workspace-section-title,
.workspace-takeaway-card .workspace-section-title {
  font-size: 1.12rem;
  letter-spacing: 0.02em;
  text-transform: none;
  color: #0f2744;
  margin-bottom: 0.65rem;
}

.workspace-kicker {
  margin: 0 0 0.35rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #1d4ed8;
}

.workspace-takeaway-card {
  border-color: #cbd5e1;
  border-left: 4px solid #1e3a5f;
  background: #f8fafc;
}

.intelligence-support {
  color: #64748b;
  font-size: 0.95rem;
  line-height: 1.5;
  margin: -0.35rem 0 1rem;
  max-width: 46rem;
}

.intelligence-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin: 0 0 1.15rem;
}

.intelligence-metrics > div {
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  background: #f8fafc;
  padding: 0.65rem 0.8rem;
}

.intelligence-metrics dt {
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #64748b;
}

.intelligence-metrics dd {
  margin: 0.2rem 0 0;
  font-size: 1.15rem;
  font-weight: 650;
  color: #0f2744;
}

.detailed-investor-intelligence .workspace-section-title {
  font-size: 1.18rem;
  letter-spacing: 0.02em;
  text-transform: none;
  color: #0f2744;
  margin-bottom: 0.45rem;
}

.workspace-snapshot {
  display: grid;
  grid-template-columns: 9rem 1fr;
  gap: 0.5rem 0.9rem;
  margin-bottom: 0.9rem;
  font-size: 1rem;
}

.workspace-snapshot dt {
  color: #64748b;
  font-weight: 500;
}

.workspace-snapshot dd {
  margin-bottom: 0;
}

.technical-location summary {
  cursor: pointer;
  color: #64748b;
  font-size: 0.95rem;
}

.key-location-category {
  font-size: 0.95rem;
  font-weight: 650;
  color: #0f172a;
  margin: 1rem 0 0.4rem;
}

.key-location-category:first-of-type {
  margin-top: 0.15rem;
}

.retail-cluster-card {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.35rem 0.85rem;
  margin: 0.95rem 0 0.7rem;
  padding: 0.7rem 0.85rem;
  border: 1px solid #dbeafe;
  border-radius: 0.5rem;
  background: #eff6ff;
}

.retail-cluster-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #1e3a5f;
}

.retail-cluster-value {
  font-size: 0.98rem;
  font-weight: 650;
  color: #1e40af;
}

.key-location-list li.is-major-anchor .key-location-name {
  font-weight: 700;
  color: #0f2744;
}

.key-location-list,
.top-signals-list {
  list-style: none;
  padding: 0;
  margin: 0 0 0.45rem;
}

.key-location-list li,
.top-signals-list li {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.25rem 0.85rem;
  padding: 0.48rem 0;
  border-bottom: 1px solid #f1f5f9;
  font-size: 1rem;
}

.key-location-name,
.top-signal-name {
  font-weight: 500;
}

.key-location-meta,
.top-signal-meta,
.workspace-footnote {
  color: #64748b;
  font-size: 0.92rem;
}

.key-location-meta,
.top-signal-meta {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem 0.55rem;
}

.key-location-list li.is-major-anchor {
  border-bottom-color: #e2e8f0;
}

.top-signals-list {
  margin-top: 0.35rem;
}

.top-signal-rank {
  color: #94a3b8;
  min-width: 1.25rem;
}

.top-signal-name {
  flex: 1;
}

.workspace-footnote {
  margin-top: 0.85rem;
  margin-bottom: 0.4rem;
}

.map-toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.8rem;
}

.map-layer-toggles {
  gap: 0.55rem 0.7rem;
}

.map-layer-pill {
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  padding: 0.38rem 0.85rem;
  background: #fff;
  font-size: 0.92rem;
}

.map-layer-pill:has(input:checked) {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

.map-layer-pill:focus-within,
.map-expand-button:focus-visible,
.technical-location summary:focus-visible {
  outline: 2px solid #1d4ed8;
  outline-offset: 2px;
}

.map-layer-pill-ai {
  color: #1e3a5f;
}

.map-layer-pill-ai:has(input:checked) {
  background: #1e3a5f;
  border-color: #1e3a5f;
  color: #fff;
}

.map-layer-pill-retail:has(input:checked) {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1e40af;
}

.map-layer-pill-commercial:has(input:checked) {
  background: #fff7ed;
  border-color: #fed7aa;
  color: #9a3412;
}

.map-layer-pill-transport:has(input:checked) {
  background: #f5f3ff;
  border-color: #ddd6fe;
  color: #5b21b6;
}

.map-layer-pill-road:has(input:checked) {
  background: #f0fdf4;
  border-color: #bbf7d0;
  color: #166534;
}

.map-expand-button {
  font-size: 0.95rem;
  padding: 0.4rem 0.9rem;
}

.property-map-shell .property-map {
  height: 460px;
  border-radius: 0.6rem;
  overflow: hidden;
}

.property-map-frame {
  position: relative;
}

.property-map-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  z-index: 1040;
}

.property-map-shell.is-expanded {
  position: fixed;
  inset: 0.75rem;
  z-index: 1050;
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 0.7rem;
  padding: 0.85rem;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.18);
}

.property-map-shell.is-expanded .property-map-frame {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.property-map-shell.is-expanded .property-map {
  flex: 1;
  height: auto;
  min-height: 0;
}

body.map-expanded {
  overflow: hidden;
}

.workspace-table,
.intelligence-table {
  margin-bottom: 0;
  font-size: 0.98rem;
}

.intelligence-table-wrap {
  min-width: 0;
}

.intelligence-table {
  min-width: 52rem;
  border-collapse: separate;
  border-spacing: 0;
}

.intelligence-table thead th {
  background: #1e3a5f;
  color: #fff;
  font-weight: 650;
  letter-spacing: 0.03em;
  font-size: 0.82rem;
  text-transform: uppercase;
  border: 0;
  padding: 0.78rem 0.85rem;
  white-space: nowrap;
}

.intelligence-table thead th:first-child {
  border-top-left-radius: 0.4rem;
}

.intelligence-table thead th:last-child {
  border-top-right-radius: 0.4rem;
}

.intelligence-table tbody td {
  padding: 0.95rem 0.85rem;
  vertical-align: top;
  border-bottom: 1px solid #eef2f6;
  background: #fff;
}

.intelligence-table tbody tr:nth-child(even) td {
  background: #f8fafc;
}

.intelligence-table tbody tr:last-child td {
  border-bottom: 0;
}

.feature-cell {
  min-width: 11rem;
  background: #f1f5f9 !important;
}

.feature-name {
  display: block;
  font-weight: 700;
  color: #0f2744;
  line-height: 1.3;
}

.feature-subtitle {
  display: block;
  margin-top: 0.2rem;
  color: #64748b;
  font-size: 0.84rem;
  font-weight: 500;
}

.rank-indicator {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 999px;
  background: #1e3a5f;
  color: #fff;
  font-size: 0.82rem;
  font-weight: 700;
}

.rank-indicator-sm {
  width: 1.45rem;
  height: 1.45rem;
  font-size: 0.75rem;
}

.category-badge {
  display: inline-block;
  padding: 0.22rem 0.58rem;
  border-radius: 0.3rem;
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: 0.01em;
  line-height: 1.3;
  white-space: nowrap;
}

.category-badge-road {
  background: #ecfdf3;
  color: #166534;
}

.category-badge-retail {
  background: #eff6ff;
  color: #1e40af;
}

.category-badge-commercial {
  background: #fff7ed;
  color: #9a3412;
}

.category-badge-transport {
  background: #f5f3ff;
  color: #5b21b6;
}

.category-badge-other {
  background: #f1f5f9;
  color: #334155;
}

.score-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.15rem;
  padding: 0.18rem 0.45rem;
  border-radius: 0.3rem;
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.2;
}

.score-badge-strongest {
  background: #1e3a5f;
  color: #fff;
}

.score-badge-strong {
  background: #dbeafe;
  color: #1e3a5f;
}

.score-badge-supporting {
  background: #f1f5f9;
  color: #334155;
  border: 1px solid #e2e8f0;
}

.direction-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  min-width: 2.4rem;
  justify-content: center;
  padding: 0.18rem 0.4rem;
  border-radius: 999px;
  background: #f1f5f9;
  color: #1e3a5f;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.direction-chip::before {
  content: "▲";
  display: inline-block;
  font-size: 0.58rem;
  line-height: 1;
}

.direction-n::before { transform: rotate(0deg); }
.direction-ne::before { transform: rotate(45deg); }
.direction-e::before { transform: rotate(90deg); }
.direction-se::before { transform: rotate(135deg); }
.direction-s::before { transform: rotate(180deg); }
.direction-sw::before { transform: rotate(225deg); }
.direction-w::before { transform: rotate(270deg); }
.direction-nw::before { transform: rotate(315deg); }

.direction-unknown::before {
  content: none;
}

.distance-cell {
  white-space: nowrap;
  color: #334155;
  font-variant-numeric: tabular-nums;
}

.reason-cell {
  min-width: 16rem;
  max-width: 28rem;
  line-height: 1.6;
  color: #334155;
}

.reason-lead {
  font-weight: 650;
  color: #0f2744;
}

.top-signals-list li {
  align-items: center;
}

.snapshot-card .workspace-snapshot dt {
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

@media (min-width: 992px) {
  .property-workspace {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(20rem, 1fr);
    align-items: start;
  }

  .property-workspace-main {
    display: flex;
    flex-direction: column;
    gap: 1.15rem;
    grid-column: 1;
    order: initial;
  }

  .property-workspace-map,
  .detailed-investor-intelligence,
  .workspace-takeaway-card,
  .pi-pipeline-section,
  .pi-development-section,
  .pi-potential-section,
  .pi-readiness-section,
  .pi-details-section,
  .pi-evidence-section {
    order: initial;
  }

  .property-workspace-panels {
    grid-column: 2;
    order: initial;
  }

  .property-map-shell .property-map {
    height: 680px;
  }
}

@media (max-width: 991.98px) {
  .property-map-shell .property-map {
    height: 460px;
  }

  .workspace-snapshot {
    grid-template-columns: 1fr;
    gap: 0.15rem 0;
  }

  .intelligence-metrics {
    grid-template-columns: 1fr;
  }
}

.opportunity-explorer {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
  margin-top: 0.5rem;
}

.opportunity-map-shell {
  position: relative;
}

.opportunity-map {
  width: 100%;
  height: 460px;
  border-radius: 0.6rem;
  overflow: hidden;
}

.opportunity-map-overlay {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 2;
  max-width: min(22rem, calc(100% - 4.5rem));
  padding: 0.75rem 0.9rem;
  border: 1px solid #dbe3ee;
  border-left: 4px solid #1e3a5f;
  border-radius: 0.5rem;
  background: rgba(248, 250, 252, 0.96);
  box-shadow: 0 8px 24px rgba(15, 39, 68, 0.12);
}

.opportunity-map-overlay-name {
  margin: 0 0 0.35rem;
  font-size: 1.15rem;
  font-weight: 700;
  color: #0f2744;
}

.opportunity-map-overlay-metric {
  margin: 0;
  font-size: 0.92rem;
  color: #1e293b;
}

.opportunity-map-overlay-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.7rem;
  align-items: center;
}

.opportunity-map-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.82rem;
  color: #0f2744;
}

.opportunity-results {
  max-height: 22rem;
}

.opportunity-results tbody tr[data-community-code],
.opportunity-results tbody tr[data-property-id] {
  cursor: pointer;
}

.opportunity-results tbody tr.is-selected td,
.opportunity-results tbody tr.is-selected th {
  background: #eff6ff;
  box-shadow: inset 4px 0 0 #1e3a5f;
}

.opportunity-filters .form-label {
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b;
}

.opportunity-profile-name {
  font-size: 1.55rem;
  font-weight: 700;
  color: #0f2744;
  margin: 0 0 0.25rem;
}

.opportunity-profile-hero {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin: 0.85rem 0 1.2rem;
}

.opportunity-profile-hero > div {
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  background: #fff;
  padding: 0.7rem 0.85rem;
}

.opportunity-profile-label {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #64748b;
}

.opportunity-profile-value {
  margin: 0.2rem 0 0;
  font-size: 1.45rem;
  font-weight: 700;
  color: #0f2744;
}

.opportunity-profile-available,
.opportunity-profile-version {
  font-size: 0.95rem;
  font-weight: 600;
  color: #475569;
}

.opportunity-popup .mapboxgl-popup-content {
  padding: 0.7rem 0.85rem;
  min-width: 12.5rem;
}

.opportunity-popup-name {
  margin: 0 0 0.45rem;
  font-weight: 700;
  color: #0f2744;
}

.opportunity-popup dl {
  margin: 0;
}

.opportunity-popup dl > div {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.82rem;
}

.opportunity-popup dt {
  color: #64748b;
}

.opportunity-popup dd {
  margin: 0;
  font-weight: 650;
  color: #0f2744;
}

@media (min-width: 992px) {
  .opportunity-explorer {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(22rem, 1fr);
    align-items: start;
  }

  .opportunity-map {
    height: min(78vh, 820px);
  }

  .opportunity-results {
    max-height: 28rem;
  }
}

.opportunity-mode-toggle {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.research-profile-criteria,
.research-profile-funnel,
.research-criteria-list {
  margin: 0 0 0.85rem;
  padding-left: 1.1rem;
}

.research-profile-counts {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.35rem 1rem;
  margin: 0 0 0.85rem;
}

.research-profile-counts > div {
  display: contents;
}

.research-profile-counts dt {
  color: #64748b;
  font-size: 0.88rem;
}

.research-profile-counts dd {
  margin: 0;
  font-weight: 700;
  color: #0f2744;
  text-align: right;
}

.research-profile-export {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin: 0 0 0.85rem;
}

.research-profile-export .workspace-kicker,
.research-profile-export .workspace-footnote {
  flex: 1 0 100%;
}

.candidate-status {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.02em;
}

.candidate-status-strong-match::before,
.candidate-status-partial-match::before,
.candidate-status-not-in-profile::before {
  content: "";
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  border: 2px solid #0f2744;
  display: inline-block;
}

.candidate-status-strong-match::before {
  background: #1e3a5f;
}

.candidate-status-partial-match::before {
  background: #fff;
}

.candidate-status-not-in-profile::before {
  background: #cbd5e1;
  border-color: #64748b;
  border-radius: 0.12rem;
}

.candidate-incomplete {
  display: inline-block;
  margin-left: 0.35rem;
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #9a3412;
}

.parcel-map-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.85rem;
  margin-top: 0.55rem;
  font-size: 0.78rem;
  color: #334155;
}

.parcel-map-legend span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.parcel-legend-parcel,
.parcel-legend-point,
.parcel-legend-feature {
  display: inline-block;
  width: 0.85rem;
  height: 0.85rem;
}

.parcel-legend-parcel {
  background: rgba(248, 250, 252, 0.35);
  border: 2px solid #fbbf24;
}

.parcel-legend-point {
  background: #dc2626;
  border-radius: 50%;
}

.parcel-legend-feature {
  background: #2563eb;
  border-radius: 50%;
}

.parcel-legend-major-dev {
  display: inline-block;
  width: 0.85rem;
  height: 0.85rem;
  background: rgba(190, 24, 93, 0.28);
  border: 2px solid #be185d;
}

.parcel-map-note {
  margin-top: 0.4rem;
}

.parcel-candidate-card h3 {
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  margin-bottom: 0.35rem;
}

.candidate-map-legend span {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.candidate-legend-strong,
.candidate-legend-partial,
.candidate-legend-other {
  width: 0.75rem;
  height: 0.75rem;
  border: 2px solid #0f2744;
  display: inline-block;
}

.candidate-legend-strong {
  background: #1e3a5f;
  border-radius: 50%;
}

.candidate-legend-partial {
  background: #fff;
  border-radius: 50%;
}

.candidate-legend-other {
  background: #cbd5e1;
  border-color: #64748b;
  border-radius: 0.12rem;
}

.research-criteria-failed {
  color: #9a3412;
}

@media (max-width: 991.98px) {
  .opportunity-profile-hero {
    grid-template-columns: 1fr;
  }
}

.priority-workspace {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.priority-gate,
.priority-median {
  font-size: 0.95rem;
  color: #1e293b;
}

.priority-filters .form-label {
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b;
}

.priority-chart-shell {
  overflow-x: auto;
}

.priority-chart {
  width: 100%;
  height: auto;
  min-height: 22rem;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 0.6rem;
}

.priority-plot {
  fill: #f8fafc;
}

.priority-q1 { fill: rgba(30, 58, 95, 0.06); }
.priority-q2 { fill: rgba(14, 116, 144, 0.06); }
.priority-q3 { fill: rgba(194, 65, 12, 0.05); }
.priority-q4 { fill: rgba(148, 163, 184, 0.12); }

.priority-median-line {
  stroke: #0f2744;
  stroke-width: 1.25;
  stroke-dasharray: 4 3;
}

.priority-grid {
  stroke: #e2e8f0;
  stroke-width: 1;
}

.priority-tick,
.priority-axis,
.priority-q-label {
  fill: #475569;
  font-size: 10px;
}

.priority-axis {
  font-weight: 650;
  font-size: 12px;
}

.priority-q-label {
  font-size: 9px;
}

.priority-point {
  fill: #1e3a5f;
  stroke: #0f2744;
  stroke-width: 1.25;
}

.priority-point.is-below-gate {
  fill: none;
  stroke: #64748b;
  stroke-width: 1.5;
}

.priority-point.is-selected {
  stroke: #c2410c;
  stroke-width: 2.25;
}

.priority-point.is-focused {
  stroke: #0f2744;
  stroke-width: 2.5;
}

.priority-selected-ring {
  fill: none;
  stroke: #c2410c;
  stroke-width: 2;
}

.priority-focus-ring {
  fill: none;
  stroke: #0f2744;
  stroke-width: 1.75;
  stroke-dasharray: 3 2;
}

.priority-point-label {
  fill: #0f2744;
  font-size: 9px;
  font-weight: 700;
  pointer-events: none;
}

.priority-chart a:focus-visible .priority-point,
.priority-chart a:focus-visible .priority-focus-ring {
  stroke: #0f2744;
  stroke-width: 3;
}

.priority-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1.1rem;
  margin: 0.75rem 0 0;
  padding: 0;
  list-style: none;
  font-size: 0.85rem;
  color: #334155;
}

.priority-legend span {
  display: inline-block;
  width: 0.8rem;
  height: 0.8rem;
  margin-right: 0.35rem;
  vertical-align: -0.1rem;
  border: 1.5px solid #0f2744;
  background: #1e3a5f;
}

.priority-legend-circle { border-radius: 50%; }
.priority-legend-square { border-radius: 0; }
.priority-legend-triangle {
  width: 0;
  height: 0;
  background: transparent;
  border-left: 0.4rem solid transparent;
  border-right: 0.4rem solid transparent;
  border-bottom: 0.7rem solid #1e3a5f;
  border-top: 0;
}
.priority-legend-diamond {
  transform: rotate(45deg);
  width: 0.65rem;
  height: 0.65rem;
}
.priority-legend-ring {
  border-radius: 50%;
  background: transparent;
  border-color: #c2410c;
  border-width: 2px;
}
.priority-legend-focus {
  border-radius: 50%;
  background: transparent;
  border-style: dashed;
}
.priority-legend-hollow {
  border-radius: 50%;
  background: transparent;
  border-color: #64748b;
}

.priority-map {
  width: 100%;
  height: 320px;
  border-radius: 0.6rem;
  overflow: hidden;
}

.priority-selected-list {
  list-style: none;
  margin: 0 0 0.75rem;
  padding: 0;
}

.priority-selected-list li {
  display: grid;
  gap: 0.1rem;
  padding: 0.55rem 0.65rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.45rem;
  margin-bottom: 0.45rem;
  font-size: 0.88rem;
}

.priority-selected-list li.is-focused {
  box-shadow: inset 4px 0 0 #1e3a5f;
  background: #eff6ff;
}

.priority-remove {
  font-size: 0.82rem;
}

.priority-summary {
  margin: 0;
}

.priority-summary > div {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.28rem 0;
  border-bottom: 1px solid #eef2f6;
  font-size: 0.9rem;
}

.priority-summary dt {
  color: #64748b;
}

.priority-summary dd {
  margin: 0;
  text-align: right;
  font-weight: 650;
  color: #0f2744;
}

.priority-method {
  display: block;
  font-size: 0.72rem;
  font-weight: 500;
  color: #64748b;
}

.priority-quadrant {
  color: #475569;
  font-size: 0.9rem;
  margin: 0 0 0.7rem;
}

.priority-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.75rem;
}

.priority-select {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  margin: 0;
}

.priority-table {
  min-width: 64rem;
}

@media (min-width: 992px) {
  .priority-workspace {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(20rem, 0.85fr);
    align-items: start;
  }

  .priority-map {
    height: 360px;
  }
}

.visual-research {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.visual-research-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.65rem;
  align-items: center;
}

.visual-research-map {
  width: 100%;
  height: 520px;
  border-radius: 0.6rem;
  overflow: hidden;
}

.visual-research-decisions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.visual-research-filters .form-label {
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b;
}

@media (min-width: 992px) {
  .visual-research {
    display: grid;
    grid-template-columns: minmax(0, 1.9fr) minmax(22rem, 0.95fr);
    align-items: start;
  }

  .visual-research-map {
    height: min(78vh, 820px);
  }
}

.pi-evidence-section {
  margin-top: 0;
}

.pi-evidence-dimension {
  margin: 0 0 1.25rem;
}

.pi-evidence-dimension-header h3 {
  font-size: 1rem;
  margin-bottom: 0.35rem;
}

.pi-evidence-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 0.75rem;
}

.pi-evidence-card,
.pi-opportunity-card,
.pi-highlight-card {
  border: 1px solid #e2e8f0;
  border-radius: 0.55rem;
  background: #f8fafc;
  padding: 0.85rem 0.95rem;
  min-width: 0;
  overflow-wrap: anywhere;
}

.pi-evidence-card h4,
.pi-opportunity-card h4 {
  font-size: 0.95rem;
  margin: 0 0 0.45rem;
}

.pi-evidence-card p,
.pi-opportunity-card p {
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.pi-evidence-card dl {
  display: grid;
  gap: 0.25rem;
  margin: 0 0 0.45rem;
}

.pi-evidence-card dt {
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #64748b;
}

.pi-evidence-card dd {
  margin: 0;
  font-size: 0.86rem;
}

.pi-add-evidence {
  margin-top: 1rem;
}

.pi-add-evidence-form {
  max-width: 36rem;
  margin-top: 0.75rem;
}

.pi-potential-section,
.pi-development-section,
.pi-readiness-section,
.pi-details-section {
  margin-top: 0;
}

.pi-opportunity-card header,
.pi-highlight-card header {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 0.35rem;
}

.pi-opportunity-card {
  margin-bottom: 0.75rem;
}

.pi-highlight-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.65rem;
}

.pi-highlight-card {
  background: #fff;
  padding: 0.7rem 0.8rem;
}

.pi-highlight-card h3 {
  font-size: 0.68rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #64748b;
  margin: 0;
}

.pi-highlight-finding {
  font-size: 0.98rem;
  font-weight: 650;
  color: #12324d;
  margin: 0 0 0.25rem;
  line-height: 1.3;
}

.pi-highlight-secondary {
  font-size: 0.8rem;
  color: #64748b;
  margin: 0;
}

.pi-status-badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: 999px;
  padding: 0.12rem 0.45rem;
  white-space: nowrap;
}

.pi-status-verified {
  background: #dcfce7;
  color: #166534;
}

.pi-status-partial {
  background: #fef3c7;
  color: #92400e;
}

.pi-status-unknown {
  background: #e2e8f0;
  color: #334155;
}

.pi-disclosure {
  margin: 0.65rem 0;
}

.pi-disclosure > summary {
  cursor: pointer;
  font-weight: 600;
}

.pi-disclosure > summary:focus {
  outline: none;
}

.pi-disclosure > summary:focus-visible {
  outline: 2px solid #258cfb;
  outline-offset: 2px;
}

.pi-dimension-disclosure > summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.15rem 0.75rem;
  align-items: center;
}

.pi-dimension-summary-title {
  font-weight: 650;
}

.pi-dimension-summary-line {
  grid-column: 1 / -1;
  font-weight: 400;
  color: #475569;
  font-size: 0.88rem;
}

.pi-opportunity-preview {
  margin-bottom: 0.35rem;
}

.pi-opportunity-meta {
  font-size: 0.8rem;
  color: #64748b;
  margin-bottom: 0.4rem;
}

.pi-detail-evidence-list {
  display: grid;
  gap: 0.65rem;
  padding-left: 1.1rem;
  margin-bottom: 0;
}

.pi-detail-evidence-list li {
  display: grid;
  gap: 0.15rem;
}

.pi-readiness-table th,
.pi-readiness-table td {
  font-size: 0.86rem;
  vertical-align: top;
}

.pi-full-evidence > summary {
  font-size: 1rem;
}

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

@media (min-width: 1200px) {
  .pi-highlight-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.pi-snapshot-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.55rem;
}

.pi-snapshot-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 0.55rem;
  padding: 0.65rem 0.75rem;
}

.pi-snapshot-card header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
  margin-bottom: 0.2rem;
}

.pi-snapshot-card h3 {
  font-size: 0.68rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #64748b;
  margin: 0;
}

.pi-snapshot-value {
  font-size: 0.95rem;
  font-weight: 650;
  color: #12324d;
  margin: 0;
  line-height: 1.3;
}

.pi-snapshot-note {
  font-size: 0.78rem;
  color: #64748b;
  margin: 0.2rem 0 0;
}

.pi-report-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.65rem;
}

.pi-report-card {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.65rem 1rem;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 0.55rem;
  padding: 0.75rem 0.85rem;
}

.pi-report-card h3,
.pi-report-card h4 {
  font-size: 0.98rem;
  margin: 0 0 0.15rem;
  color: #12324d;
}

.pi-report-card p {
  margin: 0;
  color: #475569;
  font-size: 0.85rem;
}

.pi-report-description {
  margin-top: 0.2rem !important;
}

.pi-open-document {
  white-space: nowrap;
  font-weight: 650;
}

.pi-report-list-compact .pi-report-card {
  padding: 0.55rem 0.7rem;
}

.pi-report-note {
  margin-top: 0.25rem !important;
  color: #9a3412 !important;
  font-size: 0.78rem;
  font-weight: 650;
}

.pi-title-research {
  display: grid;
  gap: 0.2rem;
  margin: 0 0 0.75rem;
  padding: 0.7rem 0.8rem;
  border: 1px solid #dbe4ee;
  border-radius: 0.5rem;
  background: #f8fafc;
}

.pi-title-research p {
  margin: 0;
  font-size: 0.88rem;
  color: #334155;
}

.pi-title-research .pi-open-document {
  margin-top: 0.45rem;
  justify-self: start;
}

.pi-map-intelligence {
  position: absolute;
  top: 0.65rem;
  left: 0.65rem;
  z-index: 2;
  width: 16.25rem;
  pointer-events: none;
}

.pi-map-intelligence.is-fallback {
  top: 0.65rem;
  left: 0.65rem;
}

.pi-map-intelligence.is-compact {
  width: auto;
}

.pi-map-research-control {
  position: absolute;
  top: 0.65rem;
  right: 3.15rem;
  z-index: 3;
  font-size: 0.82rem;
  font-weight: 650;
  padding: 0.38rem 0.7rem;
}

.pi-map-overlay {
  pointer-events: auto;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid #d7e2ec;
  border-radius: 0.55rem;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
  overflow: hidden;
}

.pi-map-overlay > summary {
  cursor: pointer;
  list-style: none;
  padding: 0.5rem 0.7rem;
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #12324d;
}

.pi-map-overlay > summary::-webkit-details-marker {
  display: none;
}

.pi-map-overlay > summary:focus-visible,
.pi-map-factor:focus-visible,
#pi-research-toggle:focus-visible,
#pi-research-close:focus-visible,
.pi-subject-popup-actions .btn:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

.pi-map-factor-list {
  list-style: none;
  margin: 0;
  padding: 0 0.45rem 0.5rem;
  display: grid;
  gap: 0.3rem;
}

.pi-map-factor {
  width: 100%;
  text-align: left;
  border: 0;
  background: #f8fafc;
  border-radius: 0.4rem;
  padding: 0.4rem 0.5rem;
}

.pi-map-factor strong {
  display: block;
  font-size: 0.86rem;
  color: #12324d;
}

.pi-map-factor span {
  display: block;
  font-size: 0.72rem;
  color: #64748b;
}

.pi-map-factor-detail {
  margin: 0.25rem 0 0.15rem;
  padding: 0.45rem 0.5rem 0.55rem;
  border-top: 1px solid #e2e8f0;
}

.pi-map-factor-detail h3 {
  margin: 0 0 0.2rem;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #64748b;
}

.pi-map-factor-detail p {
  margin: 0 0 0.15rem;
  font-size: 0.78rem;
  color: #334155;
}

.pi-map-factor-detail .pi-open-document {
  margin-top: 0.35rem;
  font-size: 0.78rem;
  padding: 0.28rem 0.6rem;
}

.pi-map-research {
  position: absolute;
  top: 0.65rem;
  right: 0.65rem;
  z-index: 4;
  width: min(22rem, calc(100% - 1.3rem));
  max-height: calc(100% - 1.3rem);
  overflow: auto;
  background: #fff;
  border: 1px solid #d7e2ec;
  border-radius: 0.55rem;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.16);
  padding: 0.7rem 0.8rem 0.85rem;
}

.pi-map-research-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.55rem;
}

.pi-map-research-header h3 {
  margin: 0;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #12324d;
}

.pi-map-research-group {
  margin-top: 0.55rem;
}

.pi-map-research-group h4 {
  margin: 0 0 0.35rem;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #64748b;
}

.pi-map-research-group ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.45rem;
}

.pi-map-research-group li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.65rem;
}

.pi-map-research-title {
  margin: 0;
  font-size: 0.86rem;
  font-weight: 650;
  color: #12324d;
}

.pi-map-research-group li p {
  margin: 0;
  font-size: 0.75rem;
  color: #64748b;
}

.pi-map-research-group .pi-open-document {
  font-size: 0.75rem;
  padding: 0.28rem 0.55rem;
}

.pi-subject-popup {
  min-width: 12rem;
}

.pi-subject-popup strong {
  display: block;
  margin-bottom: 0.25rem;
}

.pi-subject-popup-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.45rem;
}

@media (max-width: 767.98px) {
  .pi-map-intelligence.is-fallback {
    width: min(14.5rem, calc(100% - 4.25rem));
  }

  .pi-map-research-control {
    right: 0.55rem;
    top: auto;
    bottom: 0.55rem;
  }

  .pi-map-research {
    top: auto;
    bottom: 0.5rem;
    right: 0.5rem;
    left: 0.5rem;
    width: auto;
    max-height: 55%;
  }
}

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

@media (min-width: 1200px) {
  .pi-snapshot-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.pi-publishing-selection {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.65rem;
}

.pi-publishing-selection label {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.35rem 0.7rem;
  align-items: start;
}

.pi-publishing-selection span {
  grid-column: 2;
  color: #475569;
  font-size: 0.92rem;
}

.pi-publishing-summary {
  display: grid;
  grid-template-columns: 10rem 1fr;
  gap: 0.4rem 1rem;
}

.pi-publishing-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.pi-pipeline-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(16.5rem, 1fr));
}

.pi-pipeline-card {
  border: 1px solid #d7e3ef;
  border-radius: 0.75rem;
  padding: 0.9rem 1rem;
  background: #fff;
}

.pi-pipeline-card header {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  align-items: flex-start;
  margin-bottom: 0.4rem;
}

.pi-pipeline-card h3 {
  font-size: 1rem;
  margin: 0;
}

.pi-pipeline-type,
.pi-pipeline-boundary,
.pi-major-dev-label {
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #475569;
  margin-bottom: 0.2rem;
}

.pi-pipeline-card ul {
  margin: 0 0 0.65rem 1.1rem;
  padding: 0;
}

.pi-pipeline-sources {
  list-style: none;
  margin-left: 0 !important;
}

.pi-pipeline-verified {
  font-size: 0.78rem;
  color: #64748b;
}

.pi-growth-facts {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
  display: grid;
  gap: 0.75rem;
}

.pi-growth-facts li {
  border: 1px solid #e2e8f0;
  border-radius: 0.65rem;
  padding: 0.75rem 0.9rem;
  background: #f8fafc;
}

.pi-growth-facts span {
  display: block;
  font-size: 0.78rem;
  color: #64748b;
  margin: 0.15rem 0 0.35rem;
}

.pi-growth-facts p {
  margin: 0;
}

.pi-pipeline-card-context {
  background: #f8fafc;
}

.map-major-dev-filter {
  min-width: 12.5rem;
}

.map-major-dev-filter .form-select {
  font-size: 0.78rem;
  min-height: 1.9rem;
  padding-top: 0.15rem;
  padding-bottom: 0.15rem;
}

.pi-major-dev-popup {
  min-width: 14rem;
  max-width: 18rem;
  color: #111827;
}

.pi-major-dev-popup strong {
  display: block;
  margin-bottom: 0.2rem;
  letter-spacing: 0.03em;
}

.pi-major-dev-type {
  font-size: 0.8rem;
  color: #475569;
  margin-bottom: 0.35rem;
}

.pi-major-dev-popup ul {
  margin: 0.25rem 0 0.45rem 1rem;
  padding: 0;
}

.pi-major-dev-actions {
  margin-top: 0.45rem;
}

.pi-major-dev-note {
  color: #64748b;
  font-size: 0.75rem;
}

