.patient-handouts-page{--handout-ink:var(--navy);--handout-accent:#477e79;--handout-pale:#f0f6f5;color:var(--handout-ink)}
.handouts-arabic-intro{margin:12px 0 0;text-align:left;color:var(--muted);font-size:16px}
.handouts-notice{padding:22px 24px;margin:26px 0;border:1px solid var(--line);border-inline-start:4px solid var(--teal);border-radius:var(--radius);background:var(--white)}
.handouts-notice strong{font-size:17px;font-weight:600}
.handouts-notice p{margin:8px 0;color:var(--muted);font-size:13px;line-height:1.7}
.handouts-notice details{margin-top:14px;padding-top:12px;border-top:1px solid var(--line)}
.patient-handouts-page summary{cursor:pointer;line-height:1.6}
.handouts-notice summary{font-size:13px;font-weight:600}
.handouts-toolbar{display:grid;grid-template-columns:minmax(220px,1fr) minmax(220px,.65fr) auto;gap:14px;align-items:end;margin-top:30px}
.handouts-toolbar label{display:grid;gap:7px;min-width:0}
.handouts-toolbar label>span{font-size:12px;font-weight:600;color:var(--muted)}
.handouts-toolbar input[type="search"],.handouts-toolbar select{width:100%;min-height:45px;margin:0;padding:10px 12px;border:1px solid var(--control-border);border-radius:6px;background:var(--white);color:var(--navy);font:inherit;font-size:14px}
.handouts-reset,.handouts-empty button{min-height:45px;padding:10px 14px;border:1px solid var(--control-border);border-radius:6px;background:transparent;color:var(--navy);font:inherit;font-size:13px;cursor:pointer}
.handouts-results-heading{display:flex;align-items:center;justify-content:space-between;gap:14px;flex-wrap:wrap;margin:17px 0 0}
.handouts-results-heading p{margin:0;font-size:13px;font-weight:600}
.handouts-results-heading>span{font-size:12px;color:var(--muted)}
.handouts-status{margin:8px 0 0;min-height:24px;font-size:13px;line-height:1.7;overflow-wrap:anywhere}
.handouts-category{margin:28px 0 42px}
.handouts-category-heading{display:flex;justify-content:space-between;align-items:center;gap:16px;margin-bottom:16px;padding-bottom:13px;border-bottom:1px solid var(--line)}
.handouts-category-heading h2{margin:0;font-size:20px;font-weight:600;letter-spacing:-.3px}
.handouts-category-heading p{margin:3px 0 0;text-align:left;color:var(--muted);font-size:13px}
.handouts-category-heading>span{font-size:12px;white-space:nowrap;color:var(--muted)}
.handouts-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;align-items:start}
.handout-card{min-width:0;border:1px solid var(--line);border-radius:var(--radius);background:var(--white);box-shadow:var(--shadow);overflow:hidden}
.handout-card-top{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center;gap:10px;padding:18px 20px 0}
.handout-draft{font-size:10px;font-weight:600;letter-spacing:.6px;text-transform:uppercase;color:var(--handout-accent)}
.handout-languages{display:inline-flex;border:1px solid var(--line);border-radius:5px;overflow:hidden}
.handout-languages button{min-height:34px;padding:6px 10px;border:0;background:transparent;color:var(--navy);font:inherit;font-size:12px;cursor:pointer}
.handout-languages button[aria-pressed="true"]{background:var(--navy);color:var(--white)}
.handout-intro{padding:16px 20px 8px}
.handout-intro h3{margin:0 0 10px;font-size:17px;font-weight:600;line-height:1.45;letter-spacing:0}
.handout-intro p{margin:0;color:var(--muted);font-size:14px;line-height:1.7}
.handout-details{margin:0 20px}
.handout-details>summary{padding:12px 0;font-size:13px;font-weight:600;color:var(--handout-accent)}
.handout-content{padding:0 0 18px;user-select:text}
.handout-inline-notice{padding:12px;border-radius:5px;background:var(--handout-pale);font-size:12px;line-height:1.7}
.handout-subsection{margin-top:20px}
.handout-subsection h4{margin:0 0 7px;font-size:13px;font-weight:700}
.handout-subsection p{margin:0;font-size:14px;line-height:1.8;color:var(--muted)}
.handout-warning{padding:14px;border-inline-start:3px solid var(--teal);background:var(--handout-pale)}
.handout-card-footer{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 20px;border-top:1px solid var(--line);background:#fafcfd}
.handout-card-footer>span{font-size:11px;line-height:1.5;color:var(--muted)}
.handout-copy{display:inline-flex;align-items:center;justify-content:center;gap:7px;flex-shrink:0;min-height:37px;padding:8px 12px;border:1px solid var(--navy);border-radius:5px;background:var(--navy);color:var(--white);font:inherit;font-size:12px;cursor:pointer}
.handout-copy:disabled{opacity:.6;cursor:wait}
.handout-copy:hover:not(:disabled){background:var(--handout-accent);border-color:var(--handout-accent)}
.patient-handouts-page button:focus-visible,.patient-handouts-page input:focus-visible,.patient-handouts-page select:focus-visible,.patient-handouts-page summary:focus-visible,.handout-content:focus-visible{outline:3px solid var(--handout-accent);outline-offset:3px}
.handout-languages button:hover:not([aria-pressed="true"]),.handouts-reset:hover{background:var(--handout-pale)}
.handouts-empty{margin:26px 0;padding:32px;border:1px dashed var(--control-border);border-radius:var(--radius);background:var(--white)}
.handouts-empty h2{font-size:20px;margin-top:0}
.handout-intro[lang="ar"],.handout-content[lang="ar"]{font-size:16px;line-height:1.9}
.handout-intro[lang="ar"] h3{font-size:19px}
.handout-intro[lang="ar"] p,.handout-content[lang="ar"] .handout-subsection p{font-size:15px}
@media(max-width:850px){.handouts-toolbar{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}.handouts-reset{grid-column:2;justify-self:end}.handouts-grid{grid-template-columns:minmax(0,1fr)}}
@media(max-width:480px){.handouts-toolbar{grid-template-columns:minmax(0,1fr)}.handouts-reset{grid-column:auto;justify-self:start}.handouts-notice{padding:18px}.handout-card-top{padding:16px 16px 0}.handout-intro{padding:14px 16px 8px}.handout-details{margin:0 16px}.handout-card-footer{padding:12px 16px}.handouts-category-heading h2{font-size:18px}}
@media print{.handouts-toolbar,.handouts-results-heading,.handouts-status,.handout-languages,.handout-card-footer{display:none!important}.handouts-grid{display:block}.handout-card{margin-bottom:18px;box-shadow:none;break-inside:avoid}.handout-details:not([open]){display:none}}

.handout-subsection p{white-space:pre-line}

.patient-handouts-page .workspace-heading h1,.handouts-category-heading h2,.handout-intro h3{font-weight:700}
.handout-note-heading{font-weight:700;color:var(--handout-ink)}
.handout-intro h3:focus-visible{outline:3px solid var(--handout-accent);outline-offset:3px}
.handout-intro h3{scroll-margin-top:24px}

.handouts-group-buttons{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-top:26px}
.handouts-group-buttons button{display:grid;gap:6px;padding:17px 20px;text-align:start;border:1px solid var(--control-border);border-radius:var(--radius);background:var(--white);color:var(--navy);font:inherit;cursor:pointer}
.handouts-group-buttons button strong{font-size:15px;font-weight:700}
.handouts-group-buttons button span{font-size:13px;text-align:start}
.handouts-group-buttons button small{font-size:11px;color:var(--muted)}
.handouts-group-buttons button:hover{border-color:var(--handout-accent);background:var(--handout-pale)}
.handouts-group-buttons button[aria-pressed="true"]{border-color:var(--navy);background:var(--navy);color:var(--white)}
.handouts-group-buttons button[aria-pressed="true"] small{color:inherit}
.handouts-specialty{margin:26px 0}
.handouts-specialty-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:14px;padding-inline-start:12px;border-inline-start:3px solid var(--handout-accent)}
.handouts-specialty-heading h3{margin:0;font-size:17px;font-weight:700;color:var(--navy)}
.handouts-specialty-heading h3 span{display:block;margin-top:4px;color:var(--muted);font-size:13px;font-weight:400}
.handouts-specialty-heading>span{color:var(--muted);font-size:12px;white-space:nowrap}
@media(max-width:650px){.handouts-group-buttons{grid-template-columns:minmax(0,1fr)}}
@media print{.handouts-group-buttons{display:none!important}}

.handout-card-footer{flex-wrap:wrap;justify-content:flex-end}
.handout-card-footer>span{flex:1 1 100%}
.handout-print{display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:37px;padding:8px 12px;border:1px solid var(--navy);border-radius:5px;background:var(--white);color:var(--navy);font:inherit;font-size:12px;cursor:pointer}
.handout-print:hover:not(:disabled){background:var(--handout-pale)}
.handout-print:disabled{opacity:.6;cursor:wait}
.handout-print-sheet{display:none}
@media print{
  body.handout-printing>:not(.handout-print-sheet){display:none!important}
  body.handout-printing .handout-print-sheet{display:block;color:#203258;font-size:12pt;line-height:1.6}
  .handout-print-brand{display:flex;align-items:center;gap:16px;padding-bottom:16px;margin-bottom:24px;border-bottom:2px solid #203258;break-inside:avoid}
  .handout-print-brand img{object-fit:contain}
  .handout-print-brand strong{display:block;font-size:22pt}
  .handout-print-brand span{display:block;font-size:10pt}
  .handout-print-sheet h1{font-size:20pt;line-height:1.4}
  .handout-print-sheet h2{font-size:13pt;break-after:avoid}
  .handout-print-sheet p{white-space:pre-line;orphans:3;widows:3;color:inherit;font-size:11pt}
  .handout-print-sheet .handout-subsection{margin-top:18px}
  .handout-print-sheet .handout-note-heading{color:inherit}
}
