/* Fonts load from a <link> in each page's <head>, with preconnect: an
   @import here could not start until this file had arrived. */

/* ============================================================
   PharmacoScribe — light clinical / regulatory system
   ============================================================ */

:root {
  /* Ink */
  --ink:          #14181B;
  --ink-2:        #495257;
  --ink-3:        #6E777C;

  /* Paper */
  --paper:        #FFFFFF;
  --paper-2:      #F7F7F4;   /* warm off-white band */
  --paper-3:      #EFF0EB;

  /* Rules — structure comes from hairlines, not shadows */
  --rule:         #E2E5E0;
  --rule-strong:  #CBD0CA;

  /* Single accent, used sparingly */
  --teal:         #0F6E56;
  --teal-dark:    #0A5241;
  --teal-wash:    #EDF4F1;

  --measure:      68ch;
  --container:    1120px;
  --radius:       5px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink-2);
  font-family: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  font-feature-settings: 'kern' 1;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; }
a { color: var(--teal); text-decoration: none; }
a:hover { color: var(--teal-dark); text-decoration: underline; text-underline-offset: 3px; }

/* Keyboard focus — visible on every interactive element, on paper and on ink */
a:focus-visible,
button:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 3px;
  border-radius: 2px;
}
.site-footer a:focus-visible { outline-offset: 2px; }

/* ---------- Type ---------- */
h1, h2, h3, h4 {
  font-family: 'Source Serif 4', 'Source Serif Pro', Georgia, serif;
  color: var(--ink);
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.18;
  margin: 0;
  text-wrap: balance;
}
h1 { font-size: clamp(2.3rem, 1.4rem + 3.2vw, 3.5rem); }
h2 { font-size: clamp(1.7rem, 1.2rem + 1.8vw, 2.3rem); }
h3 { font-size: 1.2rem; line-height: 1.3; }
h4 {
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 0.95rem; font-weight: 600; letter-spacing: 0;
}
p { margin: 0 0 1.1em; max-width: var(--measure); }
strong { color: var(--ink); font-weight: 600; }

.eyebrow {
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--teal);
  margin: 0 0 1.1rem;
}
.lede { font-size: 1.2rem; line-height: 1.6; color: var(--ink-2); }
.meta { font-size: 0.875rem; color: var(--ink-3); }
.mono {
  font-family: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  font-variant-numeric: tabular-nums;
}

/* Contact address — a plain, legible link rather than a terminal string */
.email-link { font-size: 1.05rem; font-weight: 600; }

/* ---------- Layout ---------- */
.container { max-width: var(--container); margin: 0 auto; padding: 0 32px; }
.section { padding: 96px 0; }
.section--tight { padding: 64px 0; }
.section--paper2 { background: var(--paper-2); }
.section--rule { border-top: 1px solid var(--rule); }

.section-head { margin-bottom: 56px; max-width: 46rem; }
.section-head p { margin-bottom: 0; }

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

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,0.92);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--rule);
}
.site-header .container {
  display: flex; align-items: center; gap: 40px;
  height: 68px;
}
.brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.brand:hover { text-decoration: none; }
.brand svg { width: 26px; height: 26px; display: block; }
.brand-name {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 1.22rem; font-weight: 600; color: var(--ink);
  letter-spacing: -0.015em;
}
.site-nav { display: flex; gap: 30px; margin-left: auto; align-items: center; }
.site-nav a {
  font-size: 0.925rem; font-weight: 500; color: var(--ink-2);
}
.site-nav a:hover { color: var(--ink); text-decoration: none; }
.site-nav a.is-current {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--teal);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 7px;
}
.site-nav a.btn--primary { color: #fff; }
.site-nav a.btn--primary:hover { color: #fff; }
.site-nav a.btn--ghost { color: var(--ink); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: inherit; font-size: 0.95rem; font-weight: 600;
  padding: 11px 20px; border-radius: var(--radius);
  border: 1px solid transparent; cursor: pointer;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; }
.btn--primary { background: var(--teal); color: #fff; }
.btn--primary:hover { background: var(--teal-dark); color: #fff; }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--rule-strong); }
.btn--ghost:hover { border-color: var(--ink-3); color: var(--ink); background: var(--paper-2); }
.btn--sm { padding: 8px 15px; font-size: 0.875rem; }
.btn-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }

.arrow-link { font-weight: 600; font-size: 0.95rem; }
.arrow-link::after { content: " \2192"; }

/* ---------- Hero ---------- */
.hero { padding: 104px 0 80px; }
.hero h1 { margin-bottom: 24px; max-width: 20ch; }
.hero .lede { max-width: 56ch; margin-bottom: 32px; }
.hero-credential {
  margin-top: 40px; padding-top: 24px;
  border-top: 1px solid var(--rule);
  font-size: 0.9rem; color: var(--ink-3); max-width: 52ch;
}

/* ---------- Figure band (the numbers) ---------- */
.figures {
  display: grid; grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule);
}
.figure { padding: 32px 28px 32px 0; border-right: 1px solid var(--rule); }
.figure:last-child { border-right: 0; }
.figure dt {
  font-size: 0.78rem; letter-spacing: 0.07em; text-transform: uppercase;
  color: var(--ink-3); font-weight: 500; margin-bottom: 10px;
}
.figure dd {
  margin: 0;
  font-family: 'Source Serif 4', 'Source Serif Pro', Georgia, serif;
  font-variant-numeric: tabular-nums;
  font-size: 2.05rem; font-weight: 600; color: var(--ink); line-height: 1.1;
  letter-spacing: -0.015em;
}
.figure dd span { font-size: 0.95rem; color: var(--ink-3); display: block; margin-top: 6px; font-family: 'IBM Plex Sans', sans-serif; }

/* ---------- Cards ---------- */
.card {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 32px;
}
.card h3 { margin-bottom: 12px; }
.card p:last-child { margin-bottom: 0; }
.card-num {
  font-family: 'IBM Plex Sans', sans-serif; font-size: 0.78rem; font-weight: 600;
  color: var(--teal); letter-spacing: 0.06em; margin-bottom: 18px; display: block;
}

/* Capability column — no box, just a rule. Quieter than a card grid. */
.cap { border-top: 2px solid var(--ink); padding-top: 20px; }
.cap h3 { margin-bottom: 10px; }
.cap p { font-size: 0.975rem; margin-bottom: 14px; }
.cap ul { margin: 0; padding-left: 18px; font-size: 0.925rem; color: var(--ink-3); }
.cap li { margin-bottom: 5px; }

/* ---------- Specimen / sample dossier ---------- */
.specimen {
  display: grid; grid-template-columns: 1.15fr 1fr; gap: 0;
  border: 1px solid var(--rule); border-radius: var(--radius); overflow: hidden;
}
.specimen-body { padding: 44px; }
.specimen-body h2 { font-size: 1.85rem; margin-bottom: 16px; }
.specimen-sheet {
  background: var(--paper-2); border-left: 1px solid var(--rule);
  padding: 36px 40px;
  font-family: 'IBM Plex Sans', sans-serif; font-size: 0.9rem; line-height: 1.6;
}
.specimen-sheet dl { margin: 0; }
.specimen-sheet dt {
  color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.05em;
  font-weight: 600; font-size: 0.72rem; margin-top: 20px;
}
.specimen-sheet dt:first-child { margin-top: 0; }
.specimen-sheet dd { margin: 4px 0 0; color: var(--ink); }

/* ---------- Pricing ---------- */
.tiers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border: 1px solid var(--rule); border-radius: var(--radius); overflow: hidden; }
.tier { padding: 36px 32px; border-right: 1px solid var(--rule); background: var(--paper); }
.tier:last-child { border-right: 0; }
.tier--feature { background: var(--teal-wash); }
.tier-name { font-family: 'IBM Plex Sans', sans-serif; font-size: 0.8rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--teal); margin-bottom: 16px; }
.tier-price { font-family: 'Source Serif 4', 'Source Serif Pro', Georgia, serif; font-weight: 600; letter-spacing: -0.015em; font-variant-numeric: tabular-nums; font-size: 2.3rem; color: var(--ink); line-height: 1; margin-bottom: 6px; }
.tier-lead {
  font-family: 'Source Serif 4', 'Source Serif Pro', Georgia, serif;
  font-weight: 600; letter-spacing: -0.015em;
  font-size: 1.55rem; color: var(--ink); line-height: 1.15; margin-bottom: 6px;
}
.tier-unit { font-size: 0.85rem; color: var(--ink-3); margin-bottom: 22px; }
.tier ul { list-style: none; margin: 0 0 24px; padding: 0; font-size: 0.925rem; }
.tier li { padding: 9px 0; border-bottom: 1px solid var(--rule); color: var(--ink-2); }
.tier--feature li { border-bottom-color: #DCE7E2; }
.tier li:last-child { border-bottom: 0; }

/* ---------- Prose pages ---------- */
.prose { max-width: 42rem; }
.prose h2 { margin: 56px 0 18px; font-size: 1.6rem; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin: 32px 0 10px; }
.prose ul, .prose ol { padding-left: 20px; }
.prose li { margin-bottom: 8px; }
.prose table { width: 100%; border-collapse: collapse; margin: 24px 0; font-size: 0.925rem; }
.prose th, .prose td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--rule); vertical-align: top; }
.prose th { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-3); font-weight: 600; border-bottom: 1px solid var(--rule-strong); }
.prose td.mono { white-space: normal; word-break: break-word; }

.callout {
  border-left: 2px solid var(--teal); background: var(--teal-wash);
  padding: 20px 24px; border-radius: 0 var(--radius) var(--radius) 0; margin: 28px 0;
}
.callout p { margin: 0; font-size: 0.95rem; }

/* ---------- Pipeline diagram (home) ----------
   A timeline rule with a dot per stage: five columns on desktop, a single
   left-ruled column on a phone. CSS rather than a fixed-width SVG so the
   labels stay readable at 375px. */
.pipeline {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(5, 1fr);
  position: relative;
}
.pipeline::before {
  content: ""; position: absolute; left: 0; right: 0; top: 47px;
  height: 1px; background: var(--rule-strong);
}
.stage { padding: 0 24px 0 0; position: relative; display: flex; flex-direction: column; }
.stage:last-child { padding-right: 0; }
.stage-index {
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.08em;
  color: var(--teal); display: block; margin-bottom: 10px;
}
.stage-phase {
  font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--ink-3); font-weight: 600; margin: 0 0 14px; height: 18px;
}
.stage-dot {
  display: block; width: 11px; height: 11px; border-radius: 50%;
  background: var(--paper); border: 2px solid var(--teal);
  position: relative; z-index: 1; margin-bottom: 20px;
}
.stage h3 {
  font-size: 1.05rem; margin: 0 0 10px; line-height: 1.25;
}
.stage ul {
  margin: 0; padding-left: 16px; font-size: 0.875rem;
  color: var(--ink-3); line-height: 1.55;
}
.stage li { margin-bottom: 5px; }
.stage-out {
  margin: 14px 0 0; /* bottom-aligned across columns */
  margin-top: auto; padding-top: 12px; border-top: 1px solid var(--rule);
  font-size: 0.825rem; color: var(--ink-2); max-width: none;
}
.stage-out strong { color: var(--ink); }

.pipeline-legend {
  display: flex; flex-wrap: wrap; gap: 32px;
  margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--rule);
}
.pipeline-legend div { flex: 1 1 220px; }
.pipeline-legend h4 { margin-bottom: 6px; }
.pipeline-legend p { font-size: 0.9rem; color: var(--ink-3); margin: 0; }

@media (max-width: 1040px) {
  .pipeline { grid-template-columns: 1fr; padding-left: 26px; }
  .pipeline::before { left: 5px; right: auto; top: 6px; bottom: 6px; width: 1px; height: auto; }
  .stage { padding: 0 0 34px 0; }
  .stage:last-child { padding-bottom: 0; }
  .stage-phase { height: auto; margin-bottom: 8px; }
  .stage-dot { position: absolute; left: -26px; top: 4px; margin: 0; }
  .stage-index { display: inline; margin-right: 8px; }
}

/* ---------- CTA band ---------- */
.cta-band {
  background: var(--teal-wash); color: var(--ink-2);
  border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule);
  padding: 80px 0;
}
.cta-band h2 { color: var(--ink); margin-bottom: 16px; }
.cta-band p { color: var(--ink-2); max-width: 48ch; margin-bottom: 28px; }
.cta-band .btn--primary { color: #fff; }
.cta-band .btn--ghost { color: var(--ink); border-color: var(--rule-strong); background: var(--paper); }
.cta-band .btn--ghost:hover { background: var(--paper); border-color: var(--teal); color: var(--teal-dark); }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--rule); padding: 56px 0 40px; font-size: 0.9rem; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 44px; }
.footer-grid h4 { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-3); margin-bottom: 14px; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin-bottom: 9px; }
.footer-grid a { color: var(--ink-2); }
.footer-grid a:hover { color: var(--teal); }
.footer-about p { font-size: 0.9rem; color: var(--ink-3); max-width: 34ch; margin: 14px 0 0; }
.footer-base {
  border-top: 1px solid var(--rule); padding-top: 24px;
  display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap;
  font-size: 0.825rem; color: var(--ink-3);
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .grid--3, .grid--2 { grid-template-columns: 1fr; gap: 32px; }
  .figures { grid-template-columns: repeat(2, 1fr); }
  .figure { padding: 26px 20px; }
  .figure:nth-child(odd) { padding-left: 0; }
  .figure:nth-child(2) { border-right: 0; }
  .figure:nth-child(-n+2) { border-bottom: 1px solid var(--rule); }
  .specimen, .tiers { grid-template-columns: 1fr; }
  .specimen-sheet { border-left: 0; border-top: 1px solid var(--rule); }
  .tier { border-right: 0; border-bottom: 1px solid var(--rule); }
  .tier:last-child { border-bottom: 0; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 680px) {
  body { font-size: 16px; }
  .container { padding: 0 20px; }
  .section { padding: 64px 0; }
  .hero { padding: 64px 0 48px; }
  /* Header stacks: brand and the CTA share the top row, section links
     sit as a strip beneath. The CTA is lifted out of the strip so it is
     never clipped by the strip's horizontal overflow. */
  .site-header .container {
    position: relative;
    height: auto; flex-wrap: wrap; gap: 0;
    padding-top: 12px; padding-bottom: 10px;
  }
  .brand-name { font-size: 1.1rem; }
  .site-nav {
    order: 3; width: 100%; margin: 10px -20px 0; padding: 0 20px 2px;
    gap: 20px; overflow-x: auto; scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .site-nav::-webkit-scrollbar { display: none; }
  .site-nav a { font-size: 0.875rem; white-space: nowrap; }
  .site-nav a.btn--primary {
    position: absolute; top: 10px; right: 20px; margin-left: 0;
  }
  .specimen-body, .card { padding: 28px 24px; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  /* Tables stack into labelled blocks — three columns at phone width
     squeezes every cell into a one-word-per-line column. */
  .prose table, .prose tbody, .prose tr, .prose td { display: block; width: 100%; }
  .prose thead { display: none; }
  .prose table { font-size: 1rem; }
  .prose tr { padding: 16px 0; border-bottom: 1px solid var(--rule); }
  .prose tr:last-child { border-bottom: 0; }
  .prose td { border: 0; padding: 0; }
  .prose td:first-child {
    font-weight: 600; color: var(--ink);
    font-size: 0.78rem; letter-spacing: 0.05em; text-transform: uppercase;
    margin-bottom: 6px;
  }
}

/* Anchor targets clear the sticky header */
[id] { scroll-margin-top: 88px; }

/* 404 */
.notfound { padding: 140px 0 120px; text-align: left; }

/* ---------- Snapshot request form (2026-11-15) ----------
   Light fields on paper, 1px hairlines, the teal focus ring used elsewhere. */
.snap-form { display: grid; gap: 16px; }
.snap-form .field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.snap-form .field { display: grid; gap: 6px; font-size: 0.875rem; font-weight: 500; color: var(--ink-2); }
.snap-form .field em { font-style: normal; font-weight: 400; color: var(--ink-3); }
.snap-form input, .snap-form textarea, .snap-form select {
  font: inherit; font-size: 0.95rem; font-weight: 400; color: var(--ink);
  background: var(--paper); border: 1px solid var(--rule-strong); border-radius: var(--radius);
  padding: 10px 12px; width: 100%; box-sizing: border-box;
}
.snap-form textarea { resize: vertical; min-height: 96px; }
.snap-form input:focus, .snap-form textarea:focus, .snap-form select:focus {
  outline: 2px solid var(--teal); outline-offset: 1px; border-color: var(--teal);
}
.snap-form .check { display: flex; gap: 10px; align-items: center; font-size: 0.9rem; color: var(--ink-2); }
.snap-form .check input { width: auto; accent-color: var(--teal); }
.snap-form .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.snap-form button[disabled] { opacity: 0.6; cursor: progress; }
.form-status { margin: 0; font-size: 0.9rem; color: var(--ink-2); min-height: 1.2em; }
.form-status.is-ok { color: var(--teal-dark); font-weight: 500; }
.form-status.is-error { color: #8A2B1E; }
@media (max-width: 680px) {
  .snap-form .field-row { grid-template-columns: 1fr; }
}
