/* Workspace 1.22 — clear priorities, optional detail, intact research modules. */
:root {
  --ws-paper: #ffffff;
  --ws-surface: #f6f8fa;
  --ws-soft: #f0f5f8;
  --ws-ink: #183140;
  --ws-muted: #526a79;
  --ws-line: #dbe4e9;
  --ws-line-strong: #bbcdd7;
  --ws-blue: #195ecc;
  --ws-blue-hover: #134da9;
  --ws-blue-soft: #eaf2ff;
  --ws-teal: #116a65;
  --ws-focus: #2169d5;
  --ws-shadow: 0 12px 32px rgb(19 48 67 / 5%);
  --ws-radius: 16px;
}

html[data-wbs-theme="dark"] {
  --ws-paper: #121e2a;
  --ws-surface: #0d1620;
  --ws-soft: #192836;
  --ws-ink: #edf3f8;
  --ws-muted: #b2c3d0;
  --ws-line: #304251;
  --ws-line-strong: #526d80;
  --ws-blue: #8db9ff;
  --ws-blue-hover: #b3d1ff;
  --ws-blue-soft: #203957;
  --ws-teal: #90ddd0;
  --ws-focus: #9ec7ff;
  --ws-shadow: 0 12px 32px rgb(0 0 0 / 12%);
}

body:not(.nexus-home-active) { background: var(--ws-surface); }
body:not(.nexus-home-active) .main-area { min-width: 0; }
body:not(.nexus-home-active) .sidebar {
  width: 232px;
  height: 100dvh;
  padding: 28px 16px 20px;
  background: var(--ws-paper);
  border-color: var(--ws-line);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}
body:not(.nexus-home-active) .sidebar .logo { gap: 10px; padding: 0 9px 34px; }
body:not(.nexus-home-active) .sidebar .logo-mark {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  font-size: 25px;
  flex: 0 0 36px;
  background: var(--ws-ink);
  color: var(--ws-paper);
}
body:not(.nexus-home-active) .sidebar .logo strong { color: var(--ws-ink); font-size: 12px; letter-spacing: .12em; }
body:not(.nexus-home-active) .sidebar .logo small { color: var(--ws-muted); font-size: 10px; letter-spacing: .12em; }
body:not(.nexus-home-active) .sidebar > .side-heading { display: none; }
body:not(.nexus-home-active) .sidebar #nav { display: flex; flex-direction: column; gap: 8px; overflow: visible; }
body:not(.nexus-home-active) .sidebar .nav-item {
  min-height: 46px;
  width: 100%;
  padding: 11px 12px;
  gap: 11px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--ws-muted);
  font-size: .875rem;
  line-height: 1.4;
  font-weight: 550;
  white-space: normal;
  transition: background-color 160ms, color 160ms, border-color 160ms;
}
body:not(.nexus-home-active) .sidebar .nav-item:hover { color: var(--ws-ink); background: var(--ws-soft); }
body:not(.nexus-home-active) .sidebar .nav-item.is-active,
body:not(.nexus-home-active) .sidebar .nav-item[aria-current="page"] { color: var(--ws-blue); background: var(--ws-blue-soft); font-weight: 650; }
body:not(.nexus-home-active) .sidebar .nav-item .nav-new { display: none; }
body:not(.nexus-home-active) .sidebar .nav-icon { display: inline-flex; align-items: center; justify-content: center; width: 20px; flex: 0 0 20px; font-size: 18px; }
.ws-icon { width: 20px; height: 20px; flex: 0 0 20px; display: inline-block; vertical-align: middle; }
.ws-nav-primary { display: grid; gap: 4px; margin-bottom: 10px; }
.ws-nav-group { border-top: 1px solid var(--ws-line); padding-top: 8px; margin: 0; }
.ws-nav-summary {
  list-style: none;
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 12px;
  border-radius: 9px;
  color: var(--ws-muted);
  font-size: .875rem;
  font-weight: 600;
  cursor: pointer;
}
.ws-nav-summary::-webkit-details-marker,
.ws-fold-summary::-webkit-details-marker { display: none; }
.ws-nav-summary:hover { background: var(--ws-soft); color: var(--ws-ink); }
.ws-nav-summary .ws-chevron { margin-left: auto; }
.ws-nav-group[open] > .ws-nav-summary { color: var(--ws-ink); }
.ws-nav-group[open] > .ws-nav-summary .ws-chevron { transform: rotate(180deg); }
body:not(.nexus-home-active) .sidebar .ws-nav-group .nav-item { padding-left: 16px; font-size: .875rem; }
.ws-nav-group > :not(summary) { padding-bottom: 6px; }
body:not(.nexus-home-active) .sidebar .side-bottom { border-color: var(--ws-line); padding: 20px 10px 0; margin-top: auto; }
body:not(.nexus-home-active) .sidebar .side-bottom p { font-size: .75rem; line-height: 1.6; color: var(--ws-muted); }
body:not(.nexus-home-active) .sidebar .side-status { color: var(--ws-muted); font-size: .8125rem; line-height: 1.5; align-items: flex-start; }
body:not(.nexus-home-active) .sidebar .side-status .dot { margin-top: 6px; width: 6px; height: 6px; }
body:not(.nexus-home-active) .sidebar .side-status .dot.offline { background: var(--ws-muted); }
body:not(.nexus-home-active) .sidebar .side-status .dot.online { background: var(--ws-teal); }

body:not(.nexus-home-active) .topbar {
  min-height: 72px;
  padding: 12px clamp(20px, 3.8vw, 56px);
  background: var(--ws-paper);
  border-color: var(--ws-line);
  gap: 14px;
}
body:not(.nexus-home-active) .breadcrumb { color: var(--ws-muted); font-size: .8125rem; min-width: 0; }
body:not(.nexus-home-active) .breadcrumb strong { color: var(--ws-ink); font-weight: 600; }
body:not(.nexus-home-active) .breadcrumb span { margin-inline: 8px; }
body:not(.nexus-home-active) .toolbar-items { gap: 10px; flex-shrink: 0; }
body.ws-overview .topbar .project-chip { display: none; }
body:not(.nexus-home-active) .topbar .tag { display: none; }
body:not(.nexus-home-active) .topbar .locale-switch { border: 0; background: var(--ws-soft); padding: 2px; box-shadow: none; gap: 1px; border-radius: 9px; }
body:not(.nexus-home-active) .topbar .locale-option { min-height: 38px; min-width: 42px; padding: 8px 10px; font-size: .8125rem; font-weight: 600; color: var(--ws-muted); box-shadow: none; border-radius: 7px; }
body:not(.nexus-home-active) .topbar .locale-option[aria-pressed="true"] { background: var(--ws-paper); color: var(--ws-ink); box-shadow: 0 1px 4px rgb(20 40 60 / 8%); }
body:not(.nexus-home-active) .topbar .top-chat-button,
body:not(.nexus-home-active) .topbar .wbs-theme-toggle { min-height: 40px; font-size: .8125rem; background: transparent; border: 1px solid var(--ws-line); color: var(--ws-ink); box-shadow: none; border-radius: 9px; padding: 8px 11px; }
body:not(.nexus-home-active) .workspace-returnbar { position: static; background: var(--ws-paper); border-color: var(--ws-line); padding: 0 clamp(20px, 3.8vw, 56px) 8px; }
body:not(.nexus-home-active) .workspace-back-button { min-height: 36px; color: var(--ws-muted); font-size: .8125rem; padding: 6px 0; gap: 8px; }
body:not(.nexus-home-active) .workspace-back-button:hover { color: var(--ws-blue); background: transparent; }
body:not(.nexus-home-active) .workspace-back-button svg { width: 16px; height: 16px; }
body:not(.nexus-home-active) #workspace-menu-toggle { display: none; }
body.ws-overview #pages { max-width: 1220px; padding: 42px clamp(20px, 4vw, 60px) 24px; }
body.ws-overview .main-area > footer { margin-top: 20px; font-size: .75rem; color: var(--ws-muted); border-color: var(--ws-line); }

.ws-shell { max-width: 1000px; margin-inline: auto; color: var(--ws-ink); font-size: 1rem; }
.ws-shell [hidden] { display: none !important; }
.ws-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 30px; }
.ws-eyebrow { display: block; margin: 0 0 10px; font-size: .75rem; line-height: 1.5; letter-spacing: .13em; font-weight: 650; text-transform: uppercase; color: var(--ws-teal); }
.ws-heading h1 { margin: 0; max-width: 760px; font-size: clamp(2rem, 3.7vw, 2.75rem); line-height: 1.16; letter-spacing: -.045em; font-weight: 620; color: var(--ws-ink); text-wrap: balance; }
.ws-heading p { margin: 13px 0 0; max-width: 610px; color: var(--ws-muted); line-height: 1.65; font-size: 1rem; }
.ws-heading-action { flex-shrink: 0; padding-top: 5px; }
.ws-command-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 13px; background: var(--ws-paper); color: var(--ws-muted); border: 1px solid var(--ws-line); border-radius: 10px; font-size: .875rem; font-weight: 500; white-space: nowrap; }
.ws-command-button:hover { border-color: var(--ws-line-strong); color: var(--ws-ink); }
.ws-command-button kbd, .ws-shortcut-hint { font-family: inherit; font-size: .75rem; color: var(--ws-muted); }
.ws-command-button kbd { padding: 2px 5px; border: 1px solid var(--ws-line); border-radius: 4px; line-height: 1.25; }

.ws-current { overflow: hidden; border: 1px solid var(--ws-line); background: var(--ws-paper); border-radius: var(--ws-radius); box-shadow: var(--ws-shadow); margin-bottom: 22px; }
.ws-current-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 24px; border-bottom: 1px solid var(--ws-line); }
.ws-current-heading { font-size: 1rem; font-weight: 650; line-height: 1.4; margin: 0; color: var(--ws-ink); }
.ws-current-head h2 { font-size: 1rem; margin: 0; color: var(--ws-ink); }
.ws-current-head > span, .ws-current-head > small { font-size: .8125rem; color: var(--ws-muted); }
.ws-case-body { padding: 26px 28px 28px; min-width: 0; }
.ws-private-intro, .ws-case-main { display: flex; align-items: center; justify-content: space-between; gap: 28px; }
.ws-private-intro > div, .ws-case-main > div:first-child { min-width: 0; }
.ws-private-intro > .ws-button { flex: 0 0 auto; }
.ws-case-main .ws-actions { flex: 0 0 auto; margin-top: 0; }
.ws-state-note { margin: 16px 0 0; color: var(--ws-muted); font-size: .8125rem; line-height: 1.6; }
.ws-loading { display: flex; align-items: center; gap: 12px; color: var(--ws-muted); min-height: 74px; }
.ws-loading p { margin: 0; font-size: .9375rem; }
.ws-loading-mark { width: 8px; height: 8px; flex: 0 0 8px; border-radius: 50%; background: var(--ws-blue); }
.ws-search-count { display: block; color: var(--ws-muted); font-size: .8125rem; line-height: 1.6; }
.ws-search-count:not(:empty) { margin: -6px 0 12px; }
#ws-private-status[data-state="ready"] { color: var(--ws-teal); }
#ws-private-status[data-state="warning"] { color: #9a4d18; }
.ws-empty-icon { width: 42px; height: 42px; display: grid; place-items: center; color: var(--ws-blue); background: var(--ws-blue-soft); border-radius: 12px; margin-bottom: 15px; }
.ws-state-heading, .ws-case-title { margin: 0 0 8px; font-size: clamp(1.25rem, 2.2vw, 1.5rem); line-height: 1.35; letter-spacing: -.025em; font-weight: 620; overflow-wrap: anywhere; color: var(--ws-ink); }
.ws-state-copy { margin: 0; color: var(--ws-muted); font-size: 1rem; line-height: 1.65; max-width: 680px; }
.ws-state-copy + .ws-state-copy { margin-top: 8px; }
.ws-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.ws-button { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 44px; padding: 11px 18px; border: 1px solid transparent; border-radius: 10px; font-size: .9375rem; line-height: 1.4; font-weight: 600; text-decoration: none; cursor: pointer; transition: background-color 160ms, border-color 160ms, color 160ms; }
.ws-primary { background: var(--ws-blue); color: #fff; border-color: var(--ws-blue); }
.ws-primary:hover { background: var(--ws-blue-hover); border-color: var(--ws-blue-hover); }
.ws-secondary { background: var(--ws-paper); color: var(--ws-ink); border-color: var(--ws-line-strong); }
.ws-secondary:hover { background: var(--ws-soft); border-color: var(--ws-muted); }
.ws-text-button { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 10px 6px; border: 0; border-radius: 7px; color: var(--ws-blue); background: transparent; font-size: .875rem; line-height: 1.4; font-weight: 600; }
.ws-text-button:hover { text-decoration: underline; text-underline-offset: 4px; }
.ws-button:disabled, .ws-text-button:disabled { opacity: .65; cursor: progress; }
.ws-case-select { display: flex; flex-direction: column; gap: 8px; margin-bottom: 22px; color: var(--ws-muted); font-size: .8125rem; font-weight: 550; }
.ws-case-select select { appearance: none; width: 100%; max-width: 580px; min-height: 46px; border: 1px solid var(--ws-line-strong); border-radius: 10px; background-color: var(--ws-paper); color: var(--ws-ink); font-size: .9375rem; line-height: 1.45; padding: 11px 42px 11px 13px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' fill='none' stroke='%23526a79' stroke-width='1.6' viewBox='0 0 20 20'%3E%3Cpath d='m5 8 5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; }
.ws-case-meta { margin: 0; color: var(--ws-muted); font-size: .8125rem; line-height: 1.55; overflow-wrap: anywhere; }
.ws-case-status { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 14px; color: var(--ws-muted); font-size: .875rem; line-height: 1.5; }
.ws-case-status .ws-icon { width: 17px; height: 17px; flex-basis: 17px; color: var(--ws-teal); }
.ws-state-error { color: #a13e32; }
.ws-error { padding: 12px 14px; color: #8d352b; background: #fff1ed; border: 1px solid #edc9c2; border-radius: 9px; font-size: .875rem; }

.ws-folds { display: grid; gap: 12px; }
.ws-fold { margin: 0; background: var(--ws-paper); border: 1px solid var(--ws-line); border-radius: var(--ws-radius); transition: border-color 160ms; }
.ws-fold:hover { border-color: var(--ws-line-strong); }
.ws-fold[open] { border-color: var(--ws-line-strong); }
.ws-fold-summary { display: flex; align-items: center; gap: 16px; min-height: 88px; padding: 21px 24px; list-style: none; cursor: pointer; border-radius: var(--ws-radius); }
.ws-fold-icon { width: 38px; height: 38px; display: grid; place-items: center; flex: 0 0 38px; color: var(--ws-muted); background: var(--ws-soft); border: 1px solid transparent; border-radius: 11px; }
.ws-fold[open] .ws-fold-icon { color: var(--ws-blue); background: var(--ws-blue-soft); }
.ws-fold-copy { flex: 1; min-width: 0; }
.ws-fold-copy strong { display: block; color: var(--ws-ink); font-size: 1rem; line-height: 1.45; font-weight: 620; }
.ws-fold-copy span { display: block; margin-top: 3px; color: var(--ws-muted); font-size: .875rem; line-height: 1.5; }
.ws-fold-hint { color: var(--ws-muted); font-size: .75rem; white-space: nowrap; }
.ws-chevron { width: 16px; height: 16px; flex: 0 0 16px; color: var(--ws-muted); transition: transform 160ms; }
.ws-fold[open] > .ws-fold-summary > .ws-chevron { transform: rotate(180deg); }
.ws-fold-panel { margin: 0 24px; padding: 22px 0 24px; border-top: 1px solid var(--ws-line); }
.ws-fold-panel > :first-child { margin-top: 0; }
.ws-fold-panel > :last-child { margin-bottom: 0; }
.ws-start-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.ws-start-option { min-height: 128px; padding: 20px; display: flex; flex-direction: column; align-items: flex-start; text-align: left; gap: 9px; background: var(--ws-paper); color: var(--ws-ink); border: 1px solid var(--ws-line); border-radius: 12px; transition: background-color 160ms, border-color 160ms; }
.ws-start-option:hover { background: var(--ws-blue-soft); border-color: var(--ws-line-strong); }
.ws-start-option > .ws-icon { color: var(--ws-blue); margin-bottom: 3px; }
.ws-start-option strong { font-size: 1rem; line-height: 1.4; font-weight: 620; }
.ws-start-option span, .ws-start-option p { margin: 0; font-size: .875rem; line-height: 1.6; color: var(--ws-muted); }
.ws-nexus-help { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-top: 20px; padding: 18px 0 0; border-top: 1px solid var(--ws-line); font-size: .875rem; color: var(--ws-muted); }
.ws-nexus-help p { margin: 0; line-height: 1.6; }
.ws-nexus-help strong { color: var(--ws-ink); font-weight: 600; }
.ws-nexus-help button { flex-shrink: 0; }
.ws-search { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; color: var(--ws-ink); font-size: .875rem; font-weight: 550; }
.ws-search input { width: 100%; min-height: 46px; color: var(--ws-ink); background: var(--ws-paper); border: 1px solid var(--ws-line-strong); border-radius: 10px; padding: 11px 14px; font-size: 1rem; line-height: 1.4; }
.ws-search input::placeholder { color: var(--ws-muted); opacity: 1; }
.ws-tool-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 18px; }
.ws-tool-button { min-height: 78px; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 4px; padding: 13px 10px; color: var(--ws-ink); background: transparent; border: 0; border-bottom: 1px solid var(--ws-line); border-radius: 8px; text-align: left; transition: background-color 160ms; }
.ws-tool-button:hover { background: var(--ws-soft); }
.ws-tool-button strong { color: var(--ws-ink); font-size: .9375rem; line-height: 1.4; font-weight: 600; }
.ws-tool-button span { color: var(--ws-muted); font-size: .875rem; line-height: 1.5; }
.ws-tool-empty { margin: 10px 0 0; color: var(--ws-muted); font-size: .9375rem; line-height: 1.6; }
.ws-lab-intro { color: var(--ws-muted); font-size: 1rem; line-height: 1.7; max-width: 720px; margin: 0 0 20px; }
.ws-lab-intro p { margin: 0 0 14px; }
.ws-lab-intro strong { color: var(--ws-ink); font-weight: 600; }
.ws-mission { margin: 30px 0 0; padding: 22px 2px 4px; border-top: 1px solid var(--ws-line); color: var(--ws-muted); }
.ws-mission .ws-eyebrow { color: var(--ws-muted); font-size: .6875rem; margin-bottom: 8px; }
.ws-mission p, .ws-mission blockquote { margin: 0; max-width: 780px; font-size: .9375rem; line-height: 1.65; font-weight: 450; }
.ws-mission small { font-size: .75rem; }

/* Every disclosed control remains keyboard reachable; collapsed content does not. */
body:not(.nexus-home-active) :is(.sidebar .nav-item, .ws-nav-summary, #workspace-menu-toggle, .ws-fold-summary, .ws-button, .ws-text-button, .ws-command-button, .ws-start-option, .ws-tool-button, .ws-case-select select, .ws-search input):focus-visible {
  outline: 3px solid var(--ws-focus);
  outline-offset: 3px;
}
.ws-fold-summary:focus-visible { border-radius: var(--ws-radius); }

/* One primary sign-in action; connection recovery appears only when needed. */
#wbs-operator-modal.operator-dialog { color: var(--ws-ink); background: var(--ws-paper); border-color: var(--ws-line-strong); padding: 28px; max-width: min(92vw, 460px); }
#wbs-operator-modal .operator-form h2 { font-size: 1.5rem; line-height: 1.35; letter-spacing: -.025em; margin-bottom: 12px; }
#wbs-operator-modal .operator-form p { color: var(--ws-muted); font-size: .9375rem; line-height: 1.65; }
#wbs-operator-modal .operator-form label { margin: 20px 0; font-size: .875rem; font-weight: 550; gap: 8px; }
#wbs-operator-modal .operator-form input { background: var(--ws-surface); color: var(--ws-ink); border-color: var(--ws-line-strong); min-height: 46px; }
#wbs-operator-modal .sl-actions { display: flex; flex-wrap: wrap; gap: 8px; }
#wbs-operator-modal .operator-form button { min-height: 44px; border: 1px solid var(--ws-line-strong); background: var(--ws-paper); color: var(--ws-ink); border-radius: 9px; font-size: .875rem; font-weight: 600; }
#wbs-operator-modal .operator-form #operator-submit { color: #fff; background: #195ecc; border-color: #195ecc; }
#wbs-operator-modal .operator-form #operator-submit:hover { background: #134da9; }
#wbs-operator-modal #operator-check[hidden] { display: none !important; }
#wbs-operator-modal .operator-form #operator-error { color: #a04e24; }
#wbs-operator-modal :is(input,button):focus-visible { outline: 3px solid var(--ws-focus); outline-offset: 3px; }
html[data-wbs-theme="dark"] #wbs-operator-modal .operator-form #operator-error { color: #ffcb97; }

/* Calm case navigation: three common views, optional analysis and case tools. */
body:not(.nexus-home-active) #case-root .cc-head { align-items: flex-start; }
body:not(.nexus-home-active) #case-root .cc-head .cc-right { align-items: flex-start; gap: 10px; }
body:not(.nexus-home-active) #case-root .cc-right > [data-tab="reports"] { min-height: 44px; background: #195ecc; border-color: #195ecc; color: #fff; }
body:not(.nexus-home-active) #case-root .cc-right > [data-tab="reports"]:hover { background: #134da9; border-color: #134da9; }
body:not(.nexus-home-active) #case-root .cc-case-options,
body:not(.nexus-home-active) #case-root .cc-more-views { position: relative; }
body:not(.nexus-home-active) #case-root :is(.cc-case-options, .cc-more-views) > summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 44px; border: 1px solid var(--ws-line-strong); border-radius: 10px; color: var(--ws-ink); background: var(--ws-paper); padding: 10px 14px; font-size: .875rem; line-height: 1.5; font-weight: 550; }
body:not(.nexus-home-active) #case-root :is(.cc-case-options, .cc-more-views) > summary::-webkit-details-marker { display: none; }
body:not(.nexus-home-active) #case-root :is(.cc-case-options, .cc-more-views) > summary::after { content: ''; width: 7px; height: 7px; border-right: 1.6px solid currentColor; border-bottom: 1.6px solid currentColor; transform: rotate(45deg) translateY(-2px); flex: 0 0 7px; transition: transform 160ms; }
body:not(.nexus-home-active) #case-root :is(.cc-case-options, .cc-more-views)[open] > summary::after { transform: rotate(225deg) translate(-1px, -1px); }
body:not(.nexus-home-active) #case-root :is(.cc-options-panel, .cc-more-panel) { position: absolute; right: 0; top: calc(100% + 8px); z-index: 35; width: max-content; min-width: 250px; max-width: min(340px, calc(100vw - 36px)); max-height: min(420px, 65vh); overflow-y: auto; overscroll-behavior: contain; display: grid; gap: 3px; padding: 7px; background: var(--ws-paper); border: 1px solid var(--ws-line-strong); border-radius: 12px; box-shadow: 0 14px 40px rgb(10 32 48 / 15%); }
body:not(.nexus-home-active) #case-root :is(.cc-options-panel, .cc-more-panel) button { display: block; width: 100%; min-height: 44px; border: 1px solid transparent; border-radius: 7px; text-align: left; background: transparent; color: var(--ws-ink); font-size: .875rem; line-height: 1.5; padding: 10px 12px; white-space: normal; }
body:not(.nexus-home-active) #case-root :is(.cc-options-panel, .cc-more-panel) button:hover { background: var(--ws-soft); }
body:not(.nexus-home-active) #case-root .cc-more-panel button.active { background: var(--ws-blue-soft); color: var(--ws-blue); }
body:not(.nexus-home-active) #case-root .cc-more-views.has-current > summary { color: var(--ws-blue); background: var(--ws-blue-soft); border-color: var(--ws-line-strong); }
body:not(.nexus-home-active) #case-root .cc-options-panel button[data-action="word"] { color: var(--ws-blue); background: var(--ws-blue-soft); }
body:not(.nexus-home-active) #case-root .cc-case-select { display: flex; flex-direction: column; gap: 6px; min-width: min(100%, 260px); max-width: 100%; color: var(--ws-muted); font-size: .8125rem; }
body:not(.nexus-home-active) #case-root .cc-case-select select { max-width: 480px; min-height: 44px; font-size: .875rem; }
body:not(.nexus-home-active) #case-root .cc-index-row { align-items: flex-end; gap: 14px; }
body:not(.nexus-home-active) #case-root .cc-index-row .cc-pill { margin-bottom: 7px; }
body:not(.nexus-home-active) #case-root .cc-view-nav { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; border-bottom: 1px solid var(--ws-line); padding: 4px 0 16px; margin: 22px 0 22px; }
body:not(.nexus-home-active) #case-root .cc-primary-views { display: flex; flex-wrap: wrap; gap: 6px; }
body:not(.nexus-home-active) #case-root .cc-primary-views button { min-height: 44px; border: 1px solid transparent; border-radius: 9px; color: var(--ws-muted); background: transparent; padding: 10px 15px; font-size: .875rem; line-height: 1.5; font-weight: 550; }
body:not(.nexus-home-active) #case-root .cc-primary-views button:hover { color: var(--ws-ink); background: var(--ws-soft); }
body:not(.nexus-home-active) #case-root .cc-primary-views button.active { color: var(--ws-blue); background: var(--ws-blue-soft); }
body:not(.nexus-home-active) #case-root :is(.cc-case-options summary, .cc-more-views summary, .cc-options-panel button, .cc-more-panel button, .cc-primary-views button):focus-visible { outline: 3px solid var(--ws-focus); outline-offset: 2px; }

html[data-wbs-theme="dark"] .ws-primary { background: #2268ce; border-color: #2268ce; color: #fff; }
html[data-wbs-theme="dark"] .ws-primary:hover { background: #347ae0; border-color: #347ae0; }
html[data-wbs-theme="dark"] .ws-state-error { color: #ffb9af; }
html[data-wbs-theme="dark"] #ws-private-status[data-state="warning"] { color: #ffcb97; }
html[data-wbs-theme="dark"] .ws-error { color: #ffd4cd; background: #38251f; border-color: #75534a; }
html[data-wbs-theme="dark"] .ws-case-select select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' fill='none' stroke='%23b2c3d0' stroke-width='1.6' viewBox='0 0 20 20'%3E%3Cpath d='m5 8 5 5 5-5'/%3E%3C/svg%3E"); }

@media (max-width: 1180px) {
  body:not(.nexus-home-active) .topbar .project-chip { max-width: 150px; }
  body:not(.nexus-home-active) .topbar .top-chat-button { font-size: .75rem; }
  body.ws-overview #pages { padding-top: 34px; }
  .ws-heading { gap: 18px; }
  .ws-command-button kbd { display: none; }
}

@media (max-width: 1000px) {
  body:not(.nexus-home-active) .topbar { flex-wrap: wrap; gap: 10px; }
  body:not(.nexus-home-active) .topbar .project-chip { display: none; }
  .ws-heading { flex-wrap: wrap; gap: 18px; }
  .ws-heading-action { padding-top: 0; }
  .ws-current-head, .ws-fold-summary { padding-inline: 20px; }
  .ws-case-body { padding: 22px; }
  .ws-fold-panel { margin-inline: 20px; }
  .ws-private-intro, .ws-case-main { align-items: flex-start; flex-direction: column; gap: 20px; }
}

@media (max-width: 850px) {
  body:not(.nexus-home-active) > .shell { display: block; }
  body:not(.nexus-home-active) .sidebar { width: 100%; height: auto; padding: 16px 20px; border-right: 0; border-bottom: 1px solid var(--ws-line); position: relative; overflow: visible; }
  body:not(.nexus-home-active) .sidebar .logo { padding: 0; min-height: 44px; padding-right: 90px; }
  body:not(.nexus-home-active) #workspace-menu-toggle { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; min-width: 44px; padding: 10px 12px; border: 1px solid var(--ws-line-strong); background: var(--ws-paper); color: var(--ws-ink); border-radius: 9px; font-size: .875rem; }
  body:not(.nexus-home-active) .sidebar #workspace-menu-toggle { position: absolute; top: 16px; right: 20px; }
  body:not(.nexus-home-active) .sidebar #nav,
  body:not(.nexus-home-active) .sidebar .side-bottom { display: none; }
  body.ws-menu-open:not(.nexus-home-active) .sidebar #nav { display: flex; flex-direction: column; margin-top: 20px; gap: 8px; padding-top: 16px; border-top: 1px solid var(--ws-line); }
  body.ws-menu-open:not(.nexus-home-active) .sidebar .side-bottom { display: block; padding-top: 16px; margin-top: 18px; }
  body:not(.nexus-home-active) .sidebar .nav-item { min-height: 46px; padding-inline: 13px; }
  .ws-nav-primary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 10px; }
  body:not(.nexus-home-active) .topbar { min-height: 62px; padding: 9px 20px; flex-wrap: nowrap; }
  body:not(.nexus-home-active) .breadcrumb { flex: 1; font-size: .8125rem; }
  body:not(.nexus-home-active) .toolbar-items { gap: 7px; }
  body:not(.nexus-home-active) .topbar .top-chat-button { display: none; }
  body:not(.nexus-home-active) .topbar .wbs-theme-toggle { width: 40px; min-width: 40px; padding: 9px; }
  body:not(.nexus-home-active) .topbar .wbs-theme-label { display: none; }
  body:not(.nexus-home-active) .workspace-returnbar { padding: 0 20px 7px; }
  body:not(.nexus-home-active) .workspace-back-button { width: auto; }
  body.ws-overview #pages { padding: 30px 22px 16px; }
  .ws-heading { flex-wrap: nowrap; }
  .ws-heading h1 { font-size: clamp(1.9rem, 5vw, 2.5rem); }
  .ws-current { margin-bottom: 18px; }
  .ws-current-head { padding-block: 16px; }
  .ws-fold-summary { min-height: 82px; padding-block: 18px; }
  .ws-mission { margin-top: 25px; }
  body:not(.nexus-home-active) #case-root .cc-head { display: block; }
  body:not(.nexus-home-active) #case-root .cc-head .cc-right { justify-content: flex-start; margin-top: 18px; }
}

@media (max-width: 620px) {
  body:not(.nexus-home-active) .topbar .breadcrumb { font-size: .75rem; }
  body:not(.nexus-home-active) .topbar .breadcrumb > span { margin-inline: 4px; }
  body:not(.nexus-home-active) .topbar .toolbar-items { gap: 5px; }
  body:not(.nexus-home-active) .topbar .locale-option { min-width: 38px; padding-inline: 8px; }
  body.ws-overview #pages { padding: 26px 16px 12px; }
  .ws-heading { display: block; margin-bottom: 23px; }
  .ws-heading p { font-size: .9375rem; line-height: 1.6; margin-top: 10px; }
  .ws-heading-action { margin-top: 16px; }
  .ws-heading-action .ws-command-button { justify-content: flex-start; width: 100%; background: transparent; }
  .ws-heading h1 { font-size: 2rem; letter-spacing: -.04em; }
  .ws-current-head { padding: 16px 18px; }
  .ws-case-body { padding: 21px 18px 22px; }
  .ws-state-copy { font-size: .9375rem; }
  .ws-actions { gap: 8px; margin-top: 20px; }
  .ws-private-intro > .ws-button, .ws-case-main .ws-actions { width: 100%; }
  .ws-actions .ws-button { flex: 1 1 150px; }
  .ws-case-select select { max-width: 100%; font-size: 1rem; }
  .ws-folds { gap: 10px; }
  .ws-fold-summary { gap: 12px; padding: 17px 17px; }
  .ws-fold-icon { width: 32px; height: 32px; flex-basis: 32px; border-radius: 9px; }
  .ws-fold-icon .ws-icon { width: 18px; height: 18px; }
  .ws-fold-copy strong { font-size: .9375rem; }
  .ws-fold-copy span { font-size: .8125rem; line-height: 1.55; }
  .ws-fold-hint { display: none; }
  .ws-fold-panel { margin-inline: 17px; padding-block: 18px 21px; }
  .ws-start-grid, .ws-tool-list { grid-template-columns: 1fr; }
  .ws-start-option { min-height: 116px; padding: 18px; }
  .ws-nexus-help { display: block; }
  .ws-nexus-help button { margin-top: 10px; }
  .ws-tool-button { min-height: 76px; padding-inline: 6px; }
  .ws-lab-intro { font-size: .9375rem; }
  .ws-mission { padding-top: 20px; }
  .ws-mission p, .ws-mission blockquote { font-size: .875rem; line-height: 1.7; }
  body:not(.nexus-home-active) #case-root .cc-head .cc-right { display: flex; flex-wrap: wrap; }
  body:not(.nexus-home-active) #case-root .cc-right > [data-tab="reports"] { flex: 1 1 100%; }
  body:not(.nexus-home-active) #case-root .cc-case-options { width: 100%; }
  body:not(.nexus-home-active) #case-root :is(.cc-case-options, .cc-more-views) > summary { justify-content: space-between; }
  body:not(.nexus-home-active) #case-root :is(.cc-options-panel, .cc-more-panel) { position: static; width: 100%; min-width: 0; max-width: none; max-height: none; margin-top: 8px; border-color: var(--ws-line); box-shadow: none; }
  body:not(.nexus-home-active) #case-root .cc-index-row { display: block; }
  body:not(.nexus-home-active) #case-root .cc-case-select { width: 100%; }
  body:not(.nexus-home-active) #case-root .cc-case-select select { max-width: 100%; width: 100%; }
  body:not(.nexus-home-active) #case-root .cc-index-row .cc-pill { display: inline-flex; white-space: normal; margin: 12px 0 0; }
  body:not(.nexus-home-active) #case-root .cc-view-nav { display: block; margin-top: 20px; }
  body:not(.nexus-home-active) #case-root .cc-primary-views { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 3px; margin-bottom: 10px; }
  body:not(.nexus-home-active) #case-root .cc-primary-views button { min-height: 48px; padding: 9px 6px; font-size: .8125rem; }
  body:not(.nexus-home-active) #case-root .cc-more-views { width: 100%; }
}

@media (max-width: 380px) {
  body:not(.nexus-home-active) .sidebar { padding-inline: 16px; }
  body:not(.nexus-home-active) .sidebar #workspace-menu-toggle { right: 16px; }
  body:not(.nexus-home-active) .sidebar .logo { gap: 8px; padding-right: 82px; }
  body:not(.nexus-home-active) .sidebar .logo strong { font-size: 11px; }
  body:not(.nexus-home-active) .sidebar .logo small { font-size: 9px; }
  body:not(.nexus-home-active) .topbar { padding-inline: 16px; gap: 6px; }
  body:not(.nexus-home-active) .topbar .breadcrumb { max-width: 145px; }
  body:not(.nexus-home-active) .workspace-returnbar { padding-inline: 16px; }
  .ws-fold-summary { gap: 10px; padding-inline: 14px; }
  .ws-fold-icon { display: none; }
  .ws-current-head { flex-wrap: wrap; gap: 6px; }
}

@media (prefers-reduced-motion: reduce) {
  .ws-shell *, .ws-nav-group *, #case-root .cc-view-nav *, #case-root .cc-case-options * { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

@media print {
  .ws-command-button, #workspace-menu-toggle, .ws-nav-group { display: none !important; }
  .ws-current, .ws-fold { box-shadow: none; break-inside: avoid; }
}
