:root {
  --bg: #f4f7f2;
  --panel: #fffdf8;
  --panel-2: #f9fbf5;
  --ink: #13201b;
  --muted: #64736d;
  --line: #d6e0d8;
  --line-strong: #adc4b8;
  --primary: #1f8a70;
  --primary-dark: #105e4e;
  --primary-950: #073b32;
  --blue: #2457c5;
  --amber: #c87510;
  --red: #c93131;
  --rose: #c94968;
  --soft: #e6f3ec;
  --shadow: 0 18px 42px rgba(18, 39, 31, 0.08);
  --shadow-sm: 0 7px 20px rgba(18, 39, 31, 0.06);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(rgba(31, 138, 112, 0.024) 1px, transparent 1px),
    linear-gradient(90deg, rgba(31, 138, 112, 0.022) 1px, transparent 1px),
    var(--bg);
  background-size: 32px 32px;
  color: var(--ink);
  display: flex;
  flex-direction: column;
  font-family: "Aptos", "Source Sans 3", "IBM Plex Sans", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.45;
}

a {
  color: inherit;
  text-decoration: none;
}

.topbar {
  position: sticky;
  top: 14px;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 44px;
  width: min(1760px, calc(100% - 44px));
  min-height: 68px;
  margin: 0 auto;
  padding: 12px 26px;
  background: rgba(255, 253, 248, 0.92);
  border-bottom: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 18px 46px rgba(18, 39, 31, 0.12);
  backdrop-filter: blur(14px);
}

body.is-home .topbar {
  top: 8px;
  min-height: 62px;
  padding: 9px 22px;
}

body.is-home .brand-mark {
  width: 44px;
  height: 44px;
}

body.is-home .brand strong {
  font-size: 17px;
}

body.is-home .brand small {
  font-size: 11.5px;
}

.topbar::before {
  content: none;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 300px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  color: #fff;
  background:
    linear-gradient(135deg, var(--primary-dark), var(--primary)),
    var(--primary);
  border-radius: 8px;
  font-weight: 800;
  box-shadow: 0 10px 22px rgba(31, 138, 112, 0.24);
}

.brand-mark svg {
  width: 32px;
  height: 32px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.brand strong {
  display: block;
  font-size: 18px;
}

.brand small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

nav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
  margin-left: auto;
}

nav a,
.nav-dropdown-trigger {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  padding: 7px 9px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #31423f;
  font: inherit;
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
}

.nav-icon {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  color: var(--primary-950);
}

.nav-icon svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

nav a:hover,
.nav-dropdown-trigger:hover,
.nav-dropdown:focus-within .nav-dropdown-trigger {
  background: var(--soft);
  color: var(--primary-dark);
}

nav a.active,
.nav-dropdown.active .nav-dropdown-trigger {
  background: rgba(230, 243, 236, 0.9);
  color: var(--primary-dark);
}

.nav-dropdown {
  position: relative;
}

.nav-caret {
  color: var(--muted);
  font-size: 11px;
  line-height: 1;
}

.nav-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 40;
  display: none;
  min-width: 230px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.98);
  box-shadow: 0 18px 42px rgba(18, 39, 31, 0.14);
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu,
.nav-dropdown.is-open .nav-dropdown-menu {
  display: grid;
  gap: 4px;
}

.nav-dropdown-menu a {
  justify-content: flex-start;
  width: 100%;
  min-height: 40px;
  padding: 8px 10px;
}

main {
  flex: 1 0 auto;
  width: min(1640px, 100%);
  margin: 0 auto;
  padding: 36px 32px 56px;
}

body.is-home main {
  padding: 28px 24px 18px;
}

.home-page {
  min-height: calc(100vh - 110px);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
  gap: 32px;
  align-items: center;
  padding: 34px 0 28px;
}

.hero h1 {
  max-width: 920px;
  margin: 0 0 14px;
  font-size: clamp(36px, 5vw, 68px);
  line-height: 1.02;
  letter-spacing: 0;
}

.hero p {
  max-width: 780px;
  margin: 0 0 24px;
  color: #3a4a47;
  font-size: 18px;
}

.searchbar {
  display: flex;
  gap: 10px;
  max-width: 760px;
  padding: 8px;
  background: rgba(255, 253, 248, 0.94);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
}

input,
select,
textarea,
button {
  font: inherit;
}

input,
select,
textarea {
  min-height: 42px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fffdf9;
  color: var(--ink);
}

input:focus,
select:focus,
textarea:focus,
button:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(31, 138, 112, 0.22);
  outline-offset: 2px;
}

textarea {
  width: 100%;
  resize: vertical;
}

.searchbar input {
  flex: 1;
  border-color: transparent;
}

button,
.button {
  min-height: 42px;
  padding: 9px 15px;
  border: 1px solid var(--primary);
  border-radius: 7px;
  background: var(--primary);
  color: #fff;
  cursor: pointer;
  white-space: nowrap;
  font-weight: 700;
  box-shadow: 0 8px 18px rgba(31, 138, 112, 0.18);
}

button.secondary,
.button.secondary {
  border-color: var(--line);
  background: #fff;
  color: var(--ink);
}

button:hover,
.button:hover {
  background: var(--primary-dark);
}

button.secondary:hover,
.button.secondary:hover {
  background: var(--soft);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.table-link {
  min-height: auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--primary-dark);
  box-shadow: none;
  font-weight: 750;
  text-align: left;
  white-space: normal;
}

.table-link:hover {
  background: transparent;
  color: var(--primary);
  text-decoration: underline;
}

.table-action-button {
  min-height: 30px;
  padding: 6px 12px;
  border-radius: 7px;
  font-size: 0.84rem;
  line-height: 1;
  box-shadow: none;
}

.table-wrap a,
.compound-result-card a:not(.btn),
.result-list-item a,
.data-table a,
.report-table a {
  color: var(--primary-dark);
  font-weight: 550;
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
}

.table-wrap a:hover,
.compound-result-card a:not(.btn):hover,
.result-list-item a:hover,
.data-table a:hover,
.report-table a:hover {
  color: var(--primary);
}

.table-wrap a[target="_blank"]::after,
.report-table a[target="_blank"]::after,
.data-table a[target="_blank"]::after {
  content: "";
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-left: 3px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%231f8a70' stroke-width='2.5'%3E%3Cpath d='M10 6H6a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2v-4M14 4h6m0 0v6m0-6L10 14'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  vertical-align: middle;
}

.home-hero {
  position: relative;
  padding: 42px 40px 28px;
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(255, 253, 248, 0.14), rgba(230, 243, 236, 0.42));
  box-shadow: 0 24px 70px rgba(18, 39, 31, 0.12);
  overflow: visible;
}

.home-hero::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 392px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04) 0%, rgba(255, 255, 255, 0.14) 58%, rgba(244, 247, 242, 0.72) 100%),
    linear-gradient(90deg, rgba(255,255,255,0.96) 0%, rgba(255,255,255,0.84) 42%, rgba(255,255,255,0.30) 100%),
    url("/home-background-optimized.webp") center / cover no-repeat;
  z-index: 0;
}

.home-hero > * {
  position: relative;
  z-index: 1;
}

.home-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(340px, 0.95fr);
  gap: 34px;
  align-items: center;
  min-height: 320px;
}

.home-copy {
  min-width: 0;
  position: relative;
  width: auto;
  max-width: 900px;
  margin: 0;
  padding: 12px 0;
}

.home-copy::before {
  content: none;
}

.eyebrow {
  margin: 0 0 12px;
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.72);
  color: var(--primary-dark);
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
  font-size: 12px;
}

.home-copy h1 {
  margin: 0 0 14px;
  color: var(--primary-950);
  font-size: clamp(46px, 4.7vw, 64px);
  line-height: 1;
  letter-spacing: 0;
  text-shadow: 0 8px 22px rgba(7, 59, 50, 0.1);
}

.lead {
  max-width: 760px;
  margin: 0 0 20px;
  color: #31433e;
  font-size: 16px;
}

.searchbar.wide {
  max-width: 900px;
  min-height: 52px;
  border-radius: 13px;
  background: rgba(255, 253, 248, 0.94);
  box-shadow: 0 22px 50px rgba(16, 94, 78, 0.16);
}

.home-search-panel {
  display: grid;
  position: relative;
  z-index: 50;
  grid-template-columns: minmax(138px, 170px) minmax(128px, 160px) minmax(0, 1fr) 112px;
  align-items: stretch;
  width: 100%;
  max-width: 860px;
  min-height: 56px;
  padding: 8px;
  border: 1px solid var(--line-strong);
  border-radius: 13px;
  background: rgba(255, 253, 248, 0.94);
  box-shadow: 0 22px 50px rgba(16, 94, 78, 0.16);
}

.home-search-panel > select,
.home-search-panel > input,
.home-search-panel .multi-select-trigger,
.home-search-panel .evidence-dropdown {
  min-width: 0;
  width: 100%;
  min-height: 48px;
  border: 0;
  border-right: 1px solid var(--line);
  border-radius: 0;
  background: #fffdf9;
}

.home-search-panel > select {
  border-radius: 7px 0 0 7px;
}

.home-search-panel .evidence-dropdown {
  position: relative;
  border-radius: 7px 0 0 7px;
}

.evidence-trigger {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  height: 100%;
  min-height: 48px;
  padding: 8px 34px 8px 12px;
  border: 0;
  border-radius: inherit;
  background: transparent;
  color: var(--ink);
  box-shadow: none;
  font: inherit;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0;
  text-align: left;
}

.evidence-trigger::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 13px;
  width: 7px;
  height: 7px;
  border-right: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
  opacity: 0.95;
  pointer-events: none;
  transform: translateY(-62%) rotate(45deg);
}

.evidence-dropdown.is-open .evidence-trigger::after {
  transform: translateY(-35%) rotate(225deg);
}

.evidence-trigger:hover,
.evidence-trigger:focus-visible {
  background: rgba(32, 151, 127, 0.08);
  box-shadow: none;
}

.evidence-caret {
  display: none;
}

.evidence-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 95;
  display: grid;
  gap: 2px;
  width: max-content;
  min-width: 228px;
  max-width: min(340px, 88vw);
  padding: 6px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: rgba(255, 253, 248, 0.99);
  box-shadow: 0 18px 46px rgba(18, 39, 31, 0.18);
}

.evidence-menu[hidden] {
  display: none;
}

.evidence-option-row {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 18px;
  align-items: center;
  gap: 3px;
  min-height: 28px;
  border-radius: 7px;
}

.evidence-option-row.selected,
.evidence-option-row:hover {
  background: rgba(32, 151, 127, 0.1);
}

.evidence-option-label {
  width: 100%;
  min-height: 28px;
  padding: 5px 8px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--ink);
  box-shadow: none;
  font: inherit;
  font-size: 14px;
  font-weight: 650;
  letter-spacing: 0;
  text-align: left;
  white-space: nowrap;
}

.evidence-option-row.selected .evidence-option-label {
  background: transparent;
  color: var(--ink);
}

.evidence-option-label:hover,
.evidence-option-label:focus,
.evidence-option-label:focus-visible,
.evidence-option-label:active {
  background: transparent;
  color: var(--deep);
  box-shadow: none;
  outline: none;
}

.evidence-option-row.selected .evidence-option-label:hover,
.evidence-option-row.selected .evidence-option-label:focus,
.evidence-option-row.selected .evidence-option-label:focus-visible,
.evidence-option-row.selected .evidence-option-label:active {
  background: transparent;
  color: var(--ink);
}

.evidence-help-button {
  display: inline-flex;
  flex: 0 0 16px;
  align-items: center;
  align-self: center;
  justify-content: center;
  width: 16px;
  min-width: 16px;
  max-width: 16px;
  height: 16px;
  min-height: 16px;
  max-height: 16px;
  box-sizing: border-box;
  padding: 0;
  border: 1px solid rgba(18, 128, 105, 0.38);
  border-radius: 50%;
  background: rgba(228, 249, 243, 0.88);
  color: var(--deep);
  box-shadow: none;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
}

.evidence-help-button:hover,
.evidence-help-button:focus-visible,
.evidence-option-row.is-help-open .evidence-help-button {
  background: var(--teal);
  color: #fffdf9;
  box-shadow: none;
}

.evidence-help-spacer {
  width: 16px;
  height: 16px;
}

.evidence-help-popover {
  position: absolute;
  top: 50%;
  left: calc(100% + 8px);
  z-index: 120;
  width: 230px;
  margin: 0;
  padding: 8px 10px;
  border: 1px solid rgba(18, 128, 105, 0.2);
  border-radius: 7px;
  background: #f8fffb;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
  box-shadow: 0 14px 34px rgba(18, 39, 31, 0.16);
  transform: translateY(-50%);
}

.evidence-help-popover::before {
  content: "";
  position: absolute;
  top: 50%;
  left: -5px;
  width: 9px;
  height: 9px;
  border-left: 1px solid rgba(18, 128, 105, 0.2);
  border-bottom: 1px solid rgba(18, 128, 105, 0.2);
  background: #f8fffb;
  transform: translateY(-50%) rotate(45deg);
}

.evidence-help-popover[hidden] {
  display: none;
}

.home-search-panel > input {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.home-search-panel > button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: 112px;
  min-width: 112px;
  min-height: 48px;
  padding-inline: 12px;
  border-radius: 0 7px 7px 0;
  box-shadow: none;
}

.home-search-panel .multi-select-trigger {
  justify-content: space-between;
}

.home-search-panel .multi-select-menu {
  z-index: 80;
  width: min(360px, 86vw);
}

.searchbar select {
  width: 170px;
  border-color: transparent;
}

.searchbar button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 128px;
  border-radius: 10px;
}

.searchbar button svg {
  width: 19px;
  height: 19px;
}

.home-search-example {
  margin-top: 12px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 650;
}

.home-search-example a {
  color: var(--primary-dark);
  font-weight: 800;
  text-decoration: none;
}

.home-search-example a:hover {
  text-decoration: underline;
}

.home-visual {
  position: relative;
  min-height: 320px;
  border-radius: 28px;
  background: transparent;
  border: 0;
  overflow: hidden;
  box-shadow: none;
}

.hero-orbit {
  position: absolute;
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  color: var(--primary);
  background: rgba(255, 255, 255, 0.58);
  border: 1px solid rgba(255, 255, 255, 0.72);
  box-shadow: 0 18px 40px rgba(18, 39, 31, 0.14);
  backdrop-filter: blur(10px);
}

.hero-orbit svg {
  width: 30px;
  height: 30px;
}

.orbit-leaf {
  left: 22%;
  top: 43%;
}

.orbit-flask {
  right: 12%;
  top: 18%;
}

.orbit-chart {
  right: 7%;
  bottom: 25%;
}

.visual-stage {
  position: relative;
  min-height: 360px;
  padding: 28px;
}

.visual-stage::before {
  content: "";
  position: absolute;
  inset: 38px 34px 34px 76px;
  border: 1px solid rgba(31, 138, 112, 0.18);
  border-radius: 38% 45% 42% 48%;
  transform: rotate(-8deg);
}

.visual-molecule {
  position: absolute;
  inset: 42px 110px auto auto;
  width: 260px;
  height: 190px;
}

.node {
  position: absolute;
  width: 28px;
  height: 28px;
  border: 2px solid rgba(16, 94, 78, 0.5);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 8px 18px rgba(31, 138, 112, 0.16);
}

.n1 { left: 26px; top: 84px; }
.n2 { left: 86px; top: 38px; }
.n3 { left: 154px; top: 62px; }
.n4 { left: 188px; top: 126px; }
.n5 { left: 98px; top: 128px; }

.bond {
  position: absolute;
  height: 2px;
  background: rgba(16, 94, 78, 0.42);
  transform-origin: left center;
}

.b1 { left: 50px; top: 91px; width: 58px; transform: rotate(-37deg); }
.b2 { left: 112px; top: 53px; width: 70px; transform: rotate(19deg); }
.b3 { left: 174px; top: 88px; width: 62px; transform: rotate(61deg); }
.b4 { left: 112px; top: 139px; width: 78px; transform: rotate(-4deg); }

.produce-card {
  position: absolute;
  right: 70px;
  bottom: 48px;
  width: 230px;
  height: 132px;
  border-radius: 26px;
  background:
    linear-gradient(160deg, rgba(255, 253, 248, 0.9), rgba(230, 243, 236, 0.7));
  border: 1px solid rgba(173, 196, 184, 0.56);
  box-shadow: 0 18px 38px rgba(18, 39, 31, 0.14);
}

.produce {
  position: absolute;
  display: block;
}

.broccoli {
  width: 82px;
  height: 62px;
  right: 32px;
  top: 22px;
  border-radius: 40px 40px 22px 22px;
  background: linear-gradient(135deg, #2f8a55, #97cf78);
}

.broccoli::after {
  content: "";
  position: absolute;
  left: 34px;
  top: 52px;
  width: 12px;
  height: 42px;
  border-radius: 8px;
  background: #6ea965;
}

.citrus {
  width: 64px;
  height: 64px;
  right: 92px;
  bottom: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ffd774, #f5a623);
  border: 4px solid rgba(255, 253, 248, 0.92);
}

.berry {
  width: 72px;
  height: 52px;
  left: 26px;
  bottom: 28px;
  border-radius: 34px;
  background:
    radial-gradient(circle at 18px 16px, #294871 0 7px, transparent 8px),
    radial-gradient(circle at 36px 26px, #243c67 0 8px, transparent 9px),
    radial-gradient(circle at 50px 14px, #345b92 0 7px, transparent 8px),
    radial-gradient(circle at 56px 34px, #294871 0 7px, transparent 8px);
}

.visual-chip {
  position: absolute;
  display: grid;
  place-items: center;
  width: 66px;
  height: 66px;
  border-radius: 18px;
  color: var(--primary);
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid rgba(173, 196, 184, 0.58);
  box-shadow: 0 12px 30px rgba(18, 39, 31, 0.12);
}

.visual-chip svg {
  width: 32px;
  height: 32px;
}

.chip-leaf { left: 76px; top: 124px; }
.chip-flask { right: 22px; top: 78px; }
.chip-chart { right: 32px; bottom: 84px; }

.home-metric-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.home-metric {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-width: 0;
  min-height: 86px;
  padding: 12px 14px;
  border: 1px solid rgba(173, 196, 184, 0.56);
  border-radius: 14px;
  background: rgba(255, 253, 248, 0.58);
  box-shadow: 0 14px 30px rgba(18, 39, 31, 0.07);
  backdrop-filter: blur(8px);
}

.metric-icon,
.feature-icon {
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  box-shadow: 0 12px 28px rgba(31, 138, 112, 0.22);
}

.metric-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  box-shadow: 0 14px 28px rgba(16, 94, 78, 0.2);
}

.metric-icon svg,
.feature-icon svg,
.stat svg {
  width: 23px;
  height: 23px;
}

.home-metric strong {
  display: block;
  font-size: 12.5px;
  line-height: 1.25;
  color: #102b25;
}

.home-metric b {
  display: block;
  margin-top: 2px;
  color: var(--primary-950);
  font-size: 22px;
  line-height: 1.1;
}

.home-metric small {
  display: block;
  margin-top: 4px;
  color: #455b55;
  font-size: 10.5px;
  line-height: 1.25;
}

.module-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}

.record.feature {
  position: relative;
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) 30px;
  gap: 14px;
  align-items: center;
  min-height: 134px;
  padding: 18px 16px;
  background: rgba(255, 253, 248, 0.92);
  border: 1px solid rgba(173, 196, 184, 0.68);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.record.feature:hover {
  transform: translateY(-3px);
  border-color: rgba(31, 138, 112, 0.42);
  box-shadow: 0 18px 38px rgba(18, 39, 31, 0.1);
}

.feature-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(230, 243, 236, 0.95), rgba(255, 253, 248, 0.92));
  color: var(--primary-dark);
}

.feature-body {
  min-width: 0;
}

.feature-count {
  margin: 4px 0 7px;
  color: var(--primary-950);
}

.feature-count b {
  font-size: 26px;
  line-height: 1;
  letter-spacing: 0;
}

.feature h3 {
  margin: 0;
  font-size: 15px;
  line-height: 1.2;
}

.feature h3 span {
  display: block;
  white-space: nowrap;
}

.feature p {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.35;
}

.feature-arrow {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--primary-dark);
  background: #fffdf9;
}

.feature-arrow svg {
  width: 17px;
  height: 17px;
}

.why-section {
  margin-top: 22px;
}

.why-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.why-card {
  display: grid;
  gap: 10px;
  align-content: start;
  min-height: 150px;
  padding: 18px;
  border: 1px solid rgba(173, 196, 184, 0.68);
  border-radius: 12px;
  background: rgba(255, 253, 248, 0.9);
  box-shadow: var(--shadow-sm);
}

.why-card-head {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.why-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: var(--soft);
  color: var(--primary-dark);
}

.why-icon svg {
  width: 23px;
  height: 23px;
}

.why-card h3 {
  margin: 0;
  color: var(--primary-950);
  font-size: 16px;
  line-height: 1.25;
}

.why-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.45;
}

.site-footer {
  flex-shrink: 0;
  width: 100%;
  margin: clamp(28px, 5vh, 48px) 0 0;
  padding: 14px 24px;
  border: 0;
  border-radius: 0;
  background: rgba(224, 238, 231, 0.56);
  box-shadow: none;
  color: #5c6f68;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  text-align: center;
}

.site-footer-inner {
  display: grid;
  gap: 5px;
  max-width: 1500px;
  margin: 0 auto;
}

.site-footer p {
  margin: 0;
}

.site-footer-org {
  flex: 1;
  max-width: 1180px;
}

.site-footer-contact {
  color: #4f625b;
}

.site-footer strong {
  color: inherit;
  font-weight: inherit;
  margin-right: 6px;
}

.site-footer a {
  color: #315c50;
  font-weight: 600;
  text-decoration: none;
}

.site-footer a:hover {
  text-decoration: underline;
}

.statistics-page {
  display: grid;
  gap: 16px;
}

.statistics-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.statistics-card {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  min-height: 118px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow-sm);
}

.statistics-card-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: var(--soft);
  color: var(--primary-dark);
}

.statistics-card-icon svg {
  width: 22px;
  height: 22px;
}

.statistics-card b {
  display: block;
  color: var(--primary-dark);
  font-size: 26px;
  line-height: 1;
}

.statistics-card strong {
  display: block;
  margin-top: 7px;
  color: var(--ink);
}

.statistics-card small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  line-height: 1.35;
}

.statistics-section {
  display: grid;
  gap: 14px;
}

.statistics-chart-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.statistics-chart-grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.statistics-figure-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.statistics-echart-panel {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.statistics-echart-panel-wide {
  min-width: 0;
}

.statistics-panel-head {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 30px;
}

.statistics-panel-head span {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border: 1px solid rgba(0, 137, 123, 0.28);
  border-radius: 6px;
  background: #f1faf7;
  color: var(--primary-dark);
  font-size: 14px;
  font-weight: 900;
}

.statistics-panel-head h3 {
  margin: 0;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.2;
}

.statistics-echart {
  width: 100%;
  height: 460px;
  min-width: 0;
}

.statistics-chart-loading {
  display: grid;
  place-items: center;
  min-height: 100%;
  background: rgba(255, 253, 248, 0.42);
}

.statistics-echart-tall {
  height: 510px;
}

.statistics-chart-panel,
.statistics-wide-chart {
  display: grid;
  gap: 10px;
}

.statistics-chart-panel h3,
.statistics-wide-chart h3 {
  margin: 0;
  font-size: 17px;
}

.donut-wrap {
  display: grid;
  grid-template-columns: minmax(190px, 260px) minmax(0, 1fr);
  gap: 14px;
  align-items: center;
}

.donut-chart {
  display: block;
  width: 100%;
  max-width: 260px;
  height: auto;
}

.donut-legend {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.donut-legend-row {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  font-size: 13px;
}

.donut-legend-row span {
  width: 10px;
  height: 10px;
  border-radius: 3px;
}

.donut-legend-row strong {
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.donut-legend-row small {
  color: var(--muted);
  font-weight: 700;
}

.chart-footnote {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.report-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin: 8px 0 14px;
}

.report-toolbar button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: auto;
  min-height: 40px;
  padding: 9px 14px;
}

.report-toolbar svg {
  width: 18px;
  height: 18px;
}

.compound-report {
  display: grid;
  gap: 18px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf9;
  box-shadow: var(--shadow);
}

.report-cover {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 240px;
  gap: 24px;
  align-items: start;
  padding-bottom: 18px;
  border-bottom: 2px solid var(--line);
}

.report-kicker {
  margin: 0 0 8px;
  color: var(--primary-dark);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.report-cover h1 {
  margin: 0 0 12px;
  color: var(--primary-950);
  font-size: 36px;
  line-height: 1.12;
  letter-spacing: 0;
}

.report-cover p {
  max-width: 860px;
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.report-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.report-meta span {
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--soft);
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
}

.report-structure {
  display: grid;
  place-items: center;
  min-height: 220px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.report-structure img {
  max-width: 210px;
  max-height: 200px;
}

.report-section {
  display: grid;
  gap: 10px;
  break-inside: avoid;
}

.report-section h2 {
  margin: 0;
  color: var(--primary-950);
  font-size: 22px;
}

.report-section h3 {
  margin: 0 0 8px;
  color: var(--ink);
  font-size: 16px;
}

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

.report-field {
  display: grid;
  gap: 5px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.report-field span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.report-field strong {
  color: var(--ink);
  overflow-wrap: anywhere;
}

.report-summary-box {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff 0%, #f6fbf8 100%);
}

.report-summary-box p {
  margin: 0;
  color: var(--ink);
  line-height: 1.55;
}

.report-performance-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.report-performance-card {
  display: grid;
  gap: 7px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffefb;
}

.report-performance-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.report-performance-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.report-performance-card strong {
  color: var(--primary-950);
  font-size: 22px;
  line-height: 1.15;
}

.report-performance-card small {
  color: var(--muted);
  font-weight: 700;
  overflow-wrap: anywhere;
}

.report-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.report-chip {
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--soft);
  color: var(--primary-dark);
  font-size: 13px;
  font-weight: 800;
}

.report-two-col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

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

.report-table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  font-size: 13px;
}

.report-table th,
.report-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.report-table th {
  background: var(--soft);
  color: var(--primary-dark);
  font-weight: 800;
}

.report-table td {
  color: var(--ink);
  overflow-wrap: anywhere;
}

.report-pathway {
  overflow: auto;
  max-height: 620px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.report-pathway-toolbar {
  margin-bottom: 0;
}

.report-pathway .pathway-svg-inline {
  min-width: 760px;
  border: 0;
  border-radius: 0;
}

.report-footer {
  display: grid;
  gap: 5px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

.report-footer p {
  margin: 0;
}

.score-badge {
  display: inline-flex;
  min-width: 54px;
  justify-content: center;
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--primary);
  color: #fff;
  font-weight: 800;
}

.mono-line {
  margin-top: 4px;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  overflow-wrap: anywhere;
}

.error-box {
  margin-top: 14px;
  border-color: #f0b9b9;
  background: #fff6f5;
}

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

.compound-main,
.structure-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 20px;
  box-shadow: var(--shadow);
}

.compound-main h1 {
  margin: 6px 0 10px;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.08;
  letter-spacing: 0;
  color: var(--primary-950);
}

.compound-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 12px 0;
}

.button-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 9px 13px;
  border: 1px solid var(--primary);
  border-radius: 8px;
  background: var(--primary);
  color: white;
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 10px 22px rgba(31, 138, 112, 0.16);
}

.button-link svg {
  width: 18px;
  height: 18px;
}

.back-link {
  color: var(--primary-dark);
  font-size: 14px;
  font-weight: 650;
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.compound-description {
  max-width: 980px;
  display: grid;
  justify-items: end;
}

.compound-description p {
  width: 100%;
  margin-bottom: 6px;
}

.compound-description.is-collapsed p {
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.text-toggle {
  min-height: auto;
  padding: 5px 10px;
  border: 1px solid rgba(31, 138, 112, 0.25);
  border-radius: 999px;
  background: #e8f7f2;
  color: #0c6f60;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.1;
  box-shadow: 0 4px 10px rgba(31, 138, 112, 0.08);
}

.text-toggle:hover {
  border-color: rgba(31, 138, 112, 0.4);
  background: #d7f1e9;
  color: var(--green-dark);
  transform: none;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(120px, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.mini-stat {
  min-width: 0;
  padding: 11px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 6px;
}

.mini-stat span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 12px;
}

.mini-stat b {
  display: block;
  overflow-wrap: anywhere;
  font-size: 15px;
}

.mini-stat-link a {
  color: #0f766e;
  text-decoration: none;
}

.mini-stat-link a:hover,
.mini-stat-link a:focus-visible {
  color: #1d4ed8;
}

.structure-card {
  display: grid;
  place-items: center;
  min-height: 260px;
}

.structure-card img {
  max-width: 100%;
  max-height: 280px;
}

.detail-shell {
  padding: 14px 18px 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
}

.compound-detail-shell {
  display: grid;
  grid-template-columns: 242px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
  padding: 18px;
}

.compound-section-sidebar {
  min-width: 0;
  padding-right: 16px;
  border-right: 1px solid var(--line);
}

.compound-section-toggle {
  display: none;
}

.compound-section-nav {
  position: sticky;
  top: 104px;
  display: grid;
  gap: 13px;
  justify-content: stretch;
  margin: 0;
}

.compound-nav-group {
  display: grid;
  gap: 5px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(173, 196, 184, 0.55);
}

.compound-nav-group:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.compound-nav-group-button {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  width: 100%;
  min-height: 40px;
  padding: 7px 8px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #213a32;
  font-size: 14px;
  font-weight: 850;
  text-align: left;
  box-shadow: none;
}

.compound-nav-group-button:hover,
.compound-nav-group-button:focus-visible,
.compound-nav-group.active .compound-nav-group-button {
  background: #eef7f2;
  color: var(--primary-dark);
  transform: none;
}

.compound-nav-group-icon {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  color: var(--primary-dark);
}

.compound-nav-group-icon svg {
  width: 20px;
  height: 20px;
}

.compound-nav-group-label {
  min-width: 0;
  overflow-wrap: anywhere;
}

.compound-nav-badge {
  padding: 2px 6px;
  border: 1px solid rgba(36, 87, 197, 0.24);
  border-radius: 999px;
  background: #edf3ff;
  color: var(--blue);
  font-size: 10px;
  font-weight: 850;
}

.compound-nav-items {
  display: grid;
  gap: 2px;
  padding-left: 36px;
}

.compound-nav-items button {
  position: relative;
  width: 100%;
  min-height: 34px;
  padding: 6px 8px 6px 12px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: #53655f;
  font-size: 13px;
  font-weight: 680;
  line-height: 1.25;
  text-align: left;
  box-shadow: none;
}

.compound-nav-items button::before {
  content: "";
  position: absolute;
  top: 7px;
  bottom: 7px;
  left: 0;
  width: 3px;
  border-radius: 2px;
  background: transparent;
}

.compound-nav-items button:hover,
.compound-nav-items button:focus-visible {
  background: #f5f8f5;
  color: var(--primary-dark);
  transform: none;
}

.compound-nav-items button.active {
  background: #e7f3ec;
  color: var(--primary-950);
  font-weight: 820;
}

.compound-nav-items button.active::before {
  background: var(--primary);
}

.compound-detail-content {
  min-width: 0;
}

.compound-content-context {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  margin-bottom: 12px;
  padding: 0 2px 10px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

.compound-content-context strong {
  color: var(--primary-dark);
  font-weight: 800;
}

.compound-content-context .is-hidden {
  display: none;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.stats-section {
  margin-top: 24px;
}

.summary-strip {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  align-items: stretch;
  border: 1px solid rgba(173, 196, 184, 0.72);
  border-radius: 12px;
  background: rgba(255, 253, 248, 0.92);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.stat {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-width: 0;
  padding: 18px 20px;
  border-right: 1px solid var(--line);
}

.stat:last-child {
  border-right: 0;
}

.stat svg {
  color: var(--primary-dark);
  grid-row: 1 / span 2;
}

.stat b {
  display: block;
  grid-column: 2;
  color: var(--primary-950);
  font-size: 25px;
  line-height: 1.05;
}

.stat span {
  grid-column: 2;
  grid-row: 1;
  color: var(--muted);
  font-size: 13px;
}

.section {
  margin-top: 26px;
}

.home-page .section {
  margin-top: 24px;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 12px;
}

.home-page .section-head {
  margin-bottom: 12px;
}

.inline-filter {
  display: grid;
  gap: 5px;
  min-width: 260px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}

.inline-filter select {
  min-height: 38px;
  min-width: 260px;
  color: var(--ink);
  font-weight: 500;
}

h2 {
  margin: 0;
  font-size: 24px;
  letter-spacing: 0;
}

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

.toolbar {
  display: grid;
  position: relative;
  grid-template-columns: minmax(260px, 1fr) repeat(4, minmax(160px, 220px)) auto;
  gap: 10px;
  align-items: center;
  margin-bottom: 14px;
}

.toolbar.compound-filter-panel {
  grid-template-columns: minmax(260px, 1fr) minmax(180px, 220px) minmax(220px, 260px) minmax(140px, 220px);
  gap: 0;
  align-items: stretch;
  width: 100%;
  min-height: 56px;
  padding: 8px;
  border: 1px solid var(--line-strong);
  border-radius: 13px;
  background: rgba(255, 253, 248, 0.94);
  box-shadow: 0 14px 34px rgba(16, 94, 78, 0.1);
}

.compound-filter-panel > input,
.compound-filter-panel .multi-select-trigger,
.compound-filter-panel .evidence-dropdown,
.compound-filter-panel > button {
  width: 100%;
  min-height: 48px;
}

.compound-filter-panel .multi-select-trigger,
.compound-filter-panel .evidence-dropdown {
  position: relative;
  border: 0;
  border-right: 1px solid var(--line);
  border-radius: 0;
  background: #fffdf9;
}

.compound-filter-panel > input {
  border: 0;
  border-right: 1px solid var(--line);
  border-radius: 7px 0 0 7px;
  background: #fffdf9;
}

.compound-filter-panel .multi-select-trigger,
.compound-filter-panel .evidence-trigger {
  font-size: 15px;
  font-weight: 500;
}

.compound-filter-panel .evidence-trigger {
  min-height: 46px;
}

.compound-filter-panel .multi-select.is-open .multi-select-trigger,
.compound-filter-panel .evidence-dropdown.is-open {
  border-color: var(--line);
  box-shadow: 0 0 0 3px rgba(31, 138, 112, 0.12);
}

.compound-filter-panel .multi-select-menu,
.compound-filter-panel .evidence-menu {
  z-index: 90;
}

.compound-filter-panel > button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 140px;
  border-radius: 0 7px 7px 0;
  box-shadow: none;
}

.toolbar.compact {
  grid-template-columns: minmax(260px, 1fr) minmax(160px, 220px) auto;
}

.toolbar.compact.manufacturing-filter {
  grid-template-columns: minmax(260px, 520px) minmax(240px, 340px) 130px;
  align-items: end;
  justify-content: start;
}

.toolbar.compact.manufacturing-filter button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: 100%;
  min-width: 120px;
  height: 42px;
  white-space: nowrap;
}

.toolbar.compact.manufacturing-filter button svg {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
}

.toolbar.species-only {
  grid-template-columns: minmax(240px, 320px);
  justify-content: start;
  margin-top: -2px;
}

.toolbar.literature-filter {
  grid-template-columns: minmax(220px, 300px) minmax(420px, 1fr) auto;
  align-items: end;
}

.field-label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}

.field-label span {
  line-height: 1;
}

.literature-table table {
  min-width: 1280px;
}

.literature-abstract {
  max-width: 520px;
  color: #3f5750;
  line-height: 1.45;
}

.inline-more {
  display: inline-flex;
  min-height: 24px;
  margin-left: 8px;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid #b9dfd3;
  background: #ecfbf5;
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 700;
  box-shadow: none;
  vertical-align: baseline;
}

.inline-more:hover {
  background: #dff7ee;
  transform: none;
}

.modal-open {
  overflow: hidden;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(13, 38, 32, 0.36);
}

.modal-backdrop[hidden] {
  display: none;
}

.modal-panel {
  position: relative;
  width: min(880px, 96vw);
  max-height: min(760px, 88vh);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  box-shadow: 0 26px 70px rgba(15, 45, 35, 0.22);
  padding: 26px;
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 34px;
  height: 34px;
  min-height: 34px;
  padding: 0;
  border-radius: 999px;
  background: #f3faf6;
  color: var(--primary-dark);
  box-shadow: none;
  font-size: 22px;
  line-height: 1;
}

.modal-kicker {
  margin-right: 44px;
  color: var(--primary-dark);
  font-size: 13px;
  font-weight: 800;
}

.modal-panel h2 {
  margin: 8px 44px 12px 0;
  font-size: 24px;
  line-height: 1.22;
}

.modal-panel h3 {
  margin: 20px 0 8px;
}

.modal-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  color: var(--muted);
}

.modal-panel p {
  color: #304a43;
  line-height: 1.7;
}

.performance-filters {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 10px;
}

.performance-filters label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}

.performance-filters select {
  min-width: 0;
  color: var(--ink);
  font-weight: 500;
}

.checks {
  display: flex;
  gap: 12px;
  align-items: center;
  color: var(--muted);
  font-size: 14px;
}

.checks input {
  min-height: auto;
}

.multi-select {
  position: relative;
  min-width: 0;
}

.multi-select-trigger {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 42px;
  padding: 9px 34px 9px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fffdf9;
  color: var(--ink);
  box-shadow: none;
  cursor: pointer;
  list-style: none;
  text-align: left;
  letter-spacing: 0;
  font-size: 15px;
  font-weight: 400;
}

.multi-select-trigger::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 13px;
  width: 7px;
  height: 7px;
  border-right: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
  transform: translateY(-62%) rotate(45deg);
  opacity: 0.95;
  pointer-events: none;
}

.multi-select.is-open .multi-select-trigger::after {
  transform: translateY(-35%) rotate(225deg);
}

.multi-select.is-open .multi-select-trigger {
  border-color: var(--line-strong);
  box-shadow: 0 0 0 3px rgba(31, 138, 112, 0.12);
}

.multi-select-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 35;
  display: grid;
  gap: 2px;
  width: min(360px, 80vw);
  max-height: 320px;
  overflow: auto;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.98);
  box-shadow: 0 18px 42px rgba(18, 39, 31, 0.14);
}

.multi-select:not(.is-open) .multi-select-menu {
  display: none;
}

.multi-select-search {
  position: sticky;
  top: -8px;
  z-index: 1;
  padding: 0 0 7px;
  background: rgba(255, 253, 248, 0.98);
}

.multi-select-search input {
  width: 100%;
  min-height: 36px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  font-size: 13px;
}

.multi-select-options {
  display: grid;
  gap: 2px;
}

.multi-select-menu label {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  padding: 7px 8px;
  border-radius: 6px;
  color: var(--ink);
  font-size: 13px;
  cursor: pointer;
}

.multi-select-menu label:hover {
  background: var(--soft);
}

.multi-select-menu .multi-select-all {
  font-weight: 700;
}

.multi-select-menu input {
  min-height: auto;
  margin-top: 2px;
}

.compound-autocomplete-root {
  position: relative;
}

.compound-autocomplete-panel {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 140;
  display: grid;
  gap: 4px;
  max-height: 340px;
  overflow: auto;
  padding: 8px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: rgba(255, 253, 248, 0.98);
  box-shadow: 0 18px 46px rgba(18, 39, 31, 0.16);
}

.compound-autocomplete-panel[hidden] {
  display: none;
}

.home-search-panel .compound-autocomplete-panel {
  top: calc(100% + 10px);
  left: 8px;
  right: 8px;
}

.compound-suggestion {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  width: 100%;
  min-height: 40px;
  padding: 9px 12px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--ink);
  box-shadow: none;
  text-align: left;
  letter-spacing: 0;
  appearance: none;
}

.compound-suggestion:hover,
.compound-suggestion.active {
  background: rgba(32, 151, 127, 0.1);
  color: var(--ink);
  box-shadow: none;
}

.compound-suggestion-main {
  overflow: hidden;
  color: var(--deep);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compound-suggestion-meta,
.compound-suggestion-match,
.compound-suggestion-empty {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
}

.compound-suggestion-match {
  color: var(--teal);
}

.compound-suggestion-empty {
  padding: 11px 12px;
}

.table-wrap {
  overflow: auto;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
}

.table-section-title {
  padding: 18px 18px 10px;
}

.table-section-title h2 {
  margin: 0;
}

.search-note {
  margin: 0 0 12px;
  padding: 10px 12px;
  border: 1px solid rgba(173, 196, 184, 0.58);
  border-radius: 8px;
  background: rgba(230, 243, 236, 0.56);
  color: #4f625b;
  font-size: 13px;
  font-weight: 550;
}

.search-empty {
  margin-bottom: 12px;
}

.advanced-search-page {
  display: grid;
  gap: 16px;
}

.advanced-tabs {
  display: inline-flex;
  width: fit-content;
  gap: 6px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.92);
}

.advanced-tabs button,
.advanced-tabs a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  padding: 7px 12px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #31423f;
  font: inherit;
  font-size: 13px;
  font-weight: 750;
  text-decoration: none;
}

.advanced-tabs button.active,
.advanced-tabs a.active {
  background: var(--soft);
  color: var(--primary-dark);
}

.advanced-tabs button:disabled {
  color: var(--muted);
  cursor: not-allowed;
  opacity: 0.68;
}

.advanced-tabs svg,
.structure-options-card button svg {
  width: 18px;
  height: 18px;
}

.structure-search-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 14px;
  align-items: stretch;
}

.entity-search-panel {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow-sm);
}

.entity-search-main {
  display: grid;
  grid-template-columns: minmax(150px, 190px) minmax(280px, 1fr) auto;
  gap: 12px;
  align-items: end;
}

.entity-search-combo {
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.entity-type-select select {
  min-height: 42px;
  font-weight: 800;
  color: var(--primary-dark);
}

.entity-query-field input {
  min-height: 42px;
}

.entity-search-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 9px 18px;
  white-space: nowrap;
}

.entity-search-submit svg {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
}

.entity-filter-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(170px, 1fr));
  gap: 12px;
}

.entity-filter-group {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 12px;
}

.entity-filter-subhead {
  margin: 12px 0 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.entity-range-filter {
  min-width: 0;
}

.entity-range-inputs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.entity-range-inputs input {
  min-width: 0;
}

.entity-record-link {
  min-height: 30px;
  padding: 5px 10px;
  white-space: nowrap;
}

.entity-search-panel .multi-select-trigger {
  width: 100%;
}

.entity-search-panel .multi-select-menu {
  width: min(360px, 100%);
}

.search-select {
  position: relative;
  min-width: 0;
}

.search-select-control {
  position: relative;
}

.search-select-control input[type="text"] {
  width: 100%;
  padding-right: 38px;
  cursor: pointer;
}

.search-select-control input[type="hidden"] {
  display: none;
}

.search-select-control button {
  position: absolute;
  top: 1px;
  right: 1px;
  width: 38px;
  height: calc(100% - 2px);
  min-height: 0;
  padding: 0;
  border: 0;
  border-left: 1px solid var(--line);
  border-radius: 0 6px 6px 0;
  background: transparent;
  box-shadow: none;
}

.search-select-control button::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 7px;
  height: 7px;
  border-right: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
  transform: translate(-50%, -62%) rotate(45deg);
}

.search-select.is-open .search-select-control input[type="text"] {
  border-color: var(--line-strong);
  box-shadow: 0 0 0 3px rgba(31, 138, 112, 0.12);
}

.search-select.is-open .search-select-control button::after {
  transform: translate(-50%, -35%) rotate(225deg);
}

.search-select-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 80;
  display: grid;
  gap: 2px;
  max-height: 300px;
  overflow: auto;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.98);
  box-shadow: 0 18px 42px rgba(18, 39, 31, 0.14);
}

.search-select-search {
  position: sticky;
  top: 0;
  z-index: 1;
  padding-bottom: 4px;
  background: rgba(255, 253, 248, 0.98);
}

.search-select-search input {
  width: 100%;
  min-height: 34px;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  font-size: 13px;
}

.search-select-search input:focus {
  border-color: var(--line-strong);
  box-shadow: 0 0 0 3px rgba(31, 138, 112, 0.12);
  outline: none;
}

.search-select-options {
  display: grid;
  gap: 2px;
}

.search-select:not(.is-open) .search-select-menu {
  display: none;
}

.search-select-menu button {
  min-height: 30px;
  justify-content: flex-start;
  padding: 6px 8px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--ink);
  box-shadow: none;
  text-align: left;
  font-size: 13px;
  font-weight: 650;
}

.search-select-menu button:hover {
  background: var(--soft);
  color: var(--primary-dark);
}

.search-select-clear {
  color: var(--primary-dark) !important;
  font-weight: 800 !important;
}

.search-select-empty {
  padding: 7px 8px;
  color: var(--muted);
  font-size: 13px;
}

.entity-core-filters {
  grid-template-columns: minmax(170px, 1fr) minmax(170px, 1fr) minmax(170px, 1fr);
}

.entity-more-filters {
  border-top: 1px solid rgba(183, 211, 199, 0.72);
  padding-top: 2px;
}

.entity-more-filters summary {
  width: fit-content;
  padding: 6px 0;
  color: var(--primary-dark);
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.entity-more-filters[open] summary {
  margin-bottom: 10px;
}

.active-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  padding-top: 4px;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 320px;
  min-height: 28px;
  padding: 4px 8px;
  border: 1px solid rgba(31, 138, 112, 0.26);
  border-radius: 999px;
  background: rgba(229, 247, 241, 0.78);
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 750;
  text-decoration: none;
}

.filter-chip span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.filter-chip b {
  color: #6c7c78;
  font-size: 13px;
}

.entity-search-results {
  display: grid;
  gap: 12px;
}

.entity-result-summary {
  grid-template-columns: minmax(0, 1fr);
}

.entity-result-table-wrap {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow-sm);
  overflow-x: auto;
}

.entity-result-table-wrap .data-table {
  min-width: 1180px;
}

.entity-match-pill {
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
  max-width: 220px;
  padding: 5px 8px;
  border: 1px solid rgba(31, 138, 112, 0.28);
  border-radius: 6px;
  background: rgba(229, 247, 241, 0.8);
}

.entity-match-pill span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.entity-match-pill strong {
  color: var(--primary-dark);
  overflow-wrap: anywhere;
}

.table-action {
  min-height: 28px;
  padding: 4px 9px;
  font-size: 12px;
}

.structure-editor-card,
.structure-options-card,
.structure-search-summary {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow-sm);
}

.structure-editor-card,
.structure-options-card {
  padding: 16px;
}

.structure-editor-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.structure-editor-head h3,
.structure-options-card h3 {
  margin: 0;
  font-size: 18px;
  letter-spacing: 0;
}

.structure-editor-shell {
  min-height: 520px;
  display: grid;
  grid-template-rows: minmax(420px, 1fr);
  gap: 12px;
  padding: 12px;
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  background:
    linear-gradient(rgba(31, 138, 112, 0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(31, 138, 112, 0.024) 1px, transparent 1px),
    #fffefb;
  background-size: 24px 24px;
}

.generated-smiles-field {
  margin-top: 12px;
}

.generated-smiles-field input[readonly] {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 13px;
  cursor: text;
}

.ketcher-frame-wrap {
  position: relative;
  min-height: 420px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.ketcher-frame-wrap iframe {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 420px;
  border: 0;
}

#ketcher-editor-portal {
  position: fixed;
  left: -10000px;
  top: 0;
  width: 1200px;
  height: 720px;
  z-index: 30;
  box-sizing: border-box;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  opacity: 0;
  pointer-events: none;
  transition: opacity 80ms ease;
}

#ketcher-editor-portal.is-active {
  opacity: 1;
  pointer-events: auto;
}

#ketcher-editor-portal iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.ketcher-loading-layer {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 24px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 650;
  text-align: center;
  background:
    linear-gradient(rgba(31, 138, 112, 0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(31, 138, 112, 0.024) 1px, transparent 1px),
    #fffefb;
  background-size: 24px 24px;
}

.ketcher-loading-layer[hidden] {
  display: none;
}

.ketcher-loading-spinner {
  width: 22px;
  height: 22px;
  border: 3px solid rgba(31, 138, 112, 0.18);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: ketcher-spin 0.8s linear infinite;
}

.ketcher-frame-wrap.is-error .ketcher-loading-spinner {
  display: none;
}

.ketcher-retry {
  min-height: 32px;
  padding: 6px 10px;
}

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

.structure-text-input {
  display: grid;
  gap: 5px;
}

.structure-text-input span {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.structure-text-input em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 500;
}

.structure-editor-shell textarea {
  display: block;
  width: 100%;
  min-height: 52px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffefb;
  color: var(--ink);
  font: 650 13px/1.45 ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  resize: vertical;
}

.structure-editor-shell textarea:focus {
  outline: 3px solid rgba(31, 138, 112, 0.16);
  outline-offset: 0;
}

.structure-editor-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.structure-editor-actions button,
.structure-options-card button,
.structure-options-card input {
  font: inherit;
}

.structure-editor-actions button {
  min-height: 34px;
  padding: 7px 10px;
}

.structure-editor-actions button.secondary {
  border: 1px solid rgba(18, 128, 105, 0.32);
  background: rgba(231, 244, 238, 0.72);
  color: var(--primary-dark);
  box-shadow: none;
}

.structure-editor-actions button.ghost {
  border: 1px solid var(--line);
  background: #fffefb;
  color: var(--ink);
  box-shadow: none;
}

.structure-editor-actions button.secondary:hover,
.structure-editor-actions button.ghost:hover {
  border-color: rgba(18, 128, 105, 0.48);
  background: rgba(32, 151, 127, 0.1);
}

.structure-options-card {
  display: grid;
  gap: 14px;
  align-content: start;
}

.segmented-control {
  display: grid;
  gap: 6px;
}

.segmented-control label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fffefb;
  color: var(--ink);
  font-weight: 750;
  cursor: pointer;
}

.segmented-control label.active {
  border-color: rgba(31, 138, 112, 0.48);
  background: var(--soft);
  color: var(--primary-dark);
}

.segmented-control input {
  accent-color: var(--primary);
  outline: none;
  box-shadow: none;
}

.segmented-control input:focus,
.segmented-control input:focus-visible {
  outline: none;
  box-shadow: none;
}

.segmented-control label:has(input:focus-visible) {
  outline: 2px solid rgba(31, 138, 112, 0.22);
  outline-offset: 2px;
}

.field-label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.field-label input {
  width: 100%;
  min-height: 40px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fffefb;
  color: var(--ink);
  font-size: 15px;
  font-weight: 650;
}

.entity-search-panel .multi-select-menu input[type="checkbox"] {
  width: 14px;
  height: 14px;
  min-height: 0;
  padding: 0;
  margin: 1px 0 0;
  border-radius: 2px;
  background: #fff;
}

.entity-search-panel .multi-select-menu label {
  min-height: 26px;
  align-items: center;
  padding: 4px 8px;
  line-height: 1.25;
}

.entity-search-panel .multi-select-search input {
  width: 100%;
  min-height: 36px;
  padding: 8px 10px;
  font-size: 13px;
}

.structure-threshold-field[hidden] {
  display: none;
}

.structure-mode-help {
  padding: 9px 10px;
  border: 1px solid rgba(31, 138, 112, 0.14);
  border-radius: 7px;
  background: rgba(231, 244, 238, 0.45);
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.45;
}

.structure-method-note {
  color: var(--muted);
  font-size: 12.5px;
}

.structure-options-card > button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 9px 14px;
}

.structure-search-note {
  margin-bottom: 0;
}

.structure-search-summary {
  display: grid;
  grid-template-columns: minmax(220px, 0.35fr) minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  padding: 14px 16px;
}

.structure-search-summary strong {
  display: block;
  margin-bottom: 2px;
  font-size: 17px;
}

.structure-standardized {
  display: grid;
  gap: 6px;
  min-width: 0;
  color: var(--muted);
  font-size: 12.5px;
}

.structure-standardized span,
.structure-smiles-field strong {
  overflow-wrap: anywhere;
}

.structure-standardized b {
  color: var(--ink);
}

.structure-result-list {
  margin-top: 0;
}

.compound-result-list {
  display: grid;
  gap: 14px;
}

.compound-result-card {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 18px;
  align-items: stretch;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
}

.compound-result-card:hover {
  border-color: rgba(31, 138, 112, 0.44);
  box-shadow: 0 12px 26px rgba(18, 39, 31, 0.08);
}

.compound-result-structure {
  display: grid;
  place-items: center;
  min-height: 142px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.compound-result-structure img {
  display: block;
  width: 100%;
  height: 128px;
  object-fit: contain;
}

.compound-result-info {
  display: grid;
  grid-template-rows: auto auto auto 1fr auto;
  gap: 10px;
  min-width: 0;
}

.compound-result-head {
  min-width: 0;
}

.compound-result-kicker {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.compound-result-head h3 {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: baseline;
  margin: 0;
  font-size: 18px;
}

.compound-result-head h3 span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.compound-result-head h3 a {
  color: var(--ink);
  text-decoration: none;
}

.compound-result-action {
  min-height: 34px;
  padding: 7px 12px;
  font-size: 13px;
}

.compound-result-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 8px;
}

.compound-result-field {
  min-width: 0;
  padding: 0;
}

.compound-result-field span,
.compound-result-label {
  display: inline;
  margin: 0 6px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.compound-result-field strong {
  display: inline;
  color: var(--ink);
  font-size: 14px;
  overflow-wrap: anywhere;
}

.compound-result-data {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.compound-result-data .compound-result-label {
  margin: 0;
}

.compound-result-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.compound-result-footer {
  display: flex;
  justify-content: flex-end;
  align-self: end;
}

.sort-note {
  margin-top: 3px;
  font-size: 13px;
}

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

th,
td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  font-size: 14px;
}

th {
  position: sticky;
  top: 0;
  z-index: 3;
  background: #eef6f0;
  color: #203530;
  font-weight: 650;
}

.enhanced-table th {
  overflow: visible;
}

.enhanced-table tbody tr[hidden] {
  display: none;
}

.column-filter-head {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  min-width: 0;
}

.table-sort-button {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  min-width: 0;
  min-height: 28px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 750;
  text-align: left;
  box-shadow: none;
}

.table-sort-button:hover,
.table-sort-button:focus-visible {
  color: var(--primary-dark);
  background: transparent;
  transform: none;
}

.table-th-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sort-indicator {
  flex: 0 0 auto;
  color: #6b7d76;
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
}

.enhanced-table th.is-sorted .sort-indicator {
  color: var(--primary-dark);
}

.enhanced-table th.is-filtered {
  background: #e1f2ec;
}

.enhanced-table th.is-filtered .column-filter-toggle {
  background: #d6eee6;
  color: var(--primary-dark);
}

.column-filter-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  min-height: 26px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #6b7d76;
  box-shadow: none;
}

.column-filter-toggle svg {
  width: 15px;
  height: 15px;
}

.column-filter-toggle:hover,
.column-filter-toggle.active {
  background: var(--soft);
  color: var(--primary-dark);
  transform: none;
}

.column-filter-popover {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 80;
  display: none;
  width: min(260px, 76vw);
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 12px 28px rgba(15, 45, 35, 0.14);
}

.column-filter-popover.open {
  display: grid;
  gap: 8px;
}

.column-filter-popover.positioning {
  position: fixed;
  right: auto;
  z-index: 3000;
}

.column-filter-label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.column-filter-popover input {
  width: 100%;
  min-height: 34px;
  padding: 7px 10px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
}

.column-filter-range {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.column-filter-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.column-filter-actions button {
  min-height: 34px;
  padding: 7px 10px;
  border-radius: 6px;
  font-size: 13px;
}

.column-filter-actions button:first-child {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.column-filter-actions button.ghost {
  border-color: var(--line);
  background: #fffdf9;
  color: var(--primary-dark);
  box-shadow: none;
}

.column-filter-actions svg {
  width: 14px;
  height: 14px;
}

tr:hover td {
  background: #f9fcfa;
}

.clickable-row {
  cursor: pointer;
}

.clickable-row:focus-visible td {
  outline: 3px solid rgba(31, 138, 112, 0.22);
  outline-offset: -3px;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  max-width: 100%;
  padding: 3px 7px;
  border-radius: 5px;
  border: 1px solid rgba(31, 138, 112, 0.18);
  background: var(--soft);
  color: var(--primary-dark);
  font-size: 12px;
  line-height: 1.2;
  font-weight: 700;
}

.tag.blue {
  background: #e8efff;
  color: #1d4ed8;
}

.tag.amber {
  background: #fff4df;
  color: var(--amber);
}

.tag.red {
  background: #fee2e2;
  color: var(--red);
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  min-width: 160px;
  max-width: 280px;
}

.tag-stack .tag {
  white-space: normal;
  overflow-wrap: anywhere;
}

.source-database-links {
  min-width: 0;
  max-width: 100%;
}

.external-database-links {
  gap: 6px;
}

.source-link-tag {
  line-height: 1.35;
}

.reference-link-list {
  display: inline;
  line-height: 1.45;
}

.reference-link {
  color: #0f766e;
  font-weight: 700;
  text-decoration: none;
}

.reference-link:hover,
.reference-link:focus-visible {
  color: #1d4ed8;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.reference-separator {
  color: var(--muted);
  font-weight: 400;
}

.food-reference-links {
  min-width: 0;
  max-width: 100%;
}

.food-reference-text {
  display: inline;
  overflow-wrap: anywhere;
}

.bioactivity-citation-text {
  display: inline;
  color: inherit;
}

.bioactivity-source-references {
  margin-top: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf9;
}

.bioactivity-source-references h3 {
  margin: 0 0 10px;
  font-size: 15px;
}

.bioactivity-source-references dl {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 8px 12px;
  margin: 0;
}

.bioactivity-source-references dt,
.bioactivity-source-references dd {
  margin: 0;
}

.bioactivity-source-references dd {
  color: var(--muted);
  line-height: 1.45;
}

.food-source-references {
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffefa;
}

.food-source-references summary {
  cursor: pointer;
  padding: 12px 14px;
  color: var(--primary-dark);
  font-weight: 820;
}

.food-source-references[open] summary {
  border-bottom: 1px solid var(--line);
  background: var(--soft);
}

.food-source-references p {
  margin: 12px 14px;
  color: var(--muted);
  line-height: 1.55;
}

.food-source-reference-table-wrap {
  margin: 0 14px 14px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.food-source-reference-table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
  font-size: 14px;
}

.food-source-reference-table th,
.food-source-reference-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  border-right: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  white-space: normal;
  overflow-wrap: anywhere;
}

.food-source-reference-table th:last-child,
.food-source-reference-table td:last-child {
  border-right: 0;
}

.food-source-reference-table tr:last-child td {
  border-bottom: 0;
}

.food-source-reference-table th {
  background: var(--soft);
  color: var(--primary-950);
  font-weight: 820;
}

.food-source-reference-table td:first-child {
  width: 150px;
  color: var(--primary-dark);
  font-weight: 760;
}

.food-source-reference-table td:nth-child(2) {
  width: 240px;
  color: var(--primary-950);
  font-weight: 650;
}

.compact-tags {
  max-width: 780px;
}

.compact-tags .tag {
  white-space: normal;
  overflow-wrap: anywhere;
  text-align: left;
}

.pager {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.pager-pages {
  display: flex;
  align-items: center;
  gap: 6px;
}

.pager-page,
.pager-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  min-height: 36px;
  padding: 0 10px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: var(--ink);
  font-weight: 700;
  box-shadow: none;
}

.pager-page:hover,
.pager-icon:hover {
  border-color: var(--line);
  background: var(--soft);
  transform: none;
}

.pager-page.active {
  border-color: var(--green);
  background: #effaf5;
  color: var(--green-dark);
}

.pager-page:disabled,
.pager-icon:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.pager-gap {
  min-width: 28px;
  color: var(--muted);
  text-align: center;
}

.pager-size {
  width: auto;
  min-width: 112px;
  min-height: 36px;
  padding: 6px 30px 6px 10px;
  border-radius: 7px;
  font-weight: 700;
}

.echarts-country-map {
  width: 100%;
  min-height: 620px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffefa;
}

.detail-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 22px;
  align-items: start;
  margin-bottom: 18px;
}

.panel {
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  box-shadow: var(--shadow-sm);
}

.help-page {
  display: grid;
  gap: 14px;
}

.help-page-head {
  align-items: start;
}

.help-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.help-sidebar {
  position: sticky;
  top: 104px;
  max-height: calc(100vh - 132px);
  overflow: auto;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.96);
  box-shadow: var(--shadow-sm);
}

.help-sidebar-title {
  margin-bottom: 10px;
  color: var(--primary-950);
  font-size: 15px;
  font-weight: 850;
}

.help-nav {
  display: grid;
  gap: 4px;
  margin: 0;
}

.help-nav a {
  display: block;
  min-height: auto;
  padding: 5px 8px;
  border-radius: 6px;
  color: var(--primary-dark);
  font-size: 13px;
  font-weight: 680;
  line-height: 1.25;
  white-space: normal;
}

.help-nav a:hover,
.help-nav a:focus-visible {
  background: var(--soft);
  color: var(--primary-dark);
}

.help-nav-group {
  display: grid;
  gap: 3px;
  margin-top: 6px;
}

.help-nav-group:first-child {
  margin-top: 0;
}

.help-nav-heading {
  padding: 11px 8px 4px;
  color: var(--primary-950);
  font-size: 14px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0;
  background: transparent;
  border: 0;
}

.help-nav-heading:hover,
.help-nav-heading:focus-visible {
  background: transparent;
  color: var(--primary-950);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.help-nav-group a {
  color: #176b5b;
  padding-left: 22px;
  font-size: 13px;
  font-weight: 700;
}

.help-nav-group .help-nav-heading {
  color: var(--primary-950);
  padding-left: 8px;
  font-size: 14px;
  font-weight: 900;
}

.help-content {
  display: grid;
  gap: 18px;
  min-width: 0;
}

.help-section {
  scroll-margin-top: 110px;
  display: grid;
  gap: 14px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow-sm);
}

.help-section-copy {
  display: grid;
  gap: 9px;
  max-width: 1060px;
}

.help-section h2 {
  color: var(--primary-950);
  font-size: 23px;
}

.help-section p {
  margin: 0;
  color: #31433e;
}

.help-section ul {
  margin: 0;
  padding-left: 21px;
  color: #31433e;
}

.help-section li + li {
  margin-top: 4px;
}

.help-table-caption {
  color: var(--primary-950);
  font-weight: 760;
}

.help-table-wrap {
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffefa;
}

.help-data-table {
  width: 100%;
  min-width: 1080px;
  border-collapse: collapse;
  font-size: 14px;
}

.help-data-table th,
.help-data-table td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--line);
  border-right: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  white-space: normal;
  overflow-wrap: anywhere;
}

.help-data-table th:last-child,
.help-data-table td:last-child {
  border-right: 0;
}

.help-data-table tr:last-child td {
  border-bottom: 0;
}

.help-data-table th {
  background: var(--soft);
  color: var(--primary-950);
  font-weight: 820;
}

.help-data-table td:nth-child(1) {
  width: 220px;
  color: var(--primary-950);
  font-weight: 720;
}

.help-data-table td:nth-child(4),
.help-data-table td:nth-child(5) {
  width: 130px;
  color: var(--primary-dark);
  font-weight: 760;
}

.help-screenshot-link {
  display: block;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffefa;
  overflow: hidden;
}

.help-screenshot-link:hover {
  border-color: var(--line-strong);
}

.help-screenshot {
  display: block;
  width: 100%;
  height: auto;
  background: #fffefa;
}

.privacy-page .help-section code {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 4px;
  background: var(--soft);
  color: var(--primary-950);
  font-family: "JetBrains Mono", "Fira Code", "Consolas", "Menlo", ui-monospace, monospace;
  font-size: 12.5px;
  line-height: 1.35;
  word-break: break-all;
}

.privacy-page .help-data-table td:nth-child(1) {
  width: 180px;
}

.privacy-page .help-data-table td:nth-child(3),
.privacy-page .help-data-table td:nth-child(4),
.privacy-page .help-data-table td:nth-child(5) {
  width: auto;
}

.downloads-page {
  display: grid;
  gap: 14px;
}

.download-card-meta,
.download-card p {
  color: var(--muted);
}

.download-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.download-card {
  display: grid;
  gap: 12px;
  align-content: start;
  min-height: 238px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow-sm);
}

.download-card-head {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.download-card-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: var(--soft);
  color: var(--primary-dark);
}

.download-card-icon svg {
  width: 23px;
  height: 23px;
}

.download-card h3 {
  margin: 0;
  color: var(--primary-950);
  font-size: 17px;
  line-height: 1.25;
}

.download-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 7px;
  font-size: 12px;
  font-weight: 800;
}

.download-card-meta span {
  padding: 3px 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
}

.download-card p {
  margin: 0;
  line-height: 1.45;
}

.download-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: fit-content;
  align-self: end;
  margin-top: auto;
}

.download-action svg {
  width: 17px;
  height: 17px;
}

.compound-title h1 {
  margin: 0 0 8px;
  font-size: 34px;
  line-height: 1.12;
}

.kv {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  gap: 8px 14px;
  font-size: 14px;
}

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

.kv dd {
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.field-card {
  min-width: 0;
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fbfdfb;
}

.field-card span {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 12px;
}

.field-card b {
  display: block;
  min-width: 0;
  color: var(--ink);
  font-size: 14px;
  font-weight: 650;
  overflow-wrap: anywhere;
}

.field-card a {
  color: var(--primary-dark);
  text-decoration: none;
}

.field-card a:hover {
  text-decoration: underline;
}

.field-wide {
  grid-column: 1 / -1;
}

.field-mono code {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 13px;
  white-space: normal;
}

.compound-overview-stack {
  display: grid;
  gap: 14px;
}

.compound-overview-side {
  display: grid;
  gap: 14px;
  align-content: start;
}

.database-links-panel {
  padding-top: 16px;
}

.food-functional-roles-panel {
  padding-top: 16px;
}

.food-functional-roles-panel .section-head {
  margin-bottom: 10px;
}

.food-functional-roles-panel .section-head h2 {
  margin-bottom: 3px;
}

.food-functional-roles-panel .section-head p {
  margin: 0;
  font-size: 13px;
  line-height: 1.4;
}

.functional-role-groups {
  display: grid;
  gap: 9px;
}

.functional-role-group {
  display: grid;
  gap: 5px;
}

.functional-role-group-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.functional-role-list {
  display: grid;
  gap: 5px;
}

.functional-role-row {
  border: 1px solid rgba(31, 138, 112, 0.16);
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.42);
}

.functional-role-row-summary {
  display: grid;
  gap: 6px;
  padding: 7px 9px;
  color: var(--ink);
}

.functional-role-name {
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
}

.functional-role-source-list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.functional-role-source-chip {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: 2px 6px;
  border: 1px solid rgba(31, 138, 112, 0.25);
  border-radius: 4px;
  background: #eef8f4;
  color: var(--primary-dark);
  font-size: 11px;
  font-weight: 750;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.functional-role-source-chip-link {
  text-decoration: none;
}

.functional-role-source-chip-link:hover,
.functional-role-source-chip-link:focus-visible {
  border-color: rgba(31, 138, 112, 0.52);
  background: #dff3eb;
  color: var(--primary-dark);
  text-decoration: underline;
}

.functional-role-source-context {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.functional-role-source-context-link {
  color: var(--primary-dark);
  text-decoration: underline;
  text-decoration-color: rgba(31, 138, 112, 0.4);
  text-underline-offset: 2px;
}

.functional-role-source-context-link:hover,
.functional-role-source-context-link:focus-visible {
  color: var(--primary);
  text-decoration-color: currentColor;
}

.functional-role-source-block {
  display: grid;
  justify-items: start;
  gap: 5px;
}

.functional-role-source-context-list {
  display: grid;
  gap: 4px;
  padding-left: 8px;
  border-left: 2px solid rgba(31, 138, 112, 0.22);
}

.database-link-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}

.database-link-card {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 10px 11px;
  border: 1px solid rgba(31, 138, 112, 0.18);
  border-radius: 6px;
  background: #fbfdfb;
  color: var(--ink);
  text-decoration: none;
}

.database-link-card:hover,
.database-link-card:focus-visible {
  border-color: rgba(31, 138, 112, 0.42);
  background: #eef8f4;
  color: var(--primary-dark);
  text-decoration: none;
}

.database-link-card-static {
  cursor: default;
  background: #f7f9f8;
  border-style: dashed;
}

.database-link-card-static:hover {
  border-color: rgba(31, 138, 112, 0.18);
  background: #f7f9f8;
  color: var(--ink);
}

.database-link-name {
  color: var(--primary-dark);
  font-size: 13px;
  font-weight: 850;
}

.database-link-id {
  color: var(--ink);
  font-size: 14px;
  font-weight: 720;
  overflow-wrap: anywhere;
}

.database-link-id-linked {
  color: var(--primary);
}

.database-link-type {
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.database-reference-block {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(31, 138, 112, 0.14);
}

.database-reference-title {
  margin-bottom: 7px;
  color: var(--primary-dark);
  font-size: 13px;
  font-weight: 850;
}

.database-reference-list {
  display: grid;
  gap: 6px;
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.database-reference-db {
  color: var(--ink);
  font-weight: 800;
}

.synonyms-card {
  display: grid;
  gap: 8px;
}

.synonym-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  overflow: visible;
}

.synonyms-card.is-expanded .synonym-list {
  max-height: none;
  overflow: visible;
}

.synonym-list em {
  display: inline-flex;
  max-width: 100%;
  padding: 4px 8px;
  border: 1px solid rgba(31, 138, 112, 0.18);
  border-radius: 999px;
  background: #eef8f4;
  color: #06443d;
  font-size: 12px;
  font-style: normal;
  font-weight: 700;
  overflow-wrap: anywhere;
  word-break: break-word;
  white-space: normal;
}

.synonym-list em.synonym-long {
  align-items: flex-start;
  border-radius: 8px;
  line-height: 1.35;
}

.synonym-extra {
  display: none;
}

.synonyms-card.is-expanded .synonym-extra {
  display: inline-flex;
}

.synonym-toggle {
  justify-self: end;
  min-height: auto;
  padding: 4px 8px;
  border: 1px solid rgba(31, 138, 112, 0.22);
  border-radius: 999px;
  background: #e8f7f2;
  color: var(--primary-dark);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.2;
}

.synonym-toggle:hover {
  background: #d7f1e9;
  border-color: rgba(31, 138, 112, 0.4);
  color: var(--green-dark);
  transform: none;
}

.taxonomy-path {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin-bottom: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fbfdfb;
}

.taxonomy-path span {
  font-weight: 650;
}

.taxonomy-path em::before {
  content: ">";
  color: var(--muted);
  font-style: normal;
}

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

.structure {
  display: grid;
  place-items: center;
  min-height: 240px;
  background: #fff;
}

.structure img {
  max-width: 100%;
  max-height: 260px;
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.tabs button {
  min-height: 36px;
  padding: 7px 11px;
  border-color: var(--line);
  background: #fffdf9;
  color: var(--ink);
  box-shadow: none;
}

.tabs button.active {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
}

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

.evidence-panel h2 {
  margin-bottom: 12px;
}

.inline-table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf9;
}

.evidence-table {
  min-width: 720px;
}

.toxicity-table {
  min-width: 520px;
}

.host-table {
  min-width: 1040px;
}

.feedstock-table {
  min-width: 980px;
}

.feedstock-detail-table {
  min-width: 1260px;
}

.gene-table {
  min-width: 720px;
}

.gene-detail-table {
  min-width: 1160px;
}

.stacked-cell {
  display: grid;
  gap: 3px;
  line-height: 1.35;
}

.performance-best-table,
.performance-evidence-table {
  min-width: 1280px;
}

.selected-performance-row td {
  background: #fff3c4 !important;
  box-shadow: inset 0 1px 0 #e1b93b, inset 0 -1px 0 #e1b93b;
}

.selected-performance-row td:first-child {
  box-shadow: inset 4px 0 0 #d99b12, inset 0 1px 0 #e1b93b, inset 0 -1px 0 #e1b93b;
}

.regulation-summary {
  grid-template-columns: repeat(4, minmax(150px, 1fr));
}

.regulation-table {
  min-width: 980px;
}

.regulation-standard-link {
  color: #0f766e;
  text-decoration: none;
}

.regulation-standard-link:hover,
.regulation-standard-link:focus-visible {
  color: #1d4ed8;
}

.regulation-detail summary {
  cursor: pointer;
  color: var(--primary-dark);
  font-weight: 700;
}

.regulation-detail[open] summary {
  margin-bottom: 10px;
}

.regulation-detail-kv {
  min-width: 360px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fbfdfb;
}

.regulation-detail-card {
  display: grid;
  gap: 12px;
  min-width: 520px;
  max-width: 780px;
}

.regulation-detail-group {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  overflow: hidden;
}

.regulation-detail-group h4 {
  margin: 0;
  padding: 9px 12px;
  border-bottom: 1px solid var(--line);
  background: var(--soft);
  font-size: 14px;
}

.regulation-detail-group .regulation-detail-kv {
  border: 0;
  border-radius: 0;
  background: transparent;
}

.regulation-long-text {
  display: grid;
  gap: 4px;
}

.regulation-long-text details:not([open]) p {
  display: none;
}

.regulation-long-text details:not([open])::before {
  content: attr(data-preview);
  display: block;
  line-height: 1.55;
}

.regulation-long-text details:not([open]) summary {
  margin-top: 4px;
}

.regulation-long-text details summary {
  width: fit-content;
  color: var(--primary-dark);
  cursor: pointer;
  font-weight: 700;
}

.regulation-long-text p {
  margin: 6px 0 0;
  line-height: 1.55;
}

.host-evidence-table {
  min-width: 1180px;
}

.organism-detail-table {
  min-width: 1420px;
}

.detail-target {
  scroll-margin-top: 92px;
}

.list {
  display: grid;
  gap: 10px;
}

.record {
  padding: 12px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 5px 14px rgba(18, 39, 31, 0.045);
}

.record h3 {
  margin: 0 0 8px;
  font-size: 17px;
}

.record p {
  margin: 6px 0;
}

.pathway-img {
  width: 100%;
  max-height: 720px;
  object-fit: contain;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: inset 0 0 0 1px rgba(16, 94, 78, 0.03);
}

.small-note {
  margin-top: 4px;
  font-size: 13px;
}

.interactive-pathway {
  display: grid;
  gap: 12px;
  min-width: 0;
  max-width: 100%;
}

.computed-alternative-section {
  margin-top: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
  overflow: hidden;
}

.computed-alternative-header {
  width: 100%;
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border: 0;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  text-align: left;
}

.computed-alternative-header:hover,
.computed-alternative-header.is-expanded {
  background: rgba(31, 138, 112, 0.07);
}

.computed-alternative-heading {
  font-size: 18px;
  font-weight: 750;
}

.computed-alternative-header-meta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.computed-alternative-count {
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}

.computed-alternative-chevron {
  color: var(--primary-dark);
  font-size: 22px;
  line-height: 1;
  transition: transform 150ms ease;
}

.computed-alternative-header.is-expanded .computed-alternative-chevron {
  transform: rotate(180deg);
}

.computed-alternative-content {
  border-top: 1px solid var(--line);
  padding: 14px 16px 16px;
}

.computed-alternative-content[hidden] {
  display: none;
}

.computed-alternative-description {
  margin: 0 0 12px;
}

.computed-alternative-body {
  min-width: 0;
}

.computed-alternative-route-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 10px;
}

.computed-alternative-route {
  max-width: 100%;
  text-align: left;
}

.computed-alternative-route.is-active {
  border-color: var(--primary);
  background: rgba(31, 138, 112, 0.10);
  color: var(--primary-dark);
}

.ranked-computed-candidates {
  margin-top: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
  overflow: hidden;
}

.ranked-computed-candidate-header {
  width: 100%;
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border: 0;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  text-align: left;
}

.ranked-computed-candidate-header:hover,
.ranked-computed-candidate-header.is-expanded {
  background: rgba(31, 138, 112, 0.07);
}

.ranked-computed-candidate-heading {
  font-size: 18px;
  font-weight: 750;
}

.ranked-computed-candidate-header-meta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.ranked-computed-candidate-count {
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
  white-space: nowrap;
}

.ranked-computed-candidate-chevron {
  color: var(--primary-dark);
  font-size: 22px;
  line-height: 1;
  transition: transform 150ms ease;
}

.ranked-computed-candidate-header.is-expanded .ranked-computed-candidate-chevron {
  transform: rotate(180deg);
}

.ranked-computed-candidate-content {
  border-top: 1px solid var(--line);
  padding: 14px 16px 16px;
}

.ranked-computed-candidate-content[hidden],
.ranked-computed-candidate-content .interactive-pathway[hidden] {
  display: none;
}

.ranked-computed-candidate-description {
  margin: 0 0 7px;
}

.ranked-computed-candidate-ranking {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 13px;
}

.ranked-computed-candidate-route-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-height: 260px;
  margin: 0 0 12px;
  overflow: auto;
  padding: 1px;
}

.ranked-computed-candidate-route {
  max-width: 100%;
  text-align: left;
}

.ranked-computed-candidate-route.is-active {
  border-color: var(--primary);
  background: rgba(31, 138, 112, 0.10);
  color: var(--primary-dark);
}

.pathway-toolbar,
.pathway-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.pathway-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(249, 251, 245, 0.86);
}

.pathway-zoom-controls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.pathway-zoom-controls .icon-button {
  width: 34px;
  min-width: 34px;
  height: 34px;
  padding: 0;
  justify-content: center;
  font-size: 18px;
  line-height: 1;
}

.pathway-zoom-readout {
  min-width: 70px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.pathway-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 360px);
  gap: 14px;
  align-items: stretch;
  min-width: 0;
  max-width: 100%;
}

.pathway-svg-frame {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  overflow: auto;
  min-height: 560px;
  max-height: 760px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: grab;
  touch-action: pan-x pan-y;
  background:
    linear-gradient(rgba(31, 138, 112, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(31, 138, 112, 0.03) 1px, transparent 1px),
    #fff;
  background-size: 28px 28px;
}

.pathway-svg-frame.is-dragging {
  cursor: grabbing;
  user-select: none;
}

.pathway-svg-inline {
  display: block;
  width: max-content;
  min-width: 100%;
  max-width: none;
}

.pathway-svg-inline svg {
  display: block;
  max-width: none;
  height: auto;
}

.pathway-svg-inline.fit-width {
  width: 100%;
}

.pathway-svg-inline.fit-width svg {
  width: 100%;
  height: auto;
}

.pathway-svg-clickable {
  cursor: pointer;
}

.pathway-svg-inline g.pathway-node-internal-link:hover polygon,
.pathway-svg-inline g.pathway-node-internal-link:hover path {
  stroke: var(--primary-dark) !important;
  stroke-width: 2px !important;
}

.pathway-svg-inline .pathway-edge-hit {
  fill: none !important;
  stroke: transparent !important;
  pointer-events: stroke;
  vector-effect: non-scaling-stroke;
}

.pathway-svg-inline .pathway-edge-click-area {
  fill: transparent !important;
  stroke: transparent !important;
  pointer-events: all;
}

.pathway-svg-inline g.edge path:not(.pathway-edge-hit) {
  pointer-events: none;
}

.pathway-svg-inline g.edge text,
.pathway-svg-inline g.edge polygon {
  pointer-events: all;
}

.pathway-svg-inline g.node.is-selected polygon,
.pathway-svg-inline g.node.is-selected path {
  stroke: var(--primary) !important;
  stroke-width: 3px !important;
}

.pathway-svg-inline g.edge.is-selected path:not(.pathway-edge-hit) {
  stroke: var(--primary) !important;
  stroke-width: 3px !important;
}

.pathway-svg-inline g.edge.is-selected polygon {
  stroke: var(--primary) !important;
  fill: var(--primary) !important;
}

.pathway-click-detail {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
}

.pathway-click-detail .pathway-detail-structure {
  max-width: 260px;
}

.pathway-click-detail a,
.pathway-detail-link {
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
  color: #006b57;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.pathway-click-detail a:hover,
.pathway-detail-link:hover {
  color: #004c3f;
  text-decoration-thickness: 2px;
}

.inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.pathway-canvas-wrap {
  position: relative;
  overflow: auto;
  min-height: 520px;
  max-height: 680px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(rgba(31, 138, 112, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(31, 138, 112, 0.03) 1px, transparent 1px),
    #fff;
  background-size: 28px 28px;
}

.pathway-canvas {
  position: relative;
  min-width: 100%;
  min-height: 520px;
}

.pathway-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.pathway-edge {
  fill: none;
  stroke-width: 1.8;
  cursor: pointer;
}

.pathway-edge.known {
  stroke: #273632;
}

.pathway-edge.unknown {
  stroke: #111;
  stroke-dasharray: 7 5;
}

.pathway-svg marker path {
  fill: #273632;
}

#arrow-unknown path {
  fill: #111;
}

.pathway-edge-label {
  cursor: pointer;
  fill: #243532;
  paint-order: stroke;
  stroke: #fff;
  stroke-width: 4px;
  font-size: 11px;
  font-weight: 700;
}

.pathway-node {
  position: absolute;
  display: grid;
  grid-template-rows: 98px auto auto;
  gap: 4px;
  padding: 10px;
  border: 2px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.96);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
  text-align: center;
  white-space: normal;
}

.pathway-node:hover,
.pathway-node.selected {
  border-color: var(--primary);
  background: #fff;
  box-shadow: 0 16px 34px rgba(18, 39, 31, 0.12);
}

.pathway-node-image {
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: 0;
}

.pathway-node-image img {
  max-width: 100%;
  max-height: 96px;
  object-fit: contain;
}

.pathway-node strong {
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  font-size: 12px;
  line-height: 1.2;
}

.pathway-node small {
  color: var(--muted);
  font-size: 11px;
}

.pathway-reaction-node {
  display: grid;
  place-items: center;
  padding: 0;
  border-width: 1px;
  border-radius: 4px;
  transform: rotate(45deg);
  background: #ffe08a;
  box-shadow: 0 10px 22px rgba(18, 39, 31, 0.1);
}

.pathway-reaction-node span {
  transform: rotate(-45deg);
  font-size: 9px;
  font-weight: 800;
  color: #4a3a05;
}

.pathway-reaction-node.known {
  border-color: #c18b00;
}

.pathway-reaction-node.unknown {
  border-color: #111;
  background: #fff2d3;
}

.pathway-detail {
  min-width: 0;
  max-width: 100%;
  overflow: auto;
  max-height: 680px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
}

.pathway-detail h3 {
  margin: 0 0 10px;
}

.pathway-detail-structure {
  display: block;
  max-width: 100%;
  max-height: 180px;
  margin: 0 auto 12px;
  object-fit: contain;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.pathway-links h4 {
  margin: 16px 0 8px;
}

.pathway-detail-section {
  min-width: 0;
  max-width: 100%;
}

.pathway-reaction-detail {
  min-width: 0;
  max-width: 100%;
}

.pathway-reaction-detail h3 {
  margin: 0 0 12px;
}

.pathway-reaction-kv {
  grid-template-columns: minmax(118px, 150px) minmax(0, 1fr);
  align-items: start;
}

.pathway-reaction-kv dt,
.pathway-reaction-kv dd {
  min-width: 0;
}

.pathway-reaction-kv dd {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.pathway-reaction-kv .tag {
  display: inline-flex;
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  vertical-align: middle;
}

.pathway-record-detail {
  margin: 8px 0;
}

.pathway-record-detail summary {
  cursor: pointer;
  color: var(--primary-dark);
  font-weight: 800;
}

.pathway-evidence-table-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.pathway-evidence-table {
  width: 100%;
  min-width: 1560px;
  table-layout: fixed;
  border-collapse: collapse;
  font-size: 13px;
  background: #fff;
}

.pathway-evidence-table th,
.pathway-evidence-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  line-height: 1.28;
}

.pathway-evidence-table th {
  background: var(--soft);
  color: var(--primary-dark);
  font-weight: 800;
  white-space: normal;
  overflow-wrap: anywhere;
}

.pathway-evidence-table th .th-content {
  align-items: flex-start;
  gap: 4px;
}

.pathway-evidence-table th .th-label {
  min-width: 0;
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.18;
}

.pathway-evidence-table .column-filter-head {
  align-items: flex-start;
  gap: 4px;
}

.pathway-evidence-table .table-sort-button {
  flex: 1 1 auto;
  min-width: 0;
  white-space: normal;
}

.pathway-evidence-table .table-th-label {
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
  overflow-wrap: normal;
  word-break: normal;
  line-height: 1.18;
}

.pathway-evidence-table .column-filter-toggle {
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  min-height: 22px;
}

.pathway-evidence-table .sort-indicator {
  margin-top: 2px;
}

.pathway-evidence-table th .sort-indicator,
.pathway-evidence-table th .filter-icon {
  flex: 0 0 auto;
}

.pathway-evidence-table td {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.pathway-evidence-table .tag {
  display: inline-flex;
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.pathway-gene-token-list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: flex-start;
}

.pathway-gene-evidence-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
}

.pathway-gene-evidence-group {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  max-width: 100%;
}

.pathway-gene-role {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
}

.pathway-gene-connector,
.pathway-gene-group-connector {
  align-self: center;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  padding: 0 1px;
}

.pathway-gene-or {
  color: #7a5d00;
  font-size: 10px;
}

.pathway-gene-token {
  display: inline-flex;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.pathway-gene-link {
  padding: 2px 7px;
  border: 1px solid rgba(20, 143, 115, 0.24);
  border-radius: 999px;
  background: rgba(221, 247, 239, 0.75);
  color: #006b57;
  font-weight: 800;
  text-decoration: none;
}

.pathway-gene-link:hover {
  border-color: rgba(20, 143, 115, 0.5);
  background: rgba(200, 241, 229, 0.95);
  color: #004c3f;
}

.pathway-evidence-reaction-col {
  width: 300px;
}

.pathway-evidence-gene-label-col {
  width: 220px;
}

.pathway-evidence-gene-symbol-col {
  width: 220px;
}

.pathway-evidence-uniprot-col {
  width: 155px;
}

.pathway-evidence-organism-col {
  width: 190px;
}

.pathway-evidence-enzyme-col {
  width: 215px;
}

.pathway-evidence-ec-col {
  width: 90px;
}

.pathway-evidence-doi-col {
  width: 165px;
}

/* The generic tag stack reserves room for filter panels. In pathway evidence
 * tables it caused multiple UniProt accessions to extend into the next cell. */
.pathway-evidence-table .uniprot-links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  width: 100%;
  min-width: 0;
  max-width: none;
}

.pathway-evidence-table .uniprot-links .tag {
  flex: 0 0 auto;
  max-width: 100%;
  white-space: nowrap;
}

.pathway-evidence-table tbody tr:last-child td {
  border-bottom: 0;
}

.link-list {
  display: grid;
  gap: 7px;
  justify-items: start;
}

.link-list a {
  display: inline-block;
  justify-self: start;
  width: fit-content;
  max-width: 100%;
  overflow-wrap: anywhere;
  color: var(--primary-dark);
  text-decoration: underline;
}

.pathway-legend {
  color: var(--muted);
  font-size: 15px;
  font-weight: 600;
}

.pathway-legend i {
  display: inline-block;
  width: 22px;
  height: 2px;
  margin-right: 6px;
  vertical-align: middle;
  background: #273632;
}

.pathway-legend i.unknown {
  background: repeating-linear-gradient(90deg, #111, #111 6px, transparent 6px, transparent 10px);
}

.pathway-legend i.start {
  height: 9px;
  border-radius: 999px;
  background: #24c45a;
}

.pathway-legend i.end {
  height: 9px;
  border-radius: 999px;
  background: #2f65d8;
}

.pathway-fallback {
  margin-top: 14px;
}

.pathway-fallback summary {
  cursor: pointer;
  color: var(--primary-dark);
  font-weight: 700;
}

.empty,
.loading {
  padding: 22px;
  color: var(--muted);
  background: rgba(255, 253, 248, 0.78);
  border: 1px dashed var(--line);
  border-radius: 8px;
}

pre {
  overflow: auto;
  max-height: 360px;
  padding: 12px;
  background: #0f172a;
  color: #e5e7eb;
  border-radius: 8px;
  font-size: 13px;
}

.chart-scroll {
  width: 100%;
  overflow-x: auto;
  padding: 10px 0 6px;
  background:
    linear-gradient(rgba(31, 138, 112, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(31, 138, 112, 0.025) 1px, transparent 1px),
    #fffdf9;
  background-size: 28px 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.chart,
.network {
  display: block;
  width: 100%;
  min-width: 760px;
  height: auto;
}

.bubble-chart {
  min-width: 620px;
}

.area-line-chart {
  min-width: 900px;
}

.chart-label,
.chart-value,
.chart-axis,
.bubble-value,
.network-label {
  fill: #33423f;
  font-size: 12px;
  font-family: "Aptos", "Source Sans 3", "IBM Plex Sans", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.bubble-value {
  fill: #fffdf9;
  font-weight: 800;
  paint-order: stroke;
  stroke: rgba(0, 63, 59, 0.42);
  stroke-width: 3px;
}

.chart-value {
  fill: var(--muted);
}

.chart-label-italic {
  font-style: italic;
}

.performance-point {
  cursor: pointer;
  transition: opacity 0.15s ease, stroke-width 0.15s ease;
}

.performance-point:hover {
  opacity: 1;
  stroke-width: 3px;
}

.network-label {
  font-size: 11px;
  font-weight: 650;
}

.compact-kv {
  grid-template-columns: 150px minmax(0, 1fr);
}

@media (max-width: 1366px) and (min-width: 981px) {
  .topbar {
    width: min(100% - 44px, 1760px);
    padding: 10px 22px;
  }

  .brand-mark {
    width: 48px;
    height: 48px;
  }

  .nav {
    gap: 6px;
  }

  .nav-link {
    padding: 9px 10px;
    font-size: 13px;
  }

  main {
    padding: 22px 24px 40px;
  }

  .home-hero {
    padding: 34px 32px 22px;
    border-radius: 18px;
  }

  .home-hero::before {
    height: 342px;
  }

  .home-hero-grid {
    grid-template-columns: minmax(0, 1fr) minmax(300px, 0.78fr);
    gap: 24px;
    min-height: 292px;
  }

  .home-copy {
    max-width: 760px;
    padding: 6px 0;
  }

  .eyebrow {
    min-height: 24px;
    margin-bottom: 10px;
    padding: 3px 12px;
    font-size: 11px;
  }

  .home-copy h1 {
    margin-bottom: 10px;
    font-size: clamp(44px, 4.4vw, 58px);
  }

  .lead {
    max-width: 650px;
    margin-bottom: 16px;
    font-size: 15px;
    line-height: 1.45;
  }

  .home-search-panel {
    grid-template-columns: minmax(132px, 158px) minmax(116px, 148px) minmax(180px, 1fr) 106px;
    max-width: 760px;
    min-height: 52px;
    padding: 6px;
  }

  .home-search-panel > select,
  .home-search-panel > input,
  .home-search-panel .multi-select-trigger,
  .home-search-panel .evidence-dropdown {
    min-height: 46px;
    padding: 8px 10px;
    font-size: 14px;
  }

  .home-search-panel .evidence-dropdown {
    padding: 0;
  }

  .evidence-trigger {
    min-height: 46px;
    padding: 8px 10px;
    font-size: 14px;
  }

  .home-search-panel > button {
    width: 106px;
    min-width: 106px;
    min-height: 46px;
    padding-inline: 10px;
  }

  .home-search-example {
    margin-top: 10px;
    font-size: 13px;
  }

  .home-visual {
    min-height: 292px;
  }

  .hero-orbit {
    width: 56px;
    height: 56px;
  }

  .hero-orbit svg {
    width: 26px;
    height: 26px;
  }

  .module-grid {
    gap: 12px;
  }

  .record.feature {
    grid-template-columns: 46px minmax(0, 1fr) 28px;
    gap: 11px;
    min-height: 122px;
    padding: 16px 14px;
  }

  .feature-icon {
    width: 46px;
    height: 46px;
  }

  .feature-icon svg {
    width: 22px;
    height: 22px;
  }

  .feature-count {
    margin: 3px 0 6px;
  }

  .feature-count b {
    font-size: 24px;
  }

  .feature h3 {
    font-size: 14px;
  }

  .feature p {
    font-size: 13px;
    line-height: 1.3;
  }

  .compound-hero {
    grid-template-columns: minmax(0, 1fr) 260px;
    gap: 14px;
    margin: 6px 0 14px;
  }

  .compound-main,
  .structure-card {
    padding: 16px;
  }

  .compound-main h1 {
    margin: 4px 0 8px;
    font-size: clamp(28px, 3.4vw, 40px);
  }

  .compound-description.is-collapsed p {
    -webkit-line-clamp: 2;
  }

  .summary-grid {
    gap: 8px;
    margin-top: 10px;
  }

  .mini-stat {
    padding: 9px;
  }

  .structure-card img {
    max-height: 220px;
  }

  .statistics-summary-grid {
    gap: 10px;
  }

  .statistics-card {
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 10px;
    min-height: 108px;
    padding: 12px;
  }

  .statistics-card-icon {
    width: 38px;
    height: 38px;
  }

  .statistics-card-icon svg {
    width: 20px;
    height: 20px;
  }

  .statistics-card b {
    font-size: 24px;
  }

  .statistics-card strong {
    margin-top: 5px;
  }

  .statistics-card small {
    margin-top: 4px;
    font-size: 12px;
  }

  .statistics-chart-grid {
    gap: 12px;
  }

  .donut-wrap {
    grid-template-columns: minmax(160px, 220px) minmax(0, 1fr);
  }

  .donut-chart {
    max-width: 220px;
  }

  .toolbar.compact.manufacturing-filter {
    grid-template-columns: minmax(220px, 0.85fr) minmax(220px, 0.75fr) 116px;
    gap: 10px;
  }

  .toolbar.compact.manufacturing-filter button {
    min-width: 116px;
  }

  .data-table {
    font-size: 13px;
  }

  .data-table th,
  .data-table td {
    padding: 9px 10px;
  }

  .pathway-workspace {
    grid-template-columns: minmax(0, 1fr) minmax(280px, 330px);
    gap: 12px;
  }

  .pathway-svg-frame {
    min-height: 500px;
    max-height: 680px;
    padding: 14px;
  }

  .pathway-click-detail {
    padding: 14px;
  }

  .help-layout {
    grid-template-columns: 248px minmax(0, 1fr);
    gap: 14px;
  }

  .help-sidebar {
    top: 92px;
    max-height: calc(100vh - 112px);
    padding: 14px;
  }

  .help-section {
    padding: 18px;
  }

  .help-section h2 {
    font-size: 21px;
  }

  .help-screenshot {
    max-height: 560px;
    object-fit: contain;
  }
}

@media (max-width: 720px) {
  .pathway-toolbar {
    align-items: stretch;
  }

  .pathway-zoom-controls,
  .pathway-toolbar .inline-actions {
    width: 100%;
  }

  .pathway-svg-frame {
    min-height: 380px;
    max-height: 560px;
    padding: 12px;
  }

  .pathway-reaction-kv {
    grid-template-columns: 1fr;
    gap: 4px 0;
  }

  .pathway-reaction-kv dt {
    font-weight: 700;
  }

  .pathway-evidence-table {
    min-width: 1040px;
  }
}

@media (max-width: 1280px) and (min-width: 981px) {
  .topbar {
    width: min(100% - 28px, 1760px);
    padding: 9px 16px;
  }

  .brand strong {
    font-size: 17px;
  }

  .nav-link {
    padding: 8px 9px;
    font-size: 12.5px;
  }

  .home-hero {
    padding: 30px 28px 20px;
  }

  .home-hero-grid {
    grid-template-columns: minmax(0, 1fr) minmax(260px, 0.58fr);
    gap: 18px;
  }

  .home-copy h1 {
    font-size: clamp(42px, 4.2vw, 54px);
  }

  .lead {
    max-width: 600px;
  }

  .home-search-panel {
    grid-template-columns: minmax(120px, 146px) minmax(108px, 136px) minmax(150px, 1fr) 102px;
  }

  .home-search-panel > select,
  .home-search-panel > input,
  .home-search-panel .multi-select-trigger {
    font-size: 13.5px;
  }

  .home-search-panel > button {
    width: 102px;
    min-width: 102px;
  }

  .record.feature {
    grid-template-columns: 42px minmax(0, 1fr) 26px;
    min-height: 118px;
    padding: 15px 12px;
  }

  .feature-icon {
    width: 42px;
    height: 42px;
  }

  .feature-count b {
    font-size: 22px;
  }

  .feature h3 {
    font-size: 13.5px;
  }

  .feature p {
    font-size: 12.5px;
  }

  .compound-detail-shell {
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 16px;
  }

  .compound-section-sidebar {
    padding-right: 13px;
  }

  .compound-nav-items {
    padding-left: 32px;
  }

}

@media (max-height: 820px) and (min-width: 981px) {
  main {
    padding-top: 18px;
  }

  .home-hero {
    padding-top: 28px;
    padding-bottom: 18px;
  }

  .home-hero::before {
    height: 320px;
  }

  .home-hero-grid {
    min-height: 268px;
  }

  .home-visual {
    min-height: 268px;
  }

  .compound-main,
  .structure-card {
    padding: 14px;
  }

  .structure-card {
    min-height: 210px;
  }

  .structure-card img {
    max-height: 210px;
  }

  .compound-main h1 {
    font-size: clamp(26px, 3vw, 36px);
  }

  .badge-row {
    gap: 6px;
    margin-bottom: 8px;
  }

  .compound-actions {
    gap: 8px;
    margin: 8px 0;
  }

  .button-link {
    min-height: 36px;
    padding: 8px 11px;
  }

  .compound-description p {
    margin-bottom: 4px;
    font-size: 14px;
    line-height: 1.4;
  }

  .compound-description.is-collapsed p {
    -webkit-line-clamp: 1;
  }

  .summary-grid {
    grid-template-columns: repeat(6, minmax(100px, 1fr));
    gap: 7px;
    margin-top: 8px;
  }

  .mini-stat {
    padding: 8px;
  }

  .mini-stat span {
    margin-bottom: 3px;
    font-size: 11.5px;
  }

  .mini-stat b {
    font-size: 14px;
  }

  .tabs {
    gap: 8px;
    padding: 14px 16px 9px;
  }

  .tabs button {
    min-height: 36px;
    padding: 8px 12px;
  }

  .statistics-card {
    min-height: 100px;
  }
}

@media (max-width: 980px) {
  .topbar,
  .hero,
  .home-hero-grid,
  .detail-header,
  .compound-hero,
  .help-layout,
  .grid-2 {
    grid-template-columns: 1fr;
  }

  .topbar {
    align-items: flex-start;
    padding: 12px 18px;
    width: min(100% - 24px, 1760px);
  }

  .hero {
    display: block;
  }

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

  .home-metric-grid,
  .summary-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stat:nth-child(2n),
  .summary-strip .stat:last-child {
    border-right: 0;
  }

  .module-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

  .home-search-panel {
    grid-template-columns: minmax(138px, 160px) minmax(128px, 150px) minmax(0, 1fr) 112px;
  }

  .toolbar.compound-filter-panel {
    grid-template-columns: minmax(0, 1fr) minmax(180px, 220px);
  }

  .site-footer-inner {
    display: grid;
    gap: 6px;
  }

  .site-footer-contact {
    white-space: normal;
  }

  .field-grid,
  .classification-fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .report-cover,
  .report-two-col,
  .report-performance-grid {
    grid-template-columns: 1fr;
  }

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

  .statistics-summary-grid,
  .statistics-chart-grid,
  .statistics-chart-grid.two,
  .statistics-figure-grid,
  .download-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .statistics-echart {
    height: 390px;
  }

  .donut-wrap {
    grid-template-columns: 1fr;
  }

  .summary-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .compound-detail-shell {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 14px;
  }

  .compound-section-sidebar {
    padding: 0 0 12px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .compound-section-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-height: 42px;
    padding: 8px 11px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #f7fbf8;
    color: var(--primary-950);
    font-size: 14px;
    font-weight: 850;
    box-shadow: none;
  }

  .compound-section-toggle > span:first-child {
    display: inline-flex;
    align-items: center;
    gap: 8px;
  }

  .compound-section-toggle:hover,
  .compound-section-toggle:focus-visible {
    border-color: var(--line-strong);
    background: #edf7f1;
    color: var(--primary-950);
    transform: none;
  }

  .compound-section-toggle svg {
    width: 20px;
    height: 20px;
  }

  .compound-section-toggle[aria-expanded="true"] .compound-section-toggle-caret {
    transform: rotate(180deg);
  }

  .compound-section-toggle-caret {
    transition: transform 160ms ease;
  }

  .compound-section-nav {
    position: static;
    display: none;
    gap: 10px;
    margin-top: 9px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #fffefa;
  }

  .compound-section-nav.open {
    display: grid;
  }

  .compound-nav-group {
    padding-bottom: 9px;
  }

  .compound-nav-items {
    padding-left: 36px;
  }

  .compound-content-context {
    margin-bottom: 10px;
  }

  .toolbar,
  .toolbar.compact,
  .toolbar.compact.manufacturing-filter,
  .pathway-workspace,
  .performance-filters {
    grid-template-columns: 1fr;
  }

  .help-sidebar {
    position: static;
    max-height: none;
  }

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

  .help-nav-group {
    margin-top: 0;
  }

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

  main {
    padding: 20px 16px 36px;
  }
}

@media (max-width: 760px) {
  .home-search-panel {
    grid-template-columns: 1fr;
  }

  .toolbar.compound-filter-panel {
    grid-template-columns: 1fr;
  }

  .compound-filter-panel > input,
  .compound-filter-panel .multi-select-trigger,
  .compound-filter-panel .evidence-dropdown {
    border-right: 0;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
  }

  .compound-filter-panel > input {
    border-radius: 7px 7px 0 0;
  }

  .compound-filter-panel > button {
    width: 100%;
    border-radius: 0 0 7px 7px;
  }

  .home-search-panel > select,
  .home-search-panel > input,
  .home-search-panel .multi-select-trigger,
  .home-search-panel .evidence-dropdown {
    border-right: 0;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
  }

  .home-search-panel > select,
  .home-search-panel .evidence-dropdown {
    border-radius: 7px 7px 0 0;
  }

  .home-search-panel > button {
    width: 100%;
    border-radius: 0 0 7px 7px;
  }
}

@media (max-width: 620px) {
  .topbar {
    display: block;
    position: static;
    margin-top: 10px;
  }

  nav {
    justify-content: flex-start;
    margin-top: 10px;
  }

  .searchbar {
    display: grid;
  }

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

  .statistics-summary-grid,
  .statistics-figure-grid {
    grid-template-columns: 1fr;
  }

  .statistics-echart,
  .statistics-echart-tall {
    height: 360px;
  }

  .module-grid,
  .why-grid,
  .summary-grid,
  .home-metric-grid,
  .summary-strip,
  .statistics-summary-grid,
  .statistics-chart-grid,
  .statistics-chart-grid.two,
    .download-card-grid,
    .field-grid,
    .classification-fields,
    .report-grid,
    .structure-search-panel,
    .entity-search-main,
    .entity-filter-grid,
    .entity-filter-group,
    .structure-search-summary,
    .compound-result-card,
    .compound-result-grid {
    grid-template-columns: 1fr;
  }

  .report-toolbar {
    display: grid;
  }

  .report-toolbar button {
    width: 100%;
    justify-content: center;
  }

  .compound-report {
    padding: 18px;
  }

  .compound-result-card {
    padding: 14px;
  }

  .compound-result-head {
    display: grid;
  }

  .compound-result-action {
    width: 100%;
    justify-content: center;
  }

  .advanced-tabs {
    width: 100%;
  }

  .advanced-tabs button {
    flex: 1 1 auto;
    justify-content: center;
  }

  .structure-editor-shell {
    min-height: 440px;
    grid-template-rows: minmax(340px, 1fr);
  }

  .ketcher-frame-wrap,
  .ketcher-frame-wrap iframe {
    min-height: 340px;
  }

  .structure-text-input span {
    align-items: flex-start;
    flex-direction: column;
    gap: 2px;
  }

  .home-copy {
    padding-left: 18px;
  }

  .home-copy h1 {
    font-size: 46px;
  }

  .home-visual {
    min-height: 280px;
  }

  .visual-stage {
    min-height: 280px;
  }

  .visual-molecule {
    transform: scale(0.78);
    transform-origin: top right;
  }

  .produce-card {
    right: 28px;
    bottom: 28px;
  }

  .visual-chip {
    width: 52px;
    height: 52px;
  }

  .visual-chip svg {
    width: 26px;
    height: 26px;
  }

  .stat {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .summary-strip .stat:last-child {
    border-bottom: 0;
  }

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

  .searchbar.wide {
    display: grid;
  }

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

  .home-search-panel > select,
  .home-search-panel > input,
  .home-search-panel .multi-select-trigger,
  .home-search-panel .evidence-dropdown {
    border-right: 0;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
  }

  .home-search-panel > select,
  .home-search-panel .evidence-dropdown {
    border-radius: 7px 7px 0 0;
  }

  .home-search-panel > button {
    width: 100%;
    border-radius: 0 0 7px 7px;
  }

  .searchbar select {
    width: 100%;
  }

  .help-nav {
    grid-template-columns: 1fr;
  }

  .help-section {
    padding: 15px;
  }

}

@media print {
  body {
    background: white;
  }

  .topbar,
  .site-footer,
  .report-toolbar {
    display: none !important;
  }

  main {
    padding: 0;
  }

  .compound-report {
    max-width: none;
    margin: 0;
    padding: 0;
    border: 0;
    box-shadow: none;
  }

.report-table-wrap,
.report-pathway {
  overflow: visible;
}
}
