:root {
  color-scheme: light;
  --ink: #10283b;
  --muted: #42576a;
  --teal: #075a58;
  --line: #d2dfdd;
  --paper: #fffdf7;
  font: 100%/1.6 system-ui, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: #eef3f1; color: var(--ink); }
a { color: var(--teal); text-underline-offset: .17em; }
:focus-visible { outline: 3px solid #956011; outline-offset: 4px; }
.page { width: min(1120px, 100% - 2rem); margin: 0 auto; padding: 1rem 0 2.5rem; }
nav { margin-bottom: .7rem; font-weight: 650; }
.skip { position: absolute; left: .75rem; top: -8rem; background: white; padding: .5rem; z-index: 1; }
.skip:focus { top: .75rem; }
.hero, .panel { border-radius: 1rem; overflow: hidden; }
h1, h2, p, figure { margin: 0; }
h2 { font: 700 clamp(1.5rem, 4vw, 2.25rem)/1.14 Georgia, serif; }
.hero img { display: block; width: 100%; height: auto; }
.panel { margin-top: 1.2rem; padding: clamp(1.1rem, 4vw, 2.2rem); background: var(--paper); border: 1px solid var(--line); }
.eyebrow { color: var(--teal); font-size: .76rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; margin-bottom: .45rem; }
.sources { font-size: .87rem; color: var(--muted); }
.section-bar { display: flex; align-items: end; gap: .45rem 1rem; flex-wrap: wrap; margin: 1.1rem 0; }
.section-bar p, small { color: var(--muted); font-size: .88rem; }
label { display: block; font-weight: 700; }
label span { font-weight: 400; color: var(--muted); }
fieldset { display: grid; gap: .45rem; margin: 0; padding: 0; border: 0; min-width: 0; }
input, textarea, select, button { font: inherit; border-radius: .4rem; }
input, textarea, select { border: 1px solid #879ca0; padding: .48rem .7rem; color: var(--ink); background: white; }
input, textarea { width: 100%; margin-bottom: .45rem; }
select { display: block; }
textarea { resize: vertical; }
button { cursor: pointer; border: 1px solid transparent; background: var(--teal); color: white; padding: .5rem .95rem; font-weight: 750; width: fit-content; }
button:hover:not(:disabled) { background: #063d3b; }
fieldset:disabled { opacity: .62; }
button:disabled { cursor: default; }
.status { margin-top: .55rem; color: var(--muted); }
.status:empty { display: none; }
.status.error { color: #922c23; font-weight: 650; }
.instructor { padding-block: .85rem; }
summary { cursor: pointer; font-weight: 750; }
.instructor form { margin-top: .65rem; }
.instructor input { max-width: 24rem; }
.danger { background: #922c23; }
.danger:hover:not(:disabled) { background: #732218; }
@media (max-width: 620px) {
  .page { width: calc(100% - 1rem); }
}

[hidden] { display: none !important; }
.introduction > p:not(.eyebrow), .methods > p, .instructor > p, .result > p { margin-top: .8rem; }
.country-layout { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.2rem; align-items: stretch; }
.country { background: #102d3c; color: #f9f2dd; }
.country .eyebrow { color: #f4c66c; }
.country-region { margin-top: .35rem; color: #c3dad9; }
.country-facts { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); align-items: center; gap: .7rem; margin-top: 1rem; }
.metrics { margin: .6rem 0; }
.metrics div { border: 1px solid #487178; border-radius: .65rem; background: #173d48; padding: .7rem; }
.metrics dt { font-weight: 750; }
.metrics .metric-score { margin: .15rem 0; color: #ffdb8e; font-size: clamp(1.45rem, 4vw, 2rem); font-weight: 800; }
.metric-source, .metric-note, .button-detail, .locator figcaption { font-size: .83rem; }
.metric-source, .metric-note, .locator figcaption { margin: 0; color: #d3e7e4; }
.locator { text-align: center; }
.locator img { display: block; width: min(100%, 160px); height: auto; margin: 0 auto; }
#reveal { margin-top: .85rem; background: #ffd67e; color: #102d3c; }
#reveal:hover:not(:disabled) { background: #ffeba9; }
.answer { margin-top: 1rem; padding: .85rem 1rem; border-left: 4px solid var(--teal); border-radius: .45rem; background: #e9f5f0; }
.answer .eyebrow { margin-bottom: .15rem; }
.result-category { display: block; font-size: clamp(1.5rem, 4vw, 2rem); font-weight: 850; line-height: 1.15; color: #104643; }
#result-hdi { margin-top: .4rem; }
.reveal-metrics div { background: #f5f3ea; border-color: var(--line); }
.reveal-metrics .metric-score { color: var(--ink); }
.reveal-metrics .metric-source { color: var(--muted); }
.tally-title { margin: 1rem 0 .2rem; font: 750 1rem/1.4 system-ui, sans-serif; }
.tally { list-style: none; padding: 0; margin: .65rem 0; }
.tally li { display: grid; grid-template-columns: minmax(0, 1fr) 3.4rem; gap: .1rem .4rem; padding: .35rem 0; }
.tally li strong { text-align: right; }
.tally progress { grid-column: 1 / -1; width: 100%; height: .6rem; accent-color: var(--teal); }
#total-votes { color: var(--muted); font-size: .88rem; }
.debrief { background: #e9f5f0; border-radius: .4rem; padding: .65rem .8rem; margin-top: .6rem; }
legend { margin: .6rem 0; color: var(--muted); }
.choices { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .6rem; margin-bottom: .65rem; }
.choice { display: flex; align-items: center; gap: .55rem; border: 1px solid #9fb4b0; padding: .6rem .7rem; border-radius: .5rem; cursor: pointer; }
.choice:has(input:checked) { background: #e9f5f0; border-color: var(--teal); }
.choice input { flex: 0 0 auto; width: auto; margin: 0; accent-color: var(--teal); }
.management-buttons { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: .4rem; }
#country-select { width: fit-content; max-width: 100%; }
.bands { display: grid; grid-template-columns: max-content 1fr; gap: .3rem .8rem; font-size: .9rem; }
.bands dt { font-weight: 750; }
.bands dd { margin: 0; }
@media (max-width: 760px) {
  .country-layout { grid-template-columns: 1fr; gap: 0; }
  .choices { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 370px) {
  .choices { grid-template-columns: 1fr; }
  .bands { grid-template-columns: 1fr; }
}
