:root {
  --bg: #f7f3ed;
  --panel: #0f2537;
  --text: #0c1720;
  --accent: #f28f38;
  --muted: #5b7286;
  --border: #d5dbe3;
  --green: #1fbf8f;
  --blue: #1780c2;
}

@import url("https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600&display=swap");

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  background: radial-gradient(circle at 20% 20%, rgba(31, 191, 143, 0.07), transparent 28%),
    radial-gradient(circle at 80% 10%, rgba(23, 128, 194, 0.08), transparent 30%),
    var(--bg);
  color: var(--text);
}

#app {
  display: grid;
  grid-template-columns: 1fr 320px;
  height: 100vh;
}

#map {
  position: relative;
  width: 100%;
  height: 100vh;
  border-right: 1px solid var(--border);
  box-shadow: inset 0 8px 24px rgba(0, 0, 0, 0.08);
}

.panel {
  position: relative;
  background: white;
  color: var(--text);
  padding: 14px 14px 16px;
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: -10px 0 30px rgba(12, 23, 32, 0.05);
}

.panel__header h1 {
  margin: 2px 0 4px;
  font-size: 20px;
}

.panel__header .lede {
  margin: 0;
  line-height: 1.4;
  color: var(--muted);
}

.pill {
  display: inline-flex;
  padding: 6px 10px;
  font-size: 12px;
  letter-spacing: 0.02em;
  background: linear-gradient(120deg, rgba(31, 191, 143, 0.15), rgba(242, 143, 56, 0.16));
  border-radius: 999px;
  color: var(--text);
  margin: 0;
  text-transform: uppercase;
}

.filters {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 4px;
  max-height: calc(100vh - 220px);
  overflow: auto;
}

.tree {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.tree__branch,
.tree__leaf {
  border: none;
  border-radius: 6px;
  background: transparent;
  box-shadow: none;
}

.tree__children {
  border-left: 1px dashed #cfd5dd;
  margin: 4px 0 2px 10px;
  padding-left: 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

details > summary {
  list-style: none;
  cursor: pointer;
}

details > summary::-webkit-details-marker {
  display: none;
}

.filter {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  padding: 6px 8px;
  border-radius: 8px;
  transition: background 0.15s ease;
}

.filter:hover {
  background: rgba(23, 128, 194, 0.05);
}

.filter input[type="checkbox"] {
  accent-color: var(--accent);
  width: 16px;
  height: 16px;
  margin: 0;
}

.filter__content {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.filter__title-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.caret {
  display: inline-block;
  width: 10px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
  margin-right: 4px;
  flex-shrink: 0;
}

.filter__title {
  margin: 0;
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
}

.swatch {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(12, 23, 32, 0.12), 0 4px 10px rgba(0, 0, 0, 0.1);
  flex-shrink: 0;
  background: var(--muted);
}

.filter__subtitle {
  margin: 1px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.3;
}

.panel__footer {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}

.status {
  flex: 1;
  font-size: 13px;
  color: var(--muted);
  padding: 8px 10px;
  border-radius: 10px;
  background: #f1f3f5;
}

button.ghost {
  border: 1px solid var(--accent);
  background: linear-gradient(120deg, rgba(242, 143, 56, 0.12), rgba(23, 128, 194, 0.12));
  color: #c54c04;
  border-radius: 12px;
  padding: 10px 14px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

button.ghost:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.1);
}

@media (max-width: 960px) {
  #app {
    grid-template-columns: 1fr;
  }
  #map {
    height: 60vh;
  }
  .panel {
    height: 40vh;
    overflow: auto;
  }
}
