:root {
  color-scheme: light;
  color: #202523;
  background: #f5f6f5;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-synthesis: none;
  --surface: #fff;
  --canvas: #f5f6f5;
  --text: #202523;
  --secondary: #68706c;
  --tertiary: #969c99;
  --border: #e4e7e5;
  --hover: #f0f3f1;
  --accent: #226b61;
  --accent-soft: #edf4f2;
  --risk: #a47733;
  --danger: #a44f48;
}

* { box-sizing: border-box; }
html, body { width: 100%; min-height: 100%; }
body { margin: 0; min-width: 320px; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; }
button { color: inherit; }
h1, h2, h3, h4, p { margin: 0; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.workbench-shell { display: grid; grid-template-columns: 272px minmax(700px, 1fr) 400px; width: 100vw; height: 100vh; overflow: hidden; background: var(--canvas); }
.workspace-panel, .assistant-panel, .document-panel { min-width: 0; min-height: 0; }
.workspace-panel, .assistant-panel { display: flex; flex-direction: column; background: var(--surface); }
.workspace-panel { border-right: 1px solid var(--border); }
.assistant-panel { border-left: 1px solid var(--border); }
.document-panel { display: flex; flex-direction: column; }
.panel-topbar { flex: 0 0 64px; height: 64px; border-bottom: 1px solid var(--border); background: rgba(255,255,255,.98); }

.workspace-brand { display: flex; align-items: center; padding: 0 18px; }
.workspace-brand div { display: flex; flex-direction: column; min-width: 0; gap: 3px; }
.workspace-brand strong { font-size: 15px; font-weight: 650; letter-spacing: -.01em; }
.workspace-brand span { color: var(--tertiary); font-size: 11px; }
.workspace-actions { padding: 12px 14px 14px; border-bottom: 1px solid var(--border); }
.search-field { height: 32px; display: flex; align-items: center; padding: 0 9px; border: 1px solid #dde1df; border-radius: 6px; background: #fff; }
.search-field:focus-within { border-color: #a9c2bc; box-shadow: 0 0 0 2px rgba(34,107,97,.08); }
.search-field input { flex: 1; min-width: 0; border: 0; outline: 0; color: var(--text); font-size: 12px; }
.search-field kbd { color: #9ba19e; font: 10px inherit; }
.action-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.action-row button { height: 31px; border-radius: 6px; background: #fff; font-size: 12px; cursor: pointer; }
.primary-outline { border: 1px solid #7fafaa; color: var(--accent); font-weight: 600; }
.quiet-button { border: 1px solid #dce0de; }
.action-row button:hover { background: var(--hover); }

.current-space { padding: 16px 14px 10px; border-bottom: 1px solid var(--border); }
.eyebrow { color: var(--secondary); font-size: 11px; line-height: 1.4; }
.current-space > .eyebrow { margin-bottom: 7px; }
.contract-row { width: 100%; display: flex; flex-direction: column; gap: 3px; padding: 7px 8px; border: 0; border-radius: 5px; background: transparent; text-align: left; cursor: pointer; }
.contract-row strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; font-weight: 600; }
.contract-row span { color: var(--accent); font-size: 10px; }
.contract-row.is-active { background: var(--accent-soft); }
.file-tree { flex: 1; min-height: 0; padding: 10px 8px; overflow: auto; }
.file-tree details { margin-bottom: 7px; }
.file-tree summary { display: flex; align-items: center; min-height: 30px; padding: 0 7px; color: #444b48; cursor: pointer; font-size: 12px; font-weight: 600; }
.file-tree summary::marker { color: #8e9491; }
.file-tree summary span { flex: 1; }
.file-tree summary small { color: #a0a6a3; font-size: 10px; font-weight: 400; }
.tree-children { padding-left: 7px; }
.tree-empty { padding: 5px 10px 9px; color: var(--tertiary); font-size: 10px; }
.file-row { width: 100%; min-height: 46px; display: flex; align-items: center; gap: 8px; padding: 6px 7px 6px 10px; border: 0; border-radius: 5px; background: transparent; text-align: left; cursor: pointer; }
.file-row:hover, .file-row.is-active { background: var(--accent-soft); }
.file-type { flex: 0 0 auto; width: 32px; padding: 3px 0; border-radius: 4px; background: #2f6ecf; color: #fff; font-size: 8px; font-weight: 700; text-align: center; }
.file-type.neutral { background: #edf0ee; color: #69716d; }
.file-copy { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.file-copy strong, .file-copy small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-copy strong { font-size: 11px; font-weight: 550; }
.file-copy small { color: #9aa09d; font-size: 9px; }
.active-dot, .system-dot { display: inline-block; border-radius: 50%; background: var(--accent); }
.active-dot { width: 5px; height: 5px; }
.workspace-footer { flex: 0 0 52px; display: flex; align-items: center; gap: 8px; padding: 0 14px; border-top: 1px solid var(--border); color: #7d8581; font-size: 10px; }
.system-dot { width: 6px; height: 6px; }

.document-topbar { display: flex; align-items: center; justify-content: space-between; padding: 0 22px; }
.document-identity { display: flex; align-items: center; gap: 10px; min-width: 0; }
.word-file-type { flex: 0 0 auto; padding: 5px 6px; border-radius: 4px; background: #2f6ecf; color: #fff; font-size: 8px; font-weight: 700; }
.document-identity div { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.document-identity strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; font-weight: 650; }
.document-identity small { color: var(--tertiary); font-size: 10px; }
.read-only { padding: 4px 8px; border-radius: 999px; background: #f2f3f2; color: #878d8a; font-size: 10px; }
.download-button { height: 30px; padding: 7px 6px; border: 0; color: var(--text); background: transparent; font-size: 12px; font-weight: 600; text-decoration: none; }
.download-button:hover { color: var(--accent); }
.document-actions { display: flex; align-items: center; gap: 8px; }
.danger-action { color: #a53b32; }
.document-canvas { flex: 1; min-height: 0; overflow: auto; padding: 38px 34px 72px; background: var(--canvas); scroll-behavior: smooth; }
.paper { position: relative; width: min(100%, 790px); min-height: 1060px; margin: 0 auto; padding: 52px 64px 96px; border: 1px solid #e0e3e1; background: #fff; color: #2c302e; box-shadow: none; font-family: "Songti SC", "SimSun", serif; font-size: 15.5px; line-height: 1.78; }
.paper h1 { margin: 0 0 32px; font-size: 28px; line-height: 1.25; font-weight: 600; text-align: center; letter-spacing: .06em; }
.paper h2 { margin: 25px 0 8px; font-size: 16.5px; line-height: 1.6; font-weight: 600; }
.paper p { margin: 0 0 11px; }
.empty-document { display: grid; place-items: center; font-family: inherit; }
.empty-document-copy { max-width: 340px; text-align: center; }
.empty-document-copy strong { font-size: 16px; font-weight: 600; }
.empty-document-copy p { margin-top: 8px; color: var(--secondary); font-size: 12px; line-height: 1.65; }
.review-anchor { position: relative; border-radius: 2px; scroll-margin: 180px 0; transition: background .18s ease, box-shadow .18s ease; }
.review-anchor.is-focused { background: #f7f3ea; box-shadow: -3px 0 0 var(--risk); }
.tracked-change del { margin: 0 2px; color: #a35d56; text-decoration-thickness: 1px; text-decoration-color: #a35d56; }
.tracked-change ins { margin: 0 2px; color: #215f56; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.margin-comment { display: block; margin: 10px 0 4px; padding: 9px 12px; background: #faf9f6; color: #656b68; font-family: Inter, sans-serif; font-size: 11px; line-height: 1.6; }
.margin-comment strong { display: block; margin-bottom: 2px; color: #68583f; font-size: 10px; letter-spacing: .04em; }

.assistant-topbar { display: flex; align-items: center; justify-content: space-between; padding: 0 18px; }
.assistant-topbar div { display: flex; flex-direction: column; gap: 3px; }
.assistant-topbar div span { color: var(--secondary); font-size: 10px; }
.assistant-topbar strong { font-size: 15px; font-weight: 650; }
.assistant-topbar > small { color: var(--tertiary); font-size: 9px; }
.assistant-scroll { flex: 1; min-height: 0; overflow: auto; padding: 21px 19px 26px; }
.completion-summary { padding-bottom: 22px; border-bottom: 1px solid var(--border); }
.completion-summary .eyebrow { display: flex; justify-content: space-between; }
.completion-summary h2 { margin: 8px 0 5px; font-size: 17px; line-height: 1.35; font-weight: 650; letter-spacing: -.015em; }
.completion-summary > p:not(.eyebrow):not(.result-count) { color: var(--secondary); font-size: 12px; line-height: 1.6; }
.progress-line { height: 1px; margin: 20px 0 15px; background: #dfe3e1; }
.progress-line span { display: block; width: 8%; height: 1px; background: var(--accent); transition: width .25s ease; }
.result-count { color: #77807b; font-size: 11px; }
.assistant-flow { padding: 20px 10px 4px; }
.flow-note, .activity-item { color: var(--secondary); font-size: 12px; line-height: 1.65; }
.upload-trigger { width: 100%; min-height: 64px; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 4px; padding: 10px 12px; border: 1px solid #dce0de; border-radius: 6px; background: #fff; cursor: pointer; text-align: left; }
.upload-trigger:hover, .upload-trigger.has-file { background: var(--hover); border-color: #a9c2bc; }
.upload-trigger strong { font-size: 12px; font-weight: 600; }
.upload-trigger span { color: var(--tertiary); font-size: 10px; }
.flow-primary { min-height: 34px; margin-top: 12px; padding: 0 13px; border: 0; border-radius: 5px; background: var(--accent); color: #fff; font-size: 12px; font-weight: 600; cursor: pointer; }
.flow-primary:disabled { background: #edf0ee; color: #9ca29f; cursor: default; }
.field-label { display: block; margin: 16px 0 6px; color: #454c49; font-size: 11px; font-weight: 600; }
select, textarea, .text-input { width: 100%; border: 1px solid #dce0de; border-radius: 5px; outline: 0; background: #fff; color: var(--text); font-size: 12px; }
select, .text-input { height: 36px; padding: 0 9px; }
textarea { padding: 8px 9px; resize: vertical; line-height: 1.5; }
select:focus, textarea:focus, .text-input:focus { border-color: #a8beb8; box-shadow: 0 0 0 2px rgba(34,107,97,.06); }
.position-fieldset { margin: 18px 0 0; padding: 0; border: 0; }
.position-fieldset legend { margin-bottom: 7px; color: #454c49; font-size: 11px; font-weight: 600; }
.position-fieldset legend span { color: var(--danger); }
.review-context-fields { margin-top: 14px; }
.field-label span { color: var(--danger); }
.concern-fieldset { margin: 14px 0 0; padding: 0; border: 0; }
.concern-fieldset legend { margin-bottom: 7px; color: #454c49; font-size: 11px; font-weight: 600; }
.concern-fieldset legend small { color: var(--tertiary); font-size: 9px; font-weight: 400; }
.concern-options { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; overflow: hidden; border: 1px solid #dce0de; border-radius: 5px; background: #e4e7e5; }
.concern-options label { display: grid; grid-template-columns: 15px 1fr; gap: 6px; align-items: center; min-height: 34px; padding: 5px 7px; background: #fff; color: var(--secondary); font-size: 9.5px; line-height: 1.35; cursor: pointer; }
.concern-options input { margin: 0; }
.context-preview { margin-top: 14px; padding: 11px 12px; border-left: 3px solid var(--accent); background: var(--accent-soft); }
.context-preview strong { color: var(--accent); font-size: 10px; }
.context-preview p { margin-top: 4px; color: var(--secondary); font-size: 10px; line-height: 1.55; }
.model-authorization { margin: 18px 0 0; padding: 12px; border: 1px solid #dce0de; border-radius: 5px; background: #fafbf9; }
.model-authorization legend { padding: 0 4px; color: #454c49; font-size: 11px; font-weight: 600; }
.model-authorization legend span { color: var(--danger); }
.model-authorization label { display: grid; grid-template-columns: 16px 1fr; gap: 8px; align-items: start; color: var(--text); font-size: 11px; line-height: 1.55; cursor: pointer; }
.model-authorization input { margin: 2px 0 0; }
.model-authorization p { margin: 8px 0 0 24px; color: var(--secondary); font-size: 10px; line-height: 1.55; }
.segmented { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid #dce0de; border-radius: 5px; overflow: hidden; }
.segmented input { position: absolute; opacity: 0; }
.segmented span { min-height: 33px; display: grid; place-items: center; border-right: 1px solid #e4e7e5; border-bottom: 1px solid #e4e7e5; color: var(--secondary); font-size: 10px; cursor: pointer; }
.segmented label:nth-child(even) span { border-right: 0; }
.segmented label:nth-child(n+3) span { border-bottom: 0; }
.segmented input:checked + span { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.activity-stream { padding: 18px 10px 0; }
.result-provenance { margin: 18px 10px 0; padding: 12px; border: 1px solid #dce3df; border-radius: 6px; background: #fafbf9; }
.provenance-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.provenance-heading strong { font-size: 11px; font-weight: 650; }
.provenance-heading span { color: var(--accent); font-size: 9px; font-weight: 600; }
.result-provenance > p { margin-top: 7px; color: var(--secondary); font-size: 10px; line-height: 1.55; }
.result-provenance dl { display: grid; grid-template-columns: max-content 1fr; gap: 5px 10px; margin-top: 10px; font-size: 9.5px; line-height: 1.45; }
.result-provenance dt { color: var(--tertiary); }
.result-provenance dd { min-width: 0; overflow-wrap: anywhere; color: #4e5753; }
.review-stream { display: flex; flex-direction: column; }
.finding { width: 100%; padding: 22px 10px; border: 0; border-bottom: 1px solid var(--border); background: transparent; text-align: left; cursor: pointer; }
.finding:hover, .finding.is-selected { background: #fafaf8; }
.finding.is-selected { box-shadow: inset 2px 0 0 var(--risk); }
.finding:focus-visible { outline: 0; background: #fafaf8; box-shadow: inset 2px 0 0 var(--risk); }
.finding-kicker { display: flex; justify-content: space-between; margin-bottom: 8px; color: #7c725f; font-size: 10px; }
.finding.secondary .finding-kicker { color: var(--secondary); }
.finding strong { display: block; font-size: 14px; line-height: 1.45; font-weight: 650; }
.finding p { margin-top: 7px; color: var(--secondary); font-size: 12px; line-height: 1.65; }
.deliverables { padding: 22px 0 0; }
.deliverable-heading { display: flex; justify-content: space-between; padding: 0 10px 8px; color: var(--secondary); font-size: 10px; }
.deliverable-heading small { color: var(--tertiary); }
.output-link { display: flex; align-items: center; gap: 12px; padding: 10px; color: var(--text); text-decoration: none; }
.output-link:hover { background: var(--hover); }
.output-link > span { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.output-link strong { font-size: 12px; font-weight: 600; }
.output-link small { color: var(--tertiary); font-size: 10px; }
.output-link em, .legal-review-link { color: var(--accent); font-size: 11px; font-style: normal; font-weight: 600; }
.legal-review-link { display: inline-block; margin: 12px 10px 0; text-decoration: none; }
.form-error { min-height: 18px; margin: 10px; color: var(--danger); font-size: 11px; line-height: 1.5; }
.review-error { margin: 20px 10px 0; padding: 0 0 16px 11px; border-left: 3px solid var(--risk); border-bottom: 1px solid var(--border); }
.review-error strong { font-size: 14px; font-weight: 650; }
.review-error p { margin-top: 6px; color: var(--secondary); font-size: 12px; line-height: 1.6; }
.failure-code { display: inline-block; margin-top: 9px; padding: 3px 6px; border-radius: 3px; background: #f3eee8; color: #795a4c; font-size: 9px; }
.review-error .recovery-action { color: #545f5a; font-weight: 600; }
.review-error button { margin-top: 11px; }
.command-bar { flex: 0 0 auto; margin: 0 18px 14px; padding: 9px 10px 8px; border: 1px solid #dfe2e0; border-radius: 7px; background: #fff; }
.command-bar:focus-within { border-color: #a8beb8; box-shadow: 0 0 0 2px rgba(34,107,97,.06); }
.command-bar textarea { display: block; width: 100%; height: 34px; max-height: 120px; padding: 2px 1px; resize: vertical; border: 0; outline: 0; font-size: 12px; line-height: 1.45; }
.command-actions { display: flex; align-items: center; justify-content: space-between; margin-top: 3px; }
.command-actions button { border: 0; background: transparent; color: #808783; font-size: 10px; cursor: pointer; }
.command-actions button:disabled { color: #b6bbb8; cursor: default; }
.send-button { min-width: 43px; height: 27px; border-radius: 5px !important; background: var(--accent) !important; color: #fff !important; font-weight: 600; }
.send-button:disabled { background: #edf0ee !important; color: #9ca29f !important; }
.sent-note { margin-bottom: 5px; color: var(--accent); font-size: 10px; }

/* Existing legal-review route remains intentionally separate from the frozen workbench shell. */
.legal-provenance { margin: 20px 0; }
.topbar { height: 72px; padding: 0 40px; display: flex; align-items: center; justify-content: space-between; background: #fff; border-bottom: 1px solid #dfe5e2; }
.brand-block { display: flex; align-items: center; gap: 12px; }
.brand-mark { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 6px; background: var(--accent); color: #fff; font-size: 13px; font-weight: 800; }
.brand-block h1 { font-size: 18px; }
.brand-block p { margin-top: 2px; color: var(--secondary); font-size: 12px; }
.back-link { color: var(--accent); font-size: 13px; font-weight: 700; text-decoration: none; }
.legal-main { width: min(1240px, calc(100% - 48px)); margin: 32px auto 56px; }
.legal-title-band { min-height: 112px; padding: 24px 28px; display: flex; align-items: center; justify-content: space-between; gap: 24px; background: #fff; border: 1px solid #dfe5e2; border-radius: 6px; }
.legal-title-band h2 { margin-top: 4px; font-size: 24px; }
.legal-subtitle { margin-top: 7px; color: #64706b; font-size: 13px; line-height: 1.5; }
.status-pill { min-height: 27px; display: inline-flex; align-items: center; padding: 0 9px; border-radius: 999px; font-size: 11px; font-weight: 750; }
.status-pill.running { color: #805a08; background: #fff0c9; }
.status-pill.complete { color: #0c664b; background: #d9f2e7; }
.status-pill.failed { color: #a12626; background: #fde3e3; }
.legal-layout { margin-top: 18px; display: grid; grid-template-columns: 218px minmax(0, 1fr); align-items: start; background: #fff; border: 1px solid #dfe5e2; border-radius: 6px; overflow: hidden; }
.legal-sidebar { position: sticky; top: 16px; padding: 24px 20px; }
.legal-sidebar nav { display: grid; gap: 2px; }
.legal-sidebar nav a { min-height: 38px; padding: 9px 10px; color: #53605b; border-left: 3px solid transparent; font-size: 12px; font-weight: 700; text-decoration: none; }
.legal-sidebar nav a:hover { color: var(--accent); background: #f0f7f4; border-left-color: var(--accent); }
.case-metadata { margin: 24px 10px 0; padding-top: 16px; border-top: 1px solid #dfe5e2; }
.case-metadata dt { margin-top: 10px; color: #7b8581; font-size: 10px; font-weight: 750; }
.case-metadata dd { margin: 3px 0 0; color: #2b3733; font-size: 12px; overflow-wrap: anywhere; }
.legal-content { min-width: 0; border-left: 1px solid #dfe5e2; }
.legal-section { padding: 28px 32px 32px; scroll-margin-top: 18px; border-bottom: 1px solid #dfe5e2; }
.legal-section:last-child { border-bottom: 0; }
.section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 18px; }
.legal-heading h3 { margin-top: 3px; font-size: 18px; }
.frozen-label, .required-count { color: #52605b; font-size: 11px; font-weight: 750; }
.context-grid { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid #dfe5e2; border-left: 1px solid #dfe5e2; }
.context-item { min-height: 92px; padding: 14px 16px; border-right: 1px solid #dfe5e2; border-bottom: 1px solid #dfe5e2; }
.context-item span { color: #78827e; font-size: 11px; font-weight: 750; }
.context-item p { margin-top: 7px; color: #26332f; font-size: 13px; line-height: 1.55; white-space: pre-wrap; }
.summary-block, .decision-list { margin-top: 20px; }
.summary-block h4, .decision-list h4 { margin-bottom: 8px; color: #4c5954; font-size: 12px; }
.summary-block p, .decision-list li { color: #35413d; font-size: 13px; line-height: 1.65; white-space: pre-wrap; }
.material-list { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.material-link { min-height: 48px; padding: 10px 12px; display: flex; align-items: center; justify-content: space-between; gap: 14px; color: var(--accent); background: #f1f8f5; border: 1px solid #c9dfd7; border-radius: 5px; font-size: 12px; font-weight: 700; text-decoration: none; }
.workpaper-text { color: #2f3c37; font-size: 13px; line-height: 1.72; white-space: pre-wrap; }
.finding-groups { display: grid; gap: 24px; }
.finding-group h4 { margin-bottom: 8px; color: #34413c; font-size: 13px; }
.finding-row { border-top: 1px solid #e0e6e3; }
.finding-row:last-child { border-bottom: 1px solid #e0e6e3; }
.finding-row summary { min-height: 52px; padding: 11px 6px; display: grid; grid-template-columns: 58px minmax(0, 1fr); align-items: center; gap: 10px; cursor: pointer; }
.finding-body { padding: 0 6px 14px 74px; }
.finding-body p { margin-top: 6px; color: #5e6a65; font-size: 12px; line-height: 1.55; }
.risk-tag { min-height: 23px; padding: 3px 6px; display: inline-grid; place-items: center; border-radius: 4px; font-size: 10px; font-weight: 800; }
.risk-blocker, .risk-high { color: #982c2c; background: #fbe4e4; }
.risk-medium, .risk-review { color: #805a08; background: #fff0c9; }
.risk-low, .risk-info { color: #235d4a; background: #dff1e9; }
.required-finding-review { margin: 16px 0 2px; padding: 14px; border: 1px solid #b8cec5; border-left: 4px solid var(--accent); border-radius: 5px; background: #f7fbf9; }
.required-finding-review legend { padding: 0 5px; color: var(--accent); font-size: 11px; font-weight: 800; }
.revision-upload { min-height: 72px; margin-top: 20px; padding: 13px 14px; display: flex; align-items: center; justify-content: space-between; gap: 16px; background: #f7f9f8; border: 1px solid #dce3e0; border-radius: 5px; }
.revision-upload strong { font-size: 12px; }
.revision-upload p { margin-top: 4px; color: #6b7772; font-size: 11px; }
.secondary-action, .primary-action { min-height: 40px; padding: 0 15px; border-radius: 5px; font-weight: 700; cursor: pointer; }
.secondary-action { color: var(--accent); background: #fff; border: 1px solid #9cb9ae; }
.primary-action { color: #fff; background: var(--accent); border: 0; }
.legal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 6px; }
.inline-action { min-width: 154px; }
.danger-action { color: #9c2929; border-color: #d7a8a8; }
.decision-result { margin-top: 18px; padding: 15px; color: #2c3a35; background: #edf7f3; border: 1px solid #c6ded5; border-radius: 5px; }

@media (max-width: 1371px) and (min-width: 1180px) {
  .workbench-shell { grid-template-columns: 252px minmax(680px, 1fr) 368px; }
  .paper { padding-left: 52px; padding-right: 52px; }
}
@media (max-width: 1179px) {
  .workbench-shell { grid-template-columns: minmax(0, 1fr) 360px; height: 100vh; }
  .workspace-panel { display: none; }
  .document-canvas { padding: 28px 22px 60px; }
  .paper { padding: 46px 46px 84px; }
}
@media (max-width: 760px) {
  .workbench-shell { display: block; height: auto; overflow: visible; }
  .document-panel { min-height: 65vh; }
  .assistant-panel { min-height: 70vh; border-left: 0; border-top: 1px solid var(--border); }
  .document-canvas { min-height: 560px; }
  .paper { min-height: 720px; padding: 38px 28px 68px; }
  .topbar { height: 66px; padding: 0 18px; }
  .legal-main { width: min(100% - 24px, 680px); margin-top: 18px; }
  .legal-layout { grid-template-columns: 1fr; }
  .legal-sidebar { position: static; border-bottom: 1px solid #dfe5e2; }
  .legal-sidebar nav { grid-template-columns: repeat(3, 1fr); }
  .case-metadata { display: none; }
  .legal-content { border-left: 0; }
  .context-grid, .material-list { grid-template-columns: 1fr; }
}
.auth-gate[hidden], .workbench-shell[hidden] { display: none !important; }
.auth-gate { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: #eef3f1; }
.auth-card { width: min(100%, 400px); padding: 32px; display: grid; gap: 16px; background: #fff; border: 1px solid #d7e0dc; border-radius: 8px; box-shadow: 0 18px 60px rgba(32, 54, 46, .12); }
.auth-card h1 { font-size: 24px; }
.auth-card > p:not(.eyebrow):not(.form-error) { color: #62706a; font-size: 13px; line-height: 1.6; }
.auth-card label { display: grid; gap: 7px; color: #37433e; font-size: 12px; font-weight: 700; }
.auth-card input { min-height: 42px; padding: 0 12px; border: 1px solid #c7d2cd; border-radius: 5px; font: inherit; }
