/* MDI patient-first UX v0.4
   This layer changes information hierarchy and interaction without coupling the product
   to a final brand treatment. The scientific read model remains unchanged. */

:root {
  --people-blue: #0b67d9;
  --people-blue-soft: #eef6ff;
  --people-ink: #102b52;
  --people-muted: #617890;
  --people-line: #dce6ef;
  --people-green: #167153;
  --people-green-soft: #eff9f4;
  --people-amber: #8d6318;
  --people-amber-soft: #fff8e8;
}

/* Simpler patient-facing navigation */
.desktop-nav { margin-left: auto; }
.patient-footer .footer-grid { grid-template-columns: 1.7fr repeat(3, 1fr); }

/* Home */
.patient-hero .hero-grid { min-height: 430px; }
.patient-hero h1 { max-width: 700px; }
.patient-hero .lede { max-width: 710px; font-size: 17px; }
.patient-hero .float-card.a { top: 54px; left: 2px; }
.patient-hero .float-card.b { right: 0; bottom: 42px; }

.patient-stats {
  display: grid;
  grid-template-columns: repeat(4,1fr);
  margin-top: -20px;
  position: relative;
  z-index: 3;
  background: #fff;
  border: 1px solid var(--people-line);
  border-radius: 15px;
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}
.patient-stats > div {
  padding: 18px 22px;
  border-right: 1px solid var(--people-line);
}
.patient-stats > div:last-child { border-right: 0; }
.patient-stats strong {
  display: block;
  color: #143b70;
  font-size: 22px;
  line-height: 1.1;
}
.patient-stats span {
  display: block;
  color: var(--people-muted);
  font-size: 11px;
  margin-top: 4px;
}
.section--compact { padding-bottom: 18px; }

.journey-grid {
  display: grid;
  grid-template-columns: repeat(4,1fr);
  gap: 13px;
}
.journey-card {
  min-height: 185px;
  border: 1px solid var(--people-line);
  border-radius: 14px;
  background: #fff;
  padding: 19px;
  box-shadow: 0 5px 20px rgba(20,55,90,.035);
}
.journey-card svg { color: var(--people-blue); }
.journey-card:nth-child(2) svg { color: var(--teal); }
.journey-card:nth-child(3) svg { color: var(--violet); }
.journey-card:nth-child(4) svg { color: var(--orange); }
.journey-card h3 {
  margin: 13px 0 7px;
  color: var(--people-ink);
  font-size: 15px;
}
.journey-card p {
  min-height: 60px;
  color: var(--people-muted);
  font-size: 11px;
  line-height: 1.55;
}

/* Patient-facing test cards */
.patient-test-card { min-height: 365px; }
.patient-test-card .plain-tag {
  display: inline-flex;
  max-width: 132px;
  padding: 5px 8px;
  border-radius: 999px;
  background: #eef4fa;
  color: #3d5977;
  font-size: 9px;
  font-weight: 800;
  text-align: center;
  line-height: 1.25;
}
.test-card--galleri .plain-tag { background: var(--violet-soft); color: #7453c6; }
.test-card--shield .plain-tag { background: var(--cyan-soft); color: #137f88; }
.test-card--oncoguard-liver .plain-tag { background: var(--orange-soft); color: #c86830; }

.patient-card-facts {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin-top: 14px;
}
.patient-card-facts > div {
  min-height: 61px;
  padding: 10px;
  background: rgba(249,251,253,.88);
  border: 1px solid #e8edf3;
  border-radius: 9px;
}
.patient-card-facts span {
  display: block;
  color: #7a8ba0;
  font-size: 8px;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: .035em;
}
.patient-card-facts strong {
  display: block;
  margin-top: 4px;
  color: #1b3b61;
  font-size: 10.5px;
  line-height: 1.35;
}
.patient-card-status {
  display: flex;
  gap: 12px;
  justify-content: flex-start;
  margin-top: 10px;
  padding: 8px 10px;
  font-size: 9.5px;
}
.patient-card-status span + span::before {
  content: '·';
  margin-right: 12px;
  color: #9aa9b8;
}

.reading-grid {
  display: grid;
  grid-template-columns: repeat(4,1fr);
  overflow: hidden;
  border: 1px solid var(--people-line);
  border-radius: 15px;
  background: #fff;
}
.reading-grid article {
  padding: 21px;
  border-right: 1px solid var(--people-line);
}
.reading-grid article:last-child { border-right: 0; }
.reading-grid article > span {
  display: grid;
  place-items: center;
  width: 29px;
  height: 29px;
  border-radius: 50%;
  color: #fff;
  background: var(--people-blue);
  font-size: 11px;
  font-weight: 850;
}
.reading-grid article:nth-child(2) > span { background: var(--teal); }
.reading-grid article:nth-child(3) > span { background: var(--violet); }
.reading-grid article:nth-child(4) > span { background: var(--orange); }
.reading-grid h3 { margin: 12px 0 6px; color: var(--people-ink); font-size: 14px; }
.reading-grid p { margin: 0; color: var(--people-muted); font-size: 10.5px; line-height: 1.55; }

.people-note {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: 15px;
  padding: 13px 15px;
  border: 1px solid #cfe0f2;
  border-radius: 11px;
  background: #f8fbff;
  color: #44617e;
  font-size: 11px;
}
.people-note svg { color: var(--people-blue); flex: 0 0 auto; }
.people-note strong { display: block; color: #17375f; margin-bottom: 2px; }
.people-note span { line-height: 1.55; }

/* Inline glossary */
.glossary-term {
  position: relative;
  color: #155fc4;
  font-weight: 700;
  text-decoration: underline dotted #7ca9dc;
  text-underline-offset: 3px;
  cursor: help;
}
.glossary-term > span {
  display: inline-grid;
  place-items: center;
  width: 14px;
  height: 14px;
  margin-left: 3px;
  border: 1px solid #9bbbe0;
  border-radius: 50%;
  font-size: 8px;
  text-decoration: none;
  vertical-align: 1px;
}

/* Search/catalog */
.patient-page-head p { max-width: 800px; }
.patient-filters input { min-width: 300px; }

/* Patient-first test record */
.patient-record-hero {
  background:
    radial-gradient(circle at 83% 20%,rgba(43,120,226,.13),transparent 270px),
    linear-gradient(135deg,#fbfdff,#f1f7fc);
}
.patient-record-title {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 35px;
  align-items: end;
}
.patient-record-title h1 {
  margin: 4px 0 9px;
  font-family: Georgia,'Times New Roman',serif;
  font-weight: 500;
  font-size: clamp(42px,5vw,58px);
  line-height: 1.02;
  letter-spacing: -.04em;
  color: #08234c;
}
.patient-record-title > div > p {
  max-width: 790px;
  margin-bottom: 14px;
  color: #526b85;
  font-size: 15px;
  line-height: 1.55;
}
.status-card {
  border: 1px solid #dbe5ef;
  border-radius: 13px;
  background: rgba(255,255,255,.9);
  padding: 16px;
  box-shadow: 0 10px 28px rgba(23,57,94,.05);
}
.status-card small {
  display: block;
  color: #71859a;
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: .045em;
}
.status-card strong {
  display: block;
  margin: 6px 0 7px;
  color: #173b67;
  font-size: 14px;
}
.status-card span {
  display: block;
  color: #647a90;
  font-size: 9.5px;
  line-height: 1.45;
}
.status-card--positive { border-color: #cde7da; background: #f7fcf9; }
.status-card--positive strong { color: #176548; }
.status-card--review { border-color: #ead9ac; background: #fffaf0; }
.status-card--review strong { color: #805c13; }

.patient-record-layout {
  display: grid;
  grid-template-columns: 175px 1fr;
  gap: 28px;
  padding-top: 28px;
}
.patient-record-nav { top: 92px; }
.patient-record-nav a { font-size: 10.5px; }
.patient-panel {
  padding: 23px;
  border-radius: 14px;
}
.patient-panel > .section-head { align-items: flex-start; }
.patient-panel > .section-head h2 { margin-bottom: 4px; }

.answer-grid {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 10px;
}
.answer-grid article {
  min-height: 116px;
  padding: 14px;
  border: 1px solid #e2eaf2;
  border-radius: 11px;
  background: #f9fbfd;
}
.answer-grid small {
  display: block;
  color: #71869c;
  font-size: 9px;
  text-transform: uppercase;
  font-weight: 800;
  letter-spacing: .035em;
}
.answer-grid strong {
  display: block;
  margin-top: 7px;
  color: #183b62;
  font-size: 11.5px;
  line-height: 1.48;
}
.answer-grid strong span {
  display: block;
  margin-top: 4px;
  color: #70849a;
  font-size: 9px;
  font-weight: 500;
}

.important-callout {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-top: 12px;
  padding: 14px 15px;
  border-left: 3px solid #2479df;
  border-radius: 0 10px 10px 0;
  background: #f4f8fe;
}
.important-callout svg { color: #196cd1; flex: 0 0 auto; }
.important-callout strong { display: block; color: #17395f; font-size: 11px; }
.important-callout p { margin: 3px 0 0; color: #516d89; font-size: 10.5px; line-height: 1.55; }

.meaning-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 11px;
}
.meaning-grid article {
  min-height: 126px;
  padding: 15px;
  border: 1px solid #dfe8f0;
  border-radius: 11px;
}
.meaning-grid span { display: block; font-size: 11px; font-weight: 850; }
.meaning-grid p { margin: 7px 0 0; color: #536d87; font-size: 10.5px; line-height: 1.6; }
.meaning-positive { background: #f6fbf8; border-color: #d7eadf !important; }
.meaning-positive span { color: #17674a; }
.meaning-negative { background: #f7faff; border-color: #d9e5f2 !important; }
.meaning-negative span { color: #205d9e; }
.plain-disclaimer {
  margin: 12px 0 0;
  color: #718397;
  font-size: 9.5px;
  line-height: 1.5;
}

.evidence-highlight-grid {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 10px;
}
.evidence-highlight {
  min-height: 205px;
  border: 1px solid #dfe7f0;
  border-radius: 11px;
  background: #fff;
  padding: 14px;
}
.evidence-highlight__metric {
  min-height: 62px;
  color: #41617f;
  font-size: 9.5px;
}
.evidence-highlight__metric strong {
  display: block;
  margin-top: 7px;
  color: #0d315f;
  font-size: 25px;
  font-family: Georgia,'Times New Roman',serif;
  font-weight: 500;
}
.evidence-highlight p {
  margin: 7px 0;
  color: #5e748c;
  font-size: 9.5px;
  line-height: 1.45;
}
.evidence-highlight p b { color: #31506f; }
.historical-chip {
  display: inline-flex;
  margin-left: 4px;
  padding: 2px 5px;
  border-radius: 999px;
  background: #f0f2f5;
  color: #667788;
  font-size: 7.5px;
  font-weight: 700;
}

.metric-explainer {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 12px;
}
.metric-explainer > div {
  padding: 13px;
  border: 1px solid #e1e8ef;
  border-radius: 10px;
  background: #fafcfe;
}
.metric-explainer p { margin: 6px 0 0; color: #657a91; font-size: 10px; line-height: 1.5; }

.access-questions {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 10px;
}
.access-questions article {
  min-height: 148px;
  padding: 14px;
  border: 1px solid #e1e8ef;
  border-radius: 11px;
}
.access-questions small {
  color: #75889b;
  text-transform: uppercase;
  font-size: 8px;
  font-weight: 800;
}
.access-questions strong {
  display: block;
  margin: 7px 0;
  color: #15385f;
  font-size: 12px;
}
.access-questions p { margin: 0; color: #657b92; font-size: 9.5px; line-height: 1.55; }

.price-context-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}
.price-context {
  display: grid;
  grid-template-columns: 210px 1fr;
  gap: 14px;
  align-items: center;
  padding: 11px 13px;
  border: 1px solid #e2e9f0;
  border-radius: 9px;
  background: #fbfcfe;
}
.price-context small { display: block; color: #7b8ca0; font-size: 8px; }
.price-context strong { color: #16385f; font-size: 13px; }
.price-context p { margin: 0; color: #60768e; font-size: 9.5px; }

.access-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #e5ebf1;
  font-size: 10px;
}
.access-links strong { margin-right: 7px; }
.access-links a { color: var(--people-blue); }

/* Technical progressive disclosure */
.technical-disclosure { border: 0; }
.technical-disclosure > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  list-style: none;
  color: #173a62;
}
.technical-disclosure > summary::-webkit-details-marker { display: none; }
.technical-disclosure > summary b { display: block; font-size: 15px; }
.technical-disclosure > summary small { display: block; margin-top: 3px; color: #71859a; font-size: 9.5px; font-weight: 500; }
.technical-disclosure > summary svg { transition: transform .18s ease; }
.technical-disclosure[open] > summary svg { transform: rotate(90deg); }
.technical-body {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid #e2e9f0;
}
.technical-body > h3 {
  margin: 24px 0 10px;
  color: #173a62;
  font-size: 14px;
}
.technical-body > h3:first-child { margin-top: 0; }
.technical-table { max-height: 620px; }
.technical-table table { font-size: 10px; }
.technical-body .timeline h4 { margin: 5px 0; color: #18395f; font-size: 12px; }

.questions-panel h2 { margin-bottom: 12px; }
.question-list {
  display: grid;
  grid-template-columns: repeat(5,1fr);
  gap: 8px;
}
.question-list span {
  padding: 12px;
  border: 1px solid #e0e8f0;
  border-radius: 9px;
  background: #fafcfe;
  color: #4e6984;
  font-size: 9.5px;
  line-height: 1.45;
}
.question-list span::before {
  content: '?';
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  margin-bottom: 7px;
  border-radius: 50%;
  background: #e9f3ff;
  color: #176ad2;
  font-weight: 850;
}

/* Compare */
.patient-compare th small {
  display: block;
  margin-top: 3px;
  color: #718498;
  font-size: 8px;
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
}
.patient-compare tbody th {
  width: 150px;
  color: #375372;
}
.patient-compare td {
  min-width: 210px;
  color: #536b83;
  line-height: 1.45;
}
.compare-help {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 12px 0 30px;
  color: #58718c;
  font-size: 10.5px;
}
.compare-help svg { color: var(--people-blue); }

/* Glossary page */
.glossary-page { padding-bottom: 50px; }
.glossary-intro {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 16px;
  border: 1px solid #cfe0f1;
  border-radius: 12px;
  background: #f8fbff;
}
.glossary-intro svg { color: var(--people-blue); flex: 0 0 auto; }
.glossary-intro strong { color: #15385f; font-size: 12px; }
.glossary-intro p { margin: 4px 0 0; color: #5d748d; font-size: 10.5px; line-height: 1.55; }
.glossary-group { padding-top: 32px; }
.glossary-group h2 {
  margin: 0 0 13px;
  color: #0e2d59;
  font-family: Georgia,'Times New Roman',serif;
  font-weight: 500;
  font-size: 24px;
}
.glossary-grid {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 10px;
}
.glossary-grid article {
  min-height: 150px;
  padding: 16px;
  border: 1px solid #e0e8ef;
  border-radius: 11px;
  background: #fff;
}
.glossary-grid h3 { margin: 0 0 7px; color: #173a62; font-size: 13px; }
.glossary-grid p { margin: 0; color: #60778e; font-size: 10px; line-height: 1.58; }

/* About */
.patient-about .panel > p { color: #596f86; font-size: 11px; line-height: 1.6; }
.scientific-invariant {
  padding: 24px;
  border: 1px solid #cbdcf0;
  border-radius: 14px;
  background: linear-gradient(135deg,#f7fbff,#fff);
}
.scientific-invariant blockquote {
  margin: 8px 0 0;
  color: #244667;
  font-family: Georgia,'Times New Roman',serif;
  font-size: 19px;
  line-height: 1.5;
}

/* Mobile */
@media (max-width: 1050px) {
  .journey-grid { grid-template-columns: 1fr 1fr; }
  .reading-grid { grid-template-columns: 1fr 1fr; }
  .reading-grid article:nth-child(2) { border-right: 0; }
  .reading-grid article:nth-child(-n+2) { border-bottom: 1px solid var(--people-line); }
  .answer-grid { grid-template-columns: 1fr 1fr; }
  .evidence-highlight-grid { grid-template-columns: 1fr 1fr; }
  .question-list { grid-template-columns: repeat(3,1fr); }
}

@media (max-width: 850px) {
  .patient-footer .footer-grid { grid-template-columns: 1fr 1fr; }
  .patient-stats { grid-template-columns: 1fr 1fr; margin-top: 10px; }
  .patient-stats > div:nth-child(2) { border-right: 0; }
  .patient-stats > div:nth-child(-n+2) { border-bottom: 1px solid var(--people-line); }
  .patient-record-title { grid-template-columns: 1fr; }
  .patient-record-layout { grid-template-columns: 1fr; }
  .patient-record-nav { display: none; }
  .access-questions { grid-template-columns: 1fr; }
  .glossary-grid { grid-template-columns: 1fr 1fr; }
  .patient-filters input { min-width: 0; }
}

@media (max-width: 620px) {
  .journey-grid,
  .reading-grid,
  .answer-grid,
  .evidence-highlight-grid,
  .metric-explainer,
  .glossary-grid,
  .patient-footer .footer-grid { grid-template-columns: 1fr; }
  .reading-grid article { border-right: 0; border-bottom: 1px solid var(--people-line); }
  .reading-grid article:last-child { border-bottom: 0; }
  .patient-stats > div { padding: 14px; }
  .patient-stats strong { font-size: 19px; }
  .patient-record-title h1 { font-size: 42px; }
  .patient-panel { padding: 17px; }
  .price-context { grid-template-columns: 1fr; gap: 5px; }
  .question-list { grid-template-columns: 1fr 1fr; }
  .patient-card-facts { grid-template-columns: 1fr; }
  .patient-test-card { min-height: 0; }
}
