/* ─────────────────────────────────────────────────────────────
   Simulated NIH Review Panel — landing page
   Academic / editorial style. Minimal palette, serif display.
   ───────────────────────────────────────────────────────────── */

:root {
  --ink:            #1a1a1a;
  --ink-soft:       #3d3d3d;
  --ink-muted:      #6b6b6b;
  --ink-faint:      #9a9a9a;
  --paper:          #fafaf7;
  --paper-edge:     #efeee8;
  --rule:           #d9d6cc;
  --accent:         #1a3d52;      /* oxford / deep teal */
  --accent-soft:    #3a6880;
  --accent-pale:    #e4ecf1;
  --ochre:          #8a5a2b;
  --slate:          #4a5560;

  --serif:  "Source Serif 4", "Source Serif Pro", Georgia, "Iowan Old Style", serif;
  --sans:   "Inter", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --mono:   "JetBrains Mono", "SF Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

main {
  max-width: 820px;
  margin: 0 auto;
  padding: 4.5rem 1.75rem 3rem;
}

/* ── Masthead ───────────────────────────────────────────────── */

.masthead {
  margin-bottom: 3rem;
}

.eyebrow {
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-muted);
  font-weight: 500;
  margin-bottom: 1rem;
}

h1 {
  font-family: var(--serif);
  font-size: clamp(2.2rem, 5vw, 3.1rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.015em;
  margin: 0 0 1.2rem;
  color: var(--ink);
}

.lede {
  font-family: var(--serif);
  font-size: 1.18rem;
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 640px;
  margin: 0 0 2rem;
  font-weight: 400;
}

.cta-row {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.cta-row-bottom {
  margin-top: 1.5rem;
}

.cta-primary {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  padding: 0.75rem 1.4rem;
  border-radius: 2px;
  text-decoration: none;
  transition: background 0.15s ease;
}
.cta-primary:hover {
  background: #112a3a;
}

.cta-note {
  font-size: 0.82rem;
  color: var(--ink-muted);
}

.rule {
  border: none;
  border-top: 1px solid var(--rule);
  margin: 3.5rem 0 2.5rem;
}

/* ── Section labels ─────────────────────────────────────────── */

.section-label {
  font-family: var(--sans);
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 0.9rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--rule);
}

section {
  margin-bottom: 3.2rem;
}

section p {
  font-family: var(--serif);
  font-size: 1.05rem;
  line-height: 1.72;
  color: var(--ink-soft);
  margin: 0 0 1.1rem;
}

section p em {
  color: var(--ink);
}

h3 {
  font-family: var(--serif);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 0.8rem;
  letter-spacing: -0.005em;
}

/* ── Motivation ordered list ────────────────────────────────── */

.motivation-list {
  list-style: none;
  counter-reset: mot;
  padding: 0;
  margin: 0 0 1.25rem;
}
.motivation-list li {
  counter-increment: mot;
  position: relative;
  padding: 0.8rem 0 0.8rem 2.3rem;
  font-family: var(--serif);
  font-size: 1.02rem;
  line-height: 1.65;
  color: var(--ink-soft);
  border-top: 1px solid var(--paper-edge);
}
.motivation-list li:first-child {
  border-top: none;
}
.motivation-list li::before {
  content: counter(mot, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 0.8rem;
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--accent);
  letter-spacing: 0.02em;
  font-weight: 500;
}
.motivation-list li strong {
  color: var(--ink);
  font-weight: 600;
}

/* ── Figures ────────────────────────────────────────────────── */

.figure-block {
  margin: 1.5rem 0 1.75rem;
  padding: 0;
}

.flow-wrap, .chart-wrap {
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: 3px;
  padding: 1.4rem 1rem;
  margin-bottom: 0.9rem;
  overflow-x: auto;
}

.flow-diagram, .calibration-chart {
  width: 100%;
  height: auto;
  display: block;
}

figcaption {
  font-family: var(--serif);
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--ink-muted);
  padding: 0 0.2rem;
}
figcaption strong {
  color: var(--ink);
  font-weight: 600;
}

/* ── Flow diagram (Figure 1) ────────────────────────────────── */

.stage-box {
  fill: #fff;
  stroke: var(--accent);
  stroke-width: 1.2;
}
.stage-highlight .stage-box {
  fill: var(--accent-pale);
  stroke: var(--accent);
  stroke-width: 1.5;
}
.stage-num {
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  fill: var(--accent);
  font-weight: 500;
  letter-spacing: 0.05em;
}
.stage-title {
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 14px;
  fill: var(--ink);
  font-weight: 600;
}
.stage-desc {
  font-family: "Inter", sans-serif;
  font-size: 11px;
  fill: var(--ink-muted);
}
.flow-arrow {
  stroke: #1a3d52;
  stroke-width: 1.4;
  fill: none;
}
.flow-arrow-dashed {
  stroke: #7a8c95;
  stroke-width: 1.1;
  stroke-dasharray: 4 3;
  fill: none;
}

.external-box {
  fill: #f6f3ec;
  stroke: #b8ac8c;
  stroke-width: 1;
  stroke-dasharray: 3 2;
}
.external-label {
  font-family: "Inter", sans-serif;
  font-size: 9px;
  fill: #8a6f3c;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 600;
}
.external-source {
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 11px;
  fill: var(--ink-soft);
  font-style: italic;
}

/* Badges inside stages */
.badge-parallel  { fill: #d9e6d7; }
.badge-multimodal { fill: #e8dff0; }
.badge-constraint { fill: #f5e6d3; }
.badge-hybrid    { fill: #d9e6d7; }
.badge-text {
  font-family: "JetBrains Mono", monospace;
  font-size: 9px;
  fill: var(--ink);
  text-anchor: middle;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.checkpoint-dot {
  fill: var(--accent);
}
.structural-note {
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 11px;
  font-style: italic;
  fill: var(--ink-muted);
}

/* ── Calibration chart (Figure 2) ───────────────────────────── */

.axis-line {
  stroke: var(--ink);
  stroke-width: 1;
}
.axis-line-zero {
  stroke: var(--ink-faint);
  stroke-width: 1;
  stroke-dasharray: 2 2;
}
.axis-label {
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  fill: var(--ink-muted);
}
.axis-zero-label {
  fill: var(--ink);
  font-weight: 500;
}
.axis-title {
  font-family: "Inter", sans-serif;
  font-size: 11px;
  fill: var(--ink-soft);
  font-weight: 500;
}
.grid-line {
  stroke: #e8e6de;
  stroke-width: 1;
}
.optimal-band {
  fill: #e8ede2;
  opacity: 0.45;
}
.band-label {
  font-family: "JetBrains Mono", monospace;
  font-size: 9px;
  fill: #6d7560;
  letter-spacing: 0.04em;
}

.grant-line {
  stroke-width: 1.8;
  fill: none;
}
.grant-a-line { stroke: var(--accent);   }
.grant-a-dot  { fill: var(--accent);     stroke: #fff; stroke-width: 1; }
.grant-b-line { stroke: var(--ochre);    stroke-dasharray: 5 3; }
.grant-b-dot  { fill: var(--ochre);      stroke: #fff; stroke-width: 1; }
.grant-c-line { stroke: var(--slate);    stroke-dasharray: 2 3; }
.grant-c-dot  { fill: var(--slate);      stroke: #fff; stroke-width: 1; }

.legend-text {
  font-family: "Inter", sans-serif;
  font-size: 11px;
  fill: var(--ink-soft);
}

/* ── Scope section ──────────────────────────────────────────── */

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-bottom: 1.25rem;
}
@media (max-width: 640px) {
  .two-col { grid-template-columns: 1fr; gap: 1.25rem; }
}

.scope-list {
  margin: 0;
  padding-left: 1.1rem;
  font-family: var(--serif);
  font-size: 0.98rem;
  line-height: 1.6;
  color: var(--ink-soft);
}
.scope-list li {
  margin-bottom: 0.5rem;
  padding-left: 0.2rem;
}
.scope-list li::marker {
  color: var(--accent-soft);
}

.privacy-note {
  font-family: var(--serif);
  font-size: 0.94rem;
  font-style: italic;
  color: var(--ink-muted);
  border-left: 2px solid var(--accent-soft);
  padding: 0.4rem 0 0.4rem 1rem;
  margin-top: 1rem;
}

/* ── Colophon (footer) ──────────────────────────────────────── */

.colophon {
  border-top: 1px solid var(--rule);
  background: #f3f1ea;
  padding: 2.5rem 1.75rem;
  margin-top: 2rem;
}

.colophon-grid {
  max-width: 820px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}
@media (max-width: 640px) {
  .colophon-grid { grid-template-columns: 1fr; gap: 1.25rem; }
}

.colophon-label {
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-muted);
  font-weight: 600;
  margin-bottom: 0.4rem;
}
.colophon-value {
  font-family: var(--serif);
  font-size: 0.95rem;
  color: var(--ink-soft);
  line-height: 1.45;
}

/* ── Responsive tweaks ──────────────────────────────────────── */

@media (max-width: 640px) {
  main { padding: 3rem 1.25rem 2rem; }
  h1 { font-size: 2rem; }
  .lede { font-size: 1.05rem; }
  section p { font-size: 1rem; }
  .flow-wrap, .chart-wrap { padding: 0.8rem 0.4rem; }
}
