.country-report {
  margin-block: 16px;
  padding: clamp(16px, 2vw, 27px);
  container-type: inline-size;
}
.country-layout {
  display: grid;
  grid-template-columns: minmax(165px, .64fr) minmax(0, 1.6fr);
  align-items: start;
  gap: clamp(22px, 3.5vw, 62px);
}
.country-heading h2 { font-size: clamp(22px, 2.1vw, 30px); letter-spacing: -.04em }
.country-heading > p, .country-caption, .country-method p { color: var(--muted); font-size: 13px; line-height: 1.5 }
.country-heading > p { margin-top: 8px; max-width: 35ch }
.country-fraction { display: grid; gap: 2px; margin-top: 22px; max-width: 16rem }
.country-fraction strong { font-size: clamp(32px, 3.1vw, 46px); font-weight: 590; line-height: 1.08; letter-spacing: -.055em }
.country-fraction strong span { color: var(--muted); font-weight: 430; font-size: .66em; letter-spacing: -.035em }
.country-fraction > span { color: var(--muted); font-size: 12px; line-height: 1.35 }
.country-views { border: none; margin: 0; padding: 0; min-width: 0 }
.country-views > label {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 5px 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 580;
  cursor: pointer;
}
.country-views > label + input + label { margin-inline-start: 2px }
.country-views > input:checked + label { background: var(--ink); border-color: var(--ink); color: var(--panel) }
.country-views > input:focus-visible + label { outline: 3px solid var(--brass); outline-offset: 2px }
.country-view { display: none }
#country-reported:checked ~ .country-reported, #country-documented:checked ~ .country-documented { display: block }
.country-caption { margin-block: 10px 5px; font-size: 12px }
.country-key { display: flex; flex-wrap: wrap; gap: 3px 14px; margin: 6px 0 4px; color: var(--muted); font-size: 11px }
.country-key > span { display: inline-flex; align-items: center; gap: 5px }
.country-key i { width: 15px; height: 7px; border-radius: 2px; background: var(--muted) }
.country-key > :last-child i { background: repeating-linear-gradient(130deg,var(--muted) 0 2px,var(--line) 2px 4px) }
.country-group { --flag-color: var(--muted); border-bottom: 1px solid var(--line) }
.country-group:last-child { border-bottom: 0 }
.country-group > summary, .country-empty > div {
  display: grid;
  grid-template-columns: minmax(96px, 1.02fr) minmax(36px, 1fr) 3.65rem 4.25rem 16px;
  align-items: center;
  gap: 10px;
  min-height: 45px;
  padding: 6px 3px;
  border-radius: 5px;
}
.country-group > summary:hover { background: color-mix(in srgb, var(--ink) 4%, var(--panel)) }
.country-group > summary:focus-visible, .country-method > summary:focus-visible { outline-offset: 0 }
.country-name { display: flex; gap: 8px; align-items: center; min-width: 0; font-size: 13px; font-weight: 600; line-height: 1.24 }
.country-flag, .country-marker { width: 25px; height: 20px; flex: none }
.country-flag {
  background-image: url("images/country-flags.webp");
  background-size: 1600% 1600%;
  background-position: var(--flag-x) var(--flag-y);
}
.country-marker { display: grid; place-items: center; color: var(--muted); font-size: 14px }
.country-track { height: 10px; border-radius: 3px; background: color-mix(in srgb, var(--ink) 10%, var(--panel)); overflow: hidden }
.country-track i { display: block; height: 100%; border-radius: inherit; overflow: hidden; background: var(--flag-color) }
.country-track b { display: block; height: 100%; background: var(--flag-color) }
.country-reported .country-track i:has(b) {
  background: repeating-linear-gradient(130deg,var(--flag-color) 0 3px,color-mix(in srgb,var(--flag-color) 22%,var(--panel)) 3px 6px);
}
[data-origin-country="unknown"] .country-track i { background: repeating-linear-gradient(130deg,var(--muted) 0 3px,var(--line) 3px 6px) }
[data-origin-country="conflict"] .country-track i { background: repeating-linear-gradient(90deg,var(--brass) 0 5px,var(--line) 5px 7px) }
.country-percent { font-size: 15px; font-weight: 640; text-align: right; white-space: nowrap }
.country-count { font-size: 11px; color: var(--muted); text-align: right; white-space: nowrap }
.country-chevron { display: grid; place-items: center; color: var(--muted); font-size: 12px }
.country-group[open] .country-chevron, .country-method[open] > summary > .icon:last-child { transform: rotate(180deg) }
.country-materials, .country-sources { list-style: none; margin: 0; padding: 0 }
.country-materials {
  margin-block: 0 9px;
  padding-inline: 14px;
  border-inline-start: 3px solid var(--flag-color);
  background: color-mix(in srgb, var(--ink) 3%, var(--panel));
}
.country-materials > li { padding-block: 12px }
.country-backed { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; padding: 10px 14px 0; border-inline-start: 3px solid var(--flag-color); background: color-mix(in srgb, var(--ink) 3%, var(--panel)); color: var(--muted); font-size: 12px }
.country-backed strong { font-size: 13px; font-weight: 650; color: var(--ink); white-space: nowrap }
.country-materials > li + li { border-top: 1px solid var(--line) }
.country-material-heading { display: flex; gap: 6px 12px; justify-content: space-between; align-items: baseline; flex-wrap: wrap }
.country-material-name { display: grid; max-width: 100%; font-size: 13px }
.country-material-name strong { font-weight: 650 }
.country-material-name > span, .country-candidates { font-size: 11px; color: var(--muted) }
.country-material-name:hover strong, .country-action:hover span, .country-sources a:hover span[data-verbatim] { text-decoration: underline; text-underline-offset: 3px }
.country-sources { margin-top: 7px; display: grid; gap: 3px }
.country-sources a { display: inline-flex; gap: 6px; align-items: baseline; color: var(--muted); font-size: 12px; overflow-wrap: anywhere }
.country-sources a > .icon { align-self: flex-start; margin-top: 2px; width: 14px; height: 14px }
.country-sources small { margin-inline-start: 5px; font-size: 11px; font-weight: 550 }
.country-action { display: inline-flex; align-items: center; gap: 5px; margin-top: 6px; font-size: 12px; font-weight: 620; color: var(--brass) }
.country-method { border-top: 1px solid var(--line); margin-top: 15px; padding-top: 4px }
.country-method > summary { width: fit-content; max-width: 100%; display: flex; align-items: center; gap: 7px; padding-block: 8px 2px; min-height: 35px; font-size: 12px; font-weight: 580 }
.country-method > summary > .icon:last-child { width: 13px; height: 13px; color: var(--muted) }
.country-method > div { display: grid; gap: 8px; margin-top: 8px; max-width: 79ch }
.country-method .text-link { font-size: 12px; font-weight: 600 }
@container (max-width: 660px) {
  .country-layout { grid-template-columns: minmax(0, 1fr); gap: 15px }
  .country-heading { display: grid; grid-template-columns: 1fr minmax(90px, 30%); align-items: start; column-gap: 15px }
  .country-heading > p { margin-top: 3px }
  .country-fraction { grid-area: 1 / 2 / span 2; margin: 0; padding-inline-start: 12px; border-inline-start: 1px solid var(--line) }
}
@container (max-width: 425px) {
  .country-views { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); column-gap: 5px }
  .country-views > label { min-height: 44px; justify-content: center; font-size: 12px; padding-inline: 5px; text-align: center }
  .country-views > label + input + label { margin: 0 }
  .country-view { grid-column: 1 / -1 }
  .country-group > summary, .country-empty > div { grid-template-columns: minmax(0, 1fr) 2.9rem auto 13px; gap: 3px 6px; padding-block: 10px }
  .country-name { grid-column: 1; grid-row: 1; font-size: 13px; gap: 5px }
  .country-percent { grid-column: 2; grid-row: 1; font-size: 13px }
  .country-count { grid-column: 3; grid-row: 1 }
  .country-chevron { grid-column: 4; grid-row: 1 }
  .country-track { grid-column: 1 / -1; grid-row: 2; margin-left: 30px; height: 6px }
  .country-method > summary { min-height: 44px }
}
@container (max-width: 310px) {
  .country-heading { display: block }
  .country-fraction { display: flex; align-items: center; gap: 10px; padding: 0; margin-top: 10px; border: 0 }
  .country-fraction strong { flex: none; font-size: 28px }
}
