/* Surface 1.15 — shared native materials, tokens and components.
 * Glass fallback/preset pattern adapted from LiquidGlass-UI, src/liquid-glass.css,
 * commit 293328c3a983b55460b488bffb2caa6f25729c2f. No library runtime is included.
 * MIT License — Copyright (c) 2026 Hollan Yuan
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 * The above copyright notice and this permission notice shall be included in all
 * copies or substantial portions of the Software.
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 * SOFTWARE.
 */
:root {
  color-scheme: light;
  font-size: 16px;
  --font: system-ui, -apple-system, 'Segoe UI', sans-serif;
  --bg: #f7f8fa; --paper: #ffffff; --ink: #171b22; --muted: #596579;
  --soft: #f0f2f5; --line: #dfe4eb; --accent: #2363df; --accent-soft: #eaf0fd; --on-accent: #ffffff;
  --success: #187454; --success-soft: #edf7f2; --warning: #855315; --warning-soft: #fff7e9; --danger: #ad2940; --danger-soft: #fff0f2;
  --surface-canvas: var(--bg); --surface-chrome: var(--soft); --surface-hover: var(--soft); --surface-text: var(--ink); --surface-secondary: var(--muted);
  --radius-field: 12px; --radius-control: 12px; --radius-surface: 18px; --radius-layer: 24px;
  --shadow-paper: 0 1px 2px rgb(15 23 42 / .025), 0 8px 28px rgb(15 23 42 / .045);
  --shadow-float: 0 2px 5px rgb(20 32 55 / .04), 0 12px 30px rgb(20 32 55 / .06), 0 32px 80px -30px rgb(20 32 55 / .2);
  --product-shadow: var(--shadow-float); --shadow: var(--shadow-paper); --motion: 160ms;
  --glass-fill: rgb(255 255 255 / .82); --glass-solid: #ffffff; --glass-rim: rgb(255 255 255 / .8);
  --glass-shadow: inset 0 1px 0 var(--glass-rim), inset 0 -1px 0 rgb(15 23 42 / .025), 0 4px 24px rgb(15 23 42 / .065);
  --glass-blur: 20px; --ease-out: cubic-bezier(.16,1,.3,1); --motion-panel: 220ms;
  --topbar-bottom: 80px;
}
:root[data-theme=dark] {
  color-scheme: dark;
  --bg: #171b22; --paper: #202630; --ink: #edf1f7; --muted: #acb7c8; --soft: #272f3b; --line: #424d60;
  --accent: #91b7ff; --accent-soft: #263c60; --on-accent: #12223e;
  --success: #87d3b0; --success-soft: #20392e; --warning: #edc384; --warning-soft: #3b3020; --danger: #ff9bac; --danger-soft: #462733;
  --shadow-paper: 0 1px 3px #0002; --shadow-float: 0 8px 40px #0004;
  --glass-fill: rgb(32 38 48 / .9); --glass-solid: #202630; --glass-rim: rgb(255 255 255 / .08);
}
body, button, input, textarea, select {font-family:var(--font)}
body {background:var(--bg);color:var(--ink);font-size:16px;line-height:1.6}

.workspace-shell {background:var(--bg);margin:0;min-height:100dvh;border-radius:0;color:var(--ink)}
button,input,select,textarea {font-size:14px}
button:focus-visible,a:focus-visible,summary:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible {outline:2px solid var(--accent);outline-offset:3px}
button:disabled {opacity:.55}
.icon {width:18px;height:18px;stroke-width:1.65}
.btn {border-radius:var(--radius-control);min-height:40px;padding:9px 14px;font-size:14px;line-height:20px;gap:8px;box-shadow:none}
.btn.small {min-height:36px;font-size:13px;padding:8px 10px}
.btn.primary,.send-circle {background:var(--accent);color:var(--on-accent)}
.btn.primary:hover:not(:disabled),.send-circle:hover:not(:disabled) {filter:brightness(.93);box-shadow:none}
.icon-btn {width:40px;min-width:40px;height:40px;border-radius:10px}
.enterprise-topbar {height:56px;min-height:56px;top:12px;margin:12px 16px 0;padding:0 18px;gap:20px;border:0;border-radius:26px;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr)}
.identity,.top-actions,.surface-navigation {min-width:0}
.surface-brand-symbol {width:24px;height:24px}
.brand-wordmark {font-size:16px;letter-spacing:-.4px}
.surface-navigation {gap:3px;padding:4px;background:transparent;border-radius:22px}
.surface-navigation .tab {min-height:40px;padding:9px 16px;font-size:14px;line-height:20px;border-radius:19px;gap:7px;white-space:nowrap;transition:background 160ms var(--ease-out),transform 160ms var(--ease-out)}
.surface-navigation .tab.active {background:var(--paper);color:var(--ink);box-shadow:inset 0 1px 0 var(--glass-rim),0 2px 8px rgb(15 23 42 / .06)}
.surface-navigation .tab:active {transform:scale(.975)}
.surface-navigation .tab.active .icon {color:var(--accent)}
.nav-count {font-size:12px;line-height:20px;background:var(--accent-soft);color:var(--accent);min-width:20px}
.profile-avatar {width:32px;height:32px;font-size:13px}
.profile-identity {font-size:13px;max-width:175px;gap:2px}
.profile-identity small {font-size:12px}
.top-actions {gap:6px}
.top-actions .icon-btn {width:36px;min-width:36px;height:36px}
.demo-indicator {font-size:12px;padding:4px 8px}
.workspace-body {max-width:1180px;padding:32px 32px 56px;min-height:calc(100dvh - 125px)}
.overview-heading {margin-bottom:20px;align-items:center}
.overview-heading h1 {font-size:28px;line-height:34px;font-weight:600;letter-spacing:-.8px}
.overview-heading p {font-size:14px;line-height:22px;margin-top:6px}
.overview-heading .overview-date {font-size:13px}
.desk-segments {display:flex;gap:8px;margin:0 0 18px;border:0;padding-bottom:10px;flex-wrap:wrap}
.desk-segments button {background:none;font-size:14px;min-height:40px;padding:8px 12px;border-radius:8px}
.desk-segments button[aria-pressed=true] {background:var(--accent-soft);color:var(--accent)}
.desk-segments strong {font-size:12px;margin-left:8px}
.overview-controls {display:flex;flex-wrap:wrap;gap:12px;align-items:center;margin-bottom:18px}
.mesa-search {flex:1 1 210px;margin:0;max-width:360px}
.mesa-search input {min-height:42px;width:100%;font-size:14px;border:0;background:var(--paper);padding:10px 14px;border-radius:12px;box-shadow:inset 0 1px 2px rgb(15 23 42 / .035)}
.overview-toolbar {flex:1 1 auto;margin:0;display:flex;flex-wrap:wrap;gap:10px;justify-content:flex-end}
.overview-toolbar .btn {font-size:13px;min-height:36px;padding:7px 10px}
.overview-filters {gap:4px}
.overview-presentations {margin-left:0}
.subject-cards {grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
.subject-card {padding:24px;border:0;border-radius:var(--radius-surface);background:var(--paper);gap:16px;box-shadow:var(--shadow-paper);transform:none;transition:transform 160ms var(--ease-out),box-shadow 160ms var(--ease-out)}
.subject-card:has(button:hover),.subject-card:hover {transform:translateY(-1px);box-shadow:0 4px 24px rgb(15 23 42 / .075)}
.subject-card h2 {font-size:18px;line-height:25px;letter-spacing:-.3px;font-weight:600}
.subject-kind {font-size:12px}
.subject-icon-tile {width:32px;height:32px;border-radius:8px}
.subject-icon-tile .icon {width:18px;height:18px}
.subject-summary {font-size:14px;line-height:22px;color:var(--muted)}
.subject-card-preview {height:130px;min-height:0;background:var(--soft);border-radius:8px}
.subject-card-preview .preview-content {background:var(--soft);padding:12px;font-size:14px}
.preview-caption,.subject-card-meta,.subject-card .subject-state,.subject-card .subject-date,.subject-warning-count {font-size:12px}
.subject-card-open {font-size:14px!important;min-height:40px}
.subject-facts dt {font-size:12px}.subject-facts dd {font-size:14px}
.subject-preview-unavailable {font-size:13px;margin:0}
.overview-table {min-width:0}
.overview-table th,.overview-table td {padding:18px 14px;vertical-align:middle;border-bottom:1px solid var(--line)}
.overview-table thead th {font-size:12px;background:var(--soft);color:var(--muted);font-weight:500}
.overview-table tbody tr,.overview-table tbody tr:nth-child(odd) {background:transparent;box-shadow:none}
.overview-table tbody tr:hover,.overview-table tbody tr:focus-within {background:var(--soft)}
.overview-table .subject-title {font-size:16px;line-height:22px;font-weight:600;gap:10px}
.overview-table .subject-summary {font-size:14px;line-height:21px;font-weight:400;margin:5px 0 0 28px;-webkit-line-clamp:2;max-width:560px}
.overview-table .subject-date {font-size:12px;font-weight:400;margin-left:28px}
.overview-table .subject-state,.overview-table .subject-priority {font-size:13px;white-space:nowrap}
.desk-empty {padding:32px 0;text-align:left}.desk-empty h2 {font-size:20px}.desk-empty p {font-size:14px}.desk-empty .btn {margin-top:14px}
.week-day-heading,.week-item .btn,.week-item-meta {font-size:13px}
.footer {max-width:1116px;font-size:12px;opacity:1}
/* Matter content and conversation share one reading column. */
.workspace-body[data-view=desk][data-work-screen=detail],.workspace-body[data-view=assistant] {max-width:1080px;padding-top:24px}
.subject-detail-main,.assistant-dock {max-width:840px}
.subject-back {margin-bottom:0;min-height:36px}
.subject-back .btn {font-size:14px;min-height:36px}
.detail-position {font-size:12px;letter-spacing:.6px}
.detail-heading {padding-bottom:24px}
.detail-title h1 {font-size:28px;line-height:35px;font-weight:600;letter-spacing:-.7px;max-width:none;overflow-wrap:anywhere}
.detail-title p {font-size:13px;margin-top:8px}
.subject-navigation {display:flex;justify-content:space-between;gap:20px;margin:0 0 28px}
.subject-nav-back,.subject-nav-forward {display:flex;flex-direction:column;align-items:flex-start;gap:4px}
.subject-nav-forward {align-items:flex-end;text-align:right}
.subject-navigation .btn {font-size:13px;padding:6px 0;min-height:36px;color:var(--muted)}
.subject-navigation .btn:hover {color:var(--accent)}
.subject-nav-forward [data-e=work-queue] {font-size:12px}
.story-author {font-size:14px;gap:8px;margin-bottom:12px}
.story-spark {font-size:20px}
.story-step {margin-bottom:22px}
.story-paragraph {font-size:16px;line-height:26px;color:var(--ink);max-width:760px;white-space:pre-line}
.story-context {margin:32px 0 40px;padding:0 0 32px;border:0;box-shadow:0 1px 0 rgb(100 116 139 / .1)}
.story-context-heading {display:flex;align-items:center;gap:10px;margin:0 0 18px!important}
.story-context-number {display:grid;place-items:center;width:28px;height:28px;flex-shrink:0;border-radius:8px;background:var(--accent-soft);color:var(--accent);font-size:12px;font-weight:600;font-variant-numeric:tabular-nums}
.story-context-heading h2,.story-decision-heading {font-size:18px;line-height:26px;letter-spacing:-.3px;font-weight:600;color:var(--ink);margin:0}
.story-context-body {display:grid;grid-template-columns:minmax(0,1fr) 264px;gap:32px;align-items:start}
.story-context .story-step {margin-bottom:20px}
.story-context .story-step:last-child {margin-bottom:0}
.story-context-copy {padding-top:0;min-width:0}
.story-context-copy>.story-reference {margin:12px 0 22px}
.story-context-preview {min-width:0;position:sticky;top:calc(var(--topbar-bottom) + 16px)}
.story-context-preview:before {content:"";position:absolute;right:100%;top:19px;width:24px;border-top:1px solid color-mix(in srgb,var(--accent) 25%,var(--line))}
.story-reference-link {display:inline-flex;align-items:center;gap:7px;max-width:100%;padding:3px 0;color:var(--accent);font-size:13px;line-height:20px;text-align:left;background:transparent;border-radius:4px}
.story-reference-link .icon {width:15px;height:15px;flex-shrink:0}
.story-reference-link>span:first-of-type {overflow-wrap:anywhere;text-decoration:underline;text-decoration-color:color-mix(in srgb,var(--accent) 25%,transparent);text-underline-offset:3px}
.story-reference-link:hover>span:first-of-type {text-decoration-color:var(--accent)}
.story-context:has(.story-reference-link:hover) .story-preview,.story-context:focus-within .story-preview {box-shadow:0 0 0 2px var(--accent-soft),var(--shadow-paper)}
.story-review-points {padding-left:16px;border-left:2px solid var(--accent-soft)}
.story-review-lead {font-size:13px;line-height:21px;color:var(--muted);margin:0 0 18px}
.story-review-note {color:var(--ink);background:transparent}
.story-review-note h3 {font-size:14px;line-height:22px;font-weight:600;margin:0 0 3px}
.story-review-note .story-paragraph {font-size:15px;line-height:24px}
.story-decisions {margin:30px 0 12px;padding-top:6px;border:0}
.story-decision-heading {margin-bottom:18px}
.story-decisions .story-paragraph {font-size:15px;line-height:25px}
.story-decisions .action-row {padding:0;gap:12px;margin:16px 0 0;flex-wrap:wrap}
.story-decisions .decision-options {gap:12px}
.story-decisions .decision-option {border:0;border-radius:14px;padding:16px;background:var(--paper);box-shadow:var(--shadow-paper)}
.story-decisions .decision-option:has(input:checked) {background:var(--accent-soft);box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--accent) 28%,transparent)}
.story-suggestions {gap:8px;margin-top:14px}
.suggestion-chip {font-size:13px;padding:8px 12px;min-height:36px;border-radius:8px;background:var(--soft)}
.story-preview-pair {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin:18px 0}
.story-preview-pair:has(>.story-preview:only-child) {grid-template-columns:1fr}
.story-preview {width:100%;max-width:none;border:0;border-radius:18px;background:var(--paper);box-shadow:var(--shadow-paper);overflow:hidden;transition:transform 160ms var(--ease-out),box-shadow 160ms var(--ease-out)}
.story-preview:hover {transform:translateY(-1px);background:var(--paper)!important;box-shadow:0 4px 24px rgb(15 23 42 / .09)}
.story-preview-label {padding:12px;gap:8px}
.story-preview-purpose {display:flex;align-items:center;gap:8px;padding:9px 12px;border:0;background:color-mix(in srgb,var(--accent-soft) 40%,var(--paper));color:var(--muted);font-size:11px;line-height:18px;text-align:left}
.story-preview-purpose>span {color:var(--accent);font-weight:600;font-variant-numeric:tabular-nums}
.story-file-heading strong {font-size:13px;font-weight:600;line-height:19px;white-space:normal;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2}
.story-file-heading small {font-size:11px;line-height:17px}
.story-context .story-file-heading small {display:none}
.story-preview-paper {height:112px;margin:0 10px;padding:10px;background:var(--soft);font-size:12px;line-height:19px;border-radius:6px}
.story-preview-paper:after {background:linear-gradient(transparent,var(--soft))}
.story-preview-paper .reference-mail-preview,.story-preview-paper .reference-mail-body {font-size:14px;line-height:23px}
.story-preview-paper .reference-mail-meta,.story-mail-meta,.story-preview-fields dt {font-size:12px}
.story-preview-fields {grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.story-preview-fields dd {font-size:14px}
.story-preview-footer {font-size:12px;padding:10px 12px;color:var(--accent)}
.story-source-link {font-size:14px;padding:8px 0}
.decision-evidence {font-size:14px;margin:12px 0}
.story-accessible-text {position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.story-typing-wrap {position:relative}
.story-typing-wrap>.story-accessible-text {position:static!important;width:auto!important;height:auto!important;margin:0!important;padding:0!important;clip-path:none;white-space:pre-line;color:transparent!important;user-select:none}
.story-typing-wrap>.story-typing-copy {position:absolute;inset:0;margin:0!important;padding:0!important;white-space:pre-line}
@media(min-width:1280px){
 .workspace-body[data-view=desk][data-work-screen=detail] {padding-top:40px}
 .subject-navigation {margin:0}
 .subject-nav-back,.subject-nav-forward {position:fixed;top:94px;width:max(140px,calc((100vw - 980px)/2));max-width:240px;z-index:3}
 .subject-nav-back {left:max(24px,calc((100vw - 1400px)/2))}
 .subject-nav-forward {right:max(24px,calc((100vw - 1400px)/2))}
}
@media(max-width:640px){
 .story-context {margin:28px 0;padding-bottom:26px}
 .story-context-body {grid-template-columns:minmax(0,1fr);gap:16px}
 .story-context-heading h2 {font-size:17px;line-height:24px}
 .story-context-copy {padding-top:0}
 .story-context-preview {position:static;width:min(100%,300px);justify-self:end}
 .story-context-preview:before {display:none}
 .story-context .story-preview-paper {height:96px}
 .subject-navigation {margin-bottom:20px}
 .subject-navigation .btn {min-height:40px}
}
.message-content {font-size:16px;line-height:26px}
.message-user {background:var(--soft);border-radius:14px;padding:18px}
.message-author {font-size:12px;margin-bottom:6px}
.message-context {margin-top:12px;font-size:13px;border-top:1px solid var(--line);padding-top:10px}
.message-context pre {white-space:pre-wrap;overflow-wrap:anywhere;font:13px/21px var(--font);color:var(--muted)}
.message-tools {font-size:13px}
.conversation-composer-bar {width:min(900px,100%);padding:18px 30px max(12px,env(safe-area-inset-bottom));background:linear-gradient(0deg,var(--bg) 10%,transparent);pointer-events:none}
.conversation-composer-bar>* {pointer-events:auto}
.slim-composer {display:grid;grid-template-columns:auto minmax(0,1fr) auto auto;grid-template-rows:auto;gap:8px;align-items:center;padding:6px 8px 6px 12px;min-height:48px;border:0;border-radius:26px;transition:box-shadow 160ms var(--ease-out)}
.slim-composer textarea {grid-column:2;grid-row:1;min-height:30px;padding:3px 0;font-size:16px;line-height:24px;color:var(--ink)}
.slim-composer .send-circle {grid-column:4;grid-row:1}
.slim-composer .send-circle,.reference-document-input .send-circle {display:grid;place-items:center;width:36px;height:36px;min-width:36px;min-height:36px;padding:8px;border:0;border-radius:12px;background:var(--accent);color:var(--on-accent);box-shadow:inset 0 1px 0 rgb(255 255 255 / .14);transition:background 140ms ease,color 140ms ease,transform 140ms ease}
.slim-composer .send-circle .icon,.reference-document-input .send-circle .icon {width:20px;height:20px;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.slim-composer .send-circle:disabled,.reference-document-input .send-circle:disabled {background:var(--soft);color:var(--muted);box-shadow:none;opacity:1;cursor:default}
.slim-composer .send-circle:hover:not(:disabled),.reference-document-input .send-circle:hover:not(:disabled) {filter:none;background:color-mix(in srgb,var(--accent) 90%,var(--ink));box-shadow:inset 0 1px 0 rgb(255 255 255 / .14)}
.slim-composer .send-circle:active:not(:disabled),.reference-document-input .send-circle:active:not(:disabled) {transform:scale(.94)}
.slim-composer .send-circle:focus-visible,.reference-document-input .send-circle:focus-visible {outline:2px solid var(--accent);outline-offset:3px}
.slim-composer .voice-button {grid-column:3;grid-row:1;width:36px;min-width:36px;height:36px}
.composer-tools {grid-column:1;grid-row:1;display:flex;align-items:center}
.composer-tools:empty {display:none}
.composer-tools .btn {min-height:36px;width:32px;padding:0;background:transparent}
.context-mark {font-size:18px;line-height:24px}
.context-button-label,.skip:not(:focus) {position:absolute;width:1px;height:1px;clip-path:inset(50%);overflow:hidden;white-space:nowrap;padding:0}
.composer-context {display:flex;gap:8px;margin:0 0 8px;max-width:100%;overflow-x:auto}
.composer-context[hidden] {display:none}
.context-chip {background:var(--paper);color:var(--ink);border:0;border-radius:12px;padding:6px 10px;font-size:12px;max-width:280px;min-height:32px;box-shadow:var(--shadow-paper)}
.context-chip>span {margin-left:8px}
.context-chip[aria-pressed=true] {background:var(--accent-soft);color:var(--ink)}
.decision-action-bar {display:flex;justify-content:flex-end;padding:3px 0 0;min-height:28px}
.decision-action-bar .btn {font-size:12px;min-height:28px;padding:3px 0}
.composer-hint {font-size:12px;line-height:18px}
.assistant-empty {padding:36px 0 28px}
.assistant-empty h2 {font-size:28px;line-height:36px;letter-spacing:-.6px}
.assistant-empty p {font-size:16px;line-height:25px;margin-top:12px}
.assistant-starters {gap:10px;margin-top:20px;justify-content:center}
.assistant-starters .btn {font-size:14px;min-height:40px;border:1px solid var(--line);background:var(--paper);border-radius:10px}
/* Temporary context, menus and readers. */
.context-picker {position:fixed;inset:auto;margin:0;z-index:100;padding:8px;width:min(400px,calc(100vw - 32px));max-height:min(360px,55dvh);overflow:auto;border:0;border-radius:18px;color:var(--ink);overscroll-behavior:contain}
.context-picker>p {padding:8px 10px;font-size:12px;color:var(--muted)}
.context-picker button {display:flex;align-items:center;gap:10px;text-align:left;width:100%;min-height:44px;padding:10px;border-radius:8px;font-size:14px}
.context-picker button span {overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.context-picker button small {margin-left:auto;font-size:12px;color:var(--muted)}
.context-picker button[aria-pressed=true] {background:var(--accent-soft)}
.context-picker-empty {padding:12px;font-size:14px}
.dialog-header,.reference-modal-header {padding:18px 24px;border:0;min-height:72px}
.dialog-header h2,.reference-modal-header h2 {font-size:18px;line-height:25px;font-weight:600}
.dialog-content {padding:24px}
.dialog-footer,.reference-modal-footer {padding:16px 24px;border:0}
.surface-small-dialog {width:min(560px,calc(100vw - 32px));border:0;border-radius:24px;box-shadow:var(--shadow-float)}
/* The conversation picker is self-contained; legacy workspace.css is not loaded. */
.surface-small-dialog .conversation-history {min-width:0;text-align:left}
.conversation-history .rail-label {margin:20px 0 10px;font-size:11px;font-weight:600;letter-spacing:.8px;text-transform:uppercase;color:var(--muted)}
.conversation-history .conversation-list {display:flex;flex-direction:column;gap:8px;max-height:min(55dvh,480px);overflow:auto;overscroll-behavior:contain;padding:4px;margin:0 -4px}
.conversation-history .conversation-item {display:flex;flex-direction:column;align-items:flex-start;flex-shrink:0;gap:6px;width:100%;min-width:0;min-height:64px;padding:12px 16px;text-align:left;background:var(--paper);border:1px solid var(--line);border-radius:10px;color:var(--ink);cursor:pointer}
.conversation-history .conversation-item:hover {background:var(--soft);border-color:var(--accent)}
.conversation-history .conversation-item.selected {background:var(--accent-soft);border-color:var(--accent)}
.conversation-history .conversation-item>span {display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;overflow-wrap:anywhere;max-width:100%;font-size:13px;font-weight:600;line-height:1.4}
.conversation-history .conversation-item small {display:block;max-width:100%;font-size:11px;line-height:1.5;overflow-wrap:anywhere;color:var(--muted)}
.conversation-history .rail-empty {margin:8px 0;font-size:13px;line-height:1.5;color:var(--muted)}
#dialog.surface-drawer {inset-block:12px;inset-inline-start:auto;inset-inline-end:12px;margin:0;width:min(880px,calc(100vw - 24px));max-width:880px;height:calc(100dvh - 24px);max-height:calc(100dvh - 24px);border:0;border-radius:24px;box-shadow:var(--shadow-float);background:var(--paper)}
#dialog.surface-drawer .dialog-content {padding:24px}
.surface-drawer::backdrop,.command-palette::backdrop {background:rgb(15 23 42 / .14);backdrop-filter:blur(4px)}
.drawer-tabs {top:72px;gap:8px;padding:10px 24px;background:var(--paper);border-bottom:1px solid var(--line)}
.drawer-tabs .btn {font-size:14px;border-radius:8px}
.command-palette {width:min(560px,calc(100vw - 32px));max-height:min(640px,85dvh);border:0;border-radius:24px}
.command-palette .dialog-header {position:static}
.command-palette .dialog-content {padding:16px}
#command-query {width:100%;font-size:16px;padding:12px;margin-bottom:12px;border:1px solid var(--line);border-radius:8px;background:var(--paper);color:var(--ink)}
.command-item {padding:12px;min-height:44px;font-size:14px;border-radius:8px;gap:16px}
.command-item kbd {font-size:12px}.command-item kbd:empty {display:none}
.command-item[hidden] {display:none}
.command-empty {font-size:14px;color:var(--muted);padding:16px 12px}
.notifications-dialog {max-width:560px}
.notice-row {padding:14px 0;gap:14px}.notice-row strong {font-size:15px}.notice-row p,.notification-intro {font-size:14px;line-height:22px}.notice-group h3 {font-size:14px}
.reference-modal-document {padding:24px;background:var(--soft)}
.reference-modal-composer {padding:14px 18px;margin:16px 24px;background:var(--paper);border:1px solid var(--line);border-radius:12px}
.reference-modal-composer>p {font-size:13px}
.reference-document-input textarea {font-size:16px;line-height:24px}
.reference-mail-preview,.received-mail-body,.story-original-full {font-size:16px;line-height:27px}
.reference-mail-meta,.received-mail dl,.story-original-meta {font-size:13px;line-height:21px}
.reference-mail-meta>div,.received-mail dl>div {display:grid;grid-template-columns:64px minmax(0,1fr);gap:10px}
.reference-mail-meta dd,.received-mail dd {overflow-wrap:anywhere}
.mailbox-reader {display:grid;grid-template-columns:220px minmax(0,1fr);min-height:50dvh}
.mailbox-reader[data-single=true] {grid-template-columns:minmax(0,1fr)}
.mailbox-reader[data-single=true] .mailbox-messages {display:none}
.mailbox-messages {padding:12px;background:var(--soft);border-right:1px solid var(--line)}
.mailbox-messages>p {font-size:12px;color:var(--muted);padding:8px}
.mailbox-messages button {display:flex;flex-direction:column;gap:5px;padding:12px;margin:4px 0;width:100%;text-align:left;border-radius:8px}
.mailbox-messages button[aria-current=true] {background:var(--paper)}
.mailbox-messages button strong {font-size:14px;line-height:21px;overflow-wrap:anywhere}
.mailbox-messages button span,.mailbox-messages button small {font-size:12px;overflow-wrap:anywhere}
.mailbox-reading {padding:24px;min-width:0}
.mailbox-reading>h3 {font-size:20px;line-height:28px;margin-bottom:20px;overflow-wrap:anywhere}
.received-mail dl {display:grid;gap:8px;margin:0 0 24px}
.received-mail dt {color:var(--muted)}
.received-mail-body {white-space:pre-wrap;overflow-wrap:anywhere}
.mailbox-coverage {font-size:12px;color:var(--muted);margin-top:28px}
.reference-paper {font-size:15px;line-height:25px;padding:28px;background:#fff;color:#20242c}
.reference-paper h2 {font-size:26px}.reference-paper h3 {font-size:18px}.reference-paper section p {white-space:pre-wrap}
.reference-sheet,.workbook-grid {font-size:14px}
.reference-sheet th,.reference-sheet td {padding:10px 12px;min-width:90px;border-bottom:1px solid var(--line)}
.reference-sheet th {position:sticky;top:0;z-index:1;background:var(--soft);font-size:13px}
.reference-sheet tbody th {left:0;z-index:2}
.workbook-tabs {display:flex;gap:8px;overflow:auto;padding-bottom:14px}
.workbook-tabs button {min-height:40px;font-size:14px;padding:8px 12px;border-radius:8px}
.workbook-tabs button[aria-pressed=true],.workbook-tabs [aria-selected=true] {color:var(--accent);background:var(--accent-soft)}
.sheet-reader-scroll {overflow:auto;max-height:65dvh;border:1px solid var(--line);border-radius:8px}
.workbook-reader h3 {font-size:16px;margin:8px 0 16px}
.reference-pdf-cover {display:grid;place-items:center;gap:12px;text-align:center;min-height:160px;padding:20px;color:var(--muted)}
.reference-pdf-cover strong {font-size:15px}.reference-pdf-cover p,.reference-pdf-cover span {font-size:13px}
.pdf-page-reader nav {display:flex;justify-content:space-between;gap:8px;align-items:center;flex-wrap:wrap;margin-bottom:14px}
.pdf-page-count,.pdf-zoom-value {font-size:13px;color:var(--muted)}
.pdf-page-canvas {overflow:auto;max-height:70dvh;padding:8px;background:var(--soft)}
.pdf-page-image {display:block;width:var(--pdf-zoom,100%);max-width:none;height:auto;margin:auto;background:#fff;box-shadow:var(--shadow-paper)}
.pdf-page-error {font-size:14px;color:var(--muted);padding:16px}
.document-comparison {display:grid;grid-template-columns:1fr 1fr;gap:20px}.document-comparison>section {min-width:0}.document-comparison p {font-size:15px;line-height:25px}
/* Forms, personal settings and operating state. */
.field {font-size:14px;gap:8px}.field small {font-size:12px;line-height:20px}
.field input,.field textarea,.field select,.quote-fields input,.quote-fields select,.work-form input,.work-form select,.work-form textarea {font-size:16px;line-height:24px;min-height:44px;border:1px solid var(--line);border-radius:8px;background:var(--paper);color:var(--ink);padding:10px 12px;box-shadow:none}
.field textarea {min-height:96px}
input:invalid:not(:placeholder-shown):focus {border-color:var(--danger)}
.quote-fields,.activity-schedule {gap:18px}.quote-fields legend,fieldset legend {font-size:16px;font-weight:600}
.prepared-sections {gap:20px}.prepared-section {padding:20px;border-radius:12px;background:var(--paper);border:1px solid var(--line)}
.prepared-section label,.prepared-field label,.prepared-section dt {font-size:13px}
.prepared-section input,.prepared-section select {background:var(--paper);border:1px solid var(--line);font-size:16px;min-height:44px}
.enterprise-page-head {margin-bottom:24px}.enterprise-page-head h1,.processes-heading h1,.supervision-page h1 {font-size:28px;line-height:35px;letter-spacing:-.7px}
.enterprise-page-head p,.processes-heading p,.supervision-intro {font-size:15px;line-height:24px;max-width:650px}
.personal-profile {background:transparent;border:0;border-bottom:1px solid var(--line);border-radius:0;padding:0 0 20px;gap:14px}
.personal-profile h2 {font-size:18px}.personal-profile p,.profile-access {font-size:13px}.personal-avatar {width:40px;height:40px;font-size:16px}
.personal-knowledge,.personal-plans,.personal-permissions {margin-top:24px}.preference-section-heading h2,.personal-permissions h2 {font-size:18px}.preference-section-heading p,.personal-empty,.knowledge-coverage,.personal-permissions p {font-size:14px;line-height:23px}
.knowledge-rules li {padding:16px 0}.knowledge-rules p {font-size:16px}.knowledge-sources {font-size:12px}
.personal-edit {margin:24px 0;padding:20px;background:var(--soft);border-radius:12px}.personal-edit summary,.personal-plans summary {font-size:16px;font-weight:600;min-height:32px}
.preference-appearance {padding-top:20px;border-top:1px solid var(--line)}
.profile-grid {display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));max-width:740px;gap:16px;margin-top:24px}
.profile-card {padding:20px;min-height:140px;background:var(--paper);border:1px solid var(--line);border-radius:12px;gap:12px}.profile-card strong {font-size:18px}.profile-card>span:last-child {font-size:14px}
.processes-heading {margin-bottom:28px}.process-section {margin-top:28px}.process-section h2 {font-size:18px}.process-list {display:grid;grid-template-columns:1fr;gap:12px}
.process-card {padding:18px 0;background:transparent;border:0;border-radius:0;box-shadow:0 1px 0 rgb(100 116 139 / .12)}
.process-title {font-size:17px;line-height:24px}.process-detail {font-size:14px;line-height:23px}.process-meta {font-size:12px;line-height:20px;gap:12px}
.process-actions {margin-top:14px}.radar-history {margin-top:28px}.radar-history>summary {font-size:16px;font-weight:600}.radar-timeline {margin-top:16px}.radar-timeline li {font-size:14px}.radar-timeline time,.radar-timeline small {font-size:12px}
.radar-memory {padding:20px 0;border-top:1px solid var(--line);border-radius:0;background:transparent}.radar-memory h2 {font-size:18px}.radar-memory p {font-size:14px}
/* Authentication remains owned by each backend. */
.surface-access,.product-access {width:100%;max-width:none;margin:0;padding:0;min-height:100dvh;border-radius:0;background:var(--bg);color:var(--ink);display:flex;flex-direction:column;box-sizing:border-box}
.surface-access .access-topbar,.product-access .access-topbar {height:64px;padding:0 28px;display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid var(--line);font-size:14px;color:var(--muted);box-sizing:border-box}
.access-brand {display:flex;align-items:center;gap:9px;color:var(--ink);text-decoration:none;font-size:16px}.access-brand img {width:24px;height:24px}
.access-workspace {padding:36px 20px 48px;display:flex;flex-direction:column;align-items:center;justify-content:center;flex:1;width:100%;box-sizing:border-box}
.access-intro {text-align:center;margin-bottom:22px;width:100%;max-width:420px;box-sizing:border-box}.access-intro h1 {font-size:28px;line-height:35px;font-weight:600;letter-spacing:-.7px}
.surface-access .access-card,.product-access .access-card {width:min(420px,100%);padding:24px;border:1px solid var(--line);border-radius:18px;background:var(--paper);box-shadow:var(--shadow-paper);box-sizing:border-box;margin-inline:auto}
.surface-access .access-card h2,.product-access .access-card h2 {font-size:20px;line-height:27px;margin:8px 0}
.surface-access .access-card>p:not(.eyebrow),.product-access .access-card>p:not(.eyebrow) {font-size:14px;line-height:22px;margin-bottom:16px;color:var(--muted)}
.surface-access .eyebrow,.product-access .eyebrow {font-size:12px;color:var(--muted)}
.surface-access .field,.product-access .field {font-size:14px;margin-top:12px;gap:6px}.surface-access .field input,.product-access .field input {min-height:44px;font-size:16px;border:1px solid var(--line);background:var(--paper);border-radius:8px;padding:10px 12px}
.surface-access .field small,.product-access .field small {font-size:12px;line-height:20px}
.surface-access .access-provider,.product-access .access-provider {display:flex;width:100%;min-height:44px;margin-top:12px;border-radius:10px;font-size:14px;text-decoration:none}
.surface-access .access-provider.primary,.product-access .access-provider.primary,.surface-access form .primary,.product-access form .primary,.surface-access #retry-access,.product-access #retry-access {background:var(--accent);color:var(--on-accent)}
.surface-access form>.primary,.product-access form>.primary {width:100%;min-height:44px;margin-top:16px;border-radius:10px}
.surface-access #login-error,.product-access #login-error {font-size:14px;color:var(--danger)}
@media(max-width:1050px) {.profile-identity,.demo-indicator{display:none}.enterprise-topbar{padding-inline:20px}.workspace-body{padding-inline:24px}}
@media(max-width:680px) {
  :root{font-size:16px;--topbar-bottom:120px}.enterprise-topbar{grid-template-columns:minmax(0,1fr) auto;grid-template-rows:36px 40px;gap:4px;min-height:96px;height:auto;top:8px;margin:8px 8px 0;padding:8px 12px;border-radius:24px}
  .surface-brand-symbol{width:22px;height:22px}.brand-wordmark{font-size:15px}.surface-brand-logo{gap:7px}.top-actions{grid-row:1;grid-column:2;gap:2px}.top-actions .icon-btn{width:32px;min-width:32px;height:36px}.profile{padding:2px}.profile-avatar{width:30px;height:30px;font-size:12px}
  .surface-navigation{grid-row:2;grid-column:1/-1;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));width:100%;gap:2px;justify-content:stretch;padding:3px}
  .surface-navigation .tab{min-width:0;min-height:36px;padding:7px 6px;font-size:14px;gap:5px;justify-content:center}.surface-navigation .icon{width:15px;height:15px}.nav-count{font-size:11px;min-width:17px;line-height:18px}
  .workspace-body,.workspace-body[data-view=desk][data-work-screen=detail]{padding:24px 16px 40px}.workspace-body:has(.assistant-dock){padding-bottom:calc(var(--composer-space) + 24px)}
  .overview-heading{margin:0 0 18px}.overview-heading h1,.detail-title h1{font-size:24px;line-height:31px;letter-spacing:-.5px}.overview-heading p{font-size:14px}.desk-segments{gap:2px}.desk-segments button{font-size:14px;padding:8px}.desk-segments strong{margin-left:5px}
  .overview-controls{gap:10px}.mesa-search{max-width:none;flex-basis:100%}.overview-toolbar{justify-content:space-between;width:100%;gap:8px}.overview-filters{order:3;width:100%;overflow:auto}.overview-periods .btn{font-size:13px}
  .subject-cards{grid-template-columns:1fr}.subject-card{padding:18px}.subject-card h2{font-size:18px}.subject-card-preview{height:120px}
  .overview-table-wrap{overflow:visible}.overview-table,.overview-table tbody{display:block;width:100%;min-width:0}.overview-table thead{display:none}.overview-table tr{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;padding:18px 0;border-bottom:1px solid var(--line)}
  .overview-table th,.overview-table td{padding:0;border:0}.overview-table th{grid-column:1/-1}.overview-table td:nth-child(3){display:none}.overview-table td:last-child{text-align:right}.overview-table .subject-summary{margin-left:0;font-size:14px}.overview-table .subject-title{font-size:16px}
  .subject-back .btn{font-size:13px}.detail-position{font-size:11px;letter-spacing:0}.subject-pagination{gap:8px;margin:2px 0 18px}.subject-pagination .btn{font-size:12px;line-height:18px;min-height:40px;max-width:40%}
  .story-paragraph{font-size:16px;line-height:26px}.story-preview-pair{grid-template-columns:minmax(0,1fr);gap:14px}.story-preview-paper{height:160px;font-size:14px}.story-file-heading strong{font-size:14px}.story-file-heading small,.story-preview-footer{font-size:12px}
  .story-preview-fields{grid-template-columns:repeat(2,minmax(0,1fr))}.story-check{padding:12px 14px}.story-decisions .primary-action{order:-1;width:100%}.story-decisions .primary-action .btn{width:100%;min-height:44px}.secondary-actions .btn{font-size:14px;min-height:40px}.suggestion-chip{font-size:14px;min-height:40px}
  .conversation-composer-bar{padding:16px 12px max(8px,env(safe-area-inset-bottom));width:100%}.slim-composer{min-height:48px;gap:6px;padding:5px 7px 5px 8px}.slim-composer textarea{font-size:16px}.slim-composer .send-circle,.slim-composer .voice-button{width:36px;min-width:36px;height:36px}.composer-tools .btn{width:28px}.context-chip{font-size:12px;max-width:240px}
  .assistant-empty{padding:28px 0}.assistant-empty h2{font-size:26px;line-height:34px}.assistant-starters{display:grid;grid-template-columns:1fr 1fr;gap:10px}.assistant-starters .btn{font-size:14px;text-align:left;min-height:48px;padding:10px}
  #dialog.surface-drawer{inset:0;width:100%;max-width:100%;height:100dvh;max-height:100dvh;border-radius:0}.surface-drawer .dialog-header,.dialog-header,.reference-modal-header{padding:14px 16px;min-height:68px}.dialog-header h2,.reference-modal-header h2{font-size:17px}.dialog-content,#dialog.surface-drawer .dialog-content,.reference-modal-document{padding:18px 16px}.dialog-footer,.reference-modal-footer{padding:14px 16px}.drawer-tabs{top:68px;padding:8px 16px;overflow:auto;flex-wrap:nowrap}.drawer-tabs .btn{font-size:13px;flex-shrink:0}
  .mailbox-reader{grid-template-columns:1fr}.mailbox-messages{display:flex;overflow:auto;gap:8px;max-height:150px;border:0;border-bottom:1px solid var(--line)}.mailbox-messages>p{display:none}.mailbox-messages button{min-width:180px;width:180px;margin:0}.mailbox-reading{padding:20px 16px}.received-mail-body,.reference-mail-preview{font-size:16px;line-height:26px}
  .reference-modal-composer{margin:12px 16px;padding:12px}.reference-paper{padding:18px;font-size:15px}.document-comparison{grid-template-columns:1fr}.pdf-page-reader nav{gap:6px}.pdf-page-reader .btn{font-size:13px}
  .prepared-sections,.quote-fields,.activity-schedule{grid-template-columns:1fr}.personal-profile{flex-wrap:wrap}.profile-grid{grid-template-columns:1fr}.processes-heading{gap:14px}.processes-heading h1,.enterprise-page-head h1{font-size:26px}.process-card{padding:16px}.process-detail{font-size:14px}.preference-controls{gap:10px}.preference-controls .btn{font-size:14px}
  .surface-access .access-topbar,.product-access .access-topbar{padding:0 20px}.access-workspace{padding:28px 16px}.access-intro h1{font-size:26px}.surface-access .access-card,.product-access .access-card{padding:20px}.undo-approval{bottom:145px;max-width:calc(100vw - 24px)}
}
@media(prefers-reduced-motion:reduce){.story-preview,.subject-card,.command-item{transition:none;transform:none}}
@media print{.conversation-composer-bar,.subject-pagination{display:none!important}.story-sources{break-before:auto}}

.pdf-tools{display:flex;align-items:center;gap:8px;margin:0 0 12px}.comparison-note{font-size:14px;color:var(--muted);margin-bottom:20px}.document-comparison h3{font-size:16px;margin-bottom:12px}.document-comparison .review-text{white-space:pre-wrap;font-size:15px;line-height:25px}.document-comparison mark{background:var(--warning-soft);color:var(--ink);box-shadow:0 2px 0 var(--warning)}

.reader-note{font-size:12px;line-height:18px;color:var(--muted);margin:8px 0 14px}.pdf-tools{flex-wrap:wrap}.edit-source{margin:0 0 20px}.edit-source>summary{font-size:14px;color:var(--muted);padding:10px 0;cursor:pointer}.quote-jump{display:flex;gap:16px;flex-wrap:wrap;margin:12px 0 24px}.quote-jump a{font-size:14px;color:var(--accent)}.quote-group{scroll-margin-top:100px}.quote-intro{font-size:14px;line-height:22px;color:var(--muted)}.inline-panel{scroll-margin-top:88px}
@media(max-width:680px){.inline-panel,.quote-group{scroll-margin-top:120px}.subject-pagination .btn{font-size:14px}.pdf-tools{gap:4px}.pdf-tools .btn{padding:8px}.pdf-page-reader nav{flex-wrap:wrap}.nav-count{font-size:12px}.detail-position{font-size:12px}}


/* Worker journey: orientation, focused correction, readable evidence and receipts. */
.journey-start,.journey-receipt{display:flex;align-items:center;justify-content:space-between;gap:24px;padding:22px 24px;border:0;border-radius:18px;margin:0 0 24px;background:var(--paper,#fff);box-shadow:var(--shadow-paper)}
.journey-start p,.journey-receipt p{margin:5px 0;color:var(--ink,#202735)}
.journey-start small,.journey-receipt small{display:block;max-width:65ch;color:var(--muted,#68758a);line-height:1.6}
.journey-start .btn,.journey-receipt .btn{flex-shrink:0}
.journey-receipt{border-left:3px solid #2c59dc;margin:12px auto 20px;max-width:1120px}
.journey-review-layout{display:grid;grid-template-columns:minmax(0,1fr) minmax(270px,.8fr);gap:32px;align-items:start}
.journey-review-layout form,.review-original{min-width:0}
.review-original{position:sticky;top:82px;max-height:75vh;overflow:auto;border-left:1px solid var(--line,#e4e9f1);padding:0 0 16px 24px;overscroll-behavior:contain}
.review-original .review-text{white-space:pre-wrap;font-size:14px;line-height:1.75;overflow-wrap:anywhere}
.review-original summary{font-weight:600;cursor:pointer;line-height:1.6}
.journey-field>span:first-child{display:flex;align-items:center;justify-content:space-between;gap:12px}
.journey-field small{font-weight:500;color:var(--warning)}
.journey-field.needs-review input,.journey-field.needs-review select{border-color:#caa86e}
.field-original,.field-explanation{font-size:12px;line-height:1.6;color:var(--muted,#68758a);font-weight:400}
.field-original{background:var(--soft,#f5f6f8);padding:7px 10px;border-radius:7px;overflow-wrap:anywhere}
.review-rest{margin:20px 0 28px;border-top:1px solid var(--line,#e4e9f1);padding-top:18px}
.review-rest>summary{cursor:pointer;font-weight:600;color:var(--ink,#202735);padding:5px 0}
.review-checklist{line-height:1.7;margin-bottom:24px}.review-checklist ul{padding-left:20px}
.journey-field[hidden],.work-form-group[hidden]{display:none!important}
.subject-priority-reason,.subject-duplicate{font-size:12px;line-height:1.5;color:var(--muted,#68758a);margin:4px 0}
.subject-duplicate{color:var(--warning)}
.surface-overview .subject-card-preview{max-height:118px;min-height:0}
.surface-overview .subject-card{min-height:0;gap:16px;padding:24px}
.surface-overview .subject-card-heading h2{font-size:17px}
.surface-overview .subject-summary{font-size:14px;line-height:1.65;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
@media(max-width:850px){.journey-review-layout{grid-template-columns:minmax(0,1fr)}.review-original{position:static;max-height:360px;border-left:0;border-top:1px solid var(--line,#e4e9f1);padding:18px 0}.journey-start,.journey-receipt{align-items:flex-start;flex-wrap:wrap;gap:14px;padding:16px}.journey-start small{max-width:100%}.journey-receipt{margin-inline:12px}}

/* One material for controls; all reading and editing surfaces remain opaque. */
.enterprise-topbar,.slim-composer,.context-picker,.command-palette,.toast,
.surface-drawer .dialog-header,.surface-drawer .reference-modal-header,
.surface-drawer .dialog-footer,.surface-drawer .reference-modal-footer {
  background:var(--glass-solid);color:var(--ink);box-shadow:var(--glass-shadow);
  -webkit-backdrop-filter:none;backdrop-filter:none;
}
@supports ((backdrop-filter:blur(2px)) or (-webkit-backdrop-filter:blur(2px))) {
  .enterprise-topbar,.slim-composer,.context-picker,.command-palette,.toast,
  .surface-drawer .dialog-header,.surface-drawer .reference-modal-header,
  .surface-drawer .dialog-footer,.surface-drawer .reference-modal-footer {
    background:var(--glass-fill);
    -webkit-backdrop-filter:blur(var(--glass-blur)) saturate(125%);
    backdrop-filter:blur(var(--glass-blur)) saturate(125%);
  }
}
.slim-composer:focus-within {box-shadow:0 0 0 2px color-mix(in srgb,var(--accent) 20%,transparent),var(--glass-shadow)}
.story-review-points {border:0;box-shadow:inset 2px 0 0 var(--accent-soft)}
.story-preview-paper,.reference-modal-document,.received-mail,.reference-paper,.work-form {backdrop-filter:none;-webkit-backdrop-filter:none}
.subject-card-footer {border:0;padding-top:10px;gap:12px;flex-wrap:wrap}
.overview-table-wrap {border:0;background:transparent;border-radius:18px}
.overview-table thead th {background:transparent}
.overview-table th,.overview-table td {border:0;box-shadow:inset 0 -1px 0 rgb(100 116 139 / .1)}
.overview-table tbody tr:hover,.overview-table tbody tr:focus-within {background:var(--paper)}
.field input,.field textarea,.field select,.quote-fields input,.quote-fields select,
.work-form input,.work-form select,.work-form textarea,.prepared-section input,.prepared-section select,
#command-query,.product-access .field input {
  border:0;border-radius:12px;background:var(--soft);box-shadow:inset 0 1px 2px rgb(15 23 42 / .045);
}
.journey-field.needs-review input,.journey-field.needs-review select {box-shadow:inset 3px 0 0 var(--warning)}
.profile-card,.prepared-section,.assistant-starters .btn,.product-access .access-card {
  border:0;border-radius:18px;box-shadow:var(--shadow-paper);background:var(--paper);
}
.product-access .access-topbar {border:0}
.product-access .access-card {border-radius:24px;padding:28px}
.reference-modal-composer {border:0;background:var(--soft);border-radius:18px}
.inline-panel {background:var(--paper);border:0;border-radius:24px;box-shadow:var(--shadow-paper)}
.sheet-reader-scroll,.drawer-tabs,.mailbox-messages {border:0}
.drawer-tabs {box-shadow:0 1px 0 rgb(100 116 139 / .1)}
.surface-drawer .dialog-footer,.surface-drawer .reference-modal-footer {position:sticky;bottom:0;z-index:2}
.toast {border:0;border-radius:16px}
.command-palette .dialog-header {background:transparent;box-shadow:none}
.page-enter {animation:surface-page-enter var(--motion-panel) var(--ease-out)}
@keyframes surface-page-enter {from{opacity:.5;transform:translateY(6px)}to{opacity:1;transform:none}}
@media(min-width:1280px){.subject-nav-back,.subject-nav-forward{top:104px}}
@media(max-width:680px){
  .overview-table th,.overview-table td{box-shadow:none}.overview-table tr{border:0;box-shadow:inset 0 -1px 0 rgb(100 116 139 / .12)}
  .surface-overview .subject-card{padding:20px}.product-access .access-card{padding:22px}
  .story-context-preview{position:static}.subject-card-open{padding-inline:0!important}
}
@media(prefers-reduced-transparency:reduce),(prefers-contrast:more){
  .enterprise-topbar,.slim-composer,.context-picker,.command-palette,.toast,
  .surface-drawer .dialog-header,.surface-drawer .reference-modal-header,
  .surface-drawer .dialog-footer,.surface-drawer .reference-modal-footer {
    background:var(--glass-solid);backdrop-filter:none;-webkit-backdrop-filter:none;
  }
}
@media(prefers-reduced-motion:reduce){
  .page-enter,.surface-navigation .tab,.subject-card,.story-preview{animation:none;transition:none;transform:none}
}
@media(forced-colors:active){
  :root{--bg:Canvas;--paper:Canvas;--soft:Canvas;--ink:CanvasText;--muted:CanvasText;--accent:LinkText;--accent-soft:Canvas;--glass-solid:Canvas}
  .enterprise-topbar,.slim-composer,.context-picker,.command-palette,.toast,.story-preview,
  .subject-card,.journey-start,.profile-card,.prepared-section,dialog,button,input,textarea,select {
    border:1px solid ButtonText!important;box-shadow:none!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important;
  }
  .enterprise-topbar,.slim-composer,.context-picker,.command-palette,.toast,
  .surface-drawer .dialog-header,.surface-drawer .reference-modal-header,
  .surface-drawer .dialog-footer,.surface-drawer .reference-modal-footer{background:Canvas;color:CanvasText}
  .surface-navigation .tab.active,button[aria-pressed=true],.btn.primary,.send-circle{background:Highlight;color:HighlightText}
  :focus-visible{outline:2px solid Highlight!important;outline-offset:3px}
}

/* Subject conversations: content chooses the structure. */
.conversational-story{max-width:760px;margin-inline:auto;padding:12px 4px 40px}
.conversational-story .story-author{display:flex;gap:12px;align-items:center;margin-bottom:22px}
.conversational-story .story-author small{font-size:12px;font-weight:400;color:var(--muted,#6b7280)}
.conversational-story .story-paragraph{font-size:17px;line-height:1.75;white-space:pre-line;max-width:68ch;margin:0 0 20px}
.conversational-story .story-preview{width:min(100%,520px);margin:4px 0 22px;text-align:left}
.conversational-story .story-preview-paper{max-height:180px;overflow:hidden}
.story-attachment{display:flex;align-items:center;gap:14px;width:100%;padding:15px 16px;margin:8px 0;border:1px solid var(--line,#e3e5e8);border-radius:12px;background:var(--panel,#fff);color:inherit;text-align:left;cursor:pointer}
.story-attachment>span:first-of-type{flex:1;min-width:0}.story-attachment strong{display:block;overflow-wrap:anywhere;font-size:14px;font-weight:550}.story-attachment small{display:block;color:var(--muted,#6b7280);font-size:12px;margin-top:4px}
.story-attachment:hover{background:var(--hover,#f7f8fa)}.story-attachment:focus-visible{outline:2px solid #245be8;outline-offset:3px}
.story-context-details{margin:24px 0;border-block:1px solid var(--line,#e3e5e8);font-size:14px}
.story-context-details>summary{padding:15px 0;cursor:pointer;font-weight:500}.story-context-details>summary span{font-size:12px;color:var(--muted,#6b7280);margin-left:12px;font-weight:400}
.story-context-details>div{padding:0 0 18px;line-height:1.6}.story-context-details p{white-space:pre-line;overflow-wrap:anywhere}.story-context-details small{display:block}
.story-next-step{font-size:16px;line-height:1.65;margin:20px 0}.conversational-story .story-decisions{padding-top:12px;margin-top:16px}.story-action-note{font-size:13px;color:var(--muted,#6b7280);margin:0 0 12px}
.xlsx-reader .sheet-reader-scroll{max-height:65vh;overflow:auto;background:#fff;border:1px solid #d7dde2;border-radius:4px}.xlsx-reader .reference-sheet-table{border-collapse:separate;border-spacing:0;color:#20252b;table-layout:fixed;min-width:100%}.xlsx-reader .reference-sheet-table td{border-right:1px solid #e6e9ed;border-bottom:1px solid #e6e9ed;min-width:90px;padding:7px 10px}.xlsx-reader .reference-sheet-table th{background:#f1f3f5;color:#606870;font:12px system-ui;border-right:1px solid #d7dde2;border-bottom:1px solid #d7dde2;position:sticky;top:0;z-index:2}.xlsx-reader .reference-sheet-table tbody th{left:0;z-index:1}.xlsx-reader .workbook-tabs{border-bottom:2px solid #e3e6e9;padding-bottom:6px}.xlsx-reader .workbook-tabs [aria-pressed=true]{color:#146b42;border-bottom:2px solid #217346;border-radius:0}
@media(max-width:640px){.conversational-story{padding-inline:0}.conversational-story .story-paragraph{font-size:16px;line-height:1.65}.story-context-details>summary span{display:block;margin:4px 0 0 18px}}

/* Reading and decisions share one column, on every screen size. */
.conversational-story{max-width:800px;padding:8px 0 28px}
.conversational-story .story-author{margin-bottom:18px}
.conversational-story .story-paragraph{font-size:17px;line-height:1.7;max-width:none;margin-bottom:18px}
.story-decisions .action-row{display:flex;flex-direction:column;align-items:stretch;gap:18px}
.story-decisions{scroll-margin-bottom:calc(var(--composer-space,120px) + 24px)}
.explained-action{max-width:650px}.explained-action>p{font-size:14px;line-height:1.55;color:var(--muted);margin:9px 0 0}
.secondary-action-options{border-top:1px solid var(--line);padding-top:14px}
.secondary-action-options>summary{cursor:pointer;font-size:14px;color:var(--muted);width:fit-content;padding:4px 0}
.secondary-action-options .secondary-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px;margin-top:18px}
.secondary-action-options .btn{padding-left:0;text-align:left}
.story-decisions .primary-action{width:100%}.story-decisions .primary-action .btn{width:auto}
.conversational-story .story-suggestions{border-top:1px solid var(--line);padding-top:14px;margin-top:22px}
.workspace-body[data-view=desk][data-work-screen=detail] .detail-title{max-width:800px;margin-inline:auto}
@media(min-width:1280px){
 .subject-nav-back,.subject-nav-forward{position:static;width:auto;max-width:none}
 .subject-nav-back{flex-direction:row;gap:20px}.subject-nav-forward{flex-direction:row;gap:20px}
 .subject-navigation{max-width:800px;margin:0 auto 24px;align-items:center}
 .workspace-body[data-view=desk][data-work-screen=detail]{padding-top:24px}
}
@media(max-width:640px){
 .conversational-story .story-paragraph{font-size:16px;line-height:1.65}
 .secondary-action-options .secondary-actions{grid-template-columns:1fr;gap:16px}
 .story-decisions .primary-action .btn{width:100%}
 .explained-action>p{font-size:13px}
}

.xlsx-reader .reference-sheet-table th[scope=row],.xlsx-reader .reference-sheet-table thead th:first-child{width:44px;min-width:44px;padding:7px 6px;text-align:center;left:0;background:#f1f3f5}

.workspace-body[data-view=desk][data-work-screen=detail]{padding-bottom:max(220px,calc(var(--composer-space,120px) + 96px))}
.story-decisions{scroll-margin-bottom:max(190px,calc(var(--composer-space,120px) + 64px))}

/* 1.21: task hierarchy, legible metadata and working density. */
.surface-overview .overview-heading { margin-bottom: 16px; }
.surface-overview .journey-start { padding: 16px 20px; margin-bottom: 16px; }
.surface-overview .overview-controls { margin-block: 12px; }
.surface-overview .subject-summary { color: color-mix(in srgb,var(--ink) 80%,var(--muted)); }
.surface-overview .overview-table th, .surface-overview .overview-table td { padding-block: 16px; }
.library-entry { margin-block: 8px; }
.work-goal { font-size: 1rem; padding-block: 12px; border-bottom: 1px solid var(--border, #d4d8df); }
.work-pending, .work-progress-summary { margin-block: 20px; }
.work-pending h2, .work-progress-summary h2 { font-size: 1.05rem; margin-bottom: 8px; }
.work-pending li { margin-block: 6px; }
.work-progress-summary dl>div { display: grid; grid-template-columns: minmax(100px,1fr) 2fr; gap: 12px; }
.story-author { display:flex; align-items:center; gap:12px; }
.story-author button { margin-left:auto; }
.story-paragraph { max-width: 76ch; }
.primary-action { display:flex; flex-wrap:wrap; align-items:start; gap:16px; }
.primary-action .explained-action { flex: 1 1 240px; }
.dock-context { display:flex!important; flex-direction:column; gap:3px; font-size:12px; color:var(--text-secondary,#505766); }
.dock-context small { font-size:11px; }
.conversation-composer-bar .dock-context { padding:4px 12px; }
html[data-density="compact"] .overview-table th, html[data-density="compact"] .overview-table td { padding-block:9px; }
html[data-density="compact"] .subject-summary { margin-block:4px; }
html[data-density="compact"] .subject-card { padding:14px; }
button:focus-visible, summary:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 2px solid var(--accent,#2459d8); outline-offset:3px; }
.xlsx-reader .sheet-reader-scroll { max-height:65vh; }
.xlsx-reader th { position:sticky; top:0; z-index:2; }
.xlsx-reader th[scope="row"] { left:0; z-index:1; }
@media(min-width:1100px) { #dialog:has(.xlsx-reader), #dialog:has(.journey-review-layout), #dialog:has(.document-comparison) { width: min(1440px,94vw); max-width:94vw; } }
@media(max-width:600px) { .dock-context small { display:none; } .work-pending { margin-block:16px; } .story-author button { min-height:44px; } .primary-action { display:block; } .primary-action .explained-action { margin-bottom:14px; } }
@media(prefers-reduced-motion:reduce) { *,*::before,*::after { scroll-behavior:auto!important; } }

.reader-search { display:flex; flex-wrap:wrap; align-items:end; gap:8px; margin-block:12px; }
.reader-search label { display:flex; flex-direction:column; gap:4px; }
.reader-match { outline:3px solid #2459d8!important; outline-offset:-3px; }
.reader-fit table { table-layout:auto!important; width:100%!important; }
.reader-fit col { width:auto!important; }
.reader-fit td { white-space:normal!important; max-width:32ch; overflow-wrap:anywhere; }
.pdf-thumbnails>div { display:flex; overflow:auto; gap:8px; }
.pdf-thumbnails img { display:block; width:90px; height:auto; }
#dialog.reader-wide, #dialog:has(.native-pdf-reader) { width:96vw; max-width:96vw; }
.native-pdf-reader { width:100%; height:75vh; border:0; }

.pdf-text-pages pre { white-space:pre-wrap; overflow-wrap:anywhere; font:inherit; padding:12px; }
.pdf-text-pages mark { background:#ffeb99; color:#172033; }

.overview-secondary-filters { position:relative; }
.overview-secondary-filters[open] { flex-basis:100%; padding:10px; border:1px solid var(--line); border-radius:10px; }
.overview-secondary-filters summary { cursor:pointer; padding:8px; }
.search-match,.search-scope { color:var(--text); font-size:.9rem; }
.work-facts,.work-discrepancies { overflow-x:auto; margin-block:12px; }
.work-facts th,.work-facts td,.work-discrepancies th,.work-discrepancies td { padding:10px; text-align:left; border-bottom:1px solid var(--line); vertical-align:top; }
.conversation-composer-bar .dock-context { font-size:12px; padding:3px 12px; }
.conversation-composer-bar .dock-context small { display:none; }
.conversation-composer-bar:focus-within .dock-context small { display:block; }
.subject-story,.subject-title,.work-goal,.story-paragraph { overflow-wrap:anywhere; }
@media(max-width:640px) { .overview-toolbar { gap:8px; } .overview-periods { flex-wrap:wrap; } .document-comparison { grid-template-columns:1fr; } .conversation-composer-bar .dock-context>span { max-width:80vw; white-space:nowrap; text-overflow:ellipsis; overflow:hidden; } button,summary { min-height:40px; } }

@media(max-width:600px) {
 .subject-detail-main .detail-heading { padding-bottom:12px; gap:8px; margin-bottom:12px; }
 .subject-detail-main .detail-title h1 { font-size:24px; line-height:1.25; }
 .subject-detail-main .conversational-story .story-author { margin-bottom:12px; }
 .subject-detail-main .detail-navigation { gap:8px; }
}
