/* Source guide: pages/evidence.css
 * Page-specific presentation.
 * Load order: base.css, components.css, page stylesheet, refresh.css.
 * Later rules intentionally refine earlier layouts; preserve cascade order.
 */

/* Evidence remains readable as a research document, with scope beside each claim. */
/* Group: Research article layout and section navigation. */
.evidence-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 85px;
}
.evidence-nav {
  position: sticky;
  top: 135px;
  align-self: start;
}
.evidence-nav .eyebrow {
  font-size: 10px;
  letter-spacing: 1px;
}
.evidence-nav a {
  display: block;
  text-decoration: none;
  font-size: 13px;
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
}
/* Group: Study cards, titles, and publication metadata. */
.study {
  padding: 0 0 55px;
  margin-bottom: 55px;
  border-bottom: 1px solid #cbd4df;
  scroll-margin-top: 125px;
}
.study:last-child {
  margin-bottom: 0;
}
.study h2 {
  font-size: 38px;
  margin: 22px 0;
}
.study > p {
  color: var(--muted);
  font-size: 15px;
}
.study-metadata {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px 30px;
  padding: 28px 0;
  margin: 28px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.study-metadata dt {
  font-size: 11px;
  letter-spacing: 0.5px;
  color: var(--muted);
  margin-bottom: 5px;
}
.study-metadata dd {
  margin: 0;
  font-size: 14px;
}
.study .citation {
  font-size: 12px;
  margin-top: 23px;
}
/* Group: Limitations and supporting notes. */
.evidence-note {
  background: var(--mint);
  padding: 26px;
  margin-top: 25px;
  border-radius: 8px;
}
.evidence-note h3 {
  font-size: 20px;
  margin-bottom: 15px;
}
.evidence-note p {
  font-size: 14px;
  color: var(--muted);
}
.evidence-definitions > div {
  padding: 23px 0;
  border-bottom: 1px solid var(--line);
}
.evidence-definitions h3 {
  font-size: 21px;
  margin-bottom: 13px;
}
.evidence-definitions p {
  font-size: 14px;
  color: var(--muted);
}
/* Viewport (max-width: 1000px): component adjustments at this breakpoint. */
@media (max-width: 1000px) {
  .evidence-layout {
    grid-template-columns: 195px 1fr;
    gap: 45px;
  }
}
/* Viewport (max-width: 700px): component adjustments at this breakpoint. */
@media (max-width: 700px) {
  .evidence-layout {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .evidence-nav {
    position: static;
  }
  .evidence-nav a {
    padding: 10px 0;
  }
  .study h2 {
    font-size: 30px;
  }
  .study-metadata {
    gap: 20px;
  }
  .study {
    scroll-margin-top: 100px;
  }
}

/* Align the opening copy with the page's main content container. */
.page-evidence .page-intro {
  max-width: var(--page-width);
  text-align: left;
}
.page-evidence .page-intro h1,
.page-evidence .page-intro .lead {
  margin-left: 0;
  margin-right: 0;
}

/* Viewport (max-width: 850px): component adjustments at this breakpoint. */
@media (max-width: 850px) {
  .evidence-layout {
    grid-template-columns: 1fr;
    gap: 35px;
  }
  .evidence-nav {
    position: static;
  }
}
/* Viewport (max-width: 380px): component adjustments at this breakpoint. */
@media (max-width: 380px) {
  .study-metadata {
    grid-template-columns: 1fr;
  }
  .study h2 {
    font-size: 27px;
  }
}
/* Source-specific charts: visible values remain readable without color or motion. */
/* Group: Outcome charts with visible numeric labels. */
.data-chart {
  margin: 32px 0;
  padding: 28px;
  background: #f0f5f2;
  border: 1px solid #d8e3dc;
  border-radius: 18px;
}
.data-chart > p {
  font-size: 13px;
  margin: 15px 0 25px;
}
.bar-row {
  display: grid;
  grid-template-columns: 145px minmax(0, 1fr) 40px;
  align-items: center;
  gap: 12px;
  margin: 17px 0;
  font-size: 12px;
}
.bar-row small {
  font-size: 10px;
}
.bar-row strong {
  font-weight: 500;
}
.bar-scale {
  height: 20px;
  background: #e0e6e1;
  border-radius: 3px;
  overflow: hidden;
}
.bar-scale i {
  display: block;
  height: 100%;
  background: #387366;
}
.bar-scale .bar-secondary {
  background: #79718e;
}
.chart-axis {
  display: flex;
  justify-content: space-between;
  margin: 0 52px 20px 157px;
  font-size: 10px;
  color: #525c57;
}
.data-chart figcaption {
  font-size: 11px;
  line-height: 1.75;
  padding-top: 20px;
  border-top: 1px solid #cedbd2;
}
.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  font-size: 10px;
  margin-bottom: 22px;
}
.grouped-bars h4 {
  margin-top: 22px;
}
/* Viewport (max-width: 600px): component adjustments at this breakpoint. */
@media (max-width: 600px) {
  .data-chart {
    padding: 20px;
  }
  .bar-row {
    grid-template-columns: 95px minmax(0, 1fr) 34px;
    gap: 8px;
    font-size: 10px;
  }
  .chart-axis {
    margin-left: 103px;
    margin-right: 42px;
  }
}

/* Supporting methods are available on demand without obscuring the findings. */
/* Group: Expandable methods and source details. */
.study-details {
  margin: 26px 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--mint);
}
.study-details summary {
  padding: 20px 24px;
  cursor: pointer;
  font-weight: 500;
  color: var(--navy);
}
.study-details summary:focus-visible {
  outline: 3px solid var(--teal-ink);
  outline-offset: 3px;
  border-radius: 12px;
}
.study-details[open] summary {
  border-bottom: 1px solid var(--line);
}
.study-details-body {
  padding: 24px;
}
.study-details-body h3 {
  font-size: 18px;
  margin: 22px 0 10px;
}
.study-details-body h3:first-child {
  margin-top: 0;
}
.study-details-body p {
  font-size: 14px;
  line-height: 1.8;
}
.study-details-body .study-metadata {
  margin-top: 0;
}
/* Viewport (max-width: 600px): component adjustments at this breakpoint. */
@media (max-width: 600px) {
  .study-details summary,
  .study-details-body {
    padding: 18px;
  }
  .study-details summary {
    font-size: 14px;
  }
}

/* Give patients and partners distinct, equally sized contact routes. */
/* Group: Patient and partnership contact routes. */
.evidence-contact-actions {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 260px;
}
.evidence-contact-actions .button {
  width: 100%;
  text-align: center;
}
.evidence-contact-actions .button-outline {
  color: white;
  border-color: #b8b9d0;
  background: transparent;
}
.evidence-contact-actions .button-outline:hover {
  background: rgba(255, 255, 255, 0.12);
}
/* Viewport (max-width: 700px): component adjustments at this breakpoint. */
@media (max-width: 700px) {
  .evidence-contact-actions {
    width: 100%;
    min-width: 0;
  }
}
