:root {
  --bg-color: #f5f7f2;
  --surface: #ffffff;
  --surface-soft: #eef5f0;
  --text-color: #17211c;
  --muted-color: #5c6c63;
  --border-color: #d9e2dc;
  --accent-color: #1b7f5d;
  --accent-strong: #0f5f48;
  --accent-soft: #dff1e9;
  --metric-color: #0f6b7a;
  --metric-soft: #dceff2;
  --warning-color: #9a6417;
  --danger-color: #9b2f32;
  --success-color: #176d43;
  --focus-ring: rgba(15, 107, 122, 0.28);
  --shadow-soft: 0 12px 30px rgba(19, 42, 31, 0.08);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
  overflow-x: hidden;
  background: var(--bg-color);
  color: var(--text-color);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

body.filter-open {
  overflow: hidden;
}

a {
  color: var(--accent-strong);
}

a:hover {
  color: var(--metric-color);
}

button,
input,
select,
textarea {
  font: inherit;
}

:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
}

.site-shell {
  min-height: 100vh;
  min-height: 100svh;
  width: min(1520px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 28px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  background: color-mix(in srgb, var(--bg-color) 88%, transparent);
  backdrop-filter: blur(10px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text-color);
  text-decoration: none;
}

.brand-mark {
  display: inline-grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: var(--radius);
  background: var(--accent-color);
  color: #ffffff;
  font-weight: 800;
}

.brand strong,
.brand small {
  display: block;
}

.brand small {
  color: var(--muted-color);
  font-size: 0.82rem;
}

.header-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.btn-primary {
  --bs-btn-bg: var(--accent-color);
  --bs-btn-border-color: var(--accent-color);
  --bs-btn-hover-bg: var(--accent-strong);
  --bs-btn-hover-border-color: var(--accent-strong);
  --bs-btn-focus-shadow-rgb: 15, 107, 122;
}

.btn-outline-secondary {
  --bs-btn-color: var(--text-color);
  --bs-btn-border-color: var(--border-color);
  --bs-btn-hover-bg: var(--surface-soft);
  --bs-btn-hover-color: var(--text-color);
  --bs-btn-hover-border-color: var(--border-color);
}

.hero-dashboard {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.88fr);
  gap: 18px;
  align-items: stretch;
  margin: 16px 0 18px;
}

.hero-copy,
.kpi-card,
.filter-panel,
.table-section,
.chart-section,
.method-card,
.faq-section,
.ticker-panel,
.info-strip {
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 310px;
  padding: clamp(22px, 4vw, 44px);
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--metric-color);
  font-size: 0.78rem;
  font-weight: 760;
  text-transform: uppercase;
}

.hero-banner-frame {
  flex: 0 0 auto;
  width: 100%;
  min-width: 0;
  max-width: 920px;
  aspect-ratio: 1916 / 821;
  margin: 10px 0 14px;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.hero-banner-frame[hidden] {
  display: none;
}

.hero-banner-frame:hover {
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'%3E%3Ccircle cx='16' cy='16' r='14' fill='%23ffffff' stroke='%230f6b7a' stroke-width='2'/%3E%3Cpath d='M21.8 9.4h-7.3a6.5 6.5 0 0 0-5.9 3.8' fill='none' stroke='%230f6b7a' stroke-width='2.4' stroke-linecap='round'/%3E%3Cpath d='m19.3 6.8 3.5 2.6-3.5 2.8' fill='none' stroke='%230f6b7a' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M10.2 22.6h7.3a6.5 6.5 0 0 0 5.9-3.8' fill='none' stroke='%231b7f5d' stroke-width='2.4' stroke-linecap='round'/%3E%3Cpath d='m12.7 25.2-3.5-2.6 3.5-2.8' fill='none' stroke='%231b7f5d' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") 16 16, pointer;
}

.hero-banner-image {
  display: block;
  width: 100%;
  max-width: 100%;
  height: 100%;
  object-fit: contain;
}

.hero-copy h1 {
  max-width: 820px;
  margin: 0;
  font-size: 1.75rem;
  line-height: 1.14;
}

.hero-subtitle {
  max-width: 790px;
  margin: 18px 0 0;
  color: var(--muted-color);
  font-size: 1.12rem;
}

.hero-subtitle span {
  color: var(--metric-color);
  font-weight: 820;
}

.hero-method {
  max-width: 820px;
  margin: 18px 0 0;
}

.notice-box {
  max-width: 820px;
  margin-top: 18px;
  padding: 12px 14px;
  border-left: 4px solid var(--warning-color);
  border-radius: 6px;
  background: #fff7e8;
  color: #4d3a17;
  font-weight: 650;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.kpi-card {
  display: flex;
  min-height: 142px;
  flex-direction: column;
  justify-content: space-between;
  padding: 18px;
}

.kpi-card-primary {
  border-color: color-mix(in srgb, var(--metric-color) 42%, var(--border-color));
  background: linear-gradient(180deg, var(--metric-soft), var(--surface));
}

.kpi-card-action {
  cursor: pointer;
}

.kpi-card-action:hover {
  border-color: var(--metric-color);
  box-shadow: 0 16px 34px rgba(15, 107, 122, 0.14);
}

.kpi-label {
  color: var(--muted-color);
  font-size: 0.86rem;
  font-weight: 680;
}

.kpi-card strong {
  margin: 8px 0;
  color: var(--text-color);
  font-size: 2rem;
  line-height: 1;
}

.kpi-card-primary strong {
  color: var(--metric-color);
}

.kpi-card-pharmacy strong {
  overflow-wrap: anywhere;
  font-size: 1.35rem;
  line-height: 1.12;
}

.kpi-card small {
  color: var(--muted-color);
}

.ticker-panel {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-height: 52px;
  margin-bottom: 18px;
  padding: 10px 12px;
  overflow: hidden;
}

.ticker-label {
  padding: 5px 8px;
  border-radius: 6px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.ticker-viewport {
  overflow: hidden;
  white-space: nowrap;
}

.ticker-content {
  display: inline-flex;
  gap: 22px;
  align-items: center;
  min-width: 100%;
}

.ticker-content.is-moving {
  animation: ticker-scroll 36s linear infinite;
}

.ticker-entry {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 0;
  background: transparent;
  color: var(--text-color);
  white-space: nowrap;
  cursor: pointer;
}

.ticker-entry:hover {
  color: var(--accent-strong);
}

.ticker-entry:hover .inline-link-button {
  text-decoration: underline;
}

.ticker-positive {
  color: var(--danger-color);
}

.ticker-negative {
  color: var(--success-color);
}

@keyframes ticker-scroll {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

.dashboard-layout {
  display: block;
  min-width: 0;
}

.filter-backdrop {
  position: fixed;
  inset: 0;
  z-index: 999;
  border: 0;
  padding: 0;
  background: rgba(14, 24, 18, 0.48);
  opacity: 0;
  cursor: default;
  transition: opacity 0.18s ease;
}

body.filter-open .filter-backdrop {
  opacity: 1;
}

.filter-panel {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 1000;
  width: min(560px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  padding: 18px;
  overflow-y: auto;
  overscroll-behavior: contain;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -47%) scale(0.98);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

body.filter-open .filter-panel {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -50%) scale(1);
}

.panel-heading,
.section-header,
.chart-card-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.panel-heading h2,
.section-header h2,
.method-card h2,
.faq-section h2 {
  margin: 0;
  font-size: 1.25rem;
}

.icon-button,
.info-button {
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--border-color);
  background: var(--surface);
  color: var(--text-color);
  cursor: pointer;
}

.icon-button {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-size: 1.2rem;
}

.info-button {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  color: var(--metric-color);
  font-size: 0.75rem;
  font-weight: 800;
}

.info-button:hover,
.icon-button:hover {
  border-color: var(--metric-color);
  background: var(--metric-soft);
}

#btnCloseFilters {
  display: inline-grid;
}

.filter-group {
  margin-top: 18px;
}

.filter-group label,
.filter-label {
  display: block;
  margin-bottom: 8px;
  color: var(--text-color);
  font-size: 0.92rem;
  font-weight: 720;
}

.filter-group-strong {
  padding: 12px;
  border: 1px solid color-mix(in srgb, var(--metric-color) 40%, var(--border-color));
  border-radius: var(--radius);
  background: var(--metric-soft);
}

.form-control,
.form-select {
  border-color: var(--border-color);
  border-radius: var(--radius);
  background-color: var(--surface);
  color: var(--text-color);
}

.form-control:focus,
.form-select:focus {
  border-color: var(--metric-color);
  box-shadow: 0 0 0 0.22rem var(--focus-ring);
}

.segmented-control {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.segmented-control label {
  margin: 0;
}

.segmented-control input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.segmented-control span {
  display: grid;
  min-height: 34px;
  place-items: center;
  border-radius: 6px;
  color: var(--muted-color);
  font-size: 0.86rem;
  font-weight: 700;
  cursor: pointer;
}

.segmented-control input:checked + span {
  background: var(--surface);
  color: var(--accent-strong);
  box-shadow: 0 1px 4px rgba(17, 37, 26, 0.1);
}

.range-label {
  display: grid;
  grid-template-columns: auto auto 1fr;
  gap: 6px;
  align-items: center;
}

.range-label output {
  justify-self: end;
  color: var(--muted-color);
  font-size: 0.86rem;
  font-weight: 650;
}

.range-slider {
  margin: 12px 8px 4px;
}

.noUi-target {
  border: 0;
  border-radius: 999px;
  background: #dce5df;
  box-shadow: none;
}

.noUi-horizontal {
  height: 8px;
}

.noUi-connect {
  background: var(--metric-color);
}

.noUi-horizontal .noUi-handle {
  top: -8px;
  right: -11px;
  width: 24px;
  height: 24px;
  border: 2px solid var(--metric-color);
  border-radius: 50%;
  background: var(--surface);
  box-shadow: 0 2px 8px rgba(19, 42, 31, 0.18);
}

.noUi-handle::before,
.noUi-handle::after {
  display: none;
}

.filter-actions {
  margin-top: 20px;
}

.dashboard-main {
  display: grid;
  gap: 18px;
  min-width: 0;
}

.info-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
}

.info-strip > div {
  min-width: 0;
  padding: 14px;
  background: var(--surface);
}

.info-strip strong {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-right: 4px;
  color: var(--metric-color);
}

.info-strip span {
  color: var(--muted-color);
  font-size: 0.9rem;
}

.table-section,
.chart-section,
.faq-section {
  padding: 18px;
  min-width: 0;
}

.table-section {
  overflow: hidden;
}

.table-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.table-search {
  width: min(420px, 100%);
  margin-top: 8px;
}

.result-count {
  color: var(--muted-color);
  font-weight: 700;
}

.active-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 30px;
  margin: 12px 0;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 9px;
  border: 1px solid var(--border-color);
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--muted-color);
  font-size: 0.82rem;
  font-weight: 650;
}

.product-table {
  width: 100%;
  max-width: 100%;
  min-height: 430px;
  min-width: 0;
}

.tabulator {
  max-width: 100%;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text-color);
  overflow: hidden;
}

.tabulator .tabulator-tableholder {
  max-width: 100%;
  overflow-x: auto;
}

.tabulator .tabulator-header {
  border-bottom: 1px solid var(--border-color);
  background: var(--surface-soft);
  color: var(--text-color);
  font-weight: 760;
}

.tabulator .tabulator-header .tabulator-col {
  min-height: 42px;
  border-color: var(--border-color);
  background: var(--surface-soft);
}

.tabulator .tabulator-header .tabulator-col .tabulator-col-title {
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  line-height: 1.18;
}

.tabulator .tabulator-row {
  border-bottom: 1px solid var(--border-color);
  background: var(--surface);
}

.tabulator .tabulator-row:nth-child(even) {
  background: #fbfcfa;
}

.tabulator .tabulator-row:hover {
  background: var(--accent-soft);
}

.tabulator .tabulator-cell {
  border-color: var(--border-color);
  white-space: normal;
}

.product-name-cell {
  display: grid;
  gap: 2px;
}

.product-name-button {
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.product-name-button:hover strong,
.product-name-button:focus-visible strong {
  color: var(--metric-color);
  text-decoration: underline;
}

.product-name-button:focus-visible {
  outline: 2px solid var(--metric-color);
  outline-offset: 3px;
}

.inline-link-button,
.detail-link-button {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--metric-color);
  font: inherit;
  font-weight: 760;
  text-align: left;
  cursor: pointer;
}

.inline-link-button:hover,
.inline-link-button:focus-visible,
.detail-link-button:hover,
.detail-link-button:focus-visible {
  color: var(--accent-strong);
  text-decoration: underline;
}

.inline-link-button:focus-visible,
.detail-link-button:focus-visible {
  outline: 2px solid var(--metric-color);
  outline-offset: 3px;
}

.kpi-link-button {
  color: inherit;
  font-size: inherit;
  line-height: inherit;
}

.kpi-summary-link {
  color: inherit;
  font-size: inherit;
  font-weight: 760;
}

.ticker-link-button {
  color: inherit;
  font-weight: 760;
}

.product-name-cell strong {
  line-height: 1.25;
}

.product-name-cell span {
  color: var(--muted-color);
  font-size: 0.82rem;
}

.metric-cell {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 108px;
  padding: 6px 8px;
  border-radius: 6px;
  background: var(--metric-soft);
  color: var(--metric-color);
  font-weight: 830;
}

.metric-cell.is-best {
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.muted-dash {
  color: var(--muted-color);
}

.status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 90px;
  padding: 5px 8px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 800;
}

.status-badge.available {
  background: #e2f4eb;
  color: var(--success-color);
}

.status-badge.unavailable {
  background: #f7e7e7;
  color: var(--danger-color);
}

.status-badge.unknown {
  background: #eef1f4;
  color: var(--muted-color);
}

.empty-state {
  display: grid;
  gap: 4px;
  place-items: center;
  min-height: 120px;
  padding: 18px;
  border: 1px dashed var(--border-color);
  border-radius: var(--radius);
  background: var(--surface-soft);
  color: var(--muted-color);
  text-align: center;
}

.empty-state strong {
  color: var(--text-color);
}

.chart-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.chart-card {
  position: relative;
  min-width: 0;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  background: var(--surface);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.chart-card:hover {
  border-color: color-mix(in srgb, var(--metric-color) 30%, var(--border-color));
  box-shadow: 0 14px 32px rgba(19, 42, 31, 0.1);
  transform: translateY(-2px);
}

.chart-card-wide {
  grid-column: 1 / -1;
}

.chart-card-header {
  padding: 14px 14px 0;
}

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

.chart-canvas {
  width: 100%;
  height: 360px;
}

.chart-card-wide .chart-canvas {
  height: 400px;
}

.chart-canvas-tall {
  height: 430px;
}

.pharmacy-map-card {
  overflow: hidden;
}

.state-map-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.state-map-toggle {
  display: inline-flex;
  flex-wrap: wrap;
  min-width: min(100%, 480px);
  padding: 3px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.state-map-toggle button {
  flex: 1 1 auto;
  min-height: 28px;
  padding: 0 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted-color);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 820;
  cursor: pointer;
  white-space: nowrap;
}

.state-map-toggle button.is-active {
  background: var(--accent-color);
  color: #fff;
  box-shadow: 0 6px 14px rgba(27, 127, 93, 0.18);
}

.pharmacy-state-map-shell {
  display: grid;
  grid-template-columns: minmax(300px, 1fr) minmax(230px, 0.42fr);
  gap: 16px;
  padding: 14px;
}

.pharmacy-state-map-area {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.pharmacy-state-map {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 560px;
  padding: 16px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(220, 239, 242, 0.45), rgba(238, 245, 240, 0.7)),
    var(--surface-soft);
  overflow: hidden;
}

.pharmacy-state-map.is-loading {
  color: var(--muted-color);
  font-weight: 760;
}

.germany-state-svg {
  display: block;
  width: min(100%, 520px);
  height: auto;
  max-height: 570px;
  filter: drop-shadow(0 18px 28px rgba(19, 42, 31, 0.14));
}

.germany-state-svg path {
  vector-effect: non-scaling-stroke;
}

.state-map-shape {
  transition: fill 0.18s ease, filter 0.18s ease, opacity 0.18s ease, stroke-width 0.18s ease;
}

.state-map-shape:hover,
.state-map-shape:focus,
.state-map-shape.is-selected {
  filter: brightness(1.06) saturate(1.08);
  stroke: #17211c !important;
  stroke-width: 1.8 !important;
}

.state-map-shape:focus {
  outline: none;
}

.state-map-shape.is-empty {
  opacity: 0.72;
}

.state-map-outline {
  fill: none !important;
  stroke: rgba(23, 33, 28, 0.62) !important;
  stroke-width: 1.25 !important;
  pointer-events: none;
}

.state-map-labels {
  pointer-events: none;
}

.state-map-label {
  text-anchor: middle;
  dominant-baseline: middle;
  fill: #13251d;
  stroke: rgba(255, 255, 255, 0.86);
  stroke-width: 3.2px;
  paint-order: stroke fill;
  font-family: inherit;
  font-weight: 880;
}

.state-map-code {
  font-size: 13px;
}

.state-map-price {
  font-size: 9px;
  font-weight: 760;
}

.state-map-label.is-small .state-map-code {
  font-size: 10px;
}

.pharmacy-state-panel {
  align-self: stretch;
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.state-panel-label {
  display: block;
  color: var(--muted-color);
  font-size: 0.75rem;
  font-weight: 820;
  text-transform: uppercase;
}

.pharmacy-state-panel > strong {
  display: block;
  margin-top: 3px;
  font-size: 1.15rem;
}

.state-panel-price {
  margin: 10px 0 12px;
  color: var(--metric-color);
  font-size: 1.55rem;
  font-weight: 880;
}

.state-panel-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.state-panel-grid > div,
.state-panel-pharmacy,
.state-panel-empty {
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  background: var(--surface);
}

.state-panel-grid span,
.state-panel-pharmacy span {
  display: block;
  color: var(--muted-color);
  font-size: 0.75rem;
  font-weight: 780;
}

.state-panel-grid strong,
.state-panel-pharmacy .inline-link-button {
  display: block;
  margin-top: 2px;
}

.state-panel-pharmacy {
  margin-top: 10px;
}

.state-panel-link {
  color: var(--metric-color);
}

.state-map-legend {
  display: grid;
  grid-template-columns: auto minmax(120px, 240px) auto;
  gap: 8px;
  align-items: center;
  justify-self: center;
  width: min(100%, 330px);
  color: var(--muted-color);
  font-size: 0.78rem;
  font-weight: 760;
}

.state-map-legend div {
  height: 9px;
  border-radius: 999px;
  background: linear-gradient(90deg, hsl(138 58% 42%), hsl(72 58% 45%), hsl(8 58% 48%));
}

.state-map-legend div.is-high-good {
  background: linear-gradient(90deg, hsl(8 58% 48%), hsl(72 58% 45%), hsl(138 58% 42%));
}

.chart-empty {
  position: absolute;
  inset: 54px 14px 14px;
  min-height: 0;
}

.toggle-inline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted-color);
  font-weight: 650;
}

.details-section {
  display: grid;
  gap: 14px;
}

.details-kpi-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}

.details-kpi {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.details-kpi span,
.details-kpi small {
  display: block;
  color: var(--muted-color);
  font-size: 0.78rem;
  font-weight: 680;
}

.details-kpi strong {
  display: block;
  margin: 8px 0 4px;
  overflow-wrap: anywhere;
  color: var(--metric-color);
  font-size: 1.45rem;
  line-height: 1.05;
}

.details-chart-grid {
  margin-top: 0;
}

.method-section {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.method-card {
  padding: 18px;
}

.method-card p:last-child {
  margin-bottom: 0;
}

.faq-section details {
  border-top: 1px solid var(--border-color);
}

.faq-section summary {
  padding: 14px 0;
  cursor: pointer;
  font-weight: 740;
}

.faq-section details p {
  max-width: 850px;
  color: var(--muted-color);
}

.site-footer {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  align-items: center;
  width: min(1520px, calc(100% - 32px));
  margin: 0 auto 28px;
  padding: 18px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--muted-color);
  position: relative;
  z-index: 1;
}

.site-footer > div:last-child {
  text-align: right;
}

.site-footer.motion-reveal {
  opacity: 1 !important;
  transform: none !important;
}

.modal-content {
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text-color);
}

.modal-backdrop {
  --bs-backdrop-bg: #0e1812;
  --bs-backdrop-opacity: 0.48;
}

.modal-backdrop.show {
  opacity: 0.48;
}

.product-detail-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.detail-stat {
  padding: 12px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.detail-stat span {
  display: block;
  color: var(--muted-color);
  font-size: 0.8rem;
}

.detail-stat strong {
  display: block;
  margin-top: 4px;
}

.pharmacy-contact-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 18px;
}

.pharmacy-contact-grid > div {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  background: var(--surface);
}

.pharmacy-contact-grid span {
  display: block;
  color: var(--muted-color);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.pharmacy-contact-grid strong,
.pharmacy-contact-grid a {
  display: block;
  margin-top: 4px;
  overflow-wrap: anywhere;
}

.detail-chart-section {
  margin: 18px 0;
  padding: 14px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.detail-chart-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.detail-chart-header span {
  color: var(--muted-color);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.detail-chart-header h3 {
  margin: 2px 0 0;
  font-size: 1.05rem;
}

.detail-chart-header strong {
  max-width: 42%;
  color: var(--metric-color);
  text-align: right;
}

.detail-chart {
  width: 100%;
  height: 320px;
}

.pharmacy-products-section {
  margin-top: 18px;
}

.detail-table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.detail-table-toolbar span {
  display: block;
  color: var(--muted-color);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.detail-table-toolbar h3 {
  margin: 2px 0 0;
  font-size: 1.05rem;
}

.detail-table-toolbar small {
  display: block;
  margin-top: 2px;
  color: var(--muted-color);
  font-size: 0.82rem;
}

.detail-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  margin: 0;
  padding: 8px 10px;
  border: 1px solid var(--border-color);
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--text-color);
  font-size: 0.88rem;
  font-weight: 760;
  cursor: pointer;
  user-select: none;
}

.detail-toggle input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--accent-color);
}

.detail-table {
  width: 100%;
  border-collapse: collapse;
}

.detail-table th,
.detail-table td {
  padding: 10px;
  border-bottom: 1px solid var(--border-color);
  text-align: left;
}

.detail-table th {
  color: var(--muted-color);
  font-size: 0.82rem;
  text-transform: uppercase;
}

.detail-table small {
  display: block;
  margin-top: 2px;
  color: var(--muted-color);
  font-size: 0.78rem;
}

.thcdax-popover {
  z-index: 1060;
  max-width: min(360px, calc(100vw - 28px));
  padding: 12px 14px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  background: var(--text-color);
  color: #ffffff;
  box-shadow: var(--shadow-soft);
  font-size: 0.92rem;
}

.thcdax-popover strong {
  display: block;
  margin-bottom: 4px;
}

.loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: none;
  place-items: center;
  background: rgba(245, 247, 242, 0.82);
  backdrop-filter: blur(8px);
}

.loading-overlay.show {
  display: grid;
}

.loading-card {
  display: grid;
  gap: 10px;
  width: min(340px, calc(100% - 32px));
  padding: 22px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  text-align: center;
}

.loading-mark {
  position: relative;
  display: grid;
  width: 58px;
  height: 58px;
  margin: 0 auto;
  place-items: center;
  color: var(--metric-color);
  font-size: 0.82rem;
  font-weight: 820;
}

.loading-mark::before {
  position: absolute;
  inset: 0;
  border: 4px solid var(--accent-soft);
  border-top-color: var(--metric-color);
  border-radius: 50%;
  content: "";
  animation: spin 0.8s linear infinite;
}

.loading-mark span {
  position: relative;
  z-index: 1;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

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

@media (max-width: 1180px) {
  .hero-dashboard {
    grid-template-columns: 1fr;
  }

  .details-kpi-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .info-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 780px) {
  .site-shell {
    width: min(100% - 20px, 1520px);
    padding-top: 8px;
  }

  .filter-panel {
    width: calc(100vw - 20px);
    max-height: calc(100vh - 20px);
    padding: 14px;
  }

  .site-header,
  .section-header,
  .site-footer {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .site-header {
    position: static;
    flex-direction: column;
  }

  .header-actions,
  .table-tools {
    justify-content: stretch;
  }

  .header-actions > *,
  .table-tools > * {
    flex: 1 1 auto;
  }

  .hero-copy {
    min-height: auto;
  }

  .hero-copy h1 {
    font-size: 1.35rem;
    line-height: 1.18;
  }

  .hero-banner-frame {
    margin: 8px 0 12px;
    border-radius: 6px;
  }

  .kpi-grid,
  .chart-grid,
  .method-section,
  .info-strip,
  .details-kpi-grid,
  .product-detail-grid,
  .pharmacy-contact-grid {
    grid-template-columns: 1fr;
  }

  .chart-card-wide {
    grid-column: auto;
  }

  .chart-canvas,
  .chart-card-wide .chart-canvas {
    height: 330px;
  }

  .state-map-heading,
  .state-map-toggle {
    width: 100%;
  }

  .pharmacy-state-map-shell {
    grid-template-columns: 1fr;
  }

  .pharmacy-state-map {
    min-height: 440px;
    padding: 12px;
  }

  .germany-state-svg {
    width: min(100%, 390px);
    max-height: 440px;
  }

  .state-map-code {
    font-size: 12px;
  }

  .state-map-price {
    font-size: 8px;
  }

  .ticker-panel {
    grid-template-columns: 1fr;
  }

  .site-footer {
    display: grid;
    text-align: left;
  }

  .site-footer > div:last-child {
    text-align: left;
  }

  .detail-chart-header {
    display: grid;
  }

  .detail-chart-header strong {
    max-width: none;
    text-align: left;
  }

  .detail-chart {
    height: 280px;
  }

  .detail-table-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .detail-toggle {
    justify-content: center;
    width: 100%;
  }
}

@media (max-width: 520px) {
  .table-section {
    padding: 10px;
  }

  .tabulator .tabulator-cell,
  .tabulator .tabulator-header .tabulator-col {
    padding-left: 7px;
    padding-right: 7px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
