*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  min-width: 18rem;
  background: var(--bg);
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 12% -8%, rgb(141 101 207 / 17%), transparent 36rem),
    radial-gradient(circle at 88% 2%, rgb(214 174 96 / 10%), transparent 32rem),
    var(--bg);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}

[hidden] {
  display: none !important;
}

::selection {
  color: var(--bg);
  background: var(--gold-strong);
}

:where(a, button, input, select, textarea, [tabindex]):focus-visible {
  outline: 0.2rem solid var(--focus);
  outline-offset: 0.22rem;
}

a {
  color: var(--gold-strong);
  text-decoration-color: rgb(240 206 134 / 55%);
  text-decoration-thickness: 0.1em;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--text);
  text-decoration-color: var(--gold-strong);
}

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

button {
  color: inherit;
}

p,
ul,
ol {
  margin-block: 0 var(--space-4);
}

h1,
h2,
h3 {
  margin: 0 0 var(--space-3);
  color: var(--text);
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.08;
  text-wrap: balance;
}

h1 {
  font-size: var(--step-4);
  letter-spacing: -0.02em;
}

h2 {
  font-size: var(--step-2);
}

h3 {
  font-size: var(--step-1);
}

.icon-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.icon {
  width: 1.35em;
  height: 1.35em;
  fill: currentcolor;
  vertical-align: -0.2em;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: var(--space-3);
  left: var(--space-3);
  padding: var(--space-2) var(--space-3);
  color: var(--bg);
  background: var(--gold-strong);
  border-radius: var(--radius-sm);
  transform: translateY(-180%);
}

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

.site-header {
  position: sticky;
  z-index: 20;
  top: 0;
  border-bottom: 1px solid rgb(51 45 61 / 76%);
  background: rgb(5 5 6 / 88%);
  backdrop-filter: blur(1rem);
}

.nav-shell {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--space-5);
  width: min(100% - 2rem, var(--content-max));
  min-height: 4.6rem;
  margin-inline: auto;
}

.brand {
  flex: 0 0 auto;
  color: var(--text);
  font-family: var(--font-display);
  font-size: var(--step-1);
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
}

.brand::before {
  display: inline-block;
  width: 0.58rem;
  height: 0.58rem;
  margin-right: var(--space-2);
  content: "";
  background: var(--gold);
  border-radius: 50%;
  box-shadow: 0 0 1rem rgb(214 174 96 / 70%);
}

.nav-links {
  display: flex;
  flex: 1 1 auto;
  justify-content: flex-end;
  gap: clamp(0.55rem, 1.3vw, 1.35rem);
}

.nav-links a,
.nav-drawer a {
  color: var(--text-muted);
  font-size: var(--step--1);
  text-decoration: none;
}

.nav-links a:hover,
.nav-links a[aria-current="page"],
.nav-drawer a:hover,
.nav-drawer a[aria-current="page"] {
  color: var(--gold-strong);
}

.nav-links a[aria-current="page"],
.nav-drawer a[aria-current="page"] {
  text-decoration: underline;
  text-decoration-color: var(--gold);
  text-decoration-thickness: 0.12em;
  text-underline-offset: 0.35em;
}

.nav-toggle {
  display: none;
  flex: 0 0 auto;
  width: 2.7rem;
  height: 2.7rem;
  padding: 0;
  color: var(--gold-strong);
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.nav-drawer {
  display: none;
}

main {
  overflow: clip;
}

.hero,
.content-section,
.clinical-page {
  width: min(100% - 2rem, var(--content-max));
  margin-inline: auto;
}

.hero {
  display: grid;
  align-content: center;
  min-height: clamp(28rem, 70vh, 45rem);
  padding-block: var(--space-9);
}

.page-hero {
  min-height: clamp(24rem, 54vh, 37rem);
  max-width: var(--content-max);
}

.page-hero h1 {
  max-width: 18ch;
}

.eyebrow {
  margin-bottom: var(--space-3);
  color: var(--gold);
  font-size: var(--step--2);
  font-weight: 700;
  letter-spacing: 0.16em;
  line-height: 1.4;
  text-transform: uppercase;
}

.lede {
  max-width: 62ch;
  color: var(--text-muted);
  font-size: var(--step-1);
}

.audience-line {
  max-width: 72ch;
  color: var(--text-muted);
  font-size: var(--step--1);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-top: var(--space-4);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.85rem;
  padding: 0.65rem 1.1rem;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-weight: 700;
  text-decoration: none;
  transition: transform 160ms ease, background-color 160ms ease, border-color 160ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button.primary {
  color: #15100a;
  background: var(--gold-strong);
}

.button.primary:hover {
  color: #15100a;
  background: var(--gold);
}

.button.secondary {
  color: var(--text);
  background: transparent;
  border-color: var(--border-strong);
}

.button.secondary:hover {
  color: var(--gold-strong);
  border-color: var(--gold);
  background: rgb(141 101 207 / 10%);
}

.content-section,
.section {
  padding-block: var(--space-8);
}

.section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-4);
  margin-bottom: var(--space-5);
  border-bottom: 1px solid var(--border);
}

.section-heading h2 {
  margin-bottom: var(--space-3);
}

.clinical-page {
  max-width: var(--reading-max);
  padding-bottom: var(--space-9);
}

.clinical-page .content-section {
  width: 100%;
  padding-block: var(--space-6);
}

.clinical-page .content-section + .content-section {
  border-top: 1px solid var(--border);
}

.clinical-page p,
.clinical-page li {
  color: var(--text-muted);
}

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

.pathway-card,
.resource-card,
.index-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: var(--space-5);
  background: linear-gradient(145deg, rgb(21 19 27 / 96%), rgb(13 13 17 / 97%));
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
}

.pathway-card,
.resource-card {
  transition: border-color 160ms ease, transform 160ms ease;
}

.pathway-card:hover,
.resource-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
}

.pathway-card h3,
.resource-card h2,
.resource-card h3,
.index-card h2 {
  margin-top: var(--space-2);
}

.pathway-card h3 a,
.resource-card h2 a,
.resource-card h3 a,
.index-card h2 a {
  color: var(--text);
  text-decoration: none;
}

.pathway-card h3 a:hover,
.resource-card h2 a:hover,
.resource-card h3 a:hover,
.index-card h2 a:hover {
  color: var(--gold-strong);
}

.pathway-card p:not(.eyebrow),
.resource-card p,
.index-card p {
  color: var(--text-muted);
  font-size: var(--step--1);
}

.evidence-badge {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: var(--space-2);
  padding: 0.25rem 0.55rem;
  color: var(--success);
  background: rgb(120 201 155 / 10%);
  border: 1px solid rgb(120 201 155 / 34%);
  border-radius: var(--radius-pill);
  font-size: var(--step--2);
  font-weight: 700;
  line-height: 1.35;
}

.evidence-badge::before {
  width: 0.4rem;
  height: 0.4rem;
  content: "";
  background: currentcolor;
  border-radius: 50%;
}

.resource-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}

.resource-card__format,
.resource-card__meta,
.review-meta {
  color: var(--text-muted);
  font-size: var(--step--2);
}

.resource-card__format {
  font-family: var(--font-mono);
  overflow-wrap: anywhere;
  text-align: right;
}

.resource-card__meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-2);
  margin-top: auto;
  padding-top: var(--space-4);
  border-top: 1px solid var(--border);
}

.search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: var(--space-3);
}

.filter-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-3);
  margin-top: var(--space-4);
}

.search-row label,
.filter-row label {
  display: grid;
  gap: var(--space-2);
  color: var(--text-muted);
  font-size: var(--step--1);
  font-weight: 600;
}

input,
select {
  width: 100%;
  min-height: 2.85rem;
  padding: 0.55rem 0.75rem;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
}

input::placeholder {
  color: #938b9f;
}

input:hover,
select:hover {
  border-color: var(--purple);
}

#search-reset {
  min-height: 2.85rem;
  padding: 0.55rem 1rem;
  color: var(--text);
  background: var(--surface-raised);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  cursor: pointer;
}

#search-reset:hover {
  color: var(--gold-strong);
  border-color: var(--gold);
}

#search-status {
  margin-top: var(--space-4);
  color: var(--text-muted);
  font-size: var(--step--1);
}

#search-empty {
  padding: var(--space-4);
  color: var(--danger);
  background: rgb(255 142 148 / 8%);
  border: 1px solid rgb(255 142 148 / 28%);
  border-radius: var(--radius-sm);
}

.source-list {
  padding-left: 1.2rem;
}

.source-list li + li {
  margin-top: var(--space-2);
}

.review-line {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  padding-block: var(--space-3);
  color: var(--text-muted);
  border-block: 1px solid var(--border);
  font-size: var(--step--1);
}

.site-footer {
  width: min(100% - 2rem, var(--content-max));
  margin-inline: auto;
  padding-block: var(--space-7);
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  font-size: var(--step--1);
}

.site-footer__brand {
  color: var(--text);
  font-family: var(--font-display);
  font-size: var(--step-1);
}

.site-footer a {
  color: var(--purple-soft);
}

@media (max-width: 70rem) {
  .nav-shell {
    gap: var(--space-3);
  }

  .nav-links {
    gap: var(--space-3);
  }

  .nav-links a {
    font-size: var(--step--2);
  }
}

@media (max-width: 54rem) {
  .nav-shell {
    min-height: 4rem;
  }

  .nav-links {
    display: none;
  }

  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
  }

  .nav-drawer:not([hidden]) {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    left: 0;
    display: grid;
    gap: var(--space-2);
    padding: var(--space-4);
    background: var(--surface-raised);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-strong);
  }

  .nav-drawer a {
    padding: var(--space-2) var(--space-3);
  }

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

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

@media (max-width: 42rem) {
  .hero,
  .content-section,
  .clinical-page,
  .site-footer {
    width: min(100% - 1.25rem, var(--content-max));
  }

  .hero {
    min-height: auto;
    padding-block: var(--space-8);
  }

  .page-hero {
    min-height: auto;
    padding-block: var(--space-8);
  }

  .section-heading {
    display: block;
  }

  .hero-actions,
  .hero-actions .button {
    width: 100%;
  }

  .search-row,
  .filter-row,
  .card-grid {
    grid-template-columns: 1fr;
  }

  .search-row #search-reset {
    width: 100%;
  }

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

  .resource-card__format {
    text-align: left;
  }
}

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