:root { --country-cyan: #df1f3f; --country-teal: #163a70; --country-navy: #0b234a; --country-cream: #f7f9fc; --country-gold: #b99646; }
.country-layer-toggle.is-active, .country-atlas-launch { border-color: rgba(19,198,200,.62) !important; box-shadow: inset 0 0 0 1px rgba(19,198,200,.18), 0 0 22px rgba(19,198,200,.10); }
.kids-country-toggle.is-active { color: #062630 !important; background: #86ede9 !important; }
.country-atlas-dialog { width: min(1440px, calc(100vw - 36px)); height: min(880px, calc(100dvh - 36px)); padding: 0; overflow: hidden; border: 1px solid rgba(19,198,200,.4); border-radius: 24px; color: #143340; background: #f8f6ef; box-shadow: 0 30px 100px rgba(1,24,34,.42); }
.country-atlas-dialog::backdrop { background: rgba(2,22,30,.78); backdrop-filter: blur(10px); }
.country-atlas-header { min-height: 128px; display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; padding: 26px 30px 22px; color: white; background: radial-gradient(circle at 86% 0, rgba(19,198,200,.23), transparent 29%), linear-gradient(120deg, #061f2a, #0b3c48); border-bottom: 3px solid var(--country-gold); }
.country-atlas-header h2 { margin: 4px 0 7px; color: white; font-size: clamp(28px, 4vw, 46px); line-height: .98; }
.country-atlas-header p { max-width: 880px; margin: 0; color: rgba(255,255,255,.72); line-height: 1.5; }
.country-eyebrow { margin: 0 !important; color: var(--country-teal) !important; font-size: 10px !important; font-weight: 950; letter-spacing: .16em; text-transform: uppercase; }
.country-atlas-header .country-eyebrow { color: #86ede9 !important; }
.country-dialog-close { flex: 0 0 auto; width: 42px; height: 42px; border: 1px solid rgba(255,255,255,.28); border-radius: 50%; color: white; background: rgba(255,255,255,.08); font-size: 26px; cursor: pointer; }
.country-atlas-tools { display: grid; grid-template-columns: minmax(260px, 1.35fr) minmax(180px, .65fr) auto; align-items: center; gap: 12px; padding: 16px 24px; background: white; border-bottom: 1px solid #d9e3e1; }
.country-atlas-tools input, .country-atlas-tools select { width: 100%; min-height: 46px; padding: 0 16px; border: 1px solid #c8d8d6; border-radius: 13px; color: var(--country-navy); background: #f8fbfa; font: inherit; }
.country-atlas-tools input:focus, .country-atlas-tools select:focus { outline: 3px solid rgba(19,198,200,.2); border-color: var(--country-cyan); }
.country-atlas-tools > strong { color: var(--country-teal); font-size: 12px; text-align: right; text-transform: uppercase; letter-spacing: .05em; }
.country-atlas-layout { height: calc(100% - 248px); display: grid; grid-template-columns: minmax(430px, 1.15fr) minmax(390px, .85fr); }
.country-directory { min-width: 0; padding: 20px; overflow: auto; border-right: 1px solid #d9e3e1; }
.country-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
.country-card { min-width: 0; min-height: 72px; display: grid; grid-template-columns: 35px minmax(0, 1fr) auto; align-items: center; gap: 9px; padding: 10px 11px; border: 1px solid #d6e2df; border-radius: 14px; color: #163744; background: white; text-align: left; cursor: pointer; transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease; }
.country-card:hover, .country-card:focus-visible, .country-card.is-selected { transform: translateY(-2px); border-color: var(--country-cyan); box-shadow: 0 10px 24px rgba(6,74,82,.1); outline: none; }
.country-card.is-selected { background: #eafbfa; }
.country-card-flag { font-size: 27px; filter: drop-shadow(0 2px 2px rgba(5,31,42,.14)); }
.country-card span:nth-child(2) { min-width: 0; display: grid; gap: 4px; }
.country-card strong, .country-card small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.country-card strong { font-size: 13px; }
.country-card small { color: #617b84; font-size: 10px; }
.country-card i { color: var(--country-teal); font-style: normal; }
.country-more { display: block; min-height: 44px; margin: 18px auto 0; padding: 0 20px; border: 1px solid var(--country-teal); border-radius: 999px; color: var(--country-teal); background: transparent; font-weight: 850; cursor: pointer; }
.country-more[hidden] { display: none; }
.country-profile { min-width: 0; padding: 26px; overflow: auto; background: linear-gradient(180deg, #fff, #f2f8f6); }
.country-profile-empty { height: 100%; display: grid; place-content: center; justify-items: center; color: #668087; text-align: center; }
.country-profile-empty span { color: var(--country-cyan); font-size: 70px; }
.country-profile-empty h3 { margin: 10px 0 4px; color: var(--country-navy); font-size: 30px; }
.country-profile-hero { display: flex; align-items: center; gap: 18px; padding-bottom: 20px; border-bottom: 1px solid #d9e3e1; }
.country-profile-flag { font-size: 64px; line-height: 1; }
.country-profile-hero p { margin: 0 0 3px; color: var(--country-teal); font-size: 10px; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.country-profile-hero h3 { margin: 0; color: var(--country-navy); font-size: clamp(30px, 4vw, 50px); line-height: .95; }
.country-profile-hero small { display: block; margin-top: 8px; color: #607880; }
.country-capital-callout { display: flex; align-items: center; gap: 12px; margin: 18px 0; padding: 15px; border-radius: 15px; color: var(--country-navy); background: #f7e6b8; }
.country-capital-callout > span { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; color: white; background: #b77a13; }
.country-capital-callout div { display: grid; }
.country-capital-callout small { font-size: 9px; font-weight: 950; letter-spacing: .14em; }
.country-capital-callout strong { font-size: 20px; }
.country-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 0; }
.country-facts div { padding: 12px; border: 1px solid #dce8e5; border-radius: 13px; background: white; }
.country-facts dt { margin-bottom: 5px; color: var(--country-teal); font-size: 9px; font-weight: 950; letter-spacing: .1em; text-transform: uppercase; }
.country-facts dd { margin: 0; color: #34535e; font-size: 12px; line-height: 1.45; }
.country-history { margin: 18px 0; padding: 18px; border-left: 4px solid var(--country-cyan); border-radius: 0 15px 15px 0; background: #eaf8f5; }
.country-history > p:last-child { margin: 9px 0 0; color: #365761; font-size: 13px; line-height: 1.7; }
.country-neighbors > strong { color: var(--country-navy); font-size: 12px; }
.country-neighbors > div { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.country-neighbors button, .country-neighbors span { padding: 7px 9px; border: 1px solid #cbdedb; border-radius: 999px; color: #28515b; background: white; font-size: 10px; cursor: pointer; }
.country-profile-links { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 20px; }
.country-profile-links a { padding: 10px 12px; border-radius: 10px; color: white; background: var(--country-teal); font-size: 11px; font-weight: 850; text-decoration: none; }
.country-profile-caveat { margin-top: 16px; padding-top: 14px; border-top: 1px solid #d9e3e1; color: #71858b; font-size: 10px; line-height: 1.5; }
.country-atlas-footer { min-height: 60px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 12px 24px; color: #a8c0c4; background: var(--country-navy); font-size: 10px; }
.country-atlas-footer p { margin: 0; }
.country-atlas-footer a { flex: 0 0 auto; color: #72e1dd; }
.country-map-label { cursor: pointer; pointer-events: auto; }
.country-map-label circle { fill: #f6c555; stroke: #06212c; stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.country-map-label text { paint-order: stroke; stroke: rgba(4,24,33,.88); stroke-width: 3px; stroke-linejoin: round; fill: white; font: 800 8px system-ui, sans-serif; letter-spacing: .02em; text-anchor: middle; pointer-events: none; }
.country-map-label .country-capital-name { fill: #f6d889; font-size: 6px; font-weight: 700; }

.country-atlas-kids { margin: 28px auto; padding: clamp(24px, 4vw, 52px); border: 1px solid rgba(12,127,136,.17); border-radius: 30px; background: radial-gradient(circle at 94% 2%, rgba(19,198,200,.16), transparent 27%), linear-gradient(145deg, #fffdf8, #eaf8f5); box-shadow: 0 28px 80px rgba(6,58,68,.09); }
.country-kids-heading { display: flex; align-items: center; justify-content: space-between; gap: 30px; }
.country-kids-heading h2 { max-width: 760px; margin: 6px 0 10px; color: var(--country-navy); font-family: Georgia, serif; font-size: clamp(34px, 5vw, 64px); line-height: .95; }
.country-kids-heading p:last-child { max-width: 820px; color: #55717a; line-height: 1.65; }
.country-kids-badge { flex: 0 0 190px; display: grid; justify-items: center; gap: 3px; padding: 20px; border-radius: 22px; color: white; background: linear-gradient(145deg, #073844, #0b7980); text-align: center; }
.country-kids-badge > span { font-size: 42px; color: #f7d985; }
.country-kids-badge small { color: rgba(255,255,255,.7); }
.country-kids-tools { margin: 24px 0 18px; padding: 0; background: transparent; border: 0; }
.country-kids-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.country-kids-grid .country-card { min-height: 86px; grid-template-columns: 38px minmax(0, 1fr); }
.country-kids-grid .country-card i { display: none; }
.country-kids-note { display: flex; align-items: center; gap: 12px; max-width: 800px; margin: 25px auto 0; padding: 14px 18px; border-radius: 16px; color: #3e626b; background: #fff4d6; font-size: 12px; line-height: 1.5; }
.country-profile-dialog { width: min(760px, calc(100vw - 30px)); height: min(820px, calc(100dvh - 30px)); overflow: hidden; background: #f4f9f7; }
.country-profile-dialog > .country-dialog-close { position: absolute; z-index: 2; top: 14px; right: 14px; color: white; background: var(--country-navy); }
.country-profile-dialog .country-profile { height: 100%; padding: 34px; }
.country-no-results { grid-column: 1 / -1; padding: 30px; color: #617b84; text-align: center; }

@media (max-width: 1100px) {
  .country-grid, .country-kids-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .country-atlas-layout { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .country-atlas-dialog { width: calc(100vw - 12px); height: calc(100dvh - 12px); border-radius: 18px; }
  .country-atlas-header { min-height: auto; padding: 20px; }
  .country-atlas-header h2 { font-size: 29px; }
  .country-atlas-header p:not(.country-eyebrow) { display: none; }
  .country-atlas-tools { grid-template-columns: 1fr 1fr; padding: 10px; }
  .country-atlas-tools > strong { grid-column: 1 / -1; text-align: left; }
  .country-atlas-layout { height: calc(100% - 202px); grid-template-columns: 1fr; grid-template-rows: minmax(280px, 1fr) minmax(320px, 1fr); overflow: auto; }
  .country-directory { border-right: 0; }
  .country-atlas-adult .country-profile { min-height: 320px; }
  .country-atlas-footer { display: none; }
  .country-grid, .country-kids-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .country-kids-heading { align-items: flex-start; }
  .country-kids-badge { display: none; }
  .country-atlas-kids { padding: 23px 14px; border-radius: 22px; }
  .country-profile-dialog .country-profile { padding: 26px 18px; }
  .country-facts { grid-template-columns: 1fr; }
  .country-profile-flag { font-size: 48px; }
}
@media (max-width: 420px) {
  .country-grid, .country-kids-grid { grid-template-columns: 1fr; }
}
