:root {
  color-scheme: light;
  --ink: #14243a;
  --muted: #617187;
  --navy: #10233b;
  --navy-2: #183c59;
  --teal: #12a895;
  --cyan: #6bd7cf;
  --line: #dce5ee;
  --surface: #ffffff;
  --soft: #f3f7fb;
  --shadow: 0 18px 48px rgba(17, 39, 65, .09);
}

* { box-sizing: border-box; }
html { min-width: 320px; scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(ellipse at 12% 0%, rgba(89, 207, 198, .12), transparent 34rem),
    linear-gradient(180deg, #f6f9fc 0%, #edf3f8 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
}
a { color: #087f81; text-decoration: none; }
a:hover { color: #075e69; text-decoration: underline; }
button, input, select { font: inherit; }
code { color: #24536a; background: #edf5f7; padding: .1em .35em; border-radius: .35rem; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  color: #f6fbff;
  background: rgba(12, 28, 47, .96);
  border-bottom: 1px solid rgba(191, 220, 234, .12);
  box-shadow: 0 8px 30px rgba(8, 24, 40, .12);
  backdrop-filter: blur(14px);
}
.site-header__inner {
  width: min(100% - 40px, 1600px);
  min-height: 78px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}
.brand { display: flex; align-items: center; gap: .8rem; color: #f6fbff; }
.brand:hover { color: #fff; text-decoration: none; }
.brand img { width: 43px; height: 43px; object-fit: contain; border-radius: 13px; background: #fff; padding: 3px; }
.brand__copy { display: grid; line-height: 1.15; }
.brand__overline { color: #94afc4; font-size: .67rem; font-weight: 700; letter-spacing: .15em; text-transform: uppercase; }
.brand__name { margin-top: 4px; font-size: 1.1rem; font-weight: 750; letter-spacing: -.025em; }
.site-nav { display: flex; align-items: center; gap: .55rem; }
.site-nav a { color: #d7e5ef; padding: .55rem .9rem; border-radius: 999px; font-size: .9rem; font-weight: 600; transition: background .18s ease, color .18s ease; }
.site-nav a:hover, .site-nav a:focus-visible { color: #fff; background: rgba(108, 215, 207, .14); text-decoration: none; outline: none; }
.site-nav .site-nav__primary { color: #0c2637; background: #81e0d4; }
.site-nav .site-nav__primary:hover { color: #092033; background: #a3eee5; }

.site-main { width: min(100% - 40px, 1600px); min-height: calc(100vh - 180px); margin: 34px auto 64px; }
.site-footer { color: #8ea4b7; background: #10233b; padding: 25px 20px; text-align: center; font-size: .85rem; }
.site-footer a { color: #bcece5; }
.site-footer p { margin: .35rem 0; }

/* Shared RareVariants tool navigation */
.tool-sidebar { position: fixed; inset: 0 auto 0 0; z-index: 30; display: flex; flex-direction: column; width: 220px; padding: 18px 14px; color: #d6e4ec; background: linear-gradient(180deg, #10233b, #0c1c30); border-right: 1px solid rgba(185, 220, 233, .12); box-shadow: 10px 0 32px rgba(10, 28, 47, .12); transition: width .22s ease; }
.tool-sidebar__top { display: flex; align-items: center; justify-content: space-between; gap: .5rem; min-height: 54px; margin-bottom: 1.6rem; }
.tool-sidebar__brand { display: flex; align-items: center; min-width: 0; }
.tool-sidebar__brand img { display: block; width: 45px; height: 45px; object-fit: contain; padding: 3px; border-radius: 13px; background: #fff; }
.tool-sidebar__toggle { display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid rgba(207, 234, 238, .2); border-radius: 10px; color: #d8f5f0; background: rgba(202, 244, 238, .08); cursor: pointer; }
.tool-sidebar__toggle:hover { background: rgba(202, 244, 238, .16); }
.tool-sidebar nav { display: grid; gap: .35rem; }
.tool-sidebar nav a { display: flex; align-items: center; gap: .85rem; min-height: 45px; padding: .58rem .72rem; border: 1px solid transparent; border-radius: 11px; color: #b7cbd9; font-size: .88rem; font-weight: 620; white-space: nowrap; }
.tool-sidebar nav a:hover { color: #fff; background: rgba(143, 218, 212, .1); text-decoration: none; }
.tool-sidebar nav a.tool-sidebar__active { color: #d7fff6; border-color: rgba(123, 223, 210, .18); background: linear-gradient(100deg, rgba(20, 168, 149, .25), rgba(20, 168, 149, .08)); }
.tool-icon { display: grid; place-items: center; width: 25px; flex: 0 0 25px; font-size: 1.15rem; }
.tool-sidebar__caption { margin-top: auto; padding: 1rem .65rem .2rem; color: #718ba0; font-size: .61rem; font-weight: 800; letter-spacing: .13em; white-space: nowrap; }
.tool-sidebar.is-collapsed { width: 76px; padding-right: 10px; padding-left: 10px; }
.tool-sidebar.is-collapsed .tool-sidebar__top { flex-direction: column; gap: .8rem; }
.tool-sidebar.is-collapsed nav a { justify-content: center; padding-right: .3rem; padding-left: .3rem; }
.tool-sidebar.is-collapsed .tool-label { display: none; }
.tool-sidebar.is-collapsed .tool-sidebar__caption { overflow: hidden; }
body:not(.sidebar-collapsed) .site-header, body:not(.sidebar-collapsed) .site-footer { margin-left: 220px; }
body:not(.sidebar-collapsed) .site-main { width: calc(100% - 260px); max-width: 1600px; margin: 34px 20px 64px 240px; }
body.sidebar-collapsed .site-header, body.sidebar-collapsed .site-footer { margin-left: 76px; }
body.sidebar-collapsed .site-main { width: calc(100% - 116px); max-width: 1600px; margin: 34px 20px 64px 96px; }

.page-shell { width: 100%; margin: 0 auto; }
.page-shell--gene { max-width: 1380px; }
.surface-card { background: var(--surface); border: 1px solid rgba(207, 220, 232, .9); border-radius: 18px; box-shadow: var(--shadow); }
.eyebrow { display: inline-flex; align-items: center; gap: .5rem; color: #087f81; font-size: .72rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.eyebrow::before { content: ""; width: 20px; height: 2px; border-radius: 2px; background: var(--teal); }
.muted { color: var(--muted); }

.catalogue-hero {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 2rem;
  min-height: 260px;
  padding: clamp(2rem, 5vw, 4rem);
  color: #f7fbff;
  border: 1px solid rgba(117, 188, 204, .22);
  border-radius: 24px;
  background:
    radial-gradient(circle at 85% 22%, rgba(73, 204, 190, .24), transparent 17rem),
    radial-gradient(circle at 100% 100%, rgba(64, 133, 183, .2), transparent 24rem),
    linear-gradient(120deg, #10243b 0%, #153c56 55%, #124b59 100%);
  box-shadow: 0 24px 60px rgba(13, 42, 65, .17);
}
.catalogue-hero::after { content: ""; position: absolute; right: 13%; top: -100px; width: 330px; height: 330px; border: 1px solid rgba(184, 242, 232, .12); border-radius: 50%; box-shadow: 0 0 0 36px rgba(184, 242, 232, .035), 0 0 0 72px rgba(184, 242, 232, .025); }
.catalogue-hero__copy, .catalogue-hero__stats { position: relative; z-index: 1; }
.catalogue-hero .eyebrow { color: #a3e7dc; }
.catalogue-hero h1 { max-width: 760px; margin: .8rem 0 .75rem; font-size: clamp(2.2rem, 5vw, 4rem); line-height: 1.02; letter-spacing: -.055em; }
.catalogue-hero p { max-width: 730px; margin: 0; color: #c0d0dc; font-size: 1rem; }
.catalogue-hero__stats { display: flex; gap: .7rem; align-self: end; }
.hero-stat { min-width: 118px; padding: .9rem 1rem; border: 1px solid rgba(201, 234, 238, .18); border-radius: 14px; background: rgba(229, 247, 247, .08); backdrop-filter: blur(8px); }
.hero-stat strong { display: block; color: #e9fffb; font-size: 1.35rem; line-height: 1.2; }
.hero-stat span { color: #a9c5d0; font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }

.filter-panel { display: flex; align-items: end; gap: .9rem; flex-wrap: wrap; margin: 22px 0; padding: 18px; border: 1px solid var(--line); border-radius: 16px; background: rgba(255,255,255,.88); box-shadow: 0 10px 30px rgba(24, 47, 72, .045); }
.filter-panel label { display: grid; flex: 1 1 230px; gap: .42rem; color: #41566d; font-size: .78rem; font-weight: 750; }
.search-hint { color: #718398; font-size: .72rem; font-weight: 500; line-height: 1.4; }
.filter-panel input, .filter-panel select { width: 100%; height: 44px; padding: 0 .85rem; color: var(--ink); border: 1px solid #cedbe6; border-radius: 10px; outline: none; background: #fbfdff; transition: border-color .18s, box-shadow .18s; }
.filter-panel input:focus, .filter-panel select:focus { border-color: #2bb7a8; box-shadow: 0 0 0 3px rgba(43, 183, 168, .13); }
.button-primary { min-height: 44px; padding: 0 1.15rem; border: 0; border-radius: 10px; color: white; background: linear-gradient(135deg, #087f81, #10a797); font-weight: 750; cursor: pointer; box-shadow: 0 8px 18px rgba(16, 167, 151, .2); }
.button-primary:hover { filter: brightness(1.06); }
.button-quiet { padding: .65rem .8rem; color: #587084; font-size: .9rem; font-weight: 650; }

.table-card { overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); box-shadow: var(--shadow); }
.table-card__heading { display: flex; align-items: end; justify-content: space-between; gap: 1rem; padding: 1.2rem 1.4rem; border-bottom: 1px solid #e8eef3; }
.table-card__heading h2 { margin: 0; color: var(--ink); font-size: 1.15rem; letter-spacing: -.02em; }
.table-card__heading p { margin: .15rem 0 0; color: var(--muted); font-size: .85rem; }
.table-actions { display: flex; align-items: center; gap: 1rem; }
.button-download { padding: .52rem .8rem; border: 1px solid #cbdbe5; border-radius: 9px; color: #126b70; background: #f8fcfd; font-size: .8rem; font-weight: 750; cursor: pointer; }
.button-download:hover, .button-download:focus-visible { border-color: #75bcb5; color: #075e69; background: #edf9f7; outline: none; }
.table-scroll { overflow: auto; max-height: 74vh; }
.gene-table { width: 100%; min-width: 1550px; border-collapse: separate; border-spacing: 0; font-size: .82rem; }
.gene-table th { position: sticky; top: 0; z-index: 2; padding: .85rem .72rem; color: #51687e; background: #f2f7fa; border-bottom: 1px solid #dce6ee; font-size: .7rem; font-weight: 800; letter-spacing: .06em; text-align: left; text-transform: uppercase; white-space: nowrap; }
.sort-button { display: inline-grid; place-items: center; width: 22px; height: 22px; margin-left: .22rem; padding: 0; border: 1px solid #d5e0e8; border-radius: 6px; color: #587084; background: #fff; font-size: .78rem; line-height: 1; cursor: pointer; vertical-align: middle; }
.sort-button:hover, .sort-button:focus-visible { color: #087f81; border-color: #72beb5; outline: 2px solid rgba(8,127,129,.12); }
.sort-button[aria-pressed="true"] { color: #fff; border-color: #087f81; background: #087f81; }
.gene-table td { padding: .76rem .72rem; color: #42576a; border-bottom: 1px solid #edf1f5; vertical-align: top; }
.gene-table tbody tr:nth-child(even) { background: #fbfdfe; }
.gene-table tbody tr:hover { background: #f0faf8; }
.gene-table .gene-symbol { color: #087f81; font-weight: 800; font-size: .9rem; }
.gene-table .numeric { color: #213a50; font-variant-numeric: tabular-nums; white-space: nowrap; }
.group-chip { display: inline-flex; align-items: center; justify-content: center; min-width: 28px; height: 27px; border-radius: 8px; color: #124c54; background: #d9f5ef; font-size: .76rem; font-weight: 800; }
.help-tip { display: inline-grid; place-items: center; width: 17px; height: 17px; margin-left: .2rem; border: 1px solid #8ba5b8; border-radius: 50%; color: #42647c; background: #fff; font: 750 .69rem/1 ui-sans-serif, system-ui, sans-serif; vertical-align: .08em; cursor: help; }
.help-tip:hover, .help-tip:focus-visible { color: #fff; border-color: #087f81; background: #087f81; outline: 2px solid rgba(8,127,129,.18); outline-offset: 2px; }
.v10-info { min-width: 210px; max-width: 340px; line-height: 1.5; }
.v10-info details { margin: .1rem 0; }
.v10-info summary { width: fit-content; color: #087f81; font-weight: 750; cursor: pointer; }
.v10-info summary::marker { color: #13a895; }
.v10-info div { margin: .55rem 0; padding-left: .7rem; border-left: 2px solid #ccebe5; }
.v10-note { color: var(--muted); font-size: .86rem; }
.table-empty { padding: 2rem !important; color: var(--muted) !important; text-align: center; }

.breadcrumb { display: inline-flex; align-items: center; gap: .45rem; margin: 0 0 1rem; color: #718398; font-size: .86rem; font-weight: 650; }
.gene-hero { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; margin-bottom: 22px; padding: clamp(1.5rem, 4vw, 2.6rem); color: #f7fbff; border-radius: 22px; background: radial-gradient(circle at 85% 10%, rgba(76, 206, 190, .2), transparent 16rem), linear-gradient(120deg, #10243b, #17445b); box-shadow: 0 20px 50px rgba(13, 42, 65, .14); }
.gene-hero h1 { margin: .45rem 0 .35rem; font-size: clamp(2.4rem, 5vw, 3.5rem); line-height: 1; letter-spacing: -.055em; }
.gene-hero p { max-width: 730px; margin: .5rem 0 0; color: #bfd0dc; font-size: .94rem; }
.gene-hero .eyebrow { color: #a3e7dc; }
.gene-hero__badge { display: grid; place-items: center; width: 82px; height: 82px; flex: 0 0 82px; border: 1px solid rgba(185, 235, 231, .3); border-radius: 24px; color: #aff1e7; background: rgba(200, 246, 239, .08); font-size: 1.65rem; font-weight: 850; box-shadow: inset 0 0 24px rgba(100, 211, 194, .08); }
.gene-card { margin: 18px 0; overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); box-shadow: var(--shadow); }
.gene-card__heading { padding: 1.1rem 1.35rem; border-bottom: 1px solid #e8eef3; }
.gene-card__heading--actions { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.gene-card__heading h2 { margin: 0; color: var(--ink); font-size: 1.08rem; }
.gene-card__heading p { margin: .2rem 0 0; color: var(--muted); font-size: .85rem; }
.graph-frame { padding: .4rem .8rem .2rem; }
.graph-frame .plotly-graph-div { width: 100% !important; }
.detail-table-wrap { overflow-x: auto; }
.detail-table { width: 100%; border-collapse: collapse; }
.detail-table th, .detail-table td { padding: .78rem 1.1rem; border-bottom: 1px solid #eaf0f4; text-align: left; vertical-align: top; }
.detail-table thead th { color: #63778a; background: #f3f7fa; font-size: .72rem; letter-spacing: .07em; text-transform: uppercase; }
.detail-table tbody > tr:not(.section-row):nth-child(even) { background: #fbfdfe; }
.detail-table tbody th:not([colspan]) { width: 34%; color: #3f566d; font-weight: 700; }
.detail-table td { color: #52687c; }
.detail-table .section-row th { padding-top: 1rem; padding-bottom: .65rem; color: #087f81; background: #edf8f6; font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; }
.v10-detail { margin: .25rem 0 .6rem; }
.v10-detail a { font-weight: 650; }
.data-note { margin: 0; padding: 1rem 1.15rem; color: #607589; background: #f7fafc; border-bottom: 1px solid #e9eff4; font-size: .84rem; }

.about-hero { max-width: 900px; margin: 2rem auto; padding: clamp(1.5rem, 5vw, 3.5rem); border: 1px solid var(--line); border-radius: 22px; background: white; box-shadow: var(--shadow); }
.about-hero h1 { margin: .65rem 0; color: var(--navy); font-size: clamp(2rem, 4vw, 3rem); line-height: 1.1; letter-spacing: -.04em; }
.about-hero p { color: #53697d; }

@media (max-width: 850px) {
  .catalogue-hero { grid-template-columns: 1fr; }
  .catalogue-hero__stats { align-self: auto; }
  .site-header__inner { min-height: 70px; }
  .gene-hero { align-items: flex-start; }
}
@media (max-width: 620px) {
  .tool-sidebar { width: 66px; padding: 12px 7px; }
  .tool-sidebar__top { flex-direction: column; gap: .65rem; margin-bottom: 1rem; }
  .tool-sidebar nav a { justify-content: center; padding-right: .25rem; padding-left: .25rem; }
  .tool-sidebar .tool-label { display: none; }
  .tool-sidebar__caption { display: none; }
  body:not(.sidebar-collapsed) .site-header, body:not(.sidebar-collapsed) .site-footer, body.sidebar-collapsed .site-header, body.sidebar-collapsed .site-footer { margin-left: 66px; }
  body:not(.sidebar-collapsed) .site-main, body.sidebar-collapsed .site-main { width: calc(100% - 82px); margin: 18px 10px 40px 72px; }
  .tool-sidebar.is-collapsed { width: 66px; }
  .site-header__inner { width: min(100% - 24px, 1600px); flex-wrap: wrap; padding: .75rem 0; }
  .site-nav { width: 100%; justify-content: space-between; gap: .15rem; }
  .site-nav a { padding: .45rem .65rem; font-size: .82rem; }
  .site-main { width: min(100% - 24px, 1600px); margin: 18px auto 40px; }
  .catalogue-hero { min-height: 0; padding: 1.5rem; border-radius: 18px; }
  .catalogue-hero__stats { gap: .45rem; }
  .hero-stat { min-width: 0; flex: 1; padding: .65rem; }
  .hero-stat strong { font-size: 1.12rem; }
  .hero-stat span { font-size: .63rem; }
  .filter-panel { padding: 13px; gap: .65rem; }
  .table-card__heading { align-items: flex-start; flex-direction: column; }
  .table-actions { width: 100%; justify-content: space-between; flex-wrap: wrap; }
  .gene-card__heading--actions { align-items: flex-start; }
  .gene-hero { padding: 1.4rem; border-radius: 18px; }
  .gene-hero__badge { width: 58px; height: 58px; flex-basis: 58px; border-radius: 17px; font-size: 1.2rem; }
  .detail-table th, .detail-table td { padding: .68rem .75rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
