*{box-sizing:border-box}body{margin:0;background:#f3f6f8;color:#1c2933;font:16px/1.5 system-ui,-apple-system,Segoe UI,Arial,sans-serif}.wrap{max-width:980px;margin:auto;padding:0 20px}.top{background:#123b52;color:white;padding:26px 0}.top .wrap{display:flex;gap:18px;align-items:center}.brand{font-weight:800;font-size:23px;border:2px solid #8bd1c7;border-radius:12px;padding:10px}.brand span{color:#8bd1c7}.top h1{font-size:25px;margin:0}.top p{margin:4px 0 0;color:#d4e4eb}.card,.notice{background:white;border:1px solid #dce5e9;border-radius:14px;padding:24px;margin:22px 0;box-shadow:0 4px 16px #16394b0a}.notice{background:#fff9e9;border-color:#f0dfae;font-size:14px}.grid{display:grid;grid-template-columns:1fr 1fr;gap:18px}label{display:block;font-weight:650}select,textarea{width:100%;margin-top:7px;padding:12px;border:1px solid #c8d4da;border-radius:9px;font:inherit;background:white}button{border:0;border-radius:9px;padding:11px 18px;font:inherit;font-weight:650;cursor:pointer}.primary{background:#087e79;color:white}.primary:disabled{opacity:.55;cursor:wait}.secondary{background:#e8eff2;color:#23404f}.muted{color:#63747e}.small{font-size:12px}.hidden{display:none}.chathead{display:flex;justify-content:space-between;align-items:center;gap:15px}.chathead h2{margin:0}.messages{height:420px;overflow:auto;background:#f7fafb;border:1px solid #e1e9ed;border-radius:10px;padding:16px;margin:16px 0}.msg{max-width:85%;padding:12px 15px;border-radius:12px;margin:10px 0;white-space:pre-wrap}.patient{background:#e5eff4;margin-right:auto}.staff{background:#dff3ed;margin-left:auto}.label{font-size:11px;font-weight:700;color:#60737d;margin-bottom:4px}.composer{display:flex;gap:10px;align-items:flex-end}.composer textarea{resize:vertical;min-height:54px}.composer button{min-height:52px}.report-section{border-top:1px solid #e3eaed;padding:15px 0}.score{font-size:30px;font-weight:800;color:#087e79}.criterion{padding:10px 0;border-bottom:1px solid #edf1f3}.criterion strong{display:block}blockquote{margin:8px 0;padding:8px 12px;border-left:3px solid #8bbdb8;background:#f6faf9;color:#40535d}ul{padding-left:22px}footer{text-align:center;color:#71818a;font-size:12px;padding:20px}@media(max-width:650px){.grid{grid-template-columns:1fr}.top .wrap{align-items:flex-start}.top h1{font-size:20px}.chathead{align-items:flex-start;flex-direction:column}.messages{height:52vh}.composer{flex-direction:column;align-items:stretch}.composer button{width:100%}}
.sources{margin:10px 0;padding:10px 12px;background:#f4f8fa;border:1px solid #dce7eb;border-radius:9px}.sources summary{cursor:pointer;font-weight:700;color:#12645f}.basis-tag{font-size:12px;color:#536973;margin:8px 0}.source-item{border-top:1px solid #dfe8eb;padding:8px 0}.source-item p{margin:4px 0;font-size:13px;color:#50616a}.recommendation{padding:9px 12px;background:#eef7f4;border-left:3px solid #087e79;border-radius:4px}

/* v0.12 – raport i transkrypcja do PDF */
.report-actions { display:flex; gap:8px; flex-wrap:wrap; justify-content:flex-end; }
.report-meta { color:#52616b; font-size:.92rem; border-bottom:1px solid #e4eaed; padding-bottom:12px; }
.transcript-line { white-space:pre-wrap; line-height:1.55; padding:8px 10px; margin:6px 0; background:#f6f9fa; border-left:3px solid #9bb9c2; border-radius:4px; }
@media print {
  @page { size:A4; margin:16mm 14mm; }
  body { background:#fff !important; color:#111 !important; font-size:10pt; }
  .top, .notice, #setup, #training, #again, #pdf, footer, .chathead button { display:none !important; }
  main.wrap { width:100% !important; max-width:none !important; margin:0 !important; padding:0 !important; }
  #report { display:block !important; border:0 !important; box-shadow:none !important; padding:0 !important; margin:0 !important; }
  #reportBody { display:block !important; }
  .card { box-shadow:none !important; border:0 !important; }
  .criterion, .report-section, .sources, .transcript-print { break-inside:avoid; }
  .transcript-print { break-before:page; }
  .transcript-line { background:#fff !important; border-left:2px solid #999; }
  details.sources:not([open]) > *:not(summary) { display:block !important; }
  details.sources summary { display:none; }
}

/* v0.13 – wyraźniejszy, ale nienachalny przycisk zakończenia ćwiczenia */
.finish-button {
  background:#087e79;
  color:#fff;
  border:1px solid #066c68;
  box-shadow:0 2px 7px rgba(8,126,121,.18);
  padding:12px 20px;
  min-height:46px;
  white-space:nowrap;
}
.finish-button:hover { background:#066c68; }
.finish-button:focus-visible { outline:3px solid #9bd8d1; outline-offset:2px; }
.finish-button:disabled { opacity:.65; cursor:wait; }
@media(max-width:650px){ .finish-button { width:100%; } }

/* v0.17 – tymczasowa historia zmian widoczna wyłącznie w prototypie testowym */
.version-log { margin: 14px 0; padding: 14px 18px; }
.version-log summary { cursor:pointer; font-weight:700; color:#155b66; }
.version-log .muted { margin:8px 0 12px; }
.version-entry { border-top:1px solid #e3eaed; padding:10px 0 4px; }
.version-entry p { margin:5px 0 8px; }
.version-entry ul { margin:7px 0 5px; padding-left:22px; }
.version-entry li { margin:4px 0; }

/* v0.22 – informacja dla testerów i zgłaszanie raportów */
.pilot-info { padding:18px 22px; }
.pilot-info h2 { margin:0 0 8px; font-size:19px; }
.pilot-info p { margin:7px 0; }
.submit-report { background:#155b66; color:#fff; }
.submit-report:hover { background:#104852; }
.submit-report:disabled { opacity:.6; cursor:wait; }
.submit-dialog { width:min(620px,calc(100% - 28px)); max-height:90vh; overflow:auto; border:0; border-radius:14px; padding:24px; box-shadow:0 18px 60px #102b3b55; }
.submit-dialog::backdrop { background:#102b3b88; }
.submit-dialog h2 { margin-top:0; font-size:21px; }
.submit-dialog label { display:block; margin:14px 0; }
.submit-dialog textarea { resize:vertical; }
.consent-row { display:flex !important; gap:10px; align-items:flex-start; font-weight:500; }
.consent-row input { margin-top:5px; flex:0 0 auto; }
.dialog-actions { display:flex; justify-content:flex-end; gap:10px; margin-top:18px; }
.submit-status { min-height:24px; font-weight:650; color:#155b66; }
.honeypot { position:absolute !important; left:-10000px !important; width:1px !important; height:1px !important; overflow:hidden !important; }
footer a { color:#155b66; font-weight:650; }
@media(max-width:650px){.report-actions>*{width:100%}.submit-dialog{padding:18px}.dialog-actions{flex-direction:column-reverse}.dialog-actions button{width:100%}}
