/* Canada UXO section */
.region-switcher {
  margin: 0 0 1rem;
  font-size: 0.95rem;
  font-weight: 600;
}
.region-switcher a {
  text-decoration: none;
}
.region-switcher a[aria-current="page"] {
  text-decoration: underline;
  text-underline-offset: 4px;
}
.region-switcher .sep {
  margin: 0 0.4rem;
  color: var(--muted);
  font-weight: 500;
}

.canada-summaries {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem 1.5rem;
  margin: 1.25rem 0 1.5rem;
}
@media (max-width: 700px) {
  .canada-summaries { grid-template-columns: 1fr; }
}
.stat-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card);
  padding: 0.85rem 1rem 1rem;
}
.stat-panel h2 {
  font-size: 1rem;
  margin: 0 0 0.7rem;
}
.stat-row {
  display: grid;
  grid-template-columns: minmax(7.5rem, 11rem) 1fr 3rem;
  gap: 0.4rem 0.6rem;
  align-items: center;
  margin: 0.28rem 0;
  font-size: 0.85rem;
}
.stat-label { line-height: 1.2; }
.stat-bar {
  display: block;
  height: 0.7rem;
  background: color-mix(in srgb, var(--line) 70%, #fff);
  border-radius: 999px;
  overflow: hidden;
}
.stat-bar > span {
  display: block;
  height: 100%;
  min-width: 2px;
  background: #1d4ed8;
  border-radius: 999px;
}
.stat-panel[data-kind="status"] .stat-bar > span { background: #0f766e; }
.stat-panel[data-kind="precision"] .stat-bar > span { background: #b45309; }
.stat-n { text-align: right; font-variant-numeric: tabular-nums; color: var(--muted); }

.canada-note, .licence-note {
  max-width: 48rem;
}
.licence-note { font-size: 0.92rem; }

#canada-map {
  height: var(--map-h, 480px);
  margin: 1rem 0 0.5rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  z-index: 0;
}
.canada-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.1rem;
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0.4rem 0 1rem;
}
.canada-legend .swatch.exact {
  background: #0f766e;
  border-color: #0f766e;
}
.canada-legend .swatch.approx {
  background: #fbbf24;
  border-color: #b45309;
  box-shadow: inset 0 0 0 1px #b45309;
}

.status-pill, .precision-pill {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  white-space: nowrap;
}
.status-pill.in-assessment { color: #9a3412; background: #fff7ed; border-color: #fdba74; }
.status-pill.assessment-complete { color: #1e3a8a; background: #eff6ff; border-color: #93c5fd; }
.status-pill.risk-mitigation-ongoing { color: #9f1239; background: #fff1f2; border-color: #fda4af; }
.status-pill.closed { color: #14532d; background: #f0fdf4; border-color: #86efac; }
.status-pill.active { color: #1e3a8a; background: #eff6ff; border-color: #93c5fd; }
.status-pill.proposed { color: #9f1239; background: #fff1f2; border-color: #fda4af; }
.precision-pill.exact { color: #14532d; background: #f0fdf4; border-color: #86efac; }
.precision-pill.place-name-approx { color: #9a3412; background: #fff7ed; border-color: #fdba74; }
.precision-pill.mapped { color: #1e3a8a; background: #eff6ff; border-color: #93c5fd; }
.precision-pill.none { color: #334155; background: #f1f5f9; border-color: #cbd5e1; }

#canada-table th[data-key] { cursor: pointer; user-select: none; }
#canada-table th[data-key]:focus { outline: 2px solid #1d4ed8; outline-offset: 2px; }
#canada-empty { margin: 0.75rem 0; }

.research-progress {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card);
  padding: 1rem 1.1rem;
  max-width: 46rem;
}


/* Keep the Canada table readable on small screens: scroll sideways
   instead of breaking official IDs and names mid-word. */
#canada-table th,
#canada-table td {
  word-break: normal;
  overflow-wrap: break-word;
  vertical-align: top;
}
#canada-table td:first-child {
  overflow-wrap: anywhere;
  min-width: 10rem;
}
#canada-table th[data-key="site_id"],
#canada-table td:nth-child(2),
#canada-table .status-pill,
#canada-table .precision-pill {
  white-space: nowrap;
}
#canada-count,
#canada-table,
.filters {
  scroll-margin-top: 5.5rem;
}
@media (max-width: 700px) {
  #canada-table {
    font-size: 0.88rem;
    min-width: 44rem;
  }
  #canada-table th,
  #canada-table td {
    word-break: normal;
    white-space: nowrap;
  }
  #canada-table td:first-child {
    white-space: normal;
    overflow-wrap: break-word;
    word-break: normal;
  }
}

@media (max-width: 700px) {
  .table-wrap:has(#canada-table)::before {
    content: "Swipe the table sideways to see official ID, province, and status.";
    display: block;
    font-size: 0.8rem;
    color: var(--muted);
    margin: 0 0 0.45rem;
  }
}
