/* Green Ledger — Research Pipeline — shared styles across all pages.
   Copied verbatim from research-pipeline-mockup/shared.css (the design source of
   truth). Brand tokens from branding.md:
   bg #FFFFFF · text #334232 (forest) · accent #FDE910 (yellow) · on-accent #1D3508 (moss). */

html, body {
  background: #FFFFFF;
  color: #334232;
  font-family: 'Inter', system-ui, sans-serif;
}

.font-head { font-family: 'Newsreader', Georgia, serif; }
.font-body { font-family: 'Source Serif 4', Georgia, serif; }

/* Hairline rules / dividers */
.rule { height: 1px; background: #334232; }
.hairline { border-color: #E5E7E1; }

/* ---------------------------------------------------------------- Buttons */
/* On-brand CTA: yellow w/ deep-moss text. */
.btn-accent {
  background: #FDE910;
  color: #1D3508;
  font-family: 'Newsreader', Georgia, serif;
  font-weight: 800;
  transition: filter 0.16s ease, transform 0.16s ease;
}
.btn-accent:hover { filter: brightness(0.94); }

.btn-ghost {
  border: 1px solid #334232;
  color: #334232;
  transition: background 0.16s ease, color 0.16s ease;
}
.btn-ghost:hover { background: #334232; color: #FFFFFF; }

/* Quiet text button (e.g. "understand how we got here") */
.btn-text {
  color: #334232;
  border-bottom: 1px solid #FDE910;
  transition: color 0.16s ease;
}
.btn-text:hover { color: #1D3508; }

/* ---------------------------------------------------------------- Cards */
.card {
  background: #FFFFFF;
  border: 1px solid #E5E7E1;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.card-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 36px -18px rgba(51, 66, 50, 0.30);
  border-color: #334232;
  cursor: pointer;
}

/* "Coming soon" dimmed state for inactive categories */
.dimmed {
  opacity: 0.45;
  filter: grayscale(0.4);
  cursor: not-allowed;
}

/* ---------------------------------------------------------------- Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.6rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  border-radius: 9999px;
}
/* Relevancy badge — yellow family */
.badge-rel { background: #FEF9C7; color: #1D3508; }
/* Evidence tiers — green saturation ladder */
.badge-excellent  { background: #334232; color: #FFFFFF; }
.badge-verystrong { background: #4F6A4C; color: #FFFFFF; }
.badge-strong     { background: #7A9476; color: #FFFFFF; }
.badge-moderate   { background: #B9C7B4; color: #1D3508; }
.badge-limited    { background: #E5E7E1; color: #334232; }

/* ---------------------------------------------------------- Score dials */
.score-big {
  font-family: 'Newsreader', Georgia, serif;
  font-weight: 800;
  line-height: 1;
}

/* Evidence-component bar */
.bar-track { background: #E5E7E1; border-radius: 9999px; overflow: hidden; height: 8px; }
.bar-fill  { background: #334232; height: 100%; border-radius: 9999px; }

/* ----------------------------------------------- Relevancy × evidence matrix */
.matrix-cell {
  background: #FFFFFF;
  border: 1px solid #E5E7E1;
  transition: background 0.16s ease, border-color 0.16s ease, transform 0.16s ease;
}
.matrix-cell-link:hover {
  background: #FEFCE3;
  border-color: #FDE910;
  transform: translateY(-1px);
  cursor: pointer;
}
.matrix-cell-empty { background: #FAFAF8; color: #B9C7B4; }

/* ---------------------------------------------------------------- Overlay */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(29, 53, 8, 0.42);
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 4rem 1rem;
  z-index: 50;
  overflow-y: auto;
}
.overlay.open { display: flex; }
.overlay-panel {
  background: #FFFFFF;
  border: 1px solid #E5E7E1;
  max-width: 44rem;
  width: 100%;
  box-shadow: 0 24px 64px -24px rgba(29, 53, 8, 0.5);
}

/* Utility: collapsed reveal target (see-more). Uses !important so it overrides
   Tailwind display utilities (e.g. `flex`) while collapsed; removing the class
   hands display control back to Tailwind so cards render as flex again. */
.collapsed { display: none !important; }

/* Mock PDF drop zone */
.dropzone {
  border: 2px dashed #B9C7B4;
  background: #FAFAF8;
  transition: border-color 0.16s ease, background 0.16s ease;
}
.dropzone:hover { border-color: #FDE910; background: #FEFCE3; }

/* Spinner for the live Gemini synthesis call */
.spinner {
  width: 22px; height: 22px;
  border: 3px solid #E5E7E1;
  border-top-color: #334232;
  border-radius: 9999px;
  animation: spin 0.8s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }
