/* Workspace geometry extends the existing NwiseIP palette and self-hosted fonts. */
:root {
 --ws-header-height: 48px;
 --ws-rail-width: 72px;
 --ws-panel-width: 304px;
 --ws-nav-height: 32px;
 --ws-workspace-height: 64px;
 --ws-logo-width: 168px;
 --ws-logo-height: 24px;
 --ws-icon-size: 24px;
 --ws-icon-small: 16px;
 --ws-arrow-size: 8px;
 --ws-control-height: 32px;
 --ws-rail-item-height: 64px;
 --ws-context-height: 24px;
 --ws-account-width: 224px;
 --ws-info-width: 480px;
 --ws-drawer-width: 640px;
 --ws-fee-comparison-text-width: 160px;
 --ws-search-width: 200px;
 --ws-space-1: 4px;
 --ws-space-2: 8px;
 --ws-space-3: 12px;
 --ws-space-4: 16px;
 --ws-space-6: 24px;
 --ws-space-8: 32px;
 --ws-space-10: 40px;
 --ws-font-micro: 10px;
 --ws-font-small: 12px;
 --ws-font-body: 14px;
 --ws-font-title: 24px;
 --ws-line-small: 16px;
 --ws-line-body: 20px;
 --ws-line-title: 32px;
 --ws-weight-regular: 400;
 --ws-weight-medium: 500;
 --ws-weight-semibold: 600;
 --ws-border: 1px;
 --ws-accent-width: 4px;
 --ws-icon-stroke: 1.5px;
 --ws-radius-sm: 4px;
 --ws-radius-md: 8px;
 --ws-radius-full: 50%;
 --ws-overlay: rgba(0, 44, 105, .24);
 --ws-layer-rail: 10;
 --ws-layer-header: 30;
 --ws-layer-drawer: 40;
 --ws-layer-backdrop: 50;
 --ws-layer-menu: 60;
 --ws-layer-popover: 70;
 --ws-nav-index-width: 24px;
 --ws-nav-marker-size: 4px;
 --ws-nav-wash: color-mix(in srgb, var(--navy) 5%, var(--white));
}
body:has(.ws-shell:not([hidden])) { overflow: hidden; background: var(--white); }
#workspace-shell[hidden], #auth-panel[hidden] { display: none !important; }
.ws-shell { display: grid; grid-template-columns: var(--ws-rail-width) var(--ws-panel-width) minmax(0, 1fr); grid-template-rows: var(--ws-header-height) minmax(0, 1fr); height: 100vh; height: 100dvh; min-height: 0; overflow: hidden; background: var(--white); }
.ws-shell .ws-globalbar { grid-column: 1 / -1; grid-row: 1; z-index: var(--ws-layer-header); display: flex; align-items: center; justify-content: flex-start; gap: var(--ws-space-4); height: var(--ws-header-height); min-height: 0; padding: 0 var(--ws-space-4); flex-wrap: nowrap; background: var(--white); border-bottom: var(--ws-border) solid var(--slate-200); font-size: var(--ws-font-small); }
.ws-global-brand { display: flex; align-items: center; flex: 0 0 auto; width: var(--ws-logo-width); height: var(--ws-logo-height); }
.ws-global-brand img { display: block; width: 100%; height: 100%; object-fit: contain; }
.ws-product-name { flex: 1; min-width: 0; font-size: var(--ws-font-body); color: var(--navy); font-weight: var(--ws-weight-medium); }
.ws-account { margin-left: auto; position: relative; color: var(--navy); }
.ws-account > summary, .ws-notice > summary { list-style: none; display: flex; align-items: center; gap: var(--ws-space-2); cursor: pointer; border-radius: var(--ws-radius-sm); }
.ws-account > summary { min-height: var(--ws-control-height); padding: 0 var(--ws-space-2); }
.ws-account > summary::-webkit-details-marker, .ws-notice > summary::-webkit-details-marker { display: none; }
.ws-account .session-user { display: block; max-width: var(--ws-account-width); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; overflow-wrap: normal; }
.ws-account-label { display: none; }
.ws-summary-arrow { display: inline-block; width: var(--ws-arrow-size); height: var(--ws-arrow-size); border-right: var(--ws-border) solid currentColor; border-bottom: var(--ws-border) solid currentColor; transform: rotate(45deg); margin-top: calc(-1 * var(--ws-space-1)); }
.ws-account[open] .ws-summary-arrow, .ws-notice[open] .ws-summary-arrow { transform: rotate(225deg); margin-top: var(--ws-space-1); }
.ws-shell .ws-account-panel { position: absolute; top: calc(100% + var(--ws-space-2)); right: 0; z-index: var(--ws-layer-popover); display: flex; flex-direction: column; align-items: stretch; justify-content: flex-start; width: var(--ws-account-width); padding: var(--ws-space-3); gap: var(--ws-space-2); border: var(--ws-border) solid var(--slate-200); border-radius: var(--ws-radius-md); background: var(--white); box-shadow: var(--shadow); }
.ws-account-panel button { font-size: var(--ws-font-body); text-align: left; border-radius: 0; }
.ws-rail { grid-column: 1; grid-row: 2; display: flex; flex-direction: column; align-items: stretch; gap: var(--ws-space-1); padding: var(--ws-space-2) var(--ws-space-1); border-right: var(--ws-border) solid var(--slate-200); background: var(--slate-50); z-index: var(--ws-layer-rail); }
.ws-rail-item { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--ws-space-1); min-height: var(--ws-rail-item-height); border: 0; border-left: var(--ws-accent-width) solid transparent; border-radius: var(--ws-radius-md); background: transparent; color: var(--slate-600); font-size: var(--ws-font-micro); line-height: var(--ws-line-small); padding: var(--ws-space-2) 0; text-decoration: none; }
.ws-rail-item svg { display: block; width: var(--ws-icon-size); height: var(--ws-icon-size); fill: none; stroke: currentColor; stroke-width: var(--ws-icon-stroke); stroke-linecap: round; stroke-linejoin: round; }
.ws-rail-item:hover { color: var(--navy); background: var(--slate-100); }
.ws-rail-item[aria-current="page"] { color: var(--navy); background: transparent; border-left-color: transparent; }
.ws-rail-item[aria-current="page"]::after { content: ''; position: absolute; width: var(--ws-nav-marker-size); height: var(--ws-nav-marker-size); left: var(--ws-space-1); top: var(--ws-space-4); border-radius: var(--ws-radius-full); background: var(--red); }
.ws-shell .ws-workspace { grid-column: 2; grid-row: 2; width: var(--ws-panel-width); min-width: 0; min-height: 0; padding: 0 var(--ws-space-2) var(--ws-space-4); overflow-y: auto; overflow-x: hidden; border: 0; border-right: var(--ws-border) solid var(--slate-200); background: var(--white); }
.ws-workspace-head { display: flex; align-items: center; gap: var(--ws-space-2); min-height: var(--ws-workspace-height); padding: var(--ws-space-3) var(--ws-space-2); color: var(--navy); }
.ws-workspace-head > div { min-width: 0; }
.ws-workspace-head strong { display: block; font-size: var(--ws-font-small); font-weight: var(--ws-weight-semibold); white-space: nowrap; }
.ws-workspace-head small { display: block; color: var(--slate-600); font-size: var(--ws-font-small); line-height: var(--ws-line-body); }
.ws-workspace-monogram { display: grid; place-items: center; width: var(--ws-control-height); height: var(--ws-control-height); flex: 0 0 auto; background: transparent; color: var(--navy); font-size: var(--ws-font-body); font-family: var(--font-mono); font-weight: var(--ws-weight-semibold); }
.ws-shell .nav-caption { margin: var(--ws-space-2) var(--ws-space-2) var(--ws-space-1); font-size: var(--ws-font-small); line-height: var(--ws-line-body); }
.ws-workspace #boards { min-width: 0; display: block; }
.ws-workspace .nav-item { min-height: var(--ws-nav-height); height: var(--ws-nav-height); margin: 0; padding: 0 var(--ws-space-2); gap: var(--ws-space-2); border: 0; border-left: var(--ws-accent-width) solid transparent; border-radius: var(--ws-radius-sm); align-items: center; font-size: var(--ws-font-body); line-height: var(--ws-line-body); font-weight: var(--ws-weight-regular); overflow: hidden; text-decoration: none; }
.ws-workspace .nav-item > span:not(.rb-board-icon):not(.rb-guide-icon):not(.board-icon) { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ws-workspace .nav-item.selected { color: var(--navy); background: var(--ws-nav-wash); border-left-color: transparent; border-radius: var(--ws-radius-md); font-weight: var(--ws-weight-semibold); }
.ws-workspace .ws-nav-index { width: var(--ws-nav-index-width); flex: 0 0 var(--ws-nav-index-width); text-align: center; font-family: var(--font-mono); font-size: var(--ws-font-small); font-weight: var(--ws-weight-regular); color: var(--slate-600); }
.ws-workspace .nav-item.selected .ws-nav-index { color: var(--navy); }
.ws-workspace .nav-item small { font-size: var(--ws-font-small); flex: 0 0 auto; }
.ws-workspace .rb-collaboration .rb-nav-item { padding-left: var(--ws-space-2); align-items: center; }
.ws-workspace .rb-nav-label { white-space: nowrap; overflow-wrap: normal; }
.ws-workspace .rb-board-icon, .ws-workspace .rb-guide-icon, .ws-workspace .rb-folder-icon { margin-top: 0; }
.ws-workspace .rb-collaboration > summary, .ws-workspace .example-navigation > summary, .ws-workspace .ws-nav-group > summary { display: flex; align-items: center; gap: var(--ws-space-2); height: var(--ws-nav-height); min-height: var(--ws-nav-height); margin: 0; padding: 0 var(--ws-space-2); color: var(--slate-800); font-size: var(--ws-font-body); line-height: var(--ws-line-body); font-weight: var(--ws-weight-medium); cursor: pointer; }
.ws-workspace .example-navigation, .ws-workspace .ws-nav-group { margin: var(--ws-space-1) 0; padding: 0; border: 0; }
.ws-workspace .example-navigation > summary, .ws-workspace .ws-nav-group > summary { list-style-position: inside; }
.ws-workspace .example-navigation > summary::before, .ws-workspace .ws-nav-group > summary::before { content: '›'; width: var(--ws-arrow-size); transform: rotate(0); }
.ws-workspace .example-navigation[open] > summary::before, .ws-workspace .ws-nav-group[open] > summary::before { transform: rotate(90deg); }
.ws-workspace .quote-nav { margin: var(--ws-space-2) 0; color: var(--navy); background: var(--white); border: var(--ws-border) solid var(--slate-200); font-weight: var(--ws-weight-medium); }
.ws-workspace .quote-nav:hover { background: var(--info-bg); }
.ws-workspace .nav-divider { margin: var(--ws-space-2) 0; height: var(--ws-border); }
.ws-shell .ws-main { grid-column: 3; grid-row: 2; min-width: 0; min-height: 0; overflow: auto; padding: var(--ws-space-2) var(--ws-space-8) var(--ws-space-8); background: var(--white); }
.ws-context-row { display: flex; align-items: center; justify-content: space-between; gap: var(--ws-space-4); min-height: var(--ws-context-height); font-size: var(--ws-font-small); line-height: var(--ws-line-small); color: var(--slate-600); }
.ws-breadcrumb { display: flex; align-items: center; gap: var(--ws-space-2); min-width: 0; }
.ws-breadcrumb #breadcrumb { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ws-notice { position: relative; flex: 0 0 auto; }
.ws-notice > summary { min-height: var(--ws-context-height); padding: 0 var(--ws-space-1); font-size: var(--ws-font-small); }
.ws-notice-panel { position: absolute; top: calc(100% + var(--ws-space-2)); right: 0; z-index: var(--ws-layer-popover); width: min(var(--ws-info-width), calc(100vw - var(--ws-space-8))); padding: var(--ws-space-4); border: var(--ws-border) solid var(--slate-200); border-radius: var(--ws-radius-md); background: var(--white); box-shadow: var(--shadow); font-size: var(--ws-font-small); line-height: var(--ws-line-body); max-height: calc(100dvh - var(--ws-header-height) - var(--ws-space-10)); overflow-y: auto; }
.ws-notice-panel > strong { font-size: var(--ws-font-body); color: var(--navy); }
.ws-notice-panel p { margin: var(--ws-space-2) 0; }
.ws-notice-panel .rb-source-hint { margin: var(--ws-space-3) 0 0; }
.ws-shell .board-head { padding: 0 0 var(--ws-space-2); gap: var(--ws-space-4); align-items: center; }
.ws-shell .board-head > div { min-width: 0; }
.ws-shell .board-head .eyebrow { display: none; }
.ws-shell #board-title { margin: 0; font-size: var(--ws-font-title); line-height: var(--ws-line-title); font-weight: var(--ws-weight-medium); letter-spacing: normal; overflow-wrap: anywhere; }
.ws-shell .readonly-badge { border: 0; padding: var(--ws-space-1) var(--ws-space-2); background: var(--slate-100); border-radius: var(--ws-radius-sm); font-size: var(--ws-font-small); line-height: var(--ws-line-body); }
.ws-shell .view-tabs { gap: var(--ws-space-4); min-height: var(--ws-nav-height); border-bottom: var(--ws-border) solid var(--slate-200); }
.ws-shell .view-tabs::after { bottom: calc(-1 * var(--ws-border)); height: var(--ws-accent-width); width: var(--ws-space-8); }
.ws-shell .view-tabs .active { min-height: var(--ws-nav-height); gap: var(--ws-space-2); font-size: var(--ws-font-body); font-weight: var(--ws-weight-medium); }
.ws-shell .view-hint { font-size: var(--ws-font-small); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ws-shell .toolbar { gap: var(--ws-space-2); padding: var(--ws-space-2) 0; font-size: var(--ws-font-small); }
.ws-board-actions:empty { display: none; }
.ws-board-actions { display: flex; align-items: center; }
.ws-shell .toolbar .work-create-button { min-height: var(--ws-control-height); height: var(--ws-control-height); margin: 0; padding: 0 var(--ws-space-3); color: var(--white); background: var(--navy); border-color: var(--navy); font-size: var(--ws-font-small); }
.ws-shell .toolbar .search { width: var(--ws-search-width); min-height: var(--ws-control-height); height: var(--ws-control-height); padding: var(--ws-space-1) var(--ws-space-2); }
.ws-shell .toolbar select, .ws-shell .toolbar > button { min-height: var(--ws-control-height); height: var(--ws-control-height); padding: var(--ws-space-1) var(--ws-space-2); font-size: var(--ws-font-small); }
.ws-shell .toolbar #result-count { font-size: var(--ws-font-small); }
.ws-main #board-content { padding-top: var(--ws-space-4); }
.ws-shell .app-message { margin: var(--ws-space-2) 0; }
.ws-shell .board-footer { margin-top: var(--ws-space-4); padding-top: var(--ws-space-3); font-size: var(--ws-font-small); line-height: var(--ws-line-body); }
.ws-shell .detail-panel { position: fixed; top: var(--ws-header-height); right: 0; bottom: 0; z-index: var(--ws-layer-drawer); width: min(var(--ws-drawer-width), 100vw); max-width: 100vw; overflow-y: auto; padding: var(--ws-space-10) var(--ws-space-8) var(--ws-space-8); }
.ws-shell .detail-panel .close { top: var(--ws-space-3); right: var(--ws-space-4); }
.case-fee-comparison-scroll { max-inline-size: 100%; overflow-x: auto; }
.case-fee-comparison-scroll:focus-visible { outline: var(--ws-border) solid var(--info); outline-offset: var(--ws-space-1); }
.case-fee-comparison-scroll :is(th, td):is(:first-child, :nth-child(7)) {
 min-inline-size: var(--ws-fee-comparison-text-width);
 word-break: keep-all;
 overflow-wrap: anywhere;
}
.ws-icon-button { display: inline-flex; align-items: center; justify-content: center; width: var(--ws-control-height); height: var(--ws-control-height); padding: 0; border: 0; border-radius: var(--ws-radius-sm); color: var(--navy); background: transparent; flex: 0 0 auto; }
.ws-menu-toggle, .ws-panel-close { display: none; }
.ws-menu-icon { width: var(--ws-icon-small); height: var(--ws-icon-small); background: linear-gradient(to bottom,currentColor 0,currentColor 12%,transparent 12%,transparent 44%,currentColor 44%,currentColor 56%,transparent 56%,transparent 88%,currentColor 88%); }
.ws-close-icon { position: relative; width: var(--ws-icon-small); height: var(--ws-icon-small); }
.ws-close-icon::before, .ws-close-icon::after { content: ''; position: absolute; top: 50%; left: 0; width: 100%; height: var(--ws-border); background: currentColor; transform: rotate(45deg); }
.ws-close-icon::after { transform: rotate(-45deg); }
.ws-backdrop { display: none; }
@media (max-width: 60rem) {
 .ws-shell { grid-template-columns: minmax(0, 1fr); }
 .ws-shell .ws-globalbar { grid-column: 1; gap: var(--ws-space-2); }
 .ws-menu-toggle, .ws-panel-close { display: inline-flex; }
 .ws-panel-close { margin-left: auto; }
 .ws-rail { display: none; }
 .ws-shell .ws-workspace { position: fixed; top: var(--ws-header-height); bottom: 0; left: 0; z-index: var(--ws-layer-menu); width: min(var(--ws-panel-width), calc(100vw - var(--ws-space-8))); max-width: 100vw; transform: translateX(-100%); visibility: hidden; }
 .ws-shell.ws-nav-open .ws-workspace { transform: translateX(0); visibility: visible; }
 .ws-shell.ws-nav-open .ws-backdrop:not([hidden]) { display: block; position: fixed; top: var(--ws-header-height); right: 0; bottom: 0; left: 0; z-index: var(--ws-layer-backdrop); border: 0; padding: 0; background: var(--ws-overlay); cursor: default; }
 .ws-shell .ws-main { grid-column: 1; padding-right: var(--ws-space-4); padding-left: var(--ws-space-4); }
 .ws-account .session-user { display: none; }
 .ws-account-label { display: inline; }
 .ws-shell .view-hint { display: none; }
 .ws-shell .detail-panel { padding-right: var(--ws-space-4); padding-left: var(--ws-space-4); }
}
@media (max-width: 30rem) {
 .ws-product-name { display: none; }
 .ws-shell .ws-globalbar { padding-right: var(--ws-space-2); padding-left: var(--ws-space-2); }
 .ws-shell .board-head { gap: var(--ws-space-2); }
 .ws-shell .toolbar .search { flex: 1 1 0; min-width: var(--ws-space-8); }
 .ws-shell .toolbar #result-count { flex: 1 1 auto; }
 .ws-shell .ws-account-panel { width: var(--ws-account-width); }
}
