:root {
  color-scheme:dark;
  --bg:#171717;
  --surface:#242424;
  --fg:#fff;
  --muted:rgba(255,255,255,.57);
  --line:rgba(255,255,255,.15);
  --soft:rgba(255,255,255,.055);
  --office:#0eb1d2;
  --work:#ff2f5f;
  font-family:'Space Grotesk',system-ui,sans-serif;
  font-synthesis:none;
}

:root[data-theme="light"] {
  color-scheme:light;
  --bg:#fff;
  --surface:#f3f3f3;
  --fg:#171717;
  --muted:rgba(23,23,23,.62);
  --line:rgba(23,23,23,.17);
  --soft:rgba(23,23,23,.035);
}

* {
  box-sizing:border-box;
}

body {
  margin:0;
  background:var(--bg);
  color:var(--fg);
}

button,select {
  font:inherit;
}

button,a,select {
  -webkit-tap-highlight-color:transparent;
}

button {
  color:inherit;
  cursor:pointer;
  background:transparent;
  border:1px solid var(--line);
  border-radius:0;
}

button:hover {
  background:var(--soft);
  border-color:var(--muted);
}

button:disabled {
  opacity:.45;
  cursor:wait;
}

button:focus-visible,a:focus-visible,select:focus-visible,canvas:focus-visible {
  outline:2px solid var(--office);
  outline-offset:4px;
}

button,select {
  min-height:44px;
}

button {
  padding:10px 14px;
  font-size:12px;
  font-weight:500;
}

button span[aria-hidden] {
  margin-left:14px;
}

h1,h2,p,dl,dd {
  margin:0;
}

[hidden] {
  display:none!important;
}

.layout {
  display:grid;
  grid-template-columns:62% 38%;
  height:100dvh;
  min-height:580px;
}

.map {
  position:relative;
  min-width:0;
  overflow:hidden;
}

.view-switch {
  position:absolute;
  top:20px;
  left:20px;
  z-index:3;
  display:flex;
  background:var(--bg);
  border:1px solid var(--line);
}

.view-switch button {
  min-width:80px;
  border:0;
}

.view-switch button[aria-pressed="true"] {
  color:var(--bg);
  background:var(--fg);
}

.scene {
  position:absolute;
  inset:0;
}

.scene canvas {
  display:block;
  width:100%;
  height:100%;
  touch-action:none;
  outline-offset:-5px;
}

.eyebrow {
  text-transform:uppercase;
  letter-spacing:.15em;
  font-size:10px;
  font-weight:500;
  color:var(--muted);
}

.map-footer {
  position:absolute;
  bottom:28px;
  left:36px;
  right:36px;
  z-index:2;
  pointer-events:none;
  display:grid;
  grid-template-columns:1fr auto;
  gap:12px 16px;
}

.legend {
  display:flex;
  gap:18px;
  grid-column:1/-1;
  font-size:11px;
  color:var(--muted);
}

.legend span {
  display:flex;
  gap:7px;
  align-items:center;
}

.dot {
  width:7px;
  height:7px;
  display:inline-block;
  border-radius:50%;
  flex-shrink:0;
}

.office {
  background:var(--office);
}

.work {
  background:var(--work);
}

.map-hint {
  font-size:10px;
  line-height:1.7;
  color:var(--muted);
}

.map-actions {
  display:flex;
  gap:8px;
  align-items:end;
  pointer-events:auto;
}

.map-actions button {
  background:var(--bg);
  font-size:11px;
  padding:8px 11px;
}

.map-status {
  position:absolute;
  top:48%;
  width:100%;
  padding:24px;
  text-align:center;
  font-size:13px;
  color:var(--muted);
  pointer-events:none;
}

.map-status.error {
  background:var(--bg);
  color:var(--fg);
  line-height:1.7;
}

.labels {
  position:absolute;
  inset:0;
  z-index:1;
  pointer-events:none;
  overflow:hidden;
}

.map-label {
  position:absolute;
  left:0;
  top:0;
  font-size:12px;
  font-weight:500;
  white-space:nowrap;
  line-height:1.2;
  text-shadow:0 1px 2px rgb(0 0 0 / .6);
  will-change:transform;
}

:root[data-theme="light"] .map-label {
  text-shadow:none;
}

.tooltip {
  position:absolute;
  z-index:5;
  pointer-events:none;
  background:var(--bg);
  border:1px solid var(--line);
  padding:10px 12px;
  font-size:12px;
  max-width:calc(100% - 24px);
  box-shadow:0 4px 20px rgba(23,23,23,.12);
}

.panel {
  overflow-y:auto;
  border-left:1px solid var(--line);
  padding:30px clamp(24px,3.5vw,64px) 24px;
  scrollbar-width:thin;
  scrollbar-color:var(--line) transparent;
}

.panel-top {
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:14px;
  margin-bottom:38px;
}

.brand {
  display:block;
  line-height:0;
}

.brand img {
  width:124px;
  height:auto;
  max-height:44px;
  object-fit:contain;
}

.theme-toggle {
  font-size:10px;
  min-height:36px;
  padding:8px 10px;
  white-space:nowrap;
}

h1 {
  font-size:clamp(28px,2.8vw,46px);
  line-height:1.13;
  font-weight:600;
  letter-spacing:-.065em;
  max-width:360px;
}

h1 span {
  display:block;
}

.subtitle {
  margin-top:17px;
  font-size:14px;
  line-height:1.65;
  color:var(--muted);
  letter-spacing:-.015em;
}

.stats {
  display:grid;
  grid-template-columns:1.2fr 1.15fr .9fr;
  margin:29px 0 30px;
  padding:23px 0;
  border-top:1px solid var(--line);
  border-bottom:1px solid var(--line);
}

.stats>div {
  display:flex;
  flex-direction:column-reverse;
  gap:6px;
}

.stats dd {
  font-size:clamp(30px,3.1vw,49px);
  font-weight:400;
  line-height:1;
  letter-spacing:-.07em;
  font-variant-numeric:tabular-nums;
}

.stats dt {
  font-size:10px;
  color:var(--muted);
}

.section-heading {
  display:flex;
  justify-content:space-between;
  gap:12px;
  align-items:center;
  margin-bottom:12px;
}

h2 {
  font-size:15px;
  font-weight:500;
  letter-spacing:-.025em;
}

.section-heading .eyebrow {
  font-size:9px;
  letter-spacing:.1em;
}

.ranking ol {
  list-style:none;
  margin:0;
  padding:0;
}

.ranking li+li {
  border-top:1px solid var(--line);
}

.place-row {
  display:grid;
  grid-template-columns:21px 9px 1fr auto;
  align-items:center;
  gap:10px;
  width:100%;
  text-align:left;
  border:0;
  min-height:43px;
  padding:8px 0;
  position:relative;
}

.place-row:hover,.place-row[aria-pressed="true"] {
  background:var(--soft);
}

.place-row[aria-pressed="true"]::before {
  content:'';
  position:absolute;
  left:-12px;
  top:10px;
  bottom:10px;
  width:2px;
  background:var(--work);
}

.rank-number {
  font-size:9px;
  color:var(--muted);
  font-variant-numeric:tabular-nums;
}

.place-name {
  font-size:12px;
  font-weight:400;
}

.place-count {
  font-size:14px;
  font-weight:500;
  font-variant-numeric:tabular-nums;
}

.place-picker {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding-top:17px;
  border-top:1px solid var(--line);
  margin-top:3px;
}

.place-picker label {
  font-size:10px;
  color:var(--muted);
}

select {
  max-width:60%;
  padding:7px 9px;
  background:var(--bg);
  color:var(--fg);
  border:1px solid var(--line);
  border-radius:0;
  font-size:11px;
}

.selection {
  margin-top:22px;
  padding:17px;
  background:var(--surface);
  border-top:2px solid var(--work);
}

.selection-heading {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  margin-bottom:10px;
}

.selection-heading button {
  font-size:10px;
  border:0;
  padding:5px;
  min-height:36px;
}

.selection h2 {
  font-size:23px;
  letter-spacing:-.045em;
}

.selection-work {
  font-size:13px;
  margin:7px 0 13px;
}

.selection>p:not(.selection-work) {
  font-size:11px;
  line-height:1.6;
  color:var(--muted);
}

.contact {
  margin-top:15px;
  padding-top:13px;
  border-top:1px solid var(--line);
  font-size:12px;
  line-height:1.6;
}

.contact p+p {
  font-size:10px;
  color:var(--muted);
}

.contact-status {
  margin-top:10px;
}

.panel-bottom {
  margin-top:25px;
}

.download {
  display:flex;
  justify-content:space-between;
  align-items:center;
  width:100%;
  font-size:11px;
}

.footnote {
  font-size:9px;
  line-height:1.7;
  color:var(--muted);
  margin-top:15px;
}

#export-status {
  font-size:11px;
  line-height:1.6;
  margin-top:8px;
}

.sr-only {
  position:absolute;
  width:1px;
  height:1px;
  margin:-1px;
  padding:0;
  overflow:hidden;
  clip:rect(0,0,0,0);
  white-space:nowrap;
  border:0;
}

.no-script {
  position:fixed;
  top:40%;
  left:10%;
  right:10%;
  padding:30px;
  background:var(--surface);
  z-index:10;
  text-align:center;
}

:root[data-embed="true"] .brand,:root[data-embed="true"] .intro {
  display:none;
}

:root[data-embed="true"] .panel-top {
  justify-content:flex-end;
  margin-bottom:12px;
}

@media(min-width:960px) and (max-height:820px) {
  .panel {
    padding-top:22px;
  }
  .panel-top {
    margin-bottom:24px;
  }
  h1 {
    font-size:32px;
  }
  .subtitle {
    margin-top:12px;
    font-size:12px;
  }
  .stats {
    margin:22px 0;
    padding:18px 0;
  }
  .stats dd {
    font-size:36px;
  }
  .place-row {
    min-height:40px;
  }
  .map-footer {
    bottom:22px;
  }
  .map-hint {
    max-width:185px;
  }
  .map-actions {
    gap:5px;
  }
  .map-actions button {
    font-size:10px;
    padding:7px;
  }
}

@media(max-width:959px) {
  .layout {
    display:block;
    height:auto;
    min-height:100dvh;
  }
  .map {
    height:60vh;
    height:60svh;
    min-height:360px;
  }
  .panel {
    overflow:visible;
    border-left:0;
    border-top:1px solid var(--line);
    padding:26px clamp(24px,7vw,70px) 32px;
  }
  .map-footer {
    left:24px;
    right:24px;
    bottom:18px;
  }
  .map-hint {
    display:none;
  }
  .map-actions {
    grid-column:1/-1;
  }
  .legend {
    gap:16px;
  }
  .map-actions button {
    min-height:36px;
  }
  .panel-top {
    margin-bottom:30px;
  }
  h1 {
    font-size:40px;
    max-width:none;
  }
  h1 span {
    display:inline;
  }
  .subtitle br {
    display:none;
  }
  .subtitle {
    font-size:14px;
  }
  .stats dd {
    font-size:46px;
  }
  .stats dt {
    font-size:12px;
  }
  .place-row {
    min-height:46px;
  }
  .place-name {
    font-size:14px;
  }
  .place-count {
    font-size:16px;
  }
  .section-heading h2 {
    font-size:17px;
  }
  .place-picker label {
    font-size:12px;
  }
  .place-picker select {
    font-size:12px;
  }
  .panel-bottom {
    margin-top:24px;
  }
  .download {
    min-height:46px;
  }
  .selection {
    scroll-margin:20px;
  }
  .map-label {
    font-size:12px;
  }
}

@media(prefers-reduced-motion:reduce) {
  *,*::before,*::after {
    scroll-behavior:auto!important;
    animation:none!important;
    transition:none!important;
  }
}

/* Screenshot mode uses the full viewport, including narrow/short windows. */
:root[data-clean="true"] .layout {
  display:block;
  height:100dvh;
  min-height:0;
}

:root[data-clean="true"] .map {
  width:100%;
  height:100dvh;
  min-height:0;
}

:root[data-clean="true"] .panel,
:root[data-clean="true"] .view-switch,
:root[data-clean="true"] .map-footer,
:root[data-clean="true"] .tooltip {
  display:none;
}
