:root {
  color-scheme: light dark;
  --text: #1a1a1a;
  --background: #ffffff;
  --accent: #0b4f8a;
  --rule: #d0d0d0;
}

@media (prefers-color-scheme: dark) {
  :root {
    --text: #f0f0f0;
    --background: #16181c;
    --accent: #7cb8ea;
    --rule: #3a3f45;
  }
}

body {
  margin: 0 auto;
  max-width: 42rem;
  padding: 1.5rem;
  color: var(--text);
  background: var(--background);
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  line-height: 1.6;
}

a {
  color: var(--accent);
}

/* A keyboard-only skip link: off-screen until focused, then a full target. */
.skip-link {
  position: absolute;
  left: 0.5rem;
  top: -3rem;
  z-index: 10;
  padding: 0.5rem 0.75rem;
  color: var(--accent);
  background: var(--background);
  border: 1px solid var(--accent);
  border-radius: 0.25rem;
}

.skip-link:focus {
  top: 0.5rem;
}

.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 1rem;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 0.75rem;
  margin-bottom: 1.5rem;
}

.site-header__home {
  display: inline-block;
  padding: 0.35rem 0;
  font-weight: 700;
  text-decoration: none;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.5rem;
  font-size: 0.95rem;
}

/* Each nav link is a full touch target (WCAG 2.2 target-size), not just the
   text box. */
.site-nav a {
  display: inline-block;
  padding: 0.35rem 0.6rem;
}

.gene-index,
.attribution-sources {
  line-height: 1.7;
}

.gene-index__conditions {
  color: color-mix(in srgb, var(--text) 75%, transparent);
  font-size: 0.9rem;
}

.site-footer {
  border-top: 1px solid var(--rule);
  margin-top: 2rem;
  padding-top: 0.75rem;
  font-size: 0.9rem;
}

.gap-state,
.unknown-state {
  border-left: 3px solid var(--accent);
  padding-left: 1rem;
}

.gene-page__fullname {
  font-size: 0.7em;
  font-weight: 400;
  color: color-mix(in srgb, var(--text) 70%, transparent);
}

.gene-page__aliases,
.condition__other-names {
  font-size: 0.9rem;
  color: color-mix(in srgb, var(--text) 75%, transparent);
}

.pronunciation__label {
  margin-bottom: 0.25rem;
  font-size: 0.9rem;
  color: color-mix(in srgb, var(--text) 75%, transparent);
}

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

.pronunciation__item {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem 0.5rem;
  margin: 0.25rem 0;
}

.pronunciation__name {
  font-weight: 600;
}

.pronunciation__respelling {
  font-style: italic;
}

.pronunciation__speak {
  font: inherit;
  color: var(--accent);
  background: none;
  border: 1px solid var(--rule);
  border-radius: 0.25rem;
  padding: 0.2rem 0.6rem;
  cursor: pointer;
}

.condition {
  margin-top: 2rem;
}

.plain-language > h2,
.condition > h2 {
  border-bottom: 1px solid var(--rule);
  padding-bottom: 0.35rem;
}

.condition h3 {
  margin-bottom: 0.25rem;
}

.source-label {
  margin-bottom: 0.25rem;
  font-size: 0.9rem;
  color: color-mix(in srgb, var(--text) 75%, transparent);
}

.attribution {
  font-size: 0.8rem;
  color: color-mix(in srgb, var(--text) 70%, transparent);
}

.reference-tier {
  margin-top: 2rem;
  border-top: 1px solid var(--rule);
  padding-top: 0.75rem;
}

.reference-tier summary {
  cursor: pointer;
  font-weight: 700;
}

.reference-tier__intro {
  font-size: 0.9rem;
  color: color-mix(in srgb, var(--text) 75%, transparent);
}

.reference-field {
  margin-top: 1rem;
}

.reference-field > h3 {
  margin-bottom: 0.25rem;
}

.reference-field__why {
  font-size: 0.9rem;
  font-style: italic;
  color: color-mix(in srgb, var(--text) 80%, transparent);
}

.ideogram {
  display: block;
  margin: 0.5rem 0;
  border: 1px solid var(--rule);
}

.family-care,
.reader-resources,
.disclaimer {
  margin-top: 2rem;
}

.family-care h2,
.reader-resources h2,
.disclaimer h2 {
  border-bottom: 1px solid var(--rule);
  padding-bottom: 0.35rem;
}

.family-care__intro,
.trials-count {
  font-size: 0.9rem;
  color: color-mix(in srgb, var(--text) 75%, transparent);
}

.trials-list__id {
  color: color-mix(in srgb, var(--text) 65%, transparent);
  font-size: 0.85rem;
}

.disclaimer {
  border-left: 3px solid var(--accent);
  padding-left: 1rem;
}
