:root {
  --accent: #3CC51E;
  --accent-dark: #2a8f14;
  --text: #1a1a1a;
  --muted: #5c5c5c;
  --line: #e2e2e2;
  --bg: #ffffff;
  --soft: #f6f7f6;
  --danger: #c4161c;
  --warning: #b35c00;
  --warning-bg: #ffb000;
  --radius: 10px;
  color-scheme: light;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  overflow-wrap: anywhere;
}
a { color: var(--accent-dark); }
.wrap { max-width: 860px; margin: 0 auto; padding: 0 16px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }
.pre { white-space: pre-line; }

.top { border-bottom: 4px solid var(--accent); background: var(--bg); position: sticky; top: 0; z-index: 2; }
.top-row { display: flex; align-items: center; gap: 12px; min-height: 60px; justify-content: space-between; }
.brand { color: var(--text); text-decoration: none; font-weight: 700; display: flex; flex-direction: column; min-width: 0; line-height: 1.2; padding: 8px 0; }
.country-name { color: var(--accent-dark); font-size: 1.05rem; }
.lang select { min-height: 44px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--text); padding: 0 8px; font-size: 15px; max-width: 120px; }

main { padding-top: 16px; padding-bottom: 32px; }
main, .filters, .list, .card { min-width: 0; max-width: 100%; }
.h1 { font-size: 1.3rem; margin: 8px 0 16px; }
.countries { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.country-link {
  display: flex; align-items: center; min-height: 56px; padding: 0 18px; border: 1px solid var(--line);
  border-left: 6px solid var(--accent); border-radius: var(--radius); color: var(--text); text-decoration: none; font-size: 1.15rem; font-weight: 600;
}
.country-link:active, .country-link:hover { background: var(--soft); }

.filters { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; position: sticky; top: 64px; background: var(--bg); padding: 4px 0 8px; z-index: 1; }
.search {
  width: 100%; min-height: 48px; font-size: 17px; padding: 0 14px; border: 2px solid var(--line); border-radius: var(--radius);
  color: var(--text); background: var(--bg);
}
.search:focus { outline: none; border-color: var(--accent); }
.filter-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.select { flex: 1 1 200px; min-width: 0; width: 100%; max-width: 100%; text-overflow: ellipsis; min-height: 44px; font-size: 15px; border: 1px solid var(--line); border-radius: 8px; padding: 0 8px; background: var(--bg); color: var(--text); }
.check { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 4px; cursor: pointer; font-weight: 600; }
.check input { width: 22px; height: 22px; accent-color: var(--danger); }
.count { margin: 4px 0 10px; font-size: 14px; }

.list { display: grid; gap: 12px; }
.card { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.card-head { display: flex; gap: 10px; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; }
.pname { font-size: 1.08rem; margin: 0; flex: 1 1 200px; min-width: 0; }
.badges { display: flex; gap: 6px; flex-wrap: wrap; }
.badge { display: inline-block; font-size: 13px; font-weight: 700; padding: 3px 10px; border-radius: 999px; text-transform: uppercase; letter-spacing: .02em; white-space: nowrap; }
.badge.danger { background: var(--danger); color: #fff; }
.badge.warning { background: var(--warning-bg); color: #1a1a1a; }
.badge.none { background: #e6e6e6; color: #444; }
.badge.missing { background: #fff; color: var(--danger); border: 2px solid var(--danger); }
.facts { margin: 10px 0 0; display: grid; gap: 4px; }
.facts .row { display: grid; grid-template-columns: minmax(96px, 34%) 1fr; gap: 8px; }
.facts dt { color: var(--muted); font-size: 14px; }
.facts dd { margin: 0; font-size: 15px; }
.facts dd.hs { font-variant-numeric: tabular-nums; }
.facts dd.cmr { color: var(--danger); font-weight: 800; }
.note { margin: 10px 0 0; font-size: 13px; color: var(--warning); background: #fff7e6; border-radius: 6px; padding: 6px 8px; }
.btn {
  display: flex; align-items: center; justify-content: center; min-height: 48px; margin-top: 12px; border-radius: var(--radius);
  background: var(--accent); color: #0b2a05; font-weight: 700; text-decoration: none; font-size: 16px;
}
.btn:active, .btn:hover { background: var(--accent-dark); color: #fff; }
.notice { background: #fff7e6; border: 1px solid #ffd58a; border-radius: 8px; padding: 10px 12px; }

.footer { border-top: 4px solid var(--accent); background: var(--soft); padding: 16px 0 24px; font-size: 15px; }

@media (min-width: 700px) {
  .facts .row { grid-template-columns: 180px 1fr; }
}
