/* ─── FONTS ──────────────────────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Source+Serif+4:ital,opsz,wght@0,8..60,300;0,8..60,400;0,8..60,600;1,8..60,400&family=Inter:wght@400;500;600&family=IBM+Plex+Mono:wght@400;500&display=swap');

/* ─── TOKENS ─────────────────────────────────────────────────────────────── */
:root {
  --navy:        #0B1F2E;
  --paper:       #FAFAF7;
  --paper-dim:   #F2F0EA;
  --teal:        #2C7A6B;
  --teal-light:  #E3F0ED;
  --rust:        #C4622D;
  --rust-light:  #FBE9E0;
  --grey:        #6B6358;
  --grey-light:  #D8D4CB;
  --brick:       #8B2E2E;
  --brick-light: #F3E5E3;
  --text:        #1A1814;
  --text-muted:  #5C5650;

  --font-display: 'Source Serif 4', Georgia, serif;
  --font-body:    'Inter', system-ui, sans-serif;
  --font-mono:    'IBM Plex Mono', 'Courier New', monospace;

  --radius:  6px;
  --shadow:  0 1px 3px rgba(11,31,46,0.08), 0 4px 12px rgba(11,31,46,0.04);
  --max-w:   1080px;
  --gap:     1.5rem;
}

/* ─── RESET ──────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--teal); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; border-radius: 2px; }

/* ─── LAYOUT ─────────────────────────────────────────────────────────────── */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ─── HEADER ─────────────────────────────────────────────────────────────── */
.site-header {
  background: var(--navy);
  color: white;
  padding: 0;
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 2rem;
  padding: 0.85rem 1.25rem;
  max-width: var(--max-w);
  margin: 0 auto;
}
.site-logo {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 600;
  color: white;
  text-decoration: none;
  letter-spacing: -0.01em;
  flex-shrink: 0;
}
.site-logo span { color: var(--teal); }
.site-logo:hover { text-decoration: none; opacity: 0.9; }

/* Header search */
.header-search {
  flex: 1;
  max-width: 440px;
  position: relative;
}
.header-search input {
  width: 100%;
  padding: 0.5rem 1rem 0.5rem 2.5rem;
  border-radius: 24px;
  border: 1px solid rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.08);
  color: white;
  font-family: var(--font-body);
  font-size: 0.9rem;
}
.header-search input::placeholder { color: rgba(255,255,255,0.45); }
.header-search input:focus {
  outline: none;
  border-color: var(--teal);
  background: rgba(255,255,255,0.12);
}
.header-search svg {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0.5;
  pointer-events: none;
}
.search-results {
  position: absolute;
  top: calc(100% + 4px);
  left: 0; right: 0;
  background: white;
  border: 1px solid var(--grey-light);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  z-index: 200;
  max-height: 320px;
  overflow-y: auto;
  display: none;
}
.search-results.is-open { display: block; }
.search-result-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 1rem;
  color: var(--text);
  border-bottom: 1px solid var(--grey-light);
  font-size: 0.9rem;
  cursor: pointer;
}
.search-result-item:last-child { border-bottom: none; }
.search-result-item:hover { background: var(--teal-light); }
.search-result-item .result-type {
  font-size: 0.75rem;
  color: var(--grey);
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Nav */
.site-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin-left: auto;
  flex-shrink: 0;
}
.site-nav a {
  color: rgba(255,255,255,0.75);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius);
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}
.site-nav a:hover, .site-nav a.active {
  background: rgba(255,255,255,0.1);
  color: white;
  text-decoration: none;
}

/* ─── HERO AREA ──────────────────────────────────────────────────────────── */
.page-hero {
  background: var(--navy);
  color: white;
  padding: 3rem 1.25rem 2.5rem;
}
.page-hero .container { max-width: var(--max-w); margin: 0 auto; }
.page-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 300;
  line-height: 1.2;
  margin-bottom: 0.75rem;
  letter-spacing: -0.02em;
}
.page-hero p {
  font-size: 1rem;
  color: rgba(255,255,255,0.7);
  max-width: 600px;
  margin-bottom: 1.5rem;
}

/* Stats row */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, auto);
  gap: 2rem;
  width: fit-content;
}
.stat-item { }
.stat-number {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 600;
  line-height: 1;
  color: white;
}
.stat-number.is-au { color: var(--rust); }
.stat-number.is-recruiting { color: #5BBFA8; }
.stat-label {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.5);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 0.2rem;
}

/* ─── FILTER BAR ─────────────────────────────────────────────────────────── */
.filter-bar {
  background: white;
  border-bottom: 1px solid var(--grey-light);
  padding: 0.85rem 1.25rem;
  position: sticky;
  top: 56px;
  z-index: 50;
}
.filter-bar-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.filter-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--grey);
  font-weight: 600;
  flex-shrink: 0;
}
.filter-pills {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}
.filter-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.3rem 0.75rem;
  border-radius: 20px;
  border: 1px solid var(--grey-light);
  background: white;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}
.filter-pill:hover { border-color: var(--teal); color: var(--teal); }
.filter-pill.is-active {
  background: var(--teal);
  border-color: var(--teal);
  color: white;
}
.filter-pill.is-au.is-active {
  background: var(--rust);
  border-color: var(--rust);
}

/* Country select dropdown */
.country-select-wrap { position: relative; }
.country-select {
  appearance: none;
  padding: 0.3rem 2rem 0.3rem 0.75rem;
  border-radius: 20px;
  border: 1px solid var(--grey-light);
  background: white;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  font-family: var(--font-body);
}
.country-select:focus { outline: 2px solid var(--teal); }
.country-select-arrow {
  position: absolute;
  right: 0.6rem;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: var(--grey);
  font-size: 0.7rem;
}

/* Recruiting toggle */
.recruiting-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.3rem 0.75rem;
  border-radius: 20px;
  border: 1px solid var(--grey-light);
  background: white;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  margin-left: auto;
}
.recruiting-toggle input { cursor: pointer; }
.recruiting-toggle.is-active { border-color: var(--teal); color: var(--teal); }

/* ─── AD SLOTS ───────────────────────────────────────────────────────────── */
.ad-slot {
  display: none; /* invisible until ad code is added */
  width: 100%;
}
.ad-slot--list-top { min-height: 90px; margin-bottom: 1rem; }
.ad-slot--list-mid { min-height: 90px; margin: 1rem 0; }

/* ─── TRIAL LIST ─────────────────────────────────────────────────────────── */
.trials-section {
  padding: 1.5rem 1.25rem 3rem;
}
.trials-section .container {
  max-width: var(--max-w);
  margin: 0 auto;
}
.trials-count {
  font-size: 0.85rem;
  color: var(--grey);
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--grey-light);
}
.trials-count strong { color: var(--text); }

.trial-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* ─── TRIAL CARD ─────────────────────────────────────────────────────────── */
.trial-card {
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--grey-light);
  display: flex;
  overflow: hidden;
  transition: box-shadow 0.15s, transform 0.15s;
}
.trial-card:hover {
  box-shadow: 0 4px 16px rgba(11,31,46,0.12);
  transform: translateY(-1px);
}
.trial-card-bar {
  width: 4px;
  flex-shrink: 0;
  border-radius: var(--radius) 0 0 var(--radius);
}
.status--recruiting  .trial-card-bar { background: var(--teal); }
.status--completed   .trial-card-bar { background: var(--grey-light); }
.status--active      .trial-card-bar { background: var(--rust); }
.status--soon        .trial-card-bar { background: var(--rust); }
.status--terminated  .trial-card-bar { background: var(--brick); }

.trial-card-body { flex: 1; padding: 1.1rem 1.25rem; }

.trial-card-top {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.6rem;
}
.trial-au-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem 0.55rem;
  background: var(--rust-light);
  color: var(--rust);
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  flex-shrink: 0;
  margin-top: 0.15rem;
}

.trial-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--navy);
  flex: 1;
}
.trial-title a { color: inherit; }
.trial-title a:hover { color: var(--teal); text-decoration: none; }
.trial-nct {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--grey);
  margin-top: 0.2rem;
}

.trial-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.18rem 0.6rem;
  border-radius: 20px;
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.status--recruiting  .status-badge { background: var(--teal-light); color: var(--teal); }
.status--completed   .status-badge { background: var(--paper-dim); color: var(--grey); }
.status--active      .status-badge { background: var(--rust-light); color: var(--rust); }
.status--soon        .status-badge { background: var(--rust-light); color: var(--rust); }
.status--terminated  .status-badge { background: var(--brick-light); color: var(--brick); }

.trial-phase {
  font-size: 0.8rem;
  color: var(--grey);
}
.trial-sponsor {
  font-size: 0.8rem;
  color: var(--grey);
}

/* Country badges */
.trial-countries {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-bottom: 0.75rem;
}
.country-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  padding: 0.15rem 0.5rem;
  background: var(--paper-dim);
  border-radius: 4px;
  font-size: 0.75rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}
.country-badge.is-au {
  background: var(--rust-light);
  color: var(--rust);
  font-weight: 600;
}
.countries-more {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.5rem;
  background: var(--paper-dim);
  border-radius: 4px;
  font-size: 0.75rem;
  color: var(--grey);
  cursor: pointer;
  border: none;
  font-family: var(--font-body);
}
.countries-more:hover { background: var(--grey-light); }

/* Eligibility preview */
.trial-eligibility-preview {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 0.75rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Phase rate */
.trial-phase-rate {
  font-size: 0.75rem;
  color: var(--grey);
  background: var(--paper-dim);
  border-radius: 4px;
  padding: 0.3rem 0.6rem;
  display: inline-block;
  margin-bottom: 0.75rem;
}

/* Card footer */
.trial-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  padding-top: 0.75rem;
  border-top: 1px solid var(--paper-dim);
}
.trial-timestamp {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--grey);
}
.trial-card-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.btn-link {
  font-size: 0.82rem;
  color: var(--teal);
  font-weight: 500;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}
.btn-link:hover { text-decoration: underline; }
.btn-link--external { color: var(--grey); font-size: 0.78rem; }

/* ─── EMPTY STATE ────────────────────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 3rem 1.5rem;
  background: white;
  border-radius: var(--radius);
  border: 1px solid var(--grey-light);
}
.empty-state h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
  color: var(--navy);
}
.empty-state p {
  color: var(--grey);
  font-size: 0.9rem;
  max-width: 480px;
  margin: 0 auto 1.25rem;
}
.empty-links { display: flex; flex-direction: column; gap: 0.5rem; align-items: center; }
.empty-links a { font-size: 0.9rem; }

/* ─── CRISIS RESOURCES ───────────────────────────────────────────────────── */
.crisis-resources {
  background: var(--rust-light);
  border-left: 3px solid var(--rust);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
}
.crisis-resources h3 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--rust);
  margin-bottom: 0.6rem;
  font-weight: 600;
}
.crisis-resources ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.crisis-resources li {
  font-size: 0.875rem;
  color: var(--text);
}
.crisis-resources li strong { color: var(--rust); }
.crisis-resources .crisis-link {
  margin-top: 0.5rem;
  font-size: 0.82rem;
}

/* ─── INDIVIDUAL TRIAL PAGE ──────────────────────────────────────────────── */
.trial-page { padding: 2rem 1.25rem 3rem; }
.trial-page .container { max-width: 800px; margin: 0 auto; }

.trial-page-back {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.85rem;
  color: var(--grey);
  margin-bottom: 1.5rem;
}
.trial-page-back:hover { color: var(--teal); text-decoration: none; }

.trial-page-header { margin-bottom: 2rem; }
.trial-page-header h1 {
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 3vw, 1.8rem);
  font-weight: 600;
  line-height: 1.25;
  color: var(--navy);
  margin-bottom: 0.5rem;
}
.trial-page-nct {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--grey);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.copy-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--teal);
  font-size: 0.75rem;
  padding: 0.1rem 0.3rem;
  border-radius: 3px;
}
.copy-btn:hover { background: var(--teal-light); }

.trial-page-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1rem 0;
}

/* Closed trial banner */
.trial-status-banner {
  padding: 0.85rem 1rem;
  border-radius: var(--radius);
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
}
.trial-status-banner--terminated {
  background: var(--brick-light);
  border-left: 3px solid var(--brick);
  color: var(--brick);
}
.trial-status-banner--completed {
  background: var(--paper-dim);
  border-left: 3px solid var(--grey-light);
  color: var(--grey);
}

.trial-section {
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--grey-light);
}
.trial-section:last-of-type { border-bottom: none; }
.trial-section h2 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--grey);
  margin-bottom: 1rem;
}

/* Eligibility content rendered from Markdown */
.eligibility-content { font-size: 0.9rem; line-height: 1.7; }
.eligibility-content h1, .eligibility-content h2, .eligibility-content h3 {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  margin: 1.25rem 0 0.5rem;
  color: var(--navy);
}
.eligibility-content ul, .eligibility-content ol {
  padding-left: 1.5rem;
  margin: 0.5rem 0;
}
.eligibility-content li { margin-bottom: 0.3rem; }
.eligibility-content p { margin-bottom: 0.75rem; }
.eligibility-content strong { color: var(--navy); }

.trial-details-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}
.detail-item { }
.detail-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--grey);
  font-weight: 600;
  margin-bottom: 0.2rem;
}
.detail-value {
  font-size: 0.9rem;
  color: var(--text);
}

/* Expanded access */
.expanded-access {
  background: var(--teal-light);
  border-left: 3px solid var(--teal);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1rem 1.25rem;
}
.expanded-access h3 {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--teal);
  margin-bottom: 0.5rem;
}
.expanded-access p { font-size: 0.875rem; color: var(--text-muted); margin-bottom: 0.5rem; }
.expanded-access a { color: var(--teal); font-size: 0.875rem; }

/* ─── CONTENT PAGES ──────────────────────────────────────────────────────── */
.content-page { padding: 2.5rem 1.25rem 4rem; }
.content-page .container { max-width: 740px; margin: 0 auto; }
.content-page h1 {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  font-weight: 300;
  line-height: 1.2;
  color: var(--navy);
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
}
.content-page .page-intro {
  font-size: 1.05rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
  line-height: 1.6;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--grey-light);
}
.content-page h2 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--navy);
  margin: 2rem 0 0.75rem;
}
.content-page h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  margin: 1.25rem 0 0.4rem;
}
.content-page p { font-size: 0.95rem; line-height: 1.7; color: var(--text-muted); margin-bottom: 0.85rem; }
.content-page ul, .content-page ol {
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}
.content-page li { font-size: 0.95rem; line-height: 1.65; color: var(--text-muted); margin-bottom: 0.3rem; }
.content-page a { color: var(--teal); }
.content-page strong { color: var(--text); }

/* ─── CONDITIONS HUB ─────────────────────────────────────────────────────── */
.conditions-hub { padding: 2rem 1.25rem 3rem; }
.conditions-hub .container { max-width: var(--max-w); margin: 0 auto; }

.condition-search-wrap {
  max-width: 500px;
  margin-bottom: 2rem;
  position: relative;
}
.condition-search {
  width: 100%;
  padding: 0.75rem 1rem 0.75rem 2.75rem;
  border: 1px solid var(--grey-light);
  border-radius: var(--radius);
  font-size: 1rem;
  font-family: var(--font-body);
  color: var(--text);
  background: white;
}
.condition-search:focus { outline: 2px solid var(--teal); border-color: transparent; }
.condition-search-icon {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--grey);
}

.conditions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}
.condition-card {
  background: white;
  border: 1px solid var(--grey-light);
  border-radius: var(--radius);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  transition: box-shadow 0.15s, transform 0.15s;
  text-decoration: none;
  color: inherit;
}
.condition-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-1px);
  text-decoration: none;
  border-color: var(--teal);
}
.condition-card-name {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--navy);
}
.condition-card-stats {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}
.condition-stat {
  display: flex;
  flex-direction: column;
}
.condition-stat-num {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--teal);
  font-family: var(--font-mono);
}
.condition-stat-num.is-recruiting { color: var(--teal); }
.condition-stat-num.is-au { color: var(--rust); }
.condition-stat-label { font-size: 0.72rem; color: var(--grey); text-transform: uppercase; letter-spacing: 0.05em; }

/* ─── HOMEPAGE ───────────────────────────────────────────────────────────── */
.home-hero {
  background: var(--navy);
  color: white;
  padding: 4rem 1.25rem 3.5rem;
}
.home-hero .container { max-width: var(--max-w); margin: 0 auto; }
.home-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 300;
  line-height: 1.15;
  letter-spacing: -0.025em;
  margin-bottom: 1rem;
  max-width: 720px;
}
.home-hero h1 em {
  font-style: normal;
  color: #5BBFA8;
}
.home-hero p {
  font-size: 1.05rem;
  color: rgba(255,255,255,0.65);
  max-width: 580px;
  margin-bottom: 2rem;
  line-height: 1.65;
}
.home-hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: var(--teal);
  color: white;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  transition: background 0.15s;
}
.home-hero-cta:hover { background: #237A6B; text-decoration: none; color: white; }

.home-signals {
  background: rgba(255,255,255,0.05);
  margin-top: 2.5rem;
  padding: 1.5rem;
  border-radius: var(--radius);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1.5rem;
  max-width: 700px;
}
.signal-item { }
.signal-number {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 600;
  color: white;
  line-height: 1;
}
.signal-label { font-size: 0.78rem; color: rgba(255,255,255,0.5); margin-top: 0.2rem; }

.home-conditions {
  padding: 3rem 1.25rem;
  background: var(--paper);
}
.home-conditions .container { max-width: var(--max-w); margin: 0 auto; }
.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}
.section-header h2 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--navy);
}
.section-header a { font-size: 0.875rem; color: var(--teal); }

.home-how {
  background: var(--navy);
  color: white;
  padding: 3rem 1.25rem;
}
.home-how .container { max-width: var(--max-w); margin: 0 auto; }
.home-how h2 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 300;
  margin-bottom: 1.5rem;
  color: rgba(255,255,255,0.9);
}
.signal-chain {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  align-items: stretch;
}
.chain-step {
  flex: 1;
  min-width: 150px;
  padding: 1rem;
  border-right: 1px solid rgba(255,255,255,0.08);
  position: relative;
}
.chain-step:last-child { border-right: none; }
.chain-step-signal {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--teal);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.4rem;
}
.chain-step-title { font-weight: 600; font-size: 0.9rem; color: white; margin-bottom: 0.25rem; }
.chain-step-desc { font-size: 0.78rem; color: rgba(255,255,255,0.45); line-height: 1.45; }

/* ─── HELPFUL LINKS PAGE ─────────────────────────────────────────────────── */
.helpline-card {
  background: white;
  border: 1px solid var(--grey-light);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 0.75rem;
}
.helpline-card h3 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 0.5rem;
}
.helpline-card p { font-size: 0.875rem; color: var(--text-muted); margin-bottom: 0.25rem; }
.helpline-card .helpline-number {
  font-family: var(--font-mono);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--teal);
}
.country-section { margin-bottom: 2rem; }
.country-section h2 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--grey-light);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* ─── PIPELINE PAGE ──────────────────────────────────────────────────────── */
.pipeline-card {
  background: white;
  border: 1px solid var(--grey-light);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 1rem;
}
.pipeline-card h3 { font-size: 0.9rem; color: var(--grey); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 0.25rem; }
.pipeline-card .pipeline-value {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 600;
  color: var(--navy);
}
.pipeline-card .pipeline-label { font-size: 0.82rem; color: var(--grey); }

/* ─── DATA SOURCES TABLE ─────────────────────────────────────────────────── */
.sources-table { width: 100%; border-collapse: collapse; font-size: 0.875rem; margin: 1.5rem 0; }
.sources-table th {
  text-align: left;
  padding: 0.6rem 0.75rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--grey);
  border-bottom: 2px solid var(--grey-light);
  background: var(--paper-dim);
}
.sources-table td {
  padding: 0.75rem;
  border-bottom: 1px solid var(--grey-light);
  color: var(--text-muted);
  vertical-align: top;
}
.sources-table tr:last-child td { border-bottom: none; }
.badge-ok { color: var(--teal); font-weight: 600; }
.badge-pending { color: var(--rust); font-weight: 600; }
.badge-excluded { color: var(--brick); font-weight: 600; }

/* ─── FOOTER ─────────────────────────────────────────────────────────────── */
.site-footer {
  background: var(--navy);
  color: rgba(255,255,255,0.55);
  padding: 2.5rem 1.25rem;
  font-size: 0.82rem;
  line-height: 1.6;
}
.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2rem;
  align-items: start;
}
.footer-disclaimer { max-width: 580px; }
.footer-disclaimer p { margin-bottom: 0.5rem; }
.footer-nav {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  text-align: right;
}
.footer-nav a { color: rgba(255,255,255,0.5); font-size: 0.8rem; }
.footer-nav a:hover { color: white; text-decoration: none; }
.footer-bottom {
  max-width: var(--max-w);
  margin: 1.5rem auto 0;
  padding-top: 1rem;
  border-top: 1px solid rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.footer-logo { font-family: var(--font-display); font-size: 1rem; color: rgba(255,255,255,0.7); }
.footer-logo span { color: var(--teal); }

/* Cookie consent */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0; right: 0;
  background: var(--navy);
  color: rgba(255,255,255,0.8);
  padding: 0.85rem 1.25rem;
  font-size: 0.82rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  z-index: 999;
  border-top: 1px solid rgba(255,255,255,0.1);
}
.cookie-banner p { max-width: 680px; }
.cookie-btn {
  background: var(--teal);
  color: white;
  border: none;
  padding: 0.4rem 1rem;
  border-radius: var(--radius);
  cursor: pointer;
  font-weight: 600;
  font-size: 0.82rem;
  white-space: nowrap;
  flex-shrink: 0;
}
.cookie-banner.is-hidden { display: none; }

/* ─── 404 PAGE ───────────────────────────────────────────────────────────── */
.error-page {
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 3rem 1.25rem;
}
.error-page .error-code {
  font-family: var(--font-mono);
  font-size: 4rem;
  font-weight: 500;
  color: var(--grey-light);
  line-height: 1;
  margin-bottom: 0.5rem;
}
.error-page h1 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 0.5rem;
}
.error-page p { color: var(--grey); margin-bottom: 1.5rem; max-width: 400px; }
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.65rem 1.25rem;
  background: var(--teal);
  color: white;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.9rem;
  transition: background 0.15s;
}
.btn-primary:hover { background: #237A6B; text-decoration: none; color: white; }

/* ─── RESPONSIVE ─────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .stats-row { grid-template-columns: repeat(2, 1fr); gap: 1rem; }
  .trial-details-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
  .footer-nav { text-align: left; }
  .header-search { display: none; }
  .home-signals { grid-template-columns: repeat(2, 1fr); }
  .signal-chain { flex-direction: column; }
  .chain-step { border-right: none; border-bottom: 1px solid rgba(255,255,255,0.08); }
  .chain-step:last-child { border-bottom: none; }
}

@media (max-width: 480px) {
  .page-hero { padding: 2rem 1rem 1.75rem; }
  .stats-row { grid-template-columns: 1fr 1fr; }
  .filter-bar { padding: 0.65rem 1rem; }
}

/* ─── PRINT STYLES ───────────────────────────────────────────────────────── */
@media print {
  .site-header, .filter-bar, .site-footer, .cookie-banner,
  .trial-card-actions, .header-search, .site-nav { display: none !important; }
  .trial-page, body { background: white; }
  .trial-page .container { max-width: 100%; }
  .trial-section { break-inside: avoid; page-break-inside: avoid; }
  .eligibility-content { font-size: 11pt; }
  a[href]::after { content: " (" attr(href) ")"; font-size: 9pt; color: #666; }
  .trial-page-header h1 { font-size: 16pt; }
}
