@font-face {
  font-family: Outfit;
  src: url(../fonts/Outfit.ttf) format("truetype");
  font-weight: 100 900;
  font-display: swap;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font: 16px Outfit, "Segoe UI", sans-serif;
  background: #f1f5f2;
  color: #19372d;
}

button, input { font: inherit; }
button, a { touch-action: manipulation; }
button { cursor: pointer; }
button:disabled { cursor: default; }
a { color: inherit; }
button:focus-visible, input:focus-visible, a:focus-visible {
  outline: 3px solid #2b9981;
  outline-offset: 3px;
}

.login {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  min-height: 100vh;
  min-height: 100svh;
}

.hero {
  padding: 5vh clamp(20px, 4vw, 72px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 18px;
  overflow: hidden;
  min-width: 0;
  background: radial-gradient(ellipse at 55% 38%, #167a58, #074936 75%);
  color: white;
}

.logo {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -1px;
}
.logo b { color: #ffd749; }
.logo .fg-logo {
  width: 38px;
  height: 38px;
  margin-right: 9px;
  vertical-align: middle;
}
.hero h1 {
  max-width: 620px;
  margin: 0 0 .7em;
  font-size: clamp(30px, 4vw, 56px);
  line-height: 1.03;
  letter-spacing: -.045em;
}

.atlas { position: relative; isolation: isolate; }
.atlas::before {
  content: "";
  position: absolute;
  inset: -10px -3%;
  z-index: -1;
  pointer-events: none;
  background-image:
    radial-gradient(circle, #9ce6b999 1.3px, transparent 2px),
    linear-gradient(90deg, #82e3b32b 1px, transparent 1px),
    linear-gradient(#82e3b32b 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: radial-gradient(ellipse, #000 30%, transparent 75%);
  animation: atlas-grid 16s linear infinite;
}
@keyframes atlas-grid { to { background-position: 36px 36px; } }

.atlas > svg {
  display: block;
  width: 100%;
  height: clamp(360px, 51vh, 660px);
  filter: drop-shadow(0 9px 20px #143f37);
}
.atlas path[role] {
  fill: #86bba4;
  stroke: #206954;
  stroke-width: .65;
  cursor: pointer;
}
.atlas path[role]:is(.picked, .active, [aria-pressed="true"]) { fill: #ffd749; }
.atlas path[role]:hover,
.atlas path[role]:focus-visible {
  fill: #fae48d;
  stroke: #173c2d;
  stroke-width: 2;
  outline: none;
}
.atlas .routes, .atlas .points text { pointer-events: none; }
.atlas .routes path {
  fill: none;
  stroke: #ffde72;
  stroke-width: 2.3;
  stroke-dasharray: 7 6;
  animation: route 2.5s linear infinite;
}
@keyframes route { to { stroke-dashoffset: -52; } }

.atlas .points circle { fill: #ffe29b; stroke: #174e40; stroke-width: 2; }
.atlas .points circle[data-district] { cursor: pointer; }
.atlas .points circle:focus-visible { stroke: white; stroke-width: 3; outline: none; }
.atlas .points text {
  font: 600 22px Outfit, "Segoe UI", sans-serif;
  fill: white;
  stroke: #124736;
  stroke-width: 5;
  paint-order: stroke;
}
.atlas .streams { display: none; }
.atlas output {
  position: absolute;
  inset: auto 0 0;
  text-align: center;
  color: white;
  font-weight: 600;
  text-shadow: 0 1px 4px #073c2c;
  pointer-events: none;
}
.atlas output:empty { display: none; }

.stores {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 16px;
}
.stores button {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 7px 20px;
  color: white;
  background: #101714;
  border: 0;
  border-radius: 999px;
  text-align: left;
}
.stores button:hover { background: #17221e; }
.stores svg { display: block; width: 26px; height: 26px; }
.stores b { font-size: 19px; line-height: 1; }
.stores small { display: block; font-size: 10px; font-weight: 500; margin-bottom: 4px; }

.login-side {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  padding: max(4.5rem, 7vw) 7vw;
}
.login-form { width: 100%; }
.login-form h2 {
  font-size: 32px;
  line-height: 1.2;
  letter-spacing: -.035em;
  margin: 0 0 .7em;
}
.demo-access {
  margin: 0 0 1.15rem;
  padding: .9rem 1.05rem 1rem;
  border: 1px solid #bed1c3;
  border-radius: 16px;
  background: #e6efe7;
}
.demo-access[hidden] { display: none; }
.demo-access h3 { margin: 0 0 .55rem; font-size: 1.05rem; color: #164d36; }
.demo-access dl {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 10rem), 1fr));
  gap: .45rem .8rem;
  margin: 0 0 .7rem;
}
.demo-access dt { font-size: .82rem; color: #40594a; }
.demo-access dd {
  margin: .12rem 0 0;
  font: 600 .93rem/1.4 ui-monospace, monospace;
  overflow-wrap: anywhere;
  user-select: all;
}
.demo-access button {
  padding: .44rem .9rem;
  border: 1px solid #7e9e8a;
  border-radius: 20px;
  background: #f7fbf7;
  color: #164d36;
  font-weight: 600;
}
.demo-access button:hover { background: #fff; }
.login-form label { display: block; margin-bottom: 6px; }
.login-form input {
  display: block;
  width: 100%;
  min-width: 0;
  margin: 0 0 14px;
  padding: 9px 16px;
  border: 1px solid #cedbd4;
  border-radius: 24px;
  color: #19372d;
  background: #fff;
}
.primary, .google {
  display: flex;
  width: 100%;
  min-height: 49px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 1px solid #cedbd4;
  border-radius: 24px;
  padding: 11px 20px;
  line-height: 1.3;
}
.primary { font-size: 1.08rem; font-weight: 650; background: #075944; color: white; }
.google { margin-top: 9px; font-weight: 600; background: white; color: #19372d; }
.primary:hover:not(:disabled), .google:hover:not(:disabled) { filter: brightness(.95); }
.primary:disabled, .google:disabled { opacity: .68; }
.primary svg, .google svg { width: 18px; height: 18px; flex: none; }
.primary svg { fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linejoin: round; stroke-linecap: round; }

.secondary, .audit-note { font-size: .875rem; line-height: 1.5; color: #466355; }
.secondary { margin: .4rem 0 0; text-align: center; }
.secondary:empty { display: none; }
.audit-note { margin: 1rem 0 .45rem; }
#feedback:not(:empty) { color: #952e25; margin: 0 0 .75rem; }
.text-button {
  border: 0;
  padding: 10px 0;
  background: transparent;
  color: #19372d;
  text-decoration: underline;
  text-underline-offset: .15em;
  font-size: .9rem;
}
.languages {
  position: absolute;
  top: 1.25rem;
  right: 7vw;
  display: inline-flex;
  padding: 2px;
  gap: 2px;
  border: 1px solid #cedbd4;
  border-radius: 24px;
  background: #fff;
}
.languages button {
  min-width: 38px;
  min-height: 32px;
  border: 0;
  border-radius: 20px;
  font-size: .85rem;
  font-weight: 600;
  color: #19372d;
  background: transparent;
}
.languages button[aria-pressed="true"] { background: #dceadf; color: #124b37; }
.credit { margin: 13px 0 0; padding: 6px 0; font-size: 13px; line-height: 1.55; }
.credit a { font-weight: 600; }

dialog {
  width: min(410px, calc(100% - 32px));
  max-height: calc(100dvh - 32px);
  overflow: auto;
  border: 1px solid #cedbd4;
  border-radius: 18px;
  padding: 26px;
  color: #19372d;
  background: white;
}
dialog::backdrop { background: #071d16aa; }
dialog h2 { margin: 0 0 .6em; letter-spacing: -.035em; }
dialog p { margin: 0 0 1.2rem; line-height: 1.5; }
dialog div { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
dialog button { border: 0; border-radius: 24px; padding: 9px 16px; color: white; background: #075944; }

@media (max-width: 800px) {
  .login { grid-template-columns: minmax(0, 1fr); }
  .hero { padding-block: 5vh; }
  .logo { font-size: 19px; }
  .hero h1 { font-size: 34px; }
  .atlas > svg { height: clamp(265px, 77vw, 420px); }
  .login-side { padding: 24px; }
  .languages { position: static; align-self: flex-end; margin-bottom: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .atlas::before, .atlas .routes path { animation: none; }
}
