/* Modern report layout: each question in its own card with a clear title */
.report-section {
    background: #fff;
    border: 1px solid #e6e2f5;
    border-radius: 14px;
    padding: 14px 18px;
    margin-bottom: 12px;
    break-inside: avoid;
    page-break-inside: avoid;
}
.report-section .title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 1rem;
    color: #3d00aa;
    border-bottom: 1px solid #f0edf9;
    padding-bottom: 8px;
    margin-bottom: 10px !important;
}
.report-section .title .new {
    width: 6px;
    height: 18px;
    border-radius: 3px;
    background: linear-gradient(180deg, #5c00ff, #8b6cf6);
    flex-shrink: 0;
}
.report-section .referral-inputs p {
    margin: 0;
    color: #1b1446;
    font-size: .95rem;
    line-height: 1.65;
}
.clinician-block.main-border {
    border-radius: 14px !important;
    border: 1px solid #e6e2f5 !important;
    background: #faf9ff;
    padding: 14px 16px !important;
}
.clinician-block h5 { font-weight: 700; color: #1b1446; }
#report-container h1 { font-weight: 800; letter-spacing: -.01em; }
#report-container h5.text-secondary { font-size: .85rem; text-transform: uppercase; letter-spacing: .06em; }

/* ===== Printed report (PDF): fixed A4 pages, 794 x 1123 px ===== */
.vr-page {
    width: 794px;
    min-height: 1123px;
    box-sizing: border-box;
    background: #fff;
    font-family: "Lato", "Segoe UI", sans-serif;
    color: #1d1638;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}
.printContainer.vr-sheet { width: 794px; min-height: 1123px; margin: 0 auto 24px; }
.vr-page p { margin: 0; }
.vr-lbl { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; font-weight: 700; color: #5b5675; margin: 0 0 6px !important; }
.vr-val { font-size: 15px; line-height: 1.4; color: #1d1638; }
.vr-muted { color: #5b5675; }
.vr-field { padding: 12px 0 10px; border-bottom: 1px solid #e2daff; }
.vr-grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 40px; }
.vr-grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.vr-grid4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.vr-pad { padding-left: 56px; padding-right: 56px; }

/* Cover */
.vr-band { position: relative; height: 486px; background: #18005f; padding: 48px 56px 44px; box-sizing: border-box; display: flex; flex-direction: column; overflow: hidden; }
.vr-band-mark { position: absolute; right: -70px; top: 70px; width: 420px; opacity: .22; }
.vr-band-top { position: relative; display: flex; justify-content: space-between; align-items: center; }
.vr-pill { padding: 7px 16px; border: 1px solid rgba(255,255,255,.5); border-radius: 999px; font-size: 12px; font-weight: 700; letter-spacing: .16em; color: #fff; }
.vr-kicker { margin: 0 0 14px !important; font-size: 13px; font-weight: 700; letter-spacing: .18em; color: #c9b8ff; }
.vr-title { margin: 0; font-size: 56px; line-height: 1.02; font-weight: 900; color: #fff; letter-spacing: -.01em; }
.vr-sub { margin-top: 18px !important; font-size: 18px; line-height: 1.45; color: #e4dbff; }
.vr-chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.vr-chip { display: inline-flex; align-items: center; padding: 8px 14px; border: 1px solid rgba(255,255,255,.45); border-radius: 999px; font-size: 13px; font-weight: 700; color: #fff; }
.vr-consent { margin: 26px 56px 0; padding: 18px 22px; background: #f3efff; border-radius: 14px; font-size: 14px; line-height: 1.55; }

/* Running header and footer */
.vr-head { padding: 34px 56px 14px; display: flex; justify-content: space-between; align-items: flex-end; border-bottom: 2px solid #5200ff; }
.vr-head-r { text-align: right; }
.vr-head-title { font-size: 13px; font-weight: 900; color: #18005f; }
.vr-foot { margin-top: auto; padding: 16px 56px 26px; border-top: 1px solid #e2daff; display: flex; justify-content: space-between; align-items: flex-end; font-size: 12px; line-height: 1.5; color: #5b5675; }
.vr-foot strong { color: #18005f; }

/* Sections */
.vr-sec { display: flex; align-items: baseline; gap: 10px; margin: 0 0 10px; font-size: 16px; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; color: #18005f; }
.vr-num { font-size: 13px; color: #5200ff; letter-spacing: .04em; }
.vr-block { padding: 22px 56px 0; }
.vr-box { padding: 16px 18px; border: 1px solid #e2daff; border-radius: 14px; }
.vr-dash { padding: 12px 14px; border: 1px dashed #c9b8ff; border-radius: 12px; }
.vr-body { font-size: 15px; line-height: 1.6; color: #1d1638; white-space: pre-line; }
.vr-tag { display: inline-block; padding: 5px 12px; border-radius: 999px; background: #f3efff; color: #2e1a8a; font-size: 13px; font-weight: 700; }
.vr-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.vr-stat { padding: 12px 14px; border: 1px solid #e2daff; border-radius: 12px; }
.vr-statv { font-size: 18px; font-weight: 900; color: #18005f; }
.vr-demands { display: grid; grid-template-columns: 120px minmax(0, 1fr); row-gap: 8px; column-gap: 12px; align-items: center; }
.vr-demands > span { font-size: 13px; font-weight: 700; color: #5b5675; }

/* At a glance */
.vr-glance { margin: 22px 56px 0; padding: 18px 20px 20px; background: #f3efff; border-radius: 16px; }
.vr-opt { padding: 9px 8px; border-radius: 10px; background: #fff; border: 1px solid #d9ceff; font-size: 13px; font-weight: 700; text-align: center; color: #5b5675; }
.vr-opt.on { background: #5200ff; border-color: #5200ff; color: #fff; font-weight: 900; }
.vr-tile { padding: 12px 14px; background: #fff; border-radius: 12px; }
.vr-tile .vr-val { font-weight: 900; color: #18005f; }

/* Questions */
.vr-q { display: grid; grid-template-columns: 40px minmax(0, 1fr); column-gap: 14px; padding: 14px 16px; border: 1px solid #e2daff; border-radius: 14px; }
.vr-qn { width: 34px; height: 34px; border-radius: 10px; background: #f3efff; color: #5200ff; font-size: 13px; font-weight: 900; display: flex; align-items: center; justify-content: center; }
.vr-qt { margin: 0 0 6px !important; font-size: 15px; font-weight: 900; color: #18005f; line-height: 1.35; }
.vr-who { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 900; letter-spacing: .04em; }

/* Sign-off */
.vr-sign { padding: 18px 22px 20px; border: 1px solid #18005f; border-radius: 14px; }
.vr-sign-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); column-gap: 28px; align-items: end; margin-top: 10px; }
.vr-sign-ink { height: 78px; display: flex; align-items: flex-end; }
.vr-sign-ink img { max-width: 100%; max-height: 78px; object-fit: contain; }
.vr-sign-rule { border-top: 1.5px solid #18005f; margin: 4px 0 8px; }
.vr-sign-name { margin: 0 !important; font-size: 16px; font-weight: 900; color: #18005f; }
.vr-sign-quals { margin: 2px 0 0 !important; font-size: 13px; color: #5b5675; }
.vr-sign-facts { display: grid; row-gap: 8px; }
.vr-sign-facts .vr-lbl { font-size: 11px; }
.vr-legal { margin-top: 18px !important; font-size: 12px; line-height: 1.55; color: #5b5675; }

/* Measuring area: same width as a page, off screen */
.vr-measure { position: absolute; left: -10000px; top: 0; width: 794px; }

/* Signature capture (settings and the report form) */
.vh-sig { max-width: 600px; }
.vh-sig-modes { display: inline-flex; padding: 3px; margin-bottom: 10px; background: #f3efff; border-radius: 999px; }
.vh-sig-modes button { border: 0; background: transparent; padding: 5px 18px; border-radius: 999px; font-size: 14px; font-weight: 700; color: #5b5675; }
.vh-sig-modes button.on { background: #fff; color: #18005f; box-shadow: 0 1px 3px rgba(24, 0, 95, .15); }
.vh-sig-box { position: relative; height: 180px; background: #fff; border: 1px solid #d9ceff; border-radius: 14px; overflow: hidden; }
.vh-sig-box canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; z-index: 1; cursor: crosshair; }
.vh-sig-line { position: absolute; left: 24px; right: 24px; bottom: 42px; border-bottom: 1.5px solid #b9acf0; pointer-events: none; }
.vh-sig-line span { position: absolute; left: 0; top: 8px; font-size: 12px; font-weight: 700; letter-spacing: .04em; color: #9a90c0; text-transform: uppercase; }

/* Sign-off block shown on screen (report previews and pages) */
.vh-signoff { max-width: 520px; padding: 16px 20px; border: 1px solid #d9ceff; border-radius: 14px; background: #fff; }
.vh-signoff img { display: block; max-width: 260px; max-height: 80px; object-fit: contain; }
.vh-signoff .vh-signoff-rule { border-top: 1.5px solid #18005f; margin: 6px 0 8px; }
.vh-signoff .vh-signoff-name { margin: 0; font-weight: 900; color: #18005f; }
.vh-signoff .vh-signoff-meta { margin: 0; font-size: 13px; color: #5b5675; }
