.tzd-pilot-hero {
  min-width: 0;
}

.tzd-pilot-hero-figure {
  max-width: 30rem;
  margin: 1.75rem auto 0;
}

.tzd-pilot-figure {
  margin: 0;
  min-width: 0;
}

.tzd-pilot-hero-figure img,
.tzd-pilot-figure img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid #dfd2d6;
  border-radius: 1rem;
  background: #f8f4ed;
}

.tzd-pilot-hero-figure figcaption,
.tzd-pilot-figure figcaption {
  margin-top: 0.55rem;
  color: #654f59;
  font-size: 0.825rem;
  line-height: 1.5;
}

.tzd-pilot-study-settings {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem;
  margin-bottom: 0.55rem;
}

.tzd-pilot-study-setting {
  display: grid;
  min-width: 0;
  gap: 0.1rem;
  padding: 0.55rem 0.45rem;
  border-radius: 0.55rem;
  background: #f8f4ed;
  color: #2b2024;
  font-size: 0.875rem;
  line-height: 1.35;
  text-align: center;
}

.tzd-pilot-key-trazodone {
  color: #7a2e52;
  font-weight: 650;
}

.tzd-pilot-key-placebo {
  color: #286660;
  font-weight: 650;
}

.tzd-pilot-study-setting strong {
  font-size: 0.95rem;
}

.tzd-pilot-contents a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: #7a2e52;
  font-size: 0.875rem;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.tzd-pilot-anchor {
  scroll-margin-block: 6rem 8rem;
}

.tzd-pilot-anchor:focus-visible,
.tzd-pilot-contents a:focus-visible,
.tzd-pilot-evidence a:focus-visible,
.tzd-pilot-feature summary:focus-visible {
  outline: 2px solid #286660;
  outline-offset: 3px;
}

.tzd-pilot-reading {
  width: min(100%, 48rem);
  margin-inline: auto;
}

.tzd-pilot-contents {
  width: calc(100% - 2rem);
  max-width: 45rem;
  margin: 0 auto 1.5rem;
  padding: 0.85rem 0;
  border-block: 1px solid #dfd2d6;
}

.tzd-pilot-contents p {
  color: #7a2e52;
  font-size: 0.8rem;
  font-weight: 750;
}

.tzd-pilot-contents ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 0.75rem;
  margin: 0.25rem 0 0;
  padding: 0;
  list-style: none;
}

.tzd-pilot-reading > article {
  width: 100%;
  min-width: 0;
}

.tzd-pilot-evidence,
.tzd-pilot-feature,
.tzd-pilot-urgent {
  min-width: 0;
  padding: clamp(0.8rem, 2.5vw, 1.35rem);
  border: 1px solid #dfd2d6;
  border-radius: 1rem;
  color: #2b2024;
}

.tzd-pilot-evidence {
  background: #fffdf9;
}

.tzd-pilot-evidence h3,
.tzd-pilot-feature h3 {
  margin: 0 0 0.65rem;
  font-size: 1.15rem;
  font-weight: 700;
}

.tzd-pilot-chart-controls {
  min-width: 0;
  margin: 0 0 0.7rem;
  padding: 0;
  border: 0;
}

.tzd-pilot-chart-radio {
  position: absolute;
  inset: 50% auto auto 50%;
  width: 1px;
  height: 1px;
  padding: 0;
  scroll-margin-block: 6rem 8rem;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.tzd-pilot-chart-label {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin: 0.1rem 0.3rem 0.3rem 0;
  padding: 0.35rem 0.75rem;
  border: 2px solid #dfd2d6;
  border-radius: 999px;
  background: #f8f4ed;
  color: #7a2e52;
  font-size: 0.825rem;
  font-weight: 750;
  cursor: pointer;
}

.tzd-pilot-chart-label:has(.tzd-pilot-chart-radio:checked) {
  border-style: double;
  border-width: 3px;
  padding: calc(0.35rem - 1px) calc(0.75rem - 1px);
  border-color: #7a2e52;
  background: #7a2e52;
  color: #fff;
}

.tzd-pilot-checklist input,
.tzd-pilot-feature summary,
.tzd-pilot-contents a {
  scroll-margin-block: 6rem 8rem;
}

.tzd-pilot-chart-label:has(.tzd-pilot-chart-radio:focus-visible),
.tzd-pilot-checklist label:has(input:focus-visible) {
  outline: 2px solid #286660;
  outline-offset: 3px;
}

.tzd-pilot-plot {
  display: none;
}

.tzd-pilot-chart-controls:has(.tzd-pilot-outpatient-choice:checked) .tzd-pilot-outpatient-plot,
.tzd-pilot-chart-controls:has(.tzd-pilot-inpatient-choice:checked) .tzd-pilot-inpatient-plot {
  display: block;
}

.tzd-pilot-adverse-context {
  display: block;
  margin-top: 0.45rem;
  color: #654f59;
  font-size: 0.78rem;
  font-weight: 650;
}

.tzd-pilot-bar-label,
.tzd-pilot-axis {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
}

.tzd-pilot-bar-label {
  margin: 0.55rem 0 0.2rem;
  font-size: 0.85rem;
  line-height: 1.45;
}

.tzd-pilot-bar-label strong {
  flex: none;
  font-size: 1rem;
}

.tzd-pilot-track {
  height: 0.65rem;
  border-radius: 0.25rem;
  background: #f0e1e8;
}

.tzd-pilot-track span {
  display: block;
  width: var(--trial-share);
  height: 100%;
  border-radius: 0.25rem;
  background: #7a2e52;
}

.tzd-pilot-track .tzd-pilot-placebo {
  background: repeating-linear-gradient(135deg, #286660 0 5px, #467e77 5px 8px);
}

.tzd-pilot-axis {
  margin-top: 0.25rem;
  color: #654f59;
  font-size: 0.72rem;
}

.tzd-pilot-table {
  width: 100%;
  border-collapse: collapse;
  font-size: clamp(0.78rem, 2.8vw, 0.9rem);
  text-align: left;
}

.tzd-pilot-table caption {
  margin: 0.2rem 0 0.35rem;
  font-weight: 750;
  text-align: left;
}

.tzd-pilot-table th,
.tzd-pilot-table td {
  padding: 0.45rem 0.25rem;
  border-top: 1px solid #dfd2d6;
  vertical-align: top;
}

.tzd-pilot-table small {
  display: block;
  color: #654f59;
}

.tzd-pilot-evidence-summary {
  margin-top: 0.8rem;
  font-size: 0.85rem;
  line-height: 1.6;
}

.tzd-pilot-evidence-summary p + p {
  margin-top: 0.5rem;
}

.tzd-pilot-evidence-note {
  margin: 0.6rem 0 0;
  color: #654f59;
  font-size: 0.825rem;
  line-height: 1.55;
}

.tzd-pilot-evidence-note a {
  color: #7a2e52;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.tzd-pilot-feature {
  background: #e5eeea;
}

.tzd-pilot-feature details + details {
  margin-top: 0.5rem;
}

.tzd-pilot-feature summary {
  min-height: 44px;
  padding-block: 0.45rem;
  font-weight: 650;
  cursor: pointer;
}

.tzd-pilot-feature details p {
  margin: 0 0 0.3rem;
}

.tzd-pilot-checklist legend {
  padding-inline: 0.35rem;
  font-weight: 750;
}

.tzd-pilot-checklist label {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  min-height: 44px;
  padding: 0.45rem 0.1rem;
  border-radius: 0.2rem;
  cursor: pointer;
}

.tzd-pilot-checklist input {
  flex: none;
  width: 1rem;
  height: 1rem;
  margin-top: 0.3rem;
  accent-color: #7a2e52;
}

.tzd-pilot-urgent {
  border-left: 0.25rem solid #7a2e52;
  background: #f0e1e8;
}

.tzd-pilot-urgent p {
  margin: 0;
}

@media (min-width: 64rem) {
  .tzd-pilot-reading {
    width: min(100%, 48rem);
  }

  .tzd-pilot-contents {
    width: calc(100% - 3rem);
    margin-bottom: 1.5rem;
  }

  .tzd-pilot-contents ul {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (forced-colors: active) {
  .tzd-pilot-chart-label:has(.tzd-pilot-chart-radio:checked) {
    border-color: Highlight;
    color: HighlightText;
    background: Highlight;
  }

  .tzd-pilot-chart-label:has(.tzd-pilot-chart-radio:focus-visible),
  .tzd-pilot-checklist label:has(input:focus-visible) {
    outline: 3px solid Highlight;
  }

  .tzd-pilot-track {
    border: 1px solid CanvasText;
  }

  .tzd-pilot-track span {
    background: CanvasText;
  }

  .tzd-pilot-track .tzd-pilot-placebo {
    border: 2px dashed CanvasText;
    background: Canvas;
  }
}

@media print {
  .tzd-pilot-contents,
  .tzd-pilot-chart-controls {
    display: none;
  }

  .tzd-pilot-reading {
    display: block;
  }

  .tzd-pilot-evidence,
  .tzd-pilot-figure,
  .tzd-pilot-checklist,
  .tzd-pilot-urgent {
    break-inside: avoid;
  }
}
