@font-face {
  font-family: "Inter";
  src: url("../fonts/Inter-Variable.ttf") format("truetype");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #F5F7F9;
  --heading: #0E1217;
  --body: #2A343F;
  --secondary: #46525F;
  --line: #DCE2E8;
  --input-border: #BFC8D1;
  --surface: #FFFFFF;
  --placeholder: #6E7B89;
  --logo: #141A16;
  --pill-active: #E8ECF0;
  --pill-entering: #DCE2E8;
  --pill-exiting: #BFC8D1;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--body);
  font-family: Inter, sans-serif;
  font-weight: 400;
  font-size: 17px;
  line-height: 1.45;
}

button, select, input {
  font-family: inherit;
}

.page {
  max-width: 1440px;
  margin: 0 auto;
  padding: 26px 42px 48px;
}

.top {
  display: flex;
  align-items: center;
  min-height: 60px;
  margin-bottom: 10px;
}

.logo {
  width: 188px;
  height: 40px;
  display: block;
}

h1 {
  margin: 0;
  color: var(--heading);
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

h2 {
  margin: 0;
  color: var(--heading);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.015em;
}

.lede {
  margin: 8px 0 10px;
  color: var(--secondary);
  font-size: 17px;
}

.source {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  align-items: baseline;
  margin: 0 0 22px;
  font-size: 17px;
}

#source-link {
  color: var(--heading);
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 3px;
}

#last-checked {
  color: var(--secondary);
}

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 18px 28px;
  padding: 18px;
  align-items: flex-end;
}

.filter-label {
  display: block;
  margin: 0 0 8px;
  color: var(--secondary);
  font-size: 14px;
  font-weight: 500;
}

.filter-note {
  margin: 0 0 6px;
  color: var(--secondary);
  font-size: 15px;
  align-self: center;
}

.market-toggle {
  display: flex;
  gap: 10px;
}

.chip,
.box-control {
  height: 44px;
  min-width: 125px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--heading);
  font-size: 16px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
}

.chip {
  cursor: pointer;
  position: relative;
}

.chip.selected {
  border-color: var(--heading);
}

.chip.selected::after {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 6px;
  height: 3px;
  background: var(--heading);
}

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

.metric {
  padding: 16px 18px 18px;
  min-height: 128px;
}

.metric-label {
  color: var(--secondary);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.35;
}

.metric-value {
  margin: 10px 0 0;
  color: var(--heading);
  font-size: 28px;
  font-weight: 600;
}

.metric-note {
  margin-top: 8px;
  font-size: 13px;
  line-height: 1.4;
}

.scope {
  display: grid;
  grid-template-columns: 425px 1fr;
  gap: 18px;
}

.map-card,
.state-card,
.carriers,
.chart-card,
.access-banner {
  padding: 18px;
}

.access-banner {
  margin-top: 18px;
}

.access-banner p {
  margin: 0;
  color: var(--heading);
  font-weight: 500;
}

.access-banner .subtle {
  font-weight: 400;
}

.map-card svg {
  width: 100%;
  height: 200px;
  display: block;
  margin: 8px 0 12px;
}

.ohio-shape {
  fill: var(--bg);
  stroke: var(--secondary);
  stroke-width: 1.6;
}

.subtle {
  margin: 6px 0 0;
  color: var(--secondary);
  font-size: 15px;
}

.state-card .subtle:last-child,
.carriers .subtle {
  margin-top: 16px;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 18px;
}

.data-table th {
  text-align: left;
  color: var(--secondary);
  font-size: 13px;
  font-weight: 500;
  padding: 0 12px 10px 0;
  line-height: 1.35;
  white-space: normal;
  vertical-align: bottom;
}

.data-table td {
  text-align: left;
  color: var(--body);
  font-size: 16px;
  font-weight: 400;
  padding: 12px 12px 12px 0;
  border-top: 1px solid var(--line);
  vertical-align: middle;
}

.data-table td:first-child,
tr.average-row td:first-child {
  color: var(--heading);
  font-weight: 500;
}

tr.average-row td {
  font-weight: 500;
}

.sort-btn {
  appearance: none;
  background: none;
  border: 0;
  padding: 0;
  margin: 0;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.sort-btn[aria-sort="ascending"]::after {
  content: " ↑";
}

.sort-btn[aria-sort="descending"]::after {
  content: " ↓";
}

.search-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  margin-top: 16px;
}

#carrier-search {
  height: 44px;
  min-width: 280px;
  max-width: 420px;
  flex: 1 1 280px;
  padding: 0 14px;
  border: 1px solid var(--input-border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--heading);
  font-size: 16px;
}

#carrier-search::placeholder {
  color: var(--placeholder);
}

#search-note {
  flex: 1 1 280px;
  margin: 0;
  font-size: 13px;
}

.mobile-scroll-note {
  display: none;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 84px;
  padding: 3px 10px;
  border-radius: 12px;
  border: 1px solid var(--line);
  font-size: 13px;
  font-weight: 500;
  color: var(--heading);
  background: var(--pill-active);
}

.status-pill.status-entering {
  background: var(--pill-entering);
}

.status-pill.status-exiting {
  background: var(--pill-exiting);
}

.carriers {
  margin-top: 18px;
}

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

.empty-row td {
  color: var(--heading);
  font-weight: 600;
  font-size: 18px;
  border-top: 0;
  padding-top: 28px;
}

.empty-detail {
  display: block;
  margin-top: 6px;
  color: var(--secondary);
  font-size: 15px;
  font-weight: 400;
}

.charts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-top: 18px;
}

.chart-frame {
  margin-top: 12px;
  min-height: 220px;
}

.bar-row {
  display: grid;
  grid-template-columns: minmax(120px, 38%) 1fr;
  gap: 10px;
  align-items: center;
  margin: 8px 0;
}

.bar-name {
  font-size: 13px;
  color: var(--body);
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

.bar-track {
  display: flex;
  align-items: center;
  gap: 8px;
}

.bar {
  height: 10px;
  background: var(--heading);
  border-radius: 2px;
  min-width: 0;
}

.bar.negative {
  background: var(--surface);
  border: 1px solid var(--heading);
  box-sizing: border-box;
}

.bar-value {
  font-size: 12px;
  color: var(--secondary);
  white-space: nowrap;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin: 4px 0 10px;
  font-size: 13px;
  color: var(--secondary);
  line-height: 1.35;
}

.swatch {
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 6px;
  background: var(--heading);
  vertical-align: -1px;
}

.swatch.current {
  background: repeating-linear-gradient(
    0deg,
    var(--surface) 0 2px,
    var(--secondary) 2px 3px
  );
  border: 1px solid var(--secondary);
  box-sizing: border-box;
}

.column-chart {
  display: flex;
  justify-content: space-evenly;
  align-items: stretch;
  height: 280px;
  padding: 16px 12px 40px;
  background: var(--bg);
  border-radius: 8px;
}

.column-group {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  position: relative;
  height: 100%;
}

.column-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  height: 100%;
  gap: 6px;
}

.column {
  width: 52px;
  background: var(--heading);
  min-height: 2px;
}

.column.current {
  background: repeating-linear-gradient(
    0deg,
    var(--surface) 0 3px,
    var(--secondary) 3px 4px
  );
  border: 1px solid var(--secondary);
}

.column-value {
  font-size: 12px;
  color: var(--heading);
  white-space: nowrap;
}

.column-axis {
  position: absolute;
  bottom: -28px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 13px;
  color: var(--heading);
  white-space: nowrap;
}

.chart-empty {
  margin: 18px 0 6px;
  color: var(--heading);
  font-size: 22px;
  font-weight: 600;
}

.footnote {
  margin: 18px 0 0;
  color: var(--secondary);
  font-size: 15px;
  max-width: 1100px;
  line-height: 1.45;
}

#status-note {
  margin-top: 8px;
}

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

@media (max-width: 980px) {
  .page { padding: 20px; }
  .rollups,
  .scope,
  .charts {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 430px) {
  .page { padding: 16px; }
  html, body { font-size: 16px; }
  .metric-label,
  .data-table th,
  .legend {
    font-size: 13px;
  }
  .mobile-scroll-note {
    display: block;
    margin-top: 12px;
  }
  .logo {
    width: 160px;
    height: 34px;
  }
}
