:root {
  --bg: #f7f8fb;
  --panel: #ffffff;
  --ink: #07152f;
  --muted: #53627c;
  --line: #d8deea;
  --accent: #0d6b8f;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--bg);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.app-shell {
  display: grid;
  grid-template-columns: 486px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  display: flex;
  flex-direction: column;
  overflow: auto;
  min-height: 100vh;
  max-height: 100vh;
  padding: 24px;
  background: var(--panel);
  border-right: 1px solid var(--line);
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 6px;
  font-size: 30px;
  line-height: 1.15;
}

h2 {
  margin-bottom: 10px;
  font-size: 20px;
}

p {
  color: var(--muted);
  line-height: 1.45;
}

.filters,
.file-fallback {
  display: grid;
  gap: 12px;
  margin: 24px 0 16px;
}

.file-fallback {
  padding: 14px;
  border: 1px solid #f0c36a;
  border-radius: 8px;
  background: #fff8e8;
}

label {
  font-weight: 700;
}

input,
select,
button {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 0 14px;
  color: var(--ink);
  background: #fff;
  font: inherit;
  font-weight: 650;
}

button {
  cursor: pointer;
  color: #fff;
  border-color: var(--accent);
  background: var(--accent);
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 650;
}

.checkbox-row input {
  width: 18px;
  min-height: 18px;
  accent-color: var(--accent);
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 18px 0 28px;
}

.stats div {
  min-height: 84px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfe;
}

.stats strong {
  display: block;
  font-size: 30px;
  line-height: 1;
}

.stats span,
.file-status {
  color: var(--muted);
}

.map-panel,
#map {
  min-height: 100vh;
}

.unmapped ul,
.popup ul {
  padding-left: 18px;
}

.unmapped li,
.popup li {
  margin-bottom: 12px;
}

.unmapped span,
.popup span,
.popup a {
  display: block;
  margin-top: 2px;
}

.popup {
  max-height: 430px;
  overflow: auto;
}

.popup h2 {
  margin-bottom: 4px;
  font-size: 18px;
}

.popup-count,
.popup-more {
  font-weight: 700;
}

@media (max-width: 900px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    max-height: none;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .map-panel,
  #map {
    min-height: 68vh;
  }
}
.info-box {
  margin: 18px 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfe;
}

.info-box h2 {
  margin-bottom: 8px;
  font-size: 18px;
}

.info-box p {
  margin-bottom: 6px;
}

.info-box p:last-child {
  margin-bottom: 0;
}
.sidebar-footer {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}

.sidebar-footer a {
  color: var(--muted);
}
.footer-notes {
  margin-bottom: 10px;
}

.footer-notes p {
  margin-bottom: 4px;
  font-size: 13px;
  line-height: 1.35;
}

.sidebar-footer nav {
  font-size: 14px;
}

.unmapped-offer {
  padding: 10px 14px 12px;
  border-top: 1px solid var(--line);
}

.unmapped-offer h3 {
  margin: 0 0 8px;
  font-size: 16px;
  line-height: 1.3;
}

.unmapped-offer h3 a {
  display: inline-block;
  margin-left: 6px;
  font-size: 13px;
  font-weight: 650;
}

.unmapped-offer ul {
  margin: 0;
  padding-left: 20px;
}

.unmapped-offer li span,
.unmapped-offer li a {
  display: block;
  margin-top: 2px;
}
.unmapped-offer {
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
}

.unmapped-offer summary {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 9px 14px;
  cursor: pointer;
  font-weight: 750;
}

.unmapped-offer summary span {
  flex: 1;
}

.unmapped-offer summary strong {
  min-width: 30px;
  padding: 2px 7px;
  border-radius: 999px;
  color: var(--muted);
  background: #eef2f7;
  text-align: center;
  font-size: 13px;
}

.unmapped-offer summary a {
  font-size: 13px;
  font-weight: 650;
}
.unmapped-offer summary .external-link {
  flex: 0 0 auto;
  margin-left: auto;
  font-size: 13px;
  font-weight: 650;
  white-space: nowrap;
}

.unmapped-offer summary .external-link + strong {
  margin-left: 2px;
}
a.external-link {
  white-space: nowrap;
}

.popup a.external-link {
  display: inline-block;
}
.unmapped-group > header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  min-height: 42px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}

.unmapped-group > header h3 {
  margin: 0;
  font-size: 17px;
  line-height: 1.3;
}

.unmapped-group > header span {
  color: var(--ink);
  font-weight: 750;
}

.unmapped-group > summary {
  display: none;
}

.unmapped-group > header span {
  min-width: 43px;
  padding: 3px 8px;
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  text-align: center;
}

.unmapped-offer summary .chevron {
  flex: 0 0 auto;
  width: 9px;
  height: 9px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(-45deg);
  transition: transform 120ms ease;
}

.unmapped-offer[open] summary .chevron {
  transform: rotate(45deg);
}

.unmapped-offer summary > span:nth-child(2) {
  flex: 1;
}

.unmapped-group > header span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 29px;
  font-size: 16px;
  line-height: 1;
  font-weight: 750;
}
