.coady-explorer { margin: 1rem 0; }
.coady-explorer-controls { margin-bottom: 0.75rem; }
.coady-row { display:flex; gap:0.5rem; flex-wrap:wrap; align-items:center; }
.coady-input { padding:0.4rem 0.5rem; min-width:160px; }
.coady-meta { color:#555; font-size:0.95rem; }

.coady-explorer-layout { display:grid; grid-template-columns:1fr 1fr; gap:1rem; }
.coady-results, .coady-map { border:1px solid #eee; padding:0.75rem; border-radius:8px; background:#fff; }
#coady-map { height:520px; border-radius:8px; }
.coady-map-note { margin-top:0.5rem; color:#666; font-size:0.9rem; }

.coady-card { border:1px solid #eee; border-radius:8px; padding:0.75rem; margin-bottom:0.75rem; background:#fff; }
.coady-card-title { font-weight:700; }
.coady-card-sub { color:#666; font-size:0.9rem; margin-top:0.2rem; }
.coady-card-body { margin-top:0.5rem; color:#333; }
.coady-card-actions { margin-top:0.6rem; }

.coady-muted { color:#666; }
.coady-error { color:#b00020; font-weight:600; }

/* Key/value table in the modal */
.coady-kv { width:100%; border-collapse:collapse; margin:0.5rem 0 1rem; }
.coady-kv th { text-align:left; padding:0.4rem 0.5rem; width:34%; color:#444; vertical-align:top; border-top:1px solid #eee; }
.coady-kv td { padding:0.4rem 0.5rem; border-top:1px solid #eee; color:#222; }

.coady-pre {
  background:#f7f7f8;
  border:1px solid #eee;
  border-radius:8px;
  padding:0.75rem;
  overflow:auto;
  max-height:340px;
  font-size:12px;
  line-height:1.35;
}

.coady-details summary {
  cursor:pointer;
  margin:0.5rem 0;
  font-weight:600;
  color:#333;
}

/* Modal */
.coady-modal { display:none; }
.coady-modal.is-open { display:block; }

html.coady-modal-open, body.coady-modal-open { overflow:hidden; }

.coady-modal-backdrop {
  position:fixed;
  inset:0;
  background:rgba(0,0,0,0.45);
  z-index:9998;
}

.coady-modal-dialog {
  position:fixed;
  z-index:9999;
  top:50%;
  left:50%;
  transform:translate(-50%,-50%);
  width:min(860px, calc(100vw - 24px));
  max-height:calc(100vh - 24px);
  background:#fff;
  border-radius:12px;
  box-shadow:0 10px 40px rgba(0,0,0,0.25);
  overflow:hidden;
  display:flex;
  flex-direction:column;
}

.coady-modal-header {
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:0.75rem 1rem;
  border-bottom:1px solid #eee;
}

.coady-modal-title {
  font-weight:700;
  font-size:1.05rem;
  margin-right:0.75rem;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.coady-modal-close {
  border:1px solid #ddd;
  background:#fff;
  border-radius:8px;
  width:36px;
  height:36px;
  font-size:22px;
  line-height:30px;
  cursor:pointer;
}

.coady-modal-body {
  padding:1rem;
  overflow:auto;
}

.coady-modal-section h3 {
  margin:0 0 0.5rem;
}

@media (max-width:980px){
  .coady-explorer-layout{ grid-template-columns:1fr; }
  #coady-map{ height:420px; }
}


/* Make the labeled subtitle read cleanly */
.coady-card-sub {
  font-size: 13px;
  line-height: 1.35;
}
.coady-subitem strong {
  font-weight: 600;
}
.coady-subsep {
  opacity: 0.6;
  margin: 0 6px;
}

/* Sources should be subtle */
.coady-sources {
  font-size: 12px;
  opacity: 0.75;
  margin-top: 6px;
}

/* Household modal lists */
.coady-list {
  display: grid;
  gap: 10px;
  margin: 8px 0 14px;
}
.coady-list-item {
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 10px;
  padding: 10px 12px;
}
.coady-label {
  font-weight: 600;
  opacity: 0.85;
  margin-right: 6px;
}

.coady-sources {
  font-size: 11px;
  opacity: 0.55;
}
.coady-label { font-weight: 600; opacity: 0.85; margin-right: 6px; }
.coady-sources { font-size: 11px; opacity: 0.55; margin-top: 6px; }


/* Keep provenance references unobtrusive */
.coady-card-sources,
.coady-modal .coady-card-sources {
  font-size: 12px !important;
  line-height: 1.25 !important;
  opacity: 0.75;
}

.coady-card-sources .coady-muted {
  font-size: 12px !important;
}
/* Make Sources visually “reference-like” */
.coady-card-sources,
.coady-inline-sources {
  font-size: 12px;
  line-height: 1.25;
  opacity: 0.75;
}

/* Household modal header line with toggle */
.coady-modal-hh-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
  margin-bottom: 10px;
}
.coady-maplink {
  text-decoration: none;
  margin-right: 8px;
}
.coady-maplinks {
  display: inline-flex;
  gap: 8px;
  align-items: center;
}
