:root {
  --psc-navy-900: #132b3a;
  --psc-navy-700: #1f4860;
  --psc-blue-600: #2e6a8f;
  --psc-blue-500: #3e8fc1;
  --psc-blue-300: #8caed0;
  --psc-blue-100: #dbe5f0;
  --psc-rust-700: #813822;
  --psc-rust-500: #d85a3c;
  --psc-green-700: #485445;
  --psc-green-500: #687964;
  --psc-lime-600: #67872b;
  --psc-lime-400: #93c13e;
  --psc-gold-600: #b0881c;
  --psc-gold-400: #dfb134;
  --psc-charcoal: #323334;
  --psc-gray-700: #4b4c4e;
  --psc-gray-500: #808285;
  --psc-gray-200: #e5e5e6;
  --psc-page: #f5f5f5;
}

body {
  background: var(--psc-page);
  color: var(--psc-charcoal);
  font-size: 1rem;
  line-height: 1.65;
}

main.content {
  padding-bottom: 3rem;
}

.site-masthead {
  display: none;
}

#quarto-header > .site-masthead {
  background: #ffffff;
  border-bottom: 1px solid var(--psc-blue-100);
  display: block;
}

.site-masthead__inner {
  align-items: center;
  display: flex;
  gap: clamp(1rem, 2.5vw, 2rem);
  box-sizing: border-box;
  margin: 0;
  min-height: 6rem;
  padding-block: 0.9rem;
  /* Set from the actual Quarto main column, including sidebar layouts. */
  padding-left: var(--site-content-left, 1.5rem);
  padding-right: var(--site-content-right, 1.5rem);
  width: 100%;
}

.site-masthead__logo-link {
  flex: 0 0 auto;
}

.site-masthead__logo {
  display: block;
  height: auto;
  width: clamp(12rem, 20vw, 16rem);
}

.site-masthead__divider {
  align-self: stretch;
  background: var(--psc-gray-200);
  flex: 0 0 1px;
}

.site-masthead__title {
  color: var(--psc-navy-700);
  font-family: 'Montserrat', Arial, sans-serif;
  flex: 1 1 auto;
  min-width: 0;
  font-size: clamp(1rem, 0.85rem + 0.65vw, 1.3rem);
  font-weight: 400;
  line-height: 1.35;
  text-decoration: none;
}

.site-masthead__title:hover,
.site-masthead__title:focus {
  color: var(--psc-blue-600);
  text-decoration: none;
}

.navbar-brand-container {
  display: none;
}

#title-block-header {
  margin-bottom: 1.5rem;
}

.quarto-title-meta,
.quarto-title-meta-contents {
  color: var(--psc-gray-700);
  font-size: 0.9rem;
}

.hero-banner {
  background: #ffffff;
  border-left: 0.5rem solid var(--psc-blue-600);
  box-shadow: 0 2px 8px rgba(19, 43, 58, 0.08);
  margin-bottom: 2.5rem;
  padding: clamp(1.5rem, 4vw, 2.5rem);
}

.hero-banner:not(.home-page-container) h2,
.home-page-container .hero-landscape-content h2 {
  color: var(--psc-navy-700);
  font-weight: 700;
  /* Match the underline-to-paragraph gap used by standard Quarto H2 headings. */
  margin: 0 0 1rem;
}

.indicator-intro {
  background: var(--psc-blue-100);
  border-left: 0.35rem solid var(--psc-blue-600);
  border-radius: 0;
  color: var(--psc-navy-900);
  margin-bottom: 2rem;
  padding: 1.25rem 1.5rem;
}

.grid h3 a {
  color: var(--psc-navy-700);
  text-decoration: none;
}

.grid h3 a:hover {
  color: var(--psc-blue-600);
  text-decoration: underline;
}

.explore-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 2rem;
}

.explore-card {
  background: #ffffff;
  border: 2px solid #d7dee2;
  border-top: 5px solid var(--psc-gold-400);
  border-radius: 0.625rem;
  box-shadow: none;
  color: var(--psc-charcoal);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.5rem 0.875rem;
  padding: 1.25rem;
  font-weight: 400;
  text-decoration: none;
}

.explore-card h3 {
  align-items: center;
  color: var(--psc-navy-700);
  display: flex;
  font-size: 1.125rem;
  gap: 0.75rem;
  grid-column: 1;
  line-height: 1.4;
  margin: 0;
}

.explore-card h3 .bi {
  flex-shrink: 0;
  font-size: 1.75rem;
}

.explore-card p {
  grid-column: 1;
  margin: 0;
}

.explore-card__arrow {
  align-self: center;
  color: var(--psc-navy-700);
  font-size: 1.5rem;
  grid-column: 2;
  grid-row: 1 / span 2;
  line-height: 1;
  margin: 0;
}

.explore-card:hover,
.explore-card:focus-visible {
  background: #fff8e7;
  border-color: var(--psc-gold-600);
  border-top-color: var(--psc-gold-400);
  color: var(--psc-charcoal);
  text-decoration: none;
}

.explore-card:focus-visible {
  outline: 3px solid var(--psc-navy-700);
  outline-offset: 3px;
}

@media (max-width: 767.98px) {
  .explore-grid {
    grid-template-columns: 1fr;
  }
}
.stat-grid,
.definition-grid {
  margin-bottom: 1.5rem;
}

.stat-placeholder,
.definition-placeholder,
.content-placeholder,
.chart-placeholder,
.map-placeholder,
.table-placeholder,
.filter-placeholder,
.citation-placeholder {
  border-radius: 0.625rem;
  margin-bottom: 1rem;
  padding: 1.25rem;
}

.stat-placeholder,
.definition-placeholder {
  height: 100%;
  min-height: 5rem;
}

.stat-placeholder {
  background: var(--psc-navy-700);
  box-shadow: 0 3px 10px rgba(19, 43, 58, 0.15);
  color: #ffffff;
  display: grid;
  grid-template-columns: 3.5rem minmax(0, 1fr);
  align-content: start;
  align-items: center;
  gap: 0.75rem;
}

.stat-placeholder .stat-card-text {
  min-width: 0;
}

.stat-placeholder .stat-card-text > p {
  margin: 0 0 0.35rem;
}

.stat-placeholder .stat-card-icon {
  font-size: 3.5rem;
  line-height: 1;
  text-align: center;
}

.stat-placeholder h3,
.stat-placeholder strong {
  color: #ffffff;
}

/* Keep footnote markers readable on the dark stat cards. */
.stat-placeholder a.footnote-ref,
.stat-placeholder a.footnote-ref:hover,
.stat-placeholder a.footnote-ref:focus {
  color: #ffffff;
}
.stat-placeholder h3 {
  font-family: "Montserrat", Arial, sans-serif;
  font-size: 1rem;
  font-weight: 700;
  margin: 0;
}

.stat-placeholder > p {
  margin: 0 0 0.35rem;
}

.stat-placeholder strong {
  font-family: "Montserrat", Arial, sans-serif;
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 700;
  line-height: 1.1;
}

.stat-placeholder p:last-child {
  color: #ffffff;
  font-size: 0.875rem;
  margin-bottom: 0;
  opacity: 0.9;
}

/* Quarto inserts hover footnotes inside the card, so reset popup text colors. */
.stat-placeholder .tippy-content,
.stat-placeholder .tippy-content p,
.stat-placeholder .tippy-content a,
.stat-placeholder .tippy-content strong {
  color: #000000;
}
.definition-placeholder {
  background: #ffffff;
  border: 1px solid var(--psc-blue-100);
  border-top: 0.35rem solid var(--psc-blue-500);
  box-shadow: 0 1px 4px rgba(19, 43, 58, 0.05);
  text-align: center;
}

.definition-placeholder h3 {
  margin-top: 0.35rem;
}

.content-placeholder {
  background: #ffffff;
  border-left: 0.35rem solid var(--psc-blue-600);
  box-shadow: 0 1px 4px rgba(19, 43, 58, 0.05);
}

.chart-placeholder,
.map-placeholder,
.table-placeholder {
  align-items: center;
  background: #ffffff;
  border: 1px solid var(--psc-blue-100);
  color: var(--psc-gray-700);
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 18rem;
  position: relative;
  text-align: center;
}

.chart-placeholder::before,
.map-placeholder::before,
.table-placeholder::before {
  background: var(--psc-blue-100);
  border-radius: 999px;
  color: var(--psc-blue-600);
  content: "DATA VISUAL";
  font-family: "Open Sans", Arial, sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  margin-bottom: 0.85rem;
  padding: 0.3rem 0.65rem;
}

.map-placeholder::before {
  content: "MAP";
}

.table-placeholder::before {
  content: "DATA TABLE";
}

.chart-placeholder strong,
.map-placeholder strong,
.table-placeholder strong {
  color: var(--psc-navy-700);
  font-family: "Montserrat", Arial, sans-serif;
  font-size: 1.1rem;
}

.filter-placeholder {
  background: #ffffff;
  border: 1px solid var(--psc-blue-100);
  box-shadow: 0 1px 4px rgba(19, 43, 58, 0.05);
  min-height: 6rem;
}

.filter-placeholder strong {
  color: var(--psc-navy-700);
  font-family: "Montserrat", Arial, sans-serif;
}

.citation-placeholder {
  background: #ffffff;
  border-top: 2px solid var(--psc-gray-200);
  border-radius: 0;
  color: var(--psc-gray-700);
  font-size: 0.875rem;
}

.placeholder-tall {
  min-height: 28rem;
}

.placeholder-wide {
  width: 100%;
}

/* Reserved data-visualization tokens: use these values in shared R chart helpers. */
.chart-palette-sequential {
  --chart-1: #132b3a;
  --chart-2: #2e6a8f;
  --chart-3: #3e8fc1;
  --chart-4: #8caed0;
  --chart-5: #dbe5f0;
}

.chart-palette-categorical {
  --chart-1: #1f4860;
  --chart-2: #d85a3c;
  --chart-3: #93c13e;
  --chart-4: #dfb134;
  --chart-5: #a4a5a8;
}

.chart-palette-comparison {
  --chart-1: #132b3a;
  --chart-2: #6794c1;
  --chart-3: #b7cce1;
  --chart-4: #d4e6b2;
  --chart-5: #93c13e;
  --chart-6: #3b4d19;
}

:focus-visible {
  outline: 3px solid var(--psc-gold-400);
  outline-offset: 3px;
}

@media (max-width: 991.98px) {
  .navbar .nav-link {
    margin: 0;
  }
}

@media (max-width: 767.98px) {
  body {
    font-size: 0.975rem;
  }

  .site-masthead__inner {
    gap: 0.75rem;
    min-height: 4.75rem;
    padding: 0.7rem 1rem;
  }

  .site-masthead__logo {
    width: clamp(7.5rem, 34vw, 10rem);
  }

  .site-masthead__title {
    font-size: clamp(0.95rem, 4vw, 1.2rem);
  }

  .hero-banner {
    padding: 1.5rem;
  }

  .chart-placeholder,
  .map-placeholder,
  .table-placeholder,
  .placeholder-tall {
    min-height: 16rem;
  }
}
.dashboard-page-header {
  background: #ffffff;
  border-bottom: 1px solid var(--psc-blue-100);
  margin-bottom: 2rem;
  padding: 0.25rem 0 1.5rem;
}

.page-eyebrow {
  color: var(--psc-blue-600);
  font-family: "Open Sans", Arial, sans-serif;
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  margin-bottom: 0.65rem;
  text-transform: uppercase;
}

.dashboard-page-header > p {
  color: var(--psc-charcoal);
  font-size: 1.125rem;
  line-height: 1.6;
  margin-bottom: 1rem;
  max-width: 56rem;
}

.page-header-meta {
  color: var(--psc-gray-700);
  font-size: 0.875rem;
  line-height: 1.6;
}

.filter-panel {
  align-items: center;
  border-left: 0.35rem solid var(--psc-blue-600);
  display: grid;
  gap: 0.75rem;
  grid-template-columns: minmax(0, 1fr);
}

.visual-frame {
  background: #ffffff;
  border: 1px solid var(--psc-blue-100);
  border-radius: 0.625rem;
  box-shadow: 0 1px 4px rgba(19, 43, 58, 0.05);
  margin-bottom: 1.5rem;
  overflow: hidden;
}

/* Page-owned visualization text, independent of widget/SVG scaling. */
:is(h1, h2, h3, h4, h5, h6).viz-title,
.visual-frame__header > :is(h2, h3, h4, h5, h6) {
  color: var(--psc-navy-700);
  font-family: "Montserrat", Arial, sans-serif;
  /* Heading level supplies size, weight, and line height from theme.scss. */
  border-bottom: none;
  padding-bottom: 0;
  margin: 0 0 0.25rem;
}

/* Figure titles stay visually subordinate to section headings. */
.visual-frame__header :is(h2, h3, h4, h5, h6).viz-title,
.visual-frame__header > :is(h2, h3, h4, h5, h6) {
  font-size: clamp(1.125rem, 1rem + 0.35vw, 1.375rem);
  font-weight: 600;
  line-height: 1.35;
  text-align: center;
}

.viz-subtitle,
.visual-frame__header > p,
.viz-source-note,
.visual-frame__footer {
  color: var(--psc-gray-700);
  font-family: "Open Sans", Arial, sans-serif;
  font-size: 1rem;
  font-style: normal;
  font-weight: 400;
  line-height: 1.5;
}

/* Center subtitles alongside their visualization titles. */
.viz-subtitle,
main.content .viz-subtitle p,
main.content p.viz-subtitle,
main.content .visual-frame__header > p {
  text-align: center;
}

/* Quiet, full-width source notes, visually separate from the white plot area. */
.viz-source-note,
.visual-frame__footer {
  color: #6b6b6b;
  font-size: 0.9rem;
  font-weight: 400;
  line-height: 1.5;
}

.viz-title,
.viz-subtitle,
.viz-source-note,
.visual-frame__header,
.visual-frame__footer {
  box-sizing: border-box;
  max-width: none;
  min-width: 0;
  overflow-wrap: break-word;
  white-space: normal;
  width: 100%;
}

.viz-subtitle,
.viz-source-note {
  margin: 0;
}

.viz-subtitle > p,
.viz-source-note > p,
.visual-frame__header > p,
.visual-frame__footer > p {
  margin: 0 0 0.5rem;
}

.viz-subtitle > :last-child,
.viz-source-note > :last-child,
.visual-frame__header > :last-child,
.visual-frame__footer > :last-child {
  margin-bottom: 0;
}

.visual-frame__header {
  border-bottom: 1px solid var(--psc-blue-100);
  padding: 1.25rem 1.25rem 0.75rem;
}



.visual-frame__toolbar {
  background: #f7fafc;
  border-bottom: 1px solid var(--psc-blue-100);
  min-height: 3.5rem;
  padding: 0.75rem 1.25rem;
}

.visual-frame__content {
  min-height: 20rem;
  padding: 1.25rem;
}

.visual-frame__status {
  background: var(--psc-blue-100);
  color: var(--psc-navy-700);
  margin: 1.25rem;
  padding: 1rem;
}

.visual-frame__footer {
  background: var(--psc-page);
  border-top: 0;
  padding: 0.65rem 1.25rem 0.75rem;
}

.visual-frame__footer > p,
.viz-source-note > p {
  margin: 0;
}

.source-note {
  background: #ffffff;
  border-top: 2px solid var(--psc-gray-200);
  display: grid;
  gap: 0.75rem 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  margin-top: 1rem;
  padding: 1.25rem 0 0;
}

.source-note__item {
  color: var(--psc-gray-700);
  font-size: 0.875rem;
  line-height: 1.55;
}

@media (min-width: 768px) {
  .filter-panel {
    grid-template-columns: minmax(12rem, 0.5fr) minmax(0, 1fr);
  }
}

/* Pair the full landscape introduction with a portrait shelf photo. */
.hero-landscape-layout {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: minmax(0, 1fr);
}

.hero-landscape-content {
  min-width: 0;
}

.hero-landscape-content > p:last-child {
  margin-bottom: 0;
}

.hero-landscape-photo {
  aspect-ratio: 3 / 4;
  border-radius: 0.625rem;
  overflow: hidden;
  position: relative;
}

.hero-landscape-photo img {
  height: 100%;
  object-fit: cover;
  position: absolute;
  width: 100%;
}

@media (min-width: 992px) {
  .hero-landscape-layout {
    grid-template-columns: minmax(0, 1fr) minmax(0, 320px);
    gap: 2rem;
  }

  .hero-landscape-photo {
    aspect-ratio: auto;
    min-height: 0;
  }
}

.national-context-layout {
  margin-bottom: 1.5rem;
  margin-top: 2.75rem;
}

.national-context-layout h2 {
  margin-top: 0;
}

.national-context-layout .content-placeholder {
  margin-bottom: 0;
}

/* Hide permalink icons on third-level headings without hiding footnotes. */
h3 .anchorjs-link {
  display: none;
}

/* Policy resources retain the document's cover row and full-width tracker. */
.policy-resources {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 2rem 0;
}
.policy-resource { min-width: 0; }
.policy-resource__cover {
  display: block;
  max-width: 22rem;
  margin: 0 auto;
}
.policy-resource__cover img {
  aspect-ratio: 4 / 5.25;
  background: #ffffff;
  display: block;
  object-fit: contain;
  width: 100%;
}
.policy-resource h3 {
  margin: 1rem 0 0;
}
.policy-resource h3,
.policy-tracker h3 { text-align: center; }
.policy-resource h3 a,
.policy-tracker h3 a {
  color: var(--psc-navy-700);
  text-decoration: none;
}
.policy-resource h3 a:hover,
.policy-resource h3 a:focus-visible,
.policy-tracker h3 a:hover,
.policy-tracker h3 a:focus-visible { color: var(--psc-blue-600); }
.policy-resource h3 .bi,
.policy-tracker h3 .bi {
  display: inline-block;
  font-size: 0.75em;
  margin-left: 0.2em;
}
.policy-tracker__preview { display: block; margin: 1rem 0; }
.policy-tracker__preview img {
  border: 1px solid var(--psc-gray-200);
  display: block;
  height: auto;
  width: 100%;
}
@media (max-width: 767.98px) {
  .policy-resources { grid-template-columns: minmax(0, 1fr); gap: 2rem; }
}

/* Resource lists use the same external-link icon as the policy titles. */
.policy-resource-links a,
.policy-resource-links a:visited,
.policy-resource-links a:hover,
.policy-resource-links a:focus-visible {
  color: var(--psc-charcoal);
  text-decoration: none;
}
.policy-resource-links a:hover,
.policy-resource-links a:focus-visible {
  text-decoration: underline;
  text-underline-offset: 0.15em;
}
.policy-resource-links a:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}
.policy-resource-links .bi {
  display: inline-block;
  font-size: 0.75em;
  margin-left: 0.2em;
}

/* County selection shared by the county analytics. */
.county-selector {
  background: #fff;
  border-radius: 0.625rem;
  margin-bottom: 2rem;
  padding: 1.25rem 1.5rem;
}
.county-selector label { color: var(--psc-navy-700); font-weight: 700; }
.county-selector select { max-width: 30rem; min-height: 2.75rem; }
.county-selector select:focus-visible {
  outline: 3px solid var(--psc-navy-700);
  outline-offset: 2px;
}
.county-selector p { color: var(--psc-gray-700); grid-column: 1 / -1; margin: 0; }



/* Live county counts share the site's existing statistic-card palette. */
.county-count-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin: 1rem 0;
}
.county-count-card {
  background: var(--psc-navy-700);
  color: #fff;
  border-radius: 0.625rem;
  padding: 1.25rem;
}
.county-count-card h3 { color: #fff; font-size: 1rem; margin: 0 0 0.75rem; }
.county-count-card p { margin: 0; }
.county-count-card .county-count-value { font-size: 2.25rem; font-weight: 700; }
.county-count-notes { font-size: 0.9rem; line-height: 1.5; }
@media (max-width: 767.98px) {
  .county-count-grid { grid-template-columns: minmax(0, 1fr); }
}


/* Keep the home-page donut figure responsive without enlarging it indefinitely. */
.brfss-donuts {
  width: 100%;
  max-width: 900px;
  margin: 1rem auto 1.5rem;
}

.brfss-donuts img {
  width: 100%;
  height: auto;
}
/* Preserve the sidebar control map's landscape proportions without cropping. */
.national-context-map img {
  display: block;
  width: 100%;
  height: auto;
}

/* County enforcement records: native semantic table and keyboard-sortable headers. */
.violation-table-controls { margin: 1rem 0; max-width: 36rem; }
.violation-table-controls label { display: block; font-weight: 700; margin-bottom: 0.5rem; }
.violation-table-help { color: var(--psc-gray-700); font-size: 0.875rem; }
.violation-table-scroll { overflow-x: auto; margin-bottom: 1rem; }
.violation-table-scroll table { min-width: 64rem; font-size: 0.875rem; }
.violation-table-scroll caption { caption-side: top; color: var(--psc-navy-700); font-weight: 700; }
.violation-table-scroll th { background: var(--psc-navy-700); color: #fff; vertical-align: top; }
.violation-table-scroll th button {
  background: transparent; border: 0; color: inherit; font: inherit;
  font-weight: 700; padding: 0.3rem; text-align: left;
}
.violation-table-scroll th button:hover { text-decoration: underline; }
.violation-table-scroll th[aria-sort="ascending"] button::after { content: " ↑"; }
.violation-table-scroll th[aria-sort="descending"] button::after { content: " ↓"; }
.violation-table-scroll td { vertical-align: top; }



/* Keep the national-context text and map side by side without card styling. */
.national-context-columns {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.5rem;
  align-items: start;
}
.national-context-text { min-width: 0; }
.national-context-text > p:last-child,
.national-context-map > p:last-child { margin-bottom: 0; }
@media (min-width: 992px) {
  .national-context-columns {
    grid-template-columns: minmax(0, 3fr) minmax(0, 6fr);
    gap: 2rem;
  }
}


.nav-footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.5rem 1.5rem;
  align-items: end;
}

.nav-footer .nav-footer-left {
  grid-column: 1;
  grid-row: 1;
  text-align: left;
}

.nav-footer .nav-footer-center {
  grid-column: 1;
  grid-row: 2;
  max-width: none;
  text-align: left;
}

.nav-footer .nav-footer-right {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: end;
  min-width: 0;
}

.footer-psc-logo-link {
  display: inline-block;
  line-height: 0;
}

.footer-psc-logo {
  display: block;
  width: 64px;
  height: 64px;
  object-fit: contain;
}

.footer-funding {
  color: var(--psc-gray-700);
  font-style: italic;
  margin: 0;
  text-align: left;
}

/* Page-owned donut labels and responsive visualization text. */
.visual-frame { min-width: 0; }
.visual-frame__content > :last-child { margin-bottom: 0; }
.brfss-donut-grid .viz-title { text-align: center; }
.viz-metric-count {
  color: var(--psc-navy-700);
  font-family: "Montserrat", Arial, sans-serif;
  font-size: 1rem;
  font-weight: 700;
  text-align: center;
}
.viz-metric-count p { margin: 0; }
.county-count-card .viz-title { color: #fff; font-size: 1.25rem; }
.county-count-card .viz-subtitle { color: #fff; }
.visual-frame__footer:not(:has(p)), .viz-subtitle:not(:has(p)) { display: none; }

.violation-table-help.viz-source-note { color: #6b6b6b; font-size: 0.9rem; line-height: 1.5; }

/* Stack the brand text on narrow screens instead of squeezing it beside the logo. */
@media (max-width: 575.98px) {
  .site-masthead__inner {
    flex-wrap: wrap;
    gap: 0.65rem;
  }
  .site-masthead__divider { display: none; }
  .site-masthead__title { flex-basis: 100%; }
  .site-masthead__logo { max-width: 100%; }
  .site-masthead__logo-link { max-width: 100%; }
}

/* County widgets load only when selected. */
.county-crash-chart { width: 100%; height: auto; aspect-ratio: 8 / 5.5; min-height: 320px; border: 0; display: block; }
.county-crash-chart[hidden] { display: none; }

/* Expandable BRFSS demographics below the home-page donuts. */
.brfss-demographics { padding: 1rem 1.25rem; }
.brfss-demographics > summary {
  cursor: pointer;
  font-family: 'Montserrat', Arial, sans-serif;
  font-weight: 700;
  color: #1f4860;
}
.brfss-demographics[open] > summary { margin-bottom: 1rem; }
.brfss-demographics > .cell { min-width: 0; }

.county-sales-chart { width: 100%; height: auto; aspect-ratio: 8 / 5.5; min-height: 0; border: 0; display: block; }
.county-sales-chart[hidden] { display: none; }

/* County report: compact indicators beside the location map. */
.county-snapshot-title {
  color: var(--psc-blue-600);
  text-align: center;
  margin: 1.5rem 0;
}
.county-snapshot-layout {
  display: grid;
  grid-template-columns: minmax(13rem, 1fr) minmax(0, 3fr);
  gap: 1.5rem;
  align-items: start;
  margin-bottom: 2rem;
  margin-top: 0.5rem;
}
.county-snapshot-layout > * { min-width: 0; }
.county-snapshot-indicators .county-count-grid {
  grid-template-columns: minmax(0, 1fr);
  gap: 0.75rem;
  margin-top: 0;
}
.county-snapshot-indicators .county-count-card { padding: 0.85rem 1rem; }
.county-snapshot-indicators .county-count-card .viz-title {
  font-size: 1rem;
  margin-bottom: 0.25rem;
}
.county-snapshot-indicators .county-count-value { font-size: 1.85rem; }
.county-snapshot-indicators .viz-subtitle { font-size: 0.85rem; }
.county-snapshot-map { margin: 0; }
.county-snapshot-map .placeholder-tall { min-height: 24rem; }
@media (max-width: 767.98px) {
  .county-snapshot-layout { grid-template-columns: minmax(0, 1fr); }
}

/* Draft content requiring editorial or source review; labels supplement color. */
.draft-review-key {
  border-left: 4px solid #b42318;
  background: #fff4f2;
  padding: 0.75rem 1rem;
  margin-bottom: 1.5rem;
  color: #8f1912;
}
.needs-review {
  border-left: 4px solid #b42318;
  background: #fff8f7;
  color: #a11912;
  padding: 1rem 1.25rem;
  margin: 1.25rem 0;
  overflow-wrap: anywhere;
}
.needs-review :is(p, li, strong, em, h2, h3, h4, a, figcaption) { color: #a11912; }
.needs-review a { text-decoration: underline; }
.needs-review img { outline: 3px solid #b42318; outline-offset: 3px; max-width: 100%; height: auto; }
.needs-review > :last-child, .draft-review-key > :last-child { margin-bottom: 0; }

.retailer-intro-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 320px);
  gap: 1.5rem;
  align-items: stretch;
  margin-bottom: 1.5rem;
}
.retailer-intro-text { min-width: 0; }
.retailer-intro-text > :last-child { margin-bottom: 0; }
/* Match the Word crop: left 49.520%, right 2.724%, with slight top padding. */
.retailer-intro-photo {
  position: relative;
  min-height: 0;
  overflow: hidden;
  border-radius: 6px;
  background: #fff;
}
.retailer-intro-photo .draft-retailer-photo {
  position: absolute;
  display: block;
  width: 209.397772%;
  max-width: none;
  height: 99.082496%;
  left: -103.693777%;
  top: 0.916513%;
  margin: 0;
  object-fit: cover;
}
@media (max-width: 767.98px) {
  .retailer-intro-layout { grid-template-columns: minmax(0, 1fr); }
  .retailer-intro-photo { width: min(100%, 320px); aspect-ratio: 3 / 4; margin-inline: auto; }
}

/* Community density table: contain controls and overflow within its visual frame. */
.aod-places { min-width: 0; }
.aod-places .aod-controls { display: flex; flex-wrap: wrap; gap: 1rem; margin-bottom: 1rem; }
.aod-places .aod-controls > div { flex: 1 1 16rem; min-width: 0; }
.aod-places .aod-controls label { display: block; font-weight: 700; margin-bottom: 0.25rem; }
.aod-places .aod-controls select { width: 100%; }
.aod-places .aod-table-scroll { max-width: 100%; overflow-x: auto; }
.aod-places .aod-table[hidden] { display: none !important; }
.aod-places .gt_table { min-width: 40rem; }
.aod-places .aod-table-scroll:focus-visible { outline: 2px solid var(--psc-navy-700); outline-offset: 2px; }


/* Stadium illustration beside the density explanation. */
.retailer-density-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 1.5rem;
  align-items: center;
  margin-bottom: 1.5rem;
}
.retailer-density-text, .retailer-density-photo { min-width: 0; }
.retailer-density-text > :last-child { margin-bottom: 0; }
.retailer-density-photo img { display: block; width: 100%; height: auto; }
@media (max-width: 767.98px) {
  .retailer-density-layout { grid-template-columns: minmax(0, 1fr); }
}

/* County sales rankings: native controls and a focusable horizontal scroll region. */
.sales-top10 { min-width: 0; }
.sales-top10 .sales-top10-controls { display: flex; flex-wrap: wrap; gap: 1rem; margin-bottom: 1rem; }
.sales-top10 .sales-top10-controls > div { flex: 1 1 16rem; min-width: 0; }
.sales-top10 label { display: block; font-weight: 700; margin-bottom: 0.25rem; }
.sales-top10 select { width: 100%; }
.sales-top10 .sales-top10-scroll { max-width: 100%; overflow-x: auto; }
.sales-top10 .reactable { min-width: 960px; }
.sales-top10 .rt-table { overflow: visible; }
.sales-top10 .sales-top10-scroll:focus-visible { outline: 2px solid var(--psc-navy-700); outline-offset: 2px; }

/* Experimental map layouts, scoped to the separate comparison page. */
.retailers-layout-comparison .layout-comparison-toolbar {
  position: sticky;
  top: 0.5rem;
  z-index: 1100;
  padding: 0.85rem 1rem;
  margin-bottom: 1.5rem;
  background: #fff;
  border: 1px solid #ccd8e0;
  border-radius: 6px;
  box-shadow: 0 2px 6px rgb(0 0 0 / 8%);
}
.retailers-layout-comparison fieldset { margin: 0; padding: 0; border: 0; }
.retailers-layout-comparison legend { float: none; width: auto; margin-bottom: 0.5rem; font-size: 1rem; font-weight: 700; }
.retailers-layout-comparison .layout-comparison-options { display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; }
.retailers-layout-comparison .layout-comparison-options label { display: flex; align-items: center; gap: 0.4rem; cursor: pointer; }
.retailers-layout-comparison .layout-comparison-options input { accent-color: #1f4860; }
.retailers-layout-comparison [data-layout-status] { margin: 0.5rem 0; font-size: 0.875rem; }
.retailers-layout-comparison .layout-comparison-links { margin: 0; font-size: 0.875rem; }
.retailers-layout-comparison .layout-comparison-section { scroll-margin-top: 10rem; margin-bottom: 2rem; }
.retailers-layout-comparison .layout-comparison-copy,
.retailers-layout-comparison .layout-comparison-map,
.retailers-layout-comparison .layout-comparison-table { min-width: 0; }
.retailers-layout-comparison[data-layout="text"] .layout-comparison-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(16rem, 1fr);
  gap: 1.5rem;
  align-items: start;
  margin-bottom: 1.5rem;
}
.retailers-layout-comparison[data-layout="table"] .layout-comparison-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 1.5rem;
  align-items: start;
}
.retailers-layout-comparison[data-layout="table"] .layout-comparison-table .aod-table-scroll,
.retailers-layout-comparison[data-layout="table"] .layout-comparison-table .violation-table-scroll {
  max-height: 40rem;
  overflow: auto;
}
@media (max-width: 991.98px) {
  .retailers-layout-comparison .layout-comparison-toolbar { position: static; }
  .retailers-layout-comparison[data-layout="text"] .layout-comparison-grid,
  .retailers-layout-comparison[data-layout="table"] .layout-comparison-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .retailers-layout-comparison .layout-comparison-section { scroll-margin-top: 1rem; }
}

/* Justify paragraph copy throughout the website, including source notes. */
main.content p, .nav-footer p { text-align: justify; }
/* Numeric display values retain their existing alignment. */
main.content .viz-metric-count p { text-align: center; }

/* Adjacent retailer case filters with aligned labels and input fields. */
.retailer-case-filters {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 1rem 1.5rem;
  margin: 1rem 0;
  align-items: start;
}
.retailer-case-filters .county-selector,
.retailer-case-filters .violation-table-controls {
  min-width: 0;
  max-width: none;
  margin: 0;
  padding: 0;
}
.retailer-case-filters label {
  display: block;
  color: var(--psc-navy-700);
  font-weight: 700;
  margin-bottom: 0.5rem;
}
.retailer-case-filters select,
.retailer-case-filters input {
  width: 100%;
  max-width: none;
  min-height: 2.75rem;
}
.retailer-case-filters .county-selector p { margin-top: 0.5rem; }
@media (max-width: 767.98px) {
  .retailer-case-filters { grid-template-columns: minmax(0, 1fr); }
}

/* Shared bottom navigation and readable reference text. */
.explore-navigation { clear: both; margin-top: 2.75rem; }
main.content .explore-card p { text-align: left; }
.policy-resource-links a { font-weight: 400; }
main.content .footnotes p,
.tippy-content .footnote p { text-align: left; }

/* County violations use the same card frame as community rankings. */
.violations-table-card .visual-frame__content { min-height: 0; }
.violations-table-card .visual-frame__footer:has([data-violation-notes][hidden]) { display: none; }

/* BRFSS definitions are attached to the HTML headings above the charts. */
.brfss-definition { position: relative; display: inline-block; }
.brfss-definition-trigger {
  border: 0; padding: 0.2rem 0; background: transparent; color: inherit;
  font: inherit; cursor: help; text-align: inherit;
}
.brfss-definition-trigger:focus-visible {
  outline: 2px solid #1f4e6b; outline-offset: 3px; border-radius: 3px;
}
.brfss-definition-tooltip {
  position: absolute; z-index: 20; top: 100%; left: 50%;
  transform: translateX(-50%); width: 17rem; max-width: 75vw;
  padding: 0.75rem; border: 1px solid #dde6ec; border-radius: 6px;
  background: #fff; color: #333; box-shadow: 0 2px 8px rgb(0 0 0 / 15%);
  font: 400 0.95rem/1.5 'Open Sans', Arial, sans-serif; text-align: left;
  visibility: hidden;
}
.brfss-definition:hover .brfss-definition-tooltip,
.brfss-definition:focus-within .brfss-definition-tooltip { visibility: visible; }


.brfss-info-icon {
  display: inline-block;
  width: 16px;
  height: 16px;
  margin-left: -0.2em; /* Tighten the inline space before the raised icon. */
  position: relative;
  top: -0.45em;
  vertical-align: baseline;
}

/* Shared native button below Leaflet's zoom controls. */
.psc-map-home-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 2px;
  background: #fff;
  color: #1f4e6b;
  font: 600 14px/1.4 'Open Sans', Arial, sans-serif;
  cursor: pointer;
}
.psc-map-home-button:hover { background: #f4f4f4; }
.psc-map-home-button:focus-visible { outline: 2px solid #1f4e6b; outline-offset: 2px; }

.psc-map-home-icon { display: block; pointer-events: none; }

