:root {
  --navy-950: #002942;
  --navy-900: #003457;
  --navy-800: #0a4268;
  --ink: #142232;
  --muted: #607083;
  --line: #d7e0e7;
  --line-strong: #c5d1da;
  --paper: #ffffff;
  --bg: #f6f8fa;
  --teal: #087f7a;
  --teal-2: #64beb8;
  --teal-3: #d8efed;
  --amber: #ffd86a;
  --amber-2: #fff2c7;
  --blue: #1e7fc7;
  --green: #2f9f67;
  --shadow: 0 10px 30px rgba(12, 38, 57, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: light;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  letter-spacing: 0;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-size: 14px;
}

button,
input {
  font: inherit;
  letter-spacing: 0;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

.lucide {
  width: 19px;
  height: 19px;
  stroke-width: 1.8;
}

.topbar {
  display: flex;
  align-items: stretch;
  gap: 26px;
  height: 72px;
  padding: 0 32px;
  color: #eef7fb;
  background:
    linear-gradient(90deg, rgba(0, 41, 66, 0.97), rgba(0, 53, 89, 0.98)),
    var(--navy-950);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.12) inset;
}

.dashboard-page .topbar {
  display: flex;
  height: 72px;
  min-height: 72px;
  padding: 0 32px;
}

.topbar-main {
  display: flex;
  align-items: stretch;
  gap: 26px;
  min-width: 0;
}

.dashboard-page .topbar-main {
  width: 100%;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
  min-width: 240px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 2px solid rgba(255, 255, 255, 0.84);
  border-radius: 8px;
  color: #ffffff;
  font-size: 13px;
  font-weight: 800;
}

.brand-name {
  color: #ffffff;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.05;
  text-transform: uppercase;
  letter-spacing: 4px;
}

.primary-nav {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1 1 auto;
  overflow: hidden;
}

.nav-item,
.nav-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 72px;
  padding: 0 12px;
  border: 0;
  border-bottom: 4px solid transparent;
  color: rgba(255, 255, 255, 0.82);
  background: transparent;
  white-space: nowrap;
}

.nav-item svg,
.nav-button svg {
  flex: 0 0 auto;
}

.nav-item.active {
  height: 38px;
  padding: 0 13px;
  border: 1px solid rgba(38, 214, 203, 0.25);
  border-radius: 7px;
  color: #5ff2e7;
  background: rgba(8, 127, 122, 0.18);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.nav-item b {
  display: inline-grid;
  place-items: center;
  min-width: 24px;
  height: 20px;
  padding: 0 7px;
  border-radius: 999px;
  color: #ffffff;
  background: #20c4b7;
  font-size: 11px;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-left: auto;
}

.topbar-actions .nav-button {
  border-left: 1px solid rgba(255, 255, 255, 0.28);
  border-right: 1px solid rgba(255, 255, 255, 0.28);
}

.user-menu {
  display: grid;
  grid-template-columns: auto 18px;
  align-items: center;
  column-gap: 10px;
  min-width: 158px;
  line-height: 1.2;
}

.user-menu strong,
.user-menu span {
  grid-column: 1;
}

.user-menu strong {
  font-size: 14px;
}

.user-menu span {
  color: rgba(255, 255, 255, 0.76);
  font-size: 12px;
}

.user-menu svg {
  grid-column: 2;
  grid-row: 1 / 3;
}

.app-main {
  padding: 24px 34px 26px;
}

.dashboard-page .app-main {
  padding-top: 14px;
}

.search-strip {
  display: grid;
  grid-template-columns: minmax(320px, 1fr);
  gap: 16px;
  margin-bottom: 28px;
}

.header-search {
  display: grid;
  grid-template-columns: minmax(320px, 1fr);
  min-width: 0;
}

.dashboard-page .header-search {
  display: flex;
  align-items: center;
  flex: 0 1 360px;
  width: min(34vw, 360px);
  min-width: 236px;
  margin-left: auto;
}

.global-search,
.filter-button,
.soft-button,
.icon-button,
.text-filter {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  color: #334354;
  background: var(--paper);
}

.global-search {
  min-height: 54px;
  gap: 14px;
  padding: 0 12px 0 16px;
  box-shadow: 0 2px 9px rgba(12, 38, 57, 0.04);
}

.dashboard-page .header-search .global-search {
  width: 100%;
  min-height: 38px;
  gap: 8px;
  padding: 0 11px;
  box-shadow: 0 1px 5px rgba(4, 20, 33, 0.16);
}

.dashboard-page .header-search .global-search svg {
  width: 16px;
  height: 16px;
}

.global-search:focus-within {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(8, 127, 122, 0.12);
}

.global-search input {
  flex: 1 1 auto;
  min-width: 0;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
  font-size: 18px;
}

.dashboard-page .header-search .global-search input {
  font-size: 14px;
}

.global-search input::placeholder {
  color: #6a7480;
}

.site-summary-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 10px;
  padding: 10px 14px;
  border: 1px solid #d8e3ea;
  border-radius: 7px;
  color: #425160;
  background: #ffffff;
  box-shadow: 0 1px 8px rgba(13, 37, 56, 0.05);
}

.site-summary-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.site-summary-strip p {
  margin: 0;
  color: #334354;
  font-size: 13px;
  line-height: 1.35;
}

.site-summary-strip .site-summary-disclaimer {
  color: #6d7a87;
  font-size: 12px;
}

.site-summary-strip span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex: 0 0 auto;
  color: #617180;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.site-summary-strip svg {
  width: 15px;
  height: 15px;
  color: var(--teal);
}

.upcoming-effective-strip {
  display: grid;
  grid-template-columns: max-content 34px minmax(0, 1fr) 34px;
  align-items: stretch;
  min-height: 68px;
  margin-bottom: 12px;
  border: 1px solid #efbd5a;
  border-radius: 7px;
  background: #fffdf8;
  box-shadow: 0 2px 10px rgba(148, 101, 16, 0.08);
}

.upcoming-effective-title {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  padding: 0 18px 0 14px;
  border-right: 1px solid #f0d49a;
  color: #1b2b3b;
}

.upcoming-effective-title h2 {
  margin: 0;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.upcoming-effective-title svg {
  width: 18px;
  height: 18px;
  color: #9d6507;
}

.upcoming-effective-window {
  min-width: 0;
  overflow-x: auto;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.upcoming-effective-window::-webkit-scrollbar {
  display: none;
}

.upcoming-effective-items {
  display: flex;
  height: 100%;
  min-width: 0;
}

.upcoming-effective-item {
  display: grid;
  flex: 0 0 25%;
  align-content: center;
  gap: 1px;
  min-width: 0;
  padding: 7px 18px;
  color: #2d3a48;
  scroll-snap-align: start;
}

.upcoming-effective-item + .upcoming-effective-item {
  border-left: 1px solid #f0d49a;
}

.upcoming-effective-item time {
  color: #1d2b39;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.upcoming-effective-item span {
  overflow: hidden;
  color: #425160;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.upcoming-effective-item small {
  overflow: hidden;
  color: #7a684c;
  font-size: 10.5px;
  font-weight: 500;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.upcoming-effective-nav {
  display: grid;
  place-items: center;
  width: 34px;
  min-width: 34px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #79510d;
  cursor: pointer;
  font: inherit;
}

.upcoming-effective-prev {
  border-right: 1px solid #f0d49a;
}

.upcoming-effective-next {
  border-left: 1px solid #f0d49a;
}

.upcoming-effective-nav:disabled {
  color: #c4a46a;
  cursor: default;
  opacity: 0.45;
}

.upcoming-effective-nav svg {
  width: 18px;
  height: 18px;
}

.filter-button {
  justify-content: space-between;
  gap: 10px;
  min-height: 46px;
  padding: 0 16px;
}

.filter-button.saved {
  justify-content: center;
}

.panel {
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(600px, 1fr) minmax(560px, 1.05fr);
  gap: 24px;
  align-items: stretch;
}

.map-panel {
  padding: 20px 18px 18px;
}

.right-stack {
  display: grid;
  grid-template-rows: minmax(0, 1fr) minmax(0, 1fr);
  gap: 22px;
}

.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.title-with-icon {
  display: flex;
  align-items: center;
  gap: 13px;
  min-width: 0;
}

.title-with-icon h1,
.title-with-icon h2 {
  margin: 0;
  color: #0f1f2f;
  line-height: 1.15;
}

.title-with-icon h1 {
  font-size: 25px;
  font-weight: 700;
}

.title-with-icon h2 {
  font-size: 25px;
  font-weight: 700;
}

.title-with-icon svg {
  width: 29px;
  height: 29px;
  color: #123b5d;
}

.soft-button,
.icon-button,
.text-filter {
  min-height: 38px;
  gap: 8px;
  padding: 0 13px;
  color: #4a5969;
}

.soft-button:hover,
.filter-button:hover,
.icon-button:hover,
.text-filter:hover,
.segmented-control button:hover,
.territory-card:hover,
.dc-rail button:hover {
  border-color: #aebdc8;
  background: #f9fbfc;
}

.icon-button {
  justify-content: center;
  width: 39px;
  padding: 0;
}

.subnav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.segmented-control {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.segmented-control button {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: #43505d;
  background: #ffffff;
  white-space: nowrap;
}

.segmented-control button.active {
  border-color: var(--teal);
  color: #ffffff;
  background: var(--teal);
}

.map-mode-control {
  flex-wrap: wrap;
}

.map-mode-control button {
  min-height: 36px;
}

.text-filter {
  border-color: transparent;
  background: transparent;
}

.map-stage {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42px;
  gap: 8px;
  min-height: 430px;
}

.us-map {
  position: relative;
  min-height: 430px;
  overflow: visible;
}

.us-map svg {
  display: block;
  width: 100%;
  height: auto;
  min-height: 430px;
}

.state-path {
  stroke: #ffffff;
  stroke-width: 1.35;
  cursor: pointer;
  transition:
    fill 120ms ease,
    stroke 120ms ease,
    filter 120ms ease,
    transform 120ms ease;
}

.state-path:hover,
.state-path.focused {
  stroke: #12323f;
  stroke-width: 1.7;
  filter: drop-shadow(0 4px 8px rgba(8, 42, 58, 0.22));
}

.map-loading {
  display: grid;
  place-items: center;
  min-height: 420px;
  color: var(--muted);
}

.dc-rail {
  display: grid;
  align-content: center;
  gap: 6px;
  padding-top: 12px;
}

.dc-rail button {
  width: 38px;
  height: 28px;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  color: #465666;
  background: #f8fafb;
  font-size: 12px;
}

.dc-rail button.active {
  color: #ffffff;
  background: #203143;
}

.map-popover {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 30;
  display: grid;
  gap: 8px;
  width: 226px;
  padding: 15px 16px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #ffffff;
  box-shadow: 0 14px 34px rgba(14, 39, 55, 0.2);
  color: #253445;
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  transform: translate(-9999px, -9999px);
  transition: opacity 120ms ease;
}

.map-popover.visible {
  opacity: 1;
}

.map-popover strong {
  color: #142232;
  font-size: 16px;
}

.map-popover span {
  display: flex;
  align-items: center;
  gap: 8px;
}

.map-popover span b {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--teal);
}

.map-popover a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--blue);
  font-weight: 600;
}

.territory-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(96px, 1fr));
  gap: 14px;
  margin-top: 12px;
}

.territory-card {
  display: grid;
  place-items: center;
  gap: 4px;
  min-height: 80px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #ffffff;
  color: #253445;
  font-size: 12px;
}

.territory-card svg {
  width: 100%;
  height: 48px;
  fill: var(--teal-2);
}

.territory-card svg path {
  stroke: rgba(8, 127, 122, 0.45);
  stroke-width: 0.7;
  vector-effect: non-scaling-stroke;
}

.territory-card svg circle {
  fill: var(--teal-2);
  stroke: rgba(8, 127, 122, 0.45);
  stroke-width: 0.7;
}

.legend-box {
  margin-top: 12px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #ffffff;
}

.legend-box h2 {
  margin: 0 0 10px;
  font-size: 15px;
}

.legend-items {
  display: flex;
  flex-wrap: wrap;
  gap: 13px 22px;
}

.legend-items span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #344355;
  font-size: 13px;
}

.legend-items em {
  color: #687786;
  font-style: normal;
}

.swatch {
  width: 23px;
  height: 23px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 4px;
}

.swatch.yes {
  background: var(--teal);
}

.swatch.pending {
  background: var(--teal-2);
}

.swatch.limited {
  background: var(--amber);
}

.swatch.none {
  background: #d7e8f7;
}

.swatch.unreviewed {
  background: #eef1f3;
}

.panel-note,
.result-count {
  margin: 10px 2px 0;
  color: #7a8795;
  font-size: 13px;
  font-style: italic;
}

.table-panel {
  min-height: 0;
  padding: 16px 18px 14px;
  overflow: hidden;
}

.panel-actions {
  display: flex;
  align-items: center;
  gap: 9px;
  flex: 0 0 auto;
}

.table-tabs {
  gap: 4px;
  margin-bottom: 8px;
  overflow-x: auto;
  padding-bottom: 1px;
}

.table-tabs button {
  min-height: 31px;
  padding: 0 8px;
  font-size: 11.5px;
}

.table-scroll {
  max-height: 292px;
  overflow: auto;
  border-top: 1px solid var(--line-strong);
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 12px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
  color: #1d2b39;
  background: #ffffff;
  font-size: 12px;
  font-weight: 700;
}

th svg {
  width: 14px;
  height: 14px;
  vertical-align: middle;
}

.right-stack .table-panel th:nth-child(4),
.right-stack .table-panel td:nth-child(4) {
  white-space: nowrap;
}

td {
  color: #2d3a48;
  font-size: 13px;
}

td .authority-cell {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

td .authority-cell svg {
  width: 19px;
  height: 19px;
  color: #263a4e;
}

.title-cell {
  max-width: 290px;
  font-weight: 500;
}

.title-cell em {
  font-style: italic;
}

.status-cell {
  width: 88px;
  max-width: 88px;
}

.grouped-title {
  display: grid;
  gap: 7px;
}

.bill-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.bill-chip {
  display: inline-flex;
  align-items: center;
  min-height: 23px;
  padding: 0 8px;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  color: var(--navy-800);
  background: #f8fafb;
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 23px;
  padding: 0 10px;
  border: 1px solid;
  border-radius: 5px;
  font-size: 12px;
  line-height: 1;
  white-space: nowrap;
}

.badge.enacted {
  border-color: #b6dec5;
  color: #21633f;
  background: #e8f6ee;
}

.badge.effective,
.badge.issued,
.badge.updated,
.badge.current,
.badge.adopted {
  border-color: #acd1ef;
  color: #155b91;
  background: #eaf5ff;
}

.badge.proposed {
  border-color: #c5a8ed;
  color: #6431a1;
  background: #f3ebff;
}

.badge.in-senate,
.badge.referred,
.badge.pending,
.badge.interim-study {
  border-color: #efc17a;
  color: #9b5600;
  background: #fff5e4;
}

.badge.interim-study {
  width: 76px;
  max-width: 76px;
  padding: 3px 6px;
  font-size: 11px;
  line-height: 1.1;
  text-align: center;
  white-space: normal;
}

.badge.enrolled-awaiting-governor {
  width: 76px;
  max-width: 76px;
  padding: 3px 6px;
  border-color: #efc17a;
  color: #9b5600;
  background: #fff5e4;
  font-size: 11px;
  line-height: 1.1;
  text-align: center;
  white-space: normal;
}

.badge.notice {
  border-color: #d3d8dd;
  color: #506070;
  background: #f8fafb;
}

.badge.none-found {
  border-color: #d3d8dd;
  color: #506070;
  background: #f8fafb;
}

.source-link {
  color: var(--blue);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.bill-source-list {
  display: grid;
  gap: 8px;
}

.bill-source-item {
  display: grid;
  gap: 2px;
}

.bill-source-meta {
  color: #687786;
  font-size: 12px;
}

.footer {
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  gap: 22px;
  min-height: 78px;
  padding: 0 34px;
  color: rgba(255, 255, 255, 0.78);
  background: linear-gradient(90deg, var(--navy-950), var(--navy-900));
  font-size: 12px;
}

.footer nav {
  display: flex;
  align-items: center;
  gap: 0;
}

.footer nav a {
  padding: 0 26px;
  border-right: 1px solid rgba(255, 255, 255, 0.48);
}

.footer nav a:last-child {
  border-right: 0;
}

.detail-main {
  display: grid;
  gap: 18px;
  max-width: 1280px;
  margin: 0 auto;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  width: fit-content;
  color: var(--blue);
  font-weight: 700;
}

.detail-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 24px 28px;
}

.detail-hero h1 {
  margin: 2px 0 8px;
  font-size: 36px;
}

.detail-hero p {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
}

.eyebrow {
  color: var(--teal) !important;
  font-size: 12px !important;
  font-weight: 800;
  text-transform: uppercase;
}

.detail-actions {
  display: flex;
  gap: 10px;
}

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

.metric {
  padding: 18px 20px;
}

.metric span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.metric strong {
  display: block;
  color: var(--ink);
  font-size: 22px;
}

.detail-table .table-scroll {
  max-height: 520px;
}

.summary-cell {
  max-width: 460px;
  color: #4a5968;
}

@media (max-width: 1320px) {
  .topbar {
    gap: 12px;
    padding: 0 18px;
  }

  .dashboard-page .topbar {
    padding: 0 18px;
  }

  .topbar-main {
    gap: 12px;
  }

  .brand {
    min-width: 208px;
  }

  .brand-name {
    font-size: 16px;
    letter-spacing: 3px;
  }

  .primary-nav {
    gap: 2px;
  }

  .nav-item,
  .nav-button {
    padding: 0 9px;
  }

  .nav-item span,
  .nav-button span {
    display: none;
  }

  .search-strip {
    grid-template-columns: 1fr;
  }

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

  .right-stack {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto;
  }
}

@media (max-width: 960px) {
  .topbar {
    height: auto;
    min-height: 72px;
    flex-wrap: wrap;
    padding-bottom: 8px;
  }

  .dashboard-page .topbar {
    padding-bottom: 12px;
  }

  .topbar-main {
    flex-wrap: wrap;
  }

  .primary-nav {
    order: 3;
    width: 100%;
  }

  .dashboard-page .header-search {
    order: 2;
    flex-basis: 320px;
    max-width: 360px;
  }

  .topbar-actions {
    margin-left: auto;
  }

  .user-menu,
  .topbar-actions .nav-button {
    display: none;
  }

  .app-main {
    padding: 18px;
  }

  .search-strip {
    grid-template-columns: 1fr;
  }

  .site-summary-strip {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

  .site-summary-strip span {
    white-space: normal;
  }

  .upcoming-effective-strip {
    grid-template-columns: 34px minmax(0, 1fr) 34px;
    padding: 10px 12px;
  }

  .upcoming-effective-title {
    grid-column: 1 / -1;
    grid-row: 1;
    min-height: 28px;
    padding: 0;
    border-right: 0;
  }

  .upcoming-effective-prev,
  .upcoming-effective-next,
  .upcoming-effective-window {
    grid-row: 2;
    margin-top: 8px;
    border-top: 1px solid #f0d49a;
  }

  .upcoming-effective-prev {
    grid-column: 1;
  }

  .upcoming-effective-window {
    grid-column: 2;
  }

  .upcoming-effective-items {
    height: auto;
  }

  .upcoming-effective-item {
    flex-basis: 50%;
    min-height: 50px;
    padding: 0 10px;
  }

  .upcoming-effective-next {
    grid-column: 3;
    border-left: 1px solid #f0d49a;
  }

  .right-stack,
  .metric-grid {
    grid-template-columns: 1fr;
  }

  .map-stage {
    grid-template-columns: 1fr;
  }

  .dc-rail {
    grid-template-columns: repeat(9, 1fr);
    grid-auto-flow: column;
  }

  .dc-rail button {
    width: 100%;
  }

  .territory-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer {
    grid-template-columns: 1fr;
    padding: 20px;
  }

  .footer nav {
    flex-wrap: wrap;
  }

  .footer nav a {
    padding: 6px 14px 6px 0;
    border: 0;
  }

  .detail-hero,
  .detail-actions {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 640px) {
  .brand {
    min-width: auto;
  }

  .brand-name {
    display: none;
  }

  .global-search input {
    font-size: 15px;
  }

  .dashboard-page .header-search {
    flex-basis: 100%;
    width: 100%;
    max-width: none;
  }

  .subnav-row,
  .panel-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .segmented-control {
    max-width: 100%;
    overflow-x: auto;
  }

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

  th,
  td {
    padding: 10px 8px;
  }
}
