/* Ojas Immune brand system - Biotech Deals Tracker
   Colour: 60% navy and tints (structure, type, grounds) / 30% neutrals and white /
   10% Ojas Red as the point. Never long body in red. Never Ojas Red on navy.
   Type: Corporate S Pro headings, Quasimoda body (Adobe Fonts kit tpd4gbv),
   Arial fallback. Sentence case headings, no italics, no all-caps paragraphs. */

:root {
  /* Core */
  --navy: #092E51;
  --red: #E22219;
  --red-light: #FF5347;

  /* Neutrals */
  --ink: #000000;
  --charcoal: #3F4649;
  --slate: #5A6369;
  --mist: #E6EBED;
  --panel: #ffffff;

  /* Navy tints 10-80% */
  --navy-10: #E6EAEE;
  --navy-20: #CED5DC;
  --navy-30: #9DABB9;
  --navy-50: #6B8297;
  --navy-80: #3A5874;

  /* Red tints */
  --red-10: #FCE9E8;
  --red-20: #F9D3D1;

  /* Ramp blues for interaction */
  --cobalt: #174B8F;
  --azure: #4C8BDF;

  /* Semantic */
  --line: var(--navy-20);
  --muted: var(--slate);
  --zebra: #F7F9FA;

  /* Data palette (Navy leads, Red is the point) */
  --data-navy: #092E51;
  --data-red: #E22219;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "quasimoda", Arial, Helvetica, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--navy);
  background: var(--panel);
}

h1, h2, h3 { font-family: "corporate-s", Arial, Helvetica, sans-serif; }

.wrap { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* ---- Header: navy ground, reversed lockup ---- */
.topbar { background: var(--navy); color: #fff; padding: 24px 0 24px; }
.brand { display: flex; align-items: center; gap: 20px; margin-bottom: 18px; }
.brand-logo-el { flex: 0 0 auto; }
.brand-text h1 { margin: 0 0 6px; font-size: 26px; font-weight: 600; line-height: 1.15; }
.brand-text h1::after {
  content: ""; display: block; width: 40px; height: 3px;
  background: var(--red-light); margin-top: 8px;
}
.subtitle { margin: 6px 0 0; color: var(--navy-20); font-size: 14px; line-height: 1.5; }

/* Top row: stats + search side by side */
.hero-row { display: flex; gap: 16px; align-items: stretch; flex-wrap: wrap; }
.stats { display: flex; gap: 12px; flex-wrap: wrap; flex: 1 1 auto; }
.stat {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 10px; padding: 10px 16px; min-width: 96px;
}
.stat .num { font-family: "corporate-s", Arial, Helvetica, sans-serif; font-size: 22px; font-weight: 700; line-height: 1.1; }
.stat .lbl {
  font-size: 11px; color: var(--navy-20); text-transform: uppercase;
  letter-spacing: .14em; font-weight: 600; margin-top: 2px;
}
/* Macrophage is the story: the one red stat */
.stat:nth-child(3) .num { color: var(--red-light); }

.search-wrap { display: flex; align-items: center; flex: 1 1 260px; min-width: 240px; }
.search-wrap input {
  width: 100%; padding: 11px 14px; border: 1px solid rgba(255,255,255,0.25);
  border-radius: 10px; font-size: 14px; font-family: inherit;
  background: #fff; color: var(--navy);
}
.search-wrap input::placeholder { color: var(--navy-30); }
.search-wrap input:focus { outline: 2px solid var(--red-light); outline-offset: 1px; }

/* ---- Controls ---- */
.controls { display: flex; gap: 10px; flex-wrap: nowrap; overflow-x: auto; margin: 24px 0 10px; padding-bottom: 4px; }
.controls select, .controls button {
  padding: 9px 12px; border: 1px solid var(--line); border-radius: 8px;
  font-size: 14px; font-family: inherit; color: var(--navy);
  background: #fff; flex: 1 1 0; min-width: 132px; white-space: nowrap;
}
.controls select:focus { outline: 2px solid var(--cobalt); outline-offset: 1px; }
/* Red pill button - the 10% */
.controls button {
  cursor: pointer; background: var(--red); color: #fff; border-color: var(--red);
  border-radius: 999px; font-weight: 600; flex: 0 0 auto; min-width: 88px;
}
.controls button:hover { background: #C41C14; border-color: #C41C14; }

.result-count { color: var(--muted); font-size: 13px; margin: 6px 2px 12px; }

/* ---- Table: navy header band, subtle zebra, never a whole coloured column ---- */
.table-wrap { overflow-x: auto; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
thead th {
  text-align: left; background: var(--navy); color: #fff; font-weight: 600;
  font-size: 12px; text-transform: uppercase; letter-spacing: .08em;
  padding: 12px; border-bottom: 1px solid var(--navy); white-space: nowrap;
  position: sticky; top: 0;
}
tbody td { padding: 12px; border-bottom: 1px solid var(--navy-10); vertical-align: top; line-height: 1.45; }
tbody tr { cursor: pointer; }
tbody tr:nth-child(even) { background: var(--zebra); }
tbody tr:hover { background: var(--navy-10); }
.year-pill { font-weight: 700; color: var(--navy); }
.partners { font-weight: 600; }
/* Upfront payments - short red emphasis, the point of the number */
td strong { color: var(--red); font-weight: 700; }

/* ---- Tags ---- */
.tag {
  display: inline-block; font-size: 11px; font-weight: 600; padding: 3px 9px;
  border-radius: 999px; margin-right: 4px; letter-spacing: .02em;
}
.tag.onco { background: var(--navy-10); color: var(--navy); }
.tag.macro { background: var(--red-10); color: var(--red); }

/* ---- Modal ---- */
.modal { position: fixed; inset: 0; background: rgba(9,46,81,0.62); display: flex; align-items: center; justify-content: center; padding: 20px; z-index: 50; }
.modal.hidden { display: none; }
.modal-card { background: #fff; border-radius: 14px; max-width: 720px; width: 100%; max-height: 86vh; overflow-y: auto; padding: 28px 30px; position: relative; }
.modal-close { position: absolute; top: 12px; right: 14px; border: none; background: none; font-size: 28px; line-height: 1; cursor: pointer; color: var(--muted); }
.modal-close:hover { color: var(--red); }
.modal-card h2 {
  margin: 0 28px 0 0; font-size: 24px; font-weight: 600; line-height: 1.15; color: var(--navy);
}
.modal-card h2::after {
  content: ""; display: block; width: 40px; height: 3px; background: var(--red); margin-top: 10px;
}
.modal-card .meta-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 20px; }
.dl { display: grid; grid-template-columns: 168px 1fr; gap: 10px 16px; font-size: 14px; }
.dl dt {
  color: var(--muted); font-weight: 600; font-size: 12px;
  text-transform: uppercase; letter-spacing: .08em; padding-top: 2px;
}
.dl dd { margin: 0; }
.dl dd strong { color: var(--red); font-weight: 700; }
.dl a { color: var(--cobalt); text-decoration: underline; text-underline-offset: 2px; }
.dl a:hover { color: var(--red); }

/* ---- Footer ---- */
.footer {
  color: var(--muted); font-size: 13px; line-height: 1.55;
  padding: 28px 20px 44px; border-top: 1px solid var(--navy-10); margin-top: 32px;
}
.footer strong { color: var(--navy); }

@media (max-width: 640px) {
  .brand { gap: 14px; }
  .brand-text h1 { font-size: 22px; }
  .dl { grid-template-columns: 1fr; gap: 2px 0; }
  .dl dd { margin-bottom: 10px; }
}
