.cost-living-dashboard {
  background: #f8fafc;
  color: #334155;
  min-height: 70vh;
}

.cost-living-dashboard * {
  box-sizing: border-box;
}

.cost-living-shell {
  margin: 0 auto;
  max-width: 1280px;
  padding: 32px 16px 48px;
}

.cost-living-breadcrumbs {
  margin-bottom: 24px;
}

.cost-living-breadcrumbs ol {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.cost-living-breadcrumbs li {
  align-items: center;
  color: #64748b;
  display: flex;
  font-size: 14px;
  gap: 8px;
}

.cost-living-breadcrumbs a {
  color: #64748b;
  text-decoration: none;
}

.cost-living-breadcrumbs a:hover {
  color: #2563eb;
}

.cost-living-hero {
  align-items: flex-end;
  display: grid;
  gap: 24px;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 340px);
  margin-bottom: 32px;
}

.cost-living-eyebrow {
  align-items: center;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.06);
  color: #64748b;
  display: inline-flex;
  font-size: 12px;
  font-weight: 700;
  gap: 8px;
  letter-spacing: 0;
  margin-bottom: 16px;
  padding: 6px 12px;
  text-transform: uppercase;
}

.cost-living-eyebrow span {
  background: #10b981;
  border-radius: 999px;
  display: inline-block;
  height: 8px;
  width: 8px;
}

.cost-living-hero h1 {
  color: #1e293b;
  font-size: 42px;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.1;
  margin: 0;
}

.cost-living-hero p {
  color: #64748b;
  font-size: 17px;
  line-height: 1.6;
  margin: 14px 0 0;
  max-width: 760px;
}

.cost-living-control-panel,
.cost-living-panel,
.cost-living-table-panel,
.cost-living-kpi {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.06);
}

.cost-living-control-panel {
  padding: 20px;
}

.cost-living-control-panel label {
  color: #64748b;
  display: block;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 8px;
}

.city-select {
  appearance: none;
  background-color: #f8fafc;
  background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%231e293b%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
  background-repeat: no-repeat, repeat;
  background-position: right .7em top 50%, 0 0;
  background-size: .65em auto, 100%;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  color: #1e293b;
  cursor: pointer;
  font-size: 16px;
  font-weight: 700;
  min-height: 44px;
  padding: 10px 32px 10px 12px;
  transition: border-color 0.2s;
  width: 100%;
}

.city-select:hover, .city-select:focus {
  border-color: #94a3b8;
  outline: none;
}

.cost-living-control-panel p {
  color: #94a3b8;
  font-size: 12px;
  margin: 10px 0 0;
}

.cost-living-error {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 8px;
  color: #9a3412;
  font-size: 14px;
  margin-bottom: 24px;
  padding: 14px 16px;
}

.cost-living-section {
  margin-bottom: 28px;
}

.cost-living-section-header,
.cost-living-panel-header {
  align-items: flex-start;
  display: flex;
  gap: 16px;
  justify-content: space-between;
}

.cost-living-section-header {
  margin-bottom: 16px;
}

.cost-living-section h2,
.cost-living-panel h2,
.cost-living-table-title h2 {
  color: #334155;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.25;
  margin: 0;
}

.cost-living-section-header p,
.cost-living-panel-header p {
  color: #64748b;
  font-size: 14px;
  margin: 4px 0 0;
}

.cost-living-kpis {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.cost-living-kpi {
  opacity: 0;
  padding: 18px;
  transform: translateY(15px);
  transition: box-shadow 0.2s;
}

.cost-living-kpi:hover {
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

@keyframes costLivingFadeIn {
  from {
    opacity: 0;
    transform: translateY(15px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in {
  animation: costLivingFadeIn 0.4s ease-out forwards;
}

.cost-living-kpi.animate-fade-in {
  animation: costLivingFadeIn 0.4s ease-out forwards;
}

.cost-living-kpi-head {
  align-items: flex-start;
  display: flex;
  gap: 14px;
  justify-content: space-between;
  margin-bottom: 16px;
}

.cost-living-kpi-icon {
  align-items: center;
  background: #f1f5f9;
  border-radius: 999px;
  color: #ff8f18;
  display: inline-flex;
  flex: 0 0 auto;
  height: 44px;
  justify-content: center;
  width: 44px;
}

.cost-living-kpi-icon svg {
  display: block;
  height: 24px;
  width: 24px;
}

.cost-living-kpi-title {
  align-items: center;
  color: #475569;
  display: flex;
  font-size: 14px;
  font-weight: 800;
  gap: 8px;
  margin-bottom: 16px;
}

.cost-living-kpi-value {
  color: #1e293b;
  font-size: 30px;
  font-weight: 800;
  line-height: 1;
}

.cost-living-kpi-caption {
  color: #64748b;
  font-size: 13px;
  font-weight: 700;
  margin-top: 6px;
}

.cost-living-bars {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.cost-living-bar-row {
  align-items: center;
  display: grid;
  gap: 10px;
  grid-template-columns: 72px minmax(0, 1fr) 46px;
}

.cost-living-bar-row span {
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
}

.cost-living-bar-track {
  background: #e2e8f0;
  border-radius: 999px;
  height: 8px;
  overflow: hidden;
}

.cost-living-bar-fill {
  background: #2563eb;
  border-radius: inherit;
  height: 100%;
  transition: width 1000ms cubic-bezier(0.22, 1, 0.36, 1);
  width: 0;
}

.cost-living-bar-fill.is-city {
  background: #e11d48;
}

.cost-living-panel {
  margin-bottom: 28px;
  padding: 22px;
}

.cost-living-panel-header {
  margin-bottom: 22px;
}

.cost-living-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-width: 100%;
  padding-bottom: 4px;
}

.cost-living-pill {
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  color: #475569;
  cursor: pointer;
  flex: 0 1 auto;
  font-size: 14px;
  font-weight: 700;
  min-height: 38px;
  padding: 8px 16px;
  transition: all 0.2s;
}

.cost-living-pill:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.cost-living-pill.is-active {
  background: #3b82f6;
  border-color: #3b82f6;
  color: #fff;
  box-shadow: 0 4px 10px -2px rgba(59,130,246,0.6);
}

.cost-living-chart-wrap {
  height: 420px;
  position: relative;
  width: 100%;
  overflow: hidden;
}

.cost-living-chart-wrap canvas {
  display: block;
  height: 100%;
  width: 100%;
}

.cost-living-table-panel {
  overflow: hidden;
}

.cost-living-table-title {
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  padding: 18px 22px;
}

.cost-living-table-wrap {
  overflow-x: auto;
}

.cost-living-table-panel table {
  border-collapse: collapse;
  min-width: 760px;
  width: 100%;
}

.cost-living-table-panel th,
.cost-living-table-panel td {
  border-bottom: 1px solid #e2e8f0;
  padding: 14px 18px;
  text-align: left;
}

.cost-living-table-panel th {
  color: #94a3b8;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.cost-living-table-panel td {
  color: #334155;
  font-size: 14px;
  vertical-align: top;
}

.cost-living-table-panel tbody tr {
  transition: background-color 0.2s;
}

.cost-living-table-panel tbody tr:hover {
  background-color: #f8fafc;
}

.cost-living-table-panel .is-numeric {
  text-align: right;
  white-space: nowrap;
}

.cost-living-gap {
  border-radius: 6px;
  display: inline-flex;
  font-size: 12px;
  font-weight: 800;
  padding: 4px 8px;
}

.cost-living-gap.is-higher {
  background: #fff1f2;
  color: #e11d48;
}

.cost-living-gap.is-lower {
  background: #eff6ff;
  color: #2563eb;
}

.cost-living-gap.is-flat {
  background: #f1f5f9;
  color: #64748b;
}

.cost-living-footnote {
  color: #64748b;
  font-size: 13px;
  margin-top: 28px;
  text-align: center;
}

@media (max-width: 900px) {
  .cost-living-hero,
  .cost-living-section-header,
  .cost-living-panel-header {
    display: block;
  }

  .cost-living-control-panel,
  .cost-living-pills {
    margin-top: 18px;
  }

  .cost-living-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .cost-living-shell {
    padding: 24px 12px 40px;
  }

  .cost-living-hero h1 {
    font-size: 32px;
  }

  .cost-living-kpis {
    grid-template-columns: 1fr;
  }

  .cost-living-panel {
    padding: 16px;
  }

  .cost-living-chart-wrap {
    height: 360px;
  }

  .cost-living-table-panel table {
    min-width: 100%;
  }

  .cost-living-table-panel th,
  .cost-living-table-panel td {
    font-size: 12px;
    padding: 10px 8px;
  }

  .cost-living-table-panel th {
    font-size: 10px;
  }

  .cost-living-gap {
    font-size: 11px;
    padding: 4px 6px;
  }
}
