/* USWA Survey site — base styles */

:root {
  --bg: #fafaf7;
  --surface: #ffffff;
  --surface-soft: #f3f2ec;
  --border: rgba(0, 0, 0, 0.10);
  --border-strong: rgba(0, 0, 0, 0.18);
  --text: #1a1a18;
  --text-secondary: #5f5e5a;
  --text-tertiary: #888780;
  --accent: #0F6E56;
  --accent-coral: #D85A30;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Hoefler Text", Georgia, serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14141a;
    --surface: #1d1d23;
    --surface-soft: #25252c;
    --border: rgba(255, 255, 255, 0.10);
    --border-strong: rgba(255, 255, 255, 0.18);
    --text: #f0efea;
    --text-secondary: #b4b2a9;
    --text-tertiary: #888780;
  }
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
}

@media (max-width: 600px) {
  .container { padding: 1.5rem 1rem 3rem; }
}

/* Header */
.site-header {
  border-bottom: 1px solid var(--border);
  padding-bottom: 1.5rem;
  margin-bottom: 2rem;
}

.site-eyebrow {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  font-weight: 500;
  margin: 0 0 8px;
}

.site-title {
  font-family: var(--font-serif);
  font-size: 36px;
  font-weight: 500;
  line-height: 1.15;
  margin: 0 0 12px;
  letter-spacing: -0.01em;
}

@media (max-width: 600px) {
  .site-title { font-size: 26px; }
}

.site-subtitle {
  font-size: 16px;
  color: var(--text-secondary);
  margin: 0;
  max-width: 720px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
  text-decoration: none;
}
.back-link:hover { color: var(--accent); text-decoration: none; }

/* Sections */
.section {
  margin-top: 3rem;
}
.section-title {
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  font-weight: 500;
  margin: 0 0 1rem;
}

/* Metric cards */
.metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin: 1.5rem 0 2rem;
}
@media (max-width: 700px) {
  .metrics { grid-template-columns: repeat(2, 1fr); }
}
.metric {
  background: var(--surface-soft);
  border-radius: var(--radius-md);
  padding: 1rem 1.1rem;
}
.metric-label {
  font-size: 12px;
  color: var(--text-secondary);
  margin: 0 0 6px;
  letter-spacing: 0.02em;
}
.metric-value {
  font-size: 24px;
  font-weight: 500;
  margin: 0;
  line-height: 1.1;
}
.metric-suffix {
  font-size: 13px;
  color: var(--text-tertiary);
  font-weight: 400;
}

/* Legend */
.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin: 0 0 1.25rem;
  font-size: 13px;
  color: var(--text-secondary);
}
.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
}
.legend-swatch {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  flex-shrink: 0;
}
.legend-swatch.hatched {
  background-image: repeating-linear-gradient(
    45deg,
    transparent,
    transparent 2px,
    rgba(26, 26, 24, 0.35) 2px,
    rgba(26, 26, 24, 0.35) 3px
  );
  border: 1px solid var(--border);
}

/* View tabs */
.view-tabs {
  display: inline-flex;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 3px;
  margin: 0 0 0.75rem;
  background: var(--surface-soft);
  gap: 2px;
  flex-wrap: wrap;
}
.view-tab {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  padding: 7px 14px;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
}
.view-tab:hover { color: var(--text); }
.view-tab.is-active {
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}
@media (prefers-color-scheme: dark) {
  .view-tab.is-active { background: var(--surface-soft); box-shadow: none; border: 1px solid var(--border); }
}

.view-help {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 0 0 0.75rem;
  line-height: 1.55;
}
.view-help strong { color: var(--text); font-weight: 500; }

.view-controls {
  margin: 0 0 0.75rem;
  min-height: 1px;
}
.sort-label {
  font-size: 13px;
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.sort-select {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 5px 8px;
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
}
.sort-select:hover { border-color: var(--text-tertiary); }

.view-footnote {
  font-size: 12px;
  color: var(--text-tertiary);
  margin: 0.75rem 0 0;
  line-height: 1.55;
}

/* Bubble viz (legacy - kept in case used elsewhere) */
.viz-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  margin-bottom: 1.5rem;
  position: relative;
}
#bubble-viz svg {
  display: block;
  width: 100%;
  height: auto;
}
.bubble-help {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 0 0 1rem;
}

/* Bubble interactions */
.bubble-group { cursor: pointer; }
.bubble-group .bubble-circle {
  fill: var(--surface);
  stroke: var(--border-strong);
  stroke-width: 1;
  transition: stroke-width 0.15s ease;
}
.bubble-group:hover .bubble-circle {
  stroke-width: 2.5;
  stroke: var(--text);
}
.bubble-label {
  font-size: 11px;
  fill: var(--text);
  font-weight: 500;
  text-anchor: middle;
  pointer-events: none;
}
.bubble-sublabel {
  font-size: 10px;
  fill: var(--text-secondary);
  text-anchor: middle;
  pointer-events: none;
}

/* Tooltip */
.tooltip {
  position: absolute;
  background: var(--text);
  color: var(--bg);
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  line-height: 1.4;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.12s ease;
  z-index: 10;
  max-width: 260px;
}
.tooltip strong { font-weight: 500; }
.tooltip-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 2px;
}
.tooltip-row .label { opacity: 0.75; }

/* Jump list */
.jump-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.jump-list a {
  display: inline-block;
  padding: 6px 10px;
  background: var(--surface-soft);
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--text);
  font-weight: 500;
}
.jump-list a:hover { background: var(--accent); color: white; text-decoration: none; }

/* Detail page */
.detail-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 1.5rem;
  margin-bottom: 1.5rem;
}
.detail-title {
  font-family: var(--font-serif);
  font-size: 30px;
  font-weight: 500;
  line-height: 1.15;
  margin: 0;
}
.detail-statepill {
  display: inline-block;
  background: var(--surface-soft);
  color: var(--text-secondary);
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  margin-bottom: 8px;
}
.detail-meta {
  font-size: 13px;
  color: var(--text-secondary);
}

/* ===== Edit mode (front-end corrections) ===== */
.detail-header-actions {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  flex-shrink: 0;
}
.suggest-corrections-btn {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  color: var(--text);
  padding: 8px 14px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  text-decoration: none;
  transition: background 0.12s, border-color 0.12s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.suggest-corrections-btn:hover {
  background: var(--surface-soft);
  border-color: var(--accent);
  color: var(--accent);
  text-decoration: none;
}

/* Correction-applied banner on profile pages (lightweight, info-only) */
.correction-banner {
  background: rgba(29, 158, 117, 0.08);
  border: 1px solid rgba(29, 158, 117, 0.4);
  border-left: 3px solid #1D9E75;
  padding: 10px 14px;
  margin-bottom: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  color: var(--text);
  font-size: 13px;
}
.correction-banner strong { font-weight: 500; }
.correction-meta {
  display: block;
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 2px;
}
.correction-cta {
  color: var(--accent);
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
}
.correction-cta:hover { text-decoration: underline; }
@media (prefers-color-scheme: dark) {
  .correction-banner { background: rgba(29, 158, 117, 0.12); }
}

/* Mode pill on corrections page (live vs local) */
.mode-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
}
.mode-pill code {
  background: rgba(0,0,0,0.08);
  padding: 1px 5px;
  border-radius: 3px;
  font-size: 11px;
}
.mode-pill.mode-live {
  background: rgba(29, 158, 117, 0.12);
  color: #085041;
  border: 1px solid rgba(29, 158, 117, 0.4);
}
.mode-pill.mode-local {
  background: #FAEEDA;
  color: #633806;
  border: 1px solid #BA7517;
}
.mode-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: currentColor;
  display: inline-block;
}
.mode-pill.mode-live .mode-dot { animation: live-pulse 2s infinite; }
@keyframes live-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}
@media (prefers-color-scheme: dark) {
  .mode-pill.mode-live { color: #5DCAA5; }
  .mode-pill.mode-local { background: rgba(186, 117, 23, 0.18); color: #FAC775; }
}

/* Corrections page step containers */
.corrections-step {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
}
.corrections-step label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 8px;
}
.corrections-step select,
.corrections-step input {
  width: 100%;
  background: var(--surface-soft);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 9px 12px;
  font-size: 14px;
  font-family: inherit;
  color: var(--text);
  box-sizing: border-box;
}
.corrections-step select:focus,
.corrections-step input:focus {
  outline: none;
  border-color: var(--accent);
}

.passcode-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
  margin-top: 8px;
}
.passcode-row input {
  flex: 1;
  font-size: 16px;
  letter-spacing: 0.1em;
  text-align: center;
  font-family: ui-monospace, "SF Mono", Consolas, monospace;
}
.passcode-row .edit-btn-primary { flex-shrink: 0; }
.passcode-feedback {
  margin: 10px 0 0;
  font-size: 13px;
  padding: 8px 12px;
  border-radius: var(--radius-md);
}
.passcode-feedback.ok { background: rgba(29, 158, 117, 0.12); color: #085041; }
.passcode-feedback.err { background: rgba(217, 90, 48, 0.12); color: #7A2A0E; }
@media (prefers-color-scheme: dark) {
  .passcode-feedback.ok { color: #5DCAA5; }
  .passcode-feedback.err { color: #FAC775; }
}
.passcode-hint {
  font-size: 12px;
  color: var(--text-tertiary);
  margin: 10px 0 0;
  line-height: 1.5;
}

/* Corrections form */
.corrections-form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
}
.previous-meta {
  font-size: 13px;
  color: var(--text-secondary);
  padding: 8px 12px;
  border-radius: var(--radius-md);
  background: var(--surface-soft);
  border: 1px solid var(--border);
  margin: 0 0 1.25rem;
}
.edit-hint {
  font-size: 11px;
  color: var(--text-tertiary);
  margin: 4px 0 0;
  line-height: 1.4;
}
.edit-disclaimer {
  font-size: 12px;
  color: var(--text-tertiary);
  margin: 1rem 0 0;
  line-height: 1.55;
  padding: 8px 12px;
  background: var(--surface-soft);
  border-radius: var(--radius-md);
}

/* Success state */
.corrections-success {
  background: rgba(29, 158, 117, 0.08);
  border: 1px solid rgba(29, 158, 117, 0.4);
  border-radius: var(--radius-md);
  padding: 1.5rem 1.75rem;
}
.corrections-success .success-eyebrow {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #085041;
  margin: 0 0 4px;
}
.corrections-success h2 {
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 500;
  margin: 0 0 4px;
}
@media (prefers-color-scheme: dark) {
  .corrections-success .success-eyebrow { color: #5DCAA5; }
}

/* Reusing edit-banner classes from before, but simplified */
.edit-banner {
  background: #FAEEDA;
  border: 1px solid #BA7517;
  border-left: 4px solid #BA7517;
  border-radius: 0;
  padding: 12px 16px;
  margin-bottom: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  color: #633806;
  font-size: 14px;
}
.edit-banner strong { display: block; font-weight: 500; margin-bottom: 2px; }
.edit-banner-actions { display: flex; gap: 8px; flex-shrink: 0; }
@media (prefers-color-scheme: dark) {
  .edit-banner { background: rgba(186, 117, 23, 0.18); color: #FAC775; border-color: #BA7517; }
}

.edit-panel {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin: 2rem 0 3rem;
}
.edit-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}
.edit-panel-head h2 {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 500;
  margin: 0 0 4px;
}
.edit-panel-head p {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 0;
  max-width: 60ch;
}
.edit-section {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem 1.25rem;
  margin: 0 0 1rem;
}
.edit-section legend {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-secondary);
  padding: 0 6px;
}
.edit-field {
  display: block;
  margin: 0 0 12px;
  position: relative;
}
.edit-field:last-child { margin-bottom: 0; }
.edit-field label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 4px;
}
.edit-field input,
.edit-field textarea {
  width: 100%;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 8px 10px;
  font-size: 14px;
  font-family: inherit;
  color: var(--text);
  resize: vertical;
  box-sizing: border-box;
}
.edit-field input:focus,
.edit-field textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--surface);
}
.edit-field.is-changed input,
.edit-field.is-changed textarea {
  border-color: #BA7517;
  background: #FAEEDA;
  color: #412402;
}
@media (prefers-color-scheme: dark) {
  .edit-field.is-changed input,
  .edit-field.is-changed textarea {
    background: rgba(186, 117, 23, 0.18);
    color: #FAC775;
    border-color: #BA7517;
  }
}
.edit-original {
  font-size: 11px;
  color: var(--text-tertiary);
  margin: 4px 0 0;
}
.edit-original code {
  background: var(--surface-soft);
  padding: 1px 5px;
  border-radius: 3px;
  font-size: 11px;
}
.edit-funding-check {
  font-size: 13px;
  margin: 1rem 0 1.5rem;
  padding: 8px 12px;
  border-radius: var(--radius-md);
}
.edit-funding-check.ok {
  background: rgba(29, 158, 117, 0.1);
  color: #085041;
}
.edit-funding-check.warn {
  background: #FAEEDA;
  color: #633806;
}
@media (prefers-color-scheme: dark) {
  .edit-funding-check.ok { color: #5DCAA5; }
  .edit-funding-check.warn { background: rgba(186, 117, 23, 0.18); color: #FAC775; }
}
.edit-panel-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  align-items: center;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
  margin-top: 0.5rem;
}
.edit-foot-right { display: flex; flex-wrap: wrap; gap: 8px; }
.edit-btn-primary,
.edit-btn-secondary {
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s;
}
.edit-btn-primary {
  background: var(--accent);
  color: #ffffff;
  border: 1px solid var(--accent);
}
.edit-btn-primary:hover { background: #0F6E56; border-color: #0F6E56; }
.edit-btn-secondary {
  background: var(--surface-soft);
  color: var(--text);
  border: 1px solid var(--border-strong);
}
.edit-btn-secondary:hover {
  background: var(--surface);
  border-color: var(--text-secondary);
}

/* Funding viz on detail page */
.funding-block {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) 1.4fr;
  gap: 2rem;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin: 1.5rem 0;
}
@media (max-width: 720px) {
  .funding-block { grid-template-columns: 1fr; }
}
#donut-viz {
  display: block;
  width: 100%;
  max-width: 320px;
  height: auto;
  margin: 0 auto;
}
.funding-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.funding-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}
.funding-list li:last-child { border-bottom: none; }
.funding-list .swatch {
  width: 12px; height: 12px; border-radius: 3px; flex-shrink: 0;
}
.funding-list .name { flex: 1; }
.funding-list .pct { font-weight: 500; }
.funding-list .pct-zero { color: var(--text-tertiary); font-weight: 400; }

.funding-note {
  font-size: 13px;
  color: var(--text-secondary);
  background: var(--surface-soft);
  border-left: 3px solid var(--accent-coral);
  border-radius: 0;
  padding: 12px 14px;
  margin: 1.25rem 0;
  line-height: 1.55;
}
.funding-raw {
  font-size: 13px;
  color: var(--text-tertiary);
  font-style: italic;
  margin-top: 1rem;
}

/* Detail grid sections */
.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-top: 2rem;
}
@media (max-width: 720px) {
  .detail-grid { grid-template-columns: 1fr; }
}
.detail-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.4rem;
}
.detail-card h3 {
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  font-weight: 500;
  margin: 0 0 1rem;
}
.detail-card dl {
  margin: 0;
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 8px 14px;
  font-size: 14px;
}
.detail-card dt {
  color: var(--text-secondary);
  font-weight: 400;
}
.detail-card dd {
  margin: 0;
  color: var(--text);
}
.detail-card p {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
}

/* Holdback callout */
.holdback-callout {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent-coral);
  border-radius: var(--radius-sm);
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
}
.holdback-callout .h-label {
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-coral);
  font-weight: 500;
  margin: 0 0 4px;
}
.holdback-callout .h-amount {
  font-size: 20px;
  font-weight: 500;
  margin: 0 0 4px;
}
.holdback-callout .h-use {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 0;
}

/* Map page */
.map-wrap {
  padding: 0.5rem;
}
#map-container {
  width: 100%;
  background: transparent;
}
.map-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  align-items: center;
  margin: 0 0 1rem;
  font-size: 13px;
  color: var(--text-secondary);
}
.legend-note {
  font-size: 12px;
  color: var(--text-tertiary);
  flex-basis: 100%;
  margin-top: 4px;
}

/* Map table */
.map-table-scroll {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}
.map-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  background: var(--surface);
}
.map-table th, .map-table td {
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.map-table thead th {
  background: var(--surface-soft);
  font-weight: 500;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-tertiary);
  border-bottom: 1px solid var(--border-strong);
}
.map-table tbody tr:last-child td { border-bottom: none; }
.map-table .t-num { text-align: right; white-space: nowrap; }
.map-table .t-meta { color: var(--text-secondary); font-size: 13px; }
.map-table a { color: var(--text); }
.map-table a:hover { color: var(--accent); }

.mixed-badge {
  display: inline-block;
  background: #CECBF6;
  color: #26215C;
  font-size: 11px;
  font-weight: 500;
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 4px;
  vertical-align: middle;
}
@media (prefers-color-scheme: dark) {
  .mixed-badge { background: rgba(127,119,221,0.20); color: #CECBF6; }
}

/* Hero CTA link in index */
.cta-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  background: var(--accent);
  color: white !important;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none !important;
  transition: opacity 0.12s;
}
.cta-link:hover { opacity: 0.9; }

.external-link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}
.external-link:hover { text-decoration: underline; }

.mixed-coverage-card {
  margin-top: 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid #7F77DD;
  border-radius: 0;
  padding: 1rem 1.25rem;
}
.mc-header {
  font-size: 14px;
  font-weight: 500;
  margin: 0 0 0.75rem;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
}
.mc-header a { color: var(--text); text-decoration: underline; text-decoration-color: var(--text-tertiary); }
.mc-header a:hover { color: var(--accent); }
.mc-dot {
  width: 10px; height: 10px; border-radius: 50%;
  flex-shrink: 0;
}
.mc-list {
  list-style: none;
  padding: 0;
  margin: 0 0 0.75rem;
}
.mc-list li {
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  color: var(--text);
}
.mc-list li:last-child { border-bottom: none; }
.mc-list li strong { font-weight: 500; }
.mc-list li a { color: var(--text-secondary); }
.mc-list li a:hover { color: var(--accent); }
.mc-note {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.55;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  margin-top: 4rem;
  padding-top: 1.5rem;
  font-size: 12px;
  color: var(--text-tertiary);
}
.site-footer p { margin: 0 0 6px; }

/* Other-associations nav (detail page) */
.other-assn {
  margin-top: 3rem;
}
.other-assn h3 {
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  font-weight: 500;
  margin: 0 0 1rem;
}

/* Data quality flags */
.data-flag {
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  margin-bottom: 0.75rem;
  background: #fdf3e0;
  border: 1px solid #f0d098;
}
.data-flag-minor {
  background: var(--surface-soft);
  border: 1px solid var(--border-strong);
}
@media (prefers-color-scheme: dark) {
  .data-flag {
    background: rgba(186, 117, 23, 0.10);
    border-color: rgba(250, 199, 117, 0.30);
  }
  .data-flag-minor {
    background: var(--surface-soft);
    border-color: var(--border-strong);
  }
}
.flag-title {
  font-weight: 500;
  font-size: 14px;
  margin: 0 0 6px;
  color: #633806;
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.data-flag-minor .flag-title { color: var(--text); }
@media (prefers-color-scheme: dark) {
  .flag-title { color: #FAC775; }
  .data-flag-minor .flag-title { color: var(--text); }
}
.flag-icon {
  font-size: 14px;
  flex-shrink: 0;
}
.flag-detail {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.6;
}

/* Resolved variant */
.data-flag-resolved {
  background: var(--surface-soft) !important;
  border-color: var(--border) !important;
  opacity: 0.85;
}
.data-flag-resolved .flag-title {
  color: var(--text-secondary) !important;
  text-decoration: line-through;
  text-decoration-color: var(--text-tertiary);
}
.data-flag-resolved .flag-icon {
  color: var(--accent);
  text-decoration: none;
}
.flag-resolution {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 8px 0 0;
  padding-top: 8px;
  border-top: 1px dashed var(--border);
  line-height: 1.55;
}
.flag-resolution strong { color: var(--text); font-weight: 500; }

/* Resolved toggle button */
.resolved-toggle-wrap {
  margin-top: 0.75rem;
  text-align: left;
}
.resolved-toggle {
  background: transparent;
  border: 1px solid var(--border-strong);
  color: var(--text-secondary);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
}
.resolved-toggle:hover {
  background: var(--surface-soft);
  color: var(--text);
}

.dq-org-resolved {
  opacity: 0.75;
}
.dq-org-resolved > a { color: var(--text-secondary); }
.dq-org-resolved ul em { color: var(--accent); font-style: normal; }

/* Index page: data quality summary */
.dq-summary-intro {
  font-size: 14px;
  color: var(--text-secondary);
  margin: 0 0 1rem;
  line-height: 1.6;
}
.dq-org-block {
  margin-bottom: 1.25rem;
}
.dq-org-block > a {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
}
.dq-org-block > a:hover { color: var(--accent); }
.dq-org-block .dq-state {
  font-size: 12px;
  color: var(--text-tertiary);
  margin-left: 4px;
  letter-spacing: 0.05em;
}
.dq-org-block ul {
  margin: 6px 0 0;
  padding-left: 1.25rem;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.55;
}
.dq-org-block li { margin-bottom: 4px; }
.dq-org-block li strong { color: var(--text); font-weight: 500; }
.dq-empty {
  font-size: 14px;
  color: var(--text-secondary);
  margin: 0;
}
