:root{color-scheme:light;--bg: #eef2f5;--panel: #ffffff;--line: #d8e0e8;--text: #17212e;--muted: #667487;--accent: #176b87;--accent-strong: #104e62;--aqua: #17a8a3;--ink: #101923;--danger: #9d2f2f;--shadow: 0 18px 50px rgba(16, 25, 35, .1)}*{box-sizing:border-box}body{margin:0;background:linear-gradient(180deg,rgba(23,107,135,.08),transparent 280px),var(--bg);color:var(--text);font-family:Inter,Arial,Helvetica,sans-serif;font-size:14px}html,body{overflow-x:hidden}button,select,input,textarea{font:inherit;max-width:100%}button{background:var(--accent);border:1px solid var(--accent);border-radius:8px;color:#fff;cursor:pointer;font-weight:700;min-height:36px;padding:8px 12px}button:hover{background:var(--accent-strong)}button:disabled{cursor:not-allowed;opacity:.6}select,input,textarea{border:1px solid var(--line);border-radius:8px;color:var(--text);padding:9px 10px;width:100%}textarea{min-height:104px;resize:vertical}a{color:var(--accent);font-weight:700}.app-shell{display:grid;grid-template-columns:292px minmax(0,1fr);min-height:100vh;overflow-x:hidden}.sidebar{background:linear-gradient(180deg,#101923,#162335);color:#fff;display:flex;flex-direction:column;gap:24px;padding:22px}.brand{align-items:center;display:flex;gap:12px}.brand-logo{border-radius:12px;height:44px;width:44px}.brand h1,.brand p,.case-header h2,.case-header p,.part-row p,.topbar p,.summary-box p{margin:0}.brand h1{font-size:22px}.brand p{color:#b8c4d2}nav{display:grid;gap:8px}nav button{align-items:center;background:transparent;border-color:#334155;color:#e7eef5;display:flex;gap:9px;justify-content:flex-start;text-align:left}nav button.active{background:linear-gradient(135deg,#17a8a338,#176b8757);border-color:#87dcde8c;color:#fff}.nav-icon{flex:0 0 18px}.nav-label{min-width:0;overflow:hidden;text-overflow:ellipsis}main{min-width:0;padding:22px}.topbar{align-items:center;background:var(--panel);border:1px solid var(--line);border-radius:10px;display:flex;gap:12px;justify-content:space-between;margin-bottom:16px;padding:14px}.topbar>div{min-width:0}.topbar-actions{align-items:center;display:flex;flex-shrink:0;gap:8px}.status-details{min-width:0;width:100%}.status-details summary{align-items:center;cursor:pointer;display:flex;gap:8px;justify-content:space-between;list-style:none}.status-details summary::-webkit-details-marker{display:none}.status-caret{border-bottom:2px solid currentColor;border-right:2px solid currentColor;color:var(--muted);flex:0 0 8px;height:8px;transform:rotate(45deg);transition:transform .16s ease;width:8px}.status-details[open] .status-caret,.sidebar-utility-panel[open] .status-caret{transform:rotate(225deg)}.status-details p{color:var(--muted);line-height:1.4;margin-top:6px;overflow-wrap:anywhere}.sidebar-mode{display:block}.sidebar-mode .sidebar{gap:10px;min-height:auto;padding:10px;position:sticky;top:0;z-index:40}.sidebar-mode .brand{gap:8px}.sidebar-mode .brand-logo{border-radius:10px;height:34px;width:34px}.sidebar-mode .brand h1{font-size:18px}.sidebar-mode .brand p{display:none}.sidebar-mode nav{grid-template-columns:repeat(3,minmax(0,1fr))}.sidebar-mode nav button{justify-content:center;min-height:40px;padding:7px 6px;text-align:center}.sidebar-mode main{display:flex;flex-direction:column;padding:10px}.sidebar-mode .topbar{margin-bottom:0;margin-top:10px;order:20}.sidebar-mode .sidebar-utility-panel{display:block;padding:0}.sidebar-utility-panel summary{list-style:none}.sidebar-utility-panel summary::-webkit-details-marker{display:none}.sidebar-utility-summary{align-items:center;cursor:pointer;display:grid;gap:8px;grid-template-columns:auto minmax(0,1fr) auto;min-height:38px;padding:8px 10px}.sidebar-utility-status{color:var(--muted);font-size:12px;min-width:0;overflow:hidden;text-align:right;text-overflow:ellipsis;white-space:nowrap}.sidebar-utility-content{border-top:1px solid var(--line);display:grid;gap:10px;padding:10px}.sidebar-status p{color:var(--muted);line-height:1.4;margin:4px 0 0;overflow-wrap:anywhere}.sidebar-mode .topbar-actions{display:grid;grid-template-columns:minmax(84px,auto) minmax(0,1fr);width:100%}.sidebar-mode .topbar button,.sidebar-mode .account-menu-trigger{justify-content:center;min-height:34px;max-width:none;padding:6px 8px;width:100%}.sidebar-mode .sidebar-utility-panel .account-avatar{flex-basis:24px;font-size:11px;height:24px;width:24px}.sidebar-mode .account-popover{bottom:calc(100% + 8px);left:0;min-width:0;right:0;top:auto}.sidebar-mode .assistant-grid,.sidebar-mode .profile-grid,.sidebar-mode .profile-form,.sidebar-mode .chat-input{grid-template-columns:1fr}.sidebar-mode .assistant-grid{gap:10px}.sidebar-mode .assistant-grid>aside{grid-column:auto;grid-row:auto;order:3}.sidebar-mode .sidebar-case-switcher{order:1}.sidebar-mode .chat-panel{grid-column:auto;grid-row:auto;grid-template-rows:minmax(0,1fr) auto;height:clamp(360px,calc(100vh - 210px),680px);max-height:none;min-height:0;order:2;overflow:hidden;position:static}.sidebar-mode .chat-input{margin-top:10px}.sidebar-mode .chat-input textarea{max-height:120px;min-height:84px}.sidebar-mode .summary-box{max-height:320px;min-height:160px}.sidebar-mode .metrics,.sidebar-mode .insight-metrics,.sidebar-mode .insight-lanes{grid-template-columns:1fr}.sidebar-mode .section-header,.sidebar-mode .case-header,.sidebar-mode .insights-output-header,.sidebar-mode .profile-hero{align-items:flex-start;flex-direction:column}.sidebar-mode .section-header,.sidebar-mode .panel,.sidebar-mode .insights-output{padding:12px}.sidebar-mode .case-card-stats,.sidebar-mode .data-controls,.sidebar-mode .insights-control-row,.sidebar-mode .part-row{grid-template-columns:1fr}.sidebar-auth{padding:12px}.sidebar-auth .auth-panel{grid-template-columns:1fr;max-width:420px}.sidebar-auth .auth-brand h1{font-size:32px}.sidebar-auth .auth-brand p{font-size:14px}.account-menu{position:relative}.account-menu-trigger{align-items:center;background:#fff;border-color:var(--line);color:var(--text);display:inline-flex;gap:8px;max-width:220px}.account-menu-trigger>span:last-child{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.account-avatar{align-items:center;background:#101923;border-radius:999px;color:#fff;display:inline-flex;flex:0 0 28px;font-size:12px;font-weight:900;height:28px;justify-content:center;width:28px}.account-popover{background:#fff;border:1px solid var(--line);border-radius:8px;box-shadow:var(--shadow);display:grid;gap:8px;min-width:220px;padding:10px;position:absolute;right:0;top:calc(100% + 8px);z-index:60}.account-popover p{color:var(--muted);margin:3px 0 0;overflow-wrap:anywhere}.account-popover button{width:100%}.account-popover button:first-of-type{background:#fff;border-color:var(--line);color:var(--text)}.label{color:var(--muted);display:block;font-size:12px;font-weight:800;letter-spacing:0;text-transform:uppercase}.panel,.metric,.case-card{background:var(--panel);border:1px solid var(--line);border-radius:10px}.panel,.metric,.case-card{min-width:0}body:has(.auth-shell){overflow-x:hidden}.boot-screen,.auth-shell{align-items:center;display:flex;min-height:100vh;justify-content:center;padding:24px}.boot-screen{gap:12px}.boot-screen img{border-radius:14px;height:54px;width:54px}.auth-shell{background:radial-gradient(circle at 20% 20%,rgba(23,168,163,.16),transparent 26%),radial-gradient(circle at 78% 28%,rgba(23,107,135,.18),transparent 28%),#101923}.auth-panel{display:grid;gap:24px;grid-template-columns:minmax(280px,420px) minmax(320px,430px);max-width:980px;width:100%}.auth-brand{align-self:center;color:#fff;display:grid;gap:16px}.auth-brand img,.profile-hero img{border-radius:18px;height:72px;width:72px}.auth-brand h1{font-size:44px;margin:0}.auth-brand p{color:#bed0dc;font-size:17px;line-height:1.5;margin:0}.auth-card{background:#fffffff5;border:1px solid rgba(255,255,255,.24);border-radius:12px;box-shadow:0 28px 80px #00000047;display:grid;gap:14px;padding:16px}.auth-card form,.profile-form{display:grid;gap:10px}.auth-tabs{background:#eef3f6;border:1px solid var(--line);border-radius:10px;display:grid;gap:4px;grid-template-columns:1fr 1fr;padding:4px}.auth-tabs button{background:transparent;border-color:transparent;color:var(--muted)}.auth-tabs button.active{background:#fff;border-color:var(--line);color:var(--text)}.form-error{background:#fff3f3;border:1px solid #e3b6b6;border-radius:8px;color:var(--danger);margin:0;padding:8px 10px}.view-stack,.case-list,.case-workspace{display:grid;gap:14px}.case-list.compact{gap:10px}.section-header{align-items:center;background:var(--panel);border:1px solid var(--line);border-radius:10px;display:flex;gap:18px;justify-content:space-between;padding:16px}.section-header h2,.section-header p{margin:0}.section-header h2{font-size:26px;margin-top:3px}.section-header p{color:var(--muted);line-height:1.45;margin-top:5px;max-width:720px}.section-pills{display:flex;flex-wrap:wrap;gap:7px;justify-content:flex-end}.section-pills span{background:#eef8fb;border:1px solid #9ccbd6;border-radius:999px;color:#12323c;font-size:12px;font-weight:800;padding:6px 10px;white-space:nowrap}.metrics{display:grid;gap:12px;grid-template-columns:repeat(4,minmax(0,1fr))}.metric{display:grid;gap:4px;padding:14px}.metric strong{display:block;font-size:26px;line-height:1.05;margin-top:0;overflow-wrap:anywhere}.case-card{box-shadow:0 10px 28px #1019230d;overflow:hidden}.case-accordion{display:block}.case-accordion summary{cursor:pointer;list-style:none}.case-accordion summary::-webkit-details-marker{display:none}.case-accordion summary:before{display:none}.case-header{align-items:center;background:#fff;border-bottom:1px solid var(--line);display:flex;gap:14px;justify-content:space-between;padding:15px}.case-header>div:first-child{min-width:0}.case-header h2{font-size:18px;margin-top:5px;overflow-wrap:anywhere}.case-title-block{flex:1.2 1 260px}.case-token{background:#eef3f6;border:1px solid var(--line);border-radius:999px;color:var(--accent-strong);display:inline-flex;font-size:12px;font-weight:900;padding:4px 8px}.case-header p,.part-row p,.muted{color:var(--muted)}.updated{text-align:right;min-width:150px}.updated small{color:var(--muted);display:block;margin-top:3px}.case-badges{display:flex;flex:.9 1 220px;flex-wrap:wrap;gap:6px;justify-content:flex-end}.case-badges span{background:#fff;border:1px solid var(--line);border-radius:999px;color:var(--muted);font-size:12px;font-weight:700;padding:4px 8px}.case-card-stats{align-items:center;display:grid;gap:10px;grid-template-columns:auto auto minmax(150px,auto) auto}.case-card-stats>div{background:#f8fafc;border:1px solid var(--line);border-radius:8px;min-width:74px;padding:8px 10px}.case-card-stats strong{display:block;font-size:15px;margin-top:2px}.case-expand-cue{background:#101923;border-radius:999px;color:#fff;font-size:12px;font-weight:900;padding:7px 10px}.case-accordion[open] .case-expand-cue{background:#eef8fb;color:#12323c}.case-accordion[open] .case-expand-cue:before{content:"Close"}.case-accordion[open] .case-expand-cue{font-size:0}.case-accordion[open] .case-expand-cue:before{font-size:12px}.part-list{background:#f8fafc;display:grid;gap:8px;padding:10px}.part-row{background:#fff;border:1px solid var(--line);border-radius:8px;display:grid;gap:12px;grid-template-columns:150px minmax(0,1.4fr) 180px minmax(150px,auto);padding:12px}.part-row.empty{background:#fbfdfe;color:var(--muted)}.part-name strong{display:block;margin-bottom:3px}.data-controls{align-items:end;display:grid;gap:12px;grid-template-columns:minmax(280px,1fr) auto}.data-count{min-width:140px;text-align:right}.data-count strong{display:block;margin-top:4px}.data-count small{color:var(--muted);display:block;margin-top:3px}.show-more-button{justify-self:center;min-width:220px}.part-row details{min-width:150px}.part-row summary{color:var(--accent);cursor:pointer;font-weight:800}.history-list{display:grid;gap:8px;margin-top:10px}.history-item{border:1px solid var(--line);border-radius:6px;display:grid;gap:6px;padding:9px}.history-actions{display:flex;flex-wrap:wrap;gap:6px}.history-actions:empty{display:none}.history-actions a,.history-actions button{align-items:center;background:#fff;border:1px solid var(--line);border-radius:6px;color:var(--text);display:inline-flex;font-size:12px;font-weight:800;min-height:30px;padding:5px 8px;text-decoration:none}pre{background:#f8fafc;border:1px solid var(--line);border-radius:6px;margin:0;max-height:240px;overflow:auto;padding:8px;white-space:pre-wrap}.assistant-grid{align-items:start;display:grid;gap:14px;grid-template-columns:minmax(0,1fr) minmax(300px,380px)}.assistant-grid>aside{grid-column:2}.chat-panel{grid-column:1;grid-row:1}.panel{padding:14px}.panel label{display:block;margin-bottom:6px}.summary-box{background:#f8fafc;border:1px solid var(--line);border-radius:8px;margin-top:14px;max-height:520px;min-height:220px;overflow:auto;padding:12px}.content-toolbar,.message-header{align-items:center;display:flex;gap:8px;justify-content:space-between;margin-bottom:6px}.content-toolbar{margin-bottom:8px}.copy-button{background:#fff;border-color:var(--line);color:var(--text);flex-shrink:0;height:32px;min-height:32px;padding:0;width:32px}.profile-grid{display:grid;gap:14px;grid-template-columns:minmax(280px,360px) minmax(0,1fr)}.profile-hero{align-items:center;background:linear-gradient(135deg,#101923,#163246);color:#fff;display:flex;gap:14px}.profile-hero h2,.profile-hero p{margin:0}.profile-hero .label,.profile-hero p{color:#bed0dc}.profile-form{grid-template-columns:repeat(2,minmax(0,1fr))}.profile-form button,.profile-form .form-error{grid-column:1 / -1}.panel>button{margin-top:12px;width:100%}.document-action-row{align-items:stretch;display:grid;gap:8px;grid-template-columns:minmax(0,1fr) 42px;margin-top:12px}.document-action-row button{min-height:42px}.icon-button{align-items:center;display:inline-flex;justify-content:center;padding:0}.button-icon{display:block}.document-analysis-status{background:#f8fafc;border:1px solid var(--line);border-radius:8px;display:grid;gap:8px;margin-top:10px;padding:10px}.document-analysis-status.complete{background:#f2fbf6;border-color:#b9dfc8}.document-analysis-status.error{background:#fff7f7;border-color:#e0b4b4}.document-analysis-header{display:grid;gap:3px}.document-analysis-header strong{font-size:13px}.document-analysis-status p{color:var(--muted);font-size:12px;margin:0;overflow-wrap:anywhere}.document-progress{background:#e5ebf0;border-radius:999px;height:9px;overflow:hidden}.document-progress span{background:linear-gradient(90deg,#176b87,#2f8f5b);display:block;height:100%;transition:width .24s ease}.document-analysis-status.active .document-progress span{background-size:160% 100%;animation:progress-sheen 1s linear infinite}.document-analysis-meta{display:grid;gap:6px;grid-template-columns:repeat(3,minmax(0,1fr))}.document-analysis-meta span{background:#fff;border:1px solid var(--line);border-radius:6px;color:var(--muted);font-size:12px;font-weight:800;padding:5px 6px;text-align:center}.document-reference-panel{border-top:1px solid var(--line);display:grid;gap:9px;margin-top:12px;padding-top:12px}.document-reference-header{align-items:center;display:flex;justify-content:space-between}.document-reference-header>div{min-width:0}.document-reference-list{display:grid;gap:7px;max-height:260px;overflow:auto;padding-right:2px}.document-reference-item{border:1px solid var(--line);border-radius:8px;display:grid;gap:8px;grid-template-columns:minmax(0,1fr) auto;padding:8px}.document-reference-item.selected{background:#eef8fb;border-color:#9ccbd6}.document-reference-item strong,.document-reference-item span{display:block}.document-reference-item strong{font-size:12px;line-height:1.25;overflow-wrap:anywhere}.document-reference-item span{color:var(--muted);font-size:11px;margin-top:3px}.document-reference-error{color:var(--danger)!important}.document-reference-actions{align-items:center;display:flex;gap:5px}.document-reference-actions a,.document-reference-actions button{border-radius:6px;font-size:11px;min-height:28px;padding:5px 7px}.document-reference-actions a{align-items:center;background:#fff;border:1px solid var(--line);color:var(--text);display:inline-flex;font-weight:800;text-decoration:none}.document-preview-backdrop{align-items:center;background:#0f172a94;display:flex;top:0;right:0;bottom:0;left:0;justify-content:center;padding:24px;position:fixed;z-index:50}.document-preview-modal{background:#fff;border-radius:8px;box-shadow:0 24px 80px #0f172a47;display:grid;grid-template-rows:auto minmax(0,1fr);height:min(860px,92vh);overflow:hidden;width:min(1100px,96vw)}.document-preview-header{align-items:center;border-bottom:1px solid var(--line);display:flex;gap:12px;justify-content:space-between;padding:10px 12px}.document-preview-header>div{min-width:0}.document-preview-header strong{display:block;font-size:14px;line-height:1.25;overflow-wrap:anywhere}.document-preview-actions{align-items:center;display:flex;flex-wrap:wrap;gap:7px;justify-content:flex-end}.document-preview-actions a,.document-preview-actions button{min-height:32px;padding:6px 10px}.document-preview-actions a{align-items:center;background:#fff;border:1px solid var(--line);border-radius:6px;color:var(--text);display:inline-flex;font-size:13px;font-weight:800;text-decoration:none}.document-preview-modal iframe{border:0;height:100%;width:100%}.chat-panel{display:grid;box-shadow:var(--shadow);grid-template-rows:minmax(0,1fr) auto;height:calc(100vh - 120px);min-height:min(640px,calc(100vh - 120px));overflow:hidden;position:sticky;top:18px}.chat-log{display:grid;gap:10px;align-content:start;min-height:0;overflow:auto;padding:2px}.chat-message{border:1px solid var(--line);border-radius:12px;max-width:min(760px,86%);overflow-wrap:anywhere;padding:10px 12px}.chat-message.user{background:#176b87;border-color:#176b87;color:#fff;justify-self:end}.chat-message.assistant{background:#fbfdfe;justify-self:start}.chat-message.loading{background:#f8fafc;border-style:dashed;color:var(--muted);justify-self:start}.chat-message.error{border-color:var(--danger);color:var(--danger)}.message-author{color:var(--muted);display:block;font-size:11px;font-weight:800;text-transform:uppercase}.chat-message.user .message-author{color:#d7edf3}.chat-evidence{border-top:1px solid var(--line);display:grid;gap:8px;margin-top:10px;padding-top:9px}.chat-evidence-header{align-items:center;color:var(--muted);display:flex;font-size:11px;font-weight:800;justify-content:space-between;text-transform:uppercase}.chat-source-list,.chat-evidence-chunks{display:flex;flex-wrap:wrap;gap:6px}.chat-source-list button,.chat-evidence-chunks button{background:#f8fafc;border:1px solid var(--line);border-radius:6px;color:var(--text);cursor:pointer;font-size:12px;font-weight:800;max-width:100%;min-height:30px;overflow-wrap:anywhere;padding:6px 8px;text-align:left}.chat-source-list button span{background:#176b87;border-radius:4px;color:#fff;display:inline-block;font-size:10px;margin-right:6px;padding:2px 4px}.chat-evidence-details summary{color:var(--muted);cursor:pointer;font-size:12px;font-weight:800}.chat-evidence-chunks{margin-top:7px}.chat-evidence-chunks button{display:grid;gap:2px}.chat-evidence-chunks button span{color:var(--muted);font-size:11px;font-weight:700}.chat-input{display:grid;gap:8px;grid-template-columns:minmax(0,1fr) 112px;margin-top:12px;min-width:0}.chat-input textarea{border-color:#c9d5df;max-height:168px;min-height:118px;overflow:auto;resize:none}.send-button{align-items:center;display:inline-flex;gap:7px;justify-content:center}.history-item button,.history-item a{justify-self:start}.chat-reference-bar{display:flex;flex-wrap:wrap;gap:6px;grid-column:1 / -1}.chat-reference-bar button{background:#eef8fb;border:1px solid #9ccbd6;border-radius:999px;color:#12323c;font-size:12px;min-height:28px;max-width:100%;overflow:hidden;padding:5px 9px;text-overflow:ellipsis;white-space:nowrap}.loading-strip{align-items:center;background:#f8fafc;border:1px dashed var(--line);border-radius:8px;color:var(--muted);display:flex;gap:6px;margin-bottom:10px;padding:10px 12px}.insights-layout{display:grid;gap:14px}.insights-header{align-items:stretch}.insights-controls{align-self:stretch;background:#f8fafc;border:1px solid var(--line);border-radius:8px;display:grid;gap:10px;min-width:min(420px,100%);padding:12px}.insights-controls label{color:var(--muted);font-size:12px;font-weight:800;text-transform:uppercase}.insights-controls p{color:var(--muted);font-size:12px;margin:0}.insights-control-row{display:grid;gap:8px;grid-template-columns:minmax(0,1fr) auto}.insight-metrics{display:grid;gap:12px;grid-template-columns:repeat(4,minmax(0,1fr))}.insight-lanes{display:grid;gap:12px;grid-template-columns:repeat(3,minmax(0,1fr))}.insight-lane{background:#fff;border:1px solid var(--line);border-radius:8px;display:grid;gap:8px;padding:14px}.insight-lane strong,.insight-lane p{margin:0}.insight-lane p{color:var(--muted)}.lane-icon{align-items:center;border-radius:8px;display:inline-flex;height:34px;justify-content:center;width:34px}.lane-icon.opportunity{background:#eef8fb;color:#176b87}.lane-icon.risk{background:#fff3f3;color:#9d2f2f}.lane-icon.action{background:#f2fbf6;color:#2f8f5b}.insight-lane.opportunity{border-top:4px solid #2f8f5b}.insight-lane.risk{border-top:4px solid #b65050}.insight-lane.action{border-top:4px solid #176b87}.insights-output{background:#fff;border:1px solid var(--line);border-radius:8px;min-height:420px;padding:16px}.insights-output-header{align-items:center;border-bottom:1px solid var(--line);display:flex;gap:12px;justify-content:space-between;margin:-2px 0 14px;padding-bottom:12px}.insights-output-header h3{margin:2px 0 0}.insights-output-actions{align-items:center;display:flex;flex-wrap:wrap;gap:8px;justify-content:flex-end}.insights-output-actions>span{background:#eef3f6;border-radius:999px;color:var(--muted);font-size:12px;font-weight:800;padding:5px 9px}.loading-strip span{animation:pulse-dot 1s infinite ease-in-out;background:var(--accent);border-radius:999px;display:inline-block;height:7px;width:7px}.loading-strip span:nth-child(2){animation-delay:.14s}.loading-strip span:nth-child(3){animation-delay:.28s}@keyframes pulse-dot{0%,80%,to{opacity:.35;transform:translateY(0)}40%{opacity:1;transform:translateY(-3px)}}@keyframes progress-sheen{0%{background-position:0 0}to{background-position:160% 0}}.markdown-body{display:grid;gap:8px}.markdown-body h2,.markdown-body h3,.markdown-body h4,.markdown-body p,.markdown-body ul{margin:0}.markdown-body h2{font-size:18px}.markdown-body h3{font-size:16px}.markdown-body h4{font-size:14px}.markdown-body ul{padding-left:20px}.markdown-body li{margin:3px 0}.markdown-body hr{border:0;border-top:1px solid var(--line);margin:2px 0;width:100%}@media(max-width:900px){.app-shell,.assistant-grid,.auth-panel,.chat-input,.profile-grid,.profile-form{grid-template-columns:1fr}.app-shell{display:block}.sidebar{gap:12px;min-height:auto;padding:12px 14px;position:sticky;top:0;z-index:40}.brand{gap:10px}.brand-logo{border-radius:10px;height:38px;width:38px}.brand h1{font-size:19px}.brand p{display:none}nav{grid-template-columns:repeat(3,minmax(0,1fr))}nav button{justify-content:center;min-height:38px;padding:7px 6px;text-align:center}main{padding:14px}.topbar{margin-bottom:12px}.topbar-actions{align-self:stretch;justify-content:flex-end}.auth-shell{align-items:stretch;padding:16px}.auth-panel{align-content:center;max-width:480px}.auth-brand h1{font-size:36px}.auth-brand p{font-size:15px}.assistant-grid>aside,.chat-panel{grid-column:auto;grid-row:auto}.assistant-grid>aside{order:2}.chat-panel{grid-template-rows:minmax(360px,60vh) auto;height:auto;max-height:none;min-height:0;order:1;overflow:visible;position:static}.metrics,.insight-metrics,.insight-lanes{grid-template-columns:repeat(2,minmax(0,1fr))}.section-header{align-items:flex-start;flex-direction:column}.section-pills{justify-content:flex-start}.insights-controls{min-width:0;width:100%}.case-header{align-items:flex-start;flex-direction:column}.case-badges{justify-content:flex-start}.case-card-stats{grid-template-columns:repeat(3,minmax(0,1fr)) auto;width:100%}.part-row{grid-template-columns:1fr}.part-row details{min-width:0}.summary-box{max-height:360px;min-height:180px}.document-reference-list{max-height:220px}.document-preview-backdrop{padding:10px}.document-preview-modal{height:94vh;width:100%}}@media(max-width:560px){body{font-size:13px}main,.sidebar{padding:12px}.sidebar{position:static}.brand-logo{height:34px;width:34px}nav button{font-size:13px}.metrics,.insight-metrics,.insight-lanes{grid-template-columns:1fr}.topbar{align-items:flex-start;flex-direction:column;gap:10px}.topbar button{width:100%}.topbar-actions{display:grid;grid-template-columns:1fr;width:100%}.account-menu-trigger{justify-content:center;max-width:none;width:100%}.account-popover{left:0;min-width:0;right:0}.content-toolbar,.message-header{align-items:flex-start;flex-direction:column}.copy-button{width:32px}.updated{min-width:0;text-align:left}.data-controls{align-items:stretch;grid-template-columns:1fr}.data-count{text-align:left}.case-badges{justify-content:flex-start;width:100%}.section-header{padding:12px}.section-header h2{font-size:22px}.section-pills{width:100%}.section-pills span{flex:1 1 auto;text-align:center;white-space:normal}.case-card-stats{grid-template-columns:repeat(2,minmax(0,1fr))}.case-card-stats>div,.case-expand-cue{min-width:0;text-align:left}.case-expand-cue{text-align:center}.insights-control-row{grid-template-columns:1fr}.insights-output-actions{justify-content:flex-start;width:100%}.show-more-button{min-width:0;width:100%}.panel,.auth-shell{padding:12px}.auth-brand{gap:10px}.auth-brand img,.profile-hero img{border-radius:14px;height:56px;width:56px}.auth-brand h1{font-size:32px}.auth-card{padding:12px}.assistant-grid{gap:10px}.chat-panel{grid-template-rows:minmax(360px,62vh) auto}.chat-input textarea{max-height:140px}.chat-message{max-width:100%}.chat-input button{width:100%}.chat-reference-bar button{white-space:normal}.document-analysis-meta{grid-template-columns:1fr}.document-reference-header,.document-reference-item{align-items:flex-start;grid-template-columns:1fr}.document-reference-actions{flex-wrap:wrap;width:100%}.document-reference-actions a,.document-reference-actions button{flex:1 1 auto;justify-content:center}.document-preview-header{align-items:flex-start;flex-direction:column}.document-preview-actions{justify-content:flex-start;width:100%}.document-preview-actions a,.document-preview-actions button{flex:1 1 auto;justify-content:center}.document-preview-modal{height:96vh}.profile-hero{align-items:flex-start;flex-direction:column}.profile-form button{width:100%}.insights-output{min-height:0;padding:12px}.insights-output-header{align-items:flex-start;flex-direction:column;gap:8px}}@media(max-width:420px){nav button{gap:4px;min-height:44px;padding:7px 4px}.nav-icon{height:20px;width:20px}.nav-label{font-size:11px}}
