*{box-sizing:border-box}

html,body{margin:0;min-height:100%}

body{

  background:radial-gradient(circle at 50% 42%,#142231 0%,#071019 42%,#02060a 100%);

  color:#eef4f7;

  font-family:Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;

}

.page{

  min-height:100vh;

  display:flex;

  flex-direction:column;

  align-items:center;

  padding:34px 18px 50px;

}

header{width:min(900px,100%);text-align:center}

.eyebrow{margin:0 0 8px;font-size:11px;font-weight:700;letter-spacing:.18em;color:#8fa5b2}

h1{margin:0;font-size:clamp(28px,5vw,46px);letter-spacing:-.03em}

header p:last-child{margin:11px auto 0;color:#9caeb8;line-height:1.5}

.globe-wrap{
  position:relative;
  width:100vw;
  height:600px;
  margin-top:-10px;
}

#globe{
  width:100%;
  height:100%;
  display:block;
  cursor:grab;
  touch-action:none;
  outline:none
}

#globe:active{cursor:grabbing}

#globe:focus-visible{
  outline:2px solid rgba(255,255,255,.65);
  outline-offset:8px;
  border-radius:50%
}

#status{
  position:absolute;
  inset:50% auto auto 50%;
  transform:translate(-50%,-50%);
  color:#a9bac3;
  font-size:14px;
  pointer-events:none
}

.controls{
  display:flex;
  gap:10px;
  justify-content:center;
  margin-top:2px
}

button{
  min-width:44px;
  height:42px;
  padding:0 16px;
  border:1px solid rgba(255,255,255,.18);
  border-radius:999px;
  background:rgba(255,255,255,.07);
  color:#f1f5f7;
  font:inherit;
  font-size:15px;
  cursor:pointer;
}

button:hover{background:rgba(255,255,255,.12)}

.sphere{
  fill:#0b2632;
  stroke:rgba(220,239,244,.4);
  stroke-width:1.5
}

.graticule{
  fill:none;
  stroke:rgba(160,201,211,.12);
  stroke-width:.7
}

.country{
  fill:#799c76;
  stroke:rgba(222,235,213,.7);
  stroke-width:.45;
  vector-effect:non-scaling-stroke
}

.country:hover{fill:#a8c88b}

.country.selected{
  fill:#b8d894;
  stroke:#ffffff;
  stroke-width:1.2;
}

.country-info{
  position:fixed;
  left:50%;
  bottom:24px;
  transform:translateX(-50%);
  z-index:50;
  min-width:190px;
  padding:12px 16px;
  border:1px solid rgba(255,255,255,.16);
  border-radius:14px;
  background:rgba(3,10,15,.92);
  backdrop-filter:blur(12px);
  box-shadow:0 10px 30px rgba(0,0,0,.35);
  text-align:center;
}

.country-info[hidden]{
  display:none;
}

#country-name{
  margin-bottom:7px;
  color:#f2f6f8;
  font-size:16px;
  font-weight:700;
}

#country-link{
  color:#9fc8d8;
  font-size:13px;
  text-decoration:none;
}

#country-link:hover{
  color:#fff;
}

@media(max-width:600px){

  .page{
    padding-top:26px
  }

  .globe-wrap{
    width:100vw;
    margin-top:10px
  }

  /* Keep the selected-country card inside the globe,
     above the controls, on small screens. */
  .country-info{
    bottom:12px;
    min-width:150px;
    padding:9px 12px;
    border-radius:12px;
  }

  #country-name{
    margin-bottom:4px;
    font-size:14px;
  }

  #country-link{
    font-size:12px;
  }

}

/* Homepage header */

.home-header{
  width:100%;
  padding:18px 32px 0;
  position:relative;
  z-index:20;
}

.home-header-inner{
  width:100%;
  margin:0;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:30px;
}

.home-brand{
  display:inline-flex;
  align-items:center;
  gap:9px;
  color:#eef4f7;
  text-decoration:none;
  font-size:15px;
  font-weight:700;
  white-space:nowrap;
}

.home-brand-mark{
  font-size:19px;
}

.home-nav{
  display:flex;
  align-items:center;
  gap:4px;
}

.home-nav a{
  display:block;
  padding:8px 11px;
  border-radius:8px;
  color:#9caeb8;
  text-decoration:none;
  font-size:13px;
  transition:.16s ease;
  white-space:nowrap;
}

.home-nav a:hover{
  color:#eef4f7;
  background:rgba(255,255,255,.06);
}

.home-nav a.active{
  color:#eef4f7;
  background:rgba(255,255,255,.09);
}


/* Mobile header */

@media(max-width:600px){

  .home-header{
    padding:12px 10px 0;
  }

  .home-header-inner{
    display:block;
  }

  .home-brand{
    display:flex;
    justify-content:center;
    font-size:13px;
    margin-bottom:10px;
  }

  .home-brand-mark{
    font-size:17px;
  }

  .home-nav{
    width:100%;
    display:flex;
    justify-content:center;
    align-items:center;
    gap:2px;
    overflow-x:auto;
    scrollbar-width:none;
    -webkit-overflow-scrolling:touch;
  }

  .home-nav::-webkit-scrollbar{
    display:none;
  }

  .home-nav a{
    display:block;
    flex:0 0 auto;
    padding:7px 8px;
    font-size:11px;
    white-space:nowrap;
  }

}

/* Homepage light theme */

html[data-theme="light"] body {
  background:#f4f7f8;
  color:#17232b;
}

html[data-theme="light"] .home-brand {
  color:#17232b;
}

html[data-theme="light"] .home-nav a {
  color:#60717b;
}

html[data-theme="light"] .home-nav a:hover {
  color:#17232b;
  background:rgba(0,0,0,.05);
}

html[data-theme="light"] .home-nav a.active {
  color:#17232b;
  background:rgba(0,0,0,.07);
}

html[data-theme="light"] .eyebrow {
  color:#607984;
}

html[data-theme="light"] #status {
  color:#60717b;
}

html[data-theme="light"] .controls button {
  background:#ffffff;
  border-color:#cbd5da;
  color:#17232b;
}

html[data-theme="light"] .controls button:hover {
  background:#edf2f4;
}

html[data-theme="light"] .country-info {
  background:rgba(255,255,255,.94);
  border-color:#cbd5da;
  color:#17232b;
  box-shadow:0 10px 30px rgba(0,0,0,.12);
}

html[data-theme="light"] #country-name {
  color:#17232b;
}

html[data-theme="light"] #country-link {
  color:#176b5c;
  text-decoration:none;
  font-weight:600;
}

/* Homepage theme toggle */

.theme-toggle {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:34px;
  height:34px;
  margin-left:8px;
  padding:0;
  border:1px solid #34434d;
  border-radius:50%;
  background:#101c25;
  color:#eef4f7;
  font-size:16px;
  line-height:1;
  cursor:pointer;
}

.theme-toggle:hover {
  background:#182832;
}

html[data-theme="light"] .theme-toggle {
  background:#ffffff;
  border-color:#cbd5da;
  color:#17232b;
}

html[data-theme="light"] .theme-toggle:hover {
  background:#edf2f4;
}
