:root {
  --ink: #1b3038;
  --ink-soft: #52666e;
  --surface: #ffffff;
  --surface-soft: #f5f7f7;
  --page: #f5f7f7;
  --line: #d8e1e3;
  --brand: #176d74;
  --brand-dark: #10555b;
  --warning: #8a4f08;
  --radius-sm: 6px;
  --radius: 12px;
  --radius-lg: 20px;
  --shadow: 0 14px 36px rgba(27, 48, 56, 0.08);
  --content: 1180px;
  --reading-width: 920px;
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;
  --text-4xl: 2.25rem;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--surface-soft);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: var(--text-base);
  line-height: 1.5;
}

body,
button,
input,
select,
textarea {
  font-family: inherit;
}

h1,
h2,
h3,
h4 {
  line-height: 1.2;
  letter-spacing: -0.02em;
}

p,
li {
  text-wrap: pretty;
}

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

a:hover {
  color: var(--brand-dark);
}

:focus-visible {
  outline: 3px solid rgba(23, 109, 116, 0.35);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 2000;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: var(--ink);
  color: white;
  transform: translateY(-150%);
}

.skip-link:focus {
  color: white;
  transform: translateY(0);
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  width: 100%;
  padding: 0;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.app-header.is-scrolled {
  box-shadow: 0 8px 30px rgba(16, 47, 54, 0.08);
}

.app-header__inner {
  width: min(calc(100% - 40px), var(--content));
  min-height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 28px;
}

.app-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-size: 1.05rem;
  font-weight: 750;
  letter-spacing: -0.02em;
}

.app-brand:hover {
  color: var(--ink);
}

.app-brand img {
  width: auto;
  height: 34px;
}

.app-nav {
  margin-left: auto;
}

.app-nav > ul {
  display: flex;
  align-items: center;
  gap: 5px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.app-nav a,
.app-nav button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 42px;
  padding: 8px 13px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--ink-soft);
  font-size: var(--text-sm);
  font-weight: 650;
  cursor: pointer;
}

.app-nav a:hover,
.app-nav a.active,
.app-nav button:hover,
.app-nav button.active {
  background: var(--surface-soft);
  color: var(--ink);
}

.app-nav__dropdown {
  position: relative;
}

.app-nav__dropdown > ul {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  display: block;
  width: 292px;
  margin: 0;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow);
  list-style: none;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px) scale(.98);
  transform-origin: top right;
  visibility: hidden;
  transition:
    opacity 140ms ease,
    transform 140ms ease,
    visibility 140ms;
}

.app-nav__dropdown.is-open > ul {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
  visibility: visible;
}

.app-nav__dropdown > ul a {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  width: 100%;
  min-height: 52px;
  padding: 9px 10px;
  border-radius: 9px;
}

.app-nav__dropdown > ul a:hover,
.app-nav__dropdown > ul a:focus-visible {
  background: var(--surface-soft);
}

.app-nav__dropdown > ul a > i {
  display: grid;
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 8px;
  background: #e7f1ef;
  color: var(--brand);
}

.app-nav__dropdown > ul a span,
.app-nav__dropdown > ul a strong,
.app-nav__dropdown > ul a small {
  display: block;
}

.app-nav__dropdown > ul a strong {
  color: var(--ink);
  font-size: .86rem;
}

.app-nav__dropdown > ul a small {
  margin-top: 1px;
  color: var(--ink-soft);
  font-size: .72rem;
  font-weight: 520;
  line-height: 1.3;
}

.app-nav__dropdown > button > i {
  transition: transform 150ms ease;
}

.app-nav__dropdown.is-open > button > i {
  transform: rotate(180deg);
}

.app-partner {
  color: var(--ink-soft);
  font-size: 0.82rem;
  font-weight: 650;
  white-space: nowrap;
}

.app-partner img {
  display: block;
  width: 142px;
  height: 34px;
  object-fit: contain;
}

.app-nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  margin-left: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
  font-size: 1.45rem;
}

#main-content {
  min-height: calc(100vh - 150px);
}

.app-footer {
  display: flex;
  justify-content: space-between;
  gap: 30px;
  width: min(calc(100% - 40px), var(--content));
  margin: 72px auto 0;
  padding: 28px 0 36px;
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.app-footer div {
  display: flex;
  flex-direction: column;
}

.app-footer strong {
  color: var(--ink);
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--brand);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.app-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 44px;
  padding: 9px 17px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-size: 0.94rem;
  font-weight: 700;
}

.app-button--primary {
  background: var(--brand);
  color: white;
}

.app-button--primary:hover {
  background: var(--brand-dark);
  color: white;
}

.app-button--secondary {
  border-color: var(--line);
  background: var(--surface);
  color: var(--ink);
}

.home-content,
.partner-strip {
  width: min(calc(100% - 40px), var(--content));
  margin-inline: auto;
}

.home-content {
  max-width: 1040px;
  padding: 64px 0 24px;
}

.home-content__header {
  max-width: 820px;
  padding-bottom: 32px;
}

.home-content__header h1 {
  max-width: 800px;
  margin: 0 0 20px;
  color: var(--ink);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.14;
}

.home-content__header p {
  max-width: 760px;
  margin: 0;
  color: var(--ink-soft);
  font-size: 1.08rem;
  line-height: 1.6;
}

.home-destinations {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.home-destination {
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  gap: 18px;
  min-height: 270px;
  padding: clamp(24px, 4vw, 34px);
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: 0 10px 30px rgba(16, 47, 54, 0.045);
}

.home-destination__icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 10px;
  background: #e8f2f0;
  color: var(--brand);
  font-size: 1.15rem;
}

.home-destination h2,
.home-project-note h2 {
  margin: 0 0 8px;
  color: var(--ink);
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.home-destination p,
.home-project-note p {
  max-width: 690px;
  margin: 0;
  color: var(--ink-soft);
}

.home-project-note {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 30px;
  align-items: end;
  margin-top: 18px;
  padding: 28px 30px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #edf5f3;
}

.section-heading {
  max-width: 700px;
  margin-bottom: 34px;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 750;
  white-space: nowrap;
}

.partner-strip {
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.partner-strip > span {
  color: var(--ink-soft);
  font-size: 0.78rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.partner-strip > div {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  margin-top: 24px;
}

.partner-strip img {
  width: auto;
  max-width: 145px;
  height: 46px;
  object-fit: contain;
  filter: grayscale(.35);
  opacity: 0.82;
}

/* Data application pages */
.tool-hero {
  padding: 23px 0 20px;
  background: #1d4149;
  color: white;
}

.tool-hero__inner,
.tool-workspace {
  width: min(calc(100% - 40px), var(--content));
  margin-inline: auto;
}

.tool-hero__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: min(calc(100% - 40px), 1080px);
}

.tool-hero__inner > *,
.tool-links {
  min-width: 0;
  max-width: 100%;
}

.tool-hero h1 {
  margin: 0;
  color: white;
  font-size: clamp(1.55rem, 3vw, 2.05rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.12;
}

.tool-hero .eyebrow {
  margin-bottom: 5px;
  color: #a9d3cd;
}

.information-hero .tool-hero__inner > div > p:last-child {
  max-width: 620px;
  margin: 5px 0 0;
  color: #d3e0e2;
  font-size: .88rem;
}

.tool-hero__title {
  flex: 0 1 auto;
}

.tool-hero__heading {
  display: flex;
  align-items: center;
  gap: 10px;
}

.tool-hero__info {
  position: relative;
  display: grid;
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(255,255,255,.28);
  border-radius: 50%;
  background: rgba(255,255,255,.08);
  color: #e5f0f1;
  cursor: help;
}

.tool-hero__info:hover,
.tool-hero__info:focus-visible {
  border-color: rgba(255,255,255,.6);
  background: rgba(255,255,255,.16);
  color: white;
}

.tool-hero__info [role="tooltip"] {
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  z-index: 30;
  width: min(310px, calc(100vw - 36px));
  max-width: calc(100vw - 36px);
  padding: 10px 12px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 9px;
  background: #102f36;
  box-shadow: 0 12px 30px rgba(4, 24, 29, .28);
  color: #e3edef;
  font-size: .78rem;
  font-weight: 520;
  line-height: 1.45;
  opacity: 0;
  pointer-events: none;
  text-align: left;
  white-space: normal;
  overflow-wrap: anywhere;
  transform: translate(-50%, -4px);
  visibility: hidden;
  transition: opacity 130ms ease, transform 130ms ease, visibility 130ms;
}

.tool-hero__info:hover [role="tooltip"],
.tool-hero__info:focus-visible [role="tooltip"] {
  opacity: 1;
  transform: translate(-50%, 0);
  visibility: visible;
}

.tool-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tool-links a {
  padding: 7px 10px;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 7px;
  color: white;
  font-size: 0.82rem;
  white-space: nowrap;
}

.tool-links a:hover,
.tool-links a:focus-visible,
.tool-links a.active {
  border-color: rgba(255, 255, 255, .48);
  background: rgba(255, 255, 255, .09);
  color: white;
}

.tool-workspace {
  padding-top: 28px;
}

/* Shared treatment for legacy information pages */
.staticpage {
  padding: 44px 20px 12px !important;
  background: var(--surface-soft);
}

.staticpage > .container,
.section-bg > .container {
  width: min(100%, var(--reading-width));
  max-width: var(--reading-width) !important;
  margin: 0 auto;
  padding: clamp(26px, 5vw, 46px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink-soft);
}

.section-bg {
  padding: 32px 20px 12px !important;
  background: var(--surface-soft) !important;
}

.staticpage h1,
.section-bg h1 {
  margin: 0 0 22px;
  color: var(--ink);
  font-size: clamp(1.85rem, 4vw, 2.45rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.18;
}

.staticpage h2,
.section-bg h2 {
  margin: 30px 0 12px;
  color: var(--ink);
  font-size: clamp(1.25rem, 2vw, 1.5rem);
  font-weight: 700;
  letter-spacing: -0.018em;
  line-height: 1.3;
}

.staticpage h3,
.section-bg h3 {
  margin: 24px 0 10px;
  color: var(--ink);
  font-size: 1.08rem;
  font-weight: 700;
}

.staticpage p,
.staticpage li,
.section-bg p,
.section-bg li {
  color: var(--ink-soft);
  font-size: 0.98rem;
}

.staticpage a,
.section-bg a {
  color: var(--brand);
  text-decoration: underline;
  text-decoration-color: rgba(23, 109, 116, .3);
  text-underline-offset: 3px;
}

.staticpage a:hover,
.section-bg a:hover {
  color: var(--brand-dark);
  text-decoration-color: currentColor;
}

.staticpage img,
.section-bg img {
  max-width: 100%;
  height: auto;
}

.staticpage .content-main,
.staticpage .middle,
.staticpage .long-text {
  background: transparent !important;
  color: var(--ink-soft) !important;
}

.staticpage .content-main *,
.staticpage .middle *,
.staticpage .long-text * {
  color: inherit;
}

.staticpage .content-main h1,
.staticpage .content-main h2,
.staticpage .content-main h3,
.staticpage .middle h1,
.staticpage .middle h2,
.staticpage .middle h3 {
  color: var(--ink) !important;
}

.staticpage .content-main a,
.staticpage .middle a,
.staticpage .long-text a {
  color: var(--brand) !important;
}

.team-directory {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 42px;
}

.team-directory h2 {
  padding-top: 6px;
  border-top: 1px solid var(--line);
}

.team-directory ul {
  margin: 0 0 28px;
  padding-left: 20px;
}

.staticpage .team-directory li {
  color: #314a53 !important;
}

.staticpage .team-directory li::marker {
  color: var(--brand);
}

/* Compact tool titles, public API, and overlay fixes --------------------- */
.tool-hero {
  position: relative;
  z-index: 10;
  overflow: visible;
}

.tool-hero__heading,
.tool-hero__heading h1 {
  white-space: nowrap;
}

.tool-hero__heading h1 {
  font-size: clamp(1.35rem, 2.25vw, 1.8rem);
}

.tool-hero__info [role="tooltip"] {
  z-index: 100;
}

.app-footer__links {
  align-items: flex-end;
  gap: 5px;
}

.api-hero .tool-hero__inner {
  width: min(calc(100% - 40px), 1000px);
}

.api-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 11px;
  border: 1px solid rgba(255, 255, 255, .24);
  border-radius: 999px;
  color: #e5f0f1;
  font-size: .78rem;
  font-weight: 700;
  white-space: nowrap;
}

.api-status span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #6fd1ad;
  box-shadow: 0 0 0 4px rgba(111, 209, 173, .12);
}

.api-documentation {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: clamp(34px, 6vw, 76px);
  width: min(calc(100% - 40px), 1000px);
  margin: 42px auto 0;
}

.api-sidebar {
  position: sticky;
  top: 96px;
  display: flex;
  align-self: start;
  flex-direction: column;
  gap: 4px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}

.api-sidebar strong {
  margin: 5px 8px 9px;
  color: var(--ink);
  font-size: .78rem;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.api-sidebar a {
  padding: 8px;
  border-radius: 7px;
  color: var(--ink-soft);
  font-size: .82rem;
  font-weight: 650;
}

.api-sidebar a:hover {
  background: var(--surface-soft);
  color: var(--brand-dark);
}

.api-content {
  min-width: 0;
}

.api-content > section {
  padding: 4px 0 38px;
  scroll-margin-top: 100px;
}

.api-content > section + section {
  padding-top: 34px;
  border-top: 1px solid var(--line);
}

.api-content h2 {
  margin: 0 0 10px;
  color: var(--ink);
  font-size: clamp(1.45rem, 3vw, 2rem);
  letter-spacing: -.025em;
}

.api-content p {
  max-width: 700px;
  color: var(--ink-soft);
  line-height: 1.65;
}

.api-content code {
  color: #184f58;
  font-size: .83em;
}

.api-code-block {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 22px;
  padding: 12px 13px 12px 16px;
  border: 1px solid #c9ded9;
  border-radius: 10px;
  background: #edf5f3;
}

.api-code-block > div {
  display: flex;
  align-items: center;
  min-width: 0;
  flex-direction: row;
  gap: 10px;
}

.api-code-block span,
.api-method {
  color: var(--brand-dark);
  font-size: .7rem;
  font-weight: 850;
  letter-spacing: .06em;
}

.api-code-block code {
  overflow-wrap: anywhere;
}

.api-try {
  flex: 0 0 auto;
  padding: 8px 11px;
  border: 0;
  border-radius: 7px;
  background: var(--brand);
  color: white;
  font-size: .76rem;
  font-weight: 750;
}

.api-try:disabled {
  opacity: .65;
}

.api-output {
  min-height: 150px;
  max-height: 430px;
  margin: 12px 0 0;
  padding: 18px;
  border: 1px solid #263e44;
  border-radius: 10px;
  background: #102f36;
  color: #dcebea;
  font: 500 .76rem/1.55 ui-monospace, SFMono-Regular, Menlo, monospace;
  overflow: auto;
  white-space: pre-wrap;
}

.api-endpoint-list {
  display: grid;
  gap: 8px;
  margin-top: 20px;
}

.api-endpoint-list article {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 14px;
  padding: 15px 0;
  border-bottom: 1px solid #e6ecec;
}

.api-endpoint-list p {
  margin: 4px 0 0;
  font-size: .82rem;
  line-height: 1.45;
}

.api-client-examples {
  display: grid;
  gap: 8px;
  margin-top: 20px;
}

.api-client-examples > div {
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr);
  gap: 12px;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fafcfc;
  overflow-wrap: anywhere;
}

.api-client-examples strong {
  color: var(--ink);
  font-size: .78rem;
}

@media (max-width: 960px) {
  .tool-hero__heading,
  .tool-hero__heading h1 {
    white-space: normal;
  }
}

@media (max-width: 760px) {
  .team-directory,
  .api-documentation {
    grid-template-columns: 1fr;
  }

  .team-directory {
    gap: 0;
  }

  .api-sidebar {
    position: static;
    display: none;
  }

  .app-footer__links {
    align-items: flex-start;
  }

  .api-code-block {
    align-items: stretch;
    flex-direction: column;
  }

  .api-try {
    align-self: flex-start;
  }
}

.project-timeline {
  position: relative;
  padding-left: 24px;
  list-style: none;
}

.project-timeline::before {
  position: absolute;
  top: 8px;
  bottom: 8px;
  left: 5px;
  width: 2px;
  background: #c7dcd8;
  content: "";
}

.project-timeline li {
  position: relative;
  margin-bottom: 13px;
}

.project-timeline li::before {
  position: absolute;
  top: 0.62em;
  left: -23px;
  width: 10px;
  height: 10px;
  border: 2px solid var(--surface);
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 0 1px var(--brand);
  content: "";
}

.download-list {
  display: grid;
  gap: 10px;
  padding-left: 0;
  list-style: none;
}

.download-list li {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #f8fbfa;
}

.download-list a {
  display: block;
  font-weight: 700;
}

.search-card,
.analysis-card,
.results-shell {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 10px 30px rgba(16, 47, 54, 0.04);
}

.results-shell[hidden] {
  display: none !important;
}

.results-empty {
  display: grid;
  min-height: 420px;
  place-content: center;
  max-width: 620px;
  margin: auto;
  padding: 40px 20px;
  text-align: center;
}

.results-empty h2 {
  margin: 0 0 10px;
  color: var(--ink);
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  letter-spacing: -0.035em;
}

.results-empty p:last-child {
  color: var(--ink-soft);
}

.search-card {
  padding: clamp(20px, 4vw, 34px);
}

.tool-hero + .section-bg {
  padding: clamp(30px, 5vw, 64px) 20px 72px;
  background: linear-gradient(180deg, #f4f8f7 0, #fff 240px);
}

.tool-hero + .section-bg > .container {
  max-width: 1040px;
  padding: clamp(24px, 4vw, 48px);
  border: 1px solid var(--line);
  border-radius: 16px;
  background: white;
  box-shadow: 0 12px 36px rgba(20, 60, 55, 0.07);
}

.tool-hero + .section-bg h1,
.tool-hero + .section-bg h2 {
  color: var(--ink);
  letter-spacing: -0.025em;
}

.tool-hero + .section-bg h2 {
  margin-top: 0;
  font-size: clamp(1.55rem, 3vw, 2.15rem);
}

.tool-hero + .section-bg h3 {
  margin-top: 30px;
  color: var(--brand-dark);
  font-size: 1.08rem;
}

.tool-hero + .section-bg p,
.tool-hero + .section-bg li {
  color: var(--ink-soft);
  line-height: 1.72;
}

.page-lead {
  max-width: 760px;
  font-size: 1.05rem;
}

.resource-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 28px 0;
}

.resource-facts > div {
  padding: 18px;
  border: 1px solid #d8e7e4;
  border-radius: 12px;
  background: #f5faf8;
}

.resource-facts strong,
.resource-facts span {
  display: block;
}

.resource-facts strong {
  color: var(--brand-dark);
  font-size: 1.35rem;
}

.resource-facts span {
  margin-top: 4px;
  color: var(--ink-soft);
  font-size: 0.78rem;
}

.resource-callout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin: 30px 0;
  padding: 22px;
  border-left: 4px solid var(--brand);
  border-radius: 0 12px 12px 0;
  background: #edf7f4;
}

.resource-callout h3,
.resource-callout p {
  margin: 0;
}

.resource-callout p {
  margin-top: 4px;
}

.primary-link {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 8px;
  padding: 11px 15px;
  border-radius: 9px;
  background: var(--brand);
  color: white;
  font-weight: 750;
}

.primary-link:hover {
  background: var(--brand-dark);
  color: white;
}

@media (max-width: 720px) {
  .resource-facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .resource-callout {
    align-items: flex-start;
    flex-direction: column;
  }
}

.search-card__heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.search-card h2,
.analysis-card h2 {
  margin: 0;
  color: var(--ink);
  font-size: 1.25rem;
  font-weight: 700;
}

.search-card__heading p {
  margin: 4px 0 0;
  color: var(--ink-soft);
}

.search-grid {
  display: grid;
  grid-template-columns: 180px minmax(260px, 1fr) 130px;
  gap: 12px;
  align-items: end;
}

.search-mode-picker {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 20px;
}

.search-mode {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  min-height: 82px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--ink-soft);
  text-align: left;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.search-mode:hover {
  border-color: #77aaa2;
  box-shadow: 0 6px 18px rgba(21, 73, 66, 0.08);
  transform: translateY(-1px);
}

.search-mode.is-active {
  border-color: var(--brand);
  background: #f1f8f6;
  box-shadow: inset 0 -3px 0 var(--brand);
  color: var(--ink);
}

.search-mode > i {
  color: var(--brand);
  font-size: 1.15rem;
}

.search-mode span,
.search-mode small {
  display: block;
}

.search-mode strong {
  font-size: 0.9rem;
}

.search-mode small {
  margin-top: 3px;
  color: var(--ink-soft);
  font-size: 0.73rem;
  line-height: 1.35;
}

.search-grid--query {
  grid-template-columns: minmax(280px, 1fr) 130px;
}

.field-group {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.field-label,
.search-options legend {
  margin: 0;
  color: var(--ink);
  font-size: 0.8rem;
  font-weight: 780;
  letter-spacing: 0.02em;
}

.search-card select,
.search-card textarea,
.analysis-card select,
.analysis-card textarea {
  width: 100%;
  min-height: 48px;
  padding: 11px 13px;
  border: 1px solid #b9ceca;
  border-radius: 10px;
  background: white;
  color: var(--ink);
}

.search-card textarea {
  min-height: 74px;
  resize: vertical;
}

.search-submit,
.btn-submit,
.btn-submit-pheno {
  min-height: 44px;
  padding: 10px 18px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: var(--brand);
  color: white;
  font-weight: 760;
}

.search-submit:hover,
.btn-submit:hover,
.btn-submit-pheno:hover,
.btn-submit-pheno.active {
  background: var(--brand-dark);
  color: white;
}

.search-options {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 24px;
  margin-top: 24px;
  padding: 20px 0 0;
  border-top: 1px solid var(--line);
}

.choice-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 15px;
  margin-top: 8px;
  padding: 0;
  list-style: none;
}

.choice-list li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.search-help {
  margin: 8px 0 0;
  color: var(--ink-soft);
  font-size: 0.82rem;
}

.analysis-card {
  display: grid;
  grid-template-columns: minmax(210px, 0.32fr) 1fr;
  align-items: start;
  gap: 28px;
  margin-top: 24px;
  padding: clamp(20px, 4vw, 32px);
}

.analysis-form {
  min-width: 0;
  min-height: 350px;
}

.phenotype-query-form {
  display: grid !important;
  grid-template-columns: minmax(280px, 1fr) auto;
  gap: 12px;
  align-items: end !important;
}

.phenotype-mode-panel,
.phenotype-mode-panel[hidden] {
  display: none !important;
}

.phenotype-mode-panel.is-active {
  display: block !important;
  height: 350px;
  min-width: 0;
  padding: 20px;
  border: 1px solid #dce9e6;
  border-radius: 14px;
  background: linear-gradient(145deg, #fff, #f7fbfa);
  animation: phenotype-panel-enter 140ms ease-out;
}

.phenotype-mode-panel.is-active:not([data-phenotype-panel="PhenoPara"]) {
  overflow: auto;
  scrollbar-gutter: stable;
}

@keyframes phenotype-panel-enter {
  from {
    opacity: .7;
  }
  to {
    opacity: 1;
  }
}

.phenotype-mode-panel__heading {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 18px;
}

.phenotype-mode-panel__heading > i {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 10px;
  background: #e3f1ee;
  color: var(--brand-dark);
  font-size: 1rem;
}

.phenotype-mode-panel__heading h3,
.phenotype-mode-panel__heading p {
  margin: 0;
}

.phenotype-mode-panel__heading h3 {
  color: var(--ink);
  font-size: 1.02rem;
}

.phenotype-mode-panel__heading p {
  margin-top: 3px;
  color: var(--ink-soft);
  font-size: 0.8rem;
}

.phenotype-mode-panel select,
.phenotype-mode-panel textarea {
  border-color: #abc8c2;
  background: white;
}

.phenotype-parameter-submit {
  justify-self: end;
  margin: 10px 4px 0 0;
}

.phenotype-query-form--enrichment {
  grid-template-columns: minmax(220px, 0.7fr) minmax(280px, 1fr) auto;
}

.phenotype-form-actions {
  display: grid;
  gap: 7px;
  align-self: end;
}

.phenotype-form-actions .btn-link {
  color: var(--brand-dark);
  font-size: 0.8rem;
}

.analysis-form .phenotype-parameter-form {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  align-items: stretch;
  gap: 0;
  height: calc(100% - 74px);
  min-height: 0;
  width: 100%;
}

.phenotype-query-form .field-group {
  min-width: 0;
}

.phenotype-query-form textarea {
  min-height: 54px;
  max-height: 120px;
  resize: vertical;
}

.phenotype-query-form > .btn-submit {
  min-width: 110px;
  min-height: 54px;
}

.analysis-menu {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.analysis-menu .btn-submit-pheno {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  border-radius: 10px;
}

.analysis-menu .btn-submit-pheno > i {
  margin-top: 2px;
  color: var(--brand);
}

.analysis-menu .btn-submit-pheno span,
.analysis-menu .btn-submit-pheno small {
  display: block;
}

.analysis-menu .btn-submit-pheno strong {
  font-size: 0.84rem;
}

.analysis-menu .btn-submit-pheno small {
  margin-top: 2px;
  color: var(--ink-soft);
  font-size: 0.68rem;
  font-weight: 520;
  line-height: 1.3;
}

.analysis-menu .btn-submit-pheno.active {
  box-shadow: inset 3px 0 0 var(--brand);
}

#resultSectionPheno {
  min-height: min(760px, calc(100dvh - 150px));
}

#resultSectionPheno #tabs {
  display: flex !important;
  align-items: center;
  flex: 1 1 auto;
  gap: 12px;
  width: auto !important;
  min-width: 0;
  padding: 0 !important;
  overflow-x: auto;
  scrollbar-width: thin;
}

.phenotype-tab-group {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 5px;
}

.phenotype-tab-group + .phenotype-tab-group {
  margin: 0 0 0 8px;
  padding: 0 0 0 16px;
  border-top: 0;
  border-left: 2px dotted #9bbcb6;
}

.phenotype-tab-group__label {
  margin: 0 5px 0 0;
  color: #6b8580;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

#resultSectionPheno .phenotype-tab-group .tablinks {
  width: auto;
  min-height: 38px;
  margin: 0;
  white-space: nowrap;
}

#resultSectionPheno .uppertabContent {
  min-height: 600px;
}

#resultSectionPheno .plot-container,
#resultSectionPheno .js-plotly-plot {
  max-width: 100%;
}

.phenotype-plot-workspace {
  width: 100%;
}

.phenotype-plot-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.phenotype-plot-header h3 {
  margin: 0;
  color: var(--ink);
  font-size: 1.15rem;
  font-weight: 760;
}

.phenotype-plot-eyebrow {
  margin: 0 0 2px;
  color: var(--brand);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.phenotype-plot-description {
  margin: 3px 0 0;
  color: var(--ink-soft);
  font-size: 0.78rem;
}

.phenotype-stage-nav {
  display: flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #f4f7f6;
  overflow-x: auto;
}

.phenotype-stage-button {
  flex: 1 0 auto;
  min-height: 38px;
  padding: 7px 16px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink-soft);
  font-size: 0.84rem;
  font-weight: 720;
  white-space: nowrap;
}

.phenotype-stage-button:hover,
.phenotype-stage-button.is-active {
  background: white;
  color: var(--brand-dark);
  box-shadow: 0 2px 8px rgba(20, 58, 52, 0.1);
}

.phenotype-variant-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 10px;
}

.phenotype-variant-button {
  min-height: 34px;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: white;
  color: var(--ink-soft);
  font-size: 0.78rem;
  font-weight: 680;
}

.phenotype-variant-button:hover,
.phenotype-variant-button.is-active {
  border-color: var(--brand);
  background: #e8f2f0;
  color: var(--brand-dark);
}

.plot-export-actions {
  display: flex;
  align-items: center;
  gap: 5px;
}

.plot-export-actions span {
  margin-right: 3px;
  color: var(--ink-soft);
  font-size: 0.72rem;
  font-weight: 680;
}

.plot-export-actions button {
  min-height: 32px;
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: white;
  color: var(--brand-dark);
  font-size: 0.72rem;
  font-weight: 760;
}

.plot-export-actions button:hover {
  border-color: var(--brand);
  background: #e8f2f0;
}

.plot-placeholder {
  display: grid;
  min-height: 320px;
  place-items: center;
  border: 1px dashed var(--line);
  border-radius: 12px;
  background: #fbfcfc;
  color: var(--ink-soft);
  font-size: 0.88rem;
}

.phenotype-plot-message {
  margin: 10px 0 0;
  color: var(--ink-soft);
  font-size: 0.78rem;
}

.phenotype-square-plot {
  width: min(100%, 820px);
  aspect-ratio: 1;
  margin: 12px auto 0;
}

.phenotype-square-plot[aria-busy="true"] {
  min-height: 320px;
  opacity: 0.28;
}

.phenotype-square-plot {
  transition: opacity 160ms ease;
}

@media (max-width: 700px) {
  .phenotype-plot-header {
    align-items: stretch;
    flex-direction: column;
  }

  .phenotype-stage-button {
    flex: 0 0 auto;
  }
}

#resultSectionPheno:fullscreen .phenotype-square-plot {
  width: min(100%, 1180px);
}

.phenotype-summary-workspace {
  padding: clamp(14px, 2vw, 22px) !important;
}

.phenotype-summary-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 10px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.phenotype-summary-context,
.phenotype-summary-views,
.phenotype-summary-navigation {
  display: flex;
  align-items: center;
  gap: 6px;
}

.summary-view-button,
.summary-navigation-button,
.summary-return-button {
  min-height: 36px;
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--ink-soft);
  font-size: 0.78rem;
  font-weight: 720;
}

.summary-view-button:hover,
.summary-view-button.is-active,
.summary-navigation-button:hover,
.summary-return-button:hover {
  border-color: var(--brand);
  background: #e8f2f0;
  color: var(--brand-dark);
}

.summary-navigation-button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.summary-return-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-right: 4px;
  border-color: #b9d4cf;
  color: var(--brand-dark);
}

.summary-return-button[hidden] {
  display: none;
}

.enrichment-result-summary {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
  padding: 12px 14px;
  border: 1px solid #c9dfda;
  border-radius: 10px;
  background: #f1f7f5;
}

.enrichment-result-summary p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.84rem;
}

.enrichment-result-summary span {
  flex: 0 0 auto;
  color: var(--brand-dark);
  font-size: 0.78rem;
  font-weight: 750;
}

.analysis-empty-state {
  max-width: 720px;
  margin: clamp(24px, 6vh, 70px) auto;
  padding: clamp(22px, 4vw, 38px);
  border: 1px dashed #aacac3;
  border-radius: 14px;
  background: #f7faf9;
  text-align: center;
}

.analysis-empty-state h3 {
  margin: 5px 0 10px;
  color: var(--ink);
}

.analysis-empty-state > p {
  color: var(--ink-soft);
}

.analysis-empty-state__guidance {
  margin: 15px auto 0;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 0.82rem;
}

.enrichment-cluster-image {
  display: block;
  width: min(280px, 42vw);
  height: 92px;
  border-radius: 8px;
  object-fit: contain;
}

.summary-navigation-button:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}

#navigationStatus {
  min-width: 88px;
  color: var(--ink-soft);
  font-size: 0.76rem;
  font-weight: 680;
  text-align: center;
}

.phenotype-summary-note {
  margin: 14px auto 0;
  color: var(--ink-soft);
  font-size: 0.78rem;
  font-style: italic;
  text-align: center;
}

.phenotype-drilldown-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
  padding: 12px 14px;
  border: 1px solid #c9dfda;
  border-radius: 10px;
  background: #edf5f3;
}

.phenotype-drilldown-header p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.82rem;
}

#tabSummaryPhenoDiv {
  margin-top: 8px;
}

#tabSummaryPhenoDivuppertab > .plot-export-actions {
  justify-content: flex-end;
  margin: 4px 0 8px;
}

#slider-container {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-content: start;
  gap: 7px;
  width: 100%;
  min-height: 0;
  padding: 4px 10px 4px 4px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

#slider-container > .row:first-child {
  display: none;
}

#slider-container .row {
  display: grid;
  grid-template-columns: minmax(105px, .8fr) minmax(150px, 1.2fr) 28px;
  align-items: center;
  gap: 9px;
  margin: 0;
  min-height: 48px;
  padding: 8px 10px;
  border: 1px solid #e1ebe9;
  border-radius: 9px;
  background: #fbfdfc;
}

#slider-container .row > [class*="col-"] {
  width: auto;
  padding: 0;
}

#slider-container .row label {
  margin: 0;
  color: var(--ink);
  font-size: .74rem;
  font-weight: 680;
  line-height: 1.25;
}

#slider-container .noUi-target {
  height: 7px;
  border: 0;
  background: #dce9e6;
  box-shadow: none;
}

#slider-container .noUi-connect {
  background: var(--brand);
}

#slider-container .noUi-handle {
  width: 28px;
  height: 28px;
  border-color: #8bb7af;
  border-radius: 50%;
  font-size: 0.64rem;
  line-height: 26px;
  text-align: center;
}

.phenotype-parameter-loading {
  min-height: 0;
  display: grid;
  place-content: center;
  color: var(--ink-soft);
  font-size: .84rem;
}

@media (max-width: 720px) {
  .phenotype-query-form,
  .phenotype-query-form--enrichment,
  .analysis-menu {
    grid-template-columns: 1fr;
  }

  .phenotype-tab-group + .phenotype-tab-group {
    margin: 0 0 0 12px;
    padding: 0 0 0 12px;
    border-top: 0;
    border-left: 2px dotted #9bbcb6;
  }

  .phenotype-tab-group__label {
    display: none;
  }

  #resultSectionPheno .phenotype-tab-group .tablinks {
    width: auto;
  }

  #resultSectionPheno .uppertabContent {
    min-height: 420px;
  }

  #slider-container {
    grid-template-columns: 1fr;
  }

  .analysis-form {
    min-height: 430px;
  }

  .phenotype-mode-panel.is-active {
    height: 430px;
  }
}

.analysis-menu {
  display: grid;
  gap: 8px;
}

.analysis-menu .btn-submit-pheno {
  width: 100%;
  min-height: 46px;
  padding: 10px 13px;
  border-color: var(--line);
  background: var(--surface-soft);
  color: var(--ink);
  text-align: left;
}

.analysis-menu .btn-submit-pheno:hover,
.analysis-menu .btn-submit-pheno.active {
  border-color: var(--brand);
  background: #e5f2ef;
  color: var(--brand-dark);
}

.analysis-form {
  min-width: 0;
  padding-left: 28px;
  border-left: 1px solid var(--line);
}

.analysis-form form {
  display: flex;
  align-items: end;
  gap: 12px;
}

.analysis-form textarea,
.analysis-form select {
  flex: 1;
}

#resultSectionPheno.results-shell {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 520px;
  height: auto !important;
  margin-top: 24px;
  padding: 0 !important;
  overflow: hidden;
  transition: opacity 160ms ease, box-shadow 160ms ease;
}

#resultSectionPheno.is-view-transitioning {
  opacity: 0.72;
  pointer-events: none;
}

.results-shell > .row {
  display: contents;
}

.phenotype-results-toolbar {
  display: flex;
  grid-row: 1;
  align-items: center;
  gap: 16px;
  min-width: 0;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  background: #f7faf9;
}

.phenotype-results-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 7px;
}

.results-shell #tabs .tablinks {
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--ink-soft);
  font-size: 0.86rem;
}

.results-shell #tabs .tablinks:hover {
  background: #e9f2f0;
}

.results-shell #tabs .tablinks.active {
  background: var(--brand);
  color: white;
}

.results-shell #result-content {
  grid-row: 2;
  width: 100% !important;
  max-height: none !important;
  padding: clamp(14px, 3vw, 28px) !important;
  overflow: auto !important;
  scrollbar-gutter: stable;
}

#resultSectionPheno:fullscreen {
  width: 100%;
  max-width: none;
  height: 100dvh;
  min-height: 100dvh;
  margin: 0;
  border-radius: 0;
  background: var(--page);
}

#resultSectionPheno:fullscreen #result-content {
  height: calc(100dvh - 65px);
}

#resultSectionPheno:fullscreen .phenotype-results-toolbar {
  position: sticky;
  z-index: 20;
  top: 0;
}

.phenotype-table-section {
  width: 100%;
  min-width: 0;
}

.phenotype-table-section > h3 {
  margin: 0 0 14px;
  color: var(--ink);
  font-size: clamp(1.05rem, 1.7vw, 1.35rem);
}

.phenotype-table-section .dataTables_wrapper {
  width: 100%;
}

.phenotype-table-section .dataTables_scroll {
  border: 1px solid var(--line);
  border-radius: 10px;
}

.phenotype-table-section .dataTables_scrollBody {
  overflow-y: visible !important;
}

.phenotype-table-section .dataTables_paginate .paginate_button {
  min-width: 34px;
  margin-left: 3px;
  padding: 5px 9px !important;
  border: 1px solid transparent !important;
  border-radius: 7px !important;
}

.phenotype-table-section .dataTables_paginate .paginate_button.current,
.phenotype-table-section .dataTables_paginate .paginate_button:hover {
  border-color: var(--brand) !important;
  background: #e8f2f0 !important;
  color: var(--brand-dark) !important;
}

.table-export-status {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  margin: 0 0 8px 10px;
  color: var(--ink-soft);
  font-size: var(--text-sm);
  font-weight: 600;
  vertical-align: top;
}

.table-export-status.is-preparing {
  color: var(--brand-dark);
}

.table-export-status.is-complete {
  color: #276749;
}

.table-export-status.is-error {
  color: #9b2c2c;
}

.export-spinner {
  display: inline-block;
  width: 13px;
  height: 13px;
  margin-right: 6px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: export-spin 700ms linear infinite;
}

@keyframes export-spin {
  to { transform: rotate(360deg); }
}

.results-shell > .uppertabContent {
  grid-column: 1;
  min-width: 0;
  padding: clamp(14px, 3vw, 28px) !important;
  overflow: auto;
}

.uppertabContent.is-active {
  animation: result-panel-enter 160ms ease-out;
}

@keyframes result-panel-enter {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.uppertabContent,
.tabcontent,
.tabcontentVector {
  width: 100% !important;
  max-width: 100% !important;
  padding: 0 !important;
  border: 0 !important;
}

.js-plotly-plot,
.plot-container,
.svg-container {
  max-width: 100% !important;
}

.igv-workspace {
  min-width: 0;
  min-height: 180px;
  margin: 18px 0 30px;
  overflow-x: auto;
}

.viewer-note {
  margin: 18px 0 10px;
  padding: 11px 13px;
  border-left: 3px solid var(--brand);
  background: #edf5f3;
  color: var(--ink-soft);
  font-size: 0.84rem;
}

.igv-workspace[aria-busy="true"]::after {
  display: block;
  padding: 18px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--ink-soft);
  content: "Loading sequence viewer…";
}

.modebar {
  transform: scale(.9);
  transform-origin: top right;
}

.dataTables_wrapper {
  max-width: 100%;
  color: var(--ink);
}

.app-status.is-error {
  border-color: #e7b9b9;
  background: #fff3f3;
  color: #8a1c1c;
}

table.dataTable thead tr,
table.dataTable thead th {
  background: var(--ink) !important;
  color: white !important;
}

.dataTables_wrapper input,
.dataTables_wrapper select,
.dataTables_wrapper button,
.dataTables_wrapper .btn {
  border-radius: 7px !important;
}

.dataTables_wrapper .dt-buttons,
.dataTables_wrapper .dataTables_filter,
.dataTables_wrapper .dataTables_length {
  margin-bottom: 12px;
}

.dataTables_wrapper .btn {
  border-radius: 8px;
}

#overlay {
  z-index: 1600 !important;
  background: rgba(244, 248, 247, 0.82) !important;
  backdrop-filter: blur(4px);
}

#overlay .spinner {
  width: 46px;
  height: 46px;
  border: 4px solid #d3e3e0;
  border-top-color: var(--brand);
}

#overlay .loading-label {
  margin-top: 14px;
  color: var(--ink);
  font-weight: 720;
}

.app-status {
  display: none;
  margin: 16px 0 0;
  padding: 11px 14px;
  border-radius: 10px;
  background: #edf6f4;
  color: var(--brand-dark);
  font-size: 0.9rem;
}

.app-status.is-visible {
  display: flex;
  align-items: center;
  gap: 9px;
}

.app-status.is-visible::before {
  flex: 0 0 auto;
  color: var(--brand);
  content: "●";
  font-size: 0.66rem;
}

.app-status.is-error::before {
  color: #a22c2c;
  content: "!";
  font-size: 0.82rem;
  font-weight: 850;
}

@media (max-width: 960px) {
  .app-header__inner {
    min-height: 64px;
  }

  .app-nav-toggle {
    display: grid;
    place-items: center;
  }

  .app-partner {
    display: none;
  }

  .app-nav {
    position: absolute;
    top: calc(100% + 1px);
    left: 20px;
    right: 20px;
    display: none;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 0 0 14px 14px;
    background: var(--surface);
    box-shadow: var(--shadow);
  }

  .app-nav.is-open {
    display: block;
  }

  .app-nav > ul {
    align-items: stretch;
    flex-direction: column;
  }

  .app-nav a,
  .app-nav button {
    width: 100%;
    justify-content: space-between;
  }

  .app-nav__dropdown > ul {
    position: static;
    width: 100%;
    margin-top: 4px;
    box-shadow: none;
  }

  .tool-hero__inner {
    align-items: start;
    flex-direction: column;
  }
}

@media (max-width: 720px) {
  .app-header__inner,
  .home-content,
  .partner-strip,
  .tool-hero__inner,
  .tool-workspace,
  .app-footer {
    width: min(calc(100% - 28px), var(--content));
  }

  .home-content {
    padding: 46px 0 18px;
  }

  .home-content__header h1 {
    font-size: clamp(2rem, 10vw, 2.7rem);
  }

  .home-destinations {
    grid-template-columns: 1fr;
  }

  .home-destination .app-button {
    justify-self: start;
  }

  .home-project-note {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .partner-strip > div {
    justify-content: center;
  }

  .tool-hero {
    padding: 32px 0 24px;
  }

  .tool-hero h1,
  .tool-hero p {
    max-width: 100%;
    overflow-wrap: anywhere;
    white-space: normal;
  }

  .tool-links {
    width: 100%;
  }

  .staticpage,
  .section-bg {
    padding-right: 14px !important;
    padding-left: 14px !important;
  }

  .staticpage > .container,
  .section-bg > .container {
    padding: 23px 20px;
  }

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

  .search-options,
  .analysis-card {
    grid-template-columns: 1fr;
  }

  .analysis-form {
    padding: 20px 0 0;
    border: 0;
    border-top: 1px solid var(--line);
  }

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

  .phenotype-summary-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .phenotype-summary-context {
    align-items: stretch;
    flex-direction: column;
  }

  .summary-return-button {
    align-self: flex-start;
  }

  .phenotype-summary-views {
    overflow-x: auto;
  }

  .phenotype-summary-navigation {
    justify-content: space-between;
  }

  .phenotype-drilldown-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .enrichment-result-summary {
    flex-direction: column;
  }

  .results-shell {
    display: block !important;
  }

  .results-shell > .row {
    display: flex;
    width: 100%;
    margin: 0;
  }

  .results-shell #tabs {
    display: flex;
    width: 100% !important;
    padding: 10px !important;
    border-right: 0 !important;
    border-bottom: 1px solid var(--line) !important;
    overflow-x: auto;
  }

  .results-shell #tabs .tablinks {
    flex: 0 0 auto;
    width: auto;
    margin: 0 5px 0 0;
    white-space: nowrap;
  }

  .results-shell > .uppertabContent {
    padding: 16px !important;
  }

  .app-footer {
    align-items: start;
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* Vector workspace v1.1 --------------------------------------------------- */
.tool-workspace {
  width: min(100%, 1800px);
}

.search-card {
  transition: padding 180ms ease, box-shadow 180ms ease;
}

.search-card.is-compact {
  padding: 16px 20px;
}

.search-card.is-compact .search-card__heading,
.search-card.is-compact .search-mode-picker,
.search-card.is-compact .search-options {
  display: none;
}

.search-card.is-compact .search-grid {
  grid-template-columns: minmax(280px, 1fr) 110px;
}

.search-card.is-compact textarea {
  min-height: 48px;
  height: 48px;
  resize: none;
}

#resultSection.results-shell {
  display: block !important;
  min-height: min(720px, calc(100dvh - 150px));
  overflow: visible;
  border-radius: 14px;
}

.vector-workspace-toolbar {
  position: sticky;
  z-index: 20;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
}

.vector-workflow {
  display: flex;
  min-width: 0;
  gap: 5px;
  overflow-x: auto;
  scrollbar-width: thin;
}

.workflow-step {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 8px;
  min-height: 40px;
  padding: 7px 11px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: var(--ink-soft);
  font-size: 0.82rem;
  font-weight: 720;
  white-space: nowrap;
}

.workflow-step span {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 50%;
  background: #edf3f2;
  font-size: 0.72rem;
}

.workflow-step.is-complete:not(:disabled):hover {
  border-color: var(--line);
  background: var(--surface-soft);
}

.workflow-step.is-active {
  background: var(--brand);
  color: white;
}

.workflow-step.is-active span {
  background: rgba(255, 255, 255, 0.2);
}

.workflow-step:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}

.workspace-actions,
.igv-controls,
.igv-view-switch {
  display: flex;
  align-items: center;
  gap: 7px;
}

.workspace-actions {
  flex: 0 0 auto;
}

.workspace-action,
.igv-view-switch button,
.table-tool {
  min-height: 36px;
  padding: 7px 11px !important;
  border: 1px solid var(--line) !important;
  border-radius: 8px !important;
  background: white !important;
  color: var(--ink) !important;
  font-size: 0.79rem !important;
  font-weight: 720 !important;
}

.workspace-action:hover,
.igv-view-switch button:hover,
.igv-view-switch button.is-active,
.table-tool:hover {
  border-color: var(--brand) !important;
  background: #e8f2f0 !important;
  color: var(--brand-dark) !important;
}

.workspace-action--danger {
  color: #8a1c1c !important;
}

.vector-panel-stack {
  min-width: 0;
}

.vector-panel {
  min-width: 0;
  padding: clamp(18px, 2.5vw, 34px);
}

.vector-panel[hidden] {
  display: none !important;
}

.panel-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}

.panel-heading h2 {
  margin: 2px 0 0;
  color: var(--ink);
  font-size: clamp(1.25rem, 2vw, 1.7rem);
  letter-spacing: -0.025em;
}

.panel-heading p:not(.eyebrow) {
  margin: 5px 0 0;
  color: var(--ink-soft);
}

.result-heading {
  margin-bottom: 18px;
}

.result-heading h2,
.result-heading--table h2 {
  margin: 2px 0 0;
  color: var(--ink);
  font-size: clamp(1.25rem, 1.8vw, 1.5rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.2;
}

.result-heading__context {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.result-heading__context > span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 32px;
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-soft);
  color: var(--ink);
  font-size: var(--text-sm);
  font-weight: 650;
}

.result-heading__context small {
  color: var(--ink-soft);
  font-size: var(--text-xs);
  font-weight: 600;
}

.result-heading__arrow {
  color: var(--brand);
  font-size: .9rem;
}

.result-heading--table {
  display: block;
  margin-bottom: 14px;
}

.scientific-table {
  width: 100%;
  min-width: 0;
  overflow-x: auto;
}

.scientific-table table {
  width: 100% !important;
}

.scientific-table th {
  position: sticky;
  z-index: 2;
  top: 0;
  white-space: nowrap;
}

.scientific-table td {
  max-width: 520px;
  vertical-align: top;
}

.scientific-table td .btn {
  min-height: 34px;
  margin: 2px 5px 2px 0 !important;
  padding: 6px 10px;
  border-radius: 7px;
  font-size: 0.78rem;
  font-weight: 730;
  white-space: nowrap;
}

.scientific-table .btn-success {
  border-color: #287b64;
  background: #287b64;
}

.scientific-table .btn-warning {
  border-color: #d7a63a;
  background: #fff1c9;
  color: #674d0b;
}

.scientific-table--plain {
  border: 1px solid var(--line);
  border-radius: 10px;
}

.scientific-table--plain th,
.scientific-table--plain td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}

.scientific-table--plain tr:last-child td {
  border-bottom: 0;
}

.dataTables_wrapper .dt-buttons {
  display: flex;
  float: left;
  gap: 6px;
}

.dataTables_wrapper .dataTables_filter {
  float: right;
}

.dataTables_wrapper .dataTables_filter input {
  min-height: 36px;
  margin-left: 8px;
  border: 1px solid var(--line);
  background: white;
}

.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_paginate {
  padding-top: 14px;
  color: var(--ink-soft);
  font-size: 0.82rem;
}

.vector-detail-grid {
  display: grid;
  grid-template-columns: minmax(330px, 0.8fr) minmax(420px, 1.2fr);
  gap: 18px;
}

.detail-card {
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-soft);
}

.detail-card h3 {
  margin: 0 0 14px;
  color: var(--ink);
  font-size: 1rem;
}

.detail-card .btn-design {
  width: 100%;
  margin: 3px 0;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--ink);
  text-align: left;
}

.detail-card .btn-design:hover {
  border-color: var(--brand);
  background: #e8f2f0;
  color: var(--brand-dark);
}

.igv-controls {
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.igv-control-actions {
  display: flex;
  align-items: center;
  gap: 7px;
}

.igv-interaction-hint {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0 auto 0 0;
  color: var(--ink-soft);
  font-size: .75rem;
}

.igv-interaction-hint i {
  color: var(--brand);
}

.igv-view-switch {
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-soft);
}

.igv-view-switch button {
  border-color: transparent !important;
  background: transparent !important;
}

.igv-view-switch button.is-active {
  background: white !important;
  box-shadow: 0 2px 7px rgba(16, 47, 54, 0.1);
}

.igv-pane {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: white;
}

.igv-pane > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.igv-pane h3 {
  margin: 1px 0 0;
  color: var(--ink);
  font-size: 1rem;
}

.igv-pane-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
}

.igv-viewers[data-layout="single"] {
  display: block;
  position: relative;
  width: 100%;
  min-width: 0;
}

.igv-viewers[data-layout="single"] .igv-pane {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  max-width: none;
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
}

.igv-viewers[data-layout="single"] .igv-pane.is-active {
  position: relative;
  width: 100%;
  max-width: none;
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
}

.igv-viewers[data-layout="single"] .igv-workspace,
.tool-workspace:fullscreen .igv-viewers[data-layout="single"],
.tool-workspace:fullscreen .igv-viewers[data-layout="single"] .igv-pane {
  width: 100%;
  max-width: none;
}

.igv-workspace {
  width: 100%;
  min-height: 320px;
  margin: 0;
}

.igv-workspace .igv-track-label {
  opacity: 0 !important;
  pointer-events: none;
  transform: translateY(-3px);
  transition: opacity 120ms ease, transform 120ms ease;
}

.igv-workspace .igv-viewport:hover .igv-track-label {
  opacity: .94 !important;
  transform: translateY(0);
}

.vector-panel[data-step="analysis"]:fullscreen {
  width: 100%;
  max-width: none;
  height: 100dvh;
  padding: 16px;
  overflow: auto;
  background: var(--page);
}

.vector-panel[data-step="analysis"]:fullscreen .igv-viewers[data-layout="single"],
.vector-panel[data-step="analysis"]:fullscreen .igv-viewers[data-layout="single"] .igv-pane,
.vector-panel[data-step="analysis"]:fullscreen .igv-viewers[data-layout="single"] .igv-workspace {
  width: 100%;
  max-width: none;
}

.vector-panel[data-step="analysis"]:fullscreen .igv-viewers[data-layout="single"] .igv-workspace {
  min-height: calc(100dvh - 190px);
}

.tool-workspace:fullscreen {
  width: 100%;
  max-width: none;
  height: 100dvh;
  padding: 12px;
  overflow: auto;
  background: var(--page);
}

.tool-workspace:fullscreen .vector-workspace-toolbar {
  top: 0;
}

@media (max-width: 1050px) {
  .vector-workspace-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .workspace-actions {
    justify-content: flex-end;
  }

  .vector-detail-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .phenotype-results-toolbar {
    align-items: stretch;
    flex-direction: column;
    gap: 9px;
  }

  .phenotype-results-actions {
    justify-content: flex-end;
  }

  .phenotype-table-section .dataTables_length,
  .phenotype-table-section .dataTables_filter {
    float: none;
    width: 100%;
  }

  .phenotype-table-section .dataTables_filter input {
    width: calc(100% - 94px);
  }

  .search-mode-picker {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .search-mode {
    min-height: 72px;
    padding: 11px;
  }

  .search-card.is-compact .search-grid {
    grid-template-columns: 1fr;
  }

  .vector-workspace-toolbar {
    top: 0;
    padding: 10px;
  }

  .workspace-actions {
    justify-content: flex-start;
    overflow-x: auto;
  }

  .workspace-action {
    flex: 0 0 auto;
  }

  .workspace-action i {
    display: none;
  }

  .vector-panel {
    padding: 16px 10px;
  }

  .panel-heading {
    align-items: start;
    flex-direction: column;
  }

  .dataTables_wrapper .dt-buttons,
  .dataTables_wrapper .dataTables_filter {
    float: none;
    width: 100%;
    margin-bottom: 10px;
  }

  .dataTables_wrapper .dataTables_filter input {
    width: calc(100% - 94px);
  }

  .igv-controls,
  .igv-pane > header {
    align-items: stretch;
    flex-direction: column;
  }

  .igv-control-actions {
    flex-wrap: wrap;
  }

  .igv-interaction-hint {
    margin: 0;
  }

  .igv-view-switch {
    overflow-x: auto;
  }

  .igv-view-switch button {
    flex: 0 0 auto;
  }

  .igv-workspace {
    min-height: 240px;
  }

}
