/* RTSB / Linear-inspired workspace. One stylesheet, shared component tokens. */
:root {
  color-scheme: dark;
  --canvas: #101113;
  --sidebar: #141517;
  --surface: #18191c;
  --surface-raised: #1e2023;
  --surface-hover: #232529;
  --line: #292b30;
  --line-strong: #3c3f46;
  --ink: #eeeff2;
  --muted: #a0a3ac;
  --subtle: #858993;
  --accent: #79aaff;
  --action: #2563eb;
  --violet: #a9a0ff;
  --green: #71d5a0;
  --amber: #e8bf74;
  --red: #f29999;
  --blue: #95b8f8;
  --radius: 10px;
  --sidebar-width: 224px;
  font-family: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 14px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body { margin: 0; background: var(--canvas); color: var(--ink); line-height: 1.55; -webkit-font-smoothing: antialiased; }
::selection { background: #5a5875; color: #fff; }
a { color: var(--ink); text-decoration: none; }
a:hover { color: #fff; }
button, input, select, textarea { font: inherit; }
button, summary, a { -webkit-tap-highlight-color: transparent; }
button, summary { cursor: pointer; }
button:disabled { opacity: .4; cursor: not-allowed; }
button { color: inherit; }
button, a, input, textarea, select, summary { outline-offset: 4px; }
:focus-visible { outline: 2px solid var(--violet); }
input, textarea, select { outline: none; }
[hidden] { display: none !important; }
svg.icon { width: 18px; height: 18px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 8px; font-size: 30px; line-height: 1.25; letter-spacing: -1.1px; font-weight: 600; overflow-wrap: anywhere; }
h2 { margin-bottom: 8px; font-size: 15px; line-height: 1.4; letter-spacing: -.25px; font-weight: 600; }
h3 { margin-bottom: 8px; font-size: 17px; font-weight: 550; letter-spacing: -.35px; }
p { margin-bottom: 16px; }
label { display: block; color: #d4d5dc; font-size: 13px; font-weight: 450; }
input:not([type=checkbox]):not([type=file]), textarea, select {
  width: 100%; min-width: 0; min-height: 40px; padding: 9px 11px; border: 1px solid var(--line-strong); border-radius: 6px;
  background: #121315; color: var(--ink); transition: border-color .15s, box-shadow .15s;
}
input::placeholder, textarea::placeholder { color: #828690; opacity: 1; }
input:focus, textarea:focus, select:focus { border-color: #8b83d9 !important; box-shadow: 0 0 0 3px #a9a0ff12; }
label > input:not([type=checkbox]), label > select { margin-top: 7px; }
input[type=checkbox] { width: 16px; height: 16px; margin: 2px 0 0; accent-color: var(--accent); flex-shrink: 0; }
textarea { resize: vertical; line-height: 1.6; }
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='m4 6 4 4 4-4' fill='none' stroke='%23a0a3ac' stroke-width='1.5'/%3E%3C/svg%3E"); background-position: right 10px center; background-size: 16px; background-repeat: no-repeat; padding-right: 32px; }
.muted { color: var(--muted); }
.small, small { font-size: 12px; }
.danger { color: var(--red) !important; }
.mono { font-family: 'SFMono-Regular', Consolas, monospace; font-size: 12px; letter-spacing: .2px; }
.full { width: 100%; }
.sr-only, .skip-link:not(:focus) { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
.skip-link:focus { position: fixed; top: 8px; left: 8px; z-index: 100; padding: 12px; background: var(--accent); color: #141600; border-radius: 6px; }
.primary, .secondary, .file-button { min-height: 36px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 7px 13px; border-radius: 6px; font-size: 12px; font-weight: 600; line-height: 20px; text-decoration: none; transition: background .15s, border-color .15s; }
.primary { border: 1px solid #4785ed; background: var(--action); color: #fff; box-shadow: 0 1px 2px #0003, inset 0 1px #fff5; }
.primary:hover:not(:disabled) { background: #2c6ce8; color: #fff; }
.secondary, .file-button { border: 1px solid var(--line-strong); background: var(--surface-raised); color: var(--ink); box-shadow: inset 0 1px #ffffff06; }
.secondary:hover:not(:disabled), .file-button:hover { border-color: #555963; background: var(--surface-hover); color: #fff; }
.primary .icon, .secondary .icon { width: 15px; height: 15px; }
.text-button { display: inline-flex; justify-content: center; align-items: center; gap: 7px; padding: 6px 8px; min-height: 32px; border: 0; border-radius: 5px; background: none; color: #b8b4e8; font-size: 12px; }
.text-button:hover:not(:disabled) { background: #ffffff06; color: #dedbff; }
.icon-button { width: 32px; height: 32px; padding: 7px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid transparent; border-radius: 6px; background: none; color: var(--muted); flex-shrink: 0; }
.icon-button:hover { background: var(--surface-hover); color: var(--ink); border-color: var(--line); }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 40; width: var(--sidebar-width); padding: 24px 14px 0; background: var(--sidebar); border-right: 1px solid var(--line); display: flex; flex-direction: column; }
.brand { display: flex; align-items: center; gap: 10px; padding: 0 8px; font-size: 19px; font-weight: 650; letter-spacing: -.2px; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 36px; border: 1px solid #344a6b; border-radius: 8px; background: linear-gradient(145deg,#233047,#18202f); color: var(--accent); }
.brand-mark .icon { width: 24px; height: 24px; }
.brand-sub { display: block; margin-top: 1px; font-size: 10px; font-weight: 400; letter-spacing: .1px; color: var(--subtle); }
.workspace-tag { margin-left: auto; padding: 1px 5px; border: 1px solid var(--line-strong); border-radius: 4px; font: 10px/1.6 Consolas,monospace; color: #b9b7cf; }
.sidebar-search { display: flex; align-items: center; gap: 9px; margin: 30px 2px 28px; padding: 8px 9px; border: 1px solid var(--line); border-radius: 6px; color: var(--subtle); font-size: 12px; background: #111214; }
.sidebar-search .icon { width: 15px; height: 15px; }
kbd { margin-left: auto; min-width: 19px; padding: 0 5px; border: 1px solid var(--line); border-radius: 3px; font: 11px/18px inherit; text-align: center; color: var(--subtle); }
.nav-label { padding: 0 11px; margin: 0 0 9px; font-size: 10px; font-weight: 500; letter-spacing: .4px; color: var(--subtle); }
.sidebar-nav { display: grid; gap: 3px; }
.nav-item { position: relative; display: flex; gap: 10px; align-items: center; padding: 10px 11px; border: 1px solid transparent; border-radius: 6px; color: #acafb7; font-size: 12px; }
.nav-item:hover { background: #1d1e21; }
.nav-item.is-active { background: #232528; border-color: #2d2f34; color: #f4f4f5; }
.nav-item.is-active:before { content: ''; position: absolute; left: -15px; top: 12px; bottom: 12px; width: 2px; border-radius: 3px; background: var(--accent); }
.nav-item.is-active .icon { color: var(--accent); }
.sidebar-bottom { margin-top: auto; }
.workspace-note { display: flex; align-items: center; gap: 9px; margin: 20px 8px; color: #b7bac1; font-size: 11px; }
.workspace-note > .icon { color: #878a95; width: 17px; height: 17px; }
.workspace-note small { display: block; color: var(--subtle); font-size: 10px; margin-top: 2px; }
.profile { display: flex; align-items: center; gap: 9px; margin: 0 -14px; padding: 16px 17px; border-top: 1px solid var(--line); }
.avatar { width: 29px; height: 29px; display: grid; place-items: center; flex-shrink: 0; background: #313044; color: #d8d3ff; border: 1px solid #4c4766; border-radius: 7px; font-size: 12px; }
.profile-name { min-width: 0; flex: 1; color: #dadce3; font-size: 11px; overflow-wrap: anywhere; }
.profile-name small { display: block; font-size: 10px; color: var(--subtle); }
.app-main { min-height: 100vh; margin-left: var(--sidebar-width); }
.topbar { height: 56px; padding: 0 32px; display: flex; align-items: center; gap: 10px; border-bottom: 1px solid var(--line); background: #111214ed; }
.breadcrumbs { display: flex; gap: 13px; align-items: center; font-size: 11px; color: var(--subtle); }
.breadcrumbs > span:last-child { color: #d3d5dc; }
.breadcrumbs .icon { width: 12px; height: 12px; color: #575b65; }
.topbar-label { display: flex; align-items: center; gap: 7px; margin-left: auto; color: var(--muted); font-size: 10px; }
.dot { display: inline-block; width: 6px; height: 6px; flex-shrink: 0; border-radius: 50%; background: var(--accent); }
.content { max-width: 1840px; padding: 38px 32px 28px; margin: 0 auto; }
.page-header { display: flex; justify-content: space-between; gap: 20px; align-items: center; margin-bottom: 30px; }
.page-header p { margin-bottom: 0; font-size: 13px; }
.eyebrow { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; color: var(--subtle); text-transform: uppercase; letter-spacing: 1.4px; font-size: 9px; font-weight: 550; }
.heading-dot { color: var(--accent); }
.stats { display: grid; grid-template-columns: repeat(3,1fr) 1.4fr; margin-bottom: 24px; padding: 4px 0 24px; border-bottom: 1px solid var(--line); }
.stat { padding: 0 22px; border-left: 1px solid var(--line); min-width: 0; }
.stat:first-child { padding-left: 0; border: 0; }
.stat > span { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 11px; }
.stat > span .icon { width: 14px; height: 14px; }
.stat > strong { display: block; margin: 9px 0 3px; font-size: 30px; line-height: 1.3; letter-spacing: -.9px; font-weight: 500; font-variant-numeric: tabular-nums; }
.stat > small { display: block; color: var(--subtle); font-size: 10px; overflow-wrap: anywhere; }
.stat .model-state { display: flex; align-items: center; gap: 7px; min-height: 39px; font-size: 16px; letter-spacing: -.2px; color: var(--amber); }
.stat .model-state.ready { color: #dadce3; }
.stat .model-state .dot { background: var(--green); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 2px 6px #0000000a; min-width: 0; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.section-head h2 { margin: 0; font-size: 13px; }
.section-title { display: flex; align-items: center; gap: 9px; min-width: 0; }
.step-number { font: 10px/1 Consolas,monospace; color: #7b7f89; }
.count, .badge { display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 3px 8px; border: 1px solid transparent; border-radius: 5px; font-size: 10px; font-weight: 500; white-space: nowrap; line-height: 18px; }
.count { padding: 0 6px; background: #25272c; color: #b1b4bf; font-variant-numeric: tabular-nums; }
.neutral, .draft { color: #b3b7c2; background: #26282e; border-color: #363942; }
.review { color: var(--amber); background: #e8bf740d; border-color: #e8bf7420; }
.queued, .processing { color: var(--blue); background: #95b8f80c; border-color: #95b8f822; }
.failed { color: var(--red); background: #f299990c; border-color: #f2999922; }
.status-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex-shrink: 0; font-style: normal; }
.stat .status-dot { width: 7px; height: 7px; }
.status-dot.processing { background: transparent; border: 1.5px solid var(--blue); width: 9px; height: 9px; }
.status-dot.review { background: var(--amber); border: 0; }
.create-case { margin-bottom: 24px; border: 1px dashed #34373c; border-radius: 7px; background: #ffffff02; scroll-margin-top: 28px; }
.create-case > summary { display: flex; align-items: center; gap: 8px; padding: 11px 15px; font-size: 12px; color: #d0d3db; list-style: none; }
summary::-webkit-details-marker { display: none; }
.create-case > summary .icon { width: 15px; height: 15px; color: #a2a5ad; }
.create-case > summary .muted { margin-left: auto; font-size: 10px; }
.disclosure-icon { transition: transform .15s; }
details[open] > summary > .disclosure-icon { transform: rotate(90deg); }
.new-case { padding: 0 18px 16px; }
.new-case form { display: grid; grid-template-columns: 1.5fr 1fr auto; align-items: end; gap: 16px; }
.new-case p { margin: 12px 0 0; font-size: 11px; }
.cases-table { overflow: hidden; }
.table-heading { padding: 14px 18px; min-height: 65px; }
.tab-indicator { width: 6px; height: 6px; background: var(--accent); border-radius: 2px; }
.table-search { display: flex; align-items: center; gap: 7px; width: 275px; padding: 0 8px; border: 1px solid var(--line); border-radius: 6px; background: #131416; color: var(--subtle); }
.table-search > .icon { width: 14px; height: 14px; }
.table-search input[type=search] { padding: 6px 0; min-height: 32px; background: none; border: 0; border-radius: 0; box-shadow: none; font-size: 11px; }
.table-search input[type=search]:focus-visible { outline: none; }
.table-search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 2px #79aaff24; }
.search-submit { display: flex; padding: 4px; background: none; border: 0; color: var(--subtle); }
.search-submit .icon { width: 14px; height: 14px; }
.table-scroll { position: relative; overflow: auto; }
.cases-table table { width: 100%; border-collapse: collapse; text-align: left; }
.cases-table th { padding: 11px 18px; background: #151619; border-bottom: 1px solid var(--line); color: var(--subtle); font-size: 10px; font-weight: 450; white-space: nowrap; }
.cases-table td { padding: 16px 18px; border-bottom: 1px solid var(--line); color: #cdd0d9; font-size: 12px; }
.cases-table tr:last-child td { border-bottom: 0; }
.cases-table tbody tr:hover { background: #ffffff03; }
.case-link { display: flex; align-items: center; gap: 11px; min-width: 190px; max-width: 480px; font-weight: 500; }
.case-link > span:last-child { overflow-wrap: anywhere; }
.table-file-icon { display: grid; place-items: center; width: 30px; height: 32px; color: #b8b4d7; border: 1px solid #34333e; background: #25242f; border-radius: 6px; flex-shrink: 0; }
.table-file-icon .icon { width: 16px; height: 16px; }
.date-cell { white-space: nowrap; font-variant-numeric: tabular-nums; }
.date-cell small { color: var(--subtle); font-size: 10px; margin-top: 2px; }
.cases-table small { display: block; }
.cases-table .row-action { width: 45px; padding: 8px 12px 8px 0; }
.row-action .icon { width: 15px; height: 15px; }
.table-footer { display: flex; justify-content: space-between; gap: 12px; padding: 12px 18px; background: #151619; border-top: 1px solid var(--line); color: var(--subtle); font-size: 10px; }
.mobile-table-note { display: none; }
.list-tabs { display: flex; gap: 22px; padding: 0 18px; border-bottom: 1px solid var(--line); background: #14171b; }
.list-tabs a { padding: 13px 0; font-size: 11px; color: #8f9eb3; border-bottom: 2px solid transparent; }
.list-tabs a.is-active { color: #c5dcff; border-bottom-color: var(--accent); }
.create-dialog { color: var(--ink); width: min(620px, calc(100vw - 32px)); max-height: calc(100dvh - 50px); padding: 0; overflow: auto; background: #181d25; border: 1px solid #405273; border-radius: 12px; box-shadow: 0 24px 100px #0009; }
.create-dialog::backdrop { background: #080c14b3; backdrop-filter: blur(5px); }
.dialog-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 22px; border-bottom: 1px solid #313e52; }
.dialog-heading h2 { font-size: 17px; margin: 0; }
.dialog-heading .icon-button { font-size: 22px; }
.create-dialog .new-case { padding: 22px; }
.create-dialog .new-case form { grid-template-columns: 1fr; }
.create-dialog .new-case .primary { margin-top: 8px; justify-self: end; }
.create-dialog .knowledge-upload { padding: 20px 22px; border: 0; margin: 0; }
.case-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; padding: 0 0 22px; }
.case-actions small { margin-left: auto; color: #8796ad; font-size: 10px; }
.library-summary { display: flex; align-items: center; gap: 20px; margin-bottom: 24px; padding: 17px 20px; border: 1px solid #2c3747; border-radius: 8px; background: #161c26; }
.library-summary .icon { color: #8eb5ef; width: 21px; height: 21px; }
.library-summary p { margin: 0; font-size: 12px; color: #c0cee2; }
.library-summary small { color: #8c9cb3; font-size: 10px; display: block; margin-top: 4px; }
.library-summary .secondary { margin-left: auto; }
.library-controls { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 0 0 20px; }
.library-controls .table-search { width: 310px; }
.library-count { font-size: 11px; color: #8b9bb2; }
.library-tabs { margin-bottom: 20px; padding-left: 0; padding-right: 0; background: none; }
.knowledge-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(280px,1fr)); gap: 16px; }
.knowledge-file { display: flex; flex-direction: column; padding: 20px; background: #171c25; border: 1px solid #2f3b50; border-radius: 9px; min-width: 0; }
.knowledge-file-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 20px; }
.knowledge-file-icon { display: grid; place-items: center; width: 35px; height: 39px; border: 1px solid #3b5277; border-radius: 7px; color: #9cbff7; background: #223550; }
.knowledge-file h2 { margin-bottom: 7px; font-size: 15px; line-height: 1.55; }
.knowledge-file-name { font-size: 11px; color: #8b9bb1; overflow-wrap: anywhere; }
.knowledge-file-meta { display: grid; grid-template-columns: auto 1fr; column-gap: 15px; row-gap: 8px; margin: 13px 0 20px; font-size: 10px; }
.knowledge-file-meta dt { color: #8293ad; }
.knowledge-file-meta dd { color: #bdcbe0; margin: 0; overflow-wrap: anywhere; }
.knowledge-file-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: auto; padding-top: 15px; border-top: 1px solid #2b3649; }
.knowledge-file-actions > a { font-size: 11px; }
.knowledge-file-actions form { display: flex; gap: 4px; flex-wrap: wrap; margin-left: auto; }
.knowledge-file-actions .text-button { font-size: 10px; }
@media(max-width:760px) {
  .list-tabs { gap: 20px; overflow: auto; white-space: nowrap; padding: 0 14px; }
  .list-tabs a { font-size: 10px; }
  .case-actions { gap: 8px; }
  .case-actions small { width: 100%; margin-left: 0; }
  .case-actions .text-button { font-size: 10px; }
  .library-summary { align-items: start; gap: 12px; padding: 16px; }
  .library-summary .secondary { display: none; }
  .library-controls { align-items: stretch; flex-direction: column; gap: 10px; }
  .library-controls .table-search { width: 100%; }
  .knowledge-grid { grid-template-columns: 1fr; }
}
.empty { padding: 52px 24px; text-align: center; }
.empty p { max-width: 370px; margin: 0 auto 20px; font-size: 12px; }
.empty-icon { margin: 0 auto 16px; width: 42px; height: 44px; display: grid; place-items: center; background: #23242b; border: 1px solid #353640; border-radius: 10px; color: #bab5e4; }
.dashboard-empty { padding: 45px 24px 50px; background: radial-gradient(ellipse at 50% 0,#a9a0ff06,transparent 65%); }
.dashboard-empty .eyebrow { justify-content: center; margin-bottom: 10px; letter-spacing: 1.5px; }
.dashboard-empty h3 { font-size: 23px; letter-spacing: -.65px; }
.empty-art { position: relative; display: flex; align-items: center; justify-content: center; gap: 17px; margin: 0 auto 25px; color: var(--accent); }
.empty-art > .icon { width: 50px; height: 50px; padding: 10px; background: #1b2a42; border: 1px solid #334b70; border-radius: 12px; }
.empty-art > span { width: 52px; height: 1px; background: linear-gradient(90deg,transparent,#344968); }
.empty-art > span:last-child { transform: rotate(180deg); }
.file-types { display: block; margin-top: 20px; color: var(--subtle); font-size: 10px; }
.page-note { display: flex; align-items: flex-start; gap: 7px; margin: 18px 0 0; color: var(--subtle); font-size: 10px; }
.page-note .icon { width: 13px; height: 14px; margin-top: 1px; }
.messages { margin-bottom: 20px; }
.notice { padding: 12px 15px; border: 1px solid #405074; border-radius: 7px; background: #95b8f80a; color: #b7cdf5; font-size: 12px; margin-bottom: 12px; overflow-wrap: anywhere; }
.notice.success { background: #71d5a009; border-color: #71d5a029; color: #a3e2bf; }
.notice.error { background: #f299990a; border-color: #f2999930; color: #f4b3b3; }
.back { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 17px; color: var(--muted); font-size: 11px; }
.back .icon { width: 13px; height: 13px; transform: rotate(180deg); }
.case-header { margin-bottom: 22px; }
.case-header h1 { font-size: 25px; }
.case-header .eyebrow { margin-bottom: 8px; }
.case-header p { font-size: 11px; }
.case-header-meta { display: flex; align-items: center; gap: 14px; flex-shrink: 0; }
.case-progress { width: 115px; color: var(--muted); font-size: 10px; }
.case-progress progress { display: block; width: 100%; height: 3px; border: 0; border-radius: 3px; margin-top: 8px; accent-color: var(--accent); background: #2c2e33; }
progress::-webkit-progress-bar { background: #2c2e33; border-radius: 3px; }
progress::-webkit-progress-value { background: var(--accent); border-radius: 3px; }
.section-links { display: flex; gap: 24px; border-bottom: 1px solid var(--line); margin: 0 0 24px; font-size: 11px; }
.section-links a { display: flex; align-items: center; gap: 7px; padding: 0 0 14px; color: var(--muted); }
.section-links a:hover { color: #fff; }
.section-links .icon { width: 14px; height: 14px; }
.section-links a:first-child { color: #e1e2e9; border-bottom: 1px solid #a9a0ff; }
.run-panel { padding: 15px 18px; margin-bottom: 18px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.run-panel strong { font-size: 12px; }
.run-panel p { margin: 4px 0 0; font-size: 11px; }
.case-layout { display: grid; grid-template-columns: minmax(280px,.9fr) minmax(340px,1.1fr); gap: 16px; align-items: start; }
.case-layout > section { min-width: 0; scroll-margin-top: 24px; }
.case-layout .assistant-panel { grid-column: 1/-1; }
.source-row { display: flex; align-items: center; gap: 9px; padding: 13px 15px; border-bottom: 1px solid var(--line); }
.file-icon { display: grid; place-items: center; flex-shrink: 0; width: 28px; height: 33px; border: 1px solid #373a43; border-radius: 5px; color: #a8abb7; background: #21232a; }
.file-icon .icon { width: 16px; height: 16px; }
.source-info { flex: 1; min-width: 0; }
.source-info a { display: block; font-size: 11px; font-weight: 500; overflow-wrap: anywhere; }
.source-info small { display: block; font-size: 10px; margin-top: 3px; }
.source-row .text-button { flex-shrink: 0; padding: 3px; min-width: 24px; }
.source-row .text-button .icon { width: 14px; height: 14px; }
.compact { padding: 28px 20px; }
.compact h3 { font-size: 14px; }
.compact p { font-size: 11px; margin-bottom: 0; }
.upload-details > summary { display: flex; align-items: center; gap: 7px; padding: 13px 17px; list-style: none; font-size: 11px; color: #c0bcdf; }
.upload-details > summary .icon { width: 14px; height: 14px; }
.upload-area { display: grid; gap: 12px; margin: 0 14px 14px; padding: 13px; border: 1px solid var(--line); border-radius: 7px; background: #141517; }
.dropzone { display: grid; justify-items: center; gap: 7px; padding: 20px 10px; border: 1px dashed #3d414a; border-radius: 6px; text-align: center; background: #111214; }
.dropzone > .icon { color: #9a94c7; width: 23px; height: 23px; margin-bottom: 4px; }
.dropzone > strong { font-size: 12px; font-weight: 500; }
.dropzone .small { font-size: 10px; }
.dropzone.is-drag { background: #a9a0ff0b; border-color: var(--violet); }
.file-button { position: relative; margin-top: 5px; font-size: 11px; min-height: 32px; }
.file-button input { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
.file-button:focus-within { outline: 2px solid var(--violet); outline-offset: 3px; }
.file-field { display: grid; gap: 3px; }
.file-field .file-button { justify-self: start; }
.picked-files { margin: 0; padding: 0; list-style: none; }
.picked-files li { display: flex; align-items: center; gap: 10px; justify-content: space-between; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 11px; }
.picked-files li > :first-child { overflow-wrap: anywhere; min-width: 0; flex: 1; }
.picked-file-size { color: var(--muted); flex-shrink: 0; white-space: nowrap; }
.picked-files .picked-file-remove { width: 28px; height: 28px; padding: 3px; font-size: 20px; line-height: 1; flex-shrink: 0; }
.picked-files .picked-file-remove:hover { color: var(--red); border-color: #f2999950; }
.picked-status { margin: 0; }
.picked-name { display: block; color: var(--muted); font-size: 11px; overflow-wrap: anywhere; }
.upload-area label, .upload-area > small { font-size: 10px; }
.processing-controls { display: grid; gap: 8px; padding: 14px; border-top: 1px solid var(--line); }
.processing-controls small { color: var(--subtle); font-size: 10px; overflow-wrap: anywhere; text-align: center; }
.source-frame { width: 100%; height: 580px; display: block; border: 0; border-radius: 0 0 9px 9px; background: #f4f5f6; }
.sources .section-head > a { font-size: 10px; color: var(--muted); }
.container-note { margin: 0; padding: 12px 18px; border-bottom: 1px solid var(--line); color: var(--violet); font: 11px/1.5 Consolas,monospace; }
.container-switch { padding: 12px 18px; border-bottom: 1px solid var(--line); }
.container-switch label { display: flex; gap: 10px; align-items: center; font-size: 11px; }
.container-switch .menu { flex: 1; }
.field-toolbar { display: flex; align-items: end; justify-content: space-between; gap: 10px; padding: 12px 17px; border-bottom: 1px solid var(--line); background: #151619; }
.field-toolbar label { font-size: 10px; }
.field-toolbar .menu { min-width: 135px; margin-top: 4px; }
.field-toolbar .text-button { font-size: 10px; text-align: right; }
.review-panel > form#review-form { padding: 0; }
.fields { max-height: 760px; overflow: auto; padding: 0 18px; scrollbar-width: thin; scrollbar-color: #454852 transparent; }
.field-row { border-bottom: 1px solid var(--line); padding: 14px 0; min-width: 0; }
.field-row:last-child { border-bottom: 0; }
.field-heading { display: flex; align-items: start; justify-content: space-between; gap: 10px; margin-bottom: 7px; }
.field-heading label { font-size: 11px; line-height: 1.5; color: #e0e2e8; }
.field-heading .small, .verified { flex-shrink: 0; font-size: 9px; }
.verified { color: var(--green); }
.verified:before { content: '✓'; margin-right: 4px; }
.field-row > input:not([type=checkbox]) { min-height: 36px; padding: 7px 10px; font-size: 12px; }
.field-reviewed input:not([type=checkbox]) { border-color: #71d5a035; background: #71d5a005; }
.field-row[data-state=conflict] > input:not([type=checkbox]) { border-color: #e8bf7450; }
.evidence { margin-top: 7px; font-size: 10px; overflow-wrap: anywhere; }
.evidence a { color: #a6a0d1; }
.evidence a:hover { color: #d1caff; text-decoration: underline; }
.evidence q { display: block; margin: 4px 0 0; padding-left: 8px; border-left: 1px solid #4a455e; color: var(--subtle); font-size: 10px; line-height: 1.5; }
.field-reason { margin: 6px 0; font-size: 10px; }
.checkbox { display: flex; align-items: start; gap: 8px; font-size: 11px; font-weight: 400; line-height: 1.6; color: var(--muted); cursor: pointer; }
.field-row .checkbox { margin-top: 10px; font-size: 10px; }
.field-row .checkbox input { width: 13px; height: 13px; }
.warning-block { margin: 14px 17px; padding: 12px; background: #e8bf7408; border: 1px solid #e8bf7425; border-radius: 6px; color: #dec293; font-size: 11px; }
.warning-block ul { padding-left: 18px; margin-bottom: 0; }
.acknowledge { padding: 14px 18px 0; }
.review-actions { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-top: 1px solid var(--line); background: #1b1c1f; border-radius: 0 0 9px 9px; }
#review-form > p { margin: 0; padding: 0 18px 14px; font-size: 10px; }
.panel-details { padding: 14px 17px; border-top: 1px solid var(--line); font-size: 11px; }
.panel-details summary { color: var(--muted); font-size: 11px; }
.panel-details p { margin: 12px 0; font-size: 11px; }
.panel-details form { display: flex; flex-wrap: wrap; gap: 8px; }
.proposal-list { padding: 17px; border-top: 1px solid var(--line); }
.proposal-list h3 { font-size: 13px; }
.proposal { margin-top: 12px; border: 1px solid #a9a0ff2a; border-radius: 6px; padding: 12px; background: #a9a0ff05; }
.proposal p { font-size: 11px; overflow-wrap: anywhere; }
.proposal form { display: flex; flex-wrap: wrap; gap: 7px; }
.assistant-panel { background: #19191f; border-color: #34313f; }
.assistant-panel .section-head { border-color: #34313f; }
.assistant-mark { display: inline-flex; align-items: center; gap: 4px; color: #c4baff; background: #a9a0ff12; border: 1px solid #a9a0ff23; border-radius: 4px; padding: 2px 6px; font-size: 9px; font-weight: 600; }
.assistant-mark .icon { width: 11px; height: 11px; }
.assistant-intro { padding: 14px 17px 0; margin-bottom: 7px; font-size: 11px; line-height: 1.7; }
.chat-log { padding: 12px 14px 18px; min-height: 245px; max-height: 510px; overflow-y: auto; display: flex; flex-direction: column; gap: 13px; scrollbar-width: thin; scrollbar-color: #45424f transparent; }
.chat-empty { padding: 14px 0; }
.chat-empty > .icon { width: 28px; height: 28px; color: #a59acb; margin-bottom: 14px; }
.chat-empty > p { font-size: 13px; color: #e0dcee; margin-bottom: 15px; }
.suggested-question { display: flex; width: 100%; gap: 8px; align-items: center; justify-content: space-between; margin: 8px 0 0; padding: 10px 11px; border: 1px solid #37323f; border-radius: 6px; background: #222028; color: #c5bfd5; font-size: 11px; text-align: left; }
.suggested-question:after { content: '↗'; color: #827694; }
.suggested-question:hover { border-color: #5c5075; background: #292431; }
.chat-message { border-radius: 7px; padding: 12px; max-width: 100%; background: #24222c; border: 1px solid #35303f; overflow-wrap: anywhere; }
.chat-message.user { align-self: flex-end; max-width: 94%; background: #292735; border-color: #423c53; }
.chat-author { display: block; margin-bottom: 6px; color: #cfc5ed; font-size: 10px; font-weight: 500; }
.chat-content { white-space: pre-wrap; font-size: 12px; line-height: 1.75; color: #d9d5e3; }
.chat-content code { font-size: 11px; background: #ffffff08; border-radius: 3px; padding: 1px 4px; }
.chat-content a, .source-chip { color: #bcb0ee; text-decoration: underline; text-underline-offset: 3px; }
.source-chip { display: block; margin-top: 8px; padding-top: 8px; border-top: 1px solid #443c51; font-size: 10px; }
.chat-form { padding: 14px; border-top: 1px solid #34313f; }
.chat-form > label { margin-bottom: 7px; font-size: 10px; color: #c1bacf; }
.chat-form textarea { background: #131217; border-color: #40384e; font-size: 12px; min-height: 80px; }
.chat-form-footer { display: flex; gap: 12px; align-items: center; justify-content: space-between; margin-top: 11px; }
.chat-form-footer span { max-width: 150px; font-size: 9px; }
.chat-form-footer .primary { background: #ded9ee; color: #231e2e; border-color: #eee8ff; min-height: 32px; font-size: 11px; }
.chat-form-footer .primary:hover:not(:disabled) { background: #f0ebff; }
.export-panel { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 20px; padding: 19px 22px; scroll-margin-top: 24px; }
.export-title { display: flex; align-items: center; gap: 11px; }
.export-title > .icon { color: #a2a493; }
.export-panel h2 { font-size: 13px; margin-bottom: 4px; }
.export-panel p { margin: 0; font-size: 11px; }
.export-buttons { display: flex; gap: 8px; }
.history { margin-top: 18px; padding: 13px 0; border-top: 1px solid var(--line); font-size: 11px; color: var(--muted); }
.history summary { cursor: pointer; }
.history > p { font-size: 11px; margin: 12px 0; }
.inline-form { display: flex; align-items: end; gap: 16px; margin-top: 15px; max-width: 650px; }
.inline-form label { flex: 1; font-size: 12px; }
.knowledge-upload { padding: 22px; margin-bottom: 24px; }
.knowledge-create { margin-bottom: 24px; }
.knowledge-create > summary { display: flex; align-items: center; gap: 8px; list-style: none; padding: 16px 18px; font-size: 12px; }
.knowledge-create > summary > .icon { width: 15px; height: 15px; color: var(--violet); }
.knowledge-create .knowledge-upload { border: 0; border-top: 1px solid var(--line); border-radius: 0 0 9px 9px; padding: 20px; margin: 0; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin: 18px 0; }
.document-reader { padding: 26px; color: #292d35; background: #f4f5f6; color-scheme: light; }
.document-reader section { scroll-margin-top: 20px; }
.document-reader pre { white-space: pre-wrap; overflow-wrap: anywhere; font: 14px/1.7 'Segoe UI',sans-serif; }
.document-reader img { display: block; max-width: 100%; height: auto; margin: 15px auto 25px; border: 1px solid #d8dce3; }
.menu { position: relative; }
.menu-native { position: absolute; width: 1px !important; height: 1px; min-height: 0 !important; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
.menu-button { display: flex; align-items: center; width: 100%; min-height: 36px; padding: 8px 30px 8px 10px; border: 1px solid var(--line-strong); border-radius: 6px; background: #121315 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='m4 6 4 4 4-4' fill='none' stroke='%23a0a3ac' stroke-width='1.5'/%3E%3C/svg%3E") right 10px center/14px no-repeat; color: #d0d2db; text-align: left; font-size: 11px; font-weight: 400; }
.menu-list { position: absolute; z-index: 20; left: 0; right: 0; top: calc(100% + 5px); max-height: 240px; margin: 0; padding: 4px; overflow: auto; list-style: none; border: 1px solid #45414f; border-radius: 7px; background: #242329; box-shadow: 0 10px 30px #0005; }
.menu-list li { cursor: pointer; padding: 8px; border-radius: 4px; font-size: 11px; color: #cdc8d8; overflow-wrap: anywhere; }
.menu-list li:hover, .menu-list li.is-active { background: #383240; }
.menu-list li.is-selected { background: #a9a0ff16; color: #d6cbfa; }
.menu.is-open .menu-button { border-color: #8b83d9; }
.mobile-menu { display: none; }
.sidebar-scrim { position: fixed; z-index: 35; inset: 0; border: 0; background: #0009; }
.auth-page .app-main { margin: 0; }
.auth-page .content { padding: 0; max-width: none; }
.auth-page .messages { position: fixed; top: 20px; right: 20px; max-width: 400px; z-index: 10; }
.login-shell { min-height: 100vh; display: grid; grid-template-columns: 1.05fr 1fr; }
.login-story { position: relative; min-height: 100vh; display: flex; flex-direction: column; padding: 45px 60px 30px; border-right: 1px solid var(--line); background: radial-gradient(ellipse at 0 60%,#3479e820,transparent 65%), linear-gradient(140deg,#151d2a,#111213 65%); overflow: hidden; }
.login-story:before { content: ''; position: absolute; width: 420px; height: 720px; right: -240px; top: 80px; border: 1px solid #ffffff05; transform: rotate(28deg); box-shadow: -32px 0 0 -1px #141b27, -33px 0 #ffffff05, -64px 0 0 -1px #141b27, -65px 0 #ffffff05; pointer-events: none; }
.login-story .brand { padding: 0; }
.login-story-body { margin: auto 0; padding: 70px 0; position: relative; z-index: 1; }
.login-story-body h1 { margin: 0 0 25px; font-size: clamp(42px,4.6vw,72px); font-weight: 500; line-height: 1.12; letter-spacing: -2.7px; }
.login-story-body h1 span { color: #8595ad; }
.login-story-body > p { max-width: 340px; font-size: 13px; line-height: 1.8; color: #9daabd; }
.login-story .eyebrow { margin-bottom: 25px; color: #a3b3cd; letter-spacing: 1.4px; }
.login-caption { font-size: 10px; color: #8e9bb0; }
.login-workflow { display: grid; grid-template-columns: repeat(4,1fr); margin-top: 40px; max-width: 460px; gap: 0; }
.login-workflow > div { border-top: 1px solid #344866; padding-top: 15px; font-size: 10px; color: #a7b3c7; }
.login-workflow > div > span { display: block; margin-bottom: 7px; color: #7b8ca5; font: 10px/1.5 Consolas,monospace; }
.login-workflow > div:first-child { border-top-color: var(--accent); }
.login-workflow > div:first-child > span { color: var(--accent); }
.login { align-self: center; width: 100%; max-width: 410px; margin: 50px auto; padding: 30px; }
.login-symbol { display: grid; place-items: center; width: 42px; height: 44px; margin-bottom: 32px; border: 1px solid #344663; border-radius: 10px; color: #b4ceff; background: #1b283e; }
.login-symbol .icon { width: 23px; height: 23px; }
.login h2 { font-size: 25px; font-weight: 550; letter-spacing: -.8px; }
.login-form-heading > p { font-size: 12px; }
.login-form { margin-top: 30px; }
.login-form > label { margin: 18px 0 8px; font-size: 11px; }
.login-form input:not([type=checkbox]) { min-height: 43px; background: #17181b; }
.login-form > .primary { margin-top: 26px; min-height: 40px; }
.login-form > .primary .icon { margin-left: auto; }
.password-field { position: relative; }
.password-field input { padding-right: 42px !important; }
.password-field .icon-button { position: absolute; right: 5px; top: 5px; }
.login-help { margin: 28px 0 0; font-size: 10px; line-height: 1.8; color: var(--subtle); }
@media (min-width: 1420px) {
  .case-layout { grid-template-columns: minmax(280px,.9fr) minmax(350px,1.13fr) minmax(270px,.85fr); }
  .case-layout .assistant-panel { grid-column: auto; position: sticky; top: 24px; }
}
@media (min-width: 1800px) { .content { padding-left: 48px; padding-right: 48px; } .case-layout { gap: 22px; } }
@media (max-width: 1150px) {
  :root { --sidebar-width: 200px; }
  .sidebar { padding-left: 10px; padding-right: 10px; }
  .profile { margin-left: -10px; margin-right: -10px; padding-left: 14px; padding-right: 14px; }
  .nav-item { padding-left: 9px; padding-right: 9px; font-size: 11px; }
  .workspace-tag { display: none; }
  .nav-item.is-active:before { left: -11px; }
  .content { padding: 30px 24px 24px; }
  .topbar { padding: 0 24px; }
  .stats { grid-template-columns: repeat(3,1fr); row-gap: 24px; }
  .model-stat { grid-column: 1/-1; border: 0; border-top: 1px solid var(--line); padding: 18px 0 0; display: flex; align-items: center; gap: 18px; }
  .model-stat > strong { margin: 0; min-height: 0; }
  .model-stat > small { margin-left: auto; max-width: 240px; text-align: right; }
  .case-layout { grid-template-columns: minmax(260px,.9fr) minmax(300px,1.1fr); }
  .new-case form { grid-template-columns: 1fr 1fr; }
  .new-case form .primary { grid-column: 1/-1; justify-self: end; }
  .login-story { padding: 35px; }
  .login-story-body h1 { font-size: 52px; }
}
@media (max-width: 1000px) {
  .case-layout { grid-template-columns: 1fr; }
  .case-layout .assistant-panel { grid-column: auto; }
  .fields { max-height: none; }
  .case-header-meta { flex-direction: column; align-items: end; gap: 10px; }
  .login-story-body h1 { font-size: 45px; }
  .login-workflow { gap: 6px; }
}
@media (max-width: 760px) {
  :root { --sidebar-width: 224px; }
  .app-main { margin-left: 0; }
  .sidebar { position: relative; width: 100%; height: auto; padding: 16px; border-right: 0; }
  .sidebar-search, .nav-label, .workspace-note { display: none; }
  .sidebar-nav { display: flex; flex-wrap: wrap; margin-top: 16px; }
  .sidebar-bottom .profile { margin-top: 12px; padding: 12px 17px; }
  .has-sidebar-js .sidebar { position: fixed; inset: 0 auto 0 0; width: 260px; height: 100dvh; overflow-y: auto; transform: translateX(-100%); padding: 25px 14px 0; border-right: 1px solid var(--line); }
  .has-sidebar-js .sidebar-search { display: flex; }
  .has-sidebar-js .nav-label, .has-sidebar-js .workspace-note { display: flex; }
  .has-sidebar-js .sidebar-nav { display: grid; margin-top: 0; }
  .has-sidebar-js .sidebar-bottom .profile { margin-top: 0; }
  .sidebar-open .sidebar { transform: translateX(0); }
  .sidebar-open { overflow: hidden; }
  .mobile-menu { display: inline-flex; margin-left: -6px; }
  .topbar { height: 52px; padding: 0 18px; }
  .breadcrumbs { gap: 7px; font-size: 10px; }
  .breadcrumbs > span:first-child, .breadcrumbs > .icon { display: none; }
  .topbar-label { font-size: 9px; }
  .content { padding: 26px 18px; }
  .page-header { align-items: start; gap: 12px; margin-bottom: 25px; }
  h1 { font-size: 25px; letter-spacing: -.8px; }
  .page-header > .primary { font-size: 0; width: 36px; padding: 8px; }
  .page-header > .primary .icon { width: 17px; height: 17px; }
  .page-header p { font-size: 11px; line-height: 1.65; }
  .eyebrow { font-size: 8px; letter-spacing: 1.1px; }
  .stats { padding-bottom: 19px; margin-bottom: 18px; row-gap: 18px; }
  .stat { padding-left: 13px; padding-right: 10px; }
  .stat > span { font-size: 9px; gap: 5px; }
  .stat > span > .icon { display: none; }
  .stat > strong { font-size: 25px; }
  .stat > small { font-size: 9px; }
  .model-stat { padding: 14px 0 0; gap: 10px; flex-wrap: wrap; }
  .stat.model-stat > strong { font-size: 12px; }
  .model-stat > small { max-width: none; width: 100%; text-align: left; margin-left: 0; }
  .create-case { margin-bottom: 18px; }
  .create-case > summary { padding: 10px 12px; font-size: 11px; }
  .create-case > summary .muted { font-size: 9px; }
  .new-case { padding: 0 12px 14px; }
  .new-case form, .form-grid { grid-template-columns: 1fr; gap: 14px; }
  .new-case form .primary { justify-self: stretch; }
  .table-heading { align-items: stretch; flex-direction: column; gap: 13px; padding: 15px; }
  .table-search { width: 100%; }
  .cases-table table { min-width: 660px; }
  .cases-table td, .cases-table th { padding: 13px 15px; }
  .cases-table .case-link { min-width: 200px; max-width: 250px; }
  .table-footer { font-size: 9px; padding: 11px 14px; }
  .table-footer > span:nth-child(2) { display: none; }
  .table-footer > .mobile-table-note { display: inline; }
  .dashboard-empty { padding: 35px 18px; }
  .dashboard-empty h3 { font-size: 20px; }
  .dashboard-empty p { font-size: 11px; }
  .page-note { font-size: 9px; }
  .case-header { flex-wrap: wrap; }
  .case-header h1 { font-size: 23px; }
  .case-header-meta { flex-direction: row; align-items: center; width: 100%; justify-content: space-between; }
  .case-progress { display: flex; align-items: center; gap: 10px; width: auto; }
  .case-progress progress { width: 75px; margin: 0; }
  .section-links { gap: 16px; overflow-x: auto; margin-bottom: 18px; font-size: 10px; }
  .section-links a { flex-shrink: 0; gap: 5px; padding-bottom: 11px; }
  .section-links .icon { width: 12px; height: 12px; }
  .case-layout { gap: 18px; }
  .source-frame { height: 470px; }
  .export-panel { align-items: stretch; flex-direction: column; padding: 17px; gap: 14px; }
  .export-buttons > * { flex: 1; }
  .inline-form { flex-direction: column; align-items: stretch; gap: 12px; }
  .source-row .file-icon { width: 25px; height: 29px; }
  .field-toolbar { align-items: end; }
  .field-toolbar .text-button { max-width: 110px; }
  .document-reader { padding: 16px; }
  .login-shell { grid-template-columns: 1fr; }
  .login-story { min-height: auto; padding: 27px 25px; border-right: 0; border-bottom: 1px solid var(--line); }
  .login-story-body { padding: 32px 0 3px; }
  .login-story-body h1 { font-size: 36px; line-height: 1.15; letter-spacing: -1.4px; margin-bottom: 0; }
  .login-story-body h1 br { display: none; }
  .login-story-body h1 span { display: block; margin-top: 2px; }
  .login-story-body .eyebrow { margin-bottom: 12px; font-size: 8px; }
  .login-story-body > p, .login-workflow, .login-caption { display: none; }
  .login { margin: 0 auto; max-width: 430px; padding: 34px 25px 40px; }
  .login-symbol { display: none; }
  .login h2 { font-size: 23px; }
  .login-form { margin-top: 22px; }
  .login-form input:not([type=checkbox]) { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *:before, *:after { transition: none !important; animation: none !important; } }
