/* Patient Handout Toolkit (app.psychnpfellowship.com/handouts.html). Brand: cream #FAF8EE, rounds #602D36, psych #E8451F, lime #E1E782, lavender #EFEEFF. */
@font-face{font-family:'EC';font-weight:800;font-display:swap;src:url(handouts/fonts/EightiesComeback-ExtraBold.otf) format('opentype')}
:root{--cream:#FAF8EE;--rounds:#602D36;--psych:#E8451F;--psych-d:#CE3D1C;--lime:#E1E782;--lav:#EFEEFF;--pink:#FFE4F4;--ink:#2B2B2B;--muted:#8B7B7E;--line:#E3DCC8}
*{box-sizing:border-box}
html,body{margin:0;background:var(--cream);color:var(--ink);font-family:Poppins,system-ui,sans-serif;font-size:15px;line-height:1.5}
h1,h2,h3{font-family:'EC',Georgia,serif;font-weight:800;color:var(--rounds);margin:0;letter-spacing:-.01em}
button,input,textarea,select{font:inherit}
a{color:var(--rounds)}
.hidden,[hidden]{display:none!important}
.top{display:flex;align-items:center;gap:16px;padding:12px 20px;background:#fff;border-bottom:1px solid var(--line);position:sticky;top:0;z-index:20}
.top .logo img{height:28px;display:block}
.top .title{font-family:'EC',serif;font-weight:800;color:var(--rounds);font-size:19px}
.top .sp{flex:1}
.top .who{font-size:13px;color:var(--muted)}
.btn{display:inline-flex;align-items:center;gap:8px;border:0;border-radius:999px;padding:10px 18px;font-weight:700;cursor:pointer;text-decoration:none;line-height:1.2;transition:transform .08s}
.btn:active{transform:scale(.98)}
.btn-orange{background:var(--psych);color:#fff}
.btn-orange:hover{background:var(--psych-d)}
.btn-burg{background:var(--rounds);color:#fff}
.btn-ghost{background:#fff;color:var(--rounds);border:1.5px solid rgba(96,45,54,.25)}
.btn-link{background:none;color:var(--rounds);padding:6px 8px;text-decoration:underline;font-weight:600}
.btn[disabled]{opacity:.55;cursor:default}
.btn-sm{padding:7px 13px;font-size:13px}
/* cards (sign in / no access) */
.gate{max-width:460px;margin:60px auto;background:#fff;border:1px solid var(--line);border-radius:22px;padding:34px 32px;box-shadow:0 14px 40px rgba(96,45,54,.08)}
.gate h1{font-size:28px;margin-bottom:8px}
.gate p{margin:0 0 14px;color:var(--ink)}
.gate label{display:block;font-weight:600;font-size:13px;margin:10px 0 5px}
.gate input{width:100%;padding:12px 14px;border:1.5px solid rgba(96,45,54,.25);border-radius:12px;background:#fff}
.gate .msg{min-height:1.3em;font-size:13.5px;color:var(--psych-d);margin-top:10px}
.kicker{font-size:11px;letter-spacing:.14em;text-transform:uppercase;font-weight:700;color:var(--psych-d);margin-bottom:6px}
/* layout */
.app{display:grid;grid-template-columns:290px 1fr;min-height:calc(100vh - 54px)}
.side{background:#fff;border-right:1px solid var(--line);padding:16px 14px;overflow:auto;max-height:calc(100vh - 54px);position:sticky;top:54px}
.side .search{width:100%;padding:10px 12px;border:1.5px solid rgba(96,45,54,.2);border-radius:12px;margin-bottom:12px}
.side h3{font-size:11px;letter-spacing:.13em;text-transform:uppercase;color:var(--psych-d);font-family:Poppins;font-weight:700;margin:14px 6px 6px}
.hlist{list-style:none;margin:0;padding:0}
.hlist button{width:100%;text-align:left;background:none;border:0;padding:9px 10px;border-radius:12px;cursor:pointer;color:var(--ink);display:flex;align-items:center;gap:10px}
.hlist button:hover{background:var(--cream)}
.hlist button.on{background:var(--lav);color:var(--rounds);font-weight:600}
.hlist img{width:34px;height:34px;border-radius:9px;object-fit:cover;background:#F7F4E5;flex:none}
.hlist .nm{flex:1;line-height:1.25;font-size:14px}
.hlist .ed{font-size:10px;font-weight:700;letter-spacing:.08em;color:var(--psych-d);background:var(--pink);border-radius:999px;padding:2px 7px}
.main{padding:18px 22px 60px;min-width:0}
.bar{display:flex;flex-wrap:wrap;align-items:center;gap:10px;margin-bottom:14px}
.bar h2{font-size:22px;flex:1;min-width:200px}
.practice-chip{display:inline-flex;align-items:center;gap:8px;background:#fff;border:1.5px solid var(--line);border-radius:999px;padding:6px 12px 6px 6px;font-size:13px;font-weight:600;color:var(--rounds);cursor:pointer}
.practice-chip img{width:26px;height:26px;border-radius:50%;object-fit:cover;background:var(--cream)}
.practice-chip.warn{border-color:var(--psych);background:#FFF3EF}
.work{display:grid;grid-template-columns:minmax(0,1fr) 380px;gap:18px;align-items:start}
.work.noedit{grid-template-columns:minmax(0,1fr)}
.paperwrap{background:#E9E4D6;border-radius:18px;padding:18px;overflow:hidden}
.paper{width:816px;height:1056px;transform-origin:0 0;background:#fff;box-shadow:0 10px 30px rgba(96,45,54,.18);margin:0 auto}
.paper .page{width:816px;min-height:1056px}
.editor{background:#fff;border:1px solid var(--line);border-radius:18px;padding:16px;position:sticky;top:70px}
.editor h3{font-size:16px;margin-bottom:4px}
.editor .hint{font-size:12.5px;color:var(--muted);margin:0 0 10px}
.editor label{display:block;font-size:12px;font-weight:700;margin:12px 0 4px;color:var(--rounds)}
.editor input,.editor textarea{width:100%;border:1.5px solid rgba(96,45,54,.2);border-radius:10px;padding:9px 11px;background:#fff;font-size:13.5px;line-height:1.45}
.editor textarea{min-height:300px;resize:vertical;font-family:Poppins,sans-serif}
.editor .row{display:flex;gap:8px;flex-wrap:wrap;margin-top:12px;align-items:center}
.editor .save{font-size:12px;color:var(--muted)}
.editor .orig{background:var(--lav);border-radius:10px;padding:9px 11px;font-size:12.5px;color:var(--rounds);margin-top:10px}
/* practice modal */
.modal{position:fixed;inset:0;background:rgba(43,43,43,.5);display:flex;align-items:center;justify-content:center;padding:20px;z-index:50}
.dialog{background:#fff;border-radius:22px;max-width:560px;width:100%;padding:28px 28px 22px;position:relative;max-height:92vh;overflow:auto}
.dialog h2{font-size:24px;margin-bottom:4px}
.dialog .sub{color:var(--muted);font-size:13.5px;margin:0 0 12px}
.dialog label{display:block;font-size:12px;font-weight:700;margin:10px 0 4px;color:var(--rounds)}
.dialog input{width:100%;border:1.5px solid rgba(96,45,54,.2);border-radius:10px;padding:9px 11px}
.dialog .two{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.dialog .x{position:absolute;right:14px;top:10px;background:none;border:0;font-size:28px;line-height:1;cursor:pointer;color:var(--muted)}
.logo-row{display:flex;align-items:center;gap:12px;margin-top:6px}
.logo-row img{width:64px;height:64px;border-radius:12px;object-fit:contain;background:var(--cream);border:1px solid var(--line)}
.logo-row .ph{width:64px;height:64px;border-radius:12px;background:var(--cream);border:1px dashed rgba(96,45,54,.3);display:grid;place-items:center;font-size:11px;color:var(--muted)}
.dialog .foot{display:flex;gap:10px;align-items:center;margin-top:18px;flex-wrap:wrap}
.toast{position:fixed;left:50%;bottom:24px;transform:translateX(-50%);background:var(--rounds);color:#fff;padding:10px 16px;border-radius:999px;font-size:13.5px;z-index:60;box-shadow:0 10px 30px rgba(0,0,0,.2)}
.fitbox{position:absolute;left:-20000px;top:0;width:816px}
.loading{padding:80px;text-align:center;color:var(--muted)}
@media (max-width:1100px){.work{grid-template-columns:1fr}.editor{position:static}}
@media (max-width:820px){.app{grid-template-columns:1fr}.side{position:static;max-height:none;border-right:0;border-bottom:1px solid var(--line)}.top .title{font-size:16px}.main{padding:14px}}
/* ---- the handout page (same CSS as handouts/build_handouts.py, with --fs and --h1 set per handout) ---- */
.page{font-family:Poppins,sans-serif;color:#602D36;font-size:var(--fs,10.4pt);line-height:1.5;background:#fff;display:flex;flex-direction:column;position:relative;-webkit-print-color-adjust:exact;print-color-adjust:exact}
.page *{box-sizing:border-box;margin:0;padding:0}
.page .hd{background:#FAF8EE;padding:.42in .55in .3in;display:grid;grid-template-columns:1fr 2.35in;gap:.3in;align-items:center;border-bottom:3px solid #E8451F}
.page .brand{display:flex;align-items:center;gap:8px;font-size:9pt;font-weight:600;letter-spacing:.02em;min-height:24px}
.page .brand img{height:26px;max-width:1.6in;object-fit:contain;display:block}
.page .brand .sep{color:#E8451F}
.page .kick{margin-top:.2in;font-size:8.5pt;font-weight:700;letter-spacing:.14em;text-transform:uppercase;color:#CE3D1C}
.page h1{margin-top:4px;font:800 var(--h1,34pt)/1.02 'EC',serif;letter-spacing:-.005em;color:#602D36}
.page .sub{margin-top:6px;font-size:11pt;font-weight:600;color:#8A4A55}
.page .pills{display:flex;flex-wrap:wrap;gap:6px;margin-top:.16in}
.page .pill{display:inline-flex;align-items:center;gap:6px;font-size:8.6pt;font-weight:600;background:#fff;border:1px solid rgba(96,45,54,.16);border-radius:999px;padding:4px 11px}
.page .pill i{display:inline-block;width:7px;height:7px;border-radius:50%;background:#E8451F}
.page .pill.lime i{background:#B9C23A}
.page .art{width:2.35in;height:2.35in;border-radius:22px;overflow:hidden;background:#F7F4E5;position:relative}
.page .art img{position:absolute;left:50%;top:50%;width:112%;height:112%;transform:translate(-50%,-50%);object-fit:cover}
.page .cols{flex:1;display:grid;grid-template-columns:1fr 2.35in;gap:.3in;padding:.28in .55in 0;min-height:0}
.page .main{padding:0;min-width:0}
.page .main p{margin:0 0 .11in}
.page .main .lede{font-size:calc(var(--fs,10.4pt) + 1.6pt);line-height:1.45;font-weight:500;margin-bottom:.14in}
.page .main h3{font-size:calc(var(--fs,10.4pt) + .6pt);font-weight:700;margin:.12in 0 .07in;color:#602D36;font-family:Poppins}
.page .lead{font-weight:700;color:#602D36}
.page .steps{list-style:none;margin:0 0 .12in;display:flex;flex-direction:column;gap:6px}
.page .steps li{display:grid;grid-template-columns:24px 1fr;gap:9px;align-items:start}
.page .steps .n{width:22px;height:22px;border-radius:50%;background:#E8451F;color:#FAF8EE;font-size:9pt;font-weight:700;display:grid;place-items:center;margin-top:1px}
.page .steps .d{width:8px;height:8px;border-radius:50%;background:#E8451F;margin:7px 0 0 7px}
.page .safety{display:grid;grid-template-columns:24px 1fr;gap:9px;background:#FFE4F4;border:1px solid #F6B7DA;border-radius:12px;padding:9px 12px;margin:.06in 0 .12in}
.page .safety p{margin:0}
.page .safety .si{width:22px;height:22px;border-radius:50%;background:#602D36;color:#FFCEEC;font-weight:700;font-size:10pt;display:grid;place-items:center}
.page .side{display:flex;flex-direction:column;gap:.16in;background:none;border:0;padding:0;position:static;max-height:none;overflow:visible}
.page .card{border-radius:16px;padding:14px 15px}
.page .card h2{font-size:8.5pt;font-weight:700;letter-spacing:.13em;text-transform:uppercase;margin-bottom:8px;font-family:Poppins;color:#602D36}
.page .when{background:#F0F2C3}
.page .when ul{list-style:none;display:flex;flex-direction:column;gap:7px}
.page .when li{display:grid;grid-template-columns:14px 1fr;gap:6px;font-size:calc(var(--fs,10.4pt) - .5pt);line-height:1.4}
.page .when li:before{content:"";width:9px;height:9px;border-radius:3px;background:#602D36;margin-top:5px}
.page .notes{background:#fff;border:1.5px dashed rgba(96,45,54,.28);flex:1;display:flex;flex-direction:column;min-height:1.6in}
.page .notes .ln{flex:1;border-bottom:1px solid rgba(96,45,54,.16);min-height:.3in}
.page .notes .ln:last-child{border-bottom:0}
.page .ft{margin-top:.22in;padding:.16in .55in .34in;border-top:1px solid rgba(96,45,54,.15);display:grid;grid-template-columns:auto 1fr;gap:6px 18px;font-size:7.4pt;line-height:1.45;color:#7A5A5F}
.page .ft b{color:#602D36;font-weight:700}
.page .ft .who{white-space:nowrap}
.page .ft .src{grid-column:1 / -1;font-size:6.7pt;color:#8C7478}
.page.compact .hd{padding:.3in .55in .22in;grid-template-columns:1fr 1.85in}
.page.compact .art{width:1.85in;height:1.85in}
.page.compact .kick{margin-top:.13in}
.page.compact .cols{grid-template-columns:1fr 2.05in;padding-top:.22in}
.page.compact .notes{min-height:1.1in}
@media print{body>*{display:none!important}body{background:#fff}.printonly{display:block!important}@page{size:letter;margin:0}}
