*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  color-scheme: light;

  --bg-color: #eaf1fa;

  --surface-color: #ffffff;
  --surface-elevated: #ffffff;
  --surface-overlay: #ffffff;

  --text-color: #262626;
  --text-muted: #525252;

  --primary-color: #1371c2;
  --primary-glow: rgba(19, 113, 194, 0.5);
  --secondary-color: #da0067;
    --accent-color: #0b80e5;

  --border-color: #c6c6c6;
  --border-highlight: #8d8d8d;

  --shadow-color: rgba(55, 70, 95, 0.12);
  --shadow-glow: -1px 1px 4px 0 var(--shadow-color);

  --focus-ring-color: #1371c2;

  --btn-primary-text: #ffffff;

  --font-family-sans: "Source Sans 3", "Segoe UI", Arial, Helvetica, sans-serif;
  --font-family-display: "Source Serif 4", Georgia, "Times New Roman", serif;

  --hairline: #d3e1f0;
  --eyebrow-color: #12395e;

  --border-radius: 4px;
}

@media (prefers-contrast: more) {
  :root {
    --border-color: #4b5563;
    --focus-ring-color: #0a4a85;
  }
}

html.high-contrast {
  --bg-color: #ffffff;
  --surface-color: #ffffff;
  --surface-elevated: #ffffff;
  --surface-overlay: #ffffff;

  --text-color: #000000;
  --text-muted: #000000;

  --primary-color: #000000;
  --primary-glow: rgba(0, 0, 0, 0.55);
  --secondary-color: #000000;
  --accent-color: #000000;

  --border-color: #000000;
  --border-highlight: #000000;

  --shadow-color: rgba(0, 0, 0, 0.45);
  --shadow-glow: -1px 1px 4px 0 var(--shadow-color);

  --focus-ring-color: #000000;

  --hairline: #000000;
  --eyebrow-color: #000000;
}

html.high-contrast .app-header { background: #000000; }
html.high-contrast .app-header p { color: #ffffff; }
html.high-contrast .map-stage-header { background: #000000; border-color: #ffffff; }
html.high-contrast .leaflet-container { background: #ffffff; }

html.high-contrast .search-chip,
html.high-contrast .search-chip--locked {
  background: #000000;
  border-color: #000000;
  color: #ffffff;
}
html.high-contrast .search-chip--theme {
  background: #000000;
  border: 1.5px dashed #ffffff;
  color: #ffffff;
}
html.high-contrast .search-block .search-chip-remove,
html.high-contrast .search-block .search-chip-remove:hover {
  color: #ffffff;
}

html.high-contrast .leaflet-marker-icon:not(.marker-cluster) {
  filter: brightness(0);
}
html.high-contrast .marker-cluster-small,
html.high-contrast .marker-cluster-medium,
html.high-contrast .marker-cluster-large {
  background-color: rgba(0, 0, 0, 0.30) !important;
}
html.high-contrast .marker-cluster-small div,
html.high-contrast .marker-cluster-medium div,
html.high-contrast .marker-cluster-large div {
  background-color: #000000 !important;
  color: #ffffff !important;
  border-color: #ffffff !important;
}

html.high-contrast .vis-navigation .vis-button {
  filter: grayscale(1) brightness(0.35);
}

html.high-contrast a { text-decoration: underline; }

html.high-contrast .slider-container span,
html.high-contrast .search-option--suggestion .search-option-main,
html.high-contrast .search-block .search-action,
html.high-contrast .explore-theme,
html.high-contrast .explore-tag-pill,
html.high-contrast .explore-btn--ghost:hover {
  color: #000000;
}
html.high-contrast .search-block .search-action--suggestion:hover,
html.high-contrast .explore-btn:hover {
  background: #000000;
  border-color: #000000;
  color: #ffffff;
}
html.high-contrast .sr-only-focusable:focus-within button {
  background: rgba(0, 0, 0, 0.06);
}

html.high-contrast .score-1 { background-color: #000000 !important; }
html.high-contrast .btn-primary:hover { background-color: #333333; border-color: #333333; }

html.high-contrast .leaflet-popup-content b,
html.high-contrast .leaflet-popup-content a { color: #000000 !important; }
html.high-contrast .leaflet-popup-content a { text-decoration: underline; }

html.high-contrast .ukri-tabs button,
html.high-contrast .wordcloud-tabs button,
html.high-contrast .explore-tabs button,
html.high-contrast .infra-edge-btn,
html.high-contrast .map-toggle-btn {
  background: #f0f0f0;
  color: #000000;
  border-color: #000000;
}
html.high-contrast .ukri-tabs button.active,
html.high-contrast .wordcloud-tabs button.active,
html.high-contrast .explore-tabs button.active,
html.high-contrast .infra-edge-btn.active,
html.high-contrast .map-toggle-btn.active {
  background: #000000;
  color: #ffffff;
  border-color: #000000;
}

html.high-contrast .leaflet-tile-pane {
  filter: grayscale(1) contrast(1.25);
}

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .viz-card:hover { transform: none; }
}

body {
  font-family: var(--font-family-sans);
  background-color: var(--bg-color);

  color: var(--text-color);
  line-height: 1.6;
  min-height: 100vh;
}

a { color: var(--primary-color); }
a:hover { color: var(--accent-color); }

.skip-link {
  position: absolute;
  left: 8px;
  top: -48px;
  z-index: 2000;
  padding: 0.5rem 0.9rem;
  background: var(--surface-color);
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
  border-radius: var(--border-radius);
  font-weight: 700;
  transition: top 0.15s ease;
}
.skip-link:focus {
  top: 8px;
  outline: 3px solid var(--focus-ring-color);
  outline-offset: 2px;
}

.app-container {
  max-width: 1440px;
  margin: 0 auto;
  padding: 1rem 1rem 3rem;
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.app-header {
  padding: 1.5rem 2rem;
  background: #032749;
  color: #f4f4f4;
  border-radius: 0;
  border: none;
  box-shadow: none;
  margin-bottom: 2rem;

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  flex-wrap: wrap;
}

.app-header-text { flex: 1 1 320px; min-width: 0; }

.contrast-toggle {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.95rem;
  border-radius: 999px;
  border: 1.5px solid rgba(255, 255, 255, 0.6);
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  font-family: var(--font-family-sans);
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.contrast-toggle:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: #ffffff;
}
.contrast-toggle-icon { flex: 0 0 auto; display: block; }

.contrast-toggle[aria-pressed="true"] {
  background: #ffffff;
  color: #032749;
  border-color: #ffffff;
}
html.high-contrast .contrast-toggle[aria-pressed="true"] { color: #000000; }
.contrast-toggle:focus-visible {
  outline: 3px solid #ffffff;
  outline-offset: 3px;
}

.app-header h1 {
  font-family: var(--font-family-display);
  font-size: 2.2rem;
  font-weight: 700;
  color: #ffffff;
  background: none;
  -webkit-text-fill-color: initial;
  margin-bottom: 0.25rem;
}

.app-header p {
  color: #c9e3fe;
}

.app-header p a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.app-header p a:hover {
  color: #ffffff;
}

.app-header p a:focus-visible {
  outline: 3px solid #ffffff;
  outline-offset: 3px;
}

.content-card {
  background: var(--surface-color);
  border-radius: var(--border-radius);
  border: 1px solid var(--border-color);
  padding: 1.5rem;
  box-shadow: -1px 1px 4px 0 var(--shadow-color);
}

.map-stage {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: 1rem;

  position: relative;
  border-radius: calc(var(--border-radius) + 2px);
}

.map-stage-card {
  flex: 1;
  min-height: clamp(520px, 68vh, 820px);
  position: relative;

  display: flex;
  flex-direction: column;
}

.map-stage-header {
  position: absolute;
  top: auto;
  bottom: 25px;
  left: 14px;
  z-index: 500;
  background: rgba(16, 35, 58, 0.75);
  border: 1px solid var(--border-color);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 0.55rem 0.75rem;
  border-radius: 999px;
}

.map-stage-title {
  font-family: var(--font-family-display);
  font-size: 1rem;
  color: #ffffff;
  white-space: nowrap;
}

#map {
  width: 100%;

  height: 100%;
  flex: 1;
  min-height: 520px;
  border-radius: 18px;
  overflow: hidden;
}

.filter-panel {
  position: relative;
  top: auto;
  right: auto;
  z-index: 600;
  width: 380px;
  min-width: 300px;
  max-height: none;

  background: var(--surface-overlay);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 1rem;
  box-shadow: -1px 1px 4px 0 var(--shadow-color);
}

@media (max-width: 980px) {
  .map-stage {
    flex-direction: column;
  }
  .filter-panel {
    width: 100%;
  }
}

.sidebar-title {
  font-family: var(--font-family-display);
  font-size: 1.35rem;
  color: var(--text-color);
  margin-bottom: 0.85rem;
  border-bottom: 1px solid rgba(107, 212, 255, 0.22);
  padding-bottom: 0.55rem;
}

.filter-acc {
  border-top: 1px solid var(--hairline);
}
.filter-acc:last-of-type {
  border-bottom: 1px solid var(--hairline);
  margin-bottom: 1rem;
}
.filter-acc summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-color);
  padding: 0.6rem 0.15rem;
  min-height: 24px;
}
.filter-acc summary:hover { color: var(--primary-color); }
.filter-acc summary .experimental-badge { margin-left: 0.4rem; }
.filter-acc[open] { padding-bottom: 0.85rem; }
.filter-acc[open] summary { margin-bottom: 0.35rem; }
.filter-acc .filter-group { margin-top: 0.4rem; }

#filter-form {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.filter-group label,
.filter-section-label {
  display: flex;
  align-items: center;
  font-weight: 650;
  margin-bottom: 0.45rem;
  color: var(--text-color);
}

.label-normal {
  font-weight: 500;
  margin-bottom: 0;
  color: var(--text-muted);
}

.input-field,
.select-field,
.slider {
  width: 100%;
  padding: 0.62rem 0.78rem;
  border-radius: 0;
  border: 1px solid #8d8d8d;
  color: var(--text-color);
  background: #ffffff;
  font-size: 1rem;
  transition: all 0.2s ease;
}

.input-field::placeholder {
  color: #595959;
  opacity: 1;
}

.input-field:focus-visible,
.select-field:focus-visible,
.slider:focus-visible,
.btn:focus-visible,
a:focus-visible {
  outline: 3px solid var(--focus-ring-color);
  outline-offset: 2px;
  border-color: var(--primary-color);
}

button:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--focus-ring-color);
  outline-offset: 2px;
}

.checkbox-group {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
}

.checkbox-group input {
  width: 1.2em;
  height: 1.2em;
  margin-top: 0.15rem;
}

.slider-container {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.slider-container span {
  font-weight: 700;
  color: #0f5b9e;
}

.field-hint {
  margin-top: 0.35rem;
  font-size: 0.92rem;
  color: var(--text-muted);
}

.filter-buttons {
  display: flex;
  gap: 0.6rem;
  margin-top: 0.2rem;
}

.btn {
  padding: 0.72rem 1rem;
  border-radius: 0;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid var(--border-color);
  transition: all 0.2s ease;
}

.btn-primary {
  background: var(--secondary-color);
  color: #fff;
  border: 2px solid var(--secondary-color);
  font-weight: 700;
  border-radius: 0;
  box-shadow: none;
}

.btn-primary:hover {
  background-color: #bf0059;
  border-color: #bf0059;
  transform: none;
  filter: none;
}

.btn-primary:hover { filter: brightness(1.03); }

.btn-secondary {
  background: transparent;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
  font-weight: 700;
  border-radius: 0;
  box-shadow: none;
}

.btn-secondary:hover {
  background-color: var(--primary-color);
  color: #ffffff;
  filter: none;
}

.btn:active { transform: translateY(1px); }

@media (max-width: 980px) {
  .filter-panel {
    position: static;
    width: 100%;
    max-height: none;
    margin-top: 0.75rem;
  }
  .map-stage { overflow: visible; }
}

.main-content { display: flex; flex-direction: column; gap: 1.75rem; }

.page-toc {
  position: sticky;
  top: 0;
  z-index: 1500;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.5rem;
  padding: 0.55rem 0.25rem;
  margin-top: -1rem;
  background: var(--bg-color);
  border-bottom: 1px solid var(--hairline);
  font-family: var(--font-family-sans);
  font-size: 0.9rem;
}
.page-toc a {
  color: var(--eyebrow-color);
  text-decoration: none;
  font-weight: 600;
  padding: 0.1rem 0;
}
.page-toc a:hover { color: var(--primary-color); text-decoration: underline; }

#map-stage, #explore-hub-card, #infra-results-card, .viz-grid .viz-card {
  scroll-margin-top: 3.5rem;
}

.filter-sentence {
  font-family: var(--font-family-display);
  font-style: italic;
  font-size: 0.95rem;
  color: #c9e3fe;
  flex: 1;
  min-width: 0;
  margin: 0 1rem;
}

#visualizations-container.content-card {
  background: none;
  border: 0;
  box-shadow: none;
  padding: 0;
}

.viz-title {
  font-family: var(--font-family-display);
  font-size: 1.9rem;
  font-weight: 700;
  color: var(--text-color);
  margin-bottom: 1.25rem;
}

.viz-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
}

@media (max-width: 1100px) {
  .viz-grid { grid-template-columns: 1fr; }
}

.viz-card {
  background: var(--surface-elevated);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 1.35rem;
  display: flex;
  flex-direction: column;
  box-shadow: -1px 1px 4px 0 var(--shadow-color);
}

.viz-grid .viz-card {
  background: none;
  border: 0;
  border-top: 1px solid var(--hairline);
  border-radius: 0;
  box-shadow: none;
  padding: 2rem 0 0.5rem;
}

.viz-eyebrow {
  font-family: var(--font-family-sans);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--eyebrow-color);
  margin-bottom: 0.4rem;
}

.viz-card h4.viz-question {
  font-family: var(--font-family-display);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-color);
  text-align: left;
  margin-bottom: 0.9rem;
}

.viz-about {
  margin-bottom: 1rem;
  max-width: 65ch;
}
.viz-about summary {
  cursor: pointer;
  font-family: var(--font-family-sans);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--primary-color);
  width: fit-content;
  padding: 0.15rem 0;
}
.viz-about[open] summary { margin-bottom: 0.4rem; }
.viz-about p {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.55;
}

.viz-card h4 {
  text-align: center;
  margin-bottom: 0.75rem;
  color: var(--text-color);
}

.viz-description {
  font-size: 0.92rem;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 0.75rem;
}

.loading {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 200px;
  color: var(--text-muted);
}

.viz-card-full-width { grid-column: 1 / -1; }

#wordcloud-most,
#wordcloud-least {
  width: 100%;
  height: 250px;
  border-radius: var(--border-radius);
  overflow: hidden;
  border: 1px solid var(--border-color);
  background: var(--surface-color);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

.sr-only-focusable {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}
.sr-only-focusable:focus-within {
  position: static;
  width: auto;
  height: auto;
  max-height: 320px;
  margin: 0.5rem 0;
  padding: 0.5rem 0.75rem;
  overflow: auto;
  clip: auto;
  white-space: normal;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  background: var(--surface-color);
  font-size: 0.85rem;
  text-align: left;
}
.sr-only-focusable:focus-within h5 {
  margin: 0.35rem 0 0.15rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}
.sr-only-focusable:focus-within ul,
.sr-only-focusable:focus-within ol {
  margin: 0 0 0.4rem 1.25rem;
}
.sr-only-focusable:focus-within button {
  display: inline-block;
  margin: 2px 0;
  padding: 2px 6px;
  background: rgba(19, 113, 194, 0.08);
  border: 1px solid var(--border-color);
  border-radius: 3px;
  color: var(--primary-color);
  font: inherit;
  cursor: pointer;
  text-align: left;
}

.viz-card { position: relative; }

.viz-chart-area {
  position: relative;
  height: 320px;
  margin-top: auto;
}
#co-occurrence-chart { width: 100% !important; height: 100% !important; }

#wordcloud-most canvas,
#wordcloud-least canvas {
  width: 100%;
  height: 100%;
  image-rendering: optimizeQuality;
}

#tag-network-container {
  width: 100%;
  height: 500px;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  background-color: var(--surface-color);
}

#tag-network-legend {
  text-align: center;
  margin-top: 0.5rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

#infra-network-container {
  width: 100%;
  height: 500px;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  background-color: var(--surface-color);
}

.infra-network-controls {
  display: flex;
  gap: 0.5rem;
  margin: 1rem 0;
  align-items: center;
}

.infra-network-controls .input-field { flex-grow: 1; }

.infra-network-controls .btn {
  flex-grow: 0;
  padding: 0.6rem 1rem;
}

#infra-network-legend {
  text-align: center;
  margin-top: 0.5rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.graph-popover {
  position: absolute;
  max-width: 280px;
  background: rgba(16, 35, 58, 0.92);
  border-radius: 14px;
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.55);
  padding: 12px 14px;
  z-index: 9999;
  border: 1px solid var(--border-color);
  color: var(--text-color);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.graph-popover .title { font-weight: 750; margin-bottom: 6px; }
.graph-popover .meta { font-size: 12px; color: var(--text-muted); margin-bottom: 10px; }
.graph-popover .actions { display: flex; gap: 8px; }
.graph-popover .btn {
  padding: 6px 10px;
  border-radius: 10px;
  border: 1px solid var(--border-color);
  background: rgba(12, 26, 43, 0.65);
  color: var(--text-color);
  cursor: pointer;
}

.hidden { display: none; }

.infra-info-panel {
  display: none;
  position: absolute;
  width: 320px;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: 1rem;
  z-index: 99999;
  pointer-events: auto;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  font-size: 14px;
  color: var(--text-color);
}

.infra-info-panel h4 {
  margin: 0 0 0.65rem 0;
  color: var(--primary-color);
  font-size: 1rem;
}

.infra-info-panel p {
  margin: 0.45rem 0;
  color: var(--text-color);
}

.infra-info-close-btn {
  position: absolute;
  top: 6px;
  right: 10px;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-muted);
  cursor: pointer;
}

.infra-info-close-btn:hover {
  color: var(--secondary-color);
}

.ukri-tabs { display: flex; gap: 0.5rem; margin: 0.25rem 0 1rem; justify-content: center; }
.ukri-tabs button {
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--border-color);
  background: rgba(12, 26, 43, 0.45);
  cursor: pointer;
  font-weight: 750;
  color: var(--text-color);
}

.ukri-tabs button.active {
  background: var(--primary-color);
  color: var(--btn-primary-text);
  border-color: rgba(107, 212, 255, 0.35);
}

.wordcloud-tabs { display: flex; gap: 0.5rem; margin: 0.25rem 0 1rem; justify-content: center; flex-wrap: wrap; }
.wordcloud-tabs button {
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--border-color);
  background: rgba(12, 26, 43, 0.45);
  cursor: pointer;
  font-weight: 750;
  font-size: 0.85rem;
  color: var(--text-color);
  transition: background 0.2s, border-color 0.2s;
}
.wordcloud-tabs button.active {
  background: var(--primary-color);
  color: var(--btn-primary-text);
  border-color: rgba(107, 212, 255, 0.35);
}
.wordcloud-tabs button:hover:not(.active) {
  background: rgba(19, 113, 194, 0.25);
}

.infra-edge-toggle {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin: 0 0 1rem;
}
.infra-edge-btn {
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--border-color);
  background: var(--surface-color);
  cursor: pointer;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--text-color);
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.infra-edge-btn.active {
  background: var(--primary-color);
  color: var(--btn-primary-text);
  border-color: var(--primary-color);
}
.infra-edge-btn:hover:not(.active) {
  background: rgba(19, 113, 194, 0.12);
}

.wordcloud-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
@media (max-width: 700px) {
  .wordcloud-pair { grid-template-columns: 1fr; }
}
.wordcloud-col h5 {
  text-align: center;
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.ukri-list { display: grid; gap: 0.75rem; }

.ukri-item {
  background: #f4f4f4;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: 0.75rem 0.9rem;
  color: var(--text-color);
}

.ukri-item .title {
  font-weight: 750;
  margin-bottom: 0.25rem;
  color: var(--primary-color);
}

.ukri-item .meta {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 0.35rem;
}

.ukri-item .snippet {
  color: var(--text-color);
  font-size: 0.95rem;
}

.ukri-item .tags {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-top: 0.35rem;
}

#ukri-card .ukri-list { max-height: 520px; overflow: auto; padding-right: 6px; }

.leaflet-container {
  background: #07111f;
}

.leaflet-control-attribution,
.leaflet-control-scale {
  background: rgba(255, 255, 255, 0.8) !important;
  color: #262626 !important;
  border: none !important;
  border-radius: 0 !important;
}

.leaflet-control-attribution a { color: var(--primary-color) !important; }

.leaflet-popup-content-wrapper,
.leaflet-popup-tip {
  background: #ffffff !important;
  color: #262626 !important;
  border: 1px solid #c6c6c6 !important;
  border-radius: 4px !important;
  box-shadow: 0 3px 14px rgba(0,0,0,0.2) !important;
}

.leaflet-popup-content {
  margin: 0.85rem 0.95rem;
}

.leaflet-popup-content a { color: var(--primary-color) !important; font-weight: 700; }

.popup-host-btn {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  color: var(--primary-color);
  text-decoration: underline;
  cursor: pointer;
}
.popup-host-btn:hover,
.popup-host-btn:focus {
  color: var(--secondary-color);
}

.leaflet-popup-close-button {
  color: rgba(231, 238, 249, 0.85) !important;
}

.entanglement-tag {
  display: inline-flex;
  align-items: center;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 2px;
  margin-top: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.score-3 { background-color: var(--secondary-color); color: white; }
.score-2 { background-color: var(--primary-color); color: white; }
.score-1 { background-color: #6f6f6f; color: white; }

.entanglement-desc {
  font-size: 0.8rem;
  font-style: italic;
  color: var(--text-muted);
  margin-top: 4px;
  line-height: 1.2;
}

#entanglement-info-icon:hover {
  background-color: var(--primary-color);
  color: white !important;
}

#entanglement-info-box {
  animation: fadeIn 0.2s ease-in-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-5px); }
  to { opacity: 1; transform: translateY(0); }
}

.marker-cluster-small,
.marker-cluster-medium,
.marker-cluster-large {
  background-color: rgba(19, 113, 194, 0.30) !important;
}

.marker-cluster-small div,
.marker-cluster-medium div,
.marker-cluster-large div {
  background-color: #1371c2 !important;
  color: #ffffff !important;
  border: 2px solid #ffffff !important;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35) !important;
  font-weight: 800;
}

.leaflet-container:focus-visible {
  outline: 3px solid var(--focus-ring-color);
  outline-offset: -3px;
}

.filter-info {
  position: relative;
  display: inline-flex;
}

.filter-panel:has(.filter-info.open) {
  z-index: 1600;
}

.filter-info-icon {
  position: relative;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  margin-left: 4px;
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  color: inherit;
  min-width: 24px;
  min-height: 24px;
}

.filter-info-icon .info-circle {
  display: inline-block;
  width: 18px;
  height: 18px;
  line-height: 18px;
  text-align: center;
  border-radius: 50%;
  background-color: #595959;
  color: #fff;
  font-size: 12px;
  font-weight: bold;
  font-family: serif;
  transition: background-color 0.2s ease;
}

.filter-info-icon:hover .info-circle,
.filter-info.open .info-circle {
  background-color: var(--primary-color);
}

.filter-info-bubble {
  display: none;
  position: absolute;
  bottom: 140%;
  left: 50%;
  transform: translateX(-50%);
  width: 260px;
  background-color: var(--surface-color);
  border: 1px solid var(--border-color);
  padding: 1rem;
  border-radius: 6px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  font-weight: normal;
  text-transform: none;
  cursor: default;
  color: var(--text-color);
}

.filter-info-bubble::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -6px;
  border-width: 6px;
  border-style: solid;
  border-color: var(--surface-color) transparent transparent transparent;
}

.filter-info.open .filter-info-bubble {
  display: block;
}

.filter-info-bubble .close-info {
  position: absolute;
  top: 5px;
  right: 8px;
  background: none;
  border: none;
  font-size: 1.2rem;
  line-height: 1;
  color: var(--text-muted);
  cursor: pointer;
}

.filter-info-bubble .close-info:hover {
  color: var(--secondary-color);
}

.experimental-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #b45309;
  background: #fef3c7;
  border: 1px solid #fcd34d;
  border-radius: 3px;
  padding: 0.15em 0.5em;
  line-height: 1.4;
}

.filter-info-bubble--wide {
  width: 320px;
  font-size: 0.88rem;
  line-height: 1.5;
}

.filter-info-bubble--wide p {
  margin: 0;
}

.filter-info-bubble--wide ul {
  font-size: 0.88rem;
  line-height: 1.55;
}

.filter-info-bubble--wide ul li {
  margin-bottom: 0.2em;
}

@media (max-width: 600px) {
  .filter-info-bubble--wide {
    position: fixed;
    top: 50%;
    bottom: auto;
    left: 50%;
    right: auto;
    transform: translate(-50%, -50%);
    width: min(320px, calc(100vw - 2rem));
    max-height: 70vh;
    overflow-y: auto;
  }
  .filter-info-bubble--wide::after {
    display: none;
  }
}

.wordcloud-drilldown {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.wordcloud-drilldown.open {
  opacity: 1;
  transform: translateY(0);
}

.drilldown-header {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-color);
}

.drilldown-back {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: none;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 0.35rem 0.75rem;
  font-size: 0.82rem;
  font-family: var(--font-family-sans);
  color: var(--primary-color);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  align-self: flex-start;
}

.drilldown-back:hover {
  background: rgba(19, 113, 194, 0.06);
  border-color: var(--primary-color);
}

.drilldown-title-group {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.drilldown-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  padding: 0.2rem 0.5rem;
  border-radius: 3px;
  background: var(--primary-color);
  color: #fff;
}

.drilldown-title {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-color);
  margin: 0;
}

.drilldown-count {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 400;
}

.drilldown-list {
  max-height: 420px;
  overflow-y: auto;
  padding-right: 0.25rem;
}

.drilldown-list::-webkit-scrollbar {
  width: 5px;
}

.drilldown-list::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 4px;
}

.drilldown-empty {
  padding: 1.5rem 0;
  color: var(--text-muted);
  font-style: italic;
  text-align: center;
}

.drilldown-item {
  padding: 0.85rem 0;
  border-bottom: 1px solid #eee;
}

.drilldown-item:last-child {
  border-bottom: none;
}

.drilldown-item-name {
  font-weight: 700;
  font-size: 1rem;
  color: var(--primary-color);
  text-decoration: none;
  line-height: 1.3;
}

.drilldown-item-name:hover {
  text-decoration: underline;
}

.drilldown-item-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0;
}

.drilldown-sep {
  margin: 0 0.4rem;
  color: #ccc;
}

.drilldown-item-desc {
  font-size: 0.9rem;
  color: var(--text-color);
  line-height: 1.5;
  margin-top: 0.35rem;
}

.drilldown-item-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-top: 0.5rem;
}

.drilldown-tag {
  display: inline-block;
  font-size: 0.72rem;
  padding: 0.15rem 0.45rem;
  border-radius: 3px;
  background: #f0f0f0;
  color: var(--text-muted);
  white-space: nowrap;
}

.drilldown-tag-match {
  background: rgba(19, 113, 194, 0.1);
  color: var(--primary-color);
  font-weight: 600;
}

#wordcloud-most,
#wordcloud-least {
  cursor: pointer;
}

.map-view-toggle {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 500;
  display: flex;
  gap: 0;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}

.map-toggle-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 0.4rem 0.75rem;
  border: none;
  background: transparent;
  font-family: var(--font-family-body);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.map-toggle-btn:not(:last-child) {
  border-right: 1px solid var(--border-color);
}

.map-toggle-btn:hover {
  background: rgba(19, 113, 194, 0.06);
  color: var(--primary-color);
}

.map-toggle-btn.active {
  background: var(--primary-color);
  color: #ffffff;
}

.map-toggle-btn.active svg {
  stroke: #ffffff;
}

.heatmap-legend {
  position: absolute;
  bottom: 25px;
  right: 14px;
  z-index: 500;
  background: rgba(16, 35, 58, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  padding: 0.5rem 0.75rem;
  font-size: 0.75rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.heatmap-legend-title {
  font-weight: 600;
  margin-bottom: 4px;
  color: #ffffff;
}

.heatmap-legend-bar {
  width: 140px;
  height: 10px;
  border-radius: 5px;
  background: linear-gradient(to right, #1a4a8f, #4a79b8, #8aa6b0, #d4c05a, #ffe64d);
  margin-bottom: 3px;
}
html.high-contrast .heatmap-legend-bar {
  background: linear-gradient(to right, #3a3a3a, #7a7a7a, #bcbcbc, #ffffff);
}

.heatmap-legend-labels {
  display: flex;
  justify-content: space-between;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.68rem;
}

.funded-attribution {
  margin: 0.75rem 0.5rem 0;
  font-size: 0.78rem;
  color: #6b7280;
  text-align: center;
}
.funded-note {
  margin: 0 0 0.5rem;
  font-size: 0.82rem;
  color: #6b7280;
  text-align: center;
}

.download-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.75rem 0 0.25rem;
}
.download-bar-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
}
.download-btn {
  padding: 0.3rem 0.7rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--primary-color);
  background: transparent;
  border: 1px solid var(--primary-color);
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.download-btn:hover {
  background: var(--primary-color);
  color: #ffffff;
}

.search-block {
  width: 100%;
  text-align: left;
}

.search-combobox {
  position: relative;
}

.search-block #search-input {
  width: 100%;
  padding-right: 44px;
}

.search-block .search-clear {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  min-width: 44px;
  min-height: 44px;
  margin: 0;
  padding: 0;
  border: none;
  background: none;
  color: var(--text-muted);
  font-size: 1rem;
  cursor: pointer;
  border-radius: var(--border-radius);
}

.search-block .search-clear:hover {
  background: none;
  color: var(--text-color);
}

.search-block .search-clear:focus-visible {
  outline: 3px solid var(--focus-ring-color);
  outline-offset: -4px;
}

.search-listbox {
  position: absolute;
  z-index: 900;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  max-height: 420px;
  overflow-y: auto;
  margin: 0;
  padding: 0.25rem;
  list-style: none;
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  box-shadow: 0 8px 20px var(--shadow-color);
}

.search-group-label {
  padding: 0.55rem 0.75rem 0.3rem;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
}

.search-option {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-height: 44px;
  justify-content: center;
  padding: 0.45rem 0.75rem;
  border-radius: var(--border-radius);
  border-left: 3px solid transparent;
  cursor: pointer;
}

.search-option-main {
  color: var(--text-color);
  font-weight: 600;
}

.search-option-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.search-option:hover,
.search-option.is-active {
  background: rgba(19, 113, 194, 0.08);
  border-left-color: var(--primary-color);
}

.search-option.is-active {
  outline: 2px solid var(--primary-color);
  outline-offset: -2px;
}

.search-option--suggestion .search-option-main {
  color: #0f5b9e;
}

.search-chips {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  column-gap: 0.5em;
  row-gap: 1em;
  margin-top: 0.6em;
}

.search-chips-label {
  font-weight: 700;
  color: var(--text-color);
}

.search-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.15em;
  padding: 0.25em 0.65em;
  background: rgba(19, 113, 194, 0.08);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  color: #0f5b9e;
  font-weight: 600;
  font-size: 0.92rem;
}

.search-chip--locked {
  background: #6f6f6f;
  border-color: #6f6f6f;
  border-radius: 0;
  color: #ffffff;
  font-weight: 400;
}

.search-chip--theme {
  background: rgba(19, 113, 194, 0.14);
  border: 1.5px dashed var(--primary-color);
}

.search-block .search-chip-remove {
  position: relative;
  min-width: 28px;
  min-height: 28px;
  border: none;
  background: none;
  color: #0f5b9e;
  font-size: 0.85rem;
  line-height: 1;
  padding: 0.3em;
  margin: 0 -0.3em 0 0;
  cursor: pointer;
  border-radius: 50%;
}

.search-block .search-chip-remove::after {
  content: "";
  position: absolute;
  inset: -8px;
}

.search-block .search-chip-remove:hover {
  background: none;
  color: var(--secondary-color);
}

.search-block .search-chip-remove:focus-visible {
  outline: 3px solid var(--focus-ring-color);
  outline-offset: 2px;
}

.search-match-toggle {
  display: inline-flex;
  gap: 0;
  border: 1px solid var(--border-color);
  border-radius: 999px;
  padding: 2px;
  margin: 0;
  background: var(--surface-color);
}

.search-block .search-match-option {
  display: inline-flex;
  position: relative;
  margin: 0;
  cursor: pointer;
}

.search-block .search-match-option input {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  border: none;
  cursor: pointer;
}

.search-block .search-match-option span {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 0.85em;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-muted);
}

.search-block .search-match-option input:checked + span {
  background: var(--primary-color);
  color: #ffffff;
}

.search-block .search-match-option input:focus-visible + span {
  outline: 3px solid var(--focus-ring-color);
  outline-offset: 2px;
}

.search-feedback { margin-top: 0.6em; }

.search-noresults,
.search-fewresults {
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-left: 4px solid var(--primary-color);
  border-radius: var(--border-radius);
  padding: 0.8em 1em;
}

.search-fewresults {
  border-left-color: var(--accent-color);
}

.search-noresults-title,
.search-fewresults-title {
  margin: 0 0 0.5em;
  font-weight: 600;
  color: var(--text-color);
}

.search-noresults-hint {
  margin: 0;
  color: var(--text-muted);
}

.search-noresults-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5em;
}

.search-block .search-action {
  min-height: 44px;
  min-width: 0;
  margin: 0;
  padding: 0.4em 0.9em;
  background: var(--surface-color);
  border: 1px solid var(--primary-color);
  border-radius: var(--border-radius);
  color: #0f5b9e;
  font-family: var(--font-family-sans);
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
}

.search-block .search-action:hover { background: rgba(19, 113, 194, 0.08); }

.search-block .search-action--suggestion {
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: #ffffff;
}

.search-block .search-action--suggestion:hover {
  background: #0f5b9e;
}

.search-block .search-action--broaden {
  border-style: dashed;
}

.search-block .search-action:focus-visible {
  outline: 3px solid var(--focus-ring-color);
  outline-offset: 2px;
}

mark.search-hit {
  background: #ffe9a8;
  color: #262626;
  border-radius: 3px;
  padding: 0 2px;
}

.infra-list-matched {
  margin-top: 0.1rem;
  margin-bottom: 0.35rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.infra-list-matched-label {
  font-weight: 700;
  color: var(--text-color);
}

.explore-hub-card { position: relative; }

.explore-hub-heading { margin: 0; }

.explore-hub-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  min-height: 24px;
  padding: 0;
  background: none;
  border: none;
  cursor: pointer;
  font: inherit;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-color);
  text-align: left;
}

.explore-hub-chevron {
  color: var(--primary-color);
  flex-shrink: 0;
  transition: transform 0.3s ease;
}

.explore-hub-strapline {
  margin: 0.35rem 0 0;
  font-size: 0.95rem;
  color: var(--text-muted);
}

#explore-hub-content {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
}

.explore-tabs {
  display: flex;
  gap: 0.5rem;
  margin: 0 0 1rem;
  flex-wrap: wrap;
}

.explore-tabs button {
  min-height: 32px;
  min-width: 24px;
  padding: 0.45rem 0.95rem;
  border-radius: 999px;
  border: 1px solid var(--border-color);
  background: var(--surface-color);
  cursor: pointer;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text-color);
  transition: background 0.2s, border-color 0.2s;
}

.explore-tabs button.active {
  background: var(--primary-color);
  color: var(--btn-primary-text);
  border-color: var(--primary-color);
}

.explore-tabs button:hover:not(.active) {
  background: rgba(19, 113, 194, 0.12);
}

.explore-eyebrow {
  margin: 0 0 0.4rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-muted);
}

.explore-question {
  margin: 0 0 0.3rem;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-color);
}

.explore-question:focus:not(:focus-visible) { outline: none; }

.explore-sub {
  margin: 0 0 1rem;
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--text-muted);
}

.explore-msg {
  color: var(--text-muted);
  font-style: italic;
  padding: 0.5rem 0;
}

.explore-goal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
}

@media (max-width: 640px) {
  .explore-goal-grid { grid-template-columns: 1fr; }
}

.explore-goal {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  min-height: 44px;
  padding: 0.8rem 0.9rem;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  background: var(--surface-color);
  cursor: pointer;
  text-align: left;
  font: inherit;
  transition: border-color 0.2s, background 0.2s;
}

.explore-goal:hover {
  border-color: var(--primary-color);
  background: rgba(19, 113, 194, 0.06);
}

.explore-goal-icon { font-size: 1.3rem; line-height: 1.2; }

.explore-goal-text {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.explore-goal-label {
  font-weight: 700;
  font-size: 0.98rem;
  color: var(--text-color);
}

.explore-goal-blurb {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.explore-theme-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.explore-theme {
  min-height: 32px;
  min-width: 24px;
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  border: 1px solid var(--border-color);
  background: rgba(19, 113, 194, 0.08);
  color: #0f5b9e;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.92rem;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.explore-theme:hover {
  border-color: var(--primary-color);
  background: rgba(19, 113, 194, 0.16);
}

.explore-theme-count {
  font-weight: 400;
  color: var(--text-muted);
  margin-left: 0.15rem;
}

.explore-theme--any {
  background: var(--surface-color);
  border: 1.5px dashed var(--primary-color);
}

.explore-back {
  margin-top: 1rem;
  min-height: 24px;
  min-width: 24px;
  padding: 0.3rem 0;
  background: none;
  border: none;
  color: var(--primary-color);
  cursor: pointer;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.9rem;
}

.explore-back:hover { text-decoration: underline; }

.explore-hits {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.explore-hit {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.75rem;
  padding: 0.6rem 0.85rem;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  background: var(--surface-color);
}

.explore-hit-text {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}

.explore-hit-name {
  font-weight: 700;
  color: var(--text-color);
}

.explore-hit-meta {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.explore-hit .explore-btn { margin-left: auto; }

.explore-dyk {
  margin: 1rem 0 0;
  padding: 0.8rem 1rem;
  background: rgba(19, 113, 194, 0.07);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  font-size: 0.93rem;
  line-height: 1.55;
  color: var(--text-color);
}

.explore-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.explore-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  min-height: 32px;
  min-width: 24px;
  padding: 0.45rem 0.9rem;
  border-radius: var(--border-radius);
  border: 1px solid var(--primary-color);
  background: var(--primary-color);
  color: var(--btn-primary-text);
  font-family: inherit;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  text-decoration: none;
}

.explore-btn:hover {
  background: #0f5b9e;
  border-color: #0f5b9e;
  color: var(--btn-primary-text);
}

.explore-btn--ghost {
  background: var(--surface-color);
  color: var(--primary-color);
}

.explore-btn--ghost:hover {
  background: rgba(19, 113, 194, 0.1);
  color: #0f5b9e;
}

.explore-spot-name {
  margin: 0.15rem 0;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-color);
}

.explore-spot-name:focus:not(:focus-visible) { outline: none; }

.explore-spot-meta {
  margin: 0 0 0.7rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.explore-spot-desc {
  margin: 0 0 0.8rem;
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text-color);
}

.explore-spot-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.2rem;
}

.explore-tag-pill {
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  border: 1px solid var(--border-color);
  background: rgba(19, 113, 194, 0.08);
  font-size: 0.78rem;
  color: #0f5b9e;
}

.explore-discovered {
  margin: 0.9rem 0 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}
