/*---------------------------------------------------------------------
    File Name: site.css
    Layout for the public VIP-iPAT pages (loaded after Bootstrap 5).
    css/style.css is left untouched for any older page that still uses it.
---------------------------------------------------------------------*/

:root {
    --vip-blue: #4287f5;          /* brand blue: bands, buttons, footer */
    --vip-blue-dark: #2f6fd6;     /* hover / pressed */
    --vip-blue-soft: rgba(66, 135, 245, .12);
    --vip-link: #0a66d6;          /* text links (the old #007bff, a touch deeper for contrast) */
    --vip-ink: #2d2d2d;
    --vip-ink-strong: #101010;
    --vip-muted: #5b6270;
    --vip-chip: #dcdcdc;          /* the grey module buttons */
    --vip-chip-hover: #cfcfcf;
    --vip-line: #d5dbe5;
    --vip-surface: rgba(255, 255, 255, .88);   /* fallback when backdrop-filter is unsupported */
    --glass-hi: .62;                            /* glass panel tint, top-left → bottom-right */
    --glass-lo: .38;
    --vip-radius: 0;   /* content boxes are square; navigation, keyword chips and the home CTAs stay rounded */
    --vip-shadow: 0 10px 30px rgba(24, 52, 99, .10), 0 1px 3px rgba(24, 52, 99, .08);

    --vip-font-sans: 'Merriweather', Georgia, Cambria, 'Times New Roman', serif;
    --vip-font-serif: 'Merriweather', Georgia, Cambria, 'Times New Roman', serif;
    /* Whole site is set in Merriweather. Regular (400), Bold (700) and Italic are loaded:
       weights up to 500 render regular, 600+ (headings, labels, buttons) render bold. */
    --bs-body-font-family: var(--vip-font-serif);
    --bs-body-color: var(--vip-ink);
    --bs-link-color-rgb: 10, 102, 214;
    --bs-link-hover-color-rgb: 47, 111, 214;
    --bs-primary: var(--vip-blue);
}

/*-- base --*/

html { scroll-behavior: smooth; }

body {
    font-family: var(--bs-body-font-family);
    font-size: 17px;
    line-height: 1.7;
    font-optical-sizing: auto;
    font-kerning: normal;
    text-rendering: optimizeLegibility;
    color: var(--vip-ink);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background-color: #eef2f8;
    background-image: url(../images/bg_image_50_opacity.png);
    background-attachment: fixed;
    background-repeat: no-repeat;
    background-size: cover;
    background-position: 0 0;
}

main { flex: 1 0 auto; }

h1, h2, h3, h4 {
    font-family: var(--vip-font-serif);
    color: var(--vip-ink-strong);
    font-weight: 600;
    line-height: 1.22;
    letter-spacing: -.005em;
    font-optical-sizing: auto;
}

/* Interface text stays sans */
.site-header, .site-footer, .skip-link,
.breadcrumb, .eyebrow, .card-cta, .study-tags, .read-more-toggle,
.btn-vip, .btn-vip-outline, .data-toolbar, .module-picker, .dict-tabs,
.table-frame, #main-container table, .warning-message,
.dropdown-menu, .sort-popup, .svg-tooltip, .axis text,
button, input, select, textarea { font-family: var(--vip-font-sans); }
.table-frame, #main-container table { font-variant-numeric: lining-nums tabular-nums; }
.site-brand__name { font-family: var(--vip-font-serif); }   /* masthead name matches the headings */

a { color: var(--vip-link); text-decoration: none; transition: color .2s ease, background-color .2s ease, border-color .2s ease, box-shadow .2s ease; }
a:hover { color: var(--vip-blue-dark); }

:focus-visible { outline: 3px solid rgba(66, 135, 245, .55); outline-offset: 2px; }

.skip-link {
    position: absolute; left: 12px; top: -48px; z-index: 2000;
    background: #fff; color: var(--vip-ink-strong); padding: 8px 14px; border-radius: 8px;
    box-shadow: var(--vip-shadow);
}
.skip-link:focus { top: 12px; }

.ext-icon { margin-left: .35em; vertical-align: -1px; opacity: .6; flex: none; }

/*-- header --*/

.site-header {
    position: sticky;
    top: 0;
    z-index: 1030;
    border-top: 6px solid rgba(66, 135, 245, .5);
    background: rgba(255, 255, 255, .6);
    -webkit-backdrop-filter: blur(18px) saturate(160%);
    backdrop-filter: blur(18px) saturate(160%);
    box-shadow: 0 6px 20px rgba(31, 56, 104, .08);
}

.site-navbar { padding: 10px 0; }

.site-brand { display: flex; align-items: center; gap: 14px; margin-right: 24px; }

.site-brand__niddk {
    display: inline-flex; align-items: center;
    background: var(--vip-blue);
    padding: 7px 10px;
    border-radius: 8px;
    line-height: 0;
}
.site-brand__niddk:hover { background: var(--vip-blue-dark); }
.site-brand__niddk img { width: 92px; height: auto; }

.site-brand__name {
    font-size: 20px;
    font-weight: 400;
    letter-spacing: .01em;
    color: var(--vip-link);
    white-space: nowrap;
}

.site-navbar .nav-link {
    display: inline-flex; align-items: center; gap: 6px;
    color: var(--vip-link);
    text-transform: uppercase;
    font-size: 15px;
    font-weight: 500;
    letter-spacing: .03em;
    padding: 8px 14px !important;
    border-radius: 8px;
}
.site-navbar .nav-link:hover,
.site-navbar .nav-link:focus-visible,
.site-navbar .nav-link.show { color: var(--vip-blue-dark); background: var(--vip-blue-soft); }
.site-navbar .nav-link.active { color: var(--vip-blue-dark); box-shadow: inset 0 -2px 0 var(--vip-blue); border-radius: 8px 8px 0 0; }

.home-icon { flex: none; }
.site-navbar .nav-link .home-icon + span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.site-dropdown {
    --bs-dropdown-link-active-bg: var(--vip-blue);
    --bs-dropdown-link-hover-bg: var(--vip-blue-soft);
    --bs-dropdown-link-hover-color: var(--vip-blue-dark);
    --bs-dropdown-font-size: 15px;
    border: 1px solid var(--vip-line);
    border-radius: 12px;
    box-shadow: var(--vip-shadow);
    padding: 8px;
    min-width: 17rem;
}
.site-dropdown .dropdown-item { border-radius: 8px; padding: 7px 12px; display: flex; align-items: center; white-space: normal; }
.site-dropdown .dropdown-header { text-transform: uppercase; letter-spacing: .06em; font-size: 12px; font-weight: 600; color: var(--vip-muted); padding: 6px 12px 4px; }
.site-dropdown--team { min-width: 22rem; }

/* Resources → Harmonized data / Data dictionary second-level menus (behaviour in js/site-layout.js) */
.site-submenu-item { position: relative; }
.site-submenu-toggle { justify-content: space-between; gap: 14px; }
.site-submenu-toggle::after {           /* chevron: points right, or down on the mobile menu */
    content: "";
    flex: none;
    width: 7px;
    height: 7px;
    border-top: 1.5px solid currentColor;
    border-right: 1.5px solid currentColor;
    transform: rotate(45deg);
}
.site-submenu-toggle.is-current { color: var(--vip-blue-dark); }
.site-submenu-toggle[aria-expanded="true"] { color: var(--bs-dropdown-link-hover-color); background: var(--bs-dropdown-link-hover-bg); }
.site-submenu { display: none; margin: 0; list-style: none; background: var(--bs-dropdown-bg, #fff); }
.site-submenu.show { display: block; }
@media (min-width: 992px) {
    /* top offset lines the first item up with its row (submenu padding + border) */
    .site-submenu { position: absolute; top: -9px; left: calc(100% + 8px); z-index: 1001; }
    .site-submenu-item.opens-left > .site-submenu { left: auto; right: calc(100% + 8px); }
}

.site-search { position: relative; margin-left: 16px; }
.site-search__icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--vip-muted); pointer-events: none; }
.site-search input {
    width: 250px;
    height: 40px;
    padding: 0 14px 0 38px;
    border: 1px solid var(--vip-line);
    border-radius: 999px;
    background: #fff;
    font-size: 14px;
    color: var(--vip-ink);
}
.site-search input:focus { outline: none; border-color: var(--vip-blue); box-shadow: 0 0 0 3px rgba(66, 135, 245, .25); }

.site-navbar__toggler { border-color: var(--vip-line); border-radius: 10px; padding: 6px 10px; }
.site-navbar__toggler:focus { box-shadow: 0 0 0 3px rgba(66, 135, 245, .3); }

@media (max-width: 991.98px) {
    .site-navbar .navbar-collapse { padding: 10px 0 6px; }
    .site-navbar .nav-link { width: 100%; }
    .site-navbar .nav-link .home-icon + span { position: static; width: auto; height: auto; clip: auto; }
    .site-dropdown { box-shadow: none; border: 0; background: rgba(255, 255, 255, .7); min-width: 0; }
    .site-submenu { background: none; padding: 0 0 4px 14px; }   /* expands inline, indented under its row */
    .site-submenu-toggle::after { transform: rotate(135deg); }
    .site-submenu-toggle[aria-expanded="true"]::after { transform: rotate(-45deg); }
    .site-search { margin: 10px 0 4px; }
    .site-search input { width: 100%; }
}

@media (max-width: 420px) {
    .site-brand { gap: 10px; margin-right: 8px; }
    .site-brand__name { font-size: 18px; }
}

/*-- page scaffolding --*/

.page { padding: 36px 0 64px; }

/* Major text boxes: frosted glass over the page background */
.panel {
    position: relative;
    background: linear-gradient(135deg, rgba(255, 255, 255, var(--glass-hi)) 0%, rgba(255, 255, 255, var(--glass-lo)) 100%);
    -webkit-backdrop-filter: blur(18px) saturate(160%);
    backdrop-filter: blur(18px) saturate(160%);
    border: 0;
    border-radius: 0;
    box-shadow:
        0 12px 40px rgba(31, 56, 104, .14),
        0 2px 6px rgba(31, 56, 104, .06);
    --panel-pad: clamp(20px, 3.5vw, 40px);
    padding: var(--panel-pad);
}
/* browsers without backdrop-filter get a solid-enough surface to stay readable */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .panel { background: var(--vip-surface); }
}
.panel + .panel, .panel + .section, .section + .panel, .section + .section { margin-top: 28px; }
.row + .section { margin-top: 44px; }

/* Maps float directly over the background (their PNG/GIF backgrounds are transparent) */
.floating-map { margin: 0; text-align: center; }
.floating-map img {
    display: block;
    width: 100%;
    height: auto;
    margin: 0 auto;
    filter: drop-shadow(0 26px 22px rgba(24, 52, 99, .28)) drop-shadow(0 6px 6px rgba(24, 52, 99, .14));
    animation: map-float 7s ease-in-out infinite;
    will-change: transform;
}
.floating-map--alt img { animation-delay: -3.5s; }
@keyframes map-float {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-10px); }
}

.breadcrumb { --bs-breadcrumb-divider-color: var(--vip-muted); --bs-breadcrumb-item-active-color: var(--vip-muted); font-size: 14px; margin-bottom: 14px; }
.breadcrumb a { color: var(--vip-link); }

.eyebrow {
    display: inline-block;
    font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
    color: var(--vip-blue-dark);
    background: var(--vip-blue-soft);
    padding: 4px 10px; border-radius: 999px;
    margin-bottom: 12px;
}

.page-title { font-size: clamp(28px, 3.6vw, 42px); margin-bottom: 12px; }
.page-lede { font-size: 18px; color: var(--vip-ink); margin: 0; }

.section-title { font-size: clamp(22px, 2.6vw, 30px); margin-bottom: 18px; }

/*-- buttons --*/

.btn-vip, .btn-vip-outline {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 46px;
    padding: 10px 22px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: .04em;
    border: 2px solid var(--vip-blue);
    text-align: center;
}
.btn-vip { background: var(--vip-blue); color: #fff; }
.btn-vip:hover { background: var(--vip-blue-dark); border-color: var(--vip-blue-dark); color: #fff; }
.btn-vip-outline { background: #fff; color: var(--vip-blue-dark); }
.btn-vip-outline:hover { background: var(--vip-blue-soft); color: var(--vip-blue-dark); }
.btn-vip-dark { background: #363636; border-color: #363636; }
.btn-vip-dark:hover { background: var(--vip-blue); border-color: var(--vip-blue); }

.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/*-- home --*/

.panel + .row { margin-top: calc(28px - var(--bs-gutter-y)); }

/* Home: one intro box — title across the top, text left, map right */
.hero .hero__title { margin: 0 0 clamp(18px, 2.4vw, 30px); max-width: none; text-wrap: wrap; }
.hero-map { padding-block: 8px; }
.hero + .section { margin-top: 56px; }

.hero__title { font-size: clamp(26px, 3vw, 40px); font-weight: 700; margin-bottom: 18px; text-wrap: balance; }
.hero__title a { color: var(--vip-ink-strong); }
.hero__title a:hover { color: var(--vip-blue-dark); }
.hero__title .ext-icon { width: 18px; height: 18px; }
.hero__text { font-size: 18px; line-height: 1.75; margin-bottom: 26px; }

.figure-frame { margin: 0; text-align: center; }
.figure-frame img { max-width: 100%; height: auto; filter: drop-shadow(4px 6px 5px rgba(13, 3, 3, .25)); }

.read-more-toggle { padding: 0; border: 0; background: none; color: var(--vip-link); font-weight: 600; }
.read-more-toggle:hover { color: var(--vip-blue-dark); text-decoration: underline; }
.read-more-toggle[aria-expanded="true"] .when-collapsed,
.read-more-toggle[aria-expanded="false"] .when-expanded { display: none; }
.read-more-body { margin-top: 14px; font-size: 17px; text-align: justify; hyphens: auto; }
.read-more-body p { margin-bottom: 12px; }

.data-card {
    position: relative;
    display: flex; flex-direction: column;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 255, 255, .58) 0%, rgba(255, 255, 255, .32) 100%);
    -webkit-backdrop-filter: blur(16px) saturate(160%);
    backdrop-filter: blur(16px) saturate(160%);
    border: 0;
    box-shadow: 0 8px 28px rgba(31, 56, 104, .12);
    border-radius: var(--vip-radius);
    padding: 24px;
    transition: box-shadow .2s ease, transform .2s ease, border-color .2s ease;
}
.data-card:hover { background: linear-gradient(135deg, rgba(255, 255, 255, .72) 0%, rgba(255, 255, 255, .45) 100%); box-shadow: 0 14px 36px rgba(31, 56, 104, .18); transform: translateY(-2px); }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .data-card { background: var(--vip-surface); }
}
.data-card h3 { font-size: 20px; margin-bottom: 8px; }
.data-card h3 a { color: var(--vip-ink-strong); }
.data-card h3 a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; } /* whole card clickable */
.data-card p { color: #444b58; margin-bottom: 16px; }
.data-card .card-cta { margin-top: auto; font-weight: 600; color: var(--vip-link); text-transform: uppercase; font-size: 13px; letter-spacing: .05em; }
.data-card .study-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; padding: 0; list-style: none; }
.data-card .study-tags li { font-size: 12px; font-weight: 600; color: var(--vip-blue-dark); background: var(--vip-blue-soft); padding: 3px 10px; border-radius: 999px; }

/*-- local / national data pages --*/

/* Toolbar sits on the same centred 960px column as the module buttons below it,
   with items the width of one module button, so the two blocks read as one stack:
   [Login][Request Account][Local|National data →]  /  caption  /  module rows */
.data-toolbar {
    --tool-cols: 3;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: stretch;
    gap: 10px;
    max-width: 960px;
    margin: 24px auto 10px;
}
.data-toolbar > * { flex: 0 0 calc((100% - (var(--tool-cols) - 1) * 10px) / var(--tool-cols)); }
.data-toolbar .btn-row { display: contents; }               /* let Login / Request Account be items of the row */
.data-toolbar .btn-vip,
.data-toolbar .btn-vip-outline { flex: 0 0 calc((100% - (var(--tool-cols) - 1) * 10px) / var(--tool-cols)); min-height: 44px; }
.data-toolbar .snapshot-note {
    order: 10;                                             /* caption on its own line, right above the modules */
    flex-basis: 100%;
    text-align: center;
    color: var(--vip-muted);
    font-family: var(--vip-font-serif);                   /* figure-caption style */
    font-style: italic;
    font-size: 15px;
    margin-top: 2px;
}
.data-toolbar .dropdown { margin: 0; }
.data-toolbar .form-select {
    width: 100%;
    height: 100%;
    min-height: 44px;
    border-radius: 10px;
    border-color: var(--vip-line);
    font-size: 14px;
    text-align: center;
    text-align-last: center;
}
@media (max-width: 575.98px) {
    .data-toolbar { --tool-cols: 2; }
    .data-toolbar .dropdown,
    .data-toolbar .btn-switch { flex-basis: 100%; }          /* two buttons, then the switch full width */
    .data-toolbar .btn-vip,
    .data-toolbar .btn-vip-outline { padding: 8px 10px; font-size: 13px; letter-spacing: .02em; white-space: nowrap; }
}

/* six module buttons: centred grid, three per row (two per row on phones) */
.module-picker {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    max-width: 960px;
    margin: 0 auto 18px;
}
@media (max-width: 575.98px) {
    .module-picker { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.module-picker .harmonized_database {
    display: flex; align-items: center; justify-content: center;
    width: 100%;
    text-align: center;
    min-height: 42px;
    padding: 8px 16px;
    border-radius: 10px;
    background: var(--vip-chip);
    color: #363636;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .03em;
    cursor: pointer;
    user-select: none;
}
.module-picker .harmonized_database:hover { background: var(--vip-chip-hover); color: var(--vip-ink-strong); }
.module-picker .harmonized_database.is-active { background: var(--vip-blue); color: #fff; }

.table-frame {
    background: #fff;
    border: 1px solid var(--vip-line);
    border-radius: 12px;
    overflow: hidden;
}

#localtable,
#nationaltable {
    border-collapse: collapse;
    display: block;
    width: 100%;
    height: min(62vh, 620px);
    overflow: auto;
    font-size: 14px;
    background: #fff;
}
#localtable:empty,
#nationaltable:empty { height: auto; min-height: 120px; }

#localtable td,
#nationaltable td {
    padding: 8px 10px;
    border: 1px solid var(--vip-line);
    vertical-align: middle;
}

/* first two rows (column names + distribution charts) stay pinned */
#localtable tbody tr:nth-child(1),
#nationaltable tbody tr:nth-child(1) {
    font-weight: 600;
    position: sticky;
    top: 0;
    z-index: 3;
    background: #f3f6fb;
}
#localtable tbody tr:nth-child(2),
#nationaltable tbody tr:nth-child(2) {
    position: sticky;
    top: var(--pinned-row-height, 35px);
    z-index: 2;
    background: #fff;
    box-shadow: 0 1px 0 var(--vip-line);
}

.study-grid .data-card h3 { font-size: 22px; }

/*-- study detail pages --*/

.study-meta { color: var(--vip-muted); font-weight: 500; margin-bottom: 18px; }
.study-body { font-size: 17px; line-height: 1.85; text-align: justify; hyphens: auto; max-width: 80ch; }
.study-body--full { max-width: none; }   /* CARDIA, WHI: description spans the whole panel */
.study-actions { margin-top: 28px; }

/*-- data dictionary pages --*/

.dict-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0 0; padding: 0; list-style: none; }
.dict-tabs a {
    display: inline-block;
    padding: 7px 14px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid var(--vip-line);
    color: var(--vip-ink);
    font-size: 14px;
    font-weight: 500;
}
.dict-tabs a:hover { border-color: var(--vip-blue); color: var(--vip-blue-dark); }
.dict-tabs a[aria-current="page"] { background: var(--vip-blue); border-color: var(--vip-blue); color: #fff; }

#main-container:empty::before { content: "Loading…"; color: var(--vip-muted); }
#main-container .qrun-column { padding: 22px 0 !important; border-bottom: 1px solid var(--vip-line); }
#main-container .qrun-column:first-child { padding-top: 0 !important; }
#main-container .qrun-column:last-child { border-bottom: 0; }
#main-container .colHeader.colNames { font-size: 1.25em; font-weight: 700; color: var(--vip-ink-strong); }
#main-container .md p { font-size: 16px; color: var(--vip-ink); margin-bottom: 6px; }
#main-container table { table-layout: fixed; }
#main-container .table { --bs-table-bg: transparent; margin-bottom: 10px; font-size: 14px; }
#main-container mark { background: #fff2a8; padding: 0 2px; border-radius: 3px; }

/* generated summary tables (moved here from the page-level <style> blocks) */
table.coltable { width: auto; font-size: .9em; }
table.coltable th.coltable { padding: 0 1em 0 0; border-top: none; }
table.coltable td.coltable { padding: 0 1em 0 0; }
.pct.coltable { text-align: right; min-width: 3em; }
@media print { .qrun-column.col { page-break-inside: avoid; } }

/*-- footer --*/

.site-footer {
    flex-shrink: 0;
    background: var(--vip-blue);
    color: rgba(255, 255, 255, .92);
    padding: 40px 0 36px;
    margin-top: auto;
}
.site-footer__inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 28px 48px; }
.site-footer__brand { max-width: 340px; }
.site-footer__brand .site-brand__niddk { background: rgba(255, 255, 255, .14); }
.site-footer__brand .site-brand__niddk:hover { background: rgba(255, 255, 255, .24); }
.site-footer__brand p { margin: 14px 0 0; font-size: 14px; color: rgba(255, 255, 255, .9); }
.site-footer__links { display: flex; flex-wrap: wrap; gap: 28px 64px; }
.site-footer h2 { font-family: var(--vip-font-sans); font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: #fff; margin-bottom: 10px; font-weight: 600; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li + li { margin-top: 6px; }
.site-footer a { color: #fff; font-size: 14px; display: inline-flex; align-items: center; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.site-footer a:focus-visible { outline-color: #fff; }

/*---------------------------------------------------------------------
    Styles the data scripts rely on (copied unchanged from style.css so
    the generated tables, sort menus and charts look the same).
---------------------------------------------------------------------*/

.header { display: flex; justify-content: space-between; align-items: center; }

.sort-icon { display: flex; flex-direction: column; justify-content: center; align-items: flex-start; cursor: pointer; margin-left: 5px; }
.line { background-color: #666666; height: 2px; margin: 1px 0; }
.top-line { width: 12px; }
.middle-line { width: 9px; }
.bottom-line { width: 5px; }
.sort-popup { position: absolute; background-color: white; border: 1px solid black; display: none; z-index: 5; }
.popup-options { background-color: #DCDCDC; color: #666666; transition: none; }
.popup-options:hover { background-color: #b4b4b4; opacity: 1; }
.selected { background-color: #b4b4b4; color: #424242; }

.custom-dropdown-btn { display: inline-block; padding: 2px; font-size: 15px; border: 1px solid black; background-color: white; cursor: pointer; line-height: 1.15; text-align: left; }
#percentageDropdown .dropdown-menu { width: 80%; box-sizing: border-box; }
#percentageSlider { width: 60%; margin-left: 10%; }

.scroll { background: transparent; backdrop-filter: blur(5px); }

.svg-tooltip {
    font-family: var(--vip-font-sans);
    background: rgba(69, 77, 93, .9);
    border-radius: .1rem;
    color: #fff;
    display: block;
    font-size: 14px;
    max-width: 320px;
    padding: .2rem .4rem;
    position: absolute;
    text-overflow: ellipsis;
    white-space: pre;
    z-index: 300;
    visibility: hidden;
}
.histogram { height: 140px; width: 160px; }
.bar { fill: steelblue; }
.axis text { font-size: 10px; }
.axis path, .axis line { fill: none; stroke: black; shape-rendering: crispEdges; }

[data-link] { cursor: pointer; }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { transition: none !important; }
    .floating-map img { animation: none; }
}

/*---------------------------------------------------------------------
    Corners: square content boxes and buttons. Rounded stays only on
    navigation (header, menus, search, dictionary tabs), keyword chips
    (.eyebrow, .study-tags) and the Local/National buttons on the home page.
---------------------------------------------------------------------*/
.table-frame,
.module-picker .harmonized_database,
.btn-vip,
.btn-vip-outline,
.data-toolbar .form-select,
.site-footer__brand .site-brand__niddk,
main .warning-message { border-radius: 0; }

.hero .btn-vip,
.hero .btn-vip-outline { border-radius: 999px; }

/* Local / National data pages: buttons and selects are rounded; the data window stays square */
.data-toolbar .btn-vip,
.data-toolbar .btn-vip-outline { border-radius: 999px; }
.module-picker .harmonized_database { border-radius: 10px; }
.data-toolbar .form-select { border-radius: 10px; }

/*---------------------------------------------------------------------
    Home: two content slides switched with the arrows at the bottom
---------------------------------------------------------------------*/
.home-slides { --slides-bleed: 12px; }
@media (min-width: 1200px) { .home-slides { --slides-bleed: 32px; } }

/* carousel-inner clips its overflow; pad it so panel shadows are not cut off */
.home-slides .carousel-inner {
    width: auto;
    margin: -8px calc(-1 * var(--slides-bleed)) 0;
    padding: 8px var(--slides-bleed) 40px;
}

/* arrows + dots live inside each slide's box, at the bottom */
.slide-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: clamp(22px, 3vw, 32px);
}

.slide-arrow {
    display: inline-flex; align-items: center; justify-content: center;
    width: 46px; height: 46px;
    border: 0;
    border-radius: 50%;
    color: var(--vip-ink-strong);
    background: rgba(255, 255, 255, .85);
    box-shadow: 0 4px 12px rgba(31, 56, 104, .16);
    transition: background-color .2s ease, color .2s ease, transform .2s ease;
}
.slide-arrow:hover,
.slide-arrow:focus-visible { background: var(--vip-blue); color: #fff; }
.slide-arrow:active { transform: scale(.96); }

.slide-dots { display: flex; gap: 8px; }
.slide-dots button {
    width: 10px; height: 10px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: var(--vip-blue);
    opacity: .3;
}
.slide-dots button:hover { opacity: .6; }
.slide-dots .active { opacity: 1; }

/* Both home slides share one layout; site.js equalises the head and body heights
   (desktop only) so the map sits in exactly the same place on either slide. */
.home-slides .hero__head { display: flow-root; }   /* keep the title's margin inside, so heights compare equally */
@media (min-width: 992px) {
    .home-slides .hero__head { min-height: var(--slide-head-h, auto); }
}
/* the map is top-aligned, so with equal title blocks it lands in the same spot on both slides */
.home-slides .hero-map { padding-block: 4px 0; }

/* Home page is denser than the inner pages */
.page--home { padding: 22px 0 36px; }
.page--home .panel { --panel-pad: clamp(18px, 2.6vw, 30px); }
.page--home .hero__title { font-size: clamp(24px, 2.35vw, 32px); }
.page--home .hero .hero__title { margin-bottom: clamp(12px, 1.6vw, 18px); }
.page--home .eyebrow { margin-bottom: 8px; }
.page--home .hero__text,
.page--home .hero__body p { font-size: 17px; line-height: 1.62; margin-bottom: 16px; }
.page--home .home-slides .carousel-inner { padding-bottom: 28px; }
.page--home .slide-controls { margin-top: clamp(14px, 2vw, 20px); }
.page--home .slide-arrow { width: 42px; height: 42px; }
.page--home .linked-cards { margin-top: clamp(16px, 2vw, 22px); }
.page--home .linked-cards .data-card { padding: clamp(14px, 1.8vw, 20px) var(--panel-pad); }
.page--home .data-card h3 { margin-bottom: 4px; }
.page--home .data-card p,
.page--home .data-card .study-tags { margin-bottom: 10px; }

/* Slide 2: the local / national cards form a joined band along the bottom of the box */
.linked-cards {
    margin: clamp(22px, 3vw, 34px) calc(-1 * var(--panel-pad)) 0;
    border-top: 1px solid rgba(66, 135, 245, .22);
    border-bottom: 1px solid rgba(66, 135, 245, .22);
}
.linked-cards .data-card {
    background: rgba(255, 255, 255, .28);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    box-shadow: none;
    transform: none;
    padding: clamp(20px, 2.6vw, 30px) var(--panel-pad);
}
.linked-cards .data-card:hover { background: rgba(255, 255, 255, .55); box-shadow: none; transform: none; }
.linked-cards > [class*="col-"] + [class*="col-"] .data-card { border-left: 1px solid rgba(66, 135, 245, .22); }
@media (max-width: 767.98px) {
    .linked-cards > [class*="col-"] + [class*="col-"] .data-card { border-left: 0; border-top: 1px solid rgba(66, 135, 245, .22); }
}
