/* Project navigation and scoped workspace. Shared tokens live in styles.css. */
.sidebar #standalone-chats{margin-top:4px}.sidebar-project-heading{display:flex;align-items:center;justify-content:space-between;padding:16px 10px 6px;color:var(--muted);font-size:12px;font-weight:500;letter-spacing:.4px}.project-list{max-height:164px;flex-shrink:0;overflow:auto}.project-nav-item{display:flex;align-items:center;gap:9px;min-height:42px;width:100%;padding:10px 12px;text-align:left;background:transparent;border:1px solid transparent;border-radius:10px;color:var(--muted);font-size:13px;font-weight:400}.project-nav-item svg{width:17px;height:17px}.project-nav-item>span:not(.project-nav-count){flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.project-nav-item:hover{background:var(--surface-subtle);border-color:var(--line)}.project-nav-item.selected{background:var(--accent-soft);color:var(--accent);border-color:var(--accent-line);font-weight:500}.project-nav-count{font-size:12px;font-variant-numeric:tabular-nums}.project-nav-empty{margin:0;padding:8px 12px;color:var(--muted);font-size:12px;line-height:1.8}.sidebar .history-label>span{font-size:12px;letter-spacing:0}.project-breadcrumb{display:inline-flex;align-items:center;gap:7px;max-width:230px;min-width:0;min-height:36px;padding:4px 0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;background:transparent;color:var(--muted);font:400 13px var(--font)}.project-breadcrumb:hover{color:var(--accent)}.project-breadcrumb svg{width:16px;height:16px}.project-breadcrumb>span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}#project-breadcrumb-separator{font-size:14px;color:var(--line-strong)}.project-context-indicator{display:flex;align-items:flex-start;gap:10px;padding:16px 20px;border-bottom:1px solid var(--line);background:var(--accent-soft);color:var(--accent)}.project-context-indicator svg{width:17px;height:17px;margin-top:3px}.project-context-indicator>div{min-width:0}.project-context-indicator strong{display:block;font-size:14px;font-weight:500;overflow-wrap:anywhere}.project-context-indicator div>span{display:block;margin-top:4px;font-size:12px;color:var(--muted)}
/* Overview: one primary action, real summary metrics, then the searchable work list. */
.project-workspace{flex:1;min-height:0;overflow:auto;overscroll-behavior:contain}.project-workspace-inner{max-width:1320px;margin:0 auto;padding:28px 28px 40px}.project-hero{display:flex;align-items:flex-start;gap:16px;margin-bottom:24px}.project-emblem{display:flex;align-items:center;justify-content:center;flex-shrink:0;width:48px;height:48px;margin-top:3px;border:1px solid var(--accent-line);border-radius:14px;background:var(--accent-soft);color:var(--accent)}.project-emblem svg{width:25px;height:25px;stroke-width:1.6}.project-hero-copy{flex:1;min-width:0}.project-eyebrow{font-size:12px;letter-spacing:.6px;color:var(--muted);font-weight:400}.project-hero h1{margin:6px 0 8px;font-size:26px;line-height:1.5;font-weight:500;letter-spacing:-.4px;overflow-wrap:anywhere}.project-hero p{max-width:700px;margin:0;font-size:14px;line-height:1.85;color:var(--muted);white-space:pre-wrap;overflow-wrap:anywhere}.project-hero-actions{display:flex;align-items:center;gap:8px;flex-shrink:0;margin-top:21px}.project-primary-button{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:42px;padding:10px 14px;border:1px solid var(--accent);border-radius:12px;background:var(--accent);color:var(--on-accent);font-family:var(--font);font-size:14px;font-weight:500;white-space:nowrap}.project-primary-button:hover:not(:disabled){background:var(--accent-hover);border-color:var(--accent-hover)}.project-primary-button svg{width:18px;height:18px}.project-workspace .workspace-metrics{margin:0 0 24px}.project-layout{display:grid;grid-template-columns:minmax(0,1fr) 340px;align-items:start;gap:24px}.project-conversations,.project-card{min-width:0;border:1px solid var(--line);border-radius:16px;background:var(--surface);box-shadow:var(--shadow-sm)}.project-conversations{padding:20px}.project-section-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:16px}.project-section-heading h2{display:flex;align-items:center;gap:8px;min-width:0;margin:0;color:var(--text);font-size:18px;font-weight:500;line-height:1.5}.project-section-heading h2 svg{width:19px;height:19px;color:var(--muted)}.project-section-heading>span{font-size:12px;color:var(--muted);white-space:nowrap}.project-chat-list{display:flex;flex-direction:column;max-height:64vh;overflow:auto;overscroll-behavior:contain}.project-chat-item{display:flex;align-items:flex-start;gap:12px;width:100%;min-height:76px;padding:14px 8px;text-align:left;background:transparent;border:0;border-top:1px solid var(--line);border-radius:0;color:var(--text);font-family:var(--font);font-weight:400}.project-chat-item:hover{background:var(--surface-subtle)}.project-chat-item:focus-visible{outline-offset:-2px;border-radius:8px}.project-chat-item>svg{width:19px;height:19px;margin-top:3px;color:var(--muted)}.project-chat-copy{flex:1;min-width:0}.project-chat-name{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--text);font-size:14px;line-height:1.7}.project-chat-meta{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin-top:5px;font-size:12px;color:var(--muted)}.project-chat-arrow{font-size:20px;color:var(--muted)}.project-empty-chats{display:flex;align-items:center;justify-content:center;flex-direction:column;min-height:200px;padding:24px 20px;text-align:center;border:1px dashed var(--line-strong);border-radius:12px;background:var(--surface-subtle)}.project-empty-chats>svg{width:28px;height:28px;margin-bottom:12px;color:var(--muted)}.project-empty-chats strong{font-size:15px;font-weight:500;color:var(--text)}.project-empty-chats p{margin:8px 0 0;font-size:13px;line-height:1.9;color:var(--muted);white-space:pre-line}.project-context-column{display:flex;flex-direction:column;gap:20px;min-width:0}.project-card{padding:20px}.project-card .project-section-heading h2{font-size:16px}.project-card .project-section-heading{gap:8px;margin-bottom:14px}.project-instructions-preview{max-height:220px;overflow:auto;margin:0;font-family:var(--font);font-size:14px;font-weight:400;line-height:1.9;color:var(--text);white-space:pre-wrap;overflow-wrap:anywhere}.project-help{margin:12px 0 0;color:var(--muted);font-family:var(--font);font-size:12px;font-weight:400;line-height:1.85}.project-skill-tags{display:flex;flex-wrap:wrap;gap:6px;margin-top:16px}.project-skill-tags:empty{display:none}.project-skill-tags>span{padding:4px 8px;border:1px solid var(--accent-line);border-radius:7px;background:var(--accent-soft);color:var(--accent);font-size:12px}
/* Shared text-file area: metadata and an explicit upload action. */
.project-file-list{display:flex;flex-direction:column;max-height:300px;overflow:auto}.project-file-item{display:flex;align-items:center;gap:9px;min-width:0;min-height:60px;padding:10px 0;border-bottom:1px solid var(--line);color:var(--accent)}.project-file-item:last-child{border-bottom:0}.project-file-item:hover{color:var(--accent-hover)}.project-file-item svg{width:18px;height:18px;color:var(--muted)}.project-file-item-copy{flex:1;min-width:0}.project-file-item-name{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:13px}.project-file-item-size{display:block;margin-top:3px;color:var(--muted);font-size:12px;font-variant-numeric:tabular-nums}.project-file-item-download{font-size:20px;color:var(--muted)}.project-no-files{margin:0;padding:10px 0;color:var(--muted);font-size:13px;line-height:1.9;white-space:pre-line}.project-upload-button{display:flex;align-items:center;justify-content:center;gap:8px;width:100%;min-height:42px;margin-top:16px;padding:10px 12px;border:1px solid var(--line-strong);border-radius:12px;background:var(--surface);color:var(--text);font-family:var(--font);font-size:14px;font-weight:400}.project-upload-button:hover{background:var(--accent-soft);border-color:var(--accent-line);color:var(--accent)}.project-upload-button svg{width:17px;height:17px}.project-context-limit{margin:12px 0 0;font-size:12px;line-height:1.85;color:var(--muted)}.project-file-form{margin-top:16px;padding-top:16px;border-top:1px solid var(--line)}.project-file-form label{display:block;margin-bottom:7px;font-size:13px;color:var(--text)}.project-file-form input{width:100%;min-height:42px;padding:10px 12px;border:1px solid var(--line-strong);border-radius:12px;background:var(--surface);color:var(--text);font-family:var(--font);font-size:14px;font-weight:400}.project-file-replace{margin:10px 0 0;padding:10px 12px;border:1px solid var(--warning-line);border-radius:10px;background:var(--warning-soft);color:var(--warning);font-size:12px;line-height:1.8}.project-upload-actions{display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin-top:14px}.project-upload-actions .project-primary-button{font-size:13px}.project-plain-button{min-height:40px;padding:9px 12px;border:1px solid transparent;border-radius:10px;background:transparent;color:var(--muted);font-family:var(--font);font-size:14px;font-weight:400}.project-plain-button:hover{background:var(--surface-subtle);border-color:var(--line);color:var(--text)}
/* Create/edit form with clear field grouping and a contained action footer. */
#project-dialog{width:640px;max-width:min(640px,calc(100vw - 32px))}.project-form{padding:24px}.project-form-intro{margin:0 0 20px;font-size:14px;line-height:1.9;color:var(--muted)}.project-form>label{display:block;margin:20px 0 8px;font-size:14px;font-weight:500;color:var(--text)}.project-form>label>span{color:var(--danger)}.project-form>input,.project-form>textarea{display:block;width:100%;min-height:44px;padding:10px 12px;border:1px solid var(--line-strong);border-radius:12px;background:var(--surface);color:var(--text);font-family:var(--font);font-size:14px;line-height:1.8;font-weight:400;resize:vertical}.project-form>input:focus,.project-form>textarea:focus{border-color:var(--focus)}.project-form>input::placeholder,.project-form>textarea::placeholder{color:var(--muted);font-family:var(--font)}.project-form>textarea{min-height:84px;max-height:280px}.project-form .project-help{font-size:12px;margin-top:8px}.project-skills-fieldset{border:0;padding:0;margin:24px 0 0}.project-skills-fieldset legend{margin:0 0 12px;padding:0;font-size:14px;font-weight:500;color:var(--text)}.project-dialog-skills{display:flex;flex-wrap:wrap;gap:8px}.project-dialog-skill{display:flex;align-items:center;gap:9px;min-height:40px;padding:9px 12px;border:1px solid var(--line);border-radius:10px;color:var(--muted);font-size:13px;cursor:pointer}.project-dialog-skill:has(input:checked){background:var(--accent-soft);border-color:var(--accent-line);color:var(--accent)}.project-dialog-skill input{width:16px;height:16px;accent-color:var(--accent);margin:0}.project-form-actions{display:flex;align-items:center;justify-content:flex-end;flex-wrap:wrap;gap:10px;margin-top:24px;padding-top:20px;border-top:1px solid var(--line)}.project-form-actions .project-primary-button{min-width:128px}.project-form .form-error{font-size:13px}
/* Stable layout at review widths 390 / 768 / 1440 / 1920. */
@media(min-width:1800px){.project-workspace-inner{max-width:1392px;padding:32px}.project-layout{grid-template-columns:minmax(0,1fr) 372px;gap:24px}.project-card,.project-conversations{padding:24px}}
@media(max-width:1200px){.project-workspace-inner{padding:24px 20px 36px}.project-hero{gap:12px}.project-hero h1{font-size:24px}.project-hero-actions{margin-top:20px}.project-hero-actions .project-primary-button{font-size:13px}.project-layout{grid-template-columns:1fr}.project-context-column{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-items:start}.project-chat-list{max-height:55vh}.project-breadcrumb{max-width:170px}.breadcrumb:has(.project-breadcrumb:not([hidden])) #chat-title{max-width:180px}}
@media(max-width:768px){.project-workspace-inner{padding:22px 20px 36px}.project-hero{display:grid;grid-template-columns:44px minmax(0,1fr);gap:12px;margin-bottom:20px}.project-emblem{width:44px;height:44px;border-radius:12px}.project-hero h1{font-size:24px;margin:4px 0 8px}.project-eyebrow{font-size:12px}.project-hero p{font-size:14px}.project-hero-actions{grid-column:1/-1;display:flex;margin-top:6px;justify-content:flex-start}.project-hero-actions .project-primary-button{font-size:14px;min-height:44px}.project-hero-actions .icon-button{width:44px;height:44px}.project-layout{gap:20px}.project-conversations,.project-card{padding:18px}.project-section-heading h2{font-size:18px}.project-card .project-section-heading h2{font-size:16px}.project-section-heading>span{font-size:12px}.project-chat-name{font-size:14px}.project-chat-meta{font-size:12px}.project-chat-list{max-height:none;overflow:visible}.project-chat-item{min-height:76px;padding:14px 4px}.project-context-column{grid-template-columns:1fr 1fr;gap:16px}.project-instructions-preview{font-size:14px}.project-help,.project-context-limit{font-size:12px}.project-upload-button{font-size:14px;min-height:44px}.project-file-form input,.project-form>input,.project-form>textarea{font-size:16px}.project-form{padding:20px}.project-form>label{font-size:14px}.project-form-intro{font-size:14px}.project-dialog-skill{font-size:13px}.project-form-actions{gap:8px}.project-breadcrumb{max-width:145px;font-size:12px;gap:4px}.project-breadcrumb svg{display:none}.breadcrumb:has(.project-breadcrumb:not([hidden])) #chat-title{max-width:100px;font-size:13px}.breadcrumb:has(.project-breadcrumb:not([hidden])){gap:6px}.project-list{max-height:164px}.project-file-item-name{font-size:14px}}
@media(max-width:560px){.project-workspace-inner{padding:20px 16px 32px}.project-context-column{display:flex;flex-direction:column}.project-card{width:100%}.project-conversations{padding:16px}.project-section-heading{gap:8px}.project-section-heading h2{font-size:17px}.project-results-count,#project-results-count{font-size:12px}.project-workspace .workspace-metrics{margin-bottom:20px}.project-hero h1{font-size:24px}.project-hero-actions{justify-content:space-between}.project-breadcrumb{max-width:114px}.breadcrumb:has(.project-breadcrumb:not([hidden])) #chat-title{max-width:75px}.project-file-item-name{font-size:13px}.project-form-actions .project-primary-button{min-width:120px}.project-upload-actions .project-primary-button{flex:1}}
@media(max-height:760px){.sidebar-project-heading{padding-top:10px}.project-list{max-height:116px}.sidebar .new-chat{margin-bottom:18px}.sidebar .search-wrap{margin-top:12px;margin-bottom:12px}}
