:root {
  color-scheme: light;
  --canvas: #F7F8F6;
  --surface: #fff;
  --ink: #192B35;
  --muted: #52656D;
  --line: #D6DEDF;
  --control-line: #9AABAE;
  --teal: #006B68;
  --teal-hover: #005451;
  --selected: #E6F1EF;
  --subtle: #EEF2F0;
  --alert: #843F29;
  --alert-bg: #F7ECE5;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font: 15px/1.55 var(--sans);
  color: var(--ink);
  background: var(--canvas);
}

*, *::before, *::after { box-sizing: border-box; }
body, h1, h2, h3, p, dl, dd { margin: 0; }
body { min-height: 100vh; }
[hidden], dialog:not([open]) { display: none !important; }
button, input, select, textarea { color: inherit; font: inherit; }
button { cursor: pointer; }
button:disabled, input:disabled { cursor: default; opacity: .55; }
a { color: var(--teal); }
a:hover { color: var(--teal-hover); }
:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; }
h1:focus { outline: none; }
code, kbd, pre, .mono { font-family: var(--mono); }
small, code, kbd { font-size: max(12px, .88em); }
input[type="checkbox"] { margin: 0; width: 15px; height: 15px; accent-color: var(--teal); flex: none; }

.page-width { width: min(1120px, 100% - 80px); margin-inline: auto; }
.topbar { border-bottom: 1px solid var(--line); background: var(--surface); }
.topbar-inner {
  min-height: 64px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 32px;
}
.brand-lockup { display: flex; align-items: center; min-width: 0; }
.brand-name {
  color: var(--ink);
  font-size: 21px;
  font-weight: 750;
  letter-spacing: -.035em;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
}
.brand-divider { color: var(--control-line); font-size: 15px; }
.brand-subtitle {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}
.topbar-meta { grid-column: 3; color: var(--muted); font-size: 13px; white-space: nowrap; }
.toolbar-search { grid-column: 2; width: min(100%, 420px); justify-self: center; }

.home { width: min(100%, 848px); padding: clamp(50px, 6.4vw, 92px) 0 80px; }
.home h1 {
  margin-bottom: 24px;
  font-size: clamp(30px, 3.4vw, 46px);
  font-weight: 720;
  line-height: 1.18;
  letter-spacing: -.034em;
}
.search-wrap { position: relative; }
.search-box {
  display: flex;
  align-items: center;
  gap: 13px;
  min-height: 58px;
  padding-inline: 17px;
  border: 1px solid var(--control-line);
  border-radius: 6px;
  background: var(--surface);
}
.search-box:focus-within { outline: 2px solid var(--teal); outline-offset: -1px; }
.search-icon, .outline-button svg {
  width: 20px;
  height: 20px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.search-icon { color: var(--teal); }
.search-box input {
  flex: 1;
  width: 100%;
  min-width: 0;
  min-height: 36px;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
}
.search-box input::-webkit-search-cancel-button { appearance: none; }
.search-box input::placeholder { color: var(--muted); opacity: 1; }
.search-shortcut {
  padding: 2px 6px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--canvas);
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}
.toolbar-search .search-box { min-height: 38px; gap: 9px; padding-inline: 11px; }
.toolbar-search .search-icon { width: 17px; height: 17px; }
.toolbar-search input { min-height: 34px; font-size: 14px; }
.suggestions {
  position: absolute;
  z-index: 5;
  inset: calc(100% + 7px) 0 auto;
  max-height: min(430px, 60vh);
  overflow-y: auto;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  box-shadow: 0 6px 18px #192B3517;
}
.suggestion-group + .suggestion-group { border-top: 1px solid var(--line); }
.suggestion-group-label { padding: 7px 10px 3px; color: var(--muted); font-size: 12px; font-weight: 650; }
.suggestion-item {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 0;
  border-radius: 3px;
  background: transparent;
  text-align: left;
}
.suggestion-item:is(:hover, .active) { color: var(--teal); background: var(--selected); }
.suggestion-name { min-width: 0; overflow-wrap: anywhere; }
.suggestion-name > * { display: block; }
.suggestion-name > span { color: var(--muted); font-size: 13px; }
.suggestion-name > span:empty { display: none; }
.suggestion-code, .suggestion-empty, .load-error { color: var(--muted); font-size: 13px; }
.suggestion-empty { padding: 12px; }
.load-error { margin-top: 16px; color: var(--alert); }

.sample-index { margin-top: 48px; }
.sample-index h2, .list-heading h2 { font-size: 20px; font-weight: 700; line-height: 1.3; }
.sample-index h2 { margin-bottom: 16px; }
.sample-index ul { margin: 0; padding: 0; list-style: none; }
.sample-columns, .sample-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.11fr) 156px 12px;
  align-items: center;
  gap: 18px;
  padding-inline: 14px;
  border-bottom: 1px solid var(--line);
}
.sample-columns, .gene-list-head, .record-columns {
  background: var(--subtle);
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}
.sample-columns { padding-block: 9px; border-top: 1px solid var(--line); }
.sample-row { min-height: 61px; padding-block: 12px; text-decoration: none; }
.sample-row:hover { background: var(--selected); }
.sample-row:focus-visible { outline-offset: -2px; }
.sample-row strong { font-weight: 650; }
.sample-row [lang="en"] { color: var(--ink); }
.sample-row code { color: var(--muted); }
.chevron {
  width: 7px;
  height: 7px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(-45deg);
}

.workspace { padding: 34px 0 68px; }
.disease-overview { padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.overview-kicker { margin-bottom: 6px; color: var(--muted); font-size: 13px; font-weight: 650; }
.overview-title {
  font-size: clamp(29px, 3.15vw, 40px);
  line-height: 1.18;
  letter-spacing: -.025em;
  overflow-wrap: anywhere;
}
.overview-aliases { margin-top: 6px; font-size: 17px; }
.overview-codes { margin-top: 10px; color: var(--muted); line-height: 1.8; }
.overview-codes code { color: var(--ink); font-size: 13px; white-space: nowrap; }
.concept-definition { max-width: 78ch; margin: 14px 0 6px; text-align: start; }
.concept-definition h2 { margin-bottom: 3px; font-size: 14px; font-weight: 650; }
.definition-text { line-height: 1.65; }
.definition-attribution { margin-top: 4px; color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.definition-attribution > a { margin-inline-start: 8px; }
.overview-progress { width: 174px; }
.progress-header { display: flex; justify-content: space-between; gap: 7px; margin-bottom: 4px; color: var(--muted); font-size: 12px; }
.progress-header strong { color: var(--ink); font-variant-numeric: tabular-nums; }
.progress-track {
  display: block;
  width: 100%;
  height: 4px;
  appearance: none;
  overflow: hidden;
  border: 0;
  border-radius: 4px;
  background: var(--line);
  color: var(--teal);
}
.progress-track::-webkit-progress-bar { background: var(--line); }
.progress-track::-webkit-progress-value { background: var(--teal); }
.progress-track::-moz-progress-bar { background: var(--teal); }
.scope-switch, #association-scope { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 9px; }
.scope-label { color: var(--muted); font-size: 13px; }
.scope-current { font-size: 13px; font-weight: 650; }
.scope-switch button {
  min-height: 32px;
  padding: 4px 2px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
}
.scope-switch button:hover { color: var(--teal); }
.scope-switch button[aria-pressed="true"] { border-color: var(--teal); color: var(--teal); font-weight: 650; }
.filter-pill {
  min-height: 34px;
  padding: 5px 10px;
  border: 1px solid transparent;
  border-radius: 4px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
}
.filter-pill:hover { color: var(--teal); background: var(--subtle); }
.filter-pill[aria-pressed="true"] { color: var(--teal); background: var(--selected); border-color: #BDD7D3; font-weight: 650; }
.evidence-legend > summary, .association-keys > summary, .folded-group > summary {
  width: fit-content;
  min-height: 34px;
  padding-block: 6px;
  color: var(--teal);
  font-size: 13px;
  cursor: pointer;
}
.association-keys > summary { min-height: 25px; padding-block: 2px; }
.ontology-panel { padding: 8px 0 2px; }
.ontology-line { display: grid; grid-template-columns: 94px minmax(0, 1fr); align-items: baseline; gap: 8px; }
.ontology-line + .ontology-line { margin-top: 8px; }
.ontology-line > span { color: var(--muted); font-size: 13px; }
.ontology-links { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; font-size: 13px; }
.feature-panel { margin-bottom: 10px; font-size: 13px; }
.feature-panel summary { color: var(--teal); cursor: pointer; overflow-wrap: anywhere; }
.feature-panel > summary { padding-block: 3px; }
.feature-preview { margin-inline-start: 8px; color: var(--muted); }
.feature-panel[open] > summary { margin-bottom: 8px; }
.feature-panel[open] .feature-preview { display: none; }
.feature-panel label { margin-inline-end: 8px; }
.feature-panel input { width: min(100%, 270px); min-height: 34px; padding: 5px 8px; border: 1px solid var(--line); border-radius: 4px; }
.feature-count { margin: 6px 0 3px; color: var(--muted); }
.clinical-features { max-height: 270px; overflow-y: auto; margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.clinical-features li { padding: 6px 8px 6px 1px; border-bottom: 1px solid var(--line); }
.feature-source { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; margin: 4px 0 0 14px; color: var(--muted); overflow-wrap: anywhere; }
.feature-source a, .concept-replacement a { color: var(--teal); text-decoration: underline; text-underline-offset: 2px; }
.concept-replacement, .detail-status { margin: 8px 0; color: var(--muted); font-size: 13px; }
.detail-status { margin-block: 16px; }
.detail-status button { margin-top: 8px; }
.ontology-link { padding: 3px 6px; border: 1px solid var(--line); border-radius: 4px; font-size: 13px; text-align: left; }
button.ontology-link { background: var(--surface); color: var(--teal); }
button.ontology-link:hover { background: var(--selected); }
.ontology-link code { color: var(--muted); white-space: nowrap; }

.review-list { margin-top: 18px; }
.list-heading, .list-summary, .workspace-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 18px;
}
.list-title, .list-counts, .list-options { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 15px; }
.list-title:has(#association-scope:not([hidden])) h2 { padding-inline-end: 14px; border-inline-end: 1px solid var(--line); }
.list-summary { margin-top: 8px; }
.list-counts { gap: 5px 0; font-size: 14px; }
.list-counts > span { white-space: nowrap; }
.list-counts > span + span { margin-inline-start: 10px; padding-inline-start: 10px; border-inline-start: 1px solid var(--line); }
.list-context { color: var(--muted); font-size: 13px; }
.workspace-toolbar { position: relative; margin: 12px 0 9px; }
.filter-pills { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.filter-pill span { margin-inline-start: 4px; font-variant-numeric: tabular-nums; }
.fold-control { display: inline-flex; align-items: center; gap: 8px; min-height: 30px; color: var(--muted); font-size: 13px; cursor: pointer; }

.outline-button, .primary-button, .save-note {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: fit-content;
  min-height: 36px;
  padding: 6px 12px;
  border: 1px solid var(--control-line);
  border-radius: 5px;
  background: var(--surface);
  color: var(--teal);
  font-size: 13px;
  font-weight: 650;
}
.outline-button:hover:enabled { border-color: var(--teal); background: var(--selected); }
.outline-button svg { width: 16px; height: 16px; }
.primary-button, .save-note { border-color: var(--teal); background: var(--teal); color: white; }
:is(.primary-button, .save-note):hover:enabled { border-color: var(--teal-hover); background: var(--teal-hover); }

.association-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, .83fr) minmax(0, 1.42fr) minmax(0, .82fr);
  gap: 24px;
  padding-inline: 14px;
}
.gene-list-head { padding-block: 9px; border-block: 1px solid var(--line); }
.gene-row { padding-block: 12px; border-bottom: 1px solid var(--line); }
.gene-row > div { min-width: 0; overflow-wrap: anywhere; }
.association-name-line, .association-meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 10px; }
.association-meta { margin-top: 3px; }
.gene-main {
  width: fit-content;
  max-width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--teal);
  text-align: left;
  overflow-wrap: anywhere;
}
.gene-main:hover, .text-button:hover { text-decoration: underline; text-underline-offset: 3px; }
.gene-symbol { font-size: 16px; font-weight: 700; line-height: 1.35; }
.gene-symbol.mono { font-size: 18px; }
.gene-name { display: block; margin-top: 2px; color: var(--ink); font-size: 14px; }
.cell-label, .row-details-toggle.text-button { display: none; }
.gene-subline, .cell-note { color: var(--muted); font-size: 12px; }
.cell-note { margin-top: 3px; }
.inheritance-modes { display: flex; flex-wrap: wrap; gap: 1px 7px; align-items: baseline; font-size: 13px; font-family: var(--mono); }
.inheritance-modes > span { white-space: nowrap; }
.inheritance-modes > span:not(:last-child)::after { margin-left: 7px; color: var(--muted); content: "·"; }
.text-button {
  display: block;
  width: fit-content;
  margin-top: 5px;
  padding: 3px 0;
  border: 0;
  background: transparent;
  color: var(--teal);
  font-size: 13px;
  font-weight: 650;
  text-align: left;
}
.gene-row .text-button { margin: 0; padding-block: 0; }
.evidence-count.text-button { font-size: 14px; }
.source-field-summary { margin-top: 2px; font-size: 13px; font-weight: 650; }
.rating-conflict { display: flex; flex-wrap: wrap; gap: 2px 9px; align-items: baseline; margin-top: 4px; color: var(--alert); font-size: 12px; }
.rating-conflict .text-button { font-size: inherit; }
.rating-conflict.strength { color: var(--muted); }
.source-field-summary.conclusion-summary { color: var(--alert); font-weight: 650; }
.association-keys { margin-top: 3px; }
.association-keys ul { margin: 2px 0 0; padding: 0; list-style: none; color: var(--muted); }
.row-review-modes { display: grid; gap: 1px; max-width: 190px; }
.mode-review {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  text-align: left;
  font-size: 13px;
}
.review-mode { color: var(--ink); font-family: var(--mono); }
.review-status { min-width: 4.1em; white-space: nowrap; }
.mode-review:hover .review-status { color: var(--teal); text-decoration: underline; text-underline-offset: 2px; }
.mode-review.confirmed .review-status { color: var(--teal); font-weight: 650; }
.mode-review.disputed .review-status { color: var(--alert); font-weight: 650; }
.mode-state {
  display: inline-block;
  padding: 3px 6px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--subtle);
  color: var(--ink);
  font-size: 12px;
  line-height: 1.45;
}
.mode-state { font-weight: 650; }
.mode-state.confirmed { color: var(--teal); border-color: #C1D9D3; background: var(--selected); }
.mode-state.disputed { color: var(--alert); border-color: #E7CCBF; background: var(--alert-bg); }
.mode-state.excluded { color: var(--muted); background: var(--subtle); }
.aggregate-heading { border-bottom: 1px solid var(--line); }
.aggregate-heading button { display: flex; width: 100%; flex-wrap: wrap; align-items: baseline; gap: 3px 9px; min-height: 42px; padding: 7px 14px; border: 0; background: transparent; font-size: 13px; text-align: left; }
.aggregate-heading button > strong { color: var(--teal); font-size: 16px; }
.aggregate-heading button::before { content: "+"; color: var(--teal); }
.aggregate-heading button[aria-expanded="true"]::before { content: "−"; }
.aggregate-heading button span:last-child { margin-left: auto; color: var(--muted); }
.aggregate-body { background: var(--subtle); }
.no-results-card { padding: 20px 16px; border-bottom: 1px solid var(--line); color: var(--muted); }
.list-footer { margin-top: 12px; color: var(--muted); font-size: 13px; }
.source-field-guide {
  position: absolute;
  z-index: 2;
  inset: 100% 0 auto auto;
  width: min(100%, 640px);
  max-height: min(65dvh, 560px);
  overflow: auto;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: 0 5px 14px #192B3514;
  font-size: 13px;
}
.source-guide-row + .source-guide-row { border-top: 1px solid var(--line); }
.source-guide-summary {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(0, .7fr) minmax(0, 1.1fr);
  align-items: baseline;
  gap: 8px 14px;
  padding: 10px 12px 10px 27px;
  list-style: none;
  overflow-wrap: anywhere;
  cursor: pointer;
}
.source-guide-summary::-webkit-details-marker { display: none; }
.source-guide-summary::before {
  position: absolute;
  inset: 16px auto auto 11px;
  width: 6px;
  height: 6px;
  border-right: 1.5px solid var(--teal);
  border-bottom: 1.5px solid var(--teal);
  transform: rotate(-45deg);
  content: "";
}
.source-guide-row[open] > .source-guide-summary::before { transform: rotate(45deg); }
.source-guide-summary:hover, .source-guide-row[open] > .source-guide-summary { background: var(--subtle); }
.source-guide-summary:focus-visible { outline-offset: -2px; }
.source-guide-summary > span:first-of-type { color: var(--muted); }
.source-guide-values {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 235px), 1fr));
  gap: 10px 16px;
  padding: 8px 12px 11px 27px;
  overflow-wrap: anywhere;
}
.source-guide-values h3 { margin-bottom: 3px; font-size: 13px; }
.source-guide-values ul { margin: 0; padding: 0; list-style: none; }
.source-guide-values li + li { margin-top: 3px; }
.confidence-3 { color: #206446; }
.confidence-2 { color: #7E5108; }
.confidence-1 { color: #992F33; }

body:has(dialog[open]) { overflow: hidden; }
dialog::backdrop { background: #192B354A; }
.evidence-drawer {
  position: fixed;
  inset: 0 0 0 auto;
  width: min(752px, 100%);
  max-width: none;
  max-height: none;
  height: 100%;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
  border: 0;
  border-left: 1px solid var(--line);
  background: var(--canvas);
  color: var(--ink);
  box-shadow: -8px 0 20px #192B3521;
  --drawer-gutter: 26px;
}
.drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 14px;
  padding: 19px var(--drawer-gutter) 16px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.drawer-label { color: var(--muted); font-size: 13px; font-weight: 650; }
.drawer-header > div { min-width: 0; }
.drawer-header h2 { margin: 4px 0 6px; font-size: 28px; font-weight: 700; line-height: 1.25; overflow-wrap: anywhere; }
.drawer-title-slash { color: var(--muted); font-weight: 400; }
.drawer-identifiers { color: var(--muted); font-size: 13px; }
.drawer-identifiers code { white-space: nowrap; }
.icon-button {
  flex: none;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface);
  color: var(--ink);
  font-size: 23px;
  line-height: 1;
}
.icon-button:hover { border-color: var(--teal); color: var(--teal); background: var(--selected); }
.clear-search { width: 26px; height: 26px; border-color: transparent; color: var(--muted); font-size: 20px; }
.drawer-scroll { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 13px var(--drawer-gutter) 32px; }
.drawer-tools, .drawer-section-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 12px;
}
.drawer-tools, .drawer-section-heading { justify-content: space-between; }
.drawer-status-row, .section-count { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.drawer-section { margin-top: 21px; }
.drawer-section-heading { margin-bottom: 9px; }
.drawer-section-heading h3 { font-size: 16px; font-weight: 700; }

.appendix-group-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 86px 104px;
  align-items: center;
  gap: 9px;
  padding-inline: 12px;
}
.appendix-group-columns {
  padding-block: 7px;
  border-block: 1px solid var(--line);
  background: var(--subtle);
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}
.appendix-group { border-bottom: 1px solid var(--line); }
.appendix-group-heading { min-height: 55px; background: var(--surface); }
.appendix-group-heading:has([aria-expanded="true"]) { background: var(--selected); }
.appendix-toggle {
  position: relative;
  display: grid;
  justify-items: start;
  min-width: 0;
  min-height: 42px;
  padding: 6px 0 6px 17px;
  border: 0;
  background: transparent;
  text-align: left;
}
.appendix-toggle::before {
  content: "";
  position: absolute;
  top: 14px;
  left: 1px;
  width: 7px;
  height: 7px;
  border-right: 1.5px solid var(--teal);
  border-bottom: 1.5px solid var(--teal);
  transform: rotate(-45deg);
}
.appendix-toggle[aria-expanded="true"]::before { transform: rotate(45deg); }
.appendix-toggle .mono { color: var(--teal); font-size: 15px; font-weight: 700; overflow-wrap: anywhere; }
.mode-description, .appendix-count { color: var(--muted); font-size: 13px; }
.appendix-count { white-space: nowrap; font-variant-numeric: tabular-nums; }
.group-references.text-button { margin: 0; min-height: 32px; }
.appendix-group-body {
  padding: 12px 12px 15px;
  border-top: 1px solid var(--line);
  background: var(--surface);
}
.appendix-conflict { margin-bottom: 7px; color: var(--alert); font-size: 13px; }

.appendix-records { table-layout: fixed; }
.appendix-records thead th { background: var(--subtle); color: var(--muted); font-size: 12px; }
.appendix-records :is(th, td) { padding: 7px 9px; overflow-wrap: anywhere; white-space: normal; vertical-align: top; }
.appendix-records thead th:nth-child(1) { width: 32%; }
.appendix-records thead th:nth-child(2) { width: 31%; }
.appendix-records thead th:nth-child(4) { width: 58px; text-align: center; }
.appendix-records tbody th { background: var(--surface); font-weight: 400; }
.appendix-records tbody tr:last-child td { border-bottom: 1px solid var(--line); }
.record-source { display: grid; gap: 1px; font-size: 14px; line-height: 1.35; }
.record-source > span, .source-mode { color: var(--muted); font-size: 12px; }
.source-mode { display: block; margin-top: 2px; }
.record-link {
  display: block;
  width: fit-content;
  max-width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--teal);
  text-align: left;
  text-decoration: underline;
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
}
.record-link code { font-size: 12px; overflow-wrap: anywhere; }
.reference-check { text-align: center; }
.reference-check input { vertical-align: middle; cursor: pointer; }
.record-expanded { background: var(--canvas); }
.record-body { font-size: 14px; overflow-wrap: anywhere; }
.raw-record { margin-top: 8px; }
.raw-record pre { max-height: 280px; overflow: auto; white-space: pre-wrap; }
.record-meta, .record-pmids { color: var(--muted); font-size: 13px; }
.record-notes { margin-top: 8px; white-space: pre-wrap; }
.record-pmids { margin-top: 8px; }

.appendix-review { margin-top: 13px; }
.appendix-review h4 { margin: 0 0 7px; font-size: 14px; }
.appendix-review-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 270px), 1fr)); gap: 9px; }
.relation-review {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 5px;
  padding: 9px;
  border: 1px solid var(--line);
  background: var(--canvas);
}
.relation-review-heading, .relationship-key, .relation-review-actions { display: flex; align-items: baseline; gap: 5px 7px; }
.relation-review-heading { align-items: center; justify-content: space-between; flex-wrap: wrap; font-size: 14px; }
.relationship-key { color: var(--muted); }
.relationship-key code { min-width: 0; overflow-wrap: anywhere; user-select: text; }
.copy-key.text-button { flex: none; margin: 0; padding: 0; font-size: 12px; }
.relation-review-actions { justify-content: space-between; flex-wrap: wrap; align-items: center; }
.relation-field { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; font-size: 13px; }
.relation-field select, .review-note textarea, #manual-copy {
  padding: 5px 7px;
  border: 1px solid var(--control-line);
  border-radius: 4px;
  background: var(--surface);
  font-size: 14px;
}
.save-note { min-height: 32px; padding: 4px 9px; }
.review-note > summary { width: fit-content; color: var(--teal); font-size: 13px; cursor: pointer; }
.review-note textarea { width: 100%; margin-top: 5px; resize: vertical; }
.drawer-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex: none;
  padding: 9px var(--drawer-gutter);
  border-top: 1px solid var(--line);
  background: var(--surface);
}
.drawer-footer button { flex: none; }
.drawer-feedback { color: var(--teal); font-size: 13px; }
.evidence-drawer :focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
.review-version, .form-feedback, .snapshot-locator { color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.review-version code { display: block; }
.form-feedback { color: var(--alert); }
:is(.review-version, .form-feedback):empty { display: none; }
.review-history { margin: 0; padding-left: 18px; color: var(--muted); font-size: 13px; }
.review-history time { margin-left: 4px; }

.export-modal {
  width: min(780px, 100% - 32px);
  max-height: calc(100% - 32px);
  overflow: auto;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--canvas);
  color: var(--ink);
  box-shadow: 0 8px 26px #192B3526;
}
.modal-header, .modal-actions { display: flex; align-items: center; gap: 9px; }
.modal-header { justify-content: space-between; }
.modal-header h2 { font-size: 22px; }
.export-scope { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 9px 0 0; padding: 0; border: 0; font-size: 14px; }
.export-scope legend { padding: 0; color: var(--muted); font-size: 13px; }
.export-scope label { display: flex; align-items: center; gap: 5px; min-height: 32px; cursor: pointer; }
.export-summary, .export-help { color: var(--muted); font-size: 13px; }
.export-summary { margin: 8px 0; }
.export-table-wrap { overflow: auto; border: 1px solid var(--line); background: var(--surface); }
table { width: 100%; border-collapse: collapse; text-align: left; }
th, td { padding: 8px 10px; border-bottom: 1px solid var(--line); font-size: 13px; vertical-align: top; }
th { background: var(--subtle); white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
.modal-actions { justify-content: flex-end; margin-top: 13px; }
#manual-copy { min-height: 90px; margin-top: 12px; }
.toast {
  position: fixed;
  z-index: 6;
  inset: auto 18px 18px auto;
  padding: 8px 12px;
  border-radius: 5px;
  background: var(--ink);
  color: white;
  font-size: 13px;
  visibility: hidden;
}
.toast.visible { visibility: visible; }

@media (max-width: 840px) {
  .page-width { width: calc(100% - 48px); }
  .topbar-inner { gap: 18px; }
  .association-grid { gap: 12px; padding-inline: 13px; }
  .sample-columns, .sample-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr) auto 9px; gap: 11px; }
}

@media (max-width: 620px) {
  .page-width { width: calc(100% - 32px); }
  .topbar-inner { min-height: 55px; grid-template-columns: minmax(0, 1fr) auto; gap: 0 12px; }
  .brand-lockup { min-height: 54px; }
  .brand-name { font-size: 19px; }
  .brand-subtitle { font-size: 12px; }
  .topbar-meta { grid-column: 2; grid-row: 1; font-size: 12px; }
  .toolbar-search { grid-column: 1 / -1; justify-self: start; width: 100%; padding-bottom: 10px; }
  .home { padding-top: 42px; }
  .home h1 { margin-bottom: 18px; }
  .home .search-box { min-height: 51px; gap: 8px; padding-inline: 11px; }
  .home input { font-size: 14px; }
  .search-shortcut { display: none; }
  .sample-index { margin-top: 35px; }
  .sample-columns { display: none; }
  .sample-index ul { border-top: 1px solid var(--line); }
  .sample-row {
    grid-template-columns: minmax(0, 1fr) auto 9px;
    gap: 2px 9px;
    padding-inline: 5px;
  }
  .sample-row [lang="en"] { grid-column: 1; grid-row: 2; font-size: 13px; }
  .sample-row code, .sample-row .chevron { grid-row: 1 / span 2; }
  .sample-row code { grid-column: 2; }
  .sample-row .chevron { grid-column: 3; }

  .workspace { padding-top: 23px; }
  .ontology-line { grid-template-columns: 74px minmax(0, 1fr); }
  .workspace-toolbar { gap: 5px 8px; margin-top: 13px; }
  .source-guide-summary { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .source-guide-values { grid-template-columns: minmax(0, 1fr); }
  .filter-pill { padding-inline: 7px; }
  .list-heading { display: grid; grid-template-columns: minmax(0, 1fr) auto; row-gap: 6px; }
  .list-title { display: contents; }
  .list-title:has(#association-scope:not([hidden])) h2 { padding: 0; border: 0; }
  #association-scope { grid-column: 1 / -1; grid-row: 2; }
  #export-open { grid-column: 2; grid-row: 1; }
  .gene-list-head { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .gene-list { border-top: 1px solid var(--line); }
  .gene-row {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.13fr);
    grid-template-areas: "identity identity" "inheritance review" "evidence evidence";
    gap: 8px 12px;
    padding: 10px 7px;
    reading-flow: grid-rows;
  }
  .association-identity { grid-area: identity; }
  .inheritance-cell { grid-area: inheritance; }
  .review-cell { grid-area: review; }
  .evidence-cell { grid-area: evidence; }
  .gene-row:not(.details-open) .association-extra { display: none; }
  .gene-row:not(.details-open) .inheritance-cell .cell-note:not(.source-inheritance) { display: none; }
  .row-details-toggle.text-button { display: block; min-height: 26px; }
  .row-details-toggle::before { content: "+"; margin-inline-end: 5px; }
  .row-details-toggle[aria-expanded="true"]::before { content: "−"; }
  .details-open .association-evidence { padding: 7px 0 2px; border-top: 1px solid var(--line); }
  .mode-review { min-height: 22px; }
  .cell-label { display: block; margin-bottom: 4px; color: var(--muted); font-size: 12px; font-weight: 650; }

  .evidence-drawer { --drawer-gutter: 14px; border-left: 0; }
  .drawer-header { padding-block: 13px; }
  .drawer-label { font-size: 12px; }
  .drawer-header h2 { font-size: 23px; }
  .appendix-group-grid { grid-template-columns: minmax(0, 1fr) 57px 74px; gap: 5px; padding-inline: 7px; }
  .appendix-group-body { padding: 9px 6px 12px; }
  .appendix-records :is(th, td) { padding: 6px 4px; }
  .appendix-records thead th:nth-child(1) { width: 29%; }
  .appendix-records thead th:nth-child(2) { width: 38%; }
  .appendix-records thead th:nth-child(4) { width: 33px; }
  .record-source { font-size: 13px; }
  .record-source-field { font-size: 12px; }
}
