/* Shared stylesheet for the Reports section (hub + per-test report pages).
   One file because the report family must look identical across pages.
   Base tokens / nav / masthead mirror the rest of the site; the blocks under
   "Report infographic components" are the additions specific to reports. */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --cream: #F7F4EE;
  --warm-white: #FDFCF9;
  --ink: #1C1A17;
  --ink-mid: #4A4640;
  --ink-light: #8C867D;
  --rule: #D9D3C8;
  --accent: #7A5C3A;
  --accent-light: #B8956A;
  --alarm: #9b2c2c;
  --l1: #9b2c2c;   /* Lesion 1 — deep red, matches the annotation box */
  --l2: #8a6d1f;   /* Lesion 2 — gold/amber, matches the annotation box */
  --clear: #4a7a5c; /* "no spread / normal" status green */
}

html { font-size: 16px; }

body {
  background: var(--cream);
  color: var(--ink);
  font-family: 'DM Sans', sans-serif;
  font-weight: 300;
  min-height: 100vh;
}

/* ---- Primary nav ---- */
.site-nav {
  background: var(--warm-white);
  border-bottom: 1px solid var(--rule);
  padding: 0.75rem 2rem;
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.site-nav a {
  font-size: 0.68rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink-light);
  text-decoration: none;
  font-weight: 400;
  transition: color 0.15s;
}

.site-nav a:hover { color: var(--accent); }
.site-nav a.active { color: var(--accent); border-bottom: 1px solid var(--accent-light); padding-bottom: 1px; }

/* ---- Secondary section strip ---- */
.sub-nav { background: var(--cream); border-bottom: 1px solid var(--rule); padding: 0.55rem 2rem; display: flex; justify-content: center; gap: 1.4rem; flex-wrap: wrap; }
.sub-nav a { font-size: 0.62rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-light); text-decoration: none; font-weight: 400; transition: color 0.15s; }
.sub-nav a:hover { color: var(--accent); }
.sub-nav a.active { color: var(--accent); border-bottom: 1px solid var(--accent-light); padding-bottom: 1px; }

/* ---- Masthead ---- */
.masthead {
  background: var(--ink);
  color: var(--cream);
  padding: 3.5rem 2rem 3rem;
  text-align: center;
}

.masthead-label {
  font-family: 'DM Sans', sans-serif;
  font-weight: 300;
  font-size: 0.7rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--accent-light);
  margin-bottom: 1.25rem;
}

.masthead h1 {
  font-family: 'Playfair Display', serif;
  font-weight: 400;
  font-size: clamp(2rem, 5vw, 3.25rem);
  line-height: 1.2;
  color: var(--warm-white);
  max-width: 720px;
  margin: 0 auto 1.25rem;
}

.masthead-meta {
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  color: var(--ink-light);
  text-transform: uppercase;
}

.rule-bar {
  height: 4px;
  background: linear-gradient(90deg, var(--accent) 0%, var(--accent-light) 100%);
}

/* ---- Main column ---- */
main {
  max-width: 720px;
  margin: 0 auto;
  padding: 3.5rem 2rem 6rem;
}

.lead {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: 1.25rem;
  line-height: 1.7;
  color: var(--ink-mid);
  border-left: 3px solid var(--accent-light);
  padding-left: 1.5rem;
  margin-bottom: 2.5rem;
}

section {
  margin-bottom: 3rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid var(--rule);
}

section:last-of-type { border-bottom: none; }

.section-num {
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent-light);
  font-weight: 400;
  margin-bottom: 0.5rem;
  display: block;
}

h2 {
  font-family: 'Playfair Display', serif;
  font-weight: 500;
  font-size: 1.5rem;
  line-height: 1.3;
  color: var(--ink);
  margin-bottom: 1.25rem;
}

h3 {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-weight: 400;
  font-size: 1.15rem;
  color: var(--accent);
  margin: 1.75rem 0 0.75rem;
}

p {
  font-size: 1rem;
  line-height: 1.85;
  color: var(--ink-mid);
  margin-bottom: 1rem;
}

p:last-child { margin-bottom: 0; }

em { font-style: italic; }

strong {
  font-weight: 400;
  color: var(--ink);
  border-bottom: 1px solid var(--accent-light);
}

a.term {
  color: var(--ink-mid);
  text-decoration: none;
  border-bottom: 1px dashed var(--accent-light);
  transition: color 0.15s, border-color 0.15s;
}

a.term:hover { color: var(--accent); border-bottom-style: solid; }

ul.detail { list-style: none; padding: 0; margin: 0.5rem 0 1rem; }
ul.detail li { font-size: 1rem; line-height: 1.75; color: var(--ink-mid); padding: 0.45rem 0 0.45rem 1.25rem; position: relative; }
ul.detail li::before { content: "—"; position: absolute; left: 0; color: var(--accent-light); }
ul.detail li strong { color: var(--ink); font-weight: 400; border-bottom: none; }

/* ================= Report infographic components ================= */

/* Study metadata band */
.meta-band {
  background: var(--warm-white);
  border: 1px solid var(--rule);
  border-radius: 2px;
  padding: 1.5rem 1.75rem;
  margin-bottom: 3rem;
}
.meta-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.1rem 2rem; }
.meta-item { display: flex; flex-direction: column; gap: 0.3rem; }
.meta-key { font-size: 0.58rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--accent-light); }
.meta-val { font-size: 0.95rem; color: var(--ink); line-height: 1.45; }

/* Lesion cards */
.lesion-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; margin: 1rem 0; }
.lesion-card { background: var(--warm-white); border: 1px solid var(--rule); border-left: 4px solid var(--accent); border-radius: 2px; padding: 1.4rem 1.5rem; }
.lesion-card.l1 { border-left-color: var(--l1); }
.lesion-card.l2 { border-left-color: var(--l2); }
.lesion-tag { display: inline-block; font-size: 0.58rem; letter-spacing: 0.16em; text-transform: uppercase; color: #fff; background: var(--accent); padding: 0.22rem 0.6rem; border-radius: 2px; margin-bottom: 0.85rem; }
.lesion-card.l1 .lesion-tag { background: var(--l1); }
.lesion-card.l2 .lesion-tag { background: var(--l2); }
.lesion-score { font-family: 'Playfair Display', serif; font-size: 1.45rem; color: var(--ink); line-height: 1.15; margin-bottom: 0.4rem; }
.lesion-dims { font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-light); margin-bottom: 0.8rem; }
.lesion-loc { font-size: 0.94rem; color: var(--ink-mid); line-height: 1.5; }
.lesion-loc strong { font-weight: 400; }

/* PI-RADS scale */
.pirads { margin: 1.25rem 0 0.25rem; }
.pirads-steps { display: flex; gap: 4px; }
.pirads-step { flex: 1; text-align: center; padding: 0.65rem 0; background: var(--warm-white); border: 1px solid var(--rule); border-radius: 2px; color: var(--ink-light); }
.pirads-step .n { font-family: 'Playfair Display', serif; font-size: 1.15rem; display: block; color: var(--ink-mid); line-height: 1; margin-bottom: 0.2rem; }
.pirads-step .who { font-size: 0.55rem; letter-spacing: 0.1em; text-transform: uppercase; display: block; }
.pirads-step.on-5 { background: var(--l1); border-color: var(--l1); }
.pirads-step.on-5 .n, .pirads-step.on-5 .who { color: #fff; }
.pirads-step.on-4 { background: var(--l2); border-color: var(--l2); }
.pirads-step.on-4 .n, .pirads-step.on-4 .who { color: #fff; }
.pirads-legend { font-size: 0.8rem; color: var(--ink-light); margin-top: 0.85rem; line-height: 1.55; }

/* Status checklist (spread signs) */
.status-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; margin: 1rem 0 0.5rem; }
.status-item { display: flex; align-items: flex-start; gap: 0.65rem; background: var(--warm-white); border: 1px solid var(--rule); border-radius: 2px; padding: 0.85rem 1rem; font-size: 0.92rem; color: var(--ink-mid); line-height: 1.4; }
.status-check { flex-shrink: 0; width: 1.3rem; height: 1.3rem; border-radius: 50%; background: var(--clear); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 0.78rem; margin-top: 0.05rem; }

/* Annotated figures */
.figure-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; margin: 1.5rem 0 0.5rem; }
.report-figure { margin: 0; }
.report-figure img { width: 100%; height: auto; display: block; background: #000; border: 1px solid var(--rule); }
.report-figure figcaption { font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-light); text-align: center; margin-top: 0.7rem; line-height: 1.5; }

/* Click-to-zoom lightbox (full-resolution view) */
.report-figure img.zoomable { cursor: zoom-in; }
.lightbox { position: fixed; inset: 0; z-index: 1000; display: none; align-items: center; justify-content: center; padding: 2.5rem 1.5rem; background: rgba(15, 13, 11, 0.92); }
.lightbox.open { display: flex; }
.lightbox-figure { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 0.9rem; max-width: 100%; }
.lightbox-figure img { display: block; max-width: 90vw; max-height: 85vh; width: auto; height: auto; border: 1px solid rgba(255, 255, 255, 0.15); cursor: zoom-out; }
.lightbox-caption { font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: #B8B2A8; text-align: center; line-height: 1.5; }
.lightbox-close { position: absolute; top: 1rem; right: 1.4rem; background: none; border: none; color: #fff; font-size: 2.2rem; line-height: 1; cursor: pointer; padding: 0.25rem 0.5rem; opacity: 0.8; transition: opacity 0.15s; }
.lightbox-close:hover { opacity: 1; }

/* Disclaimer */
.disclaimer { background: var(--warm-white); border-left: 3px solid var(--accent-light); padding: 1.1rem 1.4rem; margin: 2.5rem 0 0; font-size: 0.82rem; color: var(--ink-light); line-height: 1.6; }
.disclaimer strong { color: var(--ink-mid); font-weight: 400; border-bottom: none; }

/* ---- Dark callout ---- */
.callout { background: var(--ink); border-radius: 2px; padding: 2rem 2.25rem; margin: 3.5rem 0 0; }
.callout-label { font-size: 0.65rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--accent-light); font-weight: 400; margin-bottom: 0.75rem; display: block; }
.callout p { color: #E8E4DC; font-size: 1.05rem; line-height: 1.8; margin: 0; border-bottom: none; }
.callout strong { color: #FFFFFF; border-bottom-color: var(--accent-light); }
.callout a { color: #FFFFFF; text-decoration: none; border-bottom: 1px solid var(--accent-light); }
.callout a:hover { color: var(--accent-light); }

/* ---- Closer line ---- */
.closer { font-family: 'Playfair Display', serif; font-style: italic; font-size: 1.1rem; color: var(--ink-mid); line-height: 1.8; text-align: center; padding: 1rem 0 0; }

/* ---- Footer ---- */
footer { text-align: center; padding: 2.5rem 2rem; border-top: 1px solid var(--rule); background: var(--warm-white); }
footer p { font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-light); margin: 0; line-height: 2; }

/* ---- Prev / next pager ---- */
.pager { max-width: 720px; margin: 0 auto; padding: 2.25rem 2rem 3.5rem; border-top: 1px solid var(--rule); display: flex; align-items: flex-start; justify-content: space-between; gap: 1.5rem; }
.pager-link { flex: 1; display: flex; flex-direction: column; gap: 0.25rem; text-decoration: none; color: var(--ink-mid); transition: color 0.15s; }
.pager-next { text-align: right; align-items: flex-end; }
.pager-link:hover { color: var(--accent); }
.pager-dir { font-size: 0.6rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--accent-light); }
.pager-title { font-family: 'Playfair Display', serif; font-size: 1.05rem; line-height: 1.3; }
.pager-all { align-self: center; flex: 0 0 auto; font-size: 0.6rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-light); text-decoration: none; border-bottom: 1px solid var(--rule); padding-bottom: 2px; transition: color 0.15s; }
.pager-all:hover { color: var(--accent); }

/* ================= Hub page (reports.html) ================= */
.hub-masthead { background: var(--ink); color: var(--cream); padding: 3.5rem 2rem 3rem; text-align: center; }
.hub-label { font-size: 0.7rem; letter-spacing: 0.25em; text-transform: uppercase; color: var(--accent-light); margin-bottom: 1.25rem; }
.hub-masthead h1 { font-family: 'Playfair Display', serif; font-weight: 400; font-size: clamp(2rem, 5vw, 3.25rem); line-height: 1.2; color: var(--warm-white); max-width: 600px; margin: 0 auto; }
.hub-sub { margin-top: 1.1rem; font-family: 'Playfair Display', serif; font-style: italic; font-size: 1rem; color: var(--accent-light); font-weight: 400; }
.hub-main { max-width: 680px; margin: 0 auto; padding: 4rem 2rem 6rem; }
.hub-intro { font-size: 1rem; line-height: 1.65; color: var(--ink-mid); margin-bottom: 1rem; }
.hub-intro strong { color: var(--ink); font-weight: 400; border-bottom: none; }
.hub-intro a { color: var(--ink); text-decoration: none; border-bottom: 1px dashed var(--accent-light); transition: color 0.15s, border-bottom-style 0.15s; }
.hub-intro a:hover { color: var(--accent); border-bottom-style: solid; }
.hub-leadin { font-family: 'Playfair Display', serif; font-style: italic; font-size: 1rem; color: var(--ink-light); margin: 2.25rem 0 1rem; }
.hub-nav { display: flex; flex-direction: column; gap: 0; }
.hub-nav a { display: flex; justify-content: space-between; align-items: baseline; gap: 1.5rem; padding: 1.5rem 0; border-bottom: 1px solid var(--rule); text-decoration: none; color: var(--ink); transition: color 0.15s; }
.hub-nav a:first-child { border-top: 1px solid var(--rule); }
.hub-nav a:hover { color: var(--accent); }
.hub-nav a:hover .hub-arrow { opacity: 1; transform: translateX(4px); }
.hub-nav-left { flex: 1; }
.hub-nav-title { font-family: 'Playfair Display', serif; font-weight: 500; font-size: 1.3rem; line-height: 1.2; margin-bottom: 0.3rem; display: block; }
.hub-nav-desc { font-size: 0.78rem; letter-spacing: 0.05em; color: var(--ink-light); display: block; }
.hub-arrow { font-size: 1.1rem; color: var(--accent-light); opacity: 0.5; transition: opacity 0.15s, transform 0.15s; flex-shrink: 0; }
.hub-closer { margin-top: 2.5rem; padding-top: 1.75rem; border-top: 1px solid var(--rule); text-align: center; font-family: 'Playfair Display', serif; font-style: italic; color: var(--ink-light); font-size: 1rem; }

/* ---- Animation ---- */
@keyframes fadeUp { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: translateY(0); } }
.masthead, .hub-masthead, main > * { animation: fadeUp 0.7s ease both; }
.lead { animation-delay: 0.05s; }
section:nth-of-type(1) { animation-delay: 0.1s; }
section:nth-of-type(2) { animation-delay: 0.15s; }
section:nth-of-type(3) { animation-delay: 0.2s; }
section:nth-of-type(4) { animation-delay: 0.25s; }
section:nth-of-type(5) { animation-delay: 0.3s; }
.callout { animation-delay: 0.35s; }
.hub-nav a:nth-child(1) { animation: fadeUp 0.5s ease 0.15s both; }
.hub-nav a:nth-child(2) { animation: fadeUp 0.5s ease 0.2s both; }
.hub-nav a:nth-child(3) { animation: fadeUp 0.5s ease 0.25s both; }

/* ---- Mobile ---- */
@media (max-width: 540px) {
  main { padding: 2.5rem 1.25rem 4rem; }
  .masthead { padding: 2.5rem 1.25rem 2rem; }
  .hub-masthead { padding: 2.5rem 1.25rem 2rem; }
  .hub-main { padding: 2.5rem 1.25rem 4rem; }
  .callout { padding: 1.5rem 1.25rem; }
  .site-nav { gap: 1.25rem; }
  .sub-nav { gap: 1rem; padding: 0.55rem 1.25rem; }
  .meta-grid { grid-template-columns: 1fr; }
  .lesion-grid { grid-template-columns: 1fr; }
  .status-grid { grid-template-columns: 1fr; }
  .figure-pair { grid-template-columns: 1fr; }
  .pager { padding: 1.75rem 1.25rem 2.5rem; gap: 0.75rem; }
  .pager-title { font-size: 0.92rem; }
  .hub-nav a { flex-direction: column; gap: 0.25rem; }
  .hub-arrow { display: none; }
}
