/* Screen controls only: business documents keep their own colors and layout. */
@media screen {
  body[data-experience="workspace"] {
    --work-ink:#303139; --work-muted:#62636d; --work-line:#dedee4; --work-soft:#f5f5f7; --work-surface:#fff;
  }
  html[data-workspace-theme="dark"] body[data-experience="workspace"] {
    --work-ink:#ecedf1; --work-muted:#b3b4bf; --work-line:#44454f; --work-soft:#292a32; --work-surface:#22232a;
  }
  body[data-experience="workspace"] .nav-label { padding:12px 4px 5px; }
  body[data-experience="workspace"] .legal-settings { margin-top:24px; }
  body[data-experience="workspace"] .legal-editor-note { padding:14px; background:var(--work-soft); border-left:3px solid #643182; }
  body[data-experience="workspace"] .legal-editor-group { border-block-end:1px solid var(--work-line); }
  body[data-experience="workspace"] .legal-editor-group summary { padding:18px 0; font-weight:600; cursor:pointer; }
  body[data-experience="workspace"] .legal-editor-group .form-grid { padding-bottom:20px; }
  body[data-experience="workspace"] .legal-admin-links,body[data-experience="workspace"] .legal-save-row { display:flex; flex-wrap:wrap; gap:12px; align-items:center; justify-content:space-between; }
  body[data-experience="workspace"] .legal-admin-links { justify-content:flex-start; margin-block:16px; }
  body[data-experience="workspace"] .legal-review-confirm { display:flex; align-items:start; gap:12px; padding:20px 0 8px; font-weight:600; }
  body[data-experience="workspace"] .legal-review-confirm input { flex:none; width:20px; height:20px; accent-color:#643182; }
  body[data-experience="workspace"] .nav-label button { display:flex; align-items:center; justify-content:space-between; gap:8px; width:100%; padding:8px; border:0; border-radius:4px; background:transparent; color:var(--work-muted); font:600 11px 'Segoe UI',sans-serif; text-align:left; cursor:pointer; }
  body[data-experience="workspace"] .nav-label button:hover { background:var(--work-soft); color:var(--work-ink); }
  body[data-experience="workspace"] .nav-label svg { width:13px; height:13px; flex:none; }
  body[data-experience="workspace"] .nav-label button[aria-expanded="true"] svg { transform:rotate(90deg); }
  body[data-experience="workspace"] .workspace-nav-empty { color:var(--work-muted); font-size:13px; margin:12px 20px; }
  body[data-experience="workspace"] .metric { text-align:left; font-family:inherit; }
  body[data-experience="workspace"] .metric>span { min-height:34px; }
  body[data-experience="workspace"] button.metric { cursor:pointer; }
  body[data-experience="workspace"] .metric>span { display:flex; align-items:flex-start; justify-content:space-between; gap:8px; }
  body[data-experience="workspace"] .metric>span svg { width:14px; height:14px; flex:none; opacity:.6; }
  body[data-experience="workspace"] button.metric:hover { outline:1px solid #ae83b7; outline-offset:0; }
  body[data-experience="workspace"] .experience-jump { display:grid; grid-template-columns:auto minmax(130px,1fr) minmax(180px,280px); gap:14px; background:var(--work-soft); border-color:var(--work-line); color:var(--work-muted); }
  body[data-experience="workspace"] .experience-jump :is(input,select) { min-width:0; width:100%; height:38px; padding:0 12px; border:1px solid var(--work-line); border-radius:5px; background:var(--work-surface); color:var(--work-ink); font:13px 'Segoe UI',sans-serif; }
  body[data-experience="workspace"] .case-tab-empty { grid-column:1/-1; font-size:12px; }
  body[data-experience="workspace"] .case-tabs { gap:5px; }
  body[data-experience="workspace"] .case-tabs .tab { padding:9px 12px; }
  body[data-experience="workspace"] .case-tabs .tab:not(.active):hover { background:var(--work-soft); color:var(--work-ink); }
  body[data-experience="workspace"] .panel-head { padding-block:12px; }
  body[data-experience="workspace"] .panel-head h2 { font-size:15px; }
  body[data-experience="workspace"] .data-table th { white-space:normal; line-height:1.5; }
  html:not([data-workspace-theme="dark"]) body[data-experience="workspace"] { background:#f5f5f7; color:#303139; --line:#dedee4; --muted:#62636d; --sidebar-muted:#62636d; }
  html:not([data-workspace-theme="dark"]) body[data-experience="workspace"] :is(.brand,.sidebar,.topbar,.record-workspace,.record-workspace-head,.panel) { border-color:#dedee4; }
  html:not([data-workspace-theme="dark"]) body[data-experience="workspace"] :is(.global-search input,.workspace-navigation-search input,.branch-switcher,.user-card,.case-summary,.panel-head) { background:#f8f8fa; border-color:#dedee4; }
  html:not([data-workspace-theme="dark"]) body[data-experience="workspace"] :is(.page-head h1,.case-summary h3,.panel h2,.metric strong) { color:#303139; }
  html:not([data-workspace-theme="dark"]) body[data-experience="workspace"] :is(.nav-button,.brand span,.user-card div span,.branch-switcher>span,.case-tabs .tab) { color:#60616a; }
  html:not([data-workspace-theme="dark"]) body[data-experience="workspace"] .nav-button.active { background:#f2eaf5; color:#643182; }
  html:not([data-workspace-theme="dark"]) body[data-experience="workspace"] .nav-button:not(.active):hover { background:#f5f5f7; color:#303139; }
  html:not([data-workspace-theme="dark"]) body[data-experience="workspace"] .case-tabs .tab.active { background:#643182; color:#fff; }
  html:not([data-workspace-theme="dark"]) body[data-experience="workspace"] th { color:#62636d; background:#f5f5f7; }
  html:not([data-workspace-theme="dark"]) body[data-experience="workspace"] tbody tr:nth-child(even) { background:#fafafb; }
  html:not([data-workspace-theme="dark"]) body[data-experience="workspace"] tbody tr:hover { background:#f4eff6; }
  html:not([data-workspace-theme="dark"]) body[data-experience="workspace"] .metric { box-shadow:0 1px 0 #dedee4; }
  @media(max-width:700px) {
    body[data-experience="workspace"] .experience-jump { grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:10px; padding:12px; }
    body[data-experience="workspace"] .experience-jump>span:first-child { grid-column:1/-1; }
    body[data-experience="workspace"] .experience-jump :is(input,select) { font-size:12px; padding-inline:8px; }
  }
}

/* Light lilac navigation; the optional dark workspace keeps its dark menus. */
@media screen {
  html:not([data-workspace-theme="dark"]) body[data-experience="workspace"] .sidebar {
    --sidebar-muted:#625269;
    background:#f5f0f8;
    color:#403347;
    border-color:#d8c9df;
    color-scheme:light;
    scrollbar-color:#b6a1c0 #f5f0f8;
  }
  html:not([data-workspace-theme="dark"]) body[data-experience="workspace"] .sidebar :is(.brand,.branch-switcher,.user-card) {
    background:transparent;
    border-color:#d8c9df;
  }
  html:not([data-workspace-theme="dark"]) body[data-experience="workspace"] .sidebar :is(.brand strong,.user-card strong) { color:#403347; }
  html:not([data-workspace-theme="dark"]) body[data-experience="workspace"] .sidebar :is(.brand span,.user-card div span,.branch-switcher>span,.nav-label,.nav-label button,.workspace-nav-empty) { color:#625269; }
  html:not([data-workspace-theme="dark"]) body[data-experience="workspace"] .sidebar :is(.nav-button,.nav-subitem,.icon-button) { color:#493c52; }
  html:not([data-workspace-theme="dark"]) body[data-experience="workspace"] .sidebar :is(.nav-button:not(.active):hover,.nav-label button:hover,.icon-button:hover) { color:#51305f; background:#e8dcee; }
  html:not([data-workspace-theme="dark"]) body[data-experience="workspace"] .sidebar .nav-button.active { color:#fff; background:#643182; box-shadow:inset 3px 0 #dcb0e4; }
  html:not([data-workspace-theme="dark"]) body[data-experience="workspace"] .sidebar .nav-button .badge { background:#e4d6ec; color:#51305f; }
  html:not([data-workspace-theme="dark"]) body[data-experience="workspace"] .sidebar .nav-button.active .badge { background:#fff; color:#70317c; }
  html:not([data-workspace-theme="dark"]) body[data-experience="workspace"] .sidebar :is(.workspace-navigation-search input,.branch-switcher button) { background:#fff; color:#493c52; border-color:#bdabc7; }
  html:not([data-workspace-theme="dark"]) body[data-experience="workspace"] .sidebar input::placeholder { color:#625269; opacity:1; }
  html:not([data-workspace-theme="dark"]) body[data-experience="workspace"] .sidebar .user-card { border-top:1px solid #d8c9df; }
  html:not([data-workspace-theme="dark"]) body[data-experience="workspace"] .sidebar .avatar { background:#ead9ef; color:#63326d; }
  html:not([data-workspace-theme="dark"]) body[data-experience="workspace"] .sidebar :is(button,input):focus-visible { outline:2px solid #643182; outline-offset:2px; }

  html:not([data-workspace-theme="dark"]) body[data-experience="workspace"] .sidebar .brand,
  html[data-workspace-theme="dark"] body[data-experience="workspace"] .sidebar .brand {
    background:#eee3f3; border-bottom:1px solid #d8c9df;
    height:112px; min-height:112px; padding:14px 16px; flex-shrink:0;
    display:flex; align-items:center; justify-content:center;
  }
  body[data-experience="workspace"] .sidebar .brand .workspace-brand-logo {
    display:block; width:100%; height:80px; max-width:220px; object-fit:contain;
  }

  html:not([data-workspace-theme="dark"]) body[data-experience="workspace"] :is(.topbar,.panel,.record-workspace,.record-workspace-head,.record-workspace-foot,.case-tabs) { background:#fff; border-color:#dedee4; }
  html:not([data-workspace-theme="dark"]) body[data-experience="workspace"] :is(.record-workspace .case-summary,.panel>.panel-head) { background:#fff; border-color:#e4e2e8; }
  html:not([data-workspace-theme="dark"]) body[data-experience="workspace"] .case-summary { border-left-color:#643182; }
  html:not([data-workspace-theme="dark"]) body[data-experience="workspace"] .case-tabs { gap:4px; }
  html:not([data-workspace-theme="dark"]) body[data-experience="workspace"] .case-tabs .tab { background:transparent; border-radius:0; border-bottom:3px solid transparent; color:#62616b; }
  html:not([data-workspace-theme="dark"]) body[data-experience="workspace"] .case-tabs .tab.active { background:#f5eef7; color:#743280; border-bottom-color:#643182; box-shadow:none; }
  html:not([data-workspace-theme="dark"]) body[data-experience="workspace"] .case-tabs .tab.active span { background:#eadcf0; color:#743280; }
  html:not([data-workspace-theme="dark"]) body[data-experience="workspace"] .button.primary { background:#643182; border-color:#643182; color:#fff; }
  html:not([data-workspace-theme="dark"]) body[data-experience="workspace"] .button.primary:hover { background:#51276b; border-color:#51276b; }
  html:not([data-workspace-theme="dark"]) body[data-experience="workspace"] .workspace-theme-switch { color:#62616b; }
  html:not([data-workspace-theme="dark"]) body[data-experience="workspace"] .workspace-theme-track { background:#eceaf0; border-color:#9c96a5; }
  html:not([data-workspace-theme="dark"]) body[data-experience="workspace"] .workspace-theme-track::after { background:#625b6b; }
}
