body { background: #F4F7FB; color: #1e293b; }
.page-wrap { padding-top: calc(var(--nav-h, 72px) + 18px); padding-bottom: 3rem; }

/* ── Start screen ── */
.start-card { background:#fff; border:1.5px solid #e2e8f0; border-radius:20px; padding:2.5rem; max-width:540px; margin:0 auto; }
.start-abbr { display:inline-block; font-size:0.72rem; font-weight:700; background:#EFF6FF; color:#1B3A6B; border:1px solid #BFDBFE; padding:0.22rem 0.7rem; border-radius:6px; margin-bottom:0.8rem; }
.start-title { font-size:1.5rem; font-weight:700; color:#1B3A6B; margin-bottom:0.4rem; }
.start-desc { font-size:0.9rem; color:#64748b; line-height:1.7; margin-bottom:1.5rem; }
.start-meta { display:flex; gap:1.5rem; font-size:0.82rem; color:#94a3b8; margin-bottom:1.75rem; flex-wrap:wrap; }
.field-label { font-size:0.82rem; font-weight:600; color:#475569; margin-bottom:0.3rem; }
.field-optional { font-size:0.75rem; font-weight:400; color:#94a3b8; margin-left:0.35rem; }
.inp { width:100%; border:1.5px solid #e2e8f0; border-radius:8px; padding:0.55rem 0.9rem; font-size:0.9rem; font-family:inherit; outline:none; transition:border-color 0.15s; }
.inp:focus { border-color:#1B3A6B; }
.btn-primary-nibs { background:#1B3A6B; color:#fff; border:none; padding:0.65rem 2rem; border-radius:10px; font-size:0.95rem; font-weight:600; cursor:pointer; font-family:inherit; transition:background 0.15s; width:100%; margin-top:1.25rem; }
.btn-primary-nibs:hover { background:#142d57; }
.ref-text { font-size:0.75rem; color:#94a3b8; margin-top:1.2rem; line-height:1.5; }
.btn-howto { display:inline-flex; align-items:center; gap:0.4rem; background:#EFF6FF; border:1.5px solid #BFDBFE; border-radius:8px; padding:0.38rem 1rem; font-size:0.82rem; font-weight:600; color:#1B3A6B; cursor:pointer; font-family:inherit; transition:all 0.15s; }
.btn-howto:hover { background:#DBEAFE; border-color:#1B3A6B; }

/* Parallel-form selector (e.g. pLAST-A / pLAST-B) */
.variant-row { display:flex; flex-wrap:wrap; gap:0.5rem; }
.variant-btn { flex:1; min-width:120px; background:#fff; border:1.5px solid #e2e8f0; border-radius:8px; padding:0.6rem 1rem; font-size:0.9rem; font-weight:700; color:#475569; cursor:pointer; font-family:inherit; transition:all 0.12s; }
.variant-btn:hover { border-color:#1B3A6B; color:#1B3A6B; }
.variant-btn.selected { background:#1B3A6B; border-color:#1B3A6B; color:#fff; }
.variant-note { margin-top:0.5rem; font-size:0.78rem; color:#94a3b8; line-height:1.6; }

/* Stimulus plate image (shown fullscreen to the patient) */
.stim-plate { width:100%; max-width:100%; height:auto; border:1.5px solid #e2e8f0; border-radius:10px; background:#fff; display:block; }
.stim-credit { font-size:0.7rem; color:#cbd5e1; line-height:1.5; margin-top:0.5rem; }

/* Number / computed fields */
.num-row { display:flex; align-items:center; gap:0.6rem; flex-wrap:wrap; }
.num-input { width:120px; padding:0.5rem 0.7rem; border:1.5px solid #e2e8f0; border-radius:8px; font-size:0.95rem; font-family:inherit; font-weight:600; color:#0D1E3A; }
.num-input:focus { outline:none; border-color:#1B3A6B; }
.num-unit { font-size:0.88rem; color:#475569; font-weight:600; }
.num-hint { font-size:0.76rem; color:#94a3b8; font-style:italic; }
.num-hint-row { margin-top:0.5rem; }
.computed-box { min-width:120px; padding:0.5rem 0.7rem; border:1.5px dashed #BFDBFE; border-radius:8px; background:#EFF6FF; font-size:0.95rem; font-weight:700; color:#1B3A6B; text-align:center; }

/* Choice (single-select) */
.choice-row { display:flex; flex-wrap:wrap; gap:0.5rem; }
.choice-btn { background:#fff; border:1.5px solid #e2e8f0; border-radius:8px; padding:0.5rem 1rem; font-size:0.88rem; font-weight:600; color:#475569; cursor:pointer; font-family:inherit; transition:all 0.12s; }
.choice-btn:hover { border-color:#1B3A6B; color:#1B3A6B; }
.choice-btn.selected { background:#1B3A6B; border-color:#1B3A6B; color:#fff; }

/* Multi-select */
.multi-row { display:flex; flex-wrap:wrap; gap:0.5rem; }
.multi-btn { display:inline-flex; align-items:center; gap:0.5rem; background:#fff; border:1.5px solid #e2e8f0; border-radius:8px; padding:0.5rem 0.9rem; font-size:0.88rem; font-weight:600; color:#475569; cursor:pointer; font-family:inherit; transition:all 0.12s; }
.multi-btn:hover { border-color:#1B3A6B; }
.multi-box { width:15px; height:15px; border:1.5px solid #cbd5e1; border-radius:4px; flex-shrink:0; transition:all 0.12s; }
.multi-btn.selected { border-color:#1B3A6B; color:#1B3A6B; background:#EFF6FF; }
.multi-btn.selected .multi-box { background:#1B3A6B; border-color:#1B3A6B; box-shadow:inset 0 0 0 2px #fff; }

.mal-hint { font-weight:400; font-size:0.82rem; color:#94a3b8; }

/* Dual scale — one item rated on two scales (MAL amount + quality) */
.ds-wrap { display:flex; flex-direction:column; gap:0.5rem; transition:opacity 0.15s; }
.ds-wrap.na { opacity:0.35; pointer-events:none; }
.ds-row { display:flex; align-items:center; gap:0.7rem; flex-wrap:wrap; }
.ds-label { font-size:0.78rem; font-weight:700; color:#64748b; text-transform:uppercase; letter-spacing:0.05em; min-width:88px; }
.ds-btns { display:flex; gap:0.25rem; flex-wrap:wrap; }
.ds-btn { min-width:38px; padding:0.35rem 0.35rem; background:#fff; border:1.5px solid #e2e8f0; border-radius:6px; font-size:0.8rem; font-weight:600; color:#475569; cursor:pointer; font-family:inherit; transition:all 0.1s; }
.ds-btn:hover { border-color:#1B3A6B; color:#1B3A6B; }
.ds-btn.selected { background:#1B3A6B; border-color:#1B3A6B; color:#fff; }
.ds-na { margin-top:0.7rem; background:#fff; border:1.5px dashed #cbd5e1; border-radius:8px; padding:0.4rem 0.9rem; font-size:0.78rem; font-weight:600; color:#94a3b8; cursor:pointer; font-family:inherit; transition:all 0.12s; }
.ds-na:hover { border-color:#94a3b8; color:#64748b; }
.ds-na.selected { background:#FEF3C7; border-color:#FCD34D; border-style:solid; color:#78350F; }
@media (max-width: 600px) {
  .ds-label { min-width:100%; }
  .ds-btn { min-width:34px; font-size:0.75rem; padding:0.3rem 0.25rem; }
}

/* Free text */
.text-input { width:100%; padding:0.6rem 0.8rem; border:1.5px solid #e2e8f0; border-radius:8px; font-size:0.9rem; font-family:inherit; color:#0D1E3A; resize:vertical; line-height:1.6; }
.text-input:focus { outline:none; border-color:#1B3A6B; }

/* Cross-item protocol rule warning (never auto-applied — examiner clicks to fix) */
.rule-warn { display:flex; align-items:center; justify-content:space-between; gap:0.8rem; flex-wrap:wrap; background:#FEF3C7; border:1.5px solid #FCD34D; border-radius:8px; padding:0.65rem 0.9rem; margin-bottom:0.9rem; }
.rule-warn-text { font-size:0.82rem; color:#78350F; line-height:1.5; }
.rule-warn-btn { background:#D97706; color:#fff; border:none; border-radius:7px; padding:0.35rem 0.85rem; font-size:0.78rem; font-weight:700; cursor:pointer; font-family:inherit; white-space:nowrap; transition:background 0.15s; }
.rule-warn-btn:hover { background:#B45309; }

/* Stimulus material — shown fullscreen to the patient (turn the tablet around) */
.btn-stimulus { display:inline-flex; align-items:center; gap:0.4rem; background:#FFF7ED; border:1.5px solid #FED7AA; border-radius:8px; padding:0.38rem 1rem; margin-bottom:0.9rem; font-size:0.82rem; font-weight:600; color:#9A3412; cursor:pointer; font-family:inherit; transition:all 0.15s; }
.btn-stimulus:hover { background:#FFEDD5; border-color:#F97316; }
.stim-title { font-size:0.78rem; font-weight:700; text-transform:uppercase; letter-spacing:0.07em; color:#94a3b8; margin:1.2rem 0 0.6rem; }
.stim-title:first-child { margin-top:0; }
.stim-sheet { background:#fff; border:1.5px solid #e2e8f0; border-radius:10px; padding:1.4rem 1.6rem; }
.stim-sheet p { font-size:1.5rem; font-weight:700; line-height:1.7; color:#0D1E3A; margin:0 0 0.9rem; }
.stim-sheet p:last-child { margin-bottom:0; }
.stim-words { display:flex; flex-wrap:wrap; gap:0.6rem 1.2rem; }
.stim-words span { font-size:1.5rem; font-weight:700; color:#0D1E3A; }
.stim-link { display:inline-flex; align-items:center; gap:0.4rem; background:#1B3A6B; color:#fff; border-radius:8px; padding:0.5rem 1rem; font-size:0.85rem; font-weight:600; text-decoration:none; }
.stim-link:hover { background:#2563EB; color:#fff; }
.stim-note { font-size:0.78rem; color:#94a3b8; line-height:1.6; margin-top:0.6rem; }
@media (max-width: 600px) {
  .stim-sheet p, .stim-words span { font-size:1.2rem; }
}

/* ── Questions screen ── */
.q-screen { max-width:720px; margin:0 auto; }
.q-header { background:#fff; border:1.5px solid #e2e8f0; border-radius:16px; padding:1.25rem 1.5rem; margin-bottom:1.5rem; display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:0.75rem; }
.q-header-title { font-size:1.1rem; font-weight:700; color:#1B3A6B; }
.q-header-sub { font-size:0.82rem; color:#64748b; margin-top:0.1rem; }
.btn-back-link { font-size:0.84rem; color:#64748b; text-decoration:none; cursor:pointer; }
.btn-back-link:hover { color:#1B3A6B; }

.q-instructions { background:#EFF6FF; border:1px solid #BFDBFE; border-radius:10px; padding:0.9rem 1.1rem; font-size:0.86rem; color:#1e40af; line-height:1.6; margin-bottom:1.5rem; }

.q-block { background:#fff; border:1.5px solid #e2e8f0; border-radius:14px; padding:1.4rem 1.5rem; margin-bottom:1rem; transition:border-color 0.15s; }
.q-block.error { border-color:#ef4444; }
.q-block.answered { border-color:#bbf7d0; }
.q-num { font-size:0.72rem; font-weight:700; color:#94a3b8; text-transform:uppercase; letter-spacing:0.07em; margin-bottom:0.45rem; }
.q-text { font-size:0.93rem; color:#1e293b; line-height:1.65; margin-bottom:1rem; }
.q-note { font-size:0.78rem; color:#94a3b8; font-style:italic; margin-top:-0.5rem; margin-bottom:0.75rem; }
.optional-badge { font-size:0.71rem; color:#94a3b8; font-weight:500; margin-left:0.5rem; }

/* NRS buttons */
.nrs-row { display:flex; align-items:stretch; gap:3px; flex-wrap:nowrap; }
.nrs-btn { flex:1; min-width:0; padding:0.55rem 0.2rem; border:1.5px solid #e2e8f0; border-radius:7px; background:#fff; cursor:pointer; font-size:0.88rem; font-weight:600; color:#475569; transition:all 0.12s; text-align:center; font-family:inherit; }
.nrs-btn:hover { border-color:#1B3A6B; color:#1B3A6B; background:#eff6ff; }
.nrs-btn.selected { background:#1B3A6B; border-color:#1B3A6B; color:#fff; }
.nrs-labels { display:flex; justify-content:space-between; font-size:0.72rem; color:#94a3b8; margin-top:0.4rem; }

/* VAS slider */
.vas-wrap { display:flex; flex-direction:column; gap:0.4rem; }
.vas-slider { width:100%; height:8px; -webkit-appearance:none; appearance:none; border-radius:4px; background:#e2e8f0; outline:none; cursor:pointer; }
.vas-slider::-webkit-slider-thumb { -webkit-appearance:none; width:22px; height:22px; border-radius:50%; background:#1B3A6B; cursor:pointer; border:3px solid #fff; box-shadow:0 2px 6px rgba(0,0,0,0.2); }
.vas-slider::-moz-range-thumb { width:22px; height:22px; border-radius:50%; background:#1B3A6B; cursor:pointer; border:3px solid #fff; box-shadow:0 2px 6px rgba(0,0,0,0.2); }
.vas-val { display:none; }

/* VAS Health (EQ thermometer-style) */
.vas-health-wrap { display:flex; gap:1.5rem; align-items:flex-start; }
.vas-health-track { display:flex; flex-direction:column; align-items:center; gap:0.4rem; min-width:60px; }
.vas-health-label { font-size:0.75rem; color:#94a3b8; text-align:center; }
.vas-health-num { font-size:0.72rem; color:#64748b; font-weight:600; }
.vas-health-input { writing-mode:vertical-lr; direction:rtl; -webkit-appearance:slider-vertical; width:40px; height:200px; cursor:pointer; }
.vas-health-display { font-size:1.6rem; font-weight:700; color:#1B3A6B; }

/* Verbal pain */
.verbal-grid { display:flex; flex-wrap:wrap; gap:0.5rem; }
.verbal-btn { flex:1; min-width:130px; padding:0.75rem 1rem; border:1.5px solid #e2e8f0; border-radius:10px; background:#fff; cursor:pointer; font-size:0.88rem; font-weight:600; color:#475569; transition:all 0.15s; text-align:center; font-family:inherit; }
.verbal-btn:hover { border-color:#1B3A6B; color:#1B3A6B; }
.verbal-btn.selected { background:#1B3A6B; border-color:#1B3A6B; color:#fff; }

/* Yes/No */
.yesno-row { display:flex; gap:0.75rem; }
.yesno-btn { flex:1; padding:0.75rem; border:1.5px solid #e2e8f0; border-radius:10px; background:#fff; cursor:pointer; font-size:0.95rem; font-weight:600; color:#475569; transition:all 0.15s; text-align:center; font-family:inherit; }
.yesno-btn:hover { border-color:#1B3A6B; color:#1B3A6B; }
.yesno-btn.selected { background:#1B3A6B; border-color:#1B3A6B; color:#fff; }

/* Likert4 */
.likert-scale-header { display:flex; gap:0.3rem; margin-bottom:0.35rem; }
.likert-scale-header span { flex:1; font-size:0.68rem; color:#94a3b8; text-align:center; line-height:1.3; }
.likert-row { display:flex; gap:0.3rem; }
.likert-btn { flex:1; padding:0.6rem 0.2rem; border:1.5px solid #e2e8f0; border-radius:8px; background:#fff; cursor:pointer; font-size:0.88rem; font-weight:700; color:#64748b; transition:all 0.12s; text-align:center; font-family:inherit; }
.likert-btn:hover { border-color:#1B3A6B; color:#1B3A6B; }
.likert-btn.selected { background:#1B3A6B; border-color:#1B3A6B; color:#fff; }

/* Likert3 */
.likert3-list { display:flex; flex-direction:column; gap:0.4rem; }
.likert3-option { display:flex; align-items:center; gap:0.75rem; padding:0.65rem 0.9rem; border:1.5px solid #e2e8f0; border-radius:10px; cursor:pointer; transition:all 0.15s; }
.likert3-option:hover { border-color:#1B3A6B; background:#eff6ff; }
.likert3-option.selected { border-color:#1B3A6B; background:#1B3A6B; color:#fff; }
.likert3-option .l3-radio { width:18px; height:18px; border-radius:50%; border:2px solid #cbd5e1; flex-shrink:0; display:flex; align-items:center; justify-content:center; }
.likert3-option.selected .l3-radio { border-color:#fff; background:#fff; }
.likert3-option.selected .l3-radio::after { content:''; width:8px; height:8px; border-radius:50%; background:#1B3A6B; display:block; }
.l3-num { font-size:0.75rem; font-weight:700; color:#94a3b8; min-width:1.1rem; }
.likert3-option.selected .l3-num { color:rgba(255,255,255,0.7); }

/* NRS group */
.nrs-group-item { margin-bottom:0.85rem; padding-bottom:0.85rem; border-bottom:1px solid #f1f5f9; }
.nrs-group-item:last-child { border-bottom:none; margin-bottom:0; padding-bottom:0; }
.nrs-group-label { font-size:0.86rem; font-weight:600; color:#334155; margin-bottom:0.45rem; }

/* Percent */
.percent-grid { display:flex; flex-wrap:wrap; gap:0.4rem; }
.pct-btn { padding:0.45rem 0.7rem; border:1.5px solid #e2e8f0; border-radius:8px; background:#fff; cursor:pointer; font-size:0.84rem; font-weight:600; color:#475569; transition:all 0.12s; font-family:inherit; min-width:54px; text-align:center; }
.pct-btn:hover { border-color:#1B3A6B; color:#1B3A6B; }
.pct-btn.selected { background:#1B3A6B; border-color:#1B3A6B; color:#fff; }

/* Treatment table */
.treatment-row { display:grid; grid-template-columns:1fr 1fr 1fr 140px auto; gap:0.5rem; align-items:center; margin-bottom:0.5rem; }
.treatment-row .inp-sm { border:1.5px solid #e2e8f0; border-radius:7px; padding:0.45rem 0.7rem; font-size:0.84rem; font-family:inherit; outline:none; width:100%; transition:border-color 0.15s; }
.treatment-row .inp-sm:focus { border-color:#1B3A6B; }
.btn-remove-row { background:none; border:1.5px solid #e2e8f0; border-radius:7px; color:#94a3b8; cursor:pointer; padding:0.4rem 0.6rem; font-size:0.8rem; transition:all 0.12s; line-height:1; }
.btn-remove-row:hover { border-color:#ef4444; color:#ef4444; }
.treatment-header { display:grid; grid-template-columns:1fr 1fr 1fr 140px auto; gap:0.5rem; font-size:0.73rem; font-weight:600; color:#94a3b8; text-transform:uppercase; letter-spacing:0.05em; margin-bottom:0.4rem; }
.btn-add-row { background:#f8fafc; border:1.5px dashed #cbd5e1; border-radius:8px; padding:0.45rem 1rem; font-size:0.82rem; font-weight:600; color:#64748b; cursor:pointer; font-family:inherit; transition:all 0.15s; }
.btn-add-row:hover { border-color:#1B3A6B; color:#1B3A6B; background:#eff6ff; }

/* Body diagram */
.body-diagram-wrap { display:flex; flex-direction:column; align-items:center; gap:1rem; }
.body-map-img { max-width:520px; width:100%; border-radius:8px; }
.body-num-grid { width:100%; }
.body-num-section { margin-bottom:0.75rem; }
.body-num-section-label { font-size:0.72rem; font-weight:700; color:#94a3b8; text-transform:uppercase; letter-spacing:0.08em; margin-bottom:0.45rem; }
.body-num-buttons { display:flex; flex-wrap:wrap; gap:0.35rem; }
.body-num-btn { width:36px; height:36px; border:1.5px solid #e2e8f0; border-radius:7px; background:#fff; cursor:pointer; font-size:0.82rem; font-weight:700; color:#475569; transition:all 0.12s; display:flex; align-items:center; justify-content:center; font-family:inherit; padding:0; }
.body-num-btn:hover { border-color:#1B3A6B; color:#1B3A6B; background:#eff6ff; }
.body-num-btn.selected { background:#1B3A6B; border-color:#1B3A6B; color:#fff; }
.body-hint { font-size:0.78rem; color:#94a3b8; text-align:center; }
.body-selected-list { font-size:0.8rem; color:#475569; text-align:center; min-height:1.2em; line-height:1.7; }

/* Submit section */
.submit-section { background:#fff; border:1.5px solid #e2e8f0; border-radius:14px; padding:1.5rem; margin-top:1.5rem; text-align:center; }
.error-msg { color:#ef4444; font-size:0.82rem; margin-top:0.5rem; display:none; }
.btn-submit { background:#1B3A6B; color:#fff; border:none; padding:0.75rem 2.5rem; border-radius:10px; font-size:1rem; font-weight:700; cursor:pointer; font-family:inherit; transition:background 0.15s; }
.btn-submit:hover { background:#142d57; }

/* ── Results screen ── */
.results-screen { max-width:720px; margin:0 auto; }
.results-header { background:#fff; border:1.5px solid #e2e8f0; border-radius:16px; padding:1.5rem; margin-bottom:1.25rem; display:flex; align-items:flex-start; justify-content:space-between; flex-wrap:wrap; gap:1rem; }
.results-title { font-size:1.2rem; font-weight:700; color:#1B3A6B; }
.results-meta { font-size:0.82rem; color:#94a3b8; margin-top:0.2rem; }
.btn-export { background:#f1f5f9; color:#1B3A6B; border:1.5px solid #e2e8f0; padding:0.5rem 1.2rem; border-radius:8px; font-size:0.84rem; font-weight:600; cursor:pointer; font-family:inherit; transition:all 0.15s; }
.btn-export:hover { background:#1B3A6B; color:#fff; border-color:#1B3A6B; }
.btn-print { background:#1B3A6B; color:#fff; border:none; padding:0.5rem 1.2rem; border-radius:8px; font-size:0.84rem; font-weight:600; cursor:pointer; font-family:inherit; transition:background 0.15s; }
.btn-print:hover { background:#142d57; }

.score-card { background:#fff; border:1.5px solid #e2e8f0; border-radius:14px; padding:1.5rem; margin-bottom:1rem; }
.score-card-title { font-size:0.78rem; font-weight:600; text-transform:uppercase; letter-spacing:0.08em; color:#94a3b8; margin-bottom:1rem; }

.score-row { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:0.5rem; margin-bottom:0.75rem; }
.score-label { font-size:0.9rem; font-weight:600; color:#334155; }
.score-val { font-size:1.4rem; font-weight:800; }
.score-cls { font-size:0.78rem; font-weight:600; padding:0.2rem 0.7rem; border-radius:999px; }
.progress-bar-wrap { height:10px; background:#f1f5f9; border-radius:5px; overflow:hidden; margin-top:0.3rem; }
.progress-bar-fill { height:100%; border-radius:5px; transition:width 0.6s ease; }

.profile-grid { display:flex; flex-direction:column; gap:0.5rem; }
.profile-dim { display:flex; align-items:center; gap:0.75rem; }
.profile-dim-label { font-size:0.82rem; color:#475569; min-width:160px; }
.profile-dim-badge { font-size:0.78rem; font-weight:600; padding:0.2rem 0.75rem; border-radius:999px; color:#fff; }
.profile-code { font-size:1.6rem; font-weight:800; color:#1B3A6B; letter-spacing:0.05em; margin-bottom:0.75rem; }

.chart-wrap { position:relative; height:220px; margin-top:1rem; }

/* Chart expand modal */
.chart-modal-overlay { display:none; position:fixed; inset:0; background:rgba(0,0,0,0.55); z-index:9000; align-items:center; justify-content:center; }
.chart-modal-overlay.open { display:flex; }
.chart-modal-box { background:#fff; border-radius:16px; padding:1.5rem; width:min(92vw,680px); max-height:90vh; display:flex; flex-direction:column; gap:1rem; }
.chart-modal-header { display:flex; align-items:center; justify-content:space-between; }
.chart-modal-title { font-size:0.8rem; font-weight:700; text-transform:uppercase; letter-spacing:0.08em; color:#94a3b8; }
.chart-modal-close { background:none; border:none; font-size:1.3rem; cursor:pointer; color:#64748b; line-height:1; padding:0.1rem 0.4rem; border-radius:6px; }
.chart-modal-close:hover { background:#f1f5f9; }
.chart-modal-canvas-wrap { position:relative; flex:1; min-height:380px; }
.btn-expand-chart { background:none; border:1px solid #e2e8f0; border-radius:7px; padding:0.25rem 0.6rem; font-size:0.75rem; color:#64748b; cursor:pointer; font-family:inherit; transition:all 0.12s; }
.btn-expand-chart:hover { border-color:#1B3A6B; color:#1B3A6B; }

/* Sensitive item alert */
.sensitive-alert { background:#fff7ed; border:1.5px solid #fed7aa; border-radius:12px; padding:1rem 1.25rem; margin-bottom:1rem; font-size:0.86rem; color:#9a3412; line-height:1.65; }
.sensitive-alert > strong:first-child { display:block; margin-bottom:0.3rem; font-size:0.88rem; }

/* PHQ-2 positive alert */
.phq2-alert { background:#fff7ed; border:1.5px solid #fed7aa; border-radius:12px; padding:1rem 1.25rem; margin-bottom:1rem; font-size:0.86rem; color:#9a3412; line-height:1.65; }

/* Reference */
.ref-block { background:#f8fafc; border:1px solid #e2e8f0; border-radius:10px; padding:0.85rem 1.1rem; font-size:0.78rem; color:#64748b; line-height:1.6; margin-top:1rem; break-inside:avoid; page-break-inside:avoid; }
.ref-block strong { color:#475569; }

.btn-restart { background:#f1f5f9; color:#1B3A6B; border:1.5px solid #e2e8f0; padding:0.55rem 1.5rem; border-radius:8px; font-size:0.88rem; font-weight:600; cursor:pointer; font-family:inherit; transition:all 0.15s; margin-top:0.75rem; }
.btn-restart:hover { background:#1B3A6B; color:#fff; border-color:#1B3A6B; }

/* CSV load zone */
.csv-load-zone { border:2px dashed #e2e8f0; border-radius:8px; padding:0.65rem 1rem; text-align:center; cursor:pointer; transition:all 0.15s; margin-bottom:0.65rem; }
.csv-load-zone:hover { border-color:#1B3A6B; background:#eff6ff; }
.csv-load-zone.loaded { border-color:#22c55e; background:#f0fdf4; }
.csv-load-text { font-size:0.78rem; color:#94a3b8; }
.csv-load-zone.loaded .csv-load-text { color:#16a34a; font-weight:600; }

/* Performance scoring (0-1-2 with criteria — Mini-BESTest) */
.perf-options { display:flex; flex-direction:column; gap:0.45rem; }
.perf-option { display:flex; align-items:flex-start; gap:0.75rem; padding:0.7rem 0.9rem; border:1.5px solid #e2e8f0; border-radius:10px; cursor:pointer; transition:all 0.15s; }
.perf-option:hover { border-color:#1B3A6B; background:#eff6ff; }
.perf-option.selected { border-color:#1B3A6B; background:#1B3A6B; color:#fff; }
.perf-score-badge { width:24px; height:24px; border-radius:50%; border:2px solid #cbd5e1; flex-shrink:0; display:flex; align-items:center; justify-content:center; font-size:0.78rem; font-weight:800; color:#64748b; margin-top:1px; }
.perf-option.selected .perf-score-badge { border-color:#fff; background:#fff; color:#1B3A6B; }
.perf-option-text { font-size:0.88rem; line-height:1.55; }

/* Stopwatch */
.timer-wrap { background:#f8fafc; border:1px solid #e2e8f0; border-radius:10px; padding:0.85rem 1rem; margin-bottom:0.85rem; display:flex; gap:1rem; flex-wrap:wrap; }
.timer-block { flex:1; min-width:180px; display:flex; flex-direction:column; gap:0.35rem; }
.timer-block-label { font-size:0.72rem; font-weight:700; color:#64748b; text-transform:uppercase; letter-spacing:0.06em; }
.timer-display { font-size:1.4rem; font-weight:700; color:#1B3A6B; font-variant-numeric:tabular-nums; letter-spacing:-0.02em; }
.timer-controls { display:flex; gap:0.4rem; }
.timer-btn-go { background:#1B3A6B; color:#fff; border:none; padding:0.38rem 0.9rem; border-radius:7px; font-size:0.82rem; font-weight:600; cursor:pointer; font-family:inherit; transition:background 0.15s; }
.timer-btn-go:hover { background:#142d57; }
.timer-btn-go.running { background:#dc2626; }
.timer-btn-go.running:hover { background:#b91c1c; }
.timer-btn-rst { background:#fff; color:#64748b; border:1.5px solid #e2e8f0; padding:0.38rem 0.65rem; border-radius:7px; font-size:0.82rem; cursor:pointer; font-family:inherit; transition:all 0.15s; }
.timer-btn-rst:hover { border-color:#94a3b8; color:#1e293b; }
.timer-input-row { display:flex; align-items:center; gap:0.4rem; font-size:0.82rem; color:#64748b; }
.timer-input { width:70px; border:1.5px solid #e2e8f0; border-radius:7px; padding:0.28rem 0.5rem; font-size:0.88rem; font-family:inherit; text-align:center; outline:none; transition:border-color 0.15s; }
.timer-input:focus { border-color:#1B3A6B; }

@page { size: A4; margin: 2cm 1.8cm; }
.print-only { display:none; }

@media print {
  .no-print { display:none !important; }
  .print-only { display:block !important; }
  body { background:#fff !important; }
  .page-wrap { padding-top:1rem; }
  .results-screen { max-width:100%; }
  .score-card { break-inside: avoid; page-break-inside: avoid; }
  .chart-wrap { break-inside: avoid; page-break-inside: avoid; }
  #bpi-report-overlay { position:static !important; height:auto !important; overflow:visible !important; background:#fff !important; }
  #nibs-rpt-overlay { position:static !important; height:auto !important; overflow:visible !important; background:#fff !important; }
  body.bpi-rpt-open .page-wrap { display:none !important; }

  /* Print the report's colours (legend swatches, group headers, heat-map
     cells, badges). Browsers drop HTML background colours by default; the
     canvas charts keep theirs because they are images, so without this the
     chart lines print in colour but the legend that decodes them does not. */
  #nibs-rpt-overlay, #nibs-rpt-overlay *,
  #bpi-report-overlay, #bpi-report-overlay * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  /* The per-session matrix scrolls on screen; on paper let it show in full and
     allow the long metric labels to wrap so nothing is clipped. */
  .nibs-rpt-trans { overflow: visible !important; }
  .nibs-rpt-trans td:first-child { white-space: normal; word-break: break-word; }
}
