/* November workspace design: shared tokens, conversation entry, ledger, reading. */
:root{--primary:#8c1d2f;--ink:#231c16;--muted:#776c61;--line:#e7e0d4;--paper:#fff;--bg:#f6f3ed;--soft:#f4e4e7;--danger:#b3362c}
body{background:var(--bg)}
.identity #mode{display:none}
.shell{grid-template-columns:220px minmax(0,1fr);min-height:100dvh}.sidebar{background:#faf8f4;padding:24px 16px;border-color:var(--line)}
.sidebar .wide{padding:13px 10px;}.side-note{display:none}.side-label{margin-top:28px}
.nav-link,.matter-link{border-radius:8px;}.sidebar nav{margin-top:20px}
#main{min-width:0;padding:28px 32px 48px}.page-top{margin-bottom:24px;gap:16px;align-items:center}
.page-top .eyebrow:empty,.page-top p:empty{display:none}.page-top h1{margin:0}.page-top p{color:var(--muted);margin-top:8px}
.card{border-radius:14px;border:1px solid var(--line);box-shadow:none;padding:24px;margin-bottom:20px}
button,.small-button,input,select,textarea{border-radius:8px}.primary{background:var(--primary)}.primary:hover{background:#6b1522}
button:focus-visible,a:focus-visible,summary:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible{outline:2px solid #a23648;outline-offset:3px}
.small-button{display:inline-flex;align-items:center;justify-content:center;padding:8px 12px;border:1px solid var(--line);background:#fff;text-decoration:none;color:var(--ink);}
.small-button.primary{color:#fff;background:var(--primary)}.tag{border-radius:5px}.subtle,small{color:var(--muted)}
.workspace-status{display:inline-flex;gap:7px;align-items:center;white-space:normal;color:var(--muted)}.workspace-status i{width:6px;height:6px;flex-shrink:0;border-radius:50%;background:#afa59a}.workspace-status.success{color:#1f7a4d}.workspace-status.success i{background:#1f7a4d}.workspace-status.working{color:#345e8d}.workspace-status.working i{background:#345e8d}.workspace-status.error{color:var(--danger)}.workspace-status.error i{background:var(--danger)}
.workspace-breadcrumb{display:flex;flex-wrap:wrap;gap:10px;color:var(--muted);margin-bottom:16px}.workspace-breadcrumb a{color:var(--muted);text-decoration:none}
.workspace-list-summary{display:flex;gap:24px;flex-wrap:wrap;margin:0 0 24px;color:var(--muted)}.workspace-list-summary strong{color:var(--ink);margin-left:7px;}
.workspace-list-card{padding:0;overflow:hidden}
.workspace-list-card>.lead-table-wrap{position:relative;max-width:100%;min-width:0;overflow-x:auto}.workspace-filter{display:flex;gap:12px;align-items:center;flex-wrap:wrap;padding:20px 24px}.workspace-filter input{flex:1;min-width:190px}.workspace-filter select{width:auto;max-width:200px}.workspace-extra-filters{padding:0 24px 16px}.workspace-extra-filters summary{color:var(--muted);cursor:pointer}.workspace-extra-filters .card{margin-top:12px}.workspace-extra-filters .lead-filter-main .lead-search,.workspace-extra-filters .lead-filter-main [data-lead-filter=status]{display:none}
.workspace-lead-table td{padding:18px 24px;vertical-align:middle}.workspace-lead-table th{padding:12px 24px;background:#faf8f4;color:var(--muted)}.workspace-lead-table tbody tr{cursor:pointer}.workspace-lead-table tbody tr:hover{background:#fcf7f5}.workspace-row-link{color:var(--ink);text-decoration:none}.workspace-row-link:hover{color:var(--primary)}.workspace-lead-table small{display:block;margin-top:5px}.workspace-list-card .profile-pager{padding:18px 24px}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.workspace-ledger-meta{display:flex;gap:16px;justify-content:space-between;align-items:center;color:var(--muted);}.workspace-ledger-overview h2{margin:18px 0}.workspace-facts{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:24px;margin:0}.workspace-facts dt{color:var(--muted)}.workspace-facts dd{margin:6px 0 0;overflow-wrap:anywhere}
.workspace-milestones h2{margin:0 0 20px}.workspace-milestones ol{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));padding:0;list-style:none;gap:20px;margin:0}.workspace-milestones li{display:flex;gap:12px;align-items:flex-start;position:relative}.workspace-milestones li strong{display:block;margin-bottom:6px;}.workspace-step{background:#eee9df;color:var(--muted);border:1px solid var(--line);width:30px;height:30px;display:grid;place-items:center;flex-shrink:0;border-radius:50%}.workspace-step.success{background:#edf6f0;color:#1f7a4d;border-color:#b9d4c4}.workspace-step.working{background:#eaf0f8;color:#345e8d}.workspace-step.error{background:#faece8;color:var(--danger)}
.workspace-ledger-columns{display:grid;grid-template-columns:minmax(0,1.6fr) minmax(280px,1fr);gap:24px;align-items:start}.workspace-ledger-columns>*,.workspace-ledger-columns .card{min-width:0}.workspace-ledger-columns .card>h2{margin:0 0 16px}.workspace-prose{white-space:pre-wrap;overflow-wrap:anywhere;color:#4d453c}.workspace-dimensions{display:grid;grid-template-columns:1fr 1fr;gap:18px}.workspace-dimensions>div{border-top:1px solid var(--line);padding-top:14px}.workspace-dimensions p{white-space:pre-wrap}.workspace-report-row{display:flex;align-items:center;gap:12px;padding:18px 0;border-top:1px solid var(--line)}.workspace-report-row>div:nth-child(2){flex:1;min-width:0}.workspace-report-row small{display:block;}.workspace-report-row .actions{flex-shrink:0}.workspace-report-symbol{width:32px;height:40px;border-radius:6px;display:grid;place-items:center;background:#f4e4e7;color:var(--primary)}.workspace-saved-reports details>a{display:block;margin-top:12px}.workspace-timeline ol{list-style:none;padding:0 0 0 14px;margin:0;border-left:1px solid var(--line)}.workspace-timeline li{padding:0 0 20px 12px;position:relative}.workspace-timeline li:before{content:"";width:7px;height:7px;border-radius:50%;background:var(--primary);position:absolute;left:-18px;top:8px}.workspace-timeline li:last-child{padding-bottom:0}.workspace-timeline small{display:block;margin-top:5px}.workspace-file-list{display:flex;flex-direction:column;gap:8px;margin-top:16px}.workspace-profile-readonly .customer-profile{border-top-width:1px}
/* The page shell stays in place; the conversation owns its scroll containers. */
#main:has(>#conversation-panel),#main:has(.conversation-workspace){padding:0;display:flex;flex-direction:column;height:100dvh;overflow:hidden}
#main:has(.conversation-workspace)>.page-top{display:none}
.conversation-workspace{display:grid;grid-template-columns:210px minmax(300px,1fr) 280px;gap:0;flex:1;min-height:0;width:100%;border:0;background:#fff}
.conversation-sidebar{padding:20px 12px;background:#faf8f4;border-right:1px solid var(--line);border-radius:0;overflow:auto;max-height:none}.conversation-sidebar>.actions{display:block}.conversation-sidebar>.actions button{width:100%}.conversation-sidebar>h3{color:var(--muted);margin:24px 10px 10px}.conversation-history-item{width:100%;background:transparent;border:0;padding:12px;border-radius:8px;text-align:left;margin:0 0 4px}.conversation-history-item:hover{background:#f0e9df}.conversation-history-heading{gap:8px}.conversation-history-preview{margin-top:5px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.conversation-history-meta{display:none}#conversation-history h4{color:var(--muted);margin:20px 12px 6px}
.conversation-main{border:0;border-radius:0;display:flex;flex-direction:column;min-height:0;min-width:0;padding:0;background:#fff}.conversation-main>.source-top{min-height:64px;padding:14px 24px;margin:0;border-bottom:1px solid var(--line);align-items:center;flex-wrap:wrap;gap:8px}.conversation-main>.source-top strong{flex:1;}.conversation-main>.source-top button{padding:6px 10px;}.conversation-main>#conversation-context{padding:10px 24px;border-bottom:1px solid #f4f0ea}.conversation-main #conversation-connection:not(.hidden){margin:8px 24px}.conversation-main #conversation-messages{flex:1;min-height:0;overflow-y:auto;padding:28px 24px;max-height:none;scroll-behavior:smooth}.conversation-turn{max-width:660px;margin:0 auto 32px;padding:0 0 24px;border:0;border-bottom:1px solid #f1ece4;transition:background .3s;overflow-wrap:anywhere}.conversation-turn .conversation-user{margin:0 0 20px 12%;padding:14px 18px;background:#f4e4e7;white-space:pre-wrap;border-radius:12px 12px 2px 12px;color:var(--ink)}.conversation-turn>p{white-space:pre-wrap;}.conversation-action{margin:0 0 16px;padding:0;border:0;background:none}.conversation-turn summary{color:var(--muted);cursor:pointer}.conversation-turn blockquote{margin:12px 0;border-left:2px solid var(--line);padding-left:12px;color:var(--muted);white-space:pre-wrap}.workspace-highlight{background:#fff7e8;outline:6px solid #fff7e8;border-radius:8px}
.conversation-main #conversation-form{flex-shrink:0;padding:16px 24px 18px;border-top:1px solid var(--line);margin:0;background:#fff}.conversation-main #conversation-form>label{display:none}.conversation-main #conversation-input{min-height:76px;max-height:180px;resize:vertical;background:#faf8f4;border:1px solid var(--line);width:100%;padding:12px 14px;margin:0;}.conversation-compose-actions{display:flex;align-items:center;gap:10px;justify-content:flex-start;margin-top:10px}.conversation-compose-actions small{flex:1;}.conversation-compose-actions button[type=submit]{margin-left:auto}.workspace-chat-empty{text-align:center;max-width:450px;margin:12vh auto}.workspace-chat-empty h2{margin:18px 0}.workspace-chat-empty p{color:var(--muted)}.workspace-chat-empty .eyebrow{color:var(--primary);}
#conversation-outputs{padding:24px 20px;border-left:1px solid var(--line);background:#fcfbf8;overflow:auto;min-width:0}.workspace-customer-card{padding-bottom:24px;border-bottom:1px solid var(--line)}.workspace-customer-card h3{margin:12px 0;}.workspace-output-index h3{margin:24px 0 16px;}.workspace-output-index h3 small{margin-left:6px}.workspace-index-item{width:100%;padding:12px 0;text-align:left;white-space:normal;background:none;border:0;border-bottom:1px solid var(--line);}.workspace-output-card{display:flex;align-items:center;gap:12px;border:1px solid var(--line);padding:16px;border-radius:10px;text-decoration:none;color:var(--ink);margin:12px 0;background:#fdfbf8}.workspace-output-card:hover{border-color:var(--primary);background:#fdf7f6}.workspace-output-card strong,.workspace-output-card small{display:block}.workspace-output-icon{width:34px;height:40px;display:grid;place-items:center;background:#f4e4e7;border-radius:6px;color:var(--primary)}.workspace-output-card small{margin-top:4px}.workspace-file-chip{display:inline-flex;align-items:center;gap:8px;border:1px solid var(--line);border-radius:6px;margin:8px 8px 0 0;padding:4px 8px}.workspace-file-chip button{padding:0 4px}.workspace-message-file{display:block;margin:8px 0}
.workspace-report-layout{display:grid;grid-template-columns:180px minmax(0,1fr);gap:24px;align-items:start}.workspace-report-contents{position:sticky;top:24px;padding:20px}.workspace-report-contents h3{margin:0 0 14px;}.workspace-report-contents nav{display:flex;flex-direction:column;gap:12px;}.workspace-report-contents nav a{color:#4d453c;text-decoration:none}.workspace-report-contents>.subtle{border-top:1px solid var(--line);padding-top:16px;margin-top:20px;}.workspace-report-layout #lead-detail{min-width:0}.workspace-report-toolbar{display:flex;align-items:center;flex-wrap:wrap;gap:12px;margin-bottom:20px}.workspace-report-toolbar>.actions{margin-left:auto}.workspace-report-toolbar select{max-width:170px;width:auto;}.workspace-report-toolbar .light-mode{display:flex;white-space:nowrap}.workspace-menu{position:relative}.workspace-menu summary{border:1px solid var(--line);border-radius:8px;background:#fff;padding:8px 12px;cursor:pointer;list-style:none}.workspace-menu>div{position:absolute;right:0;top:100%;background:#fff;border:1px solid var(--line);box-shadow:0 8px 28px #231c1618;z-index:20;min-width:170px;padding:8px;border-radius:8px}.workspace-menu>div>a,.workspace-menu>div>button{display:block;white-space:nowrap;width:100%;text-align:left;padding:8px 12px;text-decoration:none;border:0}.workspace-report-layout .report-status>.report-toolbar{display:none}.workspace-report-layout .report-section,.workspace-report-layout h2{scroll-margin-top:24px}
/* Graph keeps its existing data and interaction contract; visual treatment only. */
.graph-workspace{color:#e1e6ef;--ink:#e1e6ef;--muted:#a1acbd;--line:#343c49;--paper:#202732;--bg:#171c23}.graph-workspace .relationship-graph{background:#171c23;border-color:#343c49}.graph-workspace .graph-inspector{background:#202732;border-color:#343c49;color:#e1e6ef}.graph-control-card{border-radius:10px}.graph-workspace{min-height:60vh}
@media(min-width:1600px){.conversation-workspace{grid-template-columns:236px minmax(360px,1fr) 332px}.conversation-main #conversation-messages{padding:32px}.conversation-main #conversation-form{padding-left:32px;padding-right:32px}}
@media(max-width:1250px){.conversation-workspace{grid-template-columns:180px minmax(300px,1fr)}#conversation-outputs{display:none}.workspace-ledger-columns{grid-template-columns:minmax(0,1.4fr) minmax(260px,1fr)}.workspace-report-layout{grid-template-columns:150px minmax(0,1fr)}#main{padding:24px}.workspace-milestones ol{gap:10px}}
@media(max-width:850px){#main{padding:20px 16px}.workspace-ledger-columns{grid-template-columns:1fr}.workspace-milestones ol{grid-template-columns:1fr 1fr;gap:20px}.workspace-report-layout{display:block}.workspace-report-contents{position:static}.workspace-report-contents nav{flex-direction:row;flex-wrap:wrap}.workspace-dimensions{grid-template-columns:1fr}.conversation-workspace{grid-template-columns:160px minmax(0,1fr)}.conversation-main>.source-top,.conversation-main>#conversation-context{padding-left:16px;padding-right:16px}.conversation-main #conversation-messages{padding:20px 16px}.conversation-main #conversation-form{padding:12px 16px}}
@media(max-width:560px){.conversation-workspace{grid-template-columns:minmax(0,1fr)}.conversation-sidebar{max-height:160px;border-bottom:1px solid var(--line);border-right:0;padding:8px 12px;display:none}.conversation-main{min-height:0}.conversation-main>.source-top{min-height:54px}.conversation-compose-actions small{display:none}.conversation-main #conversation-input{min-height:60px}.workspace-facts{grid-template-columns:1fr;gap:12px}.workspace-milestones ol{grid-template-columns:1fr 1fr}.workspace-ledger-meta{align-items:start;flex-direction:column;gap:8px}.workspace-report-row{flex-wrap:wrap}.workspace-filter{padding:16px}.workspace-lead-table th,.workspace-lead-table td{padding:14px}.workspace-list-summary{gap:16px;}.workspace-report-toolbar>.actions{margin-left:0}.workspace-report-toolbar{gap:8px}.card{padding:20px}.workspace-list-card{padding:0}}
.workspace-demand-original{margin-top:16px}.workspace-demand-original summary,.workspace-profile-readonly>summary{cursor:pointer;color:var(--muted);}.workspace-demand-original .workspace-prose{padding-top:16px}.workspace-profile-readonly .card{border:0;padding:16px 0 0;margin:0}.workspace-history-toggle{display:none}@media(max-width:560px){.workspace-history-toggle{display:inline-flex}.workspace-history-open .conversation-sidebar{display:block}}
.conversation-workspace{align-items:stretch}.conversation-sidebar,#conversation-outputs{height:100%;box-sizing:border-box}.conversation-main{height:100%}.workspace-history-toggle{margin-right:8px}.workspace-report-contents nav{max-height:60vh;overflow:auto}.workspace-demand-original .workspace-prose{max-height:400px;overflow:auto}

/* Shared visual hierarchy: one main action; quiet navigation and evidence. */
.sidebar{position:sticky;top:0;height:100dvh;overflow-y:auto;align-self:start;box-sizing:border-box}
.sidebar .wide,.conversation-sidebar>.actions button{min-height:36px;padding:8px 18px;}


.sidebar .nav-link{color:#776c61;text-decoration:none}
.sidebar .nav-link:hover{color:var(--primary);background:#f0e9df}
.sidebar .nav-link.active{color:var(--primary)}

.workspace-list-summary{gap:24px;border-bottom:1px solid var(--line);margin-bottom:24px}
.workspace-list-summary button{border:0;border-bottom:2px solid transparent;border-radius:0;padding:8px 0 16px;background:none;color:var(--muted)}
.workspace-list-summary button[aria-pressed=true]{border-bottom-color:var(--primary);color:var(--ink)}
.workspace-list-summary button strong{font-variant-numeric:tabular-nums}
.workspace-status{white-space:nowrap;gap:8px}
.workspace-lead-table th:nth-child(3),.workspace-lead-table td:nth-child(3){min-width:96px}
.workspace-lead-table .workspace-date{white-space:nowrap;font-variant-numeric:tabular-nums}
.workspace-lead-table td,.workspace-lead-table th{padding:16px 24px}
.workspace-lead-table td:nth-child(2){min-width:80px}
.notice:not(.error),.notice.warn,.workspace-review-status{background:#faf0db;border-color:#e8d3a8;color:#96600c}
.workspace-review-status{border:1px solid #e8d3a8;border-radius:8px;padding:8px 16px;display:inline-block;margin:0 0 8px}
.workspace-danger{color:var(--danger)}
.workspace-visit-toolbar{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap;margin:0 auto 24px;max-width:976px}
.workspace-back-link{color:var(--muted);text-decoration:none}
.workspace-visit-status,.workspace-sources-index{max-width:976px;margin-left:auto;margin-right:auto;box-sizing:border-box}

.workspace-visit-layout{display:grid;grid-template-columns:minmax(0,760px) 192px;gap:24px;max-width:976px;margin:0 auto;align-items:start}
.workspace-visit-body{min-width:0}
.workspace-visit-body .pitch-report-document{max-width:760px;box-sizing:border-box;padding:32px;margin:0 0 24px;}
.workspace-visit-body .pitch-report-section h2{scroll-margin-top:24px}

.pitch-report-section{scroll-margin-top:24px}
.workspace-report-layout{grid-template-columns:minmax(0,760px) 192px;max-width:976px;margin:0 auto}
.workspace-report-layout>#lead-detail{grid-column:1;grid-row:1}
.workspace-report-layout>.workspace-report-contents{grid-column:2;grid-row:1}
.workspace-report-contents{padding:16px;background:#fbf9f4;box-sizing:border-box}
.workspace-report-contents nav a{color:var(--muted);}
.workspace-report-contents nav a:hover{color:var(--primary)}
.workspace-report-toolbar .actions{gap:8px}

.workspace-menu summary{padding:8px 16px;}
.workspace-menu summary::-webkit-details-marker{display:none}
.workspace-menu>div{margin-top:8px;padding:8px;min-width:184px}
.workspace-menu>div>button,.workspace-menu>div>a{padding:8px 16px;color:var(--ink);background:none;}
.workspace-menu>div>button:hover,.workspace-menu>div>a:hover{background:#f6f3ed}
.workspace-menu>div>.workspace-danger{color:var(--danger)}
.workspace-sources{margin:8px 0 16px;color:var(--text-caption)}
.workspace-sources>summary,.pitch-evidence-detail>summary{display:inline-flex;align-items:center;gap:8px;border:1px solid var(--line);border-radius:8px;background:#fbf9f4;padding:0 8px;min-height:24px;cursor:pointer;color:#776c61;list-style:none}
.workspace-sources>summary::-webkit-details-marker{display:none}
.workspace-sources[open]>summary span{transform:rotate(180deg)}
.workspace-sources-content{padding:8px 0 0;overflow-wrap:anywhere}
.workspace-source-line,.workspace-source-line a,.workspace-source-line small,.workspace-sources a,.workspace-sources .citation,.workspace-sources-content .subtle{color:var(--text-caption)}
.workspace-source-line a,.workspace-sources a{text-decoration:none}
.workspace-source-line a:hover,.workspace-sources a:hover,.workspace-excerpt summary:hover{color:var(--primary);text-decoration:underline}
.workspace-excerpt{display:inline;position:relative}
.workspace-excerpt>summary{display:inline;cursor:pointer;color:var(--text-caption);list-style:none}
.workspace-excerpt>div{display:block;color:var(--muted);margin-top:8px}
.workspace-excerpt blockquote{border-left:1px solid var(--line);margin:8px 0;padding:8px 16px;white-space:pre-wrap}
.workspace-sources .report-citations{margin:0;gap:8px}
.workspace-sources .citation{background:none;border:1px solid var(--line);padding:0 8px;min-height:24px}
.workspace-loading{max-width:760px;display:flex;align-items:center;gap:16px;flex-wrap:wrap}
.workspace-loading p{margin:0}
.workspace-loading progress,#people-graph-loading progress{width:100%;height:4px;accent-color:var(--primary);display:block;margin:16px 0 24px}
#people-graph-loading{max-width:760px}
#people-graph-loading .small-button{background:white;color:var(--ink);border:1px solid var(--line)}
/* On a conversation the history is the left panel; global navigation becomes a rail. */
@media(min-width:701px){
  body:has(.conversation-workspace):not(.sidebar-collapsed) .shell{grid-template-columns:64px minmax(0,1fr)}
  body:has(.conversation-workspace) .shell>.sidebar{padding:16px 8px;background:#f6f3ed}
  body:has(.conversation-workspace) .sidebar #new-project,body:has(.conversation-workspace) .sidebar .side-label,body:has(.conversation-workspace) .sidebar #matter-list{display:none}
  body:has(.conversation-workspace) .sidebar nav{margin-top:8px}
  body:has(.conversation-workspace) .sidebar .nav-link{font-size:0;padding:8px;width:48px;min-height:40px;text-align:center}
  body:has(.conversation-workspace) .sidebar .nav-link::before{content:attr(data-nav-icon);}
}
.conversation-sidebar{position:static;background:#f6f3ed}
#conversation-outputs{background:#fbf9f4}
.conversation-main,.conversation-main #conversation-form{background:white}



@media(max-width:1250px){.workspace-visit-layout,.workspace-report-layout{grid-template-columns:minmax(0,1fr) 160px;gap:16px}}
@media(max-width:850px){

  .workspace-visit-layout,.workspace-report-layout{display:flex;flex-direction:column}
  .workspace-report-contents{order:-1;position:static;width:100%;margin-bottom:16px}
  .workspace-report-contents nav{display:flex;flex-direction:row;flex-wrap:wrap;gap:8px 16px;max-height:144px}
  .workspace-report-layout>#lead-detail,.workspace-visit-body{width:100%}
}
@media(max-width:560px){
  .workspace-visit-body .pitch-report-document{padding:24px 16px}
  .workspace-visit-toolbar{gap:16px;margin-bottom:16px}
  .workspace-visit-toolbar>.actions{margin-left:auto}
  .workspace-menu summary{padding:8px}
  .workspace-list-summary{gap:16px}
  .workspace-list-summary button{white-space:nowrap}
  .workspace-list-summary button strong{margin-left:4px}
  .workspace-lead-table td,.workspace-lead-table th{padding:16px}

}
@media(prefers-reduced-motion:reduce){.spinner{animation:none}}

/* Complete the type scale and spacing across the reviewed workspace screens. */



.tag{border-radius:8px}
.page-top [data-action=conversation-new].primary{padding:8px 18px;min-height:36px}
.workspace-chat-empty .eyebrow{color:var(--muted)}
.workspace-disclosure{display:inline-block;color:#776c61;background:#fbf9f4;border:1px solid var(--line);border-radius:8px;padding:0 8px;margin-left:8px;white-space:nowrap}
.workspace-filter{padding:24px;gap:16px}
.workspace-extra-filters .card{margin-top:16px}
.workspace-lead-table small{margin-top:8px}
.workspace-list-card .profile-pager{padding:16px 24px}
.sidebar{gap:24px}.sidebar nav{margin-top:24px}
.card{margin-bottom:24px}
.workspace-report-layout .report-detailed,.workspace-report-layout .report-understanding{gap:24px}
.workspace-report-layout .report-status{margin-top:0}
.workspace-report-layout .report-detailed .card{padding:24px 32px}
.workspace-report-layout .eyebrow+h2{margin:8px 0 24px}




.workspace-report-layout .report-group-label{color:var(--muted);padding-bottom:8px;margin:24px 0 0}
.workspace-report-layout .report-brief-item{padding:16px 0}
.workspace-report-layout .report-brief-item .output-header{gap:8px}
.workspace-report-layout .report-brief-item p{margin:8px 0 16px}
.workspace-report-layout .report-next-actions{gap:24px;margin-top:24px;padding-top:24px}

.workspace-report-layout .report-full{border-radius:14px}
.workspace-report-layout .report-full .report-section{padding:24px 0}
.workspace-report-toolbar{gap:16px;margin-bottom:24px}
.workspace-report-contents h3{margin-bottom:16px}
.workspace-report-contents nav{gap:16px}
.workspace-report-contents>.subtle{margin-top:24px}
.workspace-visit-body .pitch-report-section{padding-bottom:32px}
.workspace-visit-body .pitch-report-section h2{margin:16px 0 24px}
.workspace-visit-body .pitch-report-prose,.workspace-visit-body .pitch-money-prose{margin:8px 0}
.workspace-visit-body .pitch-money-prose h4{margin:16px 0 8px}
.workspace-visit-body .pitch-money-line{margin:8px 0}
.workspace-visit-body .pitch-basis-item{margin:8px 0 16px}
.conversation-sidebar{padding:24px 16px}
.conversation-sidebar>h3{margin:24px 8px 8px}
.conversation-history-item{padding:16px;margin-bottom:8px}
.conversation-history-preview{margin-top:8px}
.conversation-main>.source-top{padding:16px 24px}
.conversation-main>#conversation-context{padding:8px 24px}
.conversation-main #conversation-messages{padding:32px 24px}
.conversation-main #conversation-form{padding:16px 24px 24px}
.conversation-compose-actions{gap:8px;margin-top:16px}
.conversation-turn .conversation-user{margin-bottom:24px;padding:16px 24px;border-radius:14px 14px 8px 14px}
.workspace-output-card{gap:16px;border-radius:14px;margin:16px 0}
.workspace-output-icon,.workspace-file-chip{border-radius:8px}
#conversation-outputs{padding:24px}
@media(max-width:850px){
  .workspace-report-layout .report-detailed .card{padding:24px}
  .conversation-main>.source-top{padding:16px}
  .conversation-main>#conversation-context{padding:8px 16px}
  .conversation-main #conversation-messages{padding:24px 16px}
  .conversation-main #conversation-form{padding:16px}
}
@media(max-width:560px){
  .workspace-filter{padding:16px}
  .workspace-report-layout .report-detailed .card,.workspace-report-layout .report-full{padding:16px}
  .workspace-report-toolbar{gap:8px}
}

/* Second visual review: keep outputs reachable, compact history, readable graph tools. */
.conversation-workspace{position:relative;grid-template-columns:clamp(180px,16vw,240px) minmax(0,1fr) clamp(240px,24vw,372px)}
.conversation-sidebar{min-width:0}

.conversation-history-item[aria-current=true]{background:#faf1f2;color:var(--ink);border:0}
.conversation-history-heading{display:flex;flex-wrap:wrap;align-items:center;gap:4px;min-width:0;}
.conversation-history-heading strong{display:block;flex:0 0 100%;min-width:0;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.conversation-history-badge{display:block;color:var(--primary)}
.conversation-history-subtitle{display:block;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.conversation-turn .conversation-user{width:fit-content;max-width:min(480px,100%);margin-left:auto;overflow-wrap:anywhere}
.conversation-markdown{line-height:1.65}
.conversation-markdown :is(h1,h2,h3,h4,h5,h6){margin:1.1em 0 .4em;line-height:1.35}
.conversation-markdown :is(h1,h2){font-size:1.25em}
.conversation-markdown :is(h3,h4,h5,h6){font-size:1.08em}
.conversation-markdown > :first-child{margin-top:0}
.conversation-markdown :is(ul,ol){padding-inline-start:1.5em}
.conversation-markdown pre{max-width:100%;overflow:auto;white-space:pre;padding:12px;background:#f8f5f0}
.conversation-markdown .platform-table{margin:12px 0}
.conversation-markdown .platform-table :is(th,td){height:auto;padding:8px 12px}
.conversation-main>.source-top{flex-wrap:nowrap}
.conversation-main #conversation-title{min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.conversation-main #conversation-input{border-color:#d6ccbd;outline:none}
.conversation-main #conversation-input:focus{border-color:var(--primary);box-shadow:0 0 0 2px color-mix(in srgb,var(--primary) 14%,transparent)}
#conversation-outputs{display:block;background:#fbf9f4;border-color:#e7e0d4}
.workspace-output-heading{display:flex;align-items:center;gap:8px;justify-content:space-between}
.workspace-output-heading h3{margin:0 0 16px}
.workspace-output-heading h3 small{color:var(--muted);margin-left:8px}
.workspace-index-item{display:block;width:100%;padding:16px 0;margin:0;text-align:left;border-radius:0}
.workspace-output-name{display:flex;align-items:baseline;gap:8px;min-width:0}
.workspace-output-name strong{overflow-wrap:anywhere}
.workspace-output-dot{display:inline-block;flex:0 0 6px;height:6px;width:6px;border-radius:50%;background:#958a7d}
.workspace-output-dot.success{background:#20835e}.workspace-output-dot.working{background:#3d70ad}.workspace-output-dot.error{background:#b53b48}
.workspace-index-item>small{display:block;color:var(--text-caption);margin:8px 0 0 14px;font-variant-numeric:tabular-nums}
.workspace-customer-card{margin-top:24px;padding-top:24px;border-top:1px solid var(--line);border-bottom:0}
.workspace-outputs-toggle,.workspace-outputs-close{display:none}
.workspace-lead-table thead th{background:#fbf9f4}
@media(min-width:851px){
  body:has(.conversation-workspace):not(.sidebar-collapsed) .shell{grid-template-columns:68px minmax(0,1fr)}
  body:has(.conversation-workspace) .shell>.sidebar{padding:16px 4px}
  body:has(.conversation-workspace) .sidebar .nav-link{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;width:60px;min-height:52px;padding:8px 2px;font-size:0;border-radius:8px}

  body:has(.conversation-workspace) .sidebar .nav-link::after{content:attr(data-nav-label);display:block;max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  body:has(.conversation-workspace) .sidebar .nav-link[aria-current]::before{color:var(--primary)}
  body:has(.conversation-workspace) .sidebar .nav-link[aria-current]{box-shadow:inset 2px 0 var(--primary);background:#faf1f2}
}
@media(max-width:899px){
  .conversation-workspace{grid-template-columns:180px minmax(0,1fr)}
  #conversation-outputs{display:none}
  .workspace-outputs-toggle,.workspace-outputs-close{display:inline-flex}
  .workspace-outputs-open #conversation-outputs{display:block;position:absolute;z-index:5;right:0;top:64px;bottom:0;height:auto;width:min(372px,90%);box-shadow:-8px 0 24px #231c1614}
}
@media(max-width:560px){
  .conversation-workspace{grid-template-columns:minmax(0,1fr)}
  .conversation-main>.source-top{padding:8px 16px;gap:4px;min-height:54px}
  .workspace-outputs-open #conversation-outputs{top:54px;padding:16px}
  .conversation-history-item{padding:12px}
}

.graph-search{display:flex;flex-wrap:wrap;align-items:end;gap:16px}
.graph-search>label:first-child{flex:1 1 240px;min-width:0}
.graph-search>label:nth-child(2){flex:0 1 200px;min-width:140px}
.graph-search>label.graph-checkbox{flex:0 0 auto}
.graph-search>button.primary{flex:0 0 auto;grid-column:auto;width:auto;min-height:36px;height:40px;padding:8px 18px;margin-left:auto}
.graph-search input:not([type=checkbox]),.graph-search select{height:40px;min-width:0;border:1px solid #d6ccbd;border-radius:8px;background-color:#fff;padding:8px 12px;outline:none}
.graph-search select:focus,.graph-search input:focus{border-color:var(--primary);box-shadow:0 0 0 2px color-mix(in srgb,var(--primary) 14%,transparent)}
@media(min-width:851px){
  .graph-search{flex-wrap:nowrap}
  .graph-search>label:first-child{flex-basis:180px}
  .graph-search>label:nth-child(2){flex-basis:160px;min-width:128px}
}
.graph-metrics strong{color:#231c16;font-variant-numeric:tabular-nums}
.graph-workspace{--ink:#f6f3ed;--muted:#b7a99c;--line:#54463c;--paper:#2d241d;--bg:#241b15;background:#241b15;border:1px solid #54463c;border-radius:14px;min-height:0;align-items:stretch}
.graph-stage-wrapper{min-width:0;position:relative;background:#241b15;padding-bottom:40px}
.graph-workspace .relationship-graph{background:#241b15;overflow:hidden;border:0}
.graph-workspace .relationship-graph canvas,.graph-workspace .relationship-graph svg{min-width:0;height:670px;min-height:0}
.graph-workspace .graph-inspector{background:#2d241d;color:#f6f3ed;border-color:#54463c;max-height:710px;overflow:auto}
.graph-workspace.graph-inspector-idle{grid-template-columns:minmax(0,1fr)}
.graph-inspector-idle .graph-inspector{display:none}
.graph-legend-panel{position:absolute;left:16px;bottom:56px;max-width:min(260px,55%);background:#30271eeF;border:1px solid #66564a;border-radius:8px;padding:12px;z-index:1;color:#f6f3ed;}
.graph-legend-panel summary{cursor:pointer;color:#e3d8cb;}
.graph-legend-panel .graph-kind-list{display:grid;gap:8px;max-height:180px;overflow:auto;margin-top:12px}
.graph-kind-filter{min-width:0;overflow-wrap:anywhere;align-items:center;}
.graph-kind-filter small{margin-left:auto;font-variant-numeric:tabular-nums;color:#b7a99c}
.graph-kind-filter span{flex-shrink:0}.graph-kind-filter input{accent-color:var(--primary);flex-shrink:0}
.graph-kind-dot svg{display:block;width:10px;height:10px}
.graph-stage-wrapper>.graph-view-tools{position:absolute;right:16px;bottom:56px;max-width:210px;display:flex;flex-wrap:wrap;justify-content:flex-end;gap:8px;padding:8px;background:#30271eee;border:1px solid #66564a;border-radius:8px;z-index:1}
.graph-stage-wrapper .graph-view-tools>label{flex:0 0 100%;justify-content:flex-end;color:#e3d8cb}
.graph-stage-wrapper .graph-view-tools button{padding:4px 8px;background:#3a2f26;color:#f6f3ed;border-color:#66564a;border-radius:8px}
.graph-stage-wrapper .graph-view-tools span{color:#e3d8cb;min-width:32px}
.graph-canvas-footer{position:absolute;left:16px;right:16px;bottom:12px;color:#b7a99c;margin:0;pointer-events:none}
.graph-workspace .graph-node-label,.graph-workspace .graph-edge-label{fill:#f6f3ed;stroke:#241b15}
.graph-workspace .graph-node.selected circle{stroke:#f6f3ed}
@media(max-width:1100px){.graph-workspace{grid-template-columns:minmax(0,1fr)}.graph-workspace .graph-inspector{max-height:none}.graph-workspace .relationship-graph canvas,.graph-workspace .relationship-graph svg{height:580px}}
@media(max-width:560px){
  .graph-search>label:first-child{flex-basis:100%}.graph-search>label:nth-child(2){flex:1 1 100%}
  .graph-legend-panel{left:8px;bottom:76px;max-width:52%;padding:8px}.graph-legend-panel .graph-kind-list{max-height:128px}
  .graph-stage-wrapper>.graph-view-tools{right:8px;bottom:76px;max-width:42%;gap:4px;padding:4px}
  .graph-canvas-footer{left:8px;right:8px;}.graph-stage-wrapper{padding-bottom:56px}
}

.platform-table{padding:0;max-width:100%}
.platform-table table{width:100%;border-collapse:collapse;text-align:left;table-layout:auto}
.platform-table thead th{color:var(--text-caption);background:#fbf9f4;white-space:nowrap}
.platform-table th,.platform-table td{padding:12px 16px;min-height:48px;height:48px;border-bottom:1px solid #e7e0d4;vertical-align:middle;}
.platform-table tbody tr:hover{background:#fbf9f4}
.platform-table td{padding-top:4px;padding-bottom:4px;}
.platform-table td button:not(.platform-task-id){padding:4px 10px;min-height:32px;}
.platform-table .platform-task-name{display:block;max-width:320px;overflow-wrap:anywhere}
.platform-table .platform-task-id{display:block;text-align:left;color:var(--text-caption);max-width:240px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding:0;margin:0;border:0;background:none;}
.platform-table .platform-task-id:hover{color:var(--primary)}
.platform-table .platform-model-name{display:block;color:var(--text-caption)}
.platform-money,.platform-table .workspace-date{font-variant-numeric:tabular-nums;white-space:nowrap}
.platform-table .workspace-status{padding:4px 8px;border-radius:999px;background:#f3efe9;}
.platform-table .workspace-status.success{background:#eaf5ee}.platform-table .workspace-status.working{background:#edf3fa}.platform-table .workspace-status.error{background:#fbeef0}
.workspace-status.warning{color:#96600c;background:#faf0db}
.platform-table .workspace-status.warning{background:#faf0db}.workspace-status.warning i{background:#96600c}

/* Final review: shared navigation, compact filters and document controls. */
@font-face{font-family:"Playfair Display";font-style:normal;font-weight:700;font-display:swap;src:url("playfair-display-700.ttf") format("truetype")}
.brand .brand-mark,.brand .logo-mark,.brand strong,.brand .logo-type{font-family:"Playfair Display",Georgia,serif;font-weight:700}
.sidebar .nav-link{display:flex;align-items:center;gap:8px;width:100%;min-height:40px;text-align:left;cursor:pointer}
.sidebar .nav-icon{width:16px;height:16px;flex:0 0 16px;pointer-events:none}
.sidebar .nav-label{font:400 13px/1.5 var(--sans);pointer-events:none}
.sidebar .nav-link::before,.sidebar .nav-link::after{content:none!important;display:none!important}
.nav-section-label{font:400 11px/1.5 var(--sans);letter-spacing:.12em;color:#9d9187;margin:0 8px 8px}
.sidebar nav{margin-top:24px}.sidebar #platform-nav{margin-top:0}
.workspace-list-summary button strong{font:400 12px/1.5 var(--sans);font-variant-numeric:tabular-nums;vertical-align:baseline}
.workspace-lead-table tbody tr[data-lead-row]{cursor:pointer}.workspace-lead-table tbody tr[data-lead-row]:hover,.workspace-lead-table tbody tr[data-lead-row]:focus-visible{background:#fbf9f4}
.workspace-filter-fields{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;padding-top:16px}
.workspace-filter-fields label{display:flex;flex-direction:column;gap:8px;min-width:0}.workspace-filter-fields input,.workspace-filter-fields select{width:100%;min-width:0}
.workspace-filter-fields .workspace-urgent{align-self:end;display:inline-flex;flex-direction:row;align-items:center;justify-self:start;width:auto;white-space:nowrap;border:1px solid var(--line);border-radius:24px;padding:8px 12px;cursor:pointer}
.workspace-urgent:has(input:checked){border-color:var(--primary);background:#faf1f2;color:var(--primary)}.workspace-urgent input{width:14px}
.workspace-party-filter{border:0;border-top:1px solid var(--line);margin:24px 0 0;padding:16px 0 0}.workspace-party-filter legend{float:left;width:100%;margin-bottom:8px}.workspace-party-filter label{display:inline-flex;align-items:center;gap:8px;margin-right:24px}.workspace-party-filter small{display:block;margin-top:8px}
.page-top>.actions{flex-shrink:0}.page-top .small-button,.workspace-report-row .small-button{white-space:nowrap;width:auto}
.light-mode{display:inline-flex;align-items:center;background:#f0ece6;border:1px solid var(--line);padding:3px;border-radius:8px}.light-mode button{border:0;background:transparent;color:#776c61;border-radius:6px;white-space:nowrap}.light-mode button.active,.light-mode button[aria-pressed=true]{background:#fff;color:#231c16;box-shadow:0 1px 4px #231c1626}
.workspace-ledger-columns .card{margin-bottom:24px}.workspace-ledger-columns .card p:last-child{margin-bottom:0}
.workspace-visit-status>p,.workspace-visit-status>.subtle,.pitch-scope,.pitch-scope p{font-size:14px;line-height:1.7}
.platform-table-tools{display:flex;justify-content:flex-end;gap:8px;padding:16px 24px;border-bottom:1px solid var(--line)}
.platform-jobs-table table,.platform-usage-table table{table-layout:fixed;width:100%}.platform-jobs-table th:nth-child(1){width:34%}.platform-jobs-table th:nth-child(2){width:16%}.platform-jobs-table th:nth-child(3){width:20%}.platform-jobs-table th:nth-child(4){width:30%}
.platform-jobs-table th:nth-child(3),.platform-jobs-table td:nth-child(3),.platform-usage-table th:nth-child(5),.platform-usage-table td:nth-child(5){text-align:right;white-space:nowrap;font-variant-numeric:tabular-nums}
.platform-usage-table th:first-child{width:34%}.platform-usage-table th:nth-child(2){width:18%}.platform-usage-table th:nth-child(3),.platform-usage-table th:nth-child(4){width:16%}.platform-usage-table th:nth-child(5){width:16%}
.platform-table{padding:0;margin-top:24px}.platform-table td{overflow-wrap:anywhere}.platform-table .workspace-date{overflow-wrap:normal}
.workspace-skeleton{min-height:240px}.workspace-skeleton>div,.graph-inspector-skeleton>div{height:16px;border-radius:8px;margin:16px 0;background:linear-gradient(90deg,#eee8df,#faf8f3,#eee8df);background-size:200% 100%;animation:workspace-shimmer 1.4s linear infinite}.workspace-skeleton>div:first-child{width:48%;height:32px}.workspace-skeleton>div:nth-child(3){width:72%}
@keyframes workspace-shimmer{to{background-position:-200% 0}}
@media(prefers-reduced-motion:reduce){.workspace-skeleton>div,.graph-inspector-skeleton>div{animation:none}}
@media(min-width:701px){body:has(.conversation-workspace) .sidebar .nav-link{font-size:13px;display:flex;flex-direction:column;width:60px;min-height:52px;gap:4px;padding:8px 2px}body:has(.conversation-workspace) .sidebar .nav-label{font-size:11px;max-width:100%;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}body:has(.conversation-workspace) .sidebar .nav-section-label{font-size:11px;letter-spacing:.12em;margin:0 0 8px;text-align:center}}
@media(max-width:700px){.workspace-filter-fields{grid-template-columns:repeat(2,minmax(0,1fr))}.platform-jobs-table table{min-width:640px}.platform-usage-table table{min-width:640px}}
@media(max-width:420px){.workspace-filter-fields{grid-template-columns:minmax(0,1fr)}}

.pitch-related-entity{font-size:14px;line-height:1.7}
.workspace-evidence-line{margin:8px 0 16px}
.workspace-evidence-line>p{display:inline;margin:0}
.workspace-evidence-line>.workspace-sources{display:inline;margin:0 0 0 8px}
.workspace-evidence-line>.workspace-sources[open]{display:block;margin:8px 0 0}

.graph-workspace .graph-neighbor{background:#3a2e25;color:#f6f3ed;border-color:#54463c}
.graph-workspace .graph-neighbor span{color:#c4b5a5}
.graph-workspace .graph-neighbor strong{color:#f6f3ed}

#people-graph-svg .graph-node-label{display:none}
.graph-label-layer{position:absolute;inset:0;pointer-events:none;overflow:hidden}
.graph-label-layer span{position:absolute;transform:translateX(-50%);font:400 12px/1.5 var(--sans);white-space:nowrap;color:#fff;text-shadow:-1px -1px 0 #241b15,1px -1px 0 #241b15,-1px 1px 0 #241b15,1px 1px 0 #241b15,0 0 3px #241b15}

/* Keep the initial shell and the hydrated workspace visually aligned. */
.account-placeholder{display:block;width:120px;height:36px;border-radius:8px;background:#f2eee8}
.sidebar .nav-link[aria-current=page],.sidebar .nav-link.active{background:#faf1f2;color:#6b1522}
.sidebar .nav-label{font-size:13px;font-weight:400}
.sidebar .nav-link[aria-current=page] .nav-label{font-weight:500}
.sidebar .nav-section-label{font-size:11px;letter-spacing:.12em;margin:0 8px 8px}
.sidebar nav{margin-top:24px}
.sidebar #platform-nav{margin-top:24px}
#platform-nav .nav-link + .nav-section-label{margin-top:24px}
.platform-section-nav{margin-bottom:16px}
.sidebar .nav-link{margin:0;min-height:40px;padding:8px}
.conversation-workspace{max-width:none;margin:0}
.workspace-visit-status>p,.workspace-visit-status>.subtle,.pitch-scope,.pitch-scope p,.pitch-related-entity{color:#4d453c}
.graph-workspace,.graph-workspace.graph-inspector-idle{position:relative;display:block}
.graph-workspace .graph-inspector{position:absolute;z-index:4;top:16px;right:16px;bottom:16px;width:min(380px,calc(100% - 32px));max-height:calc(100% - 32px);margin:0;border:1px solid #54463c;border-radius:14px;box-shadow:0 8px 24px #0005;overflow-y:auto;overscroll-behavior:contain}
.graph-workspace .graph-inspector-close{display:block;position:sticky;top:0;z-index:1;margin:0 0 16px auto;background:#2d241d;color:#f6f3ed;border-color:#786754}
.workspace-conversation-loading{padding:24px;max-width:720px;margin:0 auto}
:is([data-workspace="admin"],[data-workspace="admin-ready"]) .sidebar :is(#new-project,#home-nav,#leads-nav,#opportunity-nav,.side-label,#matter-list,.side-note){display:none}
[data-workspace="admin"] #sidebar-sections>nav:first-of-type,[data-workspace="admin"] .sidebar [data-action="platform-api"]{display:none}
@media(max-width:700px){.graph-workspace .graph-inspector{top:96px;max-height:calc(100% - 112px)}}
@media(min-width:851px){body:has(.conversation-workspace) .sidebar #platform-nav{margin-top:24px}body:has(.conversation-workspace) .sidebar .nav-section-label{display:block;font-size:11px;letter-spacing:0;margin:0 0 8px;text-align:center}body:has(.conversation-workspace) .sidebar .nav-link{margin:0 0 8px}}

/* Compact conversation lead links. */
#conversation-outputs .workspace-lead-links{margin-top:12px;padding:12px 0}
#conversation-outputs .workspace-lead-links h3{margin:0;font-size:14px;line-height:1.5}
#conversation-outputs .workspace-lead-links p{margin:6px 0 0;line-height:1.5}
#conversation-outputs .workspace-lead-links + .workspace-customer-card{margin-top:0;padding-top:12px}

/* Compact source text within the customer demand card. */
.workspace-customer-demand .hxzb-content,
.workspace-customer-demand .workspace-prose { font-size:14px; line-height:1.65; }
.workspace-customer-demand .hxzb-content p { margin:0 0 10px; }
.workspace-customer-demand .hxzb-content h3 { font-size:16px; margin:18px 0 10px; }
.workspace-customer-demand .hxzb-content td { padding:8px 10px; min-width:80px; }
.workspace-customer-demand .hxzb-content td:first-child { min-width:100px; }
.workspace-customer-demand .hxzb-table-wrap { margin:12px 0; }

/* One navigation control and account area for every workbench page. */
#sidebar-toggle { position:fixed; top:12px; left:16px; z-index:13; background:var(--paper); }
#sidebar-toggle:hover { background:var(--soft); }
.sidebar-product-name { position:absolute; top:16px; left:62px; right:12px; overflow:hidden; color:var(--primary); font:600 16px/32px var(--sans); white-space:nowrap; }
.graph-standalone #sidebar-toggle { display:none; }
.source-panel, .editor-toolbar { top:0; }
body .shell>#workspace-sidebar { padding-top:60px; overflow:hidden; gap:12px; }
#sidebar-sections { display:flex; flex-direction:column; gap:24px; flex:1; min-height:0; overflow-y:auto; }
#sidebar-sections>* { flex-shrink:0; }
body:has(#sidebar-toggle.hidden) .shell { grid-template-columns:minmax(0,1fr); }
@media (min-width:701px) {
  body.sidebar-collapsed:has(#sidebar-toggle:not(.hidden)):not(.graph-standalone) .shell { grid-template-columns:64px minmax(0,1fr); }
  body.sidebar-collapsed:has(#sidebar-toggle:not(.hidden)):not(.graph-standalone) .shell>#main { grid-column:2; }
}
@media (max-width:700px) {
  body:not(.sidebar-collapsed) .shell>#workspace-sidebar { top:0; height:100dvh; }
  body:not(.sidebar-collapsed) .shell>.sidebar-backdrop { top:0; }
  body:has(#sidebar-toggle:not(.hidden)):not(.graph-standalone) .shell>#main:not(:has(.conversation-workspace)) { padding-top:56px; }
  .conversation-main>.source-top { padding-left:56px; }
}
#sidebar-account { flex:none; padding:8px 0 0; }
#sidebar-account .identity { display:grid; gap:4px; min-width:0; }
#sidebar-account .identity button { width:100%; min-width:0; display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; padding:5px 3px; font-size:12px; }
#sidebar-account .identity #app-logout { background:transparent; border-color:transparent; color:var(--muted); }

.conversation-main { position:relative; }
.workspace-pane-resizer { display:none; position:absolute; top:0; bottom:0; width:10px; z-index:3; cursor:col-resize; touch-action:none; }
.workspace-pane-resizer[data-pane="history"] { left:-5px; }
.workspace-pane-resizer[data-pane="outputs"] { right:-5px; }
.workspace-pane-resizer:is(:hover,:focus-visible,.dragging) { background:#8c1d2f38; outline:none; }
button.workspace-output-card { width:100%; text-align:left; overflow-wrap:anywhere; }

.workspace-editing-document #conversation-outputs { overflow:hidden; }
#conversation-editor:not([hidden]) { display:flex; flex-direction:column; height:100%; min-width:0; }
#conversation-editor h3 { margin:12px 0 4px; overflow-wrap:anywhere; }
.workspace-editor-toolbar { display:flex; gap:8px; flex-wrap:wrap; align-items:center; }
.workspace-editor-toolbar button:last-child { margin-left:auto; }
.workspace-editor-status { font-size:13px; min-height:1.3em; margin:6px 0 10px; }
.workspace-editor-status.error { color:var(--danger); }
.workspace-editor-fields { flex:1; display:flex; flex-direction:column; gap:8px; min-height:0; overflow:auto; }
.workspace-editor-fields textarea { flex:none; width:100%; resize:vertical; line-height:1.6; font-size:14px; background:#fff; }
#conversation-editor [hidden] { display:none; }
.workspace-word-page { width:100%; max-width:820px; min-height:100%; margin:0 auto; padding:clamp(16px,3vw,42px); background:#fff; border:1px solid var(--line); color:var(--ink); font:15px/1.65 ui-serif, "Songti SC", SimSun, serif; overflow-wrap:anywhere; }
.workspace-word-page .word-paragraph { margin:0 0 .65em; min-height:1.55em; white-space:pre-wrap; }
.workspace-word-page h1.word-paragraph { font-size:1.65em; }
.workspace-word-page h2.word-paragraph { font-size:1.35em; }
.workspace-word-page h3.word-paragraph, .workspace-word-page h4.word-paragraph, .workspace-word-page h5.word-paragraph, .workspace-word-page h6.word-paragraph { font-size:1.12em; }
.workspace-word-page .word-center { text-align:center; }
.workspace-word-page .word-right { text-align:right; }
.workspace-word-page .word-justify { text-align:justify; }
.workspace-word-page .word-page-break { display:block; margin-top:1.6em; padding-top:1.6em; border-top:1px solid var(--line); }
.workspace-word-page table { width:100%; margin:0 0 1em; border-collapse:collapse; table-layout:auto; }
.workspace-word-page td, .workspace-word-page th { border:1px solid var(--line); padding:6px 8px; vertical-align:top; }
.workspace-word-page th { background:#f7f4ef; text-align:left; }
.workspace-word-page td > :last-child, .workspace-word-page th > :last-child { margin-bottom:0; }
.workspace-word-page img { max-width:100%; height:auto; vertical-align:middle; pointer-events:none; }
.workspace-word-page.word-edit-mode [data-word-paragraph] { cursor:text; }
.workspace-word-page.word-edit-mode [data-word-paragraph]:hover { background:#fbf7f6; }
.workspace-word-page [contenteditable]:focus { outline:2px solid var(--accent); outline-offset:2px; border-radius:2px; }
.workspace-editor-fields .workspace-markdown-editor { flex:1; resize:none; font-family:ui-monospace,Consolas,monospace; }

@media (min-width:900px) {
  .conversation-workspace {
    --history-pane:clamp(156px,var(--conversation-history-width,min(16vw,240px)),min(35%,460px));
    --right-pane:clamp(240px,var(--conversation-outputs-width, min(24vw,372px)),calc(100% - var(--history-pane) - 360px));
    grid-template-columns:var(--history-pane) minmax(0,1fr) var(--right-pane);
  }
  .conversation-workspace.workspace-editing-document {
    --right-pane:clamp(240px,var(--conversation-editor-width, min(44vw,850px)),calc(100% - var(--history-pane) - 360px));
  }
  .workspace-pane-resizer { display:block; }
}
@media (min-width:561px) and (max-width:899px) {
  .conversation-workspace { grid-template-columns:clamp(156px,var(--conversation-history-width,180px),min(43%,380px)) minmax(0,1fr); }
  .workspace-pane-resizer[data-pane="history"] { display:block; }
}
@media (max-width:899px) {
  .workspace-editing-document #conversation-outputs { width:min(700px,100%); }
}
@media (max-width:700px) {
  #sidebar-account .identity { display:flex; justify-content:space-between; }
  #sidebar-account .identity button { width:auto; padding:7px 12px; }
}

/* Saved Markdown reports need reading space and intrinsic table widths. */
.workspace-report-layout:has(> .help-document.report-full) {
  max-width:none;
  margin:0;
  gap:clamp(12px,1.5vw,24px);
}
@media (min-width:1051px) {
  .workspace-report-layout:has(> .help-document.report-full) {
    grid-template-columns:minmax(0,1fr) clamp(144px,13vw,192px);
  }
}
@media (max-width:1050px) {
  .workspace-report-layout:has(> .help-document.report-full) {
    display:flex;
    flex-direction:column;
    align-items:stretch;
  }
  .workspace-report-layout:has(> .help-document.report-full) > .workspace-report-contents {
    position:static;
    width:auto;
    margin:0;
  }
  .workspace-report-layout:has(> .help-document.report-full) > .workspace-report-contents nav {
    flex-flow:row wrap;
    gap:8px 16px;
    max-height:120px;
  }
}
.workspace-report-layout > .help-document.report-full { padding:clamp(16px,2vw,26px); }
.workspace-report-layout > .help-document.report-full > :is(p,ul,ol,blockquote) { max-width:52em; }
.help-document.report-full .table-wrap.platform-table { margin:16px 0 24px; }
.help-document.report-full .platform-table :is(th,td) {
  height:auto;
  min-height:0;
  padding:9px 12px;
  line-height:1.55;
  vertical-align:top;
  white-space:normal;
  overflow-wrap:break-word;
}
.help-document.report-full .platform-table :is(th,td) :is(a,code) { overflow-wrap:anywhere; }
.help-document.report-full .platform-table table:has(thead th:nth-child(6)) :is(th,td) {
  min-width:5.25rem;
  max-width:18rem;
}
.help-document.report-full .platform-table table:has(thead th:nth-child(6)) :is(th,td):first-child {
  min-width:13rem;
}
