/* Theme tokens and base document styles. */
:root {
  font-family: "Segoe UI", system-ui, sans-serif;
  color: #243447;
  background: #f5f7fa;
  line-height: 1.45;
  font-size: 15px;
  --accent: #1668a8;
  --border: #dfe5eb;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
}

a {
  color: var(--accent);
}

button,
input,
select {
  font: inherit;
}

button,
a,
input,
select,
summary {
  outline-offset: 4px;
}

button {
  cursor: pointer;
}

button:disabled,
select:disabled {
  cursor: wait;
  opacity: 0.6;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  font-size: 2rem;
  line-height: 1.2;
  font-weight: 600;
  letter-spacing: -0.5px;
  margin-bottom: 8px;
}

h2 {
  font-size: 1.14rem;
  font-weight: 600;
  line-height: 1.4;
}

h3 {
  font-size: 1.1rem;
}

h2,
h3 {
  margin-bottom: 8px;
}

p {
  margin-bottom: 10px;
}

img {
  max-width: 100%;
  height: auto;
}

/* Shared text helpers and keyboard accessibility. */
.muted,
.data-note {
  color: #65758a;
}

.eyebrow {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 1.6px;
  color: var(--accent);
  margin-bottom: 6px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  top: -60px;
  z-index: 20;
  background: white;
  padding: 12px;
}

.skip-link:focus {
  top: 0;
}

/* Site branding and navigation. */
.site-header {
  background: white;
  border-bottom: 1px solid var(--border);
}

.masthead {
  max-width: 1320px;
  padding: 14px 24px;
  margin: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  font-size: 1.65rem;
  font-weight: 650;
  color: #163e60;
  line-height: 1.1;
  letter-spacing: 1px;
}

.brand-logo {
  display: block;
  flex-shrink: 0;
  width: 50px;
  height: 57px;
  object-fit: contain;
}

.brand-subtitle {
  display: block;
  font-size: 0.7rem;
  letter-spacing: 0.6px;
  font-weight: 400;
  color: #677d91;
  margin-top: 7px;
}

.information-nav {
  display: flex;
  gap: 18px;
  font-size: 0.85rem;
}

.information-nav a {
  text-decoration: none;
  color: #526477;
}

.information-nav a:hover {
  text-decoration: underline;
}

.workflow-nav {
  display: flex;
  max-width: 1320px;
  margin: auto;
  padding: 0 24px;
  gap: 20px;
  overflow-x: auto;
}

.workflow-nav a {
  display: block;
  white-space: nowrap;
  padding: 9px 0;
  text-decoration: none;
  font-size: 0.9rem;
  color: #364f68;
  border-bottom: 3px solid transparent;
}

.workflow-nav a:hover,
.workflow-nav a[aria-current="page"] {
  border-color: var(--accent);
  color: var(--accent);
}

/* Page layout and explorer panels. */
.page-content {
  max-width: 1320px;
  margin: 0 auto;
  padding: 20px 24px;
}

.page-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.page-intro {
  color: #647488;
  margin: 0;
  font-size: 0.95rem;
}

.dataset-label {
  font-size: 0.75rem;
  background: #e8f0f7;
  color: #42617d;
  padding: 8px 12px;
  border-radius: 30px;
  white-space: nowrap;
}

.explorer-grid {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.selection-panel,
.surface {
  background: white;
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 2px 5px #263e5505;
}

.selection-panel {
  padding: 16px;
  position: sticky;
  top: 12px;
}

.selection-panel h2 {
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.step-number {
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  background: #e8f0f7;
  color: #1868a1;
  font-size: 0.75rem;
  width: 24px;
  height: 24px;
}

/* Survey controls and segmented choices. */
.field-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  margin: 10px 0 4px;
}

select,
.search-field {
  width: 100%;
  min-height: 38px;
  border: 1px solid #c8d2de;
  border-radius: 4px;
  background: white;
  color: #253b52;
  padding: 7px 10px;
}

select:focus,
.search-field:focus {
  border-color: var(--accent);
}

input[type="checkbox"],
input[type="radio"] {
  accent-color: var(--accent);
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

.panel-divider {
  border-top: 1px solid var(--border);
  margin: 14px 0;
}

.segmented {
  display: flex;
  gap: 3px;
  padding: 3px;
  background: #f0f3f6;
  border: 1px solid #e4e9ef;
  border-radius: 5px;
}

.segmented button {
  flex: 1;
  border: 0;
  border-radius: 3px;
  background: transparent;
  color: #5b6c7d;
  padding: 6px 9px;
  font-size: 0.8rem;
  white-space: nowrap;
}

.segmented .selected {
  background: white;
  color: #1265a1;
  box-shadow: 0 1px 3px #20304020;
  font-weight: 600;
}

.search-field {
  margin: 10px 0 6px;
  font-size: 0.85rem;
}

/* Food hierarchy, disclosure markers, and selection controls. */
.tree-container {
  max-height: 380px;
  overflow: auto;
  margin: 6px -8px 0;
  padding: 0 8px;
}

.food-tree {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 0.82rem;
}

.food-tree .food-tree {
  padding-left: 18px;
  border-left: 1px solid #e5ebf0;
  margin-left: 5px;
}

.food-tree li {
  margin: 2px 0;
}

.food-tree summary {
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr);
  column-gap: 4px;
  align-items: start;
  list-style: none;
  cursor: pointer;
  padding: 4px 0;
  color: #566c82;
}

.food-tree summary::-webkit-details-marker {
  display: none;
}

.food-tree summary::marker {
  content: "";
}

.food-tree summary::before {
  content: "";
  justify-self: center;
  margin-top: 6px;
  border-block: 4px solid transparent;
  border-inline-start: 6px solid currentColor;
}

.food-tree details[open] > summary::before {
  transform: rotate(90deg);
}

.food-tree summary label {
  display: grid;
  grid-template-columns: 15px minmax(0, 1fr);
  column-gap: 6px;
  align-items: start;
  color: #273d52;
  cursor: pointer;
}

.food-leaf {
  display: grid;
  grid-template-columns: 15px minmax(0, 1fr);
  column-gap: 6px;
  align-items: start;
  padding: 4px 0;
  padding-inline-start: 18px;
  cursor: pointer;
}

.food-tree label > span {
  line-height: 20px;
}

.food-tree input[type="checkbox"],
.food-tree input[type="radio"] {
  margin: 2.5px 0 0;
}

.food-leaf:hover,
.food-tree summary:hover {
  background: #f3f7fb;
}

.selection-count {
  font-size: 0.75rem;
  color: #6c7e90;
  border-top: 1px solid var(--border);
  padding: 8px 0 6px;
  margin-top: 8px;
}

.action-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.year-checks {
  border: 0;
  padding: 0;
  margin: 10px 0;
}

.year-checks legend {
  font-size: 0.8rem;
  font-weight: 600;
}

.year-checks label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-right: 12px;
  font-size: 0.85rem;
}

/* Results surfaces, chart tooltips, maps, and exports. */
.results-panel {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.surface {
  padding: 18px;
}

.empty-state {
  text-align: center;
  padding: 30px 24px;
  color: #566c82;
}

.empty-state h2,
.empty-state h3 {
  color: #334d65;
}

.empty-state p {
  max-width: none;
  margin-left: auto;
  margin-right: auto;
}

.empty-state img {
  max-height: 72px;
  margin-top: 16px;
}

.empty-symbol {
  display: grid;
  place-items: center;
  font-size: 2.2rem;
  color: #4e89b7;
  background: #edf4fa;
  border-radius: 50%;
  width: 56px;
  height: 56px;
  margin: 0 auto 14px;
}

.result-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 12px;
}

.result-header h2 {
  font-size: 1.35rem;
  margin-bottom: 7px;
}

.result-header .muted {
  font-size: 0.78rem;
}

.result-header .segmented {
  flex-shrink: 0;
}

.chart-scroll {
  overflow-x: auto;
}

.chart-tooltip {
  position: fixed;
  z-index: 10000;
  pointer-events: none;
  max-width: min(340px, calc(100vw - 32px));
  padding: 8px 10px;
  border: 1px solid #ccc;
  border-radius: 2px;
  background: white;
  color: #172b3a;
  box-shadow: 0 1px 4px #0003;
  font: 14px/1.5 "Segoe UI", Arial, sans-serif;
  overflow-wrap: anywhere;
}

.chart-tooltip[hidden] {
  display: none;
}

@media print {
  .chart-tooltip {
    display: none;
  }
}

.chart-scroll svg {
  display: block;
  width: 100%;
  min-width: 650px;
  height: auto;
}

.map-container svg {
  display: block;
  width: 100%;
  height: 430px;
}

.map-container path:hover,
.map-container path:focus {
  stroke: #19455c;
  stroke-width: 1;
}

.export-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin: 8px 0 12px;
  flex-wrap: wrap;
}

/* Scrollable result tables and data annotations. */
.table-scroll {
  overflow: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.83rem;
  font-variant-numeric: tabular-nums;
}

caption {
  text-align: left;
  font-size: 0.8rem;
  color: #64788a;
  padding: 6px 0;
}

th,
td {
  padding: 8px 10px;
  border-bottom: 1px solid #e5eaf0;
  text-align: right;
}

th:first-child {
  text-align: left;
}

thead {
  background: #f1f5f8;
}

thead th {
  font-size: 0.75rem;
  color: #516679;
  font-weight: 600;
}

tbody th {
  font-weight: 400;
}

.table-color-key {
  display: inline-block;
  width: 0.75rem;
  height: 0.75rem;
  margin-inline-end: 0.45rem;
  border: 1px solid rgb(0 0 0 / 15%);
  border-radius: 2px;
  vertical-align: -0.05rem;
  print-color-adjust: exact;
  -webkit-print-color-adjust: exact;
}

tbody tr:hover {
  background: #f6f9fc;
}

.data-note {
  font-size: 0.73rem;
  margin: 10px 0 0;
}

/* Informational messages and selection notifications. */
.notice {
  background: #eef6fc;
  border-left: 3px solid #458bbd;
  border-radius: 3px;
  padding: 10px 12px;
  font-size: 0.85rem;
  margin: 10px 0;
}

.notice.error {
  background: #fff2f0;
  border-color: #bd4b42;
  color: #923f39;
}

.selection-notice {
  position: fixed;
  inset-block-start: 18px;
  inset-inline-end: 18px;
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: min(560px, calc(100vw - 36px));
  margin: 0;
  box-shadow: 0 4px 16px #24344720;
}

.selection-notice span {
  line-height: 1.45;
}

.selection-notice button {
  border: 0;
  background: transparent;
  color: inherit;
  font-size: 1.3rem;
  padding: 4px;
  line-height: 1;
}

/* Survey sample details. */
.sample-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.sample-grid > div {
  background: #f6f8fa;
  border: 1px solid #e9edf2;
  padding: 12px;
  border-radius: 5px;
}

.sample-grid > div:nth-child(n + 6) {
  grid-column: 1/-1;
}

.sample-grid dt {
  font-size: 0.78rem;
  color: #64788a;
  margin-bottom: 7px;
}

.sample-grid dd {
  margin: 0;
  font-size: 0.9rem;
  white-space: pre-line;
}

/* Footer and project information pages. */
.site-footer {
  max-width: 1272px;
  margin: 12px auto 0;
  border-top: 1px solid var(--border);
  padding: 14px 24px;
  display: flex;
  justify-content: space-between;
  color: #7a8998;
  font-size: 0.75rem;
}

.intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px;
  gap: 24px;
  background: white;
  border: 1px solid var(--border);
  padding: 22px;
  border-radius: 8px;
}

.intro-images {
  display: flex;
  flex-direction: column;
  gap: 0;
  align-self: start;
  line-height: 0;
}

.intro-images img {
  display: block;
}

.intro a[href^="mailto:"] {
  white-space: nowrap;
}

.project-partners {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr) 108px;
  align-items: center;
  gap: 20px;
  max-width: 620px;
  margin: 20px auto 0;
  padding: 16px;
}

.project-partners p {
  margin: 0;
  text-align: center;
  color: #526477;
  font-size: 0.9rem;
}

.project-partners img {
  display: block;
  width: 100%;
  height: auto;
}

.project-partners .hhf-logo {
  display: block;
}

.project-partners .eu-flag {
  aspect-ratio: 3/2;
}

#primary-variables > ol > li::marker,
#participating-centers > ul > li::marker {
  font-weight: 700;
}

#primary-variables > ol > li + li,
#participating-centers > ul > li + li {
  margin-top: 12px;
}

#participating-centers a {
  text-decoration: none;
}

#participating-centers > ul > li > ul > li + li {
  margin-top: 6px;
}

#participating-centers > ul > li > ul {
  margin-top: 6px;
  font-weight: 400;
}

#participating-centers > ul > li {
  font-weight: 700;
}

#participating-centers a:hover {
  text-decoration: underline;
}

#methodology,
#primary-variables,
#participating-centers {
  background: white;
  border: 1px solid var(--border);
  padding: 18px;
  border-radius: 8px;
}

#blazor-error-ui {
  display: none;
}

/* Tablet layout adjustments. */
@media (max-width: 1050px) {
  .information-nav {
    gap: 12px;
  }

  .workflow-nav {
    gap: 18px;
  }

  .explorer-grid {
    grid-template-columns: 290px minmax(0, 1fr);
  }

  .page-heading .dataset-label {
    display: none;
  }

  .result-header {
    flex-direction: column;
  }
}

/* Small-screen layout adjustments. */
@media (max-width: 760px) {
  .masthead {
    padding: 12px 14px;
    align-items: start;
  }

  .information-nav {
    display: none;
  }

  .workflow-nav {
    padding: 0 14px;
  }

  .page-content {
    padding: 16px 14px;
  }

  .explorer-grid {
    grid-template-columns: 1fr;
  }

  .selection-panel {
    position: static;
  }

  .tree-container {
    max-height: 270px;
  }

  .surface {
    padding: 14px;
  }

  h1 {
    font-size: 1.65rem;
  }

  .site-footer {
    margin: 8px 14px;
    gap: 8px;
    flex-wrap: wrap;
  }

  .intro {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 16px;
  }

  .intro-images {
    width: 150px;
    justify-self: center;
  }

  .intro-images img {
    max-width: 100%;
  }

  .project-partners {
    grid-template-columns: 64px minmax(0, 1fr) 72px;
    gap: 12px;
    padding: 14px;
  }

  .project-partners p {
    font-size: 0.8rem;
  }

  .sample-grid {
    grid-template-columns: 1fr;
  }

  .sample-grid > div {
    grid-column: 1/-1;
  }

  .map-container svg {
    height: 330px;
  }
}

/* Print results without navigation or interactive controls. */
@media print {
  .site-header,
  .site-footer,
  .selection-panel,
  .export-actions,
  .result-header .segmented,
  .dataset-label,
  .skip-link {
    display: none !important;
  }

  body {
    background: white;
  }

  .page-content {
    padding: 0;
  }

  .explorer-grid {
    display: block;
  }

  .surface {
    box-shadow: none;
    border: 0;
    padding: 0;
  }

  .chart-scroll svg {
    min-width: 0;
  }

  .table-scroll {
    overflow: visible;
  }

  .sample-grid > div {
    break-inside: avoid;
  }

  tr {
    break-inside: avoid;
  }

  .page-heading {
    margin-bottom: 20px;
  }

  .empty-state {
    display: none;
  }
}

/* Application overrides for Fluent components and native controls. */
.dafne-app {
  color: #243447;
  background: #f5f7fa;
}

.map-container {
  overflow: hidden;
  border-radius: 5px;
}

/* Fluent's runtime reset constrains the document and gives spans a 40px line height.
Keep document scrolling and compact badges under application control. */
html:has(body.dafne-app) {
  height: auto;
  min-height: 100%;
  overflow-y: auto;
}

body.dafne-app {
  height: auto;
  min-height: 100vh;
  overflow: visible;
}

.dafne-app .step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 24px;
  line-height: 1;
  padding: 0;
  letter-spacing: normal;
}

.dafne-app select {
  appearance: none;
  padding-inline-end: 36px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath d='m4 6 4 4 4-4' fill='none' stroke='%23516679' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
}

@media (forced-colors: active) {
  .dafne-app select {
    appearance: auto;
    background-image: none;
  }
}

/* Country flags and native country selection. */
.country-flag {
  display: inline-block;
  width: 20px;
  height: 14px;
  object-fit: contain;
  vertical-align: middle;
  margin-inline-end: 5px;
  flex-shrink: 0;
}

.country-select {
  position: relative;
}

.country-select > .country-flag {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
}

.country-select select.has-flag {
  padding-inline-start: 40px;
}

.dafne-app .chart-scroll,
.dafne-app .table-scroll {
  max-width: 100%;
  overflow: auto;
  touch-action: pan-x pan-y;
}

@media (max-width: 760px) {
  .dafne-app .selection-panel {
    position: static;
  }

  .dafne-app .result-header .segmented {
    max-width: 100%;
    flex-wrap: wrap;
  }
}

/* Compact filters keep survey choices and food selection together. */
.selection-panel {
  padding: 12px;
}

.selection-panel h2 {
  margin-bottom: 6px;
  line-height: 24px;
}

.survey-fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 6px 8px;
}

.survey-fields > .country-field,
.survey-fields > .year-checks {
  grid-column: 1/-1;
}

.survey-fields > .group-field:only-child {
  grid-column: 1/-1;
}

.survey-fields .field-label {
  margin: 0 0 3px;
  line-height: 16px;
}

.survey-fields .year-checks {
  margin: 2px 0;
}

.selection-panel select {
  min-height: 36px;
  padding-block: 6px;
  font-size: 0.85rem;
}

.country-picker {
  display: block;
  min-width: 0;
}

.country-picker fluent-option {
  grid-template-columns: 0 0 minmax(0, 1fr);
  column-gap: 0;
}

.country-picker fluent-option::part(content) {
  display: flex;
  align-items: center;
  gap: 5px;
}

.country-picker .country-flag {
  margin-inline-end: 4px;
}

.selection-panel .panel-divider {
  margin: 10px 0;
}

.selection-panel .search-field {
  min-height: 32px;
  margin: 7px 0 4px;
  padding-block: 4px;
}

.selection-panel .segmented button {
  padding: 3px 6px;
  line-height: 18px;
}

.selection-panel .tree-container {
  max-height: clamp(140px, calc(100dvh - 620px), 280px);
  margin-top: 4px;
}

.selection-panel .food-tree li {
  margin: 1px 0;
}

.selection-panel .food-tree summary,
.selection-panel .food-leaf {
  padding-block: 2px;
}

.selection-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  border-top: 1px solid var(--border);
  margin-top: 6px;
  padding-top: 5px;
  font-size: 0.75rem;
  color: #65758a;
}

.clear-selection {
  border: 0;
  background: transparent;
  color: var(--accent);
  padding: 3px 6px;
  border-radius: 3px;
}

.clear-selection:hover:not(:disabled) {
  background: #edf4fa;
}

.clear-selection:disabled {
  color: #7a8998;
  cursor: default;
}

/* Query progress and compact mobile filter sizing. */
.query-status {
  margin: 0;
  font-size: 0.8rem;
  color: #526477;
}

@media (max-width: 760px) {
  .selection-panel .tree-container {
    max-height: 220px;
  }
}

/* Match the country component to the native year/group dropdowns. */
.country-picker {
  --colorNeutralStroke1: #c8d2de;
  --colorNeutralStrokeAccessible: #c8d2de;
  --colorNeutralStroke1Hover: var(--accent);
  --colorNeutralStrokeAccessibleHover: var(--accent);
  --colorNeutralStroke1Pressed: var(--accent);
  --colorNeutralStrokeAccessiblePressed: var(--accent);
  --colorNeutralForeground1: #253b52;
  --borderRadiusMedium: 4px;
  --spacingVerticalSNudge: 6px;
  --spacingHorizontalMNudge: 10px;
}

.country-picker fluent-dropdown {
  min-height: 36px;
  font-size: 0.85rem;
}

.country-picker fluent-dropdown button[slot="control"] {
  min-height: 0;
  height: 22px;
  font: inherit;
  line-height: 22px;
  text-align: left;
  padding: 0;
}

.has-country .country-picker fluent-dropdown button[slot="control"] {
  background-image: var(--selected-country-flag);
  background-repeat: no-repeat;
  background-position: left center;
  background-size: 20px 14px;
  padding-inline-start: 28px;
}

/* Between-country filters stay together; only their lists scroll. */
.multi-country .selection-panel {
  position: static;
}

.multi-country .tree-container {
  max-height: 180px;
}

.country-checklist > summary {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px;
  list-style: none;
  cursor: pointer;
  font-weight: 600;
}

.country-checklist > summary::-webkit-details-marker {
  display: none;
}

.country-checklist > summary::marker {
  content: "";
}

.country-checklist > summary::before {
  content: "";
  border-block: 4px solid transparent;
  border-inline-start: 6px solid #566c82;
  justify-self: center;
}

.country-checklist[open] > summary::before {
  transform: rotate(90deg);
}

.country-checklist > summary span {
  line-height: 24px;
}

.country-checklist-heading {
  display: flex;
  align-items: center;
  gap: 8px;
}

.country-selection-total {
  color: #65758a;
  font-size: .8rem;
  font-weight: 400;
}

.country-search {
  position: relative;
}

.country-search .search-field {
  padding-inline-end: 30px;
}

.country-search input::-webkit-search-cancel-button {
  appearance: none;
}

.clear-country-search {
  position: absolute;
  inset-inline-end: 4px;
  top: 9px;
  border: 0;
  background: transparent;
  color: #526477;
  width: 26px;
  height: 26px;
  line-height: 20px;
  padding: 0;
}

.country-checklist-options {
  list-style: none;
  margin: 0;
  padding: 0 3px 0 5px;
  max-height: 220px;
  overflow-y: auto;
  scrollbar-gutter: stable;
}

.country-checklist-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 120px;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  margin: 2px 0;
}

.country-check-label {
  display: grid;
  grid-template-columns: 15px 20px minmax(0, 1fr);
  align-items: center;
  gap: 5px;
  cursor: pointer;
  font-size: .8rem;
}

.country-checklist-row:not(.is-checked) .country-check-label {
  grid-column: 1 / -1;
}

.country-check-label span {
  line-height: 18px;
  overflow-wrap: anywhere;
}

.country-check-label input {
  margin: 0;
}

.country-check-label .country-flag {
  margin: 0;
}

.selection-panel .country-check-year {
  min-width: 0;
  min-height: 28px;
  height: 28px;
  padding-block: 3px;
  font-size: .8rem;
  line-height: 20px;
}

.country-checklist-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 5px;
  color: #65758a;
  font-size: .75rem;
}

.country-checklist-footer span {
  line-height: 20px;
}

.country-no-matches {
  color: #65758a;
  font-size: .8rem;
  padding: 8px 0;
}

@media print {
  .country-checklist {
    display: none;
  }
}
