* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: #f5f7fa;
  color: #1d2b36;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
}

.app-shell {
  min-height: 100vh;
  padding: 24px clamp(14px, 2vw, 32px);
}

.app-header {
  align-items: flex-end;
  display: flex;
  gap: 20px;
  justify-content: space-between;
  margin: 0 0 18px;
  width: 100%;
}

.eyebrow {
  color: #587081;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
  margin: 0 0 4px;
  text-transform: uppercase;
}

h1 {
  font-size: 34px;
  line-height: 1.12;
  margin: 0;
}

button {
  background: #1f6f8b;
  border: 0;
  border-radius: 6px;
  color: white;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  min-height: 40px;
  padding: 0 16px;
}

button:hover {
  background: #165a73;
}

.tabs {
  margin: 0 0 16px;
  width: 100%;
}

.tab {
  border-radius: 0;
}

.dashboard-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1.45fr) minmax(min(360px, 100%), 0.9fr);
  margin: 0;
  width: 100%;
}

.map-panel,
.chart-panel {
  min-width: 0;
}

.selection-row {
  align-items: center;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  margin: 0 0 8px;
  min-height: 40px;
}

.selection-label {
  color: #53616f;
  font-size: 14px;
  font-weight: 600;
  margin: 0;
  min-height: 20px;
}

.map-graph,
.side-chart {
  background: white;
  border: 1px solid #d9e1e8;
  border-radius: 8px;
}

.map-graph {
  height: calc(100vh - 178px);
  min-height: 620px;
}

.side-chart {
  height: calc((100vh - 190px) / 2);
  min-height: 300px;
}

.chart-panel {
  display: grid;
  gap: 18px;
  grid-template-rows: 1fr 1fr;
}

.demo-section {
  margin-top: 28px;
}

.demo-heading {
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 14px;
  color: #1d2b36;
}

.demo-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: 1fr 1fr 340px;
}

.demo-chart {
  background: white;
  border: 1px solid #d9e1e8;
  border-radius: 8px;
  height: 380px;
}

.demo-chart--narrow {
  height: 380px;
}

@media (max-width: 1100px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .map-graph {
    height: 620px;
  }

  .side-chart {
    height: 360px;
  }

  .demo-grid {
    grid-template-columns: 1fr 1fr;
  }

  .demo-chart--narrow {
    grid-column: 1 / -1;
    height: 280px;
  }
}

@media (max-width: 720px) {
  .demo-grid {
    grid-template-columns: 1fr;
  }

  .demo-chart--narrow {
    grid-column: 1;
    height: 320px;
  }
}

@media (max-width: 720px) {
  .app-shell {
    padding: 16px clamp(12px, 4vw, 20px);
  }

  .app-header {
    align-items: stretch;
    flex-direction: column;
  }

  .selection-row {
    align-items: stretch;
    flex-direction: column;
  }

  h1 {
    font-size: 27px;
  }

  .map-graph {
    height: 520px;
    min-height: 520px;
  }
}
