:root{--blue:#1688c9;--sky:#249de0;--blue-soft:#e8f5fd;--background:#f0f6fb;--surface:#fff;--ink:#13233e;--muted:#526a84;--border:#dce7f1;--success:#087d53;--danger:#b32c3d;--radius:16px;--shadow:0 3px 16px #233c5a05;font-family:"Plus Jakarta Sans","Segoe UI",Arial,sans-serif;color:var(--ink);background:var(--background);font-synthesis:none}
*{box-sizing:border-box}body{margin:0;font-size:14px;line-height:1.6}button,input,textarea,select{font:inherit}button,a,input,textarea,select{-webkit-tap-highlight-color:transparent}button,a,select{touch-action:manipulation}button{cursor:pointer}button:disabled{cursor:wait;opacity:.55}a{color:var(--blue)}:focus-visible{outline:3px solid #1688c9;outline-offset:3px}h1,h2,h3,p{margin:0}h1{font-size:30px;line-height:1.25;letter-spacing:-.8px}h2{font-size:17px;line-height:1.45;letter-spacing:-.25px}h3{font-size:16px}svg{display:block}.icon{height:21px;width:21px;fill:none;stroke:currentColor;stroke-width:1.75;stroke-linecap:round;stroke-linejoin:round;flex-shrink:0}.icon-defs{position:absolute;height:0;width:0;overflow:hidden}[hidden]{display:none!important}.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}.skip-link{position:fixed;top:-70px;left:24px;z-index:1000;background:white;padding:12px 20px}.skip-link:focus{top:10px}.muted{color:var(--muted)}.small,small{font-size:12px}.eyebrow{font-size:10px;letter-spacing:1.4px;font-weight:700;color:var(--muted);margin-bottom:8px}.badge{display:inline-flex;align-items:center;gap:7px;border-radius:20px;padding:5px 11px;min-height:28px;font-size:11px;font-weight:600;background:var(--blue-soft);color:#21658d;white-space:nowrap}.dot{display:inline-block;width:7px;height:7px;border-radius:50%;background:var(--sky);margin-right:4px}.button{display:inline-flex;justify-content:center;align-items:center;gap:9px;min-height:44px;padding:10px 17px;border:1px solid transparent;border-radius:10px;font-weight:600;font-size:13px;text-decoration:none;transition:background .15s,border-color .15s}.button.primary{background:var(--sky);color:#092e4c}.button.primary:hover{background:#6dc7f3}.button.secondary{background:white;border-color:var(--border);color:var(--ink)}.button.secondary:hover,.icon-button:hover{background:var(--blue-soft)}.full{width:100%}.icon-button{display:inline-flex;align-items:center;justify-content:center;border:1px solid var(--border);background:white;border-radius:10px;min-height:44px;min-width:44px;color:var(--muted)}.text-link{display:inline-flex;align-items:center;gap:7px;font-size:12px;font-weight:600;text-decoration:none}.text-link .icon{width:16px;height:16px}.brand{display:flex;align-items:center;gap:12px;text-decoration:none;color:var(--ink);padding:6px 0}.brand strong{display:block;font-size:22px;letter-spacing:-.8px}.brand small{display:block;color:var(--muted);font-size:11px}.brand-mark{color:var(--sky);display:block;flex-shrink:0}.brand-mark svg{width:43px;height:43px;fill:none;stroke:currentColor;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round}.brand-mark.large svg{height:70px;width:70px}.dashboard{display:grid;grid-template-columns:242px minmax(0,1fr);min-height:100dvh}.sidebar{background:white;border-right:1px solid var(--border);padding:25px 18px 16px;position:sticky;top:0;height:100dvh;display:flex;flex-direction:column}.nav-label{font-size:10px;letter-spacing:1.5px;color:var(--muted);margin:43px 14px 10px;font-weight:600}nav{display:grid;gap:8px}nav a{display:flex;gap:13px;align-items:center;min-height:48px;padding:12px 15px;border-radius:10px;text-decoration:none;color:#425974;font-weight:500;font-size:13px}nav a:hover{background:#f3f8fc}nav a[aria-current=page]{background:var(--blue-soft);color:#0871ad;font-weight:650}.sidebar-bottom{margin-top:auto;padding-top:25px}.workspace-note{font-size:10px;color:var(--muted);padding:12px 10px;border-radius:9px;background:#f7fafc;margin-bottom:18px}.account{padding-top:17px;border-top:1px solid var(--border);display:flex;gap:9px;align-items:center}.account>span:nth-child(2){min-width:0;flex:1}.account strong{font-size:11px;overflow-wrap:anywhere}.account small{display:block;font-size:10px;color:var(--muted)}.account .icon-button{border:0;min-width:34px}.avatar{display:grid;place-items:center;width:35px;height:35px;background:#dceafb;border-radius:50%;font-size:12px;color:#244a7a;font-weight:650;flex-shrink:0}.small-avatar{height:31px;width:31px;font-size:11px}.workspace{min-width:0}.topbar{height:68px;padding:0 32px;background:#f9fcff;border-bottom:1px solid var(--border);display:flex;justify-content:space-between;align-items:center}.breadcrumb{color:var(--muted);font-size:12px}.breadcrumb span{margin:0 13px;color:#8293a6}.breadcrumb strong{font-weight:500;color:#294665}.topbar-right{display:flex;gap:16px;align-items:center}main{padding:29px 30px 0;max-width:1650px;margin:auto}.page-heading{display:flex;gap:20px;justify-content:space-between;align-items:center;margin-bottom:26px}.page-heading .muted{font-size:13px;margin-top:8px}.heading-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.heading-actions select{font-size:12px;min-height:44px;background:white;border:1px solid var(--border);border-radius:10px;padding:9px 12px;color:#37546e}.card{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);padding:21px;box-shadow:var(--shadow);min-width:0}.card-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:20px}.card-heading p{margin-top:5px}.metric-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;margin-bottom:20px}.metric{display:flex;gap:15px;padding:22px 18px}.feature-icon{display:grid;place-items:center;background:var(--blue-soft);height:43px;width:43px;color:var(--blue);border-radius:11px;flex-shrink:0}.metric .feature-icon{height:39px;width:39px}.metric-label{font-size:11px;color:#37546e;font-weight:500}.metric-value{font-size:29px;font-weight:700;letter-spacing:-.9px;line-height:1.5;font-variant-numeric:tabular-nums}.metric small{font-size:10px;color:var(--muted)}.analysis-grid,.lower-grid{display:grid;grid-template-columns:minmax(0,1.55fr) minmax(0,1fr);gap:20px;margin-bottom:20px}.chart-card{min-height:275px}.chart-svg{width:100%;height:auto;max-height:225px}.chart-grid{stroke:#e5edf4;stroke-width:1}.chart-line{fill:none;stroke:#1598dd;stroke-width:3}.chart-dot{fill:#1598dd}.chart-text{font-size:11px;fill:#526a84}.chart-card details{margin-top:12px;font-size:11px;color:var(--muted)}summary{cursor:pointer}.topic{margin-bottom:18px}.topic:last-child{margin-bottom:0}.topic-label{display:flex;justify-content:space-between;font-size:12px;gap:12px;margin-bottom:7px}.topic-label span:last-child{color:var(--muted);font-variant-numeric:tabular-nums}progress{width:100%;height:8px;border:0;border-radius:10px;overflow:hidden;appearance:none;background:var(--blue-soft);display:block}progress::-webkit-progress-bar{background:var(--blue-soft);border-radius:10px}progress::-webkit-progress-value{background:var(--sky);border-radius:10px}progress::-moz-progress-bar{background:var(--sky);border-radius:10px}.empty{display:flex;flex-direction:column;align-items:center;text-align:center;justify-content:center;gap:9px;padding:34px 18px;min-height:150px;color:var(--muted);font-size:12px}.empty h3{color:var(--ink);font-size:15px}.empty .feature-icon{margin-bottom:4px}.empty p{max-width:380px}.empty .button{margin-top:7px}.table-wrap{overflow-x:auto}table{width:100%;border-collapse:collapse;font-size:11px}th{text-align:left;background:#f2f7fb;font-weight:600;color:#37546e;padding:12px 11px}td{padding:13px 11px;border-bottom:1px solid #edf2f7;vertical-align:middle}tbody tr:last-child td{border:0}td button{border:0;background:none;color:var(--blue);font:inherit;text-align:left;padding:4px 0;min-height:32px}.local-badge{background:var(--blue-soft);color:#14628e;border-radius:7px;padding:4px 8px;font-size:10px;white-space:nowrap}.widget-preview{border:1px solid var(--border);border-radius:13px;overflow:hidden;background:#e2ecf4}.preview-header{background:white;display:flex;gap:10px;align-items:center;padding:13px 14px}.preview-header .brand-mark svg{height:33px;width:33px}.preview-header strong{font-size:13px;display:block}.preview-header small{font-size:10px;color:var(--muted)}.preview-header .badge{margin-left:auto;color:var(--success);background:#e2f8ec;min-height:23px;font-size:10px}.preview-body{padding:13px}.preview-bubble{background:white;border-radius:12px;padding:12px;font-size:11px;line-height:1.7;max-height:160px;overflow:auto;overflow-wrap:anywhere}.preview-suggested{font-size:10px;color:#156e9e;margin:12px 0 6px}.preview-pills{display:flex;flex-wrap:wrap;gap:6px}.preview-pill{font-size:9px;padding:5px 9px;border:1px solid #4aa6d9;border-radius:30px;color:#075c8b;background:#f5fbff}.preview-input{display:flex;gap:8px;padding:10px;background:#f8fbfd;border-top:1px solid var(--border)}.preview-input span:first-child{flex:1;min-width:0;border:1px solid var(--border);border-radius:9px;background:white;font-size:10px;color:var(--muted);padding:9px}.preview-input span:last-child{background:var(--sky);border-radius:9px;display:grid;place-items:center;color:#073b5f;width:36px}.data-note{font-size:11px;color:var(--muted);margin:14px 0}.page-footer{padding:24px 0 20px;border-top:1px solid var(--border);display:flex;justify-content:space-between;gap:15px;font-size:10px;color:var(--muted);margin-top:29px}.notice{display:flex;align-items:flex-start;gap:12px;border:1px solid #cfe2f0;background:#f8fcff;color:#385970;padding:15px 18px;border-radius:11px;font-size:12px;margin-bottom:20px}.notice .icon{height:19px;width:19px}.notice.error{background:#fff5f6;border-color:#efd2d8;color:var(--danger)}.loading{padding:20px;text-align:center;color:var(--muted)}.knowledge-toolbar{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:20px}.search-field{display:flex;align-items:center;gap:10px;background:white;border:1px solid var(--border);border-radius:10px;padding:0 12px;min-height:44px;flex:1;max-width:520px;color:var(--muted);margin:0}.search-field input{border:0;background:none;margin:0;width:100%;outline-offset:0;min-width:0;padding:10px 0;font-size:12px;min-height:44px}.search-field input:focus{outline:none}.search-field:focus-within{outline:2px solid var(--blue);outline-offset:2px}.search-field .icon{height:18px;width:18px}.knowledge-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px}.topic-card{display:flex;flex-direction:column;gap:13px;align-items:stretch}.topic-card h2{margin-bottom:5px}.topic-card p{font-size:12px;color:var(--muted);min-height:40px}.topic-card .card-heading{margin-bottom:0}.topic-card .topic-footer{display:flex;justify-content:space-between;align-items:center;gap:12px;border-top:1px solid #edf2f7;padding-top:13px;margin-top:auto}.topic-card .topic-footer small{font-size:10px;color:var(--muted)}.topic-card button{border:0;padding:5px 0;background:none;min-height:34px;color:#086ea9;font-weight:600;font-size:12px}.knowledge-detail{margin-top:22px}.knowledge-detail>.muted{font-size:12px;margin-bottom:17px}.faq{border-top:1px solid var(--border);padding:17px 0}.faq summary{font-weight:600;color:var(--ink);font-size:13px;line-height:1.7;padding-right:15px}.faq-answer{margin-top:14px;font-size:13px;line-height:1.85;white-space:pre-wrap;overflow-wrap:anywhere;max-width:850px}.faq-sources{display:flex;gap:8px;flex-wrap:wrap;margin-top:14px}.faq-sources a{border:1px solid var(--border);border-radius:20px;padding:6px 10px;font-size:11px;text-decoration:none;background:#f7fafc}.settings-grid{display:grid;grid-template-columns:minmax(0,1.1fr) minmax(0,1fr);gap:20px}.settings-stack{display:flex;flex-direction:column;gap:20px}label:not(.search-field):not(.toggle-row){display:block;font-size:12px;font-weight:600;margin:19px 0 7px}input:not([type=checkbox]),textarea{display:block;width:100%;border:1px solid #cedde9;border-radius:9px;padding:11px 12px;background:white;color:var(--ink);min-height:44px}textarea{resize:vertical;line-height:1.75;font-size:13px}input[readonly]{background:#f3f7fa;color:var(--muted)}.field-help{font-size:11px;color:var(--muted);margin-top:6px}.toggle-row{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:15px 0;border-bottom:1px solid #edf2f7}.toggle-row:last-child{border:0}.toggle-row strong{font-size:12px}.toggle-row small{display:block;font-size:11px;margin-top:4px;color:var(--muted);max-width:260px}.toggle-row input{appearance:none;flex-shrink:0;width:42px;height:24px;border-radius:30px;background:#9eafc0;border:1px solid #8a9cac;position:relative;cursor:pointer}.toggle-row input::before{content:"";position:absolute;height:18px;width:18px;left:2px;top:2px;background:white;border-radius:50%;transition:transform .15s}.toggle-row input:checked{background:var(--blue);border-color:var(--blue)}.toggle-row input:checked::before{transform:translateX(18px)}.system-info{display:grid;grid-template-columns:1fr 1.2fr;font-size:12px;gap:15px;margin:0 0 18px}.system-info dt{color:var(--muted)}.system-info dd{margin:0;overflow-wrap:anywhere}.save-bar{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-top:22px;padding:17px 0}.save-bar>div{display:flex;gap:10px}.form-error{color:var(--danger);font-size:12px;margin:12px 0;overflow-wrap:anywhere}.form-error:empty{display:none}.lock-card{display:flex;flex-direction:column;align-items:center;text-align:center;gap:14px;padding:50px 24px;max-width:650px;margin:35px auto}.lock-card p{max-width:440px;font-size:13px}.conversation-layout{display:grid;grid-template-columns:minmax(240px,32%) minmax(0,1fr);gap:20px;align-items:start}.contact-card{padding:14px;min-height:580px}.contact-card>.small{padding:12px 3px}.contact-button{display:block;width:100%;background:white;border:1px solid transparent;border-bottom-color:#edf2f7;border-radius:9px;padding:13px 10px;text-align:left;min-height:85px}.contact-button:hover{background:#f6faff}.contact-button[aria-pressed=true]{background:var(--blue-soft);border-color:#b5def5}.contact-line{display:flex;justify-content:space-between;gap:8px;font-size:11px}.contact-line strong{color:var(--ink)}.contact-line time{font-size:10px;color:var(--muted)}.contact-button p{font-size:11px;color:var(--muted);margin-top:6px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.thread-card{padding:0;overflow:hidden}.thread-card .card-heading{padding:20px;margin:0;border-bottom:1px solid var(--border)}.thread-messages{min-height:500px;max-height:70dvh;overflow:auto;background:#e7eff6;padding:23px;display:flex;flex-direction:column;gap:16px}.thread-message{align-self:flex-start;max-width:87%;min-width:80px}.thread-message.user{align-self:flex-end}.thread-bubble{background:white;border:1px solid #dbe6f0;border-radius:14px 14px 14px 3px;padding:13px 16px;font-size:13px;line-height:1.8;overflow-wrap:anywhere;white-space:pre-wrap}.user .thread-bubble{background:#cce8f9;border-color:#bddff3;border-radius:14px 14px 3px 14px}.thread-message .message-meta{font-size:10px;color:var(--muted);margin-top:5px}.user .message-meta{text-align:right}.thread-bubble p+p{margin-top:9px}.thread-bubble a{color:#00659b;text-decoration:underline}.thread-bubble ul{padding-left:18px;margin:8px 0}.thread-bubble li{margin:5px 0}.login-screen{min-height:100dvh;display:grid;grid-template-columns:1fr 1fr;align-items:center;gap:70px;padding:70px 10%;max-width:1500px;margin:auto}.login-intro h1{font-size:50px;margin:10px 0 18px;letter-spacing:-2px}.login-intro>.eyebrow{margin-top:28px}.login-intro>p:not(.eyebrow){font-size:18px;line-height:1.8;color:#47637d}.login-note{display:flex;gap:12px;align-items:center;font-size:12px;color:var(--muted);margin-top:45px}.login-card{padding:38px;background:white;border:1px solid var(--border);border-radius:22px;box-shadow:0 12px 50px #345a7b08}.login-card h2{font-size:23px;margin:20px 0 9px}.login-card>.muted{font-size:13px}.login-card .button{margin:15px 0 14px}.login-card>.small{font-size:11px}dialog{border:1px solid var(--border);border-radius:20px;padding:28px;color:var(--ink);max-width:460px;width:calc(100% - 32px);max-height:90dvh;overflow:auto;box-shadow:0 25px 80px #16354f25}dialog::backdrop{background:#112b4660}dialog h2{font-size:21px;margin:14px 0 8px}dialog p{font-size:12px}dialog .button.full{margin-top:15px}.dialog-heading{display:flex;align-items:center;justify-content:space-between;gap:20px}.dialog-heading .close-dialog{margin-left:auto;border:0}.dialog-heading h2{margin:0}.toast{position:fixed;z-index:200;bottom:25px;right:25px;max-width:450px;border:1px solid #b8dbcf;background:#f3fff9;color:#155b40;border-radius:12px;padding:16px 20px;box-shadow:0 4px 25px #0001;font-size:13px}.view{animation:appear .15s ease-out}@keyframes appear{from{opacity:.6}to{opacity:1}}
@media(min-width:1600px){body{font-size:15px}main{padding:35px 38px 0}.metric-label{font-size:13px}.metric-value{font-size:35px}.card{padding:25px}.chart-card{min-height:310px}.preview-bubble{font-size:12px}.preview-pill{font-size:10px}.brand strong{font-size:24px}.topbar{padding:0 38px}}
@media(max-width:1200px){.dashboard{grid-template-columns:205px minmax(0,1fr)}.sidebar{padding:24px 13px}.brand{gap:7px}.brand strong{font-size:19px}.brand-mark svg{width:36px;height:36px}.brand small{font-size:10px}main{padding:24px 20px 0}.topbar{padding:0 20px}.metric-grid{gap:12px}.metric{gap:9px;padding:18px 13px}.metric .feature-icon{height:32px;width:32px}.metric-value{font-size:26px}.metric-label{font-size:10px}.knowledge-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.heading-actions .button{font-size:11px;padding:9px 11px}.analysis-grid,.lower-grid{grid-template-columns:minmax(0,1.3fr) minmax(0,1fr);gap:15px}.card{padding:17px}}
@media(max-width:960px){.sidebar{padding:15px 14px;height:auto;position:static;border-bottom:1px solid var(--border);border-right:0;gap:12px}.dashboard{display:block}.brand{justify-content:center}.brand strong{font-size:23px}.brand small{font-size:11px}.brand-mark svg{width:40px;height:40px}.nav-label,.sidebar-bottom{display:none}nav{display:flex;justify-content:center;gap:8px}nav a{padding:10px 16px;min-height:44px}.topbar{height:54px}.metric-grid{grid-template-columns:repeat(4,minmax(0,1fr))}.metric{display:block}.metric .feature-icon{margin-bottom:10px}.metric-label{font-size:11px}.metric-value{font-size:28px}.metric small{font-size:10px}.page-heading{align-items:start}.page-heading h1{font-size:26px}.heading-actions{justify-content:flex-end}.settings-grid{grid-template-columns:1fr}.login-screen{gap:35px;padding:40px 6%}.login-card{padding:28px}.login-intro h1{font-size:40px}}
@media(max-width:650px){body{font-size:15px}.sidebar{padding:13px 12px}nav{gap:4px;justify-content:space-between}nav a{font-size:10px;padding:8px 7px;gap:7px}nav .icon{height:16px;width:16px}.brand{justify-content:flex-start;margin-left:5px}.brand strong{font-size:21px}.brand-mark svg{height:37px;width:37px}.topbar{padding:0 17px}.breadcrumb{font-size:11px}.topbar-right{gap:8px}.topbar-right .avatar{display:none}main{padding:23px 16px 0}.page-heading{flex-direction:column;gap:17px;margin-bottom:20px}.page-heading .eyebrow{font-size:9px}.page-heading h1{font-size:27px}.page-heading .muted{font-size:12px}.heading-actions{width:100%;justify-content:flex-start;gap:8px}.heading-actions select{flex:1;min-width:0}.heading-actions .button{font-size:11px}.metric-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:11px;margin-bottom:15px}.metric{display:flex;gap:12px;padding:16px 13px}.metric .feature-icon{height:31px;width:31px;margin:3px 0 0}.metric .icon{height:18px;width:18px}.metric-value{font-size:27px}.metric-label{font-size:10px}.metric small{font-size:9px}.analysis-grid,.lower-grid,.knowledge-grid,.conversation-layout{grid-template-columns:1fr;gap:15px}.card{padding:18px}.card-heading h2{font-size:16px}.card-heading .small{font-size:10px}.chart-card{min-height:220px}.knowledge-toolbar{align-items:stretch;flex-direction:column;gap:12px}.knowledge-toolbar>.badge{align-self:flex-start}.topic-card p{min-height:0}.knowledge-grid{gap:13px}.topic-card{gap:13px}.knowledge-detail .card-heading{align-items:start}.knowledge-detail .button{padding:7px 10px;font-size:11px}.faq summary{font-size:14px}.faq-answer{font-size:14px}.notice{font-size:11px;padding:14px}.search-field input{font-size:16px}.contact-card{min-height:0;max-height:390px;overflow:auto}.thread-messages{min-height:400px;padding:16px}.thread-message{max-width:94%}.thread-bubble{font-size:14px;padding:12px 14px}.page-footer{font-size:9px;flex-direction:column;gap:4px;margin-top:24px}.settings-grid{gap:15px}.settings-stack{gap:15px}.save-bar{flex-direction:column;align-items:stretch;gap:10px}.save-bar>div{display:grid;grid-template-columns:1fr 1fr}textarea,input:not([type=checkbox]){font-size:16px}input[readonly]{font-size:14px}.settings-grid label{font-size:13px}.toggle-row strong{font-size:13px}.toggle-row small{font-size:11px}.login-screen{grid-template-columns:1fr;gap:25px;padding:30px 18px}.login-intro{padding:10px 10px 0}.login-intro>.eyebrow,.login-intro>p:not(.eyebrow),.login-note{display:none}.login-intro .brand-mark svg{height:45px;width:45px}.login-intro h1{font-size:32px;margin:10px 0}.login-card{padding:24px}.login-card h2{font-size:21px}.login-intro{display:flex;align-items:center;gap:13px}.toast{left:16px;right:16px;bottom:16px;max-width:none}dialog{padding:22px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}

/* Conversation workspace: equal-height panels with independently scrollable content. */
.conversation-layout{height:clamp(460px,calc(100dvh - 245px),760px);align-items:stretch;min-width:0}
.conversation-layout .contact-card,.conversation-layout .thread-card{height:100%;min-height:0;max-height:none;display:flex;flex-direction:column;overflow:hidden}
.conversation-layout .contact-card{padding:0}
.conversation-layout .thread-card{padding:0}
.contact-card>.search-field{margin:18px 18px 0;flex:0 0 46px;height:46px;max-height:46px}
.contact-card>#contact-total{padding:12px 20px;margin:0;flex-shrink:0}
#contact-list{flex:1;min-height:0;overflow-y:auto;overflow-x:hidden;padding:3px 12px 12px;scrollbar-gutter:stable;overscroll-behavior-y:contain;scroll-padding:8px}
#more-contacts{width:calc(100% - 32px);margin:8px 16px 16px;flex-shrink:0}
.contact-button{min-height:92px;padding:16px 12px;border-radius:10px}
.contact-line{align-items:baseline;gap:12px}
.contact-line strong{overflow-wrap:anywhere}
.contact-line time{white-space:nowrap;flex-shrink:0}
.contact-button p{margin:7px 0 4px;font-size:12px;line-height:1.5}
.search-field input{border:0;background:transparent;box-shadow:none;min-width:0}
.search-field:focus-within{outline:2px solid var(--blue);outline-offset:2px}
.conversation-layout .thread-card>.card-heading{min-height:72px;flex-shrink:0;gap:12px}
.conversation-layout .thread-messages{flex:1;min-height:0;max-height:none;padding:24px;overflow-y:auto;overflow-x:hidden;overscroll-behavior-y:contain;scrollbar-gutter:stable;scroll-padding:16px}
.thread-day{align-self:center;padding:4px 12px;border-radius:12px;background:#f4f8fc;font-size:11px;color:var(--muted);margin:0 0 4px}
.thread-message{max-width:min(88%,760px);flex-shrink:0}
.thread-bubble{white-space:normal;font-size:14px;line-height:1.7;padding:15px 18px}
.user .thread-bubble{white-space:pre-wrap}
.thread-bubble p+p{margin-top:12px}
.thread-bubble ul,.thread-bubble ol{padding-left:21px;margin:10px 0}
.thread-bubble li{margin:7px 0;padding-left:2px}
.thread-bubble ul ul,.thread-bubble ol ol{margin:6px 0}
.thread-bubble strong{font-weight:650}
.thread-bubble a{color:#00659b;text-underline-offset:3px;overflow-wrap:anywhere}
.thread-bubble code{font-family:Consolas,monospace;font-size:.9em;background:#f0f5f9;border-radius:4px;padding:1px 4px}
.message-meta{padding:0 3px;line-height:1.6}
.thread-messages>.empty{margin:auto;min-height:0}
#recent-conversations .recent-table{table-layout:fixed;min-width:0;width:100%}
.recent-table th:first-child{width:29%}
.recent-table th:last-child{width:14%}
.recent-table td{overflow-wrap:anywhere;vertical-align:middle}
.recent-table .preview-cell{font-size:12px;line-height:1.6}
.recent-table td:last-child{white-space:nowrap}
@media(max-width:650px){
  .conversation-layout{height:auto;grid-template-rows:minmax(240px,34dvh) minmax(400px,66dvh)}
  .conversation-layout .thread-messages{padding:16px}
  .contact-card>.search-field{margin:14px 14px 0}
  .contact-card>#contact-total{padding:10px 18px}
  .thread-message{max-width:94%}
  .thread-bubble{font-size:14px;padding:13px 15px}
  .recent-table th:first-child{width:34%}
  .recent-table th:last-child{width:17%}
}
#access-dialog{width:440px;max-width:calc(100vw - 32px);padding:32px;border-radius:20px;box-shadow:0 24px 80px #15314d33}
#access-dialog .dialog-heading{margin-bottom:18px;align-items:center}
#access-dialog .close-dialog{min-width:44px;min-height:44px;border:0;background:transparent;color:var(--muted)}
#access-dialog h2{margin:0;font-size:22px;line-height:1.4;letter-spacing:-.4px}
#access-description{margin:8px 0 24px;font-size:13px;line-height:1.65}
#access-form label{display:block;margin:20px 0 8px;font-size:13px;font-weight:600}
#access-form input{min-height:50px;padding:12px 14px;border-radius:10px;font-size:16px;background:#f5f9fd}
#access-form input:focus-visible{outline:2px solid var(--blue);outline-offset:2px;box-shadow:none}
#access-form .form-error{margin:10px 0 0;font-size:13px;line-height:1.6}
#access-form .form-error:empty{display:none}
#access-form>.button{min-height:48px;margin-top:24px;border-radius:10px;font-size:14px;font-weight:600}
@media(max-width:480px){#access-dialog{padding:24px;border-radius:18px}#access-dialog h2{font-size:21px}}

/* Keep the footer at the page bottom without covering scrollable content. */
.brand-mark img{display:block;width:43px;height:43px;object-fit:contain;flex-shrink:0}
.preview-header .brand-mark img{width:33px;height:33px}
.dashboard>.workspace{display:flex;flex-direction:column;min-height:100dvh}
.workspace>.topbar{flex-shrink:0}
.workspace>main{display:flex;flex-direction:column;flex:1;width:100%;margin:0 auto}
.workspace>main>.view{margin-bottom:29px}
.workspace>main>.page-footer{margin-top:auto;flex-shrink:0}
@media(max-width:960px){.dashboard{display:flex;flex-direction:column}.dashboard>.workspace{flex:1;min-height:0}}

/* Compact topics; complete knowledge opens in an independently scrollable dialog. */
#knowledge-topics{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.knowledge-topic{display:flex;align-items:center;gap:16px;width:100%;min-height:88px;padding:20px;border:1px solid var(--border);border-radius:13px;background:var(--surface);color:var(--ink);text-align:left;transition:background .15s,border-color .15s}
.knowledge-topic:hover{background:#f8fcff;border-color:#a8d4ee}
.knowledge-topic .feature-icon{width:40px;height:40px}
.knowledge-topic-title{min-width:0;flex:1}
.knowledge-topic-title strong{display:block;font-size:14px;font-weight:650;line-height:1.5;overflow-wrap:anywhere}
.knowledge-topic-title small{display:block;font-size:12px;color:var(--muted);margin-top:3px}
.knowledge-topic>.icon{height:18px;width:18px;color:var(--blue)}
body.knowledge-open{overflow:hidden}
#knowledge-dialog{width:820px;max-width:calc(100vw - 32px);max-height:84dvh;padding:0;overflow:hidden}
#knowledge-dialog[open]{display:flex;flex-direction:column}
.knowledge-dialog-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:20px;flex-shrink:0;padding:22px 26px;border-bottom:1px solid var(--border);background:var(--surface)}
#knowledge-heading{font-size:21px;line-height:1.4;margin:0}
#knowledge-description{margin-top:6px;font-size:12px}
.knowledge-dialog-heading .close-dialog{flex-shrink:0;border:0}
.knowledge-content{min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:26px;scrollbar-gutter:stable;scroll-padding:20px}
.knowledge-content:focus-visible{outline-offset:-3px}
.knowledge-entry+ .knowledge-entry{margin-top:26px;padding-top:26px;border-top:1px solid var(--border)}
.knowledge-answer{font-size:16px;line-height:1.85;color:var(--ink);overflow-wrap:anywhere}
.knowledge-answer p{font-size:inherit;line-height:inherit}
.knowledge-answer p+p{margin-top:16px}
.knowledge-answer ul,.knowledge-answer ol{padding-left:24px;margin:16px 0}
.knowledge-answer li{margin:8px 0}
.knowledge-answer a{color:#08689e;text-decoration:underline;text-underline-offset:3px}
.knowledge-references{display:flex;flex-wrap:wrap;gap:8px 16px;margin-top:16px}
.knowledge-references a{font-size:12px;color:var(--muted);text-underline-offset:3px;line-height:1.8}
@media(max-width:650px){#knowledge-topics{grid-template-columns:1fr;gap:10px}.knowledge-topic{padding:16px;min-height:78px;gap:13px}#knowledge-dialog{max-height:88dvh}.knowledge-dialog-heading{padding:18px}#knowledge-heading{font-size:19px}.knowledge-content{padding:20px}}
