:root {
  --bg: #f7f7f3;
  --surface: #ffffff;
  --surface-alt: #eef3f0;
  --ink: #1d2527;
  --muted: #5a666a;
  --line: #d9ded9;
  --accent: #176b5d;
  --accent-dark: #0f493f;
  --amber: #b86b18;
  --blue: #235c8f;
  --radius: 8px;
  --shadow: 0 18px 45px rgba(32, 42, 43, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
  color: var(--ink);
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans SC", Arial, sans-serif;
  line-height: 1.65;
}

body {
  margin: 0;
}

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

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

.site-header {
  align-items: center;
  background: rgba(247, 247, 243, 0.94);
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 32px;
  justify-content: space-between;
  min-height: 76px;
  padding: 0 40px;
  position: sticky;
  top: 0;
  z-index: 20;
  transform: translateY(0);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  will-change: transform;
}

.site-header.site-header-hidden {
  box-shadow: none;
  transform: translateY(-100%);
}

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

.brand-mark {
  align-items: center;
  background: var(--accent);
  border-radius: 6px;
  color: #fff;
  display: inline-flex;
  font-weight: 800;
  height: 40px;
  justify-content: center;
  width: 40px;
}

.brand strong,
.brand small {
  display: block;
}

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

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.nav-link {
  border-radius: 6px;
  color: var(--muted);
  font-size: 14px;
  padding: 8px 10px;
}

.nav-link.active,
.nav-link:hover {
  background: var(--surface-alt);
  color: var(--accent-dark);
}

main {
  margin: 0 auto;
  max-width: 1180px;
  padding: 34px 32px 64px;
}

.hero {
  align-items: stretch;
  display: grid;
  gap: 28px;
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.55fr);
  min-height: 340px;
}

.hero-content,
.page-hero {
  background:
    linear-gradient(rgba(255, 255, 255, 0.84), rgba(255, 255, 255, 0.84)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='900' height='520' viewBox='0 0 900 520'%3E%3Crect width='900' height='520' fill='%23e8f0eb'/%3E%3Cg fill='none' stroke='%239bb8ad' stroke-width='2' opacity='.75'%3E%3Cpath d='M80 420 C180 310, 260 360, 350 245 S520 110, 680 170 820 260, 840 110'/%3E%3Cpath d='M120 120 H330 M120 162 H440 M120 204 H280 M560 335 h190 M560 377 h145'/%3E%3Ccircle cx='702' cy='176' r='52'/%3E%3Ccircle cx='352' cy='246' r='36'/%3E%3C/g%3E%3Cg fill='%23176b5d' opacity='.85'%3E%3Ccircle cx='352' cy='246' r='8'/%3E%3Ccircle cx='702' cy='176' r='10'/%3E%3Ccircle cx='515' cy='157' r='7'/%3E%3C/g%3E%3C/svg%3E");
  background-position: center;
  background-size: cover;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 38px 48px;
}

.hero-content h1,
.page-hero h1 {
  font-size: 42px;
  line-height: 1.15;
  margin: 0 0 18px;
  max-width: 780px;
}

.lead,
.page-hero p {
  color: var(--muted);
  font-size: 18px;
  margin: 0;
  max-width: 760px;
}

.eyebrow {
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  margin: 0 0 10px;
  text-transform: uppercase;
}

.hero-actions {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}

.hero-disclaimer {
  background: rgba(255, 248, 237, 0.84);
  border: 1px solid #ead7bb;
  border-radius: 6px;
  color: #5f4930;
  font-size: 13px;
  line-height: 1.55;
  margin: 22px 0 0;
  max-width: 860px;
  padding: 10px 12px;
}

.button {
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  display: inline-flex;
  font-weight: 700;
  min-height: 44px;
  padding: 10px 16px;
  transition: background 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

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

.button:hover {
  border-color: #b9c9c4;
  box-shadow: 0 6px 18px rgba(32, 42, 43, 0.08);
  transform: translateY(-1px);
}

.button.primary:hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
  color: #fff;
}

.button.primary.soft {
  background: #e7f3ed;
  border-color: #cfe1da;
  color: var(--accent-dark);
}

.hero-panel,
.info-card,
.source-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hero-panel {
  padding: 26px 28px;
}

.hero-panel h2 {
  font-size: 24px;
  margin: 0 0 14px;
}

.steps,
.wide-steps {
  list-style: none;
  margin: 0;
  padding: 0;
}

.steps li {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 2px 12px;
  grid-template-columns: 34px 1fr;
  padding: 14px 0;
}

.steps span {
  align-items: center;
  background: var(--surface-alt);
  border-radius: 50%;
  color: var(--accent-dark);
  display: inline-flex;
  font-weight: 800;
  height: 30px;
  justify-content: center;
  width: 30px;
}

.steps small {
  color: var(--muted);
  grid-column: 2;
}

.section,
.notice-band,
.doctor-note {
  margin-top: 34px;
}

.section {
  background: transparent;
}

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

.section-heading h2,
.split h2 {
  font-size: 28px;
  line-height: 1.25;
  margin: 0;
}

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

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

.info-card {
  padding: 24px;
}

.info-card h3 {
  font-size: 23px;
  margin: 5px 0 10px;
}

.info-card p,
.source-card p,
.split p,
.prose p {
  color: var(--muted);
  margin: 0;
}

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

.checklist-card .clean-list {
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0;
}

.checklist-card .clean-list li {
  padding-left: 0;
  padding-right: 0;
}

.checklist-question-table td:first-child {
  color: var(--accent-dark);
  font-weight: 800;
  width: 150px;
}

.source-reference {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
}

.source-reference p {
  color: var(--muted);
  margin: 0 0 14px;
}

.source-reference a {
  color: var(--accent);
  font-weight: 800;
}

.card-kicker {
  color: var(--blue);
  font-size: 13px;
  font-weight: 800;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.tag-row span,
.source-card span,
.source-list a span,
.authority-meta {
  background: var(--surface-alt);
  border-radius: 999px;
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 800;
  padding: 4px 9px;
}

.notice-band,
.doctor-note {
  background: #fff8ed;
  border: 1px solid #ead7bb;
  border-radius: var(--radius);
  padding: 20px 24px;
}

.notice-band p,
.doctor-note p {
  color: #5f4930;
  margin: 4px 0 0;
}

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

.flow-columns {
  align-items: start;
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.flow-column {
  display: grid;
  gap: 28px;
}

.authority-section {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px;
}

.authority-heading {
  max-width: 920px;
}

.authority-heading p:last-child {
  color: var(--muted);
  font-size: 17px;
  margin: 10px 0 0;
}

.authority-list {
  display: grid;
  gap: 10px;
  margin-top: 20px;
}

.authority-row {
  align-items: center;
  background: #fbfcfb;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 18px 20px;
}

.authority-main {
  display: grid;
  gap: 6px;
}

.authority-name {
  font-size: 19px;
  font-weight: 850;
  line-height: 1.3;
}

.authority-meta-group {
  align-items: center;
  display: flex;
  gap: 8px;
  justify-self: end;
}

.authority-meta {
  border: 1px solid #d9e5df;
  border-radius: 999px;
  line-height: 1;
  min-width: 42px;
  padding: 6px 9px;
  text-align: center;
}

.authority-meta-accent {
  background: #d9f0e1;
  border-color: #9fd1b1;
  color: #0e5a42;
  min-width: 0;
  white-space: nowrap;
}

.authority-row p,
.domestic-source p {
  color: var(--muted);
  margin: 0;
}

.domestic-source {
  background: #fff8ed;
  border: 1px solid #ead7bb;
  border-radius: var(--radius);
  display: grid;
  gap: 4px;
  margin-top: 14px;
  padding: 16px 18px;
}

.domestic-source a {
  color: var(--accent-dark);
  font-weight: 800;
}

.page-hero {
  min-height: 260px;
}

.cancer-hero {
  justify-content: flex-end;
}

.name-meta {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 28px 0 0;
}

.name-meta div {
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 12px;
}

.name-meta dt {
  color: var(--muted);
  font-size: 12px;
}

.name-meta dd {
  font-weight: 800;
  margin: 2px 0 0;
}

.clean-list {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  list-style: none;
  margin: 0;
  padding: 8px 0;
}

.clean-list li {
  border-top: 1px solid var(--line);
  padding: 11px 18px;
}

.clean-list li:first-child {
  border-top: 0;
}

.keyword-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.subtype-grid {
  align-content: flex-start;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.subtype-tag {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 750;
  line-height: 1.35;
  padding: 8px 12px;
}

.keyword {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--accent-dark);
  font-size: 14px;
  font-weight: 700;
  padding: 8px 12px;
}

.generated-keywords {
  background: #f2f7f5;
  border-radius: 6px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 14px;
}

.report-builder {
  align-items: start;
  display: grid;
  gap: 28px;
  grid-template-columns: minmax(0, 1.05fr) minmax(340px, 0.95fr);
}

.single-step-builder {
  grid-template-columns: minmax(0, 100%);
  justify-content: center;
}

.single-step-builder .report-form,
.single-step-builder .report-output {
  width: 100%;
}

.report-form,
.report-output {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  min-width: 0;
  padding: 24px;
}

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

.form-grid label,
.biomarker-block label {
  color: var(--ink);
  display: grid;
  font-size: 14px;
  font-weight: 800;
  gap: 7px;
}

.form-grid label small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.5;
}

.form-grid input,
.form-grid select,
.form-grid textarea,
.biomarker-block input,
.biomarker-block select,
.biomarker-block textarea {
  background: #fbfcfb;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  font: inherit;
  min-height: 44px;
  padding: 9px 11px;
  width: 100%;
}

.form-grid textarea {
  min-height: 92px;
  resize: vertical;
}

.biomarker-block textarea {
  min-height: 86px;
  resize: vertical;
}

.biomarker-block {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 14px;
  margin-top: 20px;
  padding-top: 18px;
}

.biomarker-block h3,
.report-result h3 {
  font-size: 18px;
  margin: 0;
}

.block-title-row {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  flex-wrap: wrap;
}

.mini-button {
  font-size: 13px;
  min-height: 34px;
  padding: 6px 10px;
}

.check-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.check-pill {
  position: relative;
}

.check-pill input {
  position: absolute;
  opacity: 0;
}

.check-pill span {
  background: #f2f7f5;
  border: 1px solid #dce8e4;
  border-radius: 999px;
  color: var(--accent-dark);
  cursor: pointer;
  display: inline-flex;
  font-size: 13px;
  font-weight: 850;
  padding: 7px 10px;
  transition: background 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.check-pill span:hover {
  background: #e7f3ed;
  border-color: #b8d2c9;
  box-shadow: 0 5px 14px rgba(23, 107, 93, 0.12);
  transform: translateY(-1px);
}

.check-pill input:checked + span {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.check-pill input:checked + span:hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
  box-shadow: 0 6px 16px rgba(15, 73, 63, 0.18);
}

.biomarker-choice-grid {
  align-items: flex-start;
}

.biomarker-tag-row {
  align-items: flex-start;
  display: flex;
  gap: 12px;
}

.biomarker-tag-row .biomarker-choice-grid {
  flex: 1;
  min-width: 0;
}

.biomarker-tag-row .mini-button {
  flex: 0 0 auto;
}

.selected-biomarkers {
  background: #fbfcfb;
  border: 1px solid var(--line);
  border-radius: 6px;
  display: grid;
  gap: 10px;
  padding: 12px;
}

.selected-biomarker-row {
  align-items: center;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(90px, 0.45fr) minmax(132px, 0.65fr) minmax(180px, 1fr);
}

.selected-biomarker-row strong {
  color: var(--accent-dark);
  font-size: 14px;
}

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

.biomarker-row {
  align-items: center;
  background: #fbfcfb;
  border: 1px solid var(--line);
  border-radius: 6px;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(130px, 0.7fr) minmax(150px, 0.7fr) minmax(180px, 1fr);
  padding: 10px;
}

.biomarker-row .check-pill span {
  justify-content: center;
  min-width: 100%;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.output-card {
  background: #fbfcfb;
  border: 1px solid var(--line);
  border-radius: 6px;
  min-height: 260px;
  overflow-wrap: anywhere;
  padding: 18px;
}

[hidden] {
  display: none !important;
}

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

.report-result {
  display: grid;
  gap: 18px;
}

.report-result dl {
  display: grid;
  gap: 10px;
  margin: 0;
}

.report-result dl div {
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 6px;
  grid-template-columns: 110px minmax(0, 1fr);
  padding-bottom: 8px;
}

.report-result dt {
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.report-result dd {
  margin: 0;
}

.generated-query {
  background: #eef3f0;
  border-radius: 6px;
  color: var(--accent-dark);
  font-weight: 850;
  overflow-wrap: anywhere;
  padding: 10px 12px;
}

.report-result pre {
  background: #f2f4f1;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  font-size: 13px;
  overflow-x: auto;
  padding: 12px;
  white-space: pre-wrap;
}

.compact-notice {
  padding: 18px 22px;
}

.source-list {
  display: grid;
  gap: 12px;
}

.source-list.compact {
  gap: 10px;
}

.source-link,
.source-list.compact a {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: grid;
  gap: 4px;
  padding: 16px 18px;
}

.source-link small {
  color: var(--muted);
}

.data-table {
  background: var(--surface);
  border: 1px solid var(--line);
  border-collapse: collapse;
  border-radius: var(--radius);
  overflow: hidden;
  width: 100%;
}

.table-scroll {
  overflow-x: auto;
}

.data-table th,
.data-table td {
  border-top: 1px solid var(--line);
  padding: 13px 16px;
  text-align: left;
  vertical-align: top;
}

.data-table th {
  background: var(--surface-alt);
}

.data-table tr:first-child td,
.data-table tr:first-child th {
  border-top: 0;
}

.glossary-table td:first-child {
  color: var(--accent-dark);
  font-weight: 800;
  width: 240px;
}

.term-table {
  min-width: 920px;
}

.term-table th:first-child,
.term-table td:first-child {
  width: 280px;
}

.term-table th:nth-child(2),
.term-table td:nth-child(2) {
  width: 34%;
}

.term-table td:first-child strong {
  color: var(--accent-dark);
}

.wide-steps {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  counter-reset: wide-step;
}

.wide-steps li {
  border-top: 1px solid var(--line);
  counter-increment: wide-step;
  padding: 20px 24px 20px 72px;
  position: relative;
}

.wide-steps li:first-child {
  border-top: 0;
}

.wide-steps li::before {
  align-items: center;
  background: var(--accent);
  border-radius: 50%;
  color: #fff;
  content: counter(wide-step);
  display: flex;
  font-weight: 800;
  height: 34px;
  justify-content: center;
  left: 24px;
  position: absolute;
  top: 22px;
  width: 34px;
}

.wide-steps p {
  color: var(--muted);
  margin: 4px 0 0;
}

.email-template {
  background: #17211f;
  border-radius: var(--radius);
  color: #eef7f3;
  overflow-x: auto;
  padding: 22px;
  white-space: pre-wrap;
}

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

.source-card {
  align-items: center;
  display: flex;
  gap: 20px;
  justify-content: space-between;
  padding: 22px 24px;
}

.source-card h3 {
  margin: 0 0 4px;
}

.source-card span {
  flex: 0 0 auto;
  line-height: 1;
  min-width: 42px;
  padding: 6px 9px;
  text-align: center;
}

.trial-section {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
}

.trial-heading {
  max-width: 980px;
}

.trial-heading p {
  color: var(--muted);
  margin: 8px 0 0;
}

.sync-meta {
  color: var(--accent-dark) !important;
  font-weight: 800;
}

.trial-inline-notice {
  background: #fff8ed;
  border: 1px solid #ead7bb;
  border-radius: 6px;
  color: #5f4930;
  font-size: 14px;
  margin: 14px 0 18px;
  padding: 10px 12px;
}

.trial-summary {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 16px 0 14px;
}

.trial-summary div {
  background: #fbfcfb;
  border: 1px solid var(--line);
  border-radius: 6px;
  display: grid;
  gap: 3px;
  padding: 13px 14px;
}

.trial-summary strong {
  color: var(--accent-dark);
  font-size: 25px;
  line-height: 1;
}

.trial-summary span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
  line-height: 1.45;
}

.summary-label {
  align-items: center;
  display: inline-flex;
  gap: 5px;
  position: relative;
}

.summary-help {
  display: inline-flex;
  position: relative;
}

.summary-help-trigger {
  align-items: center;
  background: #e7f3ed;
  border: 1px solid #cfe1da;
  border-radius: 999px;
  color: var(--accent-dark);
  cursor: help;
  display: inline-flex;
  font-size: 11px;
  font-weight: 900;
  height: 18px;
  justify-content: center;
  line-height: 1;
  width: 18px;
}

.summary-popover {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  bottom: calc(100% + 8px);
  box-shadow: var(--shadow);
  color: var(--ink);
  display: grid !important;
  gap: 8px;
  min-width: 230px;
  opacity: 0;
  padding: 10px;
  pointer-events: none;
  position: absolute;
  right: 0;
  transform: translateY(4px);
  transition: opacity .15s ease, transform .15s ease;
  z-index: 8;
}

.summary-help:hover .summary-popover,
.summary-help:focus-within .summary-popover {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.summary-popover strong {
  color: var(--accent-dark);
  font-size: 12px;
}

.summary-popover span {
  display: grid;
  gap: 6px;
}

.summary-popover a {
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 850;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.trial-filter-bar {
  align-items: end;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(360px, 1fr) 150px;
  margin: 16px 0;
}

.trial-search {
  color: var(--muted);
  display: grid;
  font-size: 13px;
  font-weight: 800;
  gap: 4px;
  min-width: 0;
}

.trial-search input {
  min-width: 0;
  width: 100%;
}

.filter-panel {
  position: relative;
}

.filter-panel > summary {
  align-items: center;
  background: var(--surface-alt);
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--accent-dark);
  cursor: pointer;
  display: flex;
  font-size: 14px;
  font-weight: 850;
  justify-content: space-between;
  list-style: none;
  min-height: 40px;
  padding: 7px 11px;
}

.filter-panel > summary::-webkit-details-marker {
  display: none;
}

.filter-panel > summary::after {
  border-bottom: 2px solid var(--muted);
  border-right: 2px solid var(--muted);
  content: "";
  height: 8px;
  margin-left: 10px;
  transform: rotate(45deg) translateY(-2px);
  width: 8px;
}

.trial-filters {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(160px, 1fr));
  right: 0;
  min-width: min(680px, calc(100vw - 48px));
  padding: 14px;
  position: absolute;
  top: calc(100% + 6px);
  z-index: 25;
}

.trial-filters label,
.filter-label {
  color: var(--muted);
  display: grid;
  font-size: 13px;
  font-weight: 800;
  gap: 5px;
}

.trial-filters select,
.trial-filters input,
.trial-filter-bar input {
  background: #fbfcfb;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  font: inherit;
  min-height: 40px;
  padding: 7px 12px;
}

.multi-filter {
  display: grid;
  gap: 5px;
  position: relative;
}

.multi-filter details {
  position: relative;
}

.multi-filter summary {
  align-items: center;
  background: #fbfcfb;
  border: 1px solid var(--line);
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  font: inherit;
  font-size: 16px;
  font-weight: 600;
  justify-content: space-between;
  list-style: none;
  min-height: 40px;
  padding: 7px 10px;
}

.multi-filter summary::-webkit-details-marker {
  display: none;
}

.multi-filter summary::after {
  border-bottom: 2px solid var(--muted);
  border-right: 2px solid var(--muted);
  content: "";
  height: 8px;
  margin-left: 10px;
  transform: rotate(45deg) translateY(-2px);
  width: 8px;
}

.multi-menu {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 4px;
  left: 0;
  max-height: 260px;
  min-width: 100%;
  overflow: auto;
  padding: 8px;
  position: absolute;
  top: calc(100% + 6px);
  z-index: 30;
}

.multi-option {
  align-items: center;
  color: var(--ink) !important;
  display: flex !important;
  flex-direction: row;
  font-size: 14px !important;
  font-weight: 650 !important;
  gap: 8px !important;
  padding: 6px 7px;
  white-space: nowrap;
}

.multi-option:hover {
  background: var(--surface-alt);
  border-radius: 4px;
}

.multi-option-all {
  border-bottom: 1px solid var(--line);
  margin-bottom: 4px;
  padding-bottom: 9px;
}

.multi-option input {
  min-height: auto;
  width: auto;
}

.trial-list {
  display: grid;
  gap: 12px;
}

.trial-pagination {
  align-items: center;
  border-top: 1px solid var(--line);
  display: flex;
  gap: 16px;
  justify-content: space-between;
  margin-top: 18px;
  padding-top: 16px;
}

.trial-pagination label {
  align-items: center;
  color: var(--muted);
  display: flex;
  font-size: 13px;
  font-weight: 800;
  gap: 8px;
}

.trial-pagination select,
.trial-page-controls button {
  background: #fbfcfb;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  font: inherit;
  min-height: 36px;
  padding: 6px 10px;
}

.trial-page-controls {
  align-items: center;
  display: flex;
  gap: 10px;
}

.trial-page-controls button {
  cursor: pointer;
  font-weight: 750;
}

.trial-page-controls button:disabled {
  color: #9aa3a5;
  cursor: not-allowed;
}

.trial-page-controls span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  min-width: 160px;
  text-align: center;
}

.page-jump {
  align-items: center;
  color: var(--muted);
  display: flex;
  font-size: 13px;
  font-weight: 800;
  gap: 6px;
}

.page-jump input {
  background: #fbfcfb;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  font: inherit;
  min-height: 36px;
  padding: 6px 8px;
  width: 68px;
}

.trial-card {
  background: #fbfcfb;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  position: relative;
}

.trial-card[hidden] {
  display: none;
}

.trial-card-top {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin-bottom: 10px;
}

.trial-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.trial-badges span,
.trial-source span {
  background: var(--surface-alt);
  border-radius: 999px;
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 850;
  padding: 4px 9px;
}

.trial-badges .trial-status {
  background: #e7f3ed;
}

.trial-source {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.trial-source span {
  color: var(--muted);
}

.trial-card h3 {
  font-size: 19px;
  line-height: 1.35;
  margin: 0 0 14px;
}

.trial-card h3 a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 4px;
  transition: color .15s ease, text-decoration-color .15s ease;
}

.trial-card h3 a:hover {
  color: var(--accent-dark);
  text-decoration-color: var(--accent-dark);
}

.trial-ai-summary {
  background: #f4faf7;
  border: 1px solid #d6e9e1;
  border-radius: 6px;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.65;
  margin: -4px 0 16px;
  padding: 10px 12px;
}

.trial-ai-summary span {
  color: var(--accent-dark);
  display: inline-block;
  font-size: 12px;
  font-weight: 900;
  margin-right: 8px;
  text-transform: uppercase;
}

.match-reasons {
  bottom: 12px;
  position: absolute;
  right: 12px;
  z-index: 5;
}

.match-trigger {
  align-items: center;
  background: #e7f3ed;
  border: 1px solid #cfe1da;
  border-radius: 999px;
  color: var(--accent-dark);
  cursor: help;
  display: inline-flex;
  font-size: 13px;
  font-weight: 900;
  height: 26px;
  justify-content: center;
  width: 26px;
}

.match-popover {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  bottom: calc(100% + 8px);
  box-shadow: var(--shadow);
  display: grid;
  gap: 8px;
  max-width: min(520px, calc(100vw - 48px));
  min-width: 320px;
  opacity: 0;
  padding: 12px;
  pointer-events: none;
  position: absolute;
  right: 0;
  transform: translateY(4px);
  transition: opacity .15s ease, transform .15s ease;
}

.match-reasons:hover .match-popover,
.match-reasons:focus-within .match-popover {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.match-popover strong {
  color: var(--accent-dark);
  font-size: 13px;
}

.match-popover div {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.match-popover span {
  background: #f2f7f5;
  border: 1px solid #dce8e4;
  border-radius: 999px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 750;
  padding: 4px 8px;
}

.trial-meta {
  display: grid;
  gap: 10px 18px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
}

.trial-meta div {
  min-width: 0;
}

.trial-meta dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.trial-meta dd {
  margin: 2px 0 0;
}

.trial-empty {
  background: #fff8ed;
  border: 1px solid #ead7bb;
  border-radius: var(--radius);
  color: #5f4930;
  margin: 0;
  padding: 16px;
}

.prose {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
}

.prose p + p {
  margin-top: 16px;
}

.site-footer {
  align-items: flex-start;
  background: #16211f;
  color: #f4faf7;
  display: flex;
  gap: 32px;
  justify-content: space-between;
  padding: 30px 40px;
}

.site-footer p {
  color: #cbd8d3;
  margin: 6px 0 0;
  max-width: 760px;
}

.footer-meta {
  display: grid;
  gap: 6px;
  min-width: 240px;
}

.footer-meta,
.footer-meta a {
  color: #dbe6e2;
  font-size: 14px;
}

@media (max-width: 900px) {
  .site-header,
  .site-footer,
  .hero,
  .split,
  .two-column,
  .flow-columns,
  .checklist-grid,
  .name-meta,
  .authority-row,
  .report-builder,
  .form-grid,
  .trial-filter-bar,
  .trial-filters,
  .trial-summary,
  .trial-meta {
    grid-template-columns: 1fr;
  }

  .site-header,
  .site-footer {
    align-items: stretch;
    display: grid;
    padding: 14px 16px;
  }

  main {
    padding: 20px 14px 44px;
  }

  .site-header {
    gap: 14px;
    min-height: 0;
  }

  .site-header.site-header-hidden {
    transform: translateY(-108%);
  }

  .brand {
    min-width: 0;
  }

  .brand small {
    display: none;
  }

  .site-nav {
    gap: 4px;
  }

  .nav-link {
    font-size: 13px;
    padding: 7px 9px;
  }

  .hero-content,
  .page-hero {
    padding: 28px 20px;
  }

  .hero-content h1,
  .page-hero h1 {
    font-size: 34px;
  }

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

  .hero-actions,
  .source-card,
  .trial-pagination,
  .trial-page-controls {
    align-items: stretch;
    flex-direction: column;
  }

  .trial-page-controls span {
    min-width: 0;
  }

  .trial-filters {
    min-width: min(100%, calc(100vw - 36px));
    position: static;
  }

  .report-form,
  .report-output {
    padding: 18px;
  }

  .report-result dl div {
    grid-template-columns: 1fr;
  }

  .block-title-row {
    align-items: stretch;
    flex-direction: column;
  }

  .biomarker-tag-row {
    flex-direction: column;
  }

  .biomarker-tag-row .mini-button {
    align-self: flex-start;
  }

  .biomarker-row,
  .selected-biomarker-row {
    grid-template-columns: 1fr;
  }
}
