.metric-value {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.3;
}

.metric-label {
  color: var(--usa-ink);
  font-size: .875rem;
}

/* Ensure adequate hit target size for interactive elements */
.min-touch-target {
  display: inline-flex;
  align-items: center;
  min-width: 44px;
  min-height: 44px;
  padding: .25rem .5rem;
}

/* Footer return-to-top accessibility improvements */
.usa-footer__return-to-top a {
  display: inline-flex;
  align-items: center;
  min-width: 44px;
  min-height: 44px;
  padding: .25rem .5rem;
}

#main-content .usa-hero {
  background-image: url(../img/hero-2.jpg);
}

@media (min-width: 64em) {
  header.usa-header--basic .usa-navbar {
      width: 60%;
  }
}

/* Shared chart helpers */
.chart-wrapper {
  position: relative;
}

.chart-tooltip {
  position: absolute;
  z-index: 10;
  left: 0;
  top: 0;
  transform: translate(-9999px, -9999px);
  pointer-events: none;
  background-color: rgba(17, 40, 69, 0.95);
  color: #fff;
  padding: 0.35rem 0.6rem;
  border-radius: 4px;
  font-size: 0.875rem;
  line-height: 1.3;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.25);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.15s ease, visibility 0.15s ease;
}

.chart-tooltip__month {
  display: block;
  font-weight: 600;
}

.chart-tooltip__value {
  display: block;
  font-size: 0.8125rem;
  margin-top: 0.15rem;
}

.ga-trend-figure {
  max-width: 920px;
  margin-inline: auto;
  width: 100%;
}

.ga-trend-figure svg {
  width: 100%;
  height: auto;
  display: block;
}

@media (max-width: 640px) {
  .ga-trend-figure {
    max-width: 100%;
    margin-inline: 0;
  }
}

/* Allow department column text to wrap naturally */
#top-properties-table th:nth-of-type(2),
#top-properties-table td[data-label="Dept name"] {
  text-wrap-mode: balance;
  text-wrap: balance;
  overflow-wrap: anywhere;
  hyphens: auto;
}

/* Responsive card treatment for the Top 10 websites table */
@media (max-width: 768px) {
  .top-properties-table-container {
    overflow: visible;
  }

  #top-properties-table,
  #top-properties-table thead,
  #top-properties-table tbody,
  #top-properties-table th,
  #top-properties-table td,
  #top-properties-table tr {
    display: block;
    width: 100%;
  }

  #top-properties-table thead {
    position: absolute;
    clip: rect(0 0 0 0);
    width: 1px;
    height: 1px;
    margin: -1px;
    overflow: hidden;
  }

  #top-properties-table tr {
    margin-bottom: 1.5rem;
    border: 1px solid #dfe1e2;
    border-radius: 4px;
    padding: 0.75rem 1rem;
    background-color: #fff;
  }

  #top-properties-table tr:nth-child(odd),
  #top-properties-table tbody tr:nth-child(odd) td {
    background-color: #fff !important;
  }

  #top-properties-table td {
    display: grid;
    grid-template-columns: minmax(120px, 45%) 1fr;
    gap: 0.5rem;
    padding: 0.25rem 0;
    border: 0;
    text-align: left;
  }

  #top-properties-table td::before {
    content: attr(data-label);
    font-weight: 600;
    color: #1b1b1b;
  }

  #top-properties-table td.text-right {
    justify-self: end;
    text-align: right;
  }

  #top-properties-table td a {
    display: inline-block;
    overflow-wrap: anywhere;
  }

  #top-properties-table tr:not([data-total-row="true"]) td:nth-of-type(1),
  #top-properties-table tr:not([data-total-row="true"]) td:nth-of-type(2) {
    display: inline-grid;
    width: 50%;
    min-width: 0;
    grid-template-columns: 1fr;
    justify-items: start;
    text-align: left;
    padding-top: 0;
    padding-bottom: 0.5rem;
  }

  #top-properties-table tr:not([data-total-row="true"]) td:nth-of-type(1) {
    padding-right: 0.75rem;
  }

  #top-properties-table tr:not([data-total-row="true"]) td:nth-of-type(2) {
    padding-left: 0.75rem;
  }

  #top-properties-table tr:not([data-total-row="true"]) td:nth-of-type(1)::before,
  #top-properties-table tr:not([data-total-row="true"]) td:nth-of-type(2)::before {
    margin-bottom: 0.25rem;
  }

  #top-properties-table tr:not([data-total-row="true"]) td:nth-of-type(3) {
    margin-top: 0.75rem;
  }

  #top-properties-table td:first-child {
    padding-top: 0;
  }

  #top-properties-table td:last-child {
    padding-bottom: 0;
  }

  #top-properties-table tr[data-total-row="true"] td {
    grid-template-columns: minmax(120px, 45%) 1fr;
    justify-items: start;
    background-color: #fff;
  }

  #top-properties-table tr[data-total-row="true"] td:first-child {
    grid-template-columns: 1fr;
    margin-bottom: 0.75rem;
  }

  #top-properties-table tr[data-total-row="true"] td:first-child::before {
    display: none;
  }
}
