/* Shared homepage identity, composed for focused clinic work. */
:root{--bg:#f8f9ff;--panel:#fff;--ink:#14162d;--muted:#60647c;--line:#e4e2f3;--teal:#6245ea;--soft:#efebff;--shadow:0 12px 40px #312c7510;color-scheme:light}
body.dark{--bg:#14162d;--panel:#1c1f3a;--ink:#f8f9ff;--muted:#b9bcd6;--line:#353956;--teal:#b6a3ff;--soft:#2c2949;--shadow:0 12px 40px #080a191a;color-scheme:dark}
.app-shell{background:var(--bg);color:var(--ink)}
.app-shell .sidebar{background:linear-gradient(165deg,var(--panel) 40%,var(--soft));border-right:1px solid var(--line)}
.app-shell .wordmark{color:var(--ink)}.app-shell .wordmark .ai{color:var(--teal)}
.app-shell .new-chat{background:var(--panel);border-color:var(--line);color:var(--teal);font-weight:600;box-shadow:0 3px 12px #6245ea08}
.app-shell .sidebar-nav{gap:4px}.app-shell .sidebar-nav a{padding:7px 10px;min-height:48px;color:var(--muted);gap:10px;border:1px solid transparent;border-radius:12px}
.app-shell .sidebar-nav a:hover,.app-shell .sidebar-nav a.active{background:var(--soft);color:var(--ink);border-color:var(--line)}.app-shell .sidebar-nav a.active{box-shadow:inset 3px 0 var(--teal);font-weight:600}
.workspace-art{display:inline-block;width:38px;height:38px;flex-shrink:0;background-image:url('/assets/tool-icons-3d.webp');background-size:300% 200%;background-repeat:no-repeat;border-radius:10px;mix-blend-mode:multiply}
.workspace-art-0{background-position:0 0}.workspace-art-1{background-position:50% 0}.workspace-art-2{background-position:100% 0}.workspace-art-3{background-position:0 100%}.workspace-art-4{background-position:50% 100%}.workspace-art-5{background-position:100% 100%}
body.dark .workspace-art{mix-blend-mode:normal;background-color:#f8f9ff}
.app-shell .app-header{background:var(--panel);border-bottom-color:var(--line)}.app-shell .header-title{font-weight:600}.app-shell .header-subtitle{color:var(--muted)}
.app-shell .badge{background:var(--soft);border-color:var(--line);color:var(--teal)}
.app-shell .app-main{background:radial-gradient(ellipse at 86% 0%,#dcd2ff45,transparent 46%),var(--bg)}
.app-shell .welcome{padding-top:38px;max-width:800px}.app-shell .welcome-art{width:78px;height:78px;margin-bottom:16px;border-radius:22px}
.app-shell .welcome .overline{color:var(--teal);margin-bottom:13px;font-size:12px}
.app-shell .welcome h1{max-width:730px;font-size:clamp(32px,3.3vw,46px);line-height:1.16;font-weight:600;margin-bottom:18px}
.workspace-gradient{background:linear-gradient(110deg,#3b4be1,#8b45d8);background-clip:text;-webkit-background-clip:text;color:transparent}
body.dark .workspace-gradient{background-image:linear-gradient(110deg,#b6a3ff,#ffcfbf)}
.app-shell .welcome p{color:var(--muted);max-width:650px;font-size:16px}
.app-shell .prompt-grid{gap:14px;margin-top:27px}.app-shell .prompt-card{border:1px solid var(--line);border-radius:20px;box-shadow:var(--shadow);padding:20px;min-height:132px;background:var(--panel);gap:14px}
.app-shell .prompt-card .workspace-art{width:48px;height:48px;border-radius:12px}.app-shell .prompt-card strong{font-weight:600;font-size:15px;line-height:1.5}.app-shell .prompt-card span:not(.workspace-art){color:var(--muted);font-size:14px;line-height:1.6}
.app-shell .prompt-card:hover{border-color:var(--teal);background:var(--panel)}
.app-shell .primary{background:#6245ea;border-color:#6245ea;color:#fff;box-shadow:0 5px 16px #6245ea1a}.app-shell .primary:hover{background:#5035cc;border-color:#5035cc}
.app-shell button:hover,.app-shell .btn:hover{border-color:var(--teal)}.app-shell .ghost:hover{background:var(--soft)}
.app-shell .chat-bottom{background:var(--bg);border-radius:22px 22px 0 0}.app-shell .composer{border:1px solid var(--line);box-shadow:0 8px 32px #493b8b0d;background:var(--panel)}.app-shell .composer:focus-within{border-color:var(--teal);box-shadow:0 0 0 3px #6245ea0c}
.app-shell .composer textarea{color:var(--ink)}.app-shell textarea::placeholder,.app-shell input::placeholder{color:var(--muted);opacity:1}.app-shell .chat-chip.active{background:var(--soft);color:var(--teal);border-color:var(--line)}
.app-shell .page-heading .overline{color:var(--teal)}.app-shell .page-heading h1{font-weight:600}.app-shell .panel,.app-shell .project-card,.app-shell .resource-card,.app-shell .clinic-profile-card,.app-shell .preset-card{background:var(--panel);border-color:var(--line);box-shadow:var(--shadow);border-radius:20px}
.app-shell .preset-card>.icon,.app-shell .clinic-profile-card>.icon,.app-shell .project-card>.icon,.app-shell .empty>.icon{color:var(--teal)}
.app-shell .avatar{background:var(--soft);color:var(--teal);font-weight:600}.app-shell .meter div{background:linear-gradient(90deg,#6245ea,#b5a1ff)}.app-shell .capacity{border-color:var(--line)}.app-shell .history a.active{background:var(--soft);color:var(--teal)}.app-shell .message.user{background:var(--soft);border-color:var(--line)}
.auth-aside{background:linear-gradient(145deg,#172970,#6245ea 70%,#9861da);color:#fff}.auth-aside .muted{color:#e2dfff}.auth-page .primary{background:#6245ea;color:#fff;border-color:#6245ea}
@media(max-width:1000px){.app-shell .prompt-card{padding:17px;gap:10px}.app-shell .prompt-card .workspace-art{width:38px;height:38px}}
@media(max-width:760px){.app-shell .welcome{padding-top:28px}.app-shell .welcome-art{width:64px;height:64px;margin-bottom:12px}.app-shell .welcome h1{font-size:34px}.app-shell .welcome p{font-size:15px}.app-shell .prompt-card{min-height:125px}.app-shell .prompt-card .workspace-art{width:36px;height:36px}.app-shell .prompt-card strong{font-size:14px}.app-shell .prompt-card span:not(.workspace-art){font-size:13px}.app-shell .sidebar-nav a{font-size:14px}}
@media(max-width:420px){.app-shell .welcome h1{font-size:30px}.app-shell .prompt-card{min-height:100px}}
/* Practical clinic playbooks and project review workflow. */
.playbook-toolbar{display:flex;align-items:center;flex-wrap:wrap;gap:14px;margin:28px 0}.playbook-toolbar .search-input{flex:1;min-width:230px}.playbook-toolbar select,.project-task select{font:inherit;font-size:14px;min-height:44px;padding:10px 30px 10px 12px;color:var(--ink);background:var(--panel);border:1px solid var(--line);border-radius:10px}.playbook-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px;margin-bottom:25px}.playbook-card{display:flex;flex-direction:column;align-items:flex-start;padding:26px;background:var(--panel);border:1px solid var(--line);border-radius:20px}.playbook-card>.icon{color:#8063df;width:30px;height:30px;margin:20px 0 2px}.playbook-card h3{font-size:20px;line-height:1.4;margin:16px 0 12px}.playbook-card p{font-size:16px;line-height:1.7;color:var(--muted);margin:0 0 22px}.playbook-card button{margin-top:auto;font-size:14px;min-height:44px}.clinic-playbook-link{display:block;margin:20px 0;font-size:16px;color:#7154ce}.project-checklist{margin:28px 0;border:1px solid var(--line);border-radius:18px;padding:24px;background:var(--panel)}.checklist-header{display:flex;align-items:center;justify-content:space-between;gap:15px;margin-bottom:20px}.checklist-header h3{font-size:22px;margin:0 0 8px}.checklist-header p{font-size:14px;color:var(--muted);margin:0}.project-task{display:flex;align-items:flex-start;justify-content:space-between;gap:20px;border-top:1px solid var(--line);padding:20px 0}.project-task strong{font-size:16px;line-height:1.5}.project-task p{font-size:14px;color:var(--muted);line-height:1.7;white-space:pre-wrap;margin:10px 0 0;max-width:660px}.task-date{display:block;font-size:14px;color:var(--muted);margin-top:6px}.project-task.overdue .task-date{color:#ac573b}.project-task.completed strong{text-decoration:line-through;color:var(--muted)}.task-actions{display:flex;flex-wrap:wrap;gap:8px;align-items:center}.task-actions button{min-height:44px}.project-task:last-child{padding-bottom:0}
@media(max-width:1150px){.playbook-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.project-task{flex-direction:column}.task-actions{width:100%}.task-actions select{flex:1}}
@media(max-width:650px){.playbook-grid{grid-template-columns:1fr}.playbook-toolbar{align-items:stretch}.playbook-toolbar>*{width:100%}.project-checklist{padding:20px}.checklist-header{align-items:flex-start;flex-direction:column}.playbook-card{padding:23px}}
/* Field explanations work with hover, keyboard focus and touch. */
.field-label-row{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:7px}.field-label-row>label{margin:0}.field-help{position:relative;flex:0 0 auto;z-index:3;margin:0}.field-help[open]{z-index:12}.field-help>summary{list-style:none;display:flex;align-items:center;justify-content:center;width:28px;height:28px;border:1px solid var(--line);border-radius:50%;background:var(--panel);color:var(--teal);font-size:14px;line-height:1;font-weight:600;cursor:help;user-select:none}.field-help>summary::-webkit-details-marker{display:none}.field-help>summary:focus-visible{outline:2px solid #8063dc;outline-offset:3px}.field-help[open]>summary{background:#eee8ff;color:#5a3bb2;border-color:#c3b4eb}.field-help-panel{position:absolute;right:0;top:34px;width:min(300px,calc(100vw - 70px));margin:0!important;padding:16px 18px;border:1px solid var(--line);border-radius:13px;background:var(--panel);color:var(--ink)!important;font-size:14px!important;font-weight:400;line-height:1.7!important;box-shadow:0 16px 40px #16133926;white-space:normal;z-index:10}.field-help-panel:before{content:'';position:absolute;right:8px;top:-6px;width:10px;height:10px;background:var(--panel);border-top:1px solid var(--line);border-left:1px solid var(--line);transform:rotate(45deg)}
@media(pointer:coarse){.field-help>summary{width:38px;height:38px}.field-help-panel{top:43px}}

.field-help.open-up .field-help-panel{top:auto;bottom:34px}.field-help.open-up .field-help-panel:before{top:auto;bottom:-6px;transform:rotate(225deg)}@media(pointer:coarse){.field-help.open-up .field-help-panel{top:auto;bottom:43px}}
/* Cohesive working surfaces; decorative motion remains on marketing pages. */
.workspace-overview{width:100%;margin:36px 0 0;text-align:left}.section-title{display:flex;align-items:center;justify-content:space-between;gap:14px}.section-title h2{font-size:23px;margin:0}.overview-grid{display:grid;grid-template-columns:1fr 1fr;gap:18px;margin:18px 0}.overview-card{padding:22px;border:1px solid var(--line);border-radius:20px;background:var(--panel)}.overview-card h3{margin:0 0 14px;font-size:17px}.overview-card p{font-size:15px!important;line-height:1.75!important;margin:0!important}.recent-work{display:block;color:var(--ink);font-size:15px;padding:10px 0;border-top:1px solid var(--line);line-height:1.6}.overview-shortcuts{display:flex;flex-wrap:wrap;gap:10px}.app-shell .welcome{max-width:1000px}.app-shell .welcome>p{max-width:720px;margin-left:auto;margin-right:auto}.search-result{display:flex;flex-direction:column;padding:17px;border-bottom:1px solid var(--line);color:var(--ink);text-decoration:none}.search-result small{text-transform:capitalize;color:var(--muted);margin-bottom:6px}.search-result:hover{background:var(--soft)}.source-card details{margin:15px 0}.source-card summary{cursor:pointer;font-size:15px}.source-card p{line-height:1.8}.source-card .research-meta{font-size:14px;overflow-wrap:anywhere}.source-card .file-controls{flex-wrap:wrap}.saved-source-section{margin-top:42px}.saved-source-section .search-input{width:100%;margin-bottom:18px}.product-directory{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px}.product-directory .panel{margin:0}.product-record{display:flex;flex-direction:column;align-items:flex-start}.product-record .file-controls{margin-top:auto;padding-top:20px}.product-record p{font-size:16px;line-height:1.8}.commercial-interest{font-size:13px!important;color:var(--muted)}.product-details{display:grid;grid-template-columns:minmax(110px,.4fr) 1fr;gap:12px 20px;line-height:1.7}.product-details dt{font-weight:600}.product-details dd{margin:0;overflow-wrap:anywhere}.comparison-panel{margin-bottom:26px}.comparison-panel[hidden]{display:none}.comparison-panel td{min-width:170px}.comparison-panel th{font-weight:600}.image-picker{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}.image-choice{padding:10px;display:flex;flex-direction:column;gap:12px;text-align:left;overflow:hidden}.image-choice img{width:100%;height:130px;object-fit:contain;background:var(--soft);border-radius:10px}.image-choice span{overflow-wrap:anywhere;font-size:14px}.operation-notice{margin:18px 0;padding:16px;border:1px solid var(--line);border-radius:14px;background:var(--soft);font-size:14px;line-height:1.8}.selected-image{font-size:14px;color:var(--muted)}.rich-content{font-size:16px;line-height:1.85;overflow-wrap:anywhere;white-space:normal}.rich-content p{margin:0 0 16px;white-space:pre-wrap}.rich-content h2,.rich-content h3,.rich-content h4{margin:24px 0 12px;line-height:1.4}.rich-content h2{font-size:23px}.rich-content h3{font-size:20px}.rich-content ul,.rich-content ol{padding-left:24px}.rich-content li{margin:8px 0}.rich-content pre{overflow:auto;padding:18px;background:var(--soft);border-radius:14px;font-size:14px;line-height:1.65}.rich-content table{background:var(--panel);margin:18px 0}.rich-content td,.rich-content th{padding:13px;vertical-align:top}.citation-link{font-size:.85em;font-weight:600;color:var(--teal);white-space:nowrap}.evidence-panel{margin:24px 0;padding:18px 22px;background:var(--panel);border:1px solid var(--line);border-radius:18px}.evidence-panel h3{font-size:17px;margin:0 0 10px}.evidence-panel details{border-top:1px solid var(--line);padding:14px 0}.evidence-panel summary{cursor:pointer;font-size:14px;line-height:1.7}.evidence-panel details>p{font-size:14px;line-height:1.8;color:var(--muted)}.source-excerpt{max-height:240px;overflow:auto;white-space:pre-wrap}.field>label:has(+input[type=hidden]){display:none}.calendar-toolbar{display:flex;justify-content:space-between;align-items:center;gap:16px;margin:24px 0}.content-calendar{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:15px;margin-top:22px}.calendar-post{background:var(--panel);border:1px solid var(--line);border-radius:18px;padding:20px;display:flex;flex-direction:column;gap:10px}.calendar-post time{font-weight:600;color:var(--teal);font-size:14px}.calendar-post h4{font-size:17px;line-height:1.5;margin:0}.calendar-post p{font-size:14px;line-height:1.7;color:var(--muted)}.calendar-post select{width:100%}.project-filter{display:flex;gap:12px;flex-wrap:wrap;margin:25px 0}.project-filter .search-input{flex:1;min-width:160px}.resource-group>summary{cursor:pointer;font-size:17px;font-weight:600;padding:18px 0}.resource-group{border-bottom:1px solid var(--line)}.file-gallery{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px}.file-preview{height:150px;object-fit:contain;background:var(--soft);width:100%;border-radius:12px}.library-item{padding:18px;border:1px solid var(--line);background:var(--panel);border-radius:18px;overflow:hidden}.library-item h3{font-size:16px;overflow-wrap:anywhere}.library-item p{font-size:14px;color:var(--muted)}.brand-colour-row{display:flex;gap:12px;align-items:center;flex-wrap:wrap}.brand-colour-row input[type=color]{width:60px;height:44px;padding:4px}.brand-preview{display:flex;gap:12px;align-items:center;padding:16px;border:1px solid var(--line);border-radius:14px;margin:15px 0}.brand-preview img{width:70px;height:70px;object-fit:contain}.context-summary{padding:16px;border:1px solid var(--line);border-radius:14px;margin:12px 0;font-size:14px;line-height:1.8}.capacity small{line-height:1.7}.capacity .capacity-trial{margin-top:10px}.capacity-link{display:block;margin-top:8px;font-size:13px;color:var(--teal)}.workspace fieldset{border:1px solid var(--line);border-radius:14px;padding:18px;margin:16px 0}.workspace legend{font-size:15px;font-weight:600}.workspace .field-label-row label,.modal .field-label-row label{font-size:14px}.modal .field-help-panel{font-size:14px;line-height:1.8}.skip-link{position:fixed;left:15px;top:-100px;z-index:1000;padding:14px 20px;background:var(--ink);color:var(--bg);border-radius:10px}.skip-link:focus{top:12px}
@media(max-width:1000px){.content-calendar,.file-gallery{grid-template-columns:repeat(2,minmax(0,1fr))}.app-header .header-actions>button:first-child{font-size:12px}}
@media(max-width:650px){.overview-grid,.product-directory,.content-calendar,.file-gallery{grid-template-columns:1fr}.section-title,.calendar-toolbar{align-items:flex-start;flex-direction:column}.image-picker{grid-template-columns:repeat(2,minmax(0,1fr))}.product-details{grid-template-columns:1fr}.product-details dd{margin-bottom:12px}.app-header .header-actions>button:first-child{font-size:0;padding:10px}.app-header .header-actions>button:first-child .icon{width:20px}.workspace-overview{margin-top:28px}.evidence-panel{padding:15px}}

.source-text{white-space:pre-wrap;overflow-wrap:anywhere;max-height:28rem;overflow:auto;font:inherit;font-size:.9rem;line-height:1.6;padding:1rem;background:var(--surface);border:1px solid var(--border);border-radius:12px}.workflow-step{padding:1rem 0;border-bottom:1px solid var(--border)}.workflow-panel{margin:1rem 0}.dossier-manager{margin-bottom:1.5rem}
.modal .workflow-step{padding:10px 0;margin:0;min-height:0}.workflow-step h4{margin:.35rem 0}.sourced-fact{padding:1rem 0;border-bottom:1px solid var(--border)}.sourced-fact h4{margin:.4rem 0}
.flow-guide{border:1px solid var(--border);border-radius:16px;padding:1rem 1.2rem;margin:0 0 1.25rem;background:linear-gradient(120deg,rgba(86,97,239,.08),rgba(174,132,237,.06))}.flow-guide summary{font-weight:600;cursor:pointer}.flow-guide p{font-size:1rem;line-height:1.55;margin:.6rem 0}.flow-destination{color:var(--muted)}.task-start-grid{display:flex;flex-wrap:wrap;gap:12px;margin:12px 0 22px}.choice-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(210px,1fr));gap:4px 14px}.product-question fieldset{margin:1rem 0;padding:1rem;border:1px solid var(--border);border-radius:12px}.source-directory,.optional-sources{margin:1rem 0 1.5rem;padding:1rem;border:1px solid var(--border);border-radius:12px}.source-directory summary,.optional-sources summary{cursor:pointer;font-weight:600}.source-directory article{padding:.75rem 0;border-bottom:1px solid var(--border)}.calendar-choices{max-height:17rem;overflow:auto}.admin-start{background:linear-gradient(115deg,rgba(70,80,240,.12),rgba(150,120,240,.06))}.product-question .field:has(input:invalid){box-shadow:none}
