/* ─── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ─── Design tokens ─────────────────────────────────────────── */
:root {
  --bg:             #F7F5F0;
  --surface:        #FFFFFF;
  --text-1:         #1a1a1a;
  --text-2:         #5c5c5c;
  --text-3:         #9e9e9e;
  --accent:         #1a3d2b;
  --accent-mid:     #3d6b50;
  --accent-faint:   #eef4f1;
  --sand:           #C4A882;
  --border:         #e8e8e6;
  --border-focus:   #b8cfc0;
  --font-serif:     'Playfair Display', Georgia, 'Times New Roman', serif;
  /* Score colours */
  --quality:        #2f6044;
  --quality-track:  #d8eae1;
}

/* ─── Base ──────────────────────────────────────────────────── */
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text-1);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.5;
}

/* ─── Logo ──────────────────────────────────────────────────── */
.logo-link {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.logo-link svg {
  color: #1a1a1a;
}

.logo-wordmark {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 700;
  font-size: 1.25rem;
  color: #1a1a1a;
  letter-spacing: -0.3px;
}

/* ─── Landing: nav ──────────────────────────────────────────── */
.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.625rem 2.5rem;
  background: var(--bg);
}

.nav-label {
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-3);
}

/* ─── Landing: hero ─────────────────────────────────────────── */
.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: calc(100vh - 74px);
  padding: 3rem 2rem 7rem;
  background: radial-gradient(ellipse 80% 40% at 50% -5%, #daeee3 0%, transparent 70%);
}

.hero-eyebrow {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-mid);
  margin-bottom: 2rem;
}

.hero-heading {
  font-size: clamp(2.6rem, 6vw, 4.5rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.04em;
  color: var(--text-1);
  max-width: 720px;
  margin: 0 auto 1.625rem;
}

.hero-sub {
  font-size: 1.05rem;
  font-weight: 300;
  color: var(--text-2);
  max-width: 600px;
  margin: 0 auto 3rem;
  line-height: 1.75;
}

.hero-subtitle {
  font-family: 'Inter', sans-serif;
  font-size: 1.1rem;
  line-height: 1.6;
  color: #555;
  max-width: 640px;
  margin: 0 auto 8px auto;
  text-align: center;
}

/* ─── Search box (landing) ──────────────────────────────────── */
.search-wrap {
  position: relative;
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
}

.search-box {
  display: flex;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(26, 61, 43, 0.08), 0 1px 3px rgba(0,0,0,0.06);
  transition: border-color 0.18s, box-shadow 0.18s;
}

.search-box:focus-within {
  border-color: var(--border-focus);
  box-shadow: 0 4px 20px rgba(26, 61, 43, 0.12), 0 1px 3px rgba(0,0,0,0.06);
}

.search-input {
  flex: 1;
  border: none;
  outline: none;
  padding: 1.1rem 1.375rem;
  font-size: 0.975rem;
  font-family: inherit;
  font-weight: 400;
  color: var(--text-1);
  background: transparent;
}

.search-input::placeholder {
  color: var(--text-3);
}

.search-btn {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 0.9rem 1.375rem;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: background 0.18s;
  white-space: nowrap;
}

.search-btn:hover {
  background: #122d1f;
}

/* ─── Handwritten annotation ────────────────────────────────── */
.search-annotation {
  position: absolute;
  right: -6.5rem;
  top: 50%;
  transform: translateY(-60%) rotate(6deg);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  pointer-events: none;
}

.annotation-arrow {
  display: block;
  transform: scaleX(-1) rotate(-10deg);
  opacity: 0.7;
}

.annotation-text {
  font-family: 'Caveat', cursive;
  font-size: 1.05rem;
  color: var(--sand);
  white-space: nowrap;
  opacity: 0.85;
  line-height: 1;
}

/* ─── Results: header ───────────────────────────────────────── */
.results-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0.6rem 2.5rem;
  margin-bottom: 0;
  display: flex;
  align-items: center;
  gap: 2rem;
  position: sticky;
  top: 0;
  z-index: 10;
}

/* ─── Search box (results header) ───────────────────────────── */
.results-search-box {
  flex: 1;
  max-width: 480px;
  display: flex;
  align-items: center;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  transition: border-color 0.18s;
}

.results-search-box:focus-within {
  border-color: var(--border-focus);
}

.results-search-input {
  flex: 1;
  border: none;
  outline: none;
  padding: 0.575rem 1rem;
  font-size: 0.875rem;
  font-family: inherit;
  color: var(--text-1);
  background: transparent;
}

.results-search-input::placeholder {
  color: var(--text-3);
}

.results-search-btn {
  flex-shrink: 0;
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 0.575rem 1rem;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.18s;
}

.results-search-btn:hover {
  background: #122d1f;
}

/* ─── Results: layout ───────────────────────────────────────── */
.container {
  max-width: 1020px;
  margin: 0 auto;
  padding: 2.5rem 2.5rem 6rem;
}

.demo-note {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.73rem;
  color: var(--text-3);
  margin-bottom: 2.25rem;
}

.demo-note::before {
  content: '';
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent-mid);
  opacity: 0.45;
}

.results-meta {
  margin-bottom: 2rem;
}

.results-meta-query {
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.025em;
  color: var(--text-1);
  margin-bottom: 0.2rem;
}

.results-meta-count {
  font-size: 0.8rem;
  color: var(--text-3);
  font-weight: 400;
}

.results-sources-searched {
  font-size: 0.8rem;
  color: #888;
  margin-top: 0.35rem;
  line-height: 1.5;
}

.source-breakdown {
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  color: #888;
  margin-top: 0.25rem;
  line-height: 1.5;
}

.cost-rationale {
  font-size: 0.8rem;
  color: var(--text-3);
  margin-top: 0.5rem;
  line-height: 1.5;
  font-style: italic;
}

/* ─── Summary card ──────────────────────────────────────────── */
.summary-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2.25rem 2.5rem;
  margin-bottom: 1.375rem;
}

.summary-label {
  font-size: 1.3rem;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 1rem;
  border-left: 2px solid #1a3d2b;
  padding-left: 0.65rem;
}

.sources-intro-text {
  font-size: 0.8rem;
  color: var(--text-3);
  line-height: 1.5;
  margin-bottom: 1rem;
  margin-top: -0.25rem;
}

.summary-verdict {
  font-size: 1.375rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.2;
  color: var(--text-1);
  margin-bottom: 1.5rem;
}

.summary-insights {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.summary-insights--gaps {
  gap: 0.5rem;
}

.insight {
  border-left: 2px solid rgba(26, 61, 43, 0.25);
  padding-left: 0.85rem;
}

.insight--gap {
  border-left: none;
  padding-left: 0;
}

.insight p {
  font-size: 0.9rem;
  font-weight: 400;
  color: #1a1a1a;
  line-height: 1.6;
}

.insight--gap p {
  font-size: 0.85rem;
  color: #666;
  line-height: 1.5;
}

.insight p strong {
  font-weight: 600;
  color: var(--text-1);
}

.insight-icon {
  display: inline-block;
  font-style: normal;
  font-size: 1.1rem;
  font-weight: 900;
  color: #1a3d2b;
  margin-right: 0.5rem;
  vertical-align: middle;
}

.insight--gap .insight-icon {
  font-size: 0.95rem;
  color: #9e6429;
}

.insight--featured {
  border-left: 2.5px solid var(--accent);
  background: rgba(26, 61, 43, 0.04);
  border-radius: 0 8px 8px 0;
  padding: 1rem 1.125rem;
}

.insight-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.insight-header .insight-icon {
  font-size: 0.75rem;
  opacity: 1;
  margin-right: 0;
}

.insight-badge {
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  background: rgba(26, 61, 43, 0.08);
  border: 1px solid rgba(26, 61, 43, 0.18);
  padding: 0.18rem 0.55rem;
  border-radius: 3px;
}

.summary-divider {
  height: 1px;
  background: var(--border);
  margin: 1.5rem 0;
}

.summary-teaser {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  font-size: 0.81rem;
  font-style: italic;
  color: var(--accent-mid);
  line-height: 1.65;
}

.teaser-lock {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  margin-top: 0.1rem;
  color: var(--accent-mid);
  opacity: 0.7;
}

/* ─── Summary sections ───────────────────────────────────────── */
.summary-section {
  margin: 0;
}

.summary-section-header {
  display: block;
  margin-bottom: 0;
}

.summary-section-header .summary-label {
  margin-bottom: 0.5rem;
}

.certainty-pill-wrapper {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}

.certainty-explanation {
  font-size: 0.85rem;
  color: #666;
  font-style: italic;
  line-height: 1.5;
}

.certainty-level-label {
  font-size: 0.75rem;
  color: #666;
  font-weight: 500;
}

/* ─── Next steps grid ────────────────────────────────────────── */
.next-steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 1.5rem;
  align-items: stretch;
}

/* ─── Plan cards ─────────────────────────────────────────────── */
.plan-card-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
}

.plan-badge {
  background: #e8d5d5;
  color: #4a2828;
  font-size: 0.58rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.2rem 0.7rem;
  border-radius: 999px;
  white-space: nowrap;
  margin-bottom: 0.5rem;
}

.plan-badge--hidden {
  visibility: hidden;
}

.plan-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 3px solid #1a3d2b;
  border-radius: 8px;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  width: 100%;
  flex: 1;
}

.plan-card-body {
  padding: 1.5rem 1.25rem 1rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.plan-card-title {
  font-size: 1rem;
  font-weight: 700;
  color: #1a3d2b;
  margin-bottom: 0.3rem;
}

.plan-card-price {
  font-size: 2rem;
  font-weight: 700;
  color: #1a3d2b;
  line-height: 1;
  margin: 0.4rem 0 0.25rem;
}

.plan-card-period {
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--text-3);
}

.plan-card-subtitle {
  font-size: 0.76rem;
  color: var(--text-3);
  line-height: 1.45;
  margin-bottom: 1rem;
}

.plan-card-bullets {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  flex: 1;
}

.plan-card-bullets li {
  font-size: 0.8rem;
  color: var(--text-2);
  line-height: 1.5;
  padding-left: 1.2rem;
  position: relative;
}

.plan-card-bullets li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: #1a3d2b;
  font-weight: 700;
}

.plan-card-footer {
  padding: 0.85rem 1.25rem 1.1rem;
}

.plan-btn {
  display: block;
  width: 100%;
  padding: 0.6rem 1rem;
  border-radius: 6px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  text-align: center;
}

.plan-btn--primary {
  background: #1a3d2b;
  color: #fff;
  border: 1px solid #1a3d2b;
}

.plan-btn--secondary {
  background: #fff;
  color: #1a3d2b;
  border: 1px solid #1a3d2b;
}

.plan-btn:disabled {
  cursor: pointer;
  opacity: 1;
}

/* ─── Show more button ───────────────────────────────────────── */
.show-more-btn {
  display: inline-block;
  margin-top: 0.75rem;
  background: none;
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--accent-mid);
  font-size: 0.76rem;
  font-family: inherit;
  padding: 0.28rem 0.8rem;
  cursor: pointer;
}

.show-more-btn:hover {
  background: var(--accent-faint);
  border-color: var(--border-focus);
}

.summary-certainty-row {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.summary-certainty-text {
  font-size: 0.88rem;
  font-weight: 300;
  color: var(--text-2);
  line-height: 1.6;
  margin: 0;
}

/* ─── Source category pill ──────────────────────────────────── */
.source-category-pill {
  display: inline-block;
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  padding: 0.18rem 0.6rem;
  border-radius: 999px;
  margin-bottom: 0.45rem;
}

.source-category-pill--academic {
  background: rgba(26, 61, 43, 0.09);
  color: #1a3d2b;
  border: 1px solid rgba(26, 61, 43, 0.2);
}

.source-category-pill--industry {
  background: rgba(158, 100, 41, 0.09);
  color: #9e6429;
  border: 1px solid rgba(158, 100, 41, 0.22);
}

.source-category-pill--practitioner {
  background: rgba(85, 85, 85, 0.07);
  color: #555;
  border: 1px solid rgba(85, 85, 85, 0.2);
}

/* ─── Research cost banner ───────────────────────────────────── */
.research-cost-banner {
  background: #f0f4f1;
  border-left: 3px solid #1a3d2b;
  border-radius: 0 6px 6px 0;
  padding: 0.85rem 1.1rem;
  margin-bottom: 1.25rem;
}

/* Modifier: placed above pricing cards in results.html — no bottom margin */
.research-cost-banner--above-pricing {
  margin-bottom: 0;
  border-radius: 0 8px 8px 0;
}

.research-cost-range {
  font-size: 0.9rem;
  color: #1a1a1a;
}

.research-cost-basis {
  font-size: 0.78rem;
  color: #666;
  margin-top: 0.25rem;
  line-height: 1.5;
}

/* ─── Report hero cost row ────────────────────────────────────── */
.report-cost-hero {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.65);
  margin-top: 1rem;
  letter-spacing: 0.01em;
}

/* ─── Certainty pill ─────────────────────────────────────────── */
.certainty-pill {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.35rem 0.9rem;
  border-radius: 6px;
  white-space: nowrap;
  flex-shrink: 0;
}

.certainty-pill--strong {
  background: #e8f0eb;
  color: #1a3d2b;
}

.certainty-pill--moderate {
  background: #fdf3e7;
  color: #9e6429;
}

.certainty-pill--limited {
  background: #fdf0f0;
  color: #8b2c2c;
}

/* ─── Recommendation banner ──────────────────────────────────── */
.recommendation-banner {
  display: inline-block;
  font-size: 0.81rem;
  font-weight: 600;
  padding: 0.45rem 0.9rem;
  border-radius: 6px;
  margin-bottom: 0.75rem;
}

.recommendation-banner--sufficient {
  background: rgba(26, 61, 43, 0.08);
  color: #1a3d2b;
  border: 1px solid rgba(26, 61, 43, 0.2);
}

.recommendation-banner--needed {
  background: rgba(158, 100, 41, 0.09);
  color: #7a4e1e;
  border: 1px solid rgba(158, 100, 41, 0.25);
}

.recommendation-text {
  font-size: 0.88rem;
  font-weight: 300;
  color: var(--text-2);
  line-height: 1.7;
  margin: 0 0 0.75rem;
}

.recommendation-questions {
  margin: 0;
  padding-left: 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.recommendation-questions li {
  font-size: 0.85rem;
  color: var(--text-2);
  line-height: 1.6;
}

/* ─── Study cards ───────────────────────────────────────────── */
.studies-grid {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
}

.study-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.75rem 2rem;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0;
  transition: border-color 0.18s;
}

.study-card:hover {
  border-color: #bfcfc6;
}

.study-info {
  padding-right: 2rem;
}

.study-type {
  font-size: 0.67rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent-mid);
  margin-bottom: 0.55rem;
}

.study-title {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--text-1);
  line-height: 1.45;
  margin-bottom: 0.35rem;
}

.study-meta {
  font-size: 0.79rem;
  color: var(--text-3);
  line-height: 1.5;
  margin-bottom: 0.875rem;
}

.study-desc {
  font-size: 0.88rem;
  font-weight: 300;
  color: var(--text-2);
  line-height: 1.8;
  margin-bottom: 1.125rem;
}

.study-tags {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.tag {
  background: var(--bg);
  color: var(--text-3);
  border: 1px solid var(--border);
  padding: 0.18rem 0.55rem;
  border-radius: 5px;
  font-size: 0.71rem;
  font-weight: 500;
  letter-spacing: 0.01em;
}

/* ─── Scores panel ──────────────────────────────────────────── */
.scores-panel {
  border-left: 1px solid var(--border);
  padding-left: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.875rem;
  min-width: 112px;
}

.score-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
}

/* ─── Score rings ───────────────────────────────────────────── */
/* SVG: viewBox 68×68, cx=34, cy=34, r=27, circumference ≈ 169.6 */
.score-ring {
  position: relative;
  width: 68px;
  height: 68px;
}

.score-ring svg {
  transform: rotate(-90deg);
  display: block;
}

.score-ring circle {
  fill: none;
  stroke-width: 5;
  stroke-linecap: round;
}

.score-ring.quality .track { stroke: var(--quality-track); }

.score-ring.quality .fill {
  stroke: var(--quality);
  transition: stroke-dashoffset 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

.score-number {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-1);
}

.score-label {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-3);
}

.score-hint {
  font-size: 0.63rem;
  font-weight: 300;
  color: var(--text-3);
  text-align: center;
  max-width: 80px;
  line-height: 1.3;
}

.scores-divider {
  width: 50%;
  height: 1px;
  background: var(--border);
}

/* ─── Loading state ─────────────────────────────────────────── */
.loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 5rem 2rem;
  color: var(--text-3);
  gap: 1.25rem;
  font-size: 0.85rem;
  font-weight: 400;
}

.loading-spinner {
  width: 28px;
  height: 28px;
  border: 2.5px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ─── Error state ────────────────────────────────────────────── */
.error-state {
  text-align: center;
  padding: 3rem 2rem;
  color: var(--text-2);
  font-size: 0.95rem;
  line-height: 1.6;
}

.error-retry-btn {
  display: inline-block;
  margin-top: 1.25rem;
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.18s;
}

.error-retry-btn:hover {
  background: #122d1f;
}

/* ─── Recency badge ──────────────────────────────────────────── */
.recency-badge {
  display: inline-flex;
  align-items: center;
  margin-left: 0.6rem;
  margin-top: 8px;
  background: rgba(26, 61, 43, 0.07);
  color: var(--accent-mid);
  border: 1px solid rgba(26, 61, 43, 0.15);
  border-radius: 4px;
  padding: 0.1rem 0.45rem;
  font-size: 0.63rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  vertical-align: middle;
}

/* ─── Score ring tooltips ────────────────────────────────────── */
.score-item {
  position: relative;
}

.score-tooltip {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: #1a3d2b;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 400;
  line-height: 1.45;
  padding: 0.45rem 0.65rem;
  border-radius: 6px;
  width: 180px;
  text-align: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s ease;
  z-index: 20;
}

.score-item:hover .score-tooltip {
  opacity: 1;
}

/* ─── Studies overflow note ──────────────────────────────────── */
.studies-overflow-note {
  font-size: 0.78rem;
  color: var(--text-3);
  text-align: center;
  margin-top: 0.75rem;
  line-height: 1.5;
}

/* ─── Study card pills (n · year · method) ───────────────────── */
.study-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.75rem;
}

.study-pill {
  display: inline-flex;
  align-items: center;
  position: relative;
  background: var(--bg);
  border: 1px solid rgba(26, 61, 43, 0.2);
  color: #1a3d2b;
  font-size: 0.68rem;
  font-weight: 500;
  line-height: 1;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  white-space: nowrap;
}

.study-pill--method {
  cursor: default;
}

.study-pill-tooltip {
  position: absolute;
  bottom: calc(100% + 7px);
  left: 50%;
  transform: translateX(-50%);
  background: #1a3d2b;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 400;
  line-height: 1.45;
  padding: 0.4rem 0.65rem;
  border-radius: 6px;
  width: 210px;
  white-space: normal;
  text-align: center;
  pointer-events: none;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.15s ease, visibility 0.15s ease;
  z-index: 20;
}

.study-pill--method:hover .study-pill-tooltip {
  visibility: visible;
  opacity: 1;
}

/* ─── Landing: search categories ────────────────────────────── */
/* ─── How it works ──────────────────────────────────────────── */
.how-it-works {
  max-width: 1000px;
  margin: 80px auto;
  padding: 0 24px;
}

.section-label {
  font-family: 'Inter', sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: #2f6044;
  text-align: center;
  margin-bottom: 48px;
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 48px;
}

.step {
  text-align: left;
}

.step-number {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 800;
  font-size: 3rem;
  color: #1a3d2b;
  opacity: 0.15;
  line-height: 1;
  margin-bottom: 16px;
}

.step-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 800;
  font-size: 1.25rem;
  color: #1a3d2b;
  margin-bottom: 12px;
}

.step-description {
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  line-height: 1.65;
  color: #555;
}

.steps-four {
  grid-template-columns: repeat(4, 1fr);
  gap: 36px;
}

@media (max-width: 768px) {
  .steps-grid,
  .steps-four {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .steps-four {
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
  }
}

/* ─── Example report preview ──────────────────────────────── */
.example-report-section {
  max-width: 750px;
  margin: 80px auto;
  padding: 0 24px;
}

.section-subtitle {
  font-family: 'Inter', sans-serif;
  font-size: 1.05rem;
  color: #888;
  text-align: center;
  margin-top: -32px;
  margin-bottom: 48px;
}

.report-preview {
  background: #ffffff;
  border: 1px solid #e8e6e0;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(0,0,0,0.06);
}

.report-preview-header {
  background: #1a3d2b;
  padding: 32px 36px;
  color: white;
}

.report-preview-badge {
  display: inline-block;
  font-family: 'Inter', sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 16px;
}

.report-preview-badge.strong {
  background: rgba(255,255,255,0.2);
  color: #a8d5ba;
}

.report-preview-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 800;
  font-size: 1.4rem;
  color: white;
  line-height: 1.3;
  margin-bottom: 12px;
}

.report-preview-meta {
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.6);
}

.report-preview-body {
  padding: 28px 36px;
}

.report-preview-section h4 {
  font-family: 'Inter', sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #2f6044;
  margin-bottom: 8px;
}

.report-preview-section p {
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  line-height: 1.6;
  color: #444;
}

.report-preview-divider {
  height: 1px;
  background: #f0ede8;
  margin: 20px 0;
}

.report-preview-sources {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.preview-source {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: #fafaf8;
  border-radius: 8px;
  border: 1px solid #f0ede8;
}

.preview-source-badge {
  font-family: 'Inter', sans-serif;
  font-size: 0.7rem;
  font-weight: 600;
}

.preview-source-badge.verified {
  color: #2f6044;
}

.preview-source-badge.unverified {
  color: #999;
}

.preview-source-type {
  font-family: 'Inter', sans-serif;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: #888;
  text-transform: uppercase;
}

.preview-source-score {
  font-family: 'Inter', sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  color: #1a3d2b;
  margin-left: auto;
}

.report-preview-cost {
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  color: #666;
  padding: 16px 0 4px 0;
}

.report-preview-cost strong {
  color: #1a3d2b;
  font-weight: 700;
}

/* ─── Built for ────────────────────────────────────────────── */
.built-for {
  max-width: 1000px;
  margin: 80px auto;
  padding: 60px 24px;
  border-top: 1px solid #e8e6e0;
}

.audience-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 48px;
  text-align: left;
}

.audience-item h3 {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 800;
  font-size: 1.15rem;
  color: #1a3d2b;
  margin-bottom: 8px;
}

.audience-item p {
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  line-height: 1.6;
  color: #666;
}

@media (max-width: 768px) {
  .audience-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

/* ─── Clarification flow ─────────────────────────────────────────── */
#clarify-container {
  max-width: 600px;
  margin: 1.5rem auto 0;
}

.clarify-analyzing {
  font-size: 0.8rem;
  color: var(--text-3);
  text-align: center;
  margin: 0;
}

/* ── Dialog ── */
.clarify-dialog {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 2px 12px rgba(26, 61, 43, 0.06);
  animation: clarifySlideIn 0.22s ease forwards;
}

@keyframes clarifySlideIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.clarify-dialog-eyebrow {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-1);
  text-align: center;
  margin-bottom: 1.25rem;
}

.clarify-dialog-fields {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
  margin-bottom: 1.25rem;
}

.clarify-dialog-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.clarify-dialog-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-2);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.clarify-dialog-input {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.7rem 1rem;
  font-size: 0.85rem;
  font-family: inherit;
  color: var(--text-1);
  background: #fff;
  outline: none;
  width: 100%;
  box-sizing: border-box;
  transition: border-color 0.15s;
}

.clarify-dialog-input:focus {
  border-color: var(--accent);
}

.clarify-dialog-submit {
  width: 100%;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 0.8rem 1.25rem;
  font-size: 0.9rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: opacity 0.15s;
  margin-bottom: 0.75rem;
  line-height: 1;
}

.clarify-dialog-submit:hover {
  opacity: 0.88;
}

.clarify-skip {
  text-align: center;
}

.clarify-skip-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.78rem;
  color: var(--text-3);
  font-family: inherit;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.clarify-skip-btn:hover {
  color: var(--accent);
}

/* ── Verification badges ─────────────────────────────────────────── */
.verification-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  padding: 0.18rem 0.6rem;
  border-radius: 999px;
  border: 1px solid;
  vertical-align: middle;
  margin-left: 0.35rem;
  cursor: default;
}

.verification-badge--verified {
  color: #1a3d2b;
  background: rgba(26, 61, 43, 0.08);
  border-color: rgba(26, 61, 43, 0.18);
}

.verification-badge--unverified {
  color: #888;
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(0, 0, 0, 0.10);
}

.verification-summary {
  font-size: 0.75rem;
  color: var(--text-3);
  margin-bottom: 0.75rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--line);
}

/* ─── Paste & Analyze field ────────────────────────────────────── */
.paste-wrap {
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.paste-field {
  width: 100%;
  min-height: 120px;
  max-height: 300px;
  padding: 1.1rem 1.375rem;
  border: 1.5px solid #e0ddd6;
  border-radius: 12px;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 1rem;
  font-weight: 400;
  color: var(--text-1);
  background: var(--surface);
  outline: none;
  resize: none;
  overflow-y: auto;
  line-height: 1.65;
  transition: border-color 0.18s, box-shadow 0.18s;
  box-sizing: border-box;
}

.paste-field::placeholder {
  color: #b5b0a6;
  font-style: italic;
  font-weight: 300;
}

.paste-field:focus {
  border-color: var(--border-focus);
  box-shadow: 0 4px 20px rgba(26, 61, 43, 0.10), 0 1px 3px rgba(0,0,0,0.04);
}

.paste-field:focus::placeholder {
  opacity: 0;
}

.ask-btn {
  align-self: flex-end;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 0.85rem 1.5rem;
  border-radius: 10px;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: background 0.18s;
  white-space: nowrap;
}

.ask-btn:hover {
  background: #122d1f;
}

.ask-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ─── Interpret panel ──────────────────────────────────────────── */
.interpret-panel {
  width: 100%;
  max-width: 640px;
  margin: 1.5rem auto 0;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 400ms ease-out, transform 400ms ease-out;
  pointer-events: none;
}

.interpret-panel.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.interpret-panel > div {
  background: #fff;
  border-radius: 12px;
  border-left: 3px solid #2f6044;
  padding: 1.75rem 2rem;
  box-shadow: 0 2px 16px rgba(0,0,0,0.06);
}

.interpret-loading {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1.25rem 1.75rem !important;
}

.interpret-loading-text {
  font-size: 0.9rem;
  color: var(--text-2);
  font-weight: 400;
}

/* Dot pulse animation */
.dot-pulse {
  display: inline-flex;
  gap: 4px;
}

.dot-pulse::before,
.dot-pulse::after,
.dot-pulse {
  position: relative;
}

.dot-pulse::before,
.dot-pulse::after {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #2f6044;
  animation: dotPulse 1.4s ease-in-out infinite;
}

.dot-pulse::before {
  animation-delay: 0s;
}

.dot-pulse::after {
  animation-delay: 0.4s;
}

@keyframes dotPulse {
  0%, 80%, 100% { opacity: 0.25; transform: scale(0.8); }
  40% { opacity: 1; transform: scale(1); }
}

.interpret-header {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.75rem;
}

.interpreted-question {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 800;
  font-size: 1.3rem;
  color: #1a3d2b;
  line-height: 1.35;
  margin-bottom: 0.75rem;
}

.search-strategy {
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  font-size: 0.95rem;
  color: #666;
  line-height: 1.6;
  margin-bottom: 1.25rem;
}

/* ─── Context question ──────────────────────────────────────────── */
.context-question {
  margin: 20px 0;
}

.context-label {
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  color: #666;
  margin-bottom: 12px;
}

.context-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.context-option {
  text-align: left;
  padding: 12px 16px;
  background: #fafaf8;
  border: 1px solid #e8e6e0;
  border-radius: 10px;
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  color: #444;
  cursor: pointer;
  transition: all 0.2s ease;
}

.context-option:hover {
  background: #f0ede8;
  border-color: #d0cdc6;
}

.context-option.selected {
  background: #e8f0eb;
  border-color: #2f6044;
  color: #1a3d2b;
  font-weight: 500;
}

.interpret-adjust-wrap {
  margin-bottom: 1rem;
}

.adjust-field {
  width: 100%;
  min-height: 56px;
  max-height: 120px;
  padding: 0.75rem 1rem;
  border: 1.5px solid #e0ddd6;
  border-radius: 8px;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--text-1);
  background: var(--surface);
  outline: none;
  resize: none;
  line-height: 1.5;
  transition: border-color 0.18s;
  box-sizing: border-box;
}

.adjust-field::placeholder {
  color: #b5b0a6;
  font-style: italic;
}

.adjust-field:focus {
  border-color: var(--border-focus);
}

.interpret-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.interpret-btn {
  padding: 0.7rem 1.4rem;
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, opacity 0.15s;
  white-space: nowrap;
}

.interpret-btn--primary {
  background: #1a3d2b;
  color: #fff;
  border: none;
}

.interpret-btn--primary:hover {
  background: #122d1f;
}

.interpret-btn--secondary {
  background: transparent;
  color: #1a3d2b;
  border: 1.5px solid #1a3d2b;
}

.interpret-btn--secondary:hover {
  background: rgba(26, 61, 43, 0.06);
}

/* ─── Thinking stream (AI-native progress) ─────────────────────── */
.thinking-stream {
  max-width: 600px;
  margin: 3rem auto;
  background: #ffffff;
  border: 1px solid #e8e6e0;
  border-radius: 16px;
  padding: 28px 32px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.thinking-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.thinking-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #2f6044;
  animation: thinkingPulse 1.5s ease-in-out infinite;
  flex-shrink: 0;
}

@keyframes thinkingPulse {
  0%   { opacity: 0.4; }
  50%  { opacity: 1; }
  100% { opacity: 0.4; }
}

.thinking-label {
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.thinking-timer {
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  font-weight: 400;
  color: #bbb;
  font-variant-numeric: tabular-nums;
}

.thinking-content {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.thinking-line {
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 8px;
  transition: opacity 0.4s ease, color 0.4s ease;
}

.thinking-line.active {
  color: #333;
  opacity: 1;
  animation: thinkingFadeIn 400ms ease-out;
}

.thinking-line.done {
  color: #999;
  opacity: 0.7;
}

@keyframes thinkingFadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}
