@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../../fonts/ibm-plex-sans-latin-ext-400-700.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../../fonts/ibm-plex-sans-latin-400-700.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../../fonts/ibm-plex-sans-latin-ext-400-700.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../../fonts/ibm-plex-sans-latin-400-700.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../../fonts/ibm-plex-sans-latin-ext-400-700.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../../fonts/ibm-plex-sans-latin-400-700.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../../fonts/ibm-plex-sans-latin-ext-400-700.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../../fonts/ibm-plex-sans-latin-400-700.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "IBM Plex Sans Condensed";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../../fonts/ibm-plex-sans-condensed-latin-ext-500.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "IBM Plex Sans Condensed";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../../fonts/ibm-plex-sans-condensed-latin-500.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "IBM Plex Sans Condensed";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../../fonts/ibm-plex-sans-condensed-latin-ext-600.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "IBM Plex Sans Condensed";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../../fonts/ibm-plex-sans-condensed-latin-600.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "IBM Plex Sans Condensed";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../../fonts/ibm-plex-sans-condensed-latin-ext-700.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "IBM Plex Sans Condensed";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../../fonts/ibm-plex-sans-condensed-latin-700.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: #f5f7fa;
  --surface: #ffffff;
  --surface-soft: #fbfcfe;
  --text: #131516;
  --muted: #5f6b76;
  --line: #d8e0e8;
  --brand: #00274c;
  --brand-2: #174992;
  --brand-soft: #edf4fb;
  --maize: #ffcb05;
  --maize-soft: #fff4c1;
  --accent: #2f65a7;
  --danger: #992f2f;
  --warn: #7d6200;
  --success: #27623a;
  --font-sans: "IBM Plex Sans", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --font-condensed: "IBM Plex Sans Condensed", "IBM Plex Sans", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --page-shell-width: 1800px;
  --page-shell-gutter: 1.25rem;
  --shadow: 0 2px 8px rgba(17, 39, 76, 0.06), 0 18px 40px rgba(17, 39, 76, 0.08);
  --radius: 14px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  line-height: 1.5;
}

body {
  min-height: 100vh;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

a:focus-visible,
summary:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid rgba(255, 203, 5, 0.95);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -3rem;
  z-index: 200;
  padding: 0.6rem 0.9rem;
  background: var(--brand);
  color: white;
  border-radius: 0 0 10px 10px;
}

.skip-link:focus {
  top: 0;
}

.container {
  width: min(1240px, calc(100% - 2rem));
  margin: 0 auto;
}

.page-home .container,
.page-data .container,
.page-detail .container,
.page-content .container {
  width: min(var(--page-shell-width), calc(100% - var(--page-shell-gutter)));
}

.um-banner {
  background: linear-gradient(180deg, #ffffff 0%, #f6f9fc 100%);
  border-top: 4px solid var(--maize);
  border-bottom: 1px solid var(--line);
}

.um-banner-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem 1.2rem;
  align-items: center;
  padding: 0.75rem 0;
}

.um-banner-logo {
  display: block;
  width: min(100%, 320px);
  max-height: 40px;
  height: auto;
  flex: 0 0 auto;
}

.um-banner-logo-frame {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  line-height: 0;
  padding: 0.35rem 0.6rem 0.35rem 0.45rem;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  background: var(--surface);
  box-shadow: 0 10px 24px rgba(0, 39, 76, 0.08);
}

.um-banner-text {
  min-height: 2.25rem;
  display: inline-flex;
  align-items: center;
  padding-left: 1rem;
  border-left: 1px solid var(--line);
  color: var(--brand);
  font-size: 0.95rem;
  font-weight: 600;
}

@media (max-width: 720px) {
  .um-banner-text {
    width: 100%;
    min-height: 0;
    padding-left: 0;
    border-left: 0;
  }
}

.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.topbar {
  display: flex;
  gap: 0.85rem 1.4rem;
  align-items: flex-start;
  justify-content: space-between;
  padding: 0.95rem 0 0.55rem;
}

.brand-kicker {
  margin: 0 0 0.35rem;
  font-size: 0.83rem;
  font-weight: 700;
  font-family: var(--font-condensed);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand-2);
}

.branding h1 {
  margin: 0;
  font-size: clamp(1.85rem, 2vw, 2.5rem);
  line-height: 1.1;
  font-family: var(--font-condensed);
  font-weight: 600;
  color: var(--brand);
}

.branding h1 a {
  color: inherit;
}

.branding p {
  margin: 0.35rem 0 0;
  color: var(--muted);
  max-width: 66rem;
}

.release-panel {
  flex: 0 0 auto;
  min-width: 220px;
  max-width: 320px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--surface) 0%, var(--surface-soft) 100%);
  padding: 0.7rem 0.85rem;
  display: grid;
  gap: 0.45rem;
}

.release-badge-label {
  font-size: 0.75rem;
  font-weight: 700;
  font-family: var(--font-condensed);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--brand-2);
}

.release-panel-title {
  color: var(--brand);
  line-height: 1.15;
}

.release-panel-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
}

.release-panel-stat {
  display: grid;
  gap: 0.18rem;
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

a.release-panel-stat {
  color: inherit;
  text-decoration: none;
}

a.release-panel-stat:hover,
a.release-panel-stat:focus-visible {
  background: var(--brand-soft);
  border-color: #b8cee4;
  text-decoration: none;
}

.release-panel-stat-label {
  font-size: 0.68rem;
  font-family: var(--font-condensed);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.release-panel-stat-value {
  font-size: 1.05rem;
  line-height: 1.05;
  color: var(--brand);
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0 0 0.8rem;
}

.nav a {
  display: inline-flex;
  align-items: center;
  min-height: 2.45rem;
  padding: 0.5rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--brand);
  font-family: var(--font-condensed);
  font-weight: 600;
}

.nav a.active,
.nav a:hover {
  background: var(--brand-soft);
  text-decoration: none;
}

.notice {
  background: var(--maize-soft);
  border: 1px solid #eddc8e;
  color: #5a4a00;
  padding: 0.85rem 1rem;
  border-radius: var(--radius);
  margin: 0.25rem 0 0.9rem;
}

.notice.notice-compact {
  padding: 0.5rem 0.8rem;
  font-size: 0.9rem;
  margin-top: 0.15rem;
}

main {
  padding: 1.6rem 0 3rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1rem 1.2rem;
}

.card + .card {
  margin-top: 1rem;
}

/* Keep stacked-card spacing out of grid rows so sibling cards share the same top edge. */
.hero > .card + .card,
.link-grid > .card + .card,
.download-grid > .card + .card,
.summary-grid > .card + .card,
.legend-grid > .card + .card,
.plot-workspace > .card + .card,
.plot-reference-grid > .card + .card {
  margin-top: 0;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 2.2fr) minmax(320px, 1fr);
  gap: 1rem;
  align-items: stretch;
}

.hero.hero-single {
  grid-template-columns: minmax(0, 1fr);
}

.hero h2,
.page-header h2 {
  margin-top: 0;
  margin-bottom: 0.6rem;
  color: var(--brand);
}

.page-header p {
  max-width: 70rem;
}

.page-header-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(18rem, 22rem);
  gap: 1rem;
  align-items: stretch;
}

.page-header-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbfe 100%);
}

.page-header-pane {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  min-width: 0;
  height: 100%;
  padding: 0.95rem;
  border: 1px solid #c9d7e5;
  border-radius: 14px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.78);
}

.page-header-pane > * {
  margin-top: 0;
  margin-bottom: 0;
}

.page-header-copy > :first-child,
.page-header-side > :first-child {
  margin-top: 0;
}

.page-header-copy > :last-child,
.page-header-side > :last-child {
  margin-bottom: 0;
}

.page-header-side {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  justify-content: flex-start;
  background: linear-gradient(180deg, #f9fbfe 0%, #eef5fb 100%);
}

.page-header-side h3 {
  margin: 0;
  color: var(--brand);
  font-size: 1.05rem;
}

.page-header-side p {
  margin: 0;
}

.page-header-side .button-row {
  display: grid;
  gap: 0.5rem;
  margin-top: auto;
  padding-top: 0.25rem;
}

.page-header-side .button-row .button,
.page-header-side .button-row button {
  width: 100%;
}

.page-content-card {
  padding: 1.15rem 1.3rem;
}

.page-content-heading {
  margin-bottom: 1rem;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid var(--line);
}

.page-content-heading h2 {
  margin: 0;
  color: var(--brand);
}

.page-content-body > :first-child {
  margin-top: 0;
}

.page-content-body > :last-child {
  margin-bottom: 0;
}

.kpi-grid,
.link-grid,
.summary-grid,
.legend-grid,
.method-grid {
  display: grid;
  gap: 1rem;
}

.kpi-grid {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.link-grid {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.download-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(18rem, 0.85fr);
  gap: 1rem;
  align-items: stretch;
  margin-top: 1rem;
}

.summary-grid,
.legend-grid {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.method-grid {
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
  align-items: stretch;
}

.hero > .card,
.link-grid > .card,
.download-grid > .card,
.method-grid > .info-block,
.plot-card,
.plot-compare,
.plot-reference {
  display: flex;
  flex-direction: column;
  min-width: 0;
  height: 100%;
}

.hero > .card > :first-child,
.link-grid > .card > :first-child,
.download-grid > .card > :first-child,
.method-grid > .info-block > :first-child,
.plot-card > :first-child,
.plot-compare > :first-child,
.plot-reference > :first-child {
  margin-top: 0;
}

.hero > .card > :last-child,
.link-grid > .card > :last-child,
.download-grid > .card > :last-child,
.method-grid > .info-block > :last-child,
.plot-card > :last-child,
.plot-compare > :last-child,
.plot-reference > :last-child {
  margin-bottom: 0;
}

.hero > .card .button-row:last-child,
.link-grid > .card > .button:last-child {
  margin-top: auto;
  padding-top: 1rem;
}

.download-grid > .card > .key-points,
.download-grid > .card > .list-clean {
  margin-top: 0.75rem;
  padding-left: 1.1rem;
}

.kpi {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem;
}

.kpi .label,
.stat .label,
.info-block h3,
.plot-legend h3,
.section-label {
  color: var(--muted);
  font-size: 0.88rem;
}

.kpi .value {
  font-size: 1.9rem;
  font-weight: 800;
  color: var(--brand);
  line-height: 1.05;
}

.kpi .value a {
  color: inherit;
  text-decoration: none;
}

.kpi .value a:hover,
.kpi .value a:focus-visible {
  text-decoration: underline;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
  margin-top: 1rem;
}

.button,
button,
select,
input[type="text"],
input[type="search"],
textarea {
  font: inherit;
}

.button,
button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 2.75rem;
  border: 1px solid var(--brand);
  background: var(--brand);
  color: white;
  padding: 0.7rem 1rem;
  border-radius: 10px;
  cursor: pointer;
  font-family: var(--font-condensed);
  font-weight: 600;
}

.button.secondary,
button.secondary {
  background: white;
  color: var(--brand);
}

.button.tertiary,
button.tertiary {
  background: var(--brand-soft);
  color: var(--brand);
  border-color: #b8cee4;
}

.filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.85rem;
  margin-bottom: 1rem;
}

.filters-shell {
  display: grid;
  gap: 1rem;
}

.filters.filters-primary {
  grid-template-columns: repeat(10, minmax(0, 1fr));
  margin-bottom: 0;
}

.filters.filters-primary > div {
  min-width: 0;
}

.filters-primary .filter-search,
.filters-primary .filter-trait,
.filters-primary .filter-top {
  grid-column: span 2;
}

.filters-primary .filter-search-column,
.filters-primary .filter-trait-type,
.filters-primary .filter-cohort,
.filters-primary .filter-method {
  grid-column: span 1;
}

.filters > div > label {
  display: block;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.filters input:not([type="checkbox"]):not([type="radio"]),
.filters select {
  width: 100%;
  min-height: 2.7rem;
  padding: 0.58rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: white;
}

.autocomplete-shell {
  position: relative;
}

.autocomplete-list {
  position: absolute;
  top: calc(100% + 0.35rem);
  left: 0;
  right: 0;
  z-index: 40;
  margin: 0;
  padding: 0.35rem;
  list-style: none;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow);
  max-height: min(18rem, 40vh);
  overflow-y: auto;
}

.autocomplete-item {
  display: grid;
  gap: 0.1rem;
  padding: 0.55rem 0.65rem;
  border-radius: 10px;
  cursor: pointer;
}

.autocomplete-item.active,
.autocomplete-item:hover {
  background: var(--brand-soft);
}

.autocomplete-primary {
  font-weight: 600;
  color: var(--text);
}

.autocomplete-meta {
  color: var(--muted);
}

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

.checkbox-row {
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 0.2rem;
}

.checkbox-row label {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 0;
  font-weight: 600;
}

.checkbox-row input[type="checkbox"] {
  width: 1rem;
  height: 1rem;
  min-height: 1rem;
  margin: 0;
  padding: 0;
  flex: 0 0 auto;
  accent-color: var(--brand);
}

.filters-group {
  align-self: end;
}

.filters-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.85rem 1rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--line);
}

.filters-toolbar .filters-group {
  align-self: auto;
  flex: 1 1 24rem;
}

.filters-actions {
  display: flex;
  flex-direction: column;
  justify-content: end;
  align-items: flex-start;
  gap: 0.55rem;
}

.filters-actions .button-row {
  margin-top: 0;
}

.filters-toolbar .filters-actions {
  flex: 1 1 22rem;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
}

.badges {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 1.8rem;
  font-size: 0.8rem;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #f3f6f9;
  color: var(--text);
}

.badge.warn {
  background: #fff6d8;
  border-color: #efdc8d;
  color: var(--warn);
}

.badge.danger {
  background: #fde8e8;
  border-color: #efb0b0;
  color: var(--danger);
}

.badge.success {
  background: #e8f6ea;
  border-color: #b7debf;
  color: var(--success);
}

.muted {
  color: var(--muted);
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
}

.table-wrap-scroll {
  max-height: min(72vh, 48rem);
  overflow: auto;
}

.table-wrap.compact table {
  min-width: 720px;
}

.scores-table th,
.scores-table td {
  vertical-align: top;
}

.scores-col-code {
  width: 7.5rem;
}

.scores-col-trait {
  min-width: 15rem;
}

.scores-col-cohort,
.scores-col-method {
  width: 5.5rem;
}

.scores-col-source {
  width: 9rem;
}

.scores-col-metric {
  width: 6rem;
}

.scores-col-flags {
  width: 9.5rem;
}

.scores-col-links {
  width: 11.5rem;
}

.scores-link-cluster {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.45rem;
  align-content: flex-start;
}

.scores-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 1.85rem;
  padding: 0.18rem 0.55rem;
  border: 1px solid #d4dee8;
  border-radius: 999px;
  background: #f6fbff;
  color: var(--accent);
  font-weight: 600;
  line-height: 1.15;
  text-decoration: none;
  white-space: nowrap;
}

.scores-link:hover {
  background: #eef5fb;
}

.overview-col-code {
  width: 12rem;
}

.overview-col-trait {
  width: 22rem;
}

.overview-code-head,
.overview-code-cell {
  width: 12rem;
}

.overview-group-meta {
  display: block;
  margin-top: 0.2rem;
}

.overview-trait-head,
.overview-trait-cell {
  width: 22rem;
}

.overview-trait-main,
.overview-trait-subline {
  display: block;
}

.overview-trait-main {
  font-weight: 600;
  line-height: 1.35;
}

.overview-trait-subline {
  margin-top: 0.2rem;
  max-width: 24rem;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.overview-variants {
  margin-top: 0.45rem;
}

.overview-variants summary {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  cursor: pointer;
  color: var(--accent);
  font-weight: 600;
  list-style: none;
}

.overview-variants summary::-webkit-details-marker {
  display: none;
}

.overview-variants summary::before {
  content: "+";
  color: var(--brand-2);
  font-weight: 700;
}

.overview-variants[open] summary::before {
  content: "-";
}

.overview-variant-list {
  margin-top: 0.45rem;
  display: grid;
  gap: 0.4rem;
}

.overview-variant-item {
  display: grid;
  gap: 0.12rem;
  padding: 0.5rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-soft);
}

.overview-variant-code {
  width: fit-content;
}

.overview-variant-subline,
.overview-variant-source {
  display: block;
  line-height: 1.4;
}

.trait-note {
  margin-top: 0.35rem;
}

.page-help {
  margin-top: 0.8rem;
}

.trait-note summary {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  cursor: pointer;
  color: var(--accent);
  font-weight: 600;
  list-style: none;
}

.trait-note summary::-webkit-details-marker {
  display: none;
}

.trait-note summary::before {
  content: "+";
  color: var(--brand-2);
  font-weight: 700;
}

.trait-note[open] summary::before {
  content: "-";
}

.trait-note-body {
  margin-top: 0.45rem;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-soft);
  max-width: 44rem;
}

.page-help-body {
  display: grid;
  gap: 0.55rem;
  max-width: 56rem;
}

.page-help-body p {
  margin: 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 980px;
}

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

thead th {
  position: sticky;
  top: 0;
  background: #eef4f9;
  color: var(--brand);
  z-index: 2;
  box-shadow: inset 0 -1px 0 var(--line);
}

.table-sort {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  width: 100%;
  min-height: auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font-weight: 700;
  text-align: left;
  border-radius: 0;
}

.table-sort:hover {
  background: transparent;
  color: var(--accent);
}

.table-sort[data-active="true"] {
  color: var(--accent);
}

.table-sort-indicator {
  flex: 0 0 auto;
  font-size: 0.8rem;
  color: var(--muted);
}

tbody tr:nth-child(even) {
  background: #fbfcfe;
}

tbody tr:hover {
  background: #f2f8fd;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.75rem;
}

.stat,
.info-block,
.plot-legend,
.callout {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.9rem;
  background: white;
}

.stat .value {
  display: block;
  color: var(--brand);
  font-weight: 700;
  margin-top: 0.2rem;
  overflow-wrap: anywhere;
}

.detail-primary-action {
  margin-top: 1rem;
}

.detail-secondary-links {
  margin-top: 1rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--line);
}

.detail-secondary-links .section-label {
  display: block;
  margin-bottom: 0.5rem;
}

.detail-link-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.4rem 1rem;
  padding-left: 1rem;
}

.detail-link-list > li + li {
  margin-top: 0;
}

.score-summary-table {
  min-width: 0;
  table-layout: fixed;
}

.score-summary-table th,
.score-summary-table td {
  overflow-wrap: anywhere;
}

.score-summary-table th:first-child,
.score-summary-table td:first-child {
  width: 8rem;
}

.info-block h3,
.plot-legend h3 {
  margin: 0 0 0.45rem;
  color: var(--brand);
  font-size: 1rem;
}

.list-clean {
  margin: 0;
  padding-left: 1rem;
}

.list-clean > li + li {
  margin-top: 0.4rem;
}

.bug-report-widget {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 80;
  width: min(24rem, calc(100vw - 1.5rem));
}

.bug-report-widget > summary {
  list-style: none;
}

.bug-report-widget > summary::-webkit-details-marker {
  display: none;
}

.bug-report-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.85rem;
  margin-left: auto;
  padding: 0.7rem 1rem;
  border: 1px solid var(--brand);
  border-radius: 999px;
  background: var(--brand);
  color: white;
  font-family: var(--font-condensed);
  font-weight: 600;
  box-shadow: var(--shadow);
  cursor: pointer;
}

.bug-report-widget[open] .bug-report-trigger {
  border-bottom-right-radius: 0.9rem;
  border-bottom-left-radius: 0.9rem;
}

.bug-report-panel {
  margin-top: 0.65rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.bug-report-kicker {
  margin: 0 0 0.3rem;
  color: var(--brand-2);
  font-size: 0.78rem;
  font-family: var(--font-condensed);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.bug-report-title {
  margin: 0;
  color: var(--brand);
  font-size: 1.25rem;
}

.bug-report-copy {
  margin: 0.45rem 0 0;
  color: var(--muted);
  font-size: 0.94rem;
}

.bug-report-label {
  display: grid;
  gap: 0.35rem;
  margin-top: 0.9rem;
  font-weight: 700;
}

.bug-report-field {
  width: 100%;
  min-height: 8rem;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: white;
  color: var(--text);
  resize: vertical;
}

.bug-report-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 0.85rem;
}

@media (max-width: 720px) {
  .bug-report-widget {
    right: 0.75rem;
    bottom: 0.75rem;
    width: min(100vw - 1.5rem, 24rem);
  }
}

.site-footer {
  border-top: 1px solid var(--line);
  background: white;
  padding: 1rem 0 2rem;
  color: var(--muted);
}

.footer-org-line {
  margin-bottom: 0;
}

.page-meta {
  display: flex;
  gap: 0.75rem 1rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
  color: var(--muted);
}

.empty-state {
  padding: 1rem;
  color: var(--muted);
}

.hidden {
  display: none !important;
}

.small {
  font-size: 0.92rem;
}

.code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.95em;
}

.legacy-status {
  background: white;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  padding: 1rem;
}

hr.soft {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 1rem 0;
}

.reading-width {
  max-width: 72rem;
}

.download-exports-card {
  margin-top: 1rem;
}

.download-details > summary {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  cursor: pointer;
  font-weight: 600;
  color: var(--brand);
}

.download-details[open] > summary {
  margin-bottom: 0.85rem;
}

.key-points {
  margin: 0.75rem 0 0;
  padding-left: 1.1rem;
}

.key-points > li + li {
  margin-top: 0.35rem;
}

.phewas-view-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(8.5rem, 1fr));
  gap: 0.45rem;
  margin: 0;
  padding: 0.45rem;
  width: min(100%, 24rem);
  border: 1px solid #bfd0e3;
  border-radius: 14px;
  background: linear-gradient(180deg, #f8fbfe 0%, #eef4f9 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

.phewas-control-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 0.75rem 1rem;
  align-items: end;
  margin-top: 0.95rem;
  padding-top: 0.95rem;
  border-top: 1px solid var(--line);
}

.phewas-control-meta,
.phewas-view-switch {
  display: grid;
  gap: 0.3rem;
}

.phewas-control-meta {
  align-content: start;
}

.phewas-control-meta #phewas-count {
  margin: 0;
}

.phewas-view-switch {
  grid-column: 2;
  justify-self: center;
  justify-items: center;
  text-align: center;
}

.phewas-view-tab {
  border: 1px solid #cfdae6;
  border-radius: 12px;
  background: white;
  color: var(--brand);
  font: inherit;
  font-family: var(--font-condensed);
  font-weight: 700;
  justify-content: center;
  min-height: 2.55rem;
  padding: 0.5rem 1rem;
  cursor: pointer;
}

.phewas-view-tab:hover {
  background: #f4f8fc;
  border-color: #bccfe1;
}

.phewas-view-tab[aria-selected="true"] {
  background: var(--brand);
  border-color: var(--brand);
  color: white;
  box-shadow: 0 10px 22px rgba(12, 61, 117, 0.16);
}

.phewas-view-tab:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.phewas-view-panel {
  margin-top: 1rem;
}

.plot-section {
  display: grid;
  gap: 1rem;
  align-content: start;
}

.plot-start {
  display: grid;
  gap: 1rem;
  border-color: #d7e2ec;
  background: linear-gradient(135deg, #fffef7 0%, #f7fbff 100%);
}

.plot-card-intro {
  display: grid;
  gap: 0.8rem;
  margin-bottom: 0;
  padding-bottom: 0.95rem;
  border-bottom: 1px solid var(--line);
}

.plot-card-intro .phewas-view-switch {
  justify-items: center;
  text-align: center;
}

.plot-card-intro .phewas-view-tabs {
  justify-self: center;
}

.plot-start-header h3 {
  margin: 0 0 0.35rem;
  color: var(--brand);
}

.plot-start-kicker {
  margin: 0 0 0.2rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--muted);
}

.plot-start-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.plot-start-steps li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.75rem;
  align-items: start;
  padding: 0.85rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.9);
}

.plot-start-step-number {
  display: inline-grid;
  place-items: center;
  width: 1.8rem;
  height: 1.8rem;
  border-radius: 999px;
  background: var(--brand);
  color: white;
  font-weight: 700;
}

.plot-start-steps li div {
  display: grid;
  gap: 0.2rem;
}

.plot-start-steps li strong {
  color: var(--ink);
}

.plot-start-steps li div span {
  color: var(--muted);
}

.phewas-model-strip {
  display: grid;
  gap: 0.35rem;
  margin: 0.75rem 0 0.9rem;
}

.phewas-model-strip .badges {
  margin: 0;
}

.plot-stack {
  display: grid;
  gap: 1rem;
  align-items: stretch;
}

.plot-compare {
  position: static;
  border-color: #c9d7e5;
  background: linear-gradient(180deg, #fbfdff 0%, #f3f8fc 100%);
}

.plot-card,
.plot-compare {
  gap: 0.85rem;
}

.plot-card h3 {
  margin-top: 0;
  margin-bottom: 0.35rem;
  color: var(--brand);
}

.plot-compare h3 {
  margin-top: 0;
  margin-bottom: 0.35rem;
  color: var(--brand);
}

.exclusion-definition-card {
  border: 1px solid #d5e1ec;
  border-radius: 12px;
  background: #f6faff;
  padding: 0.8rem 0.9rem;
  margin-top: 1rem;
}

.exclusion-definition-card p:last-child {
  margin-bottom: 0;
}

.plot-compare h4 {
  margin: 0;
  color: var(--brand);
}

.plot-compare-header {
  display: grid;
  gap: 0.3rem;
}

.plot-compare-gated {
  border: 1px dashed #c9d7e5;
  border-radius: 12px;
  background: #fbfcfe;
  padding: 0.8rem 0.9rem;
}

.plot-compare-gated p:last-child {
  margin-bottom: 0;
}

.plot-compare-link-wrap {
  margin: 0;
}

.plot-compare-forest-shell {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #ffffff;
  padding: 0.35rem 0.5rem 0.35rem;
  overflow-x: auto;
}

.plot-compare-forest-shell svg {
  display: block;
  width: 100%;
  height: auto;
  min-width: 720px;
}

.plot-compare-forest-note {
  fill: #52616f;
  font-size: 12px;
}

.plot-reference-grid {
  display: grid;
  grid-template-columns: minmax(18rem, 24rem) minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}

.plot-reference h3,
.plot-reference h4 {
  margin-top: 0;
}

.plot-reference h3 {
  margin-bottom: 0.35rem;
  color: var(--brand);
}

.plot-reference h4 {
  margin: 0 0 0.45rem;
  color: var(--ink);
  font-size: 1rem;
}

.plot-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0;
}

.plot-toolbar-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.plot-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.42rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: white;
}

.plot-chip input {
  margin: 0;
}

.phewas-plot-shell {
  flex-shrink: 0;
  position: relative;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff 0%, #f9fbfd 100%);
  overflow: hidden;
}

.phewas-plot-scroll {
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0.75rem;
}

#phewas-plot-root {
  min-width: 100%;
  width: fit-content;
  margin: 0 auto;
}

.phewas-plot-empty {
  padding: 1rem;
  color: var(--muted);
}

.phewas-plot-scroll svg {
  display: block;
  width: auto;
  max-width: none;
  height: auto;
}

.phewas-tooltip {
  position: absolute;
  z-index: 20;
  max-width: 320px;
  pointer-events: none;
  background: rgba(19, 32, 43, 0.96);
  color: white;
  border-radius: 12px;
  padding: 0.75rem 0.85rem;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.24);
  font-size: 0.88rem;
  line-height: 1.35;
}

.phewas-tooltip.pinned {
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.28);
  pointer-events: auto;
}

.phewas-tooltip a {
  color: #fff3a8;
  text-decoration: underline;
}

.phewas-tooltip strong {
  display: block;
  margin-bottom: 0.3rem;
}

.legend-swatch {
  width: 1rem;
  height: 1rem;
  display: inline-block;
  margin-top: 0.15rem;
  border-radius: 3px;
}

.category-key {
  display: grid;
  gap: 0.45rem;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.category-key-item {
  display: flex;
  gap: 0.45rem;
  align-items: center;
  font-size: 0.88rem;
}

.phewas-description-head,
.phewas-description-cell {
  width: 18rem;
  max-width: 18rem;
  vertical-align: top;
}

.phewas-description-toggle {
  display: block;
}

.phewas-description-toggle summary {
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
  min-width: 0;
  cursor: pointer;
  list-style: none;
}

.phewas-description-toggle summary::-webkit-details-marker {
  display: none;
}

.phewas-description-preview {
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.phewas-description-expander {
  flex: 0 0 auto;
  color: var(--brand);
  font-weight: 700;
}

.phewas-description-full {
  margin-top: 0.4rem;
  overflow-wrap: anywhere;
}

.phewas-description-toggle[open] .phewas-description-expander {
  color: var(--accent);
}

.method-block h3 {
  margin: 0 0 0.6rem;
  color: var(--brand);
  font-size: 1.1rem;
}

.method-block {
  padding: 1.2rem 1.25rem;
}

.method-block p,
.method-block ul {
  margin-top: 0;
}

.method-block p + p,
.method-block p + ul,
.method-block ul + p {
  margin-top: 0.85rem;
}

.method-page {
  display: grid;
  gap: 1.15rem;
  max-width: 68rem;
}

.method-page p,
.method-page li {
  line-height: 1.65;
}

.method-intro {
  display: grid;
  gap: 0.95rem;
  font-size: 1.01rem;
}

.method-intro p {
  margin: 0;
}

.method-callouts {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(16rem, 0.95fr);
  gap: 1rem;
  align-items: start;
}

.method-summary {
  background: linear-gradient(180deg, #ffffff 0%, #fbfcfe 100%);
}

.method-summary .key-points {
  margin-top: 0.6rem;
}

.method-toc {
  background: linear-gradient(180deg, #fbfcfe 0%, #f4f8fc 100%);
}

.method-toc-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.method-toc-list li + li {
  border-top: 1px solid var(--line);
}

.method-toc-list a {
  display: block;
  padding: 0.5rem 0;
  font-weight: 600;
  color: var(--brand);
}

.method-toc-list a:hover {
  color: var(--accent);
  text-decoration: none;
}

.method-toc-list li:first-child a {
  padding-top: 0;
}

.method-toc-list li:last-child a {
  padding-bottom: 0;
}

.method-page section[id] {
  scroll-margin-top: 1.25rem;
}

.method-sources {
  margin-top: 0;
}

@media (max-width: 1100px) {
  .hero,
  .page-header-layout,
  .plot-stack,
  .plot-reference-grid,
  .method-grid,
  .phewas-control-bar {
    grid-template-columns: 1fr;
  }

  .plot-start-steps {
    grid-template-columns: 1fr;
  }

  .download-grid,
  .filters.filters-primary {
    grid-template-columns: 1fr;
  }

  .method-callouts {
    grid-template-columns: 1fr;
  }

  .phewas-view-switch {
    grid-column: 1;
  }

  .filters-primary .filter-search,
  .filters-primary .filter-trait,
  .filters-primary .filter-top,
  .filters-primary .filter-search-column,
  .filters-primary .filter-trait-type,
  .filters-primary .filter-cohort,
  .filters-primary .filter-method {
    grid-column: auto;
  }

  .release-panel {
    max-width: none;
    width: 100%;
  }

  .plot-compare {
    position: static;
  }
}

@media (max-width: 840px) {
  .container,
  .page-home .container,
  .page-data .container,
  .page-detail .container,
  .page-content .container {
    width: min(100% - 1rem, 100% - 1rem);
  }

  .topbar {
    flex-direction: column;
    align-items: stretch;
  }

  .nav {
    gap: 0.45rem;
  }

  .nav a {
    flex: 1 1 calc(50% - 0.5rem);
    justify-content: center;
  }

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

  .filters-toolbar .filters-actions {
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
  }

  table {
    min-width: 760px;
  }

  .um-banner-inner {
    font-size: 0.85rem;
  }
}
