.document-workspace-tabs{display:flex;gap:24px;border-bottom:1px solid var(--line);margin:6px 0 25px}.document-workspace-tabs button{background:none;border-bottom:2px solid transparent;padding:13px 0;min-height:44px;font-size:12px;color:var(--muted)}.document-workspace-tabs button[aria-current=page]{color:var(--primary);border-color:var(--primary);font-weight:600}.model-intro h3{font-size:19px}.model-intro p{font-size:12px;color:var(--muted);margin-top:7px}.model-categories{display:flex;gap:8px;flex-wrap:wrap;margin:22px 0}.model-categories button{min-height:40px;background:var(--surface);border:1px solid var(--line);border-radius:20px;padding:8px 15px;color:var(--muted);font-size:11px}.model-categories button[aria-pressed=true]{background:#eee4d7;border-color:#cbb49a;color:#713c20}.patient-model-grid{display:grid;grid-template-columns:1fr 1fr;gap:17px}.patient-model{padding:23px;background:var(--surface);border:1px solid var(--line);border-radius:14px;display:flex;flex-direction:column;align-items:flex-start;min-width:0}.model-tag{display:block;font-size:9px;letter-spacing:.8px;text-transform:uppercase;color:#80674e}.patient-model h4{font-size:20px;font-weight:550;letter-spacing:-.4px;margin:15px 0 9px}.patient-model p{color:var(--muted);font-size:12px;line-height:1.75;flex:1;margin-bottom:18px}.patient-model small{font-size:10px;color:var(--muted)}.patient-model .actions{margin-top:18px;align-items:center;gap:12px}.patient-model .actions button{min-height:42px}.model-help{font-size:11px;color:var(--muted);line-height:1.8;margin:15px 0}.request-heading{margin:35px 0 15px}.request-row{display:flex;align-items:center;gap:18px;background:var(--surface);border:1px solid var(--line);padding:18px 22px;border-radius:10px;margin:10px 0}.request-row>div{flex:1;min-width:0}.request-row strong{display:block;font-size:13px;font-weight:550}.request-row small{display:block;font-size:10px;color:var(--muted);margin-top:5px}.portal-settings-banner{background:#ececd9;border-radius:16px;padding:26px;display:flex;align-items:center;justify-content:space-between;gap:20px}.portal-settings-banner h3{font-size:25px;margin:12px 0 8px;letter-spacing:-.6px}.portal-settings-banner p{font-size:12px;color:#65664e}.portal-access-panel{padding:26px 0;display:flex;align-items:center;justify-content:space-between;gap:25px;border-bottom:1px solid var(--line);margin-bottom:25px}.portal-access-panel>div:first-child{max-width:580px}.portal-access-panel h4,.publication-panel h4{font-size:18px;font-weight:550;margin:0 0 12px}.portal-access-panel p{font-size:12px;line-height:1.9}.portal-access-panel>.actions{max-width:240px}.portal-publication-grid{display:grid;grid-template-columns:1fr 1fr;gap:20px}.publication-panel{padding:25px;border:1px solid var(--line);border-radius:14px;background:var(--surface);min-width:0}.publication-panel>p{font-size:12px;color:var(--muted)}.publication-panel>label{margin:20px 0 12px}.publication-panel>.actions,.publication-panel>button{margin-top:16px}.shared-list{margin-top:20px}.shared-list>div{display:flex;justify-content:space-between;align-items:center;gap:12px;border-top:1px solid var(--line);font-size:12px;padding:10px 0}.shared-list span{overflow-wrap:anywhere}.source-status-panel{display:flex;justify-content:space-between;align-items:center;gap:20px;padding:20px 23px;margin-bottom:24px;background:#efe9dd;border-radius:12px}.source-status-panel p{font-size:12px;color:var(--muted);margin-top:5px}.source-status-panel .actions{flex-shrink:0}.food-filters.multi-source{grid-template-columns:1.2fr 1fr .8fr}.source-status-panel a{font-size:11px}.food-source-message{font-size:11px;color:var(--muted);margin:15px 0}.custom-food-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:13px}.food-entry-dialog{width:min(750px,calc(100% - 32px))}.food-entry-dialog .checkbox-label{display:flex;gap:10px;align-items:flex-start}.food-entry-dialog .checkbox-label input{width:18px;min-height:18px;margin-top:3px;flex-shrink:0}
body[data-view=patient]>.portal-sidebar,body[data-view=patient] .portal-topbar,body[data-view=patient] .portal-main>.local-note,body[data-view=patient] .portal-footer{display:none}body[data-view=patient] .portal-content{margin-left:0}body[data-view=patient] .portal-main{padding:0;max-width:none;min-height:100dvh}body[data-view=patient]{background:#f7f4ee}.patient-portal-shell{max-width:1060px;margin:auto;padding:0 35px}.patient-preview-note{display:flex;justify-content:space-between;gap:18px;align-items:center;padding:13px 0;border-bottom:1px solid var(--line);color:var(--muted);font-size:10px}.patient-preview-note button{background:none;text-decoration:underline;color:var(--muted);font-size:10px;min-height:30px}.patient-portal-header{display:flex;justify-content:space-between;align-items:center;padding:28px 0;gap:25px}.patient-portal-header img{width:220px;height:auto;display:block}.patient-portal-header>span{font-size:12px;color:var(--muted)}.patient-portal-nav{display:flex;gap:30px;border-bottom:1px solid var(--line);margin-bottom:30px}.patient-portal-nav button{padding:15px 0;background:none;border-bottom:2px solid transparent;min-height:48px;font-size:13px;color:var(--muted)}.patient-portal-nav button[aria-current=page]{color:var(--primary);border-color:var(--primary);font-weight:600}.patient-welcome{padding:35px;border-radius:19px;background:#4a382b;color:#fff9f0}.patient-welcome>span{font-size:9px;color:#d8c7b3;letter-spacing:1.7px}.patient-welcome h1{font-size:38px;letter-spacing:-1px;margin:14px 0 12px}.patient-welcome p{font-size:14px;color:#e0d0bd}.patient-home-actions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:17px;margin:24px 0}.patient-home-actions button{display:flex;flex-direction:column;gap:20px;background:#e9dfce;padding:26px;text-align:left;border-radius:14px;min-width:0}.patient-home-actions button:nth-child(2){background:#e7ead6}.patient-home-actions button:nth-child(3){background:#f1dcdd}.patient-home-actions span{font-size:9px;letter-spacing:1px;color:#80674e}.patient-home-actions strong{font-size:19px;font-weight:550;line-height:1.4}.patient-home-actions small{font-size:11px;color:#756354}.patient-paper{padding:30px;background:var(--surface);border:1px solid var(--line);border-radius:15px;margin-bottom:22px;overflow-wrap:anywhere}.patient-paper h2{font-size:25px;line-height:1.3;margin:14px 0 20px}.patient-paper h3{font-size:20px}.patient-paper>p{font-size:15px;line-height:1.9;margin:13px 0;white-space:pre-wrap}.patient-paper>small{display:block;color:var(--muted);font-size:11px;margin-top:25px}.patient-section-heading{display:flex;align-items:center;justify-content:space-between;gap:25px;margin-bottom:27px}.patient-section-heading h1,.patient-section-heading h2{font-size:31px;margin:12px 0 8px;letter-spacing:-.7px;line-height:1.25}.patient-section-heading p{font-size:13px;line-height:1.8;color:var(--muted);max-width:650px}.patient-portal-footer{border:0;display:block;padding:30px 0;text-align:center;color:var(--muted);font-size:11px}.patient-empty{text-align:center;border:1px dashed #cebdab;border-radius:14px;padding:55px 25px;margin:25px 0}.patient-empty h2{font-size:25px}.patient-empty p{font-size:14px;color:var(--muted);margin:14px auto 0;max-width:440px}.patient-meal{border:1px solid var(--line);border-radius:14px;background:var(--surface);margin-bottom:23px;overflow:hidden}.patient-meal>header{display:flex;align-items:center;gap:18px;background:#eee7db;padding:19px 25px}.patient-meal header span{font-size:13px;color:var(--primary)}.patient-meal h3{font-size:20px;font-weight:550}.patient-meal>ul{list-style:none;padding:5px 25px 12px;margin:0}.patient-meal>ul>li{border-bottom:1px solid var(--line);padding:17px 0}.patient-meal>ul>li:last-child{border:0}.patient-meal li>div{display:flex;justify-content:space-between;gap:18px;font-size:14px}.patient-meal li strong{font-weight:500}.patient-meal li>div>span{white-space:nowrap;color:var(--muted)}.patient-alternatives{margin:12px 0 0;padding-left:20px;color:var(--muted);font-size:12px;line-height:1.9}.patient-nutrient-details{margin:25px 0;font-size:12px;color:var(--muted)}.patient-nutrient-details summary{cursor:pointer;padding:15px 0;min-height:44px}.patient-nutrient-details p{line-height:1.8}.patient-form-list .patient-paper{display:flex;justify-content:space-between;align-items:center;gap:25px}.patient-form-list h2{margin:0 0 10px;font-size:22px}.patient-form-list p{font-size:12px;color:var(--muted)}.patient-question-section{border:1px solid var(--line);padding:28px;background:var(--surface);border-radius:14px;margin:28px 0}.patient-question-section legend{padding:0 10px;font-size:17px;font-weight:550}.patient-question-section label{font-size:14px;margin:15px 0 24px;font-weight:500}.patient-question-section input,.patient-question-section select,.patient-question-section textarea{font-size:16px;min-height:48px}.patient-form-actions{display:flex;gap:14px;justify-content:flex-end}.patient-form-actions button{min-height:46px;font-size:13px}.patient-answer-list{margin:25px 0 0}.patient-answer-list>div{border-top:1px solid var(--line);padding:17px 0}.patient-answer-list dt{font-size:12px;color:var(--muted)}.patient-answer-list dd{font-size:15px;white-space:pre-wrap;line-height:1.8;margin:8px 0 0}body[data-view=patient] .notice{max-width:990px;margin:15px auto}
@media(max-width:900px){.portal-access-panel{flex-wrap:wrap}.portal-access-panel>.actions{max-width:none}.portal-publication-grid{grid-template-columns:1fr}.patient-home-actions{gap:12px}.patient-home-actions button{padding:20px}.patient-portal-shell{padding-inline:25px}.food-filters.multi-source{grid-template-columns:1fr 1fr}.food-filters.multi-source label:first-child{grid-column:1/-1}.source-status-panel{flex-wrap:wrap}}
@media(max-width:600px){.document-workspace-tabs{gap:20px}.document-workspace-tabs button{font-size:11px}.model-intro h3{font-size:18px}.model-categories{gap:7px}.model-categories button{font-size:10px;min-height:40px;padding:8px 12px}.patient-model-grid{grid-template-columns:1fr}.patient-model{padding:21px}.patient-model p{font-size:12px}.request-row{flex-wrap:wrap;padding:17px;gap:12px}.request-row>div{flex-basis:60%}.portal-settings-banner{padding:22px;flex-wrap:wrap}.portal-settings-banner h3{font-size:24px}.portal-access-panel{padding:22px 0;gap:8px}.publication-panel{padding:21px}.publication-panel label select{font-size:16px}.portal-access-panel .actions{width:100%}.patient-portal-shell{padding:0 18px}.patient-preview-note{font-size:9px;gap:10px}.patient-preview-note button{font-size:9px;max-width:105px;line-height:1.5}.patient-portal-header{padding:24px 0;align-items:flex-start}.patient-portal-header img{width:175px}.patient-portal-header>span{font-size:10px;text-align:right;max-width:90px;overflow-wrap:anywhere}.patient-portal-nav{gap:0;justify-content:space-between;margin-bottom:24px}.patient-portal-nav button{font-size:12px;padding-inline:4px}.patient-welcome{padding:27px 24px}.patient-welcome h1{font-size:33px}.patient-welcome p{font-size:13px}.patient-home-actions{grid-template-columns:1fr}.patient-home-actions button{padding:22px;gap:12px}.patient-home-actions strong{font-size:22px}.patient-paper{padding:23px}.patient-paper h2{font-size:24px}.patient-paper>p{font-size:14px}.patient-section-heading{flex-wrap:wrap;gap:14px}.patient-section-heading h1,.patient-section-heading h2{font-size:28px}.patient-meal>header{padding:18px 21px}.patient-meal>ul{padding-inline:21px}.patient-meal li>div{font-size:13px}.patient-meal h3{font-size:19px}.patient-form-list .patient-paper{flex-wrap:wrap;gap:20px}.patient-form-list .patient-paper>div{width:100%}.patient-question-section{padding:22px 18px}.patient-question-section legend{font-size:16px;max-width:95%}.patient-form-actions{flex-direction:column-reverse}.patient-form-actions button{width:100%;white-space:normal}.custom-food-grid{grid-template-columns:1fr 1fr}.source-status-panel{padding:18px}.source-status-panel .actions{flex-wrap:wrap;flex-shrink:1}.food-filters.multi-source{grid-template-columns:1fr}.food-filters.multi-source label:first-child{grid-column:auto}}
@media print{.patient-preview-note,.patient-portal-nav,.patient-form-actions{display:none!important}#print-area .patient-meal>ul{list-style:none;padding:0}#print-area .patient-meal{margin-bottom:20pt}#print-area .patient-meal header{display:flex;gap:15pt}#print-area .patient-meal li{margin:8pt 0}#print-area .patient-meal li>div{display:flex;justify-content:space-between;gap:20pt}}

/* Source progress and review stay readable alongside the library actions. */
.source-status-panel{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(0,1fr);align-items:start}
.source-status-panel>div{min-width:0}
.source-status-panel .actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-content:start}
.source-status-panel .actions button{white-space:normal;min-width:0}
#tbca-review{overflow-wrap:anywhere}
#tbca-review ul{margin:12px 0 0;padding-left:20px}
#tbca-review li+li{margin-top:16px}
#tbca-review li strong{display:block;font-size:12px;font-weight:600}
#tbca-review li a{display:inline-flex;align-items:center;min-height:44px;font-size:12px}
@media(max-width:850px){.source-status-panel{grid-template-columns:minmax(0,1fr)}}
@media(max-width:480px){.source-status-panel .actions{grid-template-columns:minmax(0,1fr)}}
