    :root { color-scheme: light; font-family: "Microsoft YaHei", Arial, sans-serif; }
    * { box-sizing: border-box; }
    [hidden] { display: none !important; }
    body { margin: 0; background: #f5f7fb; color: #172033; }
    header { min-height: 86px; display: grid; grid-template-columns: minmax(260px, auto) minmax(360px, 1fr) minmax(360px, auto); gap: 14px; align-items: center; padding: 10px 18px; border-bottom: 1px solid #d9deea; background: #fff; }
    .brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
    h1 { font-size: 18px; margin: 0; font-weight: 700; }
    button { border: 1px solid #1d4ed8; background: #1d4ed8; color: white; padding: 8px 12px; border-radius: 6px; cursor: pointer; }
    button.secondary { background: #fff; color: #1d4ed8; }
    button:disabled { opacity: .55; cursor: wait; }
    input { width: 100%; border: 1px solid #cfd6e4; border-radius: 6px; padding: 8px 10px; margin-bottom: 10px; }
    main { height: calc(100vh - 86px); display: grid; grid-template-columns: 260px 26px minmax(440px, 1fr) minmax(480px, 540px); gap: 0; }
    body.left-collapsed main { grid-template-columns: 0 26px minmax(440px, 1fr) minmax(480px, 540px); }
    body.compare-read main { grid-template-columns: minmax(0, 1fr) minmax(420px, 1fr); }
    body.compare-read .left { display: none; }
    body.left-collapsed .left { padding: 0; border-right: 0; overflow: hidden; }
    body.compare-read .left-collapse-rail { display: none; }
    body.compare-read .summary-toolbar, body.compare-read #rightHome, body.compare-read #subpageHeader, body.compare-read #summaryPanel { display: none; }
    .compare-only { display: none; }
    body.compare-read .compare-only { display: inline-block; }
    aside, section { overflow: auto; border-right: 1px solid #d9deea; background: #fff; }
    .center { display: flex; flex-direction: column; overflow: hidden; }
    .center-tabs { flex: 0 0 auto; display: flex; gap: 6px; padding: 8px 10px; border-bottom: 1px solid #d9deea; background: #fff; }
    .center-tab { border-color: #cfd6e4; background: #fff; color: #344054; padding: 7px 10px; }
    .center-tab.active { border-color: #1d4ed8; background: #eef4ff; color: #1d4ed8; font-weight: 700; }
    #pages { flex: 1 1 auto; height: auto; min-height: 0; overflow: hidden; }
    .pdf-pane, .reader-pane { height: 100%; min-height: 0; overflow: auto; }
    .pdf-pane { display: flex; flex-direction: column; }
    .left { padding: 14px; }
    .left-header { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
    .left-header h2 { margin: 0; font-size: 20px; }
    .left-import-button { flex: 0 0 auto; min-height: 30px; padding: 5px 8px; font-size: 12px; white-space: nowrap; }
    .left-collapse-rail { position: relative; display: flex; align-items: center; justify-content: center; background: #fff; border-right: 1px solid #d9deea; }
    .left-collapse-toggle { width: 22px; height: 54px; padding: 0; border-radius: 999px; border-color: #cfd6e4; background: #fff; color: #1d4ed8; box-shadow: 0 4px 12px rgba(15, 23, 42, .10); font-size: 14px; line-height: 1; }
    .left-collapse-toggle:hover { border-color: #1d4ed8; background: #eef4ff; }
    .right { padding: 14px 14px 120px; scroll-padding-bottom: 120px; }
    .right-scroll-top { position: fixed; right: 24px; bottom: 88px; z-index: 45; width: 42px; height: 42px; padding: 0; border-radius: 999px; background: #fff; color: #1d4ed8; box-shadow: 0 10px 24px rgba(15, 23, 42, .18); font-weight: 700; }
    .doc { padding: 12px 14px; border: 1px solid #dbe2ef; border-radius: 6px; margin-bottom: 10px; cursor: pointer; background: #fbfcff; }
    .doc:hover { border-color: #8aa7e8; }
    .doc.active { border-color: #1d4ed8; background: #eef4ff; }
    .doc-title { display: flex; align-items: start; justify-content: space-between; gap: 8px; }
    .pdf-status { flex: 0 0 auto; display: inline-flex; align-items: center; border-radius: 999px; padding: 2px 7px; font-size: 11px; border: 1px solid #dbe2ef; background: #f8fafc; color: #344054; }
    .pdf-status.not-imported { background: #f3f4f6; color: #4b5563; }
    .pdf-status.need-ocr, .pdf-status.ocr-failed { background: #fffbeb; color: #92400e; border-color: #fbbf24; }
    .pdf-status.need-summary { background: #dbeafe; color: #1d4ed8; border-color: #93c5fd; }
    .pdf-status.summarizing { background: #ede9fe; color: #6d28d9; border-color: #c4b5fd; }
    .pdf-status.partial-summary { background: #fef3c7; color: #92400e; border-color: #fbbf24; }
    .pdf-status.summary-done { background: #dcfce7; color: #166534; border-color: #86efac; }
    .muted { color: #667085; font-size: 12px; }
    .workflow-stepper { display: grid; grid-template-columns: repeat(4, minmax(96px, 1fr)); gap: 6px; min-width: 420px; }
    .workflow-step { border-color: #dbe2ef; background: #fff; color: #344054; padding: 7px 8px; text-align: left; min-height: 48px; }
    .workflow-step.active { border-color: #1d4ed8; background: #eef4ff; color: #1d4ed8; font-weight: 700; }
    .workflow-step small { display: block; color: #667085; font-weight: 400; margin-top: 2px; }
    .stage-actions { display: grid; grid-template-columns: repeat(6, 92px); justify-content: flex-end; gap: 6px; align-items: stretch; }
    .stage-actions button { width: 92px; min-height: 32px; padding: 5px 6px; white-space: normal; font-size: 12px; line-height: 1.25; }
    .stage-actions #status { grid-column: 1 / -1; justify-self: end; }
    .page { margin: 16px; padding: 16px; background: #fff; border: 1px solid #dbe2ef; border-radius: 6px; }
    .page h2 { margin: 0 0 10px; font-size: 15px; }
    .page img { display: block; width: 100%; max-width: 980px; margin: 0 auto; background: #fff; }
    .page .page-meta { margin-bottom: 10px; }
    .page.highlight { outline: 3px solid #f59e0b; background: #fffbeb; }
    .pdf-frame { width: 100%; height: 100%; min-height: 0; flex: 1 1 auto; border: 0; background: #fff; display: block; }
    .pdf-js-viewer { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; background: #eef1f6; }
    .pdf-js-toolbar { flex: 0 0 auto; display: grid; grid-template-columns: auto auto auto auto minmax(120px, 1fr) auto auto auto auto auto; gap: 6px; align-items: center; padding: 8px 10px; border-bottom: 1px solid #d9deea; background: #fff; }
    .pdf-js-toolbar input { margin: 0; height: 32px; padding: 5px 8px; }
    .pdf-js-toolbar button { min-height: 32px; padding: 5px 9px; }
    .pdf-js-page-input { width: 70px; }
    .pdf-js-search { min-width: 120px; }
    .pdf-js-search-count { min-width: 56px; text-align: center; white-space: nowrap; }
    .pdf-js-container-wrap { position: relative; flex: 1 1 auto; min-height: 0; }
    .pdf-js-container { position: absolute; inset: 0; overflow: auto; background: #80858f; }
    .pdf-js-container .pdfViewer { --page-margin: 10px auto; --page-border: 1px solid rgba(15, 23, 42, .18); padding: 10px 0 24px; }
    .pdf-js-status { flex: 0 0 auto; padding: 5px 10px; color: #667085; font-size: 12px; border-top: 1px solid #d9deea; background: #fff; }
    .pdf-js-page-surface { position: absolute; z-index: 2; pointer-events: none; line-height: 0; }
    .pdf-js-page-number { position: absolute; left: 10px; top: 8px; z-index: 3; padding: 2px 7px; border-radius: 999px; background: rgba(17, 24, 39, .64); color: #fff; font-size: 12px; pointer-events: none; }
    .pdf-js-highlight-layer { position: absolute; pointer-events: none; }
    .pdf-js-current-highlight-layer { z-index: 3; }
    .pdf-js-map-highlight-layer { z-index: 2; }
    .pdf-js-highlight-box { position: absolute; border: 2px solid #f59e0b; background: rgba(250, 204, 21, .28); box-shadow: 0 0 0 1px rgba(146, 64, 14, .24); }
    .pdf-js-map-highlight-box { position: absolute; border: 1px solid #2563eb; background: rgba(37, 99, 235, .12); box-shadow: 0 0 0 1px rgba(37, 99, 235, .14); }
    .pdf-js-clickable-highlight { pointer-events: auto; cursor: pointer; }
    .pdf-js-clickable-highlight:hover, .pdf-js-clickable-highlight:focus-visible { border-color: #1d4ed8; background: rgba(59, 130, 246, .24); outline: 2px solid rgba(29, 78, 216, .36); outline-offset: 1px; }
    .pdf-js-map-marker { position: absolute; min-width: 22px; height: 20px; padding: 0 5px; border: 0; border-radius: 999px; background: #1d4ed8; color: #fff; font-size: 11px; line-height: 20px; transform: translate(-30%, -115%); pointer-events: auto; cursor: pointer; box-shadow: 0 6px 16px rgba(15, 23, 42, .22); }
    .pdf-highlight-viewer { padding: 0 0 24px; background: #f3f5f9; }
    .pdf-highlight-stage { width: min(980px, calc(100% - 28px)); margin: 14px auto; position: relative; background: #fff; box-shadow: 0 8px 28px rgba(15, 23, 42, .16); }
    .pdf-highlight-stage img { display: block; width: 100%; height: auto; }
    .pdf-highlight-box { position: absolute; z-index: 2; border: 2px solid #f59e0b; background: rgba(250, 204, 21, .28); box-shadow: 0 0 0 1px rgba(146, 64, 14, .24); pointer-events: none; }
    .pdf-highlight-empty { width: min(980px, calc(100% - 28px)); margin: 10px auto 0; color: #92400e; font-size: 13px; }
    .summary-toolbar { position: sticky; top: 52px; z-index: 7; background: #fff; padding: 8px 0 10px; border-bottom: 1px solid #d9deea; margin: 0 0 12px; }
    .summary-toolbar input { margin-bottom: 8px; }
    .summary-filter-banner { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; padding: 7px 9px; border: 1px solid #bfdbfe; border-radius: 6px; background: #eff6ff; color: #1e3a8a; font-size: 12px; }
    .summary-filter-banner button { padding: 3px 7px; font-size: 12px; }
    .selected-page-summary { border: 1px solid #dbe2ef; border-radius: 6px; background: #fbfcff; margin-bottom: 8px; }
    .selected-page-summary summary { padding: 7px 9px; cursor: pointer; font-size: 13px; font-weight: 700; }
    .selected-page-controls { display: grid; grid-template-columns: 1fr auto; gap: 6px; padding: 0 8px 8px; align-items: start; }
    .selected-page-controls input { margin: 0; }
    .selected-page-controls button { padding: 6px 9px; white-space: nowrap; }
    textarea { width: 100%; min-height: 82px; resize: vertical; border: 1px solid #cfd6e4; border-radius: 6px; padding: 8px 10px; margin-bottom: 8px; font-family: inherit; }
    .right-home { display: grid; gap: 10px; margin: 10px 0 14px; }
    .right-card { width: 100%; text-align: left; border: 1px solid #dbe2ef; background: #fbfcff; color: #172033; padding: 12px; border-radius: 6px; }
    .right-card:hover { border-color: #8aa7e8; background: #f4f7ff; }
    .right-card strong { display: block; margin-bottom: 4px; font-size: 15px; }
    .right-card span { display: block; line-height: 1.45; }
    .workflow-card { border: 1px solid #dbe2ef; background: #fbfcff; border-radius: 6px; padding: 12px; }
    .workflow-card h3 { margin: 0 0 6px; font-size: 15px; }
    .workflow-nav { display: grid; gap: 8px; }
    .workflow-detail { border: 1px solid #dbe2ef; border-radius: 6px; background: #fff; }
    .workflow-detail summary { cursor: pointer; padding: 9px 10px; font-weight: 700; }
    .workflow-detail div { padding: 0 10px 10px; line-height: 1.55; }
    .subpage-header { position: sticky; top: 0; z-index: 9; display: flex; align-items: center; gap: 8px; min-height: 42px; margin: 0; padding: 8px 0; background: #fff; border-bottom: 1px solid #edf1f7; }
    .subpage-header strong { font-size: 15px; }
    .subpage-header button { padding: 6px 10px; }
    .scope-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 8px; }
    .scope-tab { border-color: #cfd6e4; background: #fff; color: #344054; padding: 7px 10px; }
    .scope-tab.active { border-color: #1d4ed8; background: #eef4ff; color: #1d4ed8; font-weight: 700; }
    .status-chip { position: relative; border: 1px solid #dbe2ef; border-radius: 6px; padding: 8px 10px; background: #fbfcff; cursor: default; max-width: 220px; }
    .status-chip strong { display: block; margin-top: 3px; font-size: 15px; line-height: 1.25; overflow: hidden; overflow-wrap: normal; text-overflow: ellipsis; white-space: nowrap; }
    header .status-chip { width: 210px; max-width: 210px; padding: 5px 9px; }
    header .status-chip strong { font-size: 14px; margin-top: 1px; }
    .status-popover { display: none; position: absolute; left: 0; right: 0; top: 100%; z-index: 20; padding: 10px; border: 1px solid #cfd6e4; border-radius: 6px; background: #fff; box-shadow: 0 10px 24px rgba(15, 23, 42, .16); }
    header .status-popover { right: auto; width: min(720px, calc(100vw - 24px)); }
    .status-chip:hover .status-popover { display: block; }
    .full-ranges-grid { column-width: 120px; column-gap: 18px; overflow: visible; word-break: break-all; margin: 4px 0 10px; color: #101828; line-height: 1.55; }
    .coverage { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 10px; }
    .metric { border: 1px solid #dbe2ef; border-radius: 6px; padding: 8px; background: #fbfcff; }
    .metric strong { display: block; font-size: 16px; }
    .point { border: 1px solid #dbe2ef; border-radius: 6px; padding: 12px; margin-bottom: 10px; background: #fff; }
    .point:hover { border-color: #8aa7e8; }
    .point h3 { margin: 0 0 8px; font-size: 15px; padding-right: 52px; }
    .summary-number-pair { float: right; display: inline-flex; align-items: center; gap: 4px; margin-left: 8px; }
    .summary-number { font-size: 12px; font-weight: 700; color: #1d4ed8; background: #eff6ff; border: 1px solid #bfdbfe; border-radius: 999px; padding: 2px 7px; white-space: nowrap; }
    .summary-number[data-kind="global"] { color: #047857; background: #ecfdf3; border-color: #a7f3d0; }
    .summary-number[data-active="false"] { color: #667085; background: #f8fafc; border-color: #dbe2ef; font-weight: 600; }
    .point-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
    .point-actions button { padding: 4px 8px; font-size: 12px; }
    .summary-edit { min-height: 72px; margin: 8px 0 0; font-size: 13px; }
    .summary-editor { margin-top: 8px; border-top: 1px solid #edf1f7; }
    .summary-editor > summary { padding: 7px 0 2px; cursor: pointer; color: #1d4ed8; font-size: 12px; }
    .summary-editor-actions { display: flex; justify-content: flex-end; gap: 6px; padding-bottom: 6px; }
    .point-more { position: relative; }
    .point-more > summary { list-style: none; cursor: pointer; border: 1px solid #cfd6e4; border-radius: 5px; padding: 4px 8px; color: #344054; background: #fff; font-size: 12px; }
    .point-more > summary::-webkit-details-marker { display: none; }
    .point-more-menu { position: absolute; right: 0; top: calc(100% + 4px); z-index: 12; width: 170px; display: grid; gap: 3px; padding: 6px; border: 1px solid #cfd6e4; border-radius: 6px; background: #fff; box-shadow: 0 10px 24px rgba(15, 23, 42, .16); }
    .point-more-menu button { width: 100%; text-align: left; border-color: transparent; background: #fff; color: #344054; }
    .qa-turn { border: 1px solid #dbe2ef; border-radius: 6px; padding: 12px; margin-bottom: 10px; background: #fff; }
    .qa-question { font-weight: 700; margin-bottom: 8px; }
    .qa-answer { line-height: 1.55; margin-bottom: 10px; white-space: pre-wrap; }
    .markdown-output { line-height: 1.72; white-space: normal; color: #172033; }
    .markdown-output h2 { margin: 16px 0 9px; padding-bottom: 6px; border-bottom: 1px solid #edf1f7; font-size: 18px; }
    .markdown-output h3 { margin: 14px 0 7px; padding-left: 8px; border-left: 3px solid #1d4ed8; font-size: 15px; }
    .markdown-output p { margin: 0 0 9px; }
    .markdown-output ul, .markdown-output ol { margin: 0 0 10px 20px; padding: 0; }
    .markdown-output li { margin-bottom: 6px; }
    .markdown-output strong { font-weight: 700; color: #111827; }
    .markdown-output .inline-citation { margin: 0 3px; padding: 2px 6px; font-size: 12px; border-radius: 4px; }
    .streaming-cursor { display: inline-block; width: 7px; height: 1.1em; margin-left: 3px; border-radius: 999px; background: #1d4ed8; vertical-align: -2px; animation: blink 1s steps(2, start) infinite; }
    @keyframes blink { 50% { opacity: .18; } }
    .qa-float { position: fixed; right: 18px; bottom: 18px; z-index: 50; touch-action: none; }
    .qa-float.dragging { cursor: grabbing; }
    .qa-float-toggle { width: 58px; height: 58px; min-width: 58px; border-radius: 999px; padding: 0; display: grid; place-items: center; gap: 0; box-shadow: 0 10px 24px rgba(15, 23, 42, .18); font-weight: 700; }
    .qa-assistant { display: grid; place-items: center; width: 100%; height: 100%; line-height: 1.05; }
    .qa-assistant strong { font-size: 15px; }
    .qa-assistant span { font-size: 11px; opacity: .88; }
    .qa-float-panel { position: absolute; right: 0; bottom: 48px; width: min(420px, calc(100vw - 32px)); max-height: min(620px, calc(100vh - 90px)); display: flex; flex-direction: column; border: 1px solid #cfd6e4; border-radius: 8px; background: #fff; box-shadow: 0 18px 42px rgba(15, 23, 42, .22); overflow: hidden; }
    .qa-float-header { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; border-bottom: 1px solid #edf1f7; }
    .qa-float-body { padding: 10px; overflow: auto; }
    .qa-float textarea { min-height: 76px; margin-bottom: 8px; }
    .draft-section { margin-bottom: 16px; }
    .draft-section h3 { font-size: 15px; margin: 0 0 8px; }
    .draft-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(88px, 1fr)); gap: 6px; margin-bottom: 10px; }
    .draft-actions button { padding: 7px 8px; }
    .draft-report { border: 1px solid #dbe2ef; border-radius: 6px; background: #fff; padding: 12px; margin-bottom: 12px; line-height: 1.65; cursor: text; }
    .draft-report h3 { margin: 0 0 8px; font-size: 15px; }
    .draft-report p { margin: 0 0 8px; }
    .draft-details { border: 1px solid #dbe2ef; border-radius: 6px; background: #fff; margin-bottom: 8px; }
    .draft-details summary { padding: 10px 12px; cursor: pointer; font-weight: 700; }
    .draft-details[open] summary { border-bottom: 1px solid #edf1f7; }
    .case-synopsis { padding: 12px; line-height: 1.7; }
    .case-synopsis p { margin: 0 0 10px; }
    .case-synopsis p:last-child { margin-bottom: 0; }
    .case-synopsis-note { color: #64748b; font-size: 12px; }
    .center-case-synopsis { max-width: 860px; margin: 0 auto 12px; }
    .draft-node { border: 1px solid #dbe2ef; border-radius: 6px; padding: 10px; margin-bottom: 8px; background: #fff; }
    .draft-node textarea { min-height: 70px; margin-top: 8px; }
    .center-reader { position: relative; height: 100%; overflow: auto; padding: 24px; background: #fff; }
    .center-reader-close { position: sticky; top: 10px; z-index: 3; float: right; margin: 0 0 8px 12px; padding: 6px 10px; background: #fff; }
    .center-reader article { max-width: 860px; margin: 0 auto; line-height: 1.75; font-size: 15px; }
    .report-list { margin: 8px 0 0; padding-left: 20px; }
    .report-list li { margin-bottom: 10px; }
    .timeline-item { position: relative; border-left: 3px solid #1d4ed8; padding: 0 0 14px 14px; margin-left: 8px; }
    .timeline-item strong { display: block; margin-bottom: 4px; }
    .warning { border: 1px solid #f59e0b; background: #fffbeb; color: #92400e; border-radius: 6px; padding: 8px 10px; margin-bottom: 10px; font-size: 13px; }
    .citation { border: 1px solid #dbe2ef; border-left: 3px solid #1d4ed8; border-radius: 6px; padding: 8px; margin-top: 8px; cursor: pointer; background: #fbfcff; }
    .citation:hover { border-color: #8aa7e8; }
    .citation-list { margin-top: 8px; border: 1px solid #dbe2ef; border-radius: 6px; background: #fbfcff; }
    .citation-list summary { padding: 6px 8px; cursor: pointer; font-size: 12px; color: #344054; }
    .citation-row { display: grid; grid-template-columns: auto 1fr; gap: 6px; align-items: start; padding: 6px 8px; border-top: 1px solid #edf1f7; }
    .citation-link { padding: 3px 7px; border-radius: 4px; font-size: 12px; line-height: 1.35; white-space: nowrap; }
    .citation-row .quote { margin-top: 0; font-size: 12px; }
    .citation-mark { display: inline-block; font-size: 11px; border-radius: 999px; padding: 1px 7px; margin-left: 6px; vertical-align: middle; white-space: nowrap; }
    .citation-mark.exact { background: #dcfce7; color: #166534; }
    .citation-mark.loose { background: #fef3c7; color: #92400e; }
    .citation-mark.miss { background: #fee2e2; color: #991b1b; }
    .badge { display: inline-block; font-size: 12px; border-radius: 999px; padding: 2px 8px; margin-bottom: 8px; }
    .ok { background: #dcfce7; color: #166534; }
    .bad { background: #fee2e2; color: #991b1b; }
    .quote { color: #344054; border-left: 3px solid #d0d5dd; padding-left: 8px; margin-top: 8px; font-size: 13px; }
    .error { color: #991b1b; margin-top: 8px; font-size: 13px; }
    .progress { margin: 8px 0 12px; height: 8px; border-radius: 999px; background: #e5e7eb; overflow: hidden; }
    .progress > div { height: 100%; background: #1d4ed8; width: 0%; transition: width .25s ease; }
    #importProgress { display: none; width: 120px; margin: 0 0 0 8px; height: 6px; vertical-align: middle; }
    #importProgress.show { display: inline-block; }

    /* Lawyer workspace shell */
    body { overflow: hidden; background: #f3f5f8; }
    /* 窄窗口兜底：视口小于工作台最小宽度时允许横向滚动，
       内容保持完整不挤压（显示器/缩放差异下的最后防线）。 */
    html { overflow-x: auto; }
    @media (max-width: 981px) {
      html { min-width: 982px; }
    }
    header { height: 62px; min-height: 62px; grid-template-columns: minmax(460px, 1.15fr) minmax(390px, 1fr) auto; gap: 18px; padding: 0 16px; }
    .case-context { display: grid; grid-template-columns: 32px minmax(88px, 1fr) minmax(140px, 180px) 150px; align-items: center; gap: 8px; min-width: 0; }
    .app-mark { width: 32px; height: 32px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 6px; background: #1d4ed8; color: #fff; font-weight: 800; }
    .case-context-copy { min-width: 0; }
    .case-context-copy small { display: block; overflow: hidden; color: #667085; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
    .case-context h1 { overflow: hidden; margin: 1px 0 0; font-size: 16px; text-overflow: ellipsis; white-space: nowrap; }
    .case-context #coverage { min-width: 0; }
    header .status-chip { width: 150px; max-width: 150px; }
    main { height: calc(100vh - 100px); grid-template-columns: 248px 24px minmax(440px, 1fr) minmax(390px, 460px); }
    body.left-collapsed main { grid-template-columns: 0 24px minmax(440px, 1fr) minmax(390px, 460px); }
    .workflow-stepper { grid-template-columns: repeat(3, minmax(112px, 1fr)); gap: 2px; min-width: 390px; padding: 3px; border: 1px solid #dbe2ef; border-radius: 7px; background: #f8fafc; }
    .workflow-step { min-height: 42px; padding: 7px 10px; border: 0; background: transparent; color: #475467; text-align: center; }
    .workflow-step.active { border: 0; background: #fff; color: #1d4ed8; box-shadow: 0 1px 3px rgba(15, 23, 42, .12); }
    .workflow-step small { margin-top: 1px; font-size: 11px; }
    .stage-actions { display: flex; justify-content: flex-end; gap: 7px; align-items: center; }
    .stage-actions button { width: auto; min-height: 34px; padding: 6px 10px; white-space: nowrap; font-size: 12px; }
    .stage-actions #status { display: none; }
    .stage-more { position: relative; }
    .stage-more > summary { list-style: none; cursor: pointer; border: 1px solid #cfd6e4; border-radius: 6px; padding: 8px 10px; color: #344054; background: #fff; font-size: 12px; }
    .stage-more > summary::-webkit-details-marker { display: none; }
    .stage-menu-content { position: absolute; top: calc(100% + 6px); right: 0; z-index: 40; width: 220px; display: grid; gap: 4px; padding: 8px; border: 1px solid #cfd6e4; border-radius: 7px; background: #fff; box-shadow: 0 14px 32px rgba(15, 23, 42, .18); }
    .stage-menu-content button { width: 100%; text-align: left; border-color: transparent; background: #fff; color: #344054; }
    .stage-menu-content button:hover { background: #f1f5f9; }
    .left { padding: 12px 10px; }
    .doc { padding: 9px 10px; margin-bottom: 4px; border-color: transparent; background: transparent; }
    .right { padding: 0 12px 80px; scroll-padding-bottom: 80px; }
    .right-context-header { position: sticky; top: 0; z-index: 10; margin: 0 -12px 10px; padding: 10px 12px 8px; background: #fff; border-bottom: 1px solid #d9deea; }
    .right-context-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 28px; }
    .right-context-row h2 { margin: 0; font-size: 16px; }
    .right-mode-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; margin-top: 8px; padding: 3px; border-radius: 6px; background: #f1f5f9; }
    .right-mode-tab { border: 0; background: transparent; color: #475467; padding: 6px 7px; }
    .right-mode-tab.active { background: #fff; color: #1d4ed8; box-shadow: 0 1px 3px rgba(15, 23, 42, .1); font-weight: 700; }
    .subpage-header { display: none; }
    .summary-toolbar { top: 76px; padding-top: 4px; }
    .right-scroll-top { right: 18px; bottom: 52px; width: 36px; height: 36px; }
    .qa-float { bottom: 48px; }
    .task-dock { height: 38px; display: flex; align-items: center; gap: 10px; padding: 0 14px; border-top: 1px solid #d9deea; background: #fff; color: #475467; font-size: 12px; }
    .task-dock > strong { color: #172033; white-space: nowrap; }
    .task-dock-summary { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .task-dock details { position: relative; margin-left: auto; }
    .task-dock summary { cursor: pointer; color: #1d4ed8; white-space: nowrap; }
    .task-dock-details { position: absolute; right: 0; bottom: calc(100% + 8px); width: min(520px, calc(100vw - 28px)); max-height: 420px; overflow: auto; padding: 12px; border: 1px solid #cfd6e4; border-radius: 7px; background: #fff; box-shadow: 0 14px 36px rgba(15, 23, 42, .2); }
    @media (max-width: 1180px) {
      header { grid-template-columns: minmax(410px, 1fr) minmax(350px, .9fr) auto; gap: 10px; }
      .case-context { grid-template-columns: 32px minmax(64px, 1fr) minmax(130px, 150px) 136px; }
      header .status-chip { width: 136px; max-width: 136px; }
      main { grid-template-columns: 220px 22px minmax(400px, 1fr) minmax(340px, 390px); }
      body.left-collapsed main { grid-template-columns: 0 22px minmax(400px, 1fr) minmax(340px, 390px); }
      .workflow-stepper { min-width: 350px; }
      .case-context-copy small { display: none; }
    }

/* 案件切换条：换案件走整页重载，避免逐个清理内存里按案件缓存的东西 */
.case-bar { display: flex; gap: 6px; align-items: center; min-width: 0; margin-left: 0; }
.case-bar select { width: 100%; min-width: 0; max-width: 112px; padding: 4px 6px; }
.case-bar button { white-space: nowrap; padding: 6px 8px; }

/* 登录 / 邀请码注册。整页接管，工作台的栅格不参与，所以这里自成一套居中布局。
   配色一律取自上面已有的色板（#1d4ed8 / #f5f7fb / #667085 / 6px 圆角），
   目的是让它看起来像同一个应用的一部分，而不是一个单独的登录站。 */
.auth-body { display: grid; place-items: center; min-height: 100vh; padding: 24px; }
.auth-card { width: 100%; max-width: 360px; padding: 26px 24px 20px; border: 1px solid #dbe2ef; border-radius: 10px; background: #fff; box-shadow: 0 14px 40px rgba(15, 23, 42, .08); }
.auth-brand { display: flex; align-items: center; gap: 10px; color: #667085; font-size: 12px; }
.auth-card h2 { margin: 14px 0 18px; font-size: 20px; }
.auth-card label { display: block; margin-bottom: 5px; font-size: 12px; color: #344054; }
.auth-card input { margin-bottom: 14px; }
.auth-card button[type="submit"] { width: 100%; margin-top: 4px; padding: 10px; font-size: 14px; }
.auth-card .muted { margin: 12px 0 0; line-height: 1.6; }
.auth-switch a { color: #1d4ed8; }
/* 失败提示。红字加浅红底，和输入框区分开 —— 律师多半是在密码输错时看到它，
   要一眼能找到。文案一律来自后端，前端不改写、不细分（见 app.js 的红线①）。 */
.auth-error { margin-bottom: 12px; padding: 9px 11px; border: 1px solid #fca5a5; border-radius: 6px; background: #fef2f2; color: #b91c1c; font-size: 13px; line-height: 1.5; }

/* 「更多操作」菜单里的登录态 */
.menu-divider { height: 0; margin: 6px 2px; border: 0; border-top: 1px solid #e5e9f2; }
.menu-note { padding: 0 8px 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
