/* Prescription · project reports
   The next sheet on the same pad: a short printed header, a title block with
   the facts in a form grid, then plain sections. Loads after style.css. */

/* ---------- header strip ---------- */
.r-head {
  display: flex;
  align-items: center;
  gap: 14px 28px;
  flex-wrap: wrap;
  padding: clamp(16px, 2vw, 24px) var(--pad-x);
  border-bottom: 3px solid var(--red);
}
.r-back {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 700; font-size: 1rem;
  text-decoration: none;
}
.r-back svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform 0.3s var(--ease-out); }
.r-back:hover svg { transform: translateX(-3px); }
.r-who { flex: 1; text-align: center; font-size: 0.95rem; color: var(--print-2); }
.r-who a { font-family: var(--f-head); font-weight: 700; font-size: 1.15rem; color: var(--print); text-decoration: none; }

/* ---------- title block ---------- */
.r-title {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--col-gap);
  padding: clamp(40px, 5.4vw, 80px) var(--pad-x) 0;
}
.r-title > * { grid-column: 1 / -1; }
.r-title h1 {
  font-family: var(--f-head);
  font-weight: 700;
  font-size: clamp(2.7rem, 7vw, 5.6rem);
  line-height: 0.95;
  letter-spacing: -0.025em;
  color: var(--print);
  text-wrap: balance;
}
.r-one {
  margin-top: clamp(16px, 2vw, 26px);
  font-family: var(--f-head);
  font-weight: 500;
  font-size: clamp(1.35rem, 2.2vw, 1.9rem);
  line-height: 1.36;
  color: var(--ink);
  max-width: 40ch;
  text-wrap: pretty;
}

/* facts: a printed form, filled in */
.r-facts {
  margin: clamp(28px, 3.4vw, 44px) 0 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr));
  border-top: 2px solid var(--print);
}
.r-facts > div {
  padding: 12px 18px 14px 0;
  border-bottom: 1px solid var(--hair);
}
.r-facts dt {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--print-2);
}
.r-facts dd { margin: 4px 0 0; font-size: 1.05rem; color: var(--ink); line-height: 1.45; }
.r-facts .r-stack { grid-column: 1 / -1; }
.r-actions { display: flex; flex-wrap: wrap; gap: 12px 14px; margin-top: clamp(24px, 3vw, 34px); }

/* ---------- sections ---------- */
.r-sec { padding-top: clamp(64px, 7.4vw, 112px); }
.r-sec .sec-head { grid-column: 1 / 4; }
.r-sec .sec-body { grid-column: 4 / 13; }
.r-sec h2 { font-size: clamp(2rem, 3.4vw, 2.9rem); top: 28px; }
.r-sec.sec-wide .sec-head, .r-sec.sec-wide .sec-body { grid-column: 1 / -1; }

.r-body { max-width: 72ch; }
.r-body > * + * { margin-top: 16px; }
.r-body ul { display: grid; gap: 10px; }
.r-body li { position: relative; padding-left: 1.4em; }
.r-body li::before {
  content: "";
  position: absolute;
  left: 0.2em; top: 0.72em;
  width: 0.5em; height: 2px;
  background: var(--red);
  border-radius: 2px;
}
.r-body b { color: var(--print); }
.r-lead {
  font-family: var(--f-head);
  font-weight: 500;
  font-size: clamp(1.25rem, 1.9vw, 1.6rem);
  line-height: 1.4;
  color: var(--ink);
}
.r-note {
  padding: 12px 16px;
  background: rgba(var(--hl), 0.18);
  border-radius: 3px;
  font-size: 0.98rem;
  color: var(--ink-2);
}
.r-body a { font-weight: 600; }

/* results tables: ruled like a lab sheet */
.r-tablewrap { overflow-x: auto; margin-top: 20px; -webkit-overflow-scrolling: touch; }
.r-table { width: 100%; min-width: 560px; border-collapse: collapse; font-size: 0.98rem; }
.r-table th {
  text-align: left;
  padding: 10px 14px 10px 0;
  border-bottom: 2px solid var(--print);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--print-2);
  vertical-align: bottom;
}
.r-table td { padding: 11px 14px 11px 0; border-bottom: 1px solid var(--hair); }
.r-table td:first-child { padding-left: 0; }
.r-table .n { font-variant-numeric: tabular-nums; white-space: nowrap; }
.r-table tr.us td { font-weight: 700; color: var(--print); background: rgba(var(--hl), 0.32); }
.r-table tr.us td:first-child { padding-left: 10px; }

/* screens, taped to the sheet */
.r-plates {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(30px, 3.6vw, 56px) clamp(24px, 3vw, 44px);
}
.r-plate {
  position: relative;
  background: #fff;
  padding: 10px 10px 0;
  box-shadow: 0 1px 2px rgba(14, 12, 8, 0.14), 0 16px 32px -16px rgba(14, 12, 8, 0.42);
}
.r-plate.p1 { transform: rotate(-0.6deg); }
.r-plate.p2 { transform: rotate(0.5deg); margin-top: 20px; }
.r-plate img { width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; object-position: top left; background: #e9e4d8; }
.r-plate .tape { width: 28%; top: -13px; }
.r-plate figcaption { padding: 10px 2px 14px; font-size: 0.92rem; color: var(--ink-2); line-height: 1.45; }

/* ---------- footer: next report ---------- */
.r-foot { flex-direction: column; align-items: stretch; gap: clamp(40px, 5vw, 64px); }
.r-next {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 4px 20px;
  padding: clamp(22px, 2.6vw, 32px) 0;
  border-top: 2px solid var(--print);
  border-bottom: 1px solid var(--hair);
  text-decoration: none;
}
.r-next .lbl { grid-column: 1; color: var(--red); }
.r-next-name {
  grid-column: 1;
  font-family: var(--f-head);
  font-weight: 700;
  font-size: clamp(2rem, 4.4vw, 3.6rem);
  line-height: 1;
  color: var(--print);
}
.r-next svg { grid-column: 2; grid-row: 1 / 3; fill: none; stroke: var(--print); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; width: clamp(28px, 3vw, 40px); height: auto; transition: transform 0.4s var(--ease-out); }
.r-next:hover svg { transform: translateX(6px); }
.r-next:hover .r-next-name { color: var(--pen); }
.r-foot-row { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; }

@media (max-width: 899px) {
  .r-sec .sec-head, .r-sec .sec-body { grid-column: 1 / -1; }
  .r-sec h2 { position: static; }
  .r-plates { grid-template-columns: minmax(0, 1fr); }
  .r-plate.p2 { margin-top: 0; }
  .r-who { display: none; }
  .r-head { justify-content: space-between; }
}
