:root{font-family:Inter,ui-sans-serif,system-ui,-apple-system,Segoe UI,Arial,sans-serif;color:#182338;background:#f3f6fa}*{box-sizing:border-box}body{margin:0}header{background:#10243e;color:white}.wrap{max-width:1120px;margin:auto;padding:0 24px}.top{display:flex;justify-content:space-between;align-items:center;gap:20px;min-height:70px}.brand{font-size:14px;font-weight:850;letter-spacing:.09em}.brand span{font-weight:400;color:#9bc4e9}.small{font-size:12px;color:#b6c9dd}.hero{padding:54px 0 30px}.eyebrow{font-size:12px;font-weight:800;letter-spacing:.16em;color:#276ba5}h1{font-size:clamp(30px,5vw,48px);letter-spacing:-.04em;max-width:790px;margin:10px 0}h2{font-size:23px;margin:0 0 12px;letter-spacing:-.02em}h3{font-size:17px;margin:22px 0 8px}.hero>p{font-size:17px;line-height:1.6;max-width:850px;color:#4b5d70}.notice{border-left:4px solid #2475ac;background:#eaf3fa;padding:15px 18px;border-radius:4px;line-height:1.5}.panel{background:#fff;border:1px solid #dce5ee;border-radius:14px;padding:28px;margin:20px 0;box-shadow:0 5px 25px #0d2b4910}.hidden{display:none}.muted{color:#617185;line-height:1.5;font-size:14px}.fields{display:grid;grid-template-columns:2fr 1fr 1fr;gap:12px}.practice-block{border-top:1px solid #e2e8f0;margin-top:18px;padding-top:16px}.practice-block h3{margin:0 0 10px}.optional{font-weight:400;color:#6a788a;font-size:13px}label{display:block;font-size:13px;font-weight:700;margin:15px 0 6px}input,select,textarea{width:100%;font:inherit;border:1px solid #bdcbd8;border-radius:7px;padding:11px;background:white;color:#172b45}textarea{resize:vertical;line-height:1.5}input:focus,select:focus,textarea:focus{outline:2px solid #7bb9e7;outline-offset:1px}.actions{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin-top:18px}button{border:1px solid #a7bed1;background:#fff;border-radius:8px;padding:11px 16px;font:inherit;font-weight:700;color:#174466;cursor:pointer}.primary{background:#145c91;color:white;border-color:#145c91}.quiet{border:none;color:#66768a}.heading{display:flex;align-items:start;justify-content:space-between;gap:20px;flex-wrap:wrap}.chip{background:#e5f2fb;color:#165b88;padding:7px 10px;border-radius:30px;font-size:12px;font-weight:800}.controls{display:grid;grid-template-columns:1fr 1fr;gap:18px}.prompt{padding:18px;background:#edf4fa;border:1px solid #c8ddec;border-radius:9px;font-weight:750;margin:15px 0}.links{font-size:13px}.links a{color:#145c91}.report-card{border-top:1px solid #dfe7ef;padding:14px 0}.report-card p{white-space:pre-wrap;overflow-wrap:anywhere}.report-card a{overflow-wrap:anywhere}.tag{font-size:12px;font-weight:750;color:#36506b;background:#e8eef4;padding:3px 7px;border-radius:4px}.report-table{border-collapse:collapse;width:100%;font-size:13px}.report-table th,.report-table td{border:1px solid #dce4ec;text-align:left;vertical-align:top;padding:9px}.report-table th{background:#f0f5fa}footer{padding:35px 24px;color:#6d7d90;font-size:12px}@media(max-width:650px){.fields,.controls{grid-template-columns:1fr}.top{display:block;padding-top:18px;padding-bottom:16px}.small{margin-top:5px}.panel{padding:19px}.wrap{padding-left:16px;padding-right:16px}}@media print{header,.hero,.panel:not(#report),footer,.actions,button{display:none!important}body{background:#fff}.wrap{max-width:none;padding:0}#report{display:block!important;border:none;box-shadow:none;padding:0;margin:0}#report h2{font-size:20px}.report-card{break-inside:avoid}a{color:#172b45}}
.table-scroll{overflow-x:auto}.report-table{min-width:750px}.report-table td{min-width:155px;overflow-wrap:anywhere}.report-table td div{margin-top:7px;line-height:1.4;color:#526377}.report-cover{border-bottom:2px solid #d9e4ef;padding-bottom:15px}.report-card h4{margin:15px 0 6px}.report-card p{font-size:13px;line-height:1.5}.report-card small{color:#526377}.report-card a{overflow-wrap:anywhere}@media print{header,.hero,#setup,footer,.actions,#status{display:none!important}#results{display:block!important;border:none;box-shadow:none;margin:0;padding:0}.wrap{max-width:none;padding:0}.table-scroll{overflow:visible}.report-table{min-width:0;font-size:10px}.report-table th,.report-table td{padding:5px;overflow-wrap:anywhere}.report-table td{min-width:0}.report-cover{break-after:avoid}.report-card{break-inside:auto}a{color:#111;text-decoration:none}}
/* v0.6 two-screen report presentation */
.report-toolbar{display:flex;justify-content:space-between;align-items:center;gap:20px;padding:35px 0 15px;flex-wrap:wrap}.report-toolbar h1{margin:6px 0}.before-appendix{justify-content:flex-end;margin:24px 0}.report-section{margin:22px 0}.finding{border-left:3px solid #a8c6dc;padding:12px 16px;background:#f5f9fc;margin:12px 0}.finding strong{display:block;margin-bottom:6px}.finding p{margin:4px 0;line-height:1.55}.report-list{padding-left:20px;line-height:1.6}.report-list li{margin-bottom:10px}.evidence{font-size:12px;color:#526377;overflow-wrap:anywhere}.appendix a{overflow-wrap:anywhere}.pdf-button:disabled{opacity:.45;cursor:not-allowed}.pill{font-size:12px;padding:3px 8px;border-radius:30px;background:#eaf3fa;color:#165b88}.report-table{min-width:780px}.report-table td{min-width:150px}.report-note{font-size:13px;color:#596a7d;line-height:1.55}.back-action{margin-bottom:25px}
@media print{header,footer,#setup-screen,.report-toolbar .pdf-button,.before-appendix,.back-action,#status{display:none!important}#report-screen{display:block!important}.wrap{max-width:none;padding:0}body{background:#fff}h1{font-size:28px}.panel{border:none;box-shadow:none;margin:12px 0;padding:0}.report-section{break-before:page}.report-table{min-width:0;font-size:9px}.report-table th,.report-table td{min-width:0;padding:5px}.table-scroll{overflow:visible}.appendix{break-before:page}.report-card,.finding{break-inside:avoid}a{color:#111}}
@media print{#report-screen .panel{display:block!important}#report-screen .appendix{display:block!important}}

/* Fix 15: print-only report pagination and readability */
@media print {
  @page { size: letter; margin: 0.58in 0.55in 0.62in; }
  html, body { background: white !important; color: #182338; font-size: 10pt; }
  header, footer, #setup-screen, #processing-warning, #status,
  .pdf-button, .before-appendix, .back-action { display: none !important; }
  #report-screen, #report-content, #appendix-content { display: block !important; }
  #report-screen .panel, #report-screen .appendix { display: block !important; }
  .report-toolbar { padding: 0 0 9px; margin: 0 0 10px; }
  .report-toolbar h1 { font-size: 24pt; margin: 2px 0 5px; line-height: 1.12; }
  .report-toolbar .eyebrow { font-size: 8pt; }
  #report-screen > .notice { padding: 8px 11px; font-size: 9pt; margin: 0 0 13px; }
  .report-section { break-before: auto !important; page-break-before: auto !important; margin: 12px 0 18px; }
  #part2 { break-before: page !important; page-break-before: always !important; }
  #report-screen .panel { padding: 0 !important; margin: 0 0 15px !important; border: 0 !important; box-shadow: none !important; }
  .appendix { break-before: page !important; page-break-before: always !important; }
  .report-section h2, .appendix h2 { font-size: 16pt; margin: 0 0 8px; break-after: avoid; }
  .report-section h3, .appendix h3 { font-size: 11pt; margin: 13px 0 5px; break-after: avoid; }
  .report-note { font-size: 8.5pt; line-height: 1.35; margin: 0 0 10px; }
  .table-scroll { overflow: visible !important; }
  .report-table { width: 100% !important; min-width: 0 !important; table-layout: fixed; font-size: 8pt; }
  .report-table thead { display: table-header-group; }
  .report-table tr { break-inside: avoid; page-break-inside: avoid; }
  .report-table th, .report-table td { min-width: 0 !important; padding: 5px 6px; overflow-wrap: anywhere; word-break: normal; line-height: 1.25; }
  .report-table th:first-child { width: 19%; }
  .report-table td div { margin-top: 4px; line-height: 1.25; }
  .finding { break-inside: avoid; page-break-inside: avoid; padding: 7px 10px; margin: 7px 0; }
  .finding p { margin: 3px 0; font-size: 8.5pt; line-height: 1.35; }
  .finding strong { margin: 0 0 3px; }
  .report-list { line-height: 1.4; }
  .report-list li { margin: 0 0 9px; break-inside: avoid; page-break-inside: avoid; }
  .evidence, .appendix a { overflow-wrap: anywhere; font-size: 7.5pt; }
  a { text-decoration: none; color: #213b52 !important; }
}

/* Fix 16: print pagination only. Preserve screen styles and report content. */
@media print {
  /* Allow natural document flow instead of creating sparsely filled pages. */
  #part2, .appendix {
    break-before: auto !important;
    page-break-before: auto !important;
  }
  /* A scroll container can interfere with repeated table headings in print. */
  .table-scroll { display: contents !important; overflow: visible !important; }
  .report-table { display: table !important; border-collapse: collapse !important; }
  .report-table thead { display: table-header-group !important; }
  .report-table tbody { display: table-row-group !important; }
  .report-table tr { break-inside: avoid !important; page-break-inside: avoid !important; }
  /* Avoid orphaned headings and interrupted creative-direction statements. */
  .report-section h2, .report-section h3, .appendix h2, .appendix h3 {
    break-after: avoid-page !important;
    page-break-after: avoid !important;
  }
  #part2 > p, #part2 > h3 + p, .report-section > p,
  .appendix > p {
    break-inside: avoid !important;
    page-break-inside: avoid !important;
    orphans: 3;
    widows: 3;
  }
  /* Keep short recommendations intact without forcing the entire list to a new page. */
  .report-list { break-inside: auto !important; }
  .report-list li { break-inside: avoid !important; page-break-inside: avoid !important; }
}

/* Fix 17: compact linked evidence in print comparisons; no research changes. */
.source-print { display:none; }
@media print {
  .report-table .source-full { display:none !important; }
  .report-table .source-print { display:inline !important; }
  .report-table .table-source { white-space:nowrap; font-size:7.5pt; font-weight:600; }
  .report-table td div.evidence { margin-top:3px; }
  .report-table { font-size:8.2pt; }
  .report-table th,.report-table td { padding:6px 5px; line-height:1.25; }
  .report-table thead { display:table-header-group !important; }
  .report-table tr { break-inside:avoid; page-break-inside:avoid; }
  .report-section h3 { break-after:avoid; page-break-after:avoid; }
  .appendix { break-before:auto !important; page-break-before:auto !important; }
  #part2 > h3:last-of-type { break-after:avoid; }
}

/* Fix 18: print-only pagination adjustments for four-practice reports. */
.report-table caption { caption-side:top; text-align:left; font-size:17px; font-weight:750; padding:12px 0 8px; }
@media print {
  /* Table captions are part of the table, not orphanable standalone headings. */
  .report-table caption { font-size:11pt; padding:9px 0 6px; break-after:avoid; }
  .report-table { border-collapse:separate !important; border-spacing:0 !important; }
  .report-table thead { display:table-header-group !important; }
  .report-table tbody { display:table-row-group !important; }
  .report-table tr { break-inside:avoid !important; page-break-inside:avoid !important; }
  /* Reduce the chance that only one short practice entry spills to a final page. */
  .appendix { margin-top:8px !important; }
  .appendix .report-note { margin-bottom:5px; }
  .appendix-practice { break-inside:avoid; page-break-inside:avoid; margin:0 0 7px; }
  .appendix-practice h3 { margin:7px 0 3px !important; }
  .appendix-practice .report-list { margin:3px 0 5px; line-height:1.22; }
  .appendix-practice .report-list li { margin:0 0 3px !important; }
  .appendix-practice a { font-size:7.2pt; }
}

@media print{.report-table tr{break-inside:avoid}.report-table thead{display:table-header-group}.finding{break-inside:avoid-page}.appendix{break-before:auto}.report-section{break-before:auto}#part2{break-before:page}a{overflow-wrap:anywhere}}
